dispach 0.1.2 → 0.1.3
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.
- package/README.md +134 -85
- package/dist/App-qfqvx9c7.js +11 -0
- package/dist/{App-b1yrwrcq.js.map → App-qfqvx9c7.js.map} +6 -7
- package/dist/ConfigEditor-apcnj4nj.js +6 -0
- package/dist/{ConfigEditor-n8hdw6r7.js.map → ConfigEditor-apcnj4nj.js.map} +2 -2
- package/dist/KeyProbe-ya5t3v3v.js +5 -0
- package/dist/{KeyProbe-9jjeze5r.js.map → KeyProbe-ya5t3v3v.js.map} +2 -2
- package/dist/Picker-b7mn0mjg.js +5 -0
- package/dist/{Picker-hfeh1g6m.js.map → Picker-b7mn0mjg.js.map} +1 -1
- package/dist/SessionPicker-vacfwczg.js +5 -0
- package/dist/{SessionPicker-zyqkg4dn.js.map → SessionPicker-vacfwczg.js.map} +2 -2
- package/dist/SkillBrowser-66ntwaa9.js +5 -0
- package/dist/{SkillBrowser-3qdp8080.js.map → SkillBrowser-66ntwaa9.js.map} +1 -1
- package/dist/WizardApp-123998yh.js +5 -0
- package/dist/{WizardApp-vzpbydy3.js.map → WizardApp-123998yh.js.map} +3 -3
- package/dist/agents.d.ts +19 -3
- package/dist/agents.d.ts.map +1 -1
- package/dist/channels-q4fwqq87.js +31 -0
- package/dist/channels-q4fwqq87.js.map +10 -0
- package/dist/channels.d.ts +26 -0
- package/dist/channels.d.ts.map +1 -0
- package/dist/client.js +10 -10
- package/dist/client.js.map +3 -3
- package/dist/config-64q4mgxc.js +24 -0
- package/dist/{config-g7za9x13.js.map → config-64q4mgxc.js.map} +2 -2
- package/dist/{credential-npr6z8c8.js → credential-2sj7vsmw.js} +5 -5
- package/dist/{credential-npr6z8c8.js.map → credential-2sj7vsmw.js.map} +1 -1
- package/dist/daemon.d.ts.map +1 -1
- package/dist/index-0k3w2mxf.js +6 -0
- package/dist/{index-hwpvhaza.js.map → index-0k3w2mxf.js.map} +1 -1
- package/dist/index-1s81qstp.js +6 -0
- package/dist/{index-v8e92nfw.js.map → index-1s81qstp.js.map} +1 -1
- package/dist/index-2rycma8x.js +12 -0
- package/dist/{index-258d8bzg.js.map → index-2rycma8x.js.map} +4 -3
- package/dist/index-2zye08c4.js +6 -0
- package/dist/{index-vgc3y3rm.js.map → index-2zye08c4.js.map} +2 -2
- package/dist/{index-gme2egyq.js → index-3km1jwh7.js} +4 -4
- package/dist/{index-gme2egyq.js.map → index-3km1jwh7.js.map} +1 -1
- package/dist/index-3mtgcvkq.js +429 -0
- package/dist/index-3mtgcvkq.js.map +11 -0
- package/dist/index-4knb5vjm.js +90 -0
- package/dist/index-4knb5vjm.js.map +13 -0
- package/dist/{index-3g3ny01d.js → index-5nwwekk0.js} +4 -4
- package/dist/{index-3g3ny01d.js.map → index-5nwwekk0.js.map} +1 -1
- package/dist/index-5rm7dwq4.js +6 -0
- package/dist/index-5rm7dwq4.js.map +11 -0
- package/dist/index-79epttpm.js +6 -0
- package/dist/index-79epttpm.js.map +10 -0
- package/dist/{index-4cf6v9nb.js → index-7yk1zvds.js} +4 -4
- package/dist/{index-4cf6v9nb.js.map → index-7yk1zvds.js.map} +1 -1
- package/dist/index-81gb4ey4.js +6 -0
- package/dist/{index-4z7axw4r.js.map → index-81gb4ey4.js.map} +1 -1
- package/dist/index-8a5d8sfe.js +6 -0
- package/dist/{index-0d93hyfc.js.map → index-8a5d8sfe.js.map} +1 -1
- package/dist/index-a21zyy54.js +6 -0
- package/dist/index-a21zyy54.js.map +9 -0
- package/dist/index-b6da6c16.js +92 -0
- package/dist/index-b6da6c16.js.map +15 -0
- package/dist/index-byxrc961.js +903 -0
- package/dist/{index-tv4yv7d2.js.map → index-byxrc961.js.map} +16 -15
- package/dist/{index-ammv5st7.js → index-cgfg6t5a.js} +6 -6
- package/dist/{index-ammv5st7.js.map → index-cgfg6t5a.js.map} +1 -1
- package/dist/{index-s9mbq7h6.js → index-ehzwdnc3.js} +4 -4
- package/dist/{index-s9mbq7h6.js.map → index-ehzwdnc3.js.map} +1 -1
- package/dist/index-fzmmhmk2.js +7 -0
- package/dist/index-fzmmhmk2.js.map +11 -0
- package/dist/index-g3pk0kc0.js +6 -0
- package/dist/{index-9r0wyj6w.js.map → index-g3pk0kc0.js.map} +2 -2
- package/dist/index-h828nk24.js +153 -0
- package/dist/index-h828nk24.js.map +20 -0
- package/dist/{index-02dn6m2j.js → index-jq999vcw.js} +5 -5
- package/dist/{index-02dn6m2j.js.map → index-jq999vcw.js.map} +2 -2
- package/dist/index-k2aq5bg0.js +9 -0
- package/dist/{index-6p999cx4.js.map → index-k2aq5bg0.js.map} +4 -6
- package/dist/{index-cqqb6gaq.js → index-k3y8y3wj.js} +5 -5
- package/dist/{index-cqqb6gaq.js.map → index-k3y8y3wj.js.map} +1 -1
- package/dist/index-k59wwdgz.js +9 -0
- package/dist/{index-ff514z3y.js.map → index-k59wwdgz.js.map} +3 -5
- package/dist/index-nmnnwa02.js +6 -0
- package/dist/{index-6q4wf8e3.js.map → index-nmnnwa02.js.map} +1 -1
- package/dist/index-nn3tk25c.js +6 -0
- package/dist/{index-d4x6yvqh.js.map → index-nn3tk25c.js.map} +3 -4
- package/dist/index-q0hxh57v.js +126 -0
- package/dist/index-q0hxh57v.js.map +14 -0
- package/dist/index-srmhk9g5.js +11 -0
- package/dist/index-srmhk9g5.js.map +11 -0
- package/dist/index-swtyfhha.js +6 -0
- package/dist/{index-fex44816.js.map → index-swtyfhha.js.map} +2 -2
- package/dist/index-whq42sat.js +6 -0
- package/dist/{index-h9mw7b9d.js.map → index-whq42sat.js.map} +1 -1
- package/dist/{index-j7gyr5nx.js → index-wzsmh5j0.js} +7 -7
- package/dist/{index-j7gyr5nx.js.map → index-wzsmh5j0.js.map} +1 -1
- package/dist/{index-j55s3ehk.js → index-x7v1zq89.js} +7 -7
- package/dist/{index-j55s3ehk.js.map → index-x7v1zq89.js.map} +2 -2
- package/dist/index-xhzmv4dh.js +66 -0
- package/dist/index-xhzmv4dh.js.map +12 -0
- package/dist/index-xmv47vs0.js +6 -0
- package/dist/{index-gz9x25tz.js.map → index-xmv47vs0.js.map} +2 -2
- package/dist/index-y4c32wn7.js +6 -0
- package/dist/{index-qdbq8crg.js.map → index-y4c32wn7.js.map} +2 -2
- package/dist/index-yjcdp72k.js +6 -0
- package/dist/{index-tf71ap9v.js.map → index-yjcdp72k.js.map} +1 -1
- package/dist/index-zn24991r.js +6 -0
- package/dist/index-zn24991r.js.map +10 -0
- package/dist/index.js +374 -443
- package/dist/index.js.map +23 -27
- package/dist/init.d.ts.map +1 -1
- package/dist/lib/channel-actions.d.ts +103 -0
- package/dist/lib/channel-actions.d.ts.map +1 -0
- package/dist/lib/chat-frame.d.ts +12 -1
- package/dist/lib/chat-frame.d.ts.map +1 -1
- package/dist/lib/commands.d.ts +13 -0
- package/dist/lib/commands.d.ts.map +1 -1
- package/dist/lib/const.d.ts +1 -1
- package/dist/lib/host-actions.d.ts +121 -0
- package/dist/lib/host-actions.d.ts.map +1 -0
- package/dist/lib/init-flow.d.ts +32 -0
- package/dist/lib/init-flow.d.ts.map +1 -1
- package/dist/lib/init-whatsapp.d.ts +52 -0
- package/dist/lib/init-whatsapp.d.ts.map +1 -0
- package/dist/lib/plugin-install.d.ts +120 -0
- package/dist/lib/plugin-install.d.ts.map +1 -0
- package/dist/lib/providers.d.ts.map +1 -1
- package/dist/lib/provision.d.ts.map +1 -1
- package/dist/lib/readme-table.d.ts +15 -0
- package/dist/lib/readme-table.d.ts.map +1 -0
- package/dist/lib/sandbox.d.ts +15 -0
- package/dist/lib/sandbox.d.ts.map +1 -1
- package/dist/lib/schema.d.ts +34 -1
- package/dist/lib/schema.d.ts.map +1 -1
- package/dist/lib/subcommand.d.ts.map +1 -1
- package/dist/lib/web-url.d.ts +15 -0
- package/dist/lib/web-url.d.ts.map +1 -0
- package/dist/lib/wizard.d.ts.map +1 -1
- package/dist/memory.d.ts.map +1 -1
- package/dist/model.d.ts.map +1 -1
- package/dist/plugins.d.ts +27 -8
- package/dist/plugins.d.ts.map +1 -1
- package/dist/restart.d.ts +21 -0
- package/dist/restart.d.ts.map +1 -0
- package/dist/run.d.ts.map +1 -1
- package/dist/schedules.d.ts.map +1 -1
- package/dist/serve.d.ts.map +1 -1
- package/dist/sessions.d.ts.map +1 -1
- package/dist/skills.d.ts.map +1 -1
- package/dist/status.d.ts +16 -0
- package/dist/status.d.ts.map +1 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/validate.d.ts.map +1 -1
- package/dist/web-923c7f5e.js +14 -0
- package/dist/{web-vkb16r62.js.map → web-923c7f5e.js.map} +3 -3
- package/dist/web.d.ts +2 -13
- package/dist/web.d.ts.map +1 -1
- package/dist/workspace.d.ts.map +1 -1
- package/dist/wrapper-0w9b3my0.js +11 -0
- package/dist/wrapper-0w9b3my0.js.map +23 -0
- package/package.json +6 -3
- package/dist/App-b1yrwrcq.js +0 -11
- package/dist/ConfigEditor-n8hdw6r7.js +0 -6
- package/dist/KeyProbe-9jjeze5r.js +0 -5
- package/dist/Picker-hfeh1g6m.js +0 -5
- package/dist/SessionPicker-zyqkg4dn.js +0 -5
- package/dist/SkillBrowser-3qdp8080.js +0 -5
- package/dist/WizardApp-vzpbydy3.js +0 -5
- package/dist/config-g7za9x13.js +0 -24
- package/dist/index-0d93hyfc.js +0 -6
- package/dist/index-1c5113t4.js +0 -66
- package/dist/index-1c5113t4.js.map +0 -12
- package/dist/index-258d8bzg.js +0 -12
- package/dist/index-4z7axw4r.js +0 -6
- package/dist/index-6p999cx4.js +0 -9
- package/dist/index-6q4wf8e3.js +0 -6
- package/dist/index-9r0wyj6w.js +0 -6
- package/dist/index-d4x6yvqh.js +0 -6
- package/dist/index-fecm8xe7.js +0 -77
- package/dist/index-fecm8xe7.js.map +0 -12
- package/dist/index-fex44816.js +0 -6
- package/dist/index-ff514z3y.js +0 -14
- package/dist/index-gz9x25tz.js +0 -6
- package/dist/index-h9mw7b9d.js +0 -6
- package/dist/index-hwpvhaza.js +0 -6
- package/dist/index-mtn0g9vc.js +0 -7
- package/dist/index-mtn0g9vc.js.map +0 -11
- package/dist/index-qdbq8crg.js +0 -6
- package/dist/index-tf71ap9v.js +0 -6
- package/dist/index-ttwyrdjs.js +0 -427
- package/dist/index-ttwyrdjs.js.map +0 -11
- package/dist/index-tv4yv7d2.js +0 -903
- package/dist/index-ty24n0jh.js +0 -167
- package/dist/index-ty24n0jh.js.map +0 -19
- package/dist/index-v8e92nfw.js +0 -6
- package/dist/index-vgc3y3rm.js +0 -6
- package/dist/index-whaw4b18.js +0 -6
- package/dist/index-whaw4b18.js.map +0 -10
- package/dist/web-vkb16r62.js +0 -14
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../server/dist/index.js", "../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/en.js", "../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/external.js", "../src/lib/web-url.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"// src/approvals.ts\nfunction createApprovalRegistry(options = {}) {\n const now = options.now ?? (() => new Date);\n const waiting = new Map;\n const approver = (request) => new Promise((resolve) => {\n const entry = {\n pending: {\n approvalId: request.approvalId,\n agentId: request.agentId,\n slug: request.slug,\n callId: request.callId,\n match: request.match,\n mutating: request.mutating,\n reason: request.reason,\n requestedAt: now().toISOString()\n },\n settle: (granted) => {\n waiting.delete(request.approvalId);\n resolve(granted);\n }\n };\n waiting.set(request.approvalId, entry);\n request.signal.addEventListener(\"abort\", () => entry.settle(false), { once: true });\n });\n return {\n approver,\n pending: (agentId) => [...waiting.values()].map((entry) => entry.pending).filter((entry) => entry.agentId === agentId).sort((a, b) => a.requestedAt.localeCompare(b.requestedAt)),\n resolve: (approvalId, granted) => {\n const entry = waiting.get(approvalId);\n if (entry === undefined)\n return false;\n entry.settle(granted);\n return true;\n },\n get size() {\n return waiting.size;\n }\n };\n}\n// src/handler.ts\nimport { readFile } from \"node:fs/promises\";\nimport {\n EVENT_TYPES,\n editManifest,\n entryPhase,\n HarnessError,\n isHarnessError,\n isPhased,\n keyFingerprint as keyFingerprint2,\n keyLabelProblem,\n MAX_KEY_LABEL,\n manifestValueAt,\n nearest as nearest2,\n newKeyId,\n newKeySecret,\n newRunId,\n newTurnId,\n PERSON_SETTABLE_PATHS,\n parseSettingValue,\n phasesFor,\n prepareScheduleWrite,\n SENDER_KINDS as SENDER_KINDS2,\n SETTINGS,\n scheduleSessionKey,\n settingByPath,\n VERSION as VERSION2\n} from \"@dispach/core\";\n\n// src/auth.ts\nimport { keyFingerprint } from \"@dispach/core\";\n\n// src/respond.ts\nfunction fail(error, status, extraHeaders = {}) {\n return new Response(JSON.stringify({ error }), {\n status,\n headers: { \"content-type\": \"application/json; charset=utf-8\", ...extraHeaders }\n });\n}\nfunction unauthorized() {\n return fail({\n code: \"unauthorized\",\n message: \"Missing or invalid bearer token.\",\n hint: \"Send Authorization: Bearer <token>, where the token is either the value of the variable named by server.tokenEnv or an operator key from POST /v1/keys. A revoked key, an expired one and a wrong one answer the same way on purpose.\"\n }, 401);\n}\nfunction claimSpent() {\n return fail({\n code: \"claim_spent\",\n message: \"That claim has already been exchanged.\",\n hint: \"A claim is good for one key. Use the key it minted; if it is lost, restart with --claim to print a new one — a claim lives in the process rather than the database, so it never outlives the boot that printed it.\"\n }, 401);\n}\nfunction forbidden(capability, what) {\n return fail({\n code: \"capability_required\",\n message: `This credential cannot ${what}.`,\n hint: `The key is scoped, and \"${capability}\" is not among its capabilities. GET /v1/keys shows what each key may do; mint another with POST /v1/keys, or use the server token. An unscoped key has all four.`,\n field: \"scope.can\"\n }, 403);\n}\nfunction timingSafe(a, b) {\n if (a.length !== b.length)\n return false;\n let diff = 0;\n for (let i = 0;i < a.length; i += 1)\n diff |= a.charCodeAt(i) ^ b.charCodeAt(i);\n return diff === 0;\n}\n\n// src/auth.ts\nfunction presentedToken(request) {\n const header = request.headers.get(\"authorization\") ?? \"\";\n return header.startsWith(\"Bearer \") ? header.slice(7) : \"\";\n}\nasync function authorise(input) {\n const presented = presentedToken(input.request);\n if (input.expected !== undefined && timingSafe(presented, input.expected)) {\n return { kind: \"token\" };\n }\n if (presented !== \"\") {\n const record = await input.keys.findLive(await keyFingerprint(presented), new Date(input.at).toISOString());\n if (record !== undefined) {\n await input.keys.touch(record.keyId, new Date(input.at).toISOString());\n return {\n kind: \"key\",\n keyId: record.keyId,\n ...record.scope === undefined ? {} : { scope: record.scope }\n };\n }\n if (input.claim !== undefined && timingSafe(presented, input.claim.token)) {\n if (input.request.method !== \"POST\" || input.pathname !== \"/v1/keys\")\n return unauthorized();\n if (!input.claim.live())\n return claimSpent();\n return { kind: \"claim\" };\n }\n }\n return unauthorized();\n}\nvar PROTOCOL = \"dispach.bearer\";\nfunction bearerFromProtocols(request) {\n const raw = request.headers.get(\"sec-websocket-protocol\");\n if (raw === null)\n return;\n const offered = raw.split(\",\").map((entry) => entry.trim());\n const at = offered.indexOf(PROTOCOL);\n return at === -1 ? undefined : offered[at + 1] ?? \"\";\n}\nfunction withBearerHeader(request, bearer) {\n const headers = new Headers(request.headers);\n headers.set(\"authorization\", `Bearer ${bearer}`);\n return new Request(request.url, { method: request.method, headers });\n}\n\n// src/openapi.ts\nimport { VERSION } from \"@dispach/core\";\nimport { z as z2 } from \"zod\";\n\n// src/wire-schemas.ts\nimport { nearest, SENDER_KINDS } from \"@dispach/core\";\nimport { z } from \"zod\";\nfunction refuse(schema, refusal) {\n return schema.meta({ ...refusal });\n}\nfunction annotate(schema, description) {\n return schema.meta({ description });\n}\nvar SenderSchema = z.object({\n id: refuse(z.string().trim().min(1), {\n code: \"sender_invalid\",\n hint: 'Send { \"from\": { \"id\": \"agent:ops-bot\", \"kind\": \"agent\" } }, or omit it entirely for a turn the token-holder is sending itself.',\n description: \"Stable identifier for the sender. Appears on the turn row and in events.\"\n }),\n kind: refuse(z.enum(SENDER_KINDS, {\n error: (issue) => {\n const got = typeof issue.input === \"string\" ? issue.input : undefined;\n const guess = got === undefined ? undefined : nearest(got, SENDER_KINDS);\n return `from.kind must be one of: ${SENDER_KINDS.join(\", \")}.${guess === undefined ? \"\" : ` Did you mean \"${guess}\"?`}`;\n }\n }), {\n code: \"sender_invalid\",\n hint: 'This field decides the trust boundary — \"agent\" fences the message and blocks mutating tools for the turn, \"user\" does not — so there is no default and an unknown value is refused rather than guessed at. A turn the token-holder is sending itself omits \"from\".',\n description: 'The trust boundary. \"agent\" fences the text as data and blocks mutating tools for the whole turn.'\n }),\n name: refuse(z.string().optional(), {\n code: \"sender_invalid\",\n hint: \"A display name, shown beside the sender id. Omit it rather than sending an empty string.\",\n description: \"Human-readable name for the sender.\"\n })\n}).meta({\n description: \"Attribution for a turn somebody other than the token-holder is sending. Omit for your own.\"\n});\nvar DeliverSchema = refuse(z.union([z.literal(\"none\"), z.object({ channel: z.string().min(1), to: z.string().min(1) })]), {\n code: \"deliver_invalid\",\n hint: 'A bare channel id is not enough on an API turn: the request has no originating conversation, so there is no recipient to infer. Send { \"channel\": \"tg\", \"to\": \"12345\" }, or \"none\" to read the reply from the event stream.',\n description: 'Where the reply goes. \"none\" leaves it on the event stream and in the store.'\n});\nvar MessageBody = z.object({\n text: refuse(z.string().trim().min(1), {\n code: \"message_text_required\",\n hint: 'Send { \"text\": \"...\" }. An empty turn would be billed for a full prompt and produce nothing.',\n description: \"What to say to the agent.\"\n }),\n sessionKey: annotate(z.string().min(1).optional(), \"Which conversation this belongs to. Defaults to `api:default`.\"),\n deliver: DeliverSchema.optional(),\n from: SenderSchema.optional(),\n stream: annotate(z.boolean().optional(), \"Stream the turn's events inline as SSE rather than returning a handle.\"),\n chunks: annotate(z.boolean().optional(), \"Include per-token `model.chunk` frames. Off by default — the reader decides.\")\n});\nvar ApprovalBody = z.object({\n granted: refuse(z.boolean(), {\n code: \"approval_decision_required\",\n hint: 'Send { \"granted\": true } or { \"granted\": false }. There is no default: one direction would deny a call over a typo and the other would grant one, and neither is a decision anybody made.',\n description: \"Whether the blocked tool call may proceed.\"\n })\n});\nvar KeyScopeBody = z.object({\n agents: z.array(z.string().min(1)).optional().meta({\n code: \"key_scope_agents_invalid\",\n hint: 'Send { \"agents\": [\"milo\"] } — a list of agent ids. Omit it for a key that reaches every agent. An id naming no agent on this server is reported rather than silently matching nothing.',\n description: \"Agent ids this key may reach. Absent means all of them.\"\n }),\n sessions: z.string().min(1).optional().meta({\n code: \"key_scope_sessions_invalid\",\n hint: 'Send { \"sessions\": \"team_42:\" } — a session-key prefix, with an optional trailing \"*\". A prefix rather than a list, because the conversations this key will cover do not exist yet when it is minted.',\n description: \"Session-key prefix. Absent means every session.\"\n }),\n can: z.array(z.enum([\"read\", \"chat\", \"write\", \"admin\"])).optional().meta({\n code: \"key_scope_can_invalid\",\n hint: 'Send { \"can\": [\"chat\", \"read\"] }. The four are read (every GET), chat (send a message, answer an approval, stop a turn), write (schedules, phase, clearing a session) and admin (keys, provisioning, start/stop/reload). Absent means all four; an empty array means none, and is honoured as written.',\n description: \"Capabilities this key may exercise. Absent means all four.\"\n }),\n expiresIn: z.number().int().positive().optional().meta({\n code: \"key_scope_expires_invalid\",\n hint: 'Send { \"expiresIn\": 3600 } — whole seconds from now, as a number. Relative rather than an absolute instant, because that would need the caller and this server to agree about the clock; the response reports the absolute expiresAt this server computed.',\n description: \"Seconds until this key stops authenticating. Absent means never.\"\n })\n});\nvar KeyBody = z.object({\n label: refuse(z.string(), {\n code: \"key_label_required\",\n hint: 'Send { \"label\": \"my browser\" }. A label is required rather than defaulted because it is the only thing distinguishing two credentials in a listing, and \"key 2\" is a name nobody can act on when deciding which to revoke.',\n description: \"How this credential is shown in a listing. Required; see `keyLabelProblem`.\"\n }),\n scope: KeyScopeBody.optional().meta({\n code: \"key_scope_invalid\",\n hint: 'Send { \"scope\": { \"agents\": [\"milo\"], \"can\": [\"chat\"] } }, or omit it entirely for a key that reaches everything — which is what every key minted before scopes existed does.',\n description: \"Opt-in narrowing. Absent is an unscoped key.\"\n })\n});\nvar PhaseBody = z.object({\n phase: refuse(z.string().min(1), {\n code: \"phase_invalid\",\n hint: \"Send the name of a phase this agent's manifest declares. `GET /v1/agents/:id` lists them.\",\n description: \"The phase to move this session into.\"\n })\n});\nvar StopBody = z.object({\n reason: refuse(z.string().optional(), {\n code: \"agent_stop_invalid\",\n hint: \"A short note, recorded on the row and shown wherever the agent is reported as off.\",\n description: \"Why, for whoever reads the listing later.\"\n })\n});\nvar ConfigBody = z.object({\n path: refuse(z.string().min(1), {\n code: \"config_path_unknown\",\n hint: \"GET /v1/agents/:id/config lists every field this surface may change, with what each one does.\",\n description: \"A dotted path, exactly as it appears in the manifest — `tools.pinned`, `model.main.id`.\"\n }),\n value: refuse(z.string(), {\n code: \"config_value_unreadable\",\n hint: 'Text, the way it is typed at a terminal: a bare word, a number, true or false, a list as [\"a\", \"b\"], or a map as {k: v}. Quote anything containing a colon or a \"#\".',\n description: \"The new value, as text. Read by the same parser the `config` command uses.\"\n }),\n confirm: annotate(z.boolean().optional(), \"Required only for a field whose own row carries a `confirm` sentence. Absent is not consent.\")\n});\nvar ChannelPatchBody = z.object({\n enabled: annotate(z.boolean().optional(), \"Switch the channel on or off. It takes effect at the agent's next start, because a channel is constructed at boot.\"),\n credential: refuse(z.string().min(1).optional(), {\n code: \"channel_credential_unreadable\",\n hint: \"The value goes into the .env beside the manifest at 0600, under the variable that channel's own entry names. Send a non-empty string; an empty one fails the load exactly as a missing variable does.\",\n description: \"The channel's credential — a Telegram bot token. Never returned by any route; only whether it is set.\"\n })\n});\nvar ProvisionBody = z.object({\n answers: refuse(z.record(z.string(), refuse(z.string(), {\n code: \"provision_answer_invalid\",\n hint: \"Answers arrive as strings from the terminal and from here, and are validated per step. Send the value as a string — including a boolean-looking choice, whose values are named in GET /v1/provision.\",\n description: \"One answer. Always text, whatever the step's type looks like.\"\n })), {\n code: \"provision_answers_required\",\n hint: 'Send { \"answers\": { \"name\": \"milo\", … } }. Every step you leave out takes its default, exactly as `init --yes` does with flags; GET /v1/provision lists them.',\n description: \"A subset of the wizard's steps, as strings. `GET /v1/provision` lists every step with its prompt, default and choices.\"\n })\n});\nfunction parseBody(schema, value) {\n const result = schema.safeParse(value ?? {});\n if (result.success)\n return { ok: true, value: result.data };\n const issue = result.error.issues[0];\n const path = (issue?.path ?? []).filter((part) => typeof part === \"string\");\n const meta = metaAt(schema, path);\n const generic = {\n code: \"request_body_invalid\",\n message: path.length === 0 ? issue?.message ?? \"The request body is invalid.\" : `${path.join(\".\")}: ${issue?.message}`,\n hint: \"The field above is the one to fix. GET /v1/openapi.json describes every body this server accepts, including the error code each field produces.\"\n };\n return {\n ok: false,\n error: {\n ...generic,\n ...meta?.code === undefined ? {} : { code: meta.code },\n ...meta?.hint === undefined ? {} : { hint: meta.hint },\n ...path.length === 0 ? {} : { field: path.join(\".\") }\n }\n };\n}\nfunction metaAt(schema, path) {\n let current = schema;\n let best = readRefusal(schema);\n for (const key of path) {\n current = descend(current, key);\n if (current === undefined)\n break;\n best = readRefusal(current) ?? best;\n }\n return best;\n}\nfunction readRefusal(schema) {\n const meta = schema?.meta();\n if (meta?.code === undefined && meta?.hint === undefined)\n return;\n return meta;\n}\nfunction descend(schema, key) {\n const inner = unwrap(schema);\n const shape = inner?.shape;\n if (shape?.[key] !== undefined)\n return unwrap(shape[key]);\n const valueType = inner?.def?.valueType;\n return valueType === undefined ? undefined : unwrap(valueType);\n}\nfunction unwrap(schema) {\n let current = schema;\n for (let guard = 0;guard < 8 && current !== undefined; guard += 1) {\n const next = current.def?.innerType;\n if (next === undefined)\n return current;\n current = next;\n }\n return current;\n}\n\n// src/openapi.ts\nvar DOCS = {\n \"GET /v1/health\": { summary: \"Liveness, the version, and how many agents are hosted.\" },\n \"GET /v1/ready\": {\n summary: \"Whether a turn can be served yet.\",\n statuses: [{ code: 503, when: \"still starting; channels may still be connecting\" }]\n },\n \"GET /v1/agents\": {\n summary: \"Every agent this server knows about, hosted or switched off.\"\n },\n \"GET /v1/agents/:id\": { summary: \"One agent, with its dialect, window, counts and warnings.\" },\n \"POST /v1/agents/:id/reload\": {\n summary: \"Re-read the manifest by replacing the agent with a new instance.\",\n statuses: [\n { code: 409, when: \"a turn is running — it is not aborted to apply a change\" },\n { code: 400, when: \"a team member, which has no manifest of its own\" }\n ]\n },\n \"GET /v1/provision\": {\n summary: \"The questions creating an agent asks, and whether this server can answer them.\"\n },\n \"POST /v1/agents\": {\n summary: \"Create an agent and adopt it into this host, live.\",\n body: ProvisionBody,\n statuses: [\n { code: 201, when: \"created; `adopted` is empty with an `error` if it is not running\" },\n { code: 403, when: \"not a loopback bind\" },\n { code: 501, when: \"this server has no provisioner\" }\n ]\n },\n \"POST /v1/agents/:id/stop\": {\n summary: \"Switch an agent off durably and drop it from this host now.\",\n body: StopBody,\n statuses: [{ code: 409, when: \"a turn is running\" }]\n },\n \"POST /v1/agents/:id/start\": {\n summary: \"Switch it back on and have this host adopt it.\",\n statuses: [{ code: 501, when: \"this server cannot look up manifests\" }]\n },\n \"POST /v1/agents/:id/messages\": {\n summary: \"Start a turn. Returns once accepted; the turn runs detached.\",\n body: MessageBody,\n statuses: [{ code: 202, when: \"accepted\" }]\n },\n \"POST /v1/agents/:id/turns/:turnId/stop\": {\n summary: \"Cooperatively stop a turn this API started.\",\n statuses: [{ code: 409, when: \"no cancel handle — a channel or schedule started it\" }]\n },\n \"GET /v1/agents/:id/turns/:turnId/stream\": {\n summary: \"One turn's events as SSE, replayed from the start and then live.\",\n query: [\n { name: \"chunks\", about: \"Include per-token frames. Off by default.\" },\n { name: \"types\", about: \"Narrow to these event types, comma-separated.\" }\n ],\n statuses: [{ code: 200, when: \"an event stream; see the event table in the wire spec\" }]\n },\n \"GET /v1/events\": {\n summary: \"Every event this process emits, as SSE. The firehose.\",\n query: [\n { name: \"agentId\", about: \"Narrow to one agent.\" },\n { name: \"sessionKey\", about: \"Narrow to one conversation.\" },\n { name: \"chunks\", about: \"Include per-token frames. Off by default.\" },\n { name: \"types\", about: \"Narrow to these event types, comma-separated.\" }\n ],\n statuses: [{ code: 200, when: \"an event stream; see the event table in the wire spec\" }]\n },\n \"GET /v1/agents/:id/approvals\": { summary: \"Questions waiting on a person, oldest first.\" },\n \"POST /v1/agents/:id/approvals/:approvalId\": {\n summary: \"Answer one blocked tool call.\",\n body: ApprovalBody\n },\n \"POST /v1/keys\": {\n summary: \"Mint an operator key. The secret is returned once and never again.\",\n body: KeyBody,\n statuses: [{ code: 201, when: \"minted\" }]\n },\n \"GET /v1/keys\": { summary: \"Every key, live and revoked. Never a secret.\" },\n \"DELETE /v1/keys/:keyId\": { summary: \"Revoke a key. A soft delete; the row survives.\" },\n \"GET /v1/agents/:id/turns/:turnId\": { summary: \"One turn's stored row.\" },\n \"GET /v1/agents/:id/sessions\": { summary: \"Conversations, most recently active first.\" },\n \"GET /v1/agents/:id/sessions/:key\": { summary: \"One conversation's summary.\" },\n \"GET /v1/agents/:id/sessions/:key/messages\": {\n summary: \"A page of a conversation's messages.\",\n query: [\n { name: \"limit\", about: \"How many to return.\" },\n { name: \"before\", about: \"Page backwards from this message id.\" }\n ]\n },\n \"DELETE /v1/agents/:id/sessions/:key\": {\n summary: \"Drop a conversation's history, turns and derived index.\"\n },\n \"POST /v1/agents/:id/sessions/:key/phase\": {\n summary: \"Move a session into a declared phase.\",\n body: PhaseBody\n },\n \"GET /v1/agents/:id/config\": {\n summary: \"Every manifest field this surface may set, what it does, and its current value.\"\n },\n \"PATCH /v1/agents/:id/config\": {\n summary: \"Set one manifest field, then replace the agent so it takes effect.\",\n statuses: [\n { code: 409, when: \"the field carries a confirm sentence and `confirm` was not true\" },\n { code: 409, when: \"the agent came from an object, so there is no manifest to edit\" },\n { code: 400, when: \"the path is not settable here, or the result would not validate\" }\n ]\n },\n \"PATCH /v1/agents/:id/channels/:channelId\": {\n summary: \"Connect or disconnect a channel, and set its credential.\",\n statuses: [\n {\n code: 400,\n when: \"neither `enabled` nor `credential` was sent, or the channel is unknown\"\n },\n { code: 409, when: \"the agent came from an object, so there is no manifest to edit\" },\n { code: 501, when: \"the host supplied no channel actions\" }\n ]\n },\n \"POST /v1/agents/:id/channels/:channelId/unpair\": {\n summary: \"Forget a channel's stored pairing, so the next start offers a new code.\",\n statuses: [\n { code: 404, when: \"this agent has no such channel\" },\n { code: 409, when: \"the channel stores no pairing — a typed credential is a PATCH\" }\n ]\n },\n \"GET /v1/agents/:id/schedules\": { summary: \"Every schedule, from the store.\" },\n \"POST /v1/agents/:id/schedules\": {\n summary: \"Create a schedule. Validated by the manifest's own schedule rules.\",\n statuses: [{ code: 201, when: \"created\" }]\n },\n \"GET /v1/agents/:id/schedules/:sid\": { summary: \"One schedule's row.\" },\n \"PATCH /v1/agents/:id/schedules/:sid\": {\n summary: \"Replace a schedule the API created.\",\n statuses: [\n { code: 409, when: \"the manifest declares it, so reconciliation would undo the write\" }\n ]\n },\n \"DELETE /v1/agents/:id/schedules/:sid\": {\n summary: \"Delete a schedule the API created.\",\n statuses: [\n { code: 409, when: \"the manifest declares it, so the next boot would re-create it\" }\n ]\n },\n \"POST /v1/agents/:id/schedules/:sid/run\": { summary: \"Fire a schedule now, out of band.\" },\n \"GET /v1/agents/:id/tools\": { summary: \"The resolved catalogue, with trust and phases.\" },\n \"GET /v1/agents/:id/skills\": { summary: \"What the skills index holds.\" },\n \"GET /v1/agents/:id/context\": {\n summary: \"The prompt the next turn would be given, without running one.\",\n query: [\n { name: \"sessionKey\", about: \"Which conversation to assemble for.\" },\n { name: \"input\", about: \"Pretend this is the next message.\" }\n ]\n },\n \"POST /v1/channels/:channelId/webhook/:agentId\": {\n summary: \"A channel provider's webhook. Open by design; the provider authenticates itself.\"\n },\n \"GET /v1/openapi.json\": { summary: \"This document.\" },\n \"GET /docs\": { summary: \"A browser reference over this document.\" }\n};\nfunction isApiPath(pattern) {\n return pattern.startsWith(\"/v1/\") || pattern === \"/docs\";\n}\nfunction openapiDocument(input) {\n const paths = {};\n for (const route of input.routes) {\n if (!isApiPath(route.pattern))\n continue;\n const doc = DOCS[`${route.method} ${route.pattern}`];\n if (doc === undefined)\n continue;\n const openapiPath = route.pattern.replace(/:([A-Za-z0-9_]+)/g, \"{$1}\");\n const params = [...route.pattern.matchAll(/:([A-Za-z0-9_]+)/g)].map((match) => ({\n name: match[1],\n in: \"path\",\n required: true,\n schema: { type: \"string\" }\n }));\n const query = (doc.query ?? []).map((entry) => ({\n name: entry.name,\n in: \"query\",\n required: false,\n description: entry.about,\n schema: { type: \"string\" }\n }));\n const responses = {};\n for (const status of doc.statuses ?? []) {\n responses[String(status.code)] = { description: status.when };\n }\n if (responses[\"200\"] === undefined && responses[\"201\"] === undefined) {\n if (responses[\"202\"] === undefined)\n responses[\"200\"] = { description: \"OK\" };\n }\n responses[\"401\"] = { description: \"No credential, or one this server does not accept.\" };\n if (route.pattern.includes(\":id\")) {\n responses[\"404\"] = { description: \"No such agent, or it is switched off.\" };\n }\n paths[openapiPath] ??= {};\n const operation = {\n summary: doc.summary,\n ...params.length + query.length === 0 ? {} : { parameters: [...params, ...query] },\n responses\n };\n if (doc.body !== undefined) {\n operation.requestBody = {\n required: true,\n content: {\n \"application/json\": {\n schema: z2.toJSONSchema(doc.body, {\n target: \"draft-2020-12\",\n io: \"input\"\n })\n }\n }\n };\n }\n paths[openapiPath][route.method.toLowerCase()] = operation;\n }\n return {\n openapi: \"3.1.0\",\n info: {\n title: \"Dispach agent server\",\n version: VERSION,\n description: \"Generated from the router table and the request schemas — see openapi.ts. The binding contract is docs/04-SPEC-WIRE.md, which is checked against the code; @dispach/client's types are the response reference.\"\n },\n ...input.serverUrl === undefined ? {} : { servers: [{ url: input.serverUrl }] },\n components: {\n securitySchemes: {\n bearer: {\n type: \"http\",\n scheme: \"bearer\",\n description: \"An operator key or the configured token.\"\n }\n },\n schemas: {\n Error: {\n type: \"object\",\n description: \"Every failure has this shape. `hint` is never absent — it is the part that says what to do.\",\n properties: {\n error: {\n type: \"object\",\n required: [\"code\", \"message\", \"hint\"],\n properties: {\n code: { type: \"string\" },\n message: { type: \"string\" },\n hint: { type: \"string\" },\n field: { type: \"string\" }\n }\n }\n }\n }\n }\n },\n security: [{ bearer: [] }],\n paths\n };\n}\n\n// src/origin.ts\nvar LOOPBACK = new Set([\"127.0.0.1\", \"::1\", \"localhost\", \"[::1]\"]);\nfunction isLoopback(host) {\n return LOOPBACK.has(host.toLowerCase());\n}\nfunction hostOf(value) {\n const trimmed = value.trim();\n if (trimmed === \"\" || trimmed.toLowerCase() === \"null\")\n return;\n try {\n const url = new URL(trimmed.includes(\"://\") ? trimmed : `http://${trimmed}`);\n return url.hostname.toLowerCase().replace(/^\\[|\\]$/g, \"\");\n } catch {\n return;\n }\n}\nfunction loopbackName(host) {\n return isLoopback(host) || /^127\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/.test(host);\n}\nfunction originProblem(request, policy) {\n const strict = isLoopback(policy.host);\n const rawHost = request.headers.get(\"host\");\n const rawOrigin = request.headers.get(\"origin\");\n if (strict) {\n const host = rawHost === null ? undefined : hostOf(rawHost);\n const named = policy.allowedHosts ?? [];\n const hostOk = host !== undefined && (loopbackName(host) || named.some((entry) => hostOf(entry) === host));\n if (!hostOk) {\n return {\n code: \"host_not_allowed\",\n message: `This server does not answer to the host ${rawHost ?? \"(absent)\"}.`,\n hint: \"It is bound to loopback, so only a loopback name or address can legitimately reach it — a request addressed to any other name arrived through DNS pointed at this machine, which is how a web page reaches a local server it was never given access to. Add the name to server.allowedHosts if a proxy on this machine needs it.\",\n field: \"server.allowedHosts\"\n };\n }\n }\n if (rawOrigin === null)\n return;\n const origin = hostOf(rawOrigin);\n if (origin !== undefined) {\n if (loopbackName(origin))\n return;\n if ((policy.allowedOrigins ?? []).some((entry) => hostOf(entry) === origin))\n return;\n if (!strict && rawHost !== null && hostOf(rawHost) === origin)\n return;\n }\n return {\n code: \"origin_not_allowed\",\n message: `Refusing a request from the origin ${rawOrigin}.`,\n hint: strict ? \"This server is bound to loopback, so a page served from anywhere else has no business calling it. Add the origin to server.allowedOrigins if you meant to allow it.\" : \"Only a page served from this server's own host may call it. Add the origin to server.allowedOrigins if you meant to allow it — there is no wildcard, deliberately.\",\n field: \"server.allowedOrigins\"\n };\n}\nfunction corsHeaders(request, policy) {\n const rawOrigin = request.headers.get(\"origin\");\n if (rawOrigin === null)\n return {};\n if (originProblem(request, policy) !== undefined)\n return {};\n return {\n \"access-control-allow-origin\": rawOrigin,\n vary: \"Origin\"\n };\n}\nfunction preflightHeaders(request, allow) {\n const asked = request.headers.get(\"access-control-request-headers\");\n return {\n \"access-control-allow-methods\": allow.join(\", \"),\n \"access-control-allow-headers\": asked ?? \"authorization, content-type\",\n \"access-control-max-age\": \"600\"\n };\n}\n\n// src/principal.ts\nimport { CAPABILITIES } from \"@dispach/core\";\nfunction can(principal, capability) {\n if (principal.kind !== \"key\")\n return principal.kind !== \"claim\";\n const allowed = principal.scope?.can;\n return allowed === undefined || allowed.includes(capability);\n}\nfunction reachesAgent(principal, agentId) {\n if (principal.kind !== \"key\")\n return principal.kind !== \"claim\";\n const agents = principal.scope?.agents;\n return agents === undefined || agents.includes(agentId);\n}\nfunction reachesSession(principal, sessionKey) {\n if (principal.kind !== \"key\")\n return principal.kind !== \"claim\";\n const prefix = principal.scope?.sessions;\n if (prefix === undefined)\n return true;\n return sessionKey.startsWith(prefix.endsWith(\"*\") ? prefix.slice(0, -1) : prefix);\n}\nfunction isScoped(principal) {\n if (principal.kind !== \"key\")\n return false;\n const scope = principal.scope;\n return scope !== undefined && (scope.agents !== undefined || scope.sessions !== undefined || scope.can !== undefined);\n}\n\n// src/router.ts\nclass Router {\n #routes = [];\n add(method, pattern, handler, options) {\n this.#routes.push({\n method: method.toUpperCase(),\n pattern,\n handler,\n capability: options.capability,\n streaming: options.streaming === true,\n segments: split(pattern)\n });\n return this;\n }\n routes() {\n return this.#routes.map(({ method, pattern, handler, streaming, capability }) => ({\n method,\n pattern,\n handler,\n streaming,\n capability\n }));\n }\n match(method, pathname) {\n const parts = split(pathname);\n const pathMatches = [];\n for (const route of this.#routes) {\n const params = matchSegments(route.segments, parts);\n if (params === undefined)\n continue;\n pathMatches.push(route);\n if (route.method === method.toUpperCase()) {\n return {\n kind: \"found\",\n handler: route.handler,\n params,\n streaming: route.streaming,\n capability: route.capability\n };\n }\n }\n if (pathMatches.length > 0) {\n return { kind: \"method\", allowed: [...new Set(pathMatches.map((r) => r.method))] };\n }\n return { kind: \"none\" };\n }\n}\nfunction split(path) {\n return path.split(\"/\").filter((segment) => segment !== \"\");\n}\nfunction matchSegments(pattern, parts) {\n if (pattern.length !== parts.length)\n return;\n const params = {};\n for (const [index, expected] of pattern.entries()) {\n const actual = parts[index];\n if (actual === undefined)\n return;\n if (expected.startsWith(\":\")) {\n try {\n params[expected.slice(1)] = decodeURIComponent(actual);\n } catch {\n return;\n }\n continue;\n }\n if (expected !== actual)\n return;\n }\n return params;\n}\n\n// src/sse.ts\nvar HEARTBEAT_MS = 15000;\nfunction encodeFrame(frame) {\n const lines = [];\n if (frame.event !== undefined)\n lines.push(`event: ${frame.event}`);\n if (frame.id !== undefined)\n lines.push(`id: ${frame.id}`);\n const payload = typeof frame.data === \"string\" ? frame.data : JSON.stringify(frame.data);\n for (const line of payload.split(`\n`))\n lines.push(`data: ${line}`);\n return `${lines.join(`\n`)}\n\n`;\n}\nfunction sseResponse(options) {\n const encoder = new TextEncoder;\n let teardown;\n let heartbeat;\n let closed = false;\n const stream = new ReadableStream({\n start(controller) {\n const finish = () => {\n if (closed)\n return;\n closed = true;\n if (heartbeat !== undefined)\n clearInterval(heartbeat);\n teardown?.();\n teardown = undefined;\n try {\n controller.close();\n } catch {}\n };\n const send = (frame) => {\n if (closed)\n return;\n try {\n controller.enqueue(encoder.encode(encodeFrame(frame)));\n } catch {\n finish();\n }\n };\n options.signal?.addEventListener(\"abort\", finish, { once: true });\n const started = options.start({ send, close: finish });\n if (closed) {\n started?.();\n return;\n }\n teardown = started;\n heartbeat = setInterval(() => {\n if (closed)\n return;\n try {\n controller.enqueue(encoder.encode(`: ping\n\n`));\n } catch {\n finish();\n }\n }, options.heartbeatMs ?? HEARTBEAT_MS);\n heartbeat.unref?.();\n },\n cancel() {\n if (closed)\n return;\n closed = true;\n if (heartbeat !== undefined)\n clearInterval(heartbeat);\n teardown?.();\n teardown = undefined;\n }\n });\n return new Response(stream, {\n status: options.status ?? 200,\n headers: {\n \"content-type\": \"text/event-stream; charset=utf-8\",\n \"cache-control\": \"no-cache, no-transform\",\n connection: \"keep-alive\",\n \"x-accel-buffering\": \"no\"\n }\n });\n}\n\n// ../web/dist/assets/app.css\nvar app_default = ':root{--ground: #0b0b0c;--raised: #151517;--line: #26262a;--text: #e8e6e3;--dim: #8b8b93;--accent: #7aa2f7;--warn: #e0af68;--bad: #f7768e;--ok: #9ece6a;--mono: ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace;--sans: -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--ground);color:var(--text);font:14px / 1.55 var(--sans);-webkit-font-smoothing:antialiased}button{font:inherit;color:inherit;background:var(--raised);border:1px solid var(--line);border-radius:6px;padding:5px 11px;cursor:pointer}button:hover:not(:disabled){border-color:var(--dim)}button:disabled{opacity:.45;cursor:default}button.primary{background:var(--accent);border-color:var(--accent);color:#0b0b0c;font-weight:600}button.bad{color:var(--bad)}input,textarea{font:inherit;color:inherit;background:var(--ground);border:1px solid var(--line);border-radius:6px;padding:8px 10px;width:100%}input:focus,textarea:focus{outline:none;border-color:var(--accent)}.shell{display:grid;grid-template-columns:240px 1fr;height:100vh}.side{background:var(--raised);border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0}.side header{padding:14px 16px;border-bottom:1px solid var(--line)}.brand{font-weight:650;letter-spacing:.01em}.side nav{padding:8px;overflow-y:auto;flex:1;min-height:0}.side footer{padding:10px 12px;border-top:1px solid var(--line);display:flex;gap:8px;align-items:center}.row-button{display:block;width:100%;text-align:left;background:none;border:none;border-radius:6px;padding:7px 9px;font-family:var(--mono);font-size:12px}.row-button:hover{background:var(--ground)}.row-button[aria-current=true]{background:var(--ground);color:var(--accent)}.group{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--dim);padding:12px 9px 5px}.main{display:flex;flex-direction:column;min-height:0}.bar{display:flex;gap:14px;align-items:baseline;padding:12px 20px;border-bottom:1px solid var(--line);font-size:12px;color:var(--dim);min-height:44px}.bar strong{color:var(--text);font-size:14px;font-weight:600}.bar .spacer{flex:1}.scroll{flex:1;overflow-y:auto;min-height:0;padding:20px}.pad{max-width:780px;margin:0 auto}.row{margin:0 0 16px;white-space:pre-wrap;overflow-wrap:anywhere}.row.user{background:var(--raised);border:1px solid var(--line);border-radius:8px;padding:10px 13px}.label{font-family:var(--mono);font-size:11px;color:var(--dim);margin-bottom:4px}.tool{border-left:2px solid var(--line);padding-left:11px;font-family:var(--mono);font-size:12px}.tool .slug{color:var(--accent)}.tool .out{color:var(--dim);max-height:13em;overflow-y:auto;margin-top:5px}.tool.failed .slug{color:var(--bad)}.tool .mut{color:var(--warn);font-size:11px}.tool .out{display:inline}.fence{border:1px dashed var(--warn);border-radius:6px;padding:7px 9px;margin-top:5px}.fence .why{color:var(--warn);font-size:11px;margin-bottom:4px}.payload-code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:28px;font-weight:600;letter-spacing:.18em;margin:10px 0;-webkit-user-select:all;user-select:all}.channel-input.stale .payload-code{opacity:.35}.payload-qr{display:block;width:240px;max-width:100%;height:auto;border-radius:6px;margin:8px 0}.channel-input.stale .payload-qr{opacity:.35}.note{font-size:12px;color:var(--dim);border-left:2px solid var(--line);padding-left:11px;white-space:pre-wrap}.note.bad{color:var(--bad);border-left-color:var(--bad)}.ask{border:1px solid var(--warn);border-radius:8px;padding:12px 14px;background:#17140e}.ask .what{font-family:var(--mono);font-size:12px;margin:6px 0 10px;white-space:pre-wrap;overflow-wrap:anywhere}.ask .buttons{display:flex;gap:8px}.ask .settled{font-size:12px;color:var(--dim)}details.fold summary{cursor:pointer;color:var(--dim);font-family:var(--mono);font-size:11px}details.fold[open] summary{margin-bottom:5px}details.fold .body{color:var(--dim);font-size:13px}.composer{border-top:1px solid var(--line);padding:12px 20px}.composer .inner{max-width:780px;margin:0 auto;display:flex;gap:9px;align-items:flex-end}.composer textarea{resize:none;min-height:40px;max-height:190px;font-family:var(--sans)}.hint{font-size:11px;color:var(--dim);max-width:780px;margin:6px auto 0}.card{border:1px solid var(--line);border-radius:8px;padding:16px 18px;margin-bottom:14px;background:var(--raised)}.card h2{margin:0 0 4px;font-size:15px}.card p{margin:0 0 12px;color:var(--dim);font-size:13px}table{width:100%;border-collapse:collapse;font-size:13px}th{text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.07em;color:var(--dim);font-weight:500;padding:0 10px 7px 0}td{padding:8px 10px 8px 0;border-top:1px solid var(--line);font-family:var(--mono);font-size:12px}td.revoked{color:var(--dim);text-decoration:line-through}.secret{font-family:var(--mono);font-size:12px;background:var(--ground);border:1px solid var(--ok);border-radius:6px;padding:9px 11px;overflow-wrap:anywhere;margin-bottom:8px}.gate{display:grid;place-items:center;height:100vh;padding:20px}.gate .card{max-width:460px;width:100%}.dot{width:7px;height:7px;border-radius:50%;display:inline-block;background:var(--dim)}.dot.live{background:var(--ok)}.dot.busy{background:var(--warn)}@media(max-width:720px){.shell{grid-template-columns:1fr}.side{display:none}}.agent-row{display:block}.agent-row .row-button:disabled{color:var(--dim);cursor:default}.agent-off{color:var(--warn);font-size:11px}.agent-note{display:flex;gap:6px;align-items:baseline;padding:0 9px 6px;font-size:11px;color:var(--dim)}.link{background:none;border:none;padding:0;color:var(--accent);font-size:11px;text-decoration:underline;cursor:pointer}.link:disabled{color:var(--dim);cursor:default;text-decoration:none}.empty{color:var(--dim);font-size:13px;max-width:60ch}.panel-table{width:100%;border-collapse:collapse;font-size:12px}.panel-table th{text-align:left;font-weight:500;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--dim);padding:6px 10px 6px 0;border-bottom:1px solid var(--line)}.panel-table td{padding:9px 10px 9px 0;border-bottom:1px solid var(--line);vertical-align:top}.panel-table tr.off td{color:var(--dim)}.sub{color:var(--dim);font-size:11px;margin-top:2px;max-width:52ch}.channel{border:1px solid var(--line);border-radius:8px;padding:12px 14px;margin-bottom:12px}.channel h3{margin:0 0 6px;font-size:13px;font-weight:500}.status{margin:0;font-size:12px}.status-connected{color:var(--ok)}.status-error,.status-disconnected{color:var(--bad)}.status-needs_input{color:var(--warn)}.channel-input{margin-top:10px;padding:10px;border-radius:6px;background:var(--ground)}.payload{margin:0;font-family:var(--mono);font-size:11px;white-space:pre-wrap;word-break:break-all;max-height:9em;overflow-y:auto}.channel-input.stale .payload{opacity:.45}.warn{color:var(--warn);font-size:12px;margin:0 0 6px}select{font:inherit;color:inherit;background:var(--ground);border:1px solid var(--line);border-radius:6px;padding:8px 10px;width:100%}select:focus{outline:none;border-color:var(--accent)}.provision{display:flex;flex-direction:column;gap:16px;max-width:60ch}.provision>button[type=submit]{align-self:flex-start}.field label{display:block;font-size:12px;color:var(--dim);margin-bottom:5px}.field.invalid input,.field.invalid select{border-color:var(--bad)}.sub{color:var(--dim);font-size:11px}.error{color:var(--bad);font-size:13px;max-width:60ch}.ok{color:var(--ok);font-size:13px}.created{max-width:66ch;font-size:13px}.created h3{font-size:15px;font-weight:600;margin:0 0 10px}.created p{margin:0 0 10px}.blank-secrets{border:1px solid var(--warn);border-radius:6px;padding:11px 13px;margin:14px 0}.blank-secrets p{margin:0 0 6px}.blank-secrets p:last-child{margin:0}.config-row{border-bottom:1px solid var(--line);padding:14px 0;max-width:72ch}.config-row:first-of-type{padding-top:0}.config-head{display:flex;align-items:baseline;gap:8px}.config-row .sub{margin:4px 0 8px;max-width:68ch}.config-row input[type=text],.config-row input:not([type]),.config-row textarea{width:100%;font-family:var(--mono);font-size:12px}.config-row button{margin-top:8px}.config-row label input[type=checkbox]{width:auto;margin-right:4px;vertical-align:baseline}.form-grid{display:grid;grid-template-columns:6em 1fr;gap:8px 12px;align-items:start;max-width:60ch}.form-grid label{font-size:12px;color:var(--dim);padding-top:9px}.form-grid input,.form-grid select{width:100%}.form-grid>div>input+input{margin-top:6px}.warnings{border:1px solid var(--warn);border-radius:6px;padding:.75rem 1rem;margin-bottom:1rem}.warnings h3{margin:0;color:var(--warn)}.warnings .sub{margin:.25rem 0 .75rem;opacity:.8}.warning{margin-top:.5rem}.warning-message{margin:0}.warning .hint{margin:.15rem 0 0;opacity:.75}.channel-actions{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin-top:.5rem}.channel-actions form{display:flex;gap:.35rem}.channel-actions input{min-width:14rem}.status-off{opacity:.7}\\n';\n\n// ../web/dist/assets/app.js\nvar app_default2 = `(function(){const f=document.createElement(\"link\").relList;if(f&&f.supports&&f.supports(\"modulepreload\"))return;for(const d of document.querySelectorAll('link[rel=\"modulepreload\"]'))c(d);new MutationObserver(d=>{for(const h of d)if(h.type===\"childList\")for(const v of h.addedNodes)v.tagName===\"LINK\"&&v.rel===\"modulepreload\"&&c(v)}).observe(document,{childList:!0,subtree:!0});function r(d){const h={};return d.integrity&&(h.integrity=d.integrity),d.referrerPolicy&&(h.referrerPolicy=d.referrerPolicy),d.crossOrigin===\"use-credentials\"?h.credentials=\"include\":d.crossOrigin===\"anonymous\"?h.credentials=\"omit\":h.credentials=\"same-origin\",h}function c(d){if(d.ep)return;d.ep=!0;const h=r(d);fetch(d.href,h)}})();function Yg(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,\"default\")?i.default:i}var Uf={exports:{}},Za={};var bh;function Lg(){if(bh)return Za;bh=1;var i=Symbol.for(\"react.transitional.element\"),f=Symbol.for(\"react.fragment\");function r(c,d,h){var v=null;if(h!==void 0&&(v=\"\"+h),d.key!==void 0&&(v=\"\"+d.key),\"key\"in d){h={};for(var A in d)A!==\"key\"&&(h[A]=d[A])}else h=d;return d=h.ref,{$$typeof:i,type:c,key:v,ref:d!==void 0?d:null,props:h}}return Za.Fragment=f,Za.jsx=r,Za.jsxs=r,Za}var Sh;function Gg(){return Sh||(Sh=1,Uf.exports=Lg()),Uf.exports}var m=Gg(),Of={exports:{}},oe={};var ph;function Qg(){if(ph)return oe;ph=1;var i=Symbol.for(\"react.transitional.element\"),f=Symbol.for(\"react.portal\"),r=Symbol.for(\"react.fragment\"),c=Symbol.for(\"react.strict_mode\"),d=Symbol.for(\"react.profiler\"),h=Symbol.for(\"react.consumer\"),v=Symbol.for(\"react.context\"),A=Symbol.for(\"react.forward_ref\"),p=Symbol.for(\"react.suspense\"),y=Symbol.for(\"react.memo\"),j=Symbol.for(\"react.lazy\"),E=Symbol.for(\"react.activity\"),x=Symbol.iterator;function H(b){return b===null||typeof b!=\"object\"?null:(b=x&&b[x]||b[\"@@iterator\"],typeof b==\"function\"?b:null)}var X={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,se={};function L(b,R,Q){this.props=b,this.context=R,this.refs=se,this.updater=Q||X}L.prototype.isReactComponent={},L.prototype.setState=function(b,R){if(typeof b!=\"object\"&&typeof b!=\"function\"&&b!=null)throw Error(\"takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,b,R,\"setState\")},L.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,\"forceUpdate\")};function ce(){}ce.prototype=L.prototype;function I(b,R,Q){this.props=b,this.context=R,this.refs=se,this.updater=Q||X}var $=I.prototype=new ce;$.constructor=I,D($,L.prototype),$.isPureReactComponent=!0;var Ae=Array.isArray;function Z(){}var Y={H:null,A:null,T:null,S:null},K=Object.prototype.hasOwnProperty;function V(b,R,Q){var W=Q.ref;return{$$typeof:i,type:b,key:R,ref:W!==void 0?W:null,props:Q}}function ne(b,R){return V(b.type,R,b.props)}function q(b){return typeof b==\"object\"&&b!==null&&b.$$typeof===i}function F(b){var R={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+b.replace(/[=:]/g,function(Q){return R[Q]})}var ee=/\\\\/+/g;function ue(b,R){return typeof b==\"object\"&&b!==null&&b.key!=null?F(\"\"+b.key):R.toString(36)}function Ye(b){switch(b.status){case\"fulfilled\":return b.value;case\"rejected\":throw b.reason;default:switch(typeof b.status==\"string\"?b.then(Z,Z):(b.status=\"pending\",b.then(function(R){b.status===\"pending\"&&(b.status=\"fulfilled\",b.value=R)},function(R){b.status===\"pending\"&&(b.status=\"rejected\",b.reason=R)})),b.status){case\"fulfilled\":return b.value;case\"rejected\":throw b.reason}}throw b}function M(b,R,Q,W,fe){var re=typeof b;(re===\"undefined\"||re===\"boolean\")&&(b=null);var de=!1;if(b===null)de=!0;else switch(re){case\"bigint\":case\"string\":case\"number\":de=!0;break;case\"object\":switch(b.$$typeof){case i:case f:de=!0;break;case j:return de=b._init,M(de(b._payload),R,Q,W,fe)}}if(de)return fe=fe(b),de=W===\"\"?\".\"+ue(b,0):W,Ae(fe)?(Q=\"\",de!=null&&(Q=de.replace(ee,\"$&/\")+\"/\"),M(fe,R,Q,\"\",function(nt){return nt})):fe!=null&&(q(fe)&&(fe=ne(fe,Q+(fe.key==null||b&&b.key===fe.key?\"\":(\"\"+fe.key).replace(ee,\"$&/\")+\"/\")+de)),R.push(fe)),1;de=0;var Me=W===\"\"?\".\":W+\":\";if(Ae(b))for(var Ne=0;Ne<b.length;Ne++)W=b[Ne],re=Me+ue(W,Ne),de+=M(W,R,Q,re,fe);else if(Ne=H(b),typeof Ne==\"function\")for(b=Ne.call(b),Ne=0;!(W=b.next()).done;)W=W.value,re=Me+ue(W,Ne++),de+=M(W,R,Q,re,fe);else if(re===\"object\"){if(typeof b.then==\"function\")return M(Ye(b),R,Q,W,fe);throw R=String(b),Error(\"Objects are not valid as a React child (found: \"+(R===\"[object Object]\"?\"object with keys {\"+Object.keys(b).join(\", \")+\"}\":R)+\"). If you meant to render a collection of children, use an array instead.\")}return de}function G(b,R,Q){if(b==null)return b;var W=[],fe=0;return M(b,W,\"\",\"\",function(re){return R.call(Q,re,fe++)}),W}function ae(b){if(b._status===-1){var R=b._result;R=R(),R.then(function(Q){(b._status===0||b._status===-1)&&(b._status=1,b._result=Q)},function(Q){(b._status===0||b._status===-1)&&(b._status=2,b._result=Q)}),b._status===-1&&(b._status=0,b._result=R)}if(b._status===1)return b._result.default;throw b._result}var Te=typeof reportError==\"function\"?reportError:function(b){if(typeof window==\"object\"&&typeof window.ErrorEvent==\"function\"){var R=new window.ErrorEvent(\"error\",{bubbles:!0,cancelable:!0,message:typeof b==\"object\"&&b!==null&&typeof b.message==\"string\"?String(b.message):String(b),error:b});if(!window.dispatchEvent(R))return}else if(typeof process==\"object\"&&typeof process.emit==\"function\"){process.emit(\"uncaughtException\",b);return}console.error(b)},be={map:G,forEach:function(b,R,Q){G(b,function(){R.apply(this,arguments)},Q)},count:function(b){var R=0;return G(b,function(){R++}),R},toArray:function(b){return G(b,function(R){return R})||[]},only:function(b){if(!q(b))throw Error(\"React.Children.only expected to receive a single React element child.\");return b}};return oe.Activity=E,oe.Children=be,oe.Component=L,oe.Fragment=r,oe.Profiler=d,oe.PureComponent=I,oe.StrictMode=c,oe.Suspense=p,oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,oe.__COMPILER_RUNTIME={__proto__:null,c:function(b){return Y.H.useMemoCache(b)}},oe.cache=function(b){return function(){return b.apply(null,arguments)}},oe.cacheSignal=function(){return null},oe.cloneElement=function(b,R,Q){if(b==null)throw Error(\"The argument must be a React element, but you passed \"+b+\".\");var W=D({},b.props),fe=b.key;if(R!=null)for(re in R.key!==void 0&&(fe=\"\"+R.key),R)!K.call(R,re)||re===\"key\"||re===\"__self\"||re===\"__source\"||re===\"ref\"&&R.ref===void 0||(W[re]=R[re]);var re=arguments.length-2;if(re===1)W.children=Q;else if(1<re){for(var de=Array(re),Me=0;Me<re;Me++)de[Me]=arguments[Me+2];W.children=de}return V(b.type,fe,W)},oe.createContext=function(b){return b={$$typeof:v,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null},b.Provider=b,b.Consumer={$$typeof:h,_context:b},b},oe.createElement=function(b,R,Q){var W,fe={},re=null;if(R!=null)for(W in R.key!==void 0&&(re=\"\"+R.key),R)K.call(R,W)&&W!==\"key\"&&W!==\"__self\"&&W!==\"__source\"&&(fe[W]=R[W]);var de=arguments.length-2;if(de===1)fe.children=Q;else if(1<de){for(var Me=Array(de),Ne=0;Ne<de;Ne++)Me[Ne]=arguments[Ne+2];fe.children=Me}if(b&&b.defaultProps)for(W in de=b.defaultProps,de)fe[W]===void 0&&(fe[W]=de[W]);return V(b,re,fe)},oe.createRef=function(){return{current:null}},oe.forwardRef=function(b){return{$$typeof:A,render:b}},oe.isValidElement=q,oe.lazy=function(b){return{$$typeof:j,_payload:{_status:-1,_result:b},_init:ae}},oe.memo=function(b,R){return{$$typeof:y,type:b,compare:R===void 0?null:R}},oe.startTransition=function(b){var R=Y.T,Q={};Y.T=Q;try{var W=b(),fe=Y.S;fe!==null&&fe(Q,W),typeof W==\"object\"&&W!==null&&typeof W.then==\"function\"&&W.then(Z,Te)}catch(re){Te(re)}finally{R!==null&&Q.types!==null&&(R.types=Q.types),Y.T=R}},oe.unstable_useCacheRefresh=function(){return Y.H.useCacheRefresh()},oe.use=function(b){return Y.H.use(b)},oe.useActionState=function(b,R,Q){return Y.H.useActionState(b,R,Q)},oe.useCallback=function(b,R){return Y.H.useCallback(b,R)},oe.useContext=function(b){return Y.H.useContext(b)},oe.useDebugValue=function(){},oe.useDeferredValue=function(b,R){return Y.H.useDeferredValue(b,R)},oe.useEffect=function(b,R){return Y.H.useEffect(b,R)},oe.useEffectEvent=function(b){return Y.H.useEffectEvent(b)},oe.useId=function(){return Y.H.useId()},oe.useImperativeHandle=function(b,R,Q){return Y.H.useImperativeHandle(b,R,Q)},oe.useInsertionEffect=function(b,R){return Y.H.useInsertionEffect(b,R)},oe.useLayoutEffect=function(b,R){return Y.H.useLayoutEffect(b,R)},oe.useMemo=function(b,R){return Y.H.useMemo(b,R)},oe.useOptimistic=function(b,R){return Y.H.useOptimistic(b,R)},oe.useReducer=function(b,R,Q){return Y.H.useReducer(b,R,Q)},oe.useRef=function(b){return Y.H.useRef(b)},oe.useState=function(b){return Y.H.useState(b)},oe.useSyncExternalStore=function(b,R,Q){return Y.H.useSyncExternalStore(b,R,Q)},oe.useTransition=function(){return Y.H.useTransition()},oe.version=\"19.2.8\",oe}var Eh;function ys(){return Eh||(Eh=1,Of.exports=Qg()),Of.exports}var J=ys(),Df={exports:{}},Va={},Bf={exports:{}},Hf={};var Th;function Xg(){return Th||(Th=1,(function(i){function f(M,G){var ae=M.length;M.push(G);e:for(;0<ae;){var Te=ae-1>>>1,be=M[Te];if(0<d(be,G))M[Te]=G,M[ae]=be,ae=Te;else break e}}function r(M){return M.length===0?null:M[0]}function c(M){if(M.length===0)return null;var G=M[0],ae=M.pop();if(ae!==G){M[0]=ae;e:for(var Te=0,be=M.length,b=be>>>1;Te<b;){var R=2*(Te+1)-1,Q=M[R],W=R+1,fe=M[W];if(0>d(Q,ae))W<be&&0>d(fe,Q)?(M[Te]=fe,M[W]=ae,Te=W):(M[Te]=Q,M[R]=ae,Te=R);else if(W<be&&0>d(fe,ae))M[Te]=fe,M[W]=ae,Te=W;else break e}}return G}function d(M,G){var ae=M.sortIndex-G.sortIndex;return ae!==0?ae:M.id-G.id}if(i.unstable_now=void 0,typeof performance==\"object\"&&typeof performance.now==\"function\"){var h=performance;i.unstable_now=function(){return h.now()}}else{var v=Date,A=v.now();i.unstable_now=function(){return v.now()-A}}var p=[],y=[],j=1,E=null,x=3,H=!1,X=!1,D=!1,se=!1,L=typeof setTimeout==\"function\"?setTimeout:null,ce=typeof clearTimeout==\"function\"?clearTimeout:null,I=typeof setImmediate<\"u\"?setImmediate:null;function $(M){for(var G=r(y);G!==null;){if(G.callback===null)c(y);else if(G.startTime<=M)c(y),G.sortIndex=G.expirationTime,f(p,G);else break;G=r(y)}}function Ae(M){if(D=!1,$(M),!X)if(r(p)!==null)X=!0,Z||(Z=!0,F());else{var G=r(y);G!==null&&Ye(Ae,G.startTime-M)}}var Z=!1,Y=-1,K=5,V=-1;function ne(){return se?!0:!(i.unstable_now()-V<K)}function q(){if(se=!1,Z){var M=i.unstable_now();V=M;var G=!0;try{e:{X=!1,D&&(D=!1,ce(Y),Y=-1),H=!0;var ae=x;try{t:{for($(M),E=r(p);E!==null&&!(E.expirationTime>M&&ne());){var Te=E.callback;if(typeof Te==\"function\"){E.callback=null,x=E.priorityLevel;var be=Te(E.expirationTime<=M);if(M=i.unstable_now(),typeof be==\"function\"){E.callback=be,$(M),G=!0;break t}E===r(p)&&c(p),$(M)}else c(p);E=r(p)}if(E!==null)G=!0;else{var b=r(y);b!==null&&Ye(Ae,b.startTime-M),G=!1}}break e}finally{E=null,x=ae,H=!1}G=void 0}}finally{G?F():Z=!1}}}var F;if(typeof I==\"function\")F=function(){I(q)};else if(typeof MessageChannel<\"u\"){var ee=new MessageChannel,ue=ee.port2;ee.port1.onmessage=q,F=function(){ue.postMessage(null)}}else F=function(){L(q,0)};function Ye(M,G){Y=L(function(){M(i.unstable_now())},G)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(M){M.callback=null},i.unstable_forceFrameRate=function(M){0>M||125<M?console.error(\"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\"):K=0<M?Math.floor(1e3/M):5},i.unstable_getCurrentPriorityLevel=function(){return x},i.unstable_next=function(M){switch(x){case 1:case 2:case 3:var G=3;break;default:G=x}var ae=x;x=G;try{return M()}finally{x=ae}},i.unstable_requestPaint=function(){se=!0},i.unstable_runWithPriority=function(M,G){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var ae=x;x=M;try{return G()}finally{x=ae}},i.unstable_scheduleCallback=function(M,G,ae){var Te=i.unstable_now();switch(typeof ae==\"object\"&&ae!==null?(ae=ae.delay,ae=typeof ae==\"number\"&&0<ae?Te+ae:Te):ae=Te,M){case 1:var be=-1;break;case 2:be=250;break;case 5:be=1073741823;break;case 4:be=1e4;break;default:be=5e3}return be=ae+be,M={id:j++,callback:G,priorityLevel:M,startTime:ae,expirationTime:be,sortIndex:-1},ae>Te?(M.sortIndex=ae,f(y,M),r(p)===null&&M===r(y)&&(D?(ce(Y),Y=-1):D=!0,Ye(Ae,ae-Te))):(M.sortIndex=be,f(p,M),X||H||(X=!0,Z||(Z=!0,F()))),M},i.unstable_shouldYield=ne,i.unstable_wrapCallback=function(M){var G=x;return function(){var ae=x;x=G;try{return M.apply(this,arguments)}finally{x=ae}}}})(Hf)),Hf}var Ah;function Kg(){return Ah||(Ah=1,Bf.exports=Xg()),Bf.exports}var qf={exports:{}},at={};var zh;function Zg(){if(zh)return at;zh=1;var i=ys();function f(p){var y=\"https://react.dev/errors/\"+p;if(1<arguments.length){y+=\"?args[]=\"+encodeURIComponent(arguments[1]);for(var j=2;j<arguments.length;j++)y+=\"&args[]=\"+encodeURIComponent(arguments[j])}return\"Minified React error #\"+p+\"; visit \"+y+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}function r(){}var c={d:{f:r,r:function(){throw Error(f(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},d=Symbol.for(\"react.portal\");function h(p,y,j){var E=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:E==null?null:\"\"+E,children:p,containerInfo:y,implementation:j}}var v=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function A(p,y){if(p===\"font\")return\"\";if(typeof y==\"string\")return y===\"use-credentials\"?y:\"\"}return at.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,at.createPortal=function(p,y){var j=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(f(299));return h(p,y,null,j)},at.flushSync=function(p){var y=v.T,j=c.p;try{if(v.T=null,c.p=2,p)return p()}finally{v.T=y,c.p=j,c.d.f()}},at.preconnect=function(p,y){typeof p==\"string\"&&(y?(y=y.crossOrigin,y=typeof y==\"string\"?y===\"use-credentials\"?y:\"\":void 0):y=null,c.d.C(p,y))},at.prefetchDNS=function(p){typeof p==\"string\"&&c.d.D(p)},at.preinit=function(p,y){if(typeof p==\"string\"&&y&&typeof y.as==\"string\"){var j=y.as,E=A(j,y.crossOrigin),x=typeof y.integrity==\"string\"?y.integrity:void 0,H=typeof y.fetchPriority==\"string\"?y.fetchPriority:void 0;j===\"style\"?c.d.S(p,typeof y.precedence==\"string\"?y.precedence:void 0,{crossOrigin:E,integrity:x,fetchPriority:H}):j===\"script\"&&c.d.X(p,{crossOrigin:E,integrity:x,fetchPriority:H,nonce:typeof y.nonce==\"string\"?y.nonce:void 0})}},at.preinitModule=function(p,y){if(typeof p==\"string\")if(typeof y==\"object\"&&y!==null){if(y.as==null||y.as===\"script\"){var j=A(y.as,y.crossOrigin);c.d.M(p,{crossOrigin:j,integrity:typeof y.integrity==\"string\"?y.integrity:void 0,nonce:typeof y.nonce==\"string\"?y.nonce:void 0})}}else y==null&&c.d.M(p)},at.preload=function(p,y){if(typeof p==\"string\"&&typeof y==\"object\"&&y!==null&&typeof y.as==\"string\"){var j=y.as,E=A(j,y.crossOrigin);c.d.L(p,j,{crossOrigin:E,integrity:typeof y.integrity==\"string\"?y.integrity:void 0,nonce:typeof y.nonce==\"string\"?y.nonce:void 0,type:typeof y.type==\"string\"?y.type:void 0,fetchPriority:typeof y.fetchPriority==\"string\"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy==\"string\"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet==\"string\"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes==\"string\"?y.imageSizes:void 0,media:typeof y.media==\"string\"?y.media:void 0})}},at.preloadModule=function(p,y){if(typeof p==\"string\")if(y){var j=A(y.as,y.crossOrigin);c.d.m(p,{as:typeof y.as==\"string\"&&y.as!==\"script\"?y.as:void 0,crossOrigin:j,integrity:typeof y.integrity==\"string\"?y.integrity:void 0})}else c.d.m(p)},at.requestFormReset=function(p){c.d.r(p)},at.unstable_batchedUpdates=function(p,y){return p(y)},at.useFormState=function(p,y,j){return v.H.useFormState(p,y,j)},at.useFormStatus=function(){return v.H.useHostTransitionStatus()},at.version=\"19.2.8\",at}var Ch;function Vg(){if(Ch)return qf.exports;Ch=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>\"u\"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=\"function\"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(f){console.error(f)}}return i(),qf.exports=Zg(),qf.exports}var Nh;function Jg(){if(Nh)return Va;Nh=1;var i=Kg(),f=ys(),r=Vg();function c(e){var t=\"https://react.dev/errors/\"+e;if(1<arguments.length){t+=\"?args[]=\"+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=\"&args[]=\"+encodeURIComponent(arguments[n])}return\"Minified React error #\"+e+\"; visit \"+t+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function v(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function A(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(h(e)!==e)throw Error(c(188))}function y(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(c(188));return t!==e?null:e}for(var n=e,l=t;;){var a=n.return;if(a===null)break;var u=a.alternate;if(u===null){if(l=a.return,l!==null){n=l;continue}break}if(a.child===u.child){for(u=a.child;u;){if(u===n)return p(a),e;if(u===l)return p(a),t;u=u.sibling}throw Error(c(188))}if(n.return!==l.return)n=a,l=u;else{for(var s=!1,o=a.child;o;){if(o===n){s=!0,n=a,l=u;break}if(o===l){s=!0,l=a,n=u;break}o=o.sibling}if(!s){for(o=u.child;o;){if(o===n){s=!0,n=u,l=a;break}if(o===l){s=!0,l=u,n=a;break}o=o.sibling}if(!s)throw Error(c(189))}}if(n.alternate!==l)throw Error(c(190))}if(n.tag!==3)throw Error(c(188));return n.stateNode.current===n?e:t}function j(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=j(e),t!==null)return t;e=e.sibling}return null}var E=Object.assign,x=Symbol.for(\"react.element\"),H=Symbol.for(\"react.transitional.element\"),X=Symbol.for(\"react.portal\"),D=Symbol.for(\"react.fragment\"),se=Symbol.for(\"react.strict_mode\"),L=Symbol.for(\"react.profiler\"),ce=Symbol.for(\"react.consumer\"),I=Symbol.for(\"react.context\"),$=Symbol.for(\"react.forward_ref\"),Ae=Symbol.for(\"react.suspense\"),Z=Symbol.for(\"react.suspense_list\"),Y=Symbol.for(\"react.memo\"),K=Symbol.for(\"react.lazy\"),V=Symbol.for(\"react.activity\"),ne=Symbol.for(\"react.memo_cache_sentinel\"),q=Symbol.iterator;function F(e){return e===null||typeof e!=\"object\"?null:(e=q&&e[q]||e[\"@@iterator\"],typeof e==\"function\"?e:null)}var ee=Symbol.for(\"react.client.reference\");function ue(e){if(e==null)return null;if(typeof e==\"function\")return e.$$typeof===ee?null:e.displayName||e.name||null;if(typeof e==\"string\")return e;switch(e){case D:return\"Fragment\";case L:return\"Profiler\";case se:return\"StrictMode\";case Ae:return\"Suspense\";case Z:return\"SuspenseList\";case V:return\"Activity\"}if(typeof e==\"object\")switch(e.$$typeof){case X:return\"Portal\";case I:return e.displayName||\"Context\";case ce:return(e._context.displayName||\"Context\")+\".Consumer\";case $:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||\"\",e=e!==\"\"?\"ForwardRef(\"+e+\")\":\"ForwardRef\"),e;case Y:return t=e.displayName||null,t!==null?t:ue(e.type)||\"Memo\";case K:t=e._payload,e=e._init;try{return ue(e(t))}catch{}}return null}var Ye=Array.isArray,M=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},Te=[],be=-1;function b(e){return{current:e}}function R(e){0>be||(e.current=Te[be],Te[be]=null,be--)}function Q(e,t){be++,Te[be]=e.current,e.current=t}var W=b(null),fe=b(null),re=b(null),de=b(null);function Me(e,t){switch(Q(re,t),Q(fe,e),Q(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Gd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Gd(t),e=Qd(t,e);else switch(e){case\"svg\":e=1;break;case\"math\":e=2;break;default:e=0}}R(W),Q(W,e)}function Ne(){R(W),R(fe),R(re)}function nt(e){e.memoizedState!==null&&Q(de,e);var t=W.current,n=Qd(t,e.type);t!==n&&(Q(fe,e),Q(W,n))}function al(e){fe.current===e&&(R(W),R(fe)),de.current===e&&(R(de),Ga._currentValue=ae)}var At,Fl;function zt(e){if(At===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\\\\n( *(at )?)/);At=t&&t[1]||\"\",Fl=-1<n.stack.indexOf(\\`\n at\\`)?\" (<anonymous>)\":-1<n.stack.indexOf(\"@\")?\"@unknown:0:0\":\"\"}return\\`\n\\`+At+e+Fl}var ul=!1;function Wl(e,t){if(!e||ul)return\"\";ul=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var O=function(){throw Error()};if(Object.defineProperty(O.prototype,\"props\",{set:function(){throw Error()}}),typeof Reflect==\"object\"&&Reflect.construct){try{Reflect.construct(O,[])}catch(_){var N=_}Reflect.construct(e,[],O)}else{try{O.call()}catch(_){N=_}e.call(O.prototype)}}else{try{throw Error()}catch(_){N=_}(O=e())&&typeof O.catch==\"function\"&&O.catch(function(){})}}catch(_){if(_&&N&&typeof _.stack==\"string\")return[_.stack,N.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName=\"DetermineComponentFrameRoot\";var a=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,\"name\");a&&a.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,\"name\",{value:\"DetermineComponentFrameRoot\"});var u=l.DetermineComponentFrameRoot(),s=u[0],o=u[1];if(s&&o){var g=s.split(\\`\n\\`),C=o.split(\\`\n\\`);for(a=l=0;l<g.length&&!g[l].includes(\"DetermineComponentFrameRoot\");)l++;for(;a<C.length&&!C[a].includes(\"DetermineComponentFrameRoot\");)a++;if(l===g.length||a===C.length)for(l=g.length-1,a=C.length-1;1<=l&&0<=a&&g[l]!==C[a];)a--;for(;1<=l&&0<=a;l--,a--)if(g[l]!==C[a]){if(l!==1||a!==1)do if(l--,a--,0>a||g[l]!==C[a]){var w=\\`\n\\`+g[l].replace(\" at new \",\" at \");return e.displayName&&w.includes(\"<anonymous>\")&&(w=w.replace(\"<anonymous>\",e.displayName)),w}while(1<=l&&0<=a);break}}}finally{ul=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:\"\")?zt(n):\"\"}function Wa(e,t){switch(e.tag){case 26:case 27:case 5:return zt(e.type);case 16:return zt(\"Lazy\");case 13:return e.child!==t&&t!==null?zt(\"Suspense Fallback\"):zt(\"Suspense\");case 19:return zt(\"SuspenseList\");case 0:case 15:return Wl(e.type,!1);case 11:return Wl(e.type.render,!1);case 1:return Wl(e.type,!0);case 31:return zt(\"Activity\");default:return\"\"}}function Ia(e){try{var t=\"\",n=null;do t+=Wa(e,n),n=e,e=e.return;while(e);return t}catch(l){return\\`\nError generating stack: \\`+l.message+\\`\n\\`+l.stack}}var il=Object.prototype.hasOwnProperty,cl=i.unstable_scheduleCallback,fl=i.unstable_cancelCallback,Si=i.unstable_shouldYield,sl=i.unstable_requestPaint,ut=i.unstable_now,B=i.unstable_getCurrentPriorityLevel,k=i.unstable_ImmediatePriority,he=i.unstable_UserBlockingPriority,De=i.unstable_NormalPriority,lt=i.unstable_LowPriority,rl=i.unstable_IdlePriority,Il=i.log,T0=i.unstable_setDisableYieldValue,Pl=null,mt=null;function on(e){if(typeof Il==\"function\"&&T0(e),mt&&typeof mt.setStrictMode==\"function\")try{mt.setStrictMode(Pl,e)}catch{}}var gt=Math.clz32?Math.clz32:C0,A0=Math.log,z0=Math.LN2;function C0(e){return e>>>=0,e===0?32:31-(A0(e)/z0|0)|0}var Pa=256,eu=262144,tu=4194304;function Hn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function nu(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var a=0,u=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var o=l&134217727;return o!==0?(l=o&~u,l!==0?a=Hn(l):(s&=o,s!==0?a=Hn(s):n||(n=o&~e,n!==0&&(a=Hn(n))))):(o=l&~u,o!==0?a=Hn(o):s!==0?a=Hn(s):n||(n=l&~e,n!==0&&(a=Hn(n)))),a===0?0:t!==0&&t!==a&&(t&u)===0&&(u=a&-a,n=t&-t,u>=n||u===32&&(n&4194048)!==0)?t:a}function ea(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function N0(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Es(){var e=tu;return tu<<=1,(tu&62914560)===0&&(tu=4194304),e}function pi(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ta(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function j0(e,t,n,l,a,u){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,g=e.expirationTimes,C=e.hiddenUpdates;for(n=s&~n;0<n;){var w=31-gt(n),O=1<<w;o[w]=0,g[w]=-1;var N=C[w];if(N!==null)for(C[w]=null,w=0;w<N.length;w++){var _=N[w];_!==null&&(_.lane&=-536870913)}n&=~O}l!==0&&Ts(e,l,0),u!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=u&~(s&~t))}function Ts(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-gt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function As(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-gt(n),a=1<<l;a&t|e[l]&t&&(e[l]|=t),n&=~a}}function zs(e,t){var n=t&-t;return n=(n&42)!==0?1:Ei(n),(n&(e.suspendedLanes|t))!==0?0:n}function Ei(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ti(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Cs(){var e=G.p;return e!==0?e:(e=window.event,e===void 0?32:oh(e.type))}function Ns(e,t){var n=G.p;try{return G.p=e,t()}finally{G.p=n}}var dn=Math.random().toString(36).slice(2),We=\"__reactFiber$\"+dn,ct=\"__reactProps$\"+dn,ol=\"__reactContainer$\"+dn,Ai=\"__reactEvents$\"+dn,x0=\"__reactListeners$\"+dn,_0=\"__reactHandles$\"+dn,js=\"__reactResources$\"+dn,na=\"__reactMarker$\"+dn;function zi(e){delete e[We],delete e[ct],delete e[Ai],delete e[x0],delete e[_0]}function dl(e){var t=e[We];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ol]||n[We]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=$d(e);e!==null;){if(n=e[We])return n;e=$d(e)}return t}e=n,n=e.parentNode}return null}function hl(e){if(e=e[We]||e[ol]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function la(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function ml(e){var t=e[js];return t||(t=e[js]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function $e(e){e[na]=!0}var xs=new Set,_s={};function qn(e,t){gl(e,t),gl(e+\"Capture\",t)}function gl(e,t){for(_s[e]=t,e=0;e<t.length;e++)xs.add(t[e])}var M0=RegExp(\"^[:A-Z_a-z\\\\\\\\u00C0-\\\\\\\\u00D6\\\\\\\\u00D8-\\\\\\\\u00F6\\\\\\\\u00F8-\\\\\\\\u02FF\\\\\\\\u0370-\\\\\\\\u037D\\\\\\\\u037F-\\\\\\\\u1FFF\\\\\\\\u200C-\\\\\\\\u200D\\\\\\\\u2070-\\\\\\\\u218F\\\\\\\\u2C00-\\\\\\\\u2FEF\\\\\\\\u3001-\\\\\\\\uD7FF\\\\\\\\uF900-\\\\\\\\uFDCF\\\\\\\\uFDF0-\\\\\\\\uFFFD][:A-Z_a-z\\\\\\\\u00C0-\\\\\\\\u00D6\\\\\\\\u00D8-\\\\\\\\u00F6\\\\\\\\u00F8-\\\\\\\\u02FF\\\\\\\\u0370-\\\\\\\\u037D\\\\\\\\u037F-\\\\\\\\u1FFF\\\\\\\\u200C-\\\\\\\\u200D\\\\\\\\u2070-\\\\\\\\u218F\\\\\\\\u2C00-\\\\\\\\u2FEF\\\\\\\\u3001-\\\\\\\\uD7FF\\\\\\\\uF900-\\\\\\\\uFDCF\\\\\\\\uFDF0-\\\\\\\\uFFFD\\\\\\\\-.0-9\\\\\\\\u00B7\\\\\\\\u0300-\\\\\\\\u036F\\\\\\\\u203F-\\\\\\\\u2040]*$\"),Ms={},ws={};function w0(e){return il.call(ws,e)?!0:il.call(Ms,e)?!1:M0.test(e)?ws[e]=!0:(Ms[e]=!0,!1)}function lu(e,t,n){if(w0(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case\"undefined\":case\"function\":case\"symbol\":e.removeAttribute(t);return;case\"boolean\":var l=t.toLowerCase().slice(0,5);if(l!==\"data-\"&&l!==\"aria-\"){e.removeAttribute(t);return}}e.setAttribute(t,\"\"+n)}}function au(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case\"undefined\":case\"function\":case\"symbol\":case\"boolean\":e.removeAttribute(t);return}e.setAttribute(t,\"\"+n)}}function Vt(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case\"undefined\":case\"function\":case\"symbol\":case\"boolean\":e.removeAttribute(n);return}e.setAttributeNS(t,n,\"\"+l)}}function Ct(e){switch(typeof e){case\"bigint\":case\"boolean\":case\"number\":case\"string\":case\"undefined\":return e;case\"object\":return e;default:return\"\"}}function Rs(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===\"input\"&&(t===\"checkbox\"||t===\"radio\")}function R0(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<\"u\"&&typeof l.get==\"function\"&&typeof l.set==\"function\"){var a=l.get,u=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(s){n=\"\"+s,u.call(this,s)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(s){n=\"\"+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ci(e){if(!e._valueTracker){var t=Rs(e)?\"checked\":\"value\";e._valueTracker=R0(e,t,\"\"+e[t])}}function Us(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l=\"\";return e&&(l=Rs(e)?e.checked?\"true\":\"false\":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function uu(e){if(e=e||(typeof document<\"u\"?document:void 0),typeof e>\"u\")return null;try{return e.activeElement||e.body}catch{return e.body}}var U0=/[\\\\n\"\\\\\\\\]/g;function Nt(e){return e.replace(U0,function(t){return\"\\\\\\\\\"+t.charCodeAt(0).toString(16)+\" \"})}function Ni(e,t,n,l,a,u,s,o){e.name=\"\",s!=null&&typeof s!=\"function\"&&typeof s!=\"symbol\"&&typeof s!=\"boolean\"?e.type=s:e.removeAttribute(\"type\"),t!=null?s===\"number\"?(t===0&&e.value===\"\"||e.value!=t)&&(e.value=\"\"+Ct(t)):e.value!==\"\"+Ct(t)&&(e.value=\"\"+Ct(t)):s!==\"submit\"&&s!==\"reset\"||e.removeAttribute(\"value\"),t!=null?ji(e,s,Ct(t)):n!=null?ji(e,s,Ct(n)):l!=null&&e.removeAttribute(\"value\"),a==null&&u!=null&&(e.defaultChecked=!!u),a!=null&&(e.checked=a&&typeof a!=\"function\"&&typeof a!=\"symbol\"),o!=null&&typeof o!=\"function\"&&typeof o!=\"symbol\"&&typeof o!=\"boolean\"?e.name=\"\"+Ct(o):e.removeAttribute(\"name\")}function Os(e,t,n,l,a,u,s,o){if(u!=null&&typeof u!=\"function\"&&typeof u!=\"symbol\"&&typeof u!=\"boolean\"&&(e.type=u),t!=null||n!=null){if(!(u!==\"submit\"&&u!==\"reset\"||t!=null)){Ci(e);return}n=n!=null?\"\"+Ct(n):\"\",t=t!=null?\"\"+Ct(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}l=l??a,l=typeof l!=\"function\"&&typeof l!=\"symbol\"&&!!l,e.checked=o?e.checked:!!l,e.defaultChecked=!!l,s!=null&&typeof s!=\"function\"&&typeof s!=\"symbol\"&&typeof s!=\"boolean\"&&(e.name=s),Ci(e)}function ji(e,t,n){t===\"number\"&&uu(e.ownerDocument)===e||e.defaultValue===\"\"+n||(e.defaultValue=\"\"+n)}function yl(e,t,n,l){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t[\"$\"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty(\"$\"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&l&&(e[n].defaultSelected=!0)}else{for(n=\"\"+Ct(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,l&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function Ds(e,t,n){if(t!=null&&(t=\"\"+Ct(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?\"\"+Ct(n):\"\"}function Bs(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(c(92));if(Ye(l)){if(1<l.length)throw Error(c(93));l=l[0]}n=l}n==null&&(n=\"\"),t=n}n=Ct(t),e.defaultValue=n,l=e.textContent,l===n&&l!==\"\"&&l!==null&&(e.value=l),Ci(e)}function vl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var O0=new Set(\"animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp\".split(\" \"));function Hs(e,t,n){var l=t.indexOf(\"--\")===0;n==null||typeof n==\"boolean\"||n===\"\"?l?e.setProperty(t,\"\"):t===\"float\"?e.cssFloat=\"\":e[t]=\"\":l?e.setProperty(t,n):typeof n!=\"number\"||n===0||O0.has(t)?t===\"float\"?e.cssFloat=n:e[t]=(\"\"+n).trim():e[t]=n+\"px\"}function qs(e,t,n){if(t!=null&&typeof t!=\"object\")throw Error(c(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf(\"--\")===0?e.setProperty(l,\"\"):l===\"float\"?e.cssFloat=\"\":e[l]=\"\");for(var a in t)l=t[a],t.hasOwnProperty(a)&&n[a]!==l&&Hs(e,a,l)}else for(var u in t)t.hasOwnProperty(u)&&Hs(e,u,t[u])}function xi(e){if(e.indexOf(\"-\")===-1)return!1;switch(e){case\"annotation-xml\":case\"color-profile\":case\"font-face\":case\"font-face-src\":case\"font-face-uri\":case\"font-face-format\":case\"font-face-name\":case\"missing-glyph\":return!1;default:return!0}}var D0=new Map([[\"acceptCharset\",\"accept-charset\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"],[\"crossOrigin\",\"crossorigin\"],[\"accentHeight\",\"accent-height\"],[\"alignmentBaseline\",\"alignment-baseline\"],[\"arabicForm\",\"arabic-form\"],[\"baselineShift\",\"baseline-shift\"],[\"capHeight\",\"cap-height\"],[\"clipPath\",\"clip-path\"],[\"clipRule\",\"clip-rule\"],[\"colorInterpolation\",\"color-interpolation\"],[\"colorInterpolationFilters\",\"color-interpolation-filters\"],[\"colorProfile\",\"color-profile\"],[\"colorRendering\",\"color-rendering\"],[\"dominantBaseline\",\"dominant-baseline\"],[\"enableBackground\",\"enable-background\"],[\"fillOpacity\",\"fill-opacity\"],[\"fillRule\",\"fill-rule\"],[\"floodColor\",\"flood-color\"],[\"floodOpacity\",\"flood-opacity\"],[\"fontFamily\",\"font-family\"],[\"fontSize\",\"font-size\"],[\"fontSizeAdjust\",\"font-size-adjust\"],[\"fontStretch\",\"font-stretch\"],[\"fontStyle\",\"font-style\"],[\"fontVariant\",\"font-variant\"],[\"fontWeight\",\"font-weight\"],[\"glyphName\",\"glyph-name\"],[\"glyphOrientationHorizontal\",\"glyph-orientation-horizontal\"],[\"glyphOrientationVertical\",\"glyph-orientation-vertical\"],[\"horizAdvX\",\"horiz-adv-x\"],[\"horizOriginX\",\"horiz-origin-x\"],[\"imageRendering\",\"image-rendering\"],[\"letterSpacing\",\"letter-spacing\"],[\"lightingColor\",\"lighting-color\"],[\"markerEnd\",\"marker-end\"],[\"markerMid\",\"marker-mid\"],[\"markerStart\",\"marker-start\"],[\"overlinePosition\",\"overline-position\"],[\"overlineThickness\",\"overline-thickness\"],[\"paintOrder\",\"paint-order\"],[\"panose-1\",\"panose-1\"],[\"pointerEvents\",\"pointer-events\"],[\"renderingIntent\",\"rendering-intent\"],[\"shapeRendering\",\"shape-rendering\"],[\"stopColor\",\"stop-color\"],[\"stopOpacity\",\"stop-opacity\"],[\"strikethroughPosition\",\"strikethrough-position\"],[\"strikethroughThickness\",\"strikethrough-thickness\"],[\"strokeDasharray\",\"stroke-dasharray\"],[\"strokeDashoffset\",\"stroke-dashoffset\"],[\"strokeLinecap\",\"stroke-linecap\"],[\"strokeLinejoin\",\"stroke-linejoin\"],[\"strokeMiterlimit\",\"stroke-miterlimit\"],[\"strokeOpacity\",\"stroke-opacity\"],[\"strokeWidth\",\"stroke-width\"],[\"textAnchor\",\"text-anchor\"],[\"textDecoration\",\"text-decoration\"],[\"textRendering\",\"text-rendering\"],[\"transformOrigin\",\"transform-origin\"],[\"underlinePosition\",\"underline-position\"],[\"underlineThickness\",\"underline-thickness\"],[\"unicodeBidi\",\"unicode-bidi\"],[\"unicodeRange\",\"unicode-range\"],[\"unitsPerEm\",\"units-per-em\"],[\"vAlphabetic\",\"v-alphabetic\"],[\"vHanging\",\"v-hanging\"],[\"vIdeographic\",\"v-ideographic\"],[\"vMathematical\",\"v-mathematical\"],[\"vectorEffect\",\"vector-effect\"],[\"vertAdvY\",\"vert-adv-y\"],[\"vertOriginX\",\"vert-origin-x\"],[\"vertOriginY\",\"vert-origin-y\"],[\"wordSpacing\",\"word-spacing\"],[\"writingMode\",\"writing-mode\"],[\"xmlnsXlink\",\"xmlns:xlink\"],[\"xHeight\",\"x-height\"]]),B0=/^[\\\\u0000-\\\\u001F ]*j[\\\\r\\\\n\\\\t]*a[\\\\r\\\\n\\\\t]*v[\\\\r\\\\n\\\\t]*a[\\\\r\\\\n\\\\t]*s[\\\\r\\\\n\\\\t]*c[\\\\r\\\\n\\\\t]*r[\\\\r\\\\n\\\\t]*i[\\\\r\\\\n\\\\t]*p[\\\\r\\\\n\\\\t]*t[\\\\r\\\\n\\\\t]*:/i;function iu(e){return B0.test(\"\"+e)?\"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')\":e}function Jt(){}var _i=null;function Mi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bl=null,Sl=null;function Ys(e){var t=hl(e);if(t&&(e=t.stateNode)){var n=e[ct]||null;e:switch(e=t.stateNode,t.type){case\"input\":if(Ni(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===\"radio\"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name=\"'+Nt(\"\"+t)+'\"][type=\"radio\"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var a=l[ct]||null;if(!a)throw Error(c(90));Ni(l,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&Us(l)}break e;case\"textarea\":Ds(e,n.value,n.defaultValue);break e;case\"select\":t=n.value,t!=null&&yl(e,!!n.multiple,t,!1)}}}var wi=!1;function Ls(e,t,n){if(wi)return e(t,n);wi=!0;try{var l=e(t);return l}finally{if(wi=!1,(bl!==null||Sl!==null)&&(Ju(),bl&&(t=bl,e=Sl,Sl=bl=null,Ys(t),e)))for(t=0;t<e.length;t++)Ys(e[t])}}function aa(e,t){var n=e.stateNode;if(n===null)return null;var l=n[ct]||null;if(l===null)return null;n=l[t];e:switch(t){case\"onClick\":case\"onClickCapture\":case\"onDoubleClick\":case\"onDoubleClickCapture\":case\"onMouseDown\":case\"onMouseDownCapture\":case\"onMouseMove\":case\"onMouseMoveCapture\":case\"onMouseUp\":case\"onMouseUpCapture\":case\"onMouseEnter\":(l=!l.disabled)||(e=e.type,l=!(e===\"button\"||e===\"input\"||e===\"select\"||e===\"textarea\")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!=\"function\")throw Error(c(231,t,typeof n));return n}var kt=!(typeof window>\"u\"||typeof window.document>\"u\"||typeof window.document.createElement>\"u\"),Ri=!1;if(kt)try{var ua={};Object.defineProperty(ua,\"passive\",{get:function(){Ri=!0}}),window.addEventListener(\"test\",ua,ua),window.removeEventListener(\"test\",ua,ua)}catch{Ri=!1}var hn=null,Ui=null,cu=null;function Gs(){if(cu)return cu;var e,t=Ui,n=t.length,l,a=\"value\"in hn?hn.value:hn.textContent,u=a.length;for(e=0;e<n&&t[e]===a[e];e++);var s=n-e;for(l=1;l<=s&&t[n-l]===a[u-l];l++);return cu=a.slice(e,1<l?1-l:void 0)}function fu(e){var t=e.keyCode;return\"charCode\"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function su(){return!0}function Qs(){return!1}function ft(e){function t(n,l,a,u,s){this._reactName=n,this._targetInst=a,this.type=l,this.nativeEvent=u,this.target=s,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(u):u[o]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?su:Qs,this.isPropagationStopped=Qs,this}return E(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!=\"unknown\"&&(n.returnValue=!1),this.isDefaultPrevented=su)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!=\"unknown\"&&(n.cancelBubble=!0),this.isPropagationStopped=su)},persist:function(){},isPersistent:su}),t}var Yn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ru=ft(Yn),ia=E({},Yn,{view:0,detail:0}),H0=ft(ia),Oi,Di,ca,ou=E({},ia,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hi,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return\"movementX\"in e?e.movementX:(e!==ca&&(ca&&e.type===\"mousemove\"?(Oi=e.screenX-ca.screenX,Di=e.screenY-ca.screenY):Di=Oi=0,ca=e),Oi)},movementY:function(e){return\"movementY\"in e?e.movementY:Di}}),Xs=ft(ou),q0=E({},ou,{dataTransfer:0}),Y0=ft(q0),L0=E({},ia,{relatedTarget:0}),Bi=ft(L0),G0=E({},Yn,{animationName:0,elapsedTime:0,pseudoElement:0}),Q0=ft(G0),X0=E({},Yn,{clipboardData:function(e){return\"clipboardData\"in e?e.clipboardData:window.clipboardData}}),K0=ft(X0),Z0=E({},Yn,{data:0}),Ks=ft(Z0),V0={Esc:\"Escape\",Spacebar:\" \",Left:\"ArrowLeft\",Up:\"ArrowUp\",Right:\"ArrowRight\",Down:\"ArrowDown\",Del:\"Delete\",Win:\"OS\",Menu:\"ContextMenu\",Apps:\"ContextMenu\",Scroll:\"ScrollLock\",MozPrintableKey:\"Unidentified\"},J0={8:\"Backspace\",9:\"Tab\",12:\"Clear\",13:\"Enter\",16:\"Shift\",17:\"Control\",18:\"Alt\",19:\"Pause\",20:\"CapsLock\",27:\"Escape\",32:\" \",33:\"PageUp\",34:\"PageDown\",35:\"End\",36:\"Home\",37:\"ArrowLeft\",38:\"ArrowUp\",39:\"ArrowRight\",40:\"ArrowDown\",45:\"Insert\",46:\"Delete\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",116:\"F5\",117:\"F6\",118:\"F7\",119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"NumLock\",145:\"ScrollLock\",224:\"Meta\"},k0={Alt:\"altKey\",Control:\"ctrlKey\",Meta:\"metaKey\",Shift:\"shiftKey\"};function $0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=k0[e])?!!t[e]:!1}function Hi(){return $0}var F0=E({},ia,{key:function(e){if(e.key){var t=V0[e.key]||e.key;if(t!==\"Unidentified\")return t}return e.type===\"keypress\"?(e=fu(e),e===13?\"Enter\":String.fromCharCode(e)):e.type===\"keydown\"||e.type===\"keyup\"?J0[e.keyCode]||\"Unidentified\":\"\"},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hi,charCode:function(e){return e.type===\"keypress\"?fu(e):0},keyCode:function(e){return e.type===\"keydown\"||e.type===\"keyup\"?e.keyCode:0},which:function(e){return e.type===\"keypress\"?fu(e):e.type===\"keydown\"||e.type===\"keyup\"?e.keyCode:0}}),W0=ft(F0),I0=E({},ou,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Zs=ft(I0),P0=E({},ia,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hi}),em=ft(P0),tm=E({},Yn,{propertyName:0,elapsedTime:0,pseudoElement:0}),nm=ft(tm),lm=E({},ou,{deltaX:function(e){return\"deltaX\"in e?e.deltaX:\"wheelDeltaX\"in e?-e.wheelDeltaX:0},deltaY:function(e){return\"deltaY\"in e?e.deltaY:\"wheelDeltaY\"in e?-e.wheelDeltaY:\"wheelDelta\"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),am=ft(lm),um=E({},Yn,{newState:0,oldState:0}),im=ft(um),cm=[9,13,27,32],qi=kt&&\"CompositionEvent\"in window,fa=null;kt&&\"documentMode\"in document&&(fa=document.documentMode);var fm=kt&&\"TextEvent\"in window&&!fa,Vs=kt&&(!qi||fa&&8<fa&&11>=fa),Js=\" \",ks=!1;function $s(e,t){switch(e){case\"keyup\":return cm.indexOf(t.keyCode)!==-1;case\"keydown\":return t.keyCode!==229;case\"keypress\":case\"mousedown\":case\"focusout\":return!0;default:return!1}}function Fs(e){return e=e.detail,typeof e==\"object\"&&\"data\"in e?e.data:null}var pl=!1;function sm(e,t){switch(e){case\"compositionend\":return Fs(t);case\"keypress\":return t.which!==32?null:(ks=!0,Js);case\"textInput\":return e=t.data,e===Js&&ks?null:e;default:return null}}function rm(e,t){if(pl)return e===\"compositionend\"||!qi&&$s(e,t)?(e=Gs(),cu=Ui=hn=null,pl=!1,e):null;switch(e){case\"paste\":return null;case\"keypress\":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case\"compositionend\":return Vs&&t.locale!==\"ko\"?null:t.data;default:return null}}var om={color:!0,date:!0,datetime:!0,\"datetime-local\":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ws(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===\"input\"?!!om[e.type]:t===\"textarea\"}function Is(e,t,n,l){bl?Sl?Sl.push(l):Sl=[l]:bl=l,t=ei(t,\"onChange\"),0<t.length&&(n=new ru(\"onChange\",\"change\",null,n,l),e.push({event:n,listeners:t}))}var sa=null,ra=null;function dm(e){Dd(e,0)}function du(e){var t=la(e);if(Us(t))return e}function Ps(e,t){if(e===\"change\")return t}var er=!1;if(kt){var Yi;if(kt){var Li=\"oninput\"in document;if(!Li){var tr=document.createElement(\"div\");tr.setAttribute(\"oninput\",\"return;\"),Li=typeof tr.oninput==\"function\"}Yi=Li}else Yi=!1;er=Yi&&(!document.documentMode||9<document.documentMode)}function nr(){sa&&(sa.detachEvent(\"onpropertychange\",lr),ra=sa=null)}function lr(e){if(e.propertyName===\"value\"&&du(ra)){var t=[];Is(t,ra,e,Mi(e)),Ls(dm,t)}}function hm(e,t,n){e===\"focusin\"?(nr(),sa=t,ra=n,sa.attachEvent(\"onpropertychange\",lr)):e===\"focusout\"&&nr()}function mm(e){if(e===\"selectionchange\"||e===\"keyup\"||e===\"keydown\")return du(ra)}function gm(e,t){if(e===\"click\")return du(t)}function ym(e,t){if(e===\"input\"||e===\"change\")return du(t)}function vm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yt=typeof Object.is==\"function\"?Object.is:vm;function oa(e,t){if(yt(e,t))return!0;if(typeof e!=\"object\"||e===null||typeof t!=\"object\"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var a=n[l];if(!il.call(t,a)||!yt(e[a],t[a]))return!1}return!0}function ar(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n=ar(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ar(n)}}function ir(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ir(e,t.parentNode):\"contains\"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function cr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=uu(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==\"string\"}catch{n=!1}if(n)e=t.contentWindow;else break;t=uu(e.document)}return t}function Gi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===\"input\"&&(e.type===\"text\"||e.type===\"search\"||e.type===\"tel\"||e.type===\"url\"||e.type===\"password\")||t===\"textarea\"||e.contentEditable===\"true\")}var bm=kt&&\"documentMode\"in document&&11>=document.documentMode,El=null,Qi=null,da=null,Xi=!1;function fr(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xi||El==null||El!==uu(l)||(l=El,\"selectionStart\"in l&&Gi(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),da&&oa(da,l)||(da=l,l=ei(Qi,\"onSelect\"),0<l.length&&(t=new ru(\"onSelect\",\"select\",null,t,n),e.push({event:t,listeners:l}),t.target=El)))}function Ln(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[\"Webkit\"+e]=\"webkit\"+t,n[\"Moz\"+e]=\"moz\"+t,n}var Tl={animationend:Ln(\"Animation\",\"AnimationEnd\"),animationiteration:Ln(\"Animation\",\"AnimationIteration\"),animationstart:Ln(\"Animation\",\"AnimationStart\"),transitionrun:Ln(\"Transition\",\"TransitionRun\"),transitionstart:Ln(\"Transition\",\"TransitionStart\"),transitioncancel:Ln(\"Transition\",\"TransitionCancel\"),transitionend:Ln(\"Transition\",\"TransitionEnd\")},Ki={},sr={};kt&&(sr=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete Tl.animationend.animation,delete Tl.animationiteration.animation,delete Tl.animationstart.animation),\"TransitionEvent\"in window||delete Tl.transitionend.transition);function Gn(e){if(Ki[e])return Ki[e];if(!Tl[e])return e;var t=Tl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in sr)return Ki[e]=t[n];return e}var rr=Gn(\"animationend\"),or=Gn(\"animationiteration\"),dr=Gn(\"animationstart\"),Sm=Gn(\"transitionrun\"),pm=Gn(\"transitionstart\"),Em=Gn(\"transitioncancel\"),hr=Gn(\"transitionend\"),mr=new Map,Zi=\"abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel\".split(\" \");Zi.push(\"scrollEnd\");function Dt(e,t){mr.set(e,t),qn(t,[e])}var hu=typeof reportError==\"function\"?reportError:function(e){if(typeof window==\"object\"&&typeof window.ErrorEvent==\"function\"){var t=new window.ErrorEvent(\"error\",{bubbles:!0,cancelable:!0,message:typeof e==\"object\"&&e!==null&&typeof e.message==\"string\"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==\"object\"&&typeof process.emit==\"function\"){process.emit(\"uncaughtException\",e);return}console.error(e)},jt=[],Al=0,Vi=0;function mu(){for(var e=Al,t=Vi=Al=0;t<e;){var n=jt[t];jt[t++]=null;var l=jt[t];jt[t++]=null;var a=jt[t];jt[t++]=null;var u=jt[t];if(jt[t++]=null,l!==null&&a!==null){var s=l.pending;s===null?a.next=a:(a.next=s.next,s.next=a),l.pending=a}u!==0&&gr(n,a,u)}}function gu(e,t,n,l){jt[Al++]=e,jt[Al++]=t,jt[Al++]=n,jt[Al++]=l,Vi|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Ji(e,t,n,l){return gu(e,t,n,l),yu(e)}function Qn(e,t){return gu(e,null,null,t),yu(e)}function gr(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var a=!1,u=e.return;u!==null;)u.childLanes|=n,l=u.alternate,l!==null&&(l.childLanes|=n),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(a=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,a&&t!==null&&(a=31-gt(n),e=u.hiddenUpdates,l=e[a],l===null?e[a]=[t]:l.push(t),t.lane=n|536870912),u):null}function yu(e){if(50<Oa)throw Oa=0,nf=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var zl={};function Tm(e,t,n,l){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vt(e,t,n,l){return new Tm(e,t,n,l)}function ki(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $t(e,t){var n=e.alternate;return n===null?(n=vt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function yr(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function vu(e,t,n,l,a,u){var s=0;if(l=e,typeof e==\"function\")ki(e)&&(s=1);else if(typeof e==\"string\")s=jg(e,n,W.current)?26:e===\"html\"||e===\"head\"||e===\"body\"?27:5;else e:switch(e){case V:return e=vt(31,n,t,a),e.elementType=V,e.lanes=u,e;case D:return Xn(n.children,a,u,t);case se:s=8,a|=24;break;case L:return e=vt(12,n,t,a|2),e.elementType=L,e.lanes=u,e;case Ae:return e=vt(13,n,t,a),e.elementType=Ae,e.lanes=u,e;case Z:return e=vt(19,n,t,a),e.elementType=Z,e.lanes=u,e;default:if(typeof e==\"object\"&&e!==null)switch(e.$$typeof){case I:s=10;break e;case ce:s=9;break e;case $:s=11;break e;case Y:s=14;break e;case K:s=16,l=null;break e}s=29,n=Error(c(130,e===null?\"null\":typeof e,\"\")),l=null}return t=vt(s,n,t,a),t.elementType=e,t.type=l,t.lanes=u,t}function Xn(e,t,n,l){return e=vt(7,e,l,t),e.lanes=n,e}function $i(e,t,n){return e=vt(6,e,null,t),e.lanes=n,e}function vr(e){var t=vt(18,null,null,0);return t.stateNode=e,t}function Fi(e,t,n){return t=vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var br=new WeakMap;function xt(e,t){if(typeof e==\"object\"&&e!==null){var n=br.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Ia(t)},br.set(e,t),t)}return{value:e,source:t,stack:Ia(t)}}var Cl=[],Nl=0,bu=null,ha=0,_t=[],Mt=0,mn=null,Yt=1,Lt=\"\";function Ft(e,t){Cl[Nl++]=ha,Cl[Nl++]=bu,bu=e,ha=t}function Sr(e,t,n){_t[Mt++]=Yt,_t[Mt++]=Lt,_t[Mt++]=mn,mn=e;var l=Yt;e=Lt;var a=32-gt(l)-1;l&=~(1<<a),n+=1;var u=32-gt(t)+a;if(30<u){var s=a-a%5;u=(l&(1<<s)-1).toString(32),l>>=s,a-=s,Yt=1<<32-gt(t)+a|n<<a|l,Lt=u+e}else Yt=1<<u|n<<a|l,Lt=e}function Wi(e){e.return!==null&&(Ft(e,1),Sr(e,1,0))}function Ii(e){for(;e===bu;)bu=Cl[--Nl],Cl[Nl]=null,ha=Cl[--Nl],Cl[Nl]=null;for(;e===mn;)mn=_t[--Mt],_t[Mt]=null,Lt=_t[--Mt],_t[Mt]=null,Yt=_t[--Mt],_t[Mt]=null}function pr(e,t){_t[Mt++]=Yt,_t[Mt++]=Lt,_t[Mt++]=mn,Yt=t.id,Lt=t.overflow,mn=e}var Ie=null,Be=null,Ee=!1,gn=null,wt=!1,Pi=Error(c(519));function yn(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?\"text\":\"HTML\",\"\"));throw ma(xt(t,e)),Pi}function Er(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[We]=e,t[ct]=l,n){case\"dialog\":ve(\"cancel\",t),ve(\"close\",t);break;case\"iframe\":case\"object\":case\"embed\":ve(\"load\",t);break;case\"video\":case\"audio\":for(n=0;n<Ba.length;n++)ve(Ba[n],t);break;case\"source\":ve(\"error\",t);break;case\"img\":case\"image\":case\"link\":ve(\"error\",t),ve(\"load\",t);break;case\"details\":ve(\"toggle\",t);break;case\"input\":ve(\"invalid\",t),Os(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case\"select\":ve(\"invalid\",t);break;case\"textarea\":ve(\"invalid\",t),Bs(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!=\"string\"&&typeof n!=\"number\"&&typeof n!=\"bigint\"||t.textContent===\"\"+n||l.suppressHydrationWarning===!0||Yd(t.textContent,n)?(l.popover!=null&&(ve(\"beforetoggle\",t),ve(\"toggle\",t)),l.onScroll!=null&&ve(\"scroll\",t),l.onScrollEnd!=null&&ve(\"scrollend\",t),l.onClick!=null&&(t.onclick=Jt),t=!0):t=!1,t||yn(e,!0)}function Tr(e){for(Ie=e.return;Ie;)switch(Ie.tag){case 5:case 31:case 13:wt=!1;return;case 27:case 3:wt=!0;return;default:Ie=Ie.return}}function jl(e){if(e!==Ie)return!1;if(!Ee)return Tr(e),Ee=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==\"form\"&&n!==\"button\")||bf(e.type,e.memoizedProps)),n=!n),n&&Be&&yn(e),Tr(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Be=kd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Be=kd(e)}else t===27?(t=Be,Mn(e.type)?(e=Af,Af=null,Be=e):Be=t):Be=Ie?Ut(e.stateNode.nextSibling):null;return!0}function Kn(){Be=Ie=null,Ee=!1}function ec(){var e=gn;return e!==null&&(dt===null?dt=e:dt.push.apply(dt,e),gn=null),e}function ma(e){gn===null?gn=[e]:gn.push(e)}var tc=b(null),Zn=null,Wt=null;function vn(e,t,n){Q(tc,t._currentValue),t._currentValue=n}function It(e){e._currentValue=tc.current,R(tc)}function nc(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function lc(e,t,n,l){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var u=a.dependencies;if(u!==null){var s=a.child;u=u.firstContext;e:for(;u!==null;){var o=u;u=a;for(var g=0;g<t.length;g++)if(o.context===t[g]){u.lanes|=n,o=u.alternate,o!==null&&(o.lanes|=n),nc(u.return,n,e),l||(s=null);break e}u=o.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(c(341));s.lanes|=n,u=s.alternate,u!==null&&(u.lanes|=n),nc(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function xl(e,t,n,l){e=null;for(var a=t,u=!1;a!==null;){if(!u){if((a.flags&524288)!==0)u=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(c(387));if(s=s.memoizedProps,s!==null){var o=a.type;yt(a.pendingProps.value,s.value)||(e!==null?e.push(o):e=[o])}}else if(a===de.current){if(s=a.alternate,s===null)throw Error(c(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(Ga):e=[Ga])}a=a.return}e!==null&&lc(t,e,n,l),t.flags|=262144}function Su(e){for(e=e.firstContext;e!==null;){if(!yt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Vn(e){Zn=e,Wt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Pe(e){return Ar(Zn,e)}function pu(e,t){return Zn===null&&Vn(e),Ar(e,t)}function Ar(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Wt===null){if(e===null)throw Error(c(308));Wt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wt=Wt.next=t;return n}var Am=typeof AbortController<\"u\"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},zm=i.unstable_scheduleCallback,Cm=i.unstable_NormalPriority,Ke={$$typeof:I,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ac(){return{controller:new Am,data:new Map,refCount:0}}function ga(e){e.refCount--,e.refCount===0&&zm(Cm,function(){e.controller.abort()})}var ya=null,uc=0,_l=0,Ml=null;function Nm(e,t){if(ya===null){var n=ya=[];uc=0,_l=sf(),Ml={status:\"pending\",value:void 0,then:function(l){n.push(l)}}}return uc++,t.then(zr,zr),t}function zr(){if(--uc===0&&ya!==null){Ml!==null&&(Ml.status=\"fulfilled\");var e=ya;ya=null,_l=0,Ml=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function jm(e,t){var n=[],l={status:\"pending\",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){l.status=\"fulfilled\",l.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(l.status=\"rejected\",l.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),l}var Cr=M.S;M.S=function(e,t){sd=ut(),typeof t==\"object\"&&t!==null&&typeof t.then==\"function\"&&Nm(e,t),Cr!==null&&Cr(e,t)};var Jn=b(null);function ic(){var e=Jn.current;return e!==null?e:Oe.pooledCache}function Eu(e,t){t===null?Q(Jn,Jn.current):Q(Jn,t.pool)}function Nr(){var e=ic();return e===null?null:{parent:Ke._currentValue,pool:e}}var wl=Error(c(460)),cc=Error(c(474)),Tu=Error(c(542)),Au={then:function(){}};function jr(e){return e=e.status,e===\"fulfilled\"||e===\"rejected\"}function xr(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Jt,Jt),t=n),t.status){case\"fulfilled\":return t.value;case\"rejected\":throw e=t.reason,Mr(e),e;default:if(typeof t.status==\"string\")t.then(Jt,Jt);else{if(e=Oe,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status=\"pending\",e.then(function(l){if(t.status===\"pending\"){var a=t;a.status=\"fulfilled\",a.value=l}},function(l){if(t.status===\"pending\"){var a=t;a.status=\"rejected\",a.reason=l}})}switch(t.status){case\"fulfilled\":return t.value;case\"rejected\":throw e=t.reason,Mr(e),e}throw $n=t,wl}}function kn(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n==\"object\"&&typeof n.then==\"function\"?($n=n,wl):n}}var $n=null;function _r(){if($n===null)throw Error(c(459));var e=$n;return $n=null,e}function Mr(e){if(e===wl||e===Tu)throw Error(c(483))}var Rl=null,va=0;function zu(e){var t=va;return va+=1,Rl===null&&(Rl=[]),xr(Rl,e,t)}function ba(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Cu(e,t){throw t.$$typeof===x?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e===\"[object Object]\"?\"object with keys {\"+Object.keys(t).join(\", \")+\"}\":e)))}function wr(e){function t(T,S){if(e){var z=T.deletions;z===null?(T.deletions=[S],T.flags|=16):z.push(S)}}function n(T,S){if(!e)return null;for(;S!==null;)t(T,S),S=S.sibling;return null}function l(T){for(var S=new Map;T!==null;)T.key!==null?S.set(T.key,T):S.set(T.index,T),T=T.sibling;return S}function a(T,S){return T=$t(T,S),T.index=0,T.sibling=null,T}function u(T,S,z){return T.index=z,e?(z=T.alternate,z!==null?(z=z.index,z<S?(T.flags|=67108866,S):z):(T.flags|=67108866,S)):(T.flags|=1048576,S)}function s(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function o(T,S,z,U){return S===null||S.tag!==6?(S=$i(z,T.mode,U),S.return=T,S):(S=a(S,z),S.return=T,S)}function g(T,S,z,U){var le=z.type;return le===D?w(T,S,z.props.children,U,z.key):S!==null&&(S.elementType===le||typeof le==\"object\"&&le!==null&&le.$$typeof===K&&kn(le)===S.type)?(S=a(S,z.props),ba(S,z),S.return=T,S):(S=vu(z.type,z.key,z.props,null,T.mode,U),ba(S,z),S.return=T,S)}function C(T,S,z,U){return S===null||S.tag!==4||S.stateNode.containerInfo!==z.containerInfo||S.stateNode.implementation!==z.implementation?(S=Fi(z,T.mode,U),S.return=T,S):(S=a(S,z.children||[]),S.return=T,S)}function w(T,S,z,U,le){return S===null||S.tag!==7?(S=Xn(z,T.mode,U,le),S.return=T,S):(S=a(S,z),S.return=T,S)}function O(T,S,z){if(typeof S==\"string\"&&S!==\"\"||typeof S==\"number\"||typeof S==\"bigint\")return S=$i(\"\"+S,T.mode,z),S.return=T,S;if(typeof S==\"object\"&&S!==null){switch(S.$$typeof){case H:return z=vu(S.type,S.key,S.props,null,T.mode,z),ba(z,S),z.return=T,z;case X:return S=Fi(S,T.mode,z),S.return=T,S;case K:return S=kn(S),O(T,S,z)}if(Ye(S)||F(S))return S=Xn(S,T.mode,z,null),S.return=T,S;if(typeof S.then==\"function\")return O(T,zu(S),z);if(S.$$typeof===I)return O(T,pu(T,S),z);Cu(T,S)}return null}function N(T,S,z,U){var le=S!==null?S.key:null;if(typeof z==\"string\"&&z!==\"\"||typeof z==\"number\"||typeof z==\"bigint\")return le!==null?null:o(T,S,\"\"+z,U);if(typeof z==\"object\"&&z!==null){switch(z.$$typeof){case H:return z.key===le?g(T,S,z,U):null;case X:return z.key===le?C(T,S,z,U):null;case K:return z=kn(z),N(T,S,z,U)}if(Ye(z)||F(z))return le!==null?null:w(T,S,z,U,null);if(typeof z.then==\"function\")return N(T,S,zu(z),U);if(z.$$typeof===I)return N(T,S,pu(T,z),U);Cu(T,z)}return null}function _(T,S,z,U,le){if(typeof U==\"string\"&&U!==\"\"||typeof U==\"number\"||typeof U==\"bigint\")return T=T.get(z)||null,o(S,T,\"\"+U,le);if(typeof U==\"object\"&&U!==null){switch(U.$$typeof){case H:return T=T.get(U.key===null?z:U.key)||null,g(S,T,U,le);case X:return T=T.get(U.key===null?z:U.key)||null,C(S,T,U,le);case K:return U=kn(U),_(T,S,z,U,le)}if(Ye(U)||F(U))return T=T.get(z)||null,w(S,T,U,le,null);if(typeof U.then==\"function\")return _(T,S,z,zu(U),le);if(U.$$typeof===I)return _(T,S,z,pu(S,U),le);Cu(S,U)}return null}function P(T,S,z,U){for(var le=null,ze=null,te=S,ge=S=0,pe=null;te!==null&&ge<z.length;ge++){te.index>ge?(pe=te,te=null):pe=te.sibling;var Ce=N(T,te,z[ge],U);if(Ce===null){te===null&&(te=pe);break}e&&te&&Ce.alternate===null&&t(T,te),S=u(Ce,S,ge),ze===null?le=Ce:ze.sibling=Ce,ze=Ce,te=pe}if(ge===z.length)return n(T,te),Ee&&Ft(T,ge),le;if(te===null){for(;ge<z.length;ge++)te=O(T,z[ge],U),te!==null&&(S=u(te,S,ge),ze===null?le=te:ze.sibling=te,ze=te);return Ee&&Ft(T,ge),le}for(te=l(te);ge<z.length;ge++)pe=_(te,T,ge,z[ge],U),pe!==null&&(e&&pe.alternate!==null&&te.delete(pe.key===null?ge:pe.key),S=u(pe,S,ge),ze===null?le=pe:ze.sibling=pe,ze=pe);return e&&te.forEach(function(Dn){return t(T,Dn)}),Ee&&Ft(T,ge),le}function ie(T,S,z,U){if(z==null)throw Error(c(151));for(var le=null,ze=null,te=S,ge=S=0,pe=null,Ce=z.next();te!==null&&!Ce.done;ge++,Ce=z.next()){te.index>ge?(pe=te,te=null):pe=te.sibling;var Dn=N(T,te,Ce.value,U);if(Dn===null){te===null&&(te=pe);break}e&&te&&Dn.alternate===null&&t(T,te),S=u(Dn,S,ge),ze===null?le=Dn:ze.sibling=Dn,ze=Dn,te=pe}if(Ce.done)return n(T,te),Ee&&Ft(T,ge),le;if(te===null){for(;!Ce.done;ge++,Ce=z.next())Ce=O(T,Ce.value,U),Ce!==null&&(S=u(Ce,S,ge),ze===null?le=Ce:ze.sibling=Ce,ze=Ce);return Ee&&Ft(T,ge),le}for(te=l(te);!Ce.done;ge++,Ce=z.next())Ce=_(te,T,ge,Ce.value,U),Ce!==null&&(e&&Ce.alternate!==null&&te.delete(Ce.key===null?ge:Ce.key),S=u(Ce,S,ge),ze===null?le=Ce:ze.sibling=Ce,ze=Ce);return e&&te.forEach(function(qg){return t(T,qg)}),Ee&&Ft(T,ge),le}function Ue(T,S,z,U){if(typeof z==\"object\"&&z!==null&&z.type===D&&z.key===null&&(z=z.props.children),typeof z==\"object\"&&z!==null){switch(z.$$typeof){case H:e:{for(var le=z.key;S!==null;){if(S.key===le){if(le=z.type,le===D){if(S.tag===7){n(T,S.sibling),U=a(S,z.props.children),U.return=T,T=U;break e}}else if(S.elementType===le||typeof le==\"object\"&&le!==null&&le.$$typeof===K&&kn(le)===S.type){n(T,S.sibling),U=a(S,z.props),ba(U,z),U.return=T,T=U;break e}n(T,S);break}else t(T,S);S=S.sibling}z.type===D?(U=Xn(z.props.children,T.mode,U,z.key),U.return=T,T=U):(U=vu(z.type,z.key,z.props,null,T.mode,U),ba(U,z),U.return=T,T=U)}return s(T);case X:e:{for(le=z.key;S!==null;){if(S.key===le)if(S.tag===4&&S.stateNode.containerInfo===z.containerInfo&&S.stateNode.implementation===z.implementation){n(T,S.sibling),U=a(S,z.children||[]),U.return=T,T=U;break e}else{n(T,S);break}else t(T,S);S=S.sibling}U=Fi(z,T.mode,U),U.return=T,T=U}return s(T);case K:return z=kn(z),Ue(T,S,z,U)}if(Ye(z))return P(T,S,z,U);if(F(z)){if(le=F(z),typeof le!=\"function\")throw Error(c(150));return z=le.call(z),ie(T,S,z,U)}if(typeof z.then==\"function\")return Ue(T,S,zu(z),U);if(z.$$typeof===I)return Ue(T,S,pu(T,z),U);Cu(T,z)}return typeof z==\"string\"&&z!==\"\"||typeof z==\"number\"||typeof z==\"bigint\"?(z=\"\"+z,S!==null&&S.tag===6?(n(T,S.sibling),U=a(S,z),U.return=T,T=U):(n(T,S),U=$i(z,T.mode,U),U.return=T,T=U),s(T)):n(T,S)}return function(T,S,z,U){try{va=0;var le=Ue(T,S,z,U);return Rl=null,le}catch(te){if(te===wl||te===Tu)throw te;var ze=vt(29,te,null,T.mode);return ze.lanes=U,ze.return=T,ze}finally{}}}var Fn=wr(!0),Rr=wr(!1),bn=!1;function fc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function sc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Sn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function pn(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(je&2)!==0){var a=l.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),l.pending=t,t=yu(e),gr(e,null,n),t}return gu(e,l,t,n),yu(e)}function Sa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,As(e,n)}}function rc(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var a=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};u===null?a=u=s:u=u.next=s,n=n.next}while(n!==null);u===null?a=u=t:u=u.next=t}else a=u=t;n={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:u,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var oc=!1;function pa(){if(oc){var e=Ml;if(e!==null)throw e}}function Ea(e,t,n,l){oc=!1;var a=e.updateQueue;bn=!1;var u=a.firstBaseUpdate,s=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var g=o,C=g.next;g.next=null,s===null?u=C:s.next=C,s=g;var w=e.alternate;w!==null&&(w=w.updateQueue,o=w.lastBaseUpdate,o!==s&&(o===null?w.firstBaseUpdate=C:o.next=C,w.lastBaseUpdate=g))}if(u!==null){var O=a.baseState;s=0,w=C=g=null,o=u;do{var N=o.lane&-536870913,_=N!==o.lane;if(_?(Se&N)===N:(l&N)===N){N!==0&&N===_l&&(oc=!0),w!==null&&(w=w.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var P=e,ie=o;N=t;var Ue=n;switch(ie.tag){case 1:if(P=ie.payload,typeof P==\"function\"){O=P.call(Ue,O,N);break e}O=P;break e;case 3:P.flags=P.flags&-65537|128;case 0:if(P=ie.payload,N=typeof P==\"function\"?P.call(Ue,O,N):P,N==null)break e;O=E({},O,N);break e;case 2:bn=!0}}N=o.callback,N!==null&&(e.flags|=64,_&&(e.flags|=8192),_=a.callbacks,_===null?a.callbacks=[N]:_.push(N))}else _={lane:N,tag:o.tag,payload:o.payload,callback:o.callback,next:null},w===null?(C=w=_,g=O):w=w.next=_,s|=N;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;_=o,o=_.next,_.next=null,a.lastBaseUpdate=_,a.shared.pending=null}}while(!0);w===null&&(g=O),a.baseState=g,a.firstBaseUpdate=C,a.lastBaseUpdate=w,u===null&&(a.shared.lanes=0),Cn|=s,e.lanes=s,e.memoizedState=O}}function Ur(e,t){if(typeof e!=\"function\")throw Error(c(191,e));e.call(t)}function Or(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ur(n[e],t)}var Ul=b(null),Nu=b(0);function Dr(e,t){e=fn,Q(Nu,e),Q(Ul,t),fn=e|t.baseLanes}function dc(){Q(Nu,fn),Q(Ul,Ul.current)}function hc(){fn=Nu.current,R(Ul),R(Nu)}var bt=b(null),Rt=null;function En(e){var t=e.alternate;Q(Qe,Qe.current&1),Q(bt,e),Rt===null&&(t===null||Ul.current!==null||t.memoizedState!==null)&&(Rt=e)}function mc(e){Q(Qe,Qe.current),Q(bt,e),Rt===null&&(Rt=e)}function Br(e){e.tag===22?(Q(Qe,Qe.current),Q(bt,e),Rt===null&&(Rt=e)):Tn()}function Tn(){Q(Qe,Qe.current),Q(bt,bt.current)}function St(e){R(bt),Rt===e&&(Rt=null),R(Qe)}var Qe=b(0);function ju(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Ef(n)||Tf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===\"forwards\"||t.memoizedProps.revealOrder===\"backwards\"||t.memoizedProps.revealOrder===\"unstable_legacy-backwards\"||t.memoizedProps.revealOrder===\"together\")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Pt=0,me=null,we=null,Ze=null,xu=!1,Ol=!1,Wn=!1,_u=0,Ta=0,Dl=null,xm=0;function Le(){throw Error(c(321))}function gc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yt(e[n],t[n]))return!1;return!0}function yc(e,t,n,l,a,u){return Pt=u,me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?po:wc,Wn=!1,u=n(l,a),Wn=!1,Ol&&(u=qr(t,n,l,a)),Hr(e),u}function Hr(e){M.H=Ca;var t=we!==null&&we.next!==null;if(Pt=0,Ze=we=me=null,xu=!1,Ta=0,Dl=null,t)throw Error(c(300));e===null||Ve||(e=e.dependencies,e!==null&&Su(e)&&(Ve=!0))}function qr(e,t,n,l){me=e;var a=0;do{if(Ol&&(Dl=null),Ta=0,Ol=!1,25<=a)throw Error(c(301));if(a+=1,Ze=we=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}M.H=Eo,u=t(n,l)}while(Ol);return u}function _m(){var e=M.H,t=e.useState()[0];return t=typeof t.then==\"function\"?Aa(t):t,e=e.useState()[0],(we!==null?we.memoizedState:null)!==e&&(me.flags|=1024),t}function vc(){var e=_u!==0;return _u=0,e}function bc(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Sc(e){if(xu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}xu=!1}Pt=0,Ze=we=me=null,Ol=!1,Ta=_u=0,Dl=null}function it(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ze===null?me.memoizedState=Ze=e:Ze=Ze.next=e,Ze}function Xe(){if(we===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=we.next;var t=Ze===null?me.memoizedState:Ze.next;if(t!==null)Ze=t,we=e;else{if(e===null)throw me.alternate===null?Error(c(467)):Error(c(310));we=e,e={memoizedState:we.memoizedState,baseState:we.baseState,baseQueue:we.baseQueue,queue:we.queue,next:null},Ze===null?me.memoizedState=Ze=e:Ze=Ze.next=e}return Ze}function Mu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Aa(e){var t=Ta;return Ta+=1,Dl===null&&(Dl=[]),e=xr(Dl,e,t),t=me,(Ze===null?t.memoizedState:Ze.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?po:wc),e}function wu(e){if(e!==null&&typeof e==\"object\"){if(typeof e.then==\"function\")return Aa(e);if(e.$$typeof===I)return Pe(e)}throw Error(c(438,String(e)))}function pc(e){var t=null,n=me.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=me.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Mu(),me.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=ne;return t.index++,n}function en(e,t){return typeof t==\"function\"?t(e):t}function Ru(e){var t=Xe();return Ec(t,we,e)}function Ec(e,t,n){var l=e.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=n;var a=e.baseQueue,u=l.pending;if(u!==null){if(a!==null){var s=a.next;a.next=u.next,u.next=s}t.baseQueue=a=u,l.pending=null}if(u=e.baseState,a===null)e.memoizedState=u;else{t=a.next;var o=s=null,g=null,C=t,w=!1;do{var O=C.lane&-536870913;if(O!==C.lane?(Se&O)===O:(Pt&O)===O){var N=C.revertLane;if(N===0)g!==null&&(g=g.next={lane:0,revertLane:0,gesture:null,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null}),O===_l&&(w=!0);else if((Pt&N)===N){C=C.next,N===_l&&(w=!0);continue}else O={lane:0,revertLane:C.revertLane,gesture:null,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null},g===null?(o=g=O,s=u):g=g.next=O,me.lanes|=N,Cn|=N;O=C.action,Wn&&n(u,O),u=C.hasEagerState?C.eagerState:n(u,O)}else N={lane:O,revertLane:C.revertLane,gesture:C.gesture,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null},g===null?(o=g=N,s=u):g=g.next=N,me.lanes|=O,Cn|=O;C=C.next}while(C!==null&&C!==t);if(g===null?s=u:g.next=o,!yt(u,e.memoizedState)&&(Ve=!0,w&&(n=Ml,n!==null)))throw n;e.memoizedState=u,e.baseState=s,e.baseQueue=g,l.lastRenderedState=u}return a===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Tc(e){var t=Xe(),n=t.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=e;var l=n.dispatch,a=n.pending,u=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do u=e(u,s.action),s=s.next;while(s!==a);yt(u,t.memoizedState)||(Ve=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,l]}function Yr(e,t,n){var l=me,a=Xe(),u=Ee;if(u){if(n===void 0)throw Error(c(407));n=n()}else n=t();var s=!yt((we||a).memoizedState,n);if(s&&(a.memoizedState=n,Ve=!0),a=a.queue,Cc(Qr.bind(null,l,a,e),[e]),a.getSnapshot!==t||s||Ze!==null&&Ze.memoizedState.tag&1){if(l.flags|=2048,Bl(9,{destroy:void 0},Gr.bind(null,l,a,n,t),null),Oe===null)throw Error(c(349));u||(Pt&127)!==0||Lr(l,t,n)}return n}function Lr(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=me.updateQueue,t===null?(t=Mu(),me.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Gr(e,t,n,l){t.value=n,t.getSnapshot=l,Xr(t)&&Kr(e)}function Qr(e,t,n){return n(function(){Xr(t)&&Kr(e)})}function Xr(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yt(e,n)}catch{return!0}}function Kr(e){var t=Qn(e,2);t!==null&&ht(t,e,2)}function Ac(e){var t=it();if(typeof e==\"function\"){var n=e;if(e=n(),Wn){on(!0);try{n()}finally{on(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:en,lastRenderedState:e},t}function Zr(e,t,n,l){return e.baseState=n,Ec(e,we,typeof l==\"function\"?l:en)}function Mm(e,t,n,l,a){if(Du(e))throw Error(c(485));if(e=t.action,e!==null){var u={payload:a,action:e,next:null,isTransition:!0,status:\"pending\",value:null,reason:null,listeners:[],then:function(s){u.listeners.push(s)}};M.T!==null?n(!0):u.isTransition=!1,l(u),n=t.pending,n===null?(u.next=t.pending=u,Vr(t,u)):(u.next=n.next,t.pending=n.next=u)}}function Vr(e,t){var n=t.action,l=t.payload,a=e.state;if(t.isTransition){var u=M.T,s={};M.T=s;try{var o=n(a,l),g=M.S;g!==null&&g(s,o),Jr(e,t,o)}catch(C){zc(e,t,C)}finally{u!==null&&s.types!==null&&(u.types=s.types),M.T=u}}else try{u=n(a,l),Jr(e,t,u)}catch(C){zc(e,t,C)}}function Jr(e,t,n){n!==null&&typeof n==\"object\"&&typeof n.then==\"function\"?n.then(function(l){kr(e,t,l)},function(l){return zc(e,t,l)}):kr(e,t,n)}function kr(e,t,n){t.status=\"fulfilled\",t.value=n,$r(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Vr(e,n)))}function zc(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status=\"rejected\",t.reason=n,$r(t),t=t.next;while(t!==l)}e.action=null}function $r(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Fr(e,t){return t}function Wr(e,t){if(Ee){var n=Oe.formState;if(n!==null){e:{var l=me;if(Ee){if(Be){t:{for(var a=Be,u=wt;a.nodeType!==8;){if(!u){a=null;break t}if(a=Ut(a.nextSibling),a===null){a=null;break t}}u=a.data,a=u===\"F!\"||u===\"F\"?a:null}if(a){Be=Ut(a.nextSibling),l=a.data===\"F!\";break e}}yn(l)}l=!1}l&&(t=n[0])}}return n=it(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fr,lastRenderedState:t},n.queue=l,n=vo.bind(null,me,l),l.dispatch=n,l=Ac(!1),u=Mc.bind(null,me,!1,l.queue),l=it(),a={state:t,dispatch:null,action:e,pending:null},l.queue=a,n=Mm.bind(null,me,a,u,n),a.dispatch=n,l.memoizedState=e,[t,n,!1]}function Ir(e){var t=Xe();return Pr(t,we,e)}function Pr(e,t,n){if(t=Ec(e,t,Fr)[0],e=Ru(en)[0],typeof t==\"object\"&&t!==null&&typeof t.then==\"function\")try{var l=Aa(t)}catch(s){throw s===wl?Tu:s}else l=t;t=Xe();var a=t.queue,u=a.dispatch;return n!==t.memoizedState&&(me.flags|=2048,Bl(9,{destroy:void 0},wm.bind(null,a,n),null)),[l,u,e]}function wm(e,t){e.action=t}function eo(e){var t=Xe(),n=we;if(n!==null)return Pr(t,n,e);Xe(),t=t.memoizedState,n=Xe();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function Bl(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=me.updateQueue,t===null&&(t=Mu(),me.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function to(){return Xe().memoizedState}function Uu(e,t,n,l){var a=it();me.flags|=e,a.memoizedState=Bl(1|t,{destroy:void 0},n,l===void 0?null:l)}function Ou(e,t,n,l){var a=Xe();l=l===void 0?null:l;var u=a.memoizedState.inst;we!==null&&l!==null&&gc(l,we.memoizedState.deps)?a.memoizedState=Bl(t,u,n,l):(me.flags|=e,a.memoizedState=Bl(1|t,u,n,l))}function no(e,t){Uu(8390656,8,e,t)}function Cc(e,t){Ou(2048,8,e,t)}function Rm(e){me.flags|=4;var t=me.updateQueue;if(t===null)t=Mu(),me.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function lo(e){var t=Xe().memoizedState;return Rm({ref:t,nextImpl:e}),function(){if((je&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function ao(e,t){return Ou(4,2,e,t)}function uo(e,t){return Ou(4,4,e,t)}function io(e,t){if(typeof t==\"function\"){e=e();var n=t(e);return function(){typeof n==\"function\"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function co(e,t,n){n=n!=null?n.concat([e]):null,Ou(4,4,io.bind(null,t,e),n)}function Nc(){}function fo(e,t){var n=Xe();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&gc(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function so(e,t){var n=Xe();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&gc(t,l[1]))return l[0];if(l=e(),Wn){on(!0);try{e()}finally{on(!1)}}return n.memoizedState=[l,t],l}function jc(e,t,n){return n===void 0||(Pt&1073741824)!==0&&(Se&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=od(),me.lanes|=e,Cn|=e,n)}function ro(e,t,n,l){return yt(n,t)?n:Ul.current!==null?(e=jc(e,n,l),yt(e,t)||(Ve=!0),e):(Pt&42)===0||(Pt&1073741824)!==0&&(Se&261930)===0?(Ve=!0,e.memoizedState=n):(e=od(),me.lanes|=e,Cn|=e,t)}function oo(e,t,n,l,a){var u=G.p;G.p=u!==0&&8>u?u:8;var s=M.T,o={};M.T=o,Mc(e,!1,t,n);try{var g=a(),C=M.S;if(C!==null&&C(o,g),g!==null&&typeof g==\"object\"&&typeof g.then==\"function\"){var w=jm(g,l);za(e,t,w,Tt(e))}else za(e,t,l,Tt(e))}catch(O){za(e,t,{then:function(){},status:\"rejected\",reason:O},Tt())}finally{G.p=u,s!==null&&o.types!==null&&(s.types=o.types),M.T=s}}function Um(){}function xc(e,t,n,l){if(e.tag!==5)throw Error(c(476));var a=ho(e).queue;oo(e,a,t,ae,n===null?Um:function(){return mo(e),n(l)})}function ho(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:en,lastRenderedState:ae},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:en,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function mo(e){var t=ho(e);t.next===null&&(t=e.alternate.memoizedState),za(e,t.next.queue,{},Tt())}function _c(){return Pe(Ga)}function go(){return Xe().memoizedState}function yo(){return Xe().memoizedState}function Om(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Tt();e=Sn(n);var l=pn(t,e,n);l!==null&&(ht(l,t,n),Sa(l,t,n)),t={cache:ac()},e.payload=t;return}t=t.return}}function Dm(e,t,n){var l=Tt();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Du(e)?bo(t,n):(n=Ji(e,t,n,l),n!==null&&(ht(n,e,l),So(n,t,l)))}function vo(e,t,n){var l=Tt();za(e,t,n,l)}function za(e,t,n,l){var a={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Du(e))bo(t,a);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var s=t.lastRenderedState,o=u(s,n);if(a.hasEagerState=!0,a.eagerState=o,yt(o,s))return gu(e,t,a,0),Oe===null&&mu(),!1}catch{}finally{}if(n=Ji(e,t,a,l),n!==null)return ht(n,e,l),So(n,t,l),!0}return!1}function Mc(e,t,n,l){if(l={lane:2,revertLane:sf(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Du(e)){if(t)throw Error(c(479))}else t=Ji(e,n,l,2),t!==null&&ht(t,e,2)}function Du(e){var t=e.alternate;return e===me||t!==null&&t===me}function bo(e,t){Ol=xu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function So(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,As(e,n)}}var Ca={readContext:Pe,use:wu,useCallback:Le,useContext:Le,useEffect:Le,useImperativeHandle:Le,useLayoutEffect:Le,useInsertionEffect:Le,useMemo:Le,useReducer:Le,useRef:Le,useState:Le,useDebugValue:Le,useDeferredValue:Le,useTransition:Le,useSyncExternalStore:Le,useId:Le,useHostTransitionStatus:Le,useFormState:Le,useActionState:Le,useOptimistic:Le,useMemoCache:Le,useCacheRefresh:Le};Ca.useEffectEvent=Le;var po={readContext:Pe,use:wu,useCallback:function(e,t){return it().memoizedState=[e,t===void 0?null:t],e},useContext:Pe,useEffect:no,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Uu(4194308,4,io.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Uu(4194308,4,e,t)},useInsertionEffect:function(e,t){Uu(4,2,e,t)},useMemo:function(e,t){var n=it();t=t===void 0?null:t;var l=e();if(Wn){on(!0);try{e()}finally{on(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=it();if(n!==void 0){var a=n(t);if(Wn){on(!0);try{n(t)}finally{on(!1)}}}else a=t;return l.memoizedState=l.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},l.queue=e,e=e.dispatch=Dm.bind(null,me,e),[l.memoizedState,e]},useRef:function(e){var t=it();return e={current:e},t.memoizedState=e},useState:function(e){e=Ac(e);var t=e.queue,n=vo.bind(null,me,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Nc,useDeferredValue:function(e,t){var n=it();return jc(n,e,t)},useTransition:function(){var e=Ac(!1);return e=oo.bind(null,me,e.queue,!0,!1),it().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=me,a=it();if(Ee){if(n===void 0)throw Error(c(407));n=n()}else{if(n=t(),Oe===null)throw Error(c(349));(Se&127)!==0||Lr(l,t,n)}a.memoizedState=n;var u={value:n,getSnapshot:t};return a.queue=u,no(Qr.bind(null,l,u,e),[e]),l.flags|=2048,Bl(9,{destroy:void 0},Gr.bind(null,l,u,n,t),null),n},useId:function(){var e=it(),t=Oe.identifierPrefix;if(Ee){var n=Lt,l=Yt;n=(l&~(1<<32-gt(l)-1)).toString(32)+n,t=\"_\"+t+\"R_\"+n,n=_u++,0<n&&(t+=\"H\"+n.toString(32)),t+=\"_\"}else n=xm++,t=\"_\"+t+\"r_\"+n.toString(32)+\"_\";return e.memoizedState=t},useHostTransitionStatus:_c,useFormState:Wr,useActionState:Wr,useOptimistic:function(e){var t=it();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Mc.bind(null,me,!0,n),n.dispatch=t,[e,t]},useMemoCache:pc,useCacheRefresh:function(){return it().memoizedState=Om.bind(null,me)},useEffectEvent:function(e){var t=it(),n={impl:e};return t.memoizedState=n,function(){if((je&2)!==0)throw Error(c(440));return n.impl.apply(void 0,arguments)}}},wc={readContext:Pe,use:wu,useCallback:fo,useContext:Pe,useEffect:Cc,useImperativeHandle:co,useInsertionEffect:ao,useLayoutEffect:uo,useMemo:so,useReducer:Ru,useRef:to,useState:function(){return Ru(en)},useDebugValue:Nc,useDeferredValue:function(e,t){var n=Xe();return ro(n,we.memoizedState,e,t)},useTransition:function(){var e=Ru(en)[0],t=Xe().memoizedState;return[typeof e==\"boolean\"?e:Aa(e),t]},useSyncExternalStore:Yr,useId:go,useHostTransitionStatus:_c,useFormState:Ir,useActionState:Ir,useOptimistic:function(e,t){var n=Xe();return Zr(n,we,e,t)},useMemoCache:pc,useCacheRefresh:yo};wc.useEffectEvent=lo;var Eo={readContext:Pe,use:wu,useCallback:fo,useContext:Pe,useEffect:Cc,useImperativeHandle:co,useInsertionEffect:ao,useLayoutEffect:uo,useMemo:so,useReducer:Tc,useRef:to,useState:function(){return Tc(en)},useDebugValue:Nc,useDeferredValue:function(e,t){var n=Xe();return we===null?jc(n,e,t):ro(n,we.memoizedState,e,t)},useTransition:function(){var e=Tc(en)[0],t=Xe().memoizedState;return[typeof e==\"boolean\"?e:Aa(e),t]},useSyncExternalStore:Yr,useId:go,useHostTransitionStatus:_c,useFormState:eo,useActionState:eo,useOptimistic:function(e,t){var n=Xe();return we!==null?Zr(n,we,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:pc,useCacheRefresh:yo};Eo.useEffectEvent=lo;function Rc(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:E({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Uc={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=Tt(),a=Sn(l);a.payload=t,n!=null&&(a.callback=n),t=pn(e,a,l),t!==null&&(ht(t,e,l),Sa(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=Tt(),a=Sn(l);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=pn(e,a,l),t!==null&&(ht(t,e,l),Sa(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Tt(),l=Sn(n);l.tag=2,t!=null&&(l.callback=t),t=pn(e,l,n),t!==null&&(ht(t,e,n),Sa(t,e,n))}};function To(e,t,n,l,a,u,s){return e=e.stateNode,typeof e.shouldComponentUpdate==\"function\"?e.shouldComponentUpdate(l,u,s):t.prototype&&t.prototype.isPureReactComponent?!oa(n,l)||!oa(a,u):!0}function Ao(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps==\"function\"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps==\"function\"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&Uc.enqueueReplaceState(t,t.state,null)}function In(e,t){var n=t;if(\"ref\"in t){n={};for(var l in t)l!==\"ref\"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=E({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function zo(e){hu(e)}function Co(e){console.error(e)}function No(e){hu(e)}function Bu(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function jo(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Oc(e,t,n){return n=Sn(n),n.tag=3,n.payload={element:null},n.callback=function(){Bu(e,t)},n}function xo(e){return e=Sn(e),e.tag=3,e}function _o(e,t,n,l){var a=n.type.getDerivedStateFromError;if(typeof a==\"function\"){var u=l.value;e.payload=function(){return a(u)},e.callback=function(){jo(t,n,l)}}var s=n.stateNode;s!==null&&typeof s.componentDidCatch==\"function\"&&(e.callback=function(){jo(t,n,l),typeof a!=\"function\"&&(Nn===null?Nn=new Set([this]):Nn.add(this));var o=l.stack;this.componentDidCatch(l.value,{componentStack:o!==null?o:\"\"})})}function Bm(e,t,n,l,a){if(n.flags|=32768,l!==null&&typeof l==\"object\"&&typeof l.then==\"function\"){if(t=n.alternate,t!==null&&xl(t,n,a,!0),n=bt.current,n!==null){switch(n.tag){case 31:case 13:return Rt===null?ku():n.alternate===null&&Ge===0&&(Ge=3),n.flags&=-257,n.flags|=65536,n.lanes=a,l===Au?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),uf(e,l,a)),!1;case 22:return n.flags|=65536,l===Au?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),uf(e,l,a)),!1}throw Error(c(435,n.tag))}return uf(e,l,a),ku(),!1}if(Ee)return t=bt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,l!==Pi&&(e=Error(c(422),{cause:l}),ma(xt(e,n)))):(l!==Pi&&(t=Error(c(423),{cause:l}),ma(xt(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,l=xt(l,n),a=Oc(e.stateNode,l,a),rc(e,a),Ge!==4&&(Ge=2)),!1;var u=Error(c(520),{cause:l});if(u=xt(u,n),Ua===null?Ua=[u]:Ua.push(u),Ge!==4&&(Ge=2),t===null)return!0;l=xt(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Oc(n.stateNode,l,e),rc(n,e),!1;case 1:if(t=n.type,u=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError==\"function\"||u!==null&&typeof u.componentDidCatch==\"function\"&&(Nn===null||!Nn.has(u))))return n.flags|=65536,a&=-a,n.lanes|=a,a=xo(a),_o(a,e,n,l),rc(n,a),!1}n=n.return}while(n!==null);return!1}var Dc=Error(c(461)),Ve=!1;function et(e,t,n,l){t.child=e===null?Rr(t,null,n,l):Fn(t,e.child,n,l)}function Mo(e,t,n,l,a){n=n.render;var u=t.ref;if(\"ref\"in l){var s={};for(var o in l)o!==\"ref\"&&(s[o]=l[o])}else s=l;return Vn(t),l=yc(e,t,n,s,u,a),o=vc(),e!==null&&!Ve?(bc(e,t,a),tn(e,t,a)):(Ee&&o&&Wi(t),t.flags|=1,et(e,t,l,a),t.child)}function wo(e,t,n,l,a){if(e===null){var u=n.type;return typeof u==\"function\"&&!ki(u)&&u.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=u,Ro(e,t,u,l,a)):(e=vu(n.type,null,l,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Xc(e,a)){var s=u.memoizedProps;if(n=n.compare,n=n!==null?n:oa,n(s,l)&&e.ref===t.ref)return tn(e,t,a)}return t.flags|=1,e=$t(u,l),e.ref=t.ref,e.return=t,t.child=e}function Ro(e,t,n,l,a){if(e!==null){var u=e.memoizedProps;if(oa(u,l)&&e.ref===t.ref)if(Ve=!1,t.pendingProps=l=u,Xc(e,a))(e.flags&131072)!==0&&(Ve=!0);else return t.lanes=e.lanes,tn(e,t,a)}return Bc(e,t,n,l,a)}function Uo(e,t,n,l){var a=l.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode===\"hidden\"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|n:n,e!==null){for(l=t.child=e.child,a=0;l!==null;)a=a|l.lanes|l.childLanes,l=l.sibling;l=a&~u}else l=0,t.child=null;return Oo(e,t,u,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Eu(t,u!==null?u.cachePool:null),u!==null?Dr(t,u):dc(),Br(t);else return l=t.lanes=536870912,Oo(e,t,u!==null?u.baseLanes|n:n,n,l)}else u!==null?(Eu(t,u.cachePool),Dr(t,u),Tn(),t.memoizedState=null):(e!==null&&Eu(t,null),dc(),Tn());return et(e,t,a,n),t.child}function Na(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Oo(e,t,n,l,a){var u=ic();return u=u===null?null:{parent:Ke._currentValue,pool:u},t.memoizedState={baseLanes:n,cachePool:u},e!==null&&Eu(t,null),dc(),Br(t),e!==null&&xl(e,t,l,!0),t.childLanes=a,null}function Hu(e,t){return t=Yu({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Do(e,t,n){return Fn(t,e.child,null,n),e=Hu(t,t.pendingProps),e.flags|=2,St(t),t.memoizedState=null,e}function Hm(e,t,n){var l=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ee){if(l.mode===\"hidden\")return e=Hu(t,l),t.lanes=536870912,Na(null,e);if(mc(t),(e=Be)?(e=Jd(e,wt),e=e!==null&&e.data===\"&\"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:mn!==null?{id:Yt,overflow:Lt}:null,retryLane:536870912,hydrationErrors:null},n=vr(e),n.return=t,t.child=n,Ie=t,Be=null)):e=null,e===null)throw yn(t);return t.lanes=536870912,null}return Hu(t,l)}var u=e.memoizedState;if(u!==null){var s=u.dehydrated;if(mc(t),a)if(t.flags&256)t.flags&=-257,t=Do(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(Ve||xl(e,t,n,!1),a=(n&e.childLanes)!==0,Ve||a){if(l=Oe,l!==null&&(s=zs(l,n),s!==0&&s!==u.retryLane))throw u.retryLane=s,Qn(e,s),ht(l,e,s),Dc;ku(),t=Do(e,t,n)}else e=u.treeContext,Be=Ut(s.nextSibling),Ie=t,Ee=!0,gn=null,wt=!1,e!==null&&pr(t,e),t=Hu(t,l),t.flags|=4096;return t}return e=$t(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function qu(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=\"function\"&&typeof n!=\"object\")throw Error(c(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Bc(e,t,n,l,a){return Vn(t),n=yc(e,t,n,l,void 0,a),l=vc(),e!==null&&!Ve?(bc(e,t,a),tn(e,t,a)):(Ee&&l&&Wi(t),t.flags|=1,et(e,t,n,a),t.child)}function Bo(e,t,n,l,a,u){return Vn(t),t.updateQueue=null,n=qr(t,l,n,a),Hr(e),l=vc(),e!==null&&!Ve?(bc(e,t,u),tn(e,t,u)):(Ee&&l&&Wi(t),t.flags|=1,et(e,t,n,u),t.child)}function Ho(e,t,n,l,a){if(Vn(t),t.stateNode===null){var u=zl,s=n.contextType;typeof s==\"object\"&&s!==null&&(u=Pe(s)),u=new n(l,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Uc,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=l,u.state=t.memoizedState,u.refs={},fc(t),s=n.contextType,u.context=typeof s==\"object\"&&s!==null?Pe(s):zl,u.state=t.memoizedState,s=n.getDerivedStateFromProps,typeof s==\"function\"&&(Rc(t,n,s,l),u.state=t.memoizedState),typeof n.getDerivedStateFromProps==\"function\"||typeof u.getSnapshotBeforeUpdate==\"function\"||typeof u.UNSAFE_componentWillMount!=\"function\"&&typeof u.componentWillMount!=\"function\"||(s=u.state,typeof u.componentWillMount==\"function\"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount==\"function\"&&u.UNSAFE_componentWillMount(),s!==u.state&&Uc.enqueueReplaceState(u,u.state,null),Ea(t,l,u,a),pa(),u.state=t.memoizedState),typeof u.componentDidMount==\"function\"&&(t.flags|=4194308),l=!0}else if(e===null){u=t.stateNode;var o=t.memoizedProps,g=In(n,o);u.props=g;var C=u.context,w=n.contextType;s=zl,typeof w==\"object\"&&w!==null&&(s=Pe(w));var O=n.getDerivedStateFromProps;w=typeof O==\"function\"||typeof u.getSnapshotBeforeUpdate==\"function\",o=t.pendingProps!==o,w||typeof u.UNSAFE_componentWillReceiveProps!=\"function\"&&typeof u.componentWillReceiveProps!=\"function\"||(o||C!==s)&&Ao(t,u,l,s),bn=!1;var N=t.memoizedState;u.state=N,Ea(t,l,u,a),pa(),C=t.memoizedState,o||N!==C||bn?(typeof O==\"function\"&&(Rc(t,n,O,l),C=t.memoizedState),(g=bn||To(t,n,g,l,N,C,s))?(w||typeof u.UNSAFE_componentWillMount!=\"function\"&&typeof u.componentWillMount!=\"function\"||(typeof u.componentWillMount==\"function\"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount==\"function\"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount==\"function\"&&(t.flags|=4194308)):(typeof u.componentDidMount==\"function\"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=C),u.props=l,u.state=C,u.context=s,l=g):(typeof u.componentDidMount==\"function\"&&(t.flags|=4194308),l=!1)}else{u=t.stateNode,sc(e,t),s=t.memoizedProps,w=In(n,s),u.props=w,O=t.pendingProps,N=u.context,C=n.contextType,g=zl,typeof C==\"object\"&&C!==null&&(g=Pe(C)),o=n.getDerivedStateFromProps,(C=typeof o==\"function\"||typeof u.getSnapshotBeforeUpdate==\"function\")||typeof u.UNSAFE_componentWillReceiveProps!=\"function\"&&typeof u.componentWillReceiveProps!=\"function\"||(s!==O||N!==g)&&Ao(t,u,l,g),bn=!1,N=t.memoizedState,u.state=N,Ea(t,l,u,a),pa();var _=t.memoizedState;s!==O||N!==_||bn||e!==null&&e.dependencies!==null&&Su(e.dependencies)?(typeof o==\"function\"&&(Rc(t,n,o,l),_=t.memoizedState),(w=bn||To(t,n,w,l,N,_,g)||e!==null&&e.dependencies!==null&&Su(e.dependencies))?(C||typeof u.UNSAFE_componentWillUpdate!=\"function\"&&typeof u.componentWillUpdate!=\"function\"||(typeof u.componentWillUpdate==\"function\"&&u.componentWillUpdate(l,_,g),typeof u.UNSAFE_componentWillUpdate==\"function\"&&u.UNSAFE_componentWillUpdate(l,_,g)),typeof u.componentDidUpdate==\"function\"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate==\"function\"&&(t.flags|=1024)):(typeof u.componentDidUpdate!=\"function\"||s===e.memoizedProps&&N===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!=\"function\"||s===e.memoizedProps&&N===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=_),u.props=l,u.state=_,u.context=g,l=w):(typeof u.componentDidUpdate!=\"function\"||s===e.memoizedProps&&N===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!=\"function\"||s===e.memoizedProps&&N===e.memoizedState||(t.flags|=1024),l=!1)}return u=l,qu(e,t),l=(t.flags&128)!==0,u||l?(u=t.stateNode,n=l&&typeof n.getDerivedStateFromError!=\"function\"?null:u.render(),t.flags|=1,e!==null&&l?(t.child=Fn(t,e.child,null,a),t.child=Fn(t,null,n,a)):et(e,t,n,a),t.memoizedState=u.state,e=t.child):e=tn(e,t,a),e}function qo(e,t,n,l){return Kn(),t.flags|=256,et(e,t,n,l),t.child}var Hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function qc(e){return{baseLanes:e,cachePool:Nr()}}function Yc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Et),e}function Yo(e,t,n){var l=t.pendingProps,a=!1,u=(t.flags&128)!==0,s;if((s=u)||(s=e!==null&&e.memoizedState===null?!1:(Qe.current&2)!==0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ee){if(a?En(t):Tn(),(e=Be)?(e=Jd(e,wt),e=e!==null&&e.data!==\"&\"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:mn!==null?{id:Yt,overflow:Lt}:null,retryLane:536870912,hydrationErrors:null},n=vr(e),n.return=t,t.child=n,Ie=t,Be=null)):e=null,e===null)throw yn(t);return Tf(e)?t.lanes=32:t.lanes=536870912,null}var o=l.children;return l=l.fallback,a?(Tn(),a=t.mode,o=Yu({mode:\"hidden\",children:o},a),l=Xn(l,a,n,null),o.return=t,l.return=t,o.sibling=l,t.child=o,l=t.child,l.memoizedState=qc(n),l.childLanes=Yc(e,s,n),t.memoizedState=Hc,Na(null,l)):(En(t),Lc(t,o))}var g=e.memoizedState;if(g!==null&&(o=g.dehydrated,o!==null)){if(u)t.flags&256?(En(t),t.flags&=-257,t=Gc(e,t,n)):t.memoizedState!==null?(Tn(),t.child=e.child,t.flags|=128,t=null):(Tn(),o=l.fallback,a=t.mode,l=Yu({mode:\"visible\",children:l.children},a),o=Xn(o,a,n,null),o.flags|=2,l.return=t,o.return=t,l.sibling=o,t.child=l,Fn(t,e.child,null,n),l=t.child,l.memoizedState=qc(n),l.childLanes=Yc(e,s,n),t.memoizedState=Hc,t=Na(null,l));else if(En(t),Tf(o)){if(s=o.nextSibling&&o.nextSibling.dataset,s)var C=s.dgst;s=C,l=Error(c(419)),l.stack=\"\",l.digest=s,ma({value:l,source:null,stack:null}),t=Gc(e,t,n)}else if(Ve||xl(e,t,n,!1),s=(n&e.childLanes)!==0,Ve||s){if(s=Oe,s!==null&&(l=zs(s,n),l!==0&&l!==g.retryLane))throw g.retryLane=l,Qn(e,l),ht(s,e,l),Dc;Ef(o)||ku(),t=Gc(e,t,n)}else Ef(o)?(t.flags|=192,t.child=e.child,t=null):(e=g.treeContext,Be=Ut(o.nextSibling),Ie=t,Ee=!0,gn=null,wt=!1,e!==null&&pr(t,e),t=Lc(t,l.children),t.flags|=4096);return t}return a?(Tn(),o=l.fallback,a=t.mode,g=e.child,C=g.sibling,l=$t(g,{mode:\"hidden\",children:l.children}),l.subtreeFlags=g.subtreeFlags&65011712,C!==null?o=$t(C,o):(o=Xn(o,a,n,null),o.flags|=2),o.return=t,l.return=t,l.sibling=o,t.child=l,Na(null,l),l=t.child,o=e.child.memoizedState,o===null?o=qc(n):(a=o.cachePool,a!==null?(g=Ke._currentValue,a=a.parent!==g?{parent:g,pool:g}:a):a=Nr(),o={baseLanes:o.baseLanes|n,cachePool:a}),l.memoizedState=o,l.childLanes=Yc(e,s,n),t.memoizedState=Hc,Na(e.child,l)):(En(t),n=e.child,e=n.sibling,n=$t(n,{mode:\"visible\",children:l.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Lc(e,t){return t=Yu({mode:\"visible\",children:t},e.mode),t.return=e,e.child=t}function Yu(e,t){return e=vt(22,e,null,t),e.lanes=0,e}function Gc(e,t,n){return Fn(t,e.child,null,n),e=Lc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Lo(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),nc(e.return,t,n)}function Qc(e,t,n,l,a,u){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:a,treeForkCount:u}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=l,s.tail=n,s.tailMode=a,s.treeForkCount=u)}function Go(e,t,n){var l=t.pendingProps,a=l.revealOrder,u=l.tail;l=l.children;var s=Qe.current,o=(s&2)!==0;if(o?(s=s&1|2,t.flags|=128):s&=1,Q(Qe,s),et(e,t,l,n),l=Ee?ha:0,!o&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Lo(e,n,t);else if(e.tag===19)Lo(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case\"forwards\":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&ju(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Qc(t,!1,a,n,u,l);break;case\"backwards\":case\"unstable_legacy-backwards\":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&ju(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Qc(t,!0,n,null,u,l);break;case\"together\":Qc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function tn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Cn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(xl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,n=$t(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=$t(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Xc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Su(e)))}function qm(e,t,n){switch(t.tag){case 3:Me(t,t.stateNode.containerInfo),vn(t,Ke,e.memoizedState.cache),Kn();break;case 27:case 5:nt(t);break;case 4:Me(t,t.stateNode.containerInfo);break;case 10:vn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,mc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(En(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Yo(e,t,n):(En(t),e=tn(e,t,n),e!==null?e.sibling:null);En(t);break;case 19:var a=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(xl(e,t,n,!1),l=(n&t.childLanes)!==0),a){if(l)return Go(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Q(Qe,Qe.current),l)break;return null;case 22:return t.lanes=0,Uo(e,t,n,t.pendingProps);case 24:vn(t,Ke,e.memoizedState.cache)}return tn(e,t,n)}function Qo(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ve=!0;else{if(!Xc(e,n)&&(t.flags&128)===0)return Ve=!1,qm(e,t,n);Ve=(e.flags&131072)!==0}else Ve=!1,Ee&&(t.flags&1048576)!==0&&Sr(t,ha,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=kn(t.elementType),t.type=e,typeof e==\"function\")ki(e)?(l=In(e,l),t.tag=1,t=Ho(null,t,e,l,n)):(t.tag=0,t=Bc(null,t,e,l,n));else{if(e!=null){var a=e.$$typeof;if(a===$){t.tag=11,t=Mo(null,t,e,l,n);break e}else if(a===Y){t.tag=14,t=wo(null,t,e,l,n);break e}}throw t=ue(e)||e,Error(c(306,t,\"\"))}}return t;case 0:return Bc(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,a=In(l,t.pendingProps),Ho(e,t,l,a,n);case 3:e:{if(Me(t,t.stateNode.containerInfo),e===null)throw Error(c(387));l=t.pendingProps;var u=t.memoizedState;a=u.element,sc(e,t),Ea(t,l,null,n);var s=t.memoizedState;if(l=s.cache,vn(t,Ke,l),l!==u.cache&&lc(t,[Ke],n,!0),pa(),l=s.element,u.isDehydrated)if(u={element:l,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=qo(e,t,l,n);break e}else if(l!==a){a=xt(Error(c(424)),t),ma(a),t=qo(e,t,l,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===\"HTML\"?e.ownerDocument.body:e}for(Be=Ut(e.firstChild),Ie=t,Ee=!0,gn=null,wt=!0,n=Rr(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Kn(),l===a){t=tn(e,t,n);break e}et(e,t,l,n)}t=t.child}return t;case 26:return qu(e,t),e===null?(n=Pd(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ee||(n=t.type,e=t.pendingProps,l=ti(re.current).createElement(n),l[We]=t,l[ct]=e,tt(l,n,e),$e(l),t.stateNode=l):t.memoizedState=Pd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return nt(t),e===null&&Ee&&(l=t.stateNode=Fd(t.type,t.pendingProps,re.current),Ie=t,wt=!0,a=Be,Mn(t.type)?(Af=a,Be=Ut(l.firstChild)):Be=a),et(e,t,t.pendingProps.children,n),qu(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ee&&((a=l=Be)&&(l=mg(l,t.type,t.pendingProps,wt),l!==null?(t.stateNode=l,Ie=t,Be=Ut(l.firstChild),wt=!1,a=!0):a=!1),a||yn(t)),nt(t),a=t.type,u=t.pendingProps,s=e!==null?e.memoizedProps:null,l=u.children,bf(a,u)?l=null:s!==null&&bf(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=yc(e,t,_m,null,null,n),Ga._currentValue=a),qu(e,t),et(e,t,l,n),t.child;case 6:return e===null&&Ee&&((e=n=Be)&&(n=gg(n,t.pendingProps,wt),n!==null?(t.stateNode=n,Ie=t,Be=null,e=!0):e=!1),e||yn(t)),null;case 13:return Yo(e,t,n);case 4:return Me(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Fn(t,null,l,n):et(e,t,l,n),t.child;case 11:return Mo(e,t,t.type,t.pendingProps,n);case 7:return et(e,t,t.pendingProps,n),t.child;case 8:return et(e,t,t.pendingProps.children,n),t.child;case 12:return et(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,vn(t,t.type,l.value),et(e,t,l.children,n),t.child;case 9:return a=t.type._context,l=t.pendingProps.children,Vn(t),a=Pe(a),l=l(a),t.flags|=1,et(e,t,l,n),t.child;case 14:return wo(e,t,t.type,t.pendingProps,n);case 15:return Ro(e,t,t.type,t.pendingProps,n);case 19:return Go(e,t,n);case 31:return Hm(e,t,n);case 22:return Uo(e,t,n,t.pendingProps);case 24:return Vn(t),l=Pe(Ke),e===null?(a=ic(),a===null&&(a=Oe,u=ac(),a.pooledCache=u,u.refCount++,u!==null&&(a.pooledCacheLanes|=n),a=u),t.memoizedState={parent:l,cache:a},fc(t),vn(t,Ke,a)):((e.lanes&n)!==0&&(sc(e,t),Ea(t,null,null,n),pa()),a=e.memoizedState,u=t.memoizedState,a.parent!==l?(a={parent:l,cache:l},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),vn(t,Ke,l)):(l=u.cache,vn(t,Ke,l),l!==a.cache&&lc(t,[Ke],n,!0))),et(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function nn(e){e.flags|=4}function Kc(e,t,n,l,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(gd())e.flags|=8192;else throw $n=Au,cc}else e.flags&=-16777217}function Xo(e,t){if(t.type!==\"stylesheet\"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!ah(t))if(gd())e.flags|=8192;else throw $n=Au,cc}function Lu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Es():536870912,e.lanes|=t,Ll|=t)}function ja(e,t){if(!Ee)switch(e.tailMode){case\"hidden\":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case\"collapsed\":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function He(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags&65011712,l|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags,l|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function Ym(e,t,n){var l=t.pendingProps;switch(Ii(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return He(t),null;case 1:return He(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),It(Ke),Ne(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(jl(t)?nn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ec())),He(t),null;case 26:var a=t.type,u=t.memoizedState;return e===null?(nn(t),u!==null?(He(t),Xo(t,u)):(He(t),Kc(t,a,null,l,n))):u?u!==e.memoizedState?(nn(t),He(t),Xo(t,u)):(He(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&nn(t),He(t),Kc(t,a,e,l,n)),null;case 27:if(al(t),n=re.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&nn(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return He(t),null}e=W.current,jl(t)?Er(t):(e=Fd(a,l,n),t.stateNode=e,nn(t))}return He(t),null;case 5:if(al(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&nn(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return He(t),null}if(u=W.current,jl(t))Er(t);else{var s=ti(re.current);switch(u){case 1:u=s.createElementNS(\"http://www.w3.org/2000/svg\",a);break;case 2:u=s.createElementNS(\"http://www.w3.org/1998/Math/MathML\",a);break;default:switch(a){case\"svg\":u=s.createElementNS(\"http://www.w3.org/2000/svg\",a);break;case\"math\":u=s.createElementNS(\"http://www.w3.org/1998/Math/MathML\",a);break;case\"script\":u=s.createElement(\"div\"),u.innerHTML=\"<script><\\\\/script>\",u=u.removeChild(u.firstChild);break;case\"select\":u=typeof l.is==\"string\"?s.createElement(\"select\",{is:l.is}):s.createElement(\"select\"),l.multiple?u.multiple=!0:l.size&&(u.size=l.size);break;default:u=typeof l.is==\"string\"?s.createElement(a,{is:l.is}):s.createElement(a)}}u[We]=t,u[ct]=l;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)u.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=u;e:switch(tt(u,a,l),a){case\"button\":case\"input\":case\"select\":case\"textarea\":l=!!l.autoFocus;break e;case\"img\":l=!0;break e;default:l=!1}l&&nn(t)}}return He(t),Kc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&nn(t);else{if(typeof l!=\"string\"&&t.stateNode===null)throw Error(c(166));if(e=re.current,jl(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,a=Ie,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}e[We]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||Yd(e.nodeValue,n)),e||yn(t,!0)}else e=ti(e).createTextNode(l),e[We]=t,t.stateNode=e}return He(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=jl(t),n!==null){if(e===null){if(!l)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[We]=t}else Kn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;He(t),e=!1}else n=ec(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(St(t),t):(St(t),null);if((t.flags&128)!==0)throw Error(c(558))}return He(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=jl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!a)throw Error(c(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(c(317));a[We]=t}else Kn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;He(t),a=!1}else a=ec(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(St(t),t):(St(t),null)}return St(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,a=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(a=l.alternate.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==a&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Lu(t,t.updateQueue),He(t),null);case 4:return Ne(),e===null&&hf(t.stateNode.containerInfo),He(t),null;case 10:return It(t.type),He(t),null;case 19:if(R(Qe),l=t.memoizedState,l===null)return He(t),null;if(a=(t.flags&128)!==0,u=l.rendering,u===null)if(a)ja(l,!1);else{if(Ge!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=ju(e),u!==null){for(t.flags|=128,ja(l,!1),e=u.updateQueue,t.updateQueue=e,Lu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)yr(n,e),n=n.sibling;return Q(Qe,Qe.current&1|2),Ee&&Ft(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&ut()>Zu&&(t.flags|=128,a=!0,ja(l,!1),t.lanes=4194304)}else{if(!a)if(e=ju(u),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Lu(t,e),ja(l,!0),l.tail===null&&l.tailMode===\"hidden\"&&!u.alternate&&!Ee)return He(t),null}else 2*ut()-l.renderingStartTime>Zu&&n!==536870912&&(t.flags|=128,a=!0,ja(l,!1),t.lanes=4194304);l.isBackwards?(u.sibling=t.child,t.child=u):(e=l.last,e!==null?e.sibling=u:t.child=u,l.last=u)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=ut(),e.sibling=null,n=Qe.current,Q(Qe,a?n&1|2:n&1),Ee&&Ft(t,l.treeForkCount),e):(He(t),null);case 22:case 23:return St(t),hc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(He(t),t.subtreeFlags&6&&(t.flags|=8192)):He(t),n=t.updateQueue,n!==null&&Lu(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&R(Jn),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),It(Ke),He(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function Lm(e,t){switch(Ii(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return It(Ke),Ne(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return al(t),null;case 31:if(t.memoizedState!==null){if(St(t),t.alternate===null)throw Error(c(340));Kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(St(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return R(Qe),null;case 4:return Ne(),null;case 10:return It(t.type),null;case 22:case 23:return St(t),hc(),e!==null&&R(Jn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return It(Ke),null;case 25:return null;default:return null}}function Ko(e,t){switch(Ii(t),t.tag){case 3:It(Ke),Ne();break;case 26:case 27:case 5:al(t);break;case 4:Ne();break;case 31:t.memoizedState!==null&&St(t);break;case 13:St(t);break;case 19:R(Qe);break;case 10:It(t.type);break;case 22:case 23:St(t),hc(),e!==null&&R(Jn);break;case 24:It(Ke)}}function xa(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var a=l.next;n=a;do{if((n.tag&e)===e){l=void 0;var u=n.create,s=n.inst;l=u(),s.destroy=l}n=n.next}while(n!==a)}}catch(o){_e(t,t.return,o)}}function An(e,t,n){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var u=a.next;l=u;do{if((l.tag&e)===e){var s=l.inst,o=s.destroy;if(o!==void 0){s.destroy=void 0,a=t;var g=n,C=o;try{C()}catch(w){_e(a,g,w)}}}l=l.next}while(l!==u)}}catch(w){_e(t,t.return,w)}}function Zo(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Or(t,n)}catch(l){_e(e,e.return,l)}}}function Vo(e,t,n){n.props=In(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){_e(e,t,l)}}function _a(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof n==\"function\"?e.refCleanup=n(l):n.current=l}}catch(a){_e(e,t,a)}}function Gt(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l==\"function\")try{l()}catch(a){_e(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==\"function\")try{n(null)}catch(a){_e(e,t,a)}else n.current=null}function Jo(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case\"button\":case\"input\":case\"select\":case\"textarea\":n.autoFocus&&l.focus();break e;case\"img\":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(a){_e(e,e.return,a)}}function Zc(e,t,n){try{var l=e.stateNode;fg(l,e.type,n,t),l[ct]=t}catch(a){_e(e,e.return,a)}}function ko(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Mn(e.type)||e.tag===4}function Vc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ko(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Mn(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Jc(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===\"HTML\"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===\"HTML\"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Jt));else if(l!==4&&(l===27&&Mn(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Gu(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&Mn(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Gu(e,t,n),e=e.sibling;e!==null;)Gu(e,t,n),e=e.sibling}function $o(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);tt(t,l,n),t[We]=e,t[ct]=n}catch(u){_e(e,e.return,u)}}var ln=!1,Je=!1,kc=!1,Fo=typeof WeakSet==\"function\"?WeakSet:Set,Fe=null;function Gm(e,t){if(e=e.containerInfo,yf=fi,e=cr(e),Gi(e)){if(\"selectionStart\"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var a=l.anchorOffset,u=l.focusNode;l=l.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var s=0,o=-1,g=-1,C=0,w=0,O=e,N=null;t:for(;;){for(var _;O!==n||a!==0&&O.nodeType!==3||(o=s+a),O!==u||l!==0&&O.nodeType!==3||(g=s+l),O.nodeType===3&&(s+=O.nodeValue.length),(_=O.firstChild)!==null;)N=O,O=_;for(;;){if(O===e)break t;if(N===n&&++C===a&&(o=s),N===u&&++w===l&&(g=s),(_=O.nextSibling)!==null)break;O=N,N=O.parentNode}O=_}n=o===-1||g===-1?null:{start:o,end:g}}else n=null}n=n||{start:0,end:0}}else n=null;for(vf={focusedElem:e,selectionRange:n},fi=!1,Fe=t;Fe!==null;)if(t=Fe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Fe=e;else for(;Fe!==null;){switch(t=Fe,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,n=t,a=u.memoizedProps,u=u.memoizedState,l=n.stateNode;try{var P=In(n.type,a);e=l.getSnapshotBeforeUpdate(P,u),l.__reactInternalSnapshotBeforeUpdate=e}catch(ie){_e(n,n.return,ie)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)pf(e);else if(n===1)switch(e.nodeName){case\"HEAD\":case\"HTML\":case\"BODY\":pf(e);break;default:e.textContent=\"\"}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(c(163))}if(e=t.sibling,e!==null){e.return=t.return,Fe=e;break}Fe=t.return}}function Wo(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:un(e,n),l&4&&xa(5,n);break;case 1:if(un(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(s){_e(n,n.return,s)}else{var a=In(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(s){_e(n,n.return,s)}}l&64&&Zo(n),l&512&&_a(n,n.return);break;case 3:if(un(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Or(e,t)}catch(s){_e(n,n.return,s)}}break;case 27:t===null&&l&4&&$o(n);case 26:case 5:un(e,n),t===null&&l&4&&Jo(n),l&512&&_a(n,n.return);break;case 12:un(e,n);break;case 31:un(e,n),l&4&&ed(e,n);break;case 13:un(e,n),l&4&&td(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Fm.bind(null,n),yg(e,n))));break;case 22:if(l=n.memoizedState!==null||ln,!l){t=t!==null&&t.memoizedState!==null||Je,a=ln;var u=Je;ln=l,(Je=t)&&!u?cn(e,n,(n.subtreeFlags&8772)!==0):un(e,n),ln=a,Je=u}break;case 30:break;default:un(e,n)}}function Io(e){var t=e.alternate;t!==null&&(e.alternate=null,Io(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&zi(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var qe=null,st=!1;function an(e,t,n){for(n=n.child;n!==null;)Po(e,t,n),n=n.sibling}function Po(e,t,n){if(mt&&typeof mt.onCommitFiberUnmount==\"function\")try{mt.onCommitFiberUnmount(Pl,n)}catch{}switch(n.tag){case 26:Je||Gt(n,t),an(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Je||Gt(n,t);var l=qe,a=st;Mn(n.type)&&(qe=n.stateNode,st=!1),an(e,t,n),qa(n.stateNode),qe=l,st=a;break;case 5:Je||Gt(n,t);case 6:if(l=qe,a=st,qe=null,an(e,t,n),qe=l,st=a,qe!==null)if(st)try{(qe.nodeType===9?qe.body:qe.nodeName===\"HTML\"?qe.ownerDocument.body:qe).removeChild(n.stateNode)}catch(u){_e(n,t,u)}else try{qe.removeChild(n.stateNode)}catch(u){_e(n,t,u)}break;case 18:qe!==null&&(st?(e=qe,Zd(e.nodeType===9?e.body:e.nodeName===\"HTML\"?e.ownerDocument.body:e,n.stateNode),kl(e)):Zd(qe,n.stateNode));break;case 4:l=qe,a=st,qe=n.stateNode.containerInfo,st=!0,an(e,t,n),qe=l,st=a;break;case 0:case 11:case 14:case 15:An(2,n,t),Je||An(4,n,t),an(e,t,n);break;case 1:Je||(Gt(n,t),l=n.stateNode,typeof l.componentWillUnmount==\"function\"&&Vo(n,t,l)),an(e,t,n);break;case 21:an(e,t,n);break;case 22:Je=(l=Je)||n.memoizedState!==null,an(e,t,n),Je=l;break;default:an(e,t,n)}}function ed(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{kl(e)}catch(n){_e(t,t.return,n)}}}function td(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{kl(e)}catch(n){_e(t,t.return,n)}}function Qm(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Fo),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Fo),t;default:throw Error(c(435,e.tag))}}function Qu(e,t){var n=Qm(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var a=Wm.bind(null,e,l);l.then(a,a)}})}function rt(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var a=n[l],u=e,s=t,o=s;e:for(;o!==null;){switch(o.tag){case 27:if(Mn(o.type)){qe=o.stateNode,st=!1;break e}break;case 5:qe=o.stateNode,st=!1;break e;case 3:case 4:qe=o.stateNode.containerInfo,st=!0;break e}o=o.return}if(qe===null)throw Error(c(160));Po(u,s,a),qe=null,st=!1,u=a.alternate,u!==null&&(u.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)nd(t,e),t=t.sibling}var Bt=null;function nd(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:rt(t,e),ot(e),l&4&&(An(3,e,e.return),xa(3,e),An(5,e,e.return));break;case 1:rt(t,e),ot(e),l&512&&(Je||n===null||Gt(n,n.return)),l&64&&ln&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var a=Bt;if(rt(t,e),ot(e),l&512&&(Je||n===null||Gt(n,n.return)),l&4){var u=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(l){case\"title\":u=a.getElementsByTagName(\"title\")[0],(!u||u[na]||u[We]||u.namespaceURI===\"http://www.w3.org/2000/svg\"||u.hasAttribute(\"itemprop\"))&&(u=a.createElement(l),a.head.insertBefore(u,a.querySelector(\"head > title\"))),tt(u,l,n),u[We]=e,$e(u),l=u;break e;case\"link\":var s=nh(\"link\",\"href\",a).get(l+(n.href||\"\"));if(s){for(var o=0;o<s.length;o++)if(u=s[o],u.getAttribute(\"href\")===(n.href==null||n.href===\"\"?null:n.href)&&u.getAttribute(\"rel\")===(n.rel==null?null:n.rel)&&u.getAttribute(\"title\")===(n.title==null?null:n.title)&&u.getAttribute(\"crossorigin\")===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(o,1);break t}}u=a.createElement(l),tt(u,l,n),a.head.appendChild(u);break;case\"meta\":if(s=nh(\"meta\",\"content\",a).get(l+(n.content||\"\"))){for(o=0;o<s.length;o++)if(u=s[o],u.getAttribute(\"content\")===(n.content==null?null:\"\"+n.content)&&u.getAttribute(\"name\")===(n.name==null?null:n.name)&&u.getAttribute(\"property\")===(n.property==null?null:n.property)&&u.getAttribute(\"http-equiv\")===(n.httpEquiv==null?null:n.httpEquiv)&&u.getAttribute(\"charset\")===(n.charSet==null?null:n.charSet)){s.splice(o,1);break t}}u=a.createElement(l),tt(u,l,n),a.head.appendChild(u);break;default:throw Error(c(468,l))}u[We]=e,$e(u),l=u}e.stateNode=l}else lh(a,e.type,e.stateNode);else e.stateNode=th(a,l,e.memoizedProps);else u!==l?(u===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):u.count--,l===null?lh(a,e.type,e.stateNode):th(a,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Zc(e,e.memoizedProps,n.memoizedProps)}break;case 27:rt(t,e),ot(e),l&512&&(Je||n===null||Gt(n,n.return)),n!==null&&l&4&&Zc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(rt(t,e),ot(e),l&512&&(Je||n===null||Gt(n,n.return)),e.flags&32){a=e.stateNode;try{vl(a,\"\")}catch(P){_e(e,e.return,P)}}l&4&&e.stateNode!=null&&(a=e.memoizedProps,Zc(e,a,n!==null?n.memoizedProps:a)),l&1024&&(kc=!0);break;case 6:if(rt(t,e),ot(e),l&4){if(e.stateNode===null)throw Error(c(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(P){_e(e,e.return,P)}}break;case 3:if(ai=null,a=Bt,Bt=ni(t.containerInfo),rt(t,e),Bt=a,ot(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{kl(t.containerInfo)}catch(P){_e(e,e.return,P)}kc&&(kc=!1,ld(e));break;case 4:l=Bt,Bt=ni(e.stateNode.containerInfo),rt(t,e),ot(e),Bt=l;break;case 12:rt(t,e),ot(e);break;case 31:rt(t,e),ot(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Qu(e,l)));break;case 13:rt(t,e),ot(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ku=ut()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Qu(e,l)));break;case 22:a=e.memoizedState!==null;var g=n!==null&&n.memoizedState!==null,C=ln,w=Je;if(ln=C||a,Je=w||g,rt(t,e),Je=w,ln=C,ot(e),l&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||g||ln||Je||Pn(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){g=n=t;try{if(u=g.stateNode,a)s=u.style,typeof s.setProperty==\"function\"?s.setProperty(\"display\",\"none\",\"important\"):s.display=\"none\";else{o=g.stateNode;var O=g.memoizedProps.style,N=O!=null&&O.hasOwnProperty(\"display\")?O.display:null;o.style.display=N==null||typeof N==\"boolean\"?\"\":(\"\"+N).trim()}}catch(P){_e(g,g.return,P)}}}else if(t.tag===6){if(n===null){g=t;try{g.stateNode.nodeValue=a?\"\":g.memoizedProps}catch(P){_e(g,g.return,P)}}}else if(t.tag===18){if(n===null){g=t;try{var _=g.stateNode;a?Vd(_,!0):Vd(g.stateNode,!1)}catch(P){_e(g,g.return,P)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,Qu(e,n))));break;case 19:rt(t,e),ot(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Qu(e,l)));break;case 30:break;case 21:break;default:rt(t,e),ot(e)}}function ot(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(ko(l)){n=l;break}l=l.return}if(n==null)throw Error(c(160));switch(n.tag){case 27:var a=n.stateNode,u=Vc(e);Gu(e,u,a);break;case 5:var s=n.stateNode;n.flags&32&&(vl(s,\"\"),n.flags&=-33);var o=Vc(e);Gu(e,o,s);break;case 3:case 4:var g=n.stateNode.containerInfo,C=Vc(e);Jc(e,C,g);break;default:throw Error(c(161))}}catch(w){_e(e,e.return,w)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ld(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ld(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function un(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Wo(e,t.alternate,t),t=t.sibling}function Pn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:An(4,t,t.return),Pn(t);break;case 1:Gt(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==\"function\"&&Vo(t,t.return,n),Pn(t);break;case 27:qa(t.stateNode);case 26:case 5:Gt(t,t.return),Pn(t);break;case 22:t.memoizedState===null&&Pn(t);break;case 30:Pn(t);break;default:Pn(t)}e=e.sibling}}function cn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,a=e,u=t,s=u.flags;switch(u.tag){case 0:case 11:case 15:cn(a,u,n),xa(4,u);break;case 1:if(cn(a,u,n),l=u,a=l.stateNode,typeof a.componentDidMount==\"function\")try{a.componentDidMount()}catch(C){_e(l,l.return,C)}if(l=u,a=l.updateQueue,a!==null){var o=l.stateNode;try{var g=a.shared.hiddenCallbacks;if(g!==null)for(a.shared.hiddenCallbacks=null,a=0;a<g.length;a++)Ur(g[a],o)}catch(C){_e(l,l.return,C)}}n&&s&64&&Zo(u),_a(u,u.return);break;case 27:$o(u);case 26:case 5:cn(a,u,n),n&&l===null&&s&4&&Jo(u),_a(u,u.return);break;case 12:cn(a,u,n);break;case 31:cn(a,u,n),n&&s&4&&ed(a,u);break;case 13:cn(a,u,n),n&&s&4&&td(a,u);break;case 22:u.memoizedState===null&&cn(a,u,n),_a(u,u.return);break;case 30:break;default:cn(a,u,n)}t=t.sibling}}function $c(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ga(n))}function Fc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ga(e))}function Ht(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ad(e,t,n,l),t=t.sibling}function ad(e,t,n,l){var a=t.flags;switch(t.tag){case 0:case 11:case 15:Ht(e,t,n,l),a&2048&&xa(9,t);break;case 1:Ht(e,t,n,l);break;case 3:Ht(e,t,n,l),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ga(e)));break;case 12:if(a&2048){Ht(e,t,n,l),e=t.stateNode;try{var u=t.memoizedProps,s=u.id,o=u.onPostCommit;typeof o==\"function\"&&o(s,t.alternate===null?\"mount\":\"update\",e.passiveEffectDuration,-0)}catch(g){_e(t,t.return,g)}}else Ht(e,t,n,l);break;case 31:Ht(e,t,n,l);break;case 13:Ht(e,t,n,l);break;case 23:break;case 22:u=t.stateNode,s=t.alternate,t.memoizedState!==null?u._visibility&2?Ht(e,t,n,l):Ma(e,t):u._visibility&2?Ht(e,t,n,l):(u._visibility|=2,Hl(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),a&2048&&$c(s,t);break;case 24:Ht(e,t,n,l),a&2048&&Fc(t.alternate,t);break;default:Ht(e,t,n,l)}}function Hl(e,t,n,l,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,s=t,o=n,g=l,C=s.flags;switch(s.tag){case 0:case 11:case 15:Hl(u,s,o,g,a),xa(8,s);break;case 23:break;case 22:var w=s.stateNode;s.memoizedState!==null?w._visibility&2?Hl(u,s,o,g,a):Ma(u,s):(w._visibility|=2,Hl(u,s,o,g,a)),a&&C&2048&&$c(s.alternate,s);break;case 24:Hl(u,s,o,g,a),a&&C&2048&&Fc(s.alternate,s);break;default:Hl(u,s,o,g,a)}t=t.sibling}}function Ma(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,a=l.flags;switch(l.tag){case 22:Ma(n,l),a&2048&&$c(l.alternate,l);break;case 24:Ma(n,l),a&2048&&Fc(l.alternate,l);break;default:Ma(n,l)}t=t.sibling}}var wa=8192;function ql(e,t,n){if(e.subtreeFlags&wa)for(e=e.child;e!==null;)ud(e,t,n),e=e.sibling}function ud(e,t,n){switch(e.tag){case 26:ql(e,t,n),e.flags&wa&&e.memoizedState!==null&&xg(n,Bt,e.memoizedState,e.memoizedProps);break;case 5:ql(e,t,n);break;case 3:case 4:var l=Bt;Bt=ni(e.stateNode.containerInfo),ql(e,t,n),Bt=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=wa,wa=16777216,ql(e,t,n),wa=l):ql(e,t,n));break;default:ql(e,t,n)}}function id(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ra(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Fe=l,fd(l,e)}id(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)cd(e),e=e.sibling}function cd(e){switch(e.tag){case 0:case 11:case 15:Ra(e),e.flags&2048&&An(9,e,e.return);break;case 3:Ra(e);break;case 12:Ra(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Xu(e)):Ra(e);break;default:Ra(e)}}function Xu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Fe=l,fd(l,e)}id(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:An(8,t,t.return),Xu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Xu(t));break;default:Xu(t)}e=e.sibling}}function fd(e,t){for(;Fe!==null;){var n=Fe;switch(n.tag){case 0:case 11:case 15:An(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ga(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,Fe=l;else e:for(n=e;Fe!==null;){l=Fe;var a=l.sibling,u=l.return;if(Io(l),l===n){Fe=null;break e}if(a!==null){a.return=u,Fe=a;break e}Fe=u}}}var Xm={getCacheForType:function(e){var t=Pe(Ke),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Pe(Ke).controller.signal}},Km=typeof WeakMap==\"function\"?WeakMap:Map,je=0,Oe=null,ye=null,Se=0,xe=0,pt=null,zn=!1,Yl=!1,Wc=!1,fn=0,Ge=0,Cn=0,el=0,Ic=0,Et=0,Ll=0,Ua=null,dt=null,Pc=!1,Ku=0,sd=0,Zu=1/0,Vu=null,Nn=null,ke=0,jn=null,Gl=null,sn=0,ef=0,tf=null,rd=null,Oa=0,nf=null;function Tt(){return(je&2)!==0&&Se!==0?Se&-Se:M.T!==null?sf():Cs()}function od(){if(Et===0)if((Se&536870912)===0||Ee){var e=eu;eu<<=1,(eu&3932160)===0&&(eu=262144),Et=e}else Et=536870912;return e=bt.current,e!==null&&(e.flags|=32),Et}function ht(e,t,n){(e===Oe&&(xe===2||xe===9)||e.cancelPendingCommit!==null)&&(Ql(e,0),xn(e,Se,Et,!1)),ta(e,n),((je&2)===0||e!==Oe)&&(e===Oe&&((je&2)===0&&(el|=n),Ge===4&&xn(e,Se,Et,!1)),Qt(e))}function dd(e,t,n){if((je&6)!==0)throw Error(c(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||ea(e,t),a=l?Jm(e,t):af(e,t,!0),u=l;do{if(a===0){Yl&&!l&&xn(e,t,0,!1);break}else{if(n=e.current.alternate,u&&!Zm(n)){a=af(e,t,!1),u=!1;continue}if(a===2){if(u=t,e.errorRecoveryDisabledLanes&u)var s=0;else s=e.pendingLanes&-536870913,s=s!==0?s:s&536870912?536870912:0;if(s!==0){t=s;e:{var o=e;a=Ua;var g=o.current.memoizedState.isDehydrated;if(g&&(Ql(o,s).flags|=256),s=af(o,s,!1),s!==2){if(Wc&&!g){o.errorRecoveryDisabledLanes|=u,el|=u,a=4;break e}u=dt,dt=a,u!==null&&(dt===null?dt=u:dt.push.apply(dt,u))}a=s}if(u=!1,a!==2)continue}}if(a===1){Ql(e,0),xn(e,t,0,!0);break}e:{switch(l=e,u=a,u){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:xn(l,t,Et,!zn);break e;case 2:dt=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(a=Ku+300-ut(),10<a)){if(xn(l,t,Et,!zn),nu(l,0,!0)!==0)break e;sn=t,l.timeoutHandle=Xd(hd.bind(null,l,n,dt,Vu,Pc,t,Et,el,Ll,zn,u,\"Throttled\",-0,0),a);break e}hd(l,n,dt,Vu,Pc,t,Et,el,Ll,zn,u,null,-0,0)}}break}while(!0);Qt(e)}function hd(e,t,n,l,a,u,s,o,g,C,w,O,N,_){if(e.timeoutHandle=-1,O=t.subtreeFlags,O&8192||(O&16785408)===16785408){O={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Jt},ud(t,u,O);var P=(u&62914560)===u?Ku-ut():(u&4194048)===u?sd-ut():0;if(P=_g(O,P),P!==null){sn=u,e.cancelPendingCommit=P(Ed.bind(null,e,t,u,n,l,a,s,o,g,w,O,null,N,_)),xn(e,u,s,!C);return}}Ed(e,t,u,n,l,a,s,o,g)}function Zm(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var a=n[l],u=a.getSnapshot;a=a.value;try{if(!yt(u(),a))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function xn(e,t,n,l){t&=~Ic,t&=~el,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var a=t;0<a;){var u=31-gt(a),s=1<<u;l[u]=-1,a&=~s}n!==0&&Ts(e,n,t)}function Ju(){return(je&6)===0?(Da(0),!1):!0}function lf(){if(ye!==null){if(xe===0)var e=ye.return;else e=ye,Wt=Zn=null,Sc(e),Rl=null,va=0,e=ye;for(;e!==null;)Ko(e.alternate,e),e=e.return;ye=null}}function Ql(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,og(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),sn=0,lf(),Oe=e,ye=n=$t(e.current,null),Se=t,xe=0,pt=null,zn=!1,Yl=ea(e,t),Wc=!1,Ll=Et=Ic=el=Cn=Ge=0,dt=Ua=null,Pc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var a=31-gt(l),u=1<<a;t|=e[a],l&=~u}return fn=t,mu(),n}function md(e,t){me=null,M.H=Ca,t===wl||t===Tu?(t=_r(),xe=3):t===cc?(t=_r(),xe=4):xe=t===Dc?8:t!==null&&typeof t==\"object\"&&typeof t.then==\"function\"?6:1,pt=t,ye===null&&(Ge=1,Bu(e,xt(t,e.current)))}function gd(){var e=bt.current;return e===null?!0:(Se&4194048)===Se?Rt===null:(Se&62914560)===Se||(Se&536870912)!==0?e===Rt:!1}function yd(){var e=M.H;return M.H=Ca,e===null?Ca:e}function vd(){var e=M.A;return M.A=Xm,e}function ku(){Ge=4,zn||(Se&4194048)!==Se&&bt.current!==null||(Yl=!0),(Cn&134217727)===0&&(el&134217727)===0||Oe===null||xn(Oe,Se,Et,!1)}function af(e,t,n){var l=je;je|=2;var a=yd(),u=vd();(Oe!==e||Se!==t)&&(Vu=null,Ql(e,t)),t=!1;var s=Ge;e:do try{if(xe!==0&&ye!==null){var o=ye,g=pt;switch(xe){case 8:lf(),s=6;break e;case 3:case 2:case 9:case 6:bt.current===null&&(t=!0);var C=xe;if(xe=0,pt=null,Xl(e,o,g,C),n&&Yl){s=0;break e}break;default:C=xe,xe=0,pt=null,Xl(e,o,g,C)}}Vm(),s=Ge;break}catch(w){md(e,w)}while(!0);return t&&e.shellSuspendCounter++,Wt=Zn=null,je=l,M.H=a,M.A=u,ye===null&&(Oe=null,Se=0,mu()),s}function Vm(){for(;ye!==null;)bd(ye)}function Jm(e,t){var n=je;je|=2;var l=yd(),a=vd();Oe!==e||Se!==t?(Vu=null,Zu=ut()+500,Ql(e,t)):Yl=ea(e,t);e:do try{if(xe!==0&&ye!==null){t=ye;var u=pt;t:switch(xe){case 1:xe=0,pt=null,Xl(e,t,u,1);break;case 2:case 9:if(jr(u)){xe=0,pt=null,Sd(t);break}t=function(){xe!==2&&xe!==9||Oe!==e||(xe=7),Qt(e)},u.then(t,t);break e;case 3:xe=7;break e;case 4:xe=5;break e;case 7:jr(u)?(xe=0,pt=null,Sd(t)):(xe=0,pt=null,Xl(e,t,u,7));break;case 5:var s=null;switch(ye.tag){case 26:s=ye.memoizedState;case 5:case 27:var o=ye;if(s?ah(s):o.stateNode.complete){xe=0,pt=null;var g=o.sibling;if(g!==null)ye=g;else{var C=o.return;C!==null?(ye=C,$u(C)):ye=null}break t}}xe=0,pt=null,Xl(e,t,u,5);break;case 6:xe=0,pt=null,Xl(e,t,u,6);break;case 8:lf(),Ge=6;break e;default:throw Error(c(462))}}km();break}catch(w){md(e,w)}while(!0);return Wt=Zn=null,M.H=l,M.A=a,je=n,ye!==null?0:(Oe=null,Se=0,mu(),Ge)}function km(){for(;ye!==null&&!Si();)bd(ye)}function bd(e){var t=Qo(e.alternate,e,fn);e.memoizedProps=e.pendingProps,t===null?$u(e):ye=t}function Sd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Bo(n,t,t.pendingProps,t.type,void 0,Se);break;case 11:t=Bo(n,t,t.pendingProps,t.type.render,t.ref,Se);break;case 5:Sc(t);default:Ko(n,t),t=ye=yr(t,fn),t=Qo(n,t,fn)}e.memoizedProps=e.pendingProps,t===null?$u(e):ye=t}function Xl(e,t,n,l){Wt=Zn=null,Sc(t),Rl=null,va=0;var a=t.return;try{if(Bm(e,a,t,n,Se)){Ge=1,Bu(e,xt(n,e.current)),ye=null;return}}catch(u){if(a!==null)throw ye=a,u;Ge=1,Bu(e,xt(n,e.current)),ye=null;return}t.flags&32768?(Ee||l===1?e=!0:Yl||(Se&536870912)!==0?e=!1:(zn=e=!0,(l===2||l===9||l===3||l===6)&&(l=bt.current,l!==null&&l.tag===13&&(l.flags|=16384))),pd(t,e)):$u(t)}function $u(e){var t=e;do{if((t.flags&32768)!==0){pd(t,zn);return}e=t.return;var n=Ym(t.alternate,t,fn);if(n!==null){ye=n;return}if(t=t.sibling,t!==null){ye=t;return}ye=t=e}while(t!==null);Ge===0&&(Ge=5)}function pd(e,t){do{var n=Lm(e.alternate,e);if(n!==null){n.flags&=32767,ye=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ye=e;return}ye=e=n}while(e!==null);Ge=6,ye=null}function Ed(e,t,n,l,a,u,s,o,g){e.cancelPendingCommit=null;do Fu();while(ke!==0);if((je&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(u=t.lanes|t.childLanes,u|=Vi,j0(e,n,u,s,o,g),e===Oe&&(ye=Oe=null,Se=0),Gl=t,jn=e,sn=n,ef=u,tf=a,rd=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Im(De,function(){return Nd(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=M.T,M.T=null,a=G.p,G.p=2,s=je,je|=4;try{Gm(e,t,n)}finally{je=s,G.p=a,M.T=l}}ke=1,Td(),Ad(),zd()}}function Td(){if(ke===1){ke=0;var e=jn,t=Gl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=M.T,M.T=null;var l=G.p;G.p=2;var a=je;je|=4;try{nd(t,e);var u=vf,s=cr(e.containerInfo),o=u.focusedElem,g=u.selectionRange;if(s!==o&&o&&o.ownerDocument&&ir(o.ownerDocument.documentElement,o)){if(g!==null&&Gi(o)){var C=g.start,w=g.end;if(w===void 0&&(w=C),\"selectionStart\"in o)o.selectionStart=C,o.selectionEnd=Math.min(w,o.value.length);else{var O=o.ownerDocument||document,N=O&&O.defaultView||window;if(N.getSelection){var _=N.getSelection(),P=o.textContent.length,ie=Math.min(g.start,P),Ue=g.end===void 0?ie:Math.min(g.end,P);!_.extend&&ie>Ue&&(s=Ue,Ue=ie,ie=s);var T=ur(o,ie),S=ur(o,Ue);if(T&&S&&(_.rangeCount!==1||_.anchorNode!==T.node||_.anchorOffset!==T.offset||_.focusNode!==S.node||_.focusOffset!==S.offset)){var z=O.createRange();z.setStart(T.node,T.offset),_.removeAllRanges(),ie>Ue?(_.addRange(z),_.extend(S.node,S.offset)):(z.setEnd(S.node,S.offset),_.addRange(z))}}}}for(O=[],_=o;_=_.parentNode;)_.nodeType===1&&O.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof o.focus==\"function\"&&o.focus(),o=0;o<O.length;o++){var U=O[o];U.element.scrollLeft=U.left,U.element.scrollTop=U.top}}fi=!!yf,vf=yf=null}finally{je=a,G.p=l,M.T=n}}e.current=t,ke=2}}function Ad(){if(ke===2){ke=0;var e=jn,t=Gl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=M.T,M.T=null;var l=G.p;G.p=2;var a=je;je|=4;try{Wo(e,t.alternate,t)}finally{je=a,G.p=l,M.T=n}}ke=3}}function zd(){if(ke===4||ke===3){ke=0,sl();var e=jn,t=Gl,n=sn,l=rd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ke=5:(ke=0,Gl=jn=null,Cd(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(Nn=null),Ti(n),t=t.stateNode,mt&&typeof mt.onCommitFiberRoot==\"function\")try{mt.onCommitFiberRoot(Pl,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=M.T,a=G.p,G.p=2,M.T=null;try{for(var u=e.onRecoverableError,s=0;s<l.length;s++){var o=l[s];u(o.value,{componentStack:o.stack})}}finally{M.T=t,G.p=a}}(sn&3)!==0&&Fu(),Qt(e),a=e.pendingLanes,(n&261930)!==0&&(a&42)!==0?e===nf?Oa++:(Oa=0,nf=e):Oa=0,Da(0)}}function Cd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ga(t)))}function Fu(){return Td(),Ad(),zd(),Nd()}function Nd(){if(ke!==5)return!1;var e=jn,t=ef;ef=0;var n=Ti(sn),l=M.T,a=G.p;try{G.p=32>n?32:n,M.T=null,n=tf,tf=null;var u=jn,s=sn;if(ke=0,Gl=jn=null,sn=0,(je&6)!==0)throw Error(c(331));var o=je;if(je|=4,cd(u.current),ad(u,u.current,s,n),je=o,Da(0,!1),mt&&typeof mt.onPostCommitFiberRoot==\"function\")try{mt.onPostCommitFiberRoot(Pl,u)}catch{}return!0}finally{G.p=a,M.T=l,Cd(e,t)}}function jd(e,t,n){t=xt(n,t),t=Oc(e.stateNode,t,2),e=pn(e,t,2),e!==null&&(ta(e,2),Qt(e))}function _e(e,t,n){if(e.tag===3)jd(e,e,n);else for(;t!==null;){if(t.tag===3){jd(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError==\"function\"||typeof l.componentDidCatch==\"function\"&&(Nn===null||!Nn.has(l))){e=xt(n,e),n=xo(2),l=pn(t,n,2),l!==null&&(_o(n,l,t,e),ta(l,2),Qt(l));break}}t=t.return}}function uf(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new Km;var a=new Set;l.set(t,a)}else a=l.get(t),a===void 0&&(a=new Set,l.set(t,a));a.has(n)||(Wc=!0,a.add(n),e=$m.bind(null,e,t,n),t.then(e,e))}function $m(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Oe===e&&(Se&n)===n&&(Ge===4||Ge===3&&(Se&62914560)===Se&&300>ut()-Ku?(je&2)===0&&Ql(e,0):Ic|=n,Ll===Se&&(Ll=0)),Qt(e)}function xd(e,t){t===0&&(t=Es()),e=Qn(e,t),e!==null&&(ta(e,t),Qt(e))}function Fm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),xd(e,n)}function Wm(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(c(314))}l!==null&&l.delete(t),xd(e,n)}function Im(e,t){return cl(e,t)}var Wu=null,Kl=null,cf=!1,Iu=!1,ff=!1,_n=0;function Qt(e){e!==Kl&&e.next===null&&(Kl===null?Wu=Kl=e:Kl=Kl.next=e),Iu=!0,cf||(cf=!0,eg())}function Da(e,t){if(!ff&&Iu){ff=!0;do for(var n=!1,l=Wu;l!==null;){if(e!==0){var a=l.pendingLanes;if(a===0)var u=0;else{var s=l.suspendedLanes,o=l.pingedLanes;u=(1<<31-gt(42|e)+1)-1,u&=a&~(s&~o),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(n=!0,Rd(l,u))}else u=Se,u=nu(l,l===Oe?u:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(u&3)===0||ea(l,u)||(n=!0,Rd(l,u));l=l.next}while(n);ff=!1}}function Pm(){_d()}function _d(){Iu=cf=!1;var e=0;_n!==0&&rg()&&(e=_n);for(var t=ut(),n=null,l=Wu;l!==null;){var a=l.next,u=Md(l,t);u===0?(l.next=null,n===null?Wu=a:n.next=a,a===null&&(Kl=n)):(n=l,(e!==0||(u&3)!==0)&&(Iu=!0)),l=a}ke!==0&&ke!==5||Da(e),_n!==0&&(_n=0)}function Md(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,a=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var s=31-gt(u),o=1<<s,g=a[s];g===-1?((o&n)===0||(o&l)!==0)&&(a[s]=N0(o,t)):g<=t&&(e.expiredLanes|=o),u&=~o}if(t=Oe,n=Se,n=nu(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(xe===2||xe===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&fl(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||ea(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&fl(l),Ti(n)){case 2:case 8:n=he;break;case 32:n=De;break;case 268435456:n=rl;break;default:n=De}return l=wd.bind(null,e),n=cl(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&fl(l),e.callbackPriority=2,e.callbackNode=null,2}function wd(e,t){if(ke!==0&&ke!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Fu()&&e.callbackNode!==n)return null;var l=Se;return l=nu(e,e===Oe?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(dd(e,l,t),Md(e,ut()),e.callbackNode!=null&&e.callbackNode===n?wd.bind(null,e):null)}function Rd(e,t){if(Fu())return null;dd(e,t,!0)}function eg(){dg(function(){(je&6)!==0?cl(k,Pm):_d()})}function sf(){if(_n===0){var e=_l;e===0&&(e=Pa,Pa<<=1,(Pa&261888)===0&&(Pa=256)),_n=e}return _n}function Ud(e){return e==null||typeof e==\"symbol\"||typeof e==\"boolean\"?null:typeof e==\"function\"?e:iu(\"\"+e)}function Od(e,t){var n=t.ownerDocument.createElement(\"input\");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(\"form\",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function tg(e,t,n,l,a){if(t===\"submit\"&&n&&n.stateNode===a){var u=Ud((a[ct]||null).action),s=l.submitter;s&&(t=(t=s[ct]||null)?Ud(t.formAction):s.getAttribute(\"formAction\"),t!==null&&(u=t,s=null));var o=new ru(\"action\",\"action\",null,l,a);e.push({event:o,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(_n!==0){var g=s?Od(a,s):new FormData(a);xc(n,{pending:!0,data:g,method:a.method,action:u},null,g)}}else typeof u==\"function\"&&(o.preventDefault(),g=s?Od(a,s):new FormData(a),xc(n,{pending:!0,data:g,method:a.method,action:u},u,g))},currentTarget:a}]})}}for(var rf=0;rf<Zi.length;rf++){var of=Zi[rf],ng=of.toLowerCase(),lg=of[0].toUpperCase()+of.slice(1);Dt(ng,\"on\"+lg)}Dt(rr,\"onAnimationEnd\"),Dt(or,\"onAnimationIteration\"),Dt(dr,\"onAnimationStart\"),Dt(\"dblclick\",\"onDoubleClick\"),Dt(\"focusin\",\"onFocus\"),Dt(\"focusout\",\"onBlur\"),Dt(Sm,\"onTransitionRun\"),Dt(pm,\"onTransitionStart\"),Dt(Em,\"onTransitionCancel\"),Dt(hr,\"onTransitionEnd\"),gl(\"onMouseEnter\",[\"mouseout\",\"mouseover\"]),gl(\"onMouseLeave\",[\"mouseout\",\"mouseover\"]),gl(\"onPointerEnter\",[\"pointerout\",\"pointerover\"]),gl(\"onPointerLeave\",[\"pointerout\",\"pointerover\"]),qn(\"onChange\",\"change click focusin focusout input keydown keyup selectionchange\".split(\" \")),qn(\"onSelect\",\"focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange\".split(\" \")),qn(\"onBeforeInput\",[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]),qn(\"onCompositionEnd\",\"compositionend focusout keydown keypress keyup mousedown\".split(\" \")),qn(\"onCompositionStart\",\"compositionstart focusout keydown keypress keyup mousedown\".split(\" \")),qn(\"onCompositionUpdate\",\"compositionupdate focusout keydown keypress keyup mousedown\".split(\" \"));var Ba=\"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting\".split(\" \"),ag=new Set(\"beforetoggle cancel close invalid load scroll scrollend toggle\".split(\" \").concat(Ba));function Dd(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],a=l.event;l=l.listeners;e:{var u=void 0;if(t)for(var s=l.length-1;0<=s;s--){var o=l[s],g=o.instance,C=o.currentTarget;if(o=o.listener,g!==u&&a.isPropagationStopped())break e;u=o,a.currentTarget=C;try{u(a)}catch(w){hu(w)}a.currentTarget=null,u=g}else for(s=0;s<l.length;s++){if(o=l[s],g=o.instance,C=o.currentTarget,o=o.listener,g!==u&&a.isPropagationStopped())break e;u=o,a.currentTarget=C;try{u(a)}catch(w){hu(w)}a.currentTarget=null,u=g}}}}function ve(e,t){var n=t[Ai];n===void 0&&(n=t[Ai]=new Set);var l=e+\"__bubble\";n.has(l)||(Bd(t,e,2,!1),n.add(l))}function df(e,t,n){var l=0;t&&(l|=4),Bd(n,e,l,t)}var Pu=\"_reactListening\"+Math.random().toString(36).slice(2);function hf(e){if(!e[Pu]){e[Pu]=!0,xs.forEach(function(n){n!==\"selectionchange\"&&(ag.has(n)||df(n,!1,e),df(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Pu]||(t[Pu]=!0,df(\"selectionchange\",!1,t))}}function Bd(e,t,n,l){switch(oh(t)){case 2:var a=Rg;break;case 8:a=Ug;break;default:a=xf}n=a.bind(null,t,n,e),a=void 0,!Ri||t!==\"touchstart\"&&t!==\"touchmove\"&&t!==\"wheel\"||(a=!0),l?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function mf(e,t,n,l,a){var u=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var s=l.tag;if(s===3||s===4){var o=l.stateNode.containerInfo;if(o===a)break;if(s===4)for(s=l.return;s!==null;){var g=s.tag;if((g===3||g===4)&&s.stateNode.containerInfo===a)return;s=s.return}for(;o!==null;){if(s=dl(o),s===null)return;if(g=s.tag,g===5||g===6||g===26||g===27){l=u=s;continue e}o=o.parentNode}}l=l.return}Ls(function(){var C=u,w=Mi(n),O=[];e:{var N=mr.get(e);if(N!==void 0){var _=ru,P=e;switch(e){case\"keypress\":if(fu(n)===0)break e;case\"keydown\":case\"keyup\":_=W0;break;case\"focusin\":P=\"focus\",_=Bi;break;case\"focusout\":P=\"blur\",_=Bi;break;case\"beforeblur\":case\"afterblur\":_=Bi;break;case\"click\":if(n.button===2)break e;case\"auxclick\":case\"dblclick\":case\"mousedown\":case\"mousemove\":case\"mouseup\":case\"mouseout\":case\"mouseover\":case\"contextmenu\":_=Xs;break;case\"drag\":case\"dragend\":case\"dragenter\":case\"dragexit\":case\"dragleave\":case\"dragover\":case\"dragstart\":case\"drop\":_=Y0;break;case\"touchcancel\":case\"touchend\":case\"touchmove\":case\"touchstart\":_=em;break;case rr:case or:case dr:_=Q0;break;case hr:_=nm;break;case\"scroll\":case\"scrollend\":_=H0;break;case\"wheel\":_=am;break;case\"copy\":case\"cut\":case\"paste\":_=K0;break;case\"gotpointercapture\":case\"lostpointercapture\":case\"pointercancel\":case\"pointerdown\":case\"pointermove\":case\"pointerout\":case\"pointerover\":case\"pointerup\":_=Zs;break;case\"toggle\":case\"beforetoggle\":_=im}var ie=(t&4)!==0,Ue=!ie&&(e===\"scroll\"||e===\"scrollend\"),T=ie?N!==null?N+\"Capture\":null:N;ie=[];for(var S=C,z;S!==null;){var U=S;if(z=U.stateNode,U=U.tag,U!==5&&U!==26&&U!==27||z===null||T===null||(U=aa(S,T),U!=null&&ie.push(Ha(S,U,z))),Ue)break;S=S.return}0<ie.length&&(N=new _(N,P,null,n,w),O.push({event:N,listeners:ie}))}}if((t&7)===0){e:{if(N=e===\"mouseover\"||e===\"pointerover\",_=e===\"mouseout\"||e===\"pointerout\",N&&n!==_i&&(P=n.relatedTarget||n.fromElement)&&(dl(P)||P[ol]))break e;if((_||N)&&(N=w.window===w?w:(N=w.ownerDocument)?N.defaultView||N.parentWindow:window,_?(P=n.relatedTarget||n.toElement,_=C,P=P?dl(P):null,P!==null&&(Ue=h(P),ie=P.tag,P!==Ue||ie!==5&&ie!==27&&ie!==6)&&(P=null)):(_=null,P=C),_!==P)){if(ie=Xs,U=\"onMouseLeave\",T=\"onMouseEnter\",S=\"mouse\",(e===\"pointerout\"||e===\"pointerover\")&&(ie=Zs,U=\"onPointerLeave\",T=\"onPointerEnter\",S=\"pointer\"),Ue=_==null?N:la(_),z=P==null?N:la(P),N=new ie(U,S+\"leave\",_,n,w),N.target=Ue,N.relatedTarget=z,U=null,dl(w)===C&&(ie=new ie(T,S+\"enter\",P,n,w),ie.target=z,ie.relatedTarget=Ue,U=ie),Ue=U,_&&P)t:{for(ie=ug,T=_,S=P,z=0,U=T;U;U=ie(U))z++;U=0;for(var le=S;le;le=ie(le))U++;for(;0<z-U;)T=ie(T),z--;for(;0<U-z;)S=ie(S),U--;for(;z--;){if(T===S||S!==null&&T===S.alternate){ie=T;break t}T=ie(T),S=ie(S)}ie=null}else ie=null;_!==null&&Hd(O,N,_,ie,!1),P!==null&&Ue!==null&&Hd(O,Ue,P,ie,!0)}}e:{if(N=C?la(C):window,_=N.nodeName&&N.nodeName.toLowerCase(),_===\"select\"||_===\"input\"&&N.type===\"file\")var ze=Ps;else if(Ws(N))if(er)ze=ym;else{ze=mm;var te=hm}else _=N.nodeName,!_||_.toLowerCase()!==\"input\"||N.type!==\"checkbox\"&&N.type!==\"radio\"?C&&xi(C.elementType)&&(ze=Ps):ze=gm;if(ze&&(ze=ze(e,C))){Is(O,ze,n,w);break e}te&&te(e,N,C),e===\"focusout\"&&C&&N.type===\"number\"&&C.memoizedProps.value!=null&&ji(N,\"number\",N.value)}switch(te=C?la(C):window,e){case\"focusin\":(Ws(te)||te.contentEditable===\"true\")&&(El=te,Qi=C,da=null);break;case\"focusout\":da=Qi=El=null;break;case\"mousedown\":Xi=!0;break;case\"contextmenu\":case\"mouseup\":case\"dragend\":Xi=!1,fr(O,n,w);break;case\"selectionchange\":if(bm)break;case\"keydown\":case\"keyup\":fr(O,n,w)}var ge;if(qi)e:{switch(e){case\"compositionstart\":var pe=\"onCompositionStart\";break e;case\"compositionend\":pe=\"onCompositionEnd\";break e;case\"compositionupdate\":pe=\"onCompositionUpdate\";break e}pe=void 0}else pl?$s(e,n)&&(pe=\"onCompositionEnd\"):e===\"keydown\"&&n.keyCode===229&&(pe=\"onCompositionStart\");pe&&(Vs&&n.locale!==\"ko\"&&(pl||pe!==\"onCompositionStart\"?pe===\"onCompositionEnd\"&&pl&&(ge=Gs()):(hn=w,Ui=\"value\"in hn?hn.value:hn.textContent,pl=!0)),te=ei(C,pe),0<te.length&&(pe=new Ks(pe,e,null,n,w),O.push({event:pe,listeners:te}),ge?pe.data=ge:(ge=Fs(n),ge!==null&&(pe.data=ge)))),(ge=fm?sm(e,n):rm(e,n))&&(pe=ei(C,\"onBeforeInput\"),0<pe.length&&(te=new Ks(\"onBeforeInput\",\"beforeinput\",null,n,w),O.push({event:te,listeners:pe}),te.data=ge)),tg(O,e,C,n,w)}Dd(O,t)})}function Ha(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ei(e,t){for(var n=t+\"Capture\",l=[];e!==null;){var a=e,u=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||u===null||(a=aa(e,n),a!=null&&l.unshift(Ha(e,a,u)),a=aa(e,t),a!=null&&l.push(Ha(e,a,u))),e.tag===3)return l;e=e.return}return[]}function ug(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Hd(e,t,n,l,a){for(var u=t._reactName,s=[];n!==null&&n!==l;){var o=n,g=o.alternate,C=o.stateNode;if(o=o.tag,g!==null&&g===l)break;o!==5&&o!==26&&o!==27||C===null||(g=C,a?(C=aa(n,u),C!=null&&s.unshift(Ha(n,C,g))):a||(C=aa(n,u),C!=null&&s.push(Ha(n,C,g)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var ig=/\\\\r\\\\n?/g,cg=/\\\\u0000|\\\\uFFFD/g;function qd(e){return(typeof e==\"string\"?e:\"\"+e).replace(ig,\\`\n\\`).replace(cg,\"\")}function Yd(e,t){return t=qd(t),qd(e)===t}function Re(e,t,n,l,a,u){switch(n){case\"children\":typeof l==\"string\"?t===\"body\"||t===\"textarea\"&&l===\"\"||vl(e,l):(typeof l==\"number\"||typeof l==\"bigint\")&&t!==\"body\"&&vl(e,\"\"+l);break;case\"className\":au(e,\"class\",l);break;case\"tabIndex\":au(e,\"tabindex\",l);break;case\"dir\":case\"role\":case\"viewBox\":case\"width\":case\"height\":au(e,n,l);break;case\"style\":qs(e,l,u);break;case\"data\":if(t!==\"object\"){au(e,\"data\",l);break}case\"src\":case\"href\":if(l===\"\"&&(t!==\"a\"||n!==\"href\")){e.removeAttribute(n);break}if(l==null||typeof l==\"function\"||typeof l==\"symbol\"||typeof l==\"boolean\"){e.removeAttribute(n);break}l=iu(\"\"+l),e.setAttribute(n,l);break;case\"action\":case\"formAction\":if(typeof l==\"function\"){e.setAttribute(n,\"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\\\\\\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')\");break}else typeof u==\"function\"&&(n===\"formAction\"?(t!==\"input\"&&Re(e,t,\"name\",a.name,a,null),Re(e,t,\"formEncType\",a.formEncType,a,null),Re(e,t,\"formMethod\",a.formMethod,a,null),Re(e,t,\"formTarget\",a.formTarget,a,null)):(Re(e,t,\"encType\",a.encType,a,null),Re(e,t,\"method\",a.method,a,null),Re(e,t,\"target\",a.target,a,null)));if(l==null||typeof l==\"symbol\"||typeof l==\"boolean\"){e.removeAttribute(n);break}l=iu(\"\"+l),e.setAttribute(n,l);break;case\"onClick\":l!=null&&(e.onclick=Jt);break;case\"onScroll\":l!=null&&ve(\"scroll\",e);break;case\"onScrollEnd\":l!=null&&ve(\"scrollend\",e);break;case\"dangerouslySetInnerHTML\":if(l!=null){if(typeof l!=\"object\"||!(\"__html\"in l))throw Error(c(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(c(60));e.innerHTML=n}}break;case\"multiple\":e.multiple=l&&typeof l!=\"function\"&&typeof l!=\"symbol\";break;case\"muted\":e.muted=l&&typeof l!=\"function\"&&typeof l!=\"symbol\";break;case\"suppressContentEditableWarning\":case\"suppressHydrationWarning\":case\"defaultValue\":case\"defaultChecked\":case\"innerHTML\":case\"ref\":break;case\"autoFocus\":break;case\"xlinkHref\":if(l==null||typeof l==\"function\"||typeof l==\"boolean\"||typeof l==\"symbol\"){e.removeAttribute(\"xlink:href\");break}n=iu(\"\"+l),e.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",n);break;case\"contentEditable\":case\"spellCheck\":case\"draggable\":case\"value\":case\"autoReverse\":case\"externalResourcesRequired\":case\"focusable\":case\"preserveAlpha\":l!=null&&typeof l!=\"function\"&&typeof l!=\"symbol\"?e.setAttribute(n,\"\"+l):e.removeAttribute(n);break;case\"inert\":case\"allowFullScreen\":case\"async\":case\"autoPlay\":case\"controls\":case\"default\":case\"defer\":case\"disabled\":case\"disablePictureInPicture\":case\"disableRemotePlayback\":case\"formNoValidate\":case\"hidden\":case\"loop\":case\"noModule\":case\"noValidate\":case\"open\":case\"playsInline\":case\"readOnly\":case\"required\":case\"reversed\":case\"scoped\":case\"seamless\":case\"itemScope\":l&&typeof l!=\"function\"&&typeof l!=\"symbol\"?e.setAttribute(n,\"\"):e.removeAttribute(n);break;case\"capture\":case\"download\":l===!0?e.setAttribute(n,\"\"):l!==!1&&l!=null&&typeof l!=\"function\"&&typeof l!=\"symbol\"?e.setAttribute(n,l):e.removeAttribute(n);break;case\"cols\":case\"rows\":case\"size\":case\"span\":l!=null&&typeof l!=\"function\"&&typeof l!=\"symbol\"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case\"rowSpan\":case\"start\":l==null||typeof l==\"function\"||typeof l==\"symbol\"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case\"popover\":ve(\"beforetoggle\",e),ve(\"toggle\",e),lu(e,\"popover\",l);break;case\"xlinkActuate\":Vt(e,\"http://www.w3.org/1999/xlink\",\"xlink:actuate\",l);break;case\"xlinkArcrole\":Vt(e,\"http://www.w3.org/1999/xlink\",\"xlink:arcrole\",l);break;case\"xlinkRole\":Vt(e,\"http://www.w3.org/1999/xlink\",\"xlink:role\",l);break;case\"xlinkShow\":Vt(e,\"http://www.w3.org/1999/xlink\",\"xlink:show\",l);break;case\"xlinkTitle\":Vt(e,\"http://www.w3.org/1999/xlink\",\"xlink:title\",l);break;case\"xlinkType\":Vt(e,\"http://www.w3.org/1999/xlink\",\"xlink:type\",l);break;case\"xmlBase\":Vt(e,\"http://www.w3.org/XML/1998/namespace\",\"xml:base\",l);break;case\"xmlLang\":Vt(e,\"http://www.w3.org/XML/1998/namespace\",\"xml:lang\",l);break;case\"xmlSpace\":Vt(e,\"http://www.w3.org/XML/1998/namespace\",\"xml:space\",l);break;case\"is\":lu(e,\"is\",l);break;case\"innerText\":case\"textContent\":break;default:(!(2<n.length)||n[0]!==\"o\"&&n[0]!==\"O\"||n[1]!==\"n\"&&n[1]!==\"N\")&&(n=D0.get(n)||n,lu(e,n,l))}}function gf(e,t,n,l,a,u){switch(n){case\"style\":qs(e,l,u);break;case\"dangerouslySetInnerHTML\":if(l!=null){if(typeof l!=\"object\"||!(\"__html\"in l))throw Error(c(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(c(60));e.innerHTML=n}}break;case\"children\":typeof l==\"string\"?vl(e,l):(typeof l==\"number\"||typeof l==\"bigint\")&&vl(e,\"\"+l);break;case\"onScroll\":l!=null&&ve(\"scroll\",e);break;case\"onScrollEnd\":l!=null&&ve(\"scrollend\",e);break;case\"onClick\":l!=null&&(e.onclick=Jt);break;case\"suppressContentEditableWarning\":case\"suppressHydrationWarning\":case\"innerHTML\":case\"ref\":break;case\"innerText\":case\"textContent\":break;default:if(!_s.hasOwnProperty(n))e:{if(n[0]===\"o\"&&n[1]===\"n\"&&(a=n.endsWith(\"Capture\"),t=n.slice(2,a?n.length-7:void 0),u=e[ct]||null,u=u!=null?u[n]:null,typeof u==\"function\"&&e.removeEventListener(t,u,a),typeof l==\"function\")){typeof u!=\"function\"&&u!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,a);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,\"\"):lu(e,n,l)}}}function tt(e,t,n){switch(t){case\"div\":case\"span\":case\"svg\":case\"path\":case\"a\":case\"g\":case\"p\":case\"li\":break;case\"img\":ve(\"error\",e),ve(\"load\",e);var l=!1,a=!1,u;for(u in n)if(n.hasOwnProperty(u)){var s=n[u];if(s!=null)switch(u){case\"src\":l=!0;break;case\"srcSet\":a=!0;break;case\"children\":case\"dangerouslySetInnerHTML\":throw Error(c(137,t));default:Re(e,t,u,s,n,null)}}a&&Re(e,t,\"srcSet\",n.srcSet,n,null),l&&Re(e,t,\"src\",n.src,n,null);return;case\"input\":ve(\"invalid\",e);var o=u=s=a=null,g=null,C=null;for(l in n)if(n.hasOwnProperty(l)){var w=n[l];if(w!=null)switch(l){case\"name\":a=w;break;case\"type\":s=w;break;case\"checked\":g=w;break;case\"defaultChecked\":C=w;break;case\"value\":u=w;break;case\"defaultValue\":o=w;break;case\"children\":case\"dangerouslySetInnerHTML\":if(w!=null)throw Error(c(137,t));break;default:Re(e,t,l,w,n,null)}}Os(e,u,o,g,C,s,a,!1);return;case\"select\":ve(\"invalid\",e),l=s=u=null;for(a in n)if(n.hasOwnProperty(a)&&(o=n[a],o!=null))switch(a){case\"value\":u=o;break;case\"defaultValue\":s=o;break;case\"multiple\":l=o;default:Re(e,t,a,o,n,null)}t=u,n=s,e.multiple=!!l,t!=null?yl(e,!!l,t,!1):n!=null&&yl(e,!!l,n,!0);return;case\"textarea\":ve(\"invalid\",e),u=a=l=null;for(s in n)if(n.hasOwnProperty(s)&&(o=n[s],o!=null))switch(s){case\"value\":l=o;break;case\"defaultValue\":a=o;break;case\"children\":u=o;break;case\"dangerouslySetInnerHTML\":if(o!=null)throw Error(c(91));break;default:Re(e,t,s,o,n,null)}Bs(e,l,a,u);return;case\"option\":for(g in n)if(n.hasOwnProperty(g)&&(l=n[g],l!=null))switch(g){case\"selected\":e.selected=l&&typeof l!=\"function\"&&typeof l!=\"symbol\";break;default:Re(e,t,g,l,n,null)}return;case\"dialog\":ve(\"beforetoggle\",e),ve(\"toggle\",e),ve(\"cancel\",e),ve(\"close\",e);break;case\"iframe\":case\"object\":ve(\"load\",e);break;case\"video\":case\"audio\":for(l=0;l<Ba.length;l++)ve(Ba[l],e);break;case\"image\":ve(\"error\",e),ve(\"load\",e);break;case\"details\":ve(\"toggle\",e);break;case\"embed\":case\"source\":case\"link\":ve(\"error\",e),ve(\"load\",e);case\"area\":case\"base\":case\"br\":case\"col\":case\"hr\":case\"keygen\":case\"meta\":case\"param\":case\"track\":case\"wbr\":case\"menuitem\":for(C in n)if(n.hasOwnProperty(C)&&(l=n[C],l!=null))switch(C){case\"children\":case\"dangerouslySetInnerHTML\":throw Error(c(137,t));default:Re(e,t,C,l,n,null)}return;default:if(xi(t)){for(w in n)n.hasOwnProperty(w)&&(l=n[w],l!==void 0&&gf(e,t,w,l,n,void 0));return}}for(o in n)n.hasOwnProperty(o)&&(l=n[o],l!=null&&Re(e,t,o,l,n,null))}function fg(e,t,n,l){switch(t){case\"div\":case\"span\":case\"svg\":case\"path\":case\"a\":case\"g\":case\"p\":case\"li\":break;case\"input\":var a=null,u=null,s=null,o=null,g=null,C=null,w=null;for(_ in n){var O=n[_];if(n.hasOwnProperty(_)&&O!=null)switch(_){case\"checked\":break;case\"value\":break;case\"defaultValue\":g=O;default:l.hasOwnProperty(_)||Re(e,t,_,null,l,O)}}for(var N in l){var _=l[N];if(O=n[N],l.hasOwnProperty(N)&&(_!=null||O!=null))switch(N){case\"type\":u=_;break;case\"name\":a=_;break;case\"checked\":C=_;break;case\"defaultChecked\":w=_;break;case\"value\":s=_;break;case\"defaultValue\":o=_;break;case\"children\":case\"dangerouslySetInnerHTML\":if(_!=null)throw Error(c(137,t));break;default:_!==O&&Re(e,t,N,_,l,O)}}Ni(e,s,o,g,C,w,u,a);return;case\"select\":_=s=o=N=null;for(u in n)if(g=n[u],n.hasOwnProperty(u)&&g!=null)switch(u){case\"value\":break;case\"multiple\":_=g;default:l.hasOwnProperty(u)||Re(e,t,u,null,l,g)}for(a in l)if(u=l[a],g=n[a],l.hasOwnProperty(a)&&(u!=null||g!=null))switch(a){case\"value\":N=u;break;case\"defaultValue\":o=u;break;case\"multiple\":s=u;default:u!==g&&Re(e,t,a,u,l,g)}t=o,n=s,l=_,N!=null?yl(e,!!n,N,!1):!!l!=!!n&&(t!=null?yl(e,!!n,t,!0):yl(e,!!n,n?[]:\"\",!1));return;case\"textarea\":_=N=null;for(o in n)if(a=n[o],n.hasOwnProperty(o)&&a!=null&&!l.hasOwnProperty(o))switch(o){case\"value\":break;case\"children\":break;default:Re(e,t,o,null,l,a)}for(s in l)if(a=l[s],u=n[s],l.hasOwnProperty(s)&&(a!=null||u!=null))switch(s){case\"value\":N=a;break;case\"defaultValue\":_=a;break;case\"children\":break;case\"dangerouslySetInnerHTML\":if(a!=null)throw Error(c(91));break;default:a!==u&&Re(e,t,s,a,l,u)}Ds(e,N,_);return;case\"option\":for(var P in n)if(N=n[P],n.hasOwnProperty(P)&&N!=null&&!l.hasOwnProperty(P))switch(P){case\"selected\":e.selected=!1;break;default:Re(e,t,P,null,l,N)}for(g in l)if(N=l[g],_=n[g],l.hasOwnProperty(g)&&N!==_&&(N!=null||_!=null))switch(g){case\"selected\":e.selected=N&&typeof N!=\"function\"&&typeof N!=\"symbol\";break;default:Re(e,t,g,N,l,_)}return;case\"img\":case\"link\":case\"area\":case\"base\":case\"br\":case\"col\":case\"embed\":case\"hr\":case\"keygen\":case\"meta\":case\"param\":case\"source\":case\"track\":case\"wbr\":case\"menuitem\":for(var ie in n)N=n[ie],n.hasOwnProperty(ie)&&N!=null&&!l.hasOwnProperty(ie)&&Re(e,t,ie,null,l,N);for(C in l)if(N=l[C],_=n[C],l.hasOwnProperty(C)&&N!==_&&(N!=null||_!=null))switch(C){case\"children\":case\"dangerouslySetInnerHTML\":if(N!=null)throw Error(c(137,t));break;default:Re(e,t,C,N,l,_)}return;default:if(xi(t)){for(var Ue in n)N=n[Ue],n.hasOwnProperty(Ue)&&N!==void 0&&!l.hasOwnProperty(Ue)&&gf(e,t,Ue,void 0,l,N);for(w in l)N=l[w],_=n[w],!l.hasOwnProperty(w)||N===_||N===void 0&&_===void 0||gf(e,t,w,N,l,_);return}}for(var T in n)N=n[T],n.hasOwnProperty(T)&&N!=null&&!l.hasOwnProperty(T)&&Re(e,t,T,null,l,N);for(O in l)N=l[O],_=n[O],!l.hasOwnProperty(O)||N===_||N==null&&_==null||Re(e,t,O,N,l,_)}function Ld(e){switch(e){case\"css\":case\"script\":case\"font\":case\"img\":case\"image\":case\"input\":case\"link\":return!0;default:return!1}}function sg(){if(typeof performance.getEntriesByType==\"function\"){for(var e=0,t=0,n=performance.getEntriesByType(\"resource\"),l=0;l<n.length;l++){var a=n[l],u=a.transferSize,s=a.initiatorType,o=a.duration;if(u&&o&&Ld(s)){for(s=0,o=a.responseEnd,l+=1;l<n.length;l++){var g=n[l],C=g.startTime;if(C>o)break;var w=g.transferSize,O=g.initiatorType;w&&Ld(O)&&(g=g.responseEnd,s+=w*(g<o?1:(o-C)/(g-C)))}if(--l,t+=8*(u+s)/(a.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==\"number\")?e:5}var yf=null,vf=null;function ti(e){return e.nodeType===9?e:e.ownerDocument}function Gd(e){switch(e){case\"http://www.w3.org/2000/svg\":return 1;case\"http://www.w3.org/1998/Math/MathML\":return 2;default:return 0}}function Qd(e,t){if(e===0)switch(t){case\"svg\":return 1;case\"math\":return 2;default:return 0}return e===1&&t===\"foreignObject\"?0:e}function bf(e,t){return e===\"textarea\"||e===\"noscript\"||typeof t.children==\"string\"||typeof t.children==\"number\"||typeof t.children==\"bigint\"||typeof t.dangerouslySetInnerHTML==\"object\"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Sf=null;function rg(){var e=window.event;return e&&e.type===\"popstate\"?e===Sf?!1:(Sf=e,!0):(Sf=null,!1)}var Xd=typeof setTimeout==\"function\"?setTimeout:void 0,og=typeof clearTimeout==\"function\"?clearTimeout:void 0,Kd=typeof Promise==\"function\"?Promise:void 0,dg=typeof queueMicrotask==\"function\"?queueMicrotask:typeof Kd<\"u\"?function(e){return Kd.resolve(null).then(e).catch(hg)}:Xd;function hg(e){setTimeout(function(){throw e})}function Mn(e){return e===\"head\"}function Zd(e,t){var n=t,l=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n===\"/$\"||n===\"/&\"){if(l===0){e.removeChild(a),kl(t);return}l--}else if(n===\"$\"||n===\"$?\"||n===\"$~\"||n===\"$!\"||n===\"&\")l++;else if(n===\"html\")qa(e.ownerDocument.documentElement);else if(n===\"head\"){n=e.ownerDocument.head,qa(n);for(var u=n.firstChild;u;){var s=u.nextSibling,o=u.nodeName;u[na]||o===\"SCRIPT\"||o===\"STYLE\"||o===\"LINK\"&&u.rel.toLowerCase()===\"stylesheet\"||n.removeChild(u),u=s}}else n===\"body\"&&qa(e.ownerDocument.body);n=a}while(n);kl(t)}function Vd(e,t){var n=e;e=0;do{var l=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=\"none\"):(n.style.display=n._stashedDisplay||\"\",n.getAttribute(\"style\")===\"\"&&n.removeAttribute(\"style\")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=\"\"):n.nodeValue=n._stashedText||\"\"),l&&l.nodeType===8)if(n=l.data,n===\"/$\"){if(e===0)break;e--}else n!==\"$\"&&n!==\"$?\"&&n!==\"$~\"&&n!==\"$!\"||e++;n=l}while(n)}function pf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case\"HTML\":case\"HEAD\":case\"BODY\":pf(n),zi(n);continue;case\"SCRIPT\":case\"STYLE\":continue;case\"LINK\":if(n.rel.toLowerCase()===\"stylesheet\")continue}e.removeChild(n)}}function mg(e,t,n,l){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!==\"INPUT\"||e.type!==\"hidden\"))break}else if(l){if(!e[na])switch(t){case\"meta\":if(!e.hasAttribute(\"itemprop\"))break;return e;case\"link\":if(u=e.getAttribute(\"rel\"),u===\"stylesheet\"&&e.hasAttribute(\"data-precedence\"))break;if(u!==a.rel||e.getAttribute(\"href\")!==(a.href==null||a.href===\"\"?null:a.href)||e.getAttribute(\"crossorigin\")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute(\"title\")!==(a.title==null?null:a.title))break;return e;case\"style\":if(e.hasAttribute(\"data-precedence\"))break;return e;case\"script\":if(u=e.getAttribute(\"src\"),(u!==(a.src==null?null:a.src)||e.getAttribute(\"type\")!==(a.type==null?null:a.type)||e.getAttribute(\"crossorigin\")!==(a.crossOrigin==null?null:a.crossOrigin))&&u&&e.hasAttribute(\"async\")&&!e.hasAttribute(\"itemprop\"))break;return e;default:return e}}else if(t===\"input\"&&e.type===\"hidden\"){var u=a.name==null?null:\"\"+a.name;if(a.type===\"hidden\"&&e.getAttribute(\"name\")===u)return e}else return e;if(e=Ut(e.nextSibling),e===null)break}return null}function gg(e,t,n){if(t===\"\")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==\"INPUT\"||e.type!==\"hidden\")&&!n||(e=Ut(e.nextSibling),e===null))return null;return e}function Jd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==\"INPUT\"||e.type!==\"hidden\")&&!t||(e=Ut(e.nextSibling),e===null))return null;return e}function Ef(e){return e.data===\"$?\"||e.data===\"$~\"}function Tf(e){return e.data===\"$!\"||e.data===\"$?\"&&e.ownerDocument.readyState!==\"loading\"}function yg(e,t){var n=e.ownerDocument;if(e.data===\"$~\")e._reactRetry=t;else if(e.data!==\"$?\"||n.readyState!==\"loading\")t();else{var l=function(){t(),n.removeEventListener(\"DOMContentLoaded\",l)};n.addEventListener(\"DOMContentLoaded\",l),e._reactRetry=l}}function Ut(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===\"$\"||t===\"$!\"||t===\"$?\"||t===\"$~\"||t===\"&\"||t===\"F!\"||t===\"F\")break;if(t===\"/$\"||t===\"/&\")return null}}return e}var Af=null;function kd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===\"/$\"||n===\"/&\"){if(t===0)return Ut(e.nextSibling);t--}else n!==\"$\"&&n!==\"$!\"&&n!==\"$?\"&&n!==\"$~\"&&n!==\"&\"||t++}e=e.nextSibling}return null}function $d(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===\"$\"||n===\"$!\"||n===\"$?\"||n===\"$~\"||n===\"&\"){if(t===0)return e;t--}else n!==\"/$\"&&n!==\"/&\"||t++}e=e.previousSibling}return null}function Fd(e,t,n){switch(t=ti(n),e){case\"html\":if(e=t.documentElement,!e)throw Error(c(452));return e;case\"head\":if(e=t.head,!e)throw Error(c(453));return e;case\"body\":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function qa(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);zi(e)}var Ot=new Map,Wd=new Set;function ni(e){return typeof e.getRootNode==\"function\"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var rn=G.d;G.d={f:vg,r:bg,D:Sg,C:pg,L:Eg,m:Tg,X:zg,S:Ag,M:Cg};function vg(){var e=rn.f(),t=Ju();return e||t}function bg(e){var t=hl(e);t!==null&&t.tag===5&&t.type===\"form\"?mo(t):rn.r(e)}var Zl=typeof document>\"u\"?null:document;function Id(e,t,n){var l=Zl;if(l&&typeof t==\"string\"&&t){var a=Nt(t);a='link[rel=\"'+e+'\"][href=\"'+a+'\"]',typeof n==\"string\"&&(a+='[crossorigin=\"'+n+'\"]'),Wd.has(a)||(Wd.add(a),e={rel:e,crossOrigin:n,href:t},l.querySelector(a)===null&&(t=l.createElement(\"link\"),tt(t,\"link\",e),$e(t),l.head.appendChild(t)))}}function Sg(e){rn.D(e),Id(\"dns-prefetch\",e,null)}function pg(e,t){rn.C(e,t),Id(\"preconnect\",e,t)}function Eg(e,t,n){rn.L(e,t,n);var l=Zl;if(l&&e&&t){var a='link[rel=\"preload\"][as=\"'+Nt(t)+'\"]';t===\"image\"&&n&&n.imageSrcSet?(a+='[imagesrcset=\"'+Nt(n.imageSrcSet)+'\"]',typeof n.imageSizes==\"string\"&&(a+='[imagesizes=\"'+Nt(n.imageSizes)+'\"]')):a+='[href=\"'+Nt(e)+'\"]';var u=a;switch(t){case\"style\":u=Vl(e);break;case\"script\":u=Jl(e)}Ot.has(u)||(e=E({rel:\"preload\",href:t===\"image\"&&n&&n.imageSrcSet?void 0:e,as:t},n),Ot.set(u,e),l.querySelector(a)!==null||t===\"style\"&&l.querySelector(Ya(u))||t===\"script\"&&l.querySelector(La(u))||(t=l.createElement(\"link\"),tt(t,\"link\",e),$e(t),l.head.appendChild(t)))}}function Tg(e,t){rn.m(e,t);var n=Zl;if(n&&e){var l=t&&typeof t.as==\"string\"?t.as:\"script\",a='link[rel=\"modulepreload\"][as=\"'+Nt(l)+'\"][href=\"'+Nt(e)+'\"]',u=a;switch(l){case\"audioworklet\":case\"paintworklet\":case\"serviceworker\":case\"sharedworker\":case\"worker\":case\"script\":u=Jl(e)}if(!Ot.has(u)&&(e=E({rel:\"modulepreload\",href:e},t),Ot.set(u,e),n.querySelector(a)===null)){switch(l){case\"audioworklet\":case\"paintworklet\":case\"serviceworker\":case\"sharedworker\":case\"worker\":case\"script\":if(n.querySelector(La(u)))return}l=n.createElement(\"link\"),tt(l,\"link\",e),$e(l),n.head.appendChild(l)}}}function Ag(e,t,n){rn.S(e,t,n);var l=Zl;if(l&&e){var a=ml(l).hoistableStyles,u=Vl(e);t=t||\"default\";var s=a.get(u);if(!s){var o={loading:0,preload:null};if(s=l.querySelector(Ya(u)))o.loading=5;else{e=E({rel:\"stylesheet\",href:e,\"data-precedence\":t},n),(n=Ot.get(u))&&zf(e,n);var g=s=l.createElement(\"link\");$e(g),tt(g,\"link\",e),g._p=new Promise(function(C,w){g.onload=C,g.onerror=w}),g.addEventListener(\"load\",function(){o.loading|=1}),g.addEventListener(\"error\",function(){o.loading|=2}),o.loading|=4,li(s,t,l)}s={type:\"stylesheet\",instance:s,count:1,state:o},a.set(u,s)}}}function zg(e,t){rn.X(e,t);var n=Zl;if(n&&e){var l=ml(n).hoistableScripts,a=Jl(e),u=l.get(a);u||(u=n.querySelector(La(a)),u||(e=E({src:e,async:!0},t),(t=Ot.get(a))&&Cf(e,t),u=n.createElement(\"script\"),$e(u),tt(u,\"link\",e),n.head.appendChild(u)),u={type:\"script\",instance:u,count:1,state:null},l.set(a,u))}}function Cg(e,t){rn.M(e,t);var n=Zl;if(n&&e){var l=ml(n).hoistableScripts,a=Jl(e),u=l.get(a);u||(u=n.querySelector(La(a)),u||(e=E({src:e,async:!0,type:\"module\"},t),(t=Ot.get(a))&&Cf(e,t),u=n.createElement(\"script\"),$e(u),tt(u,\"link\",e),n.head.appendChild(u)),u={type:\"script\",instance:u,count:1,state:null},l.set(a,u))}}function Pd(e,t,n,l){var a=(a=re.current)?ni(a):null;if(!a)throw Error(c(446));switch(e){case\"meta\":case\"title\":return null;case\"style\":return typeof n.precedence==\"string\"&&typeof n.href==\"string\"?(t=Vl(n.href),n=ml(a).hoistableStyles,l=n.get(t),l||(l={type:\"style\",instance:null,count:0,state:null},n.set(t,l)),l):{type:\"void\",instance:null,count:0,state:null};case\"link\":if(n.rel===\"stylesheet\"&&typeof n.href==\"string\"&&typeof n.precedence==\"string\"){e=Vl(n.href);var u=ml(a).hoistableStyles,s=u.get(e);if(s||(a=a.ownerDocument||a,s={type:\"stylesheet\",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,s),(u=a.querySelector(Ya(e)))&&!u._p&&(s.instance=u,s.state.loading=5),Ot.has(e)||(n={rel:\"preload\",as:\"style\",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ot.set(e,n),u||Ng(a,e,n,s.state))),t&&l===null)throw Error(c(528,\"\"));return s}if(t&&l!==null)throw Error(c(529,\"\"));return null;case\"script\":return t=n.async,n=n.src,typeof n==\"string\"&&t&&typeof t!=\"function\"&&typeof t!=\"symbol\"?(t=Jl(n),n=ml(a).hoistableScripts,l=n.get(t),l||(l={type:\"script\",instance:null,count:0,state:null},n.set(t,l)),l):{type:\"void\",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function Vl(e){return'href=\"'+Nt(e)+'\"'}function Ya(e){return'link[rel=\"stylesheet\"]['+e+\"]\"}function eh(e){return E({},e,{\"data-precedence\":e.precedence,precedence:null})}function Ng(e,t,n,l){e.querySelector('link[rel=\"preload\"][as=\"style\"]['+t+\"]\")?l.loading=1:(t=e.createElement(\"link\"),l.preload=t,t.addEventListener(\"load\",function(){return l.loading|=1}),t.addEventListener(\"error\",function(){return l.loading|=2}),tt(t,\"link\",n),$e(t),e.head.appendChild(t))}function Jl(e){return'[src=\"'+Nt(e)+'\"]'}function La(e){return\"script[async]\"+e}function th(e,t,n){if(t.count++,t.instance===null)switch(t.type){case\"style\":var l=e.querySelector('style[data-href~=\"'+Nt(n.href)+'\"]');if(l)return t.instance=l,$e(l),l;var a=E({},n,{\"data-href\":n.href,\"data-precedence\":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement(\"style\"),$e(l),tt(l,\"style\",a),li(l,n.precedence,e),t.instance=l;case\"stylesheet\":a=Vl(n.href);var u=e.querySelector(Ya(a));if(u)return t.state.loading|=4,t.instance=u,$e(u),u;l=eh(n),(a=Ot.get(a))&&zf(l,a),u=(e.ownerDocument||e).createElement(\"link\"),$e(u);var s=u;return s._p=new Promise(function(o,g){s.onload=o,s.onerror=g}),tt(u,\"link\",l),t.state.loading|=4,li(u,n.precedence,e),t.instance=u;case\"script\":return u=Jl(n.src),(a=e.querySelector(La(u)))?(t.instance=a,$e(a),a):(l=n,(a=Ot.get(u))&&(l=E({},n),Cf(l,a)),e=e.ownerDocument||e,a=e.createElement(\"script\"),$e(a),tt(a,\"link\",l),e.head.appendChild(a),t.instance=a);case\"void\":return null;default:throw Error(c(443,t.type))}else t.type===\"stylesheet\"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,li(l,n.precedence,e));return t.instance}function li(e,t,n){for(var l=n.querySelectorAll('link[rel=\"stylesheet\"][data-precedence],style[data-precedence]'),a=l.length?l[l.length-1]:null,u=a,s=0;s<l.length;s++){var o=l[s];if(o.dataset.precedence===t)u=o;else if(u!==a)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function zf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Cf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ai=null;function nh(e,t,n){if(ai===null){var l=new Map,a=ai=new Map;a.set(n,l)}else a=ai,l=a.get(n),l||(l=new Map,a.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var u=n[a];if(!(u[na]||u[We]||e===\"link\"&&u.getAttribute(\"rel\")===\"stylesheet\")&&u.namespaceURI!==\"http://www.w3.org/2000/svg\"){var s=u.getAttribute(t)||\"\";s=e+s;var o=l.get(s);o?o.push(u):l.set(s,[u])}}return l}function lh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===\"title\"?e.querySelector(\"head > title\"):null)}function jg(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case\"meta\":case\"title\":return!0;case\"style\":if(typeof t.precedence!=\"string\"||typeof t.href!=\"string\"||t.href===\"\")break;return!0;case\"link\":if(typeof t.rel!=\"string\"||typeof t.href!=\"string\"||t.href===\"\"||t.onLoad||t.onError)break;switch(t.rel){case\"stylesheet\":return e=t.disabled,typeof t.precedence==\"string\"&&e==null;default:return!0}case\"script\":if(t.async&&typeof t.async!=\"function\"&&typeof t.async!=\"symbol\"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==\"string\")return!0}return!1}function ah(e){return!(e.type===\"stylesheet\"&&(e.state.loading&3)===0)}function xg(e,t,n,l){if(n.type===\"stylesheet\"&&(typeof l.media!=\"string\"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var a=Vl(l.href),u=t.querySelector(Ya(a));if(u){t=u._p,t!==null&&typeof t==\"object\"&&typeof t.then==\"function\"&&(e.count++,e=ui.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=u,$e(u);return}u=t.ownerDocument||t,l=eh(l),(a=Ot.get(a))&&zf(l,a),u=u.createElement(\"link\"),$e(u);var s=u;s._p=new Promise(function(o,g){s.onload=o,s.onerror=g}),tt(u,\"link\",l),n.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=ui.bind(e),t.addEventListener(\"load\",n),t.addEventListener(\"error\",n))}}var Nf=0;function _g(e,t){return e.stylesheets&&e.count===0&&ci(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&ci(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Nf===0&&(Nf=62500*sg());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ci(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Nf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(a)}}:null}function ui(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ci(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ii=null;function ci(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ii=new Map,t.forEach(Mg,e),ii=null,ui.call(e))}function Mg(e,t){if(!(t.state.loading&4)){var n=ii.get(e);if(n)var l=n.get(null);else{n=new Map,ii.set(e,n);for(var a=e.querySelectorAll(\"link[data-precedence],style[data-precedence]\"),u=0;u<a.length;u++){var s=a[u];(s.nodeName===\"LINK\"||s.getAttribute(\"media\")!==\"not all\")&&(n.set(s.dataset.precedence,s),l=s)}l&&n.set(null,l)}a=t.instance,s=a.getAttribute(\"data-precedence\"),u=n.get(s)||l,u===l&&n.set(null,a),n.set(s,a),this.count++,l=ui.bind(this),a.addEventListener(\"load\",l),a.addEventListener(\"error\",l),u?u.parentNode.insertBefore(a,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var Ga={$$typeof:I,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function wg(e,t,n,l,a,u,s,o,g){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=pi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pi(0),this.hiddenUpdates=pi(null),this.identifierPrefix=l,this.onUncaughtError=a,this.onCaughtError=u,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=g,this.incompleteTransitions=new Map}function uh(e,t,n,l,a,u,s,o,g,C,w,O){return e=new wg(e,t,n,s,g,C,w,O,o),t=1,u===!0&&(t|=24),u=vt(3,null,null,t),e.current=u,u.stateNode=e,t=ac(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:l,isDehydrated:n,cache:t},fc(u),e}function ih(e){return e?(e=zl,e):zl}function ch(e,t,n,l,a,u){a=ih(a),l.context===null?l.context=a:l.pendingContext=a,l=Sn(t),l.payload={element:n},u=u===void 0?null:u,u!==null&&(l.callback=u),n=pn(e,l,t),n!==null&&(ht(n,e,t),Sa(n,e,t))}function fh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function jf(e,t){fh(e,t),(e=e.alternate)&&fh(e,t)}function sh(e){if(e.tag===13||e.tag===31){var t=Qn(e,67108864);t!==null&&ht(t,e,67108864),jf(e,67108864)}}function rh(e){if(e.tag===13||e.tag===31){var t=Tt();t=Ei(t);var n=Qn(e,t);n!==null&&ht(n,e,t),jf(e,t)}}var fi=!0;function Rg(e,t,n,l){var a=M.T;M.T=null;var u=G.p;try{G.p=2,xf(e,t,n,l)}finally{G.p=u,M.T=a}}function Ug(e,t,n,l){var a=M.T;M.T=null;var u=G.p;try{G.p=8,xf(e,t,n,l)}finally{G.p=u,M.T=a}}function xf(e,t,n,l){if(fi){var a=_f(l);if(a===null)mf(e,t,l,si,n),dh(e,l);else if(Dg(a,e,t,n,l))l.stopPropagation();else if(dh(e,l),t&4&&-1<Og.indexOf(e)){for(;a!==null;){var u=hl(a);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var s=Hn(u.pendingLanes);if(s!==0){var o=u;for(o.pendingLanes|=2,o.entangledLanes|=2;s;){var g=1<<31-gt(s);o.entanglements[1]|=g,s&=~g}Qt(u),(je&6)===0&&(Zu=ut()+500,Da(0))}}break;case 31:case 13:o=Qn(u,2),o!==null&&ht(o,u,2),Ju(),jf(u,2)}if(u=_f(l),u===null&&mf(e,t,l,si,n),u===a)break;a=u}a!==null&&l.stopPropagation()}else mf(e,t,l,null,n)}}function _f(e){return e=Mi(e),Mf(e)}var si=null;function Mf(e){if(si=null,e=dl(e),e!==null){var t=h(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=v(t),e!==null)return e;e=null}else if(n===31){if(e=A(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return si=e,null}function oh(e){switch(e){case\"beforetoggle\":case\"cancel\":case\"click\":case\"close\":case\"contextmenu\":case\"copy\":case\"cut\":case\"auxclick\":case\"dblclick\":case\"dragend\":case\"dragstart\":case\"drop\":case\"focusin\":case\"focusout\":case\"input\":case\"invalid\":case\"keydown\":case\"keypress\":case\"keyup\":case\"mousedown\":case\"mouseup\":case\"paste\":case\"pause\":case\"play\":case\"pointercancel\":case\"pointerdown\":case\"pointerup\":case\"ratechange\":case\"reset\":case\"resize\":case\"seeked\":case\"submit\":case\"toggle\":case\"touchcancel\":case\"touchend\":case\"touchstart\":case\"volumechange\":case\"change\":case\"selectionchange\":case\"textInput\":case\"compositionstart\":case\"compositionend\":case\"compositionupdate\":case\"beforeblur\":case\"afterblur\":case\"beforeinput\":case\"blur\":case\"fullscreenchange\":case\"focus\":case\"hashchange\":case\"popstate\":case\"select\":case\"selectstart\":return 2;case\"drag\":case\"dragenter\":case\"dragexit\":case\"dragleave\":case\"dragover\":case\"mousemove\":case\"mouseout\":case\"mouseover\":case\"pointermove\":case\"pointerout\":case\"pointerover\":case\"scroll\":case\"touchmove\":case\"wheel\":case\"mouseenter\":case\"mouseleave\":case\"pointerenter\":case\"pointerleave\":return 8;case\"message\":switch(B()){case k:return 2;case he:return 8;case De:case lt:return 32;case rl:return 268435456;default:return 32}default:return 32}}var wf=!1,wn=null,Rn=null,Un=null,Qa=new Map,Xa=new Map,On=[],Og=\"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset\".split(\" \");function dh(e,t){switch(e){case\"focusin\":case\"focusout\":wn=null;break;case\"dragenter\":case\"dragleave\":Rn=null;break;case\"mouseover\":case\"mouseout\":Un=null;break;case\"pointerover\":case\"pointerout\":Qa.delete(t.pointerId);break;case\"gotpointercapture\":case\"lostpointercapture\":Xa.delete(t.pointerId)}}function Ka(e,t,n,l,a,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:u,targetContainers:[a]},t!==null&&(t=hl(t),t!==null&&sh(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Dg(e,t,n,l,a){switch(t){case\"focusin\":return wn=Ka(wn,e,t,n,l,a),!0;case\"dragenter\":return Rn=Ka(Rn,e,t,n,l,a),!0;case\"mouseover\":return Un=Ka(Un,e,t,n,l,a),!0;case\"pointerover\":var u=a.pointerId;return Qa.set(u,Ka(Qa.get(u)||null,e,t,n,l,a)),!0;case\"gotpointercapture\":return u=a.pointerId,Xa.set(u,Ka(Xa.get(u)||null,e,t,n,l,a)),!0}return!1}function hh(e){var t=dl(e.target);if(t!==null){var n=h(t);if(n!==null){if(t=n.tag,t===13){if(t=v(n),t!==null){e.blockedOn=t,Ns(e.priority,function(){rh(n)});return}}else if(t===31){if(t=A(n),t!==null){e.blockedOn=t,Ns(e.priority,function(){rh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ri(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=_f(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);_i=l,n.target.dispatchEvent(l),_i=null}else return t=hl(n),t!==null&&sh(t),e.blockedOn=n,!1;t.shift()}return!0}function mh(e,t,n){ri(e)&&n.delete(t)}function Bg(){wf=!1,wn!==null&&ri(wn)&&(wn=null),Rn!==null&&ri(Rn)&&(Rn=null),Un!==null&&ri(Un)&&(Un=null),Qa.forEach(mh),Xa.forEach(mh)}function oi(e,t){e.blockedOn===t&&(e.blockedOn=null,wf||(wf=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Bg)))}var di=null;function gh(e){di!==e&&(di=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){di===e&&(di=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],a=e[t+2];if(typeof l!=\"function\"){if(Mf(l||n)===null)continue;break}var u=hl(n);u!==null&&(e.splice(t,3),t-=3,xc(u,{pending:!0,data:a,method:n.method,action:l},l,a))}}))}function kl(e){function t(g){return oi(g,e)}wn!==null&&oi(wn,e),Rn!==null&&oi(Rn,e),Un!==null&&oi(Un,e),Qa.forEach(t),Xa.forEach(t);for(var n=0;n<On.length;n++){var l=On[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<On.length&&(n=On[0],n.blockedOn===null);)hh(n),n.blockedOn===null&&On.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var a=n[l],u=n[l+1],s=a[ct]||null;if(typeof u==\"function\")s||gh(n);else if(s){var o=null;if(u&&u.hasAttribute(\"formAction\")){if(a=u,s=u[ct]||null)o=s.formAction;else if(Mf(a)!==null)continue}else o=s.action;typeof o==\"function\"?n[l+1]=o:(n.splice(l,3),l-=3),gh(n)}}}function yh(){function e(u){u.canIntercept&&u.info===\"react-transition\"&&u.intercept({handler:function(){return new Promise(function(s){return a=s})},focusReset:\"manual\",scroll:\"manual\"})}function t(){a!==null&&(a(),a=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:\"react-transition\",history:\"replace\"})}}if(typeof navigation==\"object\"){var l=!1,a=null;return navigation.addEventListener(\"navigate\",e),navigation.addEventListener(\"navigatesuccess\",t),navigation.addEventListener(\"navigateerror\",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener(\"navigate\",e),navigation.removeEventListener(\"navigatesuccess\",t),navigation.removeEventListener(\"navigateerror\",t),a!==null&&(a(),a=null)}}}function Rf(e){this._internalRoot=e}hi.prototype.render=Rf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var n=t.current,l=Tt();ch(n,l,e,t,null,null)},hi.prototype.unmount=Rf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ch(e.current,2,null,e,null,null),Ju(),t[ol]=null}};function hi(e){this._internalRoot=e}hi.prototype.unstable_scheduleHydration=function(e){if(e){var t=Cs();e={blockedOn:null,target:e,priority:t};for(var n=0;n<On.length&&t!==0&&t<On[n].priority;n++);On.splice(n,0,e),n===0&&hh(e)}};var vh=f.version;if(vh!==\"19.2.8\")throw Error(c(527,vh,\"19.2.8\"));G.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==\"function\"?Error(c(188)):(e=Object.keys(e).join(\",\"),Error(c(268,e)));return e=y(t),e=e!==null?j(e):null,e=e===null?null:e.stateNode,e};var Hg={bundleType:0,version:\"19.2.8\",rendererPackageName:\"react-dom\",currentDispatcherRef:M,reconcilerVersion:\"19.2.8\"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<\"u\"){var mi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mi.isDisabled&&mi.supportsFiber)try{Pl=mi.inject(Hg),mt=mi}catch{}}return Va.createRoot=function(e,t){if(!d(e))throw Error(c(299));var n=!1,l=\"\",a=zo,u=Co,s=No;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=uh(e,1,!1,null,null,n,l,null,a,u,s,yh),e[ol]=t.current,hf(e),new Rf(t)},Va.hydrateRoot=function(e,t,n){if(!d(e))throw Error(c(299));var l=!1,a=\"\",u=zo,s=Co,o=No,g=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(s=n.onCaughtError),n.onRecoverableError!==void 0&&(o=n.onRecoverableError),n.formState!==void 0&&(g=n.formState)),t=uh(e,1,!0,t,n??null,l,a,g,u,s,o,yh),t.context=ih(null),n=t.current,l=Tt(),l=Ei(l),a=Sn(l),a.callback=null,pn(n,a,l),n=l,t.current.lanes=n,ta(t,n),Qt(t),e[ol]=t.current,hf(e),new hi(t)},Va.version=\"19.2.8\",Va}var jh;function kg(){if(jh)return Df.exports;jh=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>\"u\"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=\"function\"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(f){console.error(f)}}return i(),Df.exports=Jg(),Df.exports}var $g=kg(),Fg=[\"runtime.ready\",\"store.ready\",\"runtime.stopping\",\"agent.loaded\",\"agent.disposed\",\"agent.warning\",\"plugin.loaded\",\"plugin.slow\",\"approval.requested\",\"approval.resolved\",\"handoff.start\",\"handoff.result\",\"turn.start\",\"context.assembled\",\"context.dropped\",\"context.pressure\",\"compaction.stage\",\"context.reset\",\"phase.changed\",\"model.call\",\"model.chunk\",\"model.retry\",\"model.result\",\"tool.call\",\"tool.result\",\"tool.gated\",\"tool.repair\",\"tools.refreshed\",\"agent.channel.status\",\"agent.channel.error\",\"agent.channel.rejected\",\"delivery.sent\",\"delivery.retry\",\"delivery.failed\",\"delivery.uncertain\",\"runtime.released\",\"schedules.reconciled\",\"schedule.fired\",\"schedule.skipped\",\"schedule.deferred\",\"schedule.error\",\"turn.end\",\"error\"],Wg=/\\\\r\\\\n\\\\r\\\\n|\\\\n\\\\n|\\\\r\\\\r/;function xh(i){const f=[];let r,c,d;for(const h of i.split(/\\\\r\\\\n|\\\\n|\\\\r/)){if(h===\"\"||h.startsWith(\":\"))continue;const v=h.indexOf(\":\"),A=v===-1?h:h.slice(0,v);let p=v===-1?\"\":h.slice(v+1);switch(p.startsWith(\" \")&&(p=p.slice(1)),A){case\"data\":f.push(p);break;case\"event\":r=p;break;case\"id\":c=p;break;case\"retry\":{const y=Number.parseInt(p,10);Number.isFinite(y)&&(d=y);break}}}if(!(f.length===0&&r===void 0))return{...r===void 0?{}:{event:r},data:f.join(\\`\n\\`),...c===void 0?{}:{id:c},...d===void 0?{}:{retry:d}}}async function*Ig(i){const f=new TextDecoder;let r=\"\";for await(const c of i)for(r+=typeof c==\"string\"?c:f.decode(c,{stream:!0});;){const d=Wg.exec(r);if(d===null)break;const h=r.slice(0,d.index);r=r.slice(d.index+d[0].length);const v=xh(h);v!==void 0&&(yield v)}if(r+=f.decode(),r.trim()!==\"\"){const c=xh(r);c!==void 0&&(yield c)}}function c0(){return{push:i=>i,endStep:()=>\"\",end:()=>\"\"}}function Pg(i){return i!==\"final\"&&i!==\"stopped\"}function ey(i,f={}){switch(i){case\"final\":return;case\"max_steps\":return\\`stopped\\${f.steps===void 0?\"\":\\` after \\${f.steps} steps\\`} without finishing — say \"continue\" to carry on, or raise limits.maxSteps\\`;case\"no_progress\":return'stopped: the same tool call was repeated with no change — say \"continue\" with more to go on, or check whether that tool is telling it anything useful';case\"truncated\":return\"the reply was cut off at the output limit — raise model.<role>.maxTokens, or ask for less\";case\"timeout\":return\\`timed out\\${f.durationMs===void 0?\"\":\\` after \\${f.durationMs} ms\\`} — raise limits.turnTimeoutMs\\`;case\"stopped\":return f.cancelledAfterMs===void 0?\"cancelled\":\\`cancelled after \\${f.cancelledAfterMs.toFixed(0)} ms\\`;case\"error\":return}}var ty=\"<<<\",ny=\">>>\",$a=/^\\\\s*(?:[-*+]\\\\s+|\\\\d+[.)]\\\\s+)?<?\\\\s*action\\\\s*:\\\\s*(.+?)\\\\s*>?\\\\s*$/i,ly=/^\\\\s*(?:[-*+]\\\\s+|\\\\d+[.)]\\\\s+)?([A-Za-z_][\\\\w.-]*?)\\\\s*:\\\\s*(.*)$/,hs=/^\\\\s*\\`{3,}\\\\s*[\\\\w+-]*\\\\s*$/,Yf=/^\\\\s*end\\\\s*$/i,ay=/^\\\\s*<\\\\s*action\\\\s*>\\\\s*$/i,_h=/^\\\\s*<\\\\s*\\\\/\\\\s*action\\\\s*>\\\\s*$/i,uy=/^\\\\s*<\\\\/?\\\\s*[A-Za-z_][\\\\w.:-]*\\\\s*\\\\/?\\\\s*>\\\\s*$/;function Lf(i){return i.replace(/^[\\`'\"*<]+/,\"\").replace(/[\\`'\"*>]+$/,\"\").replace(/[.,;:]+$/,\"\").trim()}function f0(i,f,r){const c=i.fields.get(f);c===void 0?i.fields.set(f,[r]):c.push(r)}function s0(i){if(i.block===void 0||i.heredocKey===void 0)return;const f=[...i.heredocLines];f[f.length-1]===\"\"&&f.pop(),f0(i.block,i.heredocKey,f.join(\\`\n\\`)),i.block.wrapped.add(i.heredocKey),i.heredocKey=void 0,i.heredocLines=[]}function tl(i){s0(i),i.block!==void 0&&i.blocks.push(i.block),i.block=void 0,i.openKey=void 0,i.awaitingSlug=!1}function Mh(){return{block:void 0,openKey:void 0,severedKey:void 0,severedPending:void 0,heredocKey:void 0,heredocLines:[],justClosed:!1,awaitingSlug:!1,text:[],blocks:[]}}function iy(i,f,r){const c=f.trim();if(i.heredocKey!==void 0){if(c===ny){s0(i);return}if(Yf.test(c)){tl(i),i.justClosed=!0;return}if($a.test(f)){tl(i);const v=$a.exec(f),A=Lf(v?.[1]??\"\");A!==\"\"&&(i.block={slug:A,fields:new Map,wrapped:new Set,severed:new Set});return}i.heredocLines.push(f);return}const d=$a.exec(f);if(d!==null){const v=Lf(d[1]??\"\");if(tl(i),v===\"\")return;i.block={slug:v,fields:new Map,wrapped:new Set,severed:new Set};return}if(ay.test(f)){tl(i),i.awaitingSlug=!0;return}if(i.awaitingSlug){if(c===\"\")return;if(_h.test(f)){i.awaitingSlug=!1;return}const v=Lf(c);i.awaitingSlug=!1,v!==\"\"&&(i.block={slug:v,fields:new Map,wrapped:new Set,severed:new Set});return}if(_h.test(f)){i.block!==void 0&&(tl(i),i.justClosed=!0);return}if(uy.test(f))return;if(i.block===void 0){if(hs.test(f)&&(i.justClosed||r())){i.justClosed=!1;return}if(Yf.test(c)&&i.severedPending!==void 0){i.severedPending.block.severed.add(i.severedPending.key),i.severedPending=void 0;return}$a.test(f)&&(i.severedPending=void 0),i.text.push(f),c!==\"\"&&(i.justClosed=!1);return}if(c===\"\"){i.openKey!==void 0&&(i.severedKey=i.openKey),i.openKey=void 0;return}if(Yf.test(c)){i.severedKey=void 0,tl(i),i.justClosed=!0;return}if(hs.test(f))return;const h=ly.exec(f);if(h!==null){const v=(h[1]??\"\").trim(),A=(h[2]??\"\").trim();i.severedKey=void 0,A===ty?(i.heredocKey=v,i.heredocLines=[],i.openKey=void 0):(f0(i.block,v,A),i.openKey=v);return}if(i.openKey!==void 0){const v=i.block.fields.get(i.openKey),A=v?.[v.length-1];v!==void 0&&A!==void 0&&(v[v.length-1]=A===\"\"?c:\\`\\${A}\n\\${c}\\`);return}i.severedKey!==void 0&&(i.severedPending={block:i.block,key:i.severedKey},i.severedKey=void 0),tl(i),i.text.push(f)}function cy(i){if(/^\\\\s*(?:[-*+]|\\\\d+[.)]?)?\\\\s*$/.test(i))return!0;const f=i.replace(/^\\\\s*(?:[-*+]\\\\s+|\\\\d+[.)]\\\\s+)?/,\"\").toLowerCase(),r=f.startsWith(\"<\")?f.slice(1):f;return\"action:\".startsWith(r)||r.startsWith(\"action:\")||/^<\\\\/?$/.test(f)||/^<\\\\/?[a-z_][\\\\w.:-]*>?$/.test(f)?!0:/^\\`{1,3}[\\\\w+-]*$/.test(f)}function Gf(i){return i.endsWith(\"\\\\r\")?i.slice(0,-1):i}function fy(){let i=Mh(),f=\"\",r=0,c,d=\"\",h=!1;const v=E=>{if(E===\"\")return\"\";if(E.trim()===\"\")return d+=E,\"\";const x=d+E;return d=\"\",h?x:(h=!0,x.replace(/^\\\\s+/,\"\"))},A=(E,x)=>{const H=i.text.length;return iy(i,E,()=>x!==void 0&&$a.test(x)),i.text.length>H?E:void 0},p=(E,x,H)=>{const X=A(E,x);return X===void 0?\"\":v(X.slice(H))+v(\\`\n\\`)},y=E=>{if(c===void 0)return\"\";const x=c;return c=void 0,p(x,E,0)};return{push(E){let x=\"\";f+=E;let H=f.indexOf(\\`\n\\`);for(;H!==-1;){const D=Gf(f.slice(0,H));f=f.slice(H+1),x+=y(D),i.block===void 0&&hs.test(D)&&!i.justClosed?c=D:x+=p(D,void 0,r),r=0,H=f.indexOf(\\`\n\\`)}const X=Gf(f);return i.block===void 0&&!i.awaitingSlug&&c===void 0&&!cy(X)&&(x+=v(X.slice(r)),r=X.length),x},endStep(){const E=j();return d=\\`\n\n\\`,i=Mh(),E},end:j};function j(){let E=y(void 0);const x=Gf(f);if(x!==\"\"){const H=A(x,void 0);H!==void 0&&(E+=v(H.slice(r)))}return f=\"\",r=0,c=void 0,E}}class Zt extends Error{code;hint;field;status;request;constructor(f,r={}){super(f.hint===void 0?f.message:\\`\\${f.message}\n hint: \\${f.hint}\\`),this.name=\"DispachError\",this.code=f.code,this.hint=f.hint??\"\",this.field=f.field,this.status=r.status,this.request=r.method===void 0||r.path===void 0?void 0:{method:r.method,path:r.path},r.cause!==void 0&&(this.cause=r.cause)}}function sy(i,f){const r=i instanceof Error?i.message:String(i);return new Zt({code:\"transport_failed\",message:\\`\\${f.method} \\${f.path} did not reach \\${f.baseUrl}: \\${r}\\`,hint:\"Check the base URL, that the server is running, and that nothing between you and it is refusing the connection. \\`GET /v1/health\\` needs no token and is the cheapest probe.\"},{...f,cause:i})}async function ry(i,f){let r;try{const c=await i.json();typeof c.error?.code==\"string\"&&typeof c.error.message==\"string\"&&(r={code:c.error.code,message:c.error.message,...c.error.hint===void 0?{}:{hint:c.error.hint},...c.error.field===void 0?{}:{field:c.error.field}})}catch{}return new Zt(r??{code:\\`http_\\${i.status}\\`,message:\\`\\${f.method} \\${f.path} returned \\${i.status} with no error body.\\`,hint:\"This is not a response this server produces, so something between you and it answered — a proxy, a gateway, or a load balancer. Check the URL and what is in front of it.\"},{status:i.status,...f})}var r0=new Set(Fg);async function*o0(i){for await(const f of Ig(oy(i))){if(f.event===void 0||f.data===\"\")continue;let r;try{r=JSON.parse(f.data)}catch{continue}yield{name:f.event,data:r}}}async function*oy(i){const f=i.getReader();try{for(;;){const{done:r,value:c}=await f.read();if(r)return;c!==void 0&&(yield c)}}finally{f.releaseLock()}}async function*dy(i){for await(const{name:f,data:r}of o0(i)){if(r0.has(f)){yield{kind:\"event\",event:r};continue}const c=r??{};switch(f){case\"turn.accepted\":yield{kind:\"accepted\",turnId:String(c.turnId??\"\"),sessionKey:String(c.sessionKey??\"\")};break;case\"stream.replay\":yield{kind:\"replay\",report:{state:c.state===\"ended\"?\"ended\":\"running\",events:Number(c.events??0),truncated:c.truncated===!0,dropped:Number(c.dropped??0),chunks:c.chunks===\"start\"||c.chunks===\"partial\"?c.chunks:\"none\"}};break;case\"stream.ended\":yield{kind:\"ended\",turnId:String(c.turnId??\"\"),status:String(c.status??\"unknown\"),steps:typeof c.steps==\"number\"?c.steps:void 0,errorCode:typeof c.errorCode==\"string\"?c.errorCode:void 0};break;case\"stream.unavailable\":yield{kind:\"unavailable\",turnId:String(c.turnId??\"\"),reason:String(c.reason??\"not observable from this process\")};break}}}async function*hy(i){for await(const{name:f,data:r}of o0(i)){if(r0.has(f)){yield{kind:\"event\",event:r};continue}if(f===\"stream.subscribed\"){const c=r??{};yield{kind:\"subscribed\",report:{agentId:typeof c.agentId==\"string\"?c.agentId:null,types:Array.isArray(c.types)?c.types:null,chunks:c.chunks===!0,implied:typeof c.implied==\"string\"?c.implied:void 0}}}}}async function*my(i,f={}){for await(const r of i){if(r.kind===\"replay\"&&r.report.truncated&&f.allowTruncated!==!0)throw new Zt({code:\"replay_truncated\",message:\\`This turn's replay is missing its oldest \\${r.report.dropped} event(s), so the text reconstructed from it would be incomplete.\\`,hint:\"Read the finished text from GET /v1/agents/:id/turns/:turnId, or pass { allowTruncated: true } to accept a fragment. Streaming from the start of a turn is never truncated — this only happens when reattaching to one that has already produced more events than the buffer holds.\"});if(r.kind===\"unavailable\")throw new Zt({code:\"turn_not_observable\",message:\\`Turn \\${r.turnId} is recorded as running but is not observable here: \\${r.reason}.\\`,hint:\"Its events are buffered in whichever process is executing it. Poll GET /v1/agents/:id/turns/:turnId for the outcome.\"});if(r.kind!==\"event\"||r.event.type!==\"model.chunk\")continue;const c=r.event.data;c.kind!==\"reasoning\"&&typeof c.delta==\"string\"&&(yield c.delta)}}function gy(i){const f=i.baseUrl.replace(/\\\\/+$/,\"\"),r=i.fetch??fetch,c=(y={})=>({...i.token===void 0?{}:{authorization:\\`Bearer \\${i.token}\\`},...y});async function d(y,j,E={}){let x;try{x=await r(\\`\\${f}\\${j}\\`,{method:y,headers:c({...E.body===void 0?{}:{\"content-type\":\"application/json\"},...E.accept===void 0?{}:{accept:E.accept},...E.headers}),...E.body===void 0?{}:{body:JSON.stringify(E.body)},...E.signal===void 0?{}:{signal:E.signal}})}catch(H){throw sy(H,{method:y,path:j,baseUrl:f})}if(!x.ok)throw await ry(x,{method:y,path:j});return x}async function h(y,j,E){return await(await d(y,j,E??{})).json()}async function v(y,j){const E=await d(\"GET\",y,{accept:\"text/event-stream\",...j===void 0?{}:{signal:j}});if(E.body===null)throw new Zt({code:\"no_response_body\",message:\\`GET \\${y} returned \\${E.status} with no body to read.\\`,hint:\"An SSE route always has a body. A missing one means something between you and the server buffered the response — commonly a proxy without streaming enabled.\"},{status:E.status,method:\"GET\",path:y});return E.body}function A(y,j,E,x={}){const H=D=>D?.chunks===!0?\"?chunks=true\":\"\",X={turnId:j,sessionKey:E,replayed:x.replayed===!0,async*stream(D){const se=await v(\\`/v1/agents/\\${encodeURIComponent(y)}/turns/\\${encodeURIComponent(j)}/stream\\${H(D)}\\`,D?.signal);yield*dy(se)},async*tokens(D){yield*my(X.stream({chunks:!0,...D}),{...D?.allowTruncated===void 0?{}:{allowTruncated:D.allowTruncated}})},async text(){for await(const D of X.stream())if(D.kind===\"ended\"||D.kind===\"unavailable\"||D.kind===\"event\"&&D.event.type===\"turn.end\")break;return(await X.get()).text},get:()=>h(\"GET\",\\`/v1/agents/\\${encodeURIComponent(y)}/turns/\\${encodeURIComponent(j)}\\`),async stop(){await d(\"POST\",\\`/v1/agents/\\${encodeURIComponent(y)}/turns/\\${encodeURIComponent(j)}/stop\\`)}};return X}function p(y){const j=E=>\\`/v1/agents/\\${encodeURIComponent(y)}\\${E}\\`;return{id:y,async send(E,x){const H=await h(\"POST\",j(\"/messages\"),{body:{text:E,...x?.sessionKey===void 0?{}:{sessionKey:x.sessionKey},...x?.deliver===void 0?{}:{deliver:x.deliver},...x?.from===void 0?{}:{from:x.from}},...x?.idempotencyKey===void 0?{}:{headers:{\"idempotency-key\":x.idempotencyKey}},...x?.signal===void 0?{}:{signal:x.signal}});return A(y,H.turnId,H.sessionKey,{replayed:H.replayed===!0})},turn:E=>A(y,E,\"\"),describe:()=>h(\"GET\",j(\"\")),tools:()=>h(\"GET\",j(\"/tools\")),skills:()=>h(\"GET\",j(\"/skills\")),sessions:()=>h(\"GET\",j(\"/sessions\")),messages:(E,x)=>{const H=new URLSearchParams;x?.before!==void 0&&H.set(\"before\",String(x.before)),x?.limit!==void 0&&H.set(\"limit\",String(x.limit));const X=H.size===0?\"\":\\`?\\${H.toString()}\\`;return h(\"GET\",j(\\`/sessions/\\${encodeURIComponent(E)}/messages\\${X}\\`))},clearSession:E=>h(\"DELETE\",j(\\`/sessions/\\${encodeURIComponent(E)}\\`)),reload:()=>h(\"POST\",j(\"/reload\"),{body:{}}),schedules:async()=>(await h(\"GET\",j(\"/schedules\"))).schedules,approvals:async()=>(await h(\"GET\",j(\"/approvals\"))).approvals,createSchedule:E=>h(\"POST\",j(\"/schedules\"),{body:E}),updateSchedule:(E,x)=>h(\"PATCH\",j(\\`/schedules/\\${encodeURIComponent(E)}\\`),{body:x}),deleteSchedule:async E=>{await h(\"DELETE\",j(\\`/schedules/\\${encodeURIComponent(E)}\\`))},runSchedule:E=>h(\"POST\",j(\\`/schedules/\\${encodeURIComponent(E)}/run\\`),{body:{}}),config:()=>h(\"GET\",j(\"/config\")),setConfig:(E,x,H)=>h(\"PATCH\",j(\"/config\"),{body:{path:E,value:x,...H?.confirm===void 0?{}:{confirm:H.confirm}}}),setChannel:(E,x)=>h(\"PATCH\",j(\\`/channels/\\${encodeURIComponent(E)}\\`),{body:{...x}}),unpairChannel:E=>h(\"POST\",j(\\`/channels/\\${encodeURIComponent(E)}/unpair\\`)),session:E=>h(\"GET\",j(\\`/sessions/\\${encodeURIComponent(E)}\\`)),setPhase:(E,x)=>h(\"POST\",j(\\`/sessions/\\${encodeURIComponent(E)}/phase\\`),{body:{phase:x}}),approve:async(E,x)=>{await h(\"POST\",j(\\`/approvals/\\${encodeURIComponent(E)}\\`),{body:{granted:x}})},stop:E=>h(\"POST\",j(\"/stop\"),{body:E===void 0?{}:{reason:E}}),start:()=>h(\"POST\",j(\"/start\"),{body:{}}),context:E=>{const x=new URLSearchParams;E?.sessionKey!==void 0&&x.set(\"sessionKey\",E.sessionKey),E?.input!==void 0&&x.set(\"input\",E.input);const H=x.size===0?\"\":\\`?\\${x.toString()}\\`;return h(\"GET\",j(\\`/context\\${H}\\`))}}}return{agent:p,agents:()=>h(\"GET\",\"/v1/agents\"),health:()=>h(\"GET\",\"/v1/health\"),async ready(){try{return await d(\"GET\",\"/v1/ready\"),!0}catch(y){if(y instanceof Zt&&y.status===503)return!1;throw y}},provision:()=>h(\"GET\",\"/v1/provision\"),keys:()=>h(\"GET\",\"/v1/keys\"),createKey:y=>h(\"POST\",\"/v1/keys\",{body:y}),revokeKey:y=>h(\"DELETE\",\\`/v1/keys/\\${encodeURIComponent(y)}\\`),createAgent:y=>h(\"POST\",\"/v1/agents\",{body:{answers:y}}),async*events(y){const j=new URLSearchParams;y?.agentId!==void 0&&j.set(\"agentId\",y.agentId),y?.types!==void 0&&y.types.length>0&&j.set(\"types\",y.types.join(\",\")),y?.chunks===!0&&j.set(\"chunks\",\"true\");const E=j.size===0?\"\":\\`?\\${j.toString()}\\`,x=await v(\\`/v1/events\\${E}\\`,y?.signal);yield*hy(x)}}}function yy(i){return m.jsxs(m.Fragment,{children:[i.state.truncated?m.jsx(\"p\",{className:\"row note bad\",children:\"This turn produced more than the server keeps for a reattach, so the beginning of the reply is missing. The stored turn has all of it.\"}):null,i.state.rows.map(f=>m.jsx(vy,{row:f,onAnswer:i.onAnswer},f.id)),i.state.liveReasoning===\"\"?null:m.jsx(d0,{label:\"thinking\",text:i.state.liveReasoning,open:!0}),i.state.live===\"\"?null:m.jsx(\"p\",{className:\"row\",children:i.state.live})]})}function vy(i){const f=i.row;switch(f.kind){case\"user\":return m.jsx(\"p\",{className:\"row user\",children:f.text});case\"reply\":return m.jsx(\"p\",{className:\"row\",children:f.text});case\"reasoning\":return m.jsx(d0,{label:\"thinking\",text:f.text});case\"tool\":return m.jsxs(\"div\",{className:\\`row tool\\${f.ok===!1?\" failed\":\"\"}\\`,children:[m.jsx(\"span\",{className:\"slug\",children:f.slug}),f.mutating?m.jsx(\"span\",{className:\"mut\",children:\" changes things\"}):null,m.jsx(\"span\",{className:\"out\",children:by(f)}),f.untrusted===!0?m.jsx(\"div\",{className:\"fence\",children:m.jsx(\"div\",{className:\"why\",children:\"this result came from outside the agent — treated as data, and mutating tools are blocked for the rest of the turn\"})}):null]});case\"approval\":return m.jsxs(\"div\",{className:\"row ask\",children:[m.jsxs(\"div\",{children:[m.jsx(\"strong\",{children:f.slug}),\" needs permission — \",f.reason]}),f.match===void 0?null:m.jsx(\"div\",{className:\"what\",children:f.match}),f.settled===void 0?m.jsxs(\"div\",{className:\"buttons\",children:[m.jsx(\"button\",{type:\"button\",className:\"primary\",onClick:()=>i.onAnswer(f.approvalId,!0),children:\"Allow once\"}),m.jsx(\"button\",{type:\"button\",onClick:()=>i.onAnswer(f.approvalId,!1),children:\"Refuse\"})]}):m.jsx(\"div\",{className:\"settled\",children:Sy(f.settled)})]});case\"note\":return m.jsx(\"p\",{className:\\`row note\\${f.bad?\" bad\":\"\"}\\`,children:f.text})}}function by(i){if(i.ok===void 0)return\" running…\";const f=i.bytes===void 0?\"\":\\` · \\${i.bytes} bytes\\`,r=i.truncated===!0?\" · truncated to fit the observation budget\":\"\",c=i.latencyMs===void 0?\"\":\\` · \\${i.latencyMs} ms\\`;return\\`\\${i.ok?\" ok\":\" failed\"}\\${f}\\${c}\\${r}\\`}function Sy(i){switch(i){case\"granted\":return\"Allowed — the call ran.\";case\"denied\":return\"Refused. The model was told a person declined it.\";case\"abandoned\":return\"The turn ended while this was waiting, so the call did not run. Nobody declined it.\";case\"error\":return\"The approver itself failed, so the call was refused. That says nothing about what anybody wanted.\"}}function d0(i){return m.jsxs(\"details\",{className:\"row fold\",open:i.open===!0,children:[m.jsxs(\"summary\",{children:[i.label,\" · \",i.text.length,\" chars\"]}),m.jsx(\"div\",{className:\"body\",children:i.text})]})}function py(i){const f=J.useRef(null);return J.useEffect(()=>{const r=f.current;r!==null&&(r.style.height=\"auto\",r.style.height=\\`\\${Math.min(r.scrollHeight,190)}px\\`)},[i.value]),m.jsxs(\"div\",{className:\"composer\",children:[m.jsxs(\"div\",{className:\"inner\",children:[m.jsx(\"textarea\",{ref:f,value:i.value,placeholder:\"Ask the agent something\",onChange:r=>i.onChange(r.target.value),onKeyDown:r=>{r.key===\"Enter\"&&!r.shiftKey&&(r.preventDefault(),i.onSend())}}),i.busy?m.jsx(\"button\",{type:\"button\",onClick:i.onStop,children:\"Stop\"}):m.jsx(\"button\",{type:\"button\",className:\"primary\",disabled:i.value.trim()===\"\",onClick:i.onSend,children:\"Send\"})]}),m.jsx(\"p\",{className:\"hint\",children:i.busy?\"Running. Closing this page does not stop it — the turn is detached, and reopening reattaches.\":\"Enter sends · shift-enter for a new line\"})]})}const vs=\"dispach.key\";function Ey(){const i=new URL(window.location.href),f=i.searchParams.get(\"claim\");if(!(f===null||f===\"\"))return i.searchParams.delete(\"claim\"),window.history.replaceState({},\"\",i.pathname+i.search+i.hash),f}function ms(){try{return window.localStorage.getItem(vs)??void 0}catch{return}}function bs(i){try{window.localStorage.setItem(vs,i)}catch{}}function Ss(){try{window.localStorage.removeItem(vs)}catch{}}async function h0(i,f){const r=await fetch(\\`\\${i}/v1/keys\\`,{method:\"POST\",headers:{\"content-type\":\"application/json\",authorization:\\`Bearer \\${f}\\`},body:JSON.stringify({label:Ty()})}),c=await r.json();if(!r.ok||typeof c.secret!=\"string\")throw new Error(c.error?.message??\\`The claim was refused (\\${r.status}).\\`);return c.secret}function Ty(){const i=navigator.userAgent;return\\`\\${/Firefox\\\\//.test(i)?\"Firefox\":/Edg\\\\//.test(i)?\"Edge\":/Chrome\\\\//.test(i)?\"Chrome\":/Safari\\\\//.test(i)?\"Safari\":\"browser\"} · \\${new Date().toISOString().slice(0,10)}\\`}async function Ay(i){const f=Ey();if(f!==void 0)try{const c=await h0(i,f);return bs(c),{kind:\"key\",secret:c}}catch(c){const d=c instanceof Error?c.message:String(c);if(ms()===void 0)return{kind:\"needed\",because:d}}const r=ms();return r!==void 0&&await wh(i,r)?{kind:\"key\",secret:r}:(r!==void 0&&Ss(),await wh(i,void 0)?{kind:\"open\"}:{kind:\"needed\",because:r===void 0?\"This server needs a credential.\":\"The key this browser held no longer works — it was revoked, or this is a different server.\"})}async function wh(i,f){try{return await m0(i,f).agents(),!0}catch(r){if(r instanceof Zt&&r.code===\"unauthorized\")return!1;throw r}}function m0(i,f){return gy({baseUrl:i,...f===void 0?{}:{token:f}})}function zy(i,f){const r=[i.scope?.agents===void 0?\"every agent\":i.scope.agents.join(\", \"),...i.scope?.sessions===void 0?[]:[\\`sessions \\${i.scope.sessions}\\`],i.scope?.can===void 0?\"all capabilities\":i.scope.can.join(\"+\")];return i.expiresAt!==void 0&&r.push(Date.parse(i.expiresAt)<=f?\"expired\":\\`until \\${vi(i.expiresAt)}\\`),r.join(\" · \")}function Cy(i){const[f,r]=J.useState([]),[c,d]=J.useState(),[h,v]=J.useState(\"\"),[A,p]=J.useState(),[y,j]=J.useState(),E=J.useCallback((D={})=>({...D,...i.token===void 0?{}:{authorization:\\`Bearer \\${i.token}\\`}}),[i.token]),x=J.useCallback(async()=>{try{const D=await fetch(\\`\\${i.baseUrl}/v1/keys\\`,{headers:E()}),se=await D.json();if(!D.ok)throw new Error(se.error?.message??\\`HTTP \\${D.status}\\`);r(se.keys??[]),d(se.scope)}catch(D){j(D instanceof Error?D.message:String(D))}},[i.baseUrl,E]);J.useEffect(()=>{x()},[x]);const H=async()=>{j(void 0);try{const D=await fetch(\\`\\${i.baseUrl}/v1/keys\\`,{method:\"POST\",headers:E({\"content-type\":\"application/json\"}),body:JSON.stringify({label:h.trim()})}),se=await D.json();if(!D.ok||se.secret===void 0)throw new Error(se.error?.message??\\`HTTP \\${D.status}\\`);p(se.secret),v(\"\"),await x()}catch(D){j(D instanceof Error?D.message:String(D))}},X=async D=>{if(j(void 0),!window.confirm(\\`Revoke \"\\${D.label}\"? If it is the key this browser is using, you will be signed out of this page. There is no way to tell from here — the listing carries no secrets.\\`))return;const se=ms();try{const L=await fetch(\\`\\${i.baseUrl}/v1/keys/\\${D.keyId}\\`,{method:\"DELETE\",headers:E()});if(!L.ok){const ce=await L.json();throw new Error(ce.error?.message??\\`HTTP \\${L.status}\\`)}if(se!==void 0&&!await Ny(i.baseUrl,se)){Ss(),window.location.reload();return}await x()}catch(L){j(L instanceof Error?L.message:String(L))}};return m.jsxs(m.Fragment,{children:[m.jsxs(\"div\",{className:\"card\",children:[m.jsx(\"h2\",{children:\"Issue a key\"}),m.jsx(\"p\",{children:\"A key is shown once and never again — the server stores a hash of it, so there is no way to recover one. Label it for the browser or machine that will hold it.\"}),A===void 0?null:m.jsxs(m.Fragment,{children:[m.jsx(\"div\",{className:\"secret\",children:A}),m.jsxs(\"p\",{className:\"hint\",style:{margin:\"0 0 12px\"},children:[\"Copy it now. This is the only time it is readable.\",\" \",m.jsx(\"button\",{type:\"button\",style:{padding:\"2px 8px\",fontSize:11},onClick:()=>{bs(A),window.location.reload()},children:\"use it in this browser\"})]})]}),m.jsxs(\"div\",{style:{display:\"flex\",gap:8},children:[m.jsx(\"input\",{value:h,placeholder:\"my laptop\",onChange:D=>v(D.target.value)}),m.jsx(\"button\",{type:\"button\",className:\"primary\",disabled:h.trim()===\"\",onClick:()=>void H(),children:\"Issue\"})]})]}),m.jsxs(\"div\",{className:\"card\",children:[m.jsx(\"h2\",{children:\"Keys\"}),m.jsx(\"p\",{children:c??\"…\"}),y===void 0?null:m.jsx(\"p\",{className:\"note bad\",children:y}),m.jsxs(\"table\",{children:[m.jsx(\"thead\",{children:m.jsxs(\"tr\",{children:[m.jsx(\"th\",{children:\"Label\"}),m.jsx(\"th\",{children:\"Created\"}),m.jsx(\"th\",{children:\"Reaches\"}),m.jsx(\"th\",{children:\"Last used\"}),m.jsx(\"th\",{})]})}),m.jsx(\"tbody\",{children:f.map(D=>m.jsxs(\"tr\",{children:[m.jsx(\"td\",{className:D.revokedAt===void 0?\"\":\"revoked\",children:D.label}),m.jsx(\"td\",{children:vi(D.createdAt)}),m.jsx(\"td\",{className:\"sub\",children:zy(D,Date.now())}),m.jsx(\"td\",{children:D.revokedAt!==void 0?\\`revoked \\${vi(D.revokedAt)}\\`:D.lastUsedAt===void 0?\"never\":vi(D.lastUsedAt)}),m.jsx(\"td\",{children:D.revokedAt===void 0?m.jsx(\"button\",{type:\"button\",className:\"bad\",style:{padding:\"2px 9px\",fontSize:11},onClick:()=>void X(D),children:\"revoke\"}):null})]},D.keyId))})]}),f.length===0?m.jsx(\"p\",{className:\"hint\",style:{marginTop:10},children:\"No keys. This server is open to anyone who can reach the port — issuing the first key is what closes it.\"}):null]})]})}async function Ny(i,f){try{return(await fetch(\\`\\${i}/v1/agents\\`,{headers:{authorization:\\`Bearer \\${f}\\`}})).ok}catch{return!0}}function vi(i){const f=new Date(i);return Number.isNaN(f.getTime())?i:f.toISOString().slice(0,10)}const jy=[\"chat\",\"new\",\"tools\",\"schedules\",\"channels\",\"config\",\"keys\"];function xy(i){return i!==null&&jy.includes(i)}function _y(i){const f=new URL(i).searchParams,r=f.get(\"agent\"),c=f.get(\"panel\");return{...r===null||r===\"\"?{}:{agentId:r},panel:xy(c)?c:\"chat\"}}function My(i,f){const r=new URL(i);return f.agentId===void 0||f.agentId===\"\"?r.searchParams.delete(\"agent\"):r.searchParams.set(\"agent\",f.agentId),f.panel===\"chat\"?r.searchParams.delete(\"panel\"):r.searchParams.set(\"panel\",f.panel),\\`\\${r.pathname}\\${r.search}\\`}function wy(){let i,f;return{begin(r){if(i!==r)return f?.abort(),i=r,f=new AbortController,f.signal},finish(r){i===r&&(i=void 0,f=void 0)},abort(){f?.abort()},following:()=>i,aborted:()=>f?.signal.aborted??!1}}function Ry(i){const f={};for(const r of i)f[r.step]=r.fallback;return f}const Uy=8;function Oy(i,f,r){let c=f;for(let d=0;d<Uy;d+=1){if(c===void 0)return!1;const h=c.requires;if(h===void 0)return!0;if(r[h.step]!==h.value)return!1;c=i.find(v=>v.step===h.step)}return!1}function bi(i,f){return i.filter(r=>Oy(i,r,f))}function g0(i,f){return bi(i,f).filter(r=>r.optional!==!0&&(f[r.step]??\"\").trim()===\"\")}function Dy(i,f){const r={};for(const c of bi(i,f)){const d=(f[c.step]??\"\").trim();d!==\"\"&&(r[c.step]=d)}return r}function By(i,f){return bi(i,f).filter(r=>r.secret&&(f[r.step]??\"\").trim()===\"\")}function Hy(i){return{...Fa,filter:i===\"nlt\"?fy():c0()}}const Fa={filter:c0(),rows:[],live:\"\",liveReasoning:\"\",running:!1,truncated:!1};let Rh=0;function Kt(){return Rh+=1,\\`r\\${Rh}\\`}function qy(i,f){return{...i,rows:[...i.rows,{kind:\"user\",id:Kt(),text:f}],running:!0}}function Yy(i,f){switch(f.kind){case\"accepted\":return i;case\"replay\":return f.report.truncated?{...i,truncated:!0}:i;case\"ended\":return{...i,running:!1,rows:[...i.rows,{kind:\"note\",id:Kt(),text:\\`This turn finished before the page attached — \\${f.status}. Its reply is stored.\\`,bad:f.status!==\"final\"}]};case\"unavailable\":return{...i,running:!1,rows:[...i.rows,{kind:\"note\",id:Kt(),text:f.reason,bad:!0}]};case\"event\":return Ly(i,f.event)}}function Ly(i,f){switch(f.type){case\"turn.start\":return{...i,running:!0};case\"model.chunk\":{const r=f.data;if(r.kind===\"reasoning\")return{...i,liveReasoning:i.liveReasoning+r.delta};const c=i.filter.push(r.delta);return c===\"\"?i:{...i,live:i.live+c}}case\"model.result\":return Ja({...i,live:i.live+i.filter.endStep()});case\"tool.call\":{const r=f.data,c=Ja(i);return{...c,rows:[...c.rows,{kind:\"tool\",id:Kt(),callId:r.callId,slug:r.slug,mutating:r.mutating}]}}case\"tool.result\":{const r=f.data,c=i.rows.findIndex(v=>v.kind===\"tool\"&&v.callId===r.callId);if(c===-1)return i;const d=i.rows[c];if(d===void 0||d.kind!==\"tool\")return i;const h=[...i.rows];return h[c]={...d,ok:r.ok,bytes:r.bytes,truncated:r.truncated,latencyMs:r.latencyMs,...r.trust===\"untrusted\"?{untrusted:!0}:{}},{...i,rows:h}}case\"approval.requested\":{const r=f.data,c=Ja(i);return{...c,rows:[...c.rows,{kind:\"approval\",id:Kt(),approvalId:r.approvalId,slug:r.slug,...r.match===void 0?{}:{match:r.match},reason:r.reason}]}}case\"approval.resolved\":{const r=f.data,c=i.rows.findIndex(v=>v.kind===\"approval\"&&v.approvalId===r.approvalId);if(c===-1)return i;const d=i.rows[c];if(d===void 0||d.kind!==\"approval\")return i;const h=[...i.rows];return h[c]={...d,settled:r.by===\"abandoned\"?\"abandoned\":r.by===\"error\"?\"error\":r.granted?\"granted\":\"denied\"},{...i,rows:h}}case\"error\":{const r=f.data,c=Ja({...i,live:i.live+i.filter.end()});return{...c,running:!1,rows:[...c.rows,{kind:\"note\",id:Kt(),text:\\`\\${r.code}: \\${r.message}\nhint: \\${r.hint}\\`,bad:!0}]}}case\"agent.warning\":{const r=f.data;return{...i,rows:[...i.rows,{kind:\"note\",id:Kt(),text:r.message??\"\",bad:!1}]}}case\"turn.end\":{const r=f.data,c=Ja({...i,live:i.live+i.filter.end()}),d=ey(r.reason,{steps:r.steps});return{...c,running:!1,rows:d===void 0?c.rows:[...c.rows,{kind:\"note\",id:Kt(),text:d,bad:Pg(r.reason)}]}}default:return i}}function Ja(i){if(i.live===\"\"&&i.liveReasoning===\"\")return i;const f=[...i.rows],r=i.liveReasoning.trim();r!==\"\"&&f.push({kind:\"reasoning\",id:Kt(),text:r});const c=i.live.trim();return c!==\"\"&&f.push({kind:\"reply\",id:Kt(),text:c}),{...i,rows:f,live:\"\",liveReasoning:\"\"}}function Gy(i){if(!i.available)return m.jsxs(\"p\",{className:\"empty\",children:[\"This server has no provisioner, so it cannot create an agent — the case for an embedder mounting the API over its own agent store. Run \",m.jsx(\"code\",{children:\"dispach init\"}),\" \",\"where the sandbox is, or mount an agent directory.\"]});if(!i.allowed)return m.jsxs(\"p\",{className:\"empty\",children:[\"Creating an agent needs a loopback bind or a credential with the \",m.jsx(\"code\",{children:\"admin\"}),\" \",\"capability, and this request has neither. On a server reachable from elsewhere, set\",\" \",m.jsx(\"code\",{children:\"server.tokenEnv\"}),\" or present an operator key minted with\",\" \",m.jsx(\"code\",{children:\"can: [admin]\"}),\" — or mount a written agent at \",m.jsx(\"code\",{children:\"/agent\"}),\".\"]})}function Qy(i){const{step:f,value:r}=i,c=\\`provision-\\${f.step}\\`;return m.jsxs(\"div\",{className:i.invalid?\"field invalid\":\"field\",children:[m.jsxs(\"label\",{htmlFor:c,children:[f.prompt,f.optional?m.jsx(\"span\",{className:\"sub\",children:\" optional\"}):null,f.secret?m.jsx(\"span\",{className:\"sub\",children:\" · written to .env, never read back\"}):null]}),f.choices===void 0?m.jsx(\"input\",{id:c,name:f.step,type:f.secret?\"password\":\"text\",value:r,disabled:i.disabled,autoComplete:f.secret?\"new-password\":\"off\",spellCheck:!1,onChange:d=>i.onChange(d.target.value)}):m.jsx(\"select\",{id:c,name:f.step,value:r,disabled:i.disabled,onChange:d=>i.onChange(d.target.value),children:f.choices.map(d=>m.jsx(\"option\",{value:d.value,children:d.hint===void 0?d.label:\\`\\${d.label} — \\${d.hint}\\`},d.value))}),i.invalid?m.jsx(\"div\",{className:\"sub error\",children:\"needs an answer\"}):null]})}function Xy(i){const f=i.result.adopted.includes(i.result.id);return m.jsxs(\"div\",{className:\"created\",children:[m.jsxs(\"h3\",{children:[\"Created \",m.jsx(\"code\",{children:i.result.id})]}),m.jsxs(\"p\",{children:[m.jsx(\"code\",{children:i.result.dir}),m.jsxs(\"span\",{className:\"sub\",children:[\" · \",i.result.files.length,\" files\"]})]}),f?m.jsx(\"p\",{className:\"ok\",children:\"adopted · live on this host, with its channels and schedules\"}):m.jsxs(\"p\",{className:\"error\",children:[\"written, and \",m.jsx(\"strong\",{children:\"not running\"}),i.result.error===void 0?null:m.jsxs(m.Fragment,{children:[\": \",i.result.error.message,i.result.error.hint===void 0?null:m.jsxs(\"span\",{className:\"sub\",children:[\" \",i.result.error.hint]})]})]}),i.blank.length===0?null:m.jsxs(\"div\",{className:\"blank-secrets\",children:[m.jsxs(\"p\",{children:[\"Left empty, and needed before this works:\",\" \",i.blank.map(r=>r.prompt).join(\", \"),\".\"]}),m.jsxs(\"p\",{className:\"sub\",children:[\"Fill them in \",m.jsxs(\"code\",{children:[i.result.dir,\"/.env\"]}),\" at a terminal —\",\" \",m.jsx(\"code\",{children:\".env\"}),\" is a protected path, so neither the agent nor this API can write it. The file names each variable in its own comments.\"]})]}),f?m.jsxs(\"button\",{type:\"button\",onClick:()=>i.onOpen(i.result.id),children:[\"open \",i.result.id]}):null]})}function Ky(i){if(i.result!==void 0)return m.jsx(Xy,{result:i.result,blank:By(i.offer.steps,i.answers),onOpen:i.onOpen});const f=Gy(i.offer);if(f!==void 0)return f;const r=bi(i.offer.steps,i.answers),c=g0(i.offer.steps,i.answers),d=new Set(c.map(h=>h.step));return m.jsxs(\"form\",{className:\"provision\",onSubmit:h=>{h.preventDefault(),i.onSubmit()},children:[m.jsxs(\"p\",{className:\"sub\",children:[\"The same questions \",m.jsx(\"code\",{children:\"dispach init\"}),\" asks, served from the same walk. What you leave alone takes its default. The agent is adopted into this server as it is created — there is no second command.\"]}),r.map(h=>m.jsx(Qy,{step:h,value:i.answers[h.step]??\"\",invalid:i.touched&&d.has(h.step),disabled:i.busy,onChange:v=>i.onAnswer(h.step,v)},h.step)),i.error===void 0?null:m.jsx(\"p\",{className:\"error\",children:i.error}),m.jsx(\"button\",{type:\"submit\",disabled:i.busy,children:i.busy?\"creating…\":\"create agent\"}),i.touched&&c.length>0?m.jsxs(\"p\",{className:\"sub error\",children:[c.map(h=>h.prompt).join(\", \"),\" — still needed.\"]}):null]})}var $l={},Qf,Uh;function Zy(){return Uh||(Uh=1,Qf=function(){return typeof Promise==\"function\"&&Promise.prototype&&Promise.prototype.then}),Qf}var Xf={},Bn={},Oh;function nl(){if(Oh)return Bn;Oh=1;let i;const f=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return Bn.getSymbolSize=function(c){if(!c)throw new Error('\"version\" cannot be null or undefined');if(c<1||c>40)throw new Error('\"version\" should be in range from 1 to 40');return c*4+17},Bn.getSymbolTotalCodewords=function(c){return f[c]},Bn.getBCHDigit=function(r){let c=0;for(;r!==0;)c++,r>>>=1;return c},Bn.setToSJISFunction=function(c){if(typeof c!=\"function\")throw new Error('\"toSJISFunc\" is not a valid function.');i=c},Bn.isKanjiModeEnabled=function(){return typeof i<\"u\"},Bn.toSJIS=function(c){return i(c)},Bn}var Kf={},Dh;function ps(){return Dh||(Dh=1,(function(i){i.L={bit:1},i.M={bit:0},i.Q={bit:3},i.H={bit:2};function f(r){if(typeof r!=\"string\")throw new Error(\"Param is not a string\");switch(r.toLowerCase()){case\"l\":case\"low\":return i.L;case\"m\":case\"medium\":return i.M;case\"q\":case\"quartile\":return i.Q;case\"h\":case\"high\":return i.H;default:throw new Error(\"Unknown EC Level: \"+r)}}i.isValid=function(c){return c&&typeof c.bit<\"u\"&&c.bit>=0&&c.bit<4},i.from=function(c,d){if(i.isValid(c))return c;try{return f(c)}catch{return d}}})(Kf)),Kf}var Zf,Bh;function Vy(){if(Bh)return Zf;Bh=1;function i(){this.buffer=[],this.length=0}return i.prototype={get:function(f){const r=Math.floor(f/8);return(this.buffer[r]>>>7-f%8&1)===1},put:function(f,r){for(let c=0;c<r;c++)this.putBit((f>>>r-c-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(f){const r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),f&&(this.buffer[r]|=128>>>this.length%8),this.length++}},Zf=i,Zf}var Vf,Hh;function Jy(){if(Hh)return Vf;Hh=1;function i(f){if(!f||f<1)throw new Error(\"BitMatrix size must be defined and greater than 0\");this.size=f,this.data=new Uint8Array(f*f),this.reservedBit=new Uint8Array(f*f)}return i.prototype.set=function(f,r,c,d){const h=f*this.size+r;this.data[h]=c,d&&(this.reservedBit[h]=!0)},i.prototype.get=function(f,r){return this.data[f*this.size+r]},i.prototype.xor=function(f,r,c){this.data[f*this.size+r]^=c},i.prototype.isReserved=function(f,r){return this.reservedBit[f*this.size+r]},Vf=i,Vf}var Jf={},qh;function ky(){return qh||(qh=1,(function(i){const f=nl().getSymbolSize;i.getRowColCoords=function(c){if(c===1)return[];const d=Math.floor(c/7)+2,h=f(c),v=h===145?26:Math.ceil((h-13)/(2*d-2))*2,A=[h-7];for(let p=1;p<d-1;p++)A[p]=A[p-1]-v;return A.push(6),A.reverse()},i.getPositions=function(c){const d=[],h=i.getRowColCoords(c),v=h.length;for(let A=0;A<v;A++)for(let p=0;p<v;p++)A===0&&p===0||A===0&&p===v-1||A===v-1&&p===0||d.push([h[A],h[p]]);return d}})(Jf)),Jf}var kf={},Yh;function $y(){if(Yh)return kf;Yh=1;const i=nl().getSymbolSize,f=7;return kf.getPositions=function(c){const d=i(c);return[[0,0],[d-f,0],[0,d-f]]},kf}var $f={},Lh;function Fy(){return Lh||(Lh=1,(function(i){i.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const f={N1:3,N2:3,N3:40,N4:10};i.isValid=function(d){return d!=null&&d!==\"\"&&!isNaN(d)&&d>=0&&d<=7},i.from=function(d){return i.isValid(d)?parseInt(d,10):void 0},i.getPenaltyN1=function(d){const h=d.size;let v=0,A=0,p=0,y=null,j=null;for(let E=0;E<h;E++){A=p=0,y=j=null;for(let x=0;x<h;x++){let H=d.get(E,x);H===y?A++:(A>=5&&(v+=f.N1+(A-5)),y=H,A=1),H=d.get(x,E),H===j?p++:(p>=5&&(v+=f.N1+(p-5)),j=H,p=1)}A>=5&&(v+=f.N1+(A-5)),p>=5&&(v+=f.N1+(p-5))}return v},i.getPenaltyN2=function(d){const h=d.size;let v=0;for(let A=0;A<h-1;A++)for(let p=0;p<h-1;p++){const y=d.get(A,p)+d.get(A,p+1)+d.get(A+1,p)+d.get(A+1,p+1);(y===4||y===0)&&v++}return v*f.N2},i.getPenaltyN3=function(d){const h=d.size;let v=0,A=0,p=0;for(let y=0;y<h;y++){A=p=0;for(let j=0;j<h;j++)A=A<<1&2047|d.get(y,j),j>=10&&(A===1488||A===93)&&v++,p=p<<1&2047|d.get(j,y),j>=10&&(p===1488||p===93)&&v++}return v*f.N3},i.getPenaltyN4=function(d){let h=0;const v=d.data.length;for(let p=0;p<v;p++)h+=d.data[p];return Math.abs(Math.ceil(h*100/v/5)-10)*f.N4};function r(c,d,h){switch(c){case i.Patterns.PATTERN000:return(d+h)%2===0;case i.Patterns.PATTERN001:return d%2===0;case i.Patterns.PATTERN010:return h%3===0;case i.Patterns.PATTERN011:return(d+h)%3===0;case i.Patterns.PATTERN100:return(Math.floor(d/2)+Math.floor(h/3))%2===0;case i.Patterns.PATTERN101:return d*h%2+d*h%3===0;case i.Patterns.PATTERN110:return(d*h%2+d*h%3)%2===0;case i.Patterns.PATTERN111:return(d*h%3+(d+h)%2)%2===0;default:throw new Error(\"bad maskPattern:\"+c)}}i.applyMask=function(d,h){const v=h.size;for(let A=0;A<v;A++)for(let p=0;p<v;p++)h.isReserved(p,A)||h.xor(p,A,r(d,p,A))},i.getBestMask=function(d,h){const v=Object.keys(i.Patterns).length;let A=0,p=1/0;for(let y=0;y<v;y++){h(y),i.applyMask(y,d);const j=i.getPenaltyN1(d)+i.getPenaltyN2(d)+i.getPenaltyN3(d)+i.getPenaltyN4(d);i.applyMask(y,d),j<p&&(p=j,A=y)}return A}})($f)),$f}var gi={},Gh;function y0(){if(Gh)return gi;Gh=1;const i=ps(),f=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return gi.getBlocksCount=function(d,h){switch(h){case i.L:return f[(d-1)*4+0];case i.M:return f[(d-1)*4+1];case i.Q:return f[(d-1)*4+2];case i.H:return f[(d-1)*4+3];default:return}},gi.getTotalCodewordsCount=function(d,h){switch(h){case i.L:return r[(d-1)*4+0];case i.M:return r[(d-1)*4+1];case i.Q:return r[(d-1)*4+2];case i.H:return r[(d-1)*4+3];default:return}},gi}var Ff={},ka={},Qh;function Wy(){if(Qh)return ka;Qh=1;const i=new Uint8Array(512),f=new Uint8Array(256);return(function(){let c=1;for(let d=0;d<255;d++)i[d]=c,f[c]=d,c<<=1,c&256&&(c^=285);for(let d=255;d<512;d++)i[d]=i[d-255]})(),ka.log=function(c){if(c<1)throw new Error(\"log(\"+c+\")\");return f[c]},ka.exp=function(c){return i[c]},ka.mul=function(c,d){return c===0||d===0?0:i[f[c]+f[d]]},ka}var Xh;function Iy(){return Xh||(Xh=1,(function(i){const f=Wy();i.mul=function(c,d){const h=new Uint8Array(c.length+d.length-1);for(let v=0;v<c.length;v++)for(let A=0;A<d.length;A++)h[v+A]^=f.mul(c[v],d[A]);return h},i.mod=function(c,d){let h=new Uint8Array(c);for(;h.length-d.length>=0;){const v=h[0];for(let p=0;p<d.length;p++)h[p]^=f.mul(d[p],v);let A=0;for(;A<h.length&&h[A]===0;)A++;h=h.slice(A)}return h},i.generateECPolynomial=function(c){let d=new Uint8Array([1]);for(let h=0;h<c;h++)d=i.mul(d,new Uint8Array([1,f.exp(h)]));return d}})(Ff)),Ff}var Wf,Kh;function Py(){if(Kh)return Wf;Kh=1;const i=Iy();function f(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}return f.prototype.initialize=function(c){this.degree=c,this.genPoly=i.generateECPolynomial(this.degree)},f.prototype.encode=function(c){if(!this.genPoly)throw new Error(\"Encoder not initialized\");const d=new Uint8Array(c.length+this.degree);d.set(c);const h=i.mod(d,this.genPoly),v=this.degree-h.length;if(v>0){const A=new Uint8Array(this.degree);return A.set(h,v),A}return h},Wf=f,Wf}var If={},Pf={},es={},Zh;function v0(){return Zh||(Zh=1,es.isValid=function(f){return!isNaN(f)&&f>=1&&f<=40}),es}var Xt={},Vh;function b0(){if(Vh)return Xt;Vh=1;const i=\"[0-9]+\",f=\"[A-Z $%*+\\\\\\\\-./:]+\";let r=\"(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+\";r=r.replace(/u/g,\"\\\\\\\\u\");const c=\"(?:(?![A-Z0-9 $%*+\\\\\\\\-./:]|\"+r+\\`)(?:.|[\\\\r\n]))+\\`;Xt.KANJI=new RegExp(r,\"g\"),Xt.BYTE_KANJI=new RegExp(\"[^A-Z0-9 $%*+\\\\\\\\-./:]+\",\"g\"),Xt.BYTE=new RegExp(c,\"g\"),Xt.NUMERIC=new RegExp(i,\"g\"),Xt.ALPHANUMERIC=new RegExp(f,\"g\");const d=new RegExp(\"^\"+r+\"$\"),h=new RegExp(\"^\"+i+\"$\"),v=new RegExp(\"^[A-Z0-9 $%*+\\\\\\\\-./:]+$\");return Xt.testKanji=function(p){return d.test(p)},Xt.testNumeric=function(p){return h.test(p)},Xt.testAlphanumeric=function(p){return v.test(p)},Xt}var Jh;function ll(){return Jh||(Jh=1,(function(i){const f=v0(),r=b0();i.NUMERIC={id:\"Numeric\",bit:1,ccBits:[10,12,14]},i.ALPHANUMERIC={id:\"Alphanumeric\",bit:2,ccBits:[9,11,13]},i.BYTE={id:\"Byte\",bit:4,ccBits:[8,16,16]},i.KANJI={id:\"Kanji\",bit:8,ccBits:[8,10,12]},i.MIXED={bit:-1},i.getCharCountIndicator=function(h,v){if(!h.ccBits)throw new Error(\"Invalid mode: \"+h);if(!f.isValid(v))throw new Error(\"Invalid version: \"+v);return v>=1&&v<10?h.ccBits[0]:v<27?h.ccBits[1]:h.ccBits[2]},i.getBestModeForData=function(h){return r.testNumeric(h)?i.NUMERIC:r.testAlphanumeric(h)?i.ALPHANUMERIC:r.testKanji(h)?i.KANJI:i.BYTE},i.toString=function(h){if(h&&h.id)return h.id;throw new Error(\"Invalid mode\")},i.isValid=function(h){return h&&h.bit&&h.ccBits};function c(d){if(typeof d!=\"string\")throw new Error(\"Param is not a string\");switch(d.toLowerCase()){case\"numeric\":return i.NUMERIC;case\"alphanumeric\":return i.ALPHANUMERIC;case\"kanji\":return i.KANJI;case\"byte\":return i.BYTE;default:throw new Error(\"Unknown mode: \"+d)}}i.from=function(h,v){if(i.isValid(h))return h;try{return c(h)}catch{return v}}})(Pf)),Pf}var kh;function ev(){return kh||(kh=1,(function(i){const f=nl(),r=y0(),c=ps(),d=ll(),h=v0(),v=7973,A=f.getBCHDigit(v);function p(x,H,X){for(let D=1;D<=40;D++)if(H<=i.getCapacity(D,X,x))return D}function y(x,H){return d.getCharCountIndicator(x,H)+4}function j(x,H){let X=0;return x.forEach(function(D){const se=y(D.mode,H);X+=se+D.getBitsLength()}),X}function E(x,H){for(let X=1;X<=40;X++)if(j(x,X)<=i.getCapacity(X,H,d.MIXED))return X}i.from=function(H,X){return h.isValid(H)?parseInt(H,10):X},i.getCapacity=function(H,X,D){if(!h.isValid(H))throw new Error(\"Invalid QR Code version\");typeof D>\"u\"&&(D=d.BYTE);const se=f.getSymbolTotalCodewords(H),L=r.getTotalCodewordsCount(H,X),ce=(se-L)*8;if(D===d.MIXED)return ce;const I=ce-y(D,H);switch(D){case d.NUMERIC:return Math.floor(I/10*3);case d.ALPHANUMERIC:return Math.floor(I/11*2);case d.KANJI:return Math.floor(I/13);case d.BYTE:default:return Math.floor(I/8)}},i.getBestVersionForData=function(H,X){let D;const se=c.from(X,c.M);if(Array.isArray(H)){if(H.length>1)return E(H,se);if(H.length===0)return 1;D=H[0]}else D=H;return p(D.mode,D.getLength(),se)},i.getEncodedBits=function(H){if(!h.isValid(H)||H<7)throw new Error(\"Invalid QR Code version\");let X=H<<12;for(;f.getBCHDigit(X)-A>=0;)X^=v<<f.getBCHDigit(X)-A;return H<<12|X}})(If)),If}var ts={},$h;function tv(){if($h)return ts;$h=1;const i=nl(),f=1335,r=21522,c=i.getBCHDigit(f);return ts.getEncodedBits=function(h,v){const A=h.bit<<3|v;let p=A<<10;for(;i.getBCHDigit(p)-c>=0;)p^=f<<i.getBCHDigit(p)-c;return(A<<10|p)^r},ts}var ns={},ls,Fh;function nv(){if(Fh)return ls;Fh=1;const i=ll();function f(r){this.mode=i.NUMERIC,this.data=r.toString()}return f.getBitsLength=function(c){return 10*Math.floor(c/3)+(c%3?c%3*3+1:0)},f.prototype.getLength=function(){return this.data.length},f.prototype.getBitsLength=function(){return f.getBitsLength(this.data.length)},f.prototype.write=function(c){let d,h,v;for(d=0;d+3<=this.data.length;d+=3)h=this.data.substr(d,3),v=parseInt(h,10),c.put(v,10);const A=this.data.length-d;A>0&&(h=this.data.substr(d),v=parseInt(h,10),c.put(v,A*3+1))},ls=f,ls}var as,Wh;function lv(){if(Wh)return as;Wh=1;const i=ll(),f=[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\",\"L\",\"M\",\"N\",\"O\",\"P\",\"Q\",\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\",\" \",\"$\",\"%\",\"*\",\"+\",\"-\",\".\",\"/\",\":\"];function r(c){this.mode=i.ALPHANUMERIC,this.data=c}return r.getBitsLength=function(d){return 11*Math.floor(d/2)+6*(d%2)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(d){let h;for(h=0;h+2<=this.data.length;h+=2){let v=f.indexOf(this.data[h])*45;v+=f.indexOf(this.data[h+1]),d.put(v,11)}this.data.length%2&&d.put(f.indexOf(this.data[h]),6)},as=r,as}var us,Ih;function av(){if(Ih)return us;Ih=1;const i=ll();function f(r){this.mode=i.BYTE,typeof r==\"string\"?this.data=new TextEncoder().encode(r):this.data=new Uint8Array(r)}return f.getBitsLength=function(c){return c*8},f.prototype.getLength=function(){return this.data.length},f.prototype.getBitsLength=function(){return f.getBitsLength(this.data.length)},f.prototype.write=function(r){for(let c=0,d=this.data.length;c<d;c++)r.put(this.data[c],8)},us=f,us}var is,Ph;function uv(){if(Ph)return is;Ph=1;const i=ll(),f=nl();function r(c){this.mode=i.KANJI,this.data=c}return r.getBitsLength=function(d){return d*13},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(c){let d;for(d=0;d<this.data.length;d++){let h=f.toSJIS(this.data[d]);if(h>=33088&&h<=40956)h-=33088;else if(h>=57408&&h<=60351)h-=49472;else throw new Error(\"Invalid SJIS character: \"+this.data[d]+\\`\nMake sure your charset is UTF-8\\`);h=(h>>>8&255)*192+(h&255),c.put(h,13)}},is=r,is}var cs={exports:{}},e0;function iv(){return e0||(e0=1,(function(i){var f={single_source_shortest_paths:function(r,c,d){var h={},v={};v[c]=0;var A=f.PriorityQueue.make();A.push(c,0);for(var p,y,j,E,x,H,X,D,se;!A.empty();){p=A.pop(),y=p.value,E=p.cost,x=r[y]||{};for(j in x)x.hasOwnProperty(j)&&(H=x[j],X=E+H,D=v[j],se=typeof v[j]>\"u\",(se||D>X)&&(v[j]=X,A.push(j,X),h[j]=y))}if(typeof d<\"u\"&&typeof v[d]>\"u\"){var L=[\"Could not find a path from \",c,\" to \",d,\".\"].join(\"\");throw new Error(L)}return h},extract_shortest_path_from_predecessor_list:function(r,c){for(var d=[],h=c;h;)d.push(h),r[h],h=r[h];return d.reverse(),d},find_path:function(r,c,d){var h=f.single_source_shortest_paths(r,c,d);return f.extract_shortest_path_from_predecessor_list(h,d)},PriorityQueue:{make:function(r){var c=f.PriorityQueue,d={},h;r=r||{};for(h in c)c.hasOwnProperty(h)&&(d[h]=c[h]);return d.queue=[],d.sorter=r.sorter||c.default_sorter,d},default_sorter:function(r,c){return r.cost-c.cost},push:function(r,c){var d={value:r,cost:c};this.queue.push(d),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};i.exports=f})(cs)),cs.exports}var t0;function cv(){return t0||(t0=1,(function(i){const f=ll(),r=nv(),c=lv(),d=av(),h=uv(),v=b0(),A=nl(),p=iv();function y(L){return unescape(encodeURIComponent(L)).length}function j(L,ce,I){const $=[];let Ae;for(;(Ae=L.exec(I))!==null;)$.push({data:Ae[0],index:Ae.index,mode:ce,length:Ae[0].length});return $}function E(L){const ce=j(v.NUMERIC,f.NUMERIC,L),I=j(v.ALPHANUMERIC,f.ALPHANUMERIC,L);let $,Ae;return A.isKanjiModeEnabled()?($=j(v.BYTE,f.BYTE,L),Ae=j(v.KANJI,f.KANJI,L)):($=j(v.BYTE_KANJI,f.BYTE,L),Ae=[]),ce.concat(I,$,Ae).sort(function(Y,K){return Y.index-K.index}).map(function(Y){return{data:Y.data,mode:Y.mode,length:Y.length}})}function x(L,ce){switch(ce){case f.NUMERIC:return r.getBitsLength(L);case f.ALPHANUMERIC:return c.getBitsLength(L);case f.KANJI:return h.getBitsLength(L);case f.BYTE:return d.getBitsLength(L)}}function H(L){return L.reduce(function(ce,I){const $=ce.length-1>=0?ce[ce.length-1]:null;return $&&$.mode===I.mode?(ce[ce.length-1].data+=I.data,ce):(ce.push(I),ce)},[])}function X(L){const ce=[];for(let I=0;I<L.length;I++){const $=L[I];switch($.mode){case f.NUMERIC:ce.push([$,{data:$.data,mode:f.ALPHANUMERIC,length:$.length},{data:$.data,mode:f.BYTE,length:$.length}]);break;case f.ALPHANUMERIC:ce.push([$,{data:$.data,mode:f.BYTE,length:$.length}]);break;case f.KANJI:ce.push([$,{data:$.data,mode:f.BYTE,length:y($.data)}]);break;case f.BYTE:ce.push([{data:$.data,mode:f.BYTE,length:y($.data)}])}}return ce}function D(L,ce){const I={},$={start:{}};let Ae=[\"start\"];for(let Z=0;Z<L.length;Z++){const Y=L[Z],K=[];for(let V=0;V<Y.length;V++){const ne=Y[V],q=\"\"+Z+V;K.push(q),I[q]={node:ne,lastCount:0},$[q]={};for(let F=0;F<Ae.length;F++){const ee=Ae[F];I[ee]&&I[ee].node.mode===ne.mode?($[ee][q]=x(I[ee].lastCount+ne.length,ne.mode)-x(I[ee].lastCount,ne.mode),I[ee].lastCount+=ne.length):(I[ee]&&(I[ee].lastCount=ne.length),$[ee][q]=x(ne.length,ne.mode)+4+f.getCharCountIndicator(ne.mode,ce))}}Ae=K}for(let Z=0;Z<Ae.length;Z++)$[Ae[Z]].end=0;return{map:$,table:I}}function se(L,ce){let I;const $=f.getBestModeForData(L);if(I=f.from(ce,$),I!==f.BYTE&&I.bit<$.bit)throw new Error('\"'+L+'\" cannot be encoded with mode '+f.toString(I)+\\`.\n Suggested mode is: \\`+f.toString($));switch(I===f.KANJI&&!A.isKanjiModeEnabled()&&(I=f.BYTE),I){case f.NUMERIC:return new r(L);case f.ALPHANUMERIC:return new c(L);case f.KANJI:return new h(L);case f.BYTE:return new d(L)}}i.fromArray=function(ce){return ce.reduce(function(I,$){return typeof $==\"string\"?I.push(se($,null)):$.data&&I.push(se($.data,$.mode)),I},[])},i.fromString=function(ce,I){const $=E(ce,A.isKanjiModeEnabled()),Ae=X($),Z=D(Ae,I),Y=p.find_path(Z.map,\"start\",\"end\"),K=[];for(let V=1;V<Y.length-1;V++)K.push(Z.table[Y[V]].node);return i.fromArray(H(K))},i.rawSplit=function(ce){return i.fromArray(E(ce,A.isKanjiModeEnabled()))}})(ns)),ns}var n0;function fv(){if(n0)return Xf;n0=1;const i=nl(),f=ps(),r=Vy(),c=Jy(),d=ky(),h=$y(),v=Fy(),A=y0(),p=Py(),y=ev(),j=tv(),E=ll(),x=cv();function H(Z,Y){const K=Z.size,V=h.getPositions(Y);for(let ne=0;ne<V.length;ne++){const q=V[ne][0],F=V[ne][1];for(let ee=-1;ee<=7;ee++)if(!(q+ee<=-1||K<=q+ee))for(let ue=-1;ue<=7;ue++)F+ue<=-1||K<=F+ue||(ee>=0&&ee<=6&&(ue===0||ue===6)||ue>=0&&ue<=6&&(ee===0||ee===6)||ee>=2&&ee<=4&&ue>=2&&ue<=4?Z.set(q+ee,F+ue,!0,!0):Z.set(q+ee,F+ue,!1,!0))}}function X(Z){const Y=Z.size;for(let K=8;K<Y-8;K++){const V=K%2===0;Z.set(K,6,V,!0),Z.set(6,K,V,!0)}}function D(Z,Y){const K=d.getPositions(Y);for(let V=0;V<K.length;V++){const ne=K[V][0],q=K[V][1];for(let F=-2;F<=2;F++)for(let ee=-2;ee<=2;ee++)F===-2||F===2||ee===-2||ee===2||F===0&&ee===0?Z.set(ne+F,q+ee,!0,!0):Z.set(ne+F,q+ee,!1,!0)}}function se(Z,Y){const K=Z.size,V=y.getEncodedBits(Y);let ne,q,F;for(let ee=0;ee<18;ee++)ne=Math.floor(ee/3),q=ee%3+K-8-3,F=(V>>ee&1)===1,Z.set(ne,q,F,!0),Z.set(q,ne,F,!0)}function L(Z,Y,K){const V=Z.size,ne=j.getEncodedBits(Y,K);let q,F;for(q=0;q<15;q++)F=(ne>>q&1)===1,q<6?Z.set(q,8,F,!0):q<8?Z.set(q+1,8,F,!0):Z.set(V-15+q,8,F,!0),q<8?Z.set(8,V-q-1,F,!0):q<9?Z.set(8,15-q-1+1,F,!0):Z.set(8,15-q-1,F,!0);Z.set(V-8,8,1,!0)}function ce(Z,Y){const K=Z.size;let V=-1,ne=K-1,q=7,F=0;for(let ee=K-1;ee>0;ee-=2)for(ee===6&&ee--;;){for(let ue=0;ue<2;ue++)if(!Z.isReserved(ne,ee-ue)){let Ye=!1;F<Y.length&&(Ye=(Y[F]>>>q&1)===1),Z.set(ne,ee-ue,Ye),q--,q===-1&&(F++,q=7)}if(ne+=V,ne<0||K<=ne){ne-=V,V=-V;break}}}function I(Z,Y,K){const V=new r;K.forEach(function(ue){V.put(ue.mode.bit,4),V.put(ue.getLength(),E.getCharCountIndicator(ue.mode,Z)),ue.write(V)});const ne=i.getSymbolTotalCodewords(Z),q=A.getTotalCodewordsCount(Z,Y),F=(ne-q)*8;for(V.getLengthInBits()+4<=F&&V.put(0,4);V.getLengthInBits()%8!==0;)V.putBit(0);const ee=(F-V.getLengthInBits())/8;for(let ue=0;ue<ee;ue++)V.put(ue%2?17:236,8);return $(V,Z,Y)}function $(Z,Y,K){const V=i.getSymbolTotalCodewords(Y),ne=A.getTotalCodewordsCount(Y,K),q=V-ne,F=A.getBlocksCount(Y,K),ee=V%F,ue=F-ee,Ye=Math.floor(V/F),M=Math.floor(q/F),G=M+1,ae=Ye-M,Te=new p(ae);let be=0;const b=new Array(F),R=new Array(F);let Q=0;const W=new Uint8Array(Z.buffer);for(let Ne=0;Ne<F;Ne++){const nt=Ne<ue?M:G;b[Ne]=W.slice(be,be+nt),R[Ne]=Te.encode(b[Ne]),be+=nt,Q=Math.max(Q,nt)}const fe=new Uint8Array(V);let re=0,de,Me;for(de=0;de<Q;de++)for(Me=0;Me<F;Me++)de<b[Me].length&&(fe[re++]=b[Me][de]);for(de=0;de<ae;de++)for(Me=0;Me<F;Me++)fe[re++]=R[Me][de];return fe}function Ae(Z,Y,K,V){let ne;if(Array.isArray(Z))ne=x.fromArray(Z);else if(typeof Z==\"string\"){let Ye=Y;if(!Ye){const M=x.rawSplit(Z);Ye=y.getBestVersionForData(M,K)}ne=x.fromString(Z,Ye||40)}else throw new Error(\"Invalid data\");const q=y.getBestVersionForData(ne,K);if(!q)throw new Error(\"The amount of data is too big to be stored in a QR Code\");if(!Y)Y=q;else if(Y<q)throw new Error(\\`\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: \\`+q+\\`.\n\\`);const F=I(Y,K,ne),ee=i.getSymbolSize(Y),ue=new c(ee);return H(ue,Y),X(ue),D(ue,Y),L(ue,K,0),Y>=7&&se(ue,Y),ce(ue,F),isNaN(V)&&(V=v.getBestMask(ue,L.bind(null,ue,K))),v.applyMask(V,ue),L(ue,K,V),{modules:ue,version:Y,errorCorrectionLevel:K,maskPattern:V,segments:ne}}return Xf.create=function(Y,K){if(typeof Y>\"u\"||Y===\"\")throw new Error(\"No input text\");let V=f.M,ne,q;return typeof K<\"u\"&&(V=f.from(K.errorCorrectionLevel,f.M),ne=y.from(K.version),q=v.from(K.maskPattern),K.toSJISFunc&&i.setToSJISFunction(K.toSJISFunc)),Ae(Y,ne,V,q)},Xf}var fs={},ss={},l0;function S0(){return l0||(l0=1,(function(i){function f(r){if(typeof r==\"number\"&&(r=r.toString()),typeof r!=\"string\")throw new Error(\"Color should be defined as hex string\");let c=r.slice().replace(\"#\",\"\").split(\"\");if(c.length<3||c.length===5||c.length>8)throw new Error(\"Invalid hex color: \"+r);(c.length===3||c.length===4)&&(c=Array.prototype.concat.apply([],c.map(function(h){return[h,h]}))),c.length===6&&c.push(\"F\",\"F\");const d=parseInt(c.join(\"\"),16);return{r:d>>24&255,g:d>>16&255,b:d>>8&255,a:d&255,hex:\"#\"+c.slice(0,6).join(\"\")}}i.getOptions=function(c){c||(c={}),c.color||(c.color={});const d=typeof c.margin>\"u\"||c.margin===null||c.margin<0?4:c.margin,h=c.width&&c.width>=21?c.width:void 0,v=c.scale||4;return{width:h,scale:h?4:v,margin:d,color:{dark:f(c.color.dark||\"#000000ff\"),light:f(c.color.light||\"#ffffffff\")},type:c.type,rendererOpts:c.rendererOpts||{}}},i.getScale=function(c,d){return d.width&&d.width>=c+d.margin*2?d.width/(c+d.margin*2):d.scale},i.getImageWidth=function(c,d){const h=i.getScale(c,d);return Math.floor((c+d.margin*2)*h)},i.qrToImageData=function(c,d,h){const v=d.modules.size,A=d.modules.data,p=i.getScale(v,h),y=Math.floor((v+h.margin*2)*p),j=h.margin*p,E=[h.color.light,h.color.dark];for(let x=0;x<y;x++)for(let H=0;H<y;H++){let X=(x*y+H)*4,D=h.color.light;if(x>=j&&H>=j&&x<y-j&&H<y-j){const se=Math.floor((x-j)/p),L=Math.floor((H-j)/p);D=E[A[se*v+L]?1:0]}c[X++]=D.r,c[X++]=D.g,c[X++]=D.b,c[X]=D.a}}})(ss)),ss}var a0;function sv(){return a0||(a0=1,(function(i){const f=S0();function r(d,h,v){d.clearRect(0,0,h.width,h.height),h.style||(h.style={}),h.height=v,h.width=v,h.style.height=v+\"px\",h.style.width=v+\"px\"}function c(){try{return document.createElement(\"canvas\")}catch{throw new Error(\"You need to specify a canvas element\")}}i.render=function(h,v,A){let p=A,y=v;typeof p>\"u\"&&(!v||!v.getContext)&&(p=v,v=void 0),v||(y=c()),p=f.getOptions(p);const j=f.getImageWidth(h.modules.size,p),E=y.getContext(\"2d\"),x=E.createImageData(j,j);return f.qrToImageData(x.data,h,p),r(E,y,j),E.putImageData(x,0,0),y},i.renderToDataURL=function(h,v,A){let p=A;typeof p>\"u\"&&(!v||!v.getContext)&&(p=v,v=void 0),p||(p={});const y=i.render(h,v,p),j=p.type||\"image/png\",E=p.rendererOpts||{};return y.toDataURL(j,E.quality)}})(fs)),fs}var rs={},u0;function rv(){if(u0)return rs;u0=1;const i=S0();function f(d,h){const v=d.a/255,A=h+'=\"'+d.hex+'\"';return v<1?A+\" \"+h+'-opacity=\"'+v.toFixed(2).slice(1)+'\"':A}function r(d,h,v){let A=d+h;return typeof v<\"u\"&&(A+=\" \"+v),A}function c(d,h,v){let A=\"\",p=0,y=!1,j=0;for(let E=0;E<d.length;E++){const x=Math.floor(E%h),H=Math.floor(E/h);!x&&!y&&(y=!0),d[E]?(j++,E>0&&x>0&&d[E-1]||(A+=y?r(\"M\",x+v,.5+H+v):r(\"m\",p,0),p=0,y=!1),x+1<h&&d[E+1]||(A+=r(\"h\",j),j=0)):p++}return A}return rs.render=function(h,v,A){const p=i.getOptions(v),y=h.modules.size,j=h.modules.data,E=y+p.margin*2,x=p.color.light.a?\"<path \"+f(p.color.light,\"fill\")+' d=\"M0 0h'+E+\"v\"+E+'H0z\"/>':\"\",H=\"<path \"+f(p.color.dark,\"stroke\")+' d=\"'+c(j,y,p.margin)+'\"/>',X='viewBox=\"0 0 '+E+\" \"+E+'\"',se='<svg xmlns=\"http://www.w3.org/2000/svg\" '+(p.width?'width=\"'+p.width+'\" height=\"'+p.width+'\" ':\"\")+X+' shape-rendering=\"crispEdges\">'+x+H+\\`</svg>\n\\`;return typeof A==\"function\"&&A(null,se),se},rs}var i0;function ov(){if(i0)return $l;i0=1;const i=Zy(),f=fv(),r=sv(),c=rv();function d(h,v,A,p,y){const j=[].slice.call(arguments,1),E=j.length,x=typeof j[E-1]==\"function\";if(!x&&!i())throw new Error(\"Callback required as last argument\");if(x){if(E<2)throw new Error(\"Too few arguments provided\");E===2?(y=A,A=v,v=p=void 0):E===3&&(v.getContext&&typeof y>\"u\"?(y=p,p=void 0):(y=p,p=A,A=v,v=void 0))}else{if(E<1)throw new Error(\"Too few arguments provided\");return E===1?(A=v,v=p=void 0):E===2&&!v.getContext&&(p=A,A=v,v=void 0),new Promise(function(H,X){try{const D=f.create(A,p);H(h(D,v,p))}catch(D){X(D)}})}try{const H=f.create(A,p);y(null,h(H,v,p))}catch(H){y(H)}}return $l.create=f.create,$l.toCanvas=d.bind(null,r.render),$l.toDataURL=d.bind(null,r.renderToDataURL),$l.toString=d.bind(null,function(h,v,A){return c.render(h,A)}),$l}var dv=ov();const hv=Yg(dv);function p0(i){return i==null?\"\":typeof i==\"string\"?i:typeof i==\"number\"||typeof i==\"boolean\"?String(i):JSON.stringify(i)}function mv(i){return!(i.text.trim()===\"\"||i.text===p0(i.setting.value)||i.setting.confirm!==void 0&&!i.confirmed)}function gv(i){return i.agents.length===0?m.jsx(\"div\",{className:\"empty\",style:{fontSize:12,padding:\"4px 8px\"},children:\"no agents on this server\"}):m.jsx(m.Fragment,{children:i.agents.map(f=>{const r=f.status===\"disabled\";return m.jsxs(\"div\",{className:\"agent-row\",children:[m.jsxs(\"button\",{type:\"button\",className:\"row-button\",\"aria-current\":f.id===i.current,disabled:r,onClick:()=>i.onSelect(f.id),children:[f.name,r?m.jsx(\"span\",{className:\"agent-off\",children:\" · stopped\"}):null]}),r?m.jsxs(\"div\",{className:\"agent-note\",children:[f.reason??\"switched off\",m.jsx(\"button\",{type:\"button\",className:\"link\",disabled:i.starting===f.id,onClick:()=>i.onStart(f.id),children:i.starting===f.id?\"starting…\":\"start\"})]}):null]},f.id)})})}function yv(i){return i.tools.length===0?m.jsxs(\"p\",{className:\"empty\",children:[\"No tools are pinned. An agent with none can still hold a conversation; a manifest's\",\" \",m.jsx(\"code\",{children:\"tools.pinned\"}),\" is what grants the rest.\"]}):m.jsxs(\"table\",{className:\"panel-table\",children:[m.jsx(\"thead\",{children:m.jsxs(\"tr\",{children:[m.jsx(\"th\",{children:\"tool\"}),m.jsx(\"th\",{children:\"provider\"}),m.jsx(\"th\",{children:\"writes\"}),m.jsx(\"th\",{children:\"trust\"})]})}),m.jsx(\"tbody\",{children:i.tools.map(f=>m.jsxs(\"tr\",{children:[m.jsxs(\"td\",{children:[m.jsx(\"code\",{children:f.slug}),m.jsx(\"div\",{className:\"sub\",children:f.summary})]}),m.jsx(\"td\",{children:f.provider}),m.jsx(\"td\",{children:f.mutating?\"yes\":\"no\"}),m.jsxs(\"td\",{children:[f.trust,f.trustReason===void 0?null:m.jsx(\"div\",{className:\"sub\",children:f.trustReason})]})]},f.slug))})]})}function vv(i){return m.jsxs(m.Fragment,{children:[i.schedules.length===0?m.jsxs(\"p\",{className:\"empty\",children:[\"No schedules. Add one below, or declare it in the manifest's\",\" \",m.jsx(\"code\",{children:\"schedules:\"}),\" block — a declared one survives a rebuild and shows up in a diff.\"]}):m.jsxs(\"table\",{className:\"panel-table\",children:[m.jsx(\"thead\",{children:m.jsxs(\"tr\",{children:[m.jsx(\"th\",{children:\"schedule\"}),m.jsx(\"th\",{children:\"when\"}),m.jsx(\"th\",{children:\"next\"}),m.jsx(\"th\",{children:\"delivers to\"}),m.jsx(\"th\",{children:\"declared in\"}),m.jsx(\"th\",{})]})}),m.jsx(\"tbody\",{children:i.schedules.map(f=>{const r=f.origin===\"manifest\",c=i.busy===f.id;return m.jsxs(\"tr\",{className:f.enabled?\"\":\"off\",children:[m.jsxs(\"td\",{children:[m.jsx(\"code\",{children:f.id}),m.jsx(\"div\",{className:\"sub\",children:f.task})]}),m.jsxs(\"td\",{children:[f.kind,\" \",f.expr,f.timezone===void 0?null:m.jsx(\"div\",{className:\"sub\",children:f.timezone})]}),m.jsx(\"td\",{children:f.enabled?f.nextRunAt??\"never again — a spent one-shot\":\"disabled\"}),m.jsx(\"td\",{children:f.deliverChannel===void 0?\"this session only\":\\`\\${f.deliverChannel}\\${f.deliverTo===void 0?\"\":\\` → \\${f.deliverTo}\\`}\\`}),m.jsxs(\"td\",{children:[r?\"agent.yaml\":\"the API\",r?m.jsxs(\"div\",{className:\"sub\",children:[\"the manifest decides it — edit the file, or the\",\" \",m.jsx(\"code\",{children:\"schedules\"}),\" field under config\"]}):null]}),m.jsxs(\"td\",{style:{whiteSpace:\"nowrap\"},children:[i.onRun===void 0?null:m.jsx(\"button\",{type:\"button\",disabled:c,onClick:()=>i.onRun?.(f.id),children:\"run now\"}),i.onToggle===void 0||r?null:m.jsx(\"button\",{type:\"button\",disabled:c,onClick:()=>i.onToggle?.(f.id,!f.enabled),children:f.enabled?\"disable\":\"enable\"}),i.onDelete===void 0||r?null:m.jsx(\"button\",{type:\"button\",disabled:c,onClick:()=>i.onDelete?.(f.id),children:\"delete\"})]})]},f.id)})})]}),i.onCreate===void 0?null:m.jsx(bv,{onCreate:i.onCreate})]})}function bv(i){const[f,r]=J.useState(\"\"),[c,d]=J.useState(\"cron\"),[h,v]=J.useState(\"\"),[A,p]=J.useState(\"\"),[y,j]=J.useState(\"\"),[E,x]=J.useState(\"\"),H=f.trim()!==\"\"&&h.trim()!==\"\"&&A.trim()!==\"\";return m.jsxs(\"section\",{style:{marginTop:24},children:[m.jsx(\"h3\",{style:{fontSize:13,margin:\"0 0 8px\"},children:\"Add a schedule\"}),m.jsxs(\"div\",{className:\"form-grid\",children:[m.jsx(\"label\",{htmlFor:\"sched-id\",children:\"id\"}),m.jsx(\"input\",{id:\"sched-id\",value:f,placeholder:\"morning-brief\",onChange:X=>r(X.target.value)}),m.jsx(\"label\",{htmlFor:\"sched-kind\",children:\"kind\"}),m.jsxs(\"select\",{id:\"sched-kind\",value:c,onChange:X=>d(X.target.value),children:[m.jsx(\"option\",{value:\"cron\",children:\"cron — a 5- or 6-field expression\"}),m.jsx(\"option\",{value:\"every\",children:\"every — a duration like 15m\"}),m.jsx(\"option\",{value:\"at\",children:\"at — one ISO instant, once\"})]}),m.jsx(\"label\",{htmlFor:\"sched-expr\",children:\"expr\"}),m.jsx(\"input\",{id:\"sched-expr\",value:h,placeholder:c===\"cron\"?\"0 8 * * *\":c===\"every\"?\"15m\":\"\",onChange:X=>v(X.target.value)}),m.jsx(\"label\",{htmlFor:\"sched-task\",children:\"task\"}),m.jsx(\"input\",{id:\"sched-task\",value:A,placeholder:\"Summarise today's calendar.\",onChange:X=>p(X.target.value)}),m.jsx(\"label\",{htmlFor:\"sched-channel\",children:\"deliver\"}),m.jsxs(\"div\",{children:[m.jsx(\"input\",{id:\"sched-channel\",value:y,placeholder:\"channel id — blank for this session only\",onChange:X=>j(X.target.value)}),y.trim()===\"\"?null:m.jsxs(m.Fragment,{children:[m.jsx(\"input\",{value:E,placeholder:\"address\",onChange:X=>x(X.target.value)}),m.jsxs(\"p\",{className:\"sub\",children:[\"The address a reply is \",m.jsx(\"em\",{children:\"sent\"}),\" to — on Telegram the numeric chat id, never an \",m.jsx(\"code\",{children:\"@handle\"}),\", which addresses a channel and not a person. It is the id inbound messages arrive on.\"]})]})]})]}),m.jsx(\"button\",{type:\"button\",disabled:!H,style:{marginTop:10},onClick:()=>i.onCreate({id:f.trim(),kind:c,expr:h.trim(),task:A.trim(),deliver:y.trim()===\"\"?\"none\":{channel:y.trim(),to:E.trim()}}),children:\"add\"})]})}function Sv(i){return i.editable?m.jsxs(m.Fragment,{children:[m.jsxs(\"p\",{className:\"sub\",style:{marginTop:0},children:[i.file===void 0?null:m.jsxs(m.Fragment,{children:[m.jsx(\"code\",{children:i.file}),\".\",\" \"]}),\"An agent's settings are fixed for its instance's lifetime, so saving one replaces the agent — the conversation history is in the store and survives it.\"]}),i.note===void 0?null:m.jsx(\"p\",{className:\"row note\",children:i.note}),i.settings.map(f=>m.jsx(pv,{setting:f,busy:i.busy===f.path,onSet:i.onSet},f.path))]}):m.jsx(\"p\",{className:\"empty\",children:\"This agent was loaded from an object rather than a file, so there is no manifest to change. An embedder holding new settings passes the new object to its runtime.\"})}function pv(i){const f=p0(i.setting.value),[r,c]=J.useState(f),[d,h]=J.useState(!1),[v,A]=J.useState(f);v!==f&&(A(f),c(f),h(!1));const p=mv({setting:i.setting,text:r,confirmed:d}),y=f.length>48||f.includes(\"{\")||f.includes(\"[\");return m.jsxs(\"section\",{className:\"config-row\",children:[m.jsxs(\"div\",{className:\"config-head\",children:[m.jsx(\"code\",{children:i.setting.path}),i.setting.value===void 0?m.jsx(\"span\",{className:\"sub\",children:\" not set\"}):null]}),m.jsx(\"p\",{className:\"sub\",children:i.setting.means}),y?m.jsx(\"textarea\",{rows:2,value:r,\"aria-label\":i.setting.path,onChange:j=>c(j.target.value)}):m.jsx(\"input\",{value:r,\"aria-label\":i.setting.path,onChange:j=>c(j.target.value)}),i.setting.confirm===void 0?null:m.jsxs(\"label\",{className:\"row note bad\",style:{display:\"block\"},children:[m.jsx(\"input\",{type:\"checkbox\",checked:d,onChange:j=>h(j.target.checked)}),\" \",i.setting.confirm]}),m.jsx(\"button\",{type:\"button\",disabled:!p||i.busy,onClick:()=>i.onSet(i.setting.path,r,{confirm:d}),children:i.busy?\"saving…\":\"save\"})]})}function Ev(i){return i.warnings.length===0?null:m.jsxs(\"section\",{className:\"warnings\",children:[m.jsxs(\"h3\",{children:[i.warnings.length,\" thing\",i.warnings.length===1?\"\":\"s\",\" this agent could not set up\"]}),m.jsx(\"p\",{className:\"sub\",children:\"It is running. Each of these is a capability it does not have — fix the cause and restart the agent.\"}),i.warnings.map(f=>m.jsxs(\"div\",{className:\"warning\",children:[m.jsxs(\"p\",{className:\"warning-message\",children:[f.field===void 0?null:m.jsx(\"code\",{children:f.field}),\" \",f.message]}),f.hint===void 0?null:m.jsx(\"p\",{className:\"hint\",children:f.hint})]},\\`\\${f.code}:\\${f.message}\\`))]})}function Tv(i){return i.channels.length===0?m.jsx(\"p\",{className:\"empty\",children:\"No channels. This agent is reached through this page and the HTTP API only.\"}):m.jsxs(\"div\",{className:\"channels\",children:[i.channels.map(f=>{const r=f.input,c=r?.expiresAt!==void 0&&Date.parse(r.expiresAt)<=i.now;return m.jsxs(\"section\",{className:\"channel\",children:[m.jsxs(\"h3\",{children:[m.jsx(\"code\",{children:f.id}),\" \",m.jsx(\"span\",{className:\"sub\",children:f.type})]}),m.jsxs(\"p\",{className:\\`status status-\\${f.status??\"off\"}\\`,children:[f.enabled===!1?\"disconnected\":f.status??\"not started here\",f.detail===void 0?null:\\` — \\${f.detail}\\`]}),f.credentialEnv===void 0?null:m.jsxs(\"p\",{className:f.credentialSet===!0?\"sub\":\"warn\",children:[m.jsx(\"code\",{children:f.credentialEnv}),\" \",f.credentialSet===!0?\"is set\":\"is NOT set\"]}),r===void 0?null:m.jsxs(\"div\",{className:\\`channel-input \\${c?\"stale\":\"fresh\"}\\`,children:[c?m.jsx(\"p\",{className:\"warn\",children:\"this expired — the channel will issue another\"}):null,m.jsx(Cv,{kind:r.kind,payload:r.payload}),m.jsxs(\"p\",{className:\"sub\",children:[r.kind,\" · issued \",r.issuedAt,r.expiresAt===void 0?\" · no expiry reported\":\\` · expires \\${r.expiresAt}\\`]})]}),i.actions===void 0?null:m.jsx(Av,{channel:f,actions:i.actions})]},f.id)}),i.actions?.note===void 0?null:m.jsx(\"p\",{className:\"row note\",children:i.actions.note})]})}function Av(i){const[f,r]=J.useState(\"\"),{channel:c,actions:d}=i,h=d.busy===c.id,v=c.enabled!==!1,A=c.input!==void 0||c.type===\"whatsapp\";return m.jsxs(\"div\",{className:\"channel-actions\",children:[m.jsx(\"button\",{type:\"button\",disabled:h,onClick:()=>d.onConnect(c.id,!v),children:v?\"disconnect\":\"connect\"}),A?m.jsx(\"button\",{type:\"button\",disabled:h,onClick:()=>d.onUnpair(c.id),children:\"unpair\"}):null,c.credentialEnv===void 0?null:m.jsxs(\"form\",{onSubmit:p=>{p.preventDefault(),f!==\"\"&&(d.onCredential(c.id,f),r(\"\"))},children:[m.jsx(\"input\",{type:\"password\",autoComplete:\"new-password\",placeholder:c.credentialEnv,value:f,disabled:h,onChange:p=>r(p.target.value)}),m.jsx(\"button\",{type:\"submit\",disabled:h||f===\"\",children:c.credentialSet===!0?\"replace\":\"set\"})]}),h?m.jsx(\"span\",{className:\"sub\",children:\"working…\"}):null]})}const zv=[{panel:\"tools\",label:\"tools\"},{panel:\"schedules\",label:\"schedules\"},{panel:\"channels\",label:\"channels\"},{panel:\"config\",label:\"config\"},{panel:\"keys\",label:\"keys\"}];function Cv(i){if(i.kind===\"pairing_code\")return m.jsx(\"p\",{className:\"payload-code\",\"data-kind\":i.kind,children:i.payload.length===8?\\`\\${i.payload.slice(0,4)} \\${i.payload.slice(4)}\\`:i.payload});const f=i.kind===\"qr\"?Nv(i.payload):void 0;return f===void 0?m.jsx(\"pre\",{className:\"payload\",\"data-kind\":i.kind,children:i.payload}):m.jsxs(\"svg\",{className:\"payload-qr\",viewBox:\\`0 0 \\${f.extent} \\${f.extent}\\`,\"data-kind\":i.kind,\"data-modules\":f.size,shapeRendering:\"crispEdges\",role:\"img\",\"aria-label\":\"Scan this code from WhatsApp, under Linked devices\",children:[m.jsx(\"rect\",{width:f.extent,height:f.extent,fill:\"#fff\"}),m.jsx(\"path\",{d:f.d,fill:\"#000\"})]})}const os=4;function Nv(i){try{const{modules:f}=hv.create(i,{errorCorrectionLevel:\"L\"}),r=f.size;let c=\"\";for(let d=0;d<r;d+=1)for(let h=0;h<r;h+=1)f.data[d*r+h]===1&&(c+=\\`M\\${h+os},\\${d+os}h1v1h-1z\\`);return c===\"\"?void 0:{d:c,size:r,extent:r+os*2}}catch{return}}const ds=\"dispach.turn\";function jv(i){const[f,r]=J.useState(),[c,d]=J.useState();return J.useEffect(()=>{Ay(i.baseUrl).then(r).catch(h=>d(h instanceof Error?h.message:String(h)))},[i.baseUrl]),c!==void 0?m.jsxs(gs,{title:\"Cannot reach the server\",children:[m.jsx(\"p\",{children:c}),m.jsx(\"button\",{type:\"button\",onClick:()=>window.location.reload(),children:\"Try again\"})]}):f===void 0?m.jsx(gs,{title:\"Connecting…\"}):f.kind===\"needed\"?m.jsx(xv,{baseUrl:i.baseUrl,because:f.because}):m.jsx(Mv,{baseUrl:i.baseUrl,token:f.kind===\"key\"?f.secret:void 0})}function gs(i){return m.jsx(\"div\",{className:\"gate\",children:m.jsxs(\"div\",{className:\"card\",children:[m.jsx(\"h2\",{children:i.title}),i.children]})})}function xv(i){const[f,r]=J.useState(\"\"),[c,d]=J.useState(),[h,v]=J.useState(!1),A=async p=>{v(!0),d(void 0);try{const y=p?await h0(i.baseUrl,f.trim()):f.trim();bs(y),window.location.reload()}catch(y){d(y instanceof Error?y.message:String(y)),v(!1)}};return m.jsxs(gs,{title:\"This server needs a credential\",children:[m.jsx(\"p\",{children:i.because}),m.jsx(\"input\",{value:f,placeholder:\"paste a claim or an operator key\",onChange:p=>r(p.target.value)}),m.jsxs(\"p\",{className:\"hint\",style:{margin:\"8px 0 12px\"},children:[m.jsx(\"code\",{children:\"dispach serve\"}),\" prints a one-time claim at boot while no key exists. A claim is exchanged for a key this browser keeps; a key is used directly.\"]}),m.jsx(\"div\",{className:\"ask\",children:m.jsxs(\"div\",{className:\"buttons\",children:[m.jsx(\"button\",{type:\"button\",className:\"primary\",disabled:h||f.trim()===\"\",onClick:()=>A(!0),children:\"Exchange a claim\"}),m.jsx(\"button\",{type:\"button\",disabled:h||f.trim()===\"\",onClick:()=>A(!1),children:\"Use as a key\"})]})}),c===void 0?null:m.jsx(\"p\",{className:\"note bad\",style:{marginTop:12},children:c})]})}const yi=i=>i instanceof Zt&&i.status===404,_v={new:\"New agent\",tools:\"Tools\",schedules:\"Schedules\",channels:\"Channels\",config:\"Settings\",keys:\"Operator keys\"};function Mv(i){const f=J.useRef(m0(i.baseUrl,i.token)),[r,c]=J.useState([]),[d,h]=J.useState(),[v,A]=J.useState(),[p,y]=J.useState(),[j,E]=J.useState([]),x=J.useCallback(async()=>{h(void 0),A(void 0),E([]),K(\"this agent is no longer running on this server — start it from the list\");try{c(await f.current.agents())}catch{}},[]),[H,X]=J.useState([]),[D,se]=J.useState(),[L,ce]=J.useState(()=>_y(window.location.href).panel),[I,$]=J.useState(Fa),[Ae,Z]=J.useState(\"\"),[Y,K]=J.useState(),V=J.useRef(void 0),ne=J.useRef(wy());J.useEffect(()=>{const B=new URL(window.location.href).searchParams.get(\"agent\")??void 0;f.current.agents().then(k=>{c(k);const he=k.filter(lt=>lt.status!==\"disabled\"),De=he.find(lt=>lt.id===B)??he[0];if(De===void 0){new URL(window.location.href).searchParams.get(\"panel\")===null&&ce(\"new\");return}h(De.id),A(De.name),$(lt=>({...lt,filter:Hy(De.dialect??\"nlt\").filter})),document.title=\\`\\${De.name} · Dispach\\`}).catch(k=>K(qt(k)))},[]);const q=J.useMemo(()=>d===void 0?void 0:f.current.agent(d),[d]),F=J.useCallback(async()=>{if(q!==void 0)try{X(await q.sessions()),K(void 0)}catch(B){yi(B)?x():K(qt(B))}},[q,x]);J.useEffect(()=>{F()},[F]);const ee=J.useCallback(async(B,k)=>{const he=ne.current,De=he.begin(B);if(De===void 0)return;const lt=k.turn(B);V.current=()=>lt.stop();try{sessionStorage.setItem(ds,B);for await(const rl of lt.stream({chunks:!0,signal:De}))$(Il=>Yy(Il,rl))}catch(rl){De.aborted||(K(qt(rl)),$(Il=>({...Il,running:!1})))}finally{he.finish(B),sessionStorage.removeItem(ds),V.current=void 0,De.aborted||F()}},[F]);J.useEffect(()=>{if(q===void 0)return;const B=sessionStorage.getItem(ds);if(B!==null)return $(k=>({...k,running:!0})),ee(B,q),()=>ne.current.abort()},[q,ee]),J.useEffect(()=>{if(q===void 0)return;let B=!0;const k=()=>{q.approvals().then(De=>{B&&E(De)}).catch(De=>{B&&yi(De)&&x()})};k();const he=window.setInterval(k,5e3);return()=>{B=!1,window.clearInterval(he)}},[q,x]);const ue=async()=>{const B=Ae.trim();if(!(B===\"\"||q===void 0)){Z(\"\"),K(void 0),$(k=>qy(k,B));try{const k=await q.send(B,{...D===void 0?{}:{sessionKey:D}});D===void 0&&se(k.sessionKey),await ee(k.turnId,q)}catch(k){K(qt(k)),$(he=>({...he,running:!1}))}}},Ye=async(B,k)=>{if(q!==void 0)try{await q.approve(B,k)}catch(he){he instanceof Zt&&he.code===\"approval_not_found\"||K(qt(he))}},M=async B=>{if(ne.current.abort(),ce(\"chat\"),se(B),$(Fa),Z(\"\"),!(B===void 0||q===void 0))try{const k=await Rv(i.baseUrl,i.token,d??\"\",B);$({...Fa,rows:k})}catch(k){K(qt(k))}},[G,ae]=J.useState({tools:[],schedules:[],channels:[],warnings:[]}),[Te,be]=J.useState(void 0),[b,R]=J.useState(void 0),Q=J.useCallback(async B=>{const[k,he,De,lt]=await Promise.all([B.tools(),B.schedules(),B.describe(),B.config()]);ae({tools:k,schedules:he,channels:De.channels??[],warnings:De.warnings??[],config:lt})},[]),W=J.useCallback(async(B,k)=>{if(q!==void 0){be(B),R(void 0);try{const he=await q.setChannel(B,k);R([...he.notes,...he.applied?[]:[\\`Not in force yet: \\${he.pending?.message??\"restart to apply\"}\\`]].join(\" \")),await Q(q)}catch(he){R(he instanceof Error?he.message:String(he))}finally{be(void 0)}}},[q,Q]),fe=J.useCallback(async B=>{if(q!==void 0){be(B),R(void 0);try{R((await q.unpairChannel(B)).note),await Q(q)}catch(k){R(k instanceof Error?k.message:String(k))}finally{be(void 0)}}},[q,Q]);J.useEffect(()=>{if(q===void 0||L!==\"tools\"&&L!==\"schedules\"&&L!==\"channels\"&&L!==\"config\")return;let B=!1;return(async()=>{try{if(await Q(q),B)return}catch(k){if(B)return;yi(k)?x():K(qt(k))}})(),()=>{B=!0}},[q,L,x,Q]);const[re,de]=J.useState(),[Me,Ne]=J.useState(),nt=J.useCallback(async(B,k)=>{if(q!==void 0){de(B),K(void 0),Ne(void 0);try{const he=await k(q);Ne(he),await Q(q)}catch(he){yi(he)?x():K(qt(he))}finally{de(void 0)}}},[q,x,Q]),al=J.useCallback((B,k,he)=>void nt(B,async De=>{const lt=await De.setConfig(B,k,{...he.confirm?{confirm:!0}:{}});return lt.applied?lt.reflowed?\\`\\${B} saved. The manifest was re-serialised, so its comments have moved — worth a look at the diff.\\`:void 0:\\`\\${B} was written to the manifest and is not in force yet: \\${lt.pending?.message??\"the agent could not be replaced\"} It takes effect at the next start.\\`}),[nt]),[At,Fl]=J.useState(),[zt,ul]=J.useState({}),[Wl,Wa]=J.useState(!1),[Ia,il]=J.useState(!1),[cl,fl]=J.useState();J.useEffect(()=>{if(L!==\"new\"||At!==void 0)return;let B=!1;return(async()=>{try{const k=await f.current.provision();if(B)return;Fl(k),ul(Ry(k.steps))}catch(k){B||K(qt(k))}})(),()=>{B=!0}},[L,At]);const Si=J.useCallback(async()=>{if(At!==void 0&&(Wa(!0),!(g0(At.steps,zt).length>0))){il(!0),K(void 0);try{const B=await f.current.createAgent(Dy(At.steps,zt));fl(B),c(await f.current.agents())}catch(B){K(qt(B))}finally{il(!1)}}},[At,zt]),sl=J.useCallback(B=>{const k=B.panel??L,he=B.agentId??d;ce(k),B.agentId!==void 0&&B.agentId!==d&&(h(B.agentId),A(r.find(De=>De.id===B.agentId)?.name),se(void 0),$(Fa),Z(\"\")),window.history.replaceState(null,\"\",My(window.location.href,{...he===void 0?{}:{agentId:he},panel:k}))},[d,r,L]),ut=J.useCallback(async B=>{y(B);try{await f.current.agent(B).start(),c(await f.current.agents())}catch(k){K(qt(k))}finally{y(void 0)}},[]);return m.jsxs(\"div\",{className:\"shell\",children:[m.jsxs(\"aside\",{className:\"side\",children:[m.jsxs(\"header\",{children:[m.jsx(\"div\",{className:\"brand\",children:\"Dispach\"}),m.jsx(\"div\",{style:{fontSize:12,color:\"var(--dim)\"},children:v??\"…\"})]}),m.jsxs(\"nav\",{children:[r.length>1||r.some(B=>B.status===\"disabled\")?m.jsxs(m.Fragment,{children:[m.jsx(\"div\",{className:\"group\",children:\"Agents\"}),m.jsx(gv,{agents:r,current:d,onSelect:B=>sl({agentId:B}),onStart:B=>void ut(B),...p===void 0?{}:{starting:p}})]}):null,m.jsx(\"div\",{className:\"group\",children:\"Conversation\"}),m.jsx(\"button\",{type:\"button\",className:\"row-button\",\"aria-current\":L===\"chat\"&&D===void 0,onClick:()=>void M(void 0),children:\"+ new\"}),H.map(B=>m.jsx(\"button\",{type:\"button\",className:\"row-button\",\"aria-current\":L===\"chat\"&&D===B.sessionKey,onClick:()=>void M(B.sessionKey),children:B.sessionKey},B.sessionKey)),m.jsx(\"div\",{className:\"group\",children:\"Server\"}),m.jsx(\"button\",{type:\"button\",className:\"row-button\",\"aria-current\":L===\"new\",onClick:()=>sl({panel:\"new\"}),children:\"+ new agent\"}),zv.map(B=>m.jsx(\"button\",{type:\"button\",className:\"row-button\",\"aria-current\":L===B.panel,onClick:()=>sl({panel:B.panel}),children:B.label},B.panel))]}),m.jsxs(\"footer\",{children:[m.jsx(\"span\",{className:\\`dot \\${I.running?\"busy\":\"live\"}\\`}),m.jsx(\"span\",{style:{fontSize:11,color:\"var(--dim)\"},children:I.running?\"working\":\"ready\"}),i.token===void 0?m.jsx(\"span\",{style:{fontSize:11,color:\"var(--warn)\",marginLeft:\"auto\"},children:\"unauthenticated\"}):m.jsx(\"button\",{type:\"button\",style:{marginLeft:\"auto\",padding:\"3px 8px\",fontSize:11},onClick:()=>{Ss(),window.location.reload()},children:\"forget key\"})]})]}),m.jsxs(\"main\",{className:\"main\",children:[m.jsxs(\"div\",{className:\"bar\",children:[m.jsx(\"strong\",{children:L===\"chat\"?v??\"\":_v[L]}),L===\"chat\"?m.jsx(\"span\",{children:D??\"new conversation\"}):null,m.jsx(\"span\",{className:\"spacer\"}),j.length>0?m.jsxs(\"span\",{style:{color:\"var(--warn)\"},children:[j.length,\" waiting on you\"]}):null]}),L!==\"chat\"?m.jsx(\"div\",{className:\"scroll\",children:m.jsxs(\"div\",{className:\"pad\",children:[Y===void 0?null:m.jsx(\"p\",{className:\"row note bad\",children:Y}),m.jsx(Ev,{warnings:G.warnings}),L===\"new\"?At===void 0?m.jsx(\"p\",{className:\"empty\",children:\"reading this server's questions…\"}):m.jsx(Ky,{offer:At,answers:zt,busy:Ia,touched:Wl,...Y===void 0?{}:{error:Y},...cl===void 0?{}:{result:cl},onAnswer:(B,k)=>ul(he=>({...he,[B]:k})),onSubmit:()=>void Si(),onOpen:B=>{fl(void 0),Fl(void 0),Wa(!1),sl({agentId:B,panel:\"chat\"})}}):null,L===\"keys\"?m.jsx(Cy,{client:f.current,baseUrl:i.baseUrl,token:i.token}):null,L===\"tools\"?m.jsx(yv,{tools:G.tools}):null,L===\"schedules\"?m.jsx(vv,{schedules:G.schedules,...re===void 0?{}:{busy:re},onCreate:B=>void nt(String(B.id),k=>k.createSchedule(B).then(()=>{})),onDelete:B=>void nt(B,k=>k.deleteSchedule(B).then(()=>{})),onRun:B=>void nt(B,async k=>{const he=await k.runSchedule(B);return\\`\\${B} fired out of band as \\${he.turnId} — its next scheduled run has not moved.\\`}),onToggle:(B,k)=>void nt(B,he=>he.updateSchedule(B,{enabled:k}).then(()=>{}))}):null,L===\"config\"?G.config===void 0?m.jsx(\"p\",{className:\"empty\",children:\"reading this agent's settings…\"}):m.jsx(Sv,{settings:G.config.settings,editable:G.config.editable,...G.config.file===void 0?{}:{file:G.config.file},...re===void 0?{}:{busy:re},...Me===void 0?{}:{note:Me},onSet:al}):null,L===\"channels\"?m.jsx(Tv,{channels:G.channels,now:Date.now(),actions:{onConnect:(B,k)=>void W(B,{enabled:k}),onCredential:(B,k)=>void W(B,{credential:k}),onUnpair:B=>void fe(B),...Te===void 0?{}:{busy:Te},...b===void 0?{}:{note:b}}}):null]})}):m.jsxs(m.Fragment,{children:[m.jsx(\"div\",{className:\"scroll\",children:m.jsxs(\"div\",{className:\"pad\",children:[Y===void 0?null:m.jsx(\"p\",{className:\"row note bad\",children:Y}),m.jsx(yy,{state:I,onAnswer:(B,k)=>void Ye(B,k)}),m.jsx(wv,{state:I})]})}),m.jsx(py,{value:Ae,busy:I.running,onChange:Z,onSend:()=>void ue(),onStop:()=>void V.current?.()})]})]})]})}function wv(i){const f=J.useRef(null),r=i.state.rows.length+i.state.live.length;return J.useEffect(()=>{const c=f.current,d=c?.closest(\".scroll\");if(c===null||d===null||d===void 0)return;d.scrollHeight-d.scrollTop-d.clientHeight<40&&c.scrollIntoView({block:\"end\"})},[r]),m.jsx(\"div\",{ref:f})}async function Rv(i,f,r,c){const d=await fetch(\\`\\${i}/v1/agents/\\${r}/sessions/\\${encodeURIComponent(c)}/messages?limit=200\\`,{headers:f===void 0?{}:{authorization:\\`Bearer \\${f}\\`}});return d.ok?[...(await d.json()).messages??[]].reverse().filter(v=>v.origin===void 0&&(v.role===\"user\"||v.role===\"assistant\")&&(v.content??\"\")!==\"\").map((v,A)=>({kind:v.role===\"user\"?\"user\":\"reply\",id:\\`h\\${A}\\`,text:v.content??\"\"})):[]}function qt(i){return i instanceof Zt||i instanceof Error?i.message:String(i)}const E0=document.getElementById(\"root\");if(E0===null)throw new Error(\"no #root in the document\");$g.createRoot(E0).render(m.jsx(J.StrictMode,{children:m.jsx(jv,{baseUrl:window.location.origin})}));\n`;\n\n// ../web/dist/index.html\nvar dist_default = `<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <!--\n An inline SVG data URI rather than a file, and that is a constraint rather than a\n flourish: the server embeds these assets as *text* (decision 11.200), so a binary\n favicon would be the one thing in the build that could not ride inside the bundle.\n -->\n <link\n rel=\"icon\"\n href=\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='%230b0b0c'/%3E%3Cpath d='M9 8h7a8 8 0 0 1 0 16H9z' fill='none' stroke='%23e8e6e3' stroke-width='2.5'/%3E%3C/svg%3E\"\n />\n <title>Dispach</title>\n <!--\n No title text beyond the brand. The page sets \\`document.title\\` from the agent it is\n actually talking to once it knows, because a tab saying \"Dispach\" next to three others\n saying \"Dispach\" is a tab nobody can find.\n -->\n <script type=\"module\" crossorigin src=\"./assets/app.js\"></script>\n <link rel=\"stylesheet\" crossorigin href=\"./assets/app.css\">\n </head>\n <body>\n <div id=\"root\"></div>\n </body>\n</html>\n`;\n\n// src/web.ts\nfunction etagOf(body) {\n let hash = 2166136261;\n for (let i = 0;i < body.length; i += 1) {\n hash ^= body.charCodeAt(i);\n hash = Math.imul(hash, 16777619) >>> 0;\n }\n return `\"${hash.toString(36)}-${body.length.toString(36)}\"`;\n}\nfunction asset(body, contentType) {\n return { body, contentType, etag: etagOf(body) };\n}\nvar WEB_ASSETS = {\n \"/\": asset(dist_default, \"text/html; charset=utf-8\"),\n \"/assets/app.js\": asset(app_default2, \"text/javascript; charset=utf-8\"),\n \"/assets/app.css\": asset(app_default, \"text/css; charset=utf-8\")\n};\nvar WEB_PATHS = Object.keys(WEB_ASSETS);\nfunction serveAsset(path, request) {\n const found = WEB_ASSETS[path];\n if (found === undefined)\n return;\n const headers = {\n \"content-type\": found.contentType,\n etag: found.etag,\n \"cache-control\": \"no-cache\"\n };\n if (request.headers.get(\"if-none-match\") === found.etag) {\n return new Response(null, { status: 304, headers });\n }\n return new Response(found.body, { status: 200, headers });\n}\n\n// src/handler.ts\nvar MAX_BODY_BYTES = 1e6;\nvar MAX_SENDER_ID = 256;\nvar MAX_SENDER_NAME = 128;\nvar MAX_IDEMPOTENCY_KEY = 255;\nvar DOCS_PAGE = `<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>Dispach API</title>\n</head>\n<body style=\"margin:0\">\n<noscript style=\"display:block;font:14px/1.5 system-ui;padding:2rem;max-width:40rem\">\n <h1 style=\"font-size:1rem\">This page needs JavaScript and a network</h1>\n <p>It loads the reference viewer from a CDN. The document itself is served locally and needs\n neither: <a href=\"/v1/openapi.json\">/v1/openapi.json</a>.</p>\n</noscript>\n<div id=\"app\"></div>\n<script src=\"https://cdn.jsdelivr.net/npm/@scalar/api-reference\"></script>\n<script>\n Scalar.createApiReference('#app', { url: '/v1/openapi.json', theme: 'default' })\n</script>\n</body>\n</html>\n`;\nfunction createHandler(options) {\n const { runtime } = options;\n const token = options.token;\n const now = options.now ?? (() => Date.now());\n const startedAt = now();\n if (token === undefined && options.allowUnauthenticated !== true) {\n throw new HarnessError({\n code: \"server_token_missing\",\n message: \"createHandler was called with no token and no allowUnauthenticated.\",\n hint: \"Pass token, or pass allowUnauthenticated: true to state that this handler is mounted somewhere already protected. Defaulting to open would make the safe configuration the one you have to remember.\"\n });\n }\n const running = options.running ?? new Map;\n const approvals = options.approvals ?? createApprovalRegistry();\n const provisioningIsLocal = () => options.origin !== undefined && isLoopback(options.origin.host);\n const mayProvision = (who) => provisioningIsLocal() || who.kind !== \"open\" && can(who, \"admin\");\n const refuseOrigin = (request) => {\n if (options.origin === undefined)\n return;\n const problem = originProblem(request, options.origin);\n return problem === undefined ? undefined : fail(problem, 403);\n };\n const withCors = (request, response) => {\n if (options.origin === undefined)\n return response;\n const extra = corsHeaders(request, options.origin);\n if (Object.keys(extra).length === 0)\n return response;\n const headers = new Headers(response.headers);\n for (const [name, value] of Object.entries(extra))\n headers.set(name, value);\n return new Response(response.body, {\n status: response.status,\n statusText: response.statusText,\n headers\n });\n };\n let closed = false;\n const authRequired = async () => {\n if (token !== undefined || closed)\n return true;\n closed = await runtime.store.operatorKeys.liveCount() > 0;\n return closed;\n };\n const resolve = async (request, pathname, capability) => {\n if (isOpenPath(pathname) || !await authRequired())\n return { kind: \"open\" };\n const who = await authorise({\n request,\n expected: token,\n keys: runtime.store.operatorKeys,\n claim: options.claim,\n pathname,\n at: now()\n });\n if (who instanceof Response)\n return who;\n if (who.kind === \"claim\")\n return who;\n if (capability !== \"open\" && !can(who, capability)) {\n return forbidden(capability, `${request.method} ${pathname}`);\n }\n return who;\n };\n const router = new Router;\n router.add(\"GET\", \"/v1/health\", () => json({\n status: \"ok\",\n version: VERSION2,\n uptimeMs: now() - startedAt,\n agents: runtime.list().length\n }), { capability: \"open\" });\n router.add(\"GET\", \"/v1/ready\", () => {\n if (runtime.ready)\n return json({ status: \"ready\", agents: runtime.list().length });\n return json({ status: \"starting\", agents: runtime.list().length }, 503);\n }, { capability: \"open\" });\n router.add(\"GET\", \"/v1/agents\", async (context) => {\n const hosted = runtime.list().map((agent) => summary(runtime, agent));\n const live = new Set(hosted.map((entry) => entry.id));\n const stopped = (await runtime.store.agentState.list()).filter((state) => !state.enabled && !live.has(state.agentId)).map((state) => ({\n id: state.agentId,\n name: state.agentId,\n status: \"disabled\",\n ...state.reason === undefined ? {} : { reason: state.reason },\n ...state.disabledAt === undefined ? {} : { disabledAt: state.disabledAt }\n }));\n return json(visibleAgents(context.principal, [...hosted, ...stopped]));\n }, { capability: \"read\" });\n router.add(\"GET\", \"/v1/agents/:id\", (context) => withAgent(runtime, context, async (agent) => {\n const schedules = await agent.store.schedules.list(agent.id);\n const team = runtime.team(agent.id);\n return json({\n ...summary(runtime, agent),\n dialect: agent.describe().dialect,\n window: agent.window,\n tools: agent.tools.size,\n catalogueTokens: agent.describe().catalogueTokens,\n skills: agent.skills?.skills.length ?? 0,\n schedules: schedules.length,\n ...team.length === 0 ? {} : {\n team: team.map((member) => ({\n id: member.id,\n task: member.task,\n artifact: Object.keys(member.artifact.properties)\n }))\n },\n warnings: [...agent.warnings, ...agent.tools.warnings]\n });\n }), { capability: \"read\" });\n router.add(\"POST\", \"/v1/agents/:id/reload\", (context) => withAgent(runtime, context, async (agent) => {\n try {\n const admitted = await runtime.replace(agent.id);\n return json({\n id: agent.id,\n status: \"loaded\",\n adopted: admitted.map((entry) => entry.id)\n });\n } catch (error) {\n if (isHarnessError(error)) {\n return fail({\n code: error.code,\n message: error.message,\n hint: error.hint,\n ...error.field === undefined ? {} : { field: error.field }\n }, error.code === \"agent_turn_in_flight\" ? 409 : 400);\n }\n throw error;\n }\n }), { capability: \"admin\" });\n router.add(\"GET\", \"/v1/openapi.json\", (context) => json(openapiDocument({\n routes: router.routes(),\n serverUrl: `${context.url.protocol}//${context.url.host}`\n })), { capability: \"open\" });\n router.add(\"GET\", \"/docs\", () => new Response(DOCS_PAGE, {\n status: 200,\n headers: { \"content-type\": \"text/html; charset=utf-8\" }\n }), { capability: \"open\" });\n router.add(\"GET\", \"/v1/provision\", (context) => json({\n available: options.provision !== undefined,\n local: provisioningIsLocal(),\n allowed: mayProvision(context.principal),\n steps: options.provision?.steps() ?? []\n }), { capability: \"read\" });\n router.add(\"POST\", \"/v1/agents\", async (context) => {\n const provision = options.provision;\n if (provision === undefined) {\n return fail({\n code: \"provisioning_not_supported\",\n message: \"This server cannot create agents.\",\n hint: \"Creating one writes a directory of files from a question set this process was not given — an embedder mounting this handler over its own agent store is the case that lands here. Run `init` where the sandbox is, or mount an agent directory.\"\n }, 501);\n }\n if (!mayProvision(context.principal)) {\n return fail({\n code: \"provisioning_not_local\",\n message: \"Creating an agent needs either a loopback bind or a credential with the admin capability.\",\n hint: \"This route writes files and starts an agent. A token-less loopback server is a supported configuration, so on a non-loopback bind it asks for a credential instead — set server.tokenEnv (the container's DISPACH_API_TOKEN does this) or present an operator key minted with `can: [admin]`. What is refused is provisioning on a server that required no credential at all and is reachable from the network.\"\n }, 403);\n }\n const body = await readJson(context.request);\n if (body.kind === \"error\")\n return fail(body.error, 400);\n const parsed = parseBody(ProvisionBody, body.value);\n if (!parsed.ok)\n return fail(parsed.error, 400);\n const text = parsed.value.answers;\n let created;\n try {\n created = provision.create(text);\n } catch (error) {\n if (isHarnessError(error))\n return fail(error.toDetail(), 400);\n throw error;\n }\n try {\n const admitted = await runtime.adopt(created.manifestPath);\n return json({\n id: created.agentId,\n dir: created.dir,\n files: created.files,\n adopted: admitted.map((agent) => agent.id)\n }, 201);\n } catch (error) {\n return json({\n id: created.agentId,\n dir: created.dir,\n files: created.files,\n adopted: [],\n error: isHarnessError(error) ? error.toDetail() : {\n code: \"provision_adopt_failed\",\n message: error instanceof Error ? error.message : String(error),\n hint: \"The agent was written and is not running. Fix what the message names and `start` it, or restart the host.\"\n }\n }, 201);\n }\n }, { capability: \"admin\" });\n router.add(\"POST\", \"/v1/agents/:id/stop\", async (context) => {\n const id = context.params.id ?? \"\";\n const hosted = runtime.list().some((agent) => agent.id === id);\n const known = await runtime.store.agentState.get(id);\n if (!hosted && known === undefined)\n return notFound(\"agent\", id);\n const body = await readJson(context.request);\n if (body.kind === \"error\")\n return fail(body.error, 400);\n const parsed = parseBody(StopBody, body.value);\n if (!parsed.ok)\n return fail(parsed.error, 400);\n const reason = parsed.value.reason?.trim();\n const state = await runtime.store.agentState.disable(id, new Date(options.now?.() ?? Date.now()).toISOString(), reason === undefined || reason === \"\" ? undefined : reason);\n if (hosted) {\n try {\n await runtime.dispose(id, \"stopped\");\n } catch (error) {\n if (isHarnessError(error) && error.code === \"agent_turn_in_flight\") {\n return fail(error.toDetail(), 409);\n }\n throw error;\n }\n }\n return json({ id, status: \"disabled\", ...stateFields(state) });\n }, { capability: \"admin\" });\n router.add(\"POST\", \"/v1/agents/:id/start\", async (context) => {\n const id = context.params.id ?? \"\";\n if (runtime.list().some((agent) => agent.id === id)) {\n const state = await runtime.store.agentState.enable(id);\n return json({ id, status: \"loaded\", ...stateFields(state) });\n }\n const resolve = options.resolveAgent;\n if (resolve === undefined) {\n return fail({\n code: \"start_not_supported\",\n message: \"This server cannot look up a manifest for an agent it is not hosting.\",\n hint: \"Starting a stopped agent needs its manifest, which lives wherever agents live — the sandbox for the CLI, a mounted path for a container. This process was built without that lookup, so pass the agent to `serve` and restart it instead.\"\n }, 501);\n }\n const source = resolve(id);\n if (source === undefined)\n return notFound(\"agent\", id);\n const state = await runtime.store.agentState.enable(id);\n try {\n const admitted = await runtime.adopt(source);\n return json({\n id,\n status: \"loaded\",\n ...stateFields(state),\n adopted: admitted.map((agent) => agent.id)\n });\n } catch (error) {\n await runtime.store.agentState.disable(id, new Date(options.now?.() ?? Date.now()).toISOString(), \"start failed\");\n if (isHarnessError(error))\n return fail(error.toDetail(), 400);\n throw error;\n }\n }, { capability: \"admin\" });\n router.add(\"POST\", \"/v1/agents/:id/messages\", async (context) => withAgent(runtime, context, async (agent) => {\n const body = await readJson(context.request);\n if (body.kind === \"error\")\n return fail(body.error, 400);\n const parsed = parseBody(MessageBody, body.value);\n if (!parsed.ok)\n return fail(parsed.error, 400);\n const input = parsed.value;\n const wantsChunks = input.chunks === true;\n const text = input.text;\n const sessionKey = input.sessionKey ?? \"api:default\";\n const outside = outsideSession(context, sessionKey);\n if (outside !== undefined)\n return outside;\n const deliver = parseDeliver(input.deliver);\n if (deliver.kind === \"error\")\n return fail(deliver.error, 400);\n const from = parseFrom(input.from);\n if (from.kind === \"error\")\n return fail(from.error, 400);\n const idempotency = parseIdempotencyKey(context.request);\n if (idempotency.kind === \"error\")\n return fail(idempotency.error, 400);\n const turnId = newTurnId();\n if (idempotency.key !== undefined) {\n const claim = await agent.store.turns.claimInboundKey({\n agentId: agent.id,\n key: idempotency.key,\n turnId,\n inputHash: await inputHash(sessionKey, text),\n now: new Date\n });\n if (claim.kind === \"replay\") {\n return json({ turnId: claim.turnId, sessionKey, replayed: true }, 200);\n }\n if (claim.kind === \"mismatch\") {\n return fail({\n code: \"idempotency_key_reused\",\n message: `Idempotency-Key \"${idempotency.key}\" was already used for a different message.`,\n hint: `It belongs to turn ${claim.turnId}, whose text or session differed from this request's. Nothing was run. Use a fresh key for a new message, or resend the original text byte for byte to get that turn back. A key is remembered for 24 hours.`,\n field: \"Idempotency-Key\"\n }, 409);\n }\n }\n const controller = new AbortController;\n running.set(turnId, controller);\n runtime.streams.open(turnId, { chunks: wantsChunks });\n const work = agent.send(text, {\n sessionKey,\n turnId,\n source: \"api\",\n ...from.from === undefined ? {} : { from: from.from },\n signal: controller.signal\n }).then(async (result) => {\n if (deliver.target === undefined || result.text.trim() === \"\")\n return;\n await runtime.channels.deliver({\n agentId: agent.id,\n sessionKey,\n channelId: deliver.target.channel,\n recipient: deliver.target.to,\n turnId,\n text: result.text\n });\n }).catch(() => {}).finally(() => {\n running.delete(turnId);\n });\n if (input.stream !== true)\n return json({ turnId, sessionKey }, 202);\n return streamTurn(runtime, turnId, {\n accepted: { turnId, sessionKey },\n status: 202,\n chunks: wantsChunks\n });\n }), { capability: \"chat\" });\n router.add(\"GET\", \"/v1/agents/:id/turns/:turnId/stream\", (context) => withAgent(runtime, context, async (agent) => {\n const turnId = context.params.turnId ?? \"\";\n if (runtime.streams.state(turnId) === undefined) {\n const record = await agent.store.turns.get(turnId);\n if (record === undefined)\n return notFound(\"turn\", turnId, \"No turn with this id has ever run on this agent. A turn id is the `turnId` from POST /v1/agents/:id/messages — check the agent in the path too, since a turn belongs to one.\");\n return finishedStream(record);\n }\n return streamTurn(runtime, turnId, {\n chunks: context.url.searchParams.get(\"chunks\") === \"true\"\n });\n }), { capability: \"read\", streaming: true });\n router.add(\"POST\", \"/v1/agents/:id/turns/:turnId/stop\", (context) => withAgent(runtime, context, () => {\n const turnId = context.params.turnId ?? \"\";\n const controller = running.get(turnId);\n if (controller === undefined) {\n return fail({\n code: \"turn_not_running\",\n message: `No cancel handle for turn ${turnId} on this API.`,\n hint: \"This surface can stop a turn it started. A turn that has already finished cannot be stopped at all — read its final state from GET /v1/agents/:id/turns/:turnId. A turn started by a channel, a schedule, or another process is running without a handle here.\"\n }, 409);\n }\n controller.abort();\n return json({ turnId, stopping: true }, 202);\n }), { capability: \"chat\" });\n router.add(\"GET\", \"/v1/agents/:id/approvals\", (context) => withAgent(runtime, context, async (agent) => json({ approvals: approvals.pending(agent.id) })), { capability: \"read\" });\n router.add(\"POST\", \"/v1/agents/:id/approvals/:approvalId\", (context) => withAgent(runtime, context, async () => {\n const body = await readJson(context.request);\n if (body.kind === \"error\")\n return fail(body.error, 400);\n const parsed = parseBody(ApprovalBody, body.value);\n if (!parsed.ok)\n return fail(parsed.error, 400);\n const input = parsed.value;\n const approvalId = context.params.approvalId ?? \"\";\n if (!approvals.resolve(approvalId, input.granted)) {\n return fail({\n code: \"approval_not_found\",\n message: `No approval with id ${approvalId} is waiting.`,\n hint: 'It was answered already, or its turn ended while it waited — a stopped or timed-out turn abandons its question, and `approval.resolved` reports that as `by: \"abandoned\"`. GET /v1/agents/:id/approvals lists what is actually waiting. Nothing about a settled approval is kept, so this is also the answer for an id that was never real.'\n }, 404);\n }\n return json({ approvalId, granted: input.granted });\n }), { capability: \"chat\" });\n router.add(\"GET\", \"/\", (context) => web(\"/\", context), { capability: \"open\" });\n router.add(\"GET\", \"/assets/app.js\", (context) => web(\"/assets/app.js\", context), {\n capability: \"open\"\n });\n router.add(\"GET\", \"/assets/app.css\", (context) => web(\"/assets/app.css\", context), {\n capability: \"open\"\n });\n router.add(\"POST\", \"/v1/keys\", async (context) => {\n const usedClaim = options.claim !== undefined && presentedClaim(context.request) === options.claim.token;\n const body = await readJson(context.request);\n if (body.kind === \"error\")\n return fail(body.error, 400);\n const parsed = parseBody(KeyBody, body.value);\n if (!parsed.ok)\n return fail(parsed.error, 400);\n const input = parsed.value;\n const problem = keyLabelProblem(input.label);\n if (problem !== undefined) {\n return fail({\n code: \"key_label_invalid\",\n message: problem,\n hint: `A label is shown in a listing and in the UI, so it is at most ${MAX_KEY_LABEL} printable characters on one line. It is a display name, not a description.`,\n field: \"label\"\n }, 400);\n }\n if (usedClaim && options.claim?.spend() !== true)\n return claimSpent();\n const scope = input.scope;\n if (scope?.agents !== undefined) {\n const hosted = new Set(runtime.list().map((agent) => agent.id));\n for (const state of await runtime.store.agentState.list())\n hosted.add(state.agentId);\n const unknown = scope.agents.filter((id) => !hosted.has(id));\n if (unknown.length > 0) {\n return fail({\n code: \"key_scope_agent_unknown\",\n message: `No agent ${unknown.map((id) => JSON.stringify(id)).join(\", \")} on this server.`,\n hint: \"A key scoped to an agent that does not exist authenticates and then reaches nothing, which looks exactly like a working credential until it is used. GET /v1/agents lists what this server holds, stopped agents included.\",\n field: \"scope.agents\"\n }, 400);\n }\n }\n const expiresAt = scope?.expiresIn === undefined ? undefined : new Date(now() + scope.expiresIn * 1000).toISOString();\n const stored = scope === undefined ? undefined : {\n ...scope.agents === undefined ? {} : { agents: scope.agents },\n ...scope.sessions === undefined ? {} : { sessions: scope.sessions },\n ...scope.can === undefined ? {} : { can: scope.can }\n };\n const secret = newKeySecret();\n const record = await runtime.store.operatorKeys.issue({\n keyId: newKeyId(now()),\n label: input.label.trim(),\n fingerprint: await keyFingerprint2(secret),\n createdAt: new Date(now()).toISOString(),\n ...stored === undefined || Object.keys(stored).length === 0 ? {} : { scope: stored },\n ...expiresAt === undefined ? {} : { expiresAt }\n });\n return json({ ...record, secret }, 201);\n }, { capability: \"admin\" });\n router.add(\"GET\", \"/v1/keys\", async () => {\n const keys = await runtime.store.operatorKeys.list();\n return json({\n keys,\n scope: \"A key with no scope authenticates every route for every agent this server holds. A scope narrows an already-authenticated caller — it names agents, a session prefix and capabilities, and it is not an identity: there are no users, teams or roles here.\"\n });\n }, { capability: \"admin\" });\n router.add(\"DELETE\", \"/v1/keys/:keyId\", async (context) => {\n const keyId = context.params.keyId ?? \"\";\n const record = await runtime.store.operatorKeys.revoke(keyId, new Date(now()).toISOString());\n if (record === undefined)\n return notFound(\"key\", keyId, \"The id is the `keyId` from POST /v1/keys, not the secret — GET /v1/keys lists them. An already-revoked key is a 200 carrying its original stamp, so this really does mean no such key exists.\");\n return json(record);\n }, { capability: \"admin\" });\n router.add(\"GET\", \"/v1/agents/:id/turns/:turnId\", (context) => withAgent(runtime, context, async (agent) => {\n const record = await agent.store.turns.get(context.params.turnId ?? \"\");\n if (record === undefined)\n return notFound(\"turn\", context.params.turnId ?? \"\");\n return json(record);\n }), { capability: \"read\" });\n router.add(\"GET\", \"/v1/agents/:id/sessions\", (context) => withAgent(runtime, context, async (agent) => json(visibleSessions(context.principal, await agent.store.sessions.list(agent.id)))), { capability: \"read\" });\n router.add(\"GET\", \"/v1/agents/:id/sessions/:key\", (context) => withAgent(runtime, context, async (agent) => {\n const key = context.params.key ?? \"\";\n const outside = outsideSession(context, key);\n if (outside !== undefined)\n return outside;\n const record = await agent.store.sessions.get(agent.id, key);\n if (record === undefined)\n return notFound(\"session\", key);\n return json(record);\n }), { capability: \"read\" });\n router.add(\"GET\", \"/v1/agents/:id/sessions/:key/messages\", (context) => withAgent(runtime, context, async (agent) => {\n const before = context.url.searchParams.get(\"before\");\n const limit = context.url.searchParams.get(\"limit\");\n const outside = outsideSession(context, context.params.key ?? \"\");\n if (outside !== undefined)\n return outside;\n const page = await agent.store.messages.page(agent.id, context.params.key ?? \"\", {\n ...before === null ? {} : { before: Number.parseInt(before, 10) },\n ...limit === null ? {} : { limit: Number.parseInt(limit, 10) }\n });\n return json(page);\n }), { capability: \"read\" });\n router.add(\"DELETE\", \"/v1/agents/:id/sessions/:key\", (context) => withAgent(runtime, context, async (agent) => {\n const outside = outsideSession(context, context.params.key ?? \"\");\n if (outside !== undefined)\n return outside;\n await agent.store.sessions.clear(agent.id, context.params.key ?? \"\");\n return json({ cleared: context.params.key ?? \"\", memoryFilesKept: true });\n }), { capability: \"write\" });\n router.add(\"POST\", \"/v1/agents/:id/sessions/:key/phase\", (context) => withAgent(runtime, context, async (agent) => {\n const body = await readJson(context.request);\n if (body.kind === \"error\")\n return fail(body.error, 400);\n const parsed = parseBody(PhaseBody, body.value);\n if (!parsed.ok)\n return fail(parsed.error, 400);\n const phase = parsed.value.phase;\n if (typeof phase !== \"string\" && phase !== null) {\n return fail({\n code: \"phase_invalid\",\n message: \"phase must be a string, or null to clear it.\",\n hint: 'Send { \"phase\": \"triage\" }. Phase-scoped tool visibility arrives in Phase 7; the column is written now so a session carries the value across a restart.',\n field: \"phase\"\n }, 400);\n }\n const outside = outsideSession(context, context.params.key ?? \"\");\n if (outside !== undefined)\n return outside;\n await agent.store.sessions.setPhase(agent.id, context.params.key ?? \"\", phase === null ? undefined : phase);\n return json({ phase });\n }), { capability: \"write\" });\n router.add(\"GET\", \"/v1/agents/:id/schedules\", (context) => withAgent(runtime, context, async (agent) => {\n const enabled = context.url.searchParams.get(\"enabled\");\n const rows = await agent.store.schedules.list(agent.id, enabled === null ? {} : { enabled: enabled === \"true\" });\n return json({ schedules: rows });\n }), { capability: \"read\" });\n router.add(\"POST\", \"/v1/agents/:id/schedules\", (context) => withAgent(runtime, context, async (agent) => {\n const body = await readJson(context.request);\n if (body.kind === \"error\")\n return fail(body.error, 400);\n return writeSchedule(runtime, agent, body.value, undefined);\n }), { capability: \"write\" });\n router.add(\"GET\", \"/v1/agents/:id/schedules/:sid\", (context) => withAgent(runtime, context, async (agent) => {\n const sid = context.params.sid ?? \"\";\n const row = await agent.store.schedules.get(agent.id, sid);\n return row === undefined ? notFound(\"schedule\", sid) : json(row);\n }), { capability: \"read\" });\n router.add(\"PATCH\", \"/v1/agents/:id/schedules/:sid\", (context) => withAgent(runtime, context, async (agent) => {\n const sid = context.params.sid ?? \"\";\n const existing = await agent.store.schedules.get(agent.id, sid);\n if (existing === undefined)\n return notFound(\"schedule\", sid);\n const owned = manifestOwned(existing);\n if (owned !== undefined)\n return owned;\n const body = await readJson(context.request);\n if (body.kind === \"error\")\n return fail(body.error, 400);\n const patch = body.value === null || typeof body.value !== \"object\" || Array.isArray(body.value) ? {} : body.value;\n const { id: _ignoredId, ...fields } = patch;\n const merged = {\n kind: existing.kind,\n expr: existing.expr,\n task: existing.task,\n deliver: existing.deliverChannel === undefined || existing.deliverTo === undefined ? \"none\" : { channel: existing.deliverChannel, to: existing.deliverTo },\n session: existing.sessionMode,\n enabled: existing.enabled,\n ...existing.timezone === undefined ? {} : { timezone: existing.timezone },\n ...existing.role === undefined ? {} : { role: existing.role },\n ...fields,\n id: existing.id\n };\n return writeSchedule(runtime, agent, merged, existing);\n }), { capability: \"write\" });\n router.add(\"DELETE\", \"/v1/agents/:id/schedules/:sid\", (context) => withAgent(runtime, context, async (agent) => {\n const sid = context.params.sid ?? \"\";\n const existing = await agent.store.schedules.get(agent.id, sid);\n if (existing === undefined)\n return notFound(\"schedule\", sid);\n const owned = manifestOwned(existing);\n if (owned !== undefined)\n return owned;\n const removed = await agent.store.schedules.remove(agent.id, sid);\n if (!removed)\n return notFound(\"schedule\", sid);\n runtime.scheduler.changed();\n return json({ removed: sid });\n }), { capability: \"write\" });\n router.add(\"POST\", \"/v1/agents/:id/schedules/:sid/run\", (context) => withAgent(runtime, context, async (agent) => {\n const sid = context.params.sid ?? \"\";\n const row = await agent.store.schedules.get(agent.id, sid);\n if (row === undefined)\n return notFound(\"schedule\", sid);\n const runId = newRunId();\n const sessionKey = scheduleSessionKey(row.sessionMode, row.id, runId);\n const turnId = newTurnId();\n runtime.streams.open(turnId);\n agent.send(row.task, {\n sessionKey,\n turnId,\n source: `schedule:${row.id}:manual`,\n ...row.role === undefined ? {} : { role: row.role }\n }).catch(() => {});\n return json({ scheduleId: row.id, turnId, sessionKey, outOfBand: true }, 202);\n }), { capability: \"write\" });\n router.add(\"GET\", \"/v1/agents/:id/config\", (context) => withAgent(runtime, context, async (agent) => {\n const source = runtime.sourceOf(agent.id);\n const file = typeof source === \"string\" ? source : undefined;\n const text = file === undefined ? undefined : await readFile(file, \"utf8\");\n return json({\n ...file === undefined ? { editable: false } : { editable: true, file },\n settings: SETTINGS.filter((setting) => PERSON_SETTABLE_PATHS.includes(setting.path)).map((setting) => ({\n path: setting.path,\n means: setting.means,\n ...setting.confirm === undefined ? {} : { confirm: setting.confirm },\n ...text === undefined ? {} : { value: manifestValueAt(text, setting.path.split(\".\")) }\n }))\n });\n }), { capability: \"admin\" });\n router.add(\"PATCH\", \"/v1/agents/:id/config\", (context) => withAgent(runtime, context, async (agent) => {\n const body = await readJson(context.request);\n if (body.kind === \"error\")\n return fail(body.error, 400);\n const parsed = parseBody(ConfigBody, body.value);\n if (!parsed.ok)\n return fail(parsed.error, 400);\n const source = runtime.sourceOf(agent.id);\n if (typeof source !== \"string\") {\n return fail({\n code: \"config_not_editable\",\n message: `\"${agent.id}\" was loaded from an object, not from a file, so it has no manifest to change.`,\n hint: \"An embedder holding new settings passes the new object to dispose() and adopt(). This route edits a manifest on disk.\"\n }, 409);\n }\n const setting = settingByPath(parsed.value.path);\n if (setting === undefined || !PERSON_SETTABLE_PATHS.includes(setting.path)) {\n return fail({\n code: \"config_path_unknown\",\n message: setting?.via === undefined ? `\"${parsed.value.path}\" is not a field this surface sets.` : `\"${parsed.value.path}\" is set by \\`${setting.via}\\`, not by a dotted path.`,\n hint: setting?.via === undefined ? `GET /v1/agents/:id/config lists every one. Nearest: ${nearest2(parsed.value.path, PERSON_SETTABLE_PATHS) ?? PERSON_SETTABLE_PATHS.join(\", \")}.` : \"It is a key inside a list entry, and the source editor matches a key at an indent — it cannot index a sequence. That action also validates the handle against the service that issues it.\",\n field: \"path\"\n }, 400);\n }\n if (setting.confirm !== undefined && parsed.value.confirm !== true) {\n return fail({\n code: \"config_confirm_required\",\n message: setting.confirm,\n hint: 'Send { \"confirm\": true } beside the value to make this change anyway. Nothing has been written.',\n field: \"confirm\"\n }, 409);\n }\n let result;\n try {\n result = await editManifest({\n file: source,\n path: setting.path.split(\".\"),\n value: parseSettingValue(parsed.value.value)\n });\n } catch (error) {\n if (isHarnessError(error))\n return fail(error.toDetail(), 400);\n throw error;\n }\n let applied;\n try {\n await runtime.replace(agent.id);\n } catch (error) {\n if (!isHarnessError(error))\n throw error;\n applied = error.toDetail();\n }\n return json({\n path: setting.path,\n before: result.before,\n after: result.after,\n reflowed: result.reflowed,\n ...applied === undefined ? { applied: true } : { applied: false, pending: applied }\n });\n }), { capability: \"admin\" });\n router.add(\"PATCH\", \"/v1/agents/:id/channels/:channelId\", (context) => withAgent(runtime, context, async (agent) => {\n const admin = options.channels;\n if (admin === undefined) {\n return fail({\n code: \"channels_not_supported\",\n message: \"This server cannot change a channel.\",\n hint: \"The host did not supply the channel actions — a library caller embedding this handler has to pass them. `dispach serve` does.\"\n }, 501);\n }\n const source = runtime.sourceOf(agent.id);\n if (typeof source !== \"string\") {\n return fail({\n code: \"config_not_editable\",\n message: `Agent \"${agent.id}\" was loaded from an object, so it has no manifest to edit.`,\n hint: \"Only an agent loaded from a file can be changed here.\"\n }, 409);\n }\n const body = await readJson(context.request);\n if (body.kind === \"error\")\n return fail(body.error, 400);\n const parsed = parseBody(ChannelPatchBody, body.value);\n if (!parsed.ok)\n return fail(parsed.error, 400);\n const { enabled, credential } = parsed.value;\n if (enabled === undefined && credential === undefined) {\n return fail({\n code: \"channel_patch_empty\",\n message: \"Nothing to change.\",\n hint: 'Send { \"enabled\": true | false } to connect or disconnect it, { \"credential\": \"…\" } to set its token, or both.'\n }, 400);\n }\n const channelId = context.params.channelId ?? \"\";\n const notes = [];\n try {\n if (credential !== undefined) {\n notes.push(admin.setCredential(source, channelId, credential).note);\n }\n if (enabled !== undefined) {\n notes.push((await admin.setEnabled(source, channelId, enabled)).note);\n }\n } catch (error) {\n if (!isHarnessError(error))\n throw error;\n return fail(error.toDetail(), 400);\n }\n let applied;\n try {\n await runtime.replace(agent.id);\n } catch (error) {\n if (!isHarnessError(error))\n throw error;\n applied = error.toDetail();\n }\n return json({\n channelId,\n notes,\n ...applied === undefined ? { applied: true } : { applied: false, pending: applied }\n });\n }), { capability: \"admin\" });\n router.add(\"POST\", \"/v1/agents/:id/channels/:channelId/unpair\", (context) => withAgent(runtime, context, async (agent) => {\n const channelId = context.params.channelId ?? \"\";\n const live = await runtime.channels.reset(agent.id, channelId);\n if (live === \"reset\") {\n return json({\n channelId,\n note: \"Pairing forgotten. The channel offers a new code to scan; the old device may still be listed on the phone, which is the only place it can be removed.\",\n restarted: false\n });\n }\n const admin = options.channels;\n const source = runtime.sourceOf(agent.id);\n if (admin === undefined || typeof source !== \"string\") {\n return fail({\n code: live === \"unsupported\" ? \"channel_has_no_pairing\" : \"channel_unknown\",\n message: live === \"unsupported\" ? `Channel \"${channelId}\" stores no pairing.` : `Agent \"${agent.id}\" has no channel \"${channelId}\" registered.`,\n hint: \"Only a channel linked by scanning a code has one to forget. A credential somebody typed is changed with PATCH on this channel, and a channel is switched off with { enabled: false }.\",\n field: \"channelId\"\n }, live === \"unsupported\" ? 409 : 404);\n }\n try {\n return json({ channelId, ...admin.unpair(source, channelId), restarted: false });\n } catch (error) {\n if (!isHarnessError(error))\n throw error;\n return fail(error.toDetail(), error.code === \"channel_unknown\" ? 404 : 409);\n }\n }), { capability: \"admin\" });\n router.add(\"GET\", \"/v1/agents/:id/tools\", (context) => withAgent(runtime, context, (agent) => {\n const phases = agent.manifest.phases;\n const phased = isPhased(phases);\n return json(agent.tools.specs().map((spec) => ({\n slug: spec.slug,\n summary: spec.summary,\n mutating: spec.mutating,\n trust: spec.trust,\n ...spec.trustReason === undefined ? {} : { trustReason: spec.trustReason },\n provider: spec.provider ?? \"local\",\n tags: spec.tags,\n ...phased ? { phases: phasesFor(phases, spec) } : {}\n })));\n }), { capability: \"read\" });\n router.add(\"GET\", \"/v1/agents/:id/skills\", (context) => withAgent(runtime, context, (agent) => {\n const catalogue = agent.skills;\n if (catalogue === undefined)\n return json({ skills: [], configured: false });\n return json({\n configured: true,\n maxActive: catalogue.maxActive,\n threshold: catalogue.threshold,\n cached: catalogue.cached,\n skills: catalogue.skills.map((skill) => ({\n name: skill.name,\n description: skill.frontmatter.description,\n tokens: skill.tokens,\n ...skill.frontmatter.whenNotToUse === undefined ? {} : { whenNotToUse: skill.frontmatter.whenNotToUse },\n scripts: skill.scripts.map((plan) => plan.slug)\n }))\n });\n }), { capability: \"read\" });\n router.add(\"GET\", \"/v1/agents/:id/context\", (context) => withAgent(runtime, context, async (agent) => {\n const sessionKey = context.url.searchParams.get(\"sessionKey\");\n const input = context.url.searchParams.get(\"input\");\n return json(await agent.previewContext({\n ...sessionKey === null ? {} : { sessionKey },\n ...input === null ? {} : { input }\n }));\n }), { capability: \"read\" });\n router.add(\"POST\", \"/v1/channels/:channelId/webhook/:agentId\", async (context) => {\n const body = await readJson(context.request);\n if (body.kind === \"error\")\n return fail(body.error, 400);\n const headers = {};\n context.request.headers.forEach((value, key) => {\n headers[key.toLowerCase()] = value;\n });\n const outcome = await runtime.channels.handleWebhook(context.params.agentId ?? \"\", context.params.channelId ?? \"\", { body: body.value, headers });\n return new Response(outcome.detail ?? \"\", {\n status: outcome.status,\n headers: { \"content-type\": \"text/plain; charset=utf-8\" }\n });\n }, { capability: \"open\" });\n router.add(\"GET\", \"/v1/events\", (context) => {\n const agentId = context.url.searchParams.get(\"agentId\");\n if (agentId !== null && !reachesAgent(context.principal, agentId)) {\n return notFound(\"agent\", agentId);\n }\n const types = context.url.searchParams.get(\"types\")?.split(\",\").filter(Boolean);\n const asked = context.url.searchParams.get(\"chunks\") === \"true\";\n const implied = types?.includes(\"model.chunk\") === true;\n const chunks = asked || implied;\n const unknown = types?.filter((type) => !EVENT_TYPES.includes(type));\n if (unknown !== undefined && unknown.length > 0) {\n const suggestion = nearest2(unknown[0] ?? \"\", EVENT_TYPES);\n return fail({\n code: \"unknown_event_type\",\n message: `No such event type: ${unknown.join(\", \")}.`,\n hint: suggestion === undefined ? \"The full catalogue is the event table in docs/04-SPEC-WIRE.md. Omit ?types= to receive every event.\" : `Did you mean \"${suggestion}\"? The full catalogue is the event table in docs/04-SPEC-WIRE.md.`,\n field: \"types\"\n }, 400);\n }\n return sseResponse({\n ...context.request.signal === undefined ? {} : { signal: context.request.signal },\n start: ({ send }) => {\n send({\n event: \"stream.subscribed\",\n data: {\n agentId: agentId ?? null,\n types: types ?? null,\n chunks,\n ...chunks && !asked ? { implied: \"types names model.chunk\" } : {}\n }\n });\n return runtime.bus.on(\"*\", (event) => {\n if (agentId !== null && event.agentId !== agentId)\n return;\n if (event.agentId !== undefined && !reachesAgent(context.principal, event.agentId))\n return;\n if (event.sessionKey !== undefined && !reachesSession(context.principal, event.sessionKey))\n return;\n if (types !== undefined && types.length > 0 && !types.includes(event.type))\n return;\n send({ event: event.type, data: event });\n }, { chunks });\n }\n });\n }, { capability: \"read\", streaming: true });\n const dispatch = async (request) => {\n let url;\n try {\n url = new URL(request.url);\n } catch {\n return fail({\n code: \"bad_request_url\",\n message: \"The request URL could not be parsed.\",\n hint: \"This usually means the server was handed a relative URL. A handler mounted inside another framework needs an absolute request.url.\"\n }, 400);\n }\n const method = request.method.toUpperCase();\n if (method === \"OPTIONS\") {\n const paths = router.match(\"OPTIONS\", url.pathname);\n if (paths.kind === \"method\") {\n const head = router.match(\"HEAD\", url.pathname);\n const streams = head.kind === \"method\" && streamingAt(router, url.pathname);\n const allow = [\n ...paths.allowed,\n ...paths.allowed.includes(\"GET\") && !streams ? [\"HEAD\"] : [],\n \"OPTIONS\"\n ];\n return withCors(request, new Response(null, {\n status: 204,\n headers: {\n allow: allow.join(\", \"),\n ...options.origin === undefined ? {} : preflightHeaders(request, allow)\n }\n }));\n }\n }\n if (method === \"HEAD\") {\n const get = router.match(\"GET\", url.pathname);\n if (get.kind === \"found\") {\n if (get.streaming) {\n return fail({\n code: \"method_not_allowed\",\n message: `HEAD is not allowed on ${url.pathname}.`,\n hint: \"This path answers with an open event stream. A HEAD would have to start one and then throw the body away, leaving a subscription nothing ever closes — so it is refused rather than leaked. Use GET, or GET /v1/health to check the server is up.\"\n }, 405, { allow: \"GET, OPTIONS\" });\n }\n const crossOrigin = refuseOrigin(request);\n if (crossOrigin !== undefined)\n return crossOrigin;\n const who = await resolve(request, url.pathname, get.capability);\n if (who instanceof Response)\n return who;\n const response = await runHandler(get.handler, {\n request,\n url,\n params: get.params,\n principal: who\n });\n return withCors(request, new Response(null, { status: response.status, headers: response.headers }));\n }\n }\n const match = router.match(method, url.pathname);\n if (match.kind === \"method\") {\n return fail({\n code: \"method_not_allowed\",\n message: `${method} is not allowed on ${url.pathname}.`,\n hint: `This path accepts ${match.allowed.join(\", \")}.`\n }, 405, { allow: match.allowed.join(\", \") });\n }\n if (match.kind === \"none\") {\n return fail({\n code: \"not_found\",\n message: `No route for ${request.method} ${url.pathname}.`,\n hint: \"Every path is under /v1. See docs/04-SPEC-WIRE.md for the surface.\"\n }, 404);\n }\n const crossOrigin = refuseOrigin(request);\n if (crossOrigin !== undefined)\n return crossOrigin;\n const who = await resolve(request, url.pathname, match.capability);\n if (who instanceof Response)\n return who;\n return withCors(request, await runHandler(match.handler, {\n request,\n url,\n params: match.params,\n principal: who\n }));\n };\n return Object.assign(dispatch, {\n authenticate: (request) => resolve(request, \"/v1/ws\", \"read\")\n });\n}\nfunction manifestOwned(existing) {\n if (existing.origin !== \"manifest\")\n return;\n return fail({\n code: \"schedule_manifest_owned\",\n message: `Schedule \"${existing.id}\" is declared in this agent's manifest, so the manifest decides it.`,\n hint: \"Writing it here would last until the next start — reconciliation restores every field from the file, enabled included. Change the `schedules:` entry instead, with PATCH /v1/agents/:id/config, or create a separate schedule through this route.\"\n }, 409);\n}\nasync function writeSchedule(runtime, agent, body, existing) {\n if (body === null || typeof body !== \"object\" || Array.isArray(body)) {\n return fail({\n code: \"schedule_invalid\",\n message: \"A schedule must be a JSON object.\",\n hint: \"Send { id, kind, expr, task, deliver } — see docs/02-SPEC-MANIFEST.md.\"\n }, 400);\n }\n try {\n const row = prepareScheduleWrite({\n agentId: agent.id,\n body,\n channelIds: agent.manifest.channels.map((channel) => channel.id),\n roleNames: Object.keys(agent.manifest.model),\n now: Date.now(),\n origin: \"api\",\n ...existing === undefined ? {} : { existing }\n });\n const saved = await agent.store.schedules.upsert(row);\n runtime.scheduler.changed();\n return json(saved, existing === undefined ? 201 : 200);\n } catch (error) {\n const detail = isHarnessError(error) ? error.toDetail() : {\n code: \"schedule_invalid\",\n message: error instanceof Error ? error.message : String(error),\n hint: \"See docs/02-SPEC-MANIFEST.md for the schedule fields.\"\n };\n return fail(detail, 400);\n }\n}\nfunction web(path, context) {\n const response = serveAsset(path, context.request);\n if (response === undefined)\n throw new HarnessError({\n code: \"web_asset_missing\",\n message: `No web asset for ${path}.`,\n hint: \"The routes in handler.ts and the table in web.ts have diverged, which spec.test.ts asserts cannot happen — so this build is inconsistent. Rebuild with `bun run build`.\"\n });\n return response;\n}\nfunction json(body, status = 200) {\n return new Response(JSON.stringify(body), {\n status,\n headers: { \"content-type\": \"application/json; charset=utf-8\" }\n });\n}\nfunction isOpenPath(pathname) {\n return pathname === \"/v1/health\" || pathname === \"/v1/ready\" || pathname.startsWith(\"/v1/channels/\") || WEB_PATHS.includes(pathname) || pathname === \"/docs\" || pathname === \"/v1/openapi.json\";\n}\nfunction streamingAt(router, pathname) {\n const get = router.match(\"GET\", pathname);\n return get.kind === \"found\" && get.streaming;\n}\nasync function runHandler(handler, context) {\n try {\n return await handler(context);\n } catch (error) {\n if (isHarnessError(error))\n return fail(error.toDetail(), 400);\n return fail({\n code: \"internal_error\",\n message: error instanceof Error ? error.message : String(error),\n hint: \"An unexpected failure in the server. The runtime's event stream carries what happened around it.\"\n }, 500);\n }\n}\nfunction notFound(kind, id, hint) {\n return fail({\n code: `${kind}_not_found`,\n message: `No ${kind} \"${id}\".`,\n hint: hint ?? `Check the id — it is case-sensitive, and a session key includes its channel segment.`\n }, 404);\n}\nfunction presentedClaim(request) {\n const header = request.headers.get(\"authorization\") ?? \"\";\n if (!header.startsWith(\"Bearer \"))\n return;\n const value = header.slice(7);\n return value === \"\" ? undefined : value;\n}\nfunction withAgent(runtime, context, work) {\n const id = context.params.id ?? \"\";\n const agent = runtime.list().find((candidate) => candidate.id === id);\n if (agent === undefined)\n return notFound(\"agent\", id);\n if (!reachesAgent(context.principal, id))\n return notFound(\"agent\", id);\n return work(agent);\n}\nfunction visibleAgents(principal, agents) {\n if (!isScoped(principal))\n return agents;\n return agents.filter((agent) => reachesAgent(principal, agent.id));\n}\nfunction visibleSessions(principal, sessions) {\n if (!isScoped(principal))\n return sessions;\n return sessions.filter((session) => reachesSession(principal, session.sessionKey));\n}\nfunction outsideSession(context, sessionKey) {\n return reachesSession(context.principal, sessionKey) ? undefined : notFound(\"session\", sessionKey);\n}\nfunction summary(runtime, agent) {\n const phases = agent.manifest.phases;\n const phased = isPhased(phases);\n return {\n id: agent.id,\n name: agent.manifest.name ?? agent.id,\n status: \"loaded\",\n model: agent.manifest.model.main.id,\n channels: agent.manifest.channels.map((channel) => {\n const running = runtime.channels.statusOf(agent.id).find((entry) => entry.id === channel.id);\n const variable = typeof channel.tokenEnv === \"string\" ? channel.tokenEnv : undefined;\n return {\n ...running ?? {},\n id: channel.id,\n type: channel.type,\n enabled: channel.enabled,\n ...variable === undefined ? {} : {\n credentialEnv: variable,\n credentialSet: agent.hasEnv(variable)\n }\n };\n }),\n entryPhase: phased ? entryPhase(phases) ?? null : null,\n ...phased ? { phases: Object.keys(phases) } : {}\n };\n}\nfunction stateFields(state) {\n return {\n ...state.disabledAt === undefined ? {} : { disabledAt: state.disabledAt },\n ...state.reason === undefined ? {} : { reason: state.reason }\n };\n}\nasync function readJson(request) {\n const declared = Number.parseInt(request.headers.get(\"content-length\") ?? \"0\", 10);\n if (Number.isFinite(declared) && declared > MAX_BODY_BYTES) {\n return {\n kind: \"error\",\n error: {\n code: \"body_too_large\",\n message: `The request body declares ${declared} bytes; the limit is ${MAX_BODY_BYTES}.`,\n hint: \"This cap is enforced before a channel plugin sees anything, so a plugin never has to defend against a large POST.\"\n }\n };\n }\n const raw = await request.text();\n if (raw.length > MAX_BODY_BYTES) {\n return {\n kind: \"error\",\n error: {\n code: \"body_too_large\",\n message: `The request body is ${raw.length} bytes; the limit is ${MAX_BODY_BYTES}.`,\n hint: \"Send less. A message longer than this is not a message.\"\n }\n };\n }\n if (raw === \"\")\n return { kind: \"ok\", value: {} };\n try {\n return { kind: \"ok\", value: JSON.parse(raw) };\n } catch (cause) {\n return {\n kind: \"error\",\n error: {\n code: \"body_not_json\",\n message: `The request body is not valid JSON: ${cause instanceof Error ? cause.message : String(cause)}`,\n hint: \"Send application/json. A shell quoting mistake is the usual cause — check for unescaped quotes inside the payload.\"\n }\n };\n }\n}\nfunction parseFrom(value) {\n if (value === undefined || value === null)\n return { kind: \"ok\", from: undefined };\n const invalid = (message, hint, field = \"from\") => ({\n kind: \"error\",\n error: { code: \"sender_invalid\", message, hint, field }\n });\n if (typeof value !== \"object\") {\n return invalid(\"from must be an object.\", 'Send { \"from\": { \"id\": \"agent:ops-bot\", \"kind\": \"agent\" } }, or omit it entirely for a turn the token-holder is sending itself.');\n }\n const raw = value;\n if (typeof raw.id !== \"string\" || raw.id.trim() === \"\") {\n return invalid(\"from.id is required and must be a non-empty string.\", \"Use a stable identity in your own namespace — `agent:ops-bot`, `user:018f…`, an email address. It is opaque to this runtime and is recorded on the turn so an audit can answer who asked.\", \"from.id\");\n }\n if (raw.id.length > MAX_SENDER_ID) {\n return invalid(`from.id is ${raw.id.length} characters, over the ${MAX_SENDER_ID} limit.`, \"A sender id is an identifier, not a payload. It is rendered into the prompt's fence label, so an unbounded one spends the context window the message needs.\", \"from.id\");\n }\n if (typeof raw.kind !== \"string\" || !SENDER_KINDS2.includes(raw.kind)) {\n const suggestion = typeof raw.kind === \"string\" ? nearest2(raw.kind, SENDER_KINDS2) : undefined;\n return invalid(`from.kind must be one of: ${SENDER_KINDS2.join(\", \")}.`, `${suggestion === undefined ? \"\" : `Did you mean \"${suggestion}\"? `}This field decides the trust boundary — \"agent\" fences the message and blocks mutating tools for the turn, \"user\" does not — so there is no default and an unknown value is refused rather than guessed at. A turn the token-holder is sending itself omits \"from\".`, \"from.kind\");\n }\n if (raw.name !== undefined && typeof raw.name !== \"string\") {\n return invalid(\"from.name must be a string when present.\", \"It is a display name only and is rendered inside the fence, never above it. Omit it if you have none.\", \"from.name\");\n }\n return {\n kind: \"ok\",\n from: {\n id: raw.id,\n kind: raw.kind,\n ...raw.name === undefined ? {} : { name: raw.name.slice(0, MAX_SENDER_NAME) }\n }\n };\n}\nfunction parseIdempotencyKey(request) {\n const raw = request.headers.get(\"idempotency-key\");\n if (raw === null)\n return { kind: \"ok\", key: undefined };\n const key = raw.trim();\n const bad = (message) => ({\n kind: \"error\",\n error: {\n code: \"idempotency_key_invalid\",\n message,\n hint: `Send 1-${MAX_IDEMPOTENCY_KEY} printable ASCII characters that are unique per logical request — a UUID is the usual choice. Omit the header entirely to accept that a retry runs the turn again. Printable ASCII because the key is a database key, and node:sqlite truncates a bound string at a NUL byte where bun:sqlite stores it whole.`,\n field: \"Idempotency-Key\"\n }\n });\n if (key === \"\")\n return bad(\"Idempotency-Key is present but empty.\");\n if (key.length > MAX_IDEMPOTENCY_KEY) {\n return bad(`Idempotency-Key is ${key.length} characters, over the ${MAX_IDEMPOTENCY_KEY} limit.`);\n }\n if (!/^[\\x20-\\x7e]+$/.test(key)) {\n return bad(\"Idempotency-Key contains characters that are not printable ASCII.\");\n }\n return { kind: \"ok\", key };\n}\nasync function inputHash(sessionKey, text) {\n const bytes = new TextEncoder().encode(`${sessionKey}\\x00${text}`);\n const digest = await crypto.subtle.digest(\"SHA-256\", bytes);\n return Array.from(new Uint8Array(digest)).map((b) => b.toString(16).padStart(2, \"0\")).join(\"\");\n}\nfunction parseDeliver(value) {\n if (value === undefined || value === null || value === \"none\") {\n return { kind: \"ok\", target: undefined };\n }\n if (typeof value === \"object\") {\n const target = value;\n if (typeof target.channel === \"string\" && typeof target.to === \"string\") {\n return { kind: \"ok\", target: { channel: target.channel, to: target.to } };\n }\n }\n return {\n kind: \"error\",\n error: {\n code: \"deliver_invalid\",\n message: 'deliver must be \"none\" or { channel, to }.',\n hint: 'A bare channel id is not enough on an API turn: the request has no originating conversation, so there is no recipient to infer. Send { \"channel\": \"tg\", \"to\": \"12345\" }, or \"none\" to read the reply from the event stream.',\n field: \"deliver\"\n }\n };\n}\nfunction finishedStream(record) {\n const running = record.status === \"running\";\n return sseResponse({\n start: ({ send, close }) => {\n send({\n event: running ? \"stream.unavailable\" : \"stream.ended\",\n data: {\n turnId: record.turnId,\n status: record.status,\n sessionKey: record.sessionKey,\n ...running ? {\n reason: \"no buffer for this turn in this process\",\n hint: \"The turn is recorded as running but is not observable here — its events are buffered in whichever process is executing it, and buffers are in-memory and per-process. Poll GET /v1/agents/:id/turns/:turnId for the outcome.\"\n } : {\n steps: record.steps,\n ...record.errorCode === undefined ? {} : { errorCode: record.errorCode },\n hint: \"This turn finished before you attached and its buffer has been evicted. Its full text is in GET /v1/agents/:id/turns/:turnId.\"\n }\n }\n });\n close();\n return;\n }\n });\n}\nfunction streamTurn(runtime, turnId, extra) {\n return sseResponse({\n ...extra?.status === undefined ? {} : { status: extra.status },\n start: ({ send, close }) => {\n if (extra?.accepted !== undefined)\n send({ event: \"turn.accepted\", data: extra.accepted });\n const attachment = runtime.streams.attach(turnId, (event) => {\n send({ event: event.type, data: event });\n if (event.type === \"turn.end\")\n close();\n }, { chunks: extra?.chunks === true });\n if (attachment === undefined) {\n send({\n event: \"stream.unavailable\",\n data: {\n turnId,\n reason: \"no buffer for this turn in this process\",\n hint: \"Read the final state from GET /v1/agents/:id/turns/:turnId. Buffers are in-memory and are evicted after a turn ends.\"\n }\n });\n close();\n return;\n }\n send({\n event: \"stream.replay\",\n data: {\n turnId,\n state: attachment.state,\n events: attachment.replay.length,\n truncated: attachment.truncated,\n dropped: attachment.dropped,\n chunks: attachment.chunks,\n ...attachment.truncated ? {\n hint: `The oldest ${attachment.dropped} event(s) of this turn were discarded to stay under the buffer cap, so this replay starts mid-turn. The turn's final text is complete in GET /v1/agents/:id/turns/:turnId.`\n } : {}\n }\n });\n for (const event of attachment.replay) {\n send({ event: event.type, data: event });\n }\n if (attachment.state === \"ended\")\n close();\n return () => attachment.unsubscribe();\n }\n });\n}\n// src/keys.ts\nimport { newKeySecret as newKeySecret2 } from \"@dispach/core\";\nfunction createClaimTicket() {\n const token = newKeySecret2();\n let spent = false;\n return {\n token,\n live: () => !spent,\n spend: () => {\n if (spent)\n return false;\n spent = true;\n return true;\n }\n };\n}\nfunction browsableHost(host) {\n const bare = host.startsWith(\"[\") && host.endsWith(\"]\") ? host.slice(1, -1) : host;\n const shown = bare === \"0.0.0.0\" || bare === \"::\" || bare === \"\" ? \"127.0.0.1\" : bare;\n return shown.includes(\":\") ? `[${shown}]` : shown;\n}\nfunction claimUrl(host, port, token) {\n return `http://${browsableHost(host)}:${port}/?claim=${token}`;\n}\nfunction claimCommand(host, port, token) {\n const bracketed = browsableHost(host);\n return `curl -sX POST http://${bracketed}:${port}/v1/keys -H 'Authorization: Bearer ${token}' -H 'content-type: application/json' -d '{\"label\":\"my browser\"}'`;\n}\n// src/serve.ts\nimport { HarnessError as HarnessError2 } from \"@dispach/core\";\n\n// src/ws.ts\nimport { newTurnId as newTurnId2 } from \"@dispach/core\";\nfunction attachWebSocket(runtime, authenticate, running = new Map) {\n const sockets = new Set;\n let unsubscribe;\n let chunkSockets = 0;\n let unsubscribeChunks;\n const broadcast = (event) => {\n const chunk = event.type === \"model.chunk\";\n for (const ws of sockets) {\n if (ws.data.agentId !== undefined && event.agentId !== ws.data.agentId)\n continue;\n if (event.agentId !== undefined && !reachesAgent(ws.data.principal, event.agentId))\n continue;\n if (event.sessionKey !== undefined && !reachesSession(ws.data.principal, event.sessionKey))\n continue;\n if (chunk && !ws.data.chunks)\n continue;\n try {\n ws.send(JSON.stringify(event));\n } catch {}\n }\n };\n const takeChunkInterest = () => {\n chunkSockets += 1;\n if (unsubscribeChunks === undefined) {\n unsubscribeChunks = runtime.bus.on(\"model.chunk\", broadcast);\n }\n };\n const releaseChunkInterest = () => {\n if (chunkSockets === 0)\n return;\n chunkSockets -= 1;\n if (chunkSockets === 0) {\n unsubscribeChunks?.();\n unsubscribeChunks = undefined;\n }\n };\n return {\n async accept(request) {\n const url = new URL(request.url);\n const fromProtocol = bearerFromProtocols(request);\n const fromQuery = url.searchParams.get(\"token\");\n const bearer = fromProtocol ?? fromQuery ?? \"\";\n const who = await authenticate(withBearerHeader(request, bearer));\n if (who instanceof Response)\n return { kind: \"reject\", response: who };\n const agentId = url.searchParams.get(\"agentId\");\n if (agentId !== null && !reachesAgent(who, agentId)) {\n return {\n kind: \"reject\",\n response: new Response(JSON.stringify({\n error: {\n code: \"agent_not_found\",\n message: `No agent \"${agentId}\".`,\n hint: \"Check the id — it is case-sensitive. A key scoped away from an agent sees exactly what a caller asking for one that does not exist sees.\"\n }\n }), { status: 404, headers: { \"content-type\": \"application/json\" } })\n };\n }\n return {\n kind: \"accept\",\n session: {\n agentId: agentId ?? undefined,\n chunks: url.searchParams.get(\"chunks\") === \"true\",\n principal: who\n },\n ...fromProtocol === undefined ? {} : { protocol: PROTOCOL }\n };\n },\n handlers: {\n open(ws) {\n sockets.add(ws);\n if (unsubscribe === undefined)\n unsubscribe = runtime.bus.on(\"*\", broadcast);\n if (ws.data.chunks)\n takeChunkInterest();\n ws.send(JSON.stringify({\n type: \"ws.open\",\n agentId: ws.data.agentId ?? null,\n chunks: ws.data.chunks\n }));\n },\n message(ws, raw) {\n let frame;\n try {\n frame = JSON.parse(typeof raw === \"string\" ? raw : new TextDecoder().decode(raw));\n } catch {\n ws.send(JSON.stringify({ type: \"ws.error\", code: \"frame_not_json\" }));\n return;\n }\n if (frame.type === \"ping\") {\n ws.send(JSON.stringify({ type: \"pong\" }));\n return;\n }\n if (frame.type === \"subscribe\") {\n if (frame.agentId === undefined && frame.sessionKey !== undefined) {\n ws.send(JSON.stringify({\n type: \"ws.error\",\n code: \"subscribe_needs_agent_id\",\n hint: \"Send { type: 'subscribe', agentId: '<agent>' }. A socket filters on the agent an event carries; sessionKey names a conversation and can never match one, so a socket pointed with it receives nothing.\"\n }));\n return;\n }\n const wantsChunks = typeof frame.chunks === \"boolean\" ? frame.chunks : ws.data.chunks;\n if (wantsChunks && !ws.data.chunks)\n takeChunkInterest();\n else if (!wantsChunks && ws.data.chunks)\n releaseChunkInterest();\n const nextAgent = frame.agentId ?? ws.data.agentId;\n if (nextAgent !== undefined && !reachesAgent(ws.data.principal, nextAgent)) {\n ws.send(JSON.stringify({\n type: \"ws.error\",\n error: {\n code: \"agent_not_found\",\n message: `No agent \"${nextAgent}\".`,\n hint: \"Check the id — it is case-sensitive. A key scoped away from an agent sees exactly what a caller asking for one that does not exist sees.\"\n }\n }));\n return;\n }\n ws.data = {\n agentId: nextAgent,\n chunks: wantsChunks,\n principal: ws.data.principal\n };\n ws.send(JSON.stringify({\n type: \"ws.subscribed\",\n agentId: ws.data.agentId ?? null,\n chunks: ws.data.chunks\n }));\n return;\n }\n if (frame.type === \"stop\") {\n const controller = frame.turnId === undefined ? undefined : running.get(frame.turnId);\n controller?.abort();\n ws.send(JSON.stringify({\n type: \"ws.stopping\",\n turnId: frame.turnId ?? null,\n found: controller !== undefined\n }));\n return;\n }\n if (frame.type !== \"message\") {\n ws.send(JSON.stringify({ type: \"ws.error\", code: \"unknown_frame_type\" }));\n return;\n }\n const agentId = ws.data.agentId;\n const agent = runtime.list().find((candidate) => candidate.id === agentId);\n if (agent === undefined) {\n ws.send(JSON.stringify({ type: \"ws.error\", code: \"agent_not_found\" }));\n return;\n }\n const text = frame.text ?? \"\";\n if (text.trim() === \"\") {\n ws.send(JSON.stringify({ type: \"ws.error\", code: \"message_text_required\" }));\n return;\n }\n const turnId = newTurnId2();\n const controller = new AbortController;\n running.set(turnId, controller);\n ws.send(JSON.stringify({ type: \"ws.accepted\", turnId }));\n agent.send(text, {\n sessionKey: frame.sessionKey ?? \"api:default\",\n turnId,\n source: \"ws\",\n signal: controller.signal\n }).catch(() => {}).finally(() => running.delete(turnId));\n },\n close(ws) {\n const had = sockets.delete(ws);\n if (had && ws.data.chunks)\n releaseChunkInterest();\n if (sockets.size === 0) {\n unsubscribe?.();\n unsubscribe = undefined;\n }\n }\n },\n closeAll() {\n for (const ws of sockets) {\n try {\n ws.close(1001, \"server stopping\");\n } catch {}\n }\n sockets.clear();\n unsubscribe?.();\n unsubscribe = undefined;\n unsubscribeChunks?.();\n unsubscribeChunks = undefined;\n chunkSockets = 0;\n }\n };\n}\n\n// src/serve.ts\nasync function serve(options) {\n const { host, port, runtime } = options;\n if (!isLoopback(host) && options.token === undefined) {\n throw new HarnessError2({\n code: \"server_public_without_token\",\n message: `Refusing to bind ${host}:${port} with no API token.`,\n hint: \"Set the variable named by server.tokenEnv, or bind 127.0.0.1. A public bind with no token exposes every endpoint — including the ones that start a turn — to anyone who can reach the port, and behaves identically to a safe one until someone finds it.\",\n field: \"server.host\"\n });\n }\n const running = new Map;\n const handler = createHandler({\n runtime,\n ...options.token === undefined ? {} : { token: options.token },\n ...options.token === undefined ? { allowUnauthenticated: true } : {},\n ...options.now === undefined ? {} : { now: options.now },\n running,\n ...options.approvals === undefined ? {} : { approvals: options.approvals },\n ...options.claim === undefined ? {} : { claim: options.claim },\n ...options.resolveAgent === undefined ? {} : { resolveAgent: options.resolveAgent },\n ...options.provision === undefined ? {} : { provision: options.provision },\n ...options.channels === undefined ? {} : { channels: options.channels },\n origin: {\n host: options.host,\n ...options.allowedOrigins === undefined ? {} : { allowedOrigins: options.allowedOrigins },\n ...options.allowedHosts === undefined ? {} : { allowedHosts: options.allowedHosts }\n }\n });\n const underBun = options.engine === \"bun\" || options.engine === undefined && typeof Bun !== \"undefined\" && typeof Bun.serve === \"function\";\n if (underBun)\n return serveWithBun(handler, options, running);\n return serveWithNode(handler, options, running);\n}\nfunction serveWithBun(handler, options, running) {\n const bridge = attachWebSocket(options.runtime, handler.authenticate, running);\n const server = Bun.serve({\n port: options.port,\n hostname: options.host,\n idleTimeout: Math.min(255, Math.ceil(HEARTBEAT_MS / 1000 * 3)),\n fetch: async (request, self) => {\n const url = new URL(request.url);\n if (url.pathname !== \"/v1/ws\")\n return handler(request);\n const problem = originProblem(request, {\n host: options.host,\n ...options.allowedOrigins === undefined ? {} : { allowedOrigins: options.allowedOrigins },\n ...options.allowedHosts === undefined ? {} : { allowedHosts: options.allowedHosts }\n });\n if (problem !== undefined) {\n return new Response(JSON.stringify({ error: problem }), {\n status: 403,\n headers: { \"content-type\": \"application/json; charset=utf-8\" }\n });\n }\n const attempt = await bridge.accept(request);\n if (attempt.kind === \"reject\")\n return attempt.response;\n const upgraded = self.upgrade(request, {\n data: attempt.session,\n ...attempt.protocol === undefined ? {} : { headers: { \"sec-websocket-protocol\": attempt.protocol } }\n });\n if (upgraded)\n return;\n return new Response(\"upgrade failed\", { status: 400 });\n },\n websocket: {\n open: (ws) => bridge.handlers.open(ws),\n message: (ws, message) => bridge.handlers.message(ws, message),\n close: (ws) => bridge.handlers.close(ws)\n }\n });\n return {\n url: `http://${options.host}:${server.port}`,\n port: server.port ?? options.port,\n host: options.host,\n websocket: true,\n stop: async () => {\n bridge.closeAll();\n await server.stop(true);\n }\n };\n}\nasync function serveWithNode(handler, options, running) {\n const { createServer } = await import(\"node:http\");\n const { WebSocketServer } = await import(\"ws\");\n const bridge = attachWebSocket(options.runtime, handler.authenticate, running);\n const toRequest = (req, body) => {\n const url = `http://${req.headers.host ?? `${options.host}:${options.port}`}${req.url ?? \"/\"}`;\n const headers = new Headers;\n for (const [key, value] of Object.entries(req.headers)) {\n if (typeof value === \"string\")\n headers.set(key, value);\n else if (Array.isArray(value))\n headers.set(key, value.join(\", \"));\n }\n const method = req.method ?? \"GET\";\n return new Request(url, {\n method,\n headers,\n ...method === \"GET\" || method === \"HEAD\" || body === undefined ? {} : { body }\n });\n };\n const server = createServer((req, res) => {\n (async () => {\n const chunks = [];\n for await (const chunk of req)\n chunks.push(chunk);\n const response = await handler(toRequest(req, Buffer.concat(chunks)));\n const out = {};\n response.headers.forEach((value, key) => {\n out[key] = value;\n });\n res.writeHead(response.status, out);\n if (response.body === null) {\n res.end();\n return;\n }\n const reader = response.body.getReader();\n res.on(\"close\", () => void reader.cancel().catch(() => {}));\n for (;; ) {\n const { done, value } = await reader.read();\n if (done)\n break;\n res.write(Buffer.from(value));\n }\n res.end();\n })().catch(() => {\n if (!res.headersSent)\n res.writeHead(500);\n res.end();\n });\n });\n const chosenProtocol = new WeakMap;\n const wss = new WebSocketServer({\n noServer: true,\n handleProtocols: (_protocols, request) => chosenProtocol.get(request) ?? false\n });\n const refuse = (socket, status, body) => {\n socket.end(`HTTP/1.1 ${status} Refused\\r\ncontent-type: application/json; charset=utf-8\\r\ncontent-length: ${Buffer.byteLength(body)}\\r\nconnection: close\\r\n\\r\n${body}`);\n };\n server.on(\"upgrade\", (req, socket, head) => {\n (async () => {\n const request = toRequest(req);\n if (new URL(request.url).pathname !== \"/v1/ws\") {\n socket.destroy();\n return;\n }\n const problem = originProblem(request, {\n host: options.host,\n ...options.allowedOrigins === undefined ? {} : { allowedOrigins: options.allowedOrigins },\n ...options.allowedHosts === undefined ? {} : { allowedHosts: options.allowedHosts }\n });\n if (problem !== undefined) {\n refuse(socket, 403, JSON.stringify({ error: problem }));\n return;\n }\n const attempt = await bridge.accept(request);\n if (attempt.kind === \"reject\") {\n refuse(socket, attempt.response.status, await attempt.response.text());\n return;\n }\n if (attempt.protocol !== undefined)\n chosenProtocol.set(req, attempt.protocol);\n wss.handleUpgrade(req, socket, head, (ws) => {\n const adapted = {\n data: attempt.session,\n send: (message) => ws.send(message),\n close: (code, reason) => ws.close(code, reason)\n };\n ws.on(\"message\", (raw, isBinary) => {\n const bytes = Array.isArray(raw) ? Buffer.concat(raw) : raw instanceof ArrayBuffer ? Buffer.from(raw) : raw;\n bridge.handlers.message(adapted, isBinary ? new Uint8Array(bytes) : bytes.toString(\"utf8\"));\n });\n ws.on(\"close\", () => bridge.handlers.close(adapted));\n bridge.handlers.open(adapted);\n });\n })().catch(() => socket.destroy());\n });\n await new Promise((resolve, reject) => {\n server.once(\"error\", reject);\n server.listen(options.port, options.host, () => {\n server.removeListener(\"error\", reject);\n resolve();\n });\n });\n const address = server.address();\n const port = typeof address === \"object\" && address !== null ? address.port : options.port;\n return {\n url: `http://${options.host}:${port}`,\n port,\n host: options.host,\n websocket: true,\n stop: () => new Promise((resolve) => {\n bridge.closeAll();\n wss.close();\n server.closeAllConnections?.();\n server.close(() => resolve());\n })\n };\n}\nexport {\n HEARTBEAT_MS,\n Router,\n WEB_ASSETS,\n WEB_PATHS,\n attachWebSocket,\n browsableHost,\n claimCommand,\n claimUrl,\n createApprovalRegistry,\n createClaimTicket,\n createHandler,\n encodeFrame,\n isLoopback,\n serve,\n serveAsset,\n sseResponse\n};\n\n//# debugId=03579582A4803D6C64756E2164756E21\n//# sourceMappingURL=index.js.map\n",
|
|
6
|
+
"import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"characters\", verb: \"to have\" },\n file: { unit: \"bytes\", verb: \"to have\" },\n array: { unit: \"items\", verb: \"to have\" },\n set: { unit: \"items\", verb: \"to have\" },\n map: { unit: \"entries\", verb: \"to have\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"email address\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO datetime\",\n date: \"ISO date\",\n time: \"ISO time\",\n duration: \"ISO duration\",\n ipv4: \"IPv4 address\",\n ipv6: \"IPv6 address\",\n mac: \"MAC address\",\n cidrv4: \"IPv4 range\",\n cidrv6: \"IPv6 range\",\n base64: \"base64-encoded string\",\n base64url: \"base64url-encoded string\",\n json_string: \"JSON string\",\n e164: \"E.164 number\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n // type names: missing keys = do not translate (use raw value via ?? fallback)\n const TypeDictionary = {\n // Compatibility: \"nan\" -> \"NaN\" for display\n nan: \"NaN\",\n // All other type names omitted - they fall back to raw values via ?? operator\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n return `Invalid input: expected ${expected}, received ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Invalid input: expected ${util.stringifyPrimitive(issue.values[0])}`;\n return `Invalid option: expected one of ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Too big: expected ${issue.origin ?? \"value\"} to have ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elements\"}`;\n return `Too big: expected ${issue.origin ?? \"value\"} to be ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Too small: expected ${issue.origin} to have ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Too small: expected ${issue.origin} to be ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Invalid string: must start with \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Invalid string: must end with \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Invalid string: must include \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Invalid string: must match pattern ${_issue.pattern}`;\n return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Invalid number: must be a multiple of ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Unrecognized key${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Invalid key in ${issue.origin}`;\n case \"invalid_union\":\n if (issue.options && Array.isArray(issue.options) && issue.options.length > 0) {\n const opts = issue.options.map((o) => `'${o}'`).join(\" | \");\n return `Invalid discriminator value. Expected ${opts}`;\n }\n return \"Invalid input\";\n case \"invalid_element\":\n return `Invalid value in ${issue.origin}`;\n default:\n return `Invalid input`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n",
|
|
7
|
+
"export * as core from \"../core/index.js\";\nexport * from \"./schemas.js\";\nexport * from \"./checks.js\";\nexport * from \"./errors.js\";\nexport * from \"./parse.js\";\nexport * from \"./compat.js\";\n// zod-specified\nimport { config } from \"../core/index.js\";\nimport en from \"../locales/en.js\";\nconfig(en());\nexport { globalRegistry, registry, config, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, TimePrecision, util, NEVER, } from \"../core/index.js\";\nexport { toJSONSchema } from \"../core/json-schema-processors.js\";\nexport { fromJSONSchema } from \"./from-json-schema.js\";\nexport * as locales from \"../locales/index.js\";\n// iso\n// must be exported from top-level\n// https://github.com/colinhacks/zod/issues/4491\nexport { ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration } from \"./iso.js\";\nexport * as iso from \"./iso.js\";\nexport * as coerce from \"./coerce.js\";\n",
|
|
8
|
+
"/**\n * The address a person opens for an agent's browser view.\n *\n * In `lib/` rather than in `web.ts` because three commands print it — `web`, `init` and\n * `channels pair` — and `web.ts` is imported lazily by the entry point, so a static import of it\n * from another command would make one module both static and dynamic, which the bundler splits\n * into a duplicate export (`boundaries.test.ts` refuses the mix for that reason).\n */\n\nimport { browsableHost } from \"@dispach/server\"\n\n/**\n * No credential is attached. A claim is minted at boot and printed by `serve`, deliberately once —\n * a fresh one per invocation would leave a standing credential in a log — and a durable key in an\n * address bar lands in history, a bookmark and whatever syncs them. The page asks when it has to.\n */\nexport function webUrl(baseUrl: string, agentId?: string): string {\n const url = new URL(baseUrl)\n url.pathname = \"/\"\n /**\n * A bind is not an address, and the container is where that stops being theoretical.\n *\n * The lease publishes what was actually bound, which inside the image is `0.0.0.0` — every\n * interface, and a link no browser can open. `browsableHost` is the same substitution\n * `claimUrl` has always made, shared rather than copied a third time. Found by running this\n * *in the container*: on a laptop `serve` binds `127.0.0.1` and the substitution never fires,\n * so the defect is invisible everywhere except where it is deployed.\n */\n url.hostname = browsableHost(url.hostname)\n if (agentId !== undefined && agentId !== \"\") url.searchParams.set(\"agent\", agentId)\n return url.toString()\n}\n"
|
|
9
|
+
],
|
|
10
|
+
"mappings": ";4KAwCA,mBAAS,0BCvCT,IAAM,GAAQ,IAAM,CAChB,IAAM,EAAU,CACZ,OAAQ,CAAE,KAAM,aAAc,KAAM,SAAU,EAC9C,KAAM,CAAE,KAAM,QAAS,KAAM,SAAU,EACvC,MAAO,CAAE,KAAM,QAAS,KAAM,SAAU,EACxC,IAAK,CAAE,KAAM,QAAS,KAAM,SAAU,EACtC,IAAK,CAAE,KAAM,UAAW,KAAM,SAAU,CAC5C,EACA,SAAS,CAAS,CAAC,EAAQ,CACvB,OAAO,EAAQ,IAAW,KAE9B,IAAM,EAAmB,CACrB,MAAO,QACP,MAAO,gBACP,IAAK,MACL,MAAO,QACP,KAAM,OACN,OAAQ,SACR,OAAQ,SACR,OAAQ,SACR,KAAM,OACN,KAAM,OACN,MAAO,QACP,KAAM,OACN,IAAK,MACL,MAAO,QACP,SAAU,eACV,KAAM,WACN,KAAM,WACN,SAAU,eACV,KAAM,eACN,KAAM,eACN,IAAK,cACL,OAAQ,aACR,OAAQ,aACR,OAAQ,wBACR,UAAW,2BACX,YAAa,cACb,KAAM,eACN,IAAK,MACL,iBAAkB,OACtB,EAEM,EAAiB,CAEnB,IAAK,KAET,EACA,MAAO,CAAC,IAAU,CACd,OAAQ,EAAM,UACL,eAAgB,CACjB,IAAM,EAAW,EAAe,EAAM,WAAa,EAAM,SACnD,EAAoB,GAAW,EAAM,KAAK,EAC1C,EAAW,EAAe,IAAiB,EACjD,MAAO,2BAA2B,eAAsB,GAC5D,KACK,gBACD,GAAI,EAAM,OAAO,SAAW,EACxB,MAAO,2BAAgC,GAAmB,EAAM,OAAO,EAA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