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
|
@@ -1,12 +0,0 @@
|
|
|
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"],
|
|
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 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 \"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}.note{font-size:12px;color:var(--dim);border-left:2px solid var(--line);padding-left:11px}.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}\\n';\n\n// ../web/dist/assets/app.js\nvar app_default2 = `(function(){const s=document.createElement(\"link\").relList;if(s&&s.supports&&s.supports(\"modulepreload\"))return;for(const j of document.querySelectorAll('link[rel=\"modulepreload\"]'))o(j);new MutationObserver(j=>{for(const z of j)if(z.type===\"childList\")for(const C of z.addedNodes)C.tagName===\"LINK\"&&C.rel===\"modulepreload\"&&o(C)}).observe(document,{childList:!0,subtree:!0});function r(j){const z={};return j.integrity&&(z.integrity=j.integrity),j.referrerPolicy&&(z.referrerPolicy=j.referrerPolicy),j.crossOrigin===\"use-credentials\"?z.credentials=\"include\":j.crossOrigin===\"anonymous\"?z.credentials=\"omit\":z.credentials=\"same-origin\",z}function o(j){if(j.ep)return;j.ep=!0;const z=r(j);fetch(j.href,z)}})();var Tf={exports:{}},qn={};var Yr;function Om(){if(Yr)return qn;Yr=1;var c=Symbol.for(\"react.transitional.element\"),s=Symbol.for(\"react.fragment\");function r(o,j,z){var C=null;if(z!==void 0&&(C=\"\"+z),j.key!==void 0&&(C=\"\"+j.key),\"key\"in j){z={};for(var L in j)L!==\"key\"&&(z[L]=j[L])}else z=j;return j=z.ref,{$$typeof:c,type:o,key:C,ref:j!==void 0?j:null,props:z}}return qn.Fragment=s,qn.jsx=r,qn.jsxs=r,qn}var wr;function Mm(){return wr||(wr=1,Tf.exports=Om()),Tf.exports}var d=Mm(),Ef={exports:{}},I={};var Gr;function Um(){if(Gr)return I;Gr=1;var c=Symbol.for(\"react.transitional.element\"),s=Symbol.for(\"react.portal\"),r=Symbol.for(\"react.fragment\"),o=Symbol.for(\"react.strict_mode\"),j=Symbol.for(\"react.profiler\"),z=Symbol.for(\"react.consumer\"),C=Symbol.for(\"react.context\"),L=Symbol.for(\"react.forward_ref\"),H=Symbol.for(\"react.suspense\"),g=Symbol.for(\"react.memo\"),D=Symbol.for(\"react.lazy\"),E=Symbol.for(\"react.activity\"),U=Symbol.iterator;function J(m){return m===null||typeof m!=\"object\"?null:(m=U&&m[U]||m[\"@@iterator\"],typeof m==\"function\"?m:null)}var W={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},q=Object.assign,Ee={};function $(m,O,B){this.props=m,this.context=O,this.refs=Ee,this.updater=B||W}$.prototype.isReactComponent={},$.prototype.setState=function(m,O){if(typeof m!=\"object\"&&typeof m!=\"function\"&&m!=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,m,O,\"setState\")},$.prototype.forceUpdate=function(m){this.updater.enqueueForceUpdate(this,m,\"forceUpdate\")};function Pe(){}Pe.prototype=$.prototype;function _e(m,O,B){this.props=m,this.context=O,this.refs=Ee,this.updater=B||W}var Ne=_e.prototype=new Pe;Ne.constructor=_e,q(Ne,$.prototype),Ne.isPureReactComponent=!0;var ft=Array.isArray;function we(){}var P={H:null,A:null,T:null,S:null},ve=Object.prototype.hasOwnProperty;function et(m,O,B){var Y=B.ref;return{$$typeof:c,type:m,key:O,ref:Y!==void 0?Y:null,props:B}}function Ht(m,O){return et(m.type,O,m.props)}function fe(m){return typeof m==\"object\"&&m!==null&&m.$$typeof===c}function Ge(m){var O={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+m.replace(/[=:]/g,function(B){return O[B]})}var Ot=/\\\\/+/g;function Mt(m,O){return typeof m==\"object\"&&m!==null&&m.key!=null?Ge(\"\"+m.key):O.toString(36)}function st(m){switch(m.status){case\"fulfilled\":return m.value;case\"rejected\":throw m.reason;default:switch(typeof m.status==\"string\"?m.then(we,we):(m.status=\"pending\",m.then(function(O){m.status===\"pending\"&&(m.status=\"fulfilled\",m.value=O)},function(O){m.status===\"pending\"&&(m.status=\"rejected\",m.reason=O)})),m.status){case\"fulfilled\":return m.value;case\"rejected\":throw m.reason}}throw m}function x(m,O,B,Y,F){var k=typeof m;(k===\"undefined\"||k===\"boolean\")&&(m=null);var oe=!1;if(m===null)oe=!0;else switch(k){case\"bigint\":case\"string\":case\"number\":oe=!0;break;case\"object\":switch(m.$$typeof){case c:case s:oe=!0;break;case D:return oe=m._init,x(oe(m._payload),O,B,Y,F)}}if(oe)return F=F(m),oe=Y===\"\"?\".\"+Mt(m,0):Y,ft(F)?(B=\"\",oe!=null&&(B=oe.replace(Ot,\"$&/\")+\"/\"),x(F,O,B,\"\",function(Dl){return Dl})):F!=null&&(fe(F)&&(F=Ht(F,B+(F.key==null||m&&m.key===F.key?\"\":(\"\"+F.key).replace(Ot,\"$&/\")+\"/\")+oe)),O.push(F)),1;oe=0;var Re=Y===\"\"?\".\":Y+\":\";if(ft(m))for(var xe=0;xe<m.length;xe++)Y=m[xe],k=Re+Mt(Y,xe),oe+=x(Y,O,B,k,F);else if(xe=J(m),typeof xe==\"function\")for(m=xe.call(m),xe=0;!(Y=m.next()).done;)Y=Y.value,k=Re+Mt(Y,xe++),oe+=x(Y,O,B,k,F);else if(k===\"object\"){if(typeof m.then==\"function\")return x(st(m),O,B,Y,F);throw O=String(m),Error(\"Objects are not valid as a React child (found: \"+(O===\"[object Object]\"?\"object with keys {\"+Object.keys(m).join(\", \")+\"}\":O)+\"). If you meant to render a collection of children, use an array instead.\")}return oe}function R(m,O,B){if(m==null)return m;var Y=[],F=0;return x(m,Y,\"\",\"\",function(k){return O.call(B,k,F++)}),Y}function V(m){if(m._status===-1){var O=m._result;O=O(),O.then(function(B){(m._status===0||m._status===-1)&&(m._status=1,m._result=B)},function(B){(m._status===0||m._status===-1)&&(m._status=2,m._result=B)}),m._status===-1&&(m._status=0,m._result=O)}if(m._status===1)return m._result.default;throw m._result}var se=typeof reportError==\"function\"?reportError:function(m){if(typeof window==\"object\"&&typeof window.ErrorEvent==\"function\"){var O=new window.ErrorEvent(\"error\",{bubbles:!0,cancelable:!0,message:typeof m==\"object\"&&m!==null&&typeof m.message==\"string\"?String(m.message):String(m),error:m});if(!window.dispatchEvent(O))return}else if(typeof process==\"object\"&&typeof process.emit==\"function\"){process.emit(\"uncaughtException\",m);return}console.error(m)},de={map:R,forEach:function(m,O,B){R(m,function(){O.apply(this,arguments)},B)},count:function(m){var O=0;return R(m,function(){O++}),O},toArray:function(m){return R(m,function(O){return O})||[]},only:function(m){if(!fe(m))throw Error(\"React.Children.only expected to receive a single React element child.\");return m}};return I.Activity=E,I.Children=de,I.Component=$,I.Fragment=r,I.Profiler=j,I.PureComponent=_e,I.StrictMode=o,I.Suspense=H,I.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,I.__COMPILER_RUNTIME={__proto__:null,c:function(m){return P.H.useMemoCache(m)}},I.cache=function(m){return function(){return m.apply(null,arguments)}},I.cacheSignal=function(){return null},I.cloneElement=function(m,O,B){if(m==null)throw Error(\"The argument must be a React element, but you passed \"+m+\".\");var Y=q({},m.props),F=m.key;if(O!=null)for(k in O.key!==void 0&&(F=\"\"+O.key),O)!ve.call(O,k)||k===\"key\"||k===\"__self\"||k===\"__source\"||k===\"ref\"&&O.ref===void 0||(Y[k]=O[k]);var k=arguments.length-2;if(k===1)Y.children=B;else if(1<k){for(var oe=Array(k),Re=0;Re<k;Re++)oe[Re]=arguments[Re+2];Y.children=oe}return et(m.type,F,Y)},I.createContext=function(m){return m={$$typeof:C,_currentValue:m,_currentValue2:m,_threadCount:0,Provider:null,Consumer:null},m.Provider=m,m.Consumer={$$typeof:z,_context:m},m},I.createElement=function(m,O,B){var Y,F={},k=null;if(O!=null)for(Y in O.key!==void 0&&(k=\"\"+O.key),O)ve.call(O,Y)&&Y!==\"key\"&&Y!==\"__self\"&&Y!==\"__source\"&&(F[Y]=O[Y]);var oe=arguments.length-2;if(oe===1)F.children=B;else if(1<oe){for(var Re=Array(oe),xe=0;xe<oe;xe++)Re[xe]=arguments[xe+2];F.children=Re}if(m&&m.defaultProps)for(Y in oe=m.defaultProps,oe)F[Y]===void 0&&(F[Y]=oe[Y]);return et(m,k,F)},I.createRef=function(){return{current:null}},I.forwardRef=function(m){return{$$typeof:L,render:m}},I.isValidElement=fe,I.lazy=function(m){return{$$typeof:D,_payload:{_status:-1,_result:m},_init:V}},I.memo=function(m,O){return{$$typeof:g,type:m,compare:O===void 0?null:O}},I.startTransition=function(m){var O=P.T,B={};P.T=B;try{var Y=m(),F=P.S;F!==null&&F(B,Y),typeof Y==\"object\"&&Y!==null&&typeof Y.then==\"function\"&&Y.then(we,se)}catch(k){se(k)}finally{O!==null&&B.types!==null&&(O.types=B.types),P.T=O}},I.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},I.use=function(m){return P.H.use(m)},I.useActionState=function(m,O,B){return P.H.useActionState(m,O,B)},I.useCallback=function(m,O){return P.H.useCallback(m,O)},I.useContext=function(m){return P.H.useContext(m)},I.useDebugValue=function(){},I.useDeferredValue=function(m,O){return P.H.useDeferredValue(m,O)},I.useEffect=function(m,O){return P.H.useEffect(m,O)},I.useEffectEvent=function(m){return P.H.useEffectEvent(m)},I.useId=function(){return P.H.useId()},I.useImperativeHandle=function(m,O,B){return P.H.useImperativeHandle(m,O,B)},I.useInsertionEffect=function(m,O){return P.H.useInsertionEffect(m,O)},I.useLayoutEffect=function(m,O){return P.H.useLayoutEffect(m,O)},I.useMemo=function(m,O){return P.H.useMemo(m,O)},I.useOptimistic=function(m,O){return P.H.useOptimistic(m,O)},I.useReducer=function(m,O,B){return P.H.useReducer(m,O,B)},I.useRef=function(m){return P.H.useRef(m)},I.useState=function(m){return P.H.useState(m)},I.useSyncExternalStore=function(m,O,B){return P.H.useSyncExternalStore(m,O,B)},I.useTransition=function(){return P.H.useTransition()},I.version=\"19.2.8\",I}var Xr;function Rf(){return Xr||(Xr=1,Ef.exports=Um()),Ef.exports}var w=Rf(),zf={exports:{}},Bn={},Af={exports:{}},xf={};var Qr;function Dm(){return Qr||(Qr=1,(function(c){function s(x,R){var V=x.length;x.push(R);e:for(;0<V;){var se=V-1>>>1,de=x[se];if(0<j(de,R))x[se]=R,x[V]=de,V=se;else break e}}function r(x){return x.length===0?null:x[0]}function o(x){if(x.length===0)return null;var R=x[0],V=x.pop();if(V!==R){x[0]=V;e:for(var se=0,de=x.length,m=de>>>1;se<m;){var O=2*(se+1)-1,B=x[O],Y=O+1,F=x[Y];if(0>j(B,V))Y<de&&0>j(F,B)?(x[se]=F,x[Y]=V,se=Y):(x[se]=B,x[O]=V,se=O);else if(Y<de&&0>j(F,V))x[se]=F,x[Y]=V,se=Y;else break e}}return R}function j(x,R){var V=x.sortIndex-R.sortIndex;return V!==0?V:x.id-R.id}if(c.unstable_now=void 0,typeof performance==\"object\"&&typeof performance.now==\"function\"){var z=performance;c.unstable_now=function(){return z.now()}}else{var C=Date,L=C.now();c.unstable_now=function(){return C.now()-L}}var H=[],g=[],D=1,E=null,U=3,J=!1,W=!1,q=!1,Ee=!1,$=typeof setTimeout==\"function\"?setTimeout:null,Pe=typeof clearTimeout==\"function\"?clearTimeout:null,_e=typeof setImmediate<\"u\"?setImmediate:null;function Ne(x){for(var R=r(g);R!==null;){if(R.callback===null)o(g);else if(R.startTime<=x)o(g),R.sortIndex=R.expirationTime,s(H,R);else break;R=r(g)}}function ft(x){if(q=!1,Ne(x),!W)if(r(H)!==null)W=!0,we||(we=!0,Ge());else{var R=r(g);R!==null&&st(ft,R.startTime-x)}}var we=!1,P=-1,ve=5,et=-1;function Ht(){return Ee?!0:!(c.unstable_now()-et<ve)}function fe(){if(Ee=!1,we){var x=c.unstable_now();et=x;var R=!0;try{e:{W=!1,q&&(q=!1,Pe(P),P=-1),J=!0;var V=U;try{t:{for(Ne(x),E=r(H);E!==null&&!(E.expirationTime>x&&Ht());){var se=E.callback;if(typeof se==\"function\"){E.callback=null,U=E.priorityLevel;var de=se(E.expirationTime<=x);if(x=c.unstable_now(),typeof de==\"function\"){E.callback=de,Ne(x),R=!0;break t}E===r(H)&&o(H),Ne(x)}else o(H);E=r(H)}if(E!==null)R=!0;else{var m=r(g);m!==null&&st(ft,m.startTime-x),R=!1}}break e}finally{E=null,U=V,J=!1}R=void 0}}finally{R?Ge():we=!1}}}var Ge;if(typeof _e==\"function\")Ge=function(){_e(fe)};else if(typeof MessageChannel<\"u\"){var Ot=new MessageChannel,Mt=Ot.port2;Ot.port1.onmessage=fe,Ge=function(){Mt.postMessage(null)}}else Ge=function(){$(fe,0)};function st(x,R){P=$(function(){x(c.unstable_now())},R)}c.unstable_IdlePriority=5,c.unstable_ImmediatePriority=1,c.unstable_LowPriority=4,c.unstable_NormalPriority=3,c.unstable_Profiling=null,c.unstable_UserBlockingPriority=2,c.unstable_cancelCallback=function(x){x.callback=null},c.unstable_forceFrameRate=function(x){0>x||125<x?console.error(\"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\"):ve=0<x?Math.floor(1e3/x):5},c.unstable_getCurrentPriorityLevel=function(){return U},c.unstable_next=function(x){switch(U){case 1:case 2:case 3:var R=3;break;default:R=U}var V=U;U=R;try{return x()}finally{U=V}},c.unstable_requestPaint=function(){Ee=!0},c.unstable_runWithPriority=function(x,R){switch(x){case 1:case 2:case 3:case 4:case 5:break;default:x=3}var V=U;U=x;try{return R()}finally{U=V}},c.unstable_scheduleCallback=function(x,R,V){var se=c.unstable_now();switch(typeof V==\"object\"&&V!==null?(V=V.delay,V=typeof V==\"number\"&&0<V?se+V:se):V=se,x){case 1:var de=-1;break;case 2:de=250;break;case 5:de=1073741823;break;case 4:de=1e4;break;default:de=5e3}return de=V+de,x={id:D++,callback:R,priorityLevel:x,startTime:V,expirationTime:de,sortIndex:-1},V>se?(x.sortIndex=V,s(g,x),r(H)===null&&x===r(g)&&(q?(Pe(P),P=-1):q=!0,st(ft,V-se))):(x.sortIndex=de,s(H,x),W||J||(W=!0,we||(we=!0,Ge()))),x},c.unstable_shouldYield=Ht,c.unstable_wrapCallback=function(x){var R=U;return function(){var V=U;U=R;try{return x.apply(this,arguments)}finally{U=V}}}})(xf)),xf}var Zr;function Cm(){return Zr||(Zr=1,Af.exports=Dm()),Af.exports}var jf={exports:{}},Fe={};var Lr;function Rm(){if(Lr)return Fe;Lr=1;var c=Rf();function s(H){var g=\"https://react.dev/errors/\"+H;if(1<arguments.length){g+=\"?args[]=\"+encodeURIComponent(arguments[1]);for(var D=2;D<arguments.length;D++)g+=\"&args[]=\"+encodeURIComponent(arguments[D])}return\"Minified React error #\"+H+\"; visit \"+g+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}function r(){}var o={d:{f:r,r:function(){throw Error(s(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},j=Symbol.for(\"react.portal\");function z(H,g,D){var E=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:j,key:E==null?null:\"\"+E,children:H,containerInfo:g,implementation:D}}var C=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function L(H,g){if(H===\"font\")return\"\";if(typeof g==\"string\")return g===\"use-credentials\"?g:\"\"}return Fe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Fe.createPortal=function(H,g){var D=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(s(299));return z(H,g,null,D)},Fe.flushSync=function(H){var g=C.T,D=o.p;try{if(C.T=null,o.p=2,H)return H()}finally{C.T=g,o.p=D,o.d.f()}},Fe.preconnect=function(H,g){typeof H==\"string\"&&(g?(g=g.crossOrigin,g=typeof g==\"string\"?g===\"use-credentials\"?g:\"\":void 0):g=null,o.d.C(H,g))},Fe.prefetchDNS=function(H){typeof H==\"string\"&&o.d.D(H)},Fe.preinit=function(H,g){if(typeof H==\"string\"&&g&&typeof g.as==\"string\"){var D=g.as,E=L(D,g.crossOrigin),U=typeof g.integrity==\"string\"?g.integrity:void 0,J=typeof g.fetchPriority==\"string\"?g.fetchPriority:void 0;D===\"style\"?o.d.S(H,typeof g.precedence==\"string\"?g.precedence:void 0,{crossOrigin:E,integrity:U,fetchPriority:J}):D===\"script\"&&o.d.X(H,{crossOrigin:E,integrity:U,fetchPriority:J,nonce:typeof g.nonce==\"string\"?g.nonce:void 0})}},Fe.preinitModule=function(H,g){if(typeof H==\"string\")if(typeof g==\"object\"&&g!==null){if(g.as==null||g.as===\"script\"){var D=L(g.as,g.crossOrigin);o.d.M(H,{crossOrigin:D,integrity:typeof g.integrity==\"string\"?g.integrity:void 0,nonce:typeof g.nonce==\"string\"?g.nonce:void 0})}}else g==null&&o.d.M(H)},Fe.preload=function(H,g){if(typeof H==\"string\"&&typeof g==\"object\"&&g!==null&&typeof g.as==\"string\"){var D=g.as,E=L(D,g.crossOrigin);o.d.L(H,D,{crossOrigin:E,integrity:typeof g.integrity==\"string\"?g.integrity:void 0,nonce:typeof g.nonce==\"string\"?g.nonce:void 0,type:typeof g.type==\"string\"?g.type:void 0,fetchPriority:typeof g.fetchPriority==\"string\"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy==\"string\"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet==\"string\"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes==\"string\"?g.imageSizes:void 0,media:typeof g.media==\"string\"?g.media:void 0})}},Fe.preloadModule=function(H,g){if(typeof H==\"string\")if(g){var D=L(g.as,g.crossOrigin);o.d.m(H,{as:typeof g.as==\"string\"&&g.as!==\"script\"?g.as:void 0,crossOrigin:D,integrity:typeof g.integrity==\"string\"?g.integrity:void 0})}else o.d.m(H)},Fe.requestFormReset=function(H){o.d.r(H)},Fe.unstable_batchedUpdates=function(H,g){return H(g)},Fe.useFormState=function(H,g,D){return C.H.useFormState(H,g,D)},Fe.useFormStatus=function(){return C.H.useHostTransitionStatus()},Fe.version=\"19.2.8\",Fe}var Kr;function Hm(){if(Kr)return jf.exports;Kr=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>\"u\"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=\"function\"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(s){console.error(s)}}return c(),jf.exports=Rm(),jf.exports}var Vr;function qm(){if(Vr)return Bn;Vr=1;var c=Cm(),s=Rf(),r=Hm();function o(e){var t=\"https://react.dev/errors/\"+e;if(1<arguments.length){t+=\"?args[]=\"+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+=\"&args[]=\"+encodeURIComponent(arguments[l])}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 j(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function z(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function C(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 L(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 H(e){if(z(e)!==e)throw Error(o(188))}function g(e){var t=e.alternate;if(!t){if(t=z(e),t===null)throw Error(o(188));return t!==e?null:e}for(var l=e,a=t;;){var n=l.return;if(n===null)break;var u=n.alternate;if(u===null){if(a=n.return,a!==null){l=a;continue}break}if(n.child===u.child){for(u=n.child;u;){if(u===l)return H(n),e;if(u===a)return H(n),t;u=u.sibling}throw Error(o(188))}if(l.return!==a.return)l=n,a=u;else{for(var i=!1,f=n.child;f;){if(f===l){i=!0,l=n,a=u;break}if(f===a){i=!0,a=n,l=u;break}f=f.sibling}if(!i){for(f=u.child;f;){if(f===l){i=!0,l=u,a=n;break}if(f===a){i=!0,a=u,l=n;break}f=f.sibling}if(!i)throw Error(o(189))}}if(l.alternate!==a)throw Error(o(190))}if(l.tag!==3)throw Error(o(188));return l.stateNode.current===l?e:t}function D(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=D(e),t!==null)return t;e=e.sibling}return null}var E=Object.assign,U=Symbol.for(\"react.element\"),J=Symbol.for(\"react.transitional.element\"),W=Symbol.for(\"react.portal\"),q=Symbol.for(\"react.fragment\"),Ee=Symbol.for(\"react.strict_mode\"),$=Symbol.for(\"react.profiler\"),Pe=Symbol.for(\"react.consumer\"),_e=Symbol.for(\"react.context\"),Ne=Symbol.for(\"react.forward_ref\"),ft=Symbol.for(\"react.suspense\"),we=Symbol.for(\"react.suspense_list\"),P=Symbol.for(\"react.memo\"),ve=Symbol.for(\"react.lazy\"),et=Symbol.for(\"react.activity\"),Ht=Symbol.for(\"react.memo_cache_sentinel\"),fe=Symbol.iterator;function Ge(e){return e===null||typeof e!=\"object\"?null:(e=fe&&e[fe]||e[\"@@iterator\"],typeof e==\"function\"?e:null)}var Ot=Symbol.for(\"react.client.reference\");function Mt(e){if(e==null)return null;if(typeof e==\"function\")return e.$$typeof===Ot?null:e.displayName||e.name||null;if(typeof e==\"string\")return e;switch(e){case q:return\"Fragment\";case $:return\"Profiler\";case Ee:return\"StrictMode\";case ft:return\"Suspense\";case we:return\"SuspenseList\";case et:return\"Activity\"}if(typeof e==\"object\")switch(e.$$typeof){case W:return\"Portal\";case _e:return e.displayName||\"Context\";case Pe:return(e._context.displayName||\"Context\")+\".Consumer\";case Ne:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||\"\",e=e!==\"\"?\"ForwardRef(\"+e+\")\":\"ForwardRef\"),e;case P:return t=e.displayName||null,t!==null?t:Mt(e.type)||\"Memo\";case ve:t=e._payload,e=e._init;try{return Mt(e(t))}catch{}}return null}var st=Array.isArray,x=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},se=[],de=-1;function m(e){return{current:e}}function O(e){0>de||(e.current=se[de],se[de]=null,de--)}function B(e,t){de++,se[de]=e.current,e.current=t}var Y=m(null),F=m(null),k=m(null),oe=m(null);function Re(e,t){switch(B(k,t),B(F,e),B(Y,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?cr(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=cr(t),e=fr(t,e);else switch(e){case\"svg\":e=1;break;case\"math\":e=2;break;default:e=0}}O(Y),B(Y,e)}function xe(){O(Y),O(F),O(k)}function Dl(e){e.memoizedState!==null&&B(oe,e);var t=Y.current,l=fr(t,e.type);t!==l&&(B(F,e),B(Y,l))}function Cl(e){F.current===e&&(O(Y),O(F)),oe.current===e&&(O(oe),Dn._currentValue=V)}var wa,Ga;function qt(e){if(wa===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\\\\n( *(at )?)/);wa=t&&t[1]||\"\",Ga=-1<l.stack.indexOf(\\`\n at\\`)?\" (<anonymous>)\":-1<l.stack.indexOf(\"@\")?\"@unknown:0:0\":\"\"}return\\`\n\\`+wa+e+Ga}var Pl=!1;function Xa(e,t){if(!e||Pl)return\"\";Pl=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var N=function(){throw Error()};if(Object.defineProperty(N.prototype,\"props\",{set:function(){throw Error()}}),typeof Reflect==\"object\"&&Reflect.construct){try{Reflect.construct(N,[])}catch(T){var p=T}Reflect.construct(e,[],N)}else{try{N.call()}catch(T){p=T}e.call(N.prototype)}}else{try{throw Error()}catch(T){p=T}(N=e())&&typeof N.catch==\"function\"&&N.catch(function(){})}}catch(T){if(T&&p&&typeof T.stack==\"string\")return[T.stack,p.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName=\"DetermineComponentFrameRoot\";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,\"name\");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,\"name\",{value:\"DetermineComponentFrameRoot\"});var u=a.DetermineComponentFrameRoot(),i=u[0],f=u[1];if(i&&f){var h=i.split(\\`\n\\`),S=f.split(\\`\n\\`);for(n=a=0;a<h.length&&!h[a].includes(\"DetermineComponentFrameRoot\");)a++;for(;n<S.length&&!S[n].includes(\"DetermineComponentFrameRoot\");)n++;if(a===h.length||n===S.length)for(a=h.length-1,n=S.length-1;1<=a&&0<=n&&h[a]!==S[n];)n--;for(;1<=a&&0<=n;a--,n--)if(h[a]!==S[n]){if(a!==1||n!==1)do if(a--,n--,0>n||h[a]!==S[n]){var A=\\`\n\\`+h[a].replace(\" at new \",\" at \");return e.displayName&&A.includes(\"<anonymous>\")&&(A=A.replace(\"<anonymous>\",e.displayName)),A}while(1<=a&&0<=n);break}}}finally{Pl=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:\"\")?qt(l):\"\"}function ea(e,t){switch(e.tag){case 26:case 27:case 5:return qt(e.type);case 16:return qt(\"Lazy\");case 13:return e.child!==t&&t!==null?qt(\"Suspense Fallback\"):qt(\"Suspense\");case 19:return qt(\"SuspenseList\");case 0:case 15:return Xa(e.type,!1);case 11:return Xa(e.type.render,!1);case 1:return Xa(e.type,!0);case 31:return qt(\"Activity\");default:return\"\"}}function Gn(e){try{var t=\"\",l=null;do t+=ea(e,l),l=e,e=e.return;while(e);return t}catch(a){return\\`\nError generating stack: \\`+a.message+\\`\n\\`+a.stack}}var M=Object.prototype.hasOwnProperty,Q=c.unstable_scheduleCallback,ie=c.unstable_cancelCallback,Oe=c.unstable_shouldYield,We=c.unstable_requestPaint,Le=c.unstable_now,Qa=c.unstable_getCurrentPriorityLevel,Yf=c.unstable_ImmediatePriority,wf=c.unstable_UserBlockingPriority,Xn=c.unstable_NormalPriority,oh=c.unstable_LowPriority,Gf=c.unstable_IdlePriority,dh=c.log,rh=c.unstable_setDisableYieldValue,Za=null,ot=null;function cl(e){if(typeof dh==\"function\"&&rh(e),ot&&typeof ot.setStrictMode==\"function\")try{ot.setStrictMode(Za,e)}catch{}}var dt=Math.clz32?Math.clz32:mh,hh=Math.log,vh=Math.LN2;function mh(e){return e>>>=0,e===0?32:31-(hh(e)/vh|0)|0}var Qn=256,Zn=262144,Ln=4194304;function Rl(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 Kn(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,u=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var f=a&134217727;return f!==0?(a=f&~u,a!==0?n=Rl(a):(i&=f,i!==0?n=Rl(i):l||(l=f&~e,l!==0&&(n=Rl(l))))):(f=a&~u,f!==0?n=Rl(f):i!==0?n=Rl(i):l||(l=a&~e,l!==0&&(n=Rl(l)))),n===0?0:t!==0&&t!==n&&(t&u)===0&&(u=n&-n,l=t&-t,u>=l||u===32&&(l&4194048)!==0)?t:n}function La(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function yh(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 Xf(){var e=Ln;return Ln<<=1,(Ln&62914560)===0&&(Ln=4194304),e}function fi(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Ka(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function gh(e,t,l,a,n,u){var i=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var f=e.entanglements,h=e.expirationTimes,S=e.hiddenUpdates;for(l=i&~l;0<l;){var A=31-dt(l),N=1<<A;f[A]=0,h[A]=-1;var p=S[A];if(p!==null)for(S[A]=null,A=0;A<p.length;A++){var T=p[A];T!==null&&(T.lane&=-536870913)}l&=~N}a!==0&&Qf(e,a,0),u!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=u&~(i&~t))}function Qf(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-dt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function Zf(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-dt(l),n=1<<a;n&t|e[a]&t&&(e[a]|=t),l&=~n}}function Lf(e,t){var l=t&-t;return l=(l&42)!==0?1:si(l),(l&(e.suspendedLanes|t))!==0?0:l}function si(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 oi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Kf(){var e=R.p;return e!==0?e:(e=window.event,e===void 0?32:Ur(e.type))}function Vf(e,t){var l=R.p;try{return R.p=e,t()}finally{R.p=l}}var fl=Math.random().toString(36).slice(2),Ke=\"__reactFiber$\"+fl,tt=\"__reactProps$\"+fl,ta=\"__reactContainer$\"+fl,di=\"__reactEvents$\"+fl,bh=\"__reactListeners$\"+fl,Sh=\"__reactHandles$\"+fl,Jf=\"__reactResources$\"+fl,Va=\"__reactMarker$\"+fl;function ri(e){delete e[Ke],delete e[tt],delete e[di],delete e[bh],delete e[Sh]}function la(e){var t=e[Ke];if(t)return t;for(var l=e.parentNode;l;){if(t=l[ta]||l[Ke]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=mr(e);e!==null;){if(l=e[Ke])return l;e=mr(e)}return t}e=l,l=e.parentNode}return null}function aa(e){if(e=e[Ke]||e[ta]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ja(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function na(e){var t=e[Jf];return t||(t=e[Jf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Qe(e){e[Va]=!0}var kf=new Set,$f={};function Hl(e,t){ua(e,t),ua(e+\"Capture\",t)}function ua(e,t){for($f[e]=t,e=0;e<t.length;e++)kf.add(t[e])}var ph=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]*$\"),Wf={},Ff={};function Th(e){return M.call(Ff,e)?!0:M.call(Wf,e)?!1:ph.test(e)?Ff[e]=!0:(Wf[e]=!0,!1)}function Vn(e,t,l){if(Th(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case\"undefined\":case\"function\":case\"symbol\":e.removeAttribute(t);return;case\"boolean\":var a=t.toLowerCase().slice(0,5);if(a!==\"data-\"&&a!==\"aria-\"){e.removeAttribute(t);return}}e.setAttribute(t,\"\"+l)}}function Jn(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case\"undefined\":case\"function\":case\"symbol\":case\"boolean\":e.removeAttribute(t);return}e.setAttribute(t,\"\"+l)}}function Qt(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case\"undefined\":case\"function\":case\"symbol\":case\"boolean\":e.removeAttribute(l);return}e.setAttributeNS(t,l,\"\"+a)}}function St(e){switch(typeof e){case\"bigint\":case\"boolean\":case\"number\":case\"string\":case\"undefined\":return e;case\"object\":return e;default:return\"\"}}function If(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===\"input\"&&(t===\"checkbox\"||t===\"radio\")}function Eh(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<\"u\"&&typeof a.get==\"function\"&&typeof a.set==\"function\"){var n=a.get,u=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(i){l=\"\"+i,u.call(this,i)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(i){l=\"\"+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function hi(e){if(!e._valueTracker){var t=If(e)?\"checked\":\"value\";e._valueTracker=Eh(e,t,\"\"+e[t])}}function Pf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a=\"\";return e&&(a=If(e)?e.checked?\"true\":\"false\":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function kn(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 zh=/[\\\\n\"\\\\\\\\]/g;function pt(e){return e.replace(zh,function(t){return\"\\\\\\\\\"+t.charCodeAt(0).toString(16)+\" \"})}function vi(e,t,l,a,n,u,i,f){e.name=\"\",i!=null&&typeof i!=\"function\"&&typeof i!=\"symbol\"&&typeof i!=\"boolean\"?e.type=i:e.removeAttribute(\"type\"),t!=null?i===\"number\"?(t===0&&e.value===\"\"||e.value!=t)&&(e.value=\"\"+St(t)):e.value!==\"\"+St(t)&&(e.value=\"\"+St(t)):i!==\"submit\"&&i!==\"reset\"||e.removeAttribute(\"value\"),t!=null?mi(e,i,St(t)):l!=null?mi(e,i,St(l)):a!=null&&e.removeAttribute(\"value\"),n==null&&u!=null&&(e.defaultChecked=!!u),n!=null&&(e.checked=n&&typeof n!=\"function\"&&typeof n!=\"symbol\"),f!=null&&typeof f!=\"function\"&&typeof f!=\"symbol\"&&typeof f!=\"boolean\"?e.name=\"\"+St(f):e.removeAttribute(\"name\")}function es(e,t,l,a,n,u,i,f){if(u!=null&&typeof u!=\"function\"&&typeof u!=\"symbol\"&&typeof u!=\"boolean\"&&(e.type=u),t!=null||l!=null){if(!(u!==\"submit\"&&u!==\"reset\"||t!=null)){hi(e);return}l=l!=null?\"\"+St(l):\"\",t=t!=null?\"\"+St(t):l,f||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!=\"function\"&&typeof a!=\"symbol\"&&!!a,e.checked=f?e.checked:!!a,e.defaultChecked=!!a,i!=null&&typeof i!=\"function\"&&typeof i!=\"symbol\"&&typeof i!=\"boolean\"&&(e.name=i),hi(e)}function mi(e,t,l){t===\"number\"&&kn(e.ownerDocument)===e||e.defaultValue===\"\"+l||(e.defaultValue=\"\"+l)}function ia(e,t,l,a){if(e=e.options,t){t={};for(var n=0;n<l.length;n++)t[\"$\"+l[n]]=!0;for(l=0;l<e.length;l++)n=t.hasOwnProperty(\"$\"+e[l].value),e[l].selected!==n&&(e[l].selected=n),n&&a&&(e[l].defaultSelected=!0)}else{for(l=\"\"+St(l),t=null,n=0;n<e.length;n++){if(e[n].value===l){e[n].selected=!0,a&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function ts(e,t,l){if(t!=null&&(t=\"\"+St(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?\"\"+St(l):\"\"}function ls(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(o(92));if(st(a)){if(1<a.length)throw Error(o(93));a=a[0]}l=a}l==null&&(l=\"\"),t=l}l=St(t),e.defaultValue=l,a=e.textContent,a===l&&a!==\"\"&&a!==null&&(e.value=a),hi(e)}function ca(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Ah=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 as(e,t,l){var a=t.indexOf(\"--\")===0;l==null||typeof l==\"boolean\"||l===\"\"?a?e.setProperty(t,\"\"):t===\"float\"?e.cssFloat=\"\":e[t]=\"\":a?e.setProperty(t,l):typeof l!=\"number\"||l===0||Ah.has(t)?t===\"float\"?e.cssFloat=l:e[t]=(\"\"+l).trim():e[t]=l+\"px\"}function ns(e,t,l){if(t!=null&&typeof t!=\"object\")throw Error(o(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf(\"--\")===0?e.setProperty(a,\"\"):a===\"float\"?e.cssFloat=\"\":e[a]=\"\");for(var n in t)a=t[n],t.hasOwnProperty(n)&&l[n]!==a&&as(e,n,a)}else for(var u in t)t.hasOwnProperty(u)&&as(e,u,t[u])}function yi(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 xh=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\"]]),jh=/^[\\\\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 $n(e){return jh.test(\"\"+e)?\"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')\":e}function Zt(){}var gi=null;function bi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fa=null,sa=null;function us(e){var t=aa(e);if(t&&(e=t.stateNode)){var l=e[tt]||null;e:switch(e=t.stateNode,t.type){case\"input\":if(vi(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type===\"radio\"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name=\"'+pt(\"\"+t)+'\"][type=\"radio\"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var n=a[tt]||null;if(!n)throw Error(o(90));vi(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&Pf(a)}break e;case\"textarea\":ts(e,l.value,l.defaultValue);break e;case\"select\":t=l.value,t!=null&&ia(e,!!l.multiple,t,!1)}}}var Si=!1;function is(e,t,l){if(Si)return e(t,l);Si=!0;try{var a=e(t);return a}finally{if(Si=!1,(fa!==null||sa!==null)&&(qu(),fa&&(t=fa,e=sa,sa=fa=null,us(t),e)))for(t=0;t<e.length;t++)us(e[t])}}function ka(e,t){var l=e.stateNode;if(l===null)return null;var a=l[tt]||null;if(a===null)return null;l=a[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\":(a=!a.disabled)||(e=e.type,a=!(e===\"button\"||e===\"input\"||e===\"select\"||e===\"textarea\")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!=\"function\")throw Error(o(231,t,typeof l));return l}var Lt=!(typeof window>\"u\"||typeof window.document>\"u\"||typeof window.document.createElement>\"u\"),pi=!1;if(Lt)try{var $a={};Object.defineProperty($a,\"passive\",{get:function(){pi=!0}}),window.addEventListener(\"test\",$a,$a),window.removeEventListener(\"test\",$a,$a)}catch{pi=!1}var sl=null,Ti=null,Wn=null;function cs(){if(Wn)return Wn;var e,t=Ti,l=t.length,a,n=\"value\"in sl?sl.value:sl.textContent,u=n.length;for(e=0;e<l&&t[e]===n[e];e++);var i=l-e;for(a=1;a<=i&&t[l-a]===n[u-a];a++);return Wn=n.slice(e,1<a?1-a:void 0)}function Fn(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 In(){return!0}function fs(){return!1}function lt(e){function t(l,a,n,u,i){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=u,this.target=i,this.currentTarget=null;for(var f in e)e.hasOwnProperty(f)&&(l=e[f],this[f]=l?l(u):u[f]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?In:fs,this.isPropagationStopped=fs,this}return E(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!=\"unknown\"&&(l.returnValue=!1),this.isDefaultPrevented=In)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!=\"unknown\"&&(l.cancelBubble=!0),this.isPropagationStopped=In)},persist:function(){},isPersistent:In}),t}var ql={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pn=lt(ql),Wa=E({},ql,{view:0,detail:0}),_h=lt(Wa),Ei,zi,Fa,eu=E({},Wa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xi,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!==Fa&&(Fa&&e.type===\"mousemove\"?(Ei=e.screenX-Fa.screenX,zi=e.screenY-Fa.screenY):zi=Ei=0,Fa=e),Ei)},movementY:function(e){return\"movementY\"in e?e.movementY:zi}}),ss=lt(eu),Nh=E({},eu,{dataTransfer:0}),Oh=lt(Nh),Mh=E({},Wa,{relatedTarget:0}),Ai=lt(Mh),Uh=E({},ql,{animationName:0,elapsedTime:0,pseudoElement:0}),Dh=lt(Uh),Ch=E({},ql,{clipboardData:function(e){return\"clipboardData\"in e?e.clipboardData:window.clipboardData}}),Rh=lt(Ch),Hh=E({},ql,{data:0}),os=lt(Hh),qh={Esc:\"Escape\",Spacebar:\" \",Left:\"ArrowLeft\",Up:\"ArrowUp\",Right:\"ArrowRight\",Down:\"ArrowDown\",Del:\"Delete\",Win:\"OS\",Menu:\"ContextMenu\",Apps:\"ContextMenu\",Scroll:\"ScrollLock\",MozPrintableKey:\"Unidentified\"},Bh={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\"},Yh={Alt:\"altKey\",Control:\"ctrlKey\",Meta:\"metaKey\",Shift:\"shiftKey\"};function wh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Yh[e])?!!t[e]:!1}function xi(){return wh}var Gh=E({},Wa,{key:function(e){if(e.key){var t=qh[e.key]||e.key;if(t!==\"Unidentified\")return t}return e.type===\"keypress\"?(e=Fn(e),e===13?\"Enter\":String.fromCharCode(e)):e.type===\"keydown\"||e.type===\"keyup\"?Bh[e.keyCode]||\"Unidentified\":\"\"},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xi,charCode:function(e){return e.type===\"keypress\"?Fn(e):0},keyCode:function(e){return e.type===\"keydown\"||e.type===\"keyup\"?e.keyCode:0},which:function(e){return e.type===\"keypress\"?Fn(e):e.type===\"keydown\"||e.type===\"keyup\"?e.keyCode:0}}),Xh=lt(Gh),Qh=E({},eu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ds=lt(Qh),Zh=E({},Wa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xi}),Lh=lt(Zh),Kh=E({},ql,{propertyName:0,elapsedTime:0,pseudoElement:0}),Vh=lt(Kh),Jh=E({},eu,{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}),kh=lt(Jh),$h=E({},ql,{newState:0,oldState:0}),Wh=lt($h),Fh=[9,13,27,32],ji=Lt&&\"CompositionEvent\"in window,Ia=null;Lt&&\"documentMode\"in document&&(Ia=document.documentMode);var Ih=Lt&&\"TextEvent\"in window&&!Ia,rs=Lt&&(!ji||Ia&&8<Ia&&11>=Ia),hs=\" \",vs=!1;function ms(e,t){switch(e){case\"keyup\":return Fh.indexOf(t.keyCode)!==-1;case\"keydown\":return t.keyCode!==229;case\"keypress\":case\"mousedown\":case\"focusout\":return!0;default:return!1}}function ys(e){return e=e.detail,typeof e==\"object\"&&\"data\"in e?e.data:null}var oa=!1;function Ph(e,t){switch(e){case\"compositionend\":return ys(t);case\"keypress\":return t.which!==32?null:(vs=!0,hs);case\"textInput\":return e=t.data,e===hs&&vs?null:e;default:return null}}function ev(e,t){if(oa)return e===\"compositionend\"||!ji&&ms(e,t)?(e=cs(),Wn=Ti=sl=null,oa=!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 rs&&t.locale!==\"ko\"?null:t.data;default:return null}}var tv={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 gs(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===\"input\"?!!tv[e.type]:t===\"textarea\"}function bs(e,t,l,a){fa?sa?sa.push(a):sa=[a]:fa=a,t=Zu(t,\"onChange\"),0<t.length&&(l=new Pn(\"onChange\",\"change\",null,l,a),e.push({event:l,listeners:t}))}var Pa=null,en=null;function lv(e){tr(e,0)}function tu(e){var t=Ja(e);if(Pf(t))return e}function Ss(e,t){if(e===\"change\")return t}var ps=!1;if(Lt){var _i;if(Lt){var Ni=\"oninput\"in document;if(!Ni){var Ts=document.createElement(\"div\");Ts.setAttribute(\"oninput\",\"return;\"),Ni=typeof Ts.oninput==\"function\"}_i=Ni}else _i=!1;ps=_i&&(!document.documentMode||9<document.documentMode)}function Es(){Pa&&(Pa.detachEvent(\"onpropertychange\",zs),en=Pa=null)}function zs(e){if(e.propertyName===\"value\"&&tu(en)){var t=[];bs(t,en,e,bi(e)),is(lv,t)}}function av(e,t,l){e===\"focusin\"?(Es(),Pa=t,en=l,Pa.attachEvent(\"onpropertychange\",zs)):e===\"focusout\"&&Es()}function nv(e){if(e===\"selectionchange\"||e===\"keyup\"||e===\"keydown\")return tu(en)}function uv(e,t){if(e===\"click\")return tu(t)}function iv(e,t){if(e===\"input\"||e===\"change\")return tu(t)}function cv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rt=typeof Object.is==\"function\"?Object.is:cv;function tn(e,t){if(rt(e,t))return!0;if(typeof e!=\"object\"||e===null||typeof t!=\"object\"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var n=l[a];if(!M.call(t,n)||!rt(e[n],t[n]))return!1}return!0}function As(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xs(e,t){var l=As(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=As(l)}}function js(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?js(e,t.parentNode):\"contains\"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _s(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=kn(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href==\"string\"}catch{l=!1}if(l)e=t.contentWindow;else break;t=kn(e.document)}return t}function Oi(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 fv=Lt&&\"documentMode\"in document&&11>=document.documentMode,da=null,Mi=null,ln=null,Ui=!1;function Ns(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Ui||da==null||da!==kn(a)||(a=da,\"selectionStart\"in a&&Oi(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),ln&&tn(ln,a)||(ln=a,a=Zu(Mi,\"onSelect\"),0<a.length&&(t=new Pn(\"onSelect\",\"select\",null,t,l),e.push({event:t,listeners:a}),t.target=da)))}function Bl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l[\"Webkit\"+e]=\"webkit\"+t,l[\"Moz\"+e]=\"moz\"+t,l}var ra={animationend:Bl(\"Animation\",\"AnimationEnd\"),animationiteration:Bl(\"Animation\",\"AnimationIteration\"),animationstart:Bl(\"Animation\",\"AnimationStart\"),transitionrun:Bl(\"Transition\",\"TransitionRun\"),transitionstart:Bl(\"Transition\",\"TransitionStart\"),transitioncancel:Bl(\"Transition\",\"TransitionCancel\"),transitionend:Bl(\"Transition\",\"TransitionEnd\")},Di={},Os={};Lt&&(Os=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete ra.animationend.animation,delete ra.animationiteration.animation,delete ra.animationstart.animation),\"TransitionEvent\"in window||delete ra.transitionend.transition);function Yl(e){if(Di[e])return Di[e];if(!ra[e])return e;var t=ra[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Os)return Di[e]=t[l];return e}var Ms=Yl(\"animationend\"),Us=Yl(\"animationiteration\"),Ds=Yl(\"animationstart\"),sv=Yl(\"transitionrun\"),ov=Yl(\"transitionstart\"),dv=Yl(\"transitioncancel\"),Cs=Yl(\"transitionend\"),Rs=new Map,Ci=\"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(\" \");Ci.push(\"scrollEnd\");function Ut(e,t){Rs.set(e,t),Hl(t,[e])}var lu=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)},Tt=[],ha=0,Ri=0;function au(){for(var e=ha,t=Ri=ha=0;t<e;){var l=Tt[t];Tt[t++]=null;var a=Tt[t];Tt[t++]=null;var n=Tt[t];Tt[t++]=null;var u=Tt[t];if(Tt[t++]=null,a!==null&&n!==null){var i=a.pending;i===null?n.next=n:(n.next=i.next,i.next=n),a.pending=n}u!==0&&Hs(l,n,u)}}function nu(e,t,l,a){Tt[ha++]=e,Tt[ha++]=t,Tt[ha++]=l,Tt[ha++]=a,Ri|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Hi(e,t,l,a){return nu(e,t,l,a),uu(e)}function wl(e,t){return nu(e,null,null,t),uu(e)}function Hs(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var n=!1,u=e.return;u!==null;)u.childLanes|=l,a=u.alternate,a!==null&&(a.childLanes|=l),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(n=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,n&&t!==null&&(n=31-dt(l),e=u.hiddenUpdates,a=e[n],a===null?e[n]=[t]:a.push(t),t.lane=l|536870912),u):null}function uu(e){if(50<xn)throw xn=0,Lc=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var va={};function rv(e,t,l,a){this.tag=e,this.key=l,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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ht(e,t,l,a){return new rv(e,t,l,a)}function qi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kt(e,t){var l=e.alternate;return l===null?(l=ht(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function qs(e,t){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function iu(e,t,l,a,n,u){var i=0;if(a=e,typeof e==\"function\")qi(e)&&(i=1);else if(typeof e==\"string\")i=gm(e,l,Y.current)?26:e===\"html\"||e===\"head\"||e===\"body\"?27:5;else e:switch(e){case et:return e=ht(31,l,t,n),e.elementType=et,e.lanes=u,e;case q:return Gl(l.children,n,u,t);case Ee:i=8,n|=24;break;case $:return e=ht(12,l,t,n|2),e.elementType=$,e.lanes=u,e;case ft:return e=ht(13,l,t,n),e.elementType=ft,e.lanes=u,e;case we:return e=ht(19,l,t,n),e.elementType=we,e.lanes=u,e;default:if(typeof e==\"object\"&&e!==null)switch(e.$$typeof){case _e:i=10;break e;case Pe:i=9;break e;case Ne:i=11;break e;case P:i=14;break e;case ve:i=16,a=null;break e}i=29,l=Error(o(130,e===null?\"null\":typeof e,\"\")),a=null}return t=ht(i,l,t,n),t.elementType=e,t.type=a,t.lanes=u,t}function Gl(e,t,l,a){return e=ht(7,e,a,t),e.lanes=l,e}function Bi(e,t,l){return e=ht(6,e,null,t),e.lanes=l,e}function Bs(e){var t=ht(18,null,null,0);return t.stateNode=e,t}function Yi(e,t,l){return t=ht(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ys=new WeakMap;function Et(e,t){if(typeof e==\"object\"&&e!==null){var l=Ys.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Gn(t)},Ys.set(e,t),t)}return{value:e,source:t,stack:Gn(t)}}var ma=[],ya=0,cu=null,an=0,zt=[],At=0,ol=null,Bt=1,Yt=\"\";function Vt(e,t){ma[ya++]=an,ma[ya++]=cu,cu=e,an=t}function ws(e,t,l){zt[At++]=Bt,zt[At++]=Yt,zt[At++]=ol,ol=e;var a=Bt;e=Yt;var n=32-dt(a)-1;a&=~(1<<n),l+=1;var u=32-dt(t)+n;if(30<u){var i=n-n%5;u=(a&(1<<i)-1).toString(32),a>>=i,n-=i,Bt=1<<32-dt(t)+n|l<<n|a,Yt=u+e}else Bt=1<<u|l<<n|a,Yt=e}function wi(e){e.return!==null&&(Vt(e,1),ws(e,1,0))}function Gi(e){for(;e===cu;)cu=ma[--ya],ma[ya]=null,an=ma[--ya],ma[ya]=null;for(;e===ol;)ol=zt[--At],zt[At]=null,Yt=zt[--At],zt[At]=null,Bt=zt[--At],zt[At]=null}function Gs(e,t){zt[At++]=Bt,zt[At++]=Yt,zt[At++]=ol,Bt=t.id,Yt=t.overflow,ol=e}var Ve=null,ze=null,ce=!1,dl=null,xt=!1,Xi=Error(o(519));function rl(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?\"text\":\"HTML\",\"\"));throw nn(Et(t,e)),Xi}function Xs(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[Ke]=e,t[tt]=a,l){case\"dialog\":ae(\"cancel\",t),ae(\"close\",t);break;case\"iframe\":case\"object\":case\"embed\":ae(\"load\",t);break;case\"video\":case\"audio\":for(l=0;l<_n.length;l++)ae(_n[l],t);break;case\"source\":ae(\"error\",t);break;case\"img\":case\"image\":case\"link\":ae(\"error\",t),ae(\"load\",t);break;case\"details\":ae(\"toggle\",t);break;case\"input\":ae(\"invalid\",t),es(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case\"select\":ae(\"invalid\",t);break;case\"textarea\":ae(\"invalid\",t),ls(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!=\"string\"&&typeof l!=\"number\"&&typeof l!=\"bigint\"||t.textContent===\"\"+l||a.suppressHydrationWarning===!0||ur(t.textContent,l)?(a.popover!=null&&(ae(\"beforetoggle\",t),ae(\"toggle\",t)),a.onScroll!=null&&ae(\"scroll\",t),a.onScrollEnd!=null&&ae(\"scrollend\",t),a.onClick!=null&&(t.onclick=Zt),t=!0):t=!1,t||rl(e,!0)}function Qs(e){for(Ve=e.return;Ve;)switch(Ve.tag){case 5:case 31:case 13:xt=!1;return;case 27:case 3:xt=!0;return;default:Ve=Ve.return}}function ga(e){if(e!==Ve)return!1;if(!ce)return Qs(e),ce=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!==\"form\"&&l!==\"button\")||uf(e.type,e.memoizedProps)),l=!l),l&&ze&&rl(e),Qs(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ze=vr(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ze=vr(e)}else t===27?(t=ze,jl(e.type)?(e=df,df=null,ze=e):ze=t):ze=Ve?_t(e.stateNode.nextSibling):null;return!0}function Xl(){ze=Ve=null,ce=!1}function Qi(){var e=dl;return e!==null&&(it===null?it=e:it.push.apply(it,e),dl=null),e}function nn(e){dl===null?dl=[e]:dl.push(e)}var Zi=m(null),Ql=null,Jt=null;function hl(e,t,l){B(Zi,t._currentValue),t._currentValue=l}function kt(e){e._currentValue=Zi.current,O(Zi)}function Li(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function Ki(e,t,l,a){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var u=n.dependencies;if(u!==null){var i=n.child;u=u.firstContext;e:for(;u!==null;){var f=u;u=n;for(var h=0;h<t.length;h++)if(f.context===t[h]){u.lanes|=l,f=u.alternate,f!==null&&(f.lanes|=l),Li(u.return,l,e),a||(i=null);break e}u=f.next}}else if(n.tag===18){if(i=n.return,i===null)throw Error(o(341));i.lanes|=l,u=i.alternate,u!==null&&(u.lanes|=l),Li(i,l,e),i=null}else i=n.child;if(i!==null)i.return=n;else for(i=n;i!==null;){if(i===e){i=null;break}if(n=i.sibling,n!==null){n.return=i.return,i=n;break}i=i.return}n=i}}function ba(e,t,l,a){e=null;for(var n=t,u=!1;n!==null;){if(!u){if((n.flags&524288)!==0)u=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var i=n.alternate;if(i===null)throw Error(o(387));if(i=i.memoizedProps,i!==null){var f=n.type;rt(n.pendingProps.value,i.value)||(e!==null?e.push(f):e=[f])}}else if(n===oe.current){if(i=n.alternate,i===null)throw Error(o(387));i.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(Dn):e=[Dn])}n=n.return}e!==null&&Ki(t,e,l,a),t.flags|=262144}function fu(e){for(e=e.firstContext;e!==null;){if(!rt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zl(e){Ql=e,Jt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Je(e){return Zs(Ql,e)}function su(e,t){return Ql===null&&Zl(e),Zs(e,t)}function Zs(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Jt===null){if(e===null)throw Error(o(308));Jt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Jt=Jt.next=t;return l}var hv=typeof AbortController<\"u\"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},vv=c.unstable_scheduleCallback,mv=c.unstable_NormalPriority,He={$$typeof:_e,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Vi(){return{controller:new hv,data:new Map,refCount:0}}function un(e){e.refCount--,e.refCount===0&&vv(mv,function(){e.controller.abort()})}var cn=null,Ji=0,Sa=0,pa=null;function yv(e,t){if(cn===null){var l=cn=[];Ji=0,Sa=Wc(),pa={status:\"pending\",value:void 0,then:function(a){l.push(a)}}}return Ji++,t.then(Ls,Ls),t}function Ls(){if(--Ji===0&&cn!==null){pa!==null&&(pa.status=\"fulfilled\");var e=cn;cn=null,Sa=0,pa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function gv(e,t){var l=[],a={status:\"pending\",value:null,reason:null,then:function(n){l.push(n)}};return e.then(function(){a.status=\"fulfilled\",a.value=t;for(var n=0;n<l.length;n++)(0,l[n])(t)},function(n){for(a.status=\"rejected\",a.reason=n,n=0;n<l.length;n++)(0,l[n])(void 0)}),a}var Ks=x.S;x.S=function(e,t){Od=Le(),typeof t==\"object\"&&t!==null&&typeof t.then==\"function\"&&yv(e,t),Ks!==null&&Ks(e,t)};var Ll=m(null);function ki(){var e=Ll.current;return e!==null?e:Te.pooledCache}function ou(e,t){t===null?B(Ll,Ll.current):B(Ll,t.pool)}function Vs(){var e=ki();return e===null?null:{parent:He._currentValue,pool:e}}var Ta=Error(o(460)),$i=Error(o(474)),du=Error(o(542)),ru={then:function(){}};function Js(e){return e=e.status,e===\"fulfilled\"||e===\"rejected\"}function ks(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Zt,Zt),t=l),t.status){case\"fulfilled\":return t.value;case\"rejected\":throw e=t.reason,Ws(e),e;default:if(typeof t.status==\"string\")t.then(Zt,Zt);else{if(e=Te,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status=\"pending\",e.then(function(a){if(t.status===\"pending\"){var n=t;n.status=\"fulfilled\",n.value=a}},function(a){if(t.status===\"pending\"){var n=t;n.status=\"rejected\",n.reason=a}})}switch(t.status){case\"fulfilled\":return t.value;case\"rejected\":throw e=t.reason,Ws(e),e}throw Vl=t,Ta}}function Kl(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l==\"object\"&&typeof l.then==\"function\"?(Vl=l,Ta):l}}var Vl=null;function $s(){if(Vl===null)throw Error(o(459));var e=Vl;return Vl=null,e}function Ws(e){if(e===Ta||e===du)throw Error(o(483))}var Ea=null,fn=0;function hu(e){var t=fn;return fn+=1,Ea===null&&(Ea=[]),ks(Ea,e,t)}function sn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function vu(e,t){throw t.$$typeof===U?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e===\"[object Object]\"?\"object with keys {\"+Object.keys(t).join(\", \")+\"}\":e)))}function Fs(e){function t(y,v){if(e){var b=y.deletions;b===null?(y.deletions=[v],y.flags|=16):b.push(v)}}function l(y,v){if(!e)return null;for(;v!==null;)t(y,v),v=v.sibling;return null}function a(y){for(var v=new Map;y!==null;)y.key!==null?v.set(y.key,y):v.set(y.index,y),y=y.sibling;return v}function n(y,v){return y=Kt(y,v),y.index=0,y.sibling=null,y}function u(y,v,b){return y.index=b,e?(b=y.alternate,b!==null?(b=b.index,b<v?(y.flags|=67108866,v):b):(y.flags|=67108866,v)):(y.flags|=1048576,v)}function i(y){return e&&y.alternate===null&&(y.flags|=67108866),y}function f(y,v,b,_){return v===null||v.tag!==6?(v=Bi(b,y.mode,_),v.return=y,v):(v=n(v,b),v.return=y,v)}function h(y,v,b,_){var Z=b.type;return Z===q?A(y,v,b.props.children,_,b.key):v!==null&&(v.elementType===Z||typeof Z==\"object\"&&Z!==null&&Z.$$typeof===ve&&Kl(Z)===v.type)?(v=n(v,b.props),sn(v,b),v.return=y,v):(v=iu(b.type,b.key,b.props,null,y.mode,_),sn(v,b),v.return=y,v)}function S(y,v,b,_){return v===null||v.tag!==4||v.stateNode.containerInfo!==b.containerInfo||v.stateNode.implementation!==b.implementation?(v=Yi(b,y.mode,_),v.return=y,v):(v=n(v,b.children||[]),v.return=y,v)}function A(y,v,b,_,Z){return v===null||v.tag!==7?(v=Gl(b,y.mode,_,Z),v.return=y,v):(v=n(v,b),v.return=y,v)}function N(y,v,b){if(typeof v==\"string\"&&v!==\"\"||typeof v==\"number\"||typeof v==\"bigint\")return v=Bi(\"\"+v,y.mode,b),v.return=y,v;if(typeof v==\"object\"&&v!==null){switch(v.$$typeof){case J:return b=iu(v.type,v.key,v.props,null,y.mode,b),sn(b,v),b.return=y,b;case W:return v=Yi(v,y.mode,b),v.return=y,v;case ve:return v=Kl(v),N(y,v,b)}if(st(v)||Ge(v))return v=Gl(v,y.mode,b,null),v.return=y,v;if(typeof v.then==\"function\")return N(y,hu(v),b);if(v.$$typeof===_e)return N(y,su(y,v),b);vu(y,v)}return null}function p(y,v,b,_){var Z=v!==null?v.key:null;if(typeof b==\"string\"&&b!==\"\"||typeof b==\"number\"||typeof b==\"bigint\")return Z!==null?null:f(y,v,\"\"+b,_);if(typeof b==\"object\"&&b!==null){switch(b.$$typeof){case J:return b.key===Z?h(y,v,b,_):null;case W:return b.key===Z?S(y,v,b,_):null;case ve:return b=Kl(b),p(y,v,b,_)}if(st(b)||Ge(b))return Z!==null?null:A(y,v,b,_,null);if(typeof b.then==\"function\")return p(y,v,hu(b),_);if(b.$$typeof===_e)return p(y,v,su(y,b),_);vu(y,b)}return null}function T(y,v,b,_,Z){if(typeof _==\"string\"&&_!==\"\"||typeof _==\"number\"||typeof _==\"bigint\")return y=y.get(b)||null,f(v,y,\"\"+_,Z);if(typeof _==\"object\"&&_!==null){switch(_.$$typeof){case J:return y=y.get(_.key===null?b:_.key)||null,h(v,y,_,Z);case W:return y=y.get(_.key===null?b:_.key)||null,S(v,y,_,Z);case ve:return _=Kl(_),T(y,v,b,_,Z)}if(st(_)||Ge(_))return y=y.get(b)||null,A(v,y,_,Z,null);if(typeof _.then==\"function\")return T(y,v,b,hu(_),Z);if(_.$$typeof===_e)return T(y,v,b,su(v,_),Z);vu(v,_)}return null}function G(y,v,b,_){for(var Z=null,re=null,X=v,te=v=0,ue=null;X!==null&&te<b.length;te++){X.index>te?(ue=X,X=null):ue=X.sibling;var he=p(y,X,b[te],_);if(he===null){X===null&&(X=ue);break}e&&X&&he.alternate===null&&t(y,X),v=u(he,v,te),re===null?Z=he:re.sibling=he,re=he,X=ue}if(te===b.length)return l(y,X),ce&&Vt(y,te),Z;if(X===null){for(;te<b.length;te++)X=N(y,b[te],_),X!==null&&(v=u(X,v,te),re===null?Z=X:re.sibling=X,re=X);return ce&&Vt(y,te),Z}for(X=a(X);te<b.length;te++)ue=T(X,y,te,b[te],_),ue!==null&&(e&&ue.alternate!==null&&X.delete(ue.key===null?te:ue.key),v=u(ue,v,te),re===null?Z=ue:re.sibling=ue,re=ue);return e&&X.forEach(function(Ul){return t(y,Ul)}),ce&&Vt(y,te),Z}function K(y,v,b,_){if(b==null)throw Error(o(151));for(var Z=null,re=null,X=v,te=v=0,ue=null,he=b.next();X!==null&&!he.done;te++,he=b.next()){X.index>te?(ue=X,X=null):ue=X.sibling;var Ul=p(y,X,he.value,_);if(Ul===null){X===null&&(X=ue);break}e&&X&&Ul.alternate===null&&t(y,X),v=u(Ul,v,te),re===null?Z=Ul:re.sibling=Ul,re=Ul,X=ue}if(he.done)return l(y,X),ce&&Vt(y,te),Z;if(X===null){for(;!he.done;te++,he=b.next())he=N(y,he.value,_),he!==null&&(v=u(he,v,te),re===null?Z=he:re.sibling=he,re=he);return ce&&Vt(y,te),Z}for(X=a(X);!he.done;te++,he=b.next())he=T(X,y,te,he.value,_),he!==null&&(e&&he.alternate!==null&&X.delete(he.key===null?te:he.key),v=u(he,v,te),re===null?Z=he:re.sibling=he,re=he);return e&&X.forEach(function(Nm){return t(y,Nm)}),ce&&Vt(y,te),Z}function pe(y,v,b,_){if(typeof b==\"object\"&&b!==null&&b.type===q&&b.key===null&&(b=b.props.children),typeof b==\"object\"&&b!==null){switch(b.$$typeof){case J:e:{for(var Z=b.key;v!==null;){if(v.key===Z){if(Z=b.type,Z===q){if(v.tag===7){l(y,v.sibling),_=n(v,b.props.children),_.return=y,y=_;break e}}else if(v.elementType===Z||typeof Z==\"object\"&&Z!==null&&Z.$$typeof===ve&&Kl(Z)===v.type){l(y,v.sibling),_=n(v,b.props),sn(_,b),_.return=y,y=_;break e}l(y,v);break}else t(y,v);v=v.sibling}b.type===q?(_=Gl(b.props.children,y.mode,_,b.key),_.return=y,y=_):(_=iu(b.type,b.key,b.props,null,y.mode,_),sn(_,b),_.return=y,y=_)}return i(y);case W:e:{for(Z=b.key;v!==null;){if(v.key===Z)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){l(y,v.sibling),_=n(v,b.children||[]),_.return=y,y=_;break e}else{l(y,v);break}else t(y,v);v=v.sibling}_=Yi(b,y.mode,_),_.return=y,y=_}return i(y);case ve:return b=Kl(b),pe(y,v,b,_)}if(st(b))return G(y,v,b,_);if(Ge(b)){if(Z=Ge(b),typeof Z!=\"function\")throw Error(o(150));return b=Z.call(b),K(y,v,b,_)}if(typeof b.then==\"function\")return pe(y,v,hu(b),_);if(b.$$typeof===_e)return pe(y,v,su(y,b),_);vu(y,b)}return typeof b==\"string\"&&b!==\"\"||typeof b==\"number\"||typeof b==\"bigint\"?(b=\"\"+b,v!==null&&v.tag===6?(l(y,v.sibling),_=n(v,b),_.return=y,y=_):(l(y,v),_=Bi(b,y.mode,_),_.return=y,y=_),i(y)):l(y,v)}return function(y,v,b,_){try{fn=0;var Z=pe(y,v,b,_);return Ea=null,Z}catch(X){if(X===Ta||X===du)throw X;var re=ht(29,X,null,y.mode);return re.lanes=_,re.return=y,re}finally{}}}var Jl=Fs(!0),Is=Fs(!1),vl=!1;function Wi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Fi(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 ml(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function yl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(me&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=uu(e),Hs(e,null,l),t}return nu(e,a,t,l),uu(e)}function on(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Zf(e,l)}}function Ii(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var i={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?n=u=i:u=u.next=i,l=l.next}while(l!==null);u===null?n=u=t:u=u.next=t}else n=u=t;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Pi=!1;function dn(){if(Pi){var e=pa;if(e!==null)throw e}}function rn(e,t,l,a){Pi=!1;var n=e.updateQueue;vl=!1;var u=n.firstBaseUpdate,i=n.lastBaseUpdate,f=n.shared.pending;if(f!==null){n.shared.pending=null;var h=f,S=h.next;h.next=null,i===null?u=S:i.next=S,i=h;var A=e.alternate;A!==null&&(A=A.updateQueue,f=A.lastBaseUpdate,f!==i&&(f===null?A.firstBaseUpdate=S:f.next=S,A.lastBaseUpdate=h))}if(u!==null){var N=n.baseState;i=0,A=S=h=null,f=u;do{var p=f.lane&-536870913,T=p!==f.lane;if(T?(ne&p)===p:(a&p)===p){p!==0&&p===Sa&&(Pi=!0),A!==null&&(A=A.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});e:{var G=e,K=f;p=t;var pe=l;switch(K.tag){case 1:if(G=K.payload,typeof G==\"function\"){N=G.call(pe,N,p);break e}N=G;break e;case 3:G.flags=G.flags&-65537|128;case 0:if(G=K.payload,p=typeof G==\"function\"?G.call(pe,N,p):G,p==null)break e;N=E({},N,p);break e;case 2:vl=!0}}p=f.callback,p!==null&&(e.flags|=64,T&&(e.flags|=8192),T=n.callbacks,T===null?n.callbacks=[p]:T.push(p))}else T={lane:p,tag:f.tag,payload:f.payload,callback:f.callback,next:null},A===null?(S=A=T,h=N):A=A.next=T,i|=p;if(f=f.next,f===null){if(f=n.shared.pending,f===null)break;T=f,f=T.next,T.next=null,n.lastBaseUpdate=T,n.shared.pending=null}}while(!0);A===null&&(h=N),n.baseState=h,n.firstBaseUpdate=S,n.lastBaseUpdate=A,u===null&&(n.shared.lanes=0),Tl|=i,e.lanes=i,e.memoizedState=N}}function Ps(e,t){if(typeof e!=\"function\")throw Error(o(191,e));e.call(t)}function eo(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Ps(l[e],t)}var za=m(null),mu=m(0);function to(e,t){e=al,B(mu,e),B(za,t),al=e|t.baseLanes}function ec(){B(mu,al),B(za,za.current)}function tc(){al=mu.current,O(za),O(mu)}var vt=m(null),jt=null;function gl(e){var t=e.alternate;B(De,De.current&1),B(vt,e),jt===null&&(t===null||za.current!==null||t.memoizedState!==null)&&(jt=e)}function lc(e){B(De,De.current),B(vt,e),jt===null&&(jt=e)}function lo(e){e.tag===22?(B(De,De.current),B(vt,e),jt===null&&(jt=e)):bl()}function bl(){B(De,De.current),B(vt,vt.current)}function mt(e){O(vt),jt===e&&(jt=null),O(De)}var De=m(0);function yu(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||sf(l)||of(l)))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 $t=0,ee=null,be=null,qe=null,gu=!1,Aa=!1,kl=!1,bu=0,hn=0,xa=null,bv=0;function Me(){throw Error(o(321))}function ac(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!rt(e[l],t[l]))return!1;return!0}function nc(e,t,l,a,n,u){return $t=u,ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,x.H=e===null||e.memoizedState===null?Go:Sc,kl=!1,u=l(a,n),kl=!1,Aa&&(u=no(t,l,a,n)),ao(e),u}function ao(e){x.H=yn;var t=be!==null&&be.next!==null;if($t=0,qe=be=ee=null,gu=!1,hn=0,xa=null,t)throw Error(o(300));e===null||Be||(e=e.dependencies,e!==null&&fu(e)&&(Be=!0))}function no(e,t,l,a){ee=e;var n=0;do{if(Aa&&(xa=null),hn=0,Aa=!1,25<=n)throw Error(o(301));if(n+=1,qe=be=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}x.H=Xo,u=t(l,a)}while(Aa);return u}function Sv(){var e=x.H,t=e.useState()[0];return t=typeof t.then==\"function\"?vn(t):t,e=e.useState()[0],(be!==null?be.memoizedState:null)!==e&&(ee.flags|=1024),t}function uc(){var e=bu!==0;return bu=0,e}function ic(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function cc(e){if(gu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}gu=!1}$t=0,qe=be=ee=null,Aa=!1,hn=bu=0,xa=null}function Ie(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qe===null?ee.memoizedState=qe=e:qe=qe.next=e,qe}function Ce(){if(be===null){var e=ee.alternate;e=e!==null?e.memoizedState:null}else e=be.next;var t=qe===null?ee.memoizedState:qe.next;if(t!==null)qe=t,be=e;else{if(e===null)throw ee.alternate===null?Error(o(467)):Error(o(310));be=e,e={memoizedState:be.memoizedState,baseState:be.baseState,baseQueue:be.baseQueue,queue:be.queue,next:null},qe===null?ee.memoizedState=qe=e:qe=qe.next=e}return qe}function Su(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function vn(e){var t=hn;return hn+=1,xa===null&&(xa=[]),e=ks(xa,e,t),t=ee,(qe===null?t.memoizedState:qe.next)===null&&(t=t.alternate,x.H=t===null||t.memoizedState===null?Go:Sc),e}function pu(e){if(e!==null&&typeof e==\"object\"){if(typeof e.then==\"function\")return vn(e);if(e.$$typeof===_e)return Je(e)}throw Error(o(438,String(e)))}function fc(e){var t=null,l=ee.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=ee.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Su(),ee.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=Ht;return t.index++,l}function Wt(e,t){return typeof t==\"function\"?t(e):t}function Tu(e){var t=Ce();return sc(t,be,e)}function sc(e,t,l){var a=e.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=l;var n=e.baseQueue,u=a.pending;if(u!==null){if(n!==null){var i=n.next;n.next=u.next,u.next=i}t.baseQueue=n=u,a.pending=null}if(u=e.baseState,n===null)e.memoizedState=u;else{t=n.next;var f=i=null,h=null,S=t,A=!1;do{var N=S.lane&-536870913;if(N!==S.lane?(ne&N)===N:($t&N)===N){var p=S.revertLane;if(p===0)h!==null&&(h=h.next={lane:0,revertLane:0,gesture:null,action:S.action,hasEagerState:S.hasEagerState,eagerState:S.eagerState,next:null}),N===Sa&&(A=!0);else if(($t&p)===p){S=S.next,p===Sa&&(A=!0);continue}else N={lane:0,revertLane:S.revertLane,gesture:null,action:S.action,hasEagerState:S.hasEagerState,eagerState:S.eagerState,next:null},h===null?(f=h=N,i=u):h=h.next=N,ee.lanes|=p,Tl|=p;N=S.action,kl&&l(u,N),u=S.hasEagerState?S.eagerState:l(u,N)}else p={lane:N,revertLane:S.revertLane,gesture:S.gesture,action:S.action,hasEagerState:S.hasEagerState,eagerState:S.eagerState,next:null},h===null?(f=h=p,i=u):h=h.next=p,ee.lanes|=N,Tl|=N;S=S.next}while(S!==null&&S!==t);if(h===null?i=u:h.next=f,!rt(u,e.memoizedState)&&(Be=!0,A&&(l=pa,l!==null)))throw l;e.memoizedState=u,e.baseState=i,e.baseQueue=h,a.lastRenderedState=u}return n===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function oc(e){var t=Ce(),l=t.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=e;var a=l.dispatch,n=l.pending,u=t.memoizedState;if(n!==null){l.pending=null;var i=n=n.next;do u=e(u,i.action),i=i.next;while(i!==n);rt(u,t.memoizedState)||(Be=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),l.lastRenderedState=u}return[u,a]}function uo(e,t,l){var a=ee,n=Ce(),u=ce;if(u){if(l===void 0)throw Error(o(407));l=l()}else l=t();var i=!rt((be||n).memoizedState,l);if(i&&(n.memoizedState=l,Be=!0),n=n.queue,hc(fo.bind(null,a,n,e),[e]),n.getSnapshot!==t||i||qe!==null&&qe.memoizedState.tag&1){if(a.flags|=2048,ja(9,{destroy:void 0},co.bind(null,a,n,l,t),null),Te===null)throw Error(o(349));u||($t&127)!==0||io(a,t,l)}return l}function io(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=ee.updateQueue,t===null?(t=Su(),ee.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function co(e,t,l,a){t.value=l,t.getSnapshot=a,so(t)&&oo(e)}function fo(e,t,l){return l(function(){so(t)&&oo(e)})}function so(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!rt(e,l)}catch{return!0}}function oo(e){var t=wl(e,2);t!==null&&ct(t,e,2)}function dc(e){var t=Ie();if(typeof e==\"function\"){var l=e;if(e=l(),kl){cl(!0);try{l()}finally{cl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wt,lastRenderedState:e},t}function ro(e,t,l,a){return e.baseState=l,sc(e,be,typeof a==\"function\"?a:Wt)}function pv(e,t,l,a,n){if(Au(e))throw Error(o(485));if(e=t.action,e!==null){var u={payload:n,action:e,next:null,isTransition:!0,status:\"pending\",value:null,reason:null,listeners:[],then:function(i){u.listeners.push(i)}};x.T!==null?l(!0):u.isTransition=!1,a(u),l=t.pending,l===null?(u.next=t.pending=u,ho(t,u)):(u.next=l.next,t.pending=l.next=u)}}function ho(e,t){var l=t.action,a=t.payload,n=e.state;if(t.isTransition){var u=x.T,i={};x.T=i;try{var f=l(n,a),h=x.S;h!==null&&h(i,f),vo(e,t,f)}catch(S){rc(e,t,S)}finally{u!==null&&i.types!==null&&(u.types=i.types),x.T=u}}else try{u=l(n,a),vo(e,t,u)}catch(S){rc(e,t,S)}}function vo(e,t,l){l!==null&&typeof l==\"object\"&&typeof l.then==\"function\"?l.then(function(a){mo(e,t,a)},function(a){return rc(e,t,a)}):mo(e,t,l)}function mo(e,t,l){t.status=\"fulfilled\",t.value=l,yo(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,ho(e,l)))}function rc(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status=\"rejected\",t.reason=l,yo(t),t=t.next;while(t!==a)}e.action=null}function yo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function go(e,t){return t}function bo(e,t){if(ce){var l=Te.formState;if(l!==null){e:{var a=ee;if(ce){if(ze){t:{for(var n=ze,u=xt;n.nodeType!==8;){if(!u){n=null;break t}if(n=_t(n.nextSibling),n===null){n=null;break t}}u=n.data,n=u===\"F!\"||u===\"F\"?n:null}if(n){ze=_t(n.nextSibling),a=n.data===\"F!\";break e}}rl(a)}a=!1}a&&(t=l[0])}}return l=Ie(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:go,lastRenderedState:t},l.queue=a,l=Bo.bind(null,ee,a),a.dispatch=l,a=dc(!1),u=bc.bind(null,ee,!1,a.queue),a=Ie(),n={state:t,dispatch:null,action:e,pending:null},a.queue=n,l=pv.bind(null,ee,n,u,l),n.dispatch=l,a.memoizedState=e,[t,l,!1]}function So(e){var t=Ce();return po(t,be,e)}function po(e,t,l){if(t=sc(e,t,go)[0],e=Tu(Wt)[0],typeof t==\"object\"&&t!==null&&typeof t.then==\"function\")try{var a=vn(t)}catch(i){throw i===Ta?du:i}else a=t;t=Ce();var n=t.queue,u=n.dispatch;return l!==t.memoizedState&&(ee.flags|=2048,ja(9,{destroy:void 0},Tv.bind(null,n,l),null)),[a,u,e]}function Tv(e,t){e.action=t}function To(e){var t=Ce(),l=be;if(l!==null)return po(t,l,e);Ce(),t=t.memoizedState,l=Ce();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function ja(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=ee.updateQueue,t===null&&(t=Su(),ee.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function Eo(){return Ce().memoizedState}function Eu(e,t,l,a){var n=Ie();ee.flags|=e,n.memoizedState=ja(1|t,{destroy:void 0},l,a===void 0?null:a)}function zu(e,t,l,a){var n=Ce();a=a===void 0?null:a;var u=n.memoizedState.inst;be!==null&&a!==null&&ac(a,be.memoizedState.deps)?n.memoizedState=ja(t,u,l,a):(ee.flags|=e,n.memoizedState=ja(1|t,u,l,a))}function zo(e,t){Eu(8390656,8,e,t)}function hc(e,t){zu(2048,8,e,t)}function Ev(e){ee.flags|=4;var t=ee.updateQueue;if(t===null)t=Su(),ee.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Ao(e){var t=Ce().memoizedState;return Ev({ref:t,nextImpl:e}),function(){if((me&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function xo(e,t){return zu(4,2,e,t)}function jo(e,t){return zu(4,4,e,t)}function _o(e,t){if(typeof t==\"function\"){e=e();var l=t(e);return function(){typeof l==\"function\"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function No(e,t,l){l=l!=null?l.concat([e]):null,zu(4,4,_o.bind(null,t,e),l)}function vc(){}function Oo(e,t){var l=Ce();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&ac(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function Mo(e,t){var l=Ce();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&ac(t,a[1]))return a[0];if(a=e(),kl){cl(!0);try{e()}finally{cl(!1)}}return l.memoizedState=[a,t],a}function mc(e,t,l){return l===void 0||($t&1073741824)!==0&&(ne&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Ud(),ee.lanes|=e,Tl|=e,l)}function Uo(e,t,l,a){return rt(l,t)?l:za.current!==null?(e=mc(e,l,a),rt(e,t)||(Be=!0),e):($t&42)===0||($t&1073741824)!==0&&(ne&261930)===0?(Be=!0,e.memoizedState=l):(e=Ud(),ee.lanes|=e,Tl|=e,t)}function Do(e,t,l,a,n){var u=R.p;R.p=u!==0&&8>u?u:8;var i=x.T,f={};x.T=f,bc(e,!1,t,l);try{var h=n(),S=x.S;if(S!==null&&S(f,h),h!==null&&typeof h==\"object\"&&typeof h.then==\"function\"){var A=gv(h,a);mn(e,t,A,bt(e))}else mn(e,t,a,bt(e))}catch(N){mn(e,t,{then:function(){},status:\"rejected\",reason:N},bt())}finally{R.p=u,i!==null&&f.types!==null&&(i.types=f.types),x.T=i}}function zv(){}function yc(e,t,l,a){if(e.tag!==5)throw Error(o(476));var n=Co(e).queue;Do(e,n,t,V,l===null?zv:function(){return Ro(e),l(a)})}function Co(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wt,lastRenderedState:V},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wt,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ro(e){var t=Co(e);t.next===null&&(t=e.alternate.memoizedState),mn(e,t.next.queue,{},bt())}function gc(){return Je(Dn)}function Ho(){return Ce().memoizedState}function qo(){return Ce().memoizedState}function Av(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=bt();e=ml(l);var a=yl(t,e,l);a!==null&&(ct(a,t,l),on(a,t,l)),t={cache:Vi()},e.payload=t;return}t=t.return}}function xv(e,t,l){var a=bt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Au(e)?Yo(t,l):(l=Hi(e,t,l,a),l!==null&&(ct(l,e,a),wo(l,t,a)))}function Bo(e,t,l){var a=bt();mn(e,t,l,a)}function mn(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Au(e))Yo(t,n);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var i=t.lastRenderedState,f=u(i,l);if(n.hasEagerState=!0,n.eagerState=f,rt(f,i))return nu(e,t,n,0),Te===null&&au(),!1}catch{}finally{}if(l=Hi(e,t,n,a),l!==null)return ct(l,e,a),wo(l,t,a),!0}return!1}function bc(e,t,l,a){if(a={lane:2,revertLane:Wc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Au(e)){if(t)throw Error(o(479))}else t=Hi(e,l,a,2),t!==null&&ct(t,e,2)}function Au(e){var t=e.alternate;return e===ee||t!==null&&t===ee}function Yo(e,t){Aa=gu=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function wo(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Zf(e,l)}}var yn={readContext:Je,use:pu,useCallback:Me,useContext:Me,useEffect:Me,useImperativeHandle:Me,useLayoutEffect:Me,useInsertionEffect:Me,useMemo:Me,useReducer:Me,useRef:Me,useState:Me,useDebugValue:Me,useDeferredValue:Me,useTransition:Me,useSyncExternalStore:Me,useId:Me,useHostTransitionStatus:Me,useFormState:Me,useActionState:Me,useOptimistic:Me,useMemoCache:Me,useCacheRefresh:Me};yn.useEffectEvent=Me;var Go={readContext:Je,use:pu,useCallback:function(e,t){return Ie().memoizedState=[e,t===void 0?null:t],e},useContext:Je,useEffect:zo,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Eu(4194308,4,_o.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Eu(4194308,4,e,t)},useInsertionEffect:function(e,t){Eu(4,2,e,t)},useMemo:function(e,t){var l=Ie();t=t===void 0?null:t;var a=e();if(kl){cl(!0);try{e()}finally{cl(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=Ie();if(l!==void 0){var n=l(t);if(kl){cl(!0);try{l(t)}finally{cl(!1)}}}else n=t;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=xv.bind(null,ee,e),[a.memoizedState,e]},useRef:function(e){var t=Ie();return e={current:e},t.memoizedState=e},useState:function(e){e=dc(e);var t=e.queue,l=Bo.bind(null,ee,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:vc,useDeferredValue:function(e,t){var l=Ie();return mc(l,e,t)},useTransition:function(){var e=dc(!1);return e=Do.bind(null,ee,e.queue,!0,!1),Ie().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=ee,n=Ie();if(ce){if(l===void 0)throw Error(o(407));l=l()}else{if(l=t(),Te===null)throw Error(o(349));(ne&127)!==0||io(a,t,l)}n.memoizedState=l;var u={value:l,getSnapshot:t};return n.queue=u,zo(fo.bind(null,a,u,e),[e]),a.flags|=2048,ja(9,{destroy:void 0},co.bind(null,a,u,l,t),null),l},useId:function(){var e=Ie(),t=Te.identifierPrefix;if(ce){var l=Yt,a=Bt;l=(a&~(1<<32-dt(a)-1)).toString(32)+l,t=\"_\"+t+\"R_\"+l,l=bu++,0<l&&(t+=\"H\"+l.toString(32)),t+=\"_\"}else l=bv++,t=\"_\"+t+\"r_\"+l.toString(32)+\"_\";return e.memoizedState=t},useHostTransitionStatus:gc,useFormState:bo,useActionState:bo,useOptimistic:function(e){var t=Ie();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=bc.bind(null,ee,!0,l),l.dispatch=t,[e,t]},useMemoCache:fc,useCacheRefresh:function(){return Ie().memoizedState=Av.bind(null,ee)},useEffectEvent:function(e){var t=Ie(),l={impl:e};return t.memoizedState=l,function(){if((me&2)!==0)throw Error(o(440));return l.impl.apply(void 0,arguments)}}},Sc={readContext:Je,use:pu,useCallback:Oo,useContext:Je,useEffect:hc,useImperativeHandle:No,useInsertionEffect:xo,useLayoutEffect:jo,useMemo:Mo,useReducer:Tu,useRef:Eo,useState:function(){return Tu(Wt)},useDebugValue:vc,useDeferredValue:function(e,t){var l=Ce();return Uo(l,be.memoizedState,e,t)},useTransition:function(){var e=Tu(Wt)[0],t=Ce().memoizedState;return[typeof e==\"boolean\"?e:vn(e),t]},useSyncExternalStore:uo,useId:Ho,useHostTransitionStatus:gc,useFormState:So,useActionState:So,useOptimistic:function(e,t){var l=Ce();return ro(l,be,e,t)},useMemoCache:fc,useCacheRefresh:qo};Sc.useEffectEvent=Ao;var Xo={readContext:Je,use:pu,useCallback:Oo,useContext:Je,useEffect:hc,useImperativeHandle:No,useInsertionEffect:xo,useLayoutEffect:jo,useMemo:Mo,useReducer:oc,useRef:Eo,useState:function(){return oc(Wt)},useDebugValue:vc,useDeferredValue:function(e,t){var l=Ce();return be===null?mc(l,e,t):Uo(l,be.memoizedState,e,t)},useTransition:function(){var e=oc(Wt)[0],t=Ce().memoizedState;return[typeof e==\"boolean\"?e:vn(e),t]},useSyncExternalStore:uo,useId:Ho,useHostTransitionStatus:gc,useFormState:To,useActionState:To,useOptimistic:function(e,t){var l=Ce();return be!==null?ro(l,be,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:fc,useCacheRefresh:qo};Xo.useEffectEvent=Ao;function pc(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:E({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Tc={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=bt(),n=ml(a);n.payload=t,l!=null&&(n.callback=l),t=yl(e,n,a),t!==null&&(ct(t,e,a),on(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=bt(),n=ml(a);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=yl(e,n,a),t!==null&&(ct(t,e,a),on(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=bt(),a=ml(l);a.tag=2,t!=null&&(a.callback=t),t=yl(e,a,l),t!==null&&(ct(t,e,l),on(t,e,l))}};function Qo(e,t,l,a,n,u,i){return e=e.stateNode,typeof e.shouldComponentUpdate==\"function\"?e.shouldComponentUpdate(a,u,i):t.prototype&&t.prototype.isPureReactComponent?!tn(l,a)||!tn(n,u):!0}function Zo(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps==\"function\"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps==\"function\"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&Tc.enqueueReplaceState(t,t.state,null)}function $l(e,t){var l=t;if(\"ref\"in t){l={};for(var a in t)a!==\"ref\"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=E({},l));for(var n in e)l[n]===void 0&&(l[n]=e[n])}return l}function Lo(e){lu(e)}function Ko(e){console.error(e)}function Vo(e){lu(e)}function xu(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Jo(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function Ec(e,t,l){return l=ml(l),l.tag=3,l.payload={element:null},l.callback=function(){xu(e,t)},l}function ko(e){return e=ml(e),e.tag=3,e}function $o(e,t,l,a){var n=l.type.getDerivedStateFromError;if(typeof n==\"function\"){var u=a.value;e.payload=function(){return n(u)},e.callback=function(){Jo(t,l,a)}}var i=l.stateNode;i!==null&&typeof i.componentDidCatch==\"function\"&&(e.callback=function(){Jo(t,l,a),typeof n!=\"function\"&&(El===null?El=new Set([this]):El.add(this));var f=a.stack;this.componentDidCatch(a.value,{componentStack:f!==null?f:\"\"})})}function jv(e,t,l,a,n){if(l.flags|=32768,a!==null&&typeof a==\"object\"&&typeof a.then==\"function\"){if(t=l.alternate,t!==null&&ba(t,l,n,!0),l=vt.current,l!==null){switch(l.tag){case 31:case 13:return jt===null?Bu():l.alternate===null&&Ue===0&&(Ue=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===ru?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Jc(e,a,n)),!1;case 22:return l.flags|=65536,a===ru?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),Jc(e,a,n)),!1}throw Error(o(435,l.tag))}return Jc(e,a,n),Bu(),!1}if(ce)return t=vt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,a!==Xi&&(e=Error(o(422),{cause:a}),nn(Et(e,l)))):(a!==Xi&&(t=Error(o(423),{cause:a}),nn(Et(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=Et(a,l),n=Ec(e.stateNode,a,n),Ii(e,n),Ue!==4&&(Ue=2)),!1;var u=Error(o(520),{cause:a});if(u=Et(u,l),An===null?An=[u]:An.push(u),Ue!==4&&(Ue=2),t===null)return!0;a=Et(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=n&-n,l.lanes|=e,e=Ec(l.stateNode,a,e),Ii(l,e),!1;case 1:if(t=l.type,u=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError==\"function\"||u!==null&&typeof u.componentDidCatch==\"function\"&&(El===null||!El.has(u))))return l.flags|=65536,n&=-n,l.lanes|=n,n=ko(n),$o(n,e,l,a),Ii(l,n),!1}l=l.return}while(l!==null);return!1}var zc=Error(o(461)),Be=!1;function ke(e,t,l,a){t.child=e===null?Is(t,null,l,a):Jl(t,e.child,l,a)}function Wo(e,t,l,a,n){l=l.render;var u=t.ref;if(\"ref\"in a){var i={};for(var f in a)f!==\"ref\"&&(i[f]=a[f])}else i=a;return Zl(t),a=nc(e,t,l,i,u,n),f=uc(),e!==null&&!Be?(ic(e,t,n),Ft(e,t,n)):(ce&&f&&wi(t),t.flags|=1,ke(e,t,a,n),t.child)}function Fo(e,t,l,a,n){if(e===null){var u=l.type;return typeof u==\"function\"&&!qi(u)&&u.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=u,Io(e,t,u,a,n)):(e=iu(l.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Uc(e,n)){var i=u.memoizedProps;if(l=l.compare,l=l!==null?l:tn,l(i,a)&&e.ref===t.ref)return Ft(e,t,n)}return t.flags|=1,e=Kt(u,a),e.ref=t.ref,e.return=t,t.child=e}function Io(e,t,l,a,n){if(e!==null){var u=e.memoizedProps;if(tn(u,a)&&e.ref===t.ref)if(Be=!1,t.pendingProps=a=u,Uc(e,n))(e.flags&131072)!==0&&(Be=!0);else return t.lanes=e.lanes,Ft(e,t,n)}return Ac(e,t,l,a,n)}function Po(e,t,l,a){var n=a.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode===\"hidden\"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|l:l,e!==null){for(a=t.child=e.child,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~u}else a=0,t.child=null;return ed(e,t,u,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ou(t,u!==null?u.cachePool:null),u!==null?to(t,u):ec(),lo(t);else return a=t.lanes=536870912,ed(e,t,u!==null?u.baseLanes|l:l,l,a)}else u!==null?(ou(t,u.cachePool),to(t,u),bl(),t.memoizedState=null):(e!==null&&ou(t,null),ec(),bl());return ke(e,t,n,l),t.child}function gn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ed(e,t,l,a,n){var u=ki();return u=u===null?null:{parent:He._currentValue,pool:u},t.memoizedState={baseLanes:l,cachePool:u},e!==null&&ou(t,null),ec(),lo(t),e!==null&&ba(e,t,a,!0),t.childLanes=n,null}function ju(e,t){return t=Nu({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function td(e,t,l){return Jl(t,e.child,null,l),e=ju(t,t.pendingProps),e.flags|=2,mt(t),t.memoizedState=null,e}function _v(e,t,l){var a=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ce){if(a.mode===\"hidden\")return e=ju(t,a),t.lanes=536870912,gn(null,e);if(lc(t),(e=ze)?(e=hr(e,xt),e=e!==null&&e.data===\"&\"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ol!==null?{id:Bt,overflow:Yt}:null,retryLane:536870912,hydrationErrors:null},l=Bs(e),l.return=t,t.child=l,Ve=t,ze=null)):e=null,e===null)throw rl(t);return t.lanes=536870912,null}return ju(t,a)}var u=e.memoizedState;if(u!==null){var i=u.dehydrated;if(lc(t),n)if(t.flags&256)t.flags&=-257,t=td(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Be||ba(e,t,l,!1),n=(l&e.childLanes)!==0,Be||n){if(a=Te,a!==null&&(i=Lf(a,l),i!==0&&i!==u.retryLane))throw u.retryLane=i,wl(e,i),ct(a,e,i),zc;Bu(),t=td(e,t,l)}else e=u.treeContext,ze=_t(i.nextSibling),Ve=t,ce=!0,dl=null,xt=!1,e!==null&&Gs(t,e),t=ju(t,a),t.flags|=4096;return t}return e=Kt(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function _u(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!=\"function\"&&typeof l!=\"object\")throw Error(o(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Ac(e,t,l,a,n){return Zl(t),l=nc(e,t,l,a,void 0,n),a=uc(),e!==null&&!Be?(ic(e,t,n),Ft(e,t,n)):(ce&&a&&wi(t),t.flags|=1,ke(e,t,l,n),t.child)}function ld(e,t,l,a,n,u){return Zl(t),t.updateQueue=null,l=no(t,a,l,n),ao(e),a=uc(),e!==null&&!Be?(ic(e,t,u),Ft(e,t,u)):(ce&&a&&wi(t),t.flags|=1,ke(e,t,l,u),t.child)}function ad(e,t,l,a,n){if(Zl(t),t.stateNode===null){var u=va,i=l.contextType;typeof i==\"object\"&&i!==null&&(u=Je(i)),u=new l(a,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Tc,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=a,u.state=t.memoizedState,u.refs={},Wi(t),i=l.contextType,u.context=typeof i==\"object\"&&i!==null?Je(i):va,u.state=t.memoizedState,i=l.getDerivedStateFromProps,typeof i==\"function\"&&(pc(t,l,i,a),u.state=t.memoizedState),typeof l.getDerivedStateFromProps==\"function\"||typeof u.getSnapshotBeforeUpdate==\"function\"||typeof u.UNSAFE_componentWillMount!=\"function\"&&typeof u.componentWillMount!=\"function\"||(i=u.state,typeof u.componentWillMount==\"function\"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount==\"function\"&&u.UNSAFE_componentWillMount(),i!==u.state&&Tc.enqueueReplaceState(u,u.state,null),rn(t,a,u,n),dn(),u.state=t.memoizedState),typeof u.componentDidMount==\"function\"&&(t.flags|=4194308),a=!0}else if(e===null){u=t.stateNode;var f=t.memoizedProps,h=$l(l,f);u.props=h;var S=u.context,A=l.contextType;i=va,typeof A==\"object\"&&A!==null&&(i=Je(A));var N=l.getDerivedStateFromProps;A=typeof N==\"function\"||typeof u.getSnapshotBeforeUpdate==\"function\",f=t.pendingProps!==f,A||typeof u.UNSAFE_componentWillReceiveProps!=\"function\"&&typeof u.componentWillReceiveProps!=\"function\"||(f||S!==i)&&Zo(t,u,a,i),vl=!1;var p=t.memoizedState;u.state=p,rn(t,a,u,n),dn(),S=t.memoizedState,f||p!==S||vl?(typeof N==\"function\"&&(pc(t,l,N,a),S=t.memoizedState),(h=vl||Qo(t,l,h,a,p,S,i))?(A||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=a,t.memoizedState=S),u.props=a,u.state=S,u.context=i,a=h):(typeof u.componentDidMount==\"function\"&&(t.flags|=4194308),a=!1)}else{u=t.stateNode,Fi(e,t),i=t.memoizedProps,A=$l(l,i),u.props=A,N=t.pendingProps,p=u.context,S=l.contextType,h=va,typeof S==\"object\"&&S!==null&&(h=Je(S)),f=l.getDerivedStateFromProps,(S=typeof f==\"function\"||typeof u.getSnapshotBeforeUpdate==\"function\")||typeof u.UNSAFE_componentWillReceiveProps!=\"function\"&&typeof u.componentWillReceiveProps!=\"function\"||(i!==N||p!==h)&&Zo(t,u,a,h),vl=!1,p=t.memoizedState,u.state=p,rn(t,a,u,n),dn();var T=t.memoizedState;i!==N||p!==T||vl||e!==null&&e.dependencies!==null&&fu(e.dependencies)?(typeof f==\"function\"&&(pc(t,l,f,a),T=t.memoizedState),(A=vl||Qo(t,l,A,a,p,T,h)||e!==null&&e.dependencies!==null&&fu(e.dependencies))?(S||typeof u.UNSAFE_componentWillUpdate!=\"function\"&&typeof u.componentWillUpdate!=\"function\"||(typeof u.componentWillUpdate==\"function\"&&u.componentWillUpdate(a,T,h),typeof u.UNSAFE_componentWillUpdate==\"function\"&&u.UNSAFE_componentWillUpdate(a,T,h)),typeof u.componentDidUpdate==\"function\"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate==\"function\"&&(t.flags|=1024)):(typeof u.componentDidUpdate!=\"function\"||i===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!=\"function\"||i===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=T),u.props=a,u.state=T,u.context=h,a=A):(typeof u.componentDidUpdate!=\"function\"||i===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!=\"function\"||i===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),a=!1)}return u=a,_u(e,t),a=(t.flags&128)!==0,u||a?(u=t.stateNode,l=a&&typeof l.getDerivedStateFromError!=\"function\"?null:u.render(),t.flags|=1,e!==null&&a?(t.child=Jl(t,e.child,null,n),t.child=Jl(t,null,l,n)):ke(e,t,l,n),t.memoizedState=u.state,e=t.child):e=Ft(e,t,n),e}function nd(e,t,l,a){return Xl(),t.flags|=256,ke(e,t,l,a),t.child}var xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function jc(e){return{baseLanes:e,cachePool:Vs()}}function _c(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=gt),e}function ud(e,t,l){var a=t.pendingProps,n=!1,u=(t.flags&128)!==0,i;if((i=u)||(i=e!==null&&e.memoizedState===null?!1:(De.current&2)!==0),i&&(n=!0,t.flags&=-129),i=(t.flags&32)!==0,t.flags&=-33,e===null){if(ce){if(n?gl(t):bl(),(e=ze)?(e=hr(e,xt),e=e!==null&&e.data!==\"&\"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ol!==null?{id:Bt,overflow:Yt}:null,retryLane:536870912,hydrationErrors:null},l=Bs(e),l.return=t,t.child=l,Ve=t,ze=null)):e=null,e===null)throw rl(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var f=a.children;return a=a.fallback,n?(bl(),n=t.mode,f=Nu({mode:\"hidden\",children:f},n),a=Gl(a,n,l,null),f.return=t,a.return=t,f.sibling=a,t.child=f,a=t.child,a.memoizedState=jc(l),a.childLanes=_c(e,i,l),t.memoizedState=xc,gn(null,a)):(gl(t),Nc(t,f))}var h=e.memoizedState;if(h!==null&&(f=h.dehydrated,f!==null)){if(u)t.flags&256?(gl(t),t.flags&=-257,t=Oc(e,t,l)):t.memoizedState!==null?(bl(),t.child=e.child,t.flags|=128,t=null):(bl(),f=a.fallback,n=t.mode,a=Nu({mode:\"visible\",children:a.children},n),f=Gl(f,n,l,null),f.flags|=2,a.return=t,f.return=t,a.sibling=f,t.child=a,Jl(t,e.child,null,l),a=t.child,a.memoizedState=jc(l),a.childLanes=_c(e,i,l),t.memoizedState=xc,t=gn(null,a));else if(gl(t),of(f)){if(i=f.nextSibling&&f.nextSibling.dataset,i)var S=i.dgst;i=S,a=Error(o(419)),a.stack=\"\",a.digest=i,nn({value:a,source:null,stack:null}),t=Oc(e,t,l)}else if(Be||ba(e,t,l,!1),i=(l&e.childLanes)!==0,Be||i){if(i=Te,i!==null&&(a=Lf(i,l),a!==0&&a!==h.retryLane))throw h.retryLane=a,wl(e,a),ct(i,e,a),zc;sf(f)||Bu(),t=Oc(e,t,l)}else sf(f)?(t.flags|=192,t.child=e.child,t=null):(e=h.treeContext,ze=_t(f.nextSibling),Ve=t,ce=!0,dl=null,xt=!1,e!==null&&Gs(t,e),t=Nc(t,a.children),t.flags|=4096);return t}return n?(bl(),f=a.fallback,n=t.mode,h=e.child,S=h.sibling,a=Kt(h,{mode:\"hidden\",children:a.children}),a.subtreeFlags=h.subtreeFlags&65011712,S!==null?f=Kt(S,f):(f=Gl(f,n,l,null),f.flags|=2),f.return=t,a.return=t,a.sibling=f,t.child=a,gn(null,a),a=t.child,f=e.child.memoizedState,f===null?f=jc(l):(n=f.cachePool,n!==null?(h=He._currentValue,n=n.parent!==h?{parent:h,pool:h}:n):n=Vs(),f={baseLanes:f.baseLanes|l,cachePool:n}),a.memoizedState=f,a.childLanes=_c(e,i,l),t.memoizedState=xc,gn(e.child,a)):(gl(t),l=e.child,e=l.sibling,l=Kt(l,{mode:\"visible\",children:a.children}),l.return=t,l.sibling=null,e!==null&&(i=t.deletions,i===null?(t.deletions=[e],t.flags|=16):i.push(e)),t.child=l,t.memoizedState=null,l)}function Nc(e,t){return t=Nu({mode:\"visible\",children:t},e.mode),t.return=e,e.child=t}function Nu(e,t){return e=ht(22,e,null,t),e.lanes=0,e}function Oc(e,t,l){return Jl(t,e.child,null,l),e=Nc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function id(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Li(e.return,t,l)}function Mc(e,t,l,a,n,u){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:u}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=a,i.tail=l,i.tailMode=n,i.treeForkCount=u)}function cd(e,t,l){var a=t.pendingProps,n=a.revealOrder,u=a.tail;a=a.children;var i=De.current,f=(i&2)!==0;if(f?(i=i&1|2,t.flags|=128):i&=1,B(De,i),ke(e,t,a,l),a=ce?an:0,!f&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&id(e,l,t);else if(e.tag===19)id(e,l,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(n){case\"forwards\":for(l=t.child,n=null;l!==null;)e=l.alternate,e!==null&&yu(e)===null&&(n=l),l=l.sibling;l=n,l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null),Mc(t,!1,n,l,u,a);break;case\"backwards\":case\"unstable_legacy-backwards\":for(l=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&yu(e)===null){t.child=n;break}e=n.sibling,n.sibling=l,l=n,n=e}Mc(t,!0,l,null,u,a);break;case\"together\":Mc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Ft(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Tl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(ba(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,l=Kt(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Kt(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Uc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&fu(e)))}function Nv(e,t,l){switch(t.tag){case 3:Re(t,t.stateNode.containerInfo),hl(t,He,e.memoizedState.cache),Xl();break;case 27:case 5:Dl(t);break;case 4:Re(t,t.stateNode.containerInfo);break;case 10:hl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,lc(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(gl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?ud(e,t,l):(gl(t),e=Ft(e,t,l),e!==null?e.sibling:null);gl(t);break;case 19:var n=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(ba(e,t,l,!1),a=(l&t.childLanes)!==0),n){if(a)return cd(e,t,l);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),B(De,De.current),a)break;return null;case 22:return t.lanes=0,Po(e,t,l,t.pendingProps);case 24:hl(t,He,e.memoizedState.cache)}return Ft(e,t,l)}function fd(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Be=!0;else{if(!Uc(e,l)&&(t.flags&128)===0)return Be=!1,Nv(e,t,l);Be=(e.flags&131072)!==0}else Be=!1,ce&&(t.flags&1048576)!==0&&ws(t,an,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Kl(t.elementType),t.type=e,typeof e==\"function\")qi(e)?(a=$l(e,a),t.tag=1,t=ad(null,t,e,a,l)):(t.tag=0,t=Ac(null,t,e,a,l));else{if(e!=null){var n=e.$$typeof;if(n===Ne){t.tag=11,t=Wo(null,t,e,a,l);break e}else if(n===P){t.tag=14,t=Fo(null,t,e,a,l);break e}}throw t=Mt(e)||e,Error(o(306,t,\"\"))}}return t;case 0:return Ac(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,n=$l(a,t.pendingProps),ad(e,t,a,n,l);case 3:e:{if(Re(t,t.stateNode.containerInfo),e===null)throw Error(o(387));a=t.pendingProps;var u=t.memoizedState;n=u.element,Fi(e,t),rn(t,a,null,l);var i=t.memoizedState;if(a=i.cache,hl(t,He,a),a!==u.cache&&Ki(t,[He],l,!0),dn(),a=i.element,u.isDehydrated)if(u={element:a,isDehydrated:!1,cache:i.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=nd(e,t,a,l);break e}else if(a!==n){n=Et(Error(o(424)),t),nn(n),t=nd(e,t,a,l);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(ze=_t(e.firstChild),Ve=t,ce=!0,dl=null,xt=!0,l=Is(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Xl(),a===n){t=Ft(e,t,l);break e}ke(e,t,a,l)}t=t.child}return t;case 26:return _u(e,t),e===null?(l=Sr(t.type,null,t.pendingProps,null))?t.memoizedState=l:ce||(l=t.type,e=t.pendingProps,a=Lu(k.current).createElement(l),a[Ke]=t,a[tt]=e,$e(a,l,e),Qe(a),t.stateNode=a):t.memoizedState=Sr(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Dl(t),e===null&&ce&&(a=t.stateNode=yr(t.type,t.pendingProps,k.current),Ve=t,xt=!0,n=ze,jl(t.type)?(df=n,ze=_t(a.firstChild)):ze=n),ke(e,t,t.pendingProps.children,l),_u(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ce&&((n=a=ze)&&(a=nm(a,t.type,t.pendingProps,xt),a!==null?(t.stateNode=a,Ve=t,ze=_t(a.firstChild),xt=!1,n=!0):n=!1),n||rl(t)),Dl(t),n=t.type,u=t.pendingProps,i=e!==null?e.memoizedProps:null,a=u.children,uf(n,u)?a=null:i!==null&&uf(n,i)&&(t.flags|=32),t.memoizedState!==null&&(n=nc(e,t,Sv,null,null,l),Dn._currentValue=n),_u(e,t),ke(e,t,a,l),t.child;case 6:return e===null&&ce&&((e=l=ze)&&(l=um(l,t.pendingProps,xt),l!==null?(t.stateNode=l,Ve=t,ze=null,e=!0):e=!1),e||rl(t)),null;case 13:return ud(e,t,l);case 4:return Re(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Jl(t,null,a,l):ke(e,t,a,l),t.child;case 11:return Wo(e,t,t.type,t.pendingProps,l);case 7:return ke(e,t,t.pendingProps,l),t.child;case 8:return ke(e,t,t.pendingProps.children,l),t.child;case 12:return ke(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,hl(t,t.type,a.value),ke(e,t,a.children,l),t.child;case 9:return n=t.type._context,a=t.pendingProps.children,Zl(t),n=Je(n),a=a(n),t.flags|=1,ke(e,t,a,l),t.child;case 14:return Fo(e,t,t.type,t.pendingProps,l);case 15:return Io(e,t,t.type,t.pendingProps,l);case 19:return cd(e,t,l);case 31:return _v(e,t,l);case 22:return Po(e,t,l,t.pendingProps);case 24:return Zl(t),a=Je(He),e===null?(n=ki(),n===null&&(n=Te,u=Vi(),n.pooledCache=u,u.refCount++,u!==null&&(n.pooledCacheLanes|=l),n=u),t.memoizedState={parent:a,cache:n},Wi(t),hl(t,He,n)):((e.lanes&l)!==0&&(Fi(e,t),rn(t,null,null,l),dn()),n=e.memoizedState,u=t.memoizedState,n.parent!==a?(n={parent:a,cache:a},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),hl(t,He,a)):(a=u.cache,hl(t,He,a),a!==n.cache&&Ki(t,[He],l,!0))),ke(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function It(e){e.flags|=4}function Dc(e,t,l,a,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(Hd())e.flags|=8192;else throw Vl=ru,$i}else e.flags&=-16777217}function sd(e,t){if(t.type!==\"stylesheet\"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ar(t))if(Hd())e.flags|=8192;else throw Vl=ru,$i}function Ou(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Xf():536870912,e.lanes|=t,Ma|=t)}function bn(e,t){if(!ce)switch(e.tailMode){case\"hidden\":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case\"collapsed\":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Ae(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function Ov(e,t,l){var a=t.pendingProps;switch(Gi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ae(t),null;case 1:return Ae(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),kt(He),xe(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(ga(t)?It(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Qi())),Ae(t),null;case 26:var n=t.type,u=t.memoizedState;return e===null?(It(t),u!==null?(Ae(t),sd(t,u)):(Ae(t),Dc(t,n,null,a,l))):u?u!==e.memoizedState?(It(t),Ae(t),sd(t,u)):(Ae(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&It(t),Ae(t),Dc(t,n,e,a,l)),null;case 27:if(Cl(t),l=k.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&It(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return Ae(t),null}e=Y.current,ga(t)?Xs(t):(e=yr(n,a,l),t.stateNode=e,It(t))}return Ae(t),null;case 5:if(Cl(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&It(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return Ae(t),null}if(u=Y.current,ga(t))Xs(t);else{var i=Lu(k.current);switch(u){case 1:u=i.createElementNS(\"http://www.w3.org/2000/svg\",n);break;case 2:u=i.createElementNS(\"http://www.w3.org/1998/Math/MathML\",n);break;default:switch(n){case\"svg\":u=i.createElementNS(\"http://www.w3.org/2000/svg\",n);break;case\"math\":u=i.createElementNS(\"http://www.w3.org/1998/Math/MathML\",n);break;case\"script\":u=i.createElement(\"div\"),u.innerHTML=\"<script><\\\\/script>\",u=u.removeChild(u.firstChild);break;case\"select\":u=typeof a.is==\"string\"?i.createElement(\"select\",{is:a.is}):i.createElement(\"select\"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is==\"string\"?i.createElement(n,{is:a.is}):i.createElement(n)}}u[Ke]=t,u[tt]=a;e:for(i=t.child;i!==null;){if(i.tag===5||i.tag===6)u.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;i.sibling===null;){if(i.return===null||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=u;e:switch($e(u,n,a),n){case\"button\":case\"input\":case\"select\":case\"textarea\":a=!!a.autoFocus;break e;case\"img\":a=!0;break e;default:a=!1}a&&It(t)}}return Ae(t),Dc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&It(t);else{if(typeof a!=\"string\"&&t.stateNode===null)throw Error(o(166));if(e=k.current,ga(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=Ve,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[Ke]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||ur(e.nodeValue,l)),e||rl(t,!0)}else e=Lu(e).createTextNode(a),e[Ke]=t,t.stateNode=e}return Ae(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=ga(t),l!==null){if(e===null){if(!a)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Ke]=t}else Xl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ae(t),e=!1}else l=Qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(mt(t),t):(mt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return Ae(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=ga(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(o(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(o(317));n[Ke]=t}else Xl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ae(t),n=!1}else n=Qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(mt(t),t):(mt(t),null)}return mt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Ou(t,t.updateQueue),Ae(t),null);case 4:return xe(),e===null&&ef(t.stateNode.containerInfo),Ae(t),null;case 10:return kt(t.type),Ae(t),null;case 19:if(O(De),a=t.memoizedState,a===null)return Ae(t),null;if(n=(t.flags&128)!==0,u=a.rendering,u===null)if(n)bn(a,!1);else{if(Ue!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=yu(e),u!==null){for(t.flags|=128,bn(a,!1),e=u.updateQueue,t.updateQueue=e,Ou(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)qs(l,e),l=l.sibling;return B(De,De.current&1|2),ce&&Vt(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Le()>Ru&&(t.flags|=128,n=!0,bn(a,!1),t.lanes=4194304)}else{if(!n)if(e=yu(u),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,Ou(t,e),bn(a,!0),a.tail===null&&a.tailMode===\"hidden\"&&!u.alternate&&!ce)return Ae(t),null}else 2*Le()-a.renderingStartTime>Ru&&l!==536870912&&(t.flags|=128,n=!0,bn(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(e=a.last,e!==null?e.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Le(),e.sibling=null,l=De.current,B(De,n?l&1|2:l&1),ce&&Vt(t,a.treeForkCount),e):(Ae(t),null);case 22:case 23:return mt(t),tc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(Ae(t),t.subtreeFlags&6&&(t.flags|=8192)):Ae(t),l=t.updateQueue,l!==null&&Ou(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&O(Ll),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),kt(He),Ae(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Mv(e,t){switch(Gi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return kt(He),xe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Cl(t),null;case 31:if(t.memoizedState!==null){if(mt(t),t.alternate===null)throw Error(o(340));Xl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(mt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Xl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return O(De),null;case 4:return xe(),null;case 10:return kt(t.type),null;case 22:case 23:return mt(t),tc(),e!==null&&O(Ll),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return kt(He),null;case 25:return null;default:return null}}function od(e,t){switch(Gi(t),t.tag){case 3:kt(He),xe();break;case 26:case 27:case 5:Cl(t);break;case 4:xe();break;case 31:t.memoizedState!==null&&mt(t);break;case 13:mt(t);break;case 19:O(De);break;case 10:kt(t.type);break;case 22:case 23:mt(t),tc(),e!==null&&O(Ll);break;case 24:kt(He)}}function Sn(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&e)===e){a=void 0;var u=l.create,i=l.inst;a=u(),i.destroy=a}l=l.next}while(l!==n)}}catch(f){ge(t,t.return,f)}}function Sl(e,t,l){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&e)===e){var i=a.inst,f=i.destroy;if(f!==void 0){i.destroy=void 0,n=t;var h=l,S=f;try{S()}catch(A){ge(n,h,A)}}}a=a.next}while(a!==u)}}catch(A){ge(t,t.return,A)}}function dd(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{eo(t,l)}catch(a){ge(e,e.return,a)}}}function rd(e,t,l){l.props=$l(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){ge(e,t,a)}}function pn(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l==\"function\"?e.refCleanup=l(a):l.current=a}}catch(n){ge(e,t,n)}}function wt(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a==\"function\")try{a()}catch(n){ge(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l==\"function\")try{l(null)}catch(n){ge(e,t,n)}else l.current=null}function hd(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case\"button\":case\"input\":case\"select\":case\"textarea\":l.autoFocus&&a.focus();break e;case\"img\":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){ge(e,e.return,n)}}function Cc(e,t,l){try{var a=e.stateNode;Iv(a,e.type,l,t),a[tt]=t}catch(n){ge(e,e.return,n)}}function vd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&jl(e.type)||e.tag===4}function Rc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vd(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&&jl(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 Hc(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName===\"HTML\"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName===\"HTML\"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Zt));else if(a!==4&&(a===27&&jl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Hc(e,t,l),e=e.sibling;e!==null;)Hc(e,t,l),e=e.sibling}function Mu(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&jl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Mu(e,t,l),e=e.sibling;e!==null;)Mu(e,t,l),e=e.sibling}function md(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);$e(t,a,l),t[Ke]=e,t[tt]=l}catch(u){ge(e,e.return,u)}}var Pt=!1,Ye=!1,qc=!1,yd=typeof WeakSet==\"function\"?WeakSet:Set,Ze=null;function Uv(e,t){if(e=e.containerInfo,af=Fu,e=_s(e),Oi(e)){if(\"selectionStart\"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var n=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{l.nodeType,u.nodeType}catch{l=null;break e}var i=0,f=-1,h=-1,S=0,A=0,N=e,p=null;t:for(;;){for(var T;N!==l||n!==0&&N.nodeType!==3||(f=i+n),N!==u||a!==0&&N.nodeType!==3||(h=i+a),N.nodeType===3&&(i+=N.nodeValue.length),(T=N.firstChild)!==null;)p=N,N=T;for(;;){if(N===e)break t;if(p===l&&++S===n&&(f=i),p===u&&++A===a&&(h=i),(T=N.nextSibling)!==null)break;N=p,p=N.parentNode}N=T}l=f===-1||h===-1?null:{start:f,end:h}}else l=null}l=l||{start:0,end:0}}else l=null;for(nf={focusedElem:e,selectionRange:l},Fu=!1,Ze=t;Ze!==null;)if(t=Ze,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ze=e;else for(;Ze!==null;){switch(t=Ze,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(l=0;l<e.length;l++)n=e[l],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,l=t,n=u.memoizedProps,u=u.memoizedState,a=l.stateNode;try{var G=$l(l.type,n);e=a.getSnapshotBeforeUpdate(G,u),a.__reactInternalSnapshotBeforeUpdate=e}catch(K){ge(l,l.return,K)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)ff(e);else if(l===1)switch(e.nodeName){case\"HEAD\":case\"HTML\":case\"BODY\":ff(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(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Ze=e;break}Ze=t.return}}function gd(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:tl(e,l),a&4&&Sn(5,l);break;case 1:if(tl(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(i){ge(l,l.return,i)}else{var n=$l(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(i){ge(l,l.return,i)}}a&64&&dd(l),a&512&&pn(l,l.return);break;case 3:if(tl(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{eo(e,t)}catch(i){ge(l,l.return,i)}}break;case 27:t===null&&a&4&&md(l);case 26:case 5:tl(e,l),t===null&&a&4&&hd(l),a&512&&pn(l,l.return);break;case 12:tl(e,l);break;case 31:tl(e,l),a&4&&pd(e,l);break;case 13:tl(e,l),a&4&&Td(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Gv.bind(null,l),im(e,l))));break;case 22:if(a=l.memoizedState!==null||Pt,!a){t=t!==null&&t.memoizedState!==null||Ye,n=Pt;var u=Ye;Pt=a,(Ye=t)&&!u?ll(e,l,(l.subtreeFlags&8772)!==0):tl(e,l),Pt=n,Ye=u}break;case 30:break;default:tl(e,l)}}function bd(e){var t=e.alternate;t!==null&&(e.alternate=null,bd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ri(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 je=null,at=!1;function el(e,t,l){for(l=l.child;l!==null;)Sd(e,t,l),l=l.sibling}function Sd(e,t,l){if(ot&&typeof ot.onCommitFiberUnmount==\"function\")try{ot.onCommitFiberUnmount(Za,l)}catch{}switch(l.tag){case 26:Ye||wt(l,t),el(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ye||wt(l,t);var a=je,n=at;jl(l.type)&&(je=l.stateNode,at=!1),el(e,t,l),On(l.stateNode),je=a,at=n;break;case 5:Ye||wt(l,t);case 6:if(a=je,n=at,je=null,el(e,t,l),je=a,at=n,je!==null)if(at)try{(je.nodeType===9?je.body:je.nodeName===\"HTML\"?je.ownerDocument.body:je).removeChild(l.stateNode)}catch(u){ge(l,t,u)}else try{je.removeChild(l.stateNode)}catch(u){ge(l,t,u)}break;case 18:je!==null&&(at?(e=je,dr(e.nodeType===9?e.body:e.nodeName===\"HTML\"?e.ownerDocument.body:e,l.stateNode),Ya(e)):dr(je,l.stateNode));break;case 4:a=je,n=at,je=l.stateNode.containerInfo,at=!0,el(e,t,l),je=a,at=n;break;case 0:case 11:case 14:case 15:Sl(2,l,t),Ye||Sl(4,l,t),el(e,t,l);break;case 1:Ye||(wt(l,t),a=l.stateNode,typeof a.componentWillUnmount==\"function\"&&rd(l,t,a)),el(e,t,l);break;case 21:el(e,t,l);break;case 22:Ye=(a=Ye)||l.memoizedState!==null,el(e,t,l),Ye=a;break;default:el(e,t,l)}}function pd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ya(e)}catch(l){ge(t,t.return,l)}}}function Td(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ya(e)}catch(l){ge(t,t.return,l)}}function Dv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new yd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new yd),t;default:throw Error(o(435,e.tag))}}function Uu(e,t){var l=Dv(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var n=Xv.bind(null,e,a);a.then(n,n)}})}function nt(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a],u=e,i=t,f=i;e:for(;f!==null;){switch(f.tag){case 27:if(jl(f.type)){je=f.stateNode,at=!1;break e}break;case 5:je=f.stateNode,at=!1;break e;case 3:case 4:je=f.stateNode.containerInfo,at=!0;break e}f=f.return}if(je===null)throw Error(o(160));Sd(u,i,n),je=null,at=!1,u=n.alternate,u!==null&&(u.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ed(t,e),t=t.sibling}var Dt=null;function Ed(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:nt(t,e),ut(e),a&4&&(Sl(3,e,e.return),Sn(3,e),Sl(5,e,e.return));break;case 1:nt(t,e),ut(e),a&512&&(Ye||l===null||wt(l,l.return)),a&64&&Pt&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var n=Dt;if(nt(t,e),ut(e),a&512&&(Ye||l===null||wt(l,l.return)),a&4){var u=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,n=n.ownerDocument||n;t:switch(a){case\"title\":u=n.getElementsByTagName(\"title\")[0],(!u||u[Va]||u[Ke]||u.namespaceURI===\"http://www.w3.org/2000/svg\"||u.hasAttribute(\"itemprop\"))&&(u=n.createElement(a),n.head.insertBefore(u,n.querySelector(\"head > title\"))),$e(u,a,l),u[Ke]=e,Qe(u),a=u;break e;case\"link\":var i=Er(\"link\",\"href\",n).get(a+(l.href||\"\"));if(i){for(var f=0;f<i.length;f++)if(u=i[f],u.getAttribute(\"href\")===(l.href==null||l.href===\"\"?null:l.href)&&u.getAttribute(\"rel\")===(l.rel==null?null:l.rel)&&u.getAttribute(\"title\")===(l.title==null?null:l.title)&&u.getAttribute(\"crossorigin\")===(l.crossOrigin==null?null:l.crossOrigin)){i.splice(f,1);break t}}u=n.createElement(a),$e(u,a,l),n.head.appendChild(u);break;case\"meta\":if(i=Er(\"meta\",\"content\",n).get(a+(l.content||\"\"))){for(f=0;f<i.length;f++)if(u=i[f],u.getAttribute(\"content\")===(l.content==null?null:\"\"+l.content)&&u.getAttribute(\"name\")===(l.name==null?null:l.name)&&u.getAttribute(\"property\")===(l.property==null?null:l.property)&&u.getAttribute(\"http-equiv\")===(l.httpEquiv==null?null:l.httpEquiv)&&u.getAttribute(\"charset\")===(l.charSet==null?null:l.charSet)){i.splice(f,1);break t}}u=n.createElement(a),$e(u,a,l),n.head.appendChild(u);break;default:throw Error(o(468,a))}u[Ke]=e,Qe(u),a=u}e.stateNode=a}else zr(n,e.type,e.stateNode);else e.stateNode=Tr(n,a,e.memoizedProps);else u!==a?(u===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):u.count--,a===null?zr(n,e.type,e.stateNode):Tr(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Cc(e,e.memoizedProps,l.memoizedProps)}break;case 27:nt(t,e),ut(e),a&512&&(Ye||l===null||wt(l,l.return)),l!==null&&a&4&&Cc(e,e.memoizedProps,l.memoizedProps);break;case 5:if(nt(t,e),ut(e),a&512&&(Ye||l===null||wt(l,l.return)),e.flags&32){n=e.stateNode;try{ca(n,\"\")}catch(G){ge(e,e.return,G)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,Cc(e,n,l!==null?l.memoizedProps:n)),a&1024&&(qc=!0);break;case 6:if(nt(t,e),ut(e),a&4){if(e.stateNode===null)throw Error(o(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(G){ge(e,e.return,G)}}break;case 3:if(Ju=null,n=Dt,Dt=Ku(t.containerInfo),nt(t,e),Dt=n,ut(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{Ya(t.containerInfo)}catch(G){ge(e,e.return,G)}qc&&(qc=!1,zd(e));break;case 4:a=Dt,Dt=Ku(e.stateNode.containerInfo),nt(t,e),ut(e),Dt=a;break;case 12:nt(t,e),ut(e);break;case 31:nt(t,e),ut(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Uu(e,a)));break;case 13:nt(t,e),ut(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Cu=Le()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Uu(e,a)));break;case 22:n=e.memoizedState!==null;var h=l!==null&&l.memoizedState!==null,S=Pt,A=Ye;if(Pt=S||n,Ye=A||h,nt(t,e),Ye=A,Pt=S,ut(e),a&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(l===null||h||Pt||Ye||Wl(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){h=l=t;try{if(u=h.stateNode,n)i=u.style,typeof i.setProperty==\"function\"?i.setProperty(\"display\",\"none\",\"important\"):i.display=\"none\";else{f=h.stateNode;var N=h.memoizedProps.style,p=N!=null&&N.hasOwnProperty(\"display\")?N.display:null;f.style.display=p==null||typeof p==\"boolean\"?\"\":(\"\"+p).trim()}}catch(G){ge(h,h.return,G)}}}else if(t.tag===6){if(l===null){h=t;try{h.stateNode.nodeValue=n?\"\":h.memoizedProps}catch(G){ge(h,h.return,G)}}}else if(t.tag===18){if(l===null){h=t;try{var T=h.stateNode;n?rr(T,!0):rr(h.stateNode,!1)}catch(G){ge(h,h.return,G)}}}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;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Uu(e,l))));break;case 19:nt(t,e),ut(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Uu(e,a)));break;case 30:break;case 21:break;default:nt(t,e),ut(e)}}function ut(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(vd(a)){l=a;break}a=a.return}if(l==null)throw Error(o(160));switch(l.tag){case 27:var n=l.stateNode,u=Rc(e);Mu(e,u,n);break;case 5:var i=l.stateNode;l.flags&32&&(ca(i,\"\"),l.flags&=-33);var f=Rc(e);Mu(e,f,i);break;case 3:case 4:var h=l.stateNode.containerInfo,S=Rc(e);Hc(e,S,h);break;default:throw Error(o(161))}}catch(A){ge(e,e.return,A)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function zd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;zd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function tl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)gd(e,t.alternate,t),t=t.sibling}function Wl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Sl(4,t,t.return),Wl(t);break;case 1:wt(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount==\"function\"&&rd(t,t.return,l),Wl(t);break;case 27:On(t.stateNode);case 26:case 5:wt(t,t.return),Wl(t);break;case 22:t.memoizedState===null&&Wl(t);break;case 30:Wl(t);break;default:Wl(t)}e=e.sibling}}function ll(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,n=e,u=t,i=u.flags;switch(u.tag){case 0:case 11:case 15:ll(n,u,l),Sn(4,u);break;case 1:if(ll(n,u,l),a=u,n=a.stateNode,typeof n.componentDidMount==\"function\")try{n.componentDidMount()}catch(S){ge(a,a.return,S)}if(a=u,n=a.updateQueue,n!==null){var f=a.stateNode;try{var h=n.shared.hiddenCallbacks;if(h!==null)for(n.shared.hiddenCallbacks=null,n=0;n<h.length;n++)Ps(h[n],f)}catch(S){ge(a,a.return,S)}}l&&i&64&&dd(u),pn(u,u.return);break;case 27:md(u);case 26:case 5:ll(n,u,l),l&&a===null&&i&4&&hd(u),pn(u,u.return);break;case 12:ll(n,u,l);break;case 31:ll(n,u,l),l&&i&4&&pd(n,u);break;case 13:ll(n,u,l),l&&i&4&&Td(n,u);break;case 22:u.memoizedState===null&&ll(n,u,l),pn(u,u.return);break;case 30:break;default:ll(n,u,l)}t=t.sibling}}function Bc(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&un(l))}function Yc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&un(e))}function Ct(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ad(e,t,l,a),t=t.sibling}function Ad(e,t,l,a){var n=t.flags;switch(t.tag){case 0:case 11:case 15:Ct(e,t,l,a),n&2048&&Sn(9,t);break;case 1:Ct(e,t,l,a);break;case 3:Ct(e,t,l,a),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&un(e)));break;case 12:if(n&2048){Ct(e,t,l,a),e=t.stateNode;try{var u=t.memoizedProps,i=u.id,f=u.onPostCommit;typeof f==\"function\"&&f(i,t.alternate===null?\"mount\":\"update\",e.passiveEffectDuration,-0)}catch(h){ge(t,t.return,h)}}else Ct(e,t,l,a);break;case 31:Ct(e,t,l,a);break;case 13:Ct(e,t,l,a);break;case 23:break;case 22:u=t.stateNode,i=t.alternate,t.memoizedState!==null?u._visibility&2?Ct(e,t,l,a):Tn(e,t):u._visibility&2?Ct(e,t,l,a):(u._visibility|=2,_a(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),n&2048&&Bc(i,t);break;case 24:Ct(e,t,l,a),n&2048&&Yc(t.alternate,t);break;default:Ct(e,t,l,a)}}function _a(e,t,l,a,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,i=t,f=l,h=a,S=i.flags;switch(i.tag){case 0:case 11:case 15:_a(u,i,f,h,n),Sn(8,i);break;case 23:break;case 22:var A=i.stateNode;i.memoizedState!==null?A._visibility&2?_a(u,i,f,h,n):Tn(u,i):(A._visibility|=2,_a(u,i,f,h,n)),n&&S&2048&&Bc(i.alternate,i);break;case 24:_a(u,i,f,h,n),n&&S&2048&&Yc(i.alternate,i);break;default:_a(u,i,f,h,n)}t=t.sibling}}function Tn(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,n=a.flags;switch(a.tag){case 22:Tn(l,a),n&2048&&Bc(a.alternate,a);break;case 24:Tn(l,a),n&2048&&Yc(a.alternate,a);break;default:Tn(l,a)}t=t.sibling}}var En=8192;function Na(e,t,l){if(e.subtreeFlags&En)for(e=e.child;e!==null;)xd(e,t,l),e=e.sibling}function xd(e,t,l){switch(e.tag){case 26:Na(e,t,l),e.flags&En&&e.memoizedState!==null&&bm(l,Dt,e.memoizedState,e.memoizedProps);break;case 5:Na(e,t,l);break;case 3:case 4:var a=Dt;Dt=Ku(e.stateNode.containerInfo),Na(e,t,l),Dt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=En,En=16777216,Na(e,t,l),En=a):Na(e,t,l));break;default:Na(e,t,l)}}function jd(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 zn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Ze=a,Nd(a,e)}jd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)_d(e),e=e.sibling}function _d(e){switch(e.tag){case 0:case 11:case 15:zn(e),e.flags&2048&&Sl(9,e,e.return);break;case 3:zn(e);break;case 12:zn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Du(e)):zn(e);break;default:zn(e)}}function Du(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Ze=a,Nd(a,e)}jd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Sl(8,t,t.return),Du(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Du(t));break;default:Du(t)}e=e.sibling}}function Nd(e,t){for(;Ze!==null;){var l=Ze;switch(l.tag){case 0:case 11:case 15:Sl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:un(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,Ze=a;else e:for(l=e;Ze!==null;){a=Ze;var n=a.sibling,u=a.return;if(bd(a),a===l){Ze=null;break e}if(n!==null){n.return=u,Ze=n;break e}Ze=u}}}var Cv={getCacheForType:function(e){var t=Je(He),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Je(He).controller.signal}},Rv=typeof WeakMap==\"function\"?WeakMap:Map,me=0,Te=null,le=null,ne=0,ye=0,yt=null,pl=!1,Oa=!1,wc=!1,al=0,Ue=0,Tl=0,Fl=0,Gc=0,gt=0,Ma=0,An=null,it=null,Xc=!1,Cu=0,Od=0,Ru=1/0,Hu=null,El=null,Xe=0,zl=null,Ua=null,nl=0,Qc=0,Zc=null,Md=null,xn=0,Lc=null;function bt(){return(me&2)!==0&&ne!==0?ne&-ne:x.T!==null?Wc():Kf()}function Ud(){if(gt===0)if((ne&536870912)===0||ce){var e=Zn;Zn<<=1,(Zn&3932160)===0&&(Zn=262144),gt=e}else gt=536870912;return e=vt.current,e!==null&&(e.flags|=32),gt}function ct(e,t,l){(e===Te&&(ye===2||ye===9)||e.cancelPendingCommit!==null)&&(Da(e,0),Al(e,ne,gt,!1)),Ka(e,l),((me&2)===0||e!==Te)&&(e===Te&&((me&2)===0&&(Fl|=l),Ue===4&&Al(e,ne,gt,!1)),Gt(e))}function Dd(e,t,l){if((me&6)!==0)throw Error(o(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||La(e,t),n=a?Bv(e,t):Vc(e,t,!0),u=a;do{if(n===0){Oa&&!a&&Al(e,t,0,!1);break}else{if(l=e.current.alternate,u&&!Hv(l)){n=Vc(e,t,!1),u=!1;continue}if(n===2){if(u=t,e.errorRecoveryDisabledLanes&u)var i=0;else i=e.pendingLanes&-536870913,i=i!==0?i:i&536870912?536870912:0;if(i!==0){t=i;e:{var f=e;n=An;var h=f.current.memoizedState.isDehydrated;if(h&&(Da(f,i).flags|=256),i=Vc(f,i,!1),i!==2){if(wc&&!h){f.errorRecoveryDisabledLanes|=u,Fl|=u,n=4;break e}u=it,it=n,u!==null&&(it===null?it=u:it.push.apply(it,u))}n=i}if(u=!1,n!==2)continue}}if(n===1){Da(e,0),Al(e,t,0,!0);break}e:{switch(a=e,u=n,u){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Al(a,t,gt,!pl);break e;case 2:it=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(n=Cu+300-Le(),10<n)){if(Al(a,t,gt,!pl),Kn(a,0,!0)!==0)break e;nl=t,a.timeoutHandle=sr(Cd.bind(null,a,l,it,Hu,Xc,t,gt,Fl,Ma,pl,u,\"Throttled\",-0,0),n);break e}Cd(a,l,it,Hu,Xc,t,gt,Fl,Ma,pl,u,null,-0,0)}}break}while(!0);Gt(e)}function Cd(e,t,l,a,n,u,i,f,h,S,A,N,p,T){if(e.timeoutHandle=-1,N=t.subtreeFlags,N&8192||(N&16785408)===16785408){N={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zt},xd(t,u,N);var G=(u&62914560)===u?Cu-Le():(u&4194048)===u?Od-Le():0;if(G=Sm(N,G),G!==null){nl=u,e.cancelPendingCommit=G(Xd.bind(null,e,t,u,l,a,n,i,f,h,A,N,null,p,T)),Al(e,u,i,!S);return}}Xd(e,t,u,l,a,n,i,f,h)}function Hv(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var n=l[a],u=n.getSnapshot;n=n.value;try{if(!rt(u(),n))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 Al(e,t,l,a){t&=~Gc,t&=~Fl,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var n=t;0<n;){var u=31-dt(n),i=1<<u;a[u]=-1,n&=~i}l!==0&&Qf(e,l,t)}function qu(){return(me&6)===0?(jn(0),!1):!0}function Kc(){if(le!==null){if(ye===0)var e=le.return;else e=le,Jt=Ql=null,cc(e),Ea=null,fn=0,e=le;for(;e!==null;)od(e.alternate,e),e=e.return;le=null}}function Da(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,tm(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),nl=0,Kc(),Te=e,le=l=Kt(e.current,null),ne=t,ye=0,yt=null,pl=!1,Oa=La(e,t),wc=!1,Ma=gt=Gc=Fl=Tl=Ue=0,it=An=null,Xc=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var n=31-dt(a),u=1<<n;t|=e[n],a&=~u}return al=t,au(),l}function Rd(e,t){ee=null,x.H=yn,t===Ta||t===du?(t=$s(),ye=3):t===$i?(t=$s(),ye=4):ye=t===zc?8:t!==null&&typeof t==\"object\"&&typeof t.then==\"function\"?6:1,yt=t,le===null&&(Ue=1,xu(e,Et(t,e.current)))}function Hd(){var e=vt.current;return e===null?!0:(ne&4194048)===ne?jt===null:(ne&62914560)===ne||(ne&536870912)!==0?e===jt:!1}function qd(){var e=x.H;return x.H=yn,e===null?yn:e}function Bd(){var e=x.A;return x.A=Cv,e}function Bu(){Ue=4,pl||(ne&4194048)!==ne&&vt.current!==null||(Oa=!0),(Tl&134217727)===0&&(Fl&134217727)===0||Te===null||Al(Te,ne,gt,!1)}function Vc(e,t,l){var a=me;me|=2;var n=qd(),u=Bd();(Te!==e||ne!==t)&&(Hu=null,Da(e,t)),t=!1;var i=Ue;e:do try{if(ye!==0&&le!==null){var f=le,h=yt;switch(ye){case 8:Kc(),i=6;break e;case 3:case 2:case 9:case 6:vt.current===null&&(t=!0);var S=ye;if(ye=0,yt=null,Ca(e,f,h,S),l&&Oa){i=0;break e}break;default:S=ye,ye=0,yt=null,Ca(e,f,h,S)}}qv(),i=Ue;break}catch(A){Rd(e,A)}while(!0);return t&&e.shellSuspendCounter++,Jt=Ql=null,me=a,x.H=n,x.A=u,le===null&&(Te=null,ne=0,au()),i}function qv(){for(;le!==null;)Yd(le)}function Bv(e,t){var l=me;me|=2;var a=qd(),n=Bd();Te!==e||ne!==t?(Hu=null,Ru=Le()+500,Da(e,t)):Oa=La(e,t);e:do try{if(ye!==0&&le!==null){t=le;var u=yt;t:switch(ye){case 1:ye=0,yt=null,Ca(e,t,u,1);break;case 2:case 9:if(Js(u)){ye=0,yt=null,wd(t);break}t=function(){ye!==2&&ye!==9||Te!==e||(ye=7),Gt(e)},u.then(t,t);break e;case 3:ye=7;break e;case 4:ye=5;break e;case 7:Js(u)?(ye=0,yt=null,wd(t)):(ye=0,yt=null,Ca(e,t,u,7));break;case 5:var i=null;switch(le.tag){case 26:i=le.memoizedState;case 5:case 27:var f=le;if(i?Ar(i):f.stateNode.complete){ye=0,yt=null;var h=f.sibling;if(h!==null)le=h;else{var S=f.return;S!==null?(le=S,Yu(S)):le=null}break t}}ye=0,yt=null,Ca(e,t,u,5);break;case 6:ye=0,yt=null,Ca(e,t,u,6);break;case 8:Kc(),Ue=6;break e;default:throw Error(o(462))}}Yv();break}catch(A){Rd(e,A)}while(!0);return Jt=Ql=null,x.H=a,x.A=n,me=l,le!==null?0:(Te=null,ne=0,au(),Ue)}function Yv(){for(;le!==null&&!Oe();)Yd(le)}function Yd(e){var t=fd(e.alternate,e,al);e.memoizedProps=e.pendingProps,t===null?Yu(e):le=t}function wd(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=ld(l,t,t.pendingProps,t.type,void 0,ne);break;case 11:t=ld(l,t,t.pendingProps,t.type.render,t.ref,ne);break;case 5:cc(t);default:od(l,t),t=le=qs(t,al),t=fd(l,t,al)}e.memoizedProps=e.pendingProps,t===null?Yu(e):le=t}function Ca(e,t,l,a){Jt=Ql=null,cc(t),Ea=null,fn=0;var n=t.return;try{if(jv(e,n,t,l,ne)){Ue=1,xu(e,Et(l,e.current)),le=null;return}}catch(u){if(n!==null)throw le=n,u;Ue=1,xu(e,Et(l,e.current)),le=null;return}t.flags&32768?(ce||a===1?e=!0:Oa||(ne&536870912)!==0?e=!1:(pl=e=!0,(a===2||a===9||a===3||a===6)&&(a=vt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Gd(t,e)):Yu(t)}function Yu(e){var t=e;do{if((t.flags&32768)!==0){Gd(t,pl);return}e=t.return;var l=Ov(t.alternate,t,al);if(l!==null){le=l;return}if(t=t.sibling,t!==null){le=t;return}le=t=e}while(t!==null);Ue===0&&(Ue=5)}function Gd(e,t){do{var l=Mv(e.alternate,e);if(l!==null){l.flags&=32767,le=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){le=e;return}le=e=l}while(e!==null);Ue=6,le=null}function Xd(e,t,l,a,n,u,i,f,h){e.cancelPendingCommit=null;do wu();while(Xe!==0);if((me&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(u=t.lanes|t.childLanes,u|=Ri,gh(e,l,u,i,f,h),e===Te&&(le=Te=null,ne=0),Ua=t,zl=e,nl=l,Qc=u,Zc=n,Md=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Qv(Xn,function(){return Vd(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=x.T,x.T=null,n=R.p,R.p=2,i=me,me|=4;try{Uv(e,t,l)}finally{me=i,R.p=n,x.T=a}}Xe=1,Qd(),Zd(),Ld()}}function Qd(){if(Xe===1){Xe=0;var e=zl,t=Ua,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=x.T,x.T=null;var a=R.p;R.p=2;var n=me;me|=4;try{Ed(t,e);var u=nf,i=_s(e.containerInfo),f=u.focusedElem,h=u.selectionRange;if(i!==f&&f&&f.ownerDocument&&js(f.ownerDocument.documentElement,f)){if(h!==null&&Oi(f)){var S=h.start,A=h.end;if(A===void 0&&(A=S),\"selectionStart\"in f)f.selectionStart=S,f.selectionEnd=Math.min(A,f.value.length);else{var N=f.ownerDocument||document,p=N&&N.defaultView||window;if(p.getSelection){var T=p.getSelection(),G=f.textContent.length,K=Math.min(h.start,G),pe=h.end===void 0?K:Math.min(h.end,G);!T.extend&&K>pe&&(i=pe,pe=K,K=i);var y=xs(f,K),v=xs(f,pe);if(y&&v&&(T.rangeCount!==1||T.anchorNode!==y.node||T.anchorOffset!==y.offset||T.focusNode!==v.node||T.focusOffset!==v.offset)){var b=N.createRange();b.setStart(y.node,y.offset),T.removeAllRanges(),K>pe?(T.addRange(b),T.extend(v.node,v.offset)):(b.setEnd(v.node,v.offset),T.addRange(b))}}}}for(N=[],T=f;T=T.parentNode;)T.nodeType===1&&N.push({element:T,left:T.scrollLeft,top:T.scrollTop});for(typeof f.focus==\"function\"&&f.focus(),f=0;f<N.length;f++){var _=N[f];_.element.scrollLeft=_.left,_.element.scrollTop=_.top}}Fu=!!af,nf=af=null}finally{me=n,R.p=a,x.T=l}}e.current=t,Xe=2}}function Zd(){if(Xe===2){Xe=0;var e=zl,t=Ua,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=x.T,x.T=null;var a=R.p;R.p=2;var n=me;me|=4;try{gd(e,t.alternate,t)}finally{me=n,R.p=a,x.T=l}}Xe=3}}function Ld(){if(Xe===4||Xe===3){Xe=0,We();var e=zl,t=Ua,l=nl,a=Md;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Xe=5:(Xe=0,Ua=zl=null,Kd(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(El=null),oi(l),t=t.stateNode,ot&&typeof ot.onCommitFiberRoot==\"function\")try{ot.onCommitFiberRoot(Za,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=x.T,n=R.p,R.p=2,x.T=null;try{for(var u=e.onRecoverableError,i=0;i<a.length;i++){var f=a[i];u(f.value,{componentStack:f.stack})}}finally{x.T=t,R.p=n}}(nl&3)!==0&&wu(),Gt(e),n=e.pendingLanes,(l&261930)!==0&&(n&42)!==0?e===Lc?xn++:(xn=0,Lc=e):xn=0,jn(0)}}function Kd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,un(t)))}function wu(){return Qd(),Zd(),Ld(),Vd()}function Vd(){if(Xe!==5)return!1;var e=zl,t=Qc;Qc=0;var l=oi(nl),a=x.T,n=R.p;try{R.p=32>l?32:l,x.T=null,l=Zc,Zc=null;var u=zl,i=nl;if(Xe=0,Ua=zl=null,nl=0,(me&6)!==0)throw Error(o(331));var f=me;if(me|=4,_d(u.current),Ad(u,u.current,i,l),me=f,jn(0,!1),ot&&typeof ot.onPostCommitFiberRoot==\"function\")try{ot.onPostCommitFiberRoot(Za,u)}catch{}return!0}finally{R.p=n,x.T=a,Kd(e,t)}}function Jd(e,t,l){t=Et(l,t),t=Ec(e.stateNode,t,2),e=yl(e,t,2),e!==null&&(Ka(e,2),Gt(e))}function ge(e,t,l){if(e.tag===3)Jd(e,e,l);else for(;t!==null;){if(t.tag===3){Jd(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError==\"function\"||typeof a.componentDidCatch==\"function\"&&(El===null||!El.has(a))){e=Et(l,e),l=ko(2),a=yl(t,l,2),a!==null&&($o(l,a,t,e),Ka(a,2),Gt(a));break}}t=t.return}}function Jc(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Rv;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(l)||(wc=!0,n.add(l),e=wv.bind(null,e,t,l),t.then(e,e))}function wv(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Te===e&&(ne&l)===l&&(Ue===4||Ue===3&&(ne&62914560)===ne&&300>Le()-Cu?(me&2)===0&&Da(e,0):Gc|=l,Ma===ne&&(Ma=0)),Gt(e)}function kd(e,t){t===0&&(t=Xf()),e=wl(e,t),e!==null&&(Ka(e,t),Gt(e))}function Gv(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),kd(e,l)}function Xv(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(t),kd(e,l)}function Qv(e,t){return Q(e,t)}var Gu=null,Ra=null,kc=!1,Xu=!1,$c=!1,xl=0;function Gt(e){e!==Ra&&e.next===null&&(Ra===null?Gu=Ra=e:Ra=Ra.next=e),Xu=!0,kc||(kc=!0,Lv())}function jn(e,t){if(!$c&&Xu){$c=!0;do for(var l=!1,a=Gu;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var u=0;else{var i=a.suspendedLanes,f=a.pingedLanes;u=(1<<31-dt(42|e)+1)-1,u&=n&~(i&~f),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,Id(a,u))}else u=ne,u=Kn(a,a===Te?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||La(a,u)||(l=!0,Id(a,u));a=a.next}while(l);$c=!1}}function Zv(){$d()}function $d(){Xu=kc=!1;var e=0;xl!==0&&em()&&(e=xl);for(var t=Le(),l=null,a=Gu;a!==null;){var n=a.next,u=Wd(a,t);u===0?(a.next=null,l===null?Gu=n:l.next=n,n===null&&(Ra=l)):(l=a,(e!==0||(u&3)!==0)&&(Xu=!0)),a=n}Xe!==0&&Xe!==5||jn(e),xl!==0&&(xl=0)}function Wd(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var i=31-dt(u),f=1<<i,h=n[i];h===-1?((f&l)===0||(f&a)!==0)&&(n[i]=yh(f,t)):h<=t&&(e.expiredLanes|=f),u&=~f}if(t=Te,l=ne,l=Kn(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(ye===2||ye===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&ie(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||La(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&ie(a),oi(l)){case 2:case 8:l=wf;break;case 32:l=Xn;break;case 268435456:l=Gf;break;default:l=Xn}return a=Fd.bind(null,e),l=Q(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&ie(a),e.callbackPriority=2,e.callbackNode=null,2}function Fd(e,t){if(Xe!==0&&Xe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(wu()&&e.callbackNode!==l)return null;var a=ne;return a=Kn(e,e===Te?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Dd(e,a,t),Wd(e,Le()),e.callbackNode!=null&&e.callbackNode===l?Fd.bind(null,e):null)}function Id(e,t){if(wu())return null;Dd(e,t,!0)}function Lv(){lm(function(){(me&6)!==0?Q(Yf,Zv):$d()})}function Wc(){if(xl===0){var e=Sa;e===0&&(e=Qn,Qn<<=1,(Qn&261888)===0&&(Qn=256)),xl=e}return xl}function Pd(e){return e==null||typeof e==\"symbol\"||typeof e==\"boolean\"?null:typeof e==\"function\"?e:$n(\"\"+e)}function er(e,t){var l=t.ownerDocument.createElement(\"input\");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute(\"form\",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function Kv(e,t,l,a,n){if(t===\"submit\"&&l&&l.stateNode===n){var u=Pd((n[tt]||null).action),i=a.submitter;i&&(t=(t=i[tt]||null)?Pd(t.formAction):i.getAttribute(\"formAction\"),t!==null&&(u=t,i=null));var f=new Pn(\"action\",\"action\",null,a,n);e.push({event:f,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(xl!==0){var h=i?er(n,i):new FormData(n);yc(l,{pending:!0,data:h,method:n.method,action:u},null,h)}}else typeof u==\"function\"&&(f.preventDefault(),h=i?er(n,i):new FormData(n),yc(l,{pending:!0,data:h,method:n.method,action:u},u,h))},currentTarget:n}]})}}for(var Fc=0;Fc<Ci.length;Fc++){var Ic=Ci[Fc],Vv=Ic.toLowerCase(),Jv=Ic[0].toUpperCase()+Ic.slice(1);Ut(Vv,\"on\"+Jv)}Ut(Ms,\"onAnimationEnd\"),Ut(Us,\"onAnimationIteration\"),Ut(Ds,\"onAnimationStart\"),Ut(\"dblclick\",\"onDoubleClick\"),Ut(\"focusin\",\"onFocus\"),Ut(\"focusout\",\"onBlur\"),Ut(sv,\"onTransitionRun\"),Ut(ov,\"onTransitionStart\"),Ut(dv,\"onTransitionCancel\"),Ut(Cs,\"onTransitionEnd\"),ua(\"onMouseEnter\",[\"mouseout\",\"mouseover\"]),ua(\"onMouseLeave\",[\"mouseout\",\"mouseover\"]),ua(\"onPointerEnter\",[\"pointerout\",\"pointerover\"]),ua(\"onPointerLeave\",[\"pointerout\",\"pointerover\"]),Hl(\"onChange\",\"change click focusin focusout input keydown keyup selectionchange\".split(\" \")),Hl(\"onSelect\",\"focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange\".split(\" \")),Hl(\"onBeforeInput\",[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]),Hl(\"onCompositionEnd\",\"compositionend focusout keydown keypress keyup mousedown\".split(\" \")),Hl(\"onCompositionStart\",\"compositionstart focusout keydown keypress keyup mousedown\".split(\" \")),Hl(\"onCompositionUpdate\",\"compositionupdate focusout keydown keypress keyup mousedown\".split(\" \"));var _n=\"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(\" \"),kv=new Set(\"beforetoggle cancel close invalid load scroll scrollend toggle\".split(\" \").concat(_n));function tr(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],n=a.event;a=a.listeners;e:{var u=void 0;if(t)for(var i=a.length-1;0<=i;i--){var f=a[i],h=f.instance,S=f.currentTarget;if(f=f.listener,h!==u&&n.isPropagationStopped())break e;u=f,n.currentTarget=S;try{u(n)}catch(A){lu(A)}n.currentTarget=null,u=h}else for(i=0;i<a.length;i++){if(f=a[i],h=f.instance,S=f.currentTarget,f=f.listener,h!==u&&n.isPropagationStopped())break e;u=f,n.currentTarget=S;try{u(n)}catch(A){lu(A)}n.currentTarget=null,u=h}}}}function ae(e,t){var l=t[di];l===void 0&&(l=t[di]=new Set);var a=e+\"__bubble\";l.has(a)||(lr(t,e,2,!1),l.add(a))}function Pc(e,t,l){var a=0;t&&(a|=4),lr(l,e,a,t)}var Qu=\"_reactListening\"+Math.random().toString(36).slice(2);function ef(e){if(!e[Qu]){e[Qu]=!0,kf.forEach(function(l){l!==\"selectionchange\"&&(kv.has(l)||Pc(l,!1,e),Pc(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Qu]||(t[Qu]=!0,Pc(\"selectionchange\",!1,t))}}function lr(e,t,l,a){switch(Ur(t)){case 2:var n=Em;break;case 8:n=zm;break;default:n=yf}l=n.bind(null,t,l,e),n=void 0,!pi||t!==\"touchstart\"&&t!==\"touchmove\"&&t!==\"wheel\"||(n=!0),a?n!==void 0?e.addEventListener(t,l,{capture:!0,passive:n}):e.addEventListener(t,l,!0):n!==void 0?e.addEventListener(t,l,{passive:n}):e.addEventListener(t,l,!1)}function tf(e,t,l,a,n){var u=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var i=a.tag;if(i===3||i===4){var f=a.stateNode.containerInfo;if(f===n)break;if(i===4)for(i=a.return;i!==null;){var h=i.tag;if((h===3||h===4)&&i.stateNode.containerInfo===n)return;i=i.return}for(;f!==null;){if(i=la(f),i===null)return;if(h=i.tag,h===5||h===6||h===26||h===27){a=u=i;continue e}f=f.parentNode}}a=a.return}is(function(){var S=u,A=bi(l),N=[];e:{var p=Rs.get(e);if(p!==void 0){var T=Pn,G=e;switch(e){case\"keypress\":if(Fn(l)===0)break e;case\"keydown\":case\"keyup\":T=Xh;break;case\"focusin\":G=\"focus\",T=Ai;break;case\"focusout\":G=\"blur\",T=Ai;break;case\"beforeblur\":case\"afterblur\":T=Ai;break;case\"click\":if(l.button===2)break e;case\"auxclick\":case\"dblclick\":case\"mousedown\":case\"mousemove\":case\"mouseup\":case\"mouseout\":case\"mouseover\":case\"contextmenu\":T=ss;break;case\"drag\":case\"dragend\":case\"dragenter\":case\"dragexit\":case\"dragleave\":case\"dragover\":case\"dragstart\":case\"drop\":T=Oh;break;case\"touchcancel\":case\"touchend\":case\"touchmove\":case\"touchstart\":T=Lh;break;case Ms:case Us:case Ds:T=Dh;break;case Cs:T=Vh;break;case\"scroll\":case\"scrollend\":T=_h;break;case\"wheel\":T=kh;break;case\"copy\":case\"cut\":case\"paste\":T=Rh;break;case\"gotpointercapture\":case\"lostpointercapture\":case\"pointercancel\":case\"pointerdown\":case\"pointermove\":case\"pointerout\":case\"pointerover\":case\"pointerup\":T=ds;break;case\"toggle\":case\"beforetoggle\":T=Wh}var K=(t&4)!==0,pe=!K&&(e===\"scroll\"||e===\"scrollend\"),y=K?p!==null?p+\"Capture\":null:p;K=[];for(var v=S,b;v!==null;){var _=v;if(b=_.stateNode,_=_.tag,_!==5&&_!==26&&_!==27||b===null||y===null||(_=ka(v,y),_!=null&&K.push(Nn(v,_,b))),pe)break;v=v.return}0<K.length&&(p=new T(p,G,null,l,A),N.push({event:p,listeners:K}))}}if((t&7)===0){e:{if(p=e===\"mouseover\"||e===\"pointerover\",T=e===\"mouseout\"||e===\"pointerout\",p&&l!==gi&&(G=l.relatedTarget||l.fromElement)&&(la(G)||G[ta]))break e;if((T||p)&&(p=A.window===A?A:(p=A.ownerDocument)?p.defaultView||p.parentWindow:window,T?(G=l.relatedTarget||l.toElement,T=S,G=G?la(G):null,G!==null&&(pe=z(G),K=G.tag,G!==pe||K!==5&&K!==27&&K!==6)&&(G=null)):(T=null,G=S),T!==G)){if(K=ss,_=\"onMouseLeave\",y=\"onMouseEnter\",v=\"mouse\",(e===\"pointerout\"||e===\"pointerover\")&&(K=ds,_=\"onPointerLeave\",y=\"onPointerEnter\",v=\"pointer\"),pe=T==null?p:Ja(T),b=G==null?p:Ja(G),p=new K(_,v+\"leave\",T,l,A),p.target=pe,p.relatedTarget=b,_=null,la(A)===S&&(K=new K(y,v+\"enter\",G,l,A),K.target=b,K.relatedTarget=pe,_=K),pe=_,T&&G)t:{for(K=$v,y=T,v=G,b=0,_=y;_;_=K(_))b++;_=0;for(var Z=v;Z;Z=K(Z))_++;for(;0<b-_;)y=K(y),b--;for(;0<_-b;)v=K(v),_--;for(;b--;){if(y===v||v!==null&&y===v.alternate){K=y;break t}y=K(y),v=K(v)}K=null}else K=null;T!==null&&ar(N,p,T,K,!1),G!==null&&pe!==null&&ar(N,pe,G,K,!0)}}e:{if(p=S?Ja(S):window,T=p.nodeName&&p.nodeName.toLowerCase(),T===\"select\"||T===\"input\"&&p.type===\"file\")var re=Ss;else if(gs(p))if(ps)re=iv;else{re=nv;var X=av}else T=p.nodeName,!T||T.toLowerCase()!==\"input\"||p.type!==\"checkbox\"&&p.type!==\"radio\"?S&&yi(S.elementType)&&(re=Ss):re=uv;if(re&&(re=re(e,S))){bs(N,re,l,A);break e}X&&X(e,p,S),e===\"focusout\"&&S&&p.type===\"number\"&&S.memoizedProps.value!=null&&mi(p,\"number\",p.value)}switch(X=S?Ja(S):window,e){case\"focusin\":(gs(X)||X.contentEditable===\"true\")&&(da=X,Mi=S,ln=null);break;case\"focusout\":ln=Mi=da=null;break;case\"mousedown\":Ui=!0;break;case\"contextmenu\":case\"mouseup\":case\"dragend\":Ui=!1,Ns(N,l,A);break;case\"selectionchange\":if(fv)break;case\"keydown\":case\"keyup\":Ns(N,l,A)}var te;if(ji)e:{switch(e){case\"compositionstart\":var ue=\"onCompositionStart\";break e;case\"compositionend\":ue=\"onCompositionEnd\";break e;case\"compositionupdate\":ue=\"onCompositionUpdate\";break e}ue=void 0}else oa?ms(e,l)&&(ue=\"onCompositionEnd\"):e===\"keydown\"&&l.keyCode===229&&(ue=\"onCompositionStart\");ue&&(rs&&l.locale!==\"ko\"&&(oa||ue!==\"onCompositionStart\"?ue===\"onCompositionEnd\"&&oa&&(te=cs()):(sl=A,Ti=\"value\"in sl?sl.value:sl.textContent,oa=!0)),X=Zu(S,ue),0<X.length&&(ue=new os(ue,e,null,l,A),N.push({event:ue,listeners:X}),te?ue.data=te:(te=ys(l),te!==null&&(ue.data=te)))),(te=Ih?Ph(e,l):ev(e,l))&&(ue=Zu(S,\"onBeforeInput\"),0<ue.length&&(X=new os(\"onBeforeInput\",\"beforeinput\",null,l,A),N.push({event:X,listeners:ue}),X.data=te)),Kv(N,e,S,l,A)}tr(N,t)})}function Nn(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Zu(e,t){for(var l=t+\"Capture\",a=[];e!==null;){var n=e,u=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||u===null||(n=ka(e,l),n!=null&&a.unshift(Nn(e,n,u)),n=ka(e,t),n!=null&&a.push(Nn(e,n,u))),e.tag===3)return a;e=e.return}return[]}function $v(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ar(e,t,l,a,n){for(var u=t._reactName,i=[];l!==null&&l!==a;){var f=l,h=f.alternate,S=f.stateNode;if(f=f.tag,h!==null&&h===a)break;f!==5&&f!==26&&f!==27||S===null||(h=S,n?(S=ka(l,u),S!=null&&i.unshift(Nn(l,S,h))):n||(S=ka(l,u),S!=null&&i.push(Nn(l,S,h)))),l=l.return}i.length!==0&&e.push({event:t,listeners:i})}var Wv=/\\\\r\\\\n?/g,Fv=/\\\\u0000|\\\\uFFFD/g;function nr(e){return(typeof e==\"string\"?e:\"\"+e).replace(Wv,\\`\n\\`).replace(Fv,\"\")}function ur(e,t){return t=nr(t),nr(e)===t}function Se(e,t,l,a,n,u){switch(l){case\"children\":typeof a==\"string\"?t===\"body\"||t===\"textarea\"&&a===\"\"||ca(e,a):(typeof a==\"number\"||typeof a==\"bigint\")&&t!==\"body\"&&ca(e,\"\"+a);break;case\"className\":Jn(e,\"class\",a);break;case\"tabIndex\":Jn(e,\"tabindex\",a);break;case\"dir\":case\"role\":case\"viewBox\":case\"width\":case\"height\":Jn(e,l,a);break;case\"style\":ns(e,a,u);break;case\"data\":if(t!==\"object\"){Jn(e,\"data\",a);break}case\"src\":case\"href\":if(a===\"\"&&(t!==\"a\"||l!==\"href\")){e.removeAttribute(l);break}if(a==null||typeof a==\"function\"||typeof a==\"symbol\"||typeof a==\"boolean\"){e.removeAttribute(l);break}a=$n(\"\"+a),e.setAttribute(l,a);break;case\"action\":case\"formAction\":if(typeof a==\"function\"){e.setAttribute(l,\"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\"&&(l===\"formAction\"?(t!==\"input\"&&Se(e,t,\"name\",n.name,n,null),Se(e,t,\"formEncType\",n.formEncType,n,null),Se(e,t,\"formMethod\",n.formMethod,n,null),Se(e,t,\"formTarget\",n.formTarget,n,null)):(Se(e,t,\"encType\",n.encType,n,null),Se(e,t,\"method\",n.method,n,null),Se(e,t,\"target\",n.target,n,null)));if(a==null||typeof a==\"symbol\"||typeof a==\"boolean\"){e.removeAttribute(l);break}a=$n(\"\"+a),e.setAttribute(l,a);break;case\"onClick\":a!=null&&(e.onclick=Zt);break;case\"onScroll\":a!=null&&ae(\"scroll\",e);break;case\"onScrollEnd\":a!=null&&ae(\"scrollend\",e);break;case\"dangerouslySetInnerHTML\":if(a!=null){if(typeof a!=\"object\"||!(\"__html\"in a))throw Error(o(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(o(60));e.innerHTML=l}}break;case\"multiple\":e.multiple=a&&typeof a!=\"function\"&&typeof a!=\"symbol\";break;case\"muted\":e.muted=a&&typeof a!=\"function\"&&typeof a!=\"symbol\";break;case\"suppressContentEditableWarning\":case\"suppressHydrationWarning\":case\"defaultValue\":case\"defaultChecked\":case\"innerHTML\":case\"ref\":break;case\"autoFocus\":break;case\"xlinkHref\":if(a==null||typeof a==\"function\"||typeof a==\"boolean\"||typeof a==\"symbol\"){e.removeAttribute(\"xlink:href\");break}l=$n(\"\"+a),e.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",l);break;case\"contentEditable\":case\"spellCheck\":case\"draggable\":case\"value\":case\"autoReverse\":case\"externalResourcesRequired\":case\"focusable\":case\"preserveAlpha\":a!=null&&typeof a!=\"function\"&&typeof a!=\"symbol\"?e.setAttribute(l,\"\"+a):e.removeAttribute(l);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\":a&&typeof a!=\"function\"&&typeof a!=\"symbol\"?e.setAttribute(l,\"\"):e.removeAttribute(l);break;case\"capture\":case\"download\":a===!0?e.setAttribute(l,\"\"):a!==!1&&a!=null&&typeof a!=\"function\"&&typeof a!=\"symbol\"?e.setAttribute(l,a):e.removeAttribute(l);break;case\"cols\":case\"rows\":case\"size\":case\"span\":a!=null&&typeof a!=\"function\"&&typeof a!=\"symbol\"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case\"rowSpan\":case\"start\":a==null||typeof a==\"function\"||typeof a==\"symbol\"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case\"popover\":ae(\"beforetoggle\",e),ae(\"toggle\",e),Vn(e,\"popover\",a);break;case\"xlinkActuate\":Qt(e,\"http://www.w3.org/1999/xlink\",\"xlink:actuate\",a);break;case\"xlinkArcrole\":Qt(e,\"http://www.w3.org/1999/xlink\",\"xlink:arcrole\",a);break;case\"xlinkRole\":Qt(e,\"http://www.w3.org/1999/xlink\",\"xlink:role\",a);break;case\"xlinkShow\":Qt(e,\"http://www.w3.org/1999/xlink\",\"xlink:show\",a);break;case\"xlinkTitle\":Qt(e,\"http://www.w3.org/1999/xlink\",\"xlink:title\",a);break;case\"xlinkType\":Qt(e,\"http://www.w3.org/1999/xlink\",\"xlink:type\",a);break;case\"xmlBase\":Qt(e,\"http://www.w3.org/XML/1998/namespace\",\"xml:base\",a);break;case\"xmlLang\":Qt(e,\"http://www.w3.org/XML/1998/namespace\",\"xml:lang\",a);break;case\"xmlSpace\":Qt(e,\"http://www.w3.org/XML/1998/namespace\",\"xml:space\",a);break;case\"is\":Vn(e,\"is\",a);break;case\"innerText\":case\"textContent\":break;default:(!(2<l.length)||l[0]!==\"o\"&&l[0]!==\"O\"||l[1]!==\"n\"&&l[1]!==\"N\")&&(l=xh.get(l)||l,Vn(e,l,a))}}function lf(e,t,l,a,n,u){switch(l){case\"style\":ns(e,a,u);break;case\"dangerouslySetInnerHTML\":if(a!=null){if(typeof a!=\"object\"||!(\"__html\"in a))throw Error(o(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(o(60));e.innerHTML=l}}break;case\"children\":typeof a==\"string\"?ca(e,a):(typeof a==\"number\"||typeof a==\"bigint\")&&ca(e,\"\"+a);break;case\"onScroll\":a!=null&&ae(\"scroll\",e);break;case\"onScrollEnd\":a!=null&&ae(\"scrollend\",e);break;case\"onClick\":a!=null&&(e.onclick=Zt);break;case\"suppressContentEditableWarning\":case\"suppressHydrationWarning\":case\"innerHTML\":case\"ref\":break;case\"innerText\":case\"textContent\":break;default:if(!$f.hasOwnProperty(l))e:{if(l[0]===\"o\"&&l[1]===\"n\"&&(n=l.endsWith(\"Capture\"),t=l.slice(2,n?l.length-7:void 0),u=e[tt]||null,u=u!=null?u[l]:null,typeof u==\"function\"&&e.removeEventListener(t,u,n),typeof a==\"function\")){typeof u!=\"function\"&&u!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,n);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,\"\"):Vn(e,l,a)}}}function $e(e,t,l){switch(t){case\"div\":case\"span\":case\"svg\":case\"path\":case\"a\":case\"g\":case\"p\":case\"li\":break;case\"img\":ae(\"error\",e),ae(\"load\",e);var a=!1,n=!1,u;for(u in l)if(l.hasOwnProperty(u)){var i=l[u];if(i!=null)switch(u){case\"src\":a=!0;break;case\"srcSet\":n=!0;break;case\"children\":case\"dangerouslySetInnerHTML\":throw Error(o(137,t));default:Se(e,t,u,i,l,null)}}n&&Se(e,t,\"srcSet\",l.srcSet,l,null),a&&Se(e,t,\"src\",l.src,l,null);return;case\"input\":ae(\"invalid\",e);var f=u=i=n=null,h=null,S=null;for(a in l)if(l.hasOwnProperty(a)){var A=l[a];if(A!=null)switch(a){case\"name\":n=A;break;case\"type\":i=A;break;case\"checked\":h=A;break;case\"defaultChecked\":S=A;break;case\"value\":u=A;break;case\"defaultValue\":f=A;break;case\"children\":case\"dangerouslySetInnerHTML\":if(A!=null)throw Error(o(137,t));break;default:Se(e,t,a,A,l,null)}}es(e,u,f,h,S,i,n,!1);return;case\"select\":ae(\"invalid\",e),a=i=u=null;for(n in l)if(l.hasOwnProperty(n)&&(f=l[n],f!=null))switch(n){case\"value\":u=f;break;case\"defaultValue\":i=f;break;case\"multiple\":a=f;default:Se(e,t,n,f,l,null)}t=u,l=i,e.multiple=!!a,t!=null?ia(e,!!a,t,!1):l!=null&&ia(e,!!a,l,!0);return;case\"textarea\":ae(\"invalid\",e),u=n=a=null;for(i in l)if(l.hasOwnProperty(i)&&(f=l[i],f!=null))switch(i){case\"value\":a=f;break;case\"defaultValue\":n=f;break;case\"children\":u=f;break;case\"dangerouslySetInnerHTML\":if(f!=null)throw Error(o(91));break;default:Se(e,t,i,f,l,null)}ls(e,a,n,u);return;case\"option\":for(h in l)if(l.hasOwnProperty(h)&&(a=l[h],a!=null))switch(h){case\"selected\":e.selected=a&&typeof a!=\"function\"&&typeof a!=\"symbol\";break;default:Se(e,t,h,a,l,null)}return;case\"dialog\":ae(\"beforetoggle\",e),ae(\"toggle\",e),ae(\"cancel\",e),ae(\"close\",e);break;case\"iframe\":case\"object\":ae(\"load\",e);break;case\"video\":case\"audio\":for(a=0;a<_n.length;a++)ae(_n[a],e);break;case\"image\":ae(\"error\",e),ae(\"load\",e);break;case\"details\":ae(\"toggle\",e);break;case\"embed\":case\"source\":case\"link\":ae(\"error\",e),ae(\"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(S in l)if(l.hasOwnProperty(S)&&(a=l[S],a!=null))switch(S){case\"children\":case\"dangerouslySetInnerHTML\":throw Error(o(137,t));default:Se(e,t,S,a,l,null)}return;default:if(yi(t)){for(A in l)l.hasOwnProperty(A)&&(a=l[A],a!==void 0&&lf(e,t,A,a,l,void 0));return}}for(f in l)l.hasOwnProperty(f)&&(a=l[f],a!=null&&Se(e,t,f,a,l,null))}function Iv(e,t,l,a){switch(t){case\"div\":case\"span\":case\"svg\":case\"path\":case\"a\":case\"g\":case\"p\":case\"li\":break;case\"input\":var n=null,u=null,i=null,f=null,h=null,S=null,A=null;for(T in l){var N=l[T];if(l.hasOwnProperty(T)&&N!=null)switch(T){case\"checked\":break;case\"value\":break;case\"defaultValue\":h=N;default:a.hasOwnProperty(T)||Se(e,t,T,null,a,N)}}for(var p in a){var T=a[p];if(N=l[p],a.hasOwnProperty(p)&&(T!=null||N!=null))switch(p){case\"type\":u=T;break;case\"name\":n=T;break;case\"checked\":S=T;break;case\"defaultChecked\":A=T;break;case\"value\":i=T;break;case\"defaultValue\":f=T;break;case\"children\":case\"dangerouslySetInnerHTML\":if(T!=null)throw Error(o(137,t));break;default:T!==N&&Se(e,t,p,T,a,N)}}vi(e,i,f,h,S,A,u,n);return;case\"select\":T=i=f=p=null;for(u in l)if(h=l[u],l.hasOwnProperty(u)&&h!=null)switch(u){case\"value\":break;case\"multiple\":T=h;default:a.hasOwnProperty(u)||Se(e,t,u,null,a,h)}for(n in a)if(u=a[n],h=l[n],a.hasOwnProperty(n)&&(u!=null||h!=null))switch(n){case\"value\":p=u;break;case\"defaultValue\":f=u;break;case\"multiple\":i=u;default:u!==h&&Se(e,t,n,u,a,h)}t=f,l=i,a=T,p!=null?ia(e,!!l,p,!1):!!a!=!!l&&(t!=null?ia(e,!!l,t,!0):ia(e,!!l,l?[]:\"\",!1));return;case\"textarea\":T=p=null;for(f in l)if(n=l[f],l.hasOwnProperty(f)&&n!=null&&!a.hasOwnProperty(f))switch(f){case\"value\":break;case\"children\":break;default:Se(e,t,f,null,a,n)}for(i in a)if(n=a[i],u=l[i],a.hasOwnProperty(i)&&(n!=null||u!=null))switch(i){case\"value\":p=n;break;case\"defaultValue\":T=n;break;case\"children\":break;case\"dangerouslySetInnerHTML\":if(n!=null)throw Error(o(91));break;default:n!==u&&Se(e,t,i,n,a,u)}ts(e,p,T);return;case\"option\":for(var G in l)if(p=l[G],l.hasOwnProperty(G)&&p!=null&&!a.hasOwnProperty(G))switch(G){case\"selected\":e.selected=!1;break;default:Se(e,t,G,null,a,p)}for(h in a)if(p=a[h],T=l[h],a.hasOwnProperty(h)&&p!==T&&(p!=null||T!=null))switch(h){case\"selected\":e.selected=p&&typeof p!=\"function\"&&typeof p!=\"symbol\";break;default:Se(e,t,h,p,a,T)}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 K in l)p=l[K],l.hasOwnProperty(K)&&p!=null&&!a.hasOwnProperty(K)&&Se(e,t,K,null,a,p);for(S in a)if(p=a[S],T=l[S],a.hasOwnProperty(S)&&p!==T&&(p!=null||T!=null))switch(S){case\"children\":case\"dangerouslySetInnerHTML\":if(p!=null)throw Error(o(137,t));break;default:Se(e,t,S,p,a,T)}return;default:if(yi(t)){for(var pe in l)p=l[pe],l.hasOwnProperty(pe)&&p!==void 0&&!a.hasOwnProperty(pe)&&lf(e,t,pe,void 0,a,p);for(A in a)p=a[A],T=l[A],!a.hasOwnProperty(A)||p===T||p===void 0&&T===void 0||lf(e,t,A,p,a,T);return}}for(var y in l)p=l[y],l.hasOwnProperty(y)&&p!=null&&!a.hasOwnProperty(y)&&Se(e,t,y,null,a,p);for(N in a)p=a[N],T=l[N],!a.hasOwnProperty(N)||p===T||p==null&&T==null||Se(e,t,N,p,a,T)}function ir(e){switch(e){case\"css\":case\"script\":case\"font\":case\"img\":case\"image\":case\"input\":case\"link\":return!0;default:return!1}}function Pv(){if(typeof performance.getEntriesByType==\"function\"){for(var e=0,t=0,l=performance.getEntriesByType(\"resource\"),a=0;a<l.length;a++){var n=l[a],u=n.transferSize,i=n.initiatorType,f=n.duration;if(u&&f&&ir(i)){for(i=0,f=n.responseEnd,a+=1;a<l.length;a++){var h=l[a],S=h.startTime;if(S>f)break;var A=h.transferSize,N=h.initiatorType;A&&ir(N)&&(h=h.responseEnd,i+=A*(h<f?1:(f-S)/(h-S)))}if(--a,t+=8*(u+i)/(n.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 af=null,nf=null;function Lu(e){return e.nodeType===9?e:e.ownerDocument}function cr(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 fr(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 uf(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 cf=null;function em(){var e=window.event;return e&&e.type===\"popstate\"?e===cf?!1:(cf=e,!0):(cf=null,!1)}var sr=typeof setTimeout==\"function\"?setTimeout:void 0,tm=typeof clearTimeout==\"function\"?clearTimeout:void 0,or=typeof Promise==\"function\"?Promise:void 0,lm=typeof queueMicrotask==\"function\"?queueMicrotask:typeof or<\"u\"?function(e){return or.resolve(null).then(e).catch(am)}:sr;function am(e){setTimeout(function(){throw e})}function jl(e){return e===\"head\"}function dr(e,t){var l=t,a=0;do{var n=l.nextSibling;if(e.removeChild(l),n&&n.nodeType===8)if(l=n.data,l===\"/$\"||l===\"/&\"){if(a===0){e.removeChild(n),Ya(t);return}a--}else if(l===\"$\"||l===\"$?\"||l===\"$~\"||l===\"$!\"||l===\"&\")a++;else if(l===\"html\")On(e.ownerDocument.documentElement);else if(l===\"head\"){l=e.ownerDocument.head,On(l);for(var u=l.firstChild;u;){var i=u.nextSibling,f=u.nodeName;u[Va]||f===\"SCRIPT\"||f===\"STYLE\"||f===\"LINK\"&&u.rel.toLowerCase()===\"stylesheet\"||l.removeChild(u),u=i}}else l===\"body\"&&On(e.ownerDocument.body);l=n}while(l);Ya(t)}function rr(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display=\"none\"):(l.style.display=l._stashedDisplay||\"\",l.getAttribute(\"style\")===\"\"&&l.removeAttribute(\"style\")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=\"\"):l.nodeValue=l._stashedText||\"\"),a&&a.nodeType===8)if(l=a.data,l===\"/$\"){if(e===0)break;e--}else l!==\"$\"&&l!==\"$?\"&&l!==\"$~\"&&l!==\"$!\"||e++;l=a}while(l)}function ff(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case\"HTML\":case\"HEAD\":case\"BODY\":ff(l),ri(l);continue;case\"SCRIPT\":case\"STYLE\":continue;case\"LINK\":if(l.rel.toLowerCase()===\"stylesheet\")continue}e.removeChild(l)}}function nm(e,t,l,a){for(;e.nodeType===1;){var n=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!==\"INPUT\"||e.type!==\"hidden\"))break}else if(a){if(!e[Va])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!==n.rel||e.getAttribute(\"href\")!==(n.href==null||n.href===\"\"?null:n.href)||e.getAttribute(\"crossorigin\")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute(\"title\")!==(n.title==null?null:n.title))break;return e;case\"style\":if(e.hasAttribute(\"data-precedence\"))break;return e;case\"script\":if(u=e.getAttribute(\"src\"),(u!==(n.src==null?null:n.src)||e.getAttribute(\"type\")!==(n.type==null?null:n.type)||e.getAttribute(\"crossorigin\")!==(n.crossOrigin==null?null:n.crossOrigin))&&u&&e.hasAttribute(\"async\")&&!e.hasAttribute(\"itemprop\"))break;return e;default:return e}}else if(t===\"input\"&&e.type===\"hidden\"){var u=n.name==null?null:\"\"+n.name;if(n.type===\"hidden\"&&e.getAttribute(\"name\")===u)return e}else return e;if(e=_t(e.nextSibling),e===null)break}return null}function um(e,t,l){if(t===\"\")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==\"INPUT\"||e.type!==\"hidden\")&&!l||(e=_t(e.nextSibling),e===null))return null;return e}function hr(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==\"INPUT\"||e.type!==\"hidden\")&&!t||(e=_t(e.nextSibling),e===null))return null;return e}function sf(e){return e.data===\"$?\"||e.data===\"$~\"}function of(e){return e.data===\"$!\"||e.data===\"$?\"&&e.ownerDocument.readyState!==\"loading\"}function im(e,t){var l=e.ownerDocument;if(e.data===\"$~\")e._reactRetry=t;else if(e.data!==\"$?\"||l.readyState!==\"loading\")t();else{var a=function(){t(),l.removeEventListener(\"DOMContentLoaded\",a)};l.addEventListener(\"DOMContentLoaded\",a),e._reactRetry=a}}function _t(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 df=null;function vr(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l===\"/$\"||l===\"/&\"){if(t===0)return _t(e.nextSibling);t--}else l!==\"$\"&&l!==\"$!\"&&l!==\"$?\"&&l!==\"$~\"&&l!==\"&\"||t++}e=e.nextSibling}return null}function mr(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l===\"$\"||l===\"$!\"||l===\"$?\"||l===\"$~\"||l===\"&\"){if(t===0)return e;t--}else l!==\"/$\"&&l!==\"/&\"||t++}e=e.previousSibling}return null}function yr(e,t,l){switch(t=Lu(l),e){case\"html\":if(e=t.documentElement,!e)throw Error(o(452));return e;case\"head\":if(e=t.head,!e)throw Error(o(453));return e;case\"body\":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function On(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ri(e)}var Nt=new Map,gr=new Set;function Ku(e){return typeof e.getRootNode==\"function\"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ul=R.d;R.d={f:cm,r:fm,D:sm,C:om,L:dm,m:rm,X:vm,S:hm,M:mm};function cm(){var e=ul.f(),t=qu();return e||t}function fm(e){var t=aa(e);t!==null&&t.tag===5&&t.type===\"form\"?Ro(t):ul.r(e)}var Ha=typeof document>\"u\"?null:document;function br(e,t,l){var a=Ha;if(a&&typeof t==\"string\"&&t){var n=pt(t);n='link[rel=\"'+e+'\"][href=\"'+n+'\"]',typeof l==\"string\"&&(n+='[crossorigin=\"'+l+'\"]'),gr.has(n)||(gr.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement(\"link\"),$e(t,\"link\",e),Qe(t),a.head.appendChild(t)))}}function sm(e){ul.D(e),br(\"dns-prefetch\",e,null)}function om(e,t){ul.C(e,t),br(\"preconnect\",e,t)}function dm(e,t,l){ul.L(e,t,l);var a=Ha;if(a&&e&&t){var n='link[rel=\"preload\"][as=\"'+pt(t)+'\"]';t===\"image\"&&l&&l.imageSrcSet?(n+='[imagesrcset=\"'+pt(l.imageSrcSet)+'\"]',typeof l.imageSizes==\"string\"&&(n+='[imagesizes=\"'+pt(l.imageSizes)+'\"]')):n+='[href=\"'+pt(e)+'\"]';var u=n;switch(t){case\"style\":u=qa(e);break;case\"script\":u=Ba(e)}Nt.has(u)||(e=E({rel:\"preload\",href:t===\"image\"&&l&&l.imageSrcSet?void 0:e,as:t},l),Nt.set(u,e),a.querySelector(n)!==null||t===\"style\"&&a.querySelector(Mn(u))||t===\"script\"&&a.querySelector(Un(u))||(t=a.createElement(\"link\"),$e(t,\"link\",e),Qe(t),a.head.appendChild(t)))}}function rm(e,t){ul.m(e,t);var l=Ha;if(l&&e){var a=t&&typeof t.as==\"string\"?t.as:\"script\",n='link[rel=\"modulepreload\"][as=\"'+pt(a)+'\"][href=\"'+pt(e)+'\"]',u=n;switch(a){case\"audioworklet\":case\"paintworklet\":case\"serviceworker\":case\"sharedworker\":case\"worker\":case\"script\":u=Ba(e)}if(!Nt.has(u)&&(e=E({rel:\"modulepreload\",href:e},t),Nt.set(u,e),l.querySelector(n)===null)){switch(a){case\"audioworklet\":case\"paintworklet\":case\"serviceworker\":case\"sharedworker\":case\"worker\":case\"script\":if(l.querySelector(Un(u)))return}a=l.createElement(\"link\"),$e(a,\"link\",e),Qe(a),l.head.appendChild(a)}}}function hm(e,t,l){ul.S(e,t,l);var a=Ha;if(a&&e){var n=na(a).hoistableStyles,u=qa(e);t=t||\"default\";var i=n.get(u);if(!i){var f={loading:0,preload:null};if(i=a.querySelector(Mn(u)))f.loading=5;else{e=E({rel:\"stylesheet\",href:e,\"data-precedence\":t},l),(l=Nt.get(u))&&rf(e,l);var h=i=a.createElement(\"link\");Qe(h),$e(h,\"link\",e),h._p=new Promise(function(S,A){h.onload=S,h.onerror=A}),h.addEventListener(\"load\",function(){f.loading|=1}),h.addEventListener(\"error\",function(){f.loading|=2}),f.loading|=4,Vu(i,t,a)}i={type:\"stylesheet\",instance:i,count:1,state:f},n.set(u,i)}}}function vm(e,t){ul.X(e,t);var l=Ha;if(l&&e){var a=na(l).hoistableScripts,n=Ba(e),u=a.get(n);u||(u=l.querySelector(Un(n)),u||(e=E({src:e,async:!0},t),(t=Nt.get(n))&&hf(e,t),u=l.createElement(\"script\"),Qe(u),$e(u,\"link\",e),l.head.appendChild(u)),u={type:\"script\",instance:u,count:1,state:null},a.set(n,u))}}function mm(e,t){ul.M(e,t);var l=Ha;if(l&&e){var a=na(l).hoistableScripts,n=Ba(e),u=a.get(n);u||(u=l.querySelector(Un(n)),u||(e=E({src:e,async:!0,type:\"module\"},t),(t=Nt.get(n))&&hf(e,t),u=l.createElement(\"script\"),Qe(u),$e(u,\"link\",e),l.head.appendChild(u)),u={type:\"script\",instance:u,count:1,state:null},a.set(n,u))}}function Sr(e,t,l,a){var n=(n=k.current)?Ku(n):null;if(!n)throw Error(o(446));switch(e){case\"meta\":case\"title\":return null;case\"style\":return typeof l.precedence==\"string\"&&typeof l.href==\"string\"?(t=qa(l.href),l=na(n).hoistableStyles,a=l.get(t),a||(a={type:\"style\",instance:null,count:0,state:null},l.set(t,a)),a):{type:\"void\",instance:null,count:0,state:null};case\"link\":if(l.rel===\"stylesheet\"&&typeof l.href==\"string\"&&typeof l.precedence==\"string\"){e=qa(l.href);var u=na(n).hoistableStyles,i=u.get(e);if(i||(n=n.ownerDocument||n,i={type:\"stylesheet\",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,i),(u=n.querySelector(Mn(e)))&&!u._p&&(i.instance=u,i.state.loading=5),Nt.has(e)||(l={rel:\"preload\",as:\"style\",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Nt.set(e,l),u||ym(n,e,l,i.state))),t&&a===null)throw Error(o(528,\"\"));return i}if(t&&a!==null)throw Error(o(529,\"\"));return null;case\"script\":return t=l.async,l=l.src,typeof l==\"string\"&&t&&typeof t!=\"function\"&&typeof t!=\"symbol\"?(t=Ba(l),l=na(n).hoistableScripts,a=l.get(t),a||(a={type:\"script\",instance:null,count:0,state:null},l.set(t,a)),a):{type:\"void\",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function qa(e){return'href=\"'+pt(e)+'\"'}function Mn(e){return'link[rel=\"stylesheet\"]['+e+\"]\"}function pr(e){return E({},e,{\"data-precedence\":e.precedence,precedence:null})}function ym(e,t,l,a){e.querySelector('link[rel=\"preload\"][as=\"style\"]['+t+\"]\")?a.loading=1:(t=e.createElement(\"link\"),a.preload=t,t.addEventListener(\"load\",function(){return a.loading|=1}),t.addEventListener(\"error\",function(){return a.loading|=2}),$e(t,\"link\",l),Qe(t),e.head.appendChild(t))}function Ba(e){return'[src=\"'+pt(e)+'\"]'}function Un(e){return\"script[async]\"+e}function Tr(e,t,l){if(t.count++,t.instance===null)switch(t.type){case\"style\":var a=e.querySelector('style[data-href~=\"'+pt(l.href)+'\"]');if(a)return t.instance=a,Qe(a),a;var n=E({},l,{\"data-href\":l.href,\"data-precedence\":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement(\"style\"),Qe(a),$e(a,\"style\",n),Vu(a,l.precedence,e),t.instance=a;case\"stylesheet\":n=qa(l.href);var u=e.querySelector(Mn(n));if(u)return t.state.loading|=4,t.instance=u,Qe(u),u;a=pr(l),(n=Nt.get(n))&&rf(a,n),u=(e.ownerDocument||e).createElement(\"link\"),Qe(u);var i=u;return i._p=new Promise(function(f,h){i.onload=f,i.onerror=h}),$e(u,\"link\",a),t.state.loading|=4,Vu(u,l.precedence,e),t.instance=u;case\"script\":return u=Ba(l.src),(n=e.querySelector(Un(u)))?(t.instance=n,Qe(n),n):(a=l,(n=Nt.get(u))&&(a=E({},l),hf(a,n)),e=e.ownerDocument||e,n=e.createElement(\"script\"),Qe(n),$e(n,\"link\",a),e.head.appendChild(n),t.instance=n);case\"void\":return null;default:throw Error(o(443,t.type))}else t.type===\"stylesheet\"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Vu(a,l.precedence,e));return t.instance}function Vu(e,t,l){for(var a=l.querySelectorAll('link[rel=\"stylesheet\"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,u=n,i=0;i<a.length;i++){var f=a[i];if(f.dataset.precedence===t)u=f;else if(u!==n)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function rf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function hf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ju=null;function Er(e,t,l){if(Ju===null){var a=new Map,n=Ju=new Map;n.set(l,a)}else n=Ju,a=n.get(l),a||(a=new Map,n.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),n=0;n<l.length;n++){var u=l[n];if(!(u[Va]||u[Ke]||e===\"link\"&&u.getAttribute(\"rel\")===\"stylesheet\")&&u.namespaceURI!==\"http://www.w3.org/2000/svg\"){var i=u.getAttribute(t)||\"\";i=e+i;var f=a.get(i);f?f.push(u):a.set(i,[u])}}return a}function zr(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t===\"title\"?e.querySelector(\"head > title\"):null)}function gm(e,t,l){if(l===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 Ar(e){return!(e.type===\"stylesheet\"&&(e.state.loading&3)===0)}function bm(e,t,l,a){if(l.type===\"stylesheet\"&&(typeof a.media!=\"string\"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var n=qa(a.href),u=t.querySelector(Mn(n));if(u){t=u._p,t!==null&&typeof t==\"object\"&&typeof t.then==\"function\"&&(e.count++,e=ku.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=u,Qe(u);return}u=t.ownerDocument||t,a=pr(a),(n=Nt.get(n))&&rf(a,n),u=u.createElement(\"link\"),Qe(u);var i=u;i._p=new Promise(function(f,h){i.onload=f,i.onerror=h}),$e(u,\"link\",a),l.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=ku.bind(e),t.addEventListener(\"load\",l),t.addEventListener(\"error\",l))}}var vf=0;function Sm(e,t){return e.stylesheets&&e.count===0&&Wu(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&Wu(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&vf===0&&(vf=62500*Pv());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Wu(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>vf?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function ku(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Wu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var $u=null;function Wu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,$u=new Map,t.forEach(pm,e),$u=null,ku.call(e))}function pm(e,t){if(!(t.state.loading&4)){var l=$u.get(e);if(l)var a=l.get(null);else{l=new Map,$u.set(e,l);for(var n=e.querySelectorAll(\"link[data-precedence],style[data-precedence]\"),u=0;u<n.length;u++){var i=n[u];(i.nodeName===\"LINK\"||i.getAttribute(\"media\")!==\"not all\")&&(l.set(i.dataset.precedence,i),a=i)}a&&l.set(null,a)}n=t.instance,i=n.getAttribute(\"data-precedence\"),u=l.get(i)||a,u===a&&l.set(null,n),l.set(i,n),this.count++,a=ku.bind(this),n.addEventListener(\"load\",a),n.addEventListener(\"error\",a),u?u.parentNode.insertBefore(n,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var Dn={$$typeof:_e,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function Tm(e,t,l,a,n,u,i,f,h){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=fi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fi(0),this.hiddenUpdates=fi(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=u,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=h,this.incompleteTransitions=new Map}function xr(e,t,l,a,n,u,i,f,h,S,A,N){return e=new Tm(e,t,l,i,h,S,A,N,f),t=1,u===!0&&(t|=24),u=ht(3,null,null,t),e.current=u,u.stateNode=e,t=Vi(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:a,isDehydrated:l,cache:t},Wi(u),e}function jr(e){return e?(e=va,e):va}function _r(e,t,l,a,n,u){n=jr(n),a.context===null?a.context=n:a.pendingContext=n,a=ml(t),a.payload={element:l},u=u===void 0?null:u,u!==null&&(a.callback=u),l=yl(e,a,t),l!==null&&(ct(l,e,t),on(l,e,t))}function Nr(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function mf(e,t){Nr(e,t),(e=e.alternate)&&Nr(e,t)}function Or(e){if(e.tag===13||e.tag===31){var t=wl(e,67108864);t!==null&&ct(t,e,67108864),mf(e,67108864)}}function Mr(e){if(e.tag===13||e.tag===31){var t=bt();t=si(t);var l=wl(e,t);l!==null&&ct(l,e,t),mf(e,t)}}var Fu=!0;function Em(e,t,l,a){var n=x.T;x.T=null;var u=R.p;try{R.p=2,yf(e,t,l,a)}finally{R.p=u,x.T=n}}function zm(e,t,l,a){var n=x.T;x.T=null;var u=R.p;try{R.p=8,yf(e,t,l,a)}finally{R.p=u,x.T=n}}function yf(e,t,l,a){if(Fu){var n=gf(a);if(n===null)tf(e,t,a,Iu,l),Dr(e,a);else if(xm(n,e,t,l,a))a.stopPropagation();else if(Dr(e,a),t&4&&-1<Am.indexOf(e)){for(;n!==null;){var u=aa(n);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var i=Rl(u.pendingLanes);if(i!==0){var f=u;for(f.pendingLanes|=2,f.entangledLanes|=2;i;){var h=1<<31-dt(i);f.entanglements[1]|=h,i&=~h}Gt(u),(me&6)===0&&(Ru=Le()+500,jn(0))}}break;case 31:case 13:f=wl(u,2),f!==null&&ct(f,u,2),qu(),mf(u,2)}if(u=gf(a),u===null&&tf(e,t,a,Iu,l),u===n)break;n=u}n!==null&&a.stopPropagation()}else tf(e,t,a,null,l)}}function gf(e){return e=bi(e),bf(e)}var Iu=null;function bf(e){if(Iu=null,e=la(e),e!==null){var t=z(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=C(t),e!==null)return e;e=null}else if(l===31){if(e=L(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Iu=e,null}function Ur(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(Qa()){case Yf:return 2;case wf:return 8;case Xn:case oh:return 32;case Gf:return 268435456;default:return 32}default:return 32}}var Sf=!1,_l=null,Nl=null,Ol=null,Cn=new Map,Rn=new Map,Ml=[],Am=\"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 Dr(e,t){switch(e){case\"focusin\":case\"focusout\":_l=null;break;case\"dragenter\":case\"dragleave\":Nl=null;break;case\"mouseover\":case\"mouseout\":Ol=null;break;case\"pointerover\":case\"pointerout\":Cn.delete(t.pointerId);break;case\"gotpointercapture\":case\"lostpointercapture\":Rn.delete(t.pointerId)}}function Hn(e,t,l,a,n,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:u,targetContainers:[n]},t!==null&&(t=aa(t),t!==null&&Or(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function xm(e,t,l,a,n){switch(t){case\"focusin\":return _l=Hn(_l,e,t,l,a,n),!0;case\"dragenter\":return Nl=Hn(Nl,e,t,l,a,n),!0;case\"mouseover\":return Ol=Hn(Ol,e,t,l,a,n),!0;case\"pointerover\":var u=n.pointerId;return Cn.set(u,Hn(Cn.get(u)||null,e,t,l,a,n)),!0;case\"gotpointercapture\":return u=n.pointerId,Rn.set(u,Hn(Rn.get(u)||null,e,t,l,a,n)),!0}return!1}function Cr(e){var t=la(e.target);if(t!==null){var l=z(t);if(l!==null){if(t=l.tag,t===13){if(t=C(l),t!==null){e.blockedOn=t,Vf(e.priority,function(){Mr(l)});return}}else if(t===31){if(t=L(l),t!==null){e.blockedOn=t,Vf(e.priority,function(){Mr(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Pu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=gf(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);gi=a,l.target.dispatchEvent(a),gi=null}else return t=aa(l),t!==null&&Or(t),e.blockedOn=l,!1;t.shift()}return!0}function Rr(e,t,l){Pu(e)&&l.delete(t)}function jm(){Sf=!1,_l!==null&&Pu(_l)&&(_l=null),Nl!==null&&Pu(Nl)&&(Nl=null),Ol!==null&&Pu(Ol)&&(Ol=null),Cn.forEach(Rr),Rn.forEach(Rr)}function ei(e,t){e.blockedOn===t&&(e.blockedOn=null,Sf||(Sf=!0,c.unstable_scheduleCallback(c.unstable_NormalPriority,jm)))}var ti=null;function Hr(e){ti!==e&&(ti=e,c.unstable_scheduleCallback(c.unstable_NormalPriority,function(){ti===e&&(ti=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],n=e[t+2];if(typeof a!=\"function\"){if(bf(a||l)===null)continue;break}var u=aa(l);u!==null&&(e.splice(t,3),t-=3,yc(u,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function Ya(e){function t(h){return ei(h,e)}_l!==null&&ei(_l,e),Nl!==null&&ei(Nl,e),Ol!==null&&ei(Ol,e),Cn.forEach(t),Rn.forEach(t);for(var l=0;l<Ml.length;l++){var a=Ml[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Ml.length&&(l=Ml[0],l.blockedOn===null);)Cr(l),l.blockedOn===null&&Ml.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var n=l[a],u=l[a+1],i=n[tt]||null;if(typeof u==\"function\")i||Hr(l);else if(i){var f=null;if(u&&u.hasAttribute(\"formAction\")){if(n=u,i=u[tt]||null)f=i.formAction;else if(bf(n)!==null)continue}else f=i.action;typeof f==\"function\"?l[a+1]=f:(l.splice(a,3),a-=3),Hr(l)}}}function qr(){function e(u){u.canIntercept&&u.info===\"react-transition\"&&u.intercept({handler:function(){return new Promise(function(i){return n=i})},focusReset:\"manual\",scroll:\"manual\"})}function t(){n!==null&&(n(),n=null),a||setTimeout(l,20)}function l(){if(!a&&!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 a=!1,n=null;return navigation.addEventListener(\"navigate\",e),navigation.addEventListener(\"navigatesuccess\",t),navigation.addEventListener(\"navigateerror\",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener(\"navigate\",e),navigation.removeEventListener(\"navigatesuccess\",t),navigation.removeEventListener(\"navigateerror\",t),n!==null&&(n(),n=null)}}}function pf(e){this._internalRoot=e}li.prototype.render=pf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var l=t.current,a=bt();_r(l,a,e,t,null,null)},li.prototype.unmount=pf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_r(e.current,2,null,e,null,null),qu(),t[ta]=null}};function li(e){this._internalRoot=e}li.prototype.unstable_scheduleHydration=function(e){if(e){var t=Kf();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Ml.length&&t!==0&&t<Ml[l].priority;l++);Ml.splice(l,0,e),l===0&&Cr(e)}};var Br=s.version;if(Br!==\"19.2.8\")throw Error(o(527,Br,\"19.2.8\"));R.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==\"function\"?Error(o(188)):(e=Object.keys(e).join(\",\"),Error(o(268,e)));return e=g(t),e=e!==null?D(e):null,e=e===null?null:e.stateNode,e};var _m={bundleType:0,version:\"19.2.8\",rendererPackageName:\"react-dom\",currentDispatcherRef:x,reconcilerVersion:\"19.2.8\"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<\"u\"){var ai=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ai.isDisabled&&ai.supportsFiber)try{Za=ai.inject(_m),ot=ai}catch{}}return Bn.createRoot=function(e,t){if(!j(e))throw Error(o(299));var l=!1,a=\"\",n=Lo,u=Ko,i=Vo;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=xr(e,1,!1,null,null,l,a,null,n,u,i,qr),e[ta]=t.current,ef(e),new pf(t)},Bn.hydrateRoot=function(e,t,l){if(!j(e))throw Error(o(299));var a=!1,n=\"\",u=Lo,i=Ko,f=Vo,h=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(u=l.onUncaughtError),l.onCaughtError!==void 0&&(i=l.onCaughtError),l.onRecoverableError!==void 0&&(f=l.onRecoverableError),l.formState!==void 0&&(h=l.formState)),t=xr(e,1,!0,t,l??null,a,n,h,u,i,f,qr),t.context=jr(null),l=t.current,a=bt(),a=si(a),n=ml(a),n.callback=null,yl(l,n,a),l=a,t.current.lanes=l,Ka(t,l),Gt(t),e[ta]=t.current,ef(e),new li(t)},Bn.version=\"19.2.8\",Bn}var Jr;function Bm(){if(Jr)return zf.exports;Jr=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>\"u\"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=\"function\"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(s){console.error(s)}}return c(),zf.exports=qm(),zf.exports}var Ym=Bm(),wm=[\"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\"],Gm=/\\\\r\\\\n\\\\r\\\\n|\\\\n\\\\n|\\\\r\\\\r/;function kr(c){const s=[];let r,o,j;for(const z of c.split(/\\\\r\\\\n|\\\\n|\\\\r/)){if(z===\"\"||z.startsWith(\":\"))continue;const C=z.indexOf(\":\"),L=C===-1?z:z.slice(0,C);let H=C===-1?\"\":z.slice(C+1);switch(H.startsWith(\" \")&&(H=H.slice(1)),L){case\"data\":s.push(H);break;case\"event\":r=H;break;case\"id\":o=H;break;case\"retry\":{const g=Number.parseInt(H,10);Number.isFinite(g)&&(j=g);break}}}if(!(s.length===0&&r===void 0))return{...r===void 0?{}:{event:r},data:s.join(\\`\n\\`),...o===void 0?{}:{id:o},...j===void 0?{}:{retry:j}}}async function*Xm(c){const s=new TextDecoder;let r=\"\";for await(const o of c)for(r+=typeof o==\"string\"?o:s.decode(o,{stream:!0});;){const j=Gm.exec(r);if(j===null)break;const z=r.slice(0,j.index);r=r.slice(j.index+j[0].length);const C=kr(z);C!==void 0&&(yield C)}if(r+=s.decode(),r.trim()!==\"\"){const o=kr(r);o!==void 0&&(yield o)}}function Pr(){return{push:c=>c,endStep:()=>\"\",end:()=>\"\"}}function Qm(c){return c!==\"final\"&&c!==\"stopped\"}function Zm(c,s={}){switch(c){case\"final\":return;case\"max_steps\":return\\`stopped\\${s.steps===void 0?\"\":\\` after \\${s.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\\${s.durationMs===void 0?\"\":\\` after \\${s.durationMs} ms\\`} — raise limits.turnTimeoutMs\\`;case\"stopped\":return s.cancelledAfterMs===void 0?\"cancelled\":\\`cancelled after \\${s.cancelledAfterMs.toFixed(0)} ms\\`;case\"error\":return}}var Lm=\"<<<\",Km=\">>>\",Yn=/^\\\\s*(?:[-*+]\\\\s+|\\\\d+[.)]\\\\s+)?<?\\\\s*action\\\\s*:\\\\s*(.+?)\\\\s*>?\\\\s*$/i,Vm=/^\\\\s*(?:[-*+]\\\\s+|\\\\d+[.)]\\\\s+)?([A-Za-z_][\\\\w.-]*?)\\\\s*:\\\\s*(.*)$/,Uf=/^\\\\s*\\`{3,}\\\\s*[\\\\w+-]*\\\\s*$/,_f=/^\\\\s*end\\\\s*$/i,Jm=/^\\\\s*<\\\\s*action\\\\s*>\\\\s*$/i,$r=/^\\\\s*<\\\\s*\\\\/\\\\s*action\\\\s*>\\\\s*$/i,km=/^\\\\s*<\\\\/?\\\\s*[A-Za-z_][\\\\w.:-]*\\\\s*\\\\/?\\\\s*>\\\\s*$/;function Nf(c){return c.replace(/^[\\`'\"*<]+/,\"\").replace(/[\\`'\"*>]+$/,\"\").replace(/[.,;:]+$/,\"\").trim()}function eh(c,s,r){const o=c.fields.get(s);o===void 0?c.fields.set(s,[r]):o.push(r)}function th(c){if(c.block===void 0||c.heredocKey===void 0)return;const s=[...c.heredocLines];s[s.length-1]===\"\"&&s.pop(),eh(c.block,c.heredocKey,s.join(\\`\n\\`)),c.block.wrapped.add(c.heredocKey),c.heredocKey=void 0,c.heredocLines=[]}function Il(c){th(c),c.block!==void 0&&c.blocks.push(c.block),c.block=void 0,c.openKey=void 0,c.awaitingSlug=!1}function Wr(){return{block:void 0,openKey:void 0,severedKey:void 0,severedPending:void 0,heredocKey:void 0,heredocLines:[],justClosed:!1,awaitingSlug:!1,text:[],blocks:[]}}function $m(c,s,r){const o=s.trim();if(c.heredocKey!==void 0){if(o===Km){th(c);return}if(_f.test(o)){Il(c),c.justClosed=!0;return}if(Yn.test(s)){Il(c);const C=Yn.exec(s),L=Nf(C?.[1]??\"\");L!==\"\"&&(c.block={slug:L,fields:new Map,wrapped:new Set,severed:new Set});return}c.heredocLines.push(s);return}const j=Yn.exec(s);if(j!==null){const C=Nf(j[1]??\"\");if(Il(c),C===\"\")return;c.block={slug:C,fields:new Map,wrapped:new Set,severed:new Set};return}if(Jm.test(s)){Il(c),c.awaitingSlug=!0;return}if(c.awaitingSlug){if(o===\"\")return;if($r.test(s)){c.awaitingSlug=!1;return}const C=Nf(o);c.awaitingSlug=!1,C!==\"\"&&(c.block={slug:C,fields:new Map,wrapped:new Set,severed:new Set});return}if($r.test(s)){c.block!==void 0&&(Il(c),c.justClosed=!0);return}if(km.test(s))return;if(c.block===void 0){if(Uf.test(s)&&(c.justClosed||r())){c.justClosed=!1;return}if(_f.test(o)&&c.severedPending!==void 0){c.severedPending.block.severed.add(c.severedPending.key),c.severedPending=void 0;return}Yn.test(s)&&(c.severedPending=void 0),c.text.push(s),o!==\"\"&&(c.justClosed=!1);return}if(o===\"\"){c.openKey!==void 0&&(c.severedKey=c.openKey),c.openKey=void 0;return}if(_f.test(o)){c.severedKey=void 0,Il(c),c.justClosed=!0;return}if(Uf.test(s))return;const z=Vm.exec(s);if(z!==null){const C=(z[1]??\"\").trim(),L=(z[2]??\"\").trim();c.severedKey=void 0,L===Lm?(c.heredocKey=C,c.heredocLines=[],c.openKey=void 0):(eh(c.block,C,L),c.openKey=C);return}if(c.openKey!==void 0){const C=c.block.fields.get(c.openKey),L=C?.[C.length-1];C!==void 0&&L!==void 0&&(C[C.length-1]=L===\"\"?o:\\`\\${L}\n\\${o}\\`);return}c.severedKey!==void 0&&(c.severedPending={block:c.block,key:c.severedKey},c.severedKey=void 0),Il(c),c.text.push(s)}function Wm(c){if(/^\\\\s*(?:[-*+]|\\\\d+[.)]?)?\\\\s*$/.test(c))return!0;const s=c.replace(/^\\\\s*(?:[-*+]\\\\s+|\\\\d+[.)]\\\\s+)?/,\"\").toLowerCase(),r=s.startsWith(\"<\")?s.slice(1):s;return\"action:\".startsWith(r)||r.startsWith(\"action:\")||/^<\\\\/?$/.test(s)||/^<\\\\/?[a-z_][\\\\w.:-]*>?$/.test(s)?!0:/^\\`{1,3}[\\\\w+-]*$/.test(s)}function Of(c){return c.endsWith(\"\\\\r\")?c.slice(0,-1):c}function Fm(){let c=Wr(),s=\"\",r=0,o,j=\"\",z=!1;const C=E=>{if(E===\"\")return\"\";if(E.trim()===\"\")return j+=E,\"\";const U=j+E;return j=\"\",z?U:(z=!0,U.replace(/^\\\\s+/,\"\"))},L=(E,U)=>{const J=c.text.length;return $m(c,E,()=>U!==void 0&&Yn.test(U)),c.text.length>J?E:void 0},H=(E,U,J)=>{const W=L(E,U);return W===void 0?\"\":C(W.slice(J))+C(\\`\n\\`)},g=E=>{if(o===void 0)return\"\";const U=o;return o=void 0,H(U,E,0)};return{push(E){let U=\"\";s+=E;let J=s.indexOf(\\`\n\\`);for(;J!==-1;){const q=Of(s.slice(0,J));s=s.slice(J+1),U+=g(q),c.block===void 0&&Uf.test(q)&&!c.justClosed?o=q:U+=H(q,void 0,r),r=0,J=s.indexOf(\\`\n\\`)}const W=Of(s);return c.block===void 0&&!c.awaitingSlug&&o===void 0&&!Wm(W)&&(U+=C(W.slice(r)),r=W.length),U},endStep(){const E=D();return j=\\`\n\n\\`,c=Wr(),E},end:D};function D(){let E=g(void 0);const U=Of(s);if(U!==\"\"){const J=L(U,void 0);J!==void 0&&(E+=C(J.slice(r)))}return s=\"\",r=0,o=void 0,E}}class Xt extends Error{code;hint;field;status;request;constructor(s,r={}){super(s.hint===void 0?s.message:\\`\\${s.message}\n hint: \\${s.hint}\\`),this.name=\"DispachError\",this.code=s.code,this.hint=s.hint??\"\",this.field=s.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 Im(c,s){const r=c instanceof Error?c.message:String(c);return new Xt({code:\"transport_failed\",message:\\`\\${s.method} \\${s.path} did not reach \\${s.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.\"},{...s,cause:c})}async function Pm(c,s){let r;try{const o=await c.json();typeof o.error?.code==\"string\"&&typeof o.error.message==\"string\"&&(r={code:o.error.code,message:o.error.message,...o.error.hint===void 0?{}:{hint:o.error.hint},...o.error.field===void 0?{}:{field:o.error.field}})}catch{}return new Xt(r??{code:\\`http_\\${c.status}\\`,message:\\`\\${s.method} \\${s.path} returned \\${c.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:c.status,...s})}var lh=new Set(wm);async function*ah(c){for await(const s of Xm(ey(c))){if(s.event===void 0||s.data===\"\")continue;let r;try{r=JSON.parse(s.data)}catch{continue}yield{name:s.event,data:r}}}async function*ey(c){const s=c.getReader();try{for(;;){const{done:r,value:o}=await s.read();if(r)return;o!==void 0&&(yield o)}}finally{s.releaseLock()}}async function*ty(c){for await(const{name:s,data:r}of ah(c)){if(lh.has(s)){yield{kind:\"event\",event:r};continue}const o=r??{};switch(s){case\"turn.accepted\":yield{kind:\"accepted\",turnId:String(o.turnId??\"\"),sessionKey:String(o.sessionKey??\"\")};break;case\"stream.replay\":yield{kind:\"replay\",report:{state:o.state===\"ended\"?\"ended\":\"running\",events:Number(o.events??0),truncated:o.truncated===!0,dropped:Number(o.dropped??0),chunks:o.chunks===\"start\"||o.chunks===\"partial\"?o.chunks:\"none\"}};break;case\"stream.ended\":yield{kind:\"ended\",turnId:String(o.turnId??\"\"),status:String(o.status??\"unknown\"),steps:typeof o.steps==\"number\"?o.steps:void 0,errorCode:typeof o.errorCode==\"string\"?o.errorCode:void 0};break;case\"stream.unavailable\":yield{kind:\"unavailable\",turnId:String(o.turnId??\"\"),reason:String(o.reason??\"not observable from this process\")};break}}}async function*ly(c){for await(const{name:s,data:r}of ah(c)){if(lh.has(s)){yield{kind:\"event\",event:r};continue}if(s===\"stream.subscribed\"){const o=r??{};yield{kind:\"subscribed\",report:{agentId:typeof o.agentId==\"string\"?o.agentId:null,types:Array.isArray(o.types)?o.types:null,chunks:o.chunks===!0,implied:typeof o.implied==\"string\"?o.implied:void 0}}}}}async function*ay(c,s={}){for await(const r of c){if(r.kind===\"replay\"&&r.report.truncated&&s.allowTruncated!==!0)throw new Xt({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 Xt({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 o=r.event.data;o.kind!==\"reasoning\"&&typeof o.delta==\"string\"&&(yield o.delta)}}function ny(c){const s=c.baseUrl.replace(/\\\\/+$/,\"\"),r=c.fetch??fetch,o=(g={})=>({...c.token===void 0?{}:{authorization:\\`Bearer \\${c.token}\\`},...g});async function j(g,D,E={}){let U;try{U=await r(\\`\\${s}\\${D}\\`,{method:g,headers:o({...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(J){throw Im(J,{method:g,path:D,baseUrl:s})}if(!U.ok)throw await Pm(U,{method:g,path:D});return U}async function z(g,D,E){return await(await j(g,D,E??{})).json()}async function C(g,D){const E=await j(\"GET\",g,{accept:\"text/event-stream\",...D===void 0?{}:{signal:D}});if(E.body===null)throw new Xt({code:\"no_response_body\",message:\\`GET \\${g} 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:g});return E.body}function L(g,D,E,U={}){const J=q=>q?.chunks===!0?\"?chunks=true\":\"\",W={turnId:D,sessionKey:E,replayed:U.replayed===!0,async*stream(q){const Ee=await C(\\`/v1/agents/\\${encodeURIComponent(g)}/turns/\\${encodeURIComponent(D)}/stream\\${J(q)}\\`,q?.signal);yield*ty(Ee)},async*tokens(q){yield*ay(W.stream({chunks:!0,...q}),{...q?.allowTruncated===void 0?{}:{allowTruncated:q.allowTruncated}})},async text(){for await(const q of W.stream())if(q.kind===\"ended\"||q.kind===\"unavailable\"||q.kind===\"event\"&&q.event.type===\"turn.end\")break;return(await W.get()).text},get:()=>z(\"GET\",\\`/v1/agents/\\${encodeURIComponent(g)}/turns/\\${encodeURIComponent(D)}\\`),async stop(){await j(\"POST\",\\`/v1/agents/\\${encodeURIComponent(g)}/turns/\\${encodeURIComponent(D)}/stop\\`)}};return W}function H(g){const D=E=>\\`/v1/agents/\\${encodeURIComponent(g)}\\${E}\\`;return{id:g,async send(E,U){const J=await z(\"POST\",D(\"/messages\"),{body:{text:E,...U?.sessionKey===void 0?{}:{sessionKey:U.sessionKey},...U?.deliver===void 0?{}:{deliver:U.deliver},...U?.from===void 0?{}:{from:U.from}},...U?.idempotencyKey===void 0?{}:{headers:{\"idempotency-key\":U.idempotencyKey}},...U?.signal===void 0?{}:{signal:U.signal}});return L(g,J.turnId,J.sessionKey,{replayed:J.replayed===!0})},turn:E=>L(g,E,\"\"),describe:()=>z(\"GET\",D(\"\")),tools:()=>z(\"GET\",D(\"/tools\")),skills:()=>z(\"GET\",D(\"/skills\")),sessions:()=>z(\"GET\",D(\"/sessions\")),messages:(E,U)=>{const J=new URLSearchParams;U?.before!==void 0&&J.set(\"before\",String(U.before)),U?.limit!==void 0&&J.set(\"limit\",String(U.limit));const W=J.size===0?\"\":\\`?\\${J.toString()}\\`;return z(\"GET\",D(\\`/sessions/\\${encodeURIComponent(E)}/messages\\${W}\\`))},clearSession:E=>z(\"DELETE\",D(\\`/sessions/\\${encodeURIComponent(E)}\\`)),reload:()=>z(\"POST\",D(\"/reload\"),{body:{}}),schedules:async()=>(await z(\"GET\",D(\"/schedules\"))).schedules,approvals:async()=>(await z(\"GET\",D(\"/approvals\"))).approvals,createSchedule:E=>z(\"POST\",D(\"/schedules\"),{body:E}),updateSchedule:(E,U)=>z(\"PATCH\",D(\\`/schedules/\\${encodeURIComponent(E)}\\`),{body:U}),deleteSchedule:async E=>{await z(\"DELETE\",D(\\`/schedules/\\${encodeURIComponent(E)}\\`))},runSchedule:E=>z(\"POST\",D(\\`/schedules/\\${encodeURIComponent(E)}/run\\`),{body:{}}),config:()=>z(\"GET\",D(\"/config\")),setConfig:(E,U,J)=>z(\"PATCH\",D(\"/config\"),{body:{path:E,value:U,...J?.confirm===void 0?{}:{confirm:J.confirm}}}),session:E=>z(\"GET\",D(\\`/sessions/\\${encodeURIComponent(E)}\\`)),setPhase:(E,U)=>z(\"POST\",D(\\`/sessions/\\${encodeURIComponent(E)}/phase\\`),{body:{phase:U}}),approve:async(E,U)=>{await z(\"POST\",D(\\`/approvals/\\${encodeURIComponent(E)}\\`),{body:{granted:U}})},stop:E=>z(\"POST\",D(\"/stop\"),{body:E===void 0?{}:{reason:E}}),start:()=>z(\"POST\",D(\"/start\"),{body:{}}),context:E=>{const U=new URLSearchParams;E?.sessionKey!==void 0&&U.set(\"sessionKey\",E.sessionKey),E?.input!==void 0&&U.set(\"input\",E.input);const J=U.size===0?\"\":\\`?\\${U.toString()}\\`;return z(\"GET\",D(\\`/context\\${J}\\`))}}}return{agent:H,agents:()=>z(\"GET\",\"/v1/agents\"),health:()=>z(\"GET\",\"/v1/health\"),async ready(){try{return await j(\"GET\",\"/v1/ready\"),!0}catch(g){if(g instanceof Xt&&g.status===503)return!1;throw g}},provision:()=>z(\"GET\",\"/v1/provision\"),keys:()=>z(\"GET\",\"/v1/keys\"),createKey:g=>z(\"POST\",\"/v1/keys\",{body:g}),revokeKey:g=>z(\"DELETE\",\\`/v1/keys/\\${encodeURIComponent(g)}\\`),createAgent:g=>z(\"POST\",\"/v1/agents\",{body:{answers:g}}),async*events(g){const D=new URLSearchParams;g?.agentId!==void 0&&D.set(\"agentId\",g.agentId),g?.types!==void 0&&g.types.length>0&&D.set(\"types\",g.types.join(\",\")),g?.chunks===!0&&D.set(\"chunks\",\"true\");const E=D.size===0?\"\":\\`?\\${D.toString()}\\`,U=await C(\\`/v1/events\\${E}\\`,g?.signal);yield*ly(U)}}}function uy(c){return d.jsxs(d.Fragment,{children:[c.state.truncated?d.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,c.state.rows.map(s=>d.jsx(iy,{row:s,onAnswer:c.onAnswer},s.id)),c.state.liveReasoning===\"\"?null:d.jsx(nh,{label:\"thinking\",text:c.state.liveReasoning,open:!0}),c.state.live===\"\"?null:d.jsx(\"p\",{className:\"row\",children:c.state.live})]})}function iy(c){const s=c.row;switch(s.kind){case\"user\":return d.jsx(\"p\",{className:\"row user\",children:s.text});case\"reply\":return d.jsx(\"p\",{className:\"row\",children:s.text});case\"reasoning\":return d.jsx(nh,{label:\"thinking\",text:s.text});case\"tool\":return d.jsxs(\"div\",{className:\\`row tool\\${s.ok===!1?\" failed\":\"\"}\\`,children:[d.jsx(\"span\",{className:\"slug\",children:s.slug}),s.mutating?d.jsx(\"span\",{className:\"mut\",children:\" changes things\"}):null,d.jsx(\"span\",{className:\"out\",children:cy(s)}),s.untrusted===!0?d.jsx(\"div\",{className:\"fence\",children:d.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 d.jsxs(\"div\",{className:\"row ask\",children:[d.jsxs(\"div\",{children:[d.jsx(\"strong\",{children:s.slug}),\" needs permission — \",s.reason]}),s.match===void 0?null:d.jsx(\"div\",{className:\"what\",children:s.match}),s.settled===void 0?d.jsxs(\"div\",{className:\"buttons\",children:[d.jsx(\"button\",{type:\"button\",className:\"primary\",onClick:()=>c.onAnswer(s.approvalId,!0),children:\"Allow once\"}),d.jsx(\"button\",{type:\"button\",onClick:()=>c.onAnswer(s.approvalId,!1),children:\"Refuse\"})]}):d.jsx(\"div\",{className:\"settled\",children:fy(s.settled)})]});case\"note\":return d.jsx(\"p\",{className:\\`row note\\${s.bad?\" bad\":\"\"}\\`,children:s.text})}}function cy(c){if(c.ok===void 0)return\" running…\";const s=c.bytes===void 0?\"\":\\` · \\${c.bytes} bytes\\`,r=c.truncated===!0?\" · truncated to fit the observation budget\":\"\",o=c.latencyMs===void 0?\"\":\\` · \\${c.latencyMs} ms\\`;return\\`\\${c.ok?\" ok\":\" failed\"}\\${s}\\${o}\\${r}\\`}function fy(c){switch(c){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 nh(c){return d.jsxs(\"details\",{className:\"row fold\",open:c.open===!0,children:[d.jsxs(\"summary\",{children:[c.label,\" · \",c.text.length,\" chars\"]}),d.jsx(\"div\",{className:\"body\",children:c.text})]})}function sy(c){const s=w.useRef(null);return w.useEffect(()=>{const r=s.current;r!==null&&(r.style.height=\"auto\",r.style.height=\\`\\${Math.min(r.scrollHeight,190)}px\\`)},[c.value]),d.jsxs(\"div\",{className:\"composer\",children:[d.jsxs(\"div\",{className:\"inner\",children:[d.jsx(\"textarea\",{ref:s,value:c.value,placeholder:\"Ask the agent something\",onChange:r=>c.onChange(r.target.value),onKeyDown:r=>{r.key===\"Enter\"&&!r.shiftKey&&(r.preventDefault(),c.onSend())}}),c.busy?d.jsx(\"button\",{type:\"button\",onClick:c.onStop,children:\"Stop\"}):d.jsx(\"button\",{type:\"button\",className:\"primary\",disabled:c.value.trim()===\"\",onClick:c.onSend,children:\"Send\"})]}),d.jsx(\"p\",{className:\"hint\",children:c.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 Hf=\"dispach.key\";function oy(){const c=new URL(window.location.href),s=c.searchParams.get(\"claim\");if(!(s===null||s===\"\"))return c.searchParams.delete(\"claim\"),window.history.replaceState({},\"\",c.pathname+c.search+c.hash),s}function Df(){try{return window.localStorage.getItem(Hf)??void 0}catch{return}}function qf(c){try{window.localStorage.setItem(Hf,c)}catch{}}function Bf(){try{window.localStorage.removeItem(Hf)}catch{}}async function uh(c,s){const r=await fetch(\\`\\${c}/v1/keys\\`,{method:\"POST\",headers:{\"content-type\":\"application/json\",authorization:\\`Bearer \\${s}\\`},body:JSON.stringify({label:dy()})}),o=await r.json();if(!r.ok||typeof o.secret!=\"string\")throw new Error(o.error?.message??\\`The claim was refused (\\${r.status}).\\`);return o.secret}function dy(){const c=navigator.userAgent;return\\`\\${/Firefox\\\\//.test(c)?\"Firefox\":/Edg\\\\//.test(c)?\"Edge\":/Chrome\\\\//.test(c)?\"Chrome\":/Safari\\\\//.test(c)?\"Safari\":\"browser\"} · \\${new Date().toISOString().slice(0,10)}\\`}async function ry(c){const s=oy();if(s!==void 0)try{const o=await uh(c,s);return qf(o),{kind:\"key\",secret:o}}catch(o){const j=o instanceof Error?o.message:String(o);if(Df()===void 0)return{kind:\"needed\",because:j}}const r=Df();return r!==void 0&&await Fr(c,r)?{kind:\"key\",secret:r}:(r!==void 0&&Bf(),await Fr(c,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 Fr(c,s){try{return await ih(c,s).agents(),!0}catch(r){if(r instanceof Xt&&r.code===\"unauthorized\")return!1;throw r}}function ih(c,s){return ny({baseUrl:c,...s===void 0?{}:{token:s}})}function hy(c,s){const r=[c.scope?.agents===void 0?\"every agent\":c.scope.agents.join(\", \"),...c.scope?.sessions===void 0?[]:[\\`sessions \\${c.scope.sessions}\\`],c.scope?.can===void 0?\"all capabilities\":c.scope.can.join(\"+\")];return c.expiresAt!==void 0&&r.push(Date.parse(c.expiresAt)<=s?\"expired\":\\`until \\${ii(c.expiresAt)}\\`),r.join(\" · \")}function vy(c){const[s,r]=w.useState([]),[o,j]=w.useState(),[z,C]=w.useState(\"\"),[L,H]=w.useState(),[g,D]=w.useState(),E=w.useCallback((q={})=>({...q,...c.token===void 0?{}:{authorization:\\`Bearer \\${c.token}\\`}}),[c.token]),U=w.useCallback(async()=>{try{const q=await fetch(\\`\\${c.baseUrl}/v1/keys\\`,{headers:E()}),Ee=await q.json();if(!q.ok)throw new Error(Ee.error?.message??\\`HTTP \\${q.status}\\`);r(Ee.keys??[]),j(Ee.scope)}catch(q){D(q instanceof Error?q.message:String(q))}},[c.baseUrl,E]);w.useEffect(()=>{U()},[U]);const J=async()=>{D(void 0);try{const q=await fetch(\\`\\${c.baseUrl}/v1/keys\\`,{method:\"POST\",headers:E({\"content-type\":\"application/json\"}),body:JSON.stringify({label:z.trim()})}),Ee=await q.json();if(!q.ok||Ee.secret===void 0)throw new Error(Ee.error?.message??\\`HTTP \\${q.status}\\`);H(Ee.secret),C(\"\"),await U()}catch(q){D(q instanceof Error?q.message:String(q))}},W=async q=>{if(D(void 0),!window.confirm(\\`Revoke \"\\${q.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 Ee=Df();try{const $=await fetch(\\`\\${c.baseUrl}/v1/keys/\\${q.keyId}\\`,{method:\"DELETE\",headers:E()});if(!$.ok){const Pe=await $.json();throw new Error(Pe.error?.message??\\`HTTP \\${$.status}\\`)}if(Ee!==void 0&&!await my(c.baseUrl,Ee)){Bf(),window.location.reload();return}await U()}catch($){D($ instanceof Error?$.message:String($))}};return d.jsxs(d.Fragment,{children:[d.jsxs(\"div\",{className:\"card\",children:[d.jsx(\"h2\",{children:\"Issue a key\"}),d.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.\"}),L===void 0?null:d.jsxs(d.Fragment,{children:[d.jsx(\"div\",{className:\"secret\",children:L}),d.jsxs(\"p\",{className:\"hint\",style:{margin:\"0 0 12px\"},children:[\"Copy it now. This is the only time it is readable.\",\" \",d.jsx(\"button\",{type:\"button\",style:{padding:\"2px 8px\",fontSize:11},onClick:()=>{qf(L),window.location.reload()},children:\"use it in this browser\"})]})]}),d.jsxs(\"div\",{style:{display:\"flex\",gap:8},children:[d.jsx(\"input\",{value:z,placeholder:\"my laptop\",onChange:q=>C(q.target.value)}),d.jsx(\"button\",{type:\"button\",className:\"primary\",disabled:z.trim()===\"\",onClick:()=>void J(),children:\"Issue\"})]})]}),d.jsxs(\"div\",{className:\"card\",children:[d.jsx(\"h2\",{children:\"Keys\"}),d.jsx(\"p\",{children:o??\"…\"}),g===void 0?null:d.jsx(\"p\",{className:\"note bad\",children:g}),d.jsxs(\"table\",{children:[d.jsx(\"thead\",{children:d.jsxs(\"tr\",{children:[d.jsx(\"th\",{children:\"Label\"}),d.jsx(\"th\",{children:\"Created\"}),d.jsx(\"th\",{children:\"Reaches\"}),d.jsx(\"th\",{children:\"Last used\"}),d.jsx(\"th\",{})]})}),d.jsx(\"tbody\",{children:s.map(q=>d.jsxs(\"tr\",{children:[d.jsx(\"td\",{className:q.revokedAt===void 0?\"\":\"revoked\",children:q.label}),d.jsx(\"td\",{children:ii(q.createdAt)}),d.jsx(\"td\",{className:\"sub\",children:hy(q,Date.now())}),d.jsx(\"td\",{children:q.revokedAt!==void 0?\\`revoked \\${ii(q.revokedAt)}\\`:q.lastUsedAt===void 0?\"never\":ii(q.lastUsedAt)}),d.jsx(\"td\",{children:q.revokedAt===void 0?d.jsx(\"button\",{type:\"button\",className:\"bad\",style:{padding:\"2px 9px\",fontSize:11},onClick:()=>void W(q),children:\"revoke\"}):null})]},q.keyId))})]}),s.length===0?d.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 my(c,s){try{return(await fetch(\\`\\${c}/v1/agents\\`,{headers:{authorization:\\`Bearer \\${s}\\`}})).ok}catch{return!0}}function ii(c){const s=new Date(c);return Number.isNaN(s.getTime())?c:s.toISOString().slice(0,10)}const yy=[\"chat\",\"new\",\"tools\",\"schedules\",\"channels\",\"config\",\"keys\"];function gy(c){return c!==null&&yy.includes(c)}function by(c){const s=new URL(c).searchParams,r=s.get(\"agent\"),o=s.get(\"panel\");return{...r===null||r===\"\"?{}:{agentId:r},panel:gy(o)?o:\"chat\"}}function Sy(c,s){const r=new URL(c);return s.agentId===void 0||s.agentId===\"\"?r.searchParams.delete(\"agent\"):r.searchParams.set(\"agent\",s.agentId),s.panel===\"chat\"?r.searchParams.delete(\"panel\"):r.searchParams.set(\"panel\",s.panel),\\`\\${r.pathname}\\${r.search}\\`}function py(){let c,s;return{begin(r){if(c!==r)return s?.abort(),c=r,s=new AbortController,s.signal},finish(r){c===r&&(c=void 0,s=void 0)},abort(){s?.abort()},following:()=>c,aborted:()=>s?.signal.aborted??!1}}function Ty(c){const s={};for(const r of c)s[r.step]=r.fallback;return s}const Ey=8;function zy(c,s,r){let o=s;for(let j=0;j<Ey;j+=1){if(o===void 0)return!1;const z=o.requires;if(z===void 0)return!0;if(r[z.step]!==z.value)return!1;o=c.find(C=>C.step===z.step)}return!1}function ci(c,s){return c.filter(r=>zy(c,r,s))}function ch(c,s){return ci(c,s).filter(r=>r.optional!==!0&&(s[r.step]??\"\").trim()===\"\")}function Ay(c,s){const r={};for(const o of ci(c,s)){const j=(s[o.step]??\"\").trim();j!==\"\"&&(r[o.step]=j)}return r}function xy(c,s){return ci(c,s).filter(r=>r.secret&&(s[r.step]??\"\").trim()===\"\")}function jy(c){return{...wn,filter:c===\"nlt\"?Fm():Pr()}}const wn={filter:Pr(),rows:[],live:\"\",liveReasoning:\"\",running:!1,truncated:!1};let Ir=0;function il(){return Ir+=1,\\`r\\${Ir}\\`}function _y(c,s){return{...c,rows:[...c.rows,{kind:\"user\",id:il(),text:s}],running:!0}}function Ny(c,s){switch(s.kind){case\"accepted\":return c;case\"replay\":return s.report.truncated?{...c,truncated:!0}:c;case\"ended\":return{...c,running:!1,rows:[...c.rows,{kind:\"note\",id:il(),text:\\`This turn finished before the page attached — \\${s.status}. Its reply is stored.\\`,bad:s.status!==\"final\"}]};case\"unavailable\":return{...c,running:!1,rows:[...c.rows,{kind:\"note\",id:il(),text:s.reason,bad:!0}]};case\"event\":return Oy(c,s.event)}}function Oy(c,s){switch(s.type){case\"turn.start\":return{...c,running:!0};case\"model.chunk\":{const r=s.data;if(r.kind===\"reasoning\")return{...c,liveReasoning:c.liveReasoning+r.delta};const o=c.filter.push(r.delta);return o===\"\"?c:{...c,live:c.live+o}}case\"model.result\":return ni({...c,live:c.live+c.filter.endStep()});case\"tool.call\":{const r=s.data,o=ni(c);return{...o,rows:[...o.rows,{kind:\"tool\",id:il(),callId:r.callId,slug:r.slug,mutating:r.mutating}]}}case\"tool.result\":{const r=s.data,o=c.rows.findIndex(C=>C.kind===\"tool\"&&C.callId===r.callId);if(o===-1)return c;const j=c.rows[o];if(j===void 0||j.kind!==\"tool\")return c;const z=[...c.rows];return z[o]={...j,ok:r.ok,bytes:r.bytes,truncated:r.truncated,latencyMs:r.latencyMs,...r.trust===\"untrusted\"?{untrusted:!0}:{}},{...c,rows:z}}case\"approval.requested\":{const r=s.data,o=ni(c);return{...o,rows:[...o.rows,{kind:\"approval\",id:il(),approvalId:r.approvalId,slug:r.slug,...r.match===void 0?{}:{match:r.match},reason:r.reason}]}}case\"approval.resolved\":{const r=s.data,o=c.rows.findIndex(C=>C.kind===\"approval\"&&C.approvalId===r.approvalId);if(o===-1)return c;const j=c.rows[o];if(j===void 0||j.kind!==\"approval\")return c;const z=[...c.rows];return z[o]={...j,settled:r.by===\"abandoned\"?\"abandoned\":r.by===\"error\"?\"error\":r.granted?\"granted\":\"denied\"},{...c,rows:z}}case\"agent.warning\":{const r=s.data;return{...c,rows:[...c.rows,{kind:\"note\",id:il(),text:r.message??\"\",bad:!1}]}}case\"turn.end\":{const r=s.data,o=ni({...c,live:c.live+c.filter.end()}),j=Zm(r.reason,{steps:r.steps});return{...o,running:!1,rows:j===void 0?o.rows:[...o.rows,{kind:\"note\",id:il(),text:j,bad:Qm(r.reason)}]}}default:return c}}function ni(c){if(c.live===\"\"&&c.liveReasoning===\"\")return c;const s=[...c.rows],r=c.liveReasoning.trim();r!==\"\"&&s.push({kind:\"reasoning\",id:il(),text:r});const o=c.live.trim();return o!==\"\"&&s.push({kind:\"reply\",id:il(),text:o}),{...c,rows:s,live:\"\",liveReasoning:\"\"}}function My(c){if(!c.available)return d.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 \",d.jsx(\"code\",{children:\"dispach init\"}),\" \",\"where the sandbox is, or mount an agent directory.\"]});if(!c.allowed)return d.jsxs(\"p\",{className:\"empty\",children:[\"Creating an agent needs a loopback bind or a credential with the \",d.jsx(\"code\",{children:\"admin\"}),\" \",\"capability, and this request has neither. On a server reachable from elsewhere, set\",\" \",d.jsx(\"code\",{children:\"server.tokenEnv\"}),\" or present an operator key minted with\",\" \",d.jsx(\"code\",{children:\"can: [admin]\"}),\" — or mount a written agent at \",d.jsx(\"code\",{children:\"/agent\"}),\".\"]})}function Uy(c){const{step:s,value:r}=c,o=\\`provision-\\${s.step}\\`;return d.jsxs(\"div\",{className:c.invalid?\"field invalid\":\"field\",children:[d.jsxs(\"label\",{htmlFor:o,children:[s.prompt,s.optional?d.jsx(\"span\",{className:\"sub\",children:\" optional\"}):null,s.secret?d.jsx(\"span\",{className:\"sub\",children:\" · written to .env, never read back\"}):null]}),s.choices===void 0?d.jsx(\"input\",{id:o,name:s.step,type:s.secret?\"password\":\"text\",value:r,disabled:c.disabled,autoComplete:s.secret?\"new-password\":\"off\",spellCheck:!1,onChange:j=>c.onChange(j.target.value)}):d.jsx(\"select\",{id:o,name:s.step,value:r,disabled:c.disabled,onChange:j=>c.onChange(j.target.value),children:s.choices.map(j=>d.jsx(\"option\",{value:j.value,children:j.hint===void 0?j.label:\\`\\${j.label} — \\${j.hint}\\`},j.value))}),c.invalid?d.jsx(\"div\",{className:\"sub error\",children:\"needs an answer\"}):null]})}function Dy(c){const s=c.result.adopted.includes(c.result.id);return d.jsxs(\"div\",{className:\"created\",children:[d.jsxs(\"h3\",{children:[\"Created \",d.jsx(\"code\",{children:c.result.id})]}),d.jsxs(\"p\",{children:[d.jsx(\"code\",{children:c.result.dir}),d.jsxs(\"span\",{className:\"sub\",children:[\" · \",c.result.files.length,\" files\"]})]}),s?d.jsx(\"p\",{className:\"ok\",children:\"adopted · live on this host, with its channels and schedules\"}):d.jsxs(\"p\",{className:\"error\",children:[\"written, and \",d.jsx(\"strong\",{children:\"not running\"}),c.result.error===void 0?null:d.jsxs(d.Fragment,{children:[\": \",c.result.error.message,c.result.error.hint===void 0?null:d.jsxs(\"span\",{className:\"sub\",children:[\" \",c.result.error.hint]})]})]}),c.blank.length===0?null:d.jsxs(\"div\",{className:\"blank-secrets\",children:[d.jsxs(\"p\",{children:[\"Left empty, and needed before this works:\",\" \",c.blank.map(r=>r.prompt).join(\", \"),\".\"]}),d.jsxs(\"p\",{className:\"sub\",children:[\"Fill them in \",d.jsxs(\"code\",{children:[c.result.dir,\"/.env\"]}),\" at a terminal —\",\" \",d.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.\"]})]}),s?d.jsxs(\"button\",{type:\"button\",onClick:()=>c.onOpen(c.result.id),children:[\"open \",c.result.id]}):null]})}function Cy(c){if(c.result!==void 0)return d.jsx(Dy,{result:c.result,blank:xy(c.offer.steps,c.answers),onOpen:c.onOpen});const s=My(c.offer);if(s!==void 0)return s;const r=ci(c.offer.steps,c.answers),o=ch(c.offer.steps,c.answers),j=new Set(o.map(z=>z.step));return d.jsxs(\"form\",{className:\"provision\",onSubmit:z=>{z.preventDefault(),c.onSubmit()},children:[d.jsxs(\"p\",{className:\"sub\",children:[\"The same questions \",d.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(z=>d.jsx(Uy,{step:z,value:c.answers[z.step]??\"\",invalid:c.touched&&j.has(z.step),disabled:c.busy,onChange:C=>c.onAnswer(z.step,C)},z.step)),c.error===void 0?null:d.jsx(\"p\",{className:\"error\",children:c.error}),d.jsx(\"button\",{type:\"submit\",disabled:c.busy,children:c.busy?\"creating…\":\"create agent\"}),c.touched&&o.length>0?d.jsxs(\"p\",{className:\"sub error\",children:[o.map(z=>z.prompt).join(\", \"),\" — still needed.\"]}):null]})}function fh(c){return c==null?\"\":typeof c==\"string\"?c:typeof c==\"number\"||typeof c==\"boolean\"?String(c):JSON.stringify(c)}function Ry(c){return!(c.text.trim()===\"\"||c.text===fh(c.setting.value)||c.setting.confirm!==void 0&&!c.confirmed)}function Hy(c){return c.agents.length===0?d.jsx(\"div\",{className:\"empty\",style:{fontSize:12,padding:\"4px 8px\"},children:\"no agents on this server\"}):d.jsx(d.Fragment,{children:c.agents.map(s=>{const r=s.status===\"disabled\";return d.jsxs(\"div\",{className:\"agent-row\",children:[d.jsxs(\"button\",{type:\"button\",className:\"row-button\",\"aria-current\":s.id===c.current,disabled:r,onClick:()=>c.onSelect(s.id),children:[s.name,r?d.jsx(\"span\",{className:\"agent-off\",children:\" · stopped\"}):null]}),r?d.jsxs(\"div\",{className:\"agent-note\",children:[s.reason??\"switched off\",d.jsx(\"button\",{type:\"button\",className:\"link\",disabled:c.starting===s.id,onClick:()=>c.onStart(s.id),children:c.starting===s.id?\"starting…\":\"start\"})]}):null]},s.id)})})}function qy(c){return c.tools.length===0?d.jsxs(\"p\",{className:\"empty\",children:[\"No tools are pinned. An agent with none can still hold a conversation; a manifest's\",\" \",d.jsx(\"code\",{children:\"tools.pinned\"}),\" is what grants the rest.\"]}):d.jsxs(\"table\",{className:\"panel-table\",children:[d.jsx(\"thead\",{children:d.jsxs(\"tr\",{children:[d.jsx(\"th\",{children:\"tool\"}),d.jsx(\"th\",{children:\"provider\"}),d.jsx(\"th\",{children:\"writes\"}),d.jsx(\"th\",{children:\"trust\"})]})}),d.jsx(\"tbody\",{children:c.tools.map(s=>d.jsxs(\"tr\",{children:[d.jsxs(\"td\",{children:[d.jsx(\"code\",{children:s.slug}),d.jsx(\"div\",{className:\"sub\",children:s.summary})]}),d.jsx(\"td\",{children:s.provider}),d.jsx(\"td\",{children:s.mutating?\"yes\":\"no\"}),d.jsxs(\"td\",{children:[s.trust,s.trustReason===void 0?null:d.jsx(\"div\",{className:\"sub\",children:s.trustReason})]})]},s.slug))})]})}function By(c){return d.jsxs(d.Fragment,{children:[c.schedules.length===0?d.jsxs(\"p\",{className:\"empty\",children:[\"No schedules. Add one below, or declare it in the manifest's\",\" \",d.jsx(\"code\",{children:\"schedules:\"}),\" block — a declared one survives a rebuild and shows up in a diff.\"]}):d.jsxs(\"table\",{className:\"panel-table\",children:[d.jsx(\"thead\",{children:d.jsxs(\"tr\",{children:[d.jsx(\"th\",{children:\"schedule\"}),d.jsx(\"th\",{children:\"when\"}),d.jsx(\"th\",{children:\"next\"}),d.jsx(\"th\",{children:\"delivers to\"}),d.jsx(\"th\",{children:\"declared in\"}),d.jsx(\"th\",{})]})}),d.jsx(\"tbody\",{children:c.schedules.map(s=>{const r=s.origin===\"manifest\",o=c.busy===s.id;return d.jsxs(\"tr\",{className:s.enabled?\"\":\"off\",children:[d.jsxs(\"td\",{children:[d.jsx(\"code\",{children:s.id}),d.jsx(\"div\",{className:\"sub\",children:s.task})]}),d.jsxs(\"td\",{children:[s.kind,\" \",s.expr,s.timezone===void 0?null:d.jsx(\"div\",{className:\"sub\",children:s.timezone})]}),d.jsx(\"td\",{children:s.enabled?s.nextRunAt??\"never again — a spent one-shot\":\"disabled\"}),d.jsx(\"td\",{children:s.deliverChannel===void 0?\"this session only\":\\`\\${s.deliverChannel}\\${s.deliverTo===void 0?\"\":\\` → \\${s.deliverTo}\\`}\\`}),d.jsxs(\"td\",{children:[r?\"agent.yaml\":\"the API\",r?d.jsxs(\"div\",{className:\"sub\",children:[\"the manifest decides it — edit the file, or the\",\" \",d.jsx(\"code\",{children:\"schedules\"}),\" field under config\"]}):null]}),d.jsxs(\"td\",{style:{whiteSpace:\"nowrap\"},children:[c.onRun===void 0?null:d.jsx(\"button\",{type:\"button\",disabled:o,onClick:()=>c.onRun?.(s.id),children:\"run now\"}),c.onToggle===void 0||r?null:d.jsx(\"button\",{type:\"button\",disabled:o,onClick:()=>c.onToggle?.(s.id,!s.enabled),children:s.enabled?\"disable\":\"enable\"}),c.onDelete===void 0||r?null:d.jsx(\"button\",{type:\"button\",disabled:o,onClick:()=>c.onDelete?.(s.id),children:\"delete\"})]})]},s.id)})})]}),c.onCreate===void 0?null:d.jsx(Yy,{onCreate:c.onCreate})]})}function Yy(c){const[s,r]=w.useState(\"\"),[o,j]=w.useState(\"cron\"),[z,C]=w.useState(\"\"),[L,H]=w.useState(\"\"),[g,D]=w.useState(\"\"),[E,U]=w.useState(\"\"),J=s.trim()!==\"\"&&z.trim()!==\"\"&&L.trim()!==\"\";return d.jsxs(\"section\",{style:{marginTop:24},children:[d.jsx(\"h3\",{style:{fontSize:13,margin:\"0 0 8px\"},children:\"Add a schedule\"}),d.jsxs(\"div\",{className:\"form-grid\",children:[d.jsx(\"label\",{htmlFor:\"sched-id\",children:\"id\"}),d.jsx(\"input\",{id:\"sched-id\",value:s,placeholder:\"morning-brief\",onChange:W=>r(W.target.value)}),d.jsx(\"label\",{htmlFor:\"sched-kind\",children:\"kind\"}),d.jsxs(\"select\",{id:\"sched-kind\",value:o,onChange:W=>j(W.target.value),children:[d.jsx(\"option\",{value:\"cron\",children:\"cron — a 5- or 6-field expression\"}),d.jsx(\"option\",{value:\"every\",children:\"every — a duration like 15m\"}),d.jsx(\"option\",{value:\"at\",children:\"at — one ISO instant, once\"})]}),d.jsx(\"label\",{htmlFor:\"sched-expr\",children:\"expr\"}),d.jsx(\"input\",{id:\"sched-expr\",value:z,placeholder:o===\"cron\"?\"0 8 * * *\":o===\"every\"?\"15m\":\"\",onChange:W=>C(W.target.value)}),d.jsx(\"label\",{htmlFor:\"sched-task\",children:\"task\"}),d.jsx(\"input\",{id:\"sched-task\",value:L,placeholder:\"Summarise today's calendar.\",onChange:W=>H(W.target.value)}),d.jsx(\"label\",{htmlFor:\"sched-channel\",children:\"deliver\"}),d.jsxs(\"div\",{children:[d.jsx(\"input\",{id:\"sched-channel\",value:g,placeholder:\"channel id — blank for this session only\",onChange:W=>D(W.target.value)}),g.trim()===\"\"?null:d.jsxs(d.Fragment,{children:[d.jsx(\"input\",{value:E,placeholder:\"address\",onChange:W=>U(W.target.value)}),d.jsxs(\"p\",{className:\"sub\",children:[\"The address a reply is \",d.jsx(\"em\",{children:\"sent\"}),\" to — on Telegram the numeric chat id, never an \",d.jsx(\"code\",{children:\"@handle\"}),\", which addresses a channel and not a person. It is the id inbound messages arrive on.\"]})]})]})]}),d.jsx(\"button\",{type:\"button\",disabled:!J,style:{marginTop:10},onClick:()=>c.onCreate({id:s.trim(),kind:o,expr:z.trim(),task:L.trim(),deliver:g.trim()===\"\"?\"none\":{channel:g.trim(),to:E.trim()}}),children:\"add\"})]})}function wy(c){return c.editable?d.jsxs(d.Fragment,{children:[d.jsxs(\"p\",{className:\"sub\",style:{marginTop:0},children:[c.file===void 0?null:d.jsxs(d.Fragment,{children:[d.jsx(\"code\",{children:c.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.\"]}),c.note===void 0?null:d.jsx(\"p\",{className:\"row note\",children:c.note}),c.settings.map(s=>d.jsx(Gy,{setting:s,busy:c.busy===s.path,onSet:c.onSet},s.path))]}):d.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 Gy(c){const s=fh(c.setting.value),[r,o]=w.useState(s),[j,z]=w.useState(!1),[C,L]=w.useState(s);C!==s&&(L(s),o(s),z(!1));const H=Ry({setting:c.setting,text:r,confirmed:j}),g=s.length>48||s.includes(\"{\")||s.includes(\"[\");return d.jsxs(\"section\",{className:\"config-row\",children:[d.jsxs(\"div\",{className:\"config-head\",children:[d.jsx(\"code\",{children:c.setting.path}),c.setting.value===void 0?d.jsx(\"span\",{className:\"sub\",children:\" not set\"}):null]}),d.jsx(\"p\",{className:\"sub\",children:c.setting.means}),g?d.jsx(\"textarea\",{rows:2,value:r,\"aria-label\":c.setting.path,onChange:D=>o(D.target.value)}):d.jsx(\"input\",{value:r,\"aria-label\":c.setting.path,onChange:D=>o(D.target.value)}),c.setting.confirm===void 0?null:d.jsxs(\"label\",{className:\"row note bad\",style:{display:\"block\"},children:[d.jsx(\"input\",{type:\"checkbox\",checked:j,onChange:D=>z(D.target.checked)}),\" \",c.setting.confirm]}),d.jsx(\"button\",{type:\"button\",disabled:!H||c.busy,onClick:()=>c.onSet(c.setting.path,r,{confirm:j}),children:c.busy?\"saving…\":\"save\"})]})}function Xy(c){return c.channels.length===0?d.jsx(\"p\",{className:\"empty\",children:\"No channels. This agent is reached through this page and the HTTP API only.\"}):d.jsx(\"div\",{className:\"channels\",children:c.channels.map(s=>{const r=s.input,o=r?.expiresAt!==void 0&&Date.parse(r.expiresAt)<=c.now;return d.jsxs(\"section\",{className:\"channel\",children:[d.jsxs(\"h3\",{children:[d.jsx(\"code\",{children:s.id}),\" \",d.jsx(\"span\",{className:\"sub\",children:s.type})]}),d.jsxs(\"p\",{className:\\`status status-\\${s.status}\\`,children:[s.status,s.detail===void 0?null:\\` — \\${s.detail}\\`]}),r===void 0?null:d.jsxs(\"div\",{className:\\`channel-input \\${o?\"stale\":\"fresh\"}\\`,children:[o?d.jsx(\"p\",{className:\"warn\",children:\"this expired — the channel will issue another\"}):null,d.jsx(\"pre\",{className:\"payload\",\"data-kind\":r.kind,children:r.payload}),d.jsxs(\"p\",{className:\"sub\",children:[r.kind,\" · issued \",r.issuedAt,r.expiresAt===void 0?\" · no expiry reported\":\\` · expires \\${r.expiresAt}\\`]})]})]},s.id)})})}const Qy=[{panel:\"tools\",label:\"tools\"},{panel:\"schedules\",label:\"schedules\"},{panel:\"channels\",label:\"channels\"},{panel:\"config\",label:\"config\"},{panel:\"keys\",label:\"keys\"}],Mf=\"dispach.turn\";function Zy(c){const[s,r]=w.useState(),[o,j]=w.useState();return w.useEffect(()=>{ry(c.baseUrl).then(r).catch(z=>j(z instanceof Error?z.message:String(z)))},[c.baseUrl]),o!==void 0?d.jsxs(Cf,{title:\"Cannot reach the server\",children:[d.jsx(\"p\",{children:o}),d.jsx(\"button\",{type:\"button\",onClick:()=>window.location.reload(),children:\"Try again\"})]}):s===void 0?d.jsx(Cf,{title:\"Connecting…\"}):s.kind===\"needed\"?d.jsx(Ly,{baseUrl:c.baseUrl,because:s.because}):d.jsx(Vy,{baseUrl:c.baseUrl,token:s.kind===\"key\"?s.secret:void 0})}function Cf(c){return d.jsx(\"div\",{className:\"gate\",children:d.jsxs(\"div\",{className:\"card\",children:[d.jsx(\"h2\",{children:c.title}),c.children]})})}function Ly(c){const[s,r]=w.useState(\"\"),[o,j]=w.useState(),[z,C]=w.useState(!1),L=async H=>{C(!0),j(void 0);try{const g=H?await uh(c.baseUrl,s.trim()):s.trim();qf(g),window.location.reload()}catch(g){j(g instanceof Error?g.message:String(g)),C(!1)}};return d.jsxs(Cf,{title:\"This server needs a credential\",children:[d.jsx(\"p\",{children:c.because}),d.jsx(\"input\",{value:s,placeholder:\"paste a claim or an operator key\",onChange:H=>r(H.target.value)}),d.jsxs(\"p\",{className:\"hint\",style:{margin:\"8px 0 12px\"},children:[d.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.\"]}),d.jsx(\"div\",{className:\"ask\",children:d.jsxs(\"div\",{className:\"buttons\",children:[d.jsx(\"button\",{type:\"button\",className:\"primary\",disabled:z||s.trim()===\"\",onClick:()=>L(!0),children:\"Exchange a claim\"}),d.jsx(\"button\",{type:\"button\",disabled:z||s.trim()===\"\",onClick:()=>L(!1),children:\"Use as a key\"})]})}),o===void 0?null:d.jsx(\"p\",{className:\"note bad\",style:{marginTop:12},children:o})]})}const ui=c=>c instanceof Xt&&c.status===404,Ky={new:\"New agent\",tools:\"Tools\",schedules:\"Schedules\",channels:\"Channels\",config:\"Settings\",keys:\"Operator keys\"};function Vy(c){const s=w.useRef(ih(c.baseUrl,c.token)),[r,o]=w.useState([]),[j,z]=w.useState(),[C,L]=w.useState(),[H,g]=w.useState(),[D,E]=w.useState([]),U=w.useCallback(async()=>{z(void 0),L(void 0),E([]),ve(\"this agent is no longer running on this server — start it from the list\");try{o(await s.current.agents())}catch{}},[]),[J,W]=w.useState([]),[q,Ee]=w.useState(),[$,Pe]=w.useState(()=>by(window.location.href).panel),[_e,Ne]=w.useState(wn),[ft,we]=w.useState(\"\"),[P,ve]=w.useState(),et=w.useRef(void 0),Ht=w.useRef(py());w.useEffect(()=>{const M=new URL(window.location.href).searchParams.get(\"agent\")??void 0;s.current.agents().then(Q=>{o(Q);const ie=Q.filter(We=>We.status!==\"disabled\"),Oe=ie.find(We=>We.id===M)??ie[0];if(Oe===void 0){new URL(window.location.href).searchParams.get(\"panel\")===null&&Pe(\"new\");return}z(Oe.id),L(Oe.name),Ne(We=>({...We,filter:jy(Oe.dialect??\"nlt\").filter})),document.title=\\`\\${Oe.name} · Dispach\\`}).catch(Q=>ve(Rt(Q)))},[]);const fe=w.useMemo(()=>j===void 0?void 0:s.current.agent(j),[j]),Ge=w.useCallback(async()=>{if(fe!==void 0)try{W(await fe.sessions()),ve(void 0)}catch(M){ui(M)?U():ve(Rt(M))}},[fe,U]);w.useEffect(()=>{Ge()},[Ge]);const Ot=w.useCallback(async(M,Q)=>{const ie=Ht.current,Oe=ie.begin(M);if(Oe===void 0)return;const We=Q.turn(M);et.current=()=>We.stop();try{sessionStorage.setItem(Mf,M);for await(const Le of We.stream({chunks:!0,signal:Oe}))Ne(Qa=>Ny(Qa,Le))}catch(Le){Oe.aborted||(ve(Rt(Le)),Ne(Qa=>({...Qa,running:!1})))}finally{ie.finish(M),sessionStorage.removeItem(Mf),et.current=void 0,Oe.aborted||Ge()}},[Ge]);w.useEffect(()=>{if(fe===void 0)return;const M=sessionStorage.getItem(Mf);if(M!==null)return Ne(Q=>({...Q,running:!0})),Ot(M,fe),()=>Ht.current.abort()},[fe,Ot]),w.useEffect(()=>{if(fe===void 0)return;let M=!0;const Q=()=>{fe.approvals().then(Oe=>{M&&E(Oe)}).catch(Oe=>{M&&ui(Oe)&&U()})};Q();const ie=window.setInterval(Q,5e3);return()=>{M=!1,window.clearInterval(ie)}},[fe,U]);const Mt=async()=>{const M=ft.trim();if(!(M===\"\"||fe===void 0)){we(\"\"),ve(void 0),Ne(Q=>_y(Q,M));try{const Q=await fe.send(M,{...q===void 0?{}:{sessionKey:q}});q===void 0&&Ee(Q.sessionKey),await Ot(Q.turnId,fe)}catch(Q){ve(Rt(Q)),Ne(ie=>({...ie,running:!1}))}}},st=async(M,Q)=>{if(fe!==void 0)try{await fe.approve(M,Q)}catch(ie){ie instanceof Xt&&ie.code===\"approval_not_found\"||ve(Rt(ie))}},x=async M=>{if(Ht.current.abort(),Pe(\"chat\"),Ee(M),Ne(wn),we(\"\"),!(M===void 0||fe===void 0))try{const Q=await ky(c.baseUrl,c.token,j??\"\",M);Ne({...wn,rows:Q})}catch(Q){ve(Rt(Q))}},[R,V]=w.useState({tools:[],schedules:[],channels:[]}),se=w.useCallback(async M=>{const[Q,ie,Oe,We]=await Promise.all([M.tools(),M.schedules(),M.describe(),M.config()]);V({tools:Q,schedules:ie,channels:Oe.channels??[],config:We})},[]);w.useEffect(()=>{if(fe===void 0||$!==\"tools\"&&$!==\"schedules\"&&$!==\"channels\"&&$!==\"config\")return;let M=!1;return(async()=>{try{if(await se(fe),M)return}catch(Q){if(M)return;ui(Q)?U():ve(Rt(Q))}})(),()=>{M=!0}},[fe,$,U,se]);const[de,m]=w.useState(),[O,B]=w.useState(),Y=w.useCallback(async(M,Q)=>{if(fe!==void 0){m(M),ve(void 0),B(void 0);try{const ie=await Q(fe);B(ie),await se(fe)}catch(ie){ui(ie)?U():ve(Rt(ie))}finally{m(void 0)}}},[fe,U,se]),F=w.useCallback((M,Q,ie)=>void Y(M,async Oe=>{const We=await Oe.setConfig(M,Q,{...ie.confirm?{confirm:!0}:{}});return We.applied?We.reflowed?\\`\\${M} saved. The manifest was re-serialised, so its comments have moved — worth a look at the diff.\\`:void 0:\\`\\${M} was written to the manifest and is not in force yet: \\${We.pending?.message??\"the agent could not be replaced\"} It takes effect at the next start.\\`}),[Y]),[k,oe]=w.useState(),[Re,xe]=w.useState({}),[Dl,Cl]=w.useState(!1),[wa,Ga]=w.useState(!1),[qt,Pl]=w.useState();w.useEffect(()=>{if($!==\"new\"||k!==void 0)return;let M=!1;return(async()=>{try{const Q=await s.current.provision();if(M)return;oe(Q),xe(Ty(Q.steps))}catch(Q){M||ve(Rt(Q))}})(),()=>{M=!0}},[$,k]);const Xa=w.useCallback(async()=>{if(k!==void 0&&(Cl(!0),!(ch(k.steps,Re).length>0))){Ga(!0),ve(void 0);try{const M=await s.current.createAgent(Ay(k.steps,Re));Pl(M),o(await s.current.agents())}catch(M){ve(Rt(M))}finally{Ga(!1)}}},[k,Re]),ea=w.useCallback(M=>{const Q=M.panel??$,ie=M.agentId??j;Pe(Q),M.agentId!==void 0&&M.agentId!==j&&(z(M.agentId),L(r.find(Oe=>Oe.id===M.agentId)?.name),Ee(void 0),Ne(wn),we(\"\")),window.history.replaceState(null,\"\",Sy(window.location.href,{...ie===void 0?{}:{agentId:ie},panel:Q}))},[j,r,$]),Gn=w.useCallback(async M=>{g(M);try{await s.current.agent(M).start(),o(await s.current.agents())}catch(Q){ve(Rt(Q))}finally{g(void 0)}},[]);return d.jsxs(\"div\",{className:\"shell\",children:[d.jsxs(\"aside\",{className:\"side\",children:[d.jsxs(\"header\",{children:[d.jsx(\"div\",{className:\"brand\",children:\"Dispach\"}),d.jsx(\"div\",{style:{fontSize:12,color:\"var(--dim)\"},children:C??\"…\"})]}),d.jsxs(\"nav\",{children:[r.length>1||r.some(M=>M.status===\"disabled\")?d.jsxs(d.Fragment,{children:[d.jsx(\"div\",{className:\"group\",children:\"Agents\"}),d.jsx(Hy,{agents:r,current:j,onSelect:M=>ea({agentId:M}),onStart:M=>void Gn(M),...H===void 0?{}:{starting:H}})]}):null,d.jsx(\"div\",{className:\"group\",children:\"Conversation\"}),d.jsx(\"button\",{type:\"button\",className:\"row-button\",\"aria-current\":$===\"chat\"&&q===void 0,onClick:()=>void x(void 0),children:\"+ new\"}),J.map(M=>d.jsx(\"button\",{type:\"button\",className:\"row-button\",\"aria-current\":$===\"chat\"&&q===M.sessionKey,onClick:()=>void x(M.sessionKey),children:M.sessionKey},M.sessionKey)),d.jsx(\"div\",{className:\"group\",children:\"Server\"}),d.jsx(\"button\",{type:\"button\",className:\"row-button\",\"aria-current\":$===\"new\",onClick:()=>ea({panel:\"new\"}),children:\"+ new agent\"}),Qy.map(M=>d.jsx(\"button\",{type:\"button\",className:\"row-button\",\"aria-current\":$===M.panel,onClick:()=>ea({panel:M.panel}),children:M.label},M.panel))]}),d.jsxs(\"footer\",{children:[d.jsx(\"span\",{className:\\`dot \\${_e.running?\"busy\":\"live\"}\\`}),d.jsx(\"span\",{style:{fontSize:11,color:\"var(--dim)\"},children:_e.running?\"working\":\"ready\"}),c.token===void 0?d.jsx(\"span\",{style:{fontSize:11,color:\"var(--warn)\",marginLeft:\"auto\"},children:\"unauthenticated\"}):d.jsx(\"button\",{type:\"button\",style:{marginLeft:\"auto\",padding:\"3px 8px\",fontSize:11},onClick:()=>{Bf(),window.location.reload()},children:\"forget key\"})]})]}),d.jsxs(\"main\",{className:\"main\",children:[d.jsxs(\"div\",{className:\"bar\",children:[d.jsx(\"strong\",{children:$===\"chat\"?C??\"\":Ky[$]}),$===\"chat\"?d.jsx(\"span\",{children:q??\"new conversation\"}):null,d.jsx(\"span\",{className:\"spacer\"}),D.length>0?d.jsxs(\"span\",{style:{color:\"var(--warn)\"},children:[D.length,\" waiting on you\"]}):null]}),$!==\"chat\"?d.jsx(\"div\",{className:\"scroll\",children:d.jsxs(\"div\",{className:\"pad\",children:[P===void 0?null:d.jsx(\"p\",{className:\"row note bad\",children:P}),$===\"new\"?k===void 0?d.jsx(\"p\",{className:\"empty\",children:\"reading this server's questions…\"}):d.jsx(Cy,{offer:k,answers:Re,busy:wa,touched:Dl,...P===void 0?{}:{error:P},...qt===void 0?{}:{result:qt},onAnswer:(M,Q)=>xe(ie=>({...ie,[M]:Q})),onSubmit:()=>void Xa(),onOpen:M=>{Pl(void 0),oe(void 0),Cl(!1),ea({agentId:M,panel:\"chat\"})}}):null,$===\"keys\"?d.jsx(vy,{client:s.current,baseUrl:c.baseUrl,token:c.token}):null,$===\"tools\"?d.jsx(qy,{tools:R.tools}):null,$===\"schedules\"?d.jsx(By,{schedules:R.schedules,...de===void 0?{}:{busy:de},onCreate:M=>void Y(String(M.id),Q=>Q.createSchedule(M).then(()=>{})),onDelete:M=>void Y(M,Q=>Q.deleteSchedule(M).then(()=>{})),onRun:M=>void Y(M,async Q=>{const ie=await Q.runSchedule(M);return\\`\\${M} fired out of band as \\${ie.turnId} — its next scheduled run has not moved.\\`}),onToggle:(M,Q)=>void Y(M,ie=>ie.updateSchedule(M,{enabled:Q}).then(()=>{}))}):null,$===\"config\"?R.config===void 0?d.jsx(\"p\",{className:\"empty\",children:\"reading this agent's settings…\"}):d.jsx(wy,{settings:R.config.settings,editable:R.config.editable,...R.config.file===void 0?{}:{file:R.config.file},...de===void 0?{}:{busy:de},...O===void 0?{}:{note:O},onSet:F}):null,$===\"channels\"?d.jsx(Xy,{channels:R.channels,now:Date.now()}):null]})}):d.jsxs(d.Fragment,{children:[d.jsx(\"div\",{className:\"scroll\",children:d.jsxs(\"div\",{className:\"pad\",children:[P===void 0?null:d.jsx(\"p\",{className:\"row note bad\",children:P}),d.jsx(uy,{state:_e,onAnswer:(M,Q)=>void st(M,Q)}),d.jsx(Jy,{state:_e})]})}),d.jsx(sy,{value:ft,busy:_e.running,onChange:we,onSend:()=>void Mt(),onStop:()=>void et.current?.()})]})]})]})}function Jy(c){const s=w.useRef(null),r=c.state.rows.length+c.state.live.length;return w.useEffect(()=>{const o=s.current,j=o?.closest(\".scroll\");if(o===null||j===null||j===void 0)return;j.scrollHeight-j.scrollTop-j.clientHeight<40&&o.scrollIntoView({block:\"end\"})},[r]),d.jsx(\"div\",{ref:s})}async function ky(c,s,r,o){const j=await fetch(\\`\\${c}/v1/agents/\\${r}/sessions/\\${encodeURIComponent(o)}/messages?limit=200\\`,{headers:s===void 0?{}:{authorization:\\`Bearer \\${s}\\`}});return j.ok?[...(await j.json()).messages??[]].reverse().filter(C=>C.origin===void 0&&(C.role===\"user\"||C.role===\"assistant\")&&(C.content??\"\")!==\"\").map((C,L)=>({kind:C.role===\"user\"?\"user\":\"reply\",id:\\`h\\${L}\\`,text:C.content??\"\"})):[]}function Rt(c){return c instanceof Xt||c instanceof Error?c.message:String(c)}const sh=document.getElementById(\"root\");if(sh===null)throw new Error(\"no #root in the document\");Ym.createRoot(sh).render(d.jsx(w.StrictMode,{children:d.jsx(Zy,{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(\"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: runtime.channels.statusOf(agent.id),\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 origin: {\n host: options.host,\n ...options.allowedOrigins === undefined ? {} : { allowedOrigins: options.allowedOrigins },\n ...options.allowedHosts === undefined ? {} : { allowedHosts: options.allowedHosts }\n }\n });\n const underBun = typeof Bun !== \"undefined\" && typeof Bun.serve === \"function\";\n if (underBun)\n return serveWithBun(handler, options, running);\n return serveWithNode(handler, options);\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) {\n const { createServer } = await import(\"node:http\");\n const server = createServer((req, res) => {\n (async () => {\n const chunks = [];\n for await (const chunk of req)\n chunks.push(chunk);\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 if (new URL(url).pathname === \"/v1/ws\") {\n res.writeHead(501, { \"content-type\": \"application/json; charset=utf-8\" });\n res.end(JSON.stringify({\n error: {\n code: \"websocket_unavailable\",\n message: \"This process is running under Node, where /v1/ws is not served.\",\n hint: \"Run under Bun for WebSocket support, or use GET /v1/events (SSE) plus POST /v1/agents/:id/messages — everything the WS endpoint does is achievable over HTTP, which is why the spec calls it secondary.\"\n }\n }));\n return;\n }\n const method = req.method ?? \"GET\";\n const response = await handler(new Request(url, {\n method,\n headers,\n ...method === \"GET\" || method === \"HEAD\" ? {} : { body: Buffer.concat(chunks) }\n }));\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 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: false,\n stop: () => new Promise((resolve) => {\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=D999AB9F77D998E064756E2164756E21\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
|
-
],
|
|
9
|
-
"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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