From e26a7d39f1054f2e8d0fd26e8fb39a8a4079188d Mon Sep 17 00:00:00 2001 From: Sparkle <2705263765@qq.com> Date: Sun, 20 Sep 2026 03:22:57 +0800 Subject: [PATCH 1/4] feat(web): add structured questions and native Plan interactions --- README.md | 6 + docs/design/README.md | 2 + docs/design/WEB_INTERACTION_UI.md | 118 +++++ docs/design/WEB_STRUCTURED_QUESTIONS.md | 146 +++++ extensions/ask-user/handoff.ts | 47 +- extensions/ask-user/index.ts | 19 + extensions/ask-user/web-bridge.ts | 52 ++ extensions/cron/index.ts | 24 +- extensions/plan-mode/control.ts | 81 +++ extensions/plan-mode/index.ts | 187 ++++--- extensions/plan-mode/persisted-state.ts | 73 +++ extensions/setup/index.ts | 7 + extensions/shared/web-command-feedback.ts | 41 ++ extensions/usage/index.ts | 9 +- tests/extensions/ask-user/index.test.ts | 54 ++ tests/extensions/plan-mode/control.test.ts | 138 +++++ tests/extensions/setup/index.test.ts | 17 + tests/web/app-render.spec.ts | 72 +++ tests/web/command-discovery.test.ts | 13 + tests/web/command-feedback.test.ts | 51 ++ tests/web/commands-provider.e2e.ts | 61 +++ tests/web/openpi-web.e2e.ts | 2 +- tests/web/pi-runtime.test.ts | 88 +++ tests/web/plan-card.spec.ts | 354 +++++++++++++ tests/web/plan-provider.e2e.ts | 484 +++++++++++++++++ tests/web/playwright.provider.config.ts | 9 +- tests/web/provider-e2e-support.ts | 26 +- tests/web/question-fixtures.ts | 32 ++ tests/web/questions-host.test.ts | 159 ++++++ tests/web/questions-provider.e2e.ts | 276 ++++++++++ tests/web/questions.spec.ts | 207 ++++++++ tests/web/questions.test.ts | 203 +++++++ tests/web/web-host.test.ts | 119 ++++- tests/web/web-protocol.spec.ts | 39 ++ tests/web/web-store.spec.ts | 32 ++ web/dist/app.js | 120 ++--- web/dist/styles.css | 2 +- web/host/questions.ts | 125 +++++ web/host/web-host.ts | 138 ++++- web/protocol/questions.ts | 79 +++ web/protocol/types.ts | 18 + web/runtime/command-discovery.ts | 24 +- web/runtime/pi-runtime.ts | 68 ++- web/runtime/types.ts | 9 +- web/ui/src/app/App.tsx | 37 ++ web/ui/src/components/Markdown.tsx | 38 +- web/ui/src/features/composer/Composer.tsx | 93 +++- .../features/composer/SlashCommandMenu.tsx | 3 + .../src/features/questions/QuestionPanel.tsx | 501 ++++++++++++++++++ .../settings/ProviderSettingsPage.tsx | 3 + web/ui/src/features/transcript/PlanCard.tsx | 95 ++++ web/ui/src/features/transcript/Transcript.tsx | 262 ++++++--- web/ui/src/i18n.ts | 147 ++++- web/ui/src/protocol/client.ts | 74 ++- web/ui/src/store/web-store.ts | 47 ++ web/ui/src/styles.css | 101 ++++ 56 files changed, 4927 insertions(+), 305 deletions(-) create mode 100644 docs/design/WEB_INTERACTION_UI.md create mode 100644 docs/design/WEB_STRUCTURED_QUESTIONS.md create mode 100644 extensions/ask-user/web-bridge.ts create mode 100644 extensions/plan-mode/control.ts create mode 100644 extensions/plan-mode/persisted-state.ts create mode 100644 extensions/shared/web-command-feedback.ts create mode 100644 tests/extensions/plan-mode/control.test.ts create mode 100644 tests/web/command-feedback.test.ts create mode 100644 tests/web/commands-provider.e2e.ts create mode 100644 tests/web/plan-card.spec.ts create mode 100644 tests/web/plan-provider.e2e.ts create mode 100644 tests/web/question-fixtures.ts create mode 100644 tests/web/questions-host.test.ts create mode 100644 tests/web/questions-provider.e2e.ts create mode 100644 tests/web/questions.spec.ts create mode 100644 tests/web/questions.test.ts create mode 100644 web/host/questions.ts create mode 100644 web/protocol/questions.ts create mode 100644 web/ui/src/features/questions/QuestionPanel.tsx create mode 100644 web/ui/src/features/transcript/PlanCard.tsx diff --git a/README.md b/README.md index 9fb0203d..f2ecb852 100644 --- a/README.md +++ b/README.md @@ -586,6 +586,12 @@ openpi web /path/to/repo # 指定初始工作区 Web 可以在选择工作区之前预选可用模型。选择仅保留在当前页面,创建会话后确认模型生效再发送第一条消息;模型不可用时会提示并阻止发送,不会自动换成默认模型。打开已有会话时使用该会话的模型。 +在 Plan/Setup 原有工具范围内,模型调用 `ask_user` 时,发起任务的 Web 标签页会显示结构化问题卡片:选择选项、添加补充说明或填写自己的答案,复核后才提交给正在等待的工具调用。关闭卡片不会提交草稿;留空的自定义答案表示要求澄清问题。刷新同一标签可恢复尚未过期的提问(未提交草稿不持久化),其他标签不能代答。提问最多等待 15 分钟,停止运行、切换 Session 或关闭 Host 会取消等待;它不替代原生权限审批,也不意味着任意终端自定义界面已支持 Web。 + +OpenPI 的 `/plan` 调研通过 `plan_ready` 成功提交计划后,Web 会在聊天区展示可收起、可复制的 Markdown 计划卡片,刷新后仍可查看。卡片展示的是工具返回的计划,不代表批准或开始实施;超出 Web 传输上限的结果会标明为预览。输入框上方的开关由现有 Plan 扩展切换当前 Session 的规划状态,不调用模型、不发送命令气泡,也不清空草稿;发送任务后才开始规划。首次发送后,输入框占位提示会说明“本次对话使用 Plan 模式”,刷新后保留,退出后恢复。任务运行期间不能切换模式,退出不代表批准或开始实施。手动 `/plan <目标>` 仍会直接开始规划,`/plan off` 仍可退出;Plan Ready 的实施确认仍需使用 TUI。 + +本地 #562 后续改动还补充了 `human_handoff` 的人工操作卡片:选择“已完成”或“无法完成”、复核后提交,模型仍需验证完成信号。已适配的 `/openpi-setup`、`/plan`、`/usage`、`/cron` 可从命令菜单选择;Plan 会明确提示实施确认的限制。命令原文和 Plan/Cron 通知、Usage 查询结果显示在聊天区,不额外进入模型上下文。Cron 显示的是执行命令时的任务快照,任务本身仍只保存在原生会话内存中。 + Pi 当前只原生分派 `install`、`remove`、`update`、`list`、`config` 和 `auth` 等固定子命令,package 不能注册新的顶层子命令。因此 Web 入口是独立 CLI 的 `openpi web`,不是会被 Pi 当成初始 Prompt 的 `pi open`。Web 进程仍沿用 Pi 的 Provider、模型、凭据、Settings、Trust、Session 格式和 extension 资源加载,不引入第二套 Provider 或 Session 存储。 ### 命令速查 diff --git a/docs/design/README.md b/docs/design/README.md index 8f1318fa..320b65b3 100644 --- a/docs/design/README.md +++ b/docs/design/README.md @@ -18,5 +18,7 @@ These records predate [`Decision 0001`](../decisions/0001-documentation-and-evid - [`WEB_SESSION_CREATION_TARGET.md`](WEB_SESSION_CREATION_TARGET.md) — stable receipt identity and fail-closed target binding for a newly created Web Session's model selection and first prompt - [`WEB_SLASH_COMMAND_DISCOVERY.md`](WEB_SLASH_COMMAND_DISCOVERY.md) — Pi-owned command discovery, bounded Web projection, availability policy, and Composer completion interaction - [`COMPLETION_INBOX.md`](COMPLETION_INBOX.md) — shared owner, epoch, consumption, retry, and receipt contract for background completions +- [`WEB_STRUCTURED_QUESTIONS.md`](WEB_STRUCTURED_QUESTIONS.md) — Web `ask_user` ownership, reviewed answers, bounded waits and browser validation +- [`WEB_INTERACTION_UI.md`](WEB_INTERACTION_UI.md) — #562 native command feedback, Plan controls, human handoff and streaming/cancellation corrections 开发与热更新流程见 [`docs/development/OPENPI_WEB_DEVELOPMENT.md`](../development/OPENPI_WEB_DEVELOPMENT.md)。 diff --git a/docs/design/WEB_INTERACTION_UI.md b/docs/design/WEB_INTERACTION_UI.md new file mode 100644 index 00000000..b941274d --- /dev/null +++ b/docs/design/WEB_INTERACTION_UI.md @@ -0,0 +1,118 @@ +# Web interaction UI + +- Status: draft — implementation under review, not an accepted architectural Decision +- Created / verified: 2026-09-20 +- Source boundary: `codex/web-ask-user`, upstream base `9d8ce99`, plus this implementation +- Issue: https://github.com/openpi-dev/openpi/issues/562 +- Related: #348 (Setup), #470 (implementation handoff), #549 (controller identity), #540 (Stop), #561 (Web UI) +- Supersedes: none; complements [Web structured questions](WEB_STRUCTURED_QUESTIONS.md) + +## Scope + +Expose existing Pi tools and extension commands in Web: structured questions, +human handoff, completed plan cards, a mode-only Plan control and command +feedback. Theme controls and direct preference writes are excluded. Configuration +continues through `/openpi-setup`; this change does not alter that contract. + +## Plan ownership and presentation + +POST `/api/plan` uses the Host's existing authentication and mutation drain. +The serialized runtime controller validates the selected Session, idle and +unqueued state, and availability of the owned Plan command. A Session-scoped +callback in the Plan extension compares the latest persisted Plan entry ID, +then uses its existing persistence, tool gate and broadcast function. Stale +revisions fail closed. Ready or invalid state requires an explicit exit. +Registration is removed on shutdown and refreshed on branch restoration. + +Changing mode sends no prompt, creates no model turn and preserves the draft. +The extension projects its current read-only/ready stance at +`before_agent_start`, including after Session restoration. Permission enforcement +remains in runtime tool gates. The placeholder appears after a real user message +in the current planning episode and is derived from branch entries, not a +second persisted mode flag. `/plan ` retains its immediate-start path. + +The plan card displays a successful `plan_ready` result, not streamed arguments. +It does not imply implementation approval. Ready state remains read-only until +an explicit owner action; automatically releasing that gate is not part of this +UI. Implementation review still requires the TUI and belongs to #470. + +## Native commands and model-visible context + +Registered command identities and owning source paths determine the reviewed +Web menu entries. Unknown extensions remain unadapted; manually submitted input +still reaches Pi with an operator warning. No second command dispatcher exists. + +Command input and Plan/Cron/Usage feedback are bounded custom Session entries +used for operator display, not additional model messages. The input records +submission, not success. Native command errors are visible. Usage reuses the +existing provider adapters; Cron output is a historical command result, not a +second scheduler or live task store. + +Setup instructions now require explaining invalid values in the user's language +and obtaining an explicit legal alternative before writing. Footer presets and +footer style enum values are distinguished. This guides model interpretation; +the typed writer retains actual input validation. Prompts cannot prove that a +model-selected legal substitute was authorized by the user. + +## Human handoff + +The existing parent-only `human_handoff` shares the controller-bound question +transport. Done and Unable require explicit review and submission; notes retain +the 8,000-byte limit. Free-form input cannot manufacture completion. Abort, +expiry and missing UI never imply completion. Done remains a user report; the +model must verify the completion signal with available tools. + +## Streaming and cancellation corrections + +Transcript reconciliation uses native timestamps/tool-call identity and original +part order. Hidden custom entries occupy no blank rows. Uncollapsed tool rows +retain independent keys so regrouping does not discard answer DOM or expanded +state. Collapsed groups retain their existing four-row threshold. + +A provider burst regression reproduces disappearing unfinished messages: +`response.write(false)` was treated as a broken SSE connection even though it +only indicates buffered backpressure. Reconnection restored a persisted-only +snapshot, losing unfinished assistant content. Live records and heartbeats now +tolerate native buffering while bounding outstanding bytes plus the next record +at 256 KiB. A separate regression verifies disconnection above that budget. +Genuine disconnect recovery can still temporarily drop unfinished projections. + +Stopping a pending question can return its cancelled result before Pi attempts +another model step. Pi's lazy auth setup classified an already-aborted signal as +an ordinary error. Web checks the original signal before delegating to the +existing stream function so Agent's native run lifecycle emits `aborted`. +No dependency file, error-text classifier or provider replacement is introduced. +The guard covers already-aborted steps, not every cancellation timing during auth. + +## Validation and limits + +Separate tests cover owner state and read-only enforcement, authenticated Host +operations, question ownership/replay/expiry, UI drafts and recovery, native +persisted cancellation evidence and deterministic provider/browser flows. +Question cancellation asserts the receipt and a subsequent successful message, +not just card disappearance. Plan streaming includes both spaced deltas and a +90-delta burst followed by a pause before completion. + +Manual acceptance reports confirm that continuous flicker stopped, pending +questions restore on refresh, Plan generation can be stopped, the mode switch +preserves drafts, and completed plans restore on refresh. The final cancellation +classification change has automated coverage; fresh live-model acceptance is +not claimed. No private Session, recording, credential or raw diagnostic export +is included. Final check commands and results belong in the associated PR. + +At this source boundary, `bun run check` passes; the separate Vitest run passes +245 cases across 13 files; the standard browser suite passes 34 cases and the +native-provider browser suite passes 10. The full Node suite reports 1,683 +passes, two failures and one platform skip. Both failures are the existing +PlanMode Markdown tests (`a rich plan renders without throwing and keeps its +content`, `expanded survives edge-content plans at extreme widths`). An archive +of unmodified upstream `9d8ce99`, using the same installed dependencies, +reproduces both failures (22 passes, two failures in that file). No full-suite +green result is claimed. These results use local Node 24.16.0 and synthetic +browser data, not private provider requests. + +Open PRs #549, #540 and #561 modify shared Web surfaces. They are not merged into +this implementation; controller identity, execution ownership and layout require +reconciliation if those branches merge first. #578 is a separate TUI answer-editor +fix, not this Web questionnaire. This implementation does not close all of #343, +#348, #470 or the remaining proposals in #562. diff --git a/docs/design/WEB_STRUCTURED_QUESTIONS.md b/docs/design/WEB_STRUCTURED_QUESTIONS.md new file mode 100644 index 00000000..6a11b61e --- /dev/null +++ b/docs/design/WEB_STRUCTURED_QUESTIONS.md @@ -0,0 +1,146 @@ +# Web structured questions + +- Status: `draft` +- Created: 2026-09-18 +- Last verified: 2026-09-19 (local implementation and tests; not upstream acceptance) +- Source boundary: `f6b49ae59605b1276b8267f2886d22c03f01533c` plus `codex/web-ask-user` +- Related Issues: [#343](https://github.com/openpi-dev/openpi/issues/343), [#348](https://github.com/openpi-dev/openpi/issues/348), [#470](https://github.com/openpi-dev/openpi/issues/470) +- Related work: [#549](https://github.com/openpi-dev/openpi/pull/549) +- Supersedes: none + +## Scope and ownership + +Expose the existing parent-only `ask_user` tool as a Web questionnaire. Pi owns +the tool call, its abort signal and Session history. The model chooses whether +and what to ask; Web renders the questions and returns explicitly reviewed +answers to the original waiting invocation. Existing Plan/Setup tool visibility +is unchanged. This does not add configuration writes, Plan Ready handoff, +provider login, Trust mutation or arbitrary extension `ui.custom` support. + +A versioned same-process bridge is keyed by the actual Pi SessionManager. It +does not install a partial UIContext or set `hasUI` for TUI-only extensions. +TUI and native dialog handling retain their current path. Without a registered +Web bridge or attributable controller, the existing no-UI feedback is retained. + +The Host uses the controller contract introduced by PR #549: +`openpi.web.controller`, `X-OpenPI-Web-Controller`, and a UUID v4 `controllerId` +on prompt admission. That PR is not merged into this branch. The small identity +changes will need reconciliation when integrating both branches; cleanup +confirmation and its policy are not duplicated here. + +## Runtime and transport + +The Host binds a pending question to workspace, Session, command, turn epoch, +initiating controller and random request ID. A native command may return before +its `triggerTurn` starts; the runtime retains its origin through AsyncLocalStorage +and reclaims only that invocation's unused trace at `agent_start`. Unrelated +background starts never inherit the latest HTTP request by guesswork. + +`GET /api/questions/pending?sessionId=…` returns a pending request only to its +controller. `POST /api/questions/answer` accepts the exact Session/request IDs, +an answer or dismissal action and, for answers, a complete ordered result. +Existing bearer and origin checks apply. SSE carries only `questions_changed`, +without the question payload or controller identity. This is a local-tab control +boundary, not a new remote identity or permission system. Native transcript +projection still contains the model's tool arguments and the final tool result. + +One question batch waits at a time, at most three questions with five options +each. Existing per-field question limits and 8,000-byte answer/note limits are +enforced at the server boundary; answer POST bodies are capped at 64 KiB. +Missing/foreign question IDs, invented options, ambiguous answer modes and +partial answer sets are rejected without settling the request. + +Requests expire after 15 minutes. Native abort, owner replacement and Host +shutdown settle pending calls without answers and release timers/listeners. +Refreshing the same tab restores an unexpired request, but not unsubmitted +drafts. Disconnect alone does not invent a response. At most 128 terminal +receipts are retained in memory; duplicate submissions replay the receipt, +never the answer. After eviction/restart the result is stale/unknown, not proof +that an earlier answer was never delivered. No question or draft database is +created; canonical answered tool results remain in Pi's Session. + +## UI + +An inline panel above the Composer uses the existing theme tokens, typography, +spacing and light/dark behavior. Its compact, Composer-width layout follows the +user-provided reference: a quiet question label, numbered option rows and a +bottom row combining the free-form choice with navigation and submission. +The header and actions have no separate divider bars. Native radio inputs +remain keyboard accessible; notes and previews expand only on request. +It presents one question at a time, notes per option, and a free-form choice. Blank +free-form answers explicitly request rephrasing. The review screen allows +editing any answer; navigation never submits. Dismissal sends no draft answers. + +Answer drafts stay in memory. While a submission is uncertain, editing is +locked and retry reuses the original payload and request ID. Only a confirmed +receipt is shown as submitted. Controls have labels, keyboard focus and mobile +touch targets; question content can scroll without losing the submit controls. +Product labels support Chinese and English; model-provided text is not translated. + +## Plan result presentation + +The adjacent `plan_ready` result uses a compact, initially expanded Markdown +card with collapse and copy controls, using the existing theme and typography. +It renders the successful tool result's structured plan, never the proposed +tool arguments. Failed, pending and cancelled calls retain ordinary tool +evidence. Live delivery and persisted history share the same card; a result +whose original call was omitted from bounded history can render on its own. + +The result is historical evidence, not current Plan state or implementation +approval. No implementation action is added. If the Web protocol omits oversized +details, the remaining result text is explicitly a preview, without claiming +readiness. Markdown task checkboxes remain read-only and receive accessible +labels from their item text. + +`/plan` is registered by `extensions/plan-mode/index.ts`, using Pi's extension +command and Session primitives. The Web runtime binds extensions in print mode; +Plan Ready's interactive editor/select actions still require a separate bridge +([#470](https://github.com/openpi-dev/openpi/issues/470)). A future Composer mode +control should project canonical inactive/planning/ready state and keep explicit +implementation review separate from turning planning off. This is a follow-up +recommendation, not an implemented control or accepted architectural Decision. + +## Validation contract + +- Broker tests: exact answers, byte bounds, controller isolation, replay, + expiry, abort, replacement, single pending capacity and cleanup. +- Host tests: real authenticated HTTP reads/writes and extension bridge, + prompt identity conflicts, foreign controllers and Session replacement. +- Component tests: selection, drafts, review/edit, dismissal, UTF-8 bounds, + rephrasing and uncertain submission recovery. +- Browser tests: real Host, current local OpenPI package, native Pi tools and a + local synthetic provider; refresh, another tab, light/desktop, dark/mobile, + accessibility, answer propagation to the next provider request and Stop. +- Required repository checks: `bun run check` and `bun run test`. + +Local results at the source boundary above: + +- `bun run check` passed, including the production Web build. +- `bun run test` completed the Node suite: 1,662 passed, one skipped and two + existing PlanMode rendering failures. The failing tests are + `a rich plan renders without throwing and keeps its content` and + `expanded survives edge-content plans at extreme widths`; their ANSI stripping + leaves OSC 8 hyperlinks in the text. Those unrelated tests were not changed. +- The runner stops before Vitest on a Node failure, so the complete Vitest + suite was run separately: 226 passed after the compact-layout revision, + including the stale-receipt and optional-note disclosure coverage. +- All four provider browser tests passed: the existing thinking selector and + three new structured-question scenarios. After the final layout adjustment, + all three question scenarios passed again, including scoped axe checks. +- The runtime suite passed again after disposal cleanup: 42 tests. +- With Plan result cards, all 236 Vitest tests passed, including ten plan + rendering/interaction cases. Two additional real Pi/local synthetic-provider + browser tests cover `/plan` → reviewed `ask_user` → `plan_ready`, idle + termination, history refresh, light desktop/dark mobile, collapse and scoped + axe checks. The Node suite still has the same two baseline failures above. + +Browser fixtures are not live-provider acceptance and do not validate Safari, +physical mobile keyboards, or every third-party extension. These tests do not +claim to complete the broader #343 or #348 issues. + +Follow-up on 2026-09-20: the mode control previously described as a future +recommendation is now implemented through the owning Plan extension. See +[Web interaction UI](WEB_INTERACTION_UI.md) for its source boundary, human +handoff, command feedback, streaming/cancellation corrections and limits. +The associated PR records final validation after synchronization with main; +the counts above remain historical observations of the earlier source boundary. diff --git a/extensions/ask-user/handoff.ts b/extensions/ask-user/handoff.ts index a4c601df..941face8 100644 --- a/extensions/ask-user/handoff.ts +++ b/extensions/ask-user/handoff.ts @@ -6,6 +6,7 @@ import { Text } from "@earendil-works/pi-tui"; import { Type, type Static } from "typebox"; import { sanitizeTerminalText } from "../shared/terminal-text.ts"; import { MAX_ANSWER_DRAFT_UTF8_BYTES, answerDraftFits } from "./limits.ts"; +import { askWebQuestions } from "./web-bridge.ts"; const COMPLETE = "Done — resume and verify"; const UNABLE = "Unable to complete"; @@ -130,7 +131,6 @@ export function createHumanHandoffToolDefinition(): ToolDefinition< } satisfies HumanHandoffDetails, }); - if (!ctx.hasUI) return reply("unavailable"); if (signal?.aborted) return reply("cancelled"); const title = safeSingleLine(params.title); @@ -142,6 +142,51 @@ export function createHumanHandoffToolDefinition(): ToolDefinition< ); } + if (!ctx.hasUI) { + const pending = askWebQuestions( + ctx.sessionManager, + _toolCallId, + [ + { + id: "handoff", + header: title, + question: title, + options: [ + { + label: COMPLETE, + description: + "I performed the action. The agent must still verify the expected signal.", + }, + { + label: UNABLE, + description: + "The action could not be completed; explain the blocker in an optional note.", + }, + ], + }, + ], + signal, + { title, instructions, completionSignal }, + ); + if (!pending) return reply("unavailable"); + const outcome = await pending; + if (signal?.aborted) return reply("cancelled"); + if (outcome.kind === "answered") { + const answer = outcome.answers[0]; + if ( + outcome.answers.length !== 1 || + answer?.id !== "handoff" || + !answerDraftFits(answer.note ?? "") + ) + return reply("cancelled"); + if (answer.selected === COMPLETE) + return reply("completed", answer.note); + if (answer.selected === UNABLE) return reply("unable", answer.note); + return reply("cancelled"); + } + return reply(outcome.kind === "expired" ? "cancelled" : outcome.kind); + } + const options = signal ? { signal } : undefined; const dialogTitle = `${title}\n\n${instructions}\n\nDone when: ${completionSignal}`; diff --git a/extensions/ask-user/index.ts b/extensions/ask-user/index.ts index 4a3e522b..00d945e6 100644 --- a/extensions/ask-user/index.ts +++ b/extensions/ask-user/index.ts @@ -39,6 +39,7 @@ import { patchOwnedTools, } from "../shared/tool-surface.ts"; import { createHumanHandoffToolDefinition } from "./handoff.ts"; +import { askWebQuestions } from "./web-bridge.ts"; import { answerDraftByteLength, answerDraftFits, @@ -451,6 +452,24 @@ export default function askUser(pi: ExtensionAPI) { } if (!ctx.hasUI) { + const pending = askWebQuestions( + ctx.sessionManager, + _toolCallId, + params.questions, + signal, + ); + if (pending) { + const result = await pending; + if (result.kind === "answered") { + return reply(buildAskUserResultMessage(result), result.answers); + } + if (result.kind === "expired") + return reply( + "The questions expired without an answer. Do not assume any choices.", + ); + if (result.kind !== "unavailable") + return reply(buildAskUserResultMessage({ kind: result.kind })); + } return reply(buildAskUserResultMessage({ kind: "no-ui" })); } if (signal?.aborted) { diff --git a/extensions/ask-user/web-bridge.ts b/extensions/ask-user/web-bridge.ts new file mode 100644 index 00000000..19db1351 --- /dev/null +++ b/extensions/ask-user/web-bridge.ts @@ -0,0 +1,52 @@ +import type { AskUserAnswer, AskUserInput } from "./index.ts"; + +export interface WebHandoffPresentation { + title: string; + instructions: string; + completionSignal: string; +} + +export type WebQuestionOutcome = + | { kind: "answered"; answers: AskUserAnswer[] } + | { kind: "dismissed" | "cancelled" | "expired" | "unavailable" }; + +type QuestionBridge = ( + toolCallId: string, + questions: AskUserInput["questions"], + signal?: AbortSignal, + handoff?: WebHandoffPresentation, +) => Promise; + +// Pi's extension loader and the Web CLI can evaluate different module copies. +// Share only same-process Session-owned transports; never persist resolvers. +const key = Symbol.for("@tt-a1i/openpi/web-questions/v1"); +const existing: unknown = Reflect.get(globalThis, key); +if (existing !== undefined && !(existing instanceof WeakMap)) { + throw new Error("Incompatible OpenPI Web question bridge"); +} +const bridges: WeakMap = existing ?? new WeakMap(); +if (existing === undefined) { + Object.defineProperty(globalThis, key, { value: bridges }); +} + +export function registerWebQuestionBridge( + scope: object, + bridge: QuestionBridge, +) { + if (bridges.has(scope)) + throw new Error("Session already has a Web question bridge"); + bridges.set(scope, bridge); + return () => { + if (bridges.get(scope) === bridge) bridges.delete(scope); + }; +} + +export function askWebQuestions( + scope: object, + toolCallId: string, + questions: AskUserInput["questions"], + signal?: AbortSignal, + handoff?: WebHandoffPresentation, +) { + return bridges.get(scope)?.(toolCallId, questions, signal, handoff); +} diff --git a/extensions/cron/index.ts b/extensions/cron/index.ts index 57a792ba..cb75067a 100644 --- a/extensions/cron/index.ts +++ b/extensions/cron/index.ts @@ -28,6 +28,7 @@ import { /** How often the scheduler looks for due jobs. */ const POLL_MS = 30_000; +import { notifyWebCommand } from "../shared/web-command-feedback.ts"; interface CronRuntime { now(): number; @@ -153,7 +154,8 @@ export default function cron( const parsed = parseCronCommand(rawArgs); if (parsed.action === "help") { - ctx.ui.notify( + notifyWebCommand( + ctx, parsed.error ?? "Usage: /cron every <5m> · /cron in <30s> · /cron list · /cron remove \nJobs live in this session only and fire when the session is idle.", parsed.error ? "warning" : "info", @@ -163,7 +165,11 @@ export default function cron( if (parsed.action === "list") { if (jobs.length === 0) { - ctx.ui.notify("No scheduled prompts in this session.", "info"); + notifyWebCommand( + ctx, + "No scheduled prompts in this session.", + "info", + ); return; } const now = runtime.now(); @@ -177,7 +183,7 @@ export default function cron( : "once"; return `${job.id}. ${when} · next in ${inSeconds}s · ${job.prompt}`; }); - ctx.ui.notify(lines.join("\n"), "info"); + notifyWebCommand(ctx, lines.join("\n"), "info"); return; } @@ -185,7 +191,8 @@ export default function cron( const before = jobs.length; jobs = jobs.filter((job) => job.id !== parsed.id); if (jobs.length === 0) stopTicker(); - ctx.ui.notify( + notifyWebCommand( + ctx, jobs.length === before ? `No scheduled prompt with id ${parsed.id}.` : `Removed scheduled prompt ${parsed.id}.`, @@ -195,7 +202,8 @@ export default function cron( } if (jobs.length >= CRON_MAX_JOBS) { - ctx.ui.notify( + notifyWebCommand( + ctx, `A session can have at most ${CRON_MAX_JOBS} scheduled prompts. Remove one before adding another.`, "warning", ); @@ -206,7 +214,8 @@ export default function cron( const now = runtime.now(); const nextRunAt = now + intervalMs; if (!Number.isSafeInteger(now) || !Number.isSafeInteger(nextRunAt)) { - ctx.ui.notify( + notifyWebCommand( + ctx, "Scheduled time is too far in the future. Use a shorter duration.", "warning", ); @@ -220,7 +229,8 @@ export default function cron( }; jobs.push(job); startTicker(); - ctx.ui.notify( + notifyWebCommand( + ctx, parsed.oneShot ? `Scheduled prompt ${job.id} once in ${formatInterval(intervalMs)}.` : `Scheduled prompt ${job.id} every ${formatInterval(intervalMs)}.`, diff --git a/extensions/plan-mode/control.ts b/extensions/plan-mode/control.ts new file mode 100644 index 00000000..5d9bb34f --- /dev/null +++ b/extensions/plan-mode/control.ts @@ -0,0 +1,81 @@ +import { + PLAN_MODE_STATE_ENTRY, + restorePlanModeState, +} from "./persisted-state.ts"; + +export type PlanStatus = "inactive" | "planning" | "ready" | "invalid"; +export interface PlanControlRequest { + enabled: boolean; + expectedRevision: string | null; +} + +/** A projection of Pi's branch, never another state store. */ +export function projectPlanControl(entries: readonly unknown[]) { + const restored = restorePlanModeState(entries); + let revision: string | null = null; + let hasPrompt = false; + for (const raw of entries) { + if (!raw || typeof raw !== "object") continue; + const entry = raw as Record; + if (entry.type === "custom" && entry.customType === PLAN_MODE_STATE_ENTRY) { + revision = typeof entry.id === "string" ? entry.id : null; + const data = entry.data as { status?: unknown } | undefined; + if (data?.status !== "ready") hasPrompt = false; + } else if ( + entry.type === "message" && + (entry.message as { role?: unknown } | undefined)?.role === "user" + ) { + hasPrompt = true; + } + } + const status: PlanStatus = restored.error + ? "invalid" + : restored.readyPlan + ? "ready" + : restored.planning + ? "planning" + : "inactive"; + return { status, revision, hasPrompt: restored.planning && hasPrompt }; +} + +export class PlanControlError extends Error { + readonly code: string; + readonly statusCode: number; + constructor(message: string, code: string, statusCode: number) { + super(message); + this.code = code; + this.statusCode = statusCode; + } +} + +type Control = ( + request: PlanControlRequest, +) => ReturnType; +// The extension loader and Web runtime may evaluate separate module copies. +const key = Symbol.for("@tt-a1i/openpi/plan-control/v1"); +const existing: unknown = Reflect.get(globalThis, key); +if (existing !== undefined && !(existing instanceof WeakMap)) + throw new Error("Incompatible Plan control bridge"); +const controls: WeakMap = existing ?? new WeakMap(); +if (existing === undefined) + Object.defineProperty(globalThis, key, { value: controls }); + +export function registerPlanControl(scope: object, control: Control) { + if (controls.has(scope)) + throw new Error("Session already has a Plan control owner"); + controls.set(scope, control); + return () => { + if (controls.get(scope) === control) controls.delete(scope); + }; +} + +export function controlPlan(scope: object, request: PlanControlRequest) { + const control = controls.get(scope); + if (!control) + throw new PlanControlError( + "Plan control is unavailable for this Session", + "PLAN_CONTROL_UNAVAILABLE", + 501, + ); + return control(request); +} diff --git a/extensions/plan-mode/index.ts b/extensions/plan-mode/index.ts index f26aa739..b5ac136a 100644 --- a/extensions/plan-mode/index.ts +++ b/extensions/plan-mode/index.ts @@ -46,57 +46,33 @@ import { } from "../shared/tool-surface.ts"; import { sanitizeTerminalText } from "../shared/terminal-text.ts"; import { planBashDecision } from "./bash-policy.ts"; +import { notifyWebCommand } from "../shared/web-command-feedback.ts"; +import { + PlanControlError, + projectPlanControl, + registerPlanControl, +} from "./control.ts"; -export const MAX_READY_PLAN_CHARS = 50_000; -export const MAX_READY_PLAN_UTF8_BYTES = 48_000; -/** Preview lines shown in the collapsed plan_ready result. */ +import { + MAX_READY_PLAN_CHARS, + MAX_READY_PLAN_UTF8_BYTES, + PLAN_MODE_STATE_ENTRY, + restorePlanModeState, + type PersistedPlanModeState, +} from "./persisted-state.ts"; +export { + MAX_READY_PLAN_CHARS, + MAX_READY_PLAN_UTF8_BYTES, + PLAN_MODE_STATE_ENTRY, + restorePlanModeState, + type PersistedPlanModeState, + type RestoredPlanModeState, +} from "./persisted-state.ts"; const PLAN_PREVIEW_LINES = 10; -export const PLAN_MODE_STATE_ENTRY = "my-pi-setup-plan-mode-state"; - -export type PersistedPlanModeState = - | { version: 1; status: "inactive" | "planning" } - | { version: 1; status: "ready"; plan: string }; - -export interface RestoredPlanModeState { - planning: boolean; - readyPlan?: string; - error?: string; -} - function isRecord(value: unknown): value is Record { return typeof value === "object" && value !== null && !Array.isArray(value); } -function isBoundedReadyPlan(value: unknown): value is string { - return ( - typeof value === "string" && - sanitizeTerminalText(value) === value && - value.trim().length > 0 && - value.length <= MAX_READY_PLAN_CHARS && - new TextEncoder().encode(value.trim()).byteLength <= - MAX_READY_PLAN_UTF8_BYTES - ); -} - -function decodePlanModeState(data: unknown): RestoredPlanModeState | undefined { - if ( - !isRecord(data) || - data.version !== 1 || - typeof data.status !== "string" - ) { - return; - } - const keys = Object.keys(data).sort().join(","); - if (data.status === "inactive" || data.status === "planning") { - if (keys !== "status,version") return; - return { planning: data.status === "planning" }; - } - if (data.status === "ready" && keys === "plan,status,version") { - if (!isBoundedReadyPlan(data.plan)) return; - return { planning: true, readyPlan: data.plan.trim() }; - } -} - export function latestAssistantToolCallCount(entries: readonly unknown[]) { for (let index = entries.length - 1; index >= 0; index--) { const entry = entries[index]; @@ -120,30 +96,6 @@ export function planReadyBatchDecision(toolName: string, callCount: number) { }; } -/** Restore only the newest branch-local state; malformed state fails closed. */ -export function restorePlanModeState( - entries: readonly unknown[], -): RestoredPlanModeState { - for (let index = entries.length - 1; index >= 0; index--) { - const entry = entries[index]; - if ( - !isRecord(entry) || - entry.type !== "custom" || - entry.customType !== PLAN_MODE_STATE_ENTRY - ) { - continue; - } - return ( - decodePlanModeState(entry.data) ?? { - planning: true, - error: - "The latest persisted Plan Mode state is malformed; writes remain blocked. Use `/plan off` to clear it explicitly.", - } - ); - } - return { planning: false }; -} - export const PLAN_READY_ACTIONS = { continue: "Continue planning", current: "Implement in this session", @@ -247,6 +199,7 @@ export function planToolCallDecision( export default function planMode(pi: ExtensionAPI) { let planning = false; + let unregisterControl: (() => void) | undefined; let readyPlan: string | undefined; const syncPlanTool = () => patchOwnedTools(pi, "plan", { @@ -299,7 +252,8 @@ export default function planMode(pi: ExtensionAPI) { const continuePlanning = (ctx: ExtensionCommandContext) => { commitPlanState({ version: 1, status: "planning" }, ctx); - ctx.ui.notify( + notifyWebCommand( + ctx, "Still in plan mode. Enter the revision you want; writes remain blocked.", "info", ); @@ -307,11 +261,12 @@ export default function planMode(pi: ExtensionAPI) { const implementHere = (ctx: ExtensionCommandContext) => { if (!readyPlan) { - ctx.ui.notify("No ready plan is available.", "warning"); + notifyWebCommand(ctx, "No ready plan is available.", "warning"); return; } if (!ctx.hasUI) { - ctx.ui.notify( + notifyWebCommand( + ctx, "Implementing a ready plan requires an interactive editor.", "warning", ); @@ -320,7 +275,8 @@ export default function planMode(pi: ExtensionAPI) { const prompt = buildPlanImplementationPrompt(readyPlan); ctx.ui.setEditorText(prompt); clearPlan(ctx); - ctx.ui.notify( + notifyWebCommand( + ctx, "Plan mode is off. Review the implementation prompt, then submit it when ready.", "info", ); @@ -328,11 +284,12 @@ export default function planMode(pi: ExtensionAPI) { const implementFresh = async (ctx: ExtensionCommandContext) => { if (!readyPlan) { - ctx.ui.notify("No ready plan is available.", "warning"); + notifyWebCommand(ctx, "No ready plan is available.", "warning"); return; } if (!ctx.hasUI) { - ctx.ui.notify( + notifyWebCommand( + ctx, "Starting a fresh implementation requires an interactive editor.", "warning", ); @@ -352,7 +309,8 @@ export default function planMode(pi: ExtensionAPI) { }, }); if (result.cancelled) { - ctx.ui.notify( + notifyWebCommand( + ctx, "Fresh session cancelled; the plan is still ready.", "info", ); @@ -361,11 +319,12 @@ export default function planMode(pi: ExtensionAPI) { const showReadyActions = async (ctx: ExtensionCommandContext) => { if (!readyPlan) { - ctx.ui.notify("No ready plan is available.", "warning"); + notifyWebCommand(ctx, "No ready plan is available.", "warning"); return; } if (!ctx.hasUI) { - ctx.ui.notify( + notifyWebCommand( + ctx, "Use `/plan implement`, `/plan fresh`, or `/plan off` in a UI session.", "warning", ); @@ -383,7 +342,7 @@ export default function planMode(pi: ExtensionAPI) { await implementFresh(ctx); } else if (choice === PLAN_READY_ACTIONS.off) { clearPlan(ctx); - ctx.ui.notify("Plan mode is off.", "info"); + notifyWebCommand(ctx, "Plan mode is off.", "info"); } }; @@ -440,7 +399,8 @@ export default function planMode(pi: ExtensionAPI) { ); } commitPlanState({ version: 1, status: "ready", plan }, ctx); - ctx.ui.notify( + notifyWebCommand( + ctx, "Plan ready. Run `/plan` to continue planning or prepare implementation.", "info", ); @@ -531,7 +491,11 @@ export default function planMode(pi: ExtensionAPI) { if (action === "off" || action === "cancel") { clearPlan(ctx); - ctx.ui.notify("Plan mode off. No implementation was started.", "info"); + notifyWebCommand( + ctx, + "Plan mode off. No implementation was started.", + "info", + ); return; } @@ -551,7 +515,7 @@ export default function planMode(pi: ExtensionAPI) { return; } if (!planning) { - ctx.ui.notify("Plan mode is not active.", "warning"); + notifyWebCommand(ctx, "Plan mode is not active.", "warning"); return; } requestPlanFinalization(); @@ -565,7 +529,8 @@ export default function planMode(pi: ExtensionAPI) { if (planning) { if (!ctx.hasUI) { - ctx.ui.notify( + notifyWebCommand( + ctx, "Plan mode is already active. `/plan done` requests completion; `/plan off` cancels.", "info", ); @@ -576,7 +541,8 @@ export default function planMode(pi: ExtensionAPI) { [PLAN_READY_ACTIONS.continue, FINALIZE_NOW, PLAN_READY_ACTIONS.off], ); if (choice === PLAN_READY_ACTIONS.continue) { - ctx.ui.notify( + notifyWebCommand( + ctx, "Plan mode is already active. `/plan done` requests completion; `/plan off` cancels.", "info", ); @@ -584,7 +550,7 @@ export default function planMode(pi: ExtensionAPI) { requestPlanFinalization(); } else if (choice === PLAN_READY_ACTIONS.off) { clearPlan(ctx); - ctx.ui.notify("Plan mode is off.", "info"); + notifyWebCommand(ctx, "Plan mode is off.", "info"); } return; } @@ -630,18 +596,67 @@ export default function planMode(pi: ExtensionAPI) { planning = restored.planning; readyPlan = restored.readyPlan; setStatus(ctx); - if (restored.error) ctx.ui.notify(restored.error, "error"); + if (restored.error) notifyWebCommand(ctx, restored.error, "error"); }; + const bindControl = (ctx: ExtensionContext) => { + unregisterControl?.(); + unregisterControl = registerPlanControl(ctx.sessionManager, (request) => { + if (!ctx.isIdle()) + throw new PlanControlError( + "Stop the current turn before changing Plan mode", + "PLAN_BUSY", + 409, + ); + const current = projectPlanControl(ctx.sessionManager.getBranch()); + if (current.revision !== request.expectedRevision) + throw new PlanControlError( + "Plan mode changed. Refresh before trying again.", + "PLAN_CONFLICT", + 409, + ); + if ( + request.enabled && + (current.status === "ready" || current.status === "invalid") + ) + throw new PlanControlError( + "Review or explicitly exit the current plan first", + "PLAN_CONFLICT", + 409, + ); + const target = request.enabled ? "planning" : "inactive"; + if (current.status !== target) + commitPlanState({ version: 1, status: target }, ctx); + return projectPlanControl(ctx.sessionManager.getBranch()); + }); + }; + + // Mode selection does not create a turn. Supply the current stance when + // Pi actually starts the next user/background turn, including after restore. + pi.on("before_agent_start", (event) => { + if (!planning) return; + return { + systemPrompt: `${event.systemPrompt}\n\n${ + readyPlan + ? "The plan is ready. All tools remain blocked until the user explicitly chooses a Plan action or exits planning. Do not start implementation." + : BLOCK_REASON + }`, + }; + }); + pi.on("session_start", (_event, ctx) => { restoreRuntimeState(ctx); + bindControl(ctx); }); pi.on("session_tree", (_event, ctx) => { restoreRuntimeState(ctx); + bindControl(ctx); }); pi.on("session_shutdown", () => { + unregisterControl?.(); + unregisterControl = undefined; planning = false; readyPlan = undefined; syncPlanTool(); diff --git a/extensions/plan-mode/persisted-state.ts b/extensions/plan-mode/persisted-state.ts new file mode 100644 index 00000000..ee92a1ec --- /dev/null +++ b/extensions/plan-mode/persisted-state.ts @@ -0,0 +1,73 @@ +import { sanitizeTerminalText } from "../shared/terminal-text.ts"; + +export const MAX_READY_PLAN_CHARS = 50_000; +export const MAX_READY_PLAN_UTF8_BYTES = 48_000; +export const PLAN_MODE_STATE_ENTRY = "my-pi-setup-plan-mode-state"; + +export type PersistedPlanModeState = + | { version: 1; status: "inactive" | "planning" } + | { version: 1; status: "ready"; plan: string }; + +export interface RestoredPlanModeState { + planning: boolean; + readyPlan?: string; + error?: string; +} + +function isRecord(value: unknown): value is Record { + return typeof value === "object" && value !== null && !Array.isArray(value); +} + +function isBoundedReadyPlan(value: unknown): value is string { + return ( + typeof value === "string" && + sanitizeTerminalText(value) === value && + value.trim().length > 0 && + value.length <= MAX_READY_PLAN_CHARS && + new TextEncoder().encode(value.trim()).byteLength <= + MAX_READY_PLAN_UTF8_BYTES + ); +} + +function decodePlanModeState(data: unknown): RestoredPlanModeState | undefined { + if ( + !isRecord(data) || + data.version !== 1 || + typeof data.status !== "string" + ) { + return; + } + const keys = Object.keys(data).sort().join(","); + if (data.status === "inactive" || data.status === "planning") { + if (keys !== "status,version") return; + return { planning: data.status === "planning" }; + } + if (data.status === "ready" && keys === "plan,status,version") { + if (!isBoundedReadyPlan(data.plan)) return; + return { planning: true, readyPlan: data.plan.trim() }; + } +} + +/** Restore only the newest branch-local state; malformed state fails closed. */ +export function restorePlanModeState( + entries: readonly unknown[], +): RestoredPlanModeState { + for (let index = entries.length - 1; index >= 0; index--) { + const entry = entries[index]; + if ( + !isRecord(entry) || + entry.type !== "custom" || + entry.customType !== PLAN_MODE_STATE_ENTRY + ) { + continue; + } + return ( + decodePlanModeState(entry.data) ?? { + planning: true, + error: + "The latest persisted Plan Mode state is malformed; writes remain blocked. Use `/plan off` to clear it explicitly.", + } + ); + } + return { planning: false }; +} diff --git a/extensions/setup/index.ts b/extensions/setup/index.ts index 125a36c1..c9dc7508 100644 --- a/extensions/setup/index.ts +++ b/extensions/setup/index.ts @@ -107,6 +107,11 @@ export function applySubagentRoleModelUpdates( return roleModels; } +const SETUP_REQUEST_VALIDATION = [ + "Validate the requested field and value before writing. For an invalid requested value, explain the problem and the legal values or range in the user's language. Do not clamp, substitute, or reinterpret it as a different field or preset. Preserve the setting unless the user explicitly chooses a legal alternative; keeping the current setting requires no write. A prior assistant explanation is not user consent, and an answer to an unrelated question is not approval for a configuration change.", + 'In particular, ui.footerStyle accepts only plain, powerline, powerline-mono. A request for ui.footerStyle="compact" is invalid; applying the compact preset is a different request that also resets the layout. workflows.concurrency accepts integers 1-64; 0 does not mean 1 or "disabled". workflows.maxAgentCalls accepts integers 1-1024. Ask only for the missing configuration decision when clarification is needed.', +].join("\n"); + export function buildInteractiveSetupPrompt(options: { currentConfiguration: string; currentModel: string; @@ -160,6 +165,7 @@ export function buildInteractiveSetupPrompt(options: { '- "make explorer inherit again" → subagent_role_models={explorer:null}', "", "configure_my_pi_setup is available only for this setup run. If the run settles without a successful apply, the writer is hidden and a later change requires /openpi-setup . Use ask_user for the decision instead of merely printing instructions. Put the recommended choice first. Do not change configuration until the choices are clear. Then call configure_my_pi_setup at most once with the final requested changes, preserving everything else. Do not edit configuration files directly.", + SETUP_REQUEST_VALIDATION, ]; } @@ -613,6 +619,7 @@ export default function openPiSetup(pi: ExtensionAPI) { "Capability discovery is explicit by default; adaptive is an opt-in that keeps only openpi_load_tools visible so the model may load useful groups. Footer tips: presets are powerline, powerline-mono, compact; style is plain/powerline/powerline-mono; custom layouts use ui_footer_lines (2D enum arrays with optional flex). Do not use ui_footer_items together with ui_footer_lines. Built-in Agent role models (explorer, implementer, reviewer, advisor) are shared by subagent_spawn and workflow agent_type; they inherit the parent unless assigned an available registry model, and clearing an assignment restores inheritance. Custom agent-type files still override built-in role definitions. A Nerd Font renders Footer Codicons and powerline seams as designed; text stays readable without it. Changes apply immediately in the active TUI session.", "", "configure_my_pi_setup is available only for this setup run. If the run settles without a successful apply, the writer is hidden and a later change requires /openpi-setup . Use configure_my_pi_setup to apply only the requested OpenPI-owned changes and preserve everything else. Interpret model names from the available Pi registry. Do not edit configuration files directly.", + SETUP_REQUEST_VALIDATION, ] : buildInteractiveSetupPrompt({ currentConfiguration, diff --git a/extensions/shared/web-command-feedback.ts b/extensions/shared/web-command-feedback.ts new file mode 100644 index 00000000..510463c7 --- /dev/null +++ b/extensions/shared/web-command-feedback.ts @@ -0,0 +1,41 @@ +import type { ExtensionContext } from "@earendil-works/pi-coding-agent"; + +export const WEB_COMMAND_FEEDBACK = "openpi-web-command-feedback"; +export const WEB_COMMAND_INPUT = "openpi-web-command-input"; +type Feedback = (text: string, level: "info" | "warning" | "error") => void; +const key = Symbol.for("@tt-a1i/openpi/web-command-feedback/v1"); +const existing: unknown = Reflect.get(globalThis, key); +if (existing !== undefined && !(existing instanceof WeakMap)) + throw new Error("Incompatible Web feedback bridge"); +const bridges: WeakMap = existing ?? new WeakMap(); +if (existing === undefined) + Object.defineProperty(globalThis, key, { value: bridges }); + +export function registerWebCommandFeedback(scope: object, feedback: Feedback) { + if (bridges.has(scope)) + throw new Error("Session already has a Web feedback bridge"); + bridges.set(scope, feedback); + return () => { + if (bridges.get(scope) === feedback) bridges.delete(scope); + }; +} + +export function publishWebCommandFeedback( + scope: object, + text: string, + level: "info" | "warning" | "error" = "info", +) { + const feedback = bridges.get(scope); + if (!feedback) return false; + feedback(text, level); + return true; +} + +export function notifyWebCommand( + ctx: Pick, + text: string, + level: "info" | "warning" | "error" = "info", +) { + if (!publishWebCommandFeedback(ctx.sessionManager, text, level)) + ctx.ui.notify(text, level); +} diff --git a/extensions/usage/index.ts b/extensions/usage/index.ts index 40e6ae78..66348dd3 100644 --- a/extensions/usage/index.ts +++ b/extensions/usage/index.ts @@ -5,6 +5,7 @@ import type { } from "@earendil-works/pi-coding-agent"; import { Key, matchesKey, Text, truncateToWidth } from "@earendil-works/pi-tui"; import { UsageCache } from "./cache.ts"; +import { publishWebCommandFeedback } from "../shared/web-command-feedback.ts"; import { redactIdentifier, renderUsageReport } from "./formatters.ts"; import { DEFAULT_ADAPTERS } from "./providers/registry.ts"; import { safeUsageError, waitForUsage } from "./providers/utils.ts"; @@ -111,7 +112,10 @@ export default function usage(pi: ExtensionAPI) { flags = parseUsageArgs(args); } catch { if (ctx.hasUI) ctx.ui.notify(USAGE_HELP, "warning"); - else console.log(USAGE_HELP); + else if ( + !publishWebCommandFeedback(ctx.sessionManager, USAGE_HELP, "warning") + ) + console.log(USAGE_HELP); return; } const controller = new AbortController(); @@ -163,7 +167,8 @@ export default function usage(pi: ExtensionAPI) { useColor: ctx.mode === "tui", }); if (!ctx.hasUI) { - console.log(output); + if (!publishWebCommandFeedback(ctx.sessionManager, output)) + console.log(output); return; } if (ctx.mode !== "tui") { diff --git a/tests/extensions/ask-user/index.test.ts b/tests/extensions/ask-user/index.test.ts index 38f08c5a..e3970c74 100644 --- a/tests/extensions/ask-user/index.test.ts +++ b/tests/extensions/ask-user/index.test.ts @@ -1,5 +1,6 @@ import assert from "node:assert/strict"; import test from "node:test"; +import { registerWebQuestionBridge } from "../../../extensions/ask-user/web-bridge.ts"; import { stripVTControlCharacters } from "node:util"; import type { ExtensionAPI, @@ -746,6 +747,59 @@ function toolsExecute(name: string) { return execute as T; } +test("Web handoff accepts only a reviewed status and maps expiry to cancellation", async () => { + const execute = toolsExecute("human_handoff"); + const scope = {}; + const ctx = { + hasUI: false, + sessionManager: scope, + } as unknown as ExtensionContext; + const params = { + title: "Sign in", + instructions: "Open the login page", + completionSignal: "Account visible", + }; + const signal = new AbortController().signal; + const unregister = registerWebQuestionBridge( + scope, + async (_id, questions, _signal, handoff) => { + assert.deepEqual(handoff, params); + return { + kind: "answered", + answers: [ + { + id: "handoff", + selected: questions[0]!.options[1]!.label, + note: "No access", + }, + ], + }; + }, + ); + try { + const result = await execute("handoff-web", params, signal, undefined, ctx); + assert.deepEqual(result.details, { status: "unable", note: "No access" }); + assert.match(result.content[0]!.text, /Do not claim it succeeded/); + } finally { + unregister(); + } + const expire = registerWebQuestionBridge(scope, async () => ({ + kind: "expired", + })); + try { + assert.equal( + (await execute("expired", params, signal, undefined, ctx)).details.status, + "cancelled", + ); + } finally { + expire(); + } + assert.equal( + (await execute("missing", params, signal, undefined, ctx)).details.status, + "unavailable", + ); +}); + test("human handoff reviews status and tells the agent to verify completion", async () => { const execute = toolsExecute("human_handoff"); let selectCalls = 0; diff --git a/tests/extensions/plan-mode/control.test.ts b/tests/extensions/plan-mode/control.test.ts new file mode 100644 index 00000000..42111099 --- /dev/null +++ b/tests/extensions/plan-mode/control.test.ts @@ -0,0 +1,138 @@ +import assert from "node:assert/strict"; +import test from "node:test"; +import type { + ExtensionAPI, + ExtensionContext, +} from "@earendil-works/pi-coding-agent"; +import planMode, { + PLAN_MODE_STATE_ENTRY, +} from "../../../extensions/plan-mode/index.ts"; +import { + controlPlan, + projectPlanControl, +} from "../../../extensions/plan-mode/control.ts"; + +function harness() { + const branch: Array> = []; + const handlers = new Map< + string, + (event: never, ctx: ExtensionContext) => unknown + >(); + const messages: unknown[] = []; + let failAppend = false; + let busy = false; + const ctx = { + hasUI: false, + isIdle: () => !busy, + sessionManager: { getBranch: () => branch }, + ui: { notify() {}, setStatus() {} }, + } as unknown as ExtensionContext; + planMode({ + registerTool() {}, + registerCommand() {}, + getActiveTools: () => [], + setActiveTools() {}, + events: { emit() {} }, + on: ( + name: string, + handler: (event: never, ctx: ExtensionContext) => unknown, + ) => handlers.set(name, handler), + appendEntry(customType: string, data: unknown) { + if (failAppend) throw new Error("disk failure"); + branch.push({ + type: "custom", + customType, + data, + id: `entry-${branch.length}`, + }); + }, + sendMessage(message: unknown) { + messages.push(message); + }, + } as unknown as ExtensionAPI); + const emit = (name: string, event: unknown = {}) => + handlers.get(name)?.(event as never, ctx); + emit("session_start"); + return { + branch, + ctx, + emit, + messages, + setBusy: (value: boolean) => { + busy = value; + }, + failAppend: () => { + failAppend = true; + }, + set: ( + enabled: boolean, + expectedRevision = projectPlanControl(branch).revision, + ) => controlPlan(ctx.sessionManager, { enabled, expectedRevision }), + }; +} + +test("mode-only control persists and gates tools without sending a model turn; restores and cleans up", () => { + const h = harness(); + const on = h.set(true); + assert.equal(on.status, "planning"); + assert.equal(on.hasPrompt, false); + assert.deepEqual(h.messages, []); + assert.equal( + (h.emit("tool_call", { toolName: "write" }) as { block: boolean }).block, + true, + ); + assert.equal(h.emit("tool_call", { toolName: "read" }), undefined); + assert.match( + ( + h.emit("before_agent_start", { systemPrompt: "base" }) as { + systemPrompt: string; + } + ).systemPrompt, + /base[\s\S]*Plan mode is active/, + ); + const count = h.branch.length; + h.set(true); + assert.equal(h.branch.length, count); + h.branch.push({ + type: "message", + message: { role: "user", content: "Plan export" }, + }); + assert.equal(projectPlanControl(h.branch).hasPrompt, true); + h.emit("session_tree"); + assert.equal(projectPlanControl(h.branch).hasPrompt, true); + h.set(false); + assert.equal(h.emit("tool_call", { toolName: "write" }), undefined); + assert.equal( + h.emit("before_agent_start", { systemPrompt: "base" }), + undefined, + ); + assert.equal(projectPlanControl(h.branch).hasPrompt, false); + assert.deepEqual(h.messages, []); + h.emit("session_shutdown"); + assert.throws(() => h.set(true), /unavailable/); +}); + +test("busy, stale, ready and failed persistence never silently open the Plan gate", () => { + const h = harness(); + h.set(true); + h.setBusy(true); + assert.throws(() => h.set(false), /Stop the current turn/); + h.setBusy(false); + assert.throws(() => h.set(false, null), /changed/); + h.branch.push({ + type: "custom", + customType: PLAN_MODE_STATE_ENTRY, + id: "ready", + data: { version: 1, status: "ready", plan: "Review this plan" }, + }); + h.emit("session_tree"); + assert.throws(() => h.set(true), /explicitly exit/); + h.failAppend(); + assert.throws(() => h.set(false), /disk failure/); + assert.equal(projectPlanControl(h.branch).status, "ready"); + assert.equal( + (h.emit("tool_call", { toolName: "write" }) as { block: boolean }).block, + true, + ); + h.emit("session_shutdown"); +}); diff --git a/tests/extensions/setup/index.test.ts b/tests/extensions/setup/index.test.ts index ca8b2524..535127ce 100644 --- a/tests/extensions/setup/index.test.ts +++ b/tests/extensions/setup/index.test.ts @@ -213,6 +213,23 @@ test("setup broadcasts its episode demand for interaction tools", async () => { assert.deepEqual(h.setupEpisodeStates.at(-1), { active: false }); }); +test("both setup entry flows require an explicit user choice before replacing invalid requested values", async () => { + for (const request of [ + "", + 'Set ui.footerStyle to "compact" and workflows.concurrency to 0.', + ]) { + const h = visibilityHarness(); + await h.emit("session_start"); + await h.runCommand("openpi-setup", request); + const prompt = JSON.stringify(h.setupRequests()); + assert.match(prompt, /invalid requested value/); + assert.match(prompt, /legal values or range/); + assert.match(prompt, /Do not clamp, substitute, or reinterpret/); + assert.match(prompt, /explicitly chooses a legal alternative/); + assert.match(prompt, /prior assistant explanation is not user consent/); + } +}); + test("registers the canonical setup command, legacy alias, and one constrained tool", () => { const h = visibilityHarness(); assert.deepEqual([...h.commands.keys()].sort(), [ diff --git a/tests/web/app-render.spec.ts b/tests/web/app-render.spec.ts index 53d4c96f..4bdb2126 100644 --- a/tests/web/app-render.spec.ts +++ b/tests/web/app-render.spec.ts @@ -29,6 +29,78 @@ afterEach(() => { vi.useRealTimers(); }); +it("Plan controls preserve drafts without sending prompts, and the placeholder follows confirmed planning messages", async () => { + const snapshot = activeSnapshot(); + snapshot.runtime.plan = "inactive"; + snapshot.runtime.status = "idle"; + snapshot.runtime.planRevision = null; + const store = createWebStore(); + const selectPlanMode = vi.fn(async () => {}); + const sendPrompt = vi.fn(async () => true); + const props = { + snapshot, + selectedWorkspace: "/tmp", + sessionSwitching: false, + promptAdmissionPending: false, + liveRunning: false, + landing: false, + activeTurn: null, + turnCancellationPending: false, + turnTerminalStatus: null, + pendingFollowUpsReceipt: null, + thinkingPendingLevel: null, + actions: { ...store.getState().actions, selectPlanMode, sendPrompt }, + }; + const view = renderWithI18n(createElement(Composer, props)); + const input = screen.getByRole("textbox", { + name: i18n.t("describeTask"), + }); + fireEvent.change(input, { target: { value: "Keep my draft" } }); + fireEvent.click( + screen.getByRole("button", { name: i18n.t("planModeEnter") }), + ); + expect(selectPlanMode).toHaveBeenCalledWith(true); + expect(sendPrompt).not.toHaveBeenCalled(); + expect(input.value).toBe("Keep my draft"); + const rerender = ( + plan: "planning" | "inactive", + hasPrompt: boolean, + pending = false, + ) => + view.rerender( + createElement( + I18nextProvider, + { i18n }, + createElement(Composer, { + ...props, + planSelectionPending: pending, + snapshot: { + ...snapshot, + runtime: { ...snapshot.runtime, plan, planHasPrompt: hasPrompt }, + }, + }), + ), + ); + rerender("planning", false); + expect(input.placeholder).not.toBe(i18n.t("promptPlanMessage")); + rerender("planning", true); + expect(input.placeholder).toBe(i18n.t("promptPlanMessage")); + fireEvent.click(screen.getByRole("button", { name: i18n.t("planModeExit") })); + expect(selectPlanMode).toHaveBeenLastCalledWith(false); + expect(sendPrompt).not.toHaveBeenCalled(); + rerender("inactive", false); + expect(input.placeholder).not.toBe(i18n.t("promptPlanMessage")); + expect(input.value).toBe("Keep my draft"); + rerender("planning", true, true); + expect( + screen.getByRole("button", { + name: i18n.t("planModeExit"), + }).disabled, + ).toBe(true); + await act(async () => fireEvent.submit(input.closest("form")!)); + expect(sendPrompt).not.toHaveBeenCalled(); +}); + it("keeps a workspace draft separate from the old Session UI and retains text after failed sending", async () => { const initial = webStore.getState(); const snapshot = activeSnapshot(); diff --git a/tests/web/command-discovery.test.ts b/tests/web/command-discovery.test.ts index 7fb13743..5c072d01 100644 --- a/tests/web/command-discovery.test.ts +++ b/tests/web/command-discovery.test.ts @@ -1,5 +1,6 @@ import assert from "node:assert/strict"; import test from "node:test"; +import { fileURLToPath } from "node:url"; import type { AgentSessionServices, ExtensionAPI, @@ -34,6 +35,18 @@ function command( }; } +test("only reviewed command owners gain Web support; same names from other packages stay unadapted", () => { + const plan = command("plan", "extension"); + const impostor = projectWebCommands([plan]).commands[0]!; + assert.equal(impostor.availability, "unsupported"); + plan.sourceInfo.path = fileURLToPath( + new URL("../../extensions/plan-mode/index.ts", import.meta.url), + ); + const owned = projectWebCommands([plan]).commands[0]!; + assert.equal(owned.availability, "available"); + assert.equal(owned.support, "plan"); +}); + test("projects Pi command identities without exposing source metadata", () => { const result = projectWebCommands([ command("extension:run", "extension", "Run\u0000 an extension"), diff --git a/tests/web/command-feedback.test.ts b/tests/web/command-feedback.test.ts new file mode 100644 index 00000000..c4bb24ae --- /dev/null +++ b/tests/web/command-feedback.test.ts @@ -0,0 +1,51 @@ +import assert from "node:assert/strict"; +import test from "node:test"; +import { SessionManager } from "@earendil-works/pi-coding-agent"; +import { + WEB_COMMAND_INPUT, + WEB_COMMAND_FEEDBACK, + registerWebCommandFeedback, + publishWebCommandFeedback, +} from "../../extensions/shared/web-command-feedback.ts"; +import { projectEntry, WEB_MAX_TEXT } from "../../web/protocol/types.ts"; + +test("command operator records preserve order and truncation without adding model messages", () => { + const session = SessionManager.inMemory("/tmp"); + session.appendCustomEntry(WEB_COMMAND_INPUT, { + text: "/plan " + "x".repeat(WEB_MAX_TEXT), + commandId: "command", + }); + session.appendCustomEntry(WEB_COMMAND_FEEDBACK, { + text: "Writes remain blocked", + truncated: true, + }); + session.appendCustomEntry("private-extension-state", { text: "secret" }); + const entries = session.getBranch().map((entry) => projectEntry(entry)); + const messages = entries.flatMap((entry) => + entry.message ? [entry.message] : [], + ); + assert.equal(messages.length, 2); + assert.equal(messages[0]!.role, "user"); + assert.equal(messages[0]!.commandId, "command"); + assert.equal(messages[0]!.content.length, WEB_MAX_TEXT); + assert.equal(messages[1]!.truncation?.truncated, true); + assert.equal(JSON.stringify(entries).includes("secret"), false); + assert.deepEqual(session.buildSessionContext().messages, []); +}); + +test("command feedback belongs only to its active Session and unregistering removes the transport", () => { + const scope = {}; + const received: string[] = []; + const unregister = registerWebCommandFeedback(scope, (text) => + received.push(text), + ); + try { + assert.equal(publishWebCommandFeedback({}, "foreign"), false); + assert.equal(publishWebCommandFeedback(scope, "owned"), true); + assert.throws(() => registerWebCommandFeedback(scope, () => {})); + assert.deepEqual(received, ["owned"]); + } finally { + unregister(); + } + assert.equal(publishWebCommandFeedback(scope, "late"), false); +}); diff --git a/tests/web/commands-provider.e2e.ts b/tests/web/commands-provider.e2e.ts new file mode 100644 index 00000000..2f92787f --- /dev/null +++ b/tests/web/commands-provider.e2e.ts @@ -0,0 +1,61 @@ +import { expect, test } from "@playwright/test"; +import { mkdtemp, rm } from "node:fs/promises"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; + +const headers = { Authorization: `Bearer ${process.env.OPENPI_WEB_E2E_TOKEN}` }; + +test("native command feedback survives refresh without model calls", async ({ + page, +}, info) => { + const workspace = await mkdtemp(join(tmpdir(), "openpi-web-commands-")); + try { + const imported = await page.request.post("/api/workspaces", { + headers, + data: { path: workspace }, + }); + const { path } = await imported.json(); + const created = await page.request.post("/api/sessions", { + headers, + data: { workspacePath: path, commandId: "commands" }, + }); + expect(created.status()).toBe(201); + const session = await created.json(); + const discovery = await ( + await page.request.get(`/api/commands?sessionId=${session.sessionId}`, { + headers, + }) + ).json(); + for (const name of ["plan", "openpi-setup", "usage", "cron"]) + expect( + discovery.commands.find( + (command: { name: string }) => command.name === name, + )?.availability, + ).toBe("available"); + await page.goto("/"); + const input = page.getByRole("textbox", { name: "描述任务" }); + for (const [command, feedback] of [ + ["/plan off", "Plan mode off. No implementation was started."], + ["/cron in 1h Later test", "Scheduled prompt 1 once in 1h."], + ["/cron list", "Later test"], + ["/cron remove 1", "Removed scheduled prompt 1."], + ["/usage", "No supported authenticated providers found"], + ]) { + await input.fill(command!); + await input.press("Enter"); + await expect( + page.locator(".command-feedback").filter({ hasText: feedback! }).last(), + ).toBeVisible(); + } + await page.reload(); + await expect(page.locator(".message-row.user")).toHaveCount(5); + await expect(page.locator(".command-feedback")).toHaveCount(5); + const texts = await page.locator(".message-row").allTextContents(); + expect(texts[0]).toContain("/plan off"); + expect(texts[1]).toContain("Plan mode off"); + await expect(page.getByText("普通模式", { exact: true })).toBeVisible(); + await page.screenshot({ path: info.outputPath("commands-light.png") }); + } finally { + await rm(workspace, { recursive: true, force: true }); + } +}); diff --git a/tests/web/openpi-web.e2e.ts b/tests/web/openpi-web.e2e.ts index 51d9962f..28b181af 100644 --- a/tests/web/openpi-web.e2e.ts +++ b/tests/web/openpi-web.e2e.ts @@ -1043,7 +1043,7 @@ test("discovers and completes Pi commands without submitting unsupported command await input.fill("/extension"); const extension = page.getByRole("option", { name: /\/extension:setup/u }); await expect(extension).toBeDisabled(); - await expect(extension).toContainText("当前 Web 不支持"); + await expect(extension).toContainText("尚未适配 · 手动命令仍交给 Pi"); await input.fill("/rev"); await expect(page.getByRole("option", { name: /\/review/u })).toBeVisible(); diff --git a/tests/web/pi-runtime.test.ts b/tests/web/pi-runtime.test.ts index 7879ee63..79cb3c77 100644 --- a/tests/web/pi-runtime.test.ts +++ b/tests/web/pi-runtime.test.ts @@ -11,6 +11,7 @@ import { WebRuntimeRequestError, } from "../../web/runtime/types.ts"; import { acquireWebHostLease } from "../../web/runtime/web-host-lease.ts"; +import { registerPlanControl } from "../../extensions/plan-mode/control.ts"; type Trace = { commandId: string; @@ -137,6 +138,8 @@ type FakeAgentRuntime = { dispose: () => Promise; }; type PromptRuntimeHarness = { + setPlanMode: PiWebRuntime["setPlanMode"]; + listCommands: PiWebRuntime["listCommands"]; runtime: FakeAgentRuntime; listeners: Set<(event: WebRuntimeEvent) => void>; retainedRuntimes: Set; @@ -324,6 +327,49 @@ function promptHarness(session: ReturnType) { return harness; } +test("Plan control targets the active idle owned Session without admitting a prompt", async () => { + const session = promptSession("session-a"); + const runtime = promptHarness(session); + runtime.listCommands = () => + ({ commands: [{ name: "plan", support: "plan" }] }) as ReturnType< + PiWebRuntime["listCommands"] + >; + let calls = 0; + const unregister = registerPlanControl(session.sessionManager, () => { + calls++; + return { status: "planning", revision: "revision", hasPrompt: false }; + }); + try { + const request = { + sessionId: "session-a", + enabled: true, + expectedRevision: null, + }; + assert.equal((await runtime.setPlanMode(request)).status, "planning"); + assert.equal(calls, 1); + assert.equal(session.calls.length, 0); + await assert.rejects( + runtime.setPlanMode({ ...request, sessionId: "old" }), + { code: "SESSION_CONFLICT" }, + ); + session.isStreaming = true; + await assert.rejects(runtime.setPlanMode(request), { code: "PLAN_BUSY" }); + session.isStreaming = false; + const preparing = Promise.resolve(); + runtime.promptOperations.add(preparing); + await assert.rejects(runtime.setPlanMode(request), { code: "PLAN_BUSY" }); + runtime.promptOperations.delete(preparing); + runtime.listCommands = () => + ({ commands: [] }) as unknown as ReturnType; + await assert.rejects(runtime.setPlanMode(request), { + code: "PLAN_CONTROL_UNAVAILABLE", + }); + assert.equal(calls, 1); + } finally { + unregister(); + } +}); + test("prompt admission waits for Pi preflight acceptance", async () => { const session = promptSession("session-a"); const runtime = promptHarness(session); @@ -819,6 +865,48 @@ test("handled prompt emits a correlated settlement without agent events", async ]); }); +test("a command's delayed native turn retains its origin without lending it to another run", async () => { + const session = promptSession("session-a"); + const runtime = promptHarness(session); + const events: WebRuntimeEvent[] = []; + runtime.subscribe((event) => events.push(event)); + const project = ( + PiWebRuntime.prototype as unknown as { + projectEvent( + this: PromptRuntimeHarness, + session: object, + event: object, + ): void; + } + ).projectEvent; + const delayed = deferred(); + session.prompt = async (_content, options) => { + options.preflightResult?.(true); + // Created inside the real sendPrompt invocation, after handler return. + setImmediate(() => { + project.call(runtime, session, { type: "agent_start" }); + delayed.resolve(); + }); + }; + await runtime.sendPrompt("/command", { + commandId: "owner", + expectedSessionId: "session-a", + }); + await delayed.promise; + assert.equal(runtime.activePromptTrace?.commandId, "owner"); + assert.ok( + events.some( + (event) => + event.type === "agent_start" && + (event.detail?.activeTurn as { commandId?: string })?.commandId === + "owner", + ), + ); + project.call(runtime, session, { type: "agent_settled" }); + project.call(runtime, session, { type: "agent_start" }); + assert.equal(events.at(-1)?.detail?.activeTurn, undefined); +}); + test("later prompt failures retain their command and Session correlation", async () => { const session = promptSession("session-a"); const runtime = promptHarness(session); diff --git a/tests/web/plan-card.spec.ts b/tests/web/plan-card.spec.ts new file mode 100644 index 00000000..fe072f20 --- /dev/null +++ b/tests/web/plan-card.spec.ts @@ -0,0 +1,354 @@ +// @vitest-environment jsdom + +import { + act, + cleanup, + fireEvent, + render, + screen, +} from "@testing-library/react"; +import { createElement } from "react"; +import { I18nextProvider } from "react-i18next"; +import { afterEach, expect, it, vi } from "vitest"; +import { + projectMessage, + type WebLiveMessage, + type WebSnapshot, +} from "../../web/protocol/types.ts"; +import { Transcript } from "../../web/ui/src/features/transcript/Transcript.tsx"; +import { i18n } from "../../web/ui/src/i18n.ts"; + +afterEach(() => { + cleanup(); + vi.restoreAllMocks(); +}); +const markdown = + "# Export plan\n\n## Scope\n\n- [ ] Export **Markdown** only\n\n- [x] Review scope\n\n[unsafe](javascript:alert(1))"; +const result = (plan = markdown) => + projectMessage({ + role: "toolResult", + toolName: "plan_ready", + toolCallId: "plan-1", + isError: false, + content: [ + { + type: "text", + text: `Plan ready for explicit user action. No implementation has started.\n\n${plan}`, + }, + ], + details: { status: "ready", plan }, + }); +const call: WebLiveMessage = { + role: "assistant", + content: "", + parts: [ + { + type: "toolCall", + id: "plan-1", + name: "plan_ready", + arguments: JSON.stringify({ plan: "# Unaccepted proposal" }), + }, + ], +}; +const truncation = { + bytes: 0, + maxBytes: 4194304, + messagesTruncated: 0, + messagePartsOmitted: 0, + entriesOmitted: 0, + modelsOmitted: 0, + sessionsOmitted: 0, + workspacesOmitted: 0, + truncated: false, +}; +function transcript( + messages: WebLiveMessage[], + live: WebLiveMessage[] = [], + active = true, +) { + const snapshot: WebSnapshot = { + protocolVersion: 1, + preferences: { theme: "system" }, + generatedAt: "2026-09-19T00:00:00Z", + cursor: 1, + currentSessionId: active ? "session" : "other", + workspaces: [], + sessions: [], + models: [], + runtime: { status: "idle", capabilities: {} }, + truncation, + selectedSession: { + id: "session", + path: "/tmp/session", + cwd: "/tmp", + bytes: 1, + truncation, + entries: messages.map((message, index) => ({ + type: "message", + id: String(index), + timestamp: "2026-09-19T00:00:00Z", + message, + })), + }, + }; + return createElement( + I18nextProvider, + { i18n }, + createElement(Transcript, { + snapshot, + liveMessages: live.map((message, index) => ({ + key: `live-${index}`, + message, + })), + liveRunning: false, + livePhase: "idle", + liveRetry: null, + thinkingStarts: {}, + thinkingDurations: {}, + scrollToBottom: 0, + onResend: async () => true, + }), + ); +} + +it("renders one readable plan from the successful result through live delivery and history refresh", () => { + const view = render(transcript([call], [result()])); + expect( + screen.getAllByRole("region", { name: i18n.t("planCardLabel") }), + ).toHaveLength(1); + expect(screen.getByRole("heading", { name: "Export plan" })).toBeTruthy(); + expect( + screen.queryByRole("heading", { name: "Unaccepted proposal" }), + ).toBeNull(); + expect(screen.getByText("unsafe").closest("a")).toBeNull(); + expect( + screen + .getByRole("checkbox", { name: "Export Markdown only" }) + .hasAttribute("disabled"), + ).toBe(true); + expect(screen.getByText(i18n.t("planCardNotApproval"))).toBeTruthy(); + view.rerender(transcript([call, result()], [result()])); + expect( + screen.getAllByRole("region", { name: i18n.t("planCardLabel") }), + ).toHaveLength(1); + view.rerender(transcript([call, result()], [], false)); + expect(screen.getByRole("heading", { name: "Export plan" })).toBeTruthy(); +}); + +it("keeps the next thinking-only message visible after a completed ask_user with no body text", () => { + const asked: WebLiveMessage = { + role: "assistant", + content: "", + parts: [{ type: "toolCall", id: "ask", name: "ask_user", arguments: "{}" }], + }; + const answered: WebLiveMessage = { + role: "toolResult", + toolName: "ask_user", + toolCallId: "ask", + isError: false, + content: "User answered: JSON", + }; + const next: WebLiveMessage = { + role: "assistant", + content: "", + parts: [{ type: "thinking", text: "Investigating the export plan" }], + }; + render(transcript([asked, answered], [next])); + expect( + screen.getByText("Investigating the export plan", { selector: "pre" }), + ).toBeTruthy(); +}); + +it("does not relocate the answer bubble while plan arguments stream after it", () => { + const next: WebLiveMessage = { + role: "assistant", + content: "Your choice is JSON.", + parts: [{ type: "text", text: "Your choice is JSON." }], + }; + const view = render(transcript([], [next])); + const answer = screen.getByText("Your choice is JSON.").closest("article"); + const stream: WebLiveMessage = { + ...next, + parts: [ + ...next.parts!, + { + type: "toolCall", + id: "ready", + name: "plan_ready", + arguments: '{"plan":"# Export', + }, + ], + }; + view.rerender(transcript([], [stream])); + expect(screen.getByText("Your choice is JSON.").closest("article")).toBe( + answer, + ); + expect(view.container.querySelector("article")).toBe(answer); +}); + +it("keeps answered tool evidence mounted and open as a snapshot absorbs live messages", () => { + const asked: WebLiveMessage = { + role: "assistant", + timestamp: 100, + content: "", + parts: [{ type: "toolCall", id: "ask", name: "ask_user", arguments: "{}" }], + }; + const answered: WebLiveMessage = { + role: "toolResult", + toolName: "ask_user", + toolCallId: "ask", + content: "User answered: - export_format: Markdown", + }; + const feedback: WebLiveMessage = { + role: "custom", + timestamp: 110, + customType: "openpi-web-command-feedback", + content: "Planning started", + }; + const next: WebLiveMessage = { + role: "assistant", + timestamp: 200, + content: "Preparing the plan.", + parts: [{ type: "text", text: "Preparing the plan." }], + }; + const live = [feedback, answered, next]; + const view = render(transcript([asked], live)); + const evidence = screen + .getByText(answered.content, { selector: "pre" }) + .closest("details")!; + fireEvent.click(evidence.querySelector("summary")!); + expect(evidence.open).toBe(true); + view.rerender(transcript([asked, answered], live)); + expect( + screen.getByText(answered.content, { selector: "pre" }).closest("details"), + ).toBe(evidence); + expect(evidence.open).toBe(true); +}); + +it("does not let invisible custom messages create moving empty rows around ask_user", () => { + const ghost: WebLiveMessage = { + role: "custom", + timestamp: 100, + customType: "plan-mode-armed", + content: "Model instructions", + }; + const hidden: WebLiveMessage = { + ...ghost, + timestamp: 110, + customType: "openpi-web-command-feedback", + display: false, + }; + const answer: WebLiveMessage = { + role: "toolResult", + toolName: "ask_user", + toolCallId: "ask", + content: "User answered: Markdown", + }; + const view = render(transcript([], [ghost, hidden, answer])); + expect(view.container.querySelectorAll("article")).toHaveLength(1); + view.rerender(transcript([answer], [ghost, hidden, answer])); + expect(view.container.querySelectorAll("article")).toHaveLength(1); +}); + +it("keeps native message identity across snapshot refreshes without hiding identical text in a later turn", () => { + const first = projectMessage({ + role: "assistant", + timestamp: 100, + content: [{ type: "text", text: "Understood." }], + }); + const next = projectMessage({ + role: "assistant", + timestamp: 200, + content: [{ type: "text", text: "Understood." }], + }); + const view = render(transcript([first], [next])); + expect(screen.getAllByText("Understood.")).toHaveLength(2); + const bubble = screen.getAllByText("Understood.")[1]!.closest("article"); + view.rerender(transcript([first, next], [next])); + expect(screen.getAllByText("Understood.")).toHaveLength(2); + expect(screen.getAllByText("Understood.")[1]!.closest("article")).toBe( + bubble, + ); + view.rerender(transcript([first, next])); + expect(screen.getAllByText("Understood.")[1]!.closest("article")).toBe( + bubble, + ); +}); + +it("renders a saved result whose original tool call was omitted from the snapshot", () => { + render(transcript([result()])); + expect(screen.getByRole("heading", { name: "Export plan" })).toBeTruthy(); +}); + +it.each([ + undefined, + { ...result(), isError: true, content: "Plan rejected by the runtime." }, + { ...result(), isError: undefined }, + { + ...result(), + details: { status: "cancelled" }, + content: "Plan completion cancelled.", + }, + { ...result(), details: { status: "ready", plan: " " } }, +])( + "does not turn proposed, failed, partial, cancelled or invalid output into a ready plan (%#)", + (receipt) => { + render(transcript([call, ...(receipt ? [receipt] : [])])); + expect( + screen.queryByRole("region", { name: i18n.t("planCardLabel") }), + ).toBeNull(); + if (receipt?.isError) + expect(screen.getAllByText(receipt.content).length).toBeGreaterThan(0); + }, +); + +it("keeps full structured plans when only the duplicate text projection was shortened", () => { + const plan = `# Long plan\n${"Step. ".repeat(2300)}\nEND OF PLAN`; + const receipt = result(plan); + expect(receipt.truncation?.text).toBe(true); + render(transcript([call, receipt])); + expect(screen.getByText(/END OF PLAN/)).toBeTruthy(); + expect(screen.queryByText(i18n.t("planCardTruncated"))).toBeNull(); +}); + +it("labels bounded output as a preview when the protocol omitted oversized structured details", () => { + const receipt = result(`# Large plan\n${"内容".repeat(6000)}`); + expect(receipt.truncation?.details).toBe(true); + render(transcript([call, receipt])); + expect(screen.getByRole("heading", { name: "Large plan" })).toBeTruthy(); + expect(screen.getByText(i18n.t("planCardTruncated"))).toBeTruthy(); + expect(screen.queryByText(i18n.t("planCardReady"))).toBeNull(); + expect( + screen.getByRole("button", { name: i18n.t("planCardCopyPreview") }), + ).toBeTruthy(); +}); + +it("collapses without approving and copies the actual plan with explicit copy feedback", async () => { + const writeText = vi.fn().mockResolvedValue(undefined); + vi.stubGlobal("navigator", { ...navigator, clipboard: { writeText } }); + try { + const view = render(transcript([call, result()])); + const toggle = screen.getByRole("button", { + name: new RegExp(i18n.t("planCardReady")), + }); + fireEvent.click(toggle); + expect(toggle.getAttribute("aria-expanded")).toBe("false"); + expect(screen.queryByRole("heading", { name: "Export plan" })).toBeNull(); + await act(async () => + fireEvent.click( + screen.getByRole("button", { name: i18n.t("planCardCopy") }), + ), + ); + expect(writeText).toHaveBeenCalledWith(markdown); + expect(screen.getByRole("status").textContent).toBe( + i18n.t("copiedMessage"), + ); + fireEvent.click(toggle); + expect(screen.getByRole("heading", { name: "Export plan" })).toBeTruthy(); + expect( + view.container.querySelector(".plan-card-evidence")?.textContent, + ).toContain("Plan ready for explicit user action"); + } finally { + vi.unstubAllGlobals(); + } +}); diff --git a/tests/web/plan-provider.e2e.ts b/tests/web/plan-provider.e2e.ts new file mode 100644 index 00000000..d108be13 --- /dev/null +++ b/tests/web/plan-provider.e2e.ts @@ -0,0 +1,484 @@ +import { AxeBuilder } from "@axe-core/playwright"; +import { expect, test } from "@playwright/test"; +import { access, mkdtemp, rm } from "node:fs/promises"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; +import { + MODEL_ID, + PROVIDER_ID, + startFakeProvider, +} from "./provider-e2e-support.ts"; + +const plan = + '# 导出会话记录\n\n## 目标\n\n首版提供 **Markdown** 导出,方便阅读与分享,沿用 Pi 的会话记录。\n\n## 实现步骤\n\n1. 从当前分支读取用户消息、助手回复及工具结果。\n2. 保留消息顺序,使用明确标题区分内容类型。\n3. 导出前选择目标位置,避免覆盖已有文件。\n\n## 验证\n\n- [ ] 中文、代码块和长消息可读。\n- [ ] 空会话、取消与写入失败有明确反馈。\n\n```ts\nconst format = "markdown";\n```\n\n本次仅提交开发计划。'; +const headers = { Authorization: `Bearer ${process.env.OPENPI_WEB_E2E_TOKEN}` }; + +test("Plan switch changes only owner state; first message gets planning context and a persistent placeholder", async ({ + page, +}) => { + const workspace = await mkdtemp(join(tmpdir(), "openpi-plan-switch-")); + const forbidden = join(workspace, "should-not-exist.txt"); + const provider = await startFakeProvider((_body, index) => { + const delta = + index === 0 + ? { + role: "assistant", + tool_calls: [ + { + index: 0, + id: "blocked-write", + type: "function", + function: { + name: "write", + arguments: JSON.stringify({ + path: forbidden, + content: "must be blocked", + }), + }, + }, + ], + } + : { role: "assistant", content: "继续讨论方案,不实施。" }; + return ( + [ + { index: 0, delta, finish_reason: null }, + { + index: 0, + delta: {}, + finish_reason: index === 0 ? "tool_calls" : "stop", + }, + ] + .map( + (choice) => + `data: ${JSON.stringify({ id: "plan-switch", object: "chat.completion.chunk", created: 1700000000, model: MODEL_ID, choices: [choice] })}\n\n`, + ) + .join("") + "data: [DONE]\n\n" + ); + }); + try { + const imported = await page.request.post("/api/workspaces", { + headers, + data: { path: workspace }, + }); + const created = await page.request.post("/api/sessions", { + headers, + data: { + workspacePath: (await imported.json()).path, + commandId: "plan-switch", + }, + }); + const { sessionId } = await created.json(); + await page.request.post("/api/model", { + headers, + data: { sessionId, provider: PROVIDER_ID, modelId: MODEL_ID }, + }); + await page.goto("/"); + const input = page.getByRole("textbox", { name: "描述任务" }); + const placeholder = "本次对话使用 Plan 模式 · 继续讨论计划,暂不实施"; + await input.fill("规划导出功能,先调查,不实施。"); + const before = await ( + await page.request.get("/api/snapshot", { headers }) + ).json(); + await page.getByRole("button", { name: "进入规划", exact: true }).click(); + await expect( + page.getByRole("button", { name: "退出规划", exact: true }), + ).toBeEnabled(); + await expect(input).toHaveValue("规划导出功能,先调查,不实施。"); + await expect(input).not.toHaveAttribute("placeholder", placeholder); + expect(provider.requests).toHaveLength(0); + await expect(page.locator(".message-row.user")).toHaveCount(0); + const stale = await page.request.post("/api/plan", { + headers, + data: { + sessionId, + enabled: false, + expectedRevision: before.runtime.planRevision, + }, + }); + expect(stale.status()).toBe(409); + await page.reload(); + await expect( + page.getByRole("button", { name: "退出规划", exact: true }), + ).toBeEnabled(); + expect(provider.requests).toHaveLength(0); + await input.fill("规划导出功能,先调查,不实施。"); + await input.press("Enter"); + await expect(input).toHaveAttribute("placeholder", placeholder); + await expect( + page.getByText("继续讨论方案,不实施。", { exact: true }), + ).toBeVisible(); + await expect( + page.getByRole("button", { name: "退出规划", exact: true }), + ).toBeEnabled(); + expect(provider.requests).toHaveLength(2); + expect(JSON.stringify(provider.requests[0]?.body)).toContain( + "Plan mode is active", + ); + expect(JSON.stringify(provider.requests[1]?.body)).toContain( + "no changes yet", + ); + await expect(access(forbidden)).rejects.toThrow(); + await page.reload(); + await expect(input).toHaveAttribute("placeholder", placeholder); + await input.fill("下一条草稿"); + await page.getByRole("button", { name: "退出规划", exact: true }).click(); + await expect( + page.getByRole("button", { name: "进入规划", exact: true }), + ).toBeEnabled(); + await expect(input).not.toHaveAttribute("placeholder", placeholder); + await expect(input).toHaveValue("下一条草稿"); + expect(provider.requests).toHaveLength(2); + await expect(page.locator(".message-row.user")).toHaveCount(1); + } finally { + await provider.close(); + await rm(workspace, { recursive: true, force: true }); + } +}); + +for (const theme of ["light", "dark"] as const) { + test(`native Plan questions settle into one readable plan card in ${theme}`, async ({ + page, + }, info) => { + // Exercise a scrolled transcript with earlier long plans, as in a resumed + // acceptance Session. Keep the fixture synthetic and local to the browser. + const history = Array.from({ length: 24 }, (_, index) => ({ + type: "message", + id: `history-${index}`, + timestamp: "2026-09-18T00:00:00Z", + message: { + role: "assistant", + timestamp: index + 1, + content: `${plan}\n\n${plan}`, + }, + })); + await page.route("**/api/snapshot**", async (route) => { + const response = await route.fetch(); + const snapshot = await response.json(); + if (snapshot.selectedSession) + snapshot.selectedSession.entries.unshift(...history); + await route.fulfill({ response, json: snapshot }); + }); + let releaseArguments = () => {}; + let releaseFinish = () => {}; + let releaseBurst = () => {}; + const burstGate = new Promise((resolve) => { + releaseBurst = resolve; + }); + const argumentsGate = new Promise((resolve) => { + releaseArguments = resolve; + }); + const finishGate = new Promise((resolve) => { + releaseFinish = resolve; + }); + const streamSteps = Array.from( + { length: theme === "light" ? 48 : 6 }, + () => { + let release = () => {}; + const gate = new Promise((resolve) => { + release = resolve; + }); + return { gate, release }; + }, + ); + const provider = await startFakeProvider(async function* (_body, index) { + const name = index === 0 ? "ask_user" : "plan_ready"; + const args = + index === 0 + ? { + questions: [ + { + id: "format", + header: "导出格式", + question: "首版希望导出哪种格式?", + options: [ + { label: "Markdown", description: "方便阅读和分享。" }, + { label: "JSON", description: "方便程序处理。" }, + ], + }, + ], + } + : { + plan: + theme === "light" + ? `${plan}\n\n${"验证取消、恢复和消息顺序。\n\n".repeat(160)}` + : `${plan}\n\n${"验证消息顺序与取消。\n\n".repeat(100)}`, + }; + const chunk = (delta: unknown, finish_reason: string | null) => ({ + id: "plan-test", + object: "chat.completion.chunk", + created: 1700000000, + model: MODEL_ID, + choices: [{ index: 0, delta, finish_reason }], + }); + if (index > 0) { + const event = (delta: unknown, finish: string | null = null) => + `data: ${JSON.stringify(chunk(delta, finish))}\n\n`; + yield event({ + role: "assistant", + reasoning_content: "The user selected Markdown. Preparing the plan.", + }); + yield event({ + role: "assistant", + content: "已收到选择,正在整理计划。", + }); + await argumentsGate; + const encoded = JSON.stringify(args); + yield event({ + tool_calls: [ + { + index: 0, + id: `call-${index}`, + type: "function", + function: { name, arguments: encoded.slice(0, 80) }, + }, + ], + }); + let offset = 80; + for (const step of streamSteps) { + await step.gate; + // Model tokens arrive over time, crossing paint frames and timers. + if (theme === "light") + await new Promise((resolve) => setTimeout(resolve, 120)); + const next = Math.min(encoded.length, offset + 35); + yield event({ + tool_calls: [ + { + index: 0, + function: { arguments: encoded.slice(offset, next) }, + }, + ], + }); + offset = next; + } + if (theme === "dark") { + await burstGate; + // A provider may deliver many token deltas in one network read. + // Keep the turn unfinished so snapshot recovery cannot hide lost UI. + let burst = ""; + for (let index = 0; index < 90; index++) { + const next = Math.min(encoded.length, offset + 10); + burst += event({ + tool_calls: [ + { + index: 0, + function: { arguments: encoded.slice(offset, next) }, + }, + ], + }); + offset = next; + } + yield burst; + } + await finishGate; + yield event({ + tool_calls: [ + { index: 0, function: { arguments: encoded.slice(offset) } }, + ], + }); + yield event({}, "tool_calls") + "data: [DONE]\n\n"; + return; + } + yield [ + chunk( + { + role: "assistant", + tool_calls: [ + { + index: 0, + id: `call-${index}`, + type: "function", + function: { name, arguments: JSON.stringify(args) }, + }, + ], + }, + null, + ), + chunk({}, "tool_calls"), + ] + .map((c) => `data: ${JSON.stringify(c)}\n\n`) + .join("") + "data: [DONE]\n\n"; + }); + const workspace = await mkdtemp(join(tmpdir(), "openpi-plan-card-")); + try { + await page.emulateMedia({ colorScheme: theme }); + if (theme === "dark") + await page.setViewportSize({ width: 390, height: 844 }); + else await page.setViewportSize({ width: 1280, height: 960 }); + const imported = await page.request.post("/api/workspaces", { + headers, + data: { path: workspace }, + }); + expect(imported.status()).toBe(201); + const { path } = await imported.json(); + const created = await page.request.post("/api/sessions", { + headers, + data: { workspacePath: path, commandId: `plan-${theme}` }, + }); + expect(created.status()).toBe(201); + const session = await created.json(); + const model = await page.request.post("/api/model", { + headers, + data: { + sessionId: session.sessionId, + provider: PROVIDER_ID, + modelId: MODEL_ID, + }, + }); + expect(model.status()).toBe(200); + await page.goto("/"); + const input = page.getByRole("textbox", { name: "描述任务" }); + if (theme === "light") + await page + .getByRole("button", { name: "进入规划", exact: true }) + .click(); + const prompt = `${theme === "dark" ? "/plan " : ""}规划会话导出,先询问 Markdown 或 JSON,不修改代码。`; + await input.fill(prompt); + await input.press("Enter"); + await expect(page.locator(".question-card")).toBeVisible(); + await expect( + page.getByRole("button", { name: "停止当前轮次" }), + ).toBeVisible(); + await page.getByRole("radio", { name: /Markdown/ }).check(); + await page.getByRole("button", { name: "复核答案" }).click(); + await page.getByRole("button", { name: "提交答案", exact: true }).click(); + const answer = page + .locator("article") + .filter({ hasText: "已收到选择,正在整理计划。" }); + await expect(answer).toHaveCount(1); + await answer.evaluate((element) => { + element.setAttribute("data-stream-check", "stable"); + }); + releaseArguments(); + await expect( + page.locator(".tool-name").filter({ hasText: "plan_ready" }), + ).toBeVisible(); + await expect(answer).toHaveAttribute("data-stream-check", "stable"); + const evidence = page.locator(".message-details").filter({ + has: page.locator(".tool-summary", { hasText: "User answered:" }), + }); + await expect(evidence).toHaveCount(1); + await evidence.evaluate((element) => { + element.setAttribute("data-stream-check", "answer-evidence"); + }); + const beforeStream = await evidence.boundingBox(); + const frames = await evidence.evaluateHandle((element) => { + const samples: number[] = []; + let frame = 0; + const sample = () => { + samples.push(element.getBoundingClientRect().y); + frame = requestAnimationFrame(sample); + }; + frame = requestAnimationFrame(sample); + return { samples, stop: () => cancelAnimationFrame(frame) }; + }); + const planEvidence = page.locator(".message-details").filter({ + has: page.locator(".tool-name", { hasText: "plan_ready" }), + }); + for (const step of streamSteps) { + const previous = await planEvidence.locator("pre").textContent(); + step.release(); + await expect(planEvidence.locator("pre")).not.toHaveText(previous!); + await expect(answer).toHaveAttribute("data-stream-check", "stable"); + await expect(evidence).toHaveAttribute( + "data-stream-check", + "answer-evidence", + ); + expect((await evidence.boundingBox())?.y).toBeCloseTo( + beforeStream!.y, + 0, + ); + } + const positions = await frames.evaluate((monitor) => { + monitor.stop(); + return monitor.samples; + }); + await frames.dispose(); + expect(positions.length).toBeGreaterThan(0); + expect(Math.max(...positions) - Math.min(...positions)).toBeLessThan(1); + if (theme === "dark") { + const previous = await planEvidence.locator("pre").textContent(); + releaseBurst(); + await expect(planEvidence.locator("pre")).not.toHaveText(previous!); + // Observe the stalled remainder, including any reconnect/snapshot cycle. + await page.waitForTimeout(1_000); + await expect(answer).toHaveAttribute("data-stream-check", "stable"); + await expect(planEvidence).toBeVisible(); + } + expect( + await answer.evaluate((element) => { + const tool = [...document.querySelectorAll(".tool-name")].find( + (node) => node.textContent === "plan_ready", + ); + return Boolean( + tool && + element.compareDocumentPosition(tool) & + Node.DOCUMENT_POSITION_FOLLOWING, + ); + }), + ).toBe(true); + releaseFinish(); + const card = page.getByRole("region", { name: "开发计划" }); + await expect(card).toHaveCount(1); + await expect(page.locator(".question-panel")).toHaveCount(0); + await expect(card.locator("ol")).toHaveCSS("list-style-type", "decimal"); + await expect( + card.getByRole("heading", { name: "导出会话记录" }), + ).toBeVisible(); + await expect + .poll( + async () => + ( + await ( + await page.request.get("/api/snapshot", { headers }) + ).json() + ).runtime.status, + ) + .toBe("idle"); + expect(provider.requests).toHaveLength(2); + expect(JSON.stringify(provider.requests[1]?.body)).toContain( + "User answered:", + ); + await page.reload(); + await expect(page.locator(".message-row.user").first()).toContainText( + prompt, + ); + await expect( + page.getByText("计划就绪 · 等待审阅", { exact: true }), + ).toBeVisible(); + await expect(card).toHaveCount(1); + await expect( + card.getByRole("heading", { name: "导出会话记录" }), + ).toBeVisible(); + await expect( + card.getByText("此步骤仅生成计划,不代表已批准或开始实施。"), + ).toBeVisible(); + expect( + (await new AxeBuilder({ page }).include(".plan-card").analyze()) + .violations, + ).toEqual([]); + expect( + await page.evaluate( + () => document.body.scrollWidth <= document.body.clientWidth, + ), + ).toBe(true); + await card.scrollIntoViewIfNeeded(); + await card.screenshot({ path: info.outputPath(`plan-${theme}.png`) }); + await card.getByRole("button", { name: /计划已就绪/ }).click(); + await expect( + card.getByRole("heading", { name: "导出会话记录" }), + ).not.toBeVisible(); + await card.getByRole("button", { name: /计划已就绪/ }).click(); + await expect( + card.getByRole("heading", { name: "导出会话记录" }), + ).toBeVisible(); + expect(provider.requests).toHaveLength(2); + } finally { + releaseArguments(); + releaseBurst(); + for (const step of streamSteps) step.release(); + releaseFinish(); + await provider.close(); + await rm(workspace, { recursive: true, force: true }); + } + }); +} diff --git a/tests/web/playwright.provider.config.ts b/tests/web/playwright.provider.config.ts index 53b0b67c..0770ca74 100644 --- a/tests/web/playwright.provider.config.ts +++ b/tests/web/playwright.provider.config.ts @@ -22,13 +22,18 @@ const agentDirectory = resolve(outputDirectory, "agent"); // The seeded agent dir is isolated from the default suite. It must exist before // the backend starts because ModelConfig reads it during runtime creation. -seedAgentDirectory(agentDirectory); +seedAgentDirectory(agentDirectory, repositoryRoot); process.env.OPENPI_WEB_E2E_TOKEN = WEB_TOKEN; export default defineConfig({ testDir: repositoryRoot, - testMatch: "tests/web/openpi-web-provider.e2e.ts", + testMatch: [ + "tests/web/openpi-web-provider.e2e.ts", + "tests/web/questions-provider.e2e.ts", + "tests/web/plan-provider.e2e.ts", + "tests/web/commands-provider.e2e.ts", + ], outputDir: outputDirectory, fullyParallel: false, workers: 1, diff --git a/tests/web/provider-e2e-support.ts b/tests/web/provider-e2e-support.ts index 998b1c97..2b1db31a 100644 --- a/tests/web/provider-e2e-support.ts +++ b/tests/web/provider-e2e-support.ts @@ -26,7 +26,10 @@ export type RecordedProviderRequest = { }; /** Write the deterministic agent-dir configuration for the fake provider. */ -export function seedAgentDirectory(agentDirectory: string) { +export function seedAgentDirectory( + agentDirectory: string, + packageSource?: string, +) { mkdirSync(agentDirectory, { recursive: true }); writeFileSync( join(agentDirectory, "models.json"), @@ -61,7 +64,7 @@ export function seedAgentDirectory(agentDirectory: string) { // reach the provider, rather than a no-op against the initial clamped level. writeFileSync( join(agentDirectory, "settings.json"), - `${JSON.stringify({ defaultThinkingLevel: "off" }, null, 2)}\n`, + `${JSON.stringify({ defaultThinkingLevel: "off", ...(packageSource ? { packages: [packageSource] } : {}) }, null, 2)}\n`, ); } @@ -110,7 +113,12 @@ function chatCompletionStreamResponse(modelId: string) { * Start a loopback OpenAI-compatible chat-completions server that records every * request and answers with a minimal valid streamed completion. */ -export async function startFakeProvider(): Promise { +export async function startFakeProvider( + streamResponse?: ( + body: unknown, + requestIndex: number, + ) => string | AsyncIterable, +): Promise { const requests: RecordedProviderRequest[] = []; let pendingRelease: (() => void) | undefined; let holdRequested = false; @@ -150,7 +158,17 @@ export async function startFakeProvider(): Promise { "Cache-Control": "no-cache", Connection: "keep-alive", }); - response.end(chatCompletionStreamResponse(modelId)); + const stream = streamResponse + ? streamResponse(body, requests.length - 1) + : chatCompletionStreamResponse(modelId); + if (typeof stream === "string") response.end(stream); + else { + for await (const chunk of stream) { + if (response.destroyed) break; + response.write(chunk); + } + response.end(); + } }); await new Promise((resolve, reject) => { diff --git a/tests/web/question-fixtures.ts b/tests/web/question-fixtures.ts new file mode 100644 index 00000000..1e64f0ea --- /dev/null +++ b/tests/web/question-fixtures.ts @@ -0,0 +1,32 @@ +import type { WebQuestions } from "../../web/protocol/questions.ts"; + +export const questionFixture: WebQuestions = [ + { + id: "scope", + header: "实现范围", + question: "你希望这次实现覆盖到什么范围?", + options: [ + { + label: "完整交互(推荐)", + description: "提供选项、自定义回答和提交前复核,保持当前会话。", + preview: "提问 → 选择 → 复核 → 继续", + }, + { + label: "先完成基础选择", + description: "先验证选项回传,稍后再完善交互。", + }, + ], + }, + { + id: "validation", + header: "验收方式", + question: "你希望怎样验证结果?", + options: [ + { + label: "自动测试与浏览器验收", + description: "覆盖运行状态,并检查实际界面。", + }, + { label: "先看界面", description: "先检查样式和操作流程。" }, + ], + }, +]; diff --git a/tests/web/questions-host.test.ts b/tests/web/questions-host.test.ts new file mode 100644 index 00000000..442c06d1 --- /dev/null +++ b/tests/web/questions-host.test.ts @@ -0,0 +1,159 @@ +import assert from "node:assert/strict"; +import { mkdtemp, rm } from "node:fs/promises"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; +import test from "node:test"; +import { SessionManager } from "@earendil-works/pi-coding-agent"; +import { askWebQuestions } from "../../extensions/ask-user/web-bridge.ts"; +import { WebHost } from "../../web/host/web-host.ts"; +import { projectWebModelSearch } from "../../web/runtime/model-discovery.ts"; +import type { + WebActiveTurn, + WebRuntimeController, + WebRuntimeEvent, +} from "../../web/runtime/types.ts"; +import { questionFixture } from "./question-fixtures.ts"; + +test("authenticated Host binds questions to prompt controller, rejects replay theft and cleans up on Session switch", async () => { + const cwd = await mkdtemp(join(tmpdir(), "openpi-web-questions-")); + let manager = SessionManager.inMemory(cwd); + let active: WebActiveTurn | undefined; + const listeners = new Set<(event: WebRuntimeEvent) => void>(); + const events: Array<{ type: string; detail?: Record }> = []; + const runtime: WebRuntimeController = { + workspaceSelected: true, + cwd, + sessionDirectory: cwd, + get sessionManager() { + return manager; + }, + isIdle: () => !active, + getActiveTurn: () => active, + sendPrompt: async (_content, options) => { + active = { + sessionId: manager.getSessionId(), + commandId: options!.commandId!, + epoch: 1, + }; + for (const listener of listeners) listener({ type: "agent_start" }); + return { pendingFollowUps: 0 }; + }, + cancelTurn: async (options) => ({ ...options, state: "stale-turn" }), + newSession: async () => ({ + cancelled: false, + sessionId: manager.getSessionId(), + }), + switchSession: async () => ({ cancelled: false }), + listModels: () => [], + searchModels: (query, limit) => projectWebModelSearch([], query, limit), + setModel: async () => { + throw new Error("unused"); + }, + subscribe: (listener) => { + listeners.add(listener); + return () => { + listeners.delete(listener); + }; + }, + dispose: async () => {}, + }; + const token = "a".repeat(64); + const controller = "ea1e029c-363a-47cf-a917-889e5d0ab477"; + const other = "aa1e029c-363a-47cf-a917-889e5d0ab477"; + const host = new WebHost({ + runtime, + token, + onEvent: (type, detail) => events.push({ type, detail }), + }); + await host.start(); + const headers = { + Authorization: `Bearer ${token}`, + "Content-Type": "application/json", + "X-OpenPI-Web-Controller": controller, + }; + const post = (path: string, body: unknown, controllerId = controller) => + fetch(`${host.origin}${path}`, { + method: "POST", + headers: { ...headers, "X-OpenPI-Web-Controller": controllerId }, + body: JSON.stringify(body), + }); + const sessionId = manager.getSessionId(); + try { + const prompt = { + sessionId, + content: "ask", + commandId: "prompt", + controllerId: controller, + }; + assert.equal((await post("/api/prompt", prompt)).status, 202); + assert.equal( + (await post("/api/prompt", { ...prompt, controllerId: other }, other)) + .status, + 409, + ); + const pending = askWebQuestions(manager, "ask-1", questionFixture); + assert.ok(pending); + const read = await fetch( + `${host.origin}/api/questions/pending?sessionId=${sessionId}`, + { headers }, + ); + const request = (await read.json()).pending; + assert.ok(request.requestId); + assert.equal( + ( + await fetch( + `${host.origin}/api/questions/pending?sessionId=${sessionId}`, + ) + ).status, + 401, + ); + const foreign = await fetch( + `${host.origin}/api/questions/pending?sessionId=${sessionId}`, + { headers: { ...headers, "X-OpenPI-Web-Controller": other } }, + ); + assert.deepEqual(await foreign.json(), { pending: null }); + const answer = { + sessionId, + requestId: request.requestId, + action: "answer", + answers: questionFixture.map((q) => ({ + id: q.id, + selected: q.options[0]!.label, + })), + }; + assert.equal( + (await post("/api/questions/answer", answer, other)).status, + 403, + ); + assert.equal( + (await post("/api/questions/answer", { ...answer, answers: [] })).status, + 400, + ); + assert.equal((await post("/api/questions/answer", answer)).status, 200); + assert.deepEqual(await pending, { + kind: "answered", + answers: answer.answers, + }); + assert.deepEqual( + await (await post("/api/questions/answer", answer)).json(), + { state: "answered", replayed: true }, + ); + const pendingAgain = askWebQuestions(manager, "ask-2", questionFixture); + const old = manager; + manager = SessionManager.inMemory(cwd); + active = undefined; + for (const listener of listeners) listener({ type: "session_switched" }); + assert.deepEqual(await pendingAgain, { kind: "cancelled" }); + assert.equal(askWebQuestions(old, "stale", questionFixture), undefined); + const invalidations = events.filter((e) => e.type === "questions_changed"); + assert.ok(invalidations.length >= 4); + assert.ok(invalidations.every((event) => event.detail === undefined)); + } finally { + await host.stop(); + assert.equal( + askWebQuestions(manager, "closed", questionFixture), + undefined, + ); + await rm(cwd, { recursive: true, force: true }); + } +}); diff --git a/tests/web/questions-provider.e2e.ts b/tests/web/questions-provider.e2e.ts new file mode 100644 index 00000000..f9e41757 --- /dev/null +++ b/tests/web/questions-provider.e2e.ts @@ -0,0 +1,276 @@ +import { AxeBuilder } from "@axe-core/playwright"; +import { expect, test, type Page } from "@playwright/test"; +import { mkdtemp, readFile, rm } from "node:fs/promises"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; +import { + MODEL_ID, + PROVIDER_ID, + startFakeProvider, +} from "./provider-e2e-support.ts"; +import { questionFixture } from "./question-fixtures.ts"; + +const headers = { Authorization: `Bearer ${process.env.OPENPI_WEB_E2E_TOKEN}` }; +function stream(_body: unknown, index: number, handoff = false) { + const delta = + index === 0 + ? { + role: "assistant", + tool_calls: [ + { + index: 0, + id: "ask-browser", + type: "function", + function: { + name: handoff ? "human_handoff" : "ask_user", + arguments: JSON.stringify( + handoff + ? { + title: "登录测试账户", + instructions: "请在测试页面完成登录。", + completionSignal: "页面出现账户名称", + } + : { questions: questionFixture }, + ), + }, + }, + ], + } + : { + role: "assistant", + content: "Answers received. No settings were changed.", + }; + const envelope = (choices: unknown[]) => ({ + id: "chatcmpl-questions", + object: "chat.completion.chunk", + created: 1700000000, + model: MODEL_ID, + choices, + }); + return ( + [ + envelope([{ index: 0, delta, finish_reason: null }]), + envelope([ + { + index: 0, + delta: {}, + finish_reason: index === 0 ? "tool_calls" : "stop", + }, + ]), + ] + .map((value) => `data: ${JSON.stringify(value)}\n\n`) + .join("") + "data: [DONE]\n\n" + ); +} + +async function startQuestions( + page: Page, + workspace: string, + prompt = "/openpi-setup 请先询问我的偏好,不要修改配置。", +) { + const imported = await page.request.post("/api/workspaces", { + headers, + data: { path: workspace }, + }); + expect(imported.status()).toBe(201); + const { path } = await imported.json(); + const created = await page.request.post("/api/sessions", { + headers, + data: { workspacePath: path, commandId: `questions-${Date.now()}` }, + }); + expect(created.status()).toBe(201); + const { sessionId } = await created.json(); + expect( + ( + await page.request.post("/api/model", { + headers, + data: { sessionId, provider: PROVIDER_ID, modelId: MODEL_ID }, + }) + ).status(), + ).toBe(200); + await page.goto("/"); + const input = page.getByRole("textbox", { name: "描述任务" }); + await input.fill(prompt); + await input.press("Enter"); + await expect(page.locator(".question-card")).toBeVisible(); + return sessionId as string; +} + +for (const theme of ["light", "dark"] as const) { + test(`native ask_user waits for reviewed Web answers in ${theme}, with refresh and controller isolation`, async ({ + page, + context, + }, testInfo) => { + const provider = await startFakeProvider(stream); + const workspace = await mkdtemp(join(tmpdir(), "openpi-questions-e2e-")); + try { + await page.emulateMedia({ colorScheme: theme }); + if (theme === "dark") + await page.setViewportSize({ width: 390, height: 844 }); + await startQuestions(page, workspace); + await expect(page.locator("html")).toHaveAttribute("data-theme", theme); + expect(provider.requests.length).toBe(1); + expect(JSON.stringify(provider.requests[0]!.body)).toContain( + '"ask_user"', + ); + const other = await context.newPage(); + await other.goto("/"); + await expect( + other.getByRole("textbox", { name: "描述任务" }), + ).toBeVisible(); + await expect(other.locator(".question-card")).toHaveCount(0); + await other.close(); + await page.reload(); + await expect(page.locator(".question-card")).toBeVisible(); + expect(provider.requests.length).toBe(1); + const card = page.locator(".question-card"); + await page.screenshot({ + path: testInfo.outputPath(`questions-initial-${theme}.png`), + fullPage: true, + animations: "disabled", + }); + await card.getByRole("radio", { name: /完整交互/ }).check(); + await expect(card.getByRole("textbox")).toHaveCount(0); + await card.getByRole("button", { name: "补充说明(选填)" }).click(); + await card + .getByRole("textbox", { name: "补充说明(选填)" }) + .fill("沿用当前主题"); + await page.screenshot({ + path: testInfo.outputPath(`questions-${theme}.png`), + fullPage: true, + animations: "disabled", + }); + expect( + (await new AxeBuilder({ page }).include(".question-panel").analyze()) + .violations, + ).toEqual([]); + expect( + await page.evaluate( + () => document.body.scrollWidth <= document.body.clientWidth, + ), + ).toBe(true); + await card.getByRole("button", { name: "下一题" }).click(); + await card.getByRole("radio", { name: /或自行撰写回复/ }).check(); + await card + .getByRole("textbox", { name: "你的答案" }) + .fill("桌面和手机都要验证"); + await card.getByRole("button", { name: "复核答案" }).click(); + expect(provider.requests.length).toBe(1); + await page.screenshot({ + path: testInfo.outputPath(`review-${theme}.png`), + animations: "disabled", + }); + await card.getByRole("button", { name: "提交答案", exact: true }).click(); + await expect.poll(() => provider.requests.length).toBe(2); + const next = JSON.stringify(provider.requests[1]!.body); + expect(next).toContain("沿用当前主题"); + expect(next).toContain("桌面和手机都要验证"); + await expect( + page.getByText("Answers received. No settings were changed.", { + exact: true, + }), + ).toBeVisible(); + await expect(card).toHaveCount(0); + } finally { + await provider.close(); + await rm(workspace, { recursive: true, force: true }); + } + }); +} + +for (const command of ["/openpi-setup", "/plan"]) { + test(`Stop cancels the actual pending ask_user in ${command} without manufacturing answers`, async ({ + page, + }) => { + const provider = await startFakeProvider(stream); + const workspace = await mkdtemp(join(tmpdir(), "openpi-questions-stop-")); + try { + await startQuestions( + page, + workspace, + `${command} 请先询问我的偏好,不要修改代码或配置。`, + ); + const cancellation = page.waitForResponse( + (response) => + response.url().endsWith("/api/turns/cancel") && + response.request().method() === "POST", + ); + await page.getByRole("button", { name: "停止当前轮次" }).click(); + expect((await (await cancellation).json()).state).toBe("accepted"); + await expect(page.locator(".question-card")).toHaveCount(0); + expect(provider.requests.length).toBe(1); + const snapshot = await ( + await page.request.get("/api/snapshot", { headers }) + ).json(); + expect(snapshot.runtime.status).toBe("idle"); + // stopReason belongs to native evidence, not the bounded UI projection. + const entries = (await readFile(snapshot.selectedSession.path, "utf8")) + .trim() + .split("\n") + .map((line) => JSON.parse(line)); + const assistants = entries.filter( + (entry) => entry.message?.role === "assistant", + ); + expect(assistants.at(-1).message.stopReason).toBe("aborted"); + const result = entries.find( + (entry) => entry.message?.toolName === "ask_user", + ); + expect(result.message.content).toEqual([ + { type: "text", text: "Cancelled" }, + ]); + await expect( + page.getByText( + "The active turn failed while cancellation was requested", + { exact: true }, + ), + ).toHaveCount(0); + const input = page.getByRole("textbox", { name: "描述任务" }); + await input.fill("你好"); + await input.press("Enter"); + await expect( + page.getByText("Answers received. No settings were changed.", { + exact: true, + }), + ).toBeVisible(); + expect(provider.requests.length).toBe(2); + } finally { + await provider.close(); + await rm(workspace, { recursive: true, force: true }); + } + }); +} + +test("human_handoff reviews a status, restores its pending card and returns verification guidance", async ({ + page, +}, info) => { + const provider = await startFakeProvider((body, index) => + stream(body, index, true), + ); + const workspace = await mkdtemp(join(tmpdir(), "openpi-handoff-e2e-")); + try { + await startQuestions(page, workspace); + await page.reload(); + const card = page.locator(".question-card"); + await expect( + card.getByText("页面出现账户名称", { exact: false }), + ).toBeVisible(); + await expect(card.getByRole("radio")).toHaveCount(2); + await card.getByRole("radio", { name: /已完成/ }).check(); + await card.getByRole("button", { name: "复核状态" }).click(); + expect(provider.requests).toHaveLength(1); + expect( + (await new AxeBuilder({ page }).include(".question-card").analyze()) + .violations, + ).toEqual([]); + await card.screenshot({ path: info.outputPath("handoff-review.png") }); + await card.getByRole("button", { name: "提交状态", exact: true }).click(); + await expect.poll(() => provider.requests.length).toBe(2); + expect(JSON.stringify(provider.requests[1]?.body)).toContain( + "This is not proof of completion", + ); + await expect(card).toHaveCount(0); + } finally { + await provider.close(); + await rm(workspace, { recursive: true, force: true }); + } +}); diff --git a/tests/web/questions.spec.ts b/tests/web/questions.spec.ts new file mode 100644 index 00000000..319ecbc0 --- /dev/null +++ b/tests/web/questions.spec.ts @@ -0,0 +1,207 @@ +// @vitest-environment jsdom +import { + act, + cleanup, + fireEvent, + render, + screen, +} from "@testing-library/react"; +import { createElement } from "react"; +import { I18nextProvider } from "react-i18next"; +import { afterEach, beforeEach, expect, it, vi } from "vitest"; +import { + QuestionCard, + QuestionPanel, +} from "../../web/ui/src/features/questions/QuestionPanel.tsx"; +import { WebClient } from "../../web/ui/src/protocol/client.ts"; +import { i18n } from "../../web/ui/src/i18n.ts"; +import type { + WebQuestionRequest, + WebQuestionReceipt, + WebQuestionAnswers, +} from "../../web/protocol/questions.ts"; +import { questionFixture } from "./question-fixtures.ts"; + +beforeEach(async () => { + await i18n.changeLanguage("zh"); +}); +afterEach(() => { + cleanup(); + vi.restoreAllMocks(); +}); +const request: WebQuestionRequest = { + requestId: "request", + sessionId: "session", + toolCallId: "tool", + expiresAt: Date.now() + 900000, + questions: questionFixture, +}; +function setup( + answer = vi.fn( + async ( + _request: WebQuestionRequest, + _answers: WebQuestionAnswers | null, + _signal: AbortSignal, + ): Promise => ({ state: "answered" }), + ), +) { + const settled = vi.fn(); + const view = render( + createElement( + I18nextProvider, + { i18n }, + createElement(QuestionCard, { request, answer, onSettled: settled }), + ), + ); + return { answer, settled, view }; +} +function chooseFirst() { + fireEvent.click(screen.getByRole("radio", { name: /完整交互/ })); + expect(screen.queryByRole("textbox")).toBeNull(); + fireEvent.click(screen.getByRole("button", { name: "补充说明(选填)" })); + fireEvent.change(screen.getByRole("textbox", { name: "补充说明(选填)" }), { + target: { value: "保持现有主题" }, + }); + fireEvent.click(screen.getByRole("button", { name: "下一题" })); + fireEvent.click(screen.getByRole("radio", { name: /或自行撰写回复/ })); + fireEvent.change(screen.getByRole("textbox", { name: "你的答案" }), { + target: { value: "桌面与手机" }, + }); + fireEvent.click(screen.getByRole("button", { name: "复核答案" })); +} + +it.each(["answered", "dismissed"] as const)( + "settles the panel without a success banner, retaining non-success feedback (%s)", + async (state) => { + vi.spyOn(WebClient.prototype, "pendingQuestions") + .mockResolvedValueOnce({ pending: request }) + .mockResolvedValue({ pending: null }); + vi.spyOn(WebClient.prototype, "answerQuestions").mockResolvedValue({ + state, + }); + const view = render( + createElement( + I18nextProvider, + { i18n }, + createElement(QuestionPanel, { + sessionId: "session", + revision: 1, + connected: true, + }), + ), + ); + await screen.findByRole("radio", { name: /完整交互/ }); + chooseFirst(); + await act(async () => + fireEvent.click(screen.getByRole("button", { name: "提交答案" })), + ); + expect(screen.queryByText("答案已提交,助手可以继续了。")).toBeNull(); + expect(view.container.querySelector(".question-card")).toBeNull(); + expect(Boolean(view.container.querySelector(".question-receipt"))).toBe( + state !== "answered", + ); + }, +); + +it("keeps choices as drafts, permits revision and submits only from explicit review", async () => { + const { answer, settled } = setup(); + expect( + screen.getByRole("button", { name: "下一题" }).disabled, + ).toBe(true); + chooseFirst(); + expect(answer).not.toHaveBeenCalled(); + fireEvent.click(screen.getByRole("button", { name: "修改答案:实现范围" })); + expect( + screen.getByRole("textbox", { + name: "补充说明(选填)", + }).value, + ).toBe("保持现有主题"); + fireEvent.click(screen.getByRole("button", { name: "下一题" })); + expect( + screen.getByRole("textbox", { name: "你的答案" }) + .value, + ).toBe("桌面与手机"); + fireEvent.click(screen.getByRole("button", { name: "复核答案" })); + await act(async () => + fireEvent.click(screen.getByRole("button", { name: "提交答案" })), + ); + expect(answer).toHaveBeenCalledOnce(); + expect(answer.mock.calls[0]![1]).toEqual([ + { + id: "scope", + selected: questionFixture[0]!.options[0]!.label, + note: "保持现有主题", + }, + { id: "validation", custom: "桌面与手机" }, + ]); + expect(settled).toHaveBeenCalledWith({ state: "answered" }); +}); + +it("dismisses without leaking draft answers", async () => { + const { answer } = setup(); + fireEvent.click(screen.getByRole("radio", { name: /完整交互/ })); + await act(async () => + fireEvent.click( + screen.getByRole("button", { name: "关闭提问,不提交答案" }), + ), + ); + expect(answer.mock.calls[0]![1]).toBeNull(); +}); + +it("locks uncertain submissions and retries the original payload", async () => { + const answer = vi.fn( + async ( + _request: WebQuestionRequest, + _answers: WebQuestionAnswers | null, + _signal: AbortSignal, + ): Promise => ({ state: "answered", replayed: true }), + ); + answer.mockRejectedValueOnce(new Error("response lost")); + const { settled } = setup(answer); + chooseFirst(); + await act(async () => + fireEvent.click(screen.getByRole("button", { name: "提交答案" })), + ); + expect(screen.getByRole("alert").textContent).toContain("暂时无法确认"); + expect( + screen.getByRole("button", { + name: "修改答案:实现范围", + }).disabled, + ).toBe(true); + expect(settled).not.toHaveBeenCalled(); + await act(async () => + fireEvent.click(screen.getByRole("button", { name: "核对提交结果" })), + ); + expect(answer.mock.calls[1]![1]).toEqual(answer.mock.calls[0]![1]); + expect(settled).toHaveBeenCalledWith({ state: "answered", replayed: true }); +}); + +it("rejects oversized UTF-8 drafts without discarding text", () => { + setup(); + fireEvent.click(screen.getByRole("radio", { name: /或自行撰写回复/ })); + const input = screen.getByRole("textbox", { + name: "你的答案", + }); + fireEvent.change(input, { target: { value: "中".repeat(2667) } }); + expect(input.value.length).toBe(2667); + expect(screen.getByRole("alert").textContent).toContain("8000"); + expect( + screen.getByRole("button", { name: "下一题" }).disabled, + ).toBe(true); +}); + +it("blank custom answers explicitly request rephrasing", async () => { + const { answer } = setup(); + fireEvent.click(screen.getByRole("radio", { name: /或自行撰写回复/ })); + fireEvent.click(screen.getByRole("button", { name: "下一题" })); + fireEvent.click(screen.getByRole("radio", { name: /自动测试与浏览器验收/ })); + fireEvent.click(screen.getByRole("button", { name: "复核答案" })); + expect(screen.getByText("请助手把问题说清楚或拆小")).toBeTruthy(); + await act(async () => + fireEvent.click(screen.getByRole("button", { name: "提交答案" })), + ); + expect(answer.mock.calls[0]![1]?.[0]).toEqual({ + id: "scope", + rephrase: true, + }); +}); diff --git a/tests/web/questions.test.ts b/tests/web/questions.test.ts new file mode 100644 index 00000000..af49c003 --- /dev/null +++ b/tests/web/questions.test.ts @@ -0,0 +1,203 @@ +import assert from "node:assert/strict"; +import test from "node:test"; +import { + WebQuestionBroker, + type QuestionOwner, +} from "../../web/host/questions.ts"; +import { + parseWebQuestionAnswers, + validateWebQuestions, +} from "../../web/protocol/questions.ts"; +import { questionFixture } from "./question-fixtures.ts"; + +const owner: QuestionOwner = { + workspace: "/workspace", + sessionId: "session", + commandId: "prompt", + epoch: 1, + controllerId: "ea1e029c-363a-47cf-a917-889e5d0ab477", +}; +const answers = [ + { + id: "scope", + selected: questionFixture[0]!.options[0]!.label, + note: "Keep tests", + }, + { id: "validation", custom: "桌面和手机" }, +]; + +test("handoff requires selected status; free-form and rephrase do not resolve it", async () => { + const broker = new WebQuestionBroker( + () => owner, + () => {}, + ); + const outcome = broker.request("handoff", [questionFixture[0]!], undefined, { + title: "Sign in", + instructions: "Sign in in your browser", + completionSignal: "Account visible", + }); + const pending = broker.read(owner.sessionId, owner.controllerId)!; + assert.equal(pending.handoff?.title, "Sign in"); + for (const invalid of [ + { id: "scope", custom: "done" }, + { id: "scope", rephrase: true }, + ]) { + assert.equal( + broker.answer( + owner.sessionId, + pending.requestId, + owner.controllerId, + "answer", + [invalid], + ).status, + 400, + ); + assert.ok(broker.read(owner.sessionId, owner.controllerId)); + } + assert.equal( + broker.answer( + owner.sessionId, + pending.requestId, + owner.controllerId, + "answer", + [answers[0]], + ).status, + 200, + ); + assert.deepEqual(await outcome, { kind: "answered", answers: [answers[0]] }); +}); + +test("answers are exact, bounded, sanitized and complete", () => { + assert.ok(validateWebQuestions(questionFixture)); + assert.deepEqual(parseWebQuestionAnswers(questionFixture, answers), answers); + for (const input of [ + [], + [...answers, answers[0]], + [answers[1], answers[0]], + [{ ...answers[0], selected: "invented" }, answers[1]], + [{ ...answers[0], custom: "ambiguous" }, answers[1]], + [{ ...answers[0], note: "中".repeat(2667) }, answers[1]], + [{ ...answers[0], extra: true }, answers[1]], + ]) { + assert.equal(parseWebQuestionAnswers(questionFixture, input), undefined); + } + assert.deepEqual( + parseWebQuestionAnswers( + [questionFixture[0]!], + [{ id: "scope", custom: " \u001b[31m " }], + ), + [{ id: "scope", rephrase: true }], + ); + assert.equal( + validateWebQuestions([questionFixture[0]!, questionFixture[0]!]), + false, + ); +}); + +test("only the initiating controller answers once; reads are copies and invalid answers keep the wait open", async () => { + let changes = 0; + const broker = new WebQuestionBroker( + () => owner, + () => changes++, + ); + const outcome = broker.request("tool-1", questionFixture); + const request = broker.read(owner.sessionId, owner.controllerId)!; + assert.ok(request); + request.questions[0]!.question = "mutated client"; + assert.equal( + broker.read(owner.sessionId, owner.controllerId)!.questions[0]!.question, + questionFixture[0]!.question, + ); + assert.equal(broker.read(owner.sessionId, "another-controller"), null); + assert.equal( + broker.answer( + owner.sessionId, + request.requestId, + "another-controller", + "answer", + answers, + ).status, + 403, + ); + assert.equal( + broker.answer( + owner.sessionId, + request.requestId, + owner.controllerId, + "answer", + [], + ).status, + 400, + ); + assert.equal( + broker.answer( + owner.sessionId, + request.requestId, + owner.controllerId, + "answer", + answers, + ).status, + 200, + ); + assert.deepEqual(await outcome, { kind: "answered", answers }); + assert.deepEqual( + broker.answer( + owner.sessionId, + request.requestId, + owner.controllerId, + "dismiss", + undefined, + ).body, + { state: "answered", replayed: true }, + ); + assert.equal(changes, 2); + assert.equal(broker.read(owner.sessionId, owner.controllerId), null); +}); + +test("abort, timeout, replacement and shutdown do not invent answers", async (t) => { + t.mock.timers.enable({ apis: ["setTimeout"] }); + let current: QuestionOwner | undefined = owner; + const broker = new WebQuestionBroker( + () => current, + () => {}, + 100, + ); + const controller = new AbortController(); + const aborted = broker.request("abort", questionFixture, controller.signal); + controller.abort(); + assert.deepEqual(await aborted, { kind: "cancelled" }); + const timeout = broker.request("timeout", questionFixture); + t.mock.timers.tick(101); + assert.deepEqual(await timeout, { kind: "expired" }); + const replaced = broker.request("switch", questionFixture); + current = { ...owner, epoch: 2 }; + broker.reconcile(); + assert.deepEqual(await replaced, { kind: "cancelled" }); + const stopped = broker.request("stop", questionFixture); + broker.cancel(); + assert.deepEqual(await stopped, { kind: "cancelled" }); + current = undefined; + assert.deepEqual(await broker.request("none", questionFixture), { + kind: "unavailable", + }); +}); + +test("parallel questions fail closed and dismissal is distinct from cancellation", async () => { + const broker = new WebQuestionBroker( + () => owner, + () => {}, + ); + const first = broker.request("first", questionFixture); + assert.deepEqual(await broker.request("second", questionFixture), { + kind: "unavailable", + }); + const request = broker.read(owner.sessionId, owner.controllerId)!; + broker.answer( + owner.sessionId, + request.requestId, + owner.controllerId, + "dismiss", + undefined, + ); + assert.deepEqual(await first, { kind: "dismissed" }); +}); diff --git a/tests/web/web-host.test.ts b/tests/web/web-host.test.ts index ae8c1417..ec995a47 100644 --- a/tests/web/web-host.test.ts +++ b/tests/web/web-host.test.ts @@ -5,9 +5,8 @@ import { request as httpRequest } from "node:http"; import { createConnection } from "node:net"; import { tmpdir } from "node:os"; import { join } from "node:path"; -import test from "node:test"; +import test, { after } from "node:test"; import { SessionManager } from "@earendil-works/pi-coding-agent"; -import { loadSetupConfig } from "../../extensions/shared/setup-config.ts"; import { registerWebCapability, registerWebCapabilityActions, @@ -15,7 +14,7 @@ import { import type { EmbeddedBrowserService } from "../../web/host/embedded-browser.ts"; import type { GitReviewService } from "../../web/host/git-review.ts"; import type { InteractiveTerminalService } from "../../web/host/interactive-terminal.ts"; -import { WebHost, type WebHostOptions } from "../../web/host/web-host.ts"; +import type { WebHostOptions } from "../../web/host/web-host.ts"; import type { WebInteractiveTerminalEvent } from "../../web/protocol/types.ts"; import { projectWebModelSearch } from "../../web/runtime/model-discovery.ts"; import { @@ -24,6 +23,22 @@ import { WebRuntimeRequestError, } from "../../web/runtime/types.ts"; +// Setup paths are resolved when the Host imports the shared config module. +// Never make snapshot/theme assertions depend on the developer's preferences. +const hostAgentDirectory = await mkdtemp(join(tmpdir(), "openpi-host-agent-")); +const previousHostAgentDirectory = process.env.PI_CODING_AGENT_DIR; +process.env.PI_CODING_AGENT_DIR = hostAgentDirectory; +const { WebHost } = await import("../../web/host/web-host.ts"); +const { loadSetupConfig } = await import( + "../../extensions/shared/setup-config.ts" +); +after(async () => { + if (previousHostAgentDirectory === undefined) + delete process.env.PI_CODING_AGENT_DIR; + else process.env.PI_CODING_AGENT_DIR = previousHostAgentDirectory; + await rm(hostAgentDirectory, { recursive: true, force: true }); +}); + // Use a raw document request: fetch always sets Sec-Fetch-Mode to cors. function documentRequest(url: string, headers: Record = {}) { return new Promise((resolve, reject) => { @@ -243,6 +258,53 @@ test("serves workspaces through a runtime isolated from terminal sessions", asyn "Content-Type": "application/json", }; + const planRequest = { + sessionId: sessionManager.getSessionId(), + enabled: true, + expectedRevision: null, + }; + const postPlan = (data: unknown, auth = authorized) => + fetch(`${launched.origin}/api/plan`, { + method: "POST", + headers: auth, + body: JSON.stringify(data), + }); + assert.equal( + ( + await fetch(`${launched.origin}/api/plan`, { + method: "POST", + body: JSON.stringify(planRequest), + }) + ).status, + 401, + ); + assert.equal( + (await postPlan({ ...planRequest, enabled: "yes" })).status, + 400, + ); + assert.equal((await postPlan({ ...planRequest, extra: true })).status, 400); + assert.equal((await postPlan(planRequest)).status, 501); + let planCalls = 0; + runtime.setPlanMode = async (request) => { + assert.deepEqual(request, planRequest); + planCalls++; + return { status: "planning", revision: "plan-1", hasPrompt: false }; + }; + const switchedPlan = await postPlan(planRequest); + assert.equal(switchedPlan.status, 200); + assert.deepEqual(await switchedPlan.json(), { + sessionId: planRequest.sessionId, + status: "planning", + revision: "plan-1", + hasPrompt: false, + }); + runtime.setPlanMode = async () => { + throw new WebRuntimeRequestError("Plan changed", "PLAN_CONFLICT", 409); + }; + assert.equal((await postPlan(planRequest)).status, 409); + assert.equal(planCalls, 1); + delete runtime.setPlanMode; + const page = await documentRequest(`${launched.origin}/`); assert.equal(page.status, 200); assert.match( @@ -2953,6 +3015,57 @@ test("replays a bounded burst larger than Node's write high-water mark", async ( } }); +test("delivers a live burst above Node's high-water mark without disconnecting", async () => { + const cwd = await mkdtemp(join(tmpdir(), "openpi-web-sse-live-burst-")); + const { host, launched, headers } = await startTestHost(testRuntime(cwd)); + try { + const snapshot = (await ( + await fetch(`${launched.origin}/api/snapshot`, { headers }) + ).json()) as { cursor: number }; + const response = await fetch( + `${launched.origin}/events?cursor=${snapshot.cursor}`, + { headers, signal: AbortSignal.timeout(5_000) }, + ); + const received = readEventRecords(response, 8); + for (let index = 0; index < 8; index++) { + host.publish("burst", { index, value: "x".repeat(20 * 1024) }); + } + const records = await received; + assert.deepEqual( + records.map(({ event }) => event.detail?.index), + Array.from({ length: 8 }, (_, index) => index), + ); + } finally { + await host.stop(); + await rm(cwd, { recursive: true, force: true }); + } +}); + +test("disconnects a live SSE client when its buffered burst exceeds the budget", async () => { + const cwd = await mkdtemp(join(tmpdir(), "openpi-web-sse-live-budget-")); + const { host, launched, headers } = await startTestHost(testRuntime(cwd)); + try { + const snapshot = (await ( + await fetch(`${launched.origin}/api/snapshot`, { headers }) + ).json()) as { cursor: number }; + const response = await fetch( + `${launched.origin}/events?cursor=${snapshot.cursor}`, + { headers, signal: AbortSignal.timeout(5_000) }, + ); + const disconnected = assert.rejects( + readEventRecords(response, 20), + /terminated/, + ); + for (let index = 0; index < 20; index++) { + host.publish("burst", { index, value: "x".repeat(20 * 1024) }); + } + await disconnected; + } finally { + await host.stop(); + await rm(cwd, { recursive: true, force: true }); + } +}); + test("requires resync before SSE headers when replay exceeds its byte budget", async () => { const cwd = await mkdtemp(join(tmpdir(), "openpi-web-sse-budget-")); const { host, launched, headers } = await startTestHost(testRuntime(cwd)); diff --git a/tests/web/web-protocol.spec.ts b/tests/web/web-protocol.spec.ts index 7cca0633..a218cb0d 100644 --- a/tests/web/web-protocol.spec.ts +++ b/tests/web/web-protocol.spec.ts @@ -2,12 +2,50 @@ import { afterEach, expect, it, vi } from "vitest"; import { WebApiError, WebClient } from "../../web/ui/src/protocol/client.ts"; import { consumeEventStream } from "../../web/ui/src/protocol/event-stream.ts"; +import { questionFixture } from "./question-fixtures.ts"; afterEach(() => { vi.useRealTimers(); vi.unstubAllGlobals(); }); +it("settles an evicted question receipt as unknown while retaining controller rejections", async () => { + const fetcher = vi + .fn() + .mockResolvedValueOnce( + new Response(JSON.stringify({ state: "stale", code: "STALE_QUESTION" }), { + status: 409, + }), + ) + .mockResolvedValueOnce( + new Response( + JSON.stringify({ + error: "Only the initiating tab can answer", + code: "NOT_CONTROLLER", + }), + { + status: 403, + }, + ), + ); + vi.stubGlobal("fetch", fetcher); + const client = new WebClient(); + const request = { + sessionId: "session", + requestId: "evicted", + toolCallId: "tool", + expiresAt: Date.now(), + questions: questionFixture, + }; + await expect(client.answerQuestions(request, null)).resolves.toEqual({ + state: "stale", + }); + await expect(client.answerQuestions(request, null)).rejects.toMatchObject({ + status: 403, + code: "NOT_CONTROLLER", + }); +}); + it("bounds a stalled event read and cancels the stream", async () => { vi.useFakeTimers(); const cancel = vi.fn(); @@ -96,6 +134,7 @@ it("times out HTTP admission at thirty seconds while preserving its request iden sessionId: "session", content: "once", commandId: "stable-command", + controllerId: expect.any(String), retry: true, images: [], }); diff --git a/tests/web/web-store.spec.ts b/tests/web/web-store.spec.ts index e4ee7e3a..aab35caf 100644 --- a/tests/web/web-store.spec.ts +++ b/tests/web/web-store.spec.ts @@ -143,6 +143,38 @@ function deferred() { return { promise, reject, resolve }; } +it("Plan changes wait for canonical confirmation, prevent duplicate clicks and do not submit a prompt", async () => { + const client = new FakeClient(); + const before = snapshot(); + before.runtime.plan = "inactive"; + before.runtime.planRevision = null; + client.snapshots.push(Promise.resolve(before)); + const request = deferred<{ sessionId: string }>(); + const change = vi + .spyOn(client, "setPlanMode") + .mockReturnValue(request.promise); + const prompt = vi.spyOn(client, "prompt"); + const store = createWebStore(client); + await store.getState().actions.refreshSnapshot(); + const pending = store.getState().actions.selectPlanMode(true); + expect(store.getState().snapshot?.runtime.plan).toBe("inactive"); + expect(store.getState().planSelectionPending).toBe(true); + await store.getState().actions.selectPlanMode(true); + expect(await store.getState().actions.sendPrompt("wait")).toBe(false); + expect(change).toHaveBeenCalledExactlyOnceWith("session-1", true, null); + const after = snapshot(); + after.cursor++; + after.runtime.plan = "planning"; + after.runtime.planRevision = "plan-1"; + client.snapshots.push(Promise.resolve(after)); + request.resolve({ sessionId: "session-1" }); + await pending; + expect(store.getState().snapshot?.runtime.plan).toBe("planning"); + expect(store.getState().planSelectionPending).toBe(false); + expect(store.getState().liveMessages).toEqual([]); + expect(prompt).not.toHaveBeenCalled(); +}); + class FakeClient extends WebClient { snapshots: Array> = []; snapshotPaths: Array = []; diff --git a/web/dist/app.js b/web/dist/app.js index 6c6ea4bb..335ae478 100644 --- a/web/dist/app.js +++ b/web/dist/app.js @@ -1,52 +1,52 @@ -var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1B||(e.current=z[B],z[B]=null,B--)}function U(e,t){B++,z[B]=e.current,e.current=t}var ee=V(null),te=V(null),ne=V(null),W=V(null);function re(e,t){switch(U(ne,t),U(te,e),U(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Gd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Gd(t),e=Kd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}H(ee),U(ee,e)}function ie(){H(ee),H(te),H(ne)}function ae(e){e.memoizedState!==null&&U(W,e);var t=ee.current,n=Kd(t,e.type);t!==n&&(U(te,e),U(ee,n))}function oe(e){te.current===e&&(H(ee),H(te)),W.current===e&&(H(W),np._currentValue=R)}var se,ce;function le(e){if(se===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);se=t&&t[1]||``,ce=-1()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1B||(e.current=z[B],z[B]=null,B--)}function U(e,t){B++,z[B]=e.current,e.current=t}var ee=V(null),te=V(null),ne=V(null),W=V(null);function re(e,t){switch(U(ne,t),U(te,e),U(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Kd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Kd(t),e=qd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}H(ee),U(ee,e)}function ie(){H(ee),H(te),H(ne)}function ae(e){e.memoizedState!==null&&U(W,e);var t=ee.current,n=qd(t,e.type);t!==n&&(U(te,e),U(ee,n))}function oe(e){te.current===e&&(H(ee),H(te)),W.current===e&&(H(W),rp._currentValue=R)}var se,ce;function le(e){if(se===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);se=t&&t[1]||``,ce=-1)`:-1i||c[r]!==l[i]){var u=` `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ue=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?le(n):``}function fe(e,t){switch(e.tag){case 26:case 27:case 5:return le(e.type);case 16:return le(`Lazy`);case 13:return e.child!==t&&t!==null?le(`Suspense Fallback`):le(`Suspense`);case 19:return le(`SuspenseList`);case 0:case 15:return de(e.type,!1);case 11:return de(e.type.render,!1);case 1:return de(e.type,!0);case 31:return le(`Activity`);default:return``}}function pe(e){try{var t=``,n=null;do t+=fe(e,n),n=e,e=e.return;while(e);return t}catch(e){return` Error generating stack: `+e.message+` -`+e.stack}}var me=Object.prototype.hasOwnProperty,he=t.unstable_scheduleCallback,ge=t.unstable_cancelCallback,_e=t.unstable_shouldYield,ve=t.unstable_requestPaint,ye=t.unstable_now,be=t.unstable_getCurrentPriorityLevel,xe=t.unstable_ImmediatePriority,Se=t.unstable_UserBlockingPriority,Ce=t.unstable_NormalPriority,we=t.unstable_LowPriority,Te=t.unstable_IdlePriority,Ee=t.log,De=t.unstable_setDisableYieldValue,Oe=null,ke=null;function Ae(e){if(typeof Ee==`function`&&De(e),ke&&typeof ke.setStrictMode==`function`)try{ke.setStrictMode(Oe,e)}catch{}}var je=Math.clz32?Math.clz32:Pe,Me=Math.log,Ne=Math.LN2;function Pe(e){return e>>>=0,e===0?32:31-(Me(e)/Ne|0)|0}var Fe=256,Ie=262144,Le=4194304;function Re(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 ze(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Re(n))):i=Re(o):i=Re(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Re(n))):i=Re(o)):i=Re(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Be(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ve(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 He(){var e=Le;return Le<<=1,!(Le&62914560)&&(Le=4194304),e}function Ue(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function We(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ge(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),nn=!1;if(tn)try{var rn={};Object.defineProperty(rn,"passive",{get:function(){nn=!0}}),window.addEventListener(`test`,rn,rn),window.removeEventListener(`test`,rn,rn)}catch{nn=!1}var an=null,on=null,sn=null;function cn(){if(sn)return sn;var e,t=on,n=t.length,r,i=`value`in an?an.value:an.textContent,a=i.length;for(e=0;e=Bn),K=` `,Un=!1;function Wn(e,t){switch(e){case`keyup`:return Rn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Gn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Kn=!1;function qn(e,t){switch(e){case`compositionend`:return Gn(t);case`keypress`:return t.which===32?(Un=!0,K):null;case`textInput`:return e=t.data,e===K&&Un?null:e;default:return null}}function Jn(e,t){if(Kn)return e===`compositionend`||!zn&&Wn(e,t)?(e=cn(),sn=on=an=null,Kn=!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)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=hr(n)}}function _r(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_r(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=kt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=kt(e.document)}return t}function yr(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 br=tn&&`documentMode`in document&&11>=document.documentMode,xr=null,Sr=null,Cr=null,wr=!1;function Tr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wr||xr==null||xr!==kt(r)||(r=xr,`selectionStart`in r&&yr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Cr&&mr(Cr,r)||(Cr=r,r=kd(Sr,`onSelect`),0>=o,i-=o,_i=1<<32-je(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ei&&yi(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ei&&yi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ei&&yi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ei&&yi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&va(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ta(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===y?(c=ii(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ri(o.type,o.key,o.props,null,e.mode,c),Ta(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}t(e,r),r=r.sibling}c=si(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=va(o),b(e,r,o,c)}if(F(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,wa(o),c);if(o.$$typeof===C)return b(e,r,qi(e,o),c);Ea(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ai(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ca=0;var i=b(e,t,n,r);return Sa=null,i}catch(t){if(t===fa||t===ma)throw t;var a=$r(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Oa=Da(!0),ka=Da(!1),Aa=!1;function ja(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ma(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 Na(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Pa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Fl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Xr(e),Yr(e,null,n),t}return Kr(e,r,t,n),Xr(e)}function Fa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qe(e,n)}}function Ia(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var La=!1;function Ra(){if(La){var e=ra;if(e!==null)throw e}}function za(e,t,n,r){La=!1;var i=e.updateQueue;Aa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Rl&f)===f:(r&f)===f){f!==0&&f===na&&(La=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:Aa=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Kl|=o,e.lanes=o,e.memoizedState=d}}function Ba(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Va(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=I.T,s={};I.T=s,Os(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ds(e,t,oa(c,r),mu(e)):Ds(e,t,r,mu(e))}catch(n){Ds(e,t,{then:function(){},status:`rejected`,reason:n},mu())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function _s(){}function vs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ys(e).queue;gs(e,a,t,R,n===null?_s:function(){return bs(e),n(r)})}function ys(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:R,baseState:R,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:R},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function bs(e){var t=ys(e);t.next===null&&(t=e.alternate.memoizedState),Ds(e,t.next.queue,{},mu())}function xs(){return Ki(np)}function Ss(){return wo().memoizedState}function Cs(){return wo().memoizedState}function ws(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=mu();e=Na(n);var r=Pa(t,e,n);r!==null&&(gu(r,t,n),Fa(r,t,n)),t={cache:Qi()},e.payload=t;return}t=t.return}}function Ts(e,t,n){var r=mu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ks(e)?As(t,n):(n=qr(e,t,n,r),n!==null&&(gu(n,e,r),js(n,t,r)))}function Es(e,t,n){Ds(e,t,n,mu())}function Ds(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ks(e))As(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,pr(s,o))return Kr(e,t,i,0),Il===null&&Gr(),!1}catch{}if(n=qr(e,t,i,r),n!==null)return gu(n,e,r),js(n,t,r),!0}return!1}function Os(e,t,n,r){if(r={lane:2,revertLane:pd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ks(e)){if(t)throw Error(i(479))}else t=qr(e,n,r,2),t!==null&&gu(t,e,2)}function ks(e){var t=e.alternate;return e===ro||t!==null&&t===ro}function As(e,t){so=oo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function js(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qe(e,n)}}var Ms={readContext:Ki,use:Do,useCallback:mo,useContext:mo,useEffect:mo,useImperativeHandle:mo,useLayoutEffect:mo,useInsertionEffect:mo,useMemo:mo,useReducer:mo,useRef:mo,useState:mo,useDebugValue:mo,useDeferredValue:mo,useTransition:mo,useSyncExternalStore:mo,useId:mo,useHostTransitionStatus:mo,useFormState:mo,useActionState:mo,useOptimistic:mo,useMemoCache:mo,useCacheRefresh:mo};Ms.useEffectEvent=mo;var Ns={readContext:Ki,use:Do,useCallback:function(e,t){return Co().memoizedState=[e,t===void 0?null:t],e},useContext:Ki,useEffect:rs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ts(4194308,4,ls.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ts(4194308,4,e,t)},useInsertionEffect:function(e,t){ts(4,2,e,t)},useMemo:function(e,t){var n=Co();t=t===void 0?null:t;var r=e();if(co){Ae(!0);try{e()}finally{Ae(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Co();if(n!==void 0){var i=n(t);if(co){Ae(!0);try{n(t)}finally{Ae(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ts.bind(null,ro,e),[r.memoizedState,e]},useRef:function(e){var t=Co();return e={current:e},t.memoizedState=e},useState:function(e){e=zo(e);var t=e.queue,n=Es.bind(null,ro,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ds,useDeferredValue:function(e,t){return ms(Co(),e,t)},useTransition:function(){var e=zo(!1);return e=gs.bind(null,ro,e.queue,!0,!1),Co().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=ro,a=Co();if(Ei){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Il===null)throw Error(i(349));Rl&127||Po(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,rs(Io.bind(null,r,o,e),[e]),r.flags|=2048,$o(9,{destroy:void 0},Fo.bind(null,r,o,n,t),null),n},useId:function(){var e=Co(),t=Il.identifierPrefix;if(Ei){var n=vi,r=_i;n=(r&~(1<<32-je(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=lo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[et]=t,o[tt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Rd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Dc(t)}}return Mc(t),Oc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Dc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ne.current,Ni(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=wi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[et]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Fd(e.nodeValue,n)),e||Ai(t,!0)}else e=Wd(e).createTextNode(r),e[et]=t,t.stateNode=e}return Mc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ni(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[et]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mc(t),e=!1}else n=Fi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?($a(t),t):($a(t),null);if(t.flags&128)throw Error(i(558))}return Mc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ni(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[et]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mc(t),a=!1}else a=Fi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?($a(t),t):($a(t),null)}return $a(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ac(t,t.updateQueue),Mc(t),null);case 4:return ie(),e===null&&Td(t.stateNode.containerInfo),Mc(t),null;case 10:return Vi(t.type),Mc(t),null;case 19:if(H(eo),r=t.memoizedState,r===null)return Mc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null)if(a)jc(r,!1);else{if(Gl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=to(e),o!==null){for(t.flags|=128,jc(r,!1),e=o.updateQueue,t.updateQueue=e,Ac(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ni(n,e),n=n.sibling;return U(eo,eo.current&1|2),Ei&&yi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ye()>nu&&(t.flags|=128,a=!0,jc(r,!1),t.lanes=4194304)}else{if(!a)if(e=to(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ac(t,e),jc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ei)return Mc(t),null}else 2*ye()-r.renderingStartTime>nu&&n!==536870912&&(t.flags|=128,a=!0,jc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Mc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ye(),e.sibling=null,n=eo.current,U(eo,a?n&1|2:n&1),Ei&&yi(t,r.treeForkCount),e);case 22:case 23:return $a(t),Ka(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Mc(t),t.subtreeFlags&6&&(t.flags|=8192)):Mc(t),n=t.updateQueue,n!==null&&Ac(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&H(ca),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Vi(Y),Mc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Pc(e,t){switch(Si(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vi(Y),ie(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return oe(t),null;case 31:if(t.memoizedState!==null){if($a(t),t.alternate===null)throw Error(i(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if($a(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(eo),null;case 4:return ie(),null;case 10:return Vi(t.type),null;case 22:case 23:return $a(t),Ka(),e!==null&&H(ca),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Vi(Y),null;case 25:return null;default:return null}}function Fc(e,t){switch(Si(t),t.tag){case 3:Vi(Y),ie();break;case 26:case 27:case 5:oe(t);break;case 4:ie();break;case 31:t.memoizedState!==null&&$a(t);break;case 13:$a(t);break;case 19:H(eo);break;case 10:Vi(t.type);break;case 22:case 23:$a(t),Ka(),e!==null&&H(ca);break;case 24:Vi(Y)}}function Ic(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Ku(t,t.return,e)}}function Lc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Ku(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Ku(t,t.return,e)}}function Rc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Va(t,n)}catch(t){Ku(e,e.return,t)}}}function zc(e,t,n){n.props=Bs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Ku(e,t,n)}}function Bc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Ku(e,t,n)}}function Vc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Ku(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Ku(e,t,n)}else n.current=null}function Hc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Ku(e,e.return,t)}}function Uc(e,t,n){try{var r=e.stateNode;zd(r,e.type,n,t),r[tt]=t}catch(t){Ku(e,e.return,t)}}function Wc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&tf(e.type)||e.tag===4}function Gc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Wc(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&&tf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Kc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Kt));else if(r!==4&&(r===27&&tf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Kc(e,t,n),e=e.sibling;e!==null;)Kc(e,t,n),e=e.sibling}function qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&tf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(qc(e,t,n),e=e.sibling;e!==null;)qc(e,t,n),e=e.sibling}function Jc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Rd(t,r,n),t[et]=e,t[tt]=n}catch(t){Ku(e,e.return,t)}}var Yc=!1,Xc=!1,Zc=!1,Qc=typeof WeakSet==`function`?WeakSet:Set,$c=null;function el(e,t){if(e=e.containerInfo,Hd=dp,e=vr(e),yr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Ud={focusedElem:e,selectionRange:n},dp=!1,$c=t;$c!==null;)if(t=$c,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,$c=e;else for(;$c!==null;){switch(t=$c,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Rd(o,r,n),o[et]=e,pt(o),r=o;break a;case`link`:var s=Gf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=gr(s,h),v=gr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,I.T=null,n=uu,uu=null;var o=ou,s=cu;if(au=0,su=ou=null,cu=0,Fl&6)throw Error(i(331));var c=Fl;if(Fl|=4,Al(o.current),Sl(o,o.current,s,n),Fl=c,od(0,!1),ke&&typeof ke.onPostCommitFiberRoot==`function`)try{ke.onPostCommitFiberRoot(Oe,o)}catch{}return!0}finally{L.p=a,I.T=r,Hu(e,t)}}function Gu(e,t,n){t=li(n,t),t=Ks(e.stateNode,t,2),e=Pa(e,t,2),e!==null&&(We(e,2),ad(e))}function Ku(e,t,n){if(e.tag===3)Gu(e,e,n);else for(;t!==null;){if(t.tag===3){Gu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(iu===null||!iu.has(r))){e=li(n,e),n=qs(2),r=Pa(t,n,2),r!==null&&(Js(n,r,t,e),We(r,2),ad(r));break}}t=t.return}}function qu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Pl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=Ju.bind(null,e,t,n),t.then(e,e))}function Ju(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Il===e&&(Rl&n)===n&&(Gl===4||Gl===3&&(Rl&62914560)===Rl&&300>ye()-eu?!(Fl&2)&&Cu(e,0):Jl|=n,Xl===Rl&&(Xl=0)),ad(e)}function Yu(e,t){t===0&&(t=He()),e=Jr(e,t),e!==null&&(We(e,t),ad(e))}function Xu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Yu(e,n)}function Zu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Yu(e,n)}function Qu(e,t){return he(e,t)}var $u=null,ed=null,td=!1,nd=!1,rd=!1,id=0;function ad(e){e!==ed&&e.next===null&&(ed===null?$u=ed=e:ed=ed.next=e),nd=!0,td||(td=!0,fd())}function od(e,t){if(!rd&&nd){rd=!0;do for(var n=!1,r=$u;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-je(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,dd(r,a))}else a=Rl,a=ze(r,r===Il?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Be(r,a)||(n=!0,dd(r,a));r=r.next}while(n);rd=!1}}function sd(){cd()}function cd(){nd=td=!1;var e=0;id!==0&&Yd()&&(e=id);for(var t=ye(),n=null,r=$u;r!==null;){var i=r.next,a=ld(r,t);a===0?(r.next=null,n===null?$u=i:n.next=i,i===null&&(ed=n)):(n=r,(e!==0||a&3)&&(nd=!0)),r=i}au!==0&&au!==5||od(e,!1),id!==0&&(id=0)}function ld(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Bd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Tf(e,t,n){var r=wf;if(r&&typeof t==`string`&&t){var i=jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),yf.has(i)||(yf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Rd(t,`link`,e),pt(t),r.head.appendChild(t)))}}function Ef(e){xf.D(e),Tf(`dns-prefetch`,e,null)}function Df(e,t){xf.C(e,t),Tf(`preconnect`,e,t)}function Of(e,t,n){xf.L(e,t,n);var r=wf;if(r&&e&&t){var i=`link[rel="preload"][as="`+jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+jt(n.imageSizes)+`"]`)):i+=`[href="`+jt(e)+`"]`;var a=i;switch(t){case`style`:a=Pf(e);break;case`script`:a=Rf(e)}vf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Ff(a))||t===`script`&&r.querySelector(zf(a))||(t=r.createElement(`link`),Rd(t,`link`,e),pt(t),r.head.appendChild(t)))}}function kf(e,t){xf.m(e,t);var n=wf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+jt(r)+`"][href="`+jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rf(e)}if(!vf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),vf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zf(a)))return}r=n.createElement(`link`),Rd(r,`link`,e),pt(r),n.head.appendChild(r)}}}function Af(e,t,n){xf.S(e,t,n);var r=wf;if(r&&e){var i=ft(r).hoistableStyles,a=Pf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Ff(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vf.get(a))&&Hf(e,n);var c=o=r.createElement(`link`);pt(c),Rd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jf(e,t){xf.X(e,t);var n=wf;if(n&&e){var r=ft(n).hoistableScripts,i=Rf(e),a=r.get(i);a||(a=n.querySelector(zf(i)),a||(e=m({src:e,async:!0},t),(t=vf.get(i))&&Uf(e,t),a=n.createElement(`script`),pt(a),Rd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t){xf.M(e,t);var n=wf;if(n&&e){var r=ft(n).hoistableScripts,i=Rf(e),a=r.get(i);a||(a=n.querySelector(zf(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=vf.get(i))&&Uf(e,t),a=n.createElement(`script`),pt(a),Rd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nf(e,t,n,r){var a=(a=ne.current)?bf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Pf(n.href),n=ft(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pf(n.href);var o=ft(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Ff(e)))&&!o._p&&(s.instance=o,s.state.loading=5),vf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vf.set(e,n),o||Lf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Rf(n),n=ft(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pf(e){return`href="`+jt(e)+`"`}function Ff(e){return`link[rel="stylesheet"][`+e+`]`}function If(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Lf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Rd(t,`link`,n),pt(t),e.head.appendChild(t))}function Rf(e){return`[src="`+jt(e)+`"]`}function zf(e){return`script[async]`+e}function Bf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+jt(n.href)+`"]`);if(r)return t.instance=r,pt(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),pt(r),Rd(r,`style`,a),Vf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pf(n.href);var o=e.querySelector(Ff(a));if(o)return t.state.loading|=4,t.instance=o,pt(o),o;r=If(n),(a=vf.get(a))&&Hf(r,a),o=(e.ownerDocument||e).createElement(`link`),pt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Rd(o,`link`,r),t.state.loading|=4,Vf(o,n.precedence,e),t.instance=o;case`script`:return o=Rf(n.src),(a=e.querySelector(zf(o)))?(t.instance=a,pt(a),a):(r=n,(a=vf.get(o))&&(r=m({},n),Uf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),pt(a),Rd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vf(r,n.precedence,e));return t.instance}function Vf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function qf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Yf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pf(r.href),a=t.querySelector(Ff(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Qf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,pt(a);return}a=t.ownerDocument||t,r=If(r),(i=vf.get(i))&&Hf(r,i),a=a.createElement(`link`),pt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Rd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Qf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Xf=0;function Zf(e,t){return e.stylesheets&&e.count===0&&ep(e,e.stylesheets),0Xf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Qf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ep(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var $f=null;function ep(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,$f=new Map,t.forEach(tp,e),$f=null,Qf.call(e))}function tp(e,t){if(!(t.state.loading&4)){var n=$f.get(e);if(n)var r=n.get(null);else{n=new Map,$f.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),y=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),b=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),x=e=>{let t=b(e);return t.charAt(0).toUpperCase()+t.slice(1)},S={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},C=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},w=l(d(),1),T=(0,w.createContext)({}),E=()=>(0,w.useContext)(T),D=(0,w.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=E()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,w.createElement)(`svg`,{ref:c,...S,width:t??l??S.width,height:t??l??S.height,stroke:e??f,strokeWidth:m,className:v(`lucide`,p,i),...!a&&!C(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,w.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),O=(e,t)=>{let n=(0,w.forwardRef)(({className:n,...r},i)=>(0,w.createElement)(D,{ref:i,iconNode:t,className:v(`lucide-${y(x(e))}`,`lucide-${e}`,n),...r}));return n.displayName=x(e),n},k=O(`archive-restore`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h2`,key:`tvwodi`}],[`path`,{d:`M20 8v11a2 2 0 0 1-2 2h-2`,key:`1gkqxj`}],[`path`,{d:`m9 15 3-3 3 3`,key:`1pd0qc`}],[`path`,{d:`M12 12v9`,key:`192myk`}]]),A=O(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),j=O(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),M=O(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),N=O(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),P=O(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),F=O(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),I=O(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),L=O(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),R=O(`calendar`,[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]),z=O(`check-check`,[[`path`,{d:`M18 6 7 17l-5-5`,key:`116fxf`}],[`path`,{d:`m22 10-7.5 7.5L13 16`,key:`ke71qq`}]]),B=O(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),V=O(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),H=O(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),U=O(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ee=O(`chevrons-left`,[[`path`,{d:`m11 17-5-5 5-5`,key:`13zhaf`}],[`path`,{d:`m18 17-5-5 5-5`,key:`h8a8et`}]]),te=O(`chevrons-right`,[[`path`,{d:`m6 17 5-5-5-5`,key:`xnjwq`}],[`path`,{d:`m13 17 5-5-5-5`,key:`17xmmf`}]]),ne=O(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),W=O(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]]),re=O(`circle-dashed`,[[`path`,{d:`M10.1 2.182a10 10 0 0 1 3.8 0`,key:`5ilxe3`}],[`path`,{d:`M13.9 21.818a10 10 0 0 1-3.8 0`,key:`11zvb9`}],[`path`,{d:`M17.609 3.721a10 10 0 0 1 2.69 2.7`,key:`1iw5b2`}],[`path`,{d:`M2.182 13.9a10 10 0 0 1 0-3.8`,key:`c0bmvh`}],[`path`,{d:`M20.279 17.609a10 10 0 0 1-2.7 2.69`,key:`1ruxm7`}],[`path`,{d:`M21.818 10.1a10 10 0 0 1 0 3.8`,key:`qkgqxc`}],[`path`,{d:`M3.721 6.391a10 10 0 0 1 2.7-2.69`,key:`1mcia2`}],[`path`,{d:`M6.391 20.279a10 10 0 0 1-2.69-2.7`,key:`1fvljs`}]]),ie=O(`circle-stop`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]]),ae=O(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),oe=O(`clipboard`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}]]),se=O(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),ce=O(`cloud-fog`,[[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`M16 17H7`,key:`pygtm1`}],[`path`,{d:`M17 21H9`,key:`1u2q02`}]]),le=O(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),ue=O(`columns-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]]),de=O(`command`,[[`path`,{d:`M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3`,key:`11bfej`}]]),fe=O(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),pe=O(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),me=O(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),he=O(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),ge=O(`earth`,[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),_e=O(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),ve=O(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),ye=O(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),be=O(`file-code-corner`,[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]]),xe=O(`file-diff`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M9 10h6`,key:`9gxzsh`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}]]),Se=O(`file-pen-line`,[[`path`,{d:`M14.364 13.634a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506l4.013-4.009a1 1 0 0 0-3.004-3.004z`,key:`ukzhwg`}],[`path`,{d:`M14.487 7.858A1 1 0 0 1 14 7V2`,key:`1klhew`}],[`path`,{d:`M20 19.645V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l2.516 2.516`,key:`rxaxab`}],[`path`,{d:`M8 18h1`,key:`13wk12`}]]),Ce=O(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),we=O(`flower-2`,[[`path`,{d:`M12 5a3 3 0 1 1 3 3m-3-3a3 3 0 1 0-3 3m3-3v1M9 8a3 3 0 1 0 3 3M9 8h1m5 0a3 3 0 1 1-3 3m3-3h-1m-2 3v-1`,key:`3pnvol`}],[`circle`,{cx:`12`,cy:`8`,r:`2`,key:`1822b1`}],[`path`,{d:`M12 10v12`,key:`6ubwww`}],[`path`,{d:`M12 22c4.2 0 7-1.667 7-5-4.2 0-7 1.667-7 5Z`,key:`9hd38g`}],[`path`,{d:`M12 22c-4.2 0-7-1.667-7-5 4.2 0 7 1.667 7 5Z`,key:`ufn41s`}]]),Te=O(`folder-cog`,[[`path`,{d:`M10.3 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.98a2 2 0 0 1 1.69.9l.66 1.2A2 2 0 0 0 12 6h8a2 2 0 0 1 2 2v3.3`,key:`128dxu`}],[`path`,{d:`m14.305 19.53.923-.382`,key:`3m78fa`}],[`path`,{d:`m15.228 16.852-.923-.383`,key:`npixar`}],[`path`,{d:`m16.852 15.228-.383-.923`,key:`5xggr7`}],[`path`,{d:`m16.852 20.772-.383.924`,key:`dpfhf9`}],[`path`,{d:`m19.148 15.228.383-.923`,key:`1reyyz`}],[`path`,{d:`m19.53 21.696-.382-.924`,key:`1goivc`}],[`path`,{d:`m20.772 16.852.924-.383`,key:`htqkph`}],[`path`,{d:`m20.772 19.148.924.383`,key:`9w9pjp`}],[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}]]),Ee=O(`folder-output`,[[`path`,{d:`M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5`,key:`1yk7aj`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m5 10-3 3 3 3`,key:`1r8ie0`}]]),De=O(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Oe=O(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),ke=O(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),Ae=O(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),je=O(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Me=O(`image-plus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),Ne=O(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),Pe=O(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Fe=O(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),Ie=O(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),Le=O(`lightbulb`,[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),Re=O(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),ze=O(`messages-square`,[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]),Be=O(`mic`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]),Ve=O(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),He=O(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Ue=O(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),We=O(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),Ge=O(`panel-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),Ke=O(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),qe=O(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),Je=O(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Ye=O(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),Xe=O(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Ze=O(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),Qe=O(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),$e=O(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),et=O(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),tt=O(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),nt=O(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),rt=O(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),it=O(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),at=O(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),ot=O(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),st=O(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),ct=O(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),lt=O(`tree-pine`,[[`path`,{d:`m17 14 3 3.3a1 1 0 0 1-.7 1.7H4.7a1 1 0 0 1-.7-1.7L7 14h-.3a1 1 0 0 1-.7-1.7L9 9h-.2A1 1 0 0 1 8 7.3L12 3l4 4.3a1 1 0 0 1-.8 1.7H15l3 3.3a1 1 0 0 1-.7 1.7H17Z`,key:`cpyugq`}],[`path`,{d:`M12 22v-3`,key:`kmzjlo`}]]),ut=O(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),dt=O(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),ft=O(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),pt=O(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),mt=_(),G=e=>typeof e==`string`,ht=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},gt=e=>e==null?``:String(e),_t=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},vt=/###/g,yt=e=>e&&e.includes(`###`)?e.replace(vt,`.`):e,bt=e=>!e||G(e),xt=(e,t,n)=>{let r=G(t)?t.split(`.`):t,i=0;for(;i{let{obj:r,k:i}=xt(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=xt(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=xt(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},Ct=(e,t,n,r)=>{let{obj:i,k:a}=xt(e,t,Object);i[a]=i[a]||[],i[a].push(n)},wt=(e,t)=>{let{obj:n,k:r}=xt(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Tt=(e,t,n)=>{let r=wt(e,n);return r===void 0?wt(t,n):r},Et=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,r)?G(e[r])||e[r]instanceof String||G(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Et(e[r],t[r],n):e[r]=t[r]);return e},Dt=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Ot={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},kt=e=>G(e)?e.replace(/[&<>"'\/]/g,e=>Ot[e]):e,At=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},jt=[` `,`,`,`?`,`!`,`;`],Mt=new At(20),Nt=(e,t,n)=>{t||=``,n||=``;let r=jt.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=Mt.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},Pt=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;ee?.replace(/_/g,`-`),It={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},Lt=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||It,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>G(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),G(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},Rt=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r{for(let i=0;i-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):G(n)&&i?o.push(...n.split(i)):o.push(n)));let s=wt(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!G(n)?s:Pt(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),St(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(G(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=wt(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Et(s,n,i):s={...s,...n},St(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},Bt={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},Vt=Symbol(`i18next/PATH_KEY`);function Ht(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Vt?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Ut(e,t){let{[Vt]:n}=e(Ht()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var Wt=e=>!G(e)&&typeof e!=`boolean`&&typeof e!=`number`,Gt=class e extends Rt{constructor(e,t={}){super(),_t([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Lt.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=Wt(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Nt(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:G(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:G(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Ut(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Ut(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!G(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=Wt(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&!_.includes(O)&&!(G(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;t[e]=x&&!m?this.translate(r,{...i,defaultValue:Wt(T)?T[e]:void 0,joinArrays:!1,ns:c}):this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&G(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,b&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=G(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!G(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;oi?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=G(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=Bt.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return G(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Ut(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!G(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(G(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!G(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r={...r,count:e.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},Kt=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Lt.create(`languageUtils`),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=Ft(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=Ft(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(G(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),G(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.options.fallbackLng,r=Array.isArray(n)?n.join(`|`):n;r!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=r);let i=t===void 0||t===!1||G(t),a=t===void 0&&typeof this.options.fallbackLng==`function`,o=G(e)&&i&&!a,s=null;if(o){let n;n=t===void 0?`undefined`:t===!1?`boolean:false`:`string:${t}`,s=`${e.length}:${e}|${n}`}if(s!==null){let e=this.resolveHierarchyCache[s];if(e!==void 0)return e.slice()}let c=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),l=[],u=e=>{e&&(this.isSupportedCode(e)?l.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return G(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&u(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&u(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&u(this.getLanguagePartFromCode(e))):G(e)&&u(this.formatLanguageCode(e)),c.forEach(e=>{l.includes(e)||u(this.formatLanguageCode(e))}),s===null?l:(this.resolveHierarchyCache[s]=l,l.slice())}},qt={zero:0,one:1,two:2,few:3,many:4,other:5},Jt={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},Yt=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Lt.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Ft(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),Jt;if(!e.match(/-|_/))return Jt;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>qt[e]-qt[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},Xt=(e,t,n,r=`.`,i=!0)=>{let a=Tt(e,t,n);return!a&&i&&G(n)&&(a=Pt(e,n,r),a===void 0&&(a=Pt(t,n,r))),a},Zt=e=>e.replace(/\$/g,`$$$$`),Qt=class{constructor(e={}){this.logger=Lt.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?kt:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?Dt(i):a||`{{`,this.suffix=o?Dt(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?Dt(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?Dt(l):``,this.nestingPrefix=d?Dt(d):f||Dt(`$t(`),this.nestingSuffix=p?Dt(p):m||Dt(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=Xt(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(Xt(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=G(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!G(a)&&!this.useRawValueToEscape&&(a=gt(a));let s=t.safeValue(a);if(e=e.replace(i[0],Zt(s)),u?(t.regex.lastIndex+=s.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${Dt(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!G(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/s.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!G(i))return i;G(i)||(i=gt(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},$t=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},en=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(Ft(r),i),t[o]=s),s(n)}},tn=e=>(t,n,r)=>e(Ft(n),r)(t),nn=class{constructor(e={}){this.logger=Lt.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?en:tn;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=en(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e-1&&!t.includes(`)`)&&e+1{let{formatName:i,formatOptions:a}=$t(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}},rn=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},an=class extends Rt{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Lt.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{Ct(n.loaded,[i],a),rn(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();G(e)&&(e=this.languageUtils.toResolveHierarchy(e)),G(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(n!=null&&n!==``){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},on=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),G(e[1])&&(t.defaultValue=e[1]),G(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),sn=e=>(G(e.ns)&&(e.ns=[e.ns]),G(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),G(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),cn=()=>{},ln=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},un=class e extends Rt{constructor(e={},t){if(super(),this.options=sn(e),this.services={},this.logger=Lt,this.modules={external:[]},ln(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(G(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=on();this.options={...n,...this.options,...sn(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Lt.init(r(this.modules.logger),this.options):Lt.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:nn;let t=new Kt(this.options);this.store=new zt(this.options.resources,this.options);let n=this.services;n.logger=Lt,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new Yt(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new Qt(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new an(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new Gt(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=cn,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=ht(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=cn){let n=t,r=G(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=ht();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=cn,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&Bt.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&![`cimode`,`dev`].includes(e)){for(let e=0;e{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=G(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(G(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=Ut(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=Ut(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=Ut(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return G(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=ht();return this.options.ns?(G(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=ht();G(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new Kt(on());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=cn){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new zt(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...on().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new Qt(n)}return a.translator=new Gt(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();un.createInstance,un.dir,un.init,un.loadResources,un.reloadResources,un.use,un.changeLanguage,un.getFixedT,un.t,un.exists,un.setDefaultNamespace,un.hasLoadedNamespace,un.loadNamespaces,un.loadLanguages;var dn=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);vn(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},fn={},pn=(e,t,n,r)=>{vn(n)&&fn[n]||(vn(n)&&(fn[n]=new Date),dn(e,t,n,r))},mn=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},hn=(e,t,n)=>{e.loadNamespaces(t,mn(e,n))},gn=(e,t,n,r)=>{if(vn(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return hn(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,mn(e,r))},_n=(e,t,n={})=>!t.languages||!t.languages.length?(pn(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),vn=e=>typeof e==`string`,yn=e=>typeof e==`object`&&!!e,bn=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,xn={"&":`&`,"&":`&`,"<":`<`,"<":`<`,">":`>`,">":`>`,"'":`'`,"'":`'`,""":`"`,""":`"`," ":` `," ":` `,"©":`©`,"©":`©`,"®":`®`,"®":`®`,"…":`…`,"…":`…`,"/":`/`,"/":`/`},Sn=e=>xn[e],Cn={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:e=>e.replace(bn,Sn),transDefaultProps:void 0},wn=(e={})=>{Cn={...Cn,...e}},Tn=()=>Cn,En,Dn=e=>{En=e},On=()=>En,kn={type:`3rdParty`,init(e){wn(e.options.react),Dn(e)}},An=(0,w.createContext)(),jn=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},Mn=o((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Nn=o(((e,t)=>{t.exports=Mn()}))(),Pn={t:(e,t)=>{if(vn(t))return t;if(yn(t)&&vn(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},Fn=()=>()=>{},In=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,w.useContext)(An)||{},a=n||r||On();a&&!a.reportNamespaces&&(a.reportNamespaces=new jn),a||pn(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`);let o=(0,w.useMemo)(()=>({...Tn(),...a?.options?.react,...t}),[a,t]),{useSuspense:s,keyPrefix:c}=o,l=e||i||a?.options?.defaultNS,u=vn(l)?[l]:l||[`translation`],d=(0,w.useMemo)(()=>u,u);a?.reportNamespaces?.addUsedNamespaces?.(d);let f=(0,w.useRef)(0),p=(0,w.useCallback)(e=>{if(!a)return Fn;let{bindI18n:t,bindI18nStore:n}=o,r=()=>{f.current+=1,e()};return t&&a.on(t,r),n&&a.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>a.off(e,r)),n&&n.split(` `).forEach(e=>a.store.off(e,r))}},[a,o]),m=(0,w.useRef)(),h=(0,w.useCallback)(()=>{if(!a)return Pn;let e=!!(a.isInitialized||a.initializedStoreOnce)&&d.every(e=>_n(e,a,o)),n=t.lng||a.language,r=f.current,i=m.current;if(i&&i.ready===e&&i.lng===n&&i.keyPrefix===c&&i.revision===r)return i;let s={t:a.getFixedT(n,o.nsMode===`fallback`?d:d[0],c,{scopeNs:d}),ready:e,lng:n,keyPrefix:c,revision:r};return m.current=s,s},[a,d,c,o,t.lng]),[g,_]=(0,w.useState)(0),{t:v,ready:y}=(0,Nn.useSyncExternalStore)(p,h,h);(0,w.useEffect)(()=>{if(a&&!y&&!s){let e=()=>_(e=>e+1);t.lng?gn(a,t.lng,d,e):hn(a,d,e)}},[a,t.lng,d,y,s,g]);let b=a||{},x=(0,w.useRef)(null),S=(0,w.useRef)(),C=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},T=(0,w.useMemo)(()=>{let e=b,t=e?.language,n=e;e&&(x.current&&x.current.__original===e&&S.current===t?n=x.current:(n=C(e),x.current=n,S.current=t));let r=!y&&!s?(...e)=>(pn(a,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),v(...e)):v,i=[r,n,y];return i.t=r,i.i18n=n,i.ready=y,i},[v,b,y,b.resolvedLanguage,b.language,b.languages]);if(a&&s&&!y){let e=!1;try{e=!1}catch{}throw e&&pn(a,`SUSPENDED_WHILE_LOADING`,`useTranslation: suspended while translations are loading (useSuspense is true by default). Add a boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook`),new Promise(e=>{let n=()=>e();t.lng?gn(a,t.lng,d,n):hn(a,d,n)})}return T};function Ln({i18n:e,defaultNS:t,children:n}){let r=(0,w.useMemo)(()=>({i18n:e,defaultNS:t}),[e,t]);return(0,w.createElement)(An.Provider,{value:r},n)}var Rn=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},zn=(e=>e?Rn(e):Rn),Bn=e=>e;function Vn(e,t=Bn){let n=w.useSyncExternalStore(e.subscribe,w.useCallback(()=>t(e.getState()),[e,t]),w.useCallback(()=>t(e.getInitialState()),[e,t]));return w.useDebugValue(n),n}var Hn=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),K=o(((e,t)=>{t.exports=Hn()}))(),Un=Array.from({length:16},(e,t)=>`cell-${t+1}`);function Wn({animated:e=!1,compact:t=!1}){let[n,r]=(0,w.useState)(0),i=t?10:16,a=(0,K.jsxs)(`strong`,{className:t?`brand-lockup compact`:`brand-lockup`,children:[(0,K.jsx)(`span`,{className:`brand-word`,children:`Open`}),(0,K.jsx)(`span`,{className:`pixel-mark`,role:`img`,"aria-label":`OpenPI`,children:Un.slice(0,i).map(e=>(0,K.jsx)(`i`,{},e))})]},n);return e?(0,K.jsx)(`button`,{className:`landing-brand`,type:`button`,"aria-label":`Replay OpenPI logo animation`,onClick:()=>r(e=>e+1),children:a}):a}function Gn(e,t,n){return Math.min(n,Math.max(t,Math.round(e)))}function Kn({side:e,value:t,min:n,max:r,defaultValue:i,collapseThreshold:a,onCollapse:o,onExpandPastMax:s,onChange:c,onDraggingChange:l}){let u=(0,w.useRef)(null),d=(e,t)=>{u.current?.pointerId===t&&(u.current=null,e.hasPointerCapture(t)&&e.releasePointerCapture(t),l(!1))},f=e=>c(Gn(e,n,r));return(0,K.jsx)(`div`,{className:`pane-resizer ${e}`,"aria-hidden":`true`,"data-pane-resizer":e,onDoubleClick:()=>f(i),onPointerDown:e=>{e.button===0&&(e.preventDefault(),u.current={pointerId:e.pointerId,startX:e.clientX,startValue:t},e.currentTarget.setPointerCapture(e.pointerId),l(!0))},onPointerMove:t=>{let n=u.current;if(!n||n.pointerId!==t.pointerId)return;let i=t.clientX-n.startX,c=n.startValue+(e===`left`?i:-i);if(s&&c>=r+48){d(t.currentTarget,t.pointerId),s();return}if(o&&a!==void 0&&c<=a){d(t.currentTarget,t.pointerId),o();return}f(c)},onPointerUp:e=>d(e.currentTarget,e.pointerId),onPointerCancel:e=>d(e.currentTarget,e.pointerId),onLostPointerCapture:()=>{u.current&&(u.current=null,l(!1))}})}function qn(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Jn=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Yn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Xn={};function Zn(e,t){return((t||Xn).jsx?Yn:Jn).test(e)}var Qn=/[ \t\n\f\r]/g;function $n(e){return typeof e==`object`?e.type===`text`&&er(e.value):er(e)}function er(e){return e.replace(Qn,``)===``}var tr=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};tr.prototype.normal={},tr.prototype.property={},tr.prototype.space=void 0;function nr(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new tr(n,r,t)}function rr(e){return e.toLowerCase()}var ir=class{constructor(e,t){this.attribute=t,this.property=e}};ir.prototype.attribute=``,ir.prototype.booleanish=!1,ir.prototype.boolean=!1,ir.prototype.commaOrSpaceSeparated=!1,ir.prototype.commaSeparated=!1,ir.prototype.defined=!1,ir.prototype.mustUseProperty=!1,ir.prototype.number=!1,ir.prototype.overloadedBoolean=!1,ir.prototype.property=``,ir.prototype.spaceSeparated=!1,ir.prototype.space=void 0;var ar=s({boolean:()=>sr,booleanish:()=>cr,commaOrSpaceSeparated:()=>fr,commaSeparated:()=>dr,number:()=>q,overloadedBoolean:()=>lr,spaceSeparated:()=>ur}),or=0,sr=pr(),cr=pr(),lr=pr(),q=pr(),ur=pr(),dr=pr(),fr=pr();function pr(){return 2**++or}var mr=Object.keys(ar),hr=class extends ir{constructor(e,t,n,r){let i=-1;if(super(e,t),gr(this,`space`,r),typeof n==`number`)for(;++i4&&n.slice(0,4)===`data`&&kr.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Or,Mr);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Or.test(e)){let n=e.replace(Dr,jr);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=hr}return new i(r,t)}function jr(e){return`-`+e.toLowerCase()}function Mr(e){return e.charAt(1).toUpperCase()}var Nr=nr([vr,xr,Cr,wr,Tr],`html`),Pr=nr([vr,Sr,Cr,wr,Tr],`svg`);function Fr(e){return e.join(` `).trim()}var Ir=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(` -`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),Lr=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(Ir());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),Rr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),zr=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Lr()),r=Rr();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Br=Hr(`end`),Vr=Hr(`start`);function Hr(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Ur(e){let t=Vr(e),n=Br(e);if(t&&n)return{start:t,end:n}}function Wr(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Kr(e.position):`start`in e||`end`in e?Kr(e):`line`in e||`column`in e?Gr(e):``}function Gr(e){return qr(e&&e.line)+`:`+qr(e&&e.column)}function Kr(e){return Gr(e&&e.start)+`-`+Gr(e&&e.end)}function qr(e){return e&&typeof e==`number`?e:1}var Jr=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Wr(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Jr.prototype.file=``,Jr.prototype.name=``,Jr.prototype.reason=``,Jr.prototype.message=``,Jr.prototype.stack=``,Jr.prototype.column=void 0,Jr.prototype.line=void 0,Jr.prototype.ancestors=void 0,Jr.prototype.cause=void 0,Jr.prototype.fatal=void 0,Jr.prototype.place=void 0,Jr.prototype.ruleId=void 0,Jr.prototype.source=void 0;var Yr=l(zr(),1),Xr={}.hasOwnProperty,Zr=new Map,Qr=/[A-Z]/g,$r=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),ei=new Set([`td`,`th`]);function ti(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=fi(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=di(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Pr:Nr,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=ni(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ni(e,t,n){if(t.type===`element`)return ri(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return ii(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return oi(e,t,n);if(t.type===`mdxjsEsm`)return ai(e,t);if(t.type===`root`)return si(e,t,n);if(t.type===`text`)return ci(e,t)}function ri(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Pr,e.schema=i),e.ancestors.push(t);let a=vi(e,t.tagName,!1),o=pi(e,t),s=hi(e,t);return $r.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!$n(e)})),li(e,o,a,t),ui(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function ii(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}yi(e,t.position)}function ai(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);yi(e,t.position)}function oi(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Pr,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:vi(e,t.name,!0),o=mi(e,t),s=hi(e,t);return li(e,o,a,t),ui(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function si(e,t,n){let r={};return ui(r,hi(e,t)),e.create(t,e.Fragment,r,n)}function ci(e,t){return t.value}function li(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ui(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function di(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function fi(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Vr(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function pi(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Xr.call(t.properties,i)){let a=gi(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&ei.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function mi(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else yi(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else yi(e,t.position);else a=r.value===null||r.value;n[i]=a}return n}function hi(e,t){let n=[],r=-1,i=e.passKeys?new Map:Zr;for(;++ri?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a0?(ji(e,e.length,0,t),e):t}var Ni={}.hasOwnProperty;function Pi(e){let t={},n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function Ri(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var zi=Xi(/[A-Za-z]/),Bi=Xi(/[\dA-Za-z]/),Vi=Xi(/[#-'*+\--9=?A-Z^-~]/);function Hi(e){return e!==null&&(e<32||e===127)}var Ui=Xi(/\d/),Wi=Xi(/[\dA-Fa-f]/),Gi=Xi(/[!-/:-@[-`{-~]/);function J(e){return e!==null&&e<-2}function Ki(e){return e!==null&&(e<0||e===32)}function qi(e){return e===-2||e===-1||e===32}var Ji=Xi(/\p{P}|\p{S}/u),Yi=Xi(/\s/);function Xi(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Zi(e){let t=[],n=-1,r=0,i=0;for(;++n55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Y(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return qi(r)?(e.enter(n),s(r)):t(r)}function s(r){return qi(r)&&a++o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;er;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ra(e,t,n){return Y(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function ia(e){if(e===null||Ki(e)||Yi(e))return 1;if(Ji(e))return 2}function aa(e,t,n){let r=[],i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};la(d,-c),la(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Mi(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=Mi(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=Mi(l,aa(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Mi(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=Mi(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,ji(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n0&&qi(t)?Y(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||J(t)?e.check(Sa,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||J(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),qi(t)?Y(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),qi(t)?Y(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||J(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Ta(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Ea={name:`codeIndented`,tokenize:Oa},Da={partial:!0,tokenize:ka};function Oa(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),Y(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):J(t)?e.attempt(Da,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||J(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function ka(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):J(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):Y(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):J(e)?i(e):n(e)}}var Aa={name:`codeText`,previous:Ma,resolve:ja,tokenize:Na};function ja(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Fa(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Fa(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Fa(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Ua(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Hi(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||J(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Ki(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):J(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||J(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!qi(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Ga(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):J(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Y(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||J(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Ka(e,t){let n;return r;function r(i){return J(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):qi(i)?Y(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var qa={name:`definition`,tokenize:Ya},Ja={partial:!0,tokenize:Xa};function Ya(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Wa.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Ri(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Ki(t)?Ka(e,l)(t):l(t)}function l(t){return Ua(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Ja,d,d)(t)}function d(t){return qi(t)?Y(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||J(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Xa(e,t,n){return r;function r(t){return Ki(t)?Ka(e,i)(t):n(t)}function i(t){return Ga(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return qi(t)?Y(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||J(e)?t(e):n(e)}}var Za={name:`hardBreakEscape`,tokenize:Qa};function Qa(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return J(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var $a={name:`headingAtx`,resolve:eo,tokenize:to};function eo(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},ji(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function to(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Ki(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||J(n)?(e.exit(`atxHeading`),t(n)):qi(n)?Y(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Ki(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var no=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),ro=[`pre`,`script`,`style`,`textarea`],io={concrete:!0,name:`htmlFlow`,resolveTo:so,tokenize:co},ao={partial:!0,tokenize:uo},oo={partial:!0,tokenize:lo};function so(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function co(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):zi(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):zi(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return zi(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Ki(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&ro.includes(l)?(i=1,r.interrupt?t(s):O(s)):no.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||Bi(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return qi(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||zi(t)?(e.consume(t),b):qi(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||Bi(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):qi(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):qi(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||J(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Ki(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||qi(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||J(t)?O(t):qi(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),L):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):J(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(ao,R,k)(t)):t===null||J(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(oo,A,R)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||J(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return ro.includes(n)?(e.consume(t),L):O(t)}return zi(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),L):t===45&&i===2?(e.consume(t),I):O(t)}function L(t){return t===null||J(t)?(e.exit(`htmlFlowData`),R(t)):(e.consume(t),L)}function R(n){return e.exit(`htmlFlow`),t(n)}}function lo(e,t,n){let r=this;return i;function i(t){return J(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function uo(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(fa,t,n)}}var fo={name:`htmlText`,tokenize:po};function po(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):zi(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):zi(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):J(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):J(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):J(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):J(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return zi(t)?(e.consume(t),S):n(t)}function S(t){return t===45||Bi(t)?(e.consume(t),S):C(t)}function C(t){return J(t)?(o=C,N(t)):qi(t)?(e.consume(t),C):M(t)}function w(t){return t===45||Bi(t)?(e.consume(t),w):t===47||t===62||Ki(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||zi(t)?(e.consume(t),E):J(t)?(o=T,N(t)):qi(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||Bi(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):J(t)?(o=D,N(t)):qi(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):J(t)?(o=O,N(t)):qi(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):J(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Ki(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||Ki(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return qi(t)?Y(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var mo={name:`labelEnd`,resolveAll:vo,resolveTo:yo,tokenize:bo},ho={tokenize:xo},go={tokenize:So},_o={tokenize:Co};function vo(e){let t=-1,n=[];for(;++t=3&&(a===null||J(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),qi(t)?Y(e,s,`whitespace`)(t):s(t))}}var Mo={continuation:{tokenize:Io},exit:Ro,name:`list`,tokenize:Fo},No={partial:!0,tokenize:zo},Po={partial:!0,tokenize:Lo};function Fo(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Ui(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Ao,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Ui(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(fa,r.interrupt?n:u,e.attempt(No,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return qi(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Io(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(fa,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Y(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!qi(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Po,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Y(e,e.attempt(Mo,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Lo(e,t,n){let r=this;return Y(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Ro(e){e.exit(this.containerState.type)}function zo(e,t,n){let r=this;return Y(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!qi(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Bo={name:`setextUnderline`,resolveTo:Vo,tokenize:Ho};function Vo(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Ho(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),qi(t)?Y(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||J(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Uo={tokenize:Wo};function Wo(e){let t=this,n=e.attempt(fa,r,e.attempt(this.parser.constructs.flowInitial,i,Y(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ra,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Go={resolveAll:Yo()},Ko=Jo(`string`),qo=Jo(`text`);function Jo(e){return{resolveAll:Yo(e===`text`?Xo:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++ias,contentInitial:()=>$o,disable:()=>os,document:()=>Qo,flow:()=>ts,flowInitial:()=>es,insideSpan:()=>is,string:()=>ns,text:()=>rs}),Qo={42:Mo,43:Mo,45:Mo,48:Mo,49:Mo,50:Mo,51:Mo,52:Mo,53:Mo,54:Mo,55:Mo,56:Mo,57:Mo,62:ma},$o={91:qa},es={[-2]:Ea,[-1]:Ea,32:Ea},ts={35:$a,42:Ao,45:[Bo,Ao],60:io,61:Bo,95:Ao,96:Ca,126:Ca},ns={38:ba,92:va},rs={[-5]:Oo,[-4]:Oo,[-3]:Oo,33:wo,38:ba,42:oa,60:[ua,fo],91:Eo,92:[Za,va],93:mo,95:oa,96:Aa},is={null:[oa,Go]},as={null:[42,95]},os={null:[]};function ss(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=Mi(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=aa(a,l.events,l),l.events):[]}function f(e,t){return ls(p(e),t)}function p(e){return cs(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function ls(e,t){let n=-1,r=[],i;for(;++n>>=0,e===0?32:31-(Me(e)/Ne|0)|0}var Fe=256,Ie=262144,Le=4194304;function Re(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 ze(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Re(n))):i=Re(o):i=Re(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Re(n))):i=Re(o)):i=Re(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Be(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ve(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 He(){var e=Le;return Le<<=1,!(Le&62914560)&&(Le=4194304),e}function Ue(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function We(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ge(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),nn=!1;if(tn)try{var rn={};Object.defineProperty(rn,"passive",{get:function(){nn=!0}}),window.addEventListener(`test`,rn,rn),window.removeEventListener(`test`,rn,rn)}catch{nn=!1}var an=null,on=null,sn=null;function cn(){if(sn)return sn;var e,t=on,n=t.length,r,i=`value`in an?an.value:an.textContent,a=i.length;for(e=0;e=Bn),Un=` `,K=!1;function Wn(e,t){switch(e){case`keyup`:return Rn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Gn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Kn=!1;function qn(e,t){switch(e){case`compositionend`:return Gn(t);case`keypress`:return t.which===32?(K=!0,Un):null;case`textInput`:return e=t.data,e===Un&&K?null:e;default:return null}}function Jn(e,t){if(Kn)return e===`compositionend`||!zn&&Wn(e,t)?(e=cn(),sn=on=an=null,Kn=!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)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=hr(n)}}function _r(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_r(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=kt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=kt(e.document)}return t}function yr(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 br=tn&&`documentMode`in document&&11>=document.documentMode,xr=null,Sr=null,Cr=null,wr=!1;function Tr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wr||xr==null||xr!==kt(r)||(r=xr,`selectionStart`in r&&yr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Cr&&mr(Cr,r)||(Cr=r,r=Ad(Sr,`onSelect`),0>=o,i-=o,_i=1<<32-je(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ei&&yi(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ei&&yi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ei&&yi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ei&&yi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&ya(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ea(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===y?(c=ii(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ri(o.type,o.key,o.props,null,e.mode,c),Ea(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}t(e,r),r=r.sibling}c=si(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=ya(o),b(e,r,o,c)}if(F(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ta(o),c);if(o.$$typeof===C)return b(e,r,qi(e,o),c);Da(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ai(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{wa=0;var i=b(e,t,n,r);return Ca=null,i}catch(t){if(t===pa||t===ha)throw t;var a=$r(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var ka=Oa(!0),Aa=Oa(!1),ja=!1;function Ma(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Na(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 Pa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Fa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Il&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Xr(e),Yr(e,null,n),t}return Kr(e,r,t,n),Xr(e)}function Ia(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qe(e,n)}}function La(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ra=!1;function za(){if(Ra){var e=ia;if(e!==null)throw e}}function Ba(e,t,n,r){Ra=!1;var i=e.updateQueue;ja=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(zl&f)===f:(r&f)===f){f!==0&&f===ra&&(Ra=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:ja=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ql|=o,e.lanes=o,e.memoizedState=d}}function Va(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ha(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=I.T,s={};I.T=s,ks(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Os(e,t,sa(c,r),hu(e)):Os(e,t,r,hu(e))}catch(n){Os(e,t,{then:function(){},status:`rejected`,reason:n},hu())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function vs(){}function ys(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=bs(e).queue;_s(e,a,t,R,n===null?vs:function(){return xs(e),n(r)})}function bs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:R,baseState:R,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:R},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function xs(e){var t=bs(e);t.next===null&&(t=e.alternate.memoizedState),Os(e,t.next.queue,{},hu())}function Ss(){return J(rp)}function Cs(){return To().memoizedState}function ws(){return To().memoizedState}function Ts(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=hu();e=Pa(n);var r=Fa(t,e,n);r!==null&&(_u(r,t,n),Ia(r,t,n)),t={cache:$i()},e.payload=t;return}t=t.return}}function Es(e,t,n){var r=hu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},As(e)?js(t,n):(n=qr(e,t,n,r),n!==null&&(_u(n,e,r),Ms(n,t,r)))}function Ds(e,t,n){Os(e,t,n,hu())}function Os(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(As(e))js(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,pr(s,o))return Kr(e,t,i,0),Ll===null&&Gr(),!1}catch{}if(n=qr(e,t,i,r),n!==null)return _u(n,e,r),Ms(n,t,r),!0}return!1}function ks(e,t,n,r){if(r={lane:2,revertLane:md(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},As(e)){if(t)throw Error(i(479))}else t=qr(e,n,r,2),t!==null&&_u(t,e,2)}function As(e){var t=e.alternate;return e===io||t!==null&&t===io}function js(e,t){co=so=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ms(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qe(e,n)}}var Ns={readContext:J,use:Oo,useCallback:ho,useContext:ho,useEffect:ho,useImperativeHandle:ho,useLayoutEffect:ho,useInsertionEffect:ho,useMemo:ho,useReducer:ho,useRef:ho,useState:ho,useDebugValue:ho,useDeferredValue:ho,useTransition:ho,useSyncExternalStore:ho,useId:ho,useHostTransitionStatus:ho,useFormState:ho,useActionState:ho,useOptimistic:ho,useMemoCache:ho,useCacheRefresh:ho};Ns.useEffectEvent=ho;var Ps={readContext:J,use:Oo,useCallback:function(e,t){return wo().memoizedState=[e,t===void 0?null:t],e},useContext:J,useEffect:is,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ns(4194308,4,us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ns(4194308,4,e,t)},useInsertionEffect:function(e,t){ns(4,2,e,t)},useMemo:function(e,t){var n=wo();t=t===void 0?null:t;var r=e();if(lo){Ae(!0);try{e()}finally{Ae(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=wo();if(n!==void 0){var i=n(t);if(lo){Ae(!0);try{n(t)}finally{Ae(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Es.bind(null,io,e),[r.memoizedState,e]},useRef:function(e){var t=wo();return e={current:e},t.memoizedState=e},useState:function(e){e=Bo(e);var t=e.queue,n=Ds.bind(null,io,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:fs,useDeferredValue:function(e,t){return hs(wo(),e,t)},useTransition:function(){var e=Bo(!1);return e=_s.bind(null,io,e.queue,!0,!1),wo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=io,a=wo();if(Ei){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Ll===null)throw Error(i(349));zl&127||Fo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,is(Lo.bind(null,r,o,e),[e]),r.flags|=2048,es(9,{destroy:void 0},Io.bind(null,r,o,n,t),null),n},useId:function(){var e=wo(),t=Ll.identifierPrefix;if(Ei){var n=vi,r=_i;n=(r&~(1<<32-je(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=uo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[et]=t,o[tt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(zd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Oc(t)}}return Nc(t),kc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ne.current,Ni(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=wi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[et]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Id(e.nodeValue,n)),e||Ai(t,!0)}else e=Gd(e).createTextNode(r),e[et]=t,t.stateNode=e}return Nc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ni(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[et]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nc(t),e=!1}else n=Fi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(eo(t),t):(eo(t),null);if(t.flags&128)throw Error(i(558))}return Nc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ni(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[et]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nc(t),a=!1}else a=Fi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(eo(t),t):(eo(t),null)}return eo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),jc(t,t.updateQueue),Nc(t),null);case 4:return ie(),e===null&&Ed(t.stateNode.containerInfo),Nc(t),null;case 10:return Vi(t.type),Nc(t),null;case 19:if(H(to),r=t.memoizedState,r===null)return Nc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null)if(a)Mc(r,!1);else{if(Kl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=no(e),o!==null){for(t.flags|=128,Mc(r,!1),e=o.updateQueue,t.updateQueue=e,jc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ni(n,e),n=n.sibling;return U(to,to.current&1|2),Ei&&yi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ye()>ru&&(t.flags|=128,a=!0,Mc(r,!1),t.lanes=4194304)}else{if(!a)if(e=no(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,jc(t,e),Mc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ei)return Nc(t),null}else 2*ye()-r.renderingStartTime>ru&&n!==536870912&&(t.flags|=128,a=!0,Mc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Nc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ye(),e.sibling=null,n=to.current,U(to,a?n&1|2:n&1),Ei&&yi(t,r.treeForkCount),e);case 22:case 23:return eo(t),qa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Nc(t),t.subtreeFlags&6&&(t.flags|=8192)):Nc(t),n=t.updateQueue,n!==null&&jc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&H(la),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Vi(Qi),Nc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Fc(e,t){switch(Si(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vi(Qi),ie(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return oe(t),null;case 31:if(t.memoizedState!==null){if(eo(t),t.alternate===null)throw Error(i(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(eo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(to),null;case 4:return ie(),null;case 10:return Vi(t.type),null;case 22:case 23:return eo(t),qa(),e!==null&&H(la),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Vi(Qi),null;case 25:return null;default:return null}}function Ic(e,t){switch(Si(t),t.tag){case 3:Vi(Qi),ie();break;case 26:case 27:case 5:oe(t);break;case 4:ie();break;case 31:t.memoizedState!==null&&eo(t);break;case 13:eo(t);break;case 19:H(to);break;case 10:Vi(t.type);break;case 22:case 23:eo(t),qa(),e!==null&&H(la);break;case 24:Vi(Qi)}}function Lc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){qu(t,t.return,e)}}function Rc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){qu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){qu(t,t.return,e)}}function zc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ha(t,n)}catch(t){qu(e,e.return,t)}}}function Bc(e,t,n){n.props=Vs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){qu(e,t,n)}}function Vc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){qu(e,t,n)}}function Hc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){qu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){qu(e,t,n)}else n.current=null}function Uc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){qu(e,e.return,t)}}function Wc(e,t,n){try{var r=e.stateNode;Bd(r,e.type,n,t),r[tt]=t}catch(t){qu(e,e.return,t)}}function Gc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&nf(e.type)||e.tag===4}function Kc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Gc(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&&nf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Kt));else if(r!==4&&(r===27&&nf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(qc(e,t,n),e=e.sibling;e!==null;)qc(e,t,n),e=e.sibling}function Jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&nf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);zd(t,r,n),t[et]=e,t[tt]=n}catch(t){qu(e,e.return,t)}}var Xc=!1,Zc=!1,Qc=!1,$c=typeof WeakSet==`function`?WeakSet:Set,el=null;function tl(e,t){if(e=e.containerInfo,Ud=fp,e=vr(e),yr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Wd={focusedElem:e,selectionRange:n},fp=!1,el=t;el!==null;)if(t=el,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,el=e;else for(;el!==null;){switch(t=el,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),zd(o,r,n),o[et]=e,pt(o),r=o;break a;case`link`:var s=Kf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=gr(s,h),v=gr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,I.T=null,n=du,du=null;var o=su,s=lu;if(ou=0,cu=su=null,lu=0,Il&6)throw Error(i(331));var c=Il;if(Il|=4,jl(o.current),Cl(o,o.current,s,n),Il=c,sd(0,!1),ke&&typeof ke.onPostCommitFiberRoot==`function`)try{ke.onPostCommitFiberRoot(Oe,o)}catch{}return!0}finally{L.p=a,I.T=r,Uu(e,t)}}function Ku(e,t,n){t=li(n,t),t=qs(e.stateNode,t,2),e=Fa(e,t,2),e!==null&&(We(e,2),od(e))}function qu(e,t,n){if(e.tag===3)Ku(e,e,n);else for(;t!==null;){if(t.tag===3){Ku(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(au===null||!au.has(r))){e=li(n,e),n=Js(2),r=Fa(t,n,2),r!==null&&(Ys(n,r,t,e),We(r,2),od(r));break}}t=t.return}}function Ju(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Fl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Wl=!0,i.add(n),e=Yu.bind(null,e,t,n),t.then(e,e))}function Yu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ll===e&&(zl&n)===n&&(Kl===4||Kl===3&&(zl&62914560)===zl&&300>ye()-tu?!(Il&2)&&wu(e,0):Yl|=n,Zl===zl&&(Zl=0)),od(e)}function Xu(e,t){t===0&&(t=He()),e=Jr(e,t),e!==null&&(We(e,t),od(e))}function Zu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Xu(e,n)}function Qu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Xu(e,n)}function $u(e,t){return he(e,t)}var ed=null,td=null,nd=!1,rd=!1,id=!1,ad=0;function od(e){e!==td&&e.next===null&&(td===null?ed=td=e:td=td.next=e),rd=!0,nd||(nd=!0,pd())}function sd(e,t){if(!id&&rd){id=!0;do for(var n=!1,r=ed;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-je(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,fd(r,a))}else a=zl,a=ze(r,r===Ll?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Be(r,a)||(n=!0,fd(r,a));r=r.next}while(n);id=!1}}function cd(){ld()}function ld(){rd=nd=!1;var e=0;ad!==0&&Xd()&&(e=ad);for(var t=ye(),n=null,r=ed;r!==null;){var i=r.next,a=ud(r,t);a===0?(r.next=null,n===null?ed=i:n.next=i,i===null&&(td=n)):(n=r,(e!==0||a&3)&&(rd=!0)),r=i}ou!==0&&ou!==5||sd(e,!1),ad!==0&&(ad=0)}function ud(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Vd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Ef(e,t,n){var r=Tf;if(r&&typeof t==`string`&&t){var i=jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),bf.has(i)||(bf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),zd(t,`link`,e),pt(t),r.head.appendChild(t)))}}function Df(e){Sf.D(e),Ef(`dns-prefetch`,e,null)}function Of(e,t){Sf.C(e,t),Ef(`preconnect`,e,t)}function kf(e,t,n){Sf.L(e,t,n);var r=Tf;if(r&&e&&t){var i=`link[rel="preload"][as="`+jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+jt(n.imageSizes)+`"]`)):i+=`[href="`+jt(e)+`"]`;var a=i;switch(t){case`style`:a=Ff(e);break;case`script`:a=zf(e)}yf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),yf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(If(a))||t===`script`&&r.querySelector(Bf(a))||(t=r.createElement(`link`),zd(t,`link`,e),pt(t),r.head.appendChild(t)))}}function Af(e,t){Sf.m(e,t);var n=Tf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+jt(r)+`"][href="`+jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=zf(e)}if(!yf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),yf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Bf(a)))return}r=n.createElement(`link`),zd(r,`link`,e),pt(r),n.head.appendChild(r)}}}function jf(e,t,n){Sf.S(e,t,n);var r=Tf;if(r&&e){var i=ft(r).hoistableStyles,a=Ff(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(If(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=yf.get(a))&&Uf(e,n);var c=o=r.createElement(`link`);pt(c),zd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Hf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Mf(e,t){Sf.X(e,t);var n=Tf;if(n&&e){var r=ft(n).hoistableScripts,i=zf(e),a=r.get(i);a||(a=n.querySelector(Bf(i)),a||(e=m({src:e,async:!0},t),(t=yf.get(i))&&Wf(e,t),a=n.createElement(`script`),pt(a),zd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nf(e,t){Sf.M(e,t);var n=Tf;if(n&&e){var r=ft(n).hoistableScripts,i=zf(e),a=r.get(i);a||(a=n.querySelector(Bf(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=yf.get(i))&&Wf(e,t),a=n.createElement(`script`),pt(a),zd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pf(e,t,n,r){var a=(a=ne.current)?xf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Ff(n.href),n=ft(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Ff(n.href);var o=ft(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(If(e)))&&!o._p&&(s.instance=o,s.state.loading=5),yf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},yf.set(e,n),o||Rf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=zf(n),n=ft(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Ff(e){return`href="`+jt(e)+`"`}function If(e){return`link[rel="stylesheet"][`+e+`]`}function Lf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Rf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),zd(t,`link`,n),pt(t),e.head.appendChild(t))}function zf(e){return`[src="`+jt(e)+`"]`}function Bf(e){return`script[async]`+e}function Vf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+jt(n.href)+`"]`);if(r)return t.instance=r,pt(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),pt(r),zd(r,`style`,a),Hf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Ff(n.href);var o=e.querySelector(If(a));if(o)return t.state.loading|=4,t.instance=o,pt(o),o;r=Lf(n),(a=yf.get(a))&&Uf(r,a),o=(e.ownerDocument||e).createElement(`link`),pt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),zd(o,`link`,r),t.state.loading|=4,Hf(o,n.precedence,e),t.instance=o;case`script`:return o=zf(n.src),(a=e.querySelector(Bf(o)))?(t.instance=a,pt(a),a):(r=n,(a=yf.get(o))&&(r=m({},n),Wf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),pt(a),zd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Hf(r,n.precedence,e));return t.instance}function Hf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Jf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Yf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Ff(r.href),a=t.querySelector(If(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=$f.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,pt(a);return}a=t.ownerDocument||t,r=Lf(r),(i=yf.get(i))&&Uf(r,i),a=a.createElement(`link`),pt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),zd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=$f.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Zf=0;function Qf(e,t){return e.stylesheets&&e.count===0&&tp(e,e.stylesheets),0Zf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function $f(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)tp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ep=null;function tp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ep=new Map,t.forEach(np,e),ep=null,$f.call(e))}function np(e,t){if(!(t.state.loading&4)){var n=ep.get(e);if(n)var r=n.get(null);else{n=new Map,ep.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),y=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),b=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),x=e=>{let t=b(e);return t.charAt(0).toUpperCase()+t.slice(1)},S={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},C=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},w=l(d(),1),T=(0,w.createContext)({}),E=()=>(0,w.useContext)(T),D=(0,w.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=E()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,w.createElement)(`svg`,{ref:c,...S,width:t??l??S.width,height:t??l??S.height,stroke:e??f,strokeWidth:m,className:v(`lucide`,p,i),...!a&&!C(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,w.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),O=(e,t)=>{let n=(0,w.forwardRef)(({className:n,...r},i)=>(0,w.createElement)(D,{ref:i,iconNode:t,className:v(`lucide-${y(x(e))}`,`lucide-${e}`,n),...r}));return n.displayName=x(e),n},k=O(`archive-restore`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h2`,key:`tvwodi`}],[`path`,{d:`M20 8v11a2 2 0 0 1-2 2h-2`,key:`1gkqxj`}],[`path`,{d:`m9 15 3-3 3 3`,key:`1pd0qc`}],[`path`,{d:`M12 12v9`,key:`192myk`}]]),A=O(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),j=O(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),M=O(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),N=O(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),P=O(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),F=O(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),I=O(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),L=O(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),R=O(`calendar`,[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]),z=O(`check-check`,[[`path`,{d:`M18 6 7 17l-5-5`,key:`116fxf`}],[`path`,{d:`m22 10-7.5 7.5L13 16`,key:`ke71qq`}]]),B=O(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),V=O(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),H=O(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),U=O(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ee=O(`chevrons-left`,[[`path`,{d:`m11 17-5-5 5-5`,key:`13zhaf`}],[`path`,{d:`m18 17-5-5 5-5`,key:`h8a8et`}]]),te=O(`chevrons-right`,[[`path`,{d:`m6 17 5-5-5-5`,key:`xnjwq`}],[`path`,{d:`m13 17 5-5-5-5`,key:`17xmmf`}]]),ne=O(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),W=O(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]]),re=O(`circle-dashed`,[[`path`,{d:`M10.1 2.182a10 10 0 0 1 3.8 0`,key:`5ilxe3`}],[`path`,{d:`M13.9 21.818a10 10 0 0 1-3.8 0`,key:`11zvb9`}],[`path`,{d:`M17.609 3.721a10 10 0 0 1 2.69 2.7`,key:`1iw5b2`}],[`path`,{d:`M2.182 13.9a10 10 0 0 1 0-3.8`,key:`c0bmvh`}],[`path`,{d:`M20.279 17.609a10 10 0 0 1-2.7 2.69`,key:`1ruxm7`}],[`path`,{d:`M21.818 10.1a10 10 0 0 1 0 3.8`,key:`qkgqxc`}],[`path`,{d:`M3.721 6.391a10 10 0 0 1 2.7-2.69`,key:`1mcia2`}],[`path`,{d:`M6.391 20.279a10 10 0 0 1-2.69-2.7`,key:`1fvljs`}]]),ie=O(`circle-stop`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]]),ae=O(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),oe=O(`clipboard`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}]]),se=O(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),ce=O(`cloud-fog`,[[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`M16 17H7`,key:`pygtm1`}],[`path`,{d:`M17 21H9`,key:`1u2q02`}]]),le=O(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),ue=O(`columns-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]]),de=O(`command`,[[`path`,{d:`M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3`,key:`11bfej`}]]),fe=O(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),pe=O(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),me=O(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),he=O(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),ge=O(`earth`,[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),_e=O(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),ve=O(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),ye=O(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),be=O(`file-code-corner`,[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]]),xe=O(`file-diff`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M9 10h6`,key:`9gxzsh`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}]]),Se=O(`file-pen-line`,[[`path`,{d:`M14.364 13.634a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506l4.013-4.009a1 1 0 0 0-3.004-3.004z`,key:`ukzhwg`}],[`path`,{d:`M14.487 7.858A1 1 0 0 1 14 7V2`,key:`1klhew`}],[`path`,{d:`M20 19.645V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l2.516 2.516`,key:`rxaxab`}],[`path`,{d:`M8 18h1`,key:`13wk12`}]]),Ce=O(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),we=O(`flower-2`,[[`path`,{d:`M12 5a3 3 0 1 1 3 3m-3-3a3 3 0 1 0-3 3m3-3v1M9 8a3 3 0 1 0 3 3M9 8h1m5 0a3 3 0 1 1-3 3m3-3h-1m-2 3v-1`,key:`3pnvol`}],[`circle`,{cx:`12`,cy:`8`,r:`2`,key:`1822b1`}],[`path`,{d:`M12 10v12`,key:`6ubwww`}],[`path`,{d:`M12 22c4.2 0 7-1.667 7-5-4.2 0-7 1.667-7 5Z`,key:`9hd38g`}],[`path`,{d:`M12 22c-4.2 0-7-1.667-7-5 4.2 0 7 1.667 7 5Z`,key:`ufn41s`}]]),Te=O(`folder-cog`,[[`path`,{d:`M10.3 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.98a2 2 0 0 1 1.69.9l.66 1.2A2 2 0 0 0 12 6h8a2 2 0 0 1 2 2v3.3`,key:`128dxu`}],[`path`,{d:`m14.305 19.53.923-.382`,key:`3m78fa`}],[`path`,{d:`m15.228 16.852-.923-.383`,key:`npixar`}],[`path`,{d:`m16.852 15.228-.383-.923`,key:`5xggr7`}],[`path`,{d:`m16.852 20.772-.383.924`,key:`dpfhf9`}],[`path`,{d:`m19.148 15.228.383-.923`,key:`1reyyz`}],[`path`,{d:`m19.53 21.696-.382-.924`,key:`1goivc`}],[`path`,{d:`m20.772 16.852.924-.383`,key:`htqkph`}],[`path`,{d:`m20.772 19.148.924.383`,key:`9w9pjp`}],[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}]]),Ee=O(`folder-output`,[[`path`,{d:`M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5`,key:`1yk7aj`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m5 10-3 3 3 3`,key:`1r8ie0`}]]),De=O(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Oe=O(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),ke=O(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),Ae=O(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),je=O(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Me=O(`image-plus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),Ne=O(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),Pe=O(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Fe=O(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),Ie=O(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),Le=O(`lightbulb`,[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),Re=O(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),ze=O(`message-circle-question-mark`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Be=O(`messages-square`,[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]),Ve=O(`mic`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]),He=O(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),Ue=O(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),We=O(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),Ge=O(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),Ke=O(`panel-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),qe=O(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),Je=O(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),Ye=O(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Xe=O(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),Ze=O(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Qe=O(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),$e=O(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),et=O(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),tt=O(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),nt=O(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),rt=O(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),it=O(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),at=O(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),ot=O(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),st=O(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),ct=O(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),lt=O(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),ut=O(`tree-pine`,[[`path`,{d:`m17 14 3 3.3a1 1 0 0 1-.7 1.7H4.7a1 1 0 0 1-.7-1.7L7 14h-.3a1 1 0 0 1-.7-1.7L9 9h-.2A1 1 0 0 1 8 7.3L12 3l4 4.3a1 1 0 0 1-.8 1.7H15l3 3.3a1 1 0 0 1-.7 1.7H17Z`,key:`cpyugq`}],[`path`,{d:`M12 22v-3`,key:`kmzjlo`}]]),dt=O(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),ft=O(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),pt=O(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),mt=O(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),ht=_(),G=e=>typeof e==`string`,gt=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},_t=e=>e==null?``:String(e),vt=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},yt=/###/g,bt=e=>e&&e.includes(`###`)?e.replace(yt,`.`):e,xt=e=>!e||G(e),St=(e,t,n)=>{let r=G(t)?t.split(`.`):t,i=0;for(;i{let{obj:r,k:i}=St(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=St(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=St(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},wt=(e,t,n,r)=>{let{obj:i,k:a}=St(e,t,Object);i[a]=i[a]||[],i[a].push(n)},Tt=(e,t)=>{let{obj:n,k:r}=St(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Et=(e,t,n)=>{let r=Tt(e,n);return r===void 0?Tt(t,n):r},Dt=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,r)?G(e[r])||e[r]instanceof String||G(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Dt(e[r],t[r],n):e[r]=t[r]);return e},Ot=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),kt={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},At=e=>G(e)?e.replace(/[&<>"'\/]/g,e=>kt[e]):e,jt=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},Mt=[` `,`,`,`?`,`!`,`;`],Nt=new jt(20),Pt=(e,t,n)=>{t||=``,n||=``;let r=Mt.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=Nt.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},Ft=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;ee?.replace(/_/g,`-`),Lt={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},Rt=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Lt,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>G(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),G(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},zt=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r{for(let i=0;i-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):G(n)&&i?o.push(...n.split(i)):o.push(n)));let s=Tt(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!G(n)?s:Ft(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),Ct(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(G(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=Tt(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Dt(s,n,i):s={...s,...n},Ct(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},Vt={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},Ht=Symbol(`i18next/PATH_KEY`);function Ut(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Ht?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Wt(e,t){let{[Ht]:n}=e(Ut()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var Gt=e=>!G(e)&&typeof e!=`boolean`&&typeof e!=`number`,Kt=class e extends zt{constructor(e,t={}){super(),vt([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Rt.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=Gt(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Pt(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:G(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:G(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Wt(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Wt(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!G(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=Gt(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&!_.includes(O)&&!(G(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;t[e]=x&&!m?this.translate(r,{...i,defaultValue:Gt(T)?T[e]:void 0,joinArrays:!1,ns:c}):this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&G(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,b&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=G(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!G(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;oi?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=G(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=Vt.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return G(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Wt(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!G(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(G(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!G(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r={...r,count:e.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},qt=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Rt.create(`languageUtils`),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=It(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=It(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(G(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),G(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.options.fallbackLng,r=Array.isArray(n)?n.join(`|`):n;r!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=r);let i=t===void 0||t===!1||G(t),a=t===void 0&&typeof this.options.fallbackLng==`function`,o=G(e)&&i&&!a,s=null;if(o){let n;n=t===void 0?`undefined`:t===!1?`boolean:false`:`string:${t}`,s=`${e.length}:${e}|${n}`}if(s!==null){let e=this.resolveHierarchyCache[s];if(e!==void 0)return e.slice()}let c=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),l=[],u=e=>{e&&(this.isSupportedCode(e)?l.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return G(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&u(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&u(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&u(this.getLanguagePartFromCode(e))):G(e)&&u(this.formatLanguageCode(e)),c.forEach(e=>{l.includes(e)||u(this.formatLanguageCode(e))}),s===null?l:(this.resolveHierarchyCache[s]=l,l.slice())}},Jt={zero:0,one:1,two:2,few:3,many:4,other:5},Yt={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},Xt=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Rt.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=It(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),Yt;if(!e.match(/-|_/))return Yt;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Jt[e]-Jt[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},Zt=(e,t,n,r=`.`,i=!0)=>{let a=Et(e,t,n);return!a&&i&&G(n)&&(a=Ft(e,n,r),a===void 0&&(a=Ft(t,n,r))),a},Qt=e=>e.replace(/\$/g,`$$$$`),$t=class{constructor(e={}){this.logger=Rt.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?At:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?Ot(i):a||`{{`,this.suffix=o?Ot(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?Ot(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?Ot(l):``,this.nestingPrefix=d?Ot(d):f||Ot(`$t(`),this.nestingSuffix=p?Ot(p):m||Ot(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=Zt(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(Zt(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=G(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!G(a)&&!this.useRawValueToEscape&&(a=_t(a));let s=t.safeValue(a);if(e=e.replace(i[0],Qt(s)),u?(t.regex.lastIndex+=s.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${Ot(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!G(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/s.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!G(i))return i;G(i)||(i=_t(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},en=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},tn=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(It(r),i),t[o]=s),s(n)}},nn=e=>(t,n,r)=>e(It(n),r)(t),rn=class{constructor(e={}){this.logger=Rt.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?tn:nn;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=tn(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e-1&&!t.includes(`)`)&&e+1{let{formatName:i,formatOptions:a}=en(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}},an=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},on=class extends zt{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Rt.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{wt(n.loaded,[i],a),an(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();G(e)&&(e=this.languageUtils.toResolveHierarchy(e)),G(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(n!=null&&n!==``){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},sn=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),G(e[1])&&(t.defaultValue=e[1]),G(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),cn=e=>(G(e.ns)&&(e.ns=[e.ns]),G(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),G(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),ln=()=>{},un=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},dn=class e extends zt{constructor(e={},t){if(super(),this.options=cn(e),this.services={},this.logger=Rt,this.modules={external:[]},un(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(G(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=sn();this.options={...n,...this.options,...cn(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Rt.init(r(this.modules.logger),this.options):Rt.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:rn;let t=new qt(this.options);this.store=new Bt(this.options.resources,this.options);let n=this.services;n.logger=Rt,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new Xt(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new $t(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new on(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new Kt(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=ln,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=gt(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=ln){let n=t,r=G(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=gt();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=ln,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&Vt.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&![`cimode`,`dev`].includes(e)){for(let e=0;e{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=G(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(G(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=Wt(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=Wt(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=Wt(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return G(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=gt();return this.options.ns?(G(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=gt();G(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new qt(sn());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=ln){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Bt(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...sn().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new $t(n)}return a.translator=new Kt(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();dn.createInstance,dn.dir,dn.init,dn.loadResources,dn.reloadResources,dn.use,dn.changeLanguage,dn.getFixedT,dn.t,dn.exists,dn.setDefaultNamespace,dn.hasLoadedNamespace,dn.loadNamespaces,dn.loadLanguages;var fn=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);yn(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},pn={},mn=(e,t,n,r)=>{yn(n)&&pn[n]||(yn(n)&&(pn[n]=new Date),fn(e,t,n,r))},hn=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},gn=(e,t,n)=>{e.loadNamespaces(t,hn(e,n))},_n=(e,t,n,r)=>{if(yn(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return gn(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,hn(e,r))},vn=(e,t,n={})=>!t.languages||!t.languages.length?(mn(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),yn=e=>typeof e==`string`,bn=e=>typeof e==`object`&&!!e,xn=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Sn={"&":`&`,"&":`&`,"<":`<`,"<":`<`,">":`>`,">":`>`,"'":`'`,"'":`'`,""":`"`,""":`"`," ":` `," ":` `,"©":`©`,"©":`©`,"®":`®`,"®":`®`,"…":`…`,"…":`…`,"/":`/`,"/":`/`},Cn=e=>Sn[e],wn={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:e=>e.replace(xn,Cn),transDefaultProps:void 0},Tn=(e={})=>{wn={...wn,...e}},En=()=>wn,Dn,On=e=>{Dn=e},kn=()=>Dn,An={type:`3rdParty`,init(e){Tn(e.options.react),On(e)}},jn=(0,w.createContext)(),Mn=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},Nn=o((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Pn=o(((e,t)=>{t.exports=Nn()}))(),Fn={t:(e,t)=>{if(yn(t))return t;if(bn(t)&&yn(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},In=()=>()=>{},Ln=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,w.useContext)(jn)||{},a=n||r||kn();a&&!a.reportNamespaces&&(a.reportNamespaces=new Mn),a||mn(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`);let o=(0,w.useMemo)(()=>({...En(),...a?.options?.react,...t}),[a,t]),{useSuspense:s,keyPrefix:c}=o,l=e||i||a?.options?.defaultNS,u=yn(l)?[l]:l||[`translation`],d=(0,w.useMemo)(()=>u,u);a?.reportNamespaces?.addUsedNamespaces?.(d);let f=(0,w.useRef)(0),p=(0,w.useCallback)(e=>{if(!a)return In;let{bindI18n:t,bindI18nStore:n}=o,r=()=>{f.current+=1,e()};return t&&a.on(t,r),n&&a.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>a.off(e,r)),n&&n.split(` `).forEach(e=>a.store.off(e,r))}},[a,o]),m=(0,w.useRef)(),h=(0,w.useCallback)(()=>{if(!a)return Fn;let e=!!(a.isInitialized||a.initializedStoreOnce)&&d.every(e=>vn(e,a,o)),n=t.lng||a.language,r=f.current,i=m.current;if(i&&i.ready===e&&i.lng===n&&i.keyPrefix===c&&i.revision===r)return i;let s={t:a.getFixedT(n,o.nsMode===`fallback`?d:d[0],c,{scopeNs:d}),ready:e,lng:n,keyPrefix:c,revision:r};return m.current=s,s},[a,d,c,o,t.lng]),[g,_]=(0,w.useState)(0),{t:v,ready:y}=(0,Pn.useSyncExternalStore)(p,h,h);(0,w.useEffect)(()=>{if(a&&!y&&!s){let e=()=>_(e=>e+1);t.lng?_n(a,t.lng,d,e):gn(a,d,e)}},[a,t.lng,d,y,s,g]);let b=a||{},x=(0,w.useRef)(null),S=(0,w.useRef)(),C=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},T=(0,w.useMemo)(()=>{let e=b,t=e?.language,n=e;e&&(x.current&&x.current.__original===e&&S.current===t?n=x.current:(n=C(e),x.current=n,S.current=t));let r=!y&&!s?(...e)=>(mn(a,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),v(...e)):v,i=[r,n,y];return i.t=r,i.i18n=n,i.ready=y,i},[v,b,y,b.resolvedLanguage,b.language,b.languages]);if(a&&s&&!y){let e=!1;try{e=!1}catch{}throw e&&mn(a,`SUSPENDED_WHILE_LOADING`,`useTranslation: suspended while translations are loading (useSuspense is true by default). Add a boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook`),new Promise(e=>{let n=()=>e();t.lng?_n(a,t.lng,d,n):gn(a,d,n)})}return T};function Rn({i18n:e,defaultNS:t,children:n}){let r=(0,w.useMemo)(()=>({i18n:e,defaultNS:t}),[e,t]);return(0,w.createElement)(jn.Provider,{value:r},n)}var zn=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},Bn=(e=>e?zn(e):zn),Vn=e=>e;function Hn(e,t=Vn){let n=w.useSyncExternalStore(e.subscribe,w.useCallback(()=>t(e.getState()),[e,t]),w.useCallback(()=>t(e.getInitialState()),[e,t]));return w.useDebugValue(n),n}var Un=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),K=o(((e,t)=>{t.exports=Un()}))(),Wn=Array.from({length:16},(e,t)=>`cell-${t+1}`);function Gn({animated:e=!1,compact:t=!1}){let[n,r]=(0,w.useState)(0),i=t?10:16,a=(0,K.jsxs)(`strong`,{className:t?`brand-lockup compact`:`brand-lockup`,children:[(0,K.jsx)(`span`,{className:`brand-word`,children:`Open`}),(0,K.jsx)(`span`,{className:`pixel-mark`,role:`img`,"aria-label":`OpenPI`,children:Wn.slice(0,i).map(e=>(0,K.jsx)(`i`,{},e))})]},n);return e?(0,K.jsx)(`button`,{className:`landing-brand`,type:`button`,"aria-label":`Replay OpenPI logo animation`,onClick:()=>r(e=>e+1),children:a}):a}function Kn(e,t,n){return Math.min(n,Math.max(t,Math.round(e)))}function qn({side:e,value:t,min:n,max:r,defaultValue:i,collapseThreshold:a,onCollapse:o,onExpandPastMax:s,onChange:c,onDraggingChange:l}){let u=(0,w.useRef)(null),d=(e,t)=>{u.current?.pointerId===t&&(u.current=null,e.hasPointerCapture(t)&&e.releasePointerCapture(t),l(!1))},f=e=>c(Kn(e,n,r));return(0,K.jsx)(`div`,{className:`pane-resizer ${e}`,"aria-hidden":`true`,"data-pane-resizer":e,onDoubleClick:()=>f(i),onPointerDown:e=>{e.button===0&&(e.preventDefault(),u.current={pointerId:e.pointerId,startX:e.clientX,startValue:t},e.currentTarget.setPointerCapture(e.pointerId),l(!0))},onPointerMove:t=>{let n=u.current;if(!n||n.pointerId!==t.pointerId)return;let i=t.clientX-n.startX,c=n.startValue+(e===`left`?i:-i);if(s&&c>=r+48){d(t.currentTarget,t.pointerId),s();return}if(o&&a!==void 0&&c<=a){d(t.currentTarget,t.pointerId),o();return}f(c)},onPointerUp:e=>d(e.currentTarget,e.pointerId),onPointerCancel:e=>d(e.currentTarget,e.pointerId),onLostPointerCapture:()=>{u.current&&(u.current=null,l(!1))}})}function Jn(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Yn=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Xn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Zn={};function Qn(e,t){return((t||Zn).jsx?Xn:Yn).test(e)}var $n=/[ \t\n\f\r]/g;function er(e){return typeof e==`object`?e.type===`text`&&tr(e.value):tr(e)}function tr(e){return e.replace($n,``)===``}var nr=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};nr.prototype.normal={},nr.prototype.property={},nr.prototype.space=void 0;function rr(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new nr(n,r,t)}function ir(e){return e.toLowerCase()}var ar=class{constructor(e,t){this.attribute=t,this.property=e}};ar.prototype.attribute=``,ar.prototype.booleanish=!1,ar.prototype.boolean=!1,ar.prototype.commaOrSpaceSeparated=!1,ar.prototype.commaSeparated=!1,ar.prototype.defined=!1,ar.prototype.mustUseProperty=!1,ar.prototype.number=!1,ar.prototype.overloadedBoolean=!1,ar.prototype.property=``,ar.prototype.spaceSeparated=!1,ar.prototype.space=void 0;var or=s({boolean:()=>cr,booleanish:()=>lr,commaOrSpaceSeparated:()=>pr,commaSeparated:()=>fr,number:()=>q,overloadedBoolean:()=>ur,spaceSeparated:()=>dr}),sr=0,cr=mr(),lr=mr(),ur=mr(),q=mr(),dr=mr(),fr=mr(),pr=mr();function mr(){return 2**++sr}var hr=Object.keys(or),gr=class extends ar{constructor(e,t,n,r){let i=-1;if(super(e,t),_r(this,`space`,r),typeof n==`number`)for(;++i4&&n.slice(0,4)===`data`&&Ar.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(kr,Nr);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!kr.test(e)){let n=e.replace(Or,Mr);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=gr}return new i(r,t)}function Mr(e){return`-`+e.toLowerCase()}function Nr(e){return e.charAt(1).toUpperCase()}var Pr=rr([yr,Sr,wr,Tr,Er],`html`),Fr=rr([yr,Cr,wr,Tr,Er],`svg`);function Ir(e){return e.join(` `).trim()}var Lr=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(` +`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),Rr=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(Lr());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),zr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Br=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Rr()),r=zr();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Vr=Ur(`end`),Hr=Ur(`start`);function Ur(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Wr(e){let t=Hr(e),n=Vr(e);if(t&&n)return{start:t,end:n}}function Gr(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?qr(e.position):`start`in e||`end`in e?qr(e):`line`in e||`column`in e?Kr(e):``}function Kr(e){return Jr(e&&e.line)+`:`+Jr(e&&e.column)}function qr(e){return Kr(e&&e.start)+`-`+Kr(e&&e.end)}function Jr(e){return e&&typeof e==`number`?e:1}var Yr=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Gr(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Yr.prototype.file=``,Yr.prototype.name=``,Yr.prototype.reason=``,Yr.prototype.message=``,Yr.prototype.stack=``,Yr.prototype.column=void 0,Yr.prototype.line=void 0,Yr.prototype.ancestors=void 0,Yr.prototype.cause=void 0,Yr.prototype.fatal=void 0,Yr.prototype.place=void 0,Yr.prototype.ruleId=void 0,Yr.prototype.source=void 0;var Xr=l(Br(),1),Zr={}.hasOwnProperty,Qr=new Map,$r=/[A-Z]/g,ei=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),ti=new Set([`td`,`th`]);function ni(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=pi(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=fi(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Fr:Pr,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=ri(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ri(e,t,n){if(t.type===`element`)return ii(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return ai(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return si(e,t,n);if(t.type===`mdxjsEsm`)return oi(e,t);if(t.type===`root`)return ci(e,t,n);if(t.type===`text`)return li(e,t)}function ii(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Fr,e.schema=i),e.ancestors.push(t);let a=yi(e,t.tagName,!1),o=mi(e,t),s=gi(e,t);return ei.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!er(e)})),ui(e,o,a,t),di(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function ai(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}bi(e,t.position)}function oi(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);bi(e,t.position)}function si(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Fr,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:yi(e,t.name,!0),o=hi(e,t),s=gi(e,t);return ui(e,o,a,t),di(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function ci(e,t,n){let r={};return di(r,gi(e,t)),e.create(t,e.Fragment,r,n)}function li(e,t){return t.value}function ui(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function di(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function fi(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function pi(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Hr(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function mi(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Zr.call(t.properties,i)){let a=_i(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&ti.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function hi(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else bi(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else bi(e,t.position);else a=r.value===null||r.value;n[i]=a}return n}function gi(e,t){let n=[],r=-1,i=e.passKeys?new Map:Qr;for(;++ri?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a0?(Mi(e,e.length,0,t),e):t}var Pi={}.hasOwnProperty;function Fi(e){let t={},n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function zi(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var Bi=Zi(/[A-Za-z]/),Vi=Zi(/[\dA-Za-z]/),Hi=Zi(/[#-'*+\--9=?A-Z^-~]/);function Ui(e){return e!==null&&(e<32||e===127)}var Wi=Zi(/\d/),Gi=Zi(/[\dA-Fa-f]/),Ki=Zi(/[!-/:-@[-`{-~]/);function J(e){return e!==null&&e<-2}function qi(e){return e!==null&&(e<0||e===32)}function Ji(e){return e===-2||e===-1||e===32}var Yi=Zi(/\p{P}|\p{S}/u),Xi=Zi(/\s/);function Zi(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Qi(e){let t=[],n=-1,r=0,i=0;for(;++n55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function $i(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Ji(r)?(e.enter(n),s(r)):t(r)}function s(r){return Ji(r)&&a++o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;er;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function aa(e,t,n){return $i(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function oa(e){if(e===null||qi(e)||Xi(e))return 1;if(Yi(e))return 2}function sa(e,t,n){let r=[],i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};da(d,-c),da(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Ni(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=Ni(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=Ni(l,sa(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Ni(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=Ni(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,Mi(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n0&&Ji(t)?$i(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||J(t)?e.check(wa,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||J(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Ji(t)?$i(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Ji(t)?$i(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||J(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Da(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Oa={name:`codeIndented`,tokenize:Aa},ka={partial:!0,tokenize:ja};function Aa(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),$i(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):J(t)?e.attempt(ka,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||J(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function ja(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):J(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):$i(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):J(e)?i(e):n(e)}}var Ma={name:`codeText`,previous:Pa,resolve:Na,tokenize:Fa};function Na(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&La(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),La(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),La(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Ga(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Ui(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||J(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||qi(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):J(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||J(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Ji(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function qa(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):J(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$i(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||J(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Ja(e,t){let n;return r;function r(i){return J(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Ji(i)?$i(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Ya={name:`definition`,tokenize:Za},Xa={partial:!0,tokenize:Qa};function Za(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Ka.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=zi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return qi(t)?Ja(e,l)(t):l(t)}function l(t){return Ga(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Xa,d,d)(t)}function d(t){return Ji(t)?$i(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||J(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Qa(e,t,n){return r;function r(t){return qi(t)?Ja(e,i)(t):n(t)}function i(t){return qa(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Ji(t)?$i(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||J(e)?t(e):n(e)}}var $a={name:`hardBreakEscape`,tokenize:eo};function eo(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return J(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var to={name:`headingAtx`,resolve:no,tokenize:ro};function no(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},Mi(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function ro(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||qi(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||J(n)?(e.exit(`atxHeading`),t(n)):Ji(n)?$i(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||qi(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var io=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),ao=[`pre`,`script`,`style`,`textarea`],oo={concrete:!0,name:`htmlFlow`,resolveTo:lo,tokenize:uo},so={partial:!0,tokenize:po},co={partial:!0,tokenize:fo};function lo(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function uo(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):Bi(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Bi(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return Bi(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||qi(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&ao.includes(l)?(i=1,r.interrupt?t(s):O(s)):io.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||Vi(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return Ji(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Bi(t)?(e.consume(t),b):Ji(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||Vi(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Ji(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Ji(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||J(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||qi(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Ji(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||J(t)?O(t):Ji(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),L):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):J(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(so,R,k)(t)):t===null||J(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(co,A,R)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||J(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return ao.includes(n)?(e.consume(t),L):O(t)}return Bi(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),L):t===45&&i===2?(e.consume(t),I):O(t)}function L(t){return t===null||J(t)?(e.exit(`htmlFlowData`),R(t)):(e.consume(t),L)}function R(n){return e.exit(`htmlFlow`),t(n)}}function fo(e,t,n){let r=this;return i;function i(t){return J(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function po(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(ma,t,n)}}var mo={name:`htmlText`,tokenize:ho};function ho(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Bi(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Bi(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):J(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):J(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):J(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):J(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return Bi(t)?(e.consume(t),S):n(t)}function S(t){return t===45||Vi(t)?(e.consume(t),S):C(t)}function C(t){return J(t)?(o=C,N(t)):Ji(t)?(e.consume(t),C):M(t)}function w(t){return t===45||Vi(t)?(e.consume(t),w):t===47||t===62||qi(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||Bi(t)?(e.consume(t),E):J(t)?(o=T,N(t)):Ji(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||Vi(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):J(t)?(o=D,N(t)):Ji(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):J(t)?(o=O,N(t)):Ji(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):J(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||qi(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||qi(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return Ji(t)?$i(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var go={name:`labelEnd`,resolveAll:bo,resolveTo:xo,tokenize:So},_o={tokenize:Co},vo={tokenize:wo},yo={tokenize:To};function bo(e){let t=-1,n=[];for(;++t=3&&(a===null||J(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Ji(t)?$i(e,s,`whitespace`)(t):s(t))}}var Po={continuation:{tokenize:Ro},exit:Bo,name:`list`,tokenize:Lo},Fo={partial:!0,tokenize:Vo},Io={partial:!0,tokenize:zo};function Lo(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Wi(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Mo,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Wi(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(ma,r.interrupt?n:u,e.attempt(Fo,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Ji(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Ro(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(ma,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,$i(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Ji(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Io,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,$i(e,e.attempt(Po,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function zo(e,t,n){let r=this;return $i(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Bo(e){e.exit(this.containerState.type)}function Vo(e,t,n){let r=this;return $i(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Ji(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Ho={name:`setextUnderline`,resolveTo:Uo,tokenize:Wo};function Uo(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Wo(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Ji(t)?$i(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||J(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Go={tokenize:Ko};function Ko(e){let t=this,n=e.attempt(ma,r,e.attempt(this.parser.constructs.flowInitial,i,$i(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ba,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var qo={resolveAll:Zo()},Jo=Xo(`string`),Yo=Xo(`text`);function Xo(e){return{resolveAll:Zo(e===`text`?Qo:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++iss,contentInitial:()=>ts,disable:()=>cs,document:()=>es,flow:()=>rs,flowInitial:()=>ns,insideSpan:()=>os,string:()=>is,text:()=>as}),es={42:Po,43:Po,45:Po,48:Po,49:Po,50:Po,51:Po,52:Po,53:Po,54:Po,55:Po,56:Po,57:Po,62:ga},ts={91:Ya},ns={[-2]:Oa,[-1]:Oa,32:Oa},rs={35:to,42:Mo,45:[Ho,Mo],60:oo,61:Ho,95:Mo,96:Ta,126:Ta},is={38:Sa,92:ba},as={[-5]:Ao,[-4]:Ao,[-3]:Ao,33:Eo,38:Sa,42:ca,60:[fa,mo],91:Oo,92:[$a,ba],93:go,95:ca,96:Ma},os={null:[ca,qo]},ss={null:[42,95]},cs={null:[]};function ls(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=Ni(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=sa(a,l.events,l),l.events):[]}function f(e,t){return ds(p(e),t)}function p(e){return us(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function ds(e,t){let n=-1,r=[],i;for(;++n0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Cs).call(a,void 0,e[0])}for(r.position={start:bs(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:bs(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Os(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ks(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function As(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Zi(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function js(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ms(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ns(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Ps(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ns(e,t);let i={src:Zi(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Fs(e,t){let n={src:Zi(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Is(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Ls(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ns(e,t);let i={href:Zi(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Rs(e,t){let n={href:Zi(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function zs(e,t,n){let r=e.all(t),i=n?Bs(n):Vs(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Ts).call(a,void 0,e[0])}for(r.position={start:Ss(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Ss(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function As(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function js(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ms(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Qi(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Ns(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ps(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Fs(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Is(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Fs(e,t);let i={src:Qi(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Ls(e,t){let n={src:Qi(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Rs(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function zs(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Fs(e,t);let i={href:Qi(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Bs(e,t){let n={href:Qi(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Vs(e,t,n){let r=e.all(t),i=n?Hs(n):Us(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s1}function Hs(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Vr(t.children[1]),o=Br(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function qs(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Qs(t.slice(i),i>0,!1)),a.join(``)}function Qs(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Ys||t===Xs;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Ys||t===Xs;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function $s(e,t){let n={type:`text`,value:Zs(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function ec(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var tc={blockquote:Ts,break:Es,code:Ds,delete:Os,emphasis:ks,footnoteReference:As,heading:js,html:Ms,imageReference:Ps,image:Fs,inlineCode:Is,linkReference:Ls,link:Rs,listItem:zs,list:Hs,paragraph:Us,root:Ws,strong:Gs,table:Ks,tableCell:Js,tableRow:qs,text:$s,thematicBreak:ec,toml:nc,yaml:nc,definition:nc,footnoteDefinition:nc};function nc(){}var{defineProperty:rc}=Object,ic=typeof self==`object`?self:globalThis,ac=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new ic[e](t)},oc=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?rc(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof ic[e]==`function`?ac(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(ac(a,o),i)};return r},sc=e=>oc(new Map,e)(0),cc=``,{toString:lc}={},{keys:uc,is:dc}=Object,fc=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=lc.call(e).slice(8,-1);switch(n){case`Array`:return[1,cc];case`Object`:return[2,cc];case`Date`:return[3,cc];case`RegExp`:return[4,cc];case`Map`:return[5,cc];case`Set`:return[6,cc];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},pc=([e,t])=>e===0&&(t===`function`||t===`symbol`),mc=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=fc(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&dc(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of uc(o))(e||!pc(fc(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?cc:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(pc(fc(n))||pc(fc(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!pc(fc(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},hc=(e,{json:t,lossy:n}={})=>{let r=[];return mc(!(t||n),!!t,new Map,r)(e),r},gc=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?sc(hc(e,t)):structuredClone(e):(e,t)=>sc(hc(e,t));function _c(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function vc(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function yc(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||_c,r=e.options.footnoteBackLabel||vc,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...gc(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:` +`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Hs(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r1}function Ws(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Hr(t.children[1]),o=Vr(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Ys(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(ec(t.slice(i),i>0,!1)),a.join(``)}function ec(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Zs||t===Qs;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Zs||t===Qs;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function tc(e,t){let n={type:`text`,value:$s(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function nc(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var rc={blockquote:Ds,break:Os,code:ks,delete:As,emphasis:js,footnoteReference:Ms,heading:Ns,html:Ps,imageReference:Is,image:Ls,inlineCode:Rs,linkReference:zs,link:Bs,listItem:Vs,list:Ws,paragraph:Gs,root:Ks,strong:qs,table:Js,tableCell:Xs,tableRow:Ys,text:tc,thematicBreak:nc,toml:ic,yaml:ic,definition:ic,footnoteDefinition:ic};function ic(){}var{defineProperty:ac}=Object,oc=typeof self==`object`?self:globalThis,sc=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new oc[e](t)},cc=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?ac(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof oc[e]==`function`?sc(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(sc(a,o),i)};return r},lc=e=>cc(new Map,e)(0),uc=``,{toString:dc}={},{keys:fc,is:pc}=Object,mc=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=dc.call(e).slice(8,-1);switch(n){case`Array`:return[1,uc];case`Object`:return[2,uc];case`Date`:return[3,uc];case`RegExp`:return[4,uc];case`Map`:return[5,uc];case`Set`:return[6,uc];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},hc=([e,t])=>e===0&&(t===`function`||t===`symbol`),gc=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=mc(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&pc(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of fc(o))(e||!hc(mc(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?uc:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(hc(mc(n))||hc(mc(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!hc(mc(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},_c=(e,{json:t,lossy:n}={})=>{let r=[];return gc(!(t||n),!!t,new Map,r)(e),r},vc=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?lc(_c(e,t)):structuredClone(e):(e,t)=>lc(_c(e,t));function yc(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function bc(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function xc(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||yc,r=e.options.footnoteBackLabel||bc,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...vc(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:` `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:` -`}]}}var bc=(function(e){if(e==null)return Tc;if(typeof e==`function`)return wc(e);if(typeof e==`object`)return Array.isArray(e)?xc(e):Sc(e);if(typeof e==`string`)return Cc(e);throw Error(`Expected function, string, or object as test`)});function xc(e){let t=[],n=-1;for(;++n`:``))+`)`})}return u;function u(){let l=Oc,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Ac(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d`:``))+`)`})}return u;function u(){let l=Ac,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Mc(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d0&&n.push({type:`text`,value:` -`}),n}function zc(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Bc(e,t){let n=Pc(e,t),r=n.one(e,void 0),i=yc(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:` -`},i)),a}function Vc(e,t){return e&&`run`in e?async function(n,r){let i=Bc(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Bc(n,{file:r,...e||t})}}function Hc(e){if(e)throw e}var Uc=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});ft.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var qc={basename:Jc,dirname:Yc,extname:Xc,join:Zc,sep:`/`};function Jc(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);el(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Yc(e){if(el(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Xc(e){el(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Zc(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function $c(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function el(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var tl={cwd:nl};function nl(){return`/`}function rl(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function il(e){if(typeof e==`string`)e=new URL(e);else if(!rl(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return al(e)}function al(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n0){let[r,...a]=t,o=n[i][1];Wc(o)&&Wc(r)&&(r=(0,pl.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function gl(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function _l(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function vl(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function yl(e){if(!Wc(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function bl(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function xl(e){return Sl(e)?e:new sl(e)}function Sl(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Cl(e){return typeof e==`string`||wl(e)}function wl(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Tl=[],El={allowDangerousHtml:!0},Dl=/^(https?|ircs?|mailto|xmpp)$/i,Ol=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function kl(e){let t=Al(e),n=jl(e);return Ml(t.runSync(t.parse(n),n),e)}function Al(e){let t=e.rehypePlugins||Tl,n=e.remarkPlugins||Tl,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...El}:El;return hl().use(ws).use(n).use(Vc,r).use(t)}function jl(e){let t=e.children||``,n=new sl;return typeof t==`string`?n.value=t:``+t,n}function Ml(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Nl;for(let e of Ol)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return jc(e,l),ti(e,{Fragment:K.Fragment,components:i,ignoreInvalidStyle:!0,jsx:K.jsx,jsxs:K.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Ci)if(Object.hasOwn(Ci,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Ci[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Nl(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Dl.test(e.slice(0,t))?e:``}var Pl=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],Fl={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...Pl,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...Pl],h2:[[`className`,`sr-only`]],img:[...Pl,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...Pl,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...Pl],table:[...Pl],ul:[...Pl,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},Il={}.hasOwnProperty;function Ll(e,t){let n={type:`root`,children:[]},r=Rl({schema:t?{...Fl,...t}:Fl,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function Rl(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return zl(e,n);case`doctype`:return Bl(e,n);case`element`:return Vl(e,n);case`root`:return Hl(e,n);case`text`:return Ul(e,n)}}}function zl(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return Xl(r,t),r}}function Bl(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return Xl(e,t),e}}function Vl(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=Wl(e,t.children),i=Gl(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&Il.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r1){let e=!1,n=0;for(;++n-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l4&&t.slice(0,4).toLowerCase()===`data`)return n}function Ql(e){return function(t){return Ll(t,e)}}function $l(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function eu(e,t,n){let r=bc((n||{}).ignore||[]),i=tu(t),a=-1;for(;++a0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=su(e,`(`),a=su(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Cu(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Yi(n)||Ji(n))&&(!t||n!==47)}Nu.peek=Mu;function wu(){this.buffer()}function Tu(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Eu(){this.buffer()}function Du(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Ou(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ri(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ku(e){this.exit(e)}function Au(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ri(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ju(e){this.exit(e)}function Mu(){return`[`}function Nu(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Pu(){return{enter:{gfmFootnoteCallString:wu,gfmFootnoteCall:Tu,gfmFootnoteDefinitionLabelString:Eu,gfmFootnoteDefinition:Du},exit:{gfmFootnoteCallString:Ou,gfmFootnoteCall:ku,gfmFootnoteDefinitionLabelString:Au,gfmFootnoteDefinition:ju}}}function Fu(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Nu},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?` -`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Lu:Iu))),s(),o}}function Iu(e,t,n){return t===0?e:Lu(e,t,n)}function Lu(e,t,n){return(n?``:` `)+e}var Ru=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Uu.peek=Wu;function zu(){return{canContainEols:[`delete`],enter:{strikethrough:Vu},exit:{strikethrough:Hu}}}function Bu(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Ru}],handlers:{delete:Uu}}}function Vu(e){this.enter({type:`delete`,children:[]},e)}function Hu(e){this.exit(e)}function Uu(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Wu(){return`~`}function Gu(e){return e.length}function Ku(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Gu,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++ul&&(l=e[u].length);++ac[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++dc[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Xu);return i(),o}function Xu(e,t,n){return`>`+(n?``:` `)+e}function Zu(e,t){return Qu(e,t.inConstruct,!0)&&!Qu(e,t.notInConstruct,!1)}function Qu(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++ro&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function td(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function nd(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function rd(e,t,n,r){let i=nd(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(td(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,id);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(ed(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:` +`}),n}function Vc(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Hc(e,t){let n=Ic(e,t),r=n.one(e,void 0),i=xc(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:` +`},i)),a}function Uc(e,t){return e&&`run`in e?async function(n,r){let i=Hc(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Hc(n,{file:r,...e||t})}}function Wc(e){if(e)throw e}var Gc=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});ft.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Yc={basename:Xc,dirname:Zc,extname:Qc,join:$c,sep:`/`};function Xc(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);nl(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Zc(e){if(nl(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Qc(e){nl(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function $c(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function tl(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function nl(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var rl={cwd:il};function il(){return`/`}function al(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function ol(e){if(typeof e==`string`)e=new URL(e);else if(!al(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return sl(e)}function sl(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n0){let[r,...a]=t,o=n[i][1];Kc(o)&&Kc(r)&&(r=(0,hl.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function vl(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function yl(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function bl(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function xl(e){if(!Kc(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Sl(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Cl(e){return wl(e)?e:new ll(e)}function wl(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Tl(e){return typeof e==`string`||El(e)}function El(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Dl=[],Ol={allowDangerousHtml:!0},kl=/^(https?|ircs?|mailto|xmpp)$/i,Al=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function jl(e){let t=Ml(e),n=Nl(e);return Pl(t.runSync(t.parse(n),n),e)}function Ml(e){let t=e.rehypePlugins||Dl,n=e.remarkPlugins||Dl,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ol}:Ol;return _l().use(Es).use(n).use(Uc,r).use(t)}function Nl(e){let t=e.children||``,n=new ll;return typeof t==`string`?n.value=t:``+t,n}function Pl(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Fl;for(let e of Al)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Nc(e,l),ni(e,{Fragment:K.Fragment,components:i,ignoreInvalidStyle:!0,jsx:K.jsx,jsxs:K.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in wi)if(Object.hasOwn(wi,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=wi[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Fl(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||kl.test(e.slice(0,t))?e:``}var Il=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],Ll={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...Il,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...Il],h2:[[`className`,`sr-only`]],img:[...Il,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...Il,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...Il],table:[...Il],ul:[...Il,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},Rl={}.hasOwnProperty;function zl(e,t){let n={type:`root`,children:[]},r=Bl({schema:t?{...Ll,...t}:Ll,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function Bl(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return Vl(e,n);case`doctype`:return Hl(e,n);case`element`:return Ul(e,n);case`root`:return Wl(e,n);case`text`:return Gl(e,n)}}}function Vl(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return Ql(r,t),r}}function Hl(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return Ql(e,t),e}}function Ul(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=Kl(e,t.children),i=ql(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&Rl.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r1){let e=!1,n=0;for(;++n-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l4&&t.slice(0,4).toLowerCase()===`data`)return n}function eu(e){return function(t){return zl(t,e)}}function tu(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function nu(e,t,n){let r=Sc((n||{}).ignore||[]),i=ru(t),a=-1;for(;++a0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=lu(e,`(`),a=lu(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Tu(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Xi(n)||Yi(n))&&(!t||n!==47)}Fu.peek=Pu;function Eu(){this.buffer()}function Du(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Ou(){this.buffer()}function ku(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Au(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=zi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ju(e){this.exit(e)}function Mu(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=zi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Nu(e){this.exit(e)}function Pu(){return`[`}function Fu(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Iu(){return{enter:{gfmFootnoteCallString:Eu,gfmFootnoteCall:Du,gfmFootnoteDefinitionLabelString:Ou,gfmFootnoteDefinition:ku},exit:{gfmFootnoteCallString:Au,gfmFootnoteCall:ju,gfmFootnoteDefinitionLabelString:Mu,gfmFootnoteDefinition:Nu}}}function Lu(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Fu},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?` +`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?zu:Ru))),s(),o}}function Ru(e,t,n){return t===0?e:zu(e,t,n)}function zu(e,t,n){return(n?``:` `)+e}var Bu=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Gu.peek=Ku;function Vu(){return{canContainEols:[`delete`],enter:{strikethrough:Uu},exit:{strikethrough:Wu}}}function Hu(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Bu}],handlers:{delete:Gu}}}function Uu(e){this.enter({type:`delete`,children:[]},e)}function Wu(e){this.exit(e)}function Gu(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Ku(){return`~`}function qu(e){return e.length}function Ju(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||qu,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++ul&&(l=e[u].length);++ac[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++dc[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Qu);return i(),o}function Qu(e,t,n){return`>`+(n?``:` `)+e}function $u(e,t){return ed(e,t.inConstruct,!0)&&!ed(e,t.notInConstruct,!1)}function ed(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++ro&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function rd(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function id(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function ad(e,t,n,r){let i=id(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(rd(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,od);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(nd(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:` `,encode:["`"],...s.current()})),t()}return u+=s.move(` `),a&&(u+=s.move(a+` -`)),u+=s.move(c),l(),u}function id(e,t,n){return(n?``:` `)+e}function ad(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function od(e,t,n,r){let i=ad(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:` -`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function sd(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function cd(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function ld(e,t,n){let r=ia(e),i=ia(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ud.peek=dd;function ud(e,t,n,r){let i=sd(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=ld(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=cd(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=ld(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+cd(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function dd(e,t,n){return n.options.emphasis||`*`}function fd(e,t){let n=!1;return jc(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&Ti(e)&&(t.options.setext||n))}function pd(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(fd(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:` +`)),u+=s.move(c),l(),u}function od(e,t,n){return(n?``:` `)+e}function sd(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function cd(e,t,n,r){let i=sd(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:` +`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function ld(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function ud(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function dd(e,t,n){let r=oa(e),i=oa(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}fd.peek=pd;function fd(e,t,n,r){let i=ld(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=dd(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=ud(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=dd(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+ud(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function pd(e,t,n){return n.options.emphasis||`*`}function md(e,t){let n=!1;return Nc(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&Ei(e)&&(t.options.setext||n))}function hd(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(md(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:` `,after:` `});return r(),t(),o+` `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(` `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:` -`,...a.current()});return/^[\t ]/.test(l)&&(l=cd(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}md.peek=hd;function md(e){return e.value||``}function hd(){return`<`}gd.peek=_d;function gd(e,t,n,r){let i=ad(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function _d(){return`!`}vd.peek=yd;function vd(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function yd(){return`!`}bd.peek=xd;function bd(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a\u007F]/.test(e.url))}Cd.peek=wd;function Cd(e,t,n,r){let i=ad(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(Sd(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function wd(e,t,n){return Sd(e,n)?`<`:`[`}Td.peek=Ed;function Td(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Ed(){return`[`}function Dd(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Od(e){let t=Dd(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function kd(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Ad(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function jd(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?kd(n):Dd(n),s=e.ordered?o===`.`?`)`:`.`:Od(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),Ad(n)===o&&t){let t=-1;for(;++t-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Pd(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var Fd=bc([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Id(e,t,n,r){return(e.children.some(function(e){return Fd(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Ld(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Rd.peek=zd;function Rd(e,t,n,r){let i=Ld(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=ld(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=cd(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=ld(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+cd(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function zd(e,t,n){return n.options.strong||`*`}function Bd(e,t,n,r){return n.safe(e.value,r)}function Vd(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Hd(e,t,n){let r=(Ad(n)+(n.options.ruleSpaces?` `:``)).repeat(Vd(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Ud={blockquote:Yu,break:$u,code:rd,definition:od,emphasis:ud,hardBreak:$u,heading:pd,html:md,image:gd,imageReference:vd,inlineCode:bd,link:Cd,linkReference:Td,list:jd,listItem:Nd,paragraph:Pd,root:Id,strong:Rd,text:Bd,thematicBreak:Hd};function Wd(){return{enter:{table:Gd,tableData:Yd,tableHeader:Yd,tableRow:qd},exit:{codeText:Xd,table:Kd,tableData:Jd,tableHeader:Jd,tableRow:Jd}}}function Gd(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Kd(e){this.exit(e),this.data.inTable=void 0}function qd(e){this.enter({type:`tableRow`,children:[]},e)}function Jd(e){this.exit(e)}function Yd(e){this.enter({type:`tableCell`,children:[]},e)}function Xd(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Zd));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Zd(e,t){return t===`|`?t:e}function Qd(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:` +`,...a.current()});return/^[\t ]/.test(l)&&(l=ud(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}gd.peek=_d;function gd(e){return e.value||``}function _d(){return`<`}vd.peek=yd;function vd(e,t,n,r){let i=sd(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function yd(){return`!`}bd.peek=xd;function bd(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function xd(){return`!`}Sd.peek=Cd;function Sd(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a\u007F]/.test(e.url))}Td.peek=Ed;function Td(e,t,n,r){let i=sd(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(wd(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Ed(e,t,n){return wd(e,n)?`<`:`[`}Dd.peek=Od;function Dd(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Od(){return`[`}function kd(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Ad(e){let t=kd(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function jd(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Md(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Nd(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?jd(n):kd(n),s=e.ordered?o===`.`?`)`:`.`:Ad(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),Md(n)===o&&t){let t=-1;for(;++t-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Id(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var Ld=Sc([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Rd(e,t,n,r){return(e.children.some(function(e){return Ld(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function zd(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Bd.peek=Vd;function Bd(e,t,n,r){let i=zd(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=dd(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=ud(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=dd(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+ud(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Vd(e,t,n){return n.options.strong||`*`}function Hd(e,t,n,r){return n.safe(e.value,r)}function Ud(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Wd(e,t,n){let r=(Md(n)+(n.options.ruleSpaces?` `:``)).repeat(Ud(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Gd={blockquote:Zu,break:td,code:ad,definition:cd,emphasis:fd,hardBreak:td,heading:hd,html:gd,image:vd,imageReference:bd,inlineCode:Sd,link:Td,linkReference:Dd,list:Nd,listItem:Fd,paragraph:Id,root:Rd,strong:Bd,text:Hd,thematicBreak:Wd};function Kd(){return{enter:{table:qd,tableData:Zd,tableHeader:Zd,tableRow:Yd},exit:{codeText:Qd,table:Jd,tableData:Xd,tableHeader:Xd,tableRow:Xd}}}function qd(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Jd(e){this.exit(e),this.data.inTable=void 0}function Yd(e){this.enter({type:`tableRow`,children:[]},e)}function Xd(e){this.exit(e)}function Zd(e){this.enter({type:`tableCell`,children:[]},e)}function Qd(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,$d));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function $d(e,t){return t===`|`?t:e}function ef(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:` `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(` -`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Ku(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var jf={tokenize:zf,partial:!0};function Mf(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:If,continuation:{tokenize:Lf},exit:Rf}},text:{91:{name:`gfmFootnoteCall`,tokenize:Ff},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Nf,resolveTo:Pf}}}}function Nf(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Ri(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Pf(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Ff(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Ki(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Ri(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Ki(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function If(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Ki(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Ri(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Ki(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Y(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Lf(e,t,n){return e.check(fa,t,e.attempt(jf,t,n))}function Rf(e){e.exit(`gfmFootnoteDefinition`)}function zf(e,t,n){let r=this;return Y(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Bf(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=ia(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Vf=class{constructor(){this.map=[]}add(e,t,n){Hf(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Hf(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):J(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):qi(t)?Y(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Ki(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,qi(t)?Y(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return qi(t)?Y(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||J(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return qi(t)?Y(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||J(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||J(n)?(e.exit(`tableRow`),t(n)):qi(n)?Y(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Ki(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Kf(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Vf;for(;++nn[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Yf(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Jf(e,t,n,r,i){let a=[],o=Yf(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Yf(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Xf={name:`tasklistCheck`,tokenize:Qf};function Zf(){return{text:{91:Xf}}}function Qf(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Ki(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return J(r)?t(r):qi(r)?e.check({tokenize:$f},t,n)(r):n(r)}}function $f(e,t,n){return Y(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function ep(e){return Pi([gf(),Mf(),Bf(e),Wf(),Zf()])}var tp={};function np(e){let t=this,n=e||tp,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(ep(n)),a.push(af()),o.push(of(n))}function rp(e){return!!e.trim()&&!e.startsWith(`#`)&&!e.startsWith(`//`)&&(!/^[a-z][a-z\d+.-]*:/iu.test(e)||/^[a-z]:[\\/]/iu.test(e))}var ip=(0,w.createContext)(null);async function ap(e){try{return await navigator.clipboard.writeText(e),!0}catch{}let t=document.activeElement,n=window.getSelection(),r=n?Array.from({length:n.rangeCount},(e,t)=>n.getRangeAt(t).cloneRange()):[],i=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?{start:t.selectionStart,end:t.selectionEnd,direction:t.selectionDirection}:null,a=document.createElement(`textarea`);a.value=e,a.readOnly=!0,a.style.cssText=`position:fixed;opacity:0;pointer-events:none`;try{return document.body.append(a),a.focus({preventScroll:!0}),a.select(),document.execCommand(`copy`)}catch{return!1}finally{if(a.remove(),t instanceof HTMLElement&&t.isConnected&&(t.focus({preventScroll:!0}),i&&i.start!==null&&i.end!==null&&(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&t.setSelectionRange(i.start,i.end,i.direction??void 0)),n){n.removeAllRanges();for(let e of r)e.startContainer.isConnected&&e.endContainer.isConnected&&n.addRange(e)}}}function op(){return e=>{let t=e=>{if(e.type===`element`){let t=e.tagName===`a`?`href`:e.tagName===`img`?`src`:void 0,n=t?e.properties[t]:void 0,r=typeof n==`string`?n.replace(/%5c/giu,`\\`):n;t&&typeof r==`string`&&/^[a-z]:[\\/]/iu.test(r)&&!/[\x00-\x1f\x7f]/u.test(r)&&(e.data={...e.data,openpiWindowsPath:r},e.properties[t]=`./`)}for(let n of e.children)n.type===`element`&&t(n)};t(e)}}function sp(e){let t=e?.data?.openpiWindowsPath;return typeof t==`string`?t:void 0}function cp(e){if(!e.trim())return``;try{let t=new URL(e,document.baseURI);return[`http:`,`https:`,`mailto:`,`tel:`].includes(t.protocol)?t.href:``}catch{return``}}function lp({children:e,node:t,...n}){let{t:r}=In(),[i,a]=(0,w.useState)(`idle`),o=(0,w.useRef)(0),s=(0,w.useRef)(void 0),c=(0,w.useRef)(null);(0,w.useEffect)(()=>()=>{o.current+=1,window.clearTimeout(s.current)},[]);let l=i===`copied`;return(0,K.jsxs)(`div`,{className:`markdown-code-block`,children:[(0,K.jsxs)(`div`,{className:`markdown-code-toolbar`,children:[i===`failed`&&(0,K.jsx)(`span`,{role:`status`,children:r(`copyCodeFailed`)}),(0,K.jsx)(`button`,{type:`button`,"aria-label":r(l?`copiedCode`:`copyCode`),title:r(l?`copiedCode`:`copyCode`),disabled:i===`copying`,onClick:()=>{let e=++o.current;window.clearTimeout(s.current),a(`copying`),ap(c.current?.textContent??``).then(t=>{e===o.current&&(a(t?`copied`:`failed`),t&&(s.current=window.setTimeout(()=>a(`idle`),1200)))})},children:l?(0,K.jsx)(B,{"aria-hidden":`true`}):(0,K.jsx)(oe,{"aria-hidden":`true`})})]}),(0,K.jsx)(`section`,{className:`markdown-code-scroll`,"aria-label":r(`codeBlock`),tabIndex:0,onKeyDown:e=>{if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;let t=e.currentTarget;t.scrollWidth<=t.clientWidth||(e.preventDefault(),t.scrollLeft+=e.key===`ArrowRight`?40:-40)},children:(0,K.jsx)(`pre`,{ref:c,...n,children:e})})]})}var up=(0,w.memo)(function({children:e}){let t=(0,w.useContext)(ip);return(0,K.jsx)(`div`,{className:`markdown`,children:(0,K.jsx)(kl,{remarkPlugins:[np,ou],rehypePlugins:[op,Ql],urlTransform:e=>rp(e)?e:cp(e),components:{pre:lp,table({children:e,...t}){return(0,K.jsx)(`section`,{className:`markdown-table-scroll`,"aria-label":`Table`,tabIndex:0,children:(0,K.jsx)(`table`,{...t,children:e})})},a({href:e,node:n,children:r,...i}){if(e=sp(n)??e,rp(e??``))return t?(0,K.jsxs)(`button`,{type:`button`,className:`artifact-link`,title:`Open read-only file: ${e}`,onClick:()=>t.open(e??``,t.parent),children:[r,(0,K.jsxs)(`small`,{className:`artifact-link-path`,"aria-hidden":`true`,children:[` `,`(`,e,`)`]})]}):(0,K.jsx)(`span`,{title:`Open this file from its Session`,children:r});let a=cp(e??``);return a?(0,K.jsx)(`a`,{...i,href:a,target:`_blank`,rel:`noreferrer`,children:r}):r},img({src:e,node:n,alt:r,title:i}){if(e=sp(n)??e,rp(e??``))return t?(0,K.jsxs)(`button`,{type:`button`,className:`artifact-link`,title:`Open read-only file: ${e}`,onClick:()=>t.open(e??``,t.parent),children:[`[image: `,r||`image`,`]`,(0,K.jsxs)(`small`,{className:`artifact-link-path`,"aria-hidden":`true`,children:[` `,`(`,e,`)`]})]}):(0,K.jsxs)(`span`,{children:[`[image: `,r||`image`,`]`]});let a=cp(e??``),o=r||`image`;return a?(0,K.jsxs)(`a`,{href:a,title:i,target:`_blank`,rel:`noreferrer`,children:[`[image: `,o,`]`]}):(0,K.jsx)(`span`,{children:o})}},children:e})})}),dp=12288;function fp(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function pp(e,t=!1){let n=t?e.slice(-24576):e.slice(0,dp*2),r=n.replace(/\x1b\][^\x07\x1b]*(?:\x07|\x1b\\|$)/gu,``).replace(/(?:\x1b\[|\x9b)[0-?]*[ -/]*[@-~]/gu,``).replace(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u202a-\u202e\u2066-\u2069]/gu,``).split(` +`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Ju(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Nf={tokenize:Vf,partial:!0};function Pf(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Rf,continuation:{tokenize:zf},exit:Bf}},text:{91:{name:`gfmFootnoteCall`,tokenize:Lf},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Ff,resolveTo:If}}}}function Ff(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=zi(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function If(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Lf(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||qi(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(zi(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return qi(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Rf(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||qi(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=zi(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return qi(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),$i(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function zf(e,t,n){return e.check(ma,t,e.attempt(Nf,t,n))}function Bf(e){e.exit(`gfmFootnoteDefinition`)}function Vf(e,t,n){let r=this;return $i(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Hf(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=oa(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Uf=class{constructor(){this.map=[]}add(e,t,n){Wf(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Wf(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):J(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Ji(t)?$i(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||qi(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Ji(t)?$i(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Ji(t)?$i(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||J(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Ji(t)?$i(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||J(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||J(n)?(e.exit(`tableRow`),t(n)):Ji(n)?$i(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||qi(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Jf(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Uf;for(;++nn[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Zf(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Xf(e,t,n,r,i){let a=[],o=Zf(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Zf(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Qf={name:`tasklistCheck`,tokenize:ep};function $f(){return{text:{91:Qf}}}function ep(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return qi(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return J(r)?t(r):Ji(r)?e.check({tokenize:tp},t,n)(r):n(r)}}function tp(e,t,n){return $i(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function np(e){return Fi([vf(),Pf(),Hf(e),Kf(),$f()])}var rp={};function ip(e){let t=this,n=e||rp,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(np(n)),a.push(sf()),o.push(cf(n))}function ap(e){return!!e.trim()&&!e.startsWith(`#`)&&!e.startsWith(`//`)&&(!/^[a-z][a-z\d+.-]*:/iu.test(e)||/^[a-z]:[\\/]/iu.test(e))}var op=(0,w.createContext)(null);async function sp(e){try{return await navigator.clipboard.writeText(e),!0}catch{}let t=document.activeElement,n=window.getSelection(),r=n?Array.from({length:n.rangeCount},(e,t)=>n.getRangeAt(t).cloneRange()):[],i=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?{start:t.selectionStart,end:t.selectionEnd,direction:t.selectionDirection}:null,a=document.createElement(`textarea`);a.value=e,a.readOnly=!0,a.style.cssText=`position:fixed;opacity:0;pointer-events:none`;try{return document.body.append(a),a.focus({preventScroll:!0}),a.select(),document.execCommand(`copy`)}catch{return!1}finally{if(a.remove(),t instanceof HTMLElement&&t.isConnected&&(t.focus({preventScroll:!0}),i&&i.start!==null&&i.end!==null&&(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&t.setSelectionRange(i.start,i.end,i.direction??void 0)),n){n.removeAllRanges();for(let e of r)e.startContainer.isConnected&&e.endContainer.isConnected&&n.addRange(e)}}}function cp(){return e=>{let t=e=>e.type===`text`?e.value:e.type===`element`&&![`ul`,`ol`].includes(e.tagName)?e.children.map(t).join(``):``,n=e=>{if(e.type===`element`&&(e.tagName===`li`||e.tagName===`p`)){let n=t(e).trim();for(let t of e.children)t.type===`element`&&t.tagName===`input`&&t.properties.type===`checkbox`&&n&&(t.properties.ariaLabel=n)}for(let t of e.children)t.type===`element`&&n(t)};n(e)}}function lp(){return e=>{let t=e=>{if(e.type===`element`){let t=e.tagName===`a`?`href`:e.tagName===`img`?`src`:void 0,n=t?e.properties[t]:void 0,r=typeof n==`string`?n.replace(/%5c/giu,`\\`):n;t&&typeof r==`string`&&/^[a-z]:[\\/]/iu.test(r)&&!/[\x00-\x1f\x7f]/u.test(r)&&(e.data={...e.data,openpiWindowsPath:r},e.properties[t]=`./`)}for(let n of e.children)n.type===`element`&&t(n)};t(e)}}function up(e){let t=e?.data?.openpiWindowsPath;return typeof t==`string`?t:void 0}function dp(e){if(!e.trim())return``;try{let t=new URL(e,document.baseURI);return[`http:`,`https:`,`mailto:`,`tel:`].includes(t.protocol)?t.href:``}catch{return``}}function fp({children:e,node:t,...n}){let{t:r}=Ln(),[i,a]=(0,w.useState)(`idle`),o=(0,w.useRef)(0),s=(0,w.useRef)(void 0),c=(0,w.useRef)(null);(0,w.useEffect)(()=>()=>{o.current+=1,window.clearTimeout(s.current)},[]);let l=i===`copied`;return(0,K.jsxs)(`div`,{className:`markdown-code-block`,children:[(0,K.jsxs)(`div`,{className:`markdown-code-toolbar`,children:[i===`failed`&&(0,K.jsx)(`span`,{role:`status`,children:r(`copyCodeFailed`)}),(0,K.jsx)(`button`,{type:`button`,"aria-label":r(l?`copiedCode`:`copyCode`),title:r(l?`copiedCode`:`copyCode`),disabled:i===`copying`,onClick:()=>{let e=++o.current;window.clearTimeout(s.current),a(`copying`),sp(c.current?.textContent??``).then(t=>{e===o.current&&(a(t?`copied`:`failed`),t&&(s.current=window.setTimeout(()=>a(`idle`),1200)))})},children:l?(0,K.jsx)(B,{"aria-hidden":`true`}):(0,K.jsx)(oe,{"aria-hidden":`true`})})]}),(0,K.jsx)(`section`,{className:`markdown-code-scroll`,"aria-label":r(`codeBlock`),tabIndex:0,onKeyDown:e=>{if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;let t=e.currentTarget;t.scrollWidth<=t.clientWidth||(e.preventDefault(),t.scrollLeft+=e.key===`ArrowRight`?40:-40)},children:(0,K.jsx)(`pre`,{ref:c,...n,children:e})})]})}var pp=(0,w.memo)(function({children:e}){let t=(0,w.useContext)(op);return(0,K.jsx)(`div`,{className:`markdown`,children:(0,K.jsx)(jl,{remarkPlugins:[ip,cu],rehypePlugins:[lp,eu,cp],urlTransform:e=>ap(e)?e:dp(e),components:{pre:fp,table({children:e,...t}){return(0,K.jsx)(`section`,{className:`markdown-table-scroll`,"aria-label":`Table`,tabIndex:0,children:(0,K.jsx)(`table`,{...t,children:e})})},a({href:e,node:n,children:r,...i}){if(e=up(n)??e,ap(e??``))return t?(0,K.jsxs)(`button`,{type:`button`,className:`artifact-link`,title:`Open read-only file: ${e}`,onClick:()=>t.open(e??``,t.parent),children:[r,(0,K.jsxs)(`small`,{className:`artifact-link-path`,"aria-hidden":`true`,children:[` `,`(`,e,`)`]})]}):(0,K.jsx)(`span`,{title:`Open this file from its Session`,children:r});let a=dp(e??``);return a?(0,K.jsx)(`a`,{...i,href:a,target:`_blank`,rel:`noreferrer`,children:r}):r},img({src:e,node:n,alt:r,title:i}){if(e=up(n)??e,ap(e??``))return t?(0,K.jsxs)(`button`,{type:`button`,className:`artifact-link`,title:`Open read-only file: ${e}`,onClick:()=>t.open(e??``,t.parent),children:[`[image: `,r||`image`,`]`,(0,K.jsxs)(`small`,{className:`artifact-link-path`,"aria-hidden":`true`,children:[` `,`(`,e,`)`]})]}):(0,K.jsxs)(`span`,{children:[`[image: `,r||`image`,`]`]});let a=dp(e??``),o=r||`image`;return a?(0,K.jsxs)(`a`,{href:a,title:i,target:`_blank`,rel:`noreferrer`,children:[`[image: `,o,`]`]}):(0,K.jsx)(`span`,{children:o})}},children:e})})}),mp=8e3;function hp(e,t){let n=0;for(let r of e){let e=r.codePointAt(0);if(n+=e<=127?1:e<=2047?2:e<=65535?3:4,n>t)return}return n}function gp(e){return hp(e,mp)!==void 0}function _p(e){return typeof e==`string`&&/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu.test(e)}var vp=Symbol.for(`@tt-a1i/openpi/web-command-feedback/v1`),yp=Reflect.get(globalThis,vp);if(yp!==void 0&&!(yp instanceof WeakMap))throw Error(`Incompatible Web feedback bridge`);yp===void 0&&Object.defineProperty(globalThis,vp,{value:yp??new WeakMap});var bp=12288;function xp(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function Sp(e,t=!1){let n=t?e.slice(-24576):e.slice(0,bp*2),r=n.replace(/\x1b\][^\x07\x1b]*(?:\x07|\x1b\\|$)/gu,``).replace(/(?:\x1b\[|\x9b)[0-?]*[ -/]*[@-~]/gu,``).replace(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u202a-\u202e\u2066-\u2069]/gu,``).split(` `),i=(t?r.slice(-300):r.slice(0,300)).join(` -`),a=new TextEncoder().encode(i),o=t?Math.max(0,a.length-dp):0,s=t?a.length:Math.min(a.length,dp);for(;oo&&(a[s]&192)==128;)s--;return{text:new TextDecoder().decode(a.subarray(o,s)),truncated:e.length>n.length||r.length>300||a.length>12288}}function mp(e){if(e.evidenceArguments)return e.evidenceArguments;try{return fp(JSON.parse(e.arguments))}catch{return{}}}function hp(e){return[`read`,`write`,`edit`,`bash`,`bg_start`,`bg_status`].includes(e)}function gp(e,t){if(e===`bash`&&t?.terminalReceipt)return t.terminalReceipt;let n=fp(t?.details);if(e.startsWith(`bg_`)){let e=n.status;if(e===`running`)return{state:`running`};if([`done`,`failed`,`killed`,`timed_out`].includes(String(e)))return{state:e===`killed`?`cancelled`:e===`timed_out`?`timed_out`:e===`failed`?`failed`:`returned`,exitCode:typeof n.exitCode==`number`?n.exitCode:void 0,signal:typeof n.signal==`string`?pp(n.signal).text:void 0}}if(e===`bash`&&t?.isError===!0&&!t.truncation){let e=t.content.trimEnd().split(` -`).at(-1);if(e===`Command aborted`)return{state:`cancelled`};if(/^Command timed out after \d+(?:\.\d+)? seconds$/u.test(e??``))return{state:`timed_out`};let n=/^Command exited with code (-?\d+)$/u.exec(e??``);if(n)return{state:`failed`,exitCode:Number(n[1])}}}function _p(e){let t=/^\s*Tests\s+((?:\d+ (?:passed|failed|skipped|todo)(?:\s*\|\s*)?)+)\s*\((\d+)\)\s*$/mu.exec(e);if(t){let n=Number(/(\d+) passed/u.exec(t[1])?.[1]??0),r=Number(/(\d+) failed/u.exec(t[1])?.[1]??0),i=Number(t[2]);if(Number.isSafeInteger(i)&&n+r<=i)return{format:`Vitest`,tests:i,passed:n,failed:r,cancelled:0,failures:vp(e,/^\s*(?:FAIL\s|×\s)/u)}}let n=/^Ran (\d+) tests? across \d+ files?\./mu.exec(e),r=/^\s*(\d+) pass\s*$/mu.exec(e),i=/^\s*(\d+) fail\s*$/mu.exec(e);if(n&&r&&i){let t=Number(n[1]),a=Number(r[1]),o=Number(i[1]);if(Number.isSafeInteger(t)&&a+o<=t)return{format:`Bun`,tests:t,passed:a,failed:o,cancelled:0,failures:vp(e,/^\s*\(fail\) /u)}}let a=t=>{let n=RegExp(`^[#ℹ] ${t} (\\d+)$`,`mu`).exec(e),r=n?Number(n[1]):void 0;return r!==void 0&&Number.isSafeInteger(r)?r:void 0},o=a(`tests`),s=a(`pass`),c=a(`fail`),l=a(`cancelled`)??0;if(o===void 0||s===void 0||c===void 0||s+c+l>o)return;let u=vp(e,/^(?:\s*not ok \d+\b|✖ )/u);return{format:/^ℹ tests /mu.test(e)?`Node`:`TAP`,tests:o,passed:s,failed:c,cancelled:l,failures:u}}function vp(e,t){return e.split(` +`),a=new TextEncoder().encode(i),o=t?Math.max(0,a.length-bp):0,s=t?a.length:Math.min(a.length,bp);for(;oo&&(a[s]&192)==128;)s--;return{text:new TextDecoder().decode(a.subarray(o,s)),truncated:e.length>n.length||r.length>300||a.length>12288}}function Cp(e){if(e.evidenceArguments)return e.evidenceArguments;try{return xp(JSON.parse(e.arguments))}catch{return{}}}function wp(e){return[`read`,`write`,`edit`,`bash`,`bg_start`,`bg_status`].includes(e)}function Tp(e,t){if(e===`bash`&&t?.terminalReceipt)return t.terminalReceipt;let n=xp(t?.details);if(e.startsWith(`bg_`)){let e=n.status;if(e===`running`)return{state:`running`};if([`done`,`failed`,`killed`,`timed_out`].includes(String(e)))return{state:e===`killed`?`cancelled`:e===`timed_out`?`timed_out`:e===`failed`?`failed`:`returned`,exitCode:typeof n.exitCode==`number`?n.exitCode:void 0,signal:typeof n.signal==`string`?Sp(n.signal).text:void 0}}if(e===`bash`&&t?.isError===!0&&!t.truncation){let e=t.content.trimEnd().split(` +`).at(-1);if(e===`Command aborted`)return{state:`cancelled`};if(/^Command timed out after \d+(?:\.\d+)? seconds$/u.test(e??``))return{state:`timed_out`};let n=/^Command exited with code (-?\d+)$/u.exec(e??``);if(n)return{state:`failed`,exitCode:Number(n[1])}}}function Ep(e){let t=/^\s*Tests\s+((?:\d+ (?:passed|failed|skipped|todo)(?:\s*\|\s*)?)+)\s*\((\d+)\)\s*$/mu.exec(e);if(t){let n=Number(/(\d+) passed/u.exec(t[1])?.[1]??0),r=Number(/(\d+) failed/u.exec(t[1])?.[1]??0),i=Number(t[2]);if(Number.isSafeInteger(i)&&n+r<=i)return{format:`Vitest`,tests:i,passed:n,failed:r,cancelled:0,failures:Dp(e,/^\s*(?:FAIL\s|×\s)/u)}}let n=/^Ran (\d+) tests? across \d+ files?\./mu.exec(e),r=/^\s*(\d+) pass\s*$/mu.exec(e),i=/^\s*(\d+) fail\s*$/mu.exec(e);if(n&&r&&i){let t=Number(n[1]),a=Number(r[1]),o=Number(i[1]);if(Number.isSafeInteger(t)&&a+o<=t)return{format:`Bun`,tests:t,passed:a,failed:o,cancelled:0,failures:Dp(e,/^\s*\(fail\) /u)}}let a=t=>{let n=RegExp(`^[#ℹ] ${t} (\\d+)$`,`mu`).exec(e),r=n?Number(n[1]):void 0;return r!==void 0&&Number.isSafeInteger(r)?r:void 0},o=a(`tests`),s=a(`pass`),c=a(`fail`),l=a(`cancelled`)??0;if(o===void 0||s===void 0||c===void 0||s+c+l>o)return;let u=Dp(e,/^(?:\s*not ok \d+\b|✖ )/u);return{format:/^ℹ tests /mu.test(e)?`Node`:`TAP`,tests:o,passed:s,failed:c,cancelled:l,failures:u}}function Dp(e,t){return e.split(` `).flatMap((e,n,r)=>t.test(e)?[r.slice(n,n+8).join(` -`)]:[]).slice(0,20)}function yp(e,t,n){let r=mp(e),i=fp(t?.details),a=gp(e.name,t),o=a?.state??(n===`running`?`running`:t?.isError===!0?`failed`:t?.isError===!1?`returned`:`unknown`),s=[`bash`,`bg_start`,`bg_status`].includes(e.name),c=pp(t?.content??``,s),l=e.name===`read`?/\n\n(\[(?:\d+ more lines in file\. Use offset=\d+ to continue\.|Showing lines [^\n]+)\])$/u.exec(c.text):null,u=c.truncated||!!t?.truncation||fp(i.truncation).truncated===!0||e.evidenceTruncated===!0,d=s?_p(c.text):void 0,f=e.name===`read`?`file`:[`write`,`edit`].includes(e.name)?`change`:d?`test`:`terminal`,p=[`write`,`edit`].includes(e.name)&&t?.isError===!1&&typeof i.diff==`string`?pp(i.diff):void 0,m=typeof r.offset==`number`&&Number.isSafeInteger(r.offset)&&r.offset>0?r.offset:1;return{kind:f,state:o,processState:a?.state??(e.name===`bash`&&t?.isError===!1?`returned`:e.name===`bash`&&n===`running`?`running`:`unknown`),output:l?c.text.slice(0,l.index):c.text,truncated:u||p?.truncated===!0,readRecovery:l?.[1],numberLines:e.name===`read`&&t?.isError===!1&&fp(i.truncation).firstLineExceedsLimit!==!0&&!!c.text,path:typeof r.path==`string`?pp(r.path).text:void 0,resolvedPath:typeof r.resolvedPath==`string`?pp(r.resolvedPath).text:void 0,command:typeof r.command==`string`?pp(r.command).text:void 0,offset:m,diff:p?.text,tests:d,change:t?.isError===!1&&[`created`,`overwritten`,`unchanged`].includes(String(i.change))?String(i.change):void 0,evidenceUnavailable:typeof i.evidenceUnavailable==`string`?pp(i.evidenceUnavailable).text:void 0,exitCode:a&&`exitCode`in a?a.exitCode:void 0,signal:a&&`signal`in a?a.signal:void 0,recovery:typeof i.fullOutputPath==`string`?pp(i.fullOutputPath).text:void 0,rawArguments:pp(e.arguments).text,rawResult:pp(JSON.stringify({content:t?.content,details:t?.details,isError:t?.isError})).text}}new TextEncoder;var bp=`openpi.web.token`,xp=class extends Error{status;code;constructor(e,t,n){super(e),this.status=t,this.code=n,this.name=`WebApiError`}};function Sp(){let e=document.querySelector(`meta[name="openpi-web-token"]`)?.content,t=new URLSearchParams(location.hash.slice(1)).get(`token`),n=e&&/^[a-f0-9]{64}$/i.test(e)?e:t;if(t&&history.replaceState(null,``,`${location.pathname}${location.search}`),n){try{window.sessionStorage.setItem(bp,n)}catch{}return n}try{return window.sessionStorage.getItem(bp)}catch{return null}}var Cp=class{token=Sp();headers(e=!1){return{Authorization:`Bearer ${this.token??``}`,...e?{"Content-Type":`application/json`}:{}}}async request(e,t={}){let{timeoutMs:n=15e3,timeoutMessage:r=`Request timed out. Please try again.`,...i}=t,a=new AbortController,o=!1,s=()=>a.abort();t.signal?.aborted&&s(),t.signal?.addEventListener(`abort`,s,{once:!0});let c=window.setTimeout(()=>{o=!0,a.abort()},n);try{let n=await fetch(e,{...i,signal:a.signal,headers:{...this.headers(!!t.body),...t.headers}}),r=await n.json();if(a.signal.aborted)throw Error(`Request aborted`);if(!n.ok)throw new xp(r.error||`Request failed (${n.status})`,n.status,r.code);return r}catch(e){throw o?Error(r):e}finally{window.clearTimeout(c),t.signal?.removeEventListener(`abort`,s)}}snapshot(e){let t=e?`?path=${encodeURIComponent(e)}`:``;return this.request(`/api/snapshot${t}`)}gitReview(e,t,n){return this.request(`/api/git-review?${new URLSearchParams({sessionId:e,path:t})}`,{signal:n,timeoutMessage:`Git review timed out. Please retry.`})}resolveArtifact(e,t,n,r){return this.request(`/api/artifacts/resolve`,{method:`POST`,body:JSON.stringify({sessionId:e,reference:t,parent:n,access:`read-file`}),signal:r})}artifactMetadata(e,t,n){return this.request(`/api/artifacts/content?${new URLSearchParams({sessionId:e,handle:t,metadata:`1`})}`,{signal:n})}artifactPreview(e,t,n){return this.request(`/api/artifacts/content?${new URLSearchParams({sessionId:e,handle:t})}`,{signal:n})}releaseArtifact(e,t){return this.request(`/api/artifacts/content?`+new URLSearchParams({sessionId:e,handle:t}),{method:`DELETE`})}async downloadArtifact(e,t){let n=new AbortController,r=()=>n.abort();t.addEventListener(`abort`,r,{once:!0}),t.aborted&&r();let i=window.setTimeout(r,15e3);try{let t=await fetch(`/api/artifacts/content?${new URLSearchParams({sessionId:e.sessionId,handle:e.handle,revision:e.revision,download:`1`})}`,{headers:this.headers(),signal:n.signal});if(!t.ok){let e=await t.json();throw new xp(e.error||`Download failed`,t.status,e.code)}let r=t.body?.getReader();if(!r)throw Error(`Download body unavailable`);let i=[],a=0;try{for(;;){let{value:e,done:t}=await r.read();if(t)break;if(a+=e.byteLength,a>20971520)throw Error(`Download exceeds the 20 MiB limit`);i.push(new Uint8Array(e))}}finally{await r.cancel()}return new Blob(i,{type:`application/octet-stream`})}finally{window.clearTimeout(i),t.removeEventListener(`abort`,r)}}chooseWorkspace(){return this.request(`/api/workspaces/select`,{method:`POST`})}openBrowser(e,t,n,r){return this.request(`/api/browser/open`,{method:`POST`,body:JSON.stringify({sessionId:e,url:t,...n}),signal:r})}browserState(e,t){return this.request(`/api/browser/state?${new URLSearchParams({sessionId:e})}`,{signal:t})}browserAction(e,t,n){let{type:r,...i}=t;return this.request(`/api/browser/action`,{method:`POST`,body:JSON.stringify({sessionId:e,action:r,...i}),signal:n})}async browserFrame(e,t){let n=await fetch(`/api/browser/frame?${new URLSearchParams({sessionId:e})}`,{headers:this.headers(),signal:t});if(n.status===404)return null;if(!n.ok){let e=await n.json();throw new xp(e.error||`Request failed (${n.status})`,n.status,e.code)}return n.blob()}createInteractiveTerminal(e,t,n,r){return this.request(`/api/terminal`,{method:`POST`,body:JSON.stringify({sessionId:e,cols:t,rows:n}),signal:r})}interactiveTerminal(e,t,n){return this.request(`/api/terminal?${new URLSearchParams({sessionId:e,id:t})}`,{signal:n})}closeInteractiveTerminal(e,t){return this.request(`/api/terminal?${new URLSearchParams({sessionId:e,id:t})}`,{method:`DELETE`})}writeInteractiveTerminal(e,t,n){return this.request(`/api/terminal/input`,{method:`POST`,body:JSON.stringify({sessionId:e,id:t,data:n})})}resizeInteractiveTerminal(e,t,n,r){return this.request(`/api/terminal/resize`,{method:`POST`,body:JSON.stringify({sessionId:e,id:t,cols:n,rows:r})})}async streamInteractiveTerminal(e,t,n,r,i){let a=new URLSearchParams({sessionId:e,id:t});n!==void 0&&a.set(`after`,String(n));let o=await fetch(`/api/terminal/events?${a}`,{headers:this.headers(),signal:r});if(!o.ok){let e=await o.json().catch(()=>({}));throw new xp(e.error||`Terminal stream failed (${o.status})`,o.status,e.code)}let s=o.body?.getReader();if(!s)throw Error(`Terminal stream is unavailable`);let c=new TextDecoder,l=``;try{for(;!r.aborted;){let{value:e,done:t}=await s.read();if(t)break;for(l+=c.decode(e,{stream:!0});;){let e=l.search(/\r?\n\r?\n/u);if(e<0)break;let t=l.slice(0,e),n=l.startsWith(`\r +`)]:[]).slice(0,20)}function Op(e,t,n){let r=Cp(e),i=xp(t?.details),a=Tp(e.name,t),o=a?.state??(n===`running`?`running`:t?.isError===!0?`failed`:t?.isError===!1?`returned`:`unknown`),s=[`bash`,`bg_start`,`bg_status`].includes(e.name),c=Sp(t?.content??``,s),l=e.name===`read`?/\n\n(\[(?:\d+ more lines in file\. Use offset=\d+ to continue\.|Showing lines [^\n]+)\])$/u.exec(c.text):null,u=c.truncated||!!t?.truncation||xp(i.truncation).truncated===!0||e.evidenceTruncated===!0,d=s?Ep(c.text):void 0,f=e.name===`read`?`file`:[`write`,`edit`].includes(e.name)?`change`:d?`test`:`terminal`,p=[`write`,`edit`].includes(e.name)&&t?.isError===!1&&typeof i.diff==`string`?Sp(i.diff):void 0,m=typeof r.offset==`number`&&Number.isSafeInteger(r.offset)&&r.offset>0?r.offset:1;return{kind:f,state:o,processState:a?.state??(e.name===`bash`&&t?.isError===!1?`returned`:e.name===`bash`&&n===`running`?`running`:`unknown`),output:l?c.text.slice(0,l.index):c.text,truncated:u||p?.truncated===!0,readRecovery:l?.[1],numberLines:e.name===`read`&&t?.isError===!1&&xp(i.truncation).firstLineExceedsLimit!==!0&&!!c.text,path:typeof r.path==`string`?Sp(r.path).text:void 0,resolvedPath:typeof r.resolvedPath==`string`?Sp(r.resolvedPath).text:void 0,command:typeof r.command==`string`?Sp(r.command).text:void 0,offset:m,diff:p?.text,tests:d,change:t?.isError===!1&&[`created`,`overwritten`,`unchanged`].includes(String(i.change))?String(i.change):void 0,evidenceUnavailable:typeof i.evidenceUnavailable==`string`?Sp(i.evidenceUnavailable).text:void 0,exitCode:a&&`exitCode`in a?a.exitCode:void 0,signal:a&&`signal`in a?a.signal:void 0,recovery:typeof i.fullOutputPath==`string`?Sp(i.fullOutputPath).text:void 0,rawArguments:Sp(e.arguments).text,rawResult:Sp(JSON.stringify({content:t?.content,details:t?.details,isError:t?.isError})).text}}new TextEncoder;var kp=`openpi.web.token`,Ap=`openpi.web.controller`,jp;function Mp(){try{let e=window.sessionStorage.getItem(Ap);if(_p(e))return e;let t=window.crypto.randomUUID();return window.sessionStorage.setItem(Ap,t),t}catch{return jp??=window.crypto.randomUUID()}}var Np=class extends Error{status;code;constructor(e,t,n){super(e),this.status=t,this.code=n,this.name=`WebApiError`}};function Pp(){let e=document.querySelector(`meta[name="openpi-web-token"]`)?.content,t=new URLSearchParams(location.hash.slice(1)).get(`token`),n=e&&/^[a-f0-9]{64}$/i.test(e)?e:t;if(t&&history.replaceState(null,``,`${location.pathname}${location.search}`),n){try{window.sessionStorage.setItem(kp,n)}catch{}return n}try{return window.sessionStorage.getItem(kp)}catch{return null}}var Fp=class{token=Pp();controllerId=Mp();headers(e=!1){return{Authorization:`Bearer ${this.token??``}`,"X-OpenPI-Web-Controller":this.controllerId,...e?{"Content-Type":`application/json`}:{}}}async request(e,t={}){let{timeoutMs:n=15e3,timeoutMessage:r=`Request timed out. Please try again.`,...i}=t,a=new AbortController,o=!1,s=()=>a.abort();t.signal?.aborted&&s(),t.signal?.addEventListener(`abort`,s,{once:!0});let c=window.setTimeout(()=>{o=!0,a.abort()},n);try{let n=await fetch(e,{...i,signal:a.signal,headers:{...this.headers(!!t.body),...t.headers}}),r=await n.json();if(a.signal.aborted)throw Error(`Request aborted`);if(!n.ok)throw new Np(r.error||`Request failed (${n.status})`,n.status,r.code);return r}catch(e){throw o?Error(r):e}finally{window.clearTimeout(c),t.signal?.removeEventListener(`abort`,s)}}snapshot(e){let t=e?`?path=${encodeURIComponent(e)}`:``;return this.request(`/api/snapshot${t}`)}gitReview(e,t,n){return this.request(`/api/git-review?${new URLSearchParams({sessionId:e,path:t})}`,{signal:n,timeoutMessage:`Git review timed out. Please retry.`})}resolveArtifact(e,t,n,r){return this.request(`/api/artifacts/resolve`,{method:`POST`,body:JSON.stringify({sessionId:e,reference:t,parent:n,access:`read-file`}),signal:r})}artifactMetadata(e,t,n){return this.request(`/api/artifacts/content?${new URLSearchParams({sessionId:e,handle:t,metadata:`1`})}`,{signal:n})}artifactPreview(e,t,n){return this.request(`/api/artifacts/content?${new URLSearchParams({sessionId:e,handle:t})}`,{signal:n})}releaseArtifact(e,t){return this.request(`/api/artifacts/content?`+new URLSearchParams({sessionId:e,handle:t}),{method:`DELETE`})}async downloadArtifact(e,t){let n=new AbortController,r=()=>n.abort();t.addEventListener(`abort`,r,{once:!0}),t.aborted&&r();let i=window.setTimeout(r,15e3);try{let t=await fetch(`/api/artifacts/content?${new URLSearchParams({sessionId:e.sessionId,handle:e.handle,revision:e.revision,download:`1`})}`,{headers:this.headers(),signal:n.signal});if(!t.ok){let e=await t.json();throw new Np(e.error||`Download failed`,t.status,e.code)}let r=t.body?.getReader();if(!r)throw Error(`Download body unavailable`);let i=[],a=0;try{for(;;){let{value:e,done:t}=await r.read();if(t)break;if(a+=e.byteLength,a>20971520)throw Error(`Download exceeds the 20 MiB limit`);i.push(new Uint8Array(e))}}finally{await r.cancel()}return new Blob(i,{type:`application/octet-stream`})}finally{window.clearTimeout(i),t.removeEventListener(`abort`,r)}}chooseWorkspace(){return this.request(`/api/workspaces/select`,{method:`POST`})}openBrowser(e,t,n,r){return this.request(`/api/browser/open`,{method:`POST`,body:JSON.stringify({sessionId:e,url:t,...n}),signal:r})}browserState(e,t){return this.request(`/api/browser/state?${new URLSearchParams({sessionId:e})}`,{signal:t})}browserAction(e,t,n){let{type:r,...i}=t;return this.request(`/api/browser/action`,{method:`POST`,body:JSON.stringify({sessionId:e,action:r,...i}),signal:n})}async browserFrame(e,t){let n=await fetch(`/api/browser/frame?${new URLSearchParams({sessionId:e})}`,{headers:this.headers(),signal:t});if(n.status===404)return null;if(!n.ok){let e=await n.json();throw new Np(e.error||`Request failed (${n.status})`,n.status,e.code)}return n.blob()}createInteractiveTerminal(e,t,n,r){return this.request(`/api/terminal`,{method:`POST`,body:JSON.stringify({sessionId:e,cols:t,rows:n}),signal:r})}interactiveTerminal(e,t,n){return this.request(`/api/terminal?${new URLSearchParams({sessionId:e,id:t})}`,{signal:n})}closeInteractiveTerminal(e,t){return this.request(`/api/terminal?${new URLSearchParams({sessionId:e,id:t})}`,{method:`DELETE`})}writeInteractiveTerminal(e,t,n){return this.request(`/api/terminal/input`,{method:`POST`,body:JSON.stringify({sessionId:e,id:t,data:n})})}resizeInteractiveTerminal(e,t,n,r){return this.request(`/api/terminal/resize`,{method:`POST`,body:JSON.stringify({sessionId:e,id:t,cols:n,rows:r})})}async streamInteractiveTerminal(e,t,n,r,i){let a=new URLSearchParams({sessionId:e,id:t});n!==void 0&&a.set(`after`,String(n));let o=await fetch(`/api/terminal/events?${a}`,{headers:this.headers(),signal:r});if(!o.ok){let e=await o.json().catch(()=>({}));throw new Np(e.error||`Terminal stream failed (${o.status})`,o.status,e.code)}let s=o.body?.getReader();if(!s)throw Error(`Terminal stream is unavailable`);let c=new TextDecoder,l=``;try{for(;!r.aborted;){let{value:e,done:t}=await s.read();if(t)break;for(l+=c.decode(e,{stream:!0});;){let e=l.search(/\r?\n\r?\n/u);if(e<0)break;let t=l.slice(0,e),n=l.startsWith(`\r `,e)?4:2;l=l.slice(e+n);let r=t.split(/\r?\n/u).filter(e=>e.startsWith(`data:`)).map(e=>e.slice(5).trimStart()).join(` -`);r&&i(JSON.parse(r))}}}finally{await s.cancel().catch(()=>void 0)}}renameWorkspace(e,t){return this.request(`/api/workspaces`,{method:`PATCH`,body:JSON.stringify({path:e,name:t})})}removeWorkspace(e){return this.request(`/api/workspaces?path=${encodeURIComponent(e)}`,{method:`DELETE`})}createSession(e,t){return this.request(`/api/sessions`,{method:`POST`,body:JSON.stringify({workspacePath:e,commandId:t})})}selectSession(e){return this.request(`/api/sessions/select`,{method:`POST`,body:JSON.stringify({path:e})})}renameSession(e,t){return this.request(`/api/sessions`,{method:`PATCH`,body:JSON.stringify({path:e,name:t})})}archiveSession(e){return this.request(`/api/sessions/archive?path=${encodeURIComponent(e)}`,{method:`POST`})}unarchiveSession(e){return this.request(`/api/sessions/unarchive?path=${encodeURIComponent(e)}`,{method:`POST`})}thinking(e,t){return this.request(`/api/thinking?sessionId=${encodeURIComponent(e)}`,{signal:t})}setThinkingLevel(e,t){return this.request(`/api/thinking`,{method:`POST`,body:JSON.stringify({sessionId:e,level:t})})}trust(e,t){return this.request(`/api/trust?sessionId=${encodeURIComponent(e)}`,{signal:t})}providerAuth(e,t){return this.request(`/api/providers/auth-status?sessionId=${encodeURIComponent(e)}`,{signal:t})}commands(e,t){return this.request(`/api/commands?sessionId=${encodeURIComponent(e)}`,{signal:t})}settingsCatalog(e,t){return this.request(`/api/settings/catalog?sessionId=${encodeURIComponent(e)}`,{signal:t})}terminalDetail(e,t,n){return this.request(`/api/capabilities/detail?kind=background-terminals&id=${encodeURIComponent(t)}&sessionId=${encodeURIComponent(e)}`,{signal:n})}subagentDetail(e,t,n){return this.request(`/api/capabilities/detail?kind=subagents&id=${encodeURIComponent(t)}&sessionId=${encodeURIComponent(e)}`,{signal:n})}subagentAction(e,t,n){return this.request(`/api/capabilities/action`,{method:`POST`,body:JSON.stringify({sessionId:e,...t}),signal:n})}selectModel(e,t,n){return this.request(`/api/model`,{method:`POST`,body:JSON.stringify({provider:e,modelId:t,sessionId:n})})}searchModels(e,t,n){let r=new URLSearchParams({query:e,limit:`50`});return t&&r.set(`sessionId`,t),this.request(`/api/models?${r}`,{signal:n})}cancelActiveTurn(e){return this.request(`/api/turns/cancel`,{method:`POST`,body:JSON.stringify(e)})}async prompt(e,t,n,r=!1,i=[]){let a=await this.request(`/api/prompt`,{method:`POST`,body:JSON.stringify({sessionId:e,content:t,commandId:n,retry:r,images:i}),timeoutMs:3e4,timeoutMessage:`Request timed out; admission may still be pending. Retry the same message to recover its receipt.`});if(typeof a.id!=`string`||!a.id||a.accepted!==!0)throw Error(`Invalid prompt receipt; retry the same message to recover its admission.`);return a}},wp=(0,w.forwardRef)(function({sessionId:e,children:t,disabled:n=!1,onOpen:r,onClose:i},a){let{t:o}=In(),s=(0,w.useMemo)(()=>new Cp,[]),[c,l]=(0,w.useState)(null),[u,d]=(0,w.useState)(null),[f,p]=(0,w.useState)(null),[m,h]=(0,w.useState)(!1),[g,_]=(0,w.useState)(null),v=(0,w.useRef)(null),y=(0,w.useRef)(0),b=(0,w.useRef)(null),x=(0,w.useRef)(null),S=(0,w.useRef)(new Set),C=(0,w.useRef)(void 0),T=(0,w.useCallback)((t,i)=>{if(n)return;r?.();let a=document.activeElement;a instanceof HTMLElement&&a.closest(`.artifact-panel`)||(v.current=a instanceof HTMLElement?a:null),y.current++,d(null),p(null),_(null),C.current=i,l({reference:t,parent:i,sessionId:e})},[n,r,e]),E=(0,w.useCallback)(()=>{y.current++,l(null),d(null),_(null),i?.(),v.current?.focus()},[i]);(0,w.useImperativeHandle)(a,()=>({close:E}),[E]),(0,w.useEffect)(()=>{c&&c.sessionId!==e&&(y.current++,l(null),d(null),_(null))},[e,c]),(0,w.useEffect)(()=>{!n||!c||(y.current++,l(null),d(null),_(null))},[n,c]),(0,w.useEffect)(()=>{if(!c||!e||c.sessionId!==e)return;let t=new AbortController,n,r=c.parent,i,a=!1,o,l=2e3;b.current?.focus();let u=async()=>{if(document.visibilityState===`hidden`){i=setTimeout(u,2e3);return}try{if(n||=(await s.resolveArtifact(e,c.reference,r,t.signal)).handle,r&&=(s.releaseArtifact(e,r).catch(()=>void 0),void 0),a){s.releaseArtifact(e,n).catch(()=>void 0);return}if(o&&(await s.artifactMetadata(e,n,t.signal)).identity===o){a||p(null),l=Math.min(l*2,3e4);return}let i=await s.artifactPreview(e,n,t.signal);a||(o=i.identity,l=2e3,d(i),p(null))}catch(e){l=Math.min(l*2,3e4),a||p(e instanceof Error?e.message:`Unable to read file`)}finally{a||(i=setTimeout(u,l))}};return u(),()=>{a=!0,t.abort(),clearTimeout(i),x.current?.abort(),h(!1),n&&n!==C.current&&s.releaseArtifact(e,n).catch(()=>void 0),r&&s.releaseArtifact(e,r).catch(()=>void 0);for(let e of S.current)URL.revokeObjectURL(e);S.current.clear()}},[s,c,e]);let D=(0,w.useMemo)(()=>({open:T}),[T]),O=u?.artifact.path??c?.reference??``,k=u?.artifact.name??O.split(/[\\/]/u).at(-1)??O,A=async()=>{if(!u||m)return;let e=new AbortController;x.current=e,h(!0);try{let t=await s.downloadArtifact(u.artifact,e.signal);if(e.signal.aborted)return;let n=URL.createObjectURL(t);S.current.add(n);let r=document.createElement(`a`);r.href=n,r.download=u.artifact.name,r.click(),setTimeout(()=>{URL.revokeObjectURL(n),S.current.delete(n)},1e3)}catch(t){e.signal.aborted||p(t instanceof Error?t.message:`Download failed`)}finally{e.signal.aborted||h(!1)}};return(0,K.jsxs)(ip.Provider,{value:D,children:[t,c&&(0,K.jsxs)(`aside`,{className:`artifact-panel`,"aria-label":o(`filePreview`),onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),E())},children:[(0,K.jsxs)(`header`,{children:[(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`small`,{children:[o(`filePreview`),` · `,o(`artifactReadOnly`)]}),(0,K.jsx)(`h2`,{title:k,children:k})]}),(0,K.jsx)(`button`,{ref:b,type:`button`,"aria-label":o(`closePreview`),title:o(`closePreview`),onClick:E,children:(0,K.jsx)(pt,{"aria-hidden":`true`})})]}),(0,K.jsxs)(`div`,{className:`artifact-panel-body`,children:[(0,K.jsxs)(`div`,{className:`artifact-source`,children:[(0,K.jsx)(`code`,{title:O,children:O}),(0,K.jsx)(`button`,{type:`button`,"aria-label":o(`copyFilePath`),title:o(`copyFilePath`),onClick:()=>{let e=++y.current;ap(O).then(t=>{e===y.current&&_(t?`copied`:`failed`)})},children:g===`copied`?(0,K.jsx)(B,{"aria-hidden":`true`}):(0,K.jsx)(oe,{"aria-hidden":`true`})})]}),g&&(0,K.jsx)(`p`,{role:`status`,children:o(g===`copied`?`filePathCopied`:`copyFailed`)}),(0,K.jsx)(`p`,{className:`artifact-session`,children:o(`artifactSession`,{sessionId:e})}),(0,K.jsxs)(`div`,{className:`artifact-actions`,children:[(0,K.jsxs)(`button`,{type:`button`,onClick:()=>{y.current++,_(null),C.current=void 0,l(t=>t?{sessionId:e,reference:u?.artifact.path??t.reference,...u?{}:{parent:t.parent}}:null)},children:[(0,K.jsx)(Xe,{"aria-hidden":`true`}),` `,o(`refreshFile`)]}),(0,K.jsxs)(`button`,{type:`button`,disabled:!u||m,onClick:()=>void A(),children:[(0,K.jsx)(he,{"aria-hidden":`true`}),` `,o(m?`downloadingFile`:`downloadFile`)]})]}),f&&(0,K.jsxs)(`p`,{role:`status`,className:`evidence-warning`,children:[u?o(`artifactOlderPreview`):``,f]}),!u&&!f&&(0,K.jsx)(`p`,{role:`status`,children:o(`readingFile`)}),u&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`p`,{className:`artifact-revision`,children:[o(`artifactVersion`),`:`,` `,(0,K.jsx)(`code`,{children:u.artifact.revision}),` ·`,` `,o(`artifactBytes`,{count:u.artifact.bytes})]}),u.truncated&&(0,K.jsx)(`p`,{className:`evidence-warning`,children:o(`artifactPreviewTruncated`)}),u.text===void 0?(0,K.jsx)(`p`,{children:o(`artifactUnsupported`)}):/\.(?:md|markdown)$/iu.test(u.artifact.name)?(0,K.jsx)(ip.Provider,{value:{open:T,parent:u.artifact.handle},children:(0,K.jsx)(up,{children:u.text})}):(0,K.jsx)(`section`,{"aria-label":`File preview content`,children:(0,K.jsx)(`pre`,{children:u.text})})]})]})]})]})}),Tp={},Ep;function Dp(){if(Ep)return Tp;Ep=1,Object.defineProperty(Tp,"__esModule",{value:!0}),Tp.styleq=void 0;var e=new WeakMap,t=`$$css`;function n(n){var r,i,a;return n!=null&&(r=n.disableCache===!0,i=n.disableMix===!0,a=n.transform),function(){for(var n=[],o=``,s=null,c=``,l=r?null:e,u=Array(arguments.length),d=0;d0;){var f=u.pop();if(f!=null&&f!==!1){if(Array.isArray(f)){for(var p=0;p0&&(i.style=n),r!=null&&r!==``&&(i[`data-style-src`]=r),i}Object.freeze({});function kp(e){return(e.style.anchorName??``).split(`,`).map(e=>e.trim()).filter(Boolean)}function Ap(e,t){e.style.anchorName=t.join(`, `)}function jp(e,t){let n=kp(e);n.includes(t)||(n.push(t),Ap(e,n))}function Mp(e,t){Ap(e,kp(e).filter(e=>e!==t))}var Np=0,Pp=null,Fp=!1;function Ip(){Np+=1}function Lp(){Pp=Np}function Rp(){Fp||typeof document>`u`||(Fp=!0,document.addEventListener(`pointerdown`,Ip,!0),document.addEventListener(`keydown`,Ip,!0),document.addEventListener(`click`,Lp,!0))}function zp(){return Rp(),Np}function Bp(){return Rp(),Pp===Np}var Vp=new Set(`p.h1.h2.h3.h4.h5.h6.dt.pre.legend.data.dfn.meter.output.progress.option.optgroup.table.thead.tbody.tfoot.tr.colgroup.ul.ol.menu.dl.select.datalist.picture.hgroup.ruby.rt.rp.a.button.label.summary.span.em.strong.b.i.u.s.small.mark.code.kbd.samp.var.sub.sup.abbr.cite.q.time.bdi.bdo.ins.del`.split(`.`));function Hp(e){if(!e)return null;let t=null,n=e;for(;n;)Vp.has(n.tagName.toLowerCase())&&(t=n),n=n.parentElement;return t?.parentElement??null}var Up={"--color-accent":`var(--color-accent)`,"--color-accent-muted":`var(--color-accent-muted)`,"--color-on-accent":`var(--color-on-accent)`,"--color-neutral":`var(--color-neutral)`,"--color-background-surface":`var(--color-background-surface)`,"--color-background-body":`var(--color-background-body)`,"--color-overlay":`var(--color-overlay)`,"--color-overlay-hover":`var(--color-overlay-hover)`,"--color-overlay-pressed":`var(--color-overlay-pressed)`,"--color-background-muted":`var(--color-background-muted)`,"--color-text-primary":`var(--color-text-primary)`,"--color-text-secondary":`var(--color-text-secondary)`,"--color-text-disabled":`var(--color-text-disabled)`,"--color-text-accent":`var(--color-text-accent)`,"--color-on-dark":`var(--color-on-dark)`,"--color-on-light":`var(--color-on-light)`,"--color-icon-accent":`var(--color-icon-accent)`,"--color-icon-primary":`var(--color-icon-primary)`,"--color-icon-secondary":`var(--color-icon-secondary)`,"--color-icon-disabled":`var(--color-icon-disabled)`,"--color-background-card":`var(--color-background-card)`,"--color-background-popover":`var(--color-background-popover)`,"--color-background-inverted":`var(--color-background-inverted)`,"--color-background-error-inverted":`var(--color-background-error-inverted)`,"--color-success":`var(--color-success)`,"--color-success-muted":`var(--color-success-muted)`,"--color-on-success":`var(--color-on-success)`,"--color-error":`var(--color-error)`,"--color-error-muted":`var(--color-error-muted)`,"--color-on-error":`var(--color-on-error)`,"--color-warning":`var(--color-warning)`,"--color-warning-muted":`var(--color-warning-muted)`,"--color-on-warning":`var(--color-on-warning)`,"--color-border":`var(--color-border)`,"--color-border-emphasized":`var(--color-border-emphasized)`,"--color-skeleton":`var(--color-skeleton)`,"--color-track":`var(--color-track)`,"--color-shadow":`var(--color-shadow)`,"--color-tint-hover":`var(--color-tint-hover)`,"--color-background-blue":`var(--color-background-blue)`,"--color-border-blue":`var(--color-border-blue)`,"--color-icon-blue":`var(--color-icon-blue)`,"--color-text-blue":`var(--color-text-blue)`,"--color-background-cyan":`var(--color-background-cyan)`,"--color-border-cyan":`var(--color-border-cyan)`,"--color-icon-cyan":`var(--color-icon-cyan)`,"--color-text-cyan":`var(--color-text-cyan)`,"--color-background-gray":`var(--color-background-gray)`,"--color-border-gray":`var(--color-border-gray)`,"--color-icon-gray":`var(--color-icon-gray)`,"--color-text-gray":`var(--color-text-gray)`,"--color-background-green":`var(--color-background-green)`,"--color-border-green":`var(--color-border-green)`,"--color-icon-green":`var(--color-icon-green)`,"--color-text-green":`var(--color-text-green)`,"--color-background-orange":`var(--color-background-orange)`,"--color-border-orange":`var(--color-border-orange)`,"--color-icon-orange":`var(--color-icon-orange)`,"--color-text-orange":`var(--color-text-orange)`,"--color-background-pink":`var(--color-background-pink)`,"--color-border-pink":`var(--color-border-pink)`,"--color-icon-pink":`var(--color-icon-pink)`,"--color-text-pink":`var(--color-text-pink)`,"--color-background-purple":`var(--color-background-purple)`,"--color-border-purple":`var(--color-border-purple)`,"--color-icon-purple":`var(--color-icon-purple)`,"--color-text-purple":`var(--color-text-purple)`,"--color-background-red":`var(--color-background-red)`,"--color-border-red":`var(--color-border-red)`,"--color-icon-red":`var(--color-icon-red)`,"--color-text-red":`var(--color-text-red)`,"--color-background-teal":`var(--color-background-teal)`,"--color-border-teal":`var(--color-border-teal)`,"--color-icon-teal":`var(--color-icon-teal)`,"--color-text-teal":`var(--color-text-teal)`,"--color-background-yellow":`var(--color-background-yellow)`,"--color-border-yellow":`var(--color-border-yellow)`,"--color-icon-yellow":`var(--color-icon-yellow)`,"--color-text-yellow":`var(--color-text-yellow)`,__varGroupHash__:`xj0fimd`},Wp={"--spacing-0":`var(--spacing-0)`,"--spacing-0-5":`var(--spacing-0-5)`,"--spacing-1":`var(--spacing-1)`,"--spacing-1-5":`var(--spacing-1-5)`,"--spacing-2":`var(--spacing-2)`,"--spacing-3":`var(--spacing-3)`,"--spacing-4":`var(--spacing-4)`,"--spacing-5":`var(--spacing-5)`,"--spacing-6":`var(--spacing-6)`,"--spacing-7":`var(--spacing-7)`,"--spacing-8":`var(--spacing-8)`,"--spacing-9":`var(--spacing-9)`,"--spacing-10":`var(--spacing-10)`,"--spacing-11":`var(--spacing-11)`,"--spacing-12":`var(--spacing-12)`,__varGroupHash__:`x1kvdh9l`},Gp={"--focus-outline-width":`var(--focus-outline-width)`,"--focus-outline-style":`var(--focus-outline-style)`,"--focus-outline-color":`var(--focus-outline-color)`,"--focus-outline-offset":`var(--focus-outline-offset)`,__varGroupHash__:`xzxs3qz`},Kp={"--duration-fast-min":`var(--duration-fast-min)`,"--duration-fast":`var(--duration-fast)`,"--duration-fast-max":`var(--duration-fast-max)`,"--duration-medium-min":`var(--duration-medium-min)`,"--duration-medium":`var(--duration-medium)`,"--duration-medium-max":`var(--duration-medium-max)`,"--duration-slow-min":`var(--duration-slow-min)`,"--duration-slow":`var(--duration-slow)`,"--duration-slow-max":`var(--duration-slow-max)`,__varGroupHash__:`x14lkjui`},qp={"--ease-standard":`var(--ease-standard)`,__varGroupHash__:`xf09i69`},Jp={0:`spacing0`,.5:`spacing0_5`,1:`spacing1`,1.5:`spacing1_5`,2:`spacing2`,3:`spacing3`,4:`spacing4`,5:`spacing5`,6:`spacing6`,8:`spacing8`,10:`spacing10`},Yp={0:{kZCmMZ:`x18gyask`,kwRFfy:`x1s0aq8i`,kLKAdn:`x1ydh6w3`,kGO01o:`x1l20ajd`,$$css:!0},1:{kZCmMZ:`x1vsv5vr`,kwRFfy:`x1nryj5t`,kLKAdn:`xfsso4q`,kGO01o:`xy143xn`,$$css:!0},2:{kZCmMZ:`x12gdq22`,kwRFfy:`x1djylfy`,kLKAdn:`x1xye8es`,kGO01o:`x1wesfrj`,$$css:!0},3:{kZCmMZ:`x126nfab`,kwRFfy:`x1t818jl`,kLKAdn:`x1vlblms`,kGO01o:`xvmdzux`,$$css:!0},4:{kZCmMZ:`x1rey3nv`,kwRFfy:`xnjyzlh`,kLKAdn:`x1oa1p4a`,kGO01o:`x1awphl8`,$$css:!0},5:{kZCmMZ:`x1blguxw`,kwRFfy:`xdbrk9v`,kLKAdn:`xx7rijo`,kGO01o:`x1hk98q`,$$css:!0},6:{kZCmMZ:`x31w388`,kwRFfy:`x1we12cn`,kLKAdn:`x1adxfkp`,kGO01o:`xjpqqx5`,$$css:!0},8:{kZCmMZ:`x1j3hnjz`,kwRFfy:`x1q91b2g`,kLKAdn:`xoxd1wu`,kGO01o:`x2oz4g1`,$$css:!0},10:{kZCmMZ:`xqp078j`,kwRFfy:`x160ivqr`,kLKAdn:`xk6660b`,kGO01o:`x2izi54`,$$css:!0},"0.5":{kZCmMZ:`x138rykx`,kwRFfy:`x1le3yxw`,kLKAdn:`xbx876j`,kGO01o:`xij103a`,$$css:!0},"1.5":{kZCmMZ:`xfti1ec`,kwRFfy:`x17hk9do`,kLKAdn:`x1kwdpsa`,kGO01o:`x1opdxmq`,$$css:!0}},Xp={0:{"--container-padding-inline-start":`x1gu2k80`,"--container-padding-inline-end":`x91ghl5`,$$css:!0},1:{"--container-padding-inline-start":`x1cvlban`,"--container-padding-inline-end":`x2oyxnl`,$$css:!0},2:{"--container-padding-inline-start":`x1xlrr2o`,"--container-padding-inline-end":`xcas3b9`,$$css:!0},3:{"--container-padding-inline-start":`xfdwxua`,"--container-padding-inline-end":`xu0ipoa`,$$css:!0},4:{"--container-padding-inline-start":`x1dlhslv`,"--container-padding-inline-end":`xs0pscg`,$$css:!0},5:{"--container-padding-inline-start":`x1s81nki`,"--container-padding-inline-end":`xgkj7vj`,$$css:!0},6:{"--container-padding-inline-start":`x1ep0dkj`,"--container-padding-inline-end":`x94cj42`,$$css:!0},8:{"--container-padding-inline-start":`xw1diwv`,"--container-padding-inline-end":`x1b9k1pi`,$$css:!0},10:{"--container-padding-inline-start":`xserb3f`,"--container-padding-inline-end":`xx5lg5w`,$$css:!0},"0.5":{"--container-padding-inline-start":`x14ws0sr`,"--container-padding-inline-end":`x1wz3t3y`,$$css:!0},"1.5":{"--container-padding-inline-start":`x176g23i`,"--container-padding-inline-end":`xntetml`,$$css:!0}},Zp={0:{"--container-padding-block-start":`x1i3qcxz`,$$css:!0},1:{"--container-padding-block-start":`xnsckjb`,$$css:!0},2:{"--container-padding-block-start":`xa8b4fq`,$$css:!0},3:{"--container-padding-block-start":`x11k4f5r`,$$css:!0},4:{"--container-padding-block-start":`xm01sq8`,$$css:!0},5:{"--container-padding-block-start":`xp8wdkl`,$$css:!0},6:{"--container-padding-block-start":`x1hmud4d`,$$css:!0},8:{"--container-padding-block-start":`xfv60at`,$$css:!0},10:{"--container-padding-block-start":`x17h9kl7`,$$css:!0},"0.5":{"--container-padding-block-start":`xvdf9ev`,$$css:!0},"1.5":{"--container-padding-block-start":`x1kbx601`,$$css:!0}},Qp={0:{"--container-padding-block-end":`xkunwnr`,$$css:!0},1:{"--container-padding-block-end":`x57a7ii`,$$css:!0},2:{"--container-padding-block-end":`x1lsgcmx`,$$css:!0},3:{"--container-padding-block-end":`x1q3ppug`,$$css:!0},4:{"--container-padding-block-end":`x4hfsld`,$$css:!0},5:{"--container-padding-block-end":`xbib2ws`,$$css:!0},6:{"--container-padding-block-end":`x1q8d17g`,$$css:!0},8:{"--container-padding-block-end":`x8lgq76`,$$css:!0},10:{"--container-padding-block-end":`x15vxphk`,$$css:!0},"0.5":{"--container-padding-block-end":`x1cao3zv`,$$css:!0},"1.5":{"--container-padding-block-end":`xv53x8y`,$$css:!0}},$p={0:{kZCmMZ:`x18gyask`,$$css:!0},1:{kZCmMZ:`x1vsv5vr`,$$css:!0},2:{kZCmMZ:`x12gdq22`,$$css:!0},3:{kZCmMZ:`x126nfab`,$$css:!0},4:{kZCmMZ:`x1rey3nv`,$$css:!0},5:{kZCmMZ:`x1blguxw`,$$css:!0},6:{kZCmMZ:`x31w388`,$$css:!0},8:{kZCmMZ:`x1j3hnjz`,$$css:!0},10:{kZCmMZ:`xqp078j`,$$css:!0},"0.5":{kZCmMZ:`x138rykx`,$$css:!0},"1.5":{kZCmMZ:`xfti1ec`,$$css:!0}},em={0:{kwRFfy:`x1s0aq8i`,$$css:!0},1:{kwRFfy:`x1nryj5t`,$$css:!0},2:{kwRFfy:`x1djylfy`,$$css:!0},3:{kwRFfy:`x1t818jl`,$$css:!0},4:{kwRFfy:`xnjyzlh`,$$css:!0},5:{kwRFfy:`xdbrk9v`,$$css:!0},6:{kwRFfy:`x1we12cn`,$$css:!0},8:{kwRFfy:`x1q91b2g`,$$css:!0},10:{kwRFfy:`x160ivqr`,$$css:!0},"0.5":{kwRFfy:`x1le3yxw`,$$css:!0},"1.5":{kwRFfy:`x17hk9do`,$$css:!0}},tm={0:{kLKAdn:`x1ydh6w3`,$$css:!0},1:{kLKAdn:`xfsso4q`,$$css:!0},2:{kLKAdn:`x1xye8es`,$$css:!0},3:{kLKAdn:`x1vlblms`,$$css:!0},4:{kLKAdn:`x1oa1p4a`,$$css:!0},5:{kLKAdn:`xx7rijo`,$$css:!0},6:{kLKAdn:`x1adxfkp`,$$css:!0},8:{kLKAdn:`xoxd1wu`,$$css:!0},10:{kLKAdn:`xk6660b`,$$css:!0},"0.5":{kLKAdn:`xbx876j`,$$css:!0},"1.5":{kLKAdn:`x1kwdpsa`,$$css:!0}},nm={0:{kGO01o:`x1l20ajd`,$$css:!0},1:{kGO01o:`xy143xn`,$$css:!0},2:{kGO01o:`x1wesfrj`,$$css:!0},3:{kGO01o:`xvmdzux`,$$css:!0},4:{kGO01o:`x1awphl8`,$$css:!0},5:{kGO01o:`x1hk98q`,$$css:!0},6:{kGO01o:`xjpqqx5`,$$css:!0},8:{kGO01o:`x2oz4g1`,$$css:!0},10:{kGO01o:`x2izi54`,$$css:!0},"0.5":{kGO01o:`xij103a`,$$css:!0},"1.5":{kGO01o:`x1opdxmq`,$$css:!0}},rm={reset:{"--container-padding-inline-start":`xrhngw9`,"--container-padding-inline-end":`xjsfl84`,"--container-padding-block-start":`x1047aw6`,"--container-padding-block-end":`xax9j7h`,"--layout-padding-outer-x":`xdt8ak2`,"--layout-padding-outer-y":`x1rs4lu4`,"--layout-padding-inner-x":`x1qfll2g`,"--layout-padding-inner-y":`xyvxpqs`,"--_section-padding-propagated":`x1f17rg1`,$$css:!0}},im=h(),am={keoZOQ:`x1vhfslr`,k1K539:`xlm3tn6`,$$css:!0},om={base:{keoZOQ:`xdj266r`,k1K539:`xat24cr`,keTefX:`x1lziwak`,k71WvV:`x14z9mp`,kLKAdn:`xexx8yu`,kGO01o:`x18d9i69`,kZCmMZ:`x1c1uobl`,kwRFfy:`xyri2b`,kMzoRj:`xc342km`,ksu8eU:`xng3xce`,kVQacm:`x1rea2x4`,kMv6JI:`x9ynric`,kGuDYH:`xjm74w1`,kLWn49:`xw6l6zx`,kWkggS:`xjbqb8w`,$$css:!0},fixed:{kVAEAm:`xixxii4`,$$css:!0},offsetBlock:e=>[am,{"--x-marginBlockStart":(e=>typeof e==`number`?e+`px`:e??void 0)(e),"--x-marginBlockEnd":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}],offsetInline:e=>[{keTefX:e==null?e:`x4lel18`,k71WvV:e==null?e:`x1c9tiao`,$$css:!0},{"--x-marginInlineStart":(e=>typeof e==`number`?e+`px`:e??void 0)(e),"--x-marginInlineEnd":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}]};function sm(e){return typeof e==`number`?`${e}px`:e}function cm(e,t){let n=e.ownerDocument.defaultView;if(!n)return{};let r=n.getComputedStyle(e),i=n.getComputedStyle(t);return{...r.direction!==i.direction&&{direction:r.direction},...r.writingMode!==i.writingMode&&{writingMode:r.writingMode}}}function lm(e=`above`,t=`center`){if(e===`above`||e===`below`){let n=e===`above`?`self-block-start`:`self-block-end`;return t===`start`?`${n} span-self-inline-end`:t===`end`?`${n} span-self-inline-start`:n}let n=e===`start`?`self-inline-start`:`self-inline-end`;return t===`start`?`${n} span-self-block-end`:t===`end`?`${n} span-self-block-start`:n}function um(e=`above`,t=`center`){let n=`flip-block, flip-inline, flip-block flip-inline`;if(t!==`center`)return n;if(e===`above`||e===`below`){let[t,r]=e===`above`?[`top`,`bottom`]:[`bottom`,`top`];return`${n}, ${t} span-left, ${t} span-right, ${r} span-left, ${r} span-right`}let[r,i]=e===`start`?[`left`,`right`]:[`right`,`left`];return`${n}, ${r} span-top, ${r} span-bottom, ${i} span-top, ${i} span-bottom`}function dm(e){let{mode:t,onShow:n,onHide:r,lightDismiss:i=!1}=e,a=t===`context`?e.lazyMount??!1:!1,o=(0,w.useId)(),s=`--astryx-layer-${o.replace(/:/g,``)}`,[c,l]=(0,w.useState)(!1),u=(0,w.useRef)(null),d=(0,w.useRef)(null),f=(0,w.useRef)(null),p=(0,w.useRef)(null),m=(0,w.useRef)(null),[h,g]=(0,w.useState)(null),_=(0,w.useRef)(!1),v=(0,w.useRef)(!1),y=(0,w.useRef)(null),b=(0,w.useRef)(null),x=(0,w.useCallback)(()=>{let e=zp();return y.current===e},[]),S=(0,w.useCallback)(e=>{typeof e.showPopover==`function`?e.showPopover({source:f.current??void 0}):e.style.display=`block`,d.current=e},[]),C=(0,w.useCallback)(e=>{if(t!==`context`)return!0;let n=m.current;if(n===null)return!1;let r=n.portalTarget??p.current?.parentElement??null;return e.parentElement===r},[t]),T=(0,w.useCallback)(()=>{if(t!==`context`)return;let e=p.current,n=e?.parentElement??null;if(!e||!n)return;let r=Hp(n),i={portalTarget:r,portalStyle:r?cm(e,r):{}};m.current=i,g(i)},[t]),E=(0,w.useCallback)(()=>{t!==`context`||!a||(m.current=null,g(null))},[t,a]),D=(0,w.useCallback)(()=>{if(x())return;let e=u.current,t=e&&C(e)?e:null;if(!t){_.current=!0,T();return}v.current||(S(t),v.current=!0,l(!0),n?.())},[n,T,S,C,x]),O=(0,w.useCallback)(()=>{if(_.current=!1,v.current){let e=u.current;d.current=null,v.current=!1,e&&(typeof e.hidePopover==`function`?e.hidePopover():e.style.display=`none`),l(!1),r?.()}E()},[r,E]),k=(0,w.useCallback)(e=>{f.current&&f.current!==e&&Mp(f.current,s),e&&jp(e,s),f.current=e},[s]),A=(0,w.useCallback)(e=>{if(b.current?.(),Bp())return;y.current=zp();let t=e.defaultView,n=null,r=()=>{y.current=null,e.removeEventListener(`click`,i,!0),n!==null&&(t?.clearTimeout(n),n=null),b.current===r&&(b.current=null)},i=()=>{e.removeEventListener(`click`,i,!0),t?n=t.setTimeout(()=>{n=null,b.current===r&&r()},0):r()};e.addEventListener(`click`,i,!0),b.current=r},[]);(0,w.useEffect)(()=>(zp(),()=>b.current?.()),[]);let j=(0,w.useCallback)(e=>{e.newState===`closed`&&v.current&&(d.current=null,v.current=!1,A(e.currentTarget?.ownerDocument??document),l(!1),r?.(),E())},[r,E,A]),M=(0,w.useRef)(null),N=(0,w.useRef)(null),P=(0,w.useCallback)((e,t)=>{M.current&&N.current&&(M.current!==e||N.current!==t)&&(M.current.removeEventListener(`toggle`,N.current),M.current=null,N.current=null),e&&M.current!==e&&(e.addEventListener(`toggle`,t),M.current=e,N.current=t)},[]),F=(0,w.useCallback)(e=>{u.current=e,P(e,j),e&&_.current?(_.current=!1,D()):e&&v.current&&d.current!==e&&C(e)&&S(e)},[j,P,D,S,C]),I=(0,w.useCallback)(e=>{p.current=e,e&&(!a||_.current||v.current)&&T()},[a,T]);(0,w.useEffect)(()=>(u.current&&P(u.current,j),()=>{M.current&&N.current&&(M.current.removeEventListener(`toggle`,N.current),M.current=null,N.current=null)}),[j,P]);let L=(0,w.useCallback)((e,t)=>{let n=(0,K.jsx)(`template`,{ref:I});if(h===null)return(0,K.jsx)(K.Fragment,{children:n});let{placement:r=`above`,alignment:a=`center`,positioning:c=`anchor`,offset:l,role:u,"aria-label":d,xstyle:f,className:p,style:m,as:g=`div`,onMouseEnter:_,onMouseLeave:v}=t||{},y=c===`custom`?{positionAnchor:s}:{positionAnchor:s,positionArea:lm(r,a),positionTryFallbacks:um(r,a)},b=c===`anchor`&&l?r===`above`||r===`below`?om.offsetBlock(sm(l)):om.offsetInline(sm(l)):null,x=X(om.base,rm.reset,b,f),S=p?`${p} ${x.className??``}`:x.className,C=(0,K.jsx)(g,{ref:F,id:o,role:u,"aria-label":d,popover:i?`auto`:`manual`,className:S,style:{...x.style,...y,...h.portalStyle,...m},onMouseEnter:_,onMouseLeave:v,children:e});return(0,K.jsxs)(K.Fragment,{children:[n,h.portalTarget?(0,im.createPortal)(C,h.portalTarget):C]})},[s,h,o,i,F,I]),R=(0,w.useCallback)((e,t)=>{let{x:n,y:r,xstyle:a,className:s,style:c}=t,l={top:r,left:n},u=X(om.base,rm.reset,om.fixed,a),d=s?`${s} ${u.className??``}`:u.className;return(0,K.jsx)(`div`,{ref:F,id:o,popover:i?`auto`:`manual`,className:d,style:{...u.style,...l,...c},children:e})},[F,o,i]),z=(0,w.useMemo)(()=>({ref:k,anchorId:s,show:D,hide:O,isOpen:c,wasJustDismissed:x,id:o,render:L}),[k,s,D,O,c,x,o,L]),B=(0,w.useMemo)(()=>({ref:void 0,show:D,hide:O,isOpen:c,wasJustDismissed:x,id:o,render:R}),[D,O,c,x,o,R]);return t===`context`?z:B}function fm(e){let t=dm(e);return(0,w.useMemo)(()=>{let{wasJustDismissed:e,...n}=t;return n},[t])}function pm(e){return dm(e)}var mm=`button:not([disabled]), a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), [contenteditable]:not([contenteditable="false"]), audio[controls], video[controls], iframe, details > summary:first-child`,hm=(0,w.createContext)(0);hm.displayName=`LayerDepthContext`;function gm(){return(0,w.use)(hm)}function _m({children:e}){let t=(0,w.use)(hm);return(0,K.jsx)(hm,{value:t+1,children:e})}_m.displayName=`LayerDepthProvider`;var vm=229;function ym(e){return e.isComposing===!0||e.keyCode===vm}var bm=[],xm=new WeakMap,Sm=0,Cm=!1;function wm(e){let t=xm.get(e);if(t!==void 0)return t;let n=Sm++;return xm.set(e,n),n}function Tm(e,t){if(e.depth!==t.depth)return e.depth-t.depth;let n=e.getContainer?.()??null,r=t.getContainer?.()??null;if(n!=null&&r!=null&&n!==r){if(r.contains(n))return 1;if(n.contains(r))return-1}return e.seq-t.seq}function Em(e){return e.isPresent?.()??!0}var Dm=!1;function Om(){return Dm}function km(){Dm=!0}function Am(){Dm=!1}function jm(){let e=null;for(let t of bm)Em(t)&&(e==null||Tm(t,e)>0)&&(e=t);return e}function Mm(e){return jm()?.token===e}function Nm(){let e=jm();return e!=null&&(e.behavior===`block`||e.dismiss(),!0)}function Pm(e){if(e.key===`Escape`){if(ym(e)){jm()!=null&&e.preventDefault();return}e.defaultPrevented||Nm()&&e.preventDefault()}}function Fm(){Cm||typeof document>`u`||(document.addEventListener(`keydown`,Pm),document.addEventListener(`compositionstart`,km,!0),document.addEventListener(`compositionend`,Am,!0),document.addEventListener(`blur`,Am,!0),Cm=!0)}function Im(){!Cm||typeof document>`u`||(document.removeEventListener(`keydown`,Pm),document.removeEventListener(`compositionstart`,km,!0),document.removeEventListener(`compositionend`,Am,!0),document.removeEventListener(`blur`,Am,!0),Dm=!1,Cm=!1)}function Lm(e){let t={...e,seq:wm(e.token)};return bm.push(t),Fm(),()=>{let e=bm.indexOf(t);e!==-1&&bm.splice(e,1),bm.length===0&&Im()}}function Rm(e){let{isActive:t,onDismiss:n,escapeBehavior:r=`close`,getContainer:i,isPresent:a,isEnabled:o=!0}=e,s=gm(),c=(0,w.useRef)({}),l=(0,w.useRef)(n),u=(0,w.useRef)(i),d=(0,w.useRef)(a);(0,w.useEffect)(()=>{l.current=n,u.current=i,d.current=a});let f=t&&o;return(0,w.useEffect)(()=>{if(f)return Lm({token:c.current,depth:s,behavior:r,getContainer:()=>u.current?.()??null,isPresent:()=>d.current?.()??!0,dismiss:()=>l.current()})},[f,s,r]),{shouldDismissOnCloseRequest:(0,w.useCallback)(()=>f&&!Om()&&Mm(c.current),[f])}}var zm=0;function Bm(e){if(e.hasAttribute(`inert`)||e.closest(`[inert]`)||e.hidden||e.closest(`[hidden]`)||e.closest(`[aria-hidden="true"]`))return!1;if(typeof window<`u`&&window.getComputedStyle){let t=window.getComputedStyle(e);if(t.visibility===`hidden`||t.display===`none`)return!1}return!0}function Vm(e){return Array.from(e.querySelectorAll(mm)).filter(Bm)}function Hm(e){try{e.focus()}catch{}return document.activeElement===e}function Um(e){let t=Vm(e);for(let e of t)if(Hm(e))return!0;return!1}function Wm(e){let t=Vm(e);for(let e=t.length-1;e>=0;e--)if(Hm(t[e]))return!0;return!1}function Gm(e){let{isActive:t,onEscape:n}=e,r=(0,w.useRef)(null),i=(0,w.useRef)(null),a=(0,w.useRef)(!1),o=t&&n!=null;Rm({isActive:o,onDismiss:()=>{n?.()},getContainer:()=>r.current}),(0,w.useEffect)(()=>{if(o)return zm+=1,()=>{--zm}},[o]);let s=(0,w.useCallback)(()=>{r.current&&Um(r.current)},[]);return(0,w.useEffect)(()=>{if(!t)return;let e=document.activeElement,n=r.current;return()=>{let t=document.activeElement;(t==null||t===document.body||t===document.documentElement||n!=null&&n.contains(t))&&e!=null&&e.isConnected&&typeof e.focus==`function`&&e.focus()}},[t]),(0,w.useEffect)(()=>{if(!t)return;let e=e=>{let t=r.current;if(!t)return;let n=e.target;if(t.contains(n))i.current=n;else if(a.current){let e=Um(t);e&&i.current===document.activeElement?Wm(t):!e&&i.current instanceof HTMLElement&&t.contains(i.current)&&Hm(i.current),i.current=document.activeElement}a.current=!1};return document.addEventListener(`focus`,e,!0),()=>{document.removeEventListener(`focus`,e,!0)}},[t]),(0,w.useEffect)(()=>{if(!t)return;let e=e=>{let t=r.current;if(t&&e.key===`Tab`){a.current=!0;let n=Vm(t);if(n.length===0){let n=document.activeElement;if(!(n instanceof HTMLElement)||!t.contains(n))return;e.preventDefault(),i.current=n,a.current=!1;return}let r=n[0],o=n[n.length-1];e.shiftKey?document.activeElement===r&&(e.preventDefault(),o.focus()):document.activeElement===o&&(e.preventDefault(),r.focus())}};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[t,n]),{containerRef:r,focusFirst:s}}var Km=`keyboard`,qm=!1;function Jm(){Km=`pointer`}function Ym(e){e.metaKey||e.altKey||e.ctrlKey||(Km=`keyboard`)}function Xm(){qm||typeof document>`u`||(qm=!0,document.addEventListener(`pointerdown`,Jm,{capture:!0,passive:!0}),document.addEventListener(`keydown`,Ym,{capture:!0,passive:!0}))}function Zm(){return Km}var Qm=new Set([`touch`,`pen`]),$m=new Set([`button`,`checkbox`,`combobox`,`link`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`searchbox`,`slider`,`spinbutton`,`switch`,`tab`,`textbox`]);function eh(e){let t=e.getAttribute(`role`);if(t!=null&&t!==``)return $m.has(t);switch(e.tagName){case`BUTTON`:case`INPUT`:case`LABEL`:case`SELECT`:case`SUMMARY`:case`TEXTAREA`:return!0;case`A`:case`AREA`:return e.hasAttribute(`href`);default:return th(e)}}function th(e){if(e.isContentEditable===!0)return!0;let t=e.getAttribute(`contenteditable`);return t!=null&&t!==`false`}function nh(e){let{touchTrigger:t,isEnabled:n,isControlled:r,isOpen:i,layerId:a,triggerRef:o,show:s,hide:c}=e,l=(0,w.useRef)(!1),u=(0,w.useRef)(i);u.current=i;let d=(0,w.useRef)(c);d.current=c;let f=(0,w.useRef)(a);f.current=a;let p=(0,w.useRef)(!1),m=(0,w.useRef)(null);(0,w.useEffect)(()=>{Xm()},[]);let h=(0,w.useCallback)(()=>{p.current=!1;let e=m.current;e!=null&&(m.current=null,document.removeEventListener(`pointerdown`,e,!0))},[]),g=(0,w.useCallback)(()=>{if(p.current=!0,m.current!=null)return;let e=e=>{let t=e.target;(t==null||o.current?.contains(t)!==!0&&document.getElementById(f.current)?.contains(t)!==!0)&&(h(),d.current())};m.current=e,document.addEventListener(`pointerdown`,e,!0)},[o,h]);(0,w.useEffect)(()=>h,[h]);let _=(0,w.useCallback)(()=>l.current&&Zm()===`pointer`,[]),v=(0,w.useCallback)(e=>{l.current=e.pointerType===`touch`},[]),y=(0,w.useCallback)(e=>{let i=Qm.has(e.pointerType);if(l.current=i,!i||r)return!1;let a=o.current;return(t===`auto`?a!=null&&eh(a)?`none`:`tap`:t)===`none`||!n||u.current||p.current?(h(),c(),!0):(g(),s(),!0)},[t,n,r,o,s,c,g,h]),b=(0,w.useRef)(i);return(0,w.useEffect)(()=>{b.current&&!i&&h(),b.current=i},[i,h]),{isTouchPointerRef:l,isTouchInteraction:_,handlePointerEnter:v,handlePointerDown:y,clearTapOpen:h}}Kp[`--duration-fast-max`],qp[`--ease-standard`];var rh={below:{kKVMdj:`xl1vlw0 x1aquc0h`,k44tkh:`x9uej1z`,kyAemX:`x128ha8g`,kWV6AL:`xskzprw`,$$css:!0},above:{kKVMdj:`x3psbcj x1aquc0h`,k44tkh:`x9uej1z`,kyAemX:`x128ha8g`,kWV6AL:`xskzprw`,$$css:!0},end:{kKVMdj:`x1i331go x1vxsm5i x1aquc0h`,k44tkh:`x9uej1z`,kyAemX:`x128ha8g`,kWV6AL:`xskzprw`,$$css:!0},start:{kKVMdj:`xck01x9 x18lne9g x1aquc0h`,k44tkh:`x9uej1z`,kyAemX:`x128ha8g`,kWV6AL:`xskzprw`,$$css:!0}},ih=`astryx`,ah=ih,oh=ih,sh=ih;function ch(e){return`${ah}-${e}`}function lh(e){return`data-${oh}-${e}`}function uh(e){return`--${sh}-${e}`}function dh(e){return`data-${e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase()}`}function fh(e,t){return/^\d/.test(t)?`${e}-${t}`:t}function ph(e,t){let n=[ch(e)];if(t)for(let[e,r]of Object.entries(t))r!=null&&n.push(fh(e,String(r)));return n.join(` `)}function mh(e){let t={};if(e)for(let[n,r]of Object.entries(e))r!=null&&(t[dh(n)]=String(r));return t}function hh(e,t,n){let r=ph(e,t),i=n?.legacyNames?.map(e=>ch(e))??[];return{className:i.length>0?[r,...i].join(` `):r,...mh(t)}}var gh=100,_h={container:{kWkggS:`x19aspcf`,kMwMTN:`xrkvqaz`,kaIpWk:`x1hviunn`,kMv6JI:`x9ynric`,kGuDYH:`xjm74w1`,kLWn49:`xw6l6zx`,$$css:!0}};function vh(e){return e.hasAttribute(`tabindex`)?e.tabIndex>=0:[`A`,`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`].includes(e.tagName)?!e.disabled:!!e.isContentEditable}function yh(e={}){let{placement:t=`above`,alignment:n=`center`,delay:r=200,hideDelay:i=0,focusTrigger:a=`auto`,touchTrigger:o=`auto`,isEnabled:s=!0,isOpen:c,isDefaultOpen:l=!1,onShow:u,onHide:d}=e,f=fm({mode:`context`,onShow:u,onHide:d}),p=_h.container,m=(0,w.useRef)(null),h=(0,w.useRef)(null),g=(0,w.useRef)(null),_=(0,w.useCallback)(()=>{m.current&&=(clearTimeout(m.current),null),h.current&&=(clearTimeout(h.current),null)},[]),v=(0,w.useCallback)(()=>{_(),f.show()},[_,f]),y=(0,w.useCallback)(()=>{_(),f.hide()},[_,f]),b=nh({touchTrigger:o,isEnabled:s,isControlled:c!==void 0,isOpen:f.isOpen,layerId:f.id,triggerRef:g,show:v,hide:y}),x=(0,w.useCallback)(()=>{!s||c===!1||(_(),m.current=setTimeout(()=>{f.show()},r))},[s,c,_,f,r]),S=(0,w.useCallback)(()=>{c!==!0&&(_(),h.current=setTimeout(()=>{f.hide()},i>0?i:gh))},[c,_,f,i]),C=(0,w.useCallback)(()=>{h.current&&=(clearTimeout(h.current),null)},[]),T=(0,w.useCallback)(()=>{b.isTouchPointerRef.current||x()},[b,x]),E=(0,w.useCallback)(()=>{b.isTouchPointerRef.current||S()},[b,S]),D=(0,w.useCallback)(e=>{s&&(b.isTouchInteraction()||e.target.matches(`:focus-visible`)&&(_(),f.show()))},[s,b,_,f]),O=(0,w.useCallback)(()=>{S()},[S]),k=(0,w.useCallback)(e=>{b.handlePointerDown(e)||c===void 0&&(_(),f.hide())},[b,c,_,f]),{handlePointerEnter:A,clearTapOpen:j}=b,M=(0,w.useCallback)(e=>{g.current&&(g.current.removeEventListener(`mouseenter`,T),g.current.removeEventListener(`mouseleave`,E),g.current.removeEventListener(`focusin`,D),g.current.removeEventListener(`focusout`,O),g.current.removeEventListener(`pointerenter`,A),g.current.removeEventListener(`pointerdown`,k)),e&&(e.addEventListener(`pointerenter`,A),e.addEventListener(`mouseenter`,T),e.addEventListener(`mouseleave`,E),e.addEventListener(`pointerdown`,k),(a===`always`||a===`auto`&&vh(e))&&(e.addEventListener(`focusin`,D),e.addEventListener(`focusout`,O))),g.current=e},[a,T,E,D,O,A,k]),N=(0,w.useCallback)(e=>{f.ref(e),M(e)},[f,M]);(0,w.useEffect)(()=>()=>{_()},[_]),(0,w.useEffect)(()=>{l&&f.show()},[]),(0,w.useEffect)(()=>{c!==void 0&&(c?(_(),f.show()):(_(),f.hide()))},[c,_,f]),Rm({isActive:!0,isPresent:()=>{let e=typeof document>`u`?null:document.getElementById(f.id);if(e==null)return!1;try{return e.matches(`:popover-open`)}catch{return f.isOpen}},onDismiss:()=>{if(_(),j(),c!==void 0){d?.();return}f.hide()}});let P=(0,w.useCallback)((e,r)=>{let i=r?.placement??t,a={placement:i,alignment:r?.alignment??n,offset:Wp[`--spacing-1`],role:`tooltip`,xstyle:[p,rh[i]],className:hh(`tooltip`).className,onMouseEnter:C,onMouseLeave:S};return f.render((0,K.jsx)(`div`,{className:`xfsso4q xy143xn x12gdq22 x1djylfy xw5ewwj x13faqbe`,children:e}),a)},[f,t,n,p,C,S]);return{ref:N,positionRef:f.ref,interactionRef:M,anchorId:f.anchorId,describedBy:f.id,renderTooltip:P}}var bh={primary:{kMwMTN:`x1tgivj0`,$$css:!0},secondary:{kMwMTN:`xv1l7n4`,$$css:!0},disabled:{kMwMTN:`xnbbluu`,$$css:!0},placeholder:{kMwMTN:`xv1l7n4`,$$css:!0},accent:{kMwMTN:`xjse4m1`,$$css:!0},inherit:{kMwMTN:`x1heor9g`,$$css:!0}},xh={normal:{k63SB2:`x1sodnla`,$$css:!0},medium:{k63SB2:`x1e4wzip`,$$css:!0},semibold:{k63SB2:`x2mo6ok`,$$css:!0},bold:{k63SB2:`x1lvx875`,$$css:!0}},Sh={body:{k63SB2:`xxovm9e`,$$css:!0},large:{k63SB2:`x149oux8`,$$css:!0},label:{k63SB2:`xmhvcl5`,$$css:!0},code:{k63SB2:`xx3eeay`,$$css:!0},supporting:{k63SB2:`xv8on6e`,$$css:!0},"display-1":{k63SB2:`x1txul5o`,$$css:!0},"display-2":{k63SB2:`x1y36c3f`,$$css:!0},"display-3":{k63SB2:`x1on40hk`,$$css:!0},inherit:{k63SB2:`x1pd3egz`,$$css:!0}},Ch={body:{kGuDYH:`xjm74w1`,kLWn49:`xw6l6zx`,$$css:!0},large:{kGuDYH:`x18juvz8`,kLWn49:`xf74fhv`,$$css:!0},label:{kGuDYH:`xcr08ib`,kLWn49:`x1kq96og`,$$css:!0},code:{kGuDYH:`xp03k98`,kLWn49:`x17iicif`,kMv6JI:`x9m5x89`,$$css:!0},supporting:{kGuDYH:`x141an7d`,kLWn49:`x1ltkj2j`,$$css:!0},"display-1":{kGuDYH:`xsub3ws`,kLWn49:`x112ttwr`,$$css:!0},"display-2":{kGuDYH:`x1yego12`,kLWn49:`xh0iwvy`,$$css:!0},"display-3":{kGuDYH:`xlgnzhf`,kLWn49:`x1ujwuaq`,$$css:!0},inherit:{kGuDYH:`x1qlqyl8`,kLWn49:`x15bjb6t`,$$css:!0}},wh={"4xs":{kGuDYH:`xxc45ev`,$$css:!0},"3xs":{kGuDYH:`x10p7juq`,$$css:!0},"2xs":{kGuDYH:`x16a80zy`,$$css:!0},xsm:{kGuDYH:`x51wmvv`,$$css:!0},sm:{kGuDYH:`x1eqnyfr`,$$css:!0},base:{kGuDYH:`x1j29vfg`,$$css:!0},lg:{kGuDYH:`xc7cgfe`,$$css:!0},xl:{kGuDYH:`x1wqms48`,$$css:!0},"2xl":{kGuDYH:`xhs0kqb`,$$css:!0},"3xl":{kGuDYH:`x10srzze`,$$css:!0},"4xl":{kGuDYH:`xqcvi3d`,$$css:!0}},Th={inline:{k1xSpc:`xt0psk2`,$$css:!0},block:{k1xSpc:`x1lliihq`,$$css:!0}},Eh={singleLine:{kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,k1xSpc:`x1lliihq`,$$css:!0},multiLine:{kVQacm:`xb3r6kr`,k1xSpc:`x104kibb`,kgKLqz:`x1ua5tub`,$$css:!0}},Dh={"break-word":{kTgw9:`x1lldw8n`,kHjlTd:`x1mzt3pk`,$$css:!0},"break-all":{kTgw9:`x1yn0g08`,$$css:!0}},Oh={wrap:{kN2L0X:`xk4td0m`,$$css:!0},nowrap:{kN2L0X:`xebhuq6`,$$css:!0},balance:{kN2L0X:`x1w2vvpw`,$$css:!0},pretty:{kN2L0X:`x1fzhlzt`,$$css:!0}},kh={enabled:{kxwWH2:`x1b2iylo`,kzeHkT:`xwgcxoh`,k1xSpc:`x1lliihq`,$$css:!0}},Ah={strikethrough:{kybGjl:`xmqliwb`,$$css:!0}},jh={enabled:{kcqcaj:`xss6m8b`,$$css:!0}},Mh={start:{k9WMMc:`x1yc453h`,$$css:!0},center:{k9WMMc:`x2b8uid`,$$css:!0},end:{k9WMMc:`xp4054r`,$$css:!0}},Nh={content:{ks0D6T:`xw5ewwj`,kTgw9:`x13faqbe`,$$css:!0}},Ph=null,Fh=new Map;function Ih(){return typeof ResizeObserver>`u`?null:(Ph||=new ResizeObserver(e=>{for(let t of e){let e=Fh.get(t.target);e&&e(t)}}),Ph)}function Lh(e,t){Fh.set(e,t),Ih()?.observe(e),t({target:e})}function Rh(e){Fh.delete(e),Ph&&(Ph.unobserve(e),Fh.size===0&&(Ph.disconnect(),Ph=null))}function zh(e){let{maxLines:t}=e,[n,r]=(0,w.useState)(!1),[i,a]=(0,w.useState)(``),o=(0,w.useRef)(null),s=(0,w.useCallback)(e=>{if(t===0){r(!1);return}if(a(e.textContent??``),t===1)r(e.scrollWidth>e.offsetWidth);else{let t=e.scrollHeight;try{let n=document.createRange();n.selectNodeContents(e),t=n.getBoundingClientRect().height,n.detach()}catch{}r(t>e.offsetHeight)}},[t]);return{ref:(0,w.useCallback)(e=>{o.current&&Rh(o.current),o.current=e,e&&t>0?typeof ResizeObserver<`u`?Lh(e,()=>{s(e)}):s(e):(r(!1),a(``))},[t,s]),isTruncated:n,fullText:i}}function Bh(e){return e===`base`?``:e.split(`+`).map(e=>{let[t,n]=e.split(`:`);return n===void 0?`.${t}`:/^\d/.test(n)?`.${t}-${n}`:`.${n}`}).join(``)}function Vh(e,t){let n={...e,...t},r=[e.className,t.className].filter(Boolean).join(` `);r?n.className=r:delete n.className;let i=t.style&&e.style?{...e.style,...t.style}:t.style||e.style;return i?n.style=i:delete n.style,n}function Hh(e,t,n,r){if(typeof e==`string`){let i=e,a=t??{className:``},o=n,s=a.className?`${i} ${a.className}`:i;o&&(s=`${s} ${o}`);let c=r&&a.style?{...a.style,...r}:r||a.style;return{...a,className:s,style:c}}let i=Vh(e,typeof t==`string`?{className:t}:t??{});return typeof n==`string`?i=Vh(i,{className:n}):n!=null&&(i=Vh(i,{style:n})),r!=null&&(i=Vh(i,{style:r})),i}function Uh(...e){return t=>{let n=[];for(let r of e)if(typeof r==`function`){let e=r(t);n.push(typeof e==`function`?e:()=>r(null))}else if(r!=null){let e=r;e.current=t,n.push(()=>{e.current=null})}if(t!=null&&n.length>0)return()=>{for(let e of n)e()}}}function Wh(...e){return t=>{for(let n of e)if(n?.(t),t.defaultPrevented)return}}function Gh(e){return e!=null&&typeof e!=`boolean`&&e!==``}function Kh(...e){let t=e.flatMap(e=>typeof e==`string`?e.trim().split(/\s+/):[]).filter(Boolean);if(t.length!==0)return Array.from(new Set(t)).join(` `)}function qh(e,t=[],n){return{ariaLabelledBy:n?Kh(n.labelID,e):void 0,ariaDescribedBy:Kh(n?.describedByIDs,...t)}}var Jh={kbCHJM:`x1nrll8i`,k3aq6I:`xsqj5wx`,$$css:!0},Yh={mirror:{k3aq6I:`xgtlewx`,$$css:!0},centerInline:e=>[Jh,{"--x-transform":`translate(-50%, ${e})`==null?void 0:`translate(-50%, ${e})`}]},Xh=Gp[`--focus-outline-width`],Zh=Gp[`--focus-outline-style`],Qh=Gp[`--focus-outline-color`];Gp[`--focus-outline-offset`],`${Xh}${Zh}${Qh}`;var $h={focusVisible:{kMeerF:`x1k57tk5 x1vidyx5`,k3XXqK:`x1t137rt x1jhp3zv`,kjBf7l:`xx47ajj`,kInvED:`x1wfwxd8 x1vwwbsn`,$$css:!0},focusWithin:{kMeerF:`x1k57tk5 x11j6mr8`,k3XXqK:`x1t137rt xciu248`,kjBf7l:`x1uy843r`,kInvED:`x1wfwxd8 x1jumodi`,$$css:!0},focusWithinFirstChild:{kMeerF:`x1k57tk5 xmmisi4`,k3XXqK:`x1t137rt xfd04fr`,kjBf7l:`xobxmqy`,kInvED:`x1wfwxd8 x2vr5qc`,$$css:!0},suppressed:{kMeerF:`x1k57tk5`,k3XXqK:`x1t137rt`,kInvED:`x1wfwxd8`,$$css:!0},publishFocusVisibleVars:{"--_focus-outline":`x17wzz1v xqih627`,"--_focus-outline-offset":`xgzxwq1 xqchwus`,$$css:!0},focusWithinOrPublished:{kI3sdo:`xaw4jrz x16s19ga`,kInvED:`x1kvmbwa x1jumodi`,$$css:!0}};function eg(e){return(...t)=>X(e,...t)}var tg={focusVisible:eg($h.focusVisible),focusWithin:eg($h.focusWithin),focusWithinFirstChild:eg($h.focusWithinFirstChild),suppressed:eg($h.suppressed),publishFocusVisibleVars:eg($h.publishFocusVisibleVars),focusWithinOrPublished:eg($h.focusWithinOrPublished)};function ng(e,t,n,r,i,a){return(0,w.useMemo)(()=>Uh(e,t,n,r,i,a),[e,t,n,r,i,a])}var rg=`modulepreload`,ig=function(e){return`/`+e},ag={},og=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=ig(t,n),t=s(t),t in ag)return;ag[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:rg,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},sg=(0,w.lazy)(async()=>og(()=>Promise.resolve().then(()=>wb).then(e=>({default:e.Tooltip})),void 0)),cg={body:`primary`,large:`primary`,label:`primary`,supporting:`secondary`,code:`primary`,"display-1":`primary`,"display-2":`primary`,"display-3":`primary`,inherit:`inherit`};function lg(e){return e in Ch?e:`body`}function ug(e){return e in bh?e:`primary`}function dg({type:e=`body`,size:t,color:n,weight:r,display:i=`inline`,maxLines:a=0,hasTruncateTooltip:o=!0,wordBreak:s,textWrap:c,justify:l=`start`,hasCapsize:u=!1,hasStrikethrough:d=!1,hasTabularNumbers:f=!1,xstyle:p,className:m,style:h,as:g=`span`,children:_,ref:v,...y}){let b=n??cg[e]??`primary`,x=lg(e),S=ug(b),C=s??(a===1?`break-all`:`break-word`),T=a>0||u?`block`:i,E=zh({maxLines:a}),D=typeof o==`string`?o:`above`,O=a>0&&o!==!1&&E.isTruncated,k=(0,w.useRef)(null),A=ng(v,E.ref,k),j=a>1?{WebkitLineClamp:a}:void 0;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(g,{ref:A,...Hh(hh(`text`,{type:e,size:t,color:b}),X(bh[S],Ch[x],t&&wh[t],Sh[x],r&&xh[r],a===1?Eh.singleLine:a>1?Eh.multiLine:Th[T],a>0&&Dh[C],c&&Oh[c],l!==`start`&&Mh[l],u&&kh.enabled,d&&Ah.strikethrough,f&&jh.enabled,p),m,{...h,...j}),...y,children:_}),O&&(0,K.jsx)(w.Suspense,{fallback:null,children:(0,K.jsx)(sg,{anchorRef:k,content:(0,K.jsx)(`span`,{...X(Nh.content),children:E.fullText}),placement:D})})]})}dg.displayName=`Text`;var fg=.375,pg={sm:{diameter:10,border:2},md:{diameter:14,border:3},lg:{diameter:18,border:3},xl:{diameter:28,border:4}},mg=[`--_spinner-ring-diameter`,`--_spinner-ring-stroke`],hg=`--_spinner-box-size`;function gg(){if(!(typeof CSS>`u`||typeof CSS.registerProperty!=`function`))for(let e of mg)try{CSS.registerProperty({name:e,syntax:``,inherits:!0,initialValue:`0px`})}catch{}}gg();var _g=new Set,vg=!1;function yg(){vg=!1;let e=[];for(let t of _g)e.push(...t.getAnimations());_g.clear();for(let t of e)t.startTime=0}function bg(e){if(e!=null&&typeof e.getAnimations==`function`)return _g.add(e),vg||(vg=!0,requestAnimationFrame(yg)),()=>{_g.delete(e)}}var xg={wrapper:{k1xSpc:`x3nfvp2`,kXwgrk:`xdt5ytf`,kGNEyG:`x6s0dn4`,kOIVth:`x1txdalj`,$$css:!0},spinner:{k1xSpc:`xwz0xwf`,kgQiWS:`x1ku5rj1`,kVQacm:`xb3r6kr`,kXLuUW:`xxymvpz`,"--_spinner-ring-diameter":`x2lq4xu`,"--_spinner-ring-stroke":`x10qssua`,"--_spinner-box-size":`x69vvuq`,$$css:!0},circle:{kDwRjp:`xbh8q5q`,kU5bRw:`x1owpc8m`,kPFa82:`xio8zfp`,kfJifR:`xgw3ha0`,$$css:!0},track:{kjVXCG:`xalkhop`,$$css:!0}},Sg={sm:{"--spinner-diameter":`x11wm0hx`,"--spinner-stroke-width":`xls98ul`,$$css:!0},md:{"--spinner-diameter":`x15pu9g6`,"--spinner-stroke-width":`xr0wkrm`,$$css:!0},lg:{"--spinner-diameter":`x1w424tr`,"--spinner-stroke-width":`xr0wkrm`,$$css:!0},xl:{"--spinner-diameter":`x1orj1z9`,"--spinner-stroke-width":`x7y2bof`,$$css:!0}},Cg={default:{"--spinner-color":`xt1b8mc`,"--spinner-track-color":`xspt9s2`,$$css:!0},subtle:{"--spinner-color":`x1jevo6s`,"--spinner-track-color":`xspt9s2`,$$css:!0},onMedia:{"--spinner-color":`x13u6jys`,"--spinner-track-color":`x1ufpcf6`,$$css:!0},inherit:{"--spinner-color":`x1uzk0gl`,"--spinner-track-color":`xbfzqbu`,$$css:!0}},wg={default:{kDd8S0:`x1g350g8`,$$css:!0},subtle:{kDd8S0:`x1g350g8`,$$css:!0},onMedia:{kDd8S0:`x1smxkh6`,$$css:!0},inherit:{kDd8S0:`x7bo2k`,$$css:!0}};function Tg({size:e=`md`,shade:t=`default`,label:n,xstyle:r,className:i,style:a,"aria-label":o,"data-testid":s,ref:c,...l}){let{border:u,diameter:d}=pg[e],f=d+u*2,p=f/2,m=Math.PI*d,h=m*fg,g=n!=null,_=(0,w.useId)(),v=g&&typeof n==`string`&&o==null,y=(0,K.jsx)(`span`,{ref:g?void 0:c,role:`status`,"aria-label":v?void 0:o??(typeof n==`string`?n:void 0)??`Loading`,"aria-labelledby":v?_:void 0,"data-testid":g?void 0:s,...g?{}:l,...Hh(g?``:hh(`spinner`,{size:e,shade:t}),X(xg.spinner,!g&&Sg[e],!g&&Cg[t],!g&&r),g?void 0:i,{...g?{}:a,width:`var(${hg}, ${f}px)`,height:`var(${hg}, ${f}px)`}),children:(0,K.jsxs)(`svg`,{ref:bg,width:f,height:f,viewBox:`0 0 ${f} ${f}`,"aria-hidden":`true`,className:`xlp1x4z x1lliihq x1so62im x1rea2x4 x14qxm4i xnh0sag xa4qsjk x1ka1v4i x1esw782`,children:[(0,K.jsx)(`circle`,{cx:p,cy:p,r:d/2,strokeWidth:u,...X(xg.circle,xg.track,wg[t])}),(0,K.jsx)(`circle`,{cx:p,cy:p,r:d/2,strokeWidth:u,strokeDasharray:`${h} ${m-h}`,transform:`rotate(-90 ${p} ${p})`,className:`xbh8q5q x1owpc8m xio8zfp xgw3ha0 xtve3lm x1vy8frr`})]})});return g?(0,K.jsxs)(`div`,{ref:c,"data-testid":s,...l,...Hh(hh(`spinner`,{size:e,shade:t}),X(xg.wrapper,Sg[e],Cg[t],r),i,a),children:[y,typeof n==`string`?(0,K.jsx)(dg,{id:_,type:`body`,weight:`bold`,children:n}):n]}):y}Tg.displayName=`Spinner`;function Eg({children:e,as:t=`span`,ref:n,...r}){return(0,w.createElement)(t,{ref:n,...r,className:`x10l6tqk x1i1rx1s xjm9jq1 xkdpibf x1717udv xb3r6kr xzpqnlu xuxw1ft xng3xce x13vifvy x1o0tod x47corl x87ps6o`},e)}Eg.displayName=`VisuallyHidden`;var Dg=`data-astryx-edge-comp`,Og={keTefX:`x1kftj4p`,k71WvV:`x92e2el`,$$css:!0},kg={inset:e=>[Og,{"--x-126w13d":(e=>typeof e==`number`?e+`px`:e??void 0)(`calc(-1 * ${e})`),"--x-4drmnv":(e=>typeof e==`number`?e+`px`:e??void 0)(`calc(-1 * ${e})`)}]},Ag=(0,w.createContext)(null);Ag.displayName=`SizeContext`;function jg(e,t=`md`){let n=(0,w.use)(Ag);return e??n??t}Ag.Provider;var Mg=(0,w.createContext)(null);Mg.displayName=`ButtonGroupContext`;function Ng(){return(0,w.use)(Mg)}var Pg=(0,w.createContext)(null);Pg.displayName=`LinkContext`;function Fg(e){function t({href:t,ref:n,...r}){return(0,w.createElement)(e,{ref:n,href:t,to:t,...r})}return t.displayName=`LinkWithTo(${typeof e==`string`?e:e.displayName||e.name||`Component`})`,t}function Ig(e){let t=(0,w.use)(Pg),n=e??t?.component??`a`;return(0,w.useMemo)(()=>n===`a`?`a`:Fg(n),[n])}`${Up[`--color-overlay-hover`]}${Up[`--color-overlay-hover`]}`,`${Up[`--color-overlay-pressed`]}${Up[`--color-overlay-pressed`]}`,`${Up[`--color-neutral`]}${Up[`--color-neutral`]}`;var Lg={backgroundColor:{kWkggS:`xjbqb8w x1anq1lc xoevpu5 xprvw0a`,$$css:!0},backgroundImage:{kKwaWg:`x7uyq82 xmvprkv xetgvay`,$$css:!0},backgroundImageOnNeutral:{kKwaWg:`x14bno8m xzmimnh x1otsd3y xo3fi6e`,$$css:!0}};function Rg(e,t){let n=t&&t.cache?t.cache:Jg,r=t&&t.serializer?t.serializer:Kg;return(t&&t.strategy?t.strategy:Ug)(e,{cache:n,serializer:r})}function zg(e){return e==null||typeof e==`number`||typeof e==`boolean`}function Bg(e,t,n,r){let i=zg(r)?r:n(r),a=t.get(i);return a===void 0&&(a=e.call(this,r),t.set(i,a)),a}function Vg(e,t,n){let r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return a===void 0&&(a=e.apply(this,r),t.set(i,a)),a}function Hg(e,t,n,r,i){return n.bind(t,e,r,i)}function Ug(e,t){let n=e.length===1?Bg:Vg;return Hg(e,this,n,t.cache.create(),t.serializer)}function Wg(e,t){return Hg(e,this,Vg,t.cache.create(),t.serializer)}function Gg(e,t){return Hg(e,this,Bg,t.cache.create(),t.serializer)}var Kg=function(){return JSON.stringify(arguments)},qg=class{constructor(){this.cache=Object.create(null)}get(e){return this.cache[e]}set(e,t){this.cache[e]=t}},Jg={create:function(){return new qg}},Yg={variadic:Wg,monadic:Gg},Xg=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Zg(e){let t={};return e.replace(Xg,e=>{let n=e.length;switch(e[0]){case`G`:t.era=n===4?`long`:n===5?`narrow`:`short`;break;case`y`:t.year=n===2?`2-digit`:`numeric`;break;case`Y`:case`u`:case`U`:case`r`:throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case`q`:case`Q`:throw RangeError("`q/Q` (quarter) patterns are not supported");case`M`:case`L`:t.month=[`numeric`,`2-digit`,`short`,`long`,`narrow`][n-1];break;case`w`:case`W`:throw RangeError("`w/W` (week) patterns are not supported");case`d`:t.day=[`numeric`,`2-digit`][n-1];break;case`D`:case`F`:case`g`:throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case`E`:t.weekday=n===4?`long`:n===5?`narrow`:`short`;break;case`e`:if(n<4)throw RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-3];break;case`c`:if(n<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-3];break;case`a`:t.hour12=!0;break;case`b`:case`B`:throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case`h`:t.hourCycle=`h12`,t.hour=[`numeric`,`2-digit`][n-1];break;case`H`:t.hourCycle=`h23`,t.hour=[`numeric`,`2-digit`][n-1];break;case`K`:t.hourCycle=`h11`,t.hour=[`numeric`,`2-digit`][n-1];break;case`k`:t.hourCycle=`h24`,t.hour=[`numeric`,`2-digit`][n-1];break;case`j`:case`J`:case`C`:throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case`m`:t.minute=[`numeric`,`2-digit`][n-1];break;case`s`:t.second=[`numeric`,`2-digit`][n-1];break;case`S`:case`A`:throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case`z`:t.timeZoneName=n<4?`short`:`long`;break;case`Z`:case`O`:case`v`:case`V`:case`X`:case`x`:throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return``}),t}var Qg=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function $g(e){if(e.length===0)throw Error(`Number skeleton cannot be empty`);let t=e.split(Qg).filter(e=>e.length>0),n=[];for(let e of t){let t=e.split(`/`);if(t.length===0)throw Error(`Invalid number skeleton`);let[r,...i]=t;for(let e of i)if(e.length===0)throw Error(`Invalid number skeleton`);n.push({stem:r,options:i})}return n}function e_(e){return e.replace(/^(.*?)-/,``)}var t_=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,n_=/^(@+)?(\+|#+)?[rs]?$/g,r_=/(\*)(0+)|(#+)(0+)|(0+)/g,i_=/^(0+)$/;function a_(e){let t={};return e[e.length-1]===`r`?t.roundingPriority=`morePrecision`:e[e.length-1]===`s`&&(t.roundingPriority=`lessPrecision`),e.replace(n_,function(e,n,r){return typeof r==`string`?r===`+`?t.minimumSignificantDigits=n.length:n[0]===`#`?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof r==`string`?r.length:0)):(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length),``}),t}function o_(e){switch(e){case`sign-auto`:return{signDisplay:`auto`};case`sign-accounting`:case`()`:return{currencySign:`accounting`};case`sign-always`:case`+!`:return{signDisplay:`always`};case`sign-accounting-always`:case`()!`:return{signDisplay:`always`,currencySign:`accounting`};case`sign-except-zero`:case`+?`:return{signDisplay:`exceptZero`};case`sign-accounting-except-zero`:case`()?`:return{signDisplay:`exceptZero`,currencySign:`accounting`};case`sign-never`:case`+_`:return{signDisplay:`never`}}}function s_(e){let t;if(e[0]===`E`&&e[1]===`E`?(t={notation:`engineering`},e=e.slice(2)):e[0]===`E`&&(t={notation:`scientific`},e=e.slice(1)),t){let n=e.slice(0,2);if(n===`+!`?(t.signDisplay=`always`,e=e.slice(2)):n===`+?`&&(t.signDisplay=`exceptZero`,e=e.slice(2)),!i_.test(e))throw Error(`Malformed concise eng/scientific notation`);t.minimumIntegerDigits=e.length}return t}function c_(e){return o_(e)||{}}function l_(e){let t={};for(let n of e){switch(n.stem){case`percent`:case`%`:t.style=`percent`;continue;case`%x100`:t.style=`percent`,t.scale=100;continue;case`currency`:t.style=`currency`,t.currency=n.options[0];continue;case`group-off`:case`,_`:t.useGrouping=!1;continue;case`precision-integer`:case`.`:t.maximumFractionDigits=0;continue;case`measure-unit`:case`unit`:t.style=`unit`,t.unit=e_(n.options[0]);continue;case`compact-short`:case`K`:t.notation=`compact`,t.compactDisplay=`short`;continue;case`compact-long`:case`KK`:t.notation=`compact`,t.compactDisplay=`long`;continue;case`scientific`:t={...t,notation:`scientific`,...n.options.reduce((e,t)=>({...e,...c_(t)}),{})};continue;case`engineering`:t={...t,notation:`engineering`,...n.options.reduce((e,t)=>({...e,...c_(t)}),{})};continue;case`notation-simple`:t.notation=`standard`;continue;case`unit-width-narrow`:t.currencyDisplay=`narrowSymbol`,t.unitDisplay=`narrow`;continue;case`unit-width-short`:t.currencyDisplay=`code`,t.unitDisplay=`short`;continue;case`unit-width-full-name`:t.currencyDisplay=`name`,t.unitDisplay=`long`;continue;case`unit-width-iso-code`:t.currencyDisplay=`symbol`;continue;case`scale`:t.scale=parseFloat(n.options[0]);continue;case`rounding-mode-floor`:t.roundingMode=`floor`;continue;case`rounding-mode-ceiling`:t.roundingMode=`ceil`;continue;case`rounding-mode-down`:t.roundingMode=`trunc`;continue;case`rounding-mode-up`:t.roundingMode=`expand`;continue;case`rounding-mode-half-even`:t.roundingMode=`halfEven`;continue;case`rounding-mode-half-down`:t.roundingMode=`halfTrunc`;continue;case`rounding-mode-half-up`:t.roundingMode=`halfExpand`;continue;case`integer-width`:if(n.options.length>1)throw RangeError(`integer-width stems only accept a single optional option`);n.options[0].replace(r_,function(e,n,r,i,a,o){if(n)t.minimumIntegerDigits=r.length;else if(i&&a)throw Error(`We currently do not support maximum integer digits`);else if(o)throw Error(`We currently do not support exact integer digits`);return``});continue}if(i_.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(t_.test(n.stem)){if(n.options.length>1)throw RangeError(`Fraction-precision stems only accept a single optional option`);n.stem.replace(t_,function(e,n,r,i,a,o){return r===`*`?t.minimumFractionDigits=n.length:i&&i[0]===`#`?t.maximumFractionDigits=i.length:a&&o?(t.minimumFractionDigits=a.length,t.maximumFractionDigits=a.length+o.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),``});let e=n.options[0];e===`w`?t={...t,trailingZeroDisplay:`stripIfInteger`}:e&&(t={...t,...a_(e)});continue}if(n_.test(n.stem)){t={...t,...a_(n.stem)};continue}let e=o_(n.stem);e&&(t={...t,...e});let r=s_(n.stem);r&&(t={...t,...r})}return t}var u_=function(e){return e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]=`EXPECT_ARGUMENT_CLOSING_BRACE`,e[e.EMPTY_ARGUMENT=2]=`EMPTY_ARGUMENT`,e[e.MALFORMED_ARGUMENT=3]=`MALFORMED_ARGUMENT`,e[e.EXPECT_ARGUMENT_TYPE=4]=`EXPECT_ARGUMENT_TYPE`,e[e.INVALID_ARGUMENT_TYPE=5]=`INVALID_ARGUMENT_TYPE`,e[e.EXPECT_ARGUMENT_STYLE=6]=`EXPECT_ARGUMENT_STYLE`,e[e.INVALID_NUMBER_SKELETON=7]=`INVALID_NUMBER_SKELETON`,e[e.INVALID_DATE_TIME_SKELETON=8]=`INVALID_DATE_TIME_SKELETON`,e[e.EXPECT_NUMBER_SKELETON=9]=`EXPECT_NUMBER_SKELETON`,e[e.EXPECT_DATE_TIME_SKELETON=10]=`EXPECT_DATE_TIME_SKELETON`,e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]=`UNCLOSED_QUOTE_IN_ARGUMENT_STYLE`,e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]=`EXPECT_SELECT_ARGUMENT_OPTIONS`,e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]=`EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]=`INVALID_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]=`EXPECT_SELECT_ARGUMENT_SELECTOR`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]=`EXPECT_PLURAL_ARGUMENT_SELECTOR`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]=`EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]=`EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT`,e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]=`INVALID_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]=`DUPLICATE_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]=`DUPLICATE_SELECT_ARGUMENT_SELECTOR`,e[e.MISSING_OTHER_CLAUSE=22]=`MISSING_OTHER_CLAUSE`,e[e.INVALID_TAG=23]=`INVALID_TAG`,e[e.INVALID_TAG_NAME=25]=`INVALID_TAG_NAME`,e[e.UNMATCHED_CLOSING_TAG=26]=`UNMATCHED_CLOSING_TAG`,e[e.UNCLOSED_TAG=27]=`UNCLOSED_TAG`,e}({});function d_(e){return e.type===0}function f_(e){return e.type===1}function p_(e){return e.type===2}function m_(e){return e.type===3}function h_(e){return e.type===4}function g_(e){return e.type===5}function __(e){return e.type===6}function v_(e){return e.type===7}function y_(e){return e.type===8}function b_(e){return!!(e&&typeof e==`object`&&e.type===0)}function x_(e){return!!(e&&typeof e==`object`&&e.type===1)}var S_=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,C_={"001":[`H`,`h`],419:[`h`,`H`,`hB`,`hb`],AC:[`H`,`h`,`hb`,`hB`],AD:[`H`,`hB`],AE:[`h`,`hB`,`hb`,`H`],AF:[`H`,`hb`,`hB`,`h`],AG:[`h`,`hb`,`H`,`hB`],AI:[`H`,`h`,`hb`,`hB`],AL:[`h`,`H`,`hB`],AM:[`H`,`hB`],AO:[`H`,`hB`],AR:[`h`,`H`,`hB`,`hb`],AS:[`h`,`H`],AT:[`H`,`hB`],AU:[`h`,`hb`,`H`,`hB`],AW:[`H`,`hB`],AX:[`H`],AZ:[`H`,`hB`,`h`],BA:[`H`,`hB`,`h`],BB:[`h`,`hb`,`H`,`hB`],BD:[`h`,`hB`,`H`],BE:[`H`,`hB`],BF:[`H`,`hB`],BG:[`H`,`hB`,`h`],BH:[`h`,`hB`,`hb`,`H`],BI:[`H`,`h`],BJ:[`H`,`hB`],BL:[`H`,`hB`],BM:[`h`,`hb`,`H`,`hB`],BN:[`hb`,`hB`,`h`,`H`],BO:[`h`,`H`,`hB`,`hb`],BQ:[`H`],BR:[`H`,`hB`],BS:[`h`,`hb`,`H`,`hB`],BT:[`h`,`H`],BW:[`H`,`h`,`hb`,`hB`],BY:[`H`,`h`],BZ:[`H`,`h`,`hb`,`hB`],CA:[`h`,`hb`,`H`,`hB`],CC:[`H`,`h`,`hb`,`hB`],CD:[`hB`,`H`],CF:[`H`,`h`,`hB`],CG:[`H`,`hB`],CH:[`H`,`hB`,`h`],CI:[`H`,`hB`],CK:[`H`,`h`,`hb`,`hB`],CL:[`h`,`H`,`hB`,`hb`],CM:[`H`,`h`,`hB`],CN:[`H`,`hB`,`hb`,`h`],CO:[`h`,`H`,`hB`,`hb`],CP:[`H`],CR:[`h`,`H`,`hB`,`hb`],CU:[`h`,`H`,`hB`,`hb`],CV:[`H`,`hB`],CW:[`H`,`hB`],CX:[`H`,`h`,`hb`,`hB`],CY:[`h`,`H`,`hb`,`hB`],CZ:[`H`],DE:[`H`,`hB`],DG:[`H`,`h`,`hb`,`hB`],DJ:[`h`,`H`],DK:[`H`],DM:[`h`,`hb`,`H`,`hB`],DO:[`h`,`H`,`hB`,`hb`],DZ:[`h`,`hB`,`hb`,`H`],EA:[`H`,`h`,`hB`,`hb`],EC:[`h`,`H`,`hB`,`hb`],EE:[`H`,`hB`],EG:[`h`,`hB`,`hb`,`H`],EH:[`h`,`hB`,`hb`,`H`],ER:[`h`,`H`],ES:[`H`,`hB`,`h`,`hb`],ET:[`hB`,`hb`,`h`,`H`],FI:[`H`],FJ:[`h`,`hb`,`H`,`hB`],FK:[`H`,`h`,`hb`,`hB`],FM:[`h`,`hb`,`H`,`hB`],FO:[`H`,`h`],FR:[`H`,`hB`],GA:[`H`,`hB`],GB:[`H`,`h`,`hb`,`hB`],GD:[`h`,`hb`,`H`,`hB`],GE:[`H`,`hB`,`h`],GF:[`H`,`hB`],GG:[`H`,`h`,`hb`,`hB`],GH:[`h`,`H`],GI:[`H`,`h`,`hb`,`hB`],GL:[`H`,`h`],GM:[`h`,`hb`,`H`,`hB`],GN:[`H`,`hB`],GP:[`H`,`hB`],GQ:[`H`,`hB`,`h`,`hb`],GR:[`h`,`H`,`hb`,`hB`],GS:[`H`,`h`,`hb`,`hB`],GT:[`h`,`H`,`hB`,`hb`],GU:[`h`,`hb`,`H`,`hB`],GW:[`H`,`hB`],GY:[`h`,`hb`,`H`,`hB`],HK:[`h`,`hB`,`hb`,`H`],HN:[`h`,`H`,`hB`,`hb`],HR:[`H`,`hB`],HU:[`H`,`h`],IC:[`H`,`h`,`hB`,`hb`],ID:[`H`],IE:[`H`,`h`,`hb`,`hB`],IL:[`H`,`hB`],IM:[`H`,`h`,`hb`,`hB`],IN:[`h`,`H`],IO:[`H`,`h`,`hb`,`hB`],IQ:[`h`,`hB`,`hb`,`H`],IR:[`hB`,`H`],IS:[`H`],IT:[`H`,`hB`],JE:[`H`,`h`,`hb`,`hB`],JM:[`h`,`hb`,`H`,`hB`],JO:[`h`,`hB`,`hb`,`H`],JP:[`H`,`K`,`h`],KE:[`hB`,`hb`,`H`,`h`],KG:[`H`,`h`,`hB`,`hb`],KH:[`hB`,`h`,`H`,`hb`],KI:[`h`,`hb`,`H`,`hB`],KM:[`H`,`h`,`hB`,`hb`],KN:[`h`,`hb`,`H`,`hB`],KP:[`h`,`H`,`hB`,`hb`],KR:[`h`,`H`,`hB`,`hb`],KW:[`h`,`hB`,`hb`,`H`],KY:[`h`,`hb`,`H`,`hB`],KZ:[`H`,`hB`],LA:[`H`,`hb`,`hB`,`h`],LB:[`h`,`hB`,`hb`,`H`],LC:[`h`,`hb`,`H`,`hB`],LI:[`H`,`hB`,`h`],LK:[`H`,`h`,`hB`,`hb`],LR:[`h`,`hb`,`H`,`hB`],LS:[`h`,`H`],LT:[`H`,`h`,`hb`,`hB`],LU:[`H`,`h`,`hB`],LV:[`H`,`hB`,`hb`,`h`],LY:[`h`,`hB`,`hb`,`H`],MA:[`H`,`h`,`hB`,`hb`],MC:[`H`,`hB`],MD:[`H`,`hB`],ME:[`H`,`hB`,`h`],MF:[`H`,`hB`],MG:[`H`,`h`],MH:[`h`,`hb`,`H`,`hB`],MK:[`H`,`h`,`hb`,`hB`],ML:[`H`],MM:[`hB`,`hb`,`H`,`h`],MN:[`H`,`h`,`hb`,`hB`],MO:[`h`,`hB`,`hb`,`H`],MP:[`h`,`hb`,`H`,`hB`],MQ:[`H`,`hB`],MR:[`h`,`hB`,`hb`,`H`],MS:[`H`,`h`,`hb`,`hB`],MT:[`H`,`h`],MU:[`H`,`h`],MV:[`H`,`h`],MW:[`h`,`hb`,`H`,`hB`],MX:[`h`,`H`,`hB`,`hb`],MY:[`hb`,`hB`,`h`,`H`],MZ:[`H`,`hB`],NA:[`h`,`H`,`hB`,`hb`],NC:[`H`,`hB`],NE:[`H`],NF:[`H`,`h`,`hb`,`hB`],NG:[`H`,`h`,`hb`,`hB`],NI:[`h`,`H`,`hB`,`hb`],NL:[`H`,`hB`],NO:[`H`,`h`],NP:[`H`,`h`,`hB`],NR:[`H`,`h`,`hb`,`hB`],NU:[`H`,`h`,`hb`,`hB`],NZ:[`h`,`hb`,`H`,`hB`],OM:[`h`,`hB`,`hb`,`H`],PA:[`h`,`H`,`hB`,`hb`],PE:[`h`,`H`,`hB`,`hb`],PF:[`H`,`h`,`hB`],PG:[`h`,`H`],PH:[`h`,`hB`,`hb`,`H`],PK:[`h`,`hB`,`H`],PL:[`H`,`h`],PM:[`H`,`hB`],PN:[`H`,`h`,`hb`,`hB`],PR:[`h`,`H`,`hB`,`hb`],PS:[`h`,`hB`,`hb`,`H`],PT:[`H`,`hB`],PW:[`h`,`H`],PY:[`h`,`H`,`hB`,`hb`],QA:[`h`,`hB`,`hb`,`H`],RE:[`H`,`hB`],RO:[`H`,`hB`],RS:[`H`,`hB`,`h`],RU:[`H`],RW:[`H`,`h`],SA:[`h`,`hB`,`hb`,`H`],SB:[`h`,`hb`,`H`,`hB`],SC:[`H`,`h`,`hB`],SD:[`h`,`hB`,`hb`,`H`],SE:[`H`],SG:[`h`,`hb`,`H`,`hB`],SH:[`H`,`h`,`hb`,`hB`],SI:[`H`,`hB`],SJ:[`H`],SK:[`H`],SL:[`h`,`hb`,`H`,`hB`],SM:[`H`,`h`,`hB`],SN:[`H`,`h`,`hB`],SO:[`h`,`H`],SR:[`H`,`hB`],SS:[`h`,`hb`,`H`,`hB`],ST:[`H`,`hB`],SV:[`h`,`H`,`hB`,`hb`],SX:[`H`,`h`,`hb`,`hB`],SY:[`h`,`hB`,`hb`,`H`],SZ:[`h`,`hb`,`H`,`hB`],TA:[`H`,`h`,`hb`,`hB`],TC:[`h`,`hb`,`H`,`hB`],TD:[`h`,`H`,`hB`],TF:[`H`,`h`,`hB`],TG:[`H`,`hB`],TH:[`H`,`h`],TJ:[`H`,`h`],TL:[`H`,`hB`,`hb`,`h`],TM:[`H`,`h`],TN:[`h`,`hB`,`hb`,`H`],TO:[`h`,`H`],TR:[`H`,`hB`],TT:[`h`,`hb`,`H`,`hB`],TW:[`hB`,`hb`,`h`,`H`],TZ:[`hB`,`hb`,`H`,`h`],UA:[`H`,`hB`,`h`],UG:[`hB`,`hb`,`H`,`h`],UM:[`h`,`hb`,`H`,`hB`],US:[`h`,`hb`,`H`,`hB`],UY:[`h`,`H`,`hB`,`hb`],UZ:[`H`,`hB`,`h`],VA:[`H`,`h`,`hB`],VC:[`h`,`hb`,`H`,`hB`],VE:[`h`,`H`,`hB`,`hb`],VG:[`h`,`hb`,`H`,`hB`],VI:[`h`,`hb`,`H`,`hB`],VN:[`H`,`h`],VU:[`h`,`H`],WF:[`H`,`hB`],WS:[`h`,`H`],XK:[`H`,`hB`,`h`],YE:[`h`,`hB`,`hb`,`H`],YT:[`H`,`hB`],ZA:[`H`,`h`,`hb`,`hB`],ZM:[`h`,`hb`,`H`,`hB`],ZW:[`H`,`h`],"af-ZA":[`H`,`h`,`hB`,`hb`],"ar-001":[`h`,`hB`,`hb`,`H`],"ca-ES":[`H`,`h`,`hB`],"en-001":[`h`,`hb`,`H`,`hB`],"en-HK":[`h`,`hb`,`H`,`hB`],"en-IL":[`H`,`h`,`hb`,`hB`],"en-MY":[`h`,`hb`,`H`,`hB`],"es-BR":[`H`,`h`,`hB`,`hb`],"es-ES":[`H`,`h`,`hB`,`hb`],"es-GQ":[`H`,`h`,`hB`,`hb`],"fr-CA":[`H`,`h`,`hB`],"gl-ES":[`H`,`h`,`hB`],"gu-IN":[`hB`,`hb`,`h`,`H`],"hi-IN":[`hB`,`h`,`H`],"it-CH":[`H`,`h`,`hB`],"it-IT":[`H`,`h`,`hB`],"kn-IN":[`hB`,`h`,`H`],"ku-SY":[`H`,`hB`],"ml-IN":[`hB`,`h`,`H`],"mr-IN":[`hB`,`hb`,`h`,`H`],"pa-IN":[`hB`,`hb`,`h`,`H`],"ta-IN":[`hB`,`h`,`hb`,`H`],"te-IN":[`hB`,`h`,`H`],"zu-ZA":[`H`,`hB`,`hb`,`h`]};function w_(e,t){let n=``;for(let r=0;r>1),c=T_(t);for((c==`H`||c==`k`)&&(s=0);s-->0;)n+=`a`;for(;o-->0;)n=c+n}else n+=i===`J`?`H`:i}return n}function T_(e){let t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case`h24`:return`k`;case`h23`:return`H`;case`h12`:return`h`;case`h11`:return`K`;default:throw Error(`Invalid hourCycle`)}let n=e.language,r;return n!==`root`&&(r=e.maximize().region),(C_[r||``]||C_[n||``]||C_[`${n}-001`]||C_[`001`])[0]}var E_=RegExp(`^${S_.source}*`),D_=RegExp(`${S_.source}*$`);function O_(e,t){return{start:e,end:t}}var k_=!!Object.fromEntries,A_=!!String.prototype.trimStart,j_=!!String.prototype.trimEnd,M_=k_?Object.fromEntries:function(e){let t={};for(let[n,r]of e)t[n]=r;return t},N_=A_?function(e){return e.trimStart()}:function(e){return e.replace(E_,``)},P_=j_?function(e){return e.trimEnd()}:function(e){return e.replace(D_,``)},F_=RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`,`yu`);function I_(e,t){return F_.lastIndex=t,F_.exec(e)[1]??``}function L_(e){if(e.length===0)return null;let t=1,n=1;for(let r=0;r=55296&&i<=56319&&r+1=56320&&t<=57343?2:1}else r++}return{offset:e.length,line:t,column:n}}var R_=class{constructor(e,t={}){this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}parse(){if(this.offset()!==0)throw Error(`parser can only be used once`);if(this.message.length>0){let e=this.message.charCodeAt(0);if(e!==35&&e!==39&&e!==60&&e!==123&&e!==125){let e=L_(this.message);if(e){let t=this.clonePosition();return this.position=e,{val:[{type:0,value:this.message,location:O_(t,this.clonePosition())}],err:null}}}}return this.parseMessage(0,``,!1)}parseMessage(e,t,n){let r=[];for(;!this.isEOF();){let i=this.char();if(i===123){let t=this.parseArgument(e,n);if(t.err)return t;r.push(t.val)}else if(i===125&&e>0)break;else if(i===35&&(t===`plural`||t===`selectordinal`)){let e=this.clonePosition();this.bump(),r.push({type:7,location:O_(e,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(26,O_(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&z_(this.peek()||0)){let n=this.parseTag(e,t);if(n.err)return n;r.push(n.val)}else{let n=this.parseLiteral(e,t);if(n.err)return n;r.push(n.val)}}return{val:r,err:null}}parseTag(e,t){let n=this.clonePosition();this.bump();let r=this.parseTagName();if(this.bumpSpace(),this.bumpIf(`/>`))return{val:{type:0,value:`<${r}/>`,location:O_(n,this.clonePosition())},err:null};if(this.bumpIf(`>`)){let i=this.parseMessage(e+1,t,!0);if(i.err)return i;let a=i.val,o=this.clonePosition();if(this.bumpIf(``)?{val:{type:8,value:r,children:a,location:O_(n,this.clonePosition())},err:null}:this.error(23,O_(o,this.clonePosition()))):this.error(26,O_(e,this.clonePosition()))}return this.error(27,O_(n,this.clonePosition()))}return this.error(23,O_(n,this.clonePosition()))}parseTagName(){let e=this.offset();for(this.bump();!this.isEOF()&&V_(this.char());)this.bump();return this.message.slice(e,this.offset())}parseLiteral(e,t){let n=this.clonePosition(),r=``;for(;;){let n=this.tryParseQuote(t);if(n){r+=n;continue}let i=this.tryParseUnquoted(e,t);if(i){r+=i;continue}let a=this.tryParseLeftAngleBracket();if(a){r+=a;continue}break}let i=O_(n,this.clonePosition());return{val:{type:0,value:r,location:i},err:null}}tryParseLeftAngleBracket(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!B_(this.peek()||0))?(this.bump(),`<`):null}tryParseQuote(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),`'`;case 123:case 60:case 62:case 125:break;case 35:if(e===`plural`||e===`selectordinal`)break;return null;default:return null}this.bump();let t=[this.char()];for(this.bump();!this.isEOF();){let e=this.char();if(e===39)if(this.peek()===39)t.push(39),this.bump();else{this.bump();break}else t.push(e);this.bump()}return String.fromCodePoint(...t)}tryParseUnquoted(e,t){if(this.isEOF())return null;let n=this.char();return n===60||n===123||n===35&&(t===`plural`||t===`selectordinal`)||n===125&&e>0?null:(this.bump(),String.fromCodePoint(n))}parseArgument(e,t){let n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(1,O_(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(2,O_(n,this.clonePosition()));let r=this.parseIdentifierIfPossible().value;if(!r)return this.error(3,O_(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(1,O_(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:1,value:r,location:O_(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(1,O_(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(3,O_(n,this.clonePosition()))}}parseIdentifierIfPossible(){let e=this.clonePosition(),t=this.offset(),n=I_(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:O_(e,this.clonePosition())}}parseArgumentOptions(e,t,n,r){let i=this.clonePosition(),a=this.parseIdentifierIfPossible().value,o=this.clonePosition();switch(a){case``:return this.error(4,O_(i,o));case`number`:case`date`:case`time`:{this.bumpSpace();let e=null;if(this.bumpIf(`,`)){this.bumpSpace();let t=this.clonePosition(),n=this.parseSimpleArgStyleIfPossible();if(n.err)return n;let r=P_(n.val);if(r.length===0)return this.error(6,O_(this.clonePosition(),this.clonePosition()));e={style:r,styleLocation:O_(t,this.clonePosition())}}let t=this.tryParseArgumentClose(r);if(t.err)return t;let i=O_(r,this.clonePosition());if(e&&e.style.startsWith(`::`)){let t=N_(e.style.slice(2));if(a===`number`){let r=this.parseNumberSkeletonFromString(t,e.styleLocation);return r.err?r:{val:{type:2,value:n,location:i,style:r.val},err:null}}{if(t.length===0)return this.error(10,i);let r=t;this.locale&&(r=w_(t,this.locale));let o={type:1,pattern:r,location:e.styleLocation,parsedOptions:this.shouldParseSkeletons?Zg(r):{}};return{val:{type:a===`date`?3:4,value:n,location:i,style:o},err:null}}}return{val:{type:a===`number`?2:a===`date`?3:4,value:n,location:i,style:e?.style??null},err:null}}case`plural`:case`selectordinal`:case`select`:{let i=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(`,`))return this.error(12,O_(i,{...i}));this.bumpSpace();let o=this.parseIdentifierIfPossible(),s=0;if(a!==`select`&&o.value===`offset`){if(!this.bumpIf(`:`))return this.error(13,O_(this.clonePosition(),this.clonePosition()));this.bumpSpace();let e=this.tryParseDecimalInteger(13,14);if(e.err)return e;this.bumpSpace(),o=this.parseIdentifierIfPossible(),s=e.val}let c=this.tryParsePluralOrSelectOptions(e,a,t,o);if(c.err)return c;let l=this.tryParseArgumentClose(r);if(l.err)return l;let u=O_(r,this.clonePosition());return a===`select`?{val:{type:5,value:n,options:M_(c.val),location:u},err:null}:{val:{type:6,value:n,options:M_(c.val),offset:s,pluralType:a===`plural`?`cardinal`:`ordinal`,location:u},err:null}}default:return this.error(5,O_(i,o))}}tryParseArgumentClose(e){return this.isEOF()||this.char()!==125?this.error(1,O_(e,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let e=0,t=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let e=this.clonePosition();if(!this.bumpUntil(`'`))return this.error(11,O_(e,this.clonePosition()));this.bump();break}case 123:e+=1,this.bump();break;case 125:if(e>0)--e;else return{val:this.message.slice(t.offset,this.offset()),err:null};break;default:this.bump()}return{val:this.message.slice(t.offset,this.offset()),err:null}}parseNumberSkeletonFromString(e,t){let n=[];try{n=$g(e)}catch{return this.error(7,t)}return{val:{type:0,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?l_(n):{}},err:null}}tryParsePluralOrSelectOptions(e,t,n,r){let i=!1,a=[],o=new Set,{value:s,location:c}=r;for(;;){if(s.length===0){let e=this.clonePosition();if(t!==`select`&&this.bumpIf(`=`)){let t=this.tryParseDecimalInteger(16,19);if(t.err)return t;c=O_(e,this.clonePosition()),s=this.message.slice(e.offset,this.offset())}else break}if(o.has(s))return this.error(t===`select`?21:20,c);s===`other`&&(i=!0),this.bumpSpace();let r=this.clonePosition();if(!this.bumpIf(`{`))return this.error(t===`select`?17:18,O_(this.clonePosition(),this.clonePosition()));let l=this.parseMessage(e+1,t,n);if(l.err)return l;let u=this.tryParseArgumentClose(r);if(u.err)return u;a.push([s,{value:l.val,location:O_(r,this.clonePosition())}]),o.add(s),this.bumpSpace(),{value:s,location:c}=this.parseIdentifierIfPossible()}return a.length===0?this.error(t===`select`?15:16,O_(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(22,O_(this.clonePosition(),this.clonePosition())):{val:a,err:null}}tryParseDecimalInteger(e,t){let n=1,r=this.clonePosition();this.bumpIf(`+`)||this.bumpIf(`-`)&&(n=-1);let i=!1,a=0;for(;!this.isEOF();){let e=this.char();if(e>=48&&e<=57)i=!0,a=a*10+(e-48),this.bump();else break}let o=O_(r,this.clonePosition());return i?(a*=n,Number.isSafeInteger(a)?{val:a,err:null}:this.error(t,o)):this.error(e,o)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){let e=this.position.offset;if(e>=this.message.length)throw Error(`out of bound`);let t=this.message.codePointAt(e);if(t===void 0)throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);return t}error(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}}bump(){if(this.isEOF())return;let e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}bumpIf(e){if(this.message.startsWith(e,this.offset())){for(let t=0;t=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)}bumpTo(e){if(this.offset()>e)throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);for(e=Math.min(e,this.message.length);;){let t=this.offset();if(t===e)break;if(t>e)throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(;!this.isEOF()&&H_(this.char());)this.bump()}peek(){if(this.isEOF())return null;let e=this.char(),t=this.offset();return this.message.charCodeAt(t+(e>=65536?2:1))??null}};function z_(e){return e>=97&&e<=122||e>=65&&e<=90}function B_(e){return z_(e)||e===47}function V_(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function H_(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function U_(e){e.forEach(e=>{if(delete e.location,g_(e)||__(e))for(let t in e.options)delete e.options[t].location,U_(e.options[t].value);else p_(e)&&b_(e.style)||(m_(e)||h_(e))&&x_(e.style)?delete e.style.location:y_(e)&&U_(e.children)})}function W_(e,t={}){t={shouldParseSkeletons:!0,requiresOtherClause:!0,...t};let n=new R_(e,t).parse();if(n.err){let e=SyntaxError(u_[n.err.kind]);throw e.location=n.err.location,e.originalMessage=n.err.message,e}return t?.captureLocation||U_(n.val),n.val}var G_=class extends Error{constructor(e,t,n){super(e),this.code=t,this.originalMessage=n}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},K_=class extends G_{constructor(e,t,n,r){super(`Invalid values for "${e}": "${t}". Options are "${Object.keys(n).join(`", "`)}"`,`INVALID_VALUE`,r)}},q_=class extends G_{constructor(e,t,n){super(`Value for "${e}" must be of type ${t}`,`INVALID_VALUE`,n)}},J_=class extends G_{constructor(e,t){super(`The intl string context variable "${e}" was not provided to the string "${t}"`,`MISSING_VALUE`,t)}};function Y_(e){return e.length<2?e:e.reduce((e,t)=>{let n=e[e.length-1];return!n||n.type!==0||t.type!==0?e.push(t):n.value+=t.value,e},[])}function X_(e){return typeof e==`function`}function Z_(e,t,n,r,i,a,o){if(e.length===1&&d_(e[0]))return[{type:0,value:e[0].value}];let s=[];for(let c of e){if(d_(c)){s.push({type:0,value:c.value});continue}if(v_(c)){typeof a==`number`&&s.push({type:0,value:n.getNumberFormat(t).format(a)});continue}let{value:e}=c;if(!(i&&e in i))throw new J_(e,o);let l=i[e];if(f_(c)){(!l||typeof l==`string`||typeof l==`number`||typeof l==`bigint`)&&(l=typeof l==`string`||typeof l==`number`||typeof l==`bigint`?String(l):``),s.push({type:typeof l==`string`?0:1,value:l});continue}if(m_(c)){let e=typeof c.style==`string`?r.date[c.style]:x_(c.style)?c.style.parsedOptions:void 0;s.push({type:0,value:n.getDateTimeFormat(t,e).format(l)});continue}if(h_(c)){let e=typeof c.style==`string`?r.time[c.style]:x_(c.style)?c.style.parsedOptions:r.time.medium;s.push({type:0,value:n.getDateTimeFormat(t,e).format(l)});continue}if(p_(c)){let e=typeof c.style==`string`?r.number[c.style]:b_(c.style)?c.style.parsedOptions:void 0;if(e&&e.scale){let t=e.scale||1;if(typeof l==`bigint`){if(!Number.isInteger(t))throw TypeError(`Cannot apply fractional scale ${t} to bigint value. Scale must be an integer when formatting bigint.`);l*=BigInt(t)}else l*=t}s.push({type:0,value:n.getNumberFormat(t,e).format(l)});continue}if(y_(c)){let{children:e,value:l}=c,u=i[l];if(!X_(u))throw new q_(l,`function`,o);let d=u(Z_(e,t,n,r,i,a).map(e=>e.value));Array.isArray(d)||(d=[d]),s.push(...d.map(e=>({type:typeof e==`string`?0:1,value:e})))}if(g_(c)){let e=l,a=(Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0)||c.options.other;if(!a)throw new K_(c.value,l,Object.keys(c.options),o);s.push(...Z_(a.value,t,n,r,i));continue}if(__(c)){let e=`=${l}`,a=Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0;if(!a){if(!Intl.PluralRules)throw new G_(`Intl.PluralRules is not available in this environment. +`);r&&i(JSON.parse(r))}}}finally{await s.cancel().catch(()=>void 0)}}renameWorkspace(e,t){return this.request(`/api/workspaces`,{method:`PATCH`,body:JSON.stringify({path:e,name:t})})}removeWorkspace(e){return this.request(`/api/workspaces?path=${encodeURIComponent(e)}`,{method:`DELETE`})}createSession(e,t){return this.request(`/api/sessions`,{method:`POST`,body:JSON.stringify({workspacePath:e,commandId:t})})}selectSession(e){return this.request(`/api/sessions/select`,{method:`POST`,body:JSON.stringify({path:e})})}renameSession(e,t){return this.request(`/api/sessions`,{method:`PATCH`,body:JSON.stringify({path:e,name:t})})}archiveSession(e){return this.request(`/api/sessions/archive?path=${encodeURIComponent(e)}`,{method:`POST`})}unarchiveSession(e){return this.request(`/api/sessions/unarchive?path=${encodeURIComponent(e)}`,{method:`POST`})}thinking(e,t){return this.request(`/api/thinking?sessionId=${encodeURIComponent(e)}`,{signal:t})}setThinkingLevel(e,t){return this.request(`/api/thinking`,{method:`POST`,body:JSON.stringify({sessionId:e,level:t})})}setPlanMode(e,t,n){return this.request(`/api/plan`,{method:`POST`,body:JSON.stringify({sessionId:e,enabled:t,expectedRevision:n})})}trust(e,t){return this.request(`/api/trust?sessionId=${encodeURIComponent(e)}`,{signal:t})}providerAuth(e,t){return this.request(`/api/providers/auth-status?sessionId=${encodeURIComponent(e)}`,{signal:t})}commands(e,t){return this.request(`/api/commands?sessionId=${encodeURIComponent(e)}`,{signal:t})}settingsCatalog(e,t){return this.request(`/api/settings/catalog?sessionId=${encodeURIComponent(e)}`,{signal:t})}terminalDetail(e,t,n){return this.request(`/api/capabilities/detail?kind=background-terminals&id=${encodeURIComponent(t)}&sessionId=${encodeURIComponent(e)}`,{signal:n})}subagentDetail(e,t,n){return this.request(`/api/capabilities/detail?kind=subagents&id=${encodeURIComponent(t)}&sessionId=${encodeURIComponent(e)}`,{signal:n})}subagentAction(e,t,n){return this.request(`/api/capabilities/action`,{method:`POST`,body:JSON.stringify({sessionId:e,...t}),signal:n})}selectModel(e,t,n){return this.request(`/api/model`,{method:`POST`,body:JSON.stringify({provider:e,modelId:t,sessionId:n})})}searchModels(e,t,n){let r=new URLSearchParams({query:e,limit:`50`});return t&&r.set(`sessionId`,t),this.request(`/api/models?${r}`,{signal:n})}cancelActiveTurn(e){return this.request(`/api/turns/cancel`,{method:`POST`,body:JSON.stringify(e)})}pendingQuestions(e,t){return this.request(`/api/questions/pending?sessionId=${encodeURIComponent(e)}`,{signal:t})}async answerQuestions(e,t,n){try{return await this.request(`/api/questions/answer`,{method:`POST`,body:JSON.stringify({sessionId:e.sessionId,requestId:e.requestId,action:t===null?`dismiss`:`answer`,...t===null?{}:{answers:t}}),signal:n})}catch(e){if(e instanceof Np&&e.code===`STALE_QUESTION`)return{state:`stale`};throw e}}async prompt(e,t,n,r=!1,i=[]){let a=await this.request(`/api/prompt`,{method:`POST`,body:JSON.stringify({sessionId:e,content:t,commandId:n,retry:r,images:i,controllerId:this.controllerId}),timeoutMs:3e4,timeoutMessage:`Request timed out; admission may still be pending. Retry the same message to recover its receipt.`});if(typeof a.id!=`string`||!a.id||a.accepted!==!0)throw Error(`Invalid prompt receipt; retry the same message to recover its admission.`);return a}},Ip=(0,w.forwardRef)(function({sessionId:e,children:t,disabled:n=!1,onOpen:r,onClose:i},a){let{t:o}=Ln(),s=(0,w.useMemo)(()=>new Fp,[]),[c,l]=(0,w.useState)(null),[u,d]=(0,w.useState)(null),[f,p]=(0,w.useState)(null),[m,h]=(0,w.useState)(!1),[g,_]=(0,w.useState)(null),v=(0,w.useRef)(null),y=(0,w.useRef)(0),b=(0,w.useRef)(null),x=(0,w.useRef)(null),S=(0,w.useRef)(new Set),C=(0,w.useRef)(void 0),T=(0,w.useCallback)((t,i)=>{if(n)return;r?.();let a=document.activeElement;a instanceof HTMLElement&&a.closest(`.artifact-panel`)||(v.current=a instanceof HTMLElement?a:null),y.current++,d(null),p(null),_(null),C.current=i,l({reference:t,parent:i,sessionId:e})},[n,r,e]),E=(0,w.useCallback)(()=>{y.current++,l(null),d(null),_(null),i?.(),v.current?.focus()},[i]);(0,w.useImperativeHandle)(a,()=>({close:E}),[E]),(0,w.useEffect)(()=>{c&&c.sessionId!==e&&(y.current++,l(null),d(null),_(null))},[e,c]),(0,w.useEffect)(()=>{!n||!c||(y.current++,l(null),d(null),_(null))},[n,c]),(0,w.useEffect)(()=>{if(!c||!e||c.sessionId!==e)return;let t=new AbortController,n,r=c.parent,i,a=!1,o,l=2e3;b.current?.focus();let u=async()=>{if(document.visibilityState===`hidden`){i=setTimeout(u,2e3);return}try{if(n||=(await s.resolveArtifact(e,c.reference,r,t.signal)).handle,r&&=(s.releaseArtifact(e,r).catch(()=>void 0),void 0),a){s.releaseArtifact(e,n).catch(()=>void 0);return}if(o&&(await s.artifactMetadata(e,n,t.signal)).identity===o){a||p(null),l=Math.min(l*2,3e4);return}let i=await s.artifactPreview(e,n,t.signal);a||(o=i.identity,l=2e3,d(i),p(null))}catch(e){l=Math.min(l*2,3e4),a||p(e instanceof Error?e.message:`Unable to read file`)}finally{a||(i=setTimeout(u,l))}};return u(),()=>{a=!0,t.abort(),clearTimeout(i),x.current?.abort(),h(!1),n&&n!==C.current&&s.releaseArtifact(e,n).catch(()=>void 0),r&&s.releaseArtifact(e,r).catch(()=>void 0);for(let e of S.current)URL.revokeObjectURL(e);S.current.clear()}},[s,c,e]);let D=(0,w.useMemo)(()=>({open:T}),[T]),O=u?.artifact.path??c?.reference??``,k=u?.artifact.name??O.split(/[\\/]/u).at(-1)??O,A=async()=>{if(!u||m)return;let e=new AbortController;x.current=e,h(!0);try{let t=await s.downloadArtifact(u.artifact,e.signal);if(e.signal.aborted)return;let n=URL.createObjectURL(t);S.current.add(n);let r=document.createElement(`a`);r.href=n,r.download=u.artifact.name,r.click(),setTimeout(()=>{URL.revokeObjectURL(n),S.current.delete(n)},1e3)}catch(t){e.signal.aborted||p(t instanceof Error?t.message:`Download failed`)}finally{e.signal.aborted||h(!1)}};return(0,K.jsxs)(op.Provider,{value:D,children:[t,c&&(0,K.jsxs)(`aside`,{className:`artifact-panel`,"aria-label":o(`filePreview`),onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),E())},children:[(0,K.jsxs)(`header`,{children:[(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`small`,{children:[o(`filePreview`),` · `,o(`artifactReadOnly`)]}),(0,K.jsx)(`h2`,{title:k,children:k})]}),(0,K.jsx)(`button`,{ref:b,type:`button`,"aria-label":o(`closePreview`),title:o(`closePreview`),onClick:E,children:(0,K.jsx)(mt,{"aria-hidden":`true`})})]}),(0,K.jsxs)(`div`,{className:`artifact-panel-body`,children:[(0,K.jsxs)(`div`,{className:`artifact-source`,children:[(0,K.jsx)(`code`,{title:O,children:O}),(0,K.jsx)(`button`,{type:`button`,"aria-label":o(`copyFilePath`),title:o(`copyFilePath`),onClick:()=>{let e=++y.current;sp(O).then(t=>{e===y.current&&_(t?`copied`:`failed`)})},children:g===`copied`?(0,K.jsx)(B,{"aria-hidden":`true`}):(0,K.jsx)(oe,{"aria-hidden":`true`})})]}),g&&(0,K.jsx)(`p`,{role:`status`,children:o(g===`copied`?`filePathCopied`:`copyFailed`)}),(0,K.jsx)(`p`,{className:`artifact-session`,children:o(`artifactSession`,{sessionId:e})}),(0,K.jsxs)(`div`,{className:`artifact-actions`,children:[(0,K.jsxs)(`button`,{type:`button`,onClick:()=>{y.current++,_(null),C.current=void 0,l(t=>t?{sessionId:e,reference:u?.artifact.path??t.reference,...u?{}:{parent:t.parent}}:null)},children:[(0,K.jsx)(Ze,{"aria-hidden":`true`}),` `,o(`refreshFile`)]}),(0,K.jsxs)(`button`,{type:`button`,disabled:!u||m,onClick:()=>void A(),children:[(0,K.jsx)(he,{"aria-hidden":`true`}),` `,o(m?`downloadingFile`:`downloadFile`)]})]}),f&&(0,K.jsxs)(`p`,{role:`status`,className:`evidence-warning`,children:[u?o(`artifactOlderPreview`):``,f]}),!u&&!f&&(0,K.jsx)(`p`,{role:`status`,children:o(`readingFile`)}),u&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`p`,{className:`artifact-revision`,children:[o(`artifactVersion`),`:`,` `,(0,K.jsx)(`code`,{children:u.artifact.revision}),` ·`,` `,o(`artifactBytes`,{count:u.artifact.bytes})]}),u.truncated&&(0,K.jsx)(`p`,{className:`evidence-warning`,children:o(`artifactPreviewTruncated`)}),u.text===void 0?(0,K.jsx)(`p`,{children:o(`artifactUnsupported`)}):/\.(?:md|markdown)$/iu.test(u.artifact.name)?(0,K.jsx)(op.Provider,{value:{open:T,parent:u.artifact.handle},children:(0,K.jsx)(pp,{children:u.text})}):(0,K.jsx)(`section`,{"aria-label":`File preview content`,children:(0,K.jsx)(`pre`,{children:u.text})})]})]})]})]})}),Lp={},Rp;function zp(){if(Rp)return Lp;Rp=1,Object.defineProperty(Lp,"__esModule",{value:!0}),Lp.styleq=void 0;var e=new WeakMap,t=`$$css`;function n(n){var r,i,a;return n!=null&&(r=n.disableCache===!0,i=n.disableMix===!0,a=n.transform),function(){for(var n=[],o=``,s=null,c=``,l=r?null:e,u=Array(arguments.length),d=0;d0;){var f=u.pop();if(f!=null&&f!==!1){if(Array.isArray(f)){for(var p=0;p0&&(i.style=n),r!=null&&r!==``&&(i[`data-style-src`]=r),i}Object.freeze({});function Vp(e){return(e.style.anchorName??``).split(`,`).map(e=>e.trim()).filter(Boolean)}function Hp(e,t){e.style.anchorName=t.join(`, `)}function Up(e,t){let n=Vp(e);n.includes(t)||(n.push(t),Hp(e,n))}function Wp(e,t){Hp(e,Vp(e).filter(e=>e!==t))}var Gp=0,Kp=null,qp=!1;function Jp(){Gp+=1}function Yp(){Kp=Gp}function Xp(){qp||typeof document>`u`||(qp=!0,document.addEventListener(`pointerdown`,Jp,!0),document.addEventListener(`keydown`,Jp,!0),document.addEventListener(`click`,Yp,!0))}function Zp(){return Xp(),Gp}function Qp(){return Xp(),Kp===Gp}var $p=new Set(`p.h1.h2.h3.h4.h5.h6.dt.pre.legend.data.dfn.meter.output.progress.option.optgroup.table.thead.tbody.tfoot.tr.colgroup.ul.ol.menu.dl.select.datalist.picture.hgroup.ruby.rt.rp.a.button.label.summary.span.em.strong.b.i.u.s.small.mark.code.kbd.samp.var.sub.sup.abbr.cite.q.time.bdi.bdo.ins.del`.split(`.`));function em(e){if(!e)return null;let t=null,n=e;for(;n;)$p.has(n.tagName.toLowerCase())&&(t=n),n=n.parentElement;return t?.parentElement??null}var tm={"--color-accent":`var(--color-accent)`,"--color-accent-muted":`var(--color-accent-muted)`,"--color-on-accent":`var(--color-on-accent)`,"--color-neutral":`var(--color-neutral)`,"--color-background-surface":`var(--color-background-surface)`,"--color-background-body":`var(--color-background-body)`,"--color-overlay":`var(--color-overlay)`,"--color-overlay-hover":`var(--color-overlay-hover)`,"--color-overlay-pressed":`var(--color-overlay-pressed)`,"--color-background-muted":`var(--color-background-muted)`,"--color-text-primary":`var(--color-text-primary)`,"--color-text-secondary":`var(--color-text-secondary)`,"--color-text-disabled":`var(--color-text-disabled)`,"--color-text-accent":`var(--color-text-accent)`,"--color-on-dark":`var(--color-on-dark)`,"--color-on-light":`var(--color-on-light)`,"--color-icon-accent":`var(--color-icon-accent)`,"--color-icon-primary":`var(--color-icon-primary)`,"--color-icon-secondary":`var(--color-icon-secondary)`,"--color-icon-disabled":`var(--color-icon-disabled)`,"--color-background-card":`var(--color-background-card)`,"--color-background-popover":`var(--color-background-popover)`,"--color-background-inverted":`var(--color-background-inverted)`,"--color-background-error-inverted":`var(--color-background-error-inverted)`,"--color-success":`var(--color-success)`,"--color-success-muted":`var(--color-success-muted)`,"--color-on-success":`var(--color-on-success)`,"--color-error":`var(--color-error)`,"--color-error-muted":`var(--color-error-muted)`,"--color-on-error":`var(--color-on-error)`,"--color-warning":`var(--color-warning)`,"--color-warning-muted":`var(--color-warning-muted)`,"--color-on-warning":`var(--color-on-warning)`,"--color-border":`var(--color-border)`,"--color-border-emphasized":`var(--color-border-emphasized)`,"--color-skeleton":`var(--color-skeleton)`,"--color-track":`var(--color-track)`,"--color-shadow":`var(--color-shadow)`,"--color-tint-hover":`var(--color-tint-hover)`,"--color-background-blue":`var(--color-background-blue)`,"--color-border-blue":`var(--color-border-blue)`,"--color-icon-blue":`var(--color-icon-blue)`,"--color-text-blue":`var(--color-text-blue)`,"--color-background-cyan":`var(--color-background-cyan)`,"--color-border-cyan":`var(--color-border-cyan)`,"--color-icon-cyan":`var(--color-icon-cyan)`,"--color-text-cyan":`var(--color-text-cyan)`,"--color-background-gray":`var(--color-background-gray)`,"--color-border-gray":`var(--color-border-gray)`,"--color-icon-gray":`var(--color-icon-gray)`,"--color-text-gray":`var(--color-text-gray)`,"--color-background-green":`var(--color-background-green)`,"--color-border-green":`var(--color-border-green)`,"--color-icon-green":`var(--color-icon-green)`,"--color-text-green":`var(--color-text-green)`,"--color-background-orange":`var(--color-background-orange)`,"--color-border-orange":`var(--color-border-orange)`,"--color-icon-orange":`var(--color-icon-orange)`,"--color-text-orange":`var(--color-text-orange)`,"--color-background-pink":`var(--color-background-pink)`,"--color-border-pink":`var(--color-border-pink)`,"--color-icon-pink":`var(--color-icon-pink)`,"--color-text-pink":`var(--color-text-pink)`,"--color-background-purple":`var(--color-background-purple)`,"--color-border-purple":`var(--color-border-purple)`,"--color-icon-purple":`var(--color-icon-purple)`,"--color-text-purple":`var(--color-text-purple)`,"--color-background-red":`var(--color-background-red)`,"--color-border-red":`var(--color-border-red)`,"--color-icon-red":`var(--color-icon-red)`,"--color-text-red":`var(--color-text-red)`,"--color-background-teal":`var(--color-background-teal)`,"--color-border-teal":`var(--color-border-teal)`,"--color-icon-teal":`var(--color-icon-teal)`,"--color-text-teal":`var(--color-text-teal)`,"--color-background-yellow":`var(--color-background-yellow)`,"--color-border-yellow":`var(--color-border-yellow)`,"--color-icon-yellow":`var(--color-icon-yellow)`,"--color-text-yellow":`var(--color-text-yellow)`,__varGroupHash__:`xj0fimd`},nm={"--spacing-0":`var(--spacing-0)`,"--spacing-0-5":`var(--spacing-0-5)`,"--spacing-1":`var(--spacing-1)`,"--spacing-1-5":`var(--spacing-1-5)`,"--spacing-2":`var(--spacing-2)`,"--spacing-3":`var(--spacing-3)`,"--spacing-4":`var(--spacing-4)`,"--spacing-5":`var(--spacing-5)`,"--spacing-6":`var(--spacing-6)`,"--spacing-7":`var(--spacing-7)`,"--spacing-8":`var(--spacing-8)`,"--spacing-9":`var(--spacing-9)`,"--spacing-10":`var(--spacing-10)`,"--spacing-11":`var(--spacing-11)`,"--spacing-12":`var(--spacing-12)`,__varGroupHash__:`x1kvdh9l`},rm={"--focus-outline-width":`var(--focus-outline-width)`,"--focus-outline-style":`var(--focus-outline-style)`,"--focus-outline-color":`var(--focus-outline-color)`,"--focus-outline-offset":`var(--focus-outline-offset)`,__varGroupHash__:`xzxs3qz`},im={"--duration-fast-min":`var(--duration-fast-min)`,"--duration-fast":`var(--duration-fast)`,"--duration-fast-max":`var(--duration-fast-max)`,"--duration-medium-min":`var(--duration-medium-min)`,"--duration-medium":`var(--duration-medium)`,"--duration-medium-max":`var(--duration-medium-max)`,"--duration-slow-min":`var(--duration-slow-min)`,"--duration-slow":`var(--duration-slow)`,"--duration-slow-max":`var(--duration-slow-max)`,__varGroupHash__:`x14lkjui`},am={"--ease-standard":`var(--ease-standard)`,__varGroupHash__:`xf09i69`},om={0:`spacing0`,.5:`spacing0_5`,1:`spacing1`,1.5:`spacing1_5`,2:`spacing2`,3:`spacing3`,4:`spacing4`,5:`spacing5`,6:`spacing6`,8:`spacing8`,10:`spacing10`},sm={0:{kZCmMZ:`x18gyask`,kwRFfy:`x1s0aq8i`,kLKAdn:`x1ydh6w3`,kGO01o:`x1l20ajd`,$$css:!0},1:{kZCmMZ:`x1vsv5vr`,kwRFfy:`x1nryj5t`,kLKAdn:`xfsso4q`,kGO01o:`xy143xn`,$$css:!0},2:{kZCmMZ:`x12gdq22`,kwRFfy:`x1djylfy`,kLKAdn:`x1xye8es`,kGO01o:`x1wesfrj`,$$css:!0},3:{kZCmMZ:`x126nfab`,kwRFfy:`x1t818jl`,kLKAdn:`x1vlblms`,kGO01o:`xvmdzux`,$$css:!0},4:{kZCmMZ:`x1rey3nv`,kwRFfy:`xnjyzlh`,kLKAdn:`x1oa1p4a`,kGO01o:`x1awphl8`,$$css:!0},5:{kZCmMZ:`x1blguxw`,kwRFfy:`xdbrk9v`,kLKAdn:`xx7rijo`,kGO01o:`x1hk98q`,$$css:!0},6:{kZCmMZ:`x31w388`,kwRFfy:`x1we12cn`,kLKAdn:`x1adxfkp`,kGO01o:`xjpqqx5`,$$css:!0},8:{kZCmMZ:`x1j3hnjz`,kwRFfy:`x1q91b2g`,kLKAdn:`xoxd1wu`,kGO01o:`x2oz4g1`,$$css:!0},10:{kZCmMZ:`xqp078j`,kwRFfy:`x160ivqr`,kLKAdn:`xk6660b`,kGO01o:`x2izi54`,$$css:!0},"0.5":{kZCmMZ:`x138rykx`,kwRFfy:`x1le3yxw`,kLKAdn:`xbx876j`,kGO01o:`xij103a`,$$css:!0},"1.5":{kZCmMZ:`xfti1ec`,kwRFfy:`x17hk9do`,kLKAdn:`x1kwdpsa`,kGO01o:`x1opdxmq`,$$css:!0}},cm={0:{"--container-padding-inline-start":`x1gu2k80`,"--container-padding-inline-end":`x91ghl5`,$$css:!0},1:{"--container-padding-inline-start":`x1cvlban`,"--container-padding-inline-end":`x2oyxnl`,$$css:!0},2:{"--container-padding-inline-start":`x1xlrr2o`,"--container-padding-inline-end":`xcas3b9`,$$css:!0},3:{"--container-padding-inline-start":`xfdwxua`,"--container-padding-inline-end":`xu0ipoa`,$$css:!0},4:{"--container-padding-inline-start":`x1dlhslv`,"--container-padding-inline-end":`xs0pscg`,$$css:!0},5:{"--container-padding-inline-start":`x1s81nki`,"--container-padding-inline-end":`xgkj7vj`,$$css:!0},6:{"--container-padding-inline-start":`x1ep0dkj`,"--container-padding-inline-end":`x94cj42`,$$css:!0},8:{"--container-padding-inline-start":`xw1diwv`,"--container-padding-inline-end":`x1b9k1pi`,$$css:!0},10:{"--container-padding-inline-start":`xserb3f`,"--container-padding-inline-end":`xx5lg5w`,$$css:!0},"0.5":{"--container-padding-inline-start":`x14ws0sr`,"--container-padding-inline-end":`x1wz3t3y`,$$css:!0},"1.5":{"--container-padding-inline-start":`x176g23i`,"--container-padding-inline-end":`xntetml`,$$css:!0}},lm={0:{"--container-padding-block-start":`x1i3qcxz`,$$css:!0},1:{"--container-padding-block-start":`xnsckjb`,$$css:!0},2:{"--container-padding-block-start":`xa8b4fq`,$$css:!0},3:{"--container-padding-block-start":`x11k4f5r`,$$css:!0},4:{"--container-padding-block-start":`xm01sq8`,$$css:!0},5:{"--container-padding-block-start":`xp8wdkl`,$$css:!0},6:{"--container-padding-block-start":`x1hmud4d`,$$css:!0},8:{"--container-padding-block-start":`xfv60at`,$$css:!0},10:{"--container-padding-block-start":`x17h9kl7`,$$css:!0},"0.5":{"--container-padding-block-start":`xvdf9ev`,$$css:!0},"1.5":{"--container-padding-block-start":`x1kbx601`,$$css:!0}},um={0:{"--container-padding-block-end":`xkunwnr`,$$css:!0},1:{"--container-padding-block-end":`x57a7ii`,$$css:!0},2:{"--container-padding-block-end":`x1lsgcmx`,$$css:!0},3:{"--container-padding-block-end":`x1q3ppug`,$$css:!0},4:{"--container-padding-block-end":`x4hfsld`,$$css:!0},5:{"--container-padding-block-end":`xbib2ws`,$$css:!0},6:{"--container-padding-block-end":`x1q8d17g`,$$css:!0},8:{"--container-padding-block-end":`x8lgq76`,$$css:!0},10:{"--container-padding-block-end":`x15vxphk`,$$css:!0},"0.5":{"--container-padding-block-end":`x1cao3zv`,$$css:!0},"1.5":{"--container-padding-block-end":`xv53x8y`,$$css:!0}},dm={0:{kZCmMZ:`x18gyask`,$$css:!0},1:{kZCmMZ:`x1vsv5vr`,$$css:!0},2:{kZCmMZ:`x12gdq22`,$$css:!0},3:{kZCmMZ:`x126nfab`,$$css:!0},4:{kZCmMZ:`x1rey3nv`,$$css:!0},5:{kZCmMZ:`x1blguxw`,$$css:!0},6:{kZCmMZ:`x31w388`,$$css:!0},8:{kZCmMZ:`x1j3hnjz`,$$css:!0},10:{kZCmMZ:`xqp078j`,$$css:!0},"0.5":{kZCmMZ:`x138rykx`,$$css:!0},"1.5":{kZCmMZ:`xfti1ec`,$$css:!0}},fm={0:{kwRFfy:`x1s0aq8i`,$$css:!0},1:{kwRFfy:`x1nryj5t`,$$css:!0},2:{kwRFfy:`x1djylfy`,$$css:!0},3:{kwRFfy:`x1t818jl`,$$css:!0},4:{kwRFfy:`xnjyzlh`,$$css:!0},5:{kwRFfy:`xdbrk9v`,$$css:!0},6:{kwRFfy:`x1we12cn`,$$css:!0},8:{kwRFfy:`x1q91b2g`,$$css:!0},10:{kwRFfy:`x160ivqr`,$$css:!0},"0.5":{kwRFfy:`x1le3yxw`,$$css:!0},"1.5":{kwRFfy:`x17hk9do`,$$css:!0}},pm={0:{kLKAdn:`x1ydh6w3`,$$css:!0},1:{kLKAdn:`xfsso4q`,$$css:!0},2:{kLKAdn:`x1xye8es`,$$css:!0},3:{kLKAdn:`x1vlblms`,$$css:!0},4:{kLKAdn:`x1oa1p4a`,$$css:!0},5:{kLKAdn:`xx7rijo`,$$css:!0},6:{kLKAdn:`x1adxfkp`,$$css:!0},8:{kLKAdn:`xoxd1wu`,$$css:!0},10:{kLKAdn:`xk6660b`,$$css:!0},"0.5":{kLKAdn:`xbx876j`,$$css:!0},"1.5":{kLKAdn:`x1kwdpsa`,$$css:!0}},mm={0:{kGO01o:`x1l20ajd`,$$css:!0},1:{kGO01o:`xy143xn`,$$css:!0},2:{kGO01o:`x1wesfrj`,$$css:!0},3:{kGO01o:`xvmdzux`,$$css:!0},4:{kGO01o:`x1awphl8`,$$css:!0},5:{kGO01o:`x1hk98q`,$$css:!0},6:{kGO01o:`xjpqqx5`,$$css:!0},8:{kGO01o:`x2oz4g1`,$$css:!0},10:{kGO01o:`x2izi54`,$$css:!0},"0.5":{kGO01o:`xij103a`,$$css:!0},"1.5":{kGO01o:`x1opdxmq`,$$css:!0}},hm={reset:{"--container-padding-inline-start":`xrhngw9`,"--container-padding-inline-end":`xjsfl84`,"--container-padding-block-start":`x1047aw6`,"--container-padding-block-end":`xax9j7h`,"--layout-padding-outer-x":`xdt8ak2`,"--layout-padding-outer-y":`x1rs4lu4`,"--layout-padding-inner-x":`x1qfll2g`,"--layout-padding-inner-y":`xyvxpqs`,"--_section-padding-propagated":`x1f17rg1`,$$css:!0}},gm=h(),_m={keoZOQ:`x1vhfslr`,k1K539:`xlm3tn6`,$$css:!0},vm={base:{keoZOQ:`xdj266r`,k1K539:`xat24cr`,keTefX:`x1lziwak`,k71WvV:`x14z9mp`,kLKAdn:`xexx8yu`,kGO01o:`x18d9i69`,kZCmMZ:`x1c1uobl`,kwRFfy:`xyri2b`,kMzoRj:`xc342km`,ksu8eU:`xng3xce`,kVQacm:`x1rea2x4`,kMv6JI:`x9ynric`,kGuDYH:`xjm74w1`,kLWn49:`xw6l6zx`,kWkggS:`xjbqb8w`,$$css:!0},fixed:{kVAEAm:`xixxii4`,$$css:!0},offsetBlock:e=>[_m,{"--x-marginBlockStart":(e=>typeof e==`number`?e+`px`:e??void 0)(e),"--x-marginBlockEnd":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}],offsetInline:e=>[{keTefX:e==null?e:`x4lel18`,k71WvV:e==null?e:`x1c9tiao`,$$css:!0},{"--x-marginInlineStart":(e=>typeof e==`number`?e+`px`:e??void 0)(e),"--x-marginInlineEnd":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}]};function ym(e){return typeof e==`number`?`${e}px`:e}function bm(e,t){let n=e.ownerDocument.defaultView;if(!n)return{};let r=n.getComputedStyle(e),i=n.getComputedStyle(t);return{...r.direction!==i.direction&&{direction:r.direction},...r.writingMode!==i.writingMode&&{writingMode:r.writingMode}}}function xm(e=`above`,t=`center`){if(e===`above`||e===`below`){let n=e===`above`?`self-block-start`:`self-block-end`;return t===`start`?`${n} span-self-inline-end`:t===`end`?`${n} span-self-inline-start`:n}let n=e===`start`?`self-inline-start`:`self-inline-end`;return t===`start`?`${n} span-self-block-end`:t===`end`?`${n} span-self-block-start`:n}function Sm(e=`above`,t=`center`){let n=`flip-block, flip-inline, flip-block flip-inline`;if(t!==`center`)return n;if(e===`above`||e===`below`){let[t,r]=e===`above`?[`top`,`bottom`]:[`bottom`,`top`];return`${n}, ${t} span-left, ${t} span-right, ${r} span-left, ${r} span-right`}let[r,i]=e===`start`?[`left`,`right`]:[`right`,`left`];return`${n}, ${r} span-top, ${r} span-bottom, ${i} span-top, ${i} span-bottom`}function Cm(e){let{mode:t,onShow:n,onHide:r,lightDismiss:i=!1}=e,a=t===`context`?e.lazyMount??!1:!1,o=(0,w.useId)(),s=`--astryx-layer-${o.replace(/:/g,``)}`,[c,l]=(0,w.useState)(!1),u=(0,w.useRef)(null),d=(0,w.useRef)(null),f=(0,w.useRef)(null),p=(0,w.useRef)(null),m=(0,w.useRef)(null),[h,g]=(0,w.useState)(null),_=(0,w.useRef)(!1),v=(0,w.useRef)(!1),y=(0,w.useRef)(null),b=(0,w.useRef)(null),x=(0,w.useCallback)(()=>{let e=Zp();return y.current===e},[]),S=(0,w.useCallback)(e=>{typeof e.showPopover==`function`?e.showPopover({source:f.current??void 0}):e.style.display=`block`,d.current=e},[]),C=(0,w.useCallback)(e=>{if(t!==`context`)return!0;let n=m.current;if(n===null)return!1;let r=n.portalTarget??p.current?.parentElement??null;return e.parentElement===r},[t]),T=(0,w.useCallback)(()=>{if(t!==`context`)return;let e=p.current,n=e?.parentElement??null;if(!e||!n)return;let r=em(n),i={portalTarget:r,portalStyle:r?bm(e,r):{}};m.current=i,g(i)},[t]),E=(0,w.useCallback)(()=>{t!==`context`||!a||(m.current=null,g(null))},[t,a]),D=(0,w.useCallback)(()=>{if(x())return;let e=u.current,t=e&&C(e)?e:null;if(!t){_.current=!0,T();return}v.current||(S(t),v.current=!0,l(!0),n?.())},[n,T,S,C,x]),O=(0,w.useCallback)(()=>{if(_.current=!1,v.current){let e=u.current;d.current=null,v.current=!1,e&&(typeof e.hidePopover==`function`?e.hidePopover():e.style.display=`none`),l(!1),r?.()}E()},[r,E]),k=(0,w.useCallback)(e=>{f.current&&f.current!==e&&Wp(f.current,s),e&&Up(e,s),f.current=e},[s]),A=(0,w.useCallback)(e=>{if(b.current?.(),Qp())return;y.current=Zp();let t=e.defaultView,n=null,r=()=>{y.current=null,e.removeEventListener(`click`,i,!0),n!==null&&(t?.clearTimeout(n),n=null),b.current===r&&(b.current=null)},i=()=>{e.removeEventListener(`click`,i,!0),t?n=t.setTimeout(()=>{n=null,b.current===r&&r()},0):r()};e.addEventListener(`click`,i,!0),b.current=r},[]);(0,w.useEffect)(()=>(Zp(),()=>b.current?.()),[]);let j=(0,w.useCallback)(e=>{e.newState===`closed`&&v.current&&(d.current=null,v.current=!1,A(e.currentTarget?.ownerDocument??document),l(!1),r?.(),E())},[r,E,A]),M=(0,w.useRef)(null),N=(0,w.useRef)(null),P=(0,w.useCallback)((e,t)=>{M.current&&N.current&&(M.current!==e||N.current!==t)&&(M.current.removeEventListener(`toggle`,N.current),M.current=null,N.current=null),e&&M.current!==e&&(e.addEventListener(`toggle`,t),M.current=e,N.current=t)},[]),F=(0,w.useCallback)(e=>{u.current=e,P(e,j),e&&_.current?(_.current=!1,D()):e&&v.current&&d.current!==e&&C(e)&&S(e)},[j,P,D,S,C]),I=(0,w.useCallback)(e=>{p.current=e,e&&(!a||_.current||v.current)&&T()},[a,T]);(0,w.useEffect)(()=>(u.current&&P(u.current,j),()=>{M.current&&N.current&&(M.current.removeEventListener(`toggle`,N.current),M.current=null,N.current=null)}),[j,P]);let L=(0,w.useCallback)((e,t)=>{let n=(0,K.jsx)(`template`,{ref:I});if(h===null)return(0,K.jsx)(K.Fragment,{children:n});let{placement:r=`above`,alignment:a=`center`,positioning:c=`anchor`,offset:l,role:u,"aria-label":d,xstyle:f,className:p,style:m,as:g=`div`,onMouseEnter:_,onMouseLeave:v}=t||{},y=c===`custom`?{positionAnchor:s}:{positionAnchor:s,positionArea:xm(r,a),positionTryFallbacks:Sm(r,a)},b=c===`anchor`&&l?r===`above`||r===`below`?vm.offsetBlock(ym(l)):vm.offsetInline(ym(l)):null,x=Y(vm.base,hm.reset,b,f),S=p?`${p} ${x.className??``}`:x.className,C=(0,K.jsx)(g,{ref:F,id:o,role:u,"aria-label":d,popover:i?`auto`:`manual`,className:S,style:{...x.style,...y,...h.portalStyle,...m},onMouseEnter:_,onMouseLeave:v,children:e});return(0,K.jsxs)(K.Fragment,{children:[n,h.portalTarget?(0,gm.createPortal)(C,h.portalTarget):C]})},[s,h,o,i,F,I]),R=(0,w.useCallback)((e,t)=>{let{x:n,y:r,xstyle:a,className:s,style:c}=t,l={top:r,left:n},u=Y(vm.base,hm.reset,vm.fixed,a),d=s?`${s} ${u.className??``}`:u.className;return(0,K.jsx)(`div`,{ref:F,id:o,popover:i?`auto`:`manual`,className:d,style:{...u.style,...l,...c},children:e})},[F,o,i]),z=(0,w.useMemo)(()=>({ref:k,anchorId:s,show:D,hide:O,isOpen:c,wasJustDismissed:x,id:o,render:L}),[k,s,D,O,c,x,o,L]),B=(0,w.useMemo)(()=>({ref:void 0,show:D,hide:O,isOpen:c,wasJustDismissed:x,id:o,render:R}),[D,O,c,x,o,R]);return t===`context`?z:B}function wm(e){let t=Cm(e);return(0,w.useMemo)(()=>{let{wasJustDismissed:e,...n}=t;return n},[t])}function Tm(e){return Cm(e)}var Em=`button:not([disabled]), a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), [contenteditable]:not([contenteditable="false"]), audio[controls], video[controls], iframe, details > summary:first-child`,Dm=(0,w.createContext)(0);Dm.displayName=`LayerDepthContext`;function Om(){return(0,w.use)(Dm)}function km({children:e}){let t=(0,w.use)(Dm);return(0,K.jsx)(Dm,{value:t+1,children:e})}km.displayName=`LayerDepthProvider`;var Am=229;function jm(e){return e.isComposing===!0||e.keyCode===Am}var Mm=[],Nm=new WeakMap,Pm=0,Fm=!1;function Im(e){let t=Nm.get(e);if(t!==void 0)return t;let n=Pm++;return Nm.set(e,n),n}function Lm(e,t){if(e.depth!==t.depth)return e.depth-t.depth;let n=e.getContainer?.()??null,r=t.getContainer?.()??null;if(n!=null&&r!=null&&n!==r){if(r.contains(n))return 1;if(n.contains(r))return-1}return e.seq-t.seq}function Rm(e){return e.isPresent?.()??!0}var zm=!1;function Bm(){return zm}function Vm(){zm=!0}function Hm(){zm=!1}function Um(){let e=null;for(let t of Mm)Rm(t)&&(e==null||Lm(t,e)>0)&&(e=t);return e}function Wm(e){return Um()?.token===e}function Gm(){let e=Um();return e!=null&&(e.behavior===`block`||e.dismiss(),!0)}function Km(e){if(e.key===`Escape`){if(jm(e)){Um()!=null&&e.preventDefault();return}e.defaultPrevented||Gm()&&e.preventDefault()}}function qm(){Fm||typeof document>`u`||(document.addEventListener(`keydown`,Km),document.addEventListener(`compositionstart`,Vm,!0),document.addEventListener(`compositionend`,Hm,!0),document.addEventListener(`blur`,Hm,!0),Fm=!0)}function Jm(){!Fm||typeof document>`u`||(document.removeEventListener(`keydown`,Km),document.removeEventListener(`compositionstart`,Vm,!0),document.removeEventListener(`compositionend`,Hm,!0),document.removeEventListener(`blur`,Hm,!0),zm=!1,Fm=!1)}function Ym(e){let t={...e,seq:Im(e.token)};return Mm.push(t),qm(),()=>{let e=Mm.indexOf(t);e!==-1&&Mm.splice(e,1),Mm.length===0&&Jm()}}function Xm(e){let{isActive:t,onDismiss:n,escapeBehavior:r=`close`,getContainer:i,isPresent:a,isEnabled:o=!0}=e,s=Om(),c=(0,w.useRef)({}),l=(0,w.useRef)(n),u=(0,w.useRef)(i),d=(0,w.useRef)(a);(0,w.useEffect)(()=>{l.current=n,u.current=i,d.current=a});let f=t&&o;return(0,w.useEffect)(()=>{if(f)return Ym({token:c.current,depth:s,behavior:r,getContainer:()=>u.current?.()??null,isPresent:()=>d.current?.()??!0,dismiss:()=>l.current()})},[f,s,r]),{shouldDismissOnCloseRequest:(0,w.useCallback)(()=>f&&!Bm()&&Wm(c.current),[f])}}var Zm=0;function Qm(e){if(e.hasAttribute(`inert`)||e.closest(`[inert]`)||e.hidden||e.closest(`[hidden]`)||e.closest(`[aria-hidden="true"]`))return!1;if(typeof window<`u`&&window.getComputedStyle){let t=window.getComputedStyle(e);if(t.visibility===`hidden`||t.display===`none`)return!1}return!0}function $m(e){return Array.from(e.querySelectorAll(Em)).filter(Qm)}function eh(e){try{e.focus()}catch{}return document.activeElement===e}function th(e){let t=$m(e);for(let e of t)if(eh(e))return!0;return!1}function nh(e){let t=$m(e);for(let e=t.length-1;e>=0;e--)if(eh(t[e]))return!0;return!1}function rh(e){let{isActive:t,onEscape:n}=e,r=(0,w.useRef)(null),i=(0,w.useRef)(null),a=(0,w.useRef)(!1),o=t&&n!=null;Xm({isActive:o,onDismiss:()=>{n?.()},getContainer:()=>r.current}),(0,w.useEffect)(()=>{if(o)return Zm+=1,()=>{--Zm}},[o]);let s=(0,w.useCallback)(()=>{r.current&&th(r.current)},[]);return(0,w.useEffect)(()=>{if(!t)return;let e=document.activeElement,n=r.current;return()=>{let t=document.activeElement;(t==null||t===document.body||t===document.documentElement||n!=null&&n.contains(t))&&e!=null&&e.isConnected&&typeof e.focus==`function`&&e.focus()}},[t]),(0,w.useEffect)(()=>{if(!t)return;let e=e=>{let t=r.current;if(!t)return;let n=e.target;if(t.contains(n))i.current=n;else if(a.current){let e=th(t);e&&i.current===document.activeElement?nh(t):!e&&i.current instanceof HTMLElement&&t.contains(i.current)&&eh(i.current),i.current=document.activeElement}a.current=!1};return document.addEventListener(`focus`,e,!0),()=>{document.removeEventListener(`focus`,e,!0)}},[t]),(0,w.useEffect)(()=>{if(!t)return;let e=e=>{let t=r.current;if(t&&e.key===`Tab`){a.current=!0;let n=$m(t);if(n.length===0){let n=document.activeElement;if(!(n instanceof HTMLElement)||!t.contains(n))return;e.preventDefault(),i.current=n,a.current=!1;return}let r=n[0],o=n[n.length-1];e.shiftKey?document.activeElement===r&&(e.preventDefault(),o.focus()):document.activeElement===o&&(e.preventDefault(),r.focus())}};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[t,n]),{containerRef:r,focusFirst:s}}var ih=`keyboard`,ah=!1;function oh(){ih=`pointer`}function sh(e){e.metaKey||e.altKey||e.ctrlKey||(ih=`keyboard`)}function ch(){ah||typeof document>`u`||(ah=!0,document.addEventListener(`pointerdown`,oh,{capture:!0,passive:!0}),document.addEventListener(`keydown`,sh,{capture:!0,passive:!0}))}function lh(){return ih}var uh=new Set([`touch`,`pen`]),dh=new Set([`button`,`checkbox`,`combobox`,`link`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`searchbox`,`slider`,`spinbutton`,`switch`,`tab`,`textbox`]);function fh(e){let t=e.getAttribute(`role`);if(t!=null&&t!==``)return dh.has(t);switch(e.tagName){case`BUTTON`:case`INPUT`:case`LABEL`:case`SELECT`:case`SUMMARY`:case`TEXTAREA`:return!0;case`A`:case`AREA`:return e.hasAttribute(`href`);default:return ph(e)}}function ph(e){if(e.isContentEditable===!0)return!0;let t=e.getAttribute(`contenteditable`);return t!=null&&t!==`false`}function mh(e){let{touchTrigger:t,isEnabled:n,isControlled:r,isOpen:i,layerId:a,triggerRef:o,show:s,hide:c}=e,l=(0,w.useRef)(!1),u=(0,w.useRef)(i);u.current=i;let d=(0,w.useRef)(c);d.current=c;let f=(0,w.useRef)(a);f.current=a;let p=(0,w.useRef)(!1),m=(0,w.useRef)(null);(0,w.useEffect)(()=>{ch()},[]);let h=(0,w.useCallback)(()=>{p.current=!1;let e=m.current;e!=null&&(m.current=null,document.removeEventListener(`pointerdown`,e,!0))},[]),g=(0,w.useCallback)(()=>{if(p.current=!0,m.current!=null)return;let e=e=>{let t=e.target;(t==null||o.current?.contains(t)!==!0&&document.getElementById(f.current)?.contains(t)!==!0)&&(h(),d.current())};m.current=e,document.addEventListener(`pointerdown`,e,!0)},[o,h]);(0,w.useEffect)(()=>h,[h]);let _=(0,w.useCallback)(()=>l.current&&lh()===`pointer`,[]),v=(0,w.useCallback)(e=>{l.current=e.pointerType===`touch`},[]),y=(0,w.useCallback)(e=>{let i=uh.has(e.pointerType);if(l.current=i,!i||r)return!1;let a=o.current;return(t===`auto`?a!=null&&fh(a)?`none`:`tap`:t)===`none`||!n||u.current||p.current?(h(),c(),!0):(g(),s(),!0)},[t,n,r,o,s,c,g,h]),b=(0,w.useRef)(i);return(0,w.useEffect)(()=>{b.current&&!i&&h(),b.current=i},[i,h]),{isTouchPointerRef:l,isTouchInteraction:_,handlePointerEnter:v,handlePointerDown:y,clearTapOpen:h}}im[`--duration-fast-max`],am[`--ease-standard`];var hh={below:{kKVMdj:`xl1vlw0 x1aquc0h`,k44tkh:`x9uej1z`,kyAemX:`x128ha8g`,kWV6AL:`xskzprw`,$$css:!0},above:{kKVMdj:`x3psbcj x1aquc0h`,k44tkh:`x9uej1z`,kyAemX:`x128ha8g`,kWV6AL:`xskzprw`,$$css:!0},end:{kKVMdj:`x1i331go x1vxsm5i x1aquc0h`,k44tkh:`x9uej1z`,kyAemX:`x128ha8g`,kWV6AL:`xskzprw`,$$css:!0},start:{kKVMdj:`xck01x9 x18lne9g x1aquc0h`,k44tkh:`x9uej1z`,kyAemX:`x128ha8g`,kWV6AL:`xskzprw`,$$css:!0}},gh=`astryx`,_h=gh,vh=gh,yh=gh;function bh(e){return`${_h}-${e}`}function xh(e){return`data-${vh}-${e}`}function Sh(e){return`--${yh}-${e}`}function Ch(e){return`data-${e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase()}`}function wh(e,t){return/^\d/.test(t)?`${e}-${t}`:t}function Th(e,t){let n=[bh(e)];if(t)for(let[e,r]of Object.entries(t))r!=null&&n.push(wh(e,String(r)));return n.join(` `)}function Eh(e){let t={};if(e)for(let[n,r]of Object.entries(e))r!=null&&(t[Ch(n)]=String(r));return t}function X(e,t,n){let r=Th(e,t),i=n?.legacyNames?.map(e=>bh(e))??[];return{className:i.length>0?[r,...i].join(` `):r,...Eh(t)}}var Dh=100,Oh={container:{kWkggS:`x19aspcf`,kMwMTN:`xrkvqaz`,kaIpWk:`x1hviunn`,kMv6JI:`x9ynric`,kGuDYH:`xjm74w1`,kLWn49:`xw6l6zx`,$$css:!0}};function kh(e){return e.hasAttribute(`tabindex`)?e.tabIndex>=0:[`A`,`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`].includes(e.tagName)?!e.disabled:!!e.isContentEditable}function Ah(e={}){let{placement:t=`above`,alignment:n=`center`,delay:r=200,hideDelay:i=0,focusTrigger:a=`auto`,touchTrigger:o=`auto`,isEnabled:s=!0,isOpen:c,isDefaultOpen:l=!1,onShow:u,onHide:d}=e,f=wm({mode:`context`,onShow:u,onHide:d}),p=Oh.container,m=(0,w.useRef)(null),h=(0,w.useRef)(null),g=(0,w.useRef)(null),_=(0,w.useCallback)(()=>{m.current&&=(clearTimeout(m.current),null),h.current&&=(clearTimeout(h.current),null)},[]),v=(0,w.useCallback)(()=>{_(),f.show()},[_,f]),y=(0,w.useCallback)(()=>{_(),f.hide()},[_,f]),b=mh({touchTrigger:o,isEnabled:s,isControlled:c!==void 0,isOpen:f.isOpen,layerId:f.id,triggerRef:g,show:v,hide:y}),x=(0,w.useCallback)(()=>{!s||c===!1||(_(),m.current=setTimeout(()=>{f.show()},r))},[s,c,_,f,r]),S=(0,w.useCallback)(()=>{c!==!0&&(_(),h.current=setTimeout(()=>{f.hide()},i>0?i:Dh))},[c,_,f,i]),C=(0,w.useCallback)(()=>{h.current&&=(clearTimeout(h.current),null)},[]),T=(0,w.useCallback)(()=>{b.isTouchPointerRef.current||x()},[b,x]),E=(0,w.useCallback)(()=>{b.isTouchPointerRef.current||S()},[b,S]),D=(0,w.useCallback)(e=>{s&&(b.isTouchInteraction()||e.target.matches(`:focus-visible`)&&(_(),f.show()))},[s,b,_,f]),O=(0,w.useCallback)(()=>{S()},[S]),k=(0,w.useCallback)(e=>{b.handlePointerDown(e)||c===void 0&&(_(),f.hide())},[b,c,_,f]),{handlePointerEnter:A,clearTapOpen:j}=b,M=(0,w.useCallback)(e=>{g.current&&(g.current.removeEventListener(`mouseenter`,T),g.current.removeEventListener(`mouseleave`,E),g.current.removeEventListener(`focusin`,D),g.current.removeEventListener(`focusout`,O),g.current.removeEventListener(`pointerenter`,A),g.current.removeEventListener(`pointerdown`,k)),e&&(e.addEventListener(`pointerenter`,A),e.addEventListener(`mouseenter`,T),e.addEventListener(`mouseleave`,E),e.addEventListener(`pointerdown`,k),(a===`always`||a===`auto`&&kh(e))&&(e.addEventListener(`focusin`,D),e.addEventListener(`focusout`,O))),g.current=e},[a,T,E,D,O,A,k]),N=(0,w.useCallback)(e=>{f.ref(e),M(e)},[f,M]);(0,w.useEffect)(()=>()=>{_()},[_]),(0,w.useEffect)(()=>{l&&f.show()},[]),(0,w.useEffect)(()=>{c!==void 0&&(c?(_(),f.show()):(_(),f.hide()))},[c,_,f]),Xm({isActive:!0,isPresent:()=>{let e=typeof document>`u`?null:document.getElementById(f.id);if(e==null)return!1;try{return e.matches(`:popover-open`)}catch{return f.isOpen}},onDismiss:()=>{if(_(),j(),c!==void 0){d?.();return}f.hide()}});let P=(0,w.useCallback)((e,r)=>{let i=r?.placement??t,a={placement:i,alignment:r?.alignment??n,offset:nm[`--spacing-1`],role:`tooltip`,xstyle:[p,hh[i]],className:X(`tooltip`).className,onMouseEnter:C,onMouseLeave:S};return f.render((0,K.jsx)(`div`,{className:`xfsso4q xy143xn x12gdq22 x1djylfy xw5ewwj x13faqbe`,children:e}),a)},[f,t,n,p,C,S]);return{ref:N,positionRef:f.ref,interactionRef:M,anchorId:f.anchorId,describedBy:f.id,renderTooltip:P}}var jh={primary:{kMwMTN:`x1tgivj0`,$$css:!0},secondary:{kMwMTN:`xv1l7n4`,$$css:!0},disabled:{kMwMTN:`xnbbluu`,$$css:!0},placeholder:{kMwMTN:`xv1l7n4`,$$css:!0},accent:{kMwMTN:`xjse4m1`,$$css:!0},inherit:{kMwMTN:`x1heor9g`,$$css:!0}},Mh={normal:{k63SB2:`x1sodnla`,$$css:!0},medium:{k63SB2:`x1e4wzip`,$$css:!0},semibold:{k63SB2:`x2mo6ok`,$$css:!0},bold:{k63SB2:`x1lvx875`,$$css:!0}},Nh={body:{k63SB2:`xxovm9e`,$$css:!0},large:{k63SB2:`x149oux8`,$$css:!0},label:{k63SB2:`xmhvcl5`,$$css:!0},code:{k63SB2:`xx3eeay`,$$css:!0},supporting:{k63SB2:`xv8on6e`,$$css:!0},"display-1":{k63SB2:`x1txul5o`,$$css:!0},"display-2":{k63SB2:`x1y36c3f`,$$css:!0},"display-3":{k63SB2:`x1on40hk`,$$css:!0},inherit:{k63SB2:`x1pd3egz`,$$css:!0}},Ph={body:{kGuDYH:`xjm74w1`,kLWn49:`xw6l6zx`,$$css:!0},large:{kGuDYH:`x18juvz8`,kLWn49:`xf74fhv`,$$css:!0},label:{kGuDYH:`xcr08ib`,kLWn49:`x1kq96og`,$$css:!0},code:{kGuDYH:`xp03k98`,kLWn49:`x17iicif`,kMv6JI:`x9m5x89`,$$css:!0},supporting:{kGuDYH:`x141an7d`,kLWn49:`x1ltkj2j`,$$css:!0},"display-1":{kGuDYH:`xsub3ws`,kLWn49:`x112ttwr`,$$css:!0},"display-2":{kGuDYH:`x1yego12`,kLWn49:`xh0iwvy`,$$css:!0},"display-3":{kGuDYH:`xlgnzhf`,kLWn49:`x1ujwuaq`,$$css:!0},inherit:{kGuDYH:`x1qlqyl8`,kLWn49:`x15bjb6t`,$$css:!0}},Fh={"4xs":{kGuDYH:`xxc45ev`,$$css:!0},"3xs":{kGuDYH:`x10p7juq`,$$css:!0},"2xs":{kGuDYH:`x16a80zy`,$$css:!0},xsm:{kGuDYH:`x51wmvv`,$$css:!0},sm:{kGuDYH:`x1eqnyfr`,$$css:!0},base:{kGuDYH:`x1j29vfg`,$$css:!0},lg:{kGuDYH:`xc7cgfe`,$$css:!0},xl:{kGuDYH:`x1wqms48`,$$css:!0},"2xl":{kGuDYH:`xhs0kqb`,$$css:!0},"3xl":{kGuDYH:`x10srzze`,$$css:!0},"4xl":{kGuDYH:`xqcvi3d`,$$css:!0}},Ih={inline:{k1xSpc:`xt0psk2`,$$css:!0},block:{k1xSpc:`x1lliihq`,$$css:!0}},Lh={singleLine:{kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,k1xSpc:`x1lliihq`,$$css:!0},multiLine:{kVQacm:`xb3r6kr`,k1xSpc:`x104kibb`,kgKLqz:`x1ua5tub`,$$css:!0}},Rh={"break-word":{kTgw9:`x1lldw8n`,kHjlTd:`x1mzt3pk`,$$css:!0},"break-all":{kTgw9:`x1yn0g08`,$$css:!0}},zh={wrap:{kN2L0X:`xk4td0m`,$$css:!0},nowrap:{kN2L0X:`xebhuq6`,$$css:!0},balance:{kN2L0X:`x1w2vvpw`,$$css:!0},pretty:{kN2L0X:`x1fzhlzt`,$$css:!0}},Bh={enabled:{kxwWH2:`x1b2iylo`,kzeHkT:`xwgcxoh`,k1xSpc:`x1lliihq`,$$css:!0}},Vh={strikethrough:{kybGjl:`xmqliwb`,$$css:!0}},Hh={enabled:{kcqcaj:`xss6m8b`,$$css:!0}},Uh={start:{k9WMMc:`x1yc453h`,$$css:!0},center:{k9WMMc:`x2b8uid`,$$css:!0},end:{k9WMMc:`xp4054r`,$$css:!0}},Wh={content:{ks0D6T:`xw5ewwj`,kTgw9:`x13faqbe`,$$css:!0}},Gh=null,Kh=new Map;function qh(){return typeof ResizeObserver>`u`?null:(Gh||=new ResizeObserver(e=>{for(let t of e){let e=Kh.get(t.target);e&&e(t)}}),Gh)}function Jh(e,t){Kh.set(e,t),qh()?.observe(e),t({target:e})}function Yh(e){Kh.delete(e),Gh&&(Gh.unobserve(e),Kh.size===0&&(Gh.disconnect(),Gh=null))}function Xh(e){let{maxLines:t}=e,[n,r]=(0,w.useState)(!1),[i,a]=(0,w.useState)(``),o=(0,w.useRef)(null),s=(0,w.useCallback)(e=>{if(t===0){r(!1);return}if(a(e.textContent??``),t===1)r(e.scrollWidth>e.offsetWidth);else{let t=e.scrollHeight;try{let n=document.createRange();n.selectNodeContents(e),t=n.getBoundingClientRect().height,n.detach()}catch{}r(t>e.offsetHeight)}},[t]);return{ref:(0,w.useCallback)(e=>{o.current&&Yh(o.current),o.current=e,e&&t>0?typeof ResizeObserver<`u`?Jh(e,()=>{s(e)}):s(e):(r(!1),a(``))},[t,s]),isTruncated:n,fullText:i}}function Zh(e){return e===`base`?``:e.split(`+`).map(e=>{let[t,n]=e.split(`:`);return n===void 0?`.${t}`:/^\d/.test(n)?`.${t}-${n}`:`.${n}`}).join(``)}function Qh(e,t){let n={...e,...t},r=[e.className,t.className].filter(Boolean).join(` `);r?n.className=r:delete n.className;let i=t.style&&e.style?{...e.style,...t.style}:t.style||e.style;return i?n.style=i:delete n.style,n}function $h(e,t,n,r){if(typeof e==`string`){let i=e,a=t??{className:``},o=n,s=a.className?`${i} ${a.className}`:i;o&&(s=`${s} ${o}`);let c=r&&a.style?{...a.style,...r}:r||a.style;return{...a,className:s,style:c}}let i=Qh(e,typeof t==`string`?{className:t}:t??{});return typeof n==`string`?i=Qh(i,{className:n}):n!=null&&(i=Qh(i,{style:n})),r!=null&&(i=Qh(i,{style:r})),i}function eg(...e){return t=>{let n=[];for(let r of e)if(typeof r==`function`){let e=r(t);n.push(typeof e==`function`?e:()=>r(null))}else if(r!=null){let e=r;e.current=t,n.push(()=>{e.current=null})}if(t!=null&&n.length>0)return()=>{for(let e of n)e()}}}function tg(...e){return t=>{for(let n of e)if(n?.(t),t.defaultPrevented)return}}function ng(e){return e!=null&&typeof e!=`boolean`&&e!==``}function rg(...e){let t=e.flatMap(e=>typeof e==`string`?e.trim().split(/\s+/):[]).filter(Boolean);if(t.length!==0)return Array.from(new Set(t)).join(` `)}function ig(e,t=[],n){return{ariaLabelledBy:n?rg(n.labelID,e):void 0,ariaDescribedBy:rg(n?.describedByIDs,...t)}}var ag={kbCHJM:`x1nrll8i`,k3aq6I:`xsqj5wx`,$$css:!0},og={mirror:{k3aq6I:`xgtlewx`,$$css:!0},centerInline:e=>[ag,{"--x-transform":`translate(-50%, ${e})`==null?void 0:`translate(-50%, ${e})`}]},sg=rm[`--focus-outline-width`],cg=rm[`--focus-outline-style`],lg=rm[`--focus-outline-color`];rm[`--focus-outline-offset`],`${sg}${cg}${lg}`;var ug={focusVisible:{kMeerF:`x1k57tk5 x1vidyx5`,k3XXqK:`x1t137rt x1jhp3zv`,kjBf7l:`xx47ajj`,kInvED:`x1wfwxd8 x1vwwbsn`,$$css:!0},focusWithin:{kMeerF:`x1k57tk5 x11j6mr8`,k3XXqK:`x1t137rt xciu248`,kjBf7l:`x1uy843r`,kInvED:`x1wfwxd8 x1jumodi`,$$css:!0},focusWithinFirstChild:{kMeerF:`x1k57tk5 xmmisi4`,k3XXqK:`x1t137rt xfd04fr`,kjBf7l:`xobxmqy`,kInvED:`x1wfwxd8 x2vr5qc`,$$css:!0},suppressed:{kMeerF:`x1k57tk5`,k3XXqK:`x1t137rt`,kInvED:`x1wfwxd8`,$$css:!0},publishFocusVisibleVars:{"--_focus-outline":`x17wzz1v xqih627`,"--_focus-outline-offset":`xgzxwq1 xqchwus`,$$css:!0},focusWithinOrPublished:{kI3sdo:`xaw4jrz x16s19ga`,kInvED:`x1kvmbwa x1jumodi`,$$css:!0}};function dg(e){return(...t)=>Y(e,...t)}var fg={focusVisible:dg(ug.focusVisible),focusWithin:dg(ug.focusWithin),focusWithinFirstChild:dg(ug.focusWithinFirstChild),suppressed:dg(ug.suppressed),publishFocusVisibleVars:dg(ug.publishFocusVisibleVars),focusWithinOrPublished:dg(ug.focusWithinOrPublished)};function pg(e,t,n,r,i,a){return(0,w.useMemo)(()=>eg(e,t,n,r,i,a),[e,t,n,r,i,a])}var mg=`modulepreload`,hg=function(e){return`/`+e},gg={},_g=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=hg(t,n),t=s(t),t in gg)return;gg[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:mg,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},vg=(0,w.lazy)(async()=>_g(()=>Promise.resolve().then(()=>Fb).then(e=>({default:e.Tooltip})),void 0)),yg={body:`primary`,large:`primary`,label:`primary`,supporting:`secondary`,code:`primary`,"display-1":`primary`,"display-2":`primary`,"display-3":`primary`,inherit:`inherit`};function bg(e){return e in Ph?e:`body`}function xg(e){return e in jh?e:`primary`}function Sg({type:e=`body`,size:t,color:n,weight:r,display:i=`inline`,maxLines:a=0,hasTruncateTooltip:o=!0,wordBreak:s,textWrap:c,justify:l=`start`,hasCapsize:u=!1,hasStrikethrough:d=!1,hasTabularNumbers:f=!1,xstyle:p,className:m,style:h,as:g=`span`,children:_,ref:v,...y}){let b=n??yg[e]??`primary`,x=bg(e),S=xg(b),C=s??(a===1?`break-all`:`break-word`),T=a>0||u?`block`:i,E=Xh({maxLines:a}),D=typeof o==`string`?o:`above`,O=a>0&&o!==!1&&E.isTruncated,k=(0,w.useRef)(null),A=pg(v,E.ref,k),j=a>1?{WebkitLineClamp:a}:void 0;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(g,{ref:A,...$h(X(`text`,{type:e,size:t,color:b}),Y(jh[S],Ph[x],t&&Fh[t],Nh[x],r&&Mh[r],a===1?Lh.singleLine:a>1?Lh.multiLine:Ih[T],a>0&&Rh[C],c&&zh[c],l!==`start`&&Uh[l],u&&Bh.enabled,d&&Vh.strikethrough,f&&Hh.enabled,p),m,{...h,...j}),...y,children:_}),O&&(0,K.jsx)(w.Suspense,{fallback:null,children:(0,K.jsx)(vg,{anchorRef:k,content:(0,K.jsx)(`span`,{...Y(Wh.content),children:E.fullText}),placement:D})})]})}Sg.displayName=`Text`;var Cg=.375,wg={sm:{diameter:10,border:2},md:{diameter:14,border:3},lg:{diameter:18,border:3},xl:{diameter:28,border:4}},Tg=[`--_spinner-ring-diameter`,`--_spinner-ring-stroke`],Eg=`--_spinner-box-size`;function Dg(){if(!(typeof CSS>`u`||typeof CSS.registerProperty!=`function`))for(let e of Tg)try{CSS.registerProperty({name:e,syntax:``,inherits:!0,initialValue:`0px`})}catch{}}Dg();var Og=new Set,kg=!1;function Ag(){kg=!1;let e=[];for(let t of Og)e.push(...t.getAnimations());Og.clear();for(let t of e)t.startTime=0}function jg(e){if(e!=null&&typeof e.getAnimations==`function`)return Og.add(e),kg||(kg=!0,requestAnimationFrame(Ag)),()=>{Og.delete(e)}}var Mg={wrapper:{k1xSpc:`x3nfvp2`,kXwgrk:`xdt5ytf`,kGNEyG:`x6s0dn4`,kOIVth:`x1txdalj`,$$css:!0},spinner:{k1xSpc:`xwz0xwf`,kgQiWS:`x1ku5rj1`,kVQacm:`xb3r6kr`,kXLuUW:`xxymvpz`,"--_spinner-ring-diameter":`x2lq4xu`,"--_spinner-ring-stroke":`x10qssua`,"--_spinner-box-size":`x69vvuq`,$$css:!0},circle:{kDwRjp:`xbh8q5q`,kU5bRw:`x1owpc8m`,kPFa82:`xio8zfp`,kfJifR:`xgw3ha0`,$$css:!0},track:{kjVXCG:`xalkhop`,$$css:!0}},Ng={sm:{"--spinner-diameter":`x11wm0hx`,"--spinner-stroke-width":`xls98ul`,$$css:!0},md:{"--spinner-diameter":`x15pu9g6`,"--spinner-stroke-width":`xr0wkrm`,$$css:!0},lg:{"--spinner-diameter":`x1w424tr`,"--spinner-stroke-width":`xr0wkrm`,$$css:!0},xl:{"--spinner-diameter":`x1orj1z9`,"--spinner-stroke-width":`x7y2bof`,$$css:!0}},Pg={default:{"--spinner-color":`xt1b8mc`,"--spinner-track-color":`xspt9s2`,$$css:!0},subtle:{"--spinner-color":`x1jevo6s`,"--spinner-track-color":`xspt9s2`,$$css:!0},onMedia:{"--spinner-color":`x13u6jys`,"--spinner-track-color":`x1ufpcf6`,$$css:!0},inherit:{"--spinner-color":`x1uzk0gl`,"--spinner-track-color":`xbfzqbu`,$$css:!0}},Fg={default:{kDd8S0:`x1g350g8`,$$css:!0},subtle:{kDd8S0:`x1g350g8`,$$css:!0},onMedia:{kDd8S0:`x1smxkh6`,$$css:!0},inherit:{kDd8S0:`x7bo2k`,$$css:!0}};function Ig({size:e=`md`,shade:t=`default`,label:n,xstyle:r,className:i,style:a,"aria-label":o,"data-testid":s,ref:c,...l}){let{border:u,diameter:d}=wg[e],f=d+u*2,p=f/2,m=Math.PI*d,h=m*Cg,g=n!=null,_=(0,w.useId)(),v=g&&typeof n==`string`&&o==null,y=(0,K.jsx)(`span`,{ref:g?void 0:c,role:`status`,"aria-label":v?void 0:o??(typeof n==`string`?n:void 0)??`Loading`,"aria-labelledby":v?_:void 0,"data-testid":g?void 0:s,...g?{}:l,...$h(g?``:X(`spinner`,{size:e,shade:t}),Y(Mg.spinner,!g&&Ng[e],!g&&Pg[t],!g&&r),g?void 0:i,{...g?{}:a,width:`var(${Eg}, ${f}px)`,height:`var(${Eg}, ${f}px)`}),children:(0,K.jsxs)(`svg`,{ref:jg,width:f,height:f,viewBox:`0 0 ${f} ${f}`,"aria-hidden":`true`,className:`xlp1x4z x1lliihq x1so62im x1rea2x4 x14qxm4i xnh0sag xa4qsjk x1ka1v4i x1esw782`,children:[(0,K.jsx)(`circle`,{cx:p,cy:p,r:d/2,strokeWidth:u,...Y(Mg.circle,Mg.track,Fg[t])}),(0,K.jsx)(`circle`,{cx:p,cy:p,r:d/2,strokeWidth:u,strokeDasharray:`${h} ${m-h}`,transform:`rotate(-90 ${p} ${p})`,className:`xbh8q5q x1owpc8m xio8zfp xgw3ha0 xtve3lm x1vy8frr`})]})});return g?(0,K.jsxs)(`div`,{ref:c,"data-testid":s,...l,...$h(X(`spinner`,{size:e,shade:t}),Y(Mg.wrapper,Ng[e],Pg[t],r),i,a),children:[y,typeof n==`string`?(0,K.jsx)(Sg,{id:_,type:`body`,weight:`bold`,children:n}):n]}):y}Ig.displayName=`Spinner`;function Lg({children:e,as:t=`span`,ref:n,...r}){return(0,w.createElement)(t,{ref:n,...r,className:`x10l6tqk x1i1rx1s xjm9jq1 xkdpibf x1717udv xb3r6kr xzpqnlu xuxw1ft xng3xce x13vifvy x1o0tod x47corl x87ps6o`},e)}Lg.displayName=`VisuallyHidden`;var Rg=`data-astryx-edge-comp`,zg={keTefX:`x1kftj4p`,k71WvV:`x92e2el`,$$css:!0},Bg={inset:e=>[zg,{"--x-126w13d":(e=>typeof e==`number`?e+`px`:e??void 0)(`calc(-1 * ${e})`),"--x-4drmnv":(e=>typeof e==`number`?e+`px`:e??void 0)(`calc(-1 * ${e})`)}]},Vg=(0,w.createContext)(null);Vg.displayName=`SizeContext`;function Hg(e,t=`md`){let n=(0,w.use)(Vg);return e??n??t}Vg.Provider;var Ug=(0,w.createContext)(null);Ug.displayName=`ButtonGroupContext`;function Wg(){return(0,w.use)(Ug)}var Gg=(0,w.createContext)(null);Gg.displayName=`LinkContext`;function Kg(e){function t({href:t,ref:n,...r}){return(0,w.createElement)(e,{ref:n,href:t,to:t,...r})}return t.displayName=`LinkWithTo(${typeof e==`string`?e:e.displayName||e.name||`Component`})`,t}function qg(e){let t=(0,w.use)(Gg),n=e??t?.component??`a`;return(0,w.useMemo)(()=>n===`a`?`a`:Kg(n),[n])}`${tm[`--color-overlay-hover`]}${tm[`--color-overlay-hover`]}`,`${tm[`--color-overlay-pressed`]}${tm[`--color-overlay-pressed`]}`,`${tm[`--color-neutral`]}${tm[`--color-neutral`]}`;var Jg={backgroundColor:{kWkggS:`xjbqb8w x1anq1lc xoevpu5 xprvw0a`,$$css:!0},backgroundImage:{kKwaWg:`x7uyq82 xmvprkv xetgvay`,$$css:!0},backgroundImageOnNeutral:{kKwaWg:`x14bno8m xzmimnh x1otsd3y xo3fi6e`,$$css:!0}};function Yg(e,t){let n=t&&t.cache?t.cache:a_,r=t&&t.serializer?t.serializer:r_;return(t&&t.strategy?t.strategy:e_)(e,{cache:n,serializer:r})}function Xg(e){return e==null||typeof e==`number`||typeof e==`boolean`}function Zg(e,t,n,r){let i=Xg(r)?r:n(r),a=t.get(i);return a===void 0&&(a=e.call(this,r),t.set(i,a)),a}function Qg(e,t,n){let r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return a===void 0&&(a=e.apply(this,r),t.set(i,a)),a}function $g(e,t,n,r,i){return n.bind(t,e,r,i)}function e_(e,t){let n=e.length===1?Zg:Qg;return $g(e,this,n,t.cache.create(),t.serializer)}function t_(e,t){return $g(e,this,Qg,t.cache.create(),t.serializer)}function n_(e,t){return $g(e,this,Zg,t.cache.create(),t.serializer)}var r_=function(){return JSON.stringify(arguments)},i_=class{constructor(){this.cache=Object.create(null)}get(e){return this.cache[e]}set(e,t){this.cache[e]=t}},a_={create:function(){return new i_}},o_={variadic:t_,monadic:n_},s_=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function c_(e){let t={};return e.replace(s_,e=>{let n=e.length;switch(e[0]){case`G`:t.era=n===4?`long`:n===5?`narrow`:`short`;break;case`y`:t.year=n===2?`2-digit`:`numeric`;break;case`Y`:case`u`:case`U`:case`r`:throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case`q`:case`Q`:throw RangeError("`q/Q` (quarter) patterns are not supported");case`M`:case`L`:t.month=[`numeric`,`2-digit`,`short`,`long`,`narrow`][n-1];break;case`w`:case`W`:throw RangeError("`w/W` (week) patterns are not supported");case`d`:t.day=[`numeric`,`2-digit`][n-1];break;case`D`:case`F`:case`g`:throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case`E`:t.weekday=n===4?`long`:n===5?`narrow`:`short`;break;case`e`:if(n<4)throw RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-3];break;case`c`:if(n<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-3];break;case`a`:t.hour12=!0;break;case`b`:case`B`:throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case`h`:t.hourCycle=`h12`,t.hour=[`numeric`,`2-digit`][n-1];break;case`H`:t.hourCycle=`h23`,t.hour=[`numeric`,`2-digit`][n-1];break;case`K`:t.hourCycle=`h11`,t.hour=[`numeric`,`2-digit`][n-1];break;case`k`:t.hourCycle=`h24`,t.hour=[`numeric`,`2-digit`][n-1];break;case`j`:case`J`:case`C`:throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case`m`:t.minute=[`numeric`,`2-digit`][n-1];break;case`s`:t.second=[`numeric`,`2-digit`][n-1];break;case`S`:case`A`:throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case`z`:t.timeZoneName=n<4?`short`:`long`;break;case`Z`:case`O`:case`v`:case`V`:case`X`:case`x`:throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return``}),t}var l_=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function u_(e){if(e.length===0)throw Error(`Number skeleton cannot be empty`);let t=e.split(l_).filter(e=>e.length>0),n=[];for(let e of t){let t=e.split(`/`);if(t.length===0)throw Error(`Invalid number skeleton`);let[r,...i]=t;for(let e of i)if(e.length===0)throw Error(`Invalid number skeleton`);n.push({stem:r,options:i})}return n}function d_(e){return e.replace(/^(.*?)-/,``)}var f_=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,p_=/^(@+)?(\+|#+)?[rs]?$/g,m_=/(\*)(0+)|(#+)(0+)|(0+)/g,h_=/^(0+)$/;function g_(e){let t={};return e[e.length-1]===`r`?t.roundingPriority=`morePrecision`:e[e.length-1]===`s`&&(t.roundingPriority=`lessPrecision`),e.replace(p_,function(e,n,r){return typeof r==`string`?r===`+`?t.minimumSignificantDigits=n.length:n[0]===`#`?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof r==`string`?r.length:0)):(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length),``}),t}function __(e){switch(e){case`sign-auto`:return{signDisplay:`auto`};case`sign-accounting`:case`()`:return{currencySign:`accounting`};case`sign-always`:case`+!`:return{signDisplay:`always`};case`sign-accounting-always`:case`()!`:return{signDisplay:`always`,currencySign:`accounting`};case`sign-except-zero`:case`+?`:return{signDisplay:`exceptZero`};case`sign-accounting-except-zero`:case`()?`:return{signDisplay:`exceptZero`,currencySign:`accounting`};case`sign-never`:case`+_`:return{signDisplay:`never`}}}function v_(e){let t;if(e[0]===`E`&&e[1]===`E`?(t={notation:`engineering`},e=e.slice(2)):e[0]===`E`&&(t={notation:`scientific`},e=e.slice(1)),t){let n=e.slice(0,2);if(n===`+!`?(t.signDisplay=`always`,e=e.slice(2)):n===`+?`&&(t.signDisplay=`exceptZero`,e=e.slice(2)),!h_.test(e))throw Error(`Malformed concise eng/scientific notation`);t.minimumIntegerDigits=e.length}return t}function y_(e){return __(e)||{}}function b_(e){let t={};for(let n of e){switch(n.stem){case`percent`:case`%`:t.style=`percent`;continue;case`%x100`:t.style=`percent`,t.scale=100;continue;case`currency`:t.style=`currency`,t.currency=n.options[0];continue;case`group-off`:case`,_`:t.useGrouping=!1;continue;case`precision-integer`:case`.`:t.maximumFractionDigits=0;continue;case`measure-unit`:case`unit`:t.style=`unit`,t.unit=d_(n.options[0]);continue;case`compact-short`:case`K`:t.notation=`compact`,t.compactDisplay=`short`;continue;case`compact-long`:case`KK`:t.notation=`compact`,t.compactDisplay=`long`;continue;case`scientific`:t={...t,notation:`scientific`,...n.options.reduce((e,t)=>({...e,...y_(t)}),{})};continue;case`engineering`:t={...t,notation:`engineering`,...n.options.reduce((e,t)=>({...e,...y_(t)}),{})};continue;case`notation-simple`:t.notation=`standard`;continue;case`unit-width-narrow`:t.currencyDisplay=`narrowSymbol`,t.unitDisplay=`narrow`;continue;case`unit-width-short`:t.currencyDisplay=`code`,t.unitDisplay=`short`;continue;case`unit-width-full-name`:t.currencyDisplay=`name`,t.unitDisplay=`long`;continue;case`unit-width-iso-code`:t.currencyDisplay=`symbol`;continue;case`scale`:t.scale=parseFloat(n.options[0]);continue;case`rounding-mode-floor`:t.roundingMode=`floor`;continue;case`rounding-mode-ceiling`:t.roundingMode=`ceil`;continue;case`rounding-mode-down`:t.roundingMode=`trunc`;continue;case`rounding-mode-up`:t.roundingMode=`expand`;continue;case`rounding-mode-half-even`:t.roundingMode=`halfEven`;continue;case`rounding-mode-half-down`:t.roundingMode=`halfTrunc`;continue;case`rounding-mode-half-up`:t.roundingMode=`halfExpand`;continue;case`integer-width`:if(n.options.length>1)throw RangeError(`integer-width stems only accept a single optional option`);n.options[0].replace(m_,function(e,n,r,i,a,o){if(n)t.minimumIntegerDigits=r.length;else if(i&&a)throw Error(`We currently do not support maximum integer digits`);else if(o)throw Error(`We currently do not support exact integer digits`);return``});continue}if(h_.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(f_.test(n.stem)){if(n.options.length>1)throw RangeError(`Fraction-precision stems only accept a single optional option`);n.stem.replace(f_,function(e,n,r,i,a,o){return r===`*`?t.minimumFractionDigits=n.length:i&&i[0]===`#`?t.maximumFractionDigits=i.length:a&&o?(t.minimumFractionDigits=a.length,t.maximumFractionDigits=a.length+o.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),``});let e=n.options[0];e===`w`?t={...t,trailingZeroDisplay:`stripIfInteger`}:e&&(t={...t,...g_(e)});continue}if(p_.test(n.stem)){t={...t,...g_(n.stem)};continue}let e=__(n.stem);e&&(t={...t,...e});let r=v_(n.stem);r&&(t={...t,...r})}return t}var x_=function(e){return e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]=`EXPECT_ARGUMENT_CLOSING_BRACE`,e[e.EMPTY_ARGUMENT=2]=`EMPTY_ARGUMENT`,e[e.MALFORMED_ARGUMENT=3]=`MALFORMED_ARGUMENT`,e[e.EXPECT_ARGUMENT_TYPE=4]=`EXPECT_ARGUMENT_TYPE`,e[e.INVALID_ARGUMENT_TYPE=5]=`INVALID_ARGUMENT_TYPE`,e[e.EXPECT_ARGUMENT_STYLE=6]=`EXPECT_ARGUMENT_STYLE`,e[e.INVALID_NUMBER_SKELETON=7]=`INVALID_NUMBER_SKELETON`,e[e.INVALID_DATE_TIME_SKELETON=8]=`INVALID_DATE_TIME_SKELETON`,e[e.EXPECT_NUMBER_SKELETON=9]=`EXPECT_NUMBER_SKELETON`,e[e.EXPECT_DATE_TIME_SKELETON=10]=`EXPECT_DATE_TIME_SKELETON`,e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]=`UNCLOSED_QUOTE_IN_ARGUMENT_STYLE`,e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]=`EXPECT_SELECT_ARGUMENT_OPTIONS`,e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]=`EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]=`INVALID_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]=`EXPECT_SELECT_ARGUMENT_SELECTOR`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]=`EXPECT_PLURAL_ARGUMENT_SELECTOR`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]=`EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]=`EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT`,e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]=`INVALID_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]=`DUPLICATE_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]=`DUPLICATE_SELECT_ARGUMENT_SELECTOR`,e[e.MISSING_OTHER_CLAUSE=22]=`MISSING_OTHER_CLAUSE`,e[e.INVALID_TAG=23]=`INVALID_TAG`,e[e.INVALID_TAG_NAME=25]=`INVALID_TAG_NAME`,e[e.UNMATCHED_CLOSING_TAG=26]=`UNMATCHED_CLOSING_TAG`,e[e.UNCLOSED_TAG=27]=`UNCLOSED_TAG`,e}({});function S_(e){return e.type===0}function C_(e){return e.type===1}function w_(e){return e.type===2}function T_(e){return e.type===3}function E_(e){return e.type===4}function D_(e){return e.type===5}function O_(e){return e.type===6}function k_(e){return e.type===7}function A_(e){return e.type===8}function j_(e){return!!(e&&typeof e==`object`&&e.type===0)}function M_(e){return!!(e&&typeof e==`object`&&e.type===1)}var N_=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,P_={"001":[`H`,`h`],419:[`h`,`H`,`hB`,`hb`],AC:[`H`,`h`,`hb`,`hB`],AD:[`H`,`hB`],AE:[`h`,`hB`,`hb`,`H`],AF:[`H`,`hb`,`hB`,`h`],AG:[`h`,`hb`,`H`,`hB`],AI:[`H`,`h`,`hb`,`hB`],AL:[`h`,`H`,`hB`],AM:[`H`,`hB`],AO:[`H`,`hB`],AR:[`h`,`H`,`hB`,`hb`],AS:[`h`,`H`],AT:[`H`,`hB`],AU:[`h`,`hb`,`H`,`hB`],AW:[`H`,`hB`],AX:[`H`],AZ:[`H`,`hB`,`h`],BA:[`H`,`hB`,`h`],BB:[`h`,`hb`,`H`,`hB`],BD:[`h`,`hB`,`H`],BE:[`H`,`hB`],BF:[`H`,`hB`],BG:[`H`,`hB`,`h`],BH:[`h`,`hB`,`hb`,`H`],BI:[`H`,`h`],BJ:[`H`,`hB`],BL:[`H`,`hB`],BM:[`h`,`hb`,`H`,`hB`],BN:[`hb`,`hB`,`h`,`H`],BO:[`h`,`H`,`hB`,`hb`],BQ:[`H`],BR:[`H`,`hB`],BS:[`h`,`hb`,`H`,`hB`],BT:[`h`,`H`],BW:[`H`,`h`,`hb`,`hB`],BY:[`H`,`h`],BZ:[`H`,`h`,`hb`,`hB`],CA:[`h`,`hb`,`H`,`hB`],CC:[`H`,`h`,`hb`,`hB`],CD:[`hB`,`H`],CF:[`H`,`h`,`hB`],CG:[`H`,`hB`],CH:[`H`,`hB`,`h`],CI:[`H`,`hB`],CK:[`H`,`h`,`hb`,`hB`],CL:[`h`,`H`,`hB`,`hb`],CM:[`H`,`h`,`hB`],CN:[`H`,`hB`,`hb`,`h`],CO:[`h`,`H`,`hB`,`hb`],CP:[`H`],CR:[`h`,`H`,`hB`,`hb`],CU:[`h`,`H`,`hB`,`hb`],CV:[`H`,`hB`],CW:[`H`,`hB`],CX:[`H`,`h`,`hb`,`hB`],CY:[`h`,`H`,`hb`,`hB`],CZ:[`H`],DE:[`H`,`hB`],DG:[`H`,`h`,`hb`,`hB`],DJ:[`h`,`H`],DK:[`H`],DM:[`h`,`hb`,`H`,`hB`],DO:[`h`,`H`,`hB`,`hb`],DZ:[`h`,`hB`,`hb`,`H`],EA:[`H`,`h`,`hB`,`hb`],EC:[`h`,`H`,`hB`,`hb`],EE:[`H`,`hB`],EG:[`h`,`hB`,`hb`,`H`],EH:[`h`,`hB`,`hb`,`H`],ER:[`h`,`H`],ES:[`H`,`hB`,`h`,`hb`],ET:[`hB`,`hb`,`h`,`H`],FI:[`H`],FJ:[`h`,`hb`,`H`,`hB`],FK:[`H`,`h`,`hb`,`hB`],FM:[`h`,`hb`,`H`,`hB`],FO:[`H`,`h`],FR:[`H`,`hB`],GA:[`H`,`hB`],GB:[`H`,`h`,`hb`,`hB`],GD:[`h`,`hb`,`H`,`hB`],GE:[`H`,`hB`,`h`],GF:[`H`,`hB`],GG:[`H`,`h`,`hb`,`hB`],GH:[`h`,`H`],GI:[`H`,`h`,`hb`,`hB`],GL:[`H`,`h`],GM:[`h`,`hb`,`H`,`hB`],GN:[`H`,`hB`],GP:[`H`,`hB`],GQ:[`H`,`hB`,`h`,`hb`],GR:[`h`,`H`,`hb`,`hB`],GS:[`H`,`h`,`hb`,`hB`],GT:[`h`,`H`,`hB`,`hb`],GU:[`h`,`hb`,`H`,`hB`],GW:[`H`,`hB`],GY:[`h`,`hb`,`H`,`hB`],HK:[`h`,`hB`,`hb`,`H`],HN:[`h`,`H`,`hB`,`hb`],HR:[`H`,`hB`],HU:[`H`,`h`],IC:[`H`,`h`,`hB`,`hb`],ID:[`H`],IE:[`H`,`h`,`hb`,`hB`],IL:[`H`,`hB`],IM:[`H`,`h`,`hb`,`hB`],IN:[`h`,`H`],IO:[`H`,`h`,`hb`,`hB`],IQ:[`h`,`hB`,`hb`,`H`],IR:[`hB`,`H`],IS:[`H`],IT:[`H`,`hB`],JE:[`H`,`h`,`hb`,`hB`],JM:[`h`,`hb`,`H`,`hB`],JO:[`h`,`hB`,`hb`,`H`],JP:[`H`,`K`,`h`],KE:[`hB`,`hb`,`H`,`h`],KG:[`H`,`h`,`hB`,`hb`],KH:[`hB`,`h`,`H`,`hb`],KI:[`h`,`hb`,`H`,`hB`],KM:[`H`,`h`,`hB`,`hb`],KN:[`h`,`hb`,`H`,`hB`],KP:[`h`,`H`,`hB`,`hb`],KR:[`h`,`H`,`hB`,`hb`],KW:[`h`,`hB`,`hb`,`H`],KY:[`h`,`hb`,`H`,`hB`],KZ:[`H`,`hB`],LA:[`H`,`hb`,`hB`,`h`],LB:[`h`,`hB`,`hb`,`H`],LC:[`h`,`hb`,`H`,`hB`],LI:[`H`,`hB`,`h`],LK:[`H`,`h`,`hB`,`hb`],LR:[`h`,`hb`,`H`,`hB`],LS:[`h`,`H`],LT:[`H`,`h`,`hb`,`hB`],LU:[`H`,`h`,`hB`],LV:[`H`,`hB`,`hb`,`h`],LY:[`h`,`hB`,`hb`,`H`],MA:[`H`,`h`,`hB`,`hb`],MC:[`H`,`hB`],MD:[`H`,`hB`],ME:[`H`,`hB`,`h`],MF:[`H`,`hB`],MG:[`H`,`h`],MH:[`h`,`hb`,`H`,`hB`],MK:[`H`,`h`,`hb`,`hB`],ML:[`H`],MM:[`hB`,`hb`,`H`,`h`],MN:[`H`,`h`,`hb`,`hB`],MO:[`h`,`hB`,`hb`,`H`],MP:[`h`,`hb`,`H`,`hB`],MQ:[`H`,`hB`],MR:[`h`,`hB`,`hb`,`H`],MS:[`H`,`h`,`hb`,`hB`],MT:[`H`,`h`],MU:[`H`,`h`],MV:[`H`,`h`],MW:[`h`,`hb`,`H`,`hB`],MX:[`h`,`H`,`hB`,`hb`],MY:[`hb`,`hB`,`h`,`H`],MZ:[`H`,`hB`],NA:[`h`,`H`,`hB`,`hb`],NC:[`H`,`hB`],NE:[`H`],NF:[`H`,`h`,`hb`,`hB`],NG:[`H`,`h`,`hb`,`hB`],NI:[`h`,`H`,`hB`,`hb`],NL:[`H`,`hB`],NO:[`H`,`h`],NP:[`H`,`h`,`hB`],NR:[`H`,`h`,`hb`,`hB`],NU:[`H`,`h`,`hb`,`hB`],NZ:[`h`,`hb`,`H`,`hB`],OM:[`h`,`hB`,`hb`,`H`],PA:[`h`,`H`,`hB`,`hb`],PE:[`h`,`H`,`hB`,`hb`],PF:[`H`,`h`,`hB`],PG:[`h`,`H`],PH:[`h`,`hB`,`hb`,`H`],PK:[`h`,`hB`,`H`],PL:[`H`,`h`],PM:[`H`,`hB`],PN:[`H`,`h`,`hb`,`hB`],PR:[`h`,`H`,`hB`,`hb`],PS:[`h`,`hB`,`hb`,`H`],PT:[`H`,`hB`],PW:[`h`,`H`],PY:[`h`,`H`,`hB`,`hb`],QA:[`h`,`hB`,`hb`,`H`],RE:[`H`,`hB`],RO:[`H`,`hB`],RS:[`H`,`hB`,`h`],RU:[`H`],RW:[`H`,`h`],SA:[`h`,`hB`,`hb`,`H`],SB:[`h`,`hb`,`H`,`hB`],SC:[`H`,`h`,`hB`],SD:[`h`,`hB`,`hb`,`H`],SE:[`H`],SG:[`h`,`hb`,`H`,`hB`],SH:[`H`,`h`,`hb`,`hB`],SI:[`H`,`hB`],SJ:[`H`],SK:[`H`],SL:[`h`,`hb`,`H`,`hB`],SM:[`H`,`h`,`hB`],SN:[`H`,`h`,`hB`],SO:[`h`,`H`],SR:[`H`,`hB`],SS:[`h`,`hb`,`H`,`hB`],ST:[`H`,`hB`],SV:[`h`,`H`,`hB`,`hb`],SX:[`H`,`h`,`hb`,`hB`],SY:[`h`,`hB`,`hb`,`H`],SZ:[`h`,`hb`,`H`,`hB`],TA:[`H`,`h`,`hb`,`hB`],TC:[`h`,`hb`,`H`,`hB`],TD:[`h`,`H`,`hB`],TF:[`H`,`h`,`hB`],TG:[`H`,`hB`],TH:[`H`,`h`],TJ:[`H`,`h`],TL:[`H`,`hB`,`hb`,`h`],TM:[`H`,`h`],TN:[`h`,`hB`,`hb`,`H`],TO:[`h`,`H`],TR:[`H`,`hB`],TT:[`h`,`hb`,`H`,`hB`],TW:[`hB`,`hb`,`h`,`H`],TZ:[`hB`,`hb`,`H`,`h`],UA:[`H`,`hB`,`h`],UG:[`hB`,`hb`,`H`,`h`],UM:[`h`,`hb`,`H`,`hB`],US:[`h`,`hb`,`H`,`hB`],UY:[`h`,`H`,`hB`,`hb`],UZ:[`H`,`hB`,`h`],VA:[`H`,`h`,`hB`],VC:[`h`,`hb`,`H`,`hB`],VE:[`h`,`H`,`hB`,`hb`],VG:[`h`,`hb`,`H`,`hB`],VI:[`h`,`hb`,`H`,`hB`],VN:[`H`,`h`],VU:[`h`,`H`],WF:[`H`,`hB`],WS:[`h`,`H`],XK:[`H`,`hB`,`h`],YE:[`h`,`hB`,`hb`,`H`],YT:[`H`,`hB`],ZA:[`H`,`h`,`hb`,`hB`],ZM:[`h`,`hb`,`H`,`hB`],ZW:[`H`,`h`],"af-ZA":[`H`,`h`,`hB`,`hb`],"ar-001":[`h`,`hB`,`hb`,`H`],"ca-ES":[`H`,`h`,`hB`],"en-001":[`h`,`hb`,`H`,`hB`],"en-HK":[`h`,`hb`,`H`,`hB`],"en-IL":[`H`,`h`,`hb`,`hB`],"en-MY":[`h`,`hb`,`H`,`hB`],"es-BR":[`H`,`h`,`hB`,`hb`],"es-ES":[`H`,`h`,`hB`,`hb`],"es-GQ":[`H`,`h`,`hB`,`hb`],"fr-CA":[`H`,`h`,`hB`],"gl-ES":[`H`,`h`,`hB`],"gu-IN":[`hB`,`hb`,`h`,`H`],"hi-IN":[`hB`,`h`,`H`],"it-CH":[`H`,`h`,`hB`],"it-IT":[`H`,`h`,`hB`],"kn-IN":[`hB`,`h`,`H`],"ku-SY":[`H`,`hB`],"ml-IN":[`hB`,`h`,`H`],"mr-IN":[`hB`,`hb`,`h`,`H`],"pa-IN":[`hB`,`hb`,`h`,`H`],"ta-IN":[`hB`,`h`,`hb`,`H`],"te-IN":[`hB`,`h`,`H`],"zu-ZA":[`H`,`hB`,`hb`,`h`]};function F_(e,t){let n=``;for(let r=0;r>1),c=I_(t);for((c==`H`||c==`k`)&&(s=0);s-->0;)n+=`a`;for(;o-->0;)n=c+n}else n+=i===`J`?`H`:i}return n}function I_(e){let t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case`h24`:return`k`;case`h23`:return`H`;case`h12`:return`h`;case`h11`:return`K`;default:throw Error(`Invalid hourCycle`)}let n=e.language,r;return n!==`root`&&(r=e.maximize().region),(P_[r||``]||P_[n||``]||P_[`${n}-001`]||P_[`001`])[0]}var L_=RegExp(`^${N_.source}*`),R_=RegExp(`${N_.source}*$`);function z_(e,t){return{start:e,end:t}}var B_=!!Object.fromEntries,V_=!!String.prototype.trimStart,H_=!!String.prototype.trimEnd,U_=B_?Object.fromEntries:function(e){let t={};for(let[n,r]of e)t[n]=r;return t},W_=V_?function(e){return e.trimStart()}:function(e){return e.replace(L_,``)},G_=H_?function(e){return e.trimEnd()}:function(e){return e.replace(R_,``)},K_=RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`,`yu`);function q_(e,t){return K_.lastIndex=t,K_.exec(e)[1]??``}function J_(e){if(e.length===0)return null;let t=1,n=1;for(let r=0;r=55296&&i<=56319&&r+1=56320&&t<=57343?2:1}else r++}return{offset:e.length,line:t,column:n}}var Y_=class{constructor(e,t={}){this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}parse(){if(this.offset()!==0)throw Error(`parser can only be used once`);if(this.message.length>0){let e=this.message.charCodeAt(0);if(e!==35&&e!==39&&e!==60&&e!==123&&e!==125){let e=J_(this.message);if(e){let t=this.clonePosition();return this.position=e,{val:[{type:0,value:this.message,location:z_(t,this.clonePosition())}],err:null}}}}return this.parseMessage(0,``,!1)}parseMessage(e,t,n){let r=[];for(;!this.isEOF();){let i=this.char();if(i===123){let t=this.parseArgument(e,n);if(t.err)return t;r.push(t.val)}else if(i===125&&e>0)break;else if(i===35&&(t===`plural`||t===`selectordinal`)){let e=this.clonePosition();this.bump(),r.push({type:7,location:z_(e,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(26,z_(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&X_(this.peek()||0)){let n=this.parseTag(e,t);if(n.err)return n;r.push(n.val)}else{let n=this.parseLiteral(e,t);if(n.err)return n;r.push(n.val)}}return{val:r,err:null}}parseTag(e,t){let n=this.clonePosition();this.bump();let r=this.parseTagName();if(this.bumpSpace(),this.bumpIf(`/>`))return{val:{type:0,value:`<${r}/>`,location:z_(n,this.clonePosition())},err:null};if(this.bumpIf(`>`)){let i=this.parseMessage(e+1,t,!0);if(i.err)return i;let a=i.val,o=this.clonePosition();if(this.bumpIf(``)?{val:{type:8,value:r,children:a,location:z_(n,this.clonePosition())},err:null}:this.error(23,z_(o,this.clonePosition()))):this.error(26,z_(e,this.clonePosition()))}return this.error(27,z_(n,this.clonePosition()))}return this.error(23,z_(n,this.clonePosition()))}parseTagName(){let e=this.offset();for(this.bump();!this.isEOF()&&Q_(this.char());)this.bump();return this.message.slice(e,this.offset())}parseLiteral(e,t){let n=this.clonePosition(),r=``;for(;;){let n=this.tryParseQuote(t);if(n){r+=n;continue}let i=this.tryParseUnquoted(e,t);if(i){r+=i;continue}let a=this.tryParseLeftAngleBracket();if(a){r+=a;continue}break}let i=z_(n,this.clonePosition());return{val:{type:0,value:r,location:i},err:null}}tryParseLeftAngleBracket(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Z_(this.peek()||0))?(this.bump(),`<`):null}tryParseQuote(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),`'`;case 123:case 60:case 62:case 125:break;case 35:if(e===`plural`||e===`selectordinal`)break;return null;default:return null}this.bump();let t=[this.char()];for(this.bump();!this.isEOF();){let e=this.char();if(e===39)if(this.peek()===39)t.push(39),this.bump();else{this.bump();break}else t.push(e);this.bump()}return String.fromCodePoint(...t)}tryParseUnquoted(e,t){if(this.isEOF())return null;let n=this.char();return n===60||n===123||n===35&&(t===`plural`||t===`selectordinal`)||n===125&&e>0?null:(this.bump(),String.fromCodePoint(n))}parseArgument(e,t){let n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(1,z_(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(2,z_(n,this.clonePosition()));let r=this.parseIdentifierIfPossible().value;if(!r)return this.error(3,z_(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(1,z_(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:1,value:r,location:z_(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(1,z_(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(3,z_(n,this.clonePosition()))}}parseIdentifierIfPossible(){let e=this.clonePosition(),t=this.offset(),n=q_(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:z_(e,this.clonePosition())}}parseArgumentOptions(e,t,n,r){let i=this.clonePosition(),a=this.parseIdentifierIfPossible().value,o=this.clonePosition();switch(a){case``:return this.error(4,z_(i,o));case`number`:case`date`:case`time`:{this.bumpSpace();let e=null;if(this.bumpIf(`,`)){this.bumpSpace();let t=this.clonePosition(),n=this.parseSimpleArgStyleIfPossible();if(n.err)return n;let r=G_(n.val);if(r.length===0)return this.error(6,z_(this.clonePosition(),this.clonePosition()));e={style:r,styleLocation:z_(t,this.clonePosition())}}let t=this.tryParseArgumentClose(r);if(t.err)return t;let i=z_(r,this.clonePosition());if(e&&e.style.startsWith(`::`)){let t=W_(e.style.slice(2));if(a===`number`){let r=this.parseNumberSkeletonFromString(t,e.styleLocation);return r.err?r:{val:{type:2,value:n,location:i,style:r.val},err:null}}{if(t.length===0)return this.error(10,i);let r=t;this.locale&&(r=F_(t,this.locale));let o={type:1,pattern:r,location:e.styleLocation,parsedOptions:this.shouldParseSkeletons?c_(r):{}};return{val:{type:a===`date`?3:4,value:n,location:i,style:o},err:null}}}return{val:{type:a===`number`?2:a===`date`?3:4,value:n,location:i,style:e?.style??null},err:null}}case`plural`:case`selectordinal`:case`select`:{let i=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(`,`))return this.error(12,z_(i,{...i}));this.bumpSpace();let o=this.parseIdentifierIfPossible(),s=0;if(a!==`select`&&o.value===`offset`){if(!this.bumpIf(`:`))return this.error(13,z_(this.clonePosition(),this.clonePosition()));this.bumpSpace();let e=this.tryParseDecimalInteger(13,14);if(e.err)return e;this.bumpSpace(),o=this.parseIdentifierIfPossible(),s=e.val}let c=this.tryParsePluralOrSelectOptions(e,a,t,o);if(c.err)return c;let l=this.tryParseArgumentClose(r);if(l.err)return l;let u=z_(r,this.clonePosition());return a===`select`?{val:{type:5,value:n,options:U_(c.val),location:u},err:null}:{val:{type:6,value:n,options:U_(c.val),offset:s,pluralType:a===`plural`?`cardinal`:`ordinal`,location:u},err:null}}default:return this.error(5,z_(i,o))}}tryParseArgumentClose(e){return this.isEOF()||this.char()!==125?this.error(1,z_(e,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let e=0,t=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let e=this.clonePosition();if(!this.bumpUntil(`'`))return this.error(11,z_(e,this.clonePosition()));this.bump();break}case 123:e+=1,this.bump();break;case 125:if(e>0)--e;else return{val:this.message.slice(t.offset,this.offset()),err:null};break;default:this.bump()}return{val:this.message.slice(t.offset,this.offset()),err:null}}parseNumberSkeletonFromString(e,t){let n=[];try{n=u_(e)}catch{return this.error(7,t)}return{val:{type:0,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?b_(n):{}},err:null}}tryParsePluralOrSelectOptions(e,t,n,r){let i=!1,a=[],o=new Set,{value:s,location:c}=r;for(;;){if(s.length===0){let e=this.clonePosition();if(t!==`select`&&this.bumpIf(`=`)){let t=this.tryParseDecimalInteger(16,19);if(t.err)return t;c=z_(e,this.clonePosition()),s=this.message.slice(e.offset,this.offset())}else break}if(o.has(s))return this.error(t===`select`?21:20,c);s===`other`&&(i=!0),this.bumpSpace();let r=this.clonePosition();if(!this.bumpIf(`{`))return this.error(t===`select`?17:18,z_(this.clonePosition(),this.clonePosition()));let l=this.parseMessage(e+1,t,n);if(l.err)return l;let u=this.tryParseArgumentClose(r);if(u.err)return u;a.push([s,{value:l.val,location:z_(r,this.clonePosition())}]),o.add(s),this.bumpSpace(),{value:s,location:c}=this.parseIdentifierIfPossible()}return a.length===0?this.error(t===`select`?15:16,z_(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(22,z_(this.clonePosition(),this.clonePosition())):{val:a,err:null}}tryParseDecimalInteger(e,t){let n=1,r=this.clonePosition();this.bumpIf(`+`)||this.bumpIf(`-`)&&(n=-1);let i=!1,a=0;for(;!this.isEOF();){let e=this.char();if(e>=48&&e<=57)i=!0,a=a*10+(e-48),this.bump();else break}let o=z_(r,this.clonePosition());return i?(a*=n,Number.isSafeInteger(a)?{val:a,err:null}:this.error(t,o)):this.error(e,o)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){let e=this.position.offset;if(e>=this.message.length)throw Error(`out of bound`);let t=this.message.codePointAt(e);if(t===void 0)throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);return t}error(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}}bump(){if(this.isEOF())return;let e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}bumpIf(e){if(this.message.startsWith(e,this.offset())){for(let t=0;t=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)}bumpTo(e){if(this.offset()>e)throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);for(e=Math.min(e,this.message.length);;){let t=this.offset();if(t===e)break;if(t>e)throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(;!this.isEOF()&&$_(this.char());)this.bump()}peek(){if(this.isEOF())return null;let e=this.char(),t=this.offset();return this.message.charCodeAt(t+(e>=65536?2:1))??null}};function X_(e){return e>=97&&e<=122||e>=65&&e<=90}function Z_(e){return X_(e)||e===47}function Q_(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function $_(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ev(e){e.forEach(e=>{if(delete e.location,D_(e)||O_(e))for(let t in e.options)delete e.options[t].location,ev(e.options[t].value);else w_(e)&&j_(e.style)||(T_(e)||E_(e))&&M_(e.style)?delete e.style.location:A_(e)&&ev(e.children)})}function tv(e,t={}){t={shouldParseSkeletons:!0,requiresOtherClause:!0,...t};let n=new Y_(e,t).parse();if(n.err){let e=SyntaxError(x_[n.err.kind]);throw e.location=n.err.location,e.originalMessage=n.err.message,e}return t?.captureLocation||ev(n.val),n.val}var nv=class extends Error{constructor(e,t,n){super(e),this.code=t,this.originalMessage=n}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},rv=class extends nv{constructor(e,t,n,r){super(`Invalid values for "${e}": "${t}". Options are "${Object.keys(n).join(`", "`)}"`,`INVALID_VALUE`,r)}},iv=class extends nv{constructor(e,t,n){super(`Value for "${e}" must be of type ${t}`,`INVALID_VALUE`,n)}},av=class extends nv{constructor(e,t){super(`The intl string context variable "${e}" was not provided to the string "${t}"`,`MISSING_VALUE`,t)}};function ov(e){return e.length<2?e:e.reduce((e,t)=>{let n=e[e.length-1];return!n||n.type!==0||t.type!==0?e.push(t):n.value+=t.value,e},[])}function sv(e){return typeof e==`function`}function cv(e,t,n,r,i,a,o){if(e.length===1&&S_(e[0]))return[{type:0,value:e[0].value}];let s=[];for(let c of e){if(S_(c)){s.push({type:0,value:c.value});continue}if(k_(c)){typeof a==`number`&&s.push({type:0,value:n.getNumberFormat(t).format(a)});continue}let{value:e}=c;if(!(i&&e in i))throw new av(e,o);let l=i[e];if(C_(c)){(!l||typeof l==`string`||typeof l==`number`||typeof l==`bigint`)&&(l=typeof l==`string`||typeof l==`number`||typeof l==`bigint`?String(l):``),s.push({type:typeof l==`string`?0:1,value:l});continue}if(T_(c)){let e=typeof c.style==`string`?r.date[c.style]:M_(c.style)?c.style.parsedOptions:void 0;s.push({type:0,value:n.getDateTimeFormat(t,e).format(l)});continue}if(E_(c)){let e=typeof c.style==`string`?r.time[c.style]:M_(c.style)?c.style.parsedOptions:r.time.medium;s.push({type:0,value:n.getDateTimeFormat(t,e).format(l)});continue}if(w_(c)){let e=typeof c.style==`string`?r.number[c.style]:j_(c.style)?c.style.parsedOptions:void 0;if(e&&e.scale){let t=e.scale||1;if(typeof l==`bigint`){if(!Number.isInteger(t))throw TypeError(`Cannot apply fractional scale ${t} to bigint value. Scale must be an integer when formatting bigint.`);l*=BigInt(t)}else l*=t}s.push({type:0,value:n.getNumberFormat(t,e).format(l)});continue}if(A_(c)){let{children:e,value:l}=c,u=i[l];if(!sv(u))throw new iv(l,`function`,o);let d=u(cv(e,t,n,r,i,a).map(e=>e.value));Array.isArray(d)||(d=[d]),s.push(...d.map(e=>({type:typeof e==`string`?0:1,value:e})))}if(D_(c)){let e=l,a=(Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0)||c.options.other;if(!a)throw new rv(c.value,l,Object.keys(c.options),o);s.push(...cv(a.value,t,n,r,i));continue}if(O_(c)){let e=`=${l}`,a=Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0;if(!a){if(!Intl.PluralRules)throw new nv(`Intl.PluralRules is not available in this environment. Try polyfilling it using "@formatjs/intl-pluralrules" -`,`MISSING_INTL_API`,o);let e=typeof l==`bigint`?Number(l):l,r=n.getPluralRules(t,{type:c.pluralType}).select(e-(c.offset||0));a=(Object.prototype.hasOwnProperty.call(c.options,r)?c.options[r]:void 0)||c.options.other}if(!a)throw new K_(c.value,l,Object.keys(c.options),o);let u=typeof l==`bigint`?Number(l):l;s.push(...Z_(a.value,t,n,r,i,u-(c.offset||0)));continue}}return Y_(s)}function Q_(e,t){return t?{...e,...t,...Object.keys(e).reduce((n,r)=>(n[r]={...e[r],...t[r]},n),{})}:e}function $_(e,t){return t?Object.keys(e).reduce((n,r)=>(n[r]=Q_(e[r],t[r]),n),{...e}):e}function ev(e){return{create(){return{get(t){return e[t]},set(t,n){e[t]=n}}}}}function tv(e={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:Rg((...e)=>new Intl.NumberFormat(...e),{cache:ev(e.number),strategy:Yg.variadic}),getDateTimeFormat:Rg((...e)=>new Intl.DateTimeFormat(...e),{cache:ev(e.dateTime),strategy:Yg.variadic}),getPluralRules:Rg((...e)=>new Intl.PluralRules(...e),{cache:ev(e.pluralRules),strategy:Yg.variadic})}}var nv=class e{constructor(t,n=e.defaultLocale,r,i){if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=e=>{let t=this.formatToParts(e);if(t.length===1)return t[0].value;let n=t.reduce((e,t)=>(!e.length||t.type!==0||typeof e[e.length-1]!=`string`?e.push(t.value):e[e.length-1]+=t.value,e),[]);return n.length<=1?n[0]||``:n},this.formatToParts=e=>Z_(this.ast,this.locales,this.formatters,this.formats,e,void 0,this.message),this.resolvedOptions=()=>({locale:this.resolvedLocale?.toString()||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]}),this.getAst=()=>this.ast,this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t==`string`){if(this.message=t,!e.__parse)throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");let{...n}=i||{};this.ast=e.__parse(t,{...n,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw TypeError(`A message must be provided as a String or AST.`);this.formats=$_(e.formats,r),this.formatters=i&&i.formatters||tv(this.formatterCache)}static{this.memoizedDefaultLocale=null}static get defaultLocale(){return e.memoizedDefaultLocale||=new Intl.NumberFormat().resolvedOptions().locale,e.memoizedDefaultLocale}static{this.resolveLocale=e=>{if(Intl.Locale===void 0)return;let t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale(typeof e==`string`?e:e[0])}}static{this.__parse=W_}static{this.formats={number:{integer:{maximumFractionDigits:0},currency:{style:`currency`},percent:{style:`percent`}},date:{short:{month:`numeric`,day:`numeric`,year:`2-digit`},medium:{month:`short`,day:`numeric`,year:`numeric`},long:{month:`long`,day:`numeric`,year:`numeric`},full:{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`}},time:{short:{hour:`numeric`,minute:`numeric`},medium:{hour:`numeric`,minute:`numeric`,second:`numeric`},long:{hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`short`},full:{hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`short`}}}}},rv={"@astryx.pagination.label":{defaultMessage:`Pagination`,description:`Aria label for the pagination navigation region.`},"@astryx.pagination.previous":{defaultMessage:`Go to previous page`,description:`Aria label for the previous-page button.`},"@astryx.pagination.next":{defaultMessage:`Go to next page`,description:`Aria label for the next-page button.`},"@astryx.pagination.previousBy":{defaultMessage:`Go back {step, number} {step, plural, one {page} other {pages}}`,description:"Aria label for the previous button when it advances more than one page per click (the `step` prop > 1). `step` is the number of pages skipped."},"@astryx.pagination.nextBy":{defaultMessage:`Go forward {step, number} {step, plural, one {page} other {pages}}`,description:"Aria label for the next button when it advances more than one page per click (the `step` prop > 1). `step` is the number of pages skipped."},"@astryx.pagination.first":{defaultMessage:`Go to first page`,description:`Aria label for the first-page button (« double chevron) in the input pagination variant.`},"@astryx.pagination.last":{defaultMessage:`Go to last page`,description:`Aria label for the last-page button (» double chevron) in the input pagination variant.`},"@astryx.pagination.goToPage":{defaultMessage:`Go to page {page, number}`,description:"Aria label for an individual page-number button. `page` is 1-based."},"@astryx.pagination.goToPageInput":{defaultMessage:`Go to page`,description:`Aria label for the editable page/row number box in the input pagination variant. No number — the box holds the value itself.`},"@astryx.pagination.pageLabel":{defaultMessage:`Page`,description:`Visible label before the editable box in the input pagination variant. Example: "Page [ 1 ] / 10".`},"@astryx.pagination.ofTotalPages":{defaultMessage:`/ {total, number}`,description:`Visible total shown after the editable box in the input pagination variant. Example: the "/ 10" in "Page [ 1 ] / 10".`},"@astryx.pagination.pageIndicators":{defaultMessage:`Page indicators`,description:`Aria label for the dots-variant page-indicator group.`},"@astryx.pagination.itemsPerPage":{defaultMessage:`Items per page`,description:`Label for the page-size selector.`},"@astryx.pagination.count":{defaultMessage:`{from, number}–{to, number} of {total, number}`,description:`Visible range-of-total text on a pagination bar. Example: "1–20 of 347"; the en-dash is translator's choice.`},"@astryx.pagination.pageOfTotal":{defaultMessage:`Page {current, number} of {total, number}`,description:`Visible "Page X of Y" text on the compact pagination variant; also announced by screen readers. Keep short — sits in a compact toolbar.`},"@astryx.pagination.pageAnnounce":{defaultMessage:`Page {current, number}`,description:`Screen-reader announcement when a page changes and total is unknown.`},"@astryx.powersearch.editor.field":{defaultMessage:`Field`,description:`Noun form-label above the field-picker dropdown in the PowerSearch filter-builder popover (which data column to filter on). Not an action.`},"@astryx.powersearch.editor.operator":{defaultMessage:`Operator`,description:`Noun form-label above the operator dropdown in the PowerSearch filter-builder popover. Refers to a comparison verb ("is", "contains"), not a math or phone operator.`},"@astryx.powersearch.editor.addFilter":{defaultMessage:`+ Add filter`,description:`Button label inside a group in the PowerSearch filter-builder; adds another filter row (e.g. "Status = Active"). The leading "+ " is a plus-sign character.`},"@astryx.powersearch.editor.removeFilter":{defaultMessage:`Remove filter`,description:`Screen-reader-only label on the "×" icon button next to a filter row in the PowerSearch editor; removes that row. Imperative verb.`},"@astryx.powersearch.editor.groupOperator":{defaultMessage:`Group operator`,description:`Screen-reader-only label for the AND/OR toggle that combines sibling filters inside a filter group. Sighted users see just "AND" or "OR".`},"@astryx.powersearch.editor.group":{defaultMessage:`Group`,description:`Fallback noun label shown on a nested filter-group chip when no AND/OR combining operator has been chosen. Use the noun ("a cluster"), not the verb "to group".`},"@astryx.powersearch.editor.delete":{defaultMessage:`Delete`,description:`Button label inside the PowerSearch filter-editor popover; deletes the currently-edited filter row. Imperative verb form.`},"@astryx.powersearch.editor.cancel":{defaultMessage:`Cancel`,description:`Button label inside the PowerSearch filter-editor popover; closes the popover and discards pending edits. Imperative verb form.`},"@astryx.powersearch.editor.apply":{defaultMessage:`Apply`,description:`Primary button label inside the PowerSearch filter-editor popover; confirms the edited filter. Imperative verb; consumers may override to "Save".`},"@astryx.powersearch.valueEditor.value":{defaultMessage:`Value`,description:'Noun form-label above a single free-text/number input in the PowerSearch value editor (e.g. the "acme" in `Name contains acme`). Not a verb or "worth".'},"@astryx.powersearch.valueEditor.values":{defaultMessage:`Values`,description:"Plural noun form-label above a multi-value chip input in the PowerSearch value editor. Should match its singular counterpart `Value` in your language."},"@astryx.powersearch.valueEditor.time":{defaultMessage:`Time`,description:`Noun form-label above a time-of-day (HH:MM) picker in the PowerSearch value editor. Clock time, not duration or era.`},"@astryx.powersearch.valueEditor.date":{defaultMessage:`Date`,description:`Noun form-label above a calendar-date picker in the PowerSearch value editor. Calendar date, not romantic date or fruit.`},"@astryx.powersearch.valueEditor.relativeDate":{defaultMessage:`Relative date`,description:`Label for the relative-date selector (e.g. "Last 7 days") in the PowerSearch value editor.`},"@astryx.powersearch.valueEditor.startDate":{defaultMessage:`Start date`,description:"Noun form-label above the start-of-range date picker in the PowerSearch value editor. Pairs with `End date` — keep the two parallel in your language."},"@astryx.powersearch.valueEditor.endDate":{defaultMessage:`End date`,description:"Noun form-label above the end-of-range date picker in the PowerSearch value editor. Pairs with `Start date` — keep the two parallel."},"@astryx.powersearch.valueEditor.entities":{defaultMessage:`Entities`,description:`"Entities" is jargon — plural noun form-label above an entity picker (people, teams, projects). Prefer a natural collective like "items" if your language has no equivalent.`},"@astryx.powersearch.valueEditor.searchPlaceholder":{defaultMessage:`Search…`,description:"Placeholder inside the search input in the PowerSearch entity/typeahead picker. Imperative verb; trailing `…` is one character."},"@astryx.powersearch.valueEditor.enterValuePlaceholder":{defaultMessage:`Enter value…`,description:"Placeholder inside a free-text single-value input in the PowerSearch value editor. Imperative verb; trailing `…` is one character."},"@astryx.powersearch.valueEditor.addValuesPlaceholder":{defaultMessage:`Add values…`,description:"Placeholder inside a multi-value chip input where the user types items and presses Enter to add each as a chip. Imperative verb; trailing `…` is one character."},"@astryx.powersearch.valueEditor.enterNumberPlaceholder":{defaultMessage:`Enter number…`,description:"Placeholder inside a numeric input in the PowerSearch value editor. Imperative verb; trailing `…` is one character."},"@astryx.powersearch.valueEditor.selectValuesPlaceholder":{defaultMessage:`Select values…`,description:`Placeholder on a dropdown for choosing values from a fixed enum list in the PowerSearch value editor. Imperative verb (user selects, not types).`},"@astryx.powersearch.operator.contains":{defaultMessage:`contains`,description:"PowerSearch string operator, rendered inline as ` contains ` (e.g. `Name contains acme`). Lowercase verb form."},"@astryx.powersearch.operator.notContains":{defaultMessage:`does not contain`,description:"PowerSearch negated string operator. Example: `Name does not contain test`. Lowercase; pairs with `contains`."},"@astryx.powersearch.operator.startsWith":{defaultMessage:`starts with`,description:"PowerSearch string prefix operator. Example: `Email starts with admin@`. Lowercase."},"@astryx.powersearch.operator.notStartsWith":{defaultMessage:`does not start with`,description:"PowerSearch negated prefix operator. Example: `Email does not start with test`. Lowercase; pairs with `starts with`."},"@astryx.powersearch.operator.endsWith":{defaultMessage:`ends with`,description:"PowerSearch string suffix operator. Example: `Email ends with @meta.com`. Lowercase."},"@astryx.powersearch.operator.notEndsWith":{defaultMessage:`does not end with`,description:"PowerSearch negated suffix operator. Example: `Email does not end with @gmail.com`. Lowercase; pairs with `ends with`."},"@astryx.powersearch.operator.is":{defaultMessage:`is`,description:"PowerSearch equality operator for strings/enums. Example: `Status is Active`. Separate from `operator.equals` (numbers) — translations may diverge."},"@astryx.powersearch.operator.isNot":{defaultMessage:`is not`,description:"PowerSearch inequality operator for strings/enums. Example: `Status is not Draft`. Pairs with `is`; separate from `operator.notEquals`."},"@astryx.powersearch.operator.equals":{defaultMessage:`is`,description:'PowerSearch numeric equality operator. Example: `Age is 30`. Ships same English "is" as `operator.is` but is separate so numbers may diverge (e.g. "equals").'},"@astryx.powersearch.operator.notEquals":{defaultMessage:`is not`,description:"PowerSearch numeric inequality operator. Example: `Count is not 0`. Same divergence option as `operator.equals`."},"@astryx.powersearch.operator.greaterThan":{defaultMessage:`is greater than`,description:"PowerSearch numeric operator, strictly greater than. Example: `Age is greater than 18`. Lowercase."},"@astryx.powersearch.operator.lessThan":{defaultMessage:`is less than`,description:"PowerSearch numeric operator, strictly less than. Example: `Priority is less than 5`. Lowercase."},"@astryx.powersearch.operator.greaterThanOrEqual":{defaultMessage:`is greater than or equal to`,description:'PowerSearch numeric operator, ≥. Example: `Age is greater than or equal to 21`. A shorter form (e.g. "≥") is fine if idiomatic.'},"@astryx.powersearch.operator.lessThanOrEqual":{defaultMessage:`is less than or equal to`,description:"PowerSearch numeric operator, ≤. Example: `Priority is less than or equal to 3`. A shorter form is fine if idiomatic."},"@astryx.powersearch.operator.before":{defaultMessage:`is before`,description:"PowerSearch date operator, strictly earlier. Example: `Created is before 2024-01-01`. Temporal, not spatial."},"@astryx.powersearch.operator.after":{defaultMessage:`is after`,description:"PowerSearch date operator, strictly later. Example: `Updated is after 2024-06-01`. Temporal."},"@astryx.powersearch.operator.between":{defaultMessage:`is between`,description:"PowerSearch date operator, inclusive range. Example: `Created is between 2024-01-01 and 2024-06-30`. The `and ` portion is composed separately."},"@astryx.powersearch.operator.isTrue":{defaultMessage:`is true`,description:"PowerSearch boolean operator: matches truthy. Example: `Is admin is true`. Pairs with `is false`; field may be affirmative or a yes/no question."},"@astryx.powersearch.operator.isFalse":{defaultMessage:`is false`,description:"PowerSearch boolean operator: matches falsy. Example: `Is admin is false`. Pairs with `is true`."},"@astryx.powersearch.operator.isAnyOf":{defaultMessage:`is any of`,description:"PowerSearch list operator: value is in the set. Example: `Status is any of [Active, Paused, Draft]`. The value list is composed separately; pairs with `is none of`."},"@astryx.powersearch.operator.isNoneOf":{defaultMessage:`is none of`,description:"PowerSearch negated list operator: value not in the set. Example: `Status is none of [Archived, Deleted]`. Pairs with `is any of`."},"@astryx.powersearch.valueEditor.itemsCount":{defaultMessage:`{count, number} {count, plural, one {item} other {items}}`,description:"Overflow summary on a compact filter chip when the list of selected items is too long. Example: `3 items` or `1 item`."},"@astryx.powersearch.valueEditor.entitiesCount":{defaultMessage:`{count, number} {count, plural, one {entity} other {entities}}`,description:"Overflow summary on a compact filter chip when the list of selected entities is too long. Example: `5 entities` or `1 entity`. Pair with `itemsCount` translation."},"@astryx.powersearch.valueEditor.dateRange":{defaultMessage:`date range`,description:"Fallback lowercase noun rendered inline in a filter chip when a date-range value can't be formatted (e.g. `Created is between date range`). Keep lowercase."},"@astryx.powersearch.valueEditor.filtersCount":{defaultMessage:`{count, number} {count, plural, one {filter} other {filters}}`,description:"Summary inside a filter chip when the value is a nested set of filters. Example: `3 filters` or `1 filter`."},"@astryx.powersearch.resultCount":{defaultMessage:`{count, number} {count, plural, one {result} other {results}}`,description:"Live result-count text next to the PowerSearch input, announced to screen readers on change. Example: `12 results`, `1 result`; keep compact."},"@astryx.alertDialog.cancel":{defaultMessage:`Cancel`,description:`Button label on the secondary/dismiss button of an AlertDialog (modal confirmation). Imperative verb; consumers usually override with task-specific text.`},"@astryx.appShell.mobileNavigation":{defaultMessage:`Mobile navigation`,description:`Screen-reader-only accessible name for the mobile-only navigation region on small viewports. "Mobile" = phone/tablet (small screen), not "movable".`},"@astryx.appShell.skipToContent":{defaultMessage:`Skip to content`,description:`Text of the skip link — the first focusable element on the page, visible only while keyboard-focused. Activating it jumps focus past the navigation to the main content area. Imperative verb; keep short.`},"@astryx.avatar.nameWithStatus":{defaultMessage:`{name}, {status}`,description:`Screen-reader accessible name for an Avatar showing a status indicator; composes the person's name with the status label, e.g. "Jane Doe, Online". {name} = the avatar's name/alt text, {status} = the status dot's label. Adjust separator and order per locale.`},"@astryx.avatarGroup.label":{defaultMessage:`Avatars`,description:`Screen-reader-only fallback name for a horizontal cluster of user avatar images. Plural noun; consumers usually override with "Team members", "Attendees", etc.`},"@astryx.avatarGroup.keyboardHint":{defaultMessage:`Use arrow keys to move between avatars`,description:`Screen-reader-only instruction attached (via aria-describedby) to a group of interactive avatars that share a single Tab stop. Tells keyboard users the Left/Right arrow keys move focus between the avatars. Only announced when the group has interactive (link/button) avatars.`},"@astryx.avatarGroup.overflow":{defaultMessage:`{count, number} more`,description:'Accessible name for the "+N" overflow indicator at the end of an AvatarGroup — announces how many additional avatars are not shown. Example: `5 more`. The visible "+N" text is unaffected; this is the aria-label only.'},"@astryx.banner.dismiss":{defaultMessage:`Dismiss`,description:`"Dismiss" = close/hide this notification (not "reject a person"). Tooltip on the small X button on a Banner, and its aria label when the banner's title is not plain text.`},"@astryx.banner.dismissTitled":{defaultMessage:`{dismiss} {title}`,description:"Aria label on the small X button on a Banner, naming which banner it closes so stacked banners are distinguishable. `{dismiss}` is the already-translated tooltip text from `banner.dismiss`; keep it verbatim in the message so visible and accessible labels match. `{title}` is the banner's own title text — example: `Dismiss Upload failed`. Reorder the placeholders freely."},"@astryx.calendar.previousMonth":{defaultMessage:`Previous month`,description:"Screen-reader-only label on the left-arrow button in a Calendar's month header (navigates one month back). Pairs with `calendar.nextMonth`."},"@astryx.calendar.nextMonth":{defaultMessage:`Next month`,description:"Screen-reader-only label on the right-arrow button in a Calendar's month header (navigates one month forward). Pairs with `calendar.previousMonth`."},"@astryx.calendar.daySelected":{defaultMessage:`{date}, selected`,description:'Accessible name for the Calendar day button that is the current single-mode selection. `{date}` is the localized full date, e.g. "Thursday, January 15, 2026". The trailing state word tells screen-reader users the focused day is selected.'},"@astryx.calendar.dayRangeStart":{defaultMessage:`{date}, range start`,description:"Accessible name for the Calendar day button that begins the selected date range (or the first pick of an in-progress range). `{date}` is the localized full date."},"@astryx.calendar.dayRangeEnd":{defaultMessage:`{date}, range end`,description:"Accessible name for the Calendar day button that ends the selected date range. `{date}` is the localized full date. Pairs with `calendar.dayRangeStart`."},"@astryx.calendar.dayRangeStartAndEnd":{defaultMessage:`{date}, range start and range end`,description:"Accessible name for a Calendar day button that both begins and ends a completed one-day range. `{date}` is the localized full date."},"@astryx.calendar.dayInRange":{defaultMessage:`{date}, in range`,description:"Accessible name for a Calendar day button strictly inside the selected date range (not an endpoint). `{date}` is the localized full date."},"@astryx.calendar.rangeStartAnnounce":{defaultMessage:`Start date {date}. Select an end date.`,description:"Screen-reader announcement after the first pick of a Calendar range selection. `{date}` is the localized full date. Prompts the user that a second pick completes the range."},"@astryx.calendar.rangeCompleteAnnounce":{defaultMessage:`Selected range: {start} to {end}.`,description:"Screen-reader announcement after the second pick completes a Calendar range selection. `{start}` and `{end}` are localized full dates in chronological order."},"@astryx.calendar.rangeClearedAnnounce":{defaultMessage:`Cleared start date {date}. Select a start date.`,description:"Screen-reader announcement when the user clicks the in-progress range start again, which clears it instead of completing a zero-length range. `{date}` is the localized full date."},"@astryx.carousel.label":{defaultMessage:`Carousel`,description:`Screen-reader-only fallback name for a horizontally-scrolling row of items. If "carousel" is unfamiliar in your locale, prefer the standard term (e.g. "slider").`},"@astryx.carousel.scrollLeft":{defaultMessage:`Scroll left`,description:"Screen-reader-only label on the left arrow button in a Carousel. Pairs with `carousel.scrollRight`; in RTL locales, coordinate the two so left/right match layout."},"@astryx.carousel.scrollRight":{defaultMessage:`Scroll right`,description:"Screen-reader-only label on the right arrow button in a Carousel. Pairs with `carousel.scrollLeft`; same RTL note."},"@astryx.carousel.slideLabel":{defaultMessage:`Slide {current, number} of {total, number}`,description:"Screen-reader accessible name for one slide in a Carousel, giving its position. `current` is the 1-based slide number; `total` is the slide count."},"@astryx.chat.status.sending":{defaultMessage:`Sending`,description:`Chat send-status caption under an outgoing message while it is being transmitted. Part of the set sending → sent → delivered → read (or failed) — keep tense/aspect consistent.`},"@astryx.chat.status.sent":{defaultMessage:`Sent`,description:`Chat send-status caption shown once the message reaches the server. Part of the set sending → **sent** → delivered → read (or failed) — keep tense consistent.`},"@astryx.chat.status.delivered":{defaultMessage:`Delivered`,description:`Chat send-status caption shown once the recipient's device received the message. Part of the set sending → sent → **delivered** → read (or failed).`},"@astryx.chat.status.read":{defaultMessage:`Read`,description:`Chat send-status caption shown once the recipient opened the message. English past-participle ("has been read", /rɛd/), not the present verb — part of the set sending → sent → delivered → **read**.`},"@astryx.chat.status.failed":{defaultMessage:`Failed`,description:`Chat send-status caption shown when the send attempt errored. Part of the set — the terminal failure branch, orthogonal to the sent → delivered → read success track.`},"@astryx.chat.messageAriaLabel":{defaultMessage:`Message {status}`,description:"Screen-reader-only accessible name for a chat message row. `{status}` interpolates the localized status word (e.g. `Message sent`, `Message delivered`) — reorder if needed."},"@astryx.chat.pastedText.expand":{defaultMessage:`Expand`,description:`Button label on a chip in the chat composer representing a long pasted text block; clicking reveals full content. "Expand" here means reveal more, not grow physically.`},"@astryx.checkboxList.item.checkbox":{defaultMessage:`Checkbox`,description:`Screen-reader-only last-ditch fallback name for a checkbox inside a list item when no label is provided. Should almost never render — consumers should supply a real label.`},"@astryx.commandPalette.emptySearch":{defaultMessage:`No results`,description:`Fallback empty-state text inside a CommandPalette when the user's query has no matches. Very short (2 words); neutral tone.`},"@astryx.commandPalette.emptyBootstrap":{defaultMessage:`Type to search`,description:`Onboarding empty-state text shown inside a CommandPalette on first open, before the user has typed anything. Imperative sentence fragment.`},"@astryx.commandPalette.resultCount":{defaultMessage:`{count, number} {count, plural, one {result} other {results}}`,description:"Screen-reader-only announcement of how many commands match the CommandPalette query as the user types. Example: `12 results`, `1 result`; keep compact."},"@astryx.commandPalette.noResultsFor":{defaultMessage:`No results for {query}`,description:"Screen-reader-only announcement when a CommandPalette query matches nothing. `{query}` is the user's verbatim search text; keep it last if your language allows so truncation-by-AT still conveys the outcome."},"@astryx.commandPalette.loading":{defaultMessage:`Loading`,description:`Screen-reader-only announcement that a CommandPalette search has started and results are being fetched. Present-progressive form; matches the visible spinner.`},"@astryx.dateRangeInput.presetDateRanges":{defaultMessage:`Preset date ranges`,description:`Screen-reader-only accessible name for the sidebar of quick-pick preset ranges inside a DateRangeInput popover (e.g. "Last 7 days", "This month").`},"@astryx.dateTimeInput.timePlaceholder":{defaultMessage:`Select a time`,description:`Grey placeholder inside the empty time-of-day slot in a DateTimeInput. "Time" = clock time (HH:MM), not duration.`},"@astryx.dialog.close":{defaultMessage:`Close`,description:`"Close" = shut/dismiss the dialog, not "nearby" (English homograph). Aria label AND tooltip on the X at the top-right of a Dialog.`},"@astryx.dropdownMenu.label":{defaultMessage:`Menu`,description:`Screen-reader-only fallback name for a dropdown menu popover. Very generic; consumers usually override. Noun ("a menu"), not the imperative.`},"@astryx.lightbox.close":{defaultMessage:`Close`,description:`"Close" = shut/dismiss (not "nearby"). Screen-reader-only label on the X button that dismisses a Lightbox.`},"@astryx.lightbox.previous":{defaultMessage:`Previous`,description:"Screen-reader-only label on the left-arrow button in a Lightbox (navigates to previous media item). Pairs with `lightbox.next`."},"@astryx.lightbox.next":{defaultMessage:`Next`,description:"Screen-reader-only label on the right-arrow button in a Lightbox (navigates to next media item). Pairs with `lightbox.previous`."},"@astryx.listInput.emptyTitle":{defaultMessage:`No {itemName}s yet`,description:'EmptyState title shown inside a lab ListInput when its collection has no records. `{itemName}` is the consumer\'s singular noun for one record (e.g. "guest"); the source appends a literal "s" to pluralize it, which only works for regular English plurals. If your language cannot pluralize an interpolated noun this way, rephrase around `{itemName}` instead (e.g. "No {itemName} added yet").'},"@astryx.listInput.emptyDescription":{defaultMessage:`Add a {itemName} to get started.`,description:'EmptyState supporting text shown inside a lab ListInput when its collection has no records. `{itemName}` is the consumer\'s singular noun for one record (e.g. "guest").'},"@astryx.listInput.addItem":{defaultMessage:`Add {itemName}`,description:'Accessible label on the button that appends a new record to a lab ListInput. `{itemName}` is the consumer\'s singular noun for one record (e.g. "guest").'},"@astryx.listInput.removeItem":{defaultMessage:`Remove {itemName} {position, number}`,description:'Accessible label and tooltip on the button that deletes one record from a lab ListInput. `{itemName}` is the consumer\'s singular noun for one record; `{position}` is its 1-based row number (e.g. "Remove guest 2").'},"@astryx.listInput.removeUnavailable":{defaultMessage:`Remove is unavailable while the list is disabled`,description:`Tooltip shown on the Remove button when the ListInput is disabled or loading, explaining why the action cannot be performed.`},"@astryx.listInput.reorderItem":{defaultMessage:`Reorder {itemName} {position, number}`,description:'Accessible label on the drag-handle button that reorders one record in a lab ListInput. `{itemName}` is the consumer\'s singular noun for one record; `{position}` is its 1-based row number (e.g. "Reorder guest 2").'},"@astryx.listInput.fieldLabelWithPosition":{defaultMessage:`{header}, {itemName} {position, number} of {total, number}`,description:'Accessible name for a field inside a lab ListInput row after the first row, disambiguating repeated column labels. `{header}` is the column\'s own label (e.g. "Name"); `{itemName}` is the consumer\'s singular noun for one record; `{position}`/`{total}` are the row\'s 1-based index and the total row count (e.g. "Name, guest 2 of 3").'},"@astryx.listInput.reorderInstructions":{defaultMessage:`Use Arrow Up or Arrow Down to move this item one position. Press Space or Enter to pick it up for extended keyboard reordering.`,description:`Visually-hidden instructions describing how to use a lab ListInput row's keyboard reorder handle, referenced via aria-describedby from every reorder button.`},"@astryx.listInput.announceAdded":{defaultMessage:`Added {itemName} {position, number}.`,description:"Screen-reader-only live announcement after a new record is appended to a lab ListInput. `{itemName}` is the consumer's singular noun for one record; `{position}` is the new record's 1-based row number."},"@astryx.listInput.announceRemoved":{defaultMessage:`Removed {itemName} {position, number}.`,description:"Screen-reader-only live announcement after a record is deleted from a lab ListInput. `{itemName}` is the consumer's singular noun for one record; `{position}` is the removed record's former 1-based row number."},"@astryx.listInput.announceGrabbed":{defaultMessage:`{itemName} {position, number} grabbed. Use arrow keys to move, Space or Enter to drop, and Escape to cancel.`,description:"Screen-reader-only live announcement when a lab ListInput record's keyboard reorder handle enters extended \"lift\" mode. `{itemName}` is the consumer's singular noun for one record; `{position}` is its 1-based row number."},"@astryx.listInput.announceMovedToPosition":{defaultMessage:`{itemName} moved to position {position, number} of {total, number}.`,description:"Screen-reader-only live announcement each time a lab ListInput record's reorder position changes (arrow-key step, keyboard lift-mode preview, or pointer drag). `{itemName}` is the consumer's singular noun for one record; `{position}`/`{total}` are the record's new 1-based position and the total row count."},"@astryx.listInput.announceReorderCancelled":{defaultMessage:`Reordering cancelled.`,description:`Screen-reader-only live announcement when a lab ListInput reorder in progress is cancelled (Escape key, blur, or the collection becoming disabled/loading mid-drag).`},"@astryx.listInput.announceReturnedToPosition":{defaultMessage:`{itemName} returned to position {position, number}.`,description:"Screen-reader-only live announcement when a lab ListInput reorder is committed without the record's position actually changing. `{itemName}` is the consumer's singular noun for one record; `{position}` is its unchanged 1-based row number."},"@astryx.listInput.announceDropped":{defaultMessage:`{itemName} dropped at position {position, number} of {total, number}.`,description:"Screen-reader-only live announcement when a lab ListInput reorder is committed with the record's position actually changing. `{itemName}` is the consumer's singular noun for one record; `{position}`/`{total}` are its new 1-based position and the total row count."},"@astryx.listInput.announceAlreadyAtBoundary":{defaultMessage:`This {itemName} is already {boundary, select, first {first} last {last} other {}}.`,description:'Screen-reader-only live announcement when an arrow-key reorder attempt has no effect because the record is already at that end of the list. `{itemName}` is the consumer\'s singular noun for one record; `{boundary}` is always exactly "first" or "last".'},"@astryx.markdown.taskList":{defaultMessage:`Task list`,description:"Screen-reader-only accessible name for a GitHub-flavored Markdown task list (rendered from `- [ ] item` / `- [x] done` syntax)."},"@astryx.markdown.table":{defaultMessage:`Table`,description:'Screen-reader-only accessible name for a table rendered inside a Markdown block. Noun ("a table"), not the verb. Separate from `@astryx.table.label` — translations may diverge.'},"@astryx.mobileNav.closeNavigation":{defaultMessage:`Close navigation`,description:"Screen-reader-only label on the X/close button that dismisses the MobileNav overlay. Pairs with `mobileNav.toggle.open`."},"@astryx.multiSelector.selectAll":{defaultMessage:`Select all`,description:`Label on the checkbox/toggle at the top of a MultiSelector dropdown that selects every option. "All" is a determiner here (as in "all the options"), not the pronoun.`},"@astryx.multiSelector.searchPlaceholder":{defaultMessage:`Search…`,description:"Placeholder inside the search input at the top of a MultiSelector's dropdown panel. Imperative verb; trailing `…` is one character."},"@astryx.multiSelector.searchOptions":{defaultMessage:`Search options`,description:`Screen-reader-only accessible name for that same search input inside a MultiSelector.`},"@astryx.multiSelector.empty":{defaultMessage:`No options`,description:`Shown in a MultiSelector's dropdown panel when it was given no options at all, and announced in a polite live region on open. Very short (2 words); neutral tone, not error-y.`},"@astryx.multiSelector.selectAllPartiallySelected":{defaultMessage:`{label}, partially selected`,description:'Accessible name for the MultiSelector select-all option while only some options are selected. `{label}` is the visible select-all label (e.g. "Select all"). ARIA forbids aria-selected="mixed" on options, so the indeterminate state is conveyed through the name instead. "Partially" = some but not all.'},"@astryx.popover.close":{defaultMessage:`Close popover`,description:`"Close" = shut/dismiss, not "nearby". Screen-reader-only label on the close button inside a Popover.`},"@astryx.selector.searchPlaceholder":{defaultMessage:`Search…`,description:"Placeholder inside the search input at the top of a Selector's dropdown panel (for filtering options). Imperative verb; trailing `…` is one character."},"@astryx.selector.searchOptions":{defaultMessage:`Search options`,description:`"Options" = the list of choices in the dropdown. Screen-reader-only accessible name for the search input inside a Selector.`},"@astryx.selector.empty":{defaultMessage:`No options`,description:`Shown in a Selector's dropdown panel when it was given no options at all, and announced in a polite live region on open. Very short (2 words); neutral tone, not error-y.`},"@astryx.sideNav.label":{defaultMessage:`Side navigation`,description:`Screen-reader-only accessible name for the primary vertical sidebar nav (usually on the left).`},"@astryx.sideNav.resizeSidebar":{defaultMessage:`Resize sidebar`,description:`Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width.`},"@astryx.sideNav.heading.openMenu":{defaultMessage:`Open menu`,description:"Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label":{defaultMessage:`Tabs`,description:`Screen-reader-only fallback name for a horizontal tab bar. Plural noun; "Tabs" here = UI tab panels, not browser tabs or the Tab key.`},"@astryx.table.label":{defaultMessage:`Table`,description:`Fallback screen-reader-only accessible name for a data-table region when the consumer provides none. Noun ("a table"), not the verb "to table".`},"@astryx.table.noData":{defaultMessage:`No data`,description:`Fallback empty-state text in the table body when there are zero rows. Neutral tone (not error-y); consumers commonly override with something specific like "No results".`},"@astryx.table.filter.allPlaceholder":{defaultMessage:`All`,description:`Placeholder on a per-column filter dropdown when nothing is selected, meaning "no filter — all rows match". Determiner form (as in "all values"), not the pronoun.`},"@astryx.table.filter.reset":{defaultMessage:`Reset`,description:`Button label inside a table's filter panel/popover; clears pending filter values back to defaults. Imperative verb.`},"@astryx.table.filter.apply":{defaultMessage:`Apply`,description:"Primary button label inside a table's filter panel/popover; commits pending filter values. Imperative verb; pairs with `Reset`."},"@astryx.table.rowStatus.columnHeader":{defaultMessage:`Row status`,description:`Screen-reader-only column header for the narrow status-indicator gutter a Table gains from useTableRowStatus. Sighted users see a blank gutter; assistive tech announces this as the column name.`},"@astryx.table.selection.selectAllRows":{defaultMessage:`Select all rows`,description:`Aria label for the "select all rows" checkbox in a Table header.`},"@astryx.table.selection.selectRow":{defaultMessage:`Select row`,description:`Aria label for the "select row" checkbox on a Table row.`},"@astryx.table.selection.selectRowNamed":{defaultMessage:`Select {label}`,description:`Aria label for a Table row's selection checkbox when a per-row label is available (via getRowLabel). \`label\` is the row's human-readable identity, e.g. "Alice".`},"@astryx.table.sort.ascending":{defaultMessage:`Sort ascending`,description:"Screen-reader-only label on a column header button that will sort the column ascending. Part of a set with `sort.descending` and `sort.clear` — keep parallel."},"@astryx.table.sort.descending":{defaultMessage:`Sort descending`,description:"Screen-reader-only label on a column header button that will sort the column descending. Part of a set with `sort.ascending` and `sort.clear`."},"@astryx.table.sort.clear":{defaultMessage:`Clear sort`,description:`Screen-reader-only label on a column header button that will remove the current sort. "Clear" here means remove, not transparent. Part of the sort set.`},"@astryx.table.sort.direction.ascending":{defaultMessage:`ascending`,description:"Localized direction word interpolated as `direction` into @astryx.table.sort.sortedBy and @astryx.table.sort.sortedByWithPriority."},"@astryx.table.sort.direction.descending":{defaultMessage:`descending`,description:"Localized direction word interpolated as `direction` into @astryx.table.sort.sortedBy and @astryx.table.sort.sortedByWithPriority."},"@astryx.table.sort.sortBy":{defaultMessage:`Sort by {label}`,description:"Aria label for a sortable Table header button when the column is unsorted. `label` is the column header text."},"@astryx.table.sort.sortedBy":{defaultMessage:`Sort by {label}, sorted {direction}`,description:"Aria label for a sorted Table header button. `direction` is the localized direction word from @astryx.table.sort.direction.*."},"@astryx.table.sort.sortedByWithPriority":{defaultMessage:`Sort by {label}, sorted {direction}, priority {rank, number} of {total, number}`,description:"Aria label for a sorted Table header button in multi-sort. `rank` is the 1-based position of this column in the sort order; `total` is the number of sorted columns."},"@astryx.toast.dismiss":{defaultMessage:`Dismiss notification`,description:"Screen-reader-only label on the X button of a Toast (transient notification popup). Distinct from `banner.dismiss` (persistent banner)."},"@astryx.toast.viewport":{defaultMessage:`Notifications`,description:`Screen-reader-only accessible name for the invisible landmark region hosting the stack of Toast popups (usually pinned to a screen corner).`},"@astryx.tokenizer.clearAll":{defaultMessage:`Clear all`,description:`Label on the "×" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner "all"; short.`},"@astryx.topNav.heading.openMenu":{defaultMessage:`Open menu`,description:"Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel":{defaultMessage:`Top navigation`,description:`Default accessible name (aria-label) for the