pythinker-code 2.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pythinker_code/CHANGELOG.md +16 -0
- pythinker_code/__init__.py +0 -0
- pythinker_code/__main__.py +92 -0
- pythinker_code/acp/AGENTS.md +93 -0
- pythinker_code/acp/__init__.py +13 -0
- pythinker_code/acp/convert.py +128 -0
- pythinker_code/acp/host.py +298 -0
- pythinker_code/acp/mcp.py +46 -0
- pythinker_code/acp/server.py +497 -0
- pythinker_code/acp/session.py +496 -0
- pythinker_code/acp/tools.py +167 -0
- pythinker_code/acp/types.py +13 -0
- pythinker_code/acp/version.py +45 -0
- pythinker_code/agents/default/agent.yaml +36 -0
- pythinker_code/agents/default/coder.yaml +25 -0
- pythinker_code/agents/default/explore.yaml +46 -0
- pythinker_code/agents/default/plan.yaml +30 -0
- pythinker_code/agents/default/system.md +164 -0
- pythinker_code/agents/okabe/agent.yaml +22 -0
- pythinker_code/agentspec.py +163 -0
- pythinker_code/app.py +820 -0
- pythinker_code/approval_runtime/__init__.py +29 -0
- pythinker_code/approval_runtime/models.py +42 -0
- pythinker_code/approval_runtime/runtime.py +235 -0
- pythinker_code/auth/__init__.py +25 -0
- pythinker_code/auth/anthropic_direct.py +207 -0
- pythinker_code/auth/deepseek.py +192 -0
- pythinker_code/auth/lm_studio.py +418 -0
- pythinker_code/auth/minimax.py +203 -0
- pythinker_code/auth/oauth.py +1122 -0
- pythinker_code/auth/ollama.py +293 -0
- pythinker_code/auth/openai.py +771 -0
- pythinker_code/auth/opencode_go.py +203 -0
- pythinker_code/auth/openrouter.py +225 -0
- pythinker_code/auth/platforms.py +466 -0
- pythinker_code/background/__init__.py +36 -0
- pythinker_code/background/agent_runner.py +231 -0
- pythinker_code/background/ids.py +19 -0
- pythinker_code/background/manager.py +650 -0
- pythinker_code/background/models.py +105 -0
- pythinker_code/background/store.py +237 -0
- pythinker_code/background/summary.py +66 -0
- pythinker_code/background/worker.py +209 -0
- pythinker_code/cli/__init__.py +1326 -0
- pythinker_code/cli/__main__.py +19 -0
- pythinker_code/cli/_lazy_group.py +238 -0
- pythinker_code/cli/export.py +322 -0
- pythinker_code/cli/info.py +62 -0
- pythinker_code/cli/mcp.py +349 -0
- pythinker_code/cli/plugin.py +351 -0
- pythinker_code/cli/toad.py +74 -0
- pythinker_code/cli/vis.py +38 -0
- pythinker_code/cli/web.py +80 -0
- pythinker_code/config.py +453 -0
- pythinker_code/constant.py +33 -0
- pythinker_code/exception.py +43 -0
- pythinker_code/hooks/__init__.py +4 -0
- pythinker_code/hooks/config.py +34 -0
- pythinker_code/hooks/engine.py +371 -0
- pythinker_code/hooks/events.py +190 -0
- pythinker_code/hooks/runner.py +89 -0
- pythinker_code/llm.py +412 -0
- pythinker_code/metadata.py +79 -0
- pythinker_code/notifications/__init__.py +33 -0
- pythinker_code/notifications/llm.py +77 -0
- pythinker_code/notifications/manager.py +145 -0
- pythinker_code/notifications/models.py +50 -0
- pythinker_code/notifications/notifier.py +41 -0
- pythinker_code/notifications/store.py +118 -0
- pythinker_code/notifications/wire.py +21 -0
- pythinker_code/plugin/__init__.py +124 -0
- pythinker_code/plugin/manager.py +153 -0
- pythinker_code/plugin/tool.py +173 -0
- pythinker_code/prompts/__init__.py +6 -0
- pythinker_code/prompts/compact.md +73 -0
- pythinker_code/prompts/init.md +21 -0
- pythinker_code/py.typed +0 -0
- pythinker_code/session.py +319 -0
- pythinker_code/session_fork.py +325 -0
- pythinker_code/session_state.py +132 -0
- pythinker_code/share.py +14 -0
- pythinker_code/skill/__init__.py +727 -0
- pythinker_code/skill/flow/__init__.py +99 -0
- pythinker_code/skill/flow/d2.py +482 -0
- pythinker_code/skill/flow/mermaid.py +266 -0
- pythinker_code/skills/pythinker-code-help/SKILL.md +54 -0
- pythinker_code/skills/skill-creator/SKILL.md +367 -0
- pythinker_code/soul/__init__.py +304 -0
- pythinker_code/soul/agent.py +520 -0
- pythinker_code/soul/approval.py +267 -0
- pythinker_code/soul/btw.py +214 -0
- pythinker_code/soul/compaction.py +189 -0
- pythinker_code/soul/context.py +339 -0
- pythinker_code/soul/denwarenji.py +39 -0
- pythinker_code/soul/dynamic_injection.py +84 -0
- pythinker_code/soul/dynamic_injections/__init__.py +0 -0
- pythinker_code/soul/dynamic_injections/auto_mode.py +72 -0
- pythinker_code/soul/dynamic_injections/plan_mode.py +239 -0
- pythinker_code/soul/message.py +92 -0
- pythinker_code/soul/pythinkersoul.py +1613 -0
- pythinker_code/soul/slash.py +340 -0
- pythinker_code/soul/toolset.py +788 -0
- pythinker_code/subagents/__init__.py +21 -0
- pythinker_code/subagents/builder.py +42 -0
- pythinker_code/subagents/core.py +86 -0
- pythinker_code/subagents/git_context.py +172 -0
- pythinker_code/subagents/models.py +54 -0
- pythinker_code/subagents/output.py +71 -0
- pythinker_code/subagents/registry.py +28 -0
- pythinker_code/subagents/runner.py +428 -0
- pythinker_code/subagents/store.py +196 -0
- pythinker_code/telemetry/__init__.py +211 -0
- pythinker_code/telemetry/config.py +54 -0
- pythinker_code/telemetry/crash.py +157 -0
- pythinker_code/telemetry/metrics.py +208 -0
- pythinker_code/telemetry/otel.py +240 -0
- pythinker_code/telemetry/sentry.py +167 -0
- pythinker_code/telemetry/sink.py +189 -0
- pythinker_code/tools/AGENTS.md +6 -0
- pythinker_code/tools/__init__.py +105 -0
- pythinker_code/tools/agent/__init__.py +277 -0
- pythinker_code/tools/agent/description.md +41 -0
- pythinker_code/tools/ask_user/__init__.py +159 -0
- pythinker_code/tools/ask_user/description.md +19 -0
- pythinker_code/tools/background/__init__.py +318 -0
- pythinker_code/tools/background/list.md +10 -0
- pythinker_code/tools/background/output.md +11 -0
- pythinker_code/tools/background/stop.md +8 -0
- pythinker_code/tools/display.py +46 -0
- pythinker_code/tools/dmail/__init__.py +38 -0
- pythinker_code/tools/dmail/dmail.md +17 -0
- pythinker_code/tools/file/__init__.py +30 -0
- pythinker_code/tools/file/glob.md +17 -0
- pythinker_code/tools/file/glob.py +160 -0
- pythinker_code/tools/file/grep.md +6 -0
- pythinker_code/tools/file/grep_local.py +589 -0
- pythinker_code/tools/file/plan_mode.py +45 -0
- pythinker_code/tools/file/read.md +16 -0
- pythinker_code/tools/file/read.py +300 -0
- pythinker_code/tools/file/read_media.md +24 -0
- pythinker_code/tools/file/read_media.py +217 -0
- pythinker_code/tools/file/replace.md +7 -0
- pythinker_code/tools/file/replace.py +195 -0
- pythinker_code/tools/file/utils.py +257 -0
- pythinker_code/tools/file/write.md +5 -0
- pythinker_code/tools/file/write.py +177 -0
- pythinker_code/tools/plan/__init__.py +327 -0
- pythinker_code/tools/plan/description.md +29 -0
- pythinker_code/tools/plan/enter.py +190 -0
- pythinker_code/tools/plan/enter_description.md +35 -0
- pythinker_code/tools/plan/heroes.py +277 -0
- pythinker_code/tools/shell/__init__.py +253 -0
- pythinker_code/tools/shell/bash.md +35 -0
- pythinker_code/tools/shell/powershell.md +30 -0
- pythinker_code/tools/test.py +55 -0
- pythinker_code/tools/think/__init__.py +21 -0
- pythinker_code/tools/think/think.md +1 -0
- pythinker_code/tools/todo/__init__.py +168 -0
- pythinker_code/tools/todo/set_todo_list.md +23 -0
- pythinker_code/tools/utils.py +199 -0
- pythinker_code/tools/web/__init__.py +4 -0
- pythinker_code/tools/web/fetch.md +1 -0
- pythinker_code/tools/web/fetch.py +189 -0
- pythinker_code/tools/web/search.md +1 -0
- pythinker_code/tools/web/search.py +163 -0
- pythinker_code/ui/__init__.py +0 -0
- pythinker_code/ui/acp/__init__.py +99 -0
- pythinker_code/ui/print/__init__.py +474 -0
- pythinker_code/ui/print/visualize.py +185 -0
- pythinker_code/ui/shell/__init__.py +1696 -0
- pythinker_code/ui/shell/console.py +109 -0
- pythinker_code/ui/shell/debug.py +190 -0
- pythinker_code/ui/shell/echo.py +17 -0
- pythinker_code/ui/shell/export_import.py +117 -0
- pythinker_code/ui/shell/keyboard.py +300 -0
- pythinker_code/ui/shell/mcp_status.py +113 -0
- pythinker_code/ui/shell/model_picker.py +318 -0
- pythinker_code/ui/shell/oauth.py +272 -0
- pythinker_code/ui/shell/placeholders.py +531 -0
- pythinker_code/ui/shell/prompt.py +2278 -0
- pythinker_code/ui/shell/replay.py +215 -0
- pythinker_code/ui/shell/session_picker.py +227 -0
- pythinker_code/ui/shell/setup.py +212 -0
- pythinker_code/ui/shell/slash.py +898 -0
- pythinker_code/ui/shell/startup.py +32 -0
- pythinker_code/ui/shell/task_browser.py +486 -0
- pythinker_code/ui/shell/update.py +350 -0
- pythinker_code/ui/shell/usage.py +291 -0
- pythinker_code/ui/shell/usage_adapters/__init__.py +50 -0
- pythinker_code/ui/shell/usage_adapters/anthropic_admin.py +233 -0
- pythinker_code/ui/shell/usage_adapters/base.py +72 -0
- pythinker_code/ui/shell/usage_adapters/deepseek.py +137 -0
- pythinker_code/ui/shell/usage_adapters/minimax.py +236 -0
- pythinker_code/ui/shell/usage_adapters/openai_admin.py +225 -0
- pythinker_code/ui/shell/usage_adapters/openai_chatgpt.py +241 -0
- pythinker_code/ui/shell/usage_adapters/opencode_go.py +232 -0
- pythinker_code/ui/shell/usage_adapters/openrouter.py +105 -0
- pythinker_code/ui/shell/usage_adapters/pythinker.py +189 -0
- pythinker_code/ui/shell/usage_adapters/pythinker_ai.py +50 -0
- pythinker_code/ui/shell/usage_render.py +150 -0
- pythinker_code/ui/shell/visualize/__init__.py +165 -0
- pythinker_code/ui/shell/visualize/_approval_panel.py +505 -0
- pythinker_code/ui/shell/visualize/_blocks.py +629 -0
- pythinker_code/ui/shell/visualize/_btw_panel.py +224 -0
- pythinker_code/ui/shell/visualize/_input_router.py +48 -0
- pythinker_code/ui/shell/visualize/_interactive.py +523 -0
- pythinker_code/ui/shell/visualize/_live_view.py +826 -0
- pythinker_code/ui/shell/visualize/_question_panel.py +586 -0
- pythinker_code/ui/theme.py +241 -0
- pythinker_code/usage_ratelimit_cache.py +175 -0
- pythinker_code/utils/__init__.py +0 -0
- pythinker_code/utils/aiohttp.py +24 -0
- pythinker_code/utils/aioqueue.py +72 -0
- pythinker_code/utils/broadcast.py +37 -0
- pythinker_code/utils/changelog.py +108 -0
- pythinker_code/utils/clipboard.py +246 -0
- pythinker_code/utils/datetime.py +64 -0
- pythinker_code/utils/diff.py +135 -0
- pythinker_code/utils/editor.py +91 -0
- pythinker_code/utils/environment.py +73 -0
- pythinker_code/utils/envvar.py +22 -0
- pythinker_code/utils/export.py +696 -0
- pythinker_code/utils/file_filter.py +375 -0
- pythinker_code/utils/frontmatter.py +70 -0
- pythinker_code/utils/io.py +27 -0
- pythinker_code/utils/logging.py +146 -0
- pythinker_code/utils/media_tags.py +29 -0
- pythinker_code/utils/message.py +24 -0
- pythinker_code/utils/path.py +199 -0
- pythinker_code/utils/proctitle.py +33 -0
- pythinker_code/utils/proxy.py +31 -0
- pythinker_code/utils/pyinstaller.py +45 -0
- pythinker_code/utils/rich/__init__.py +33 -0
- pythinker_code/utils/rich/columns.py +99 -0
- pythinker_code/utils/rich/diff_render.py +481 -0
- pythinker_code/utils/rich/markdown.py +900 -0
- pythinker_code/utils/rich/markdown_sample.md +108 -0
- pythinker_code/utils/rich/markdown_sample_short.md +2 -0
- pythinker_code/utils/rich/syntax.py +114 -0
- pythinker_code/utils/sensitive.py +54 -0
- pythinker_code/utils/server.py +121 -0
- pythinker_code/utils/signals.py +43 -0
- pythinker_code/utils/slashcmd.py +124 -0
- pythinker_code/utils/string.py +41 -0
- pythinker_code/utils/subprocess_env.py +73 -0
- pythinker_code/utils/term.py +168 -0
- pythinker_code/utils/typing.py +20 -0
- pythinker_code/vis/__init__.py +0 -0
- pythinker_code/vis/api/__init__.py +5 -0
- pythinker_code/vis/api/sessions.py +687 -0
- pythinker_code/vis/api/statistics.py +209 -0
- pythinker_code/vis/api/system.py +19 -0
- pythinker_code/vis/app.py +175 -0
- pythinker_code/vis/static/assets/highlighted-body-B3W2YXNL-D2MTYyJz.js +1 -0
- pythinker_code/vis/static/assets/index-CezafTt_.js +185 -0
- pythinker_code/vis/static/assets/index-DSRInNnm.css +1 -0
- pythinker_code/vis/static/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- pythinker_code/vis/static/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- pythinker_code/vis/static/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- pythinker_code/vis/static/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- pythinker_code/vis/static/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- pythinker_code/vis/static/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- pythinker_code/vis/static/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- pythinker_code/vis/static/index.html +17 -0
- pythinker_code/web/__init__.py +5 -0
- pythinker_code/web/api/__init__.py +15 -0
- pythinker_code/web/api/config.py +208 -0
- pythinker_code/web/api/open_in.py +199 -0
- pythinker_code/web/api/sessions.py +1225 -0
- pythinker_code/web/app.py +451 -0
- pythinker_code/web/auth.py +191 -0
- pythinker_code/web/models.py +98 -0
- pythinker_code/web/runner/__init__.py +5 -0
- pythinker_code/web/runner/messages.py +57 -0
- pythinker_code/web/runner/process.py +754 -0
- pythinker_code/web/runner/worker.py +97 -0
- pythinker_code/web/static/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- pythinker_code/web/static/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- pythinker_code/web/static/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- pythinker_code/web/static/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- pythinker_code/web/static/assets/_baseUniq--dyU3g5v.js +1 -0
- pythinker_code/web/static/assets/abap-BdImnpbu.js +1 -0
- pythinker_code/web/static/assets/actionscript-3-CfeIJUat.js +1 -0
- pythinker_code/web/static/assets/ada-bCR0ucgS.js +1 -0
- pythinker_code/web/static/assets/andromeeda-C-Jbm3Hp.js +1 -0
- pythinker_code/web/static/assets/angular-html-CU67Zn6k.js +1 -0
- pythinker_code/web/static/assets/angular-ts-BwZT4LLn.js +1 -0
- pythinker_code/web/static/assets/apache-Pmp26Uib.js +1 -0
- pythinker_code/web/static/assets/apex-D8_7TLub.js +1 -0
- pythinker_code/web/static/assets/apl-dKokRX4l.js +1 -0
- pythinker_code/web/static/assets/applescript-Co6uUVPk.js +1 -0
- pythinker_code/web/static/assets/ara-BRHolxvo.js +1 -0
- pythinker_code/web/static/assets/arc-DkMjLpYa.js +1 -0
- pythinker_code/web/static/assets/architectureDiagram-VXUJARFQ-CHWVaGo9.js +36 -0
- pythinker_code/web/static/assets/asciidoc-Dv7Oe6Be.js +1 -0
- pythinker_code/web/static/assets/asm-D_Q5rh1f.js +1 -0
- pythinker_code/web/static/assets/astro-CbQHKStN.js +1 -0
- pythinker_code/web/static/assets/aurora-x-D-2ljcwZ.js +1 -0
- pythinker_code/web/static/assets/awk-DMzUqQB5.js +1 -0
- pythinker_code/web/static/assets/ayu-dark-CmMr59Fi.js +1 -0
- pythinker_code/web/static/assets/ballerina-BFfxhgS-.js +1 -0
- pythinker_code/web/static/assets/bat-BkioyH1T.js +1 -0
- pythinker_code/web/static/assets/beancount-k_qm7-4y.js +1 -0
- pythinker_code/web/static/assets/berry-uYugtg8r.js +1 -0
- pythinker_code/web/static/assets/bibtex-CHM0blh-.js +1 -0
- pythinker_code/web/static/assets/bicep-Bmn6On1c.js +1 -0
- pythinker_code/web/static/assets/blade-D4QpJJKB.js +1 -0
- pythinker_code/web/static/assets/blockDiagram-VD42YOAC-DzdKe497.js +122 -0
- pythinker_code/web/static/assets/bsl-BO_Y6i37.js +1 -0
- pythinker_code/web/static/assets/c-BIGW1oBm.js +1 -0
- pythinker_code/web/static/assets/c3-VCDPK7BO.js +1 -0
- pythinker_code/web/static/assets/c4Diagram-YG6GDRKO-D84Blotg.js +10 -0
- pythinker_code/web/static/assets/cadence-Bv_4Rxtq.js +1 -0
- pythinker_code/web/static/assets/cairo-KRGpt6FW.js +1 -0
- pythinker_code/web/static/assets/catppuccin-frappe-DFWUc33u.js +1 -0
- pythinker_code/web/static/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
- pythinker_code/web/static/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
- pythinker_code/web/static/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
- pythinker_code/web/static/assets/channel-CllSjjdl.js +1 -0
- pythinker_code/web/static/assets/chunk-4BX2VUAB-C9w8wleE.js +1 -0
- pythinker_code/web/static/assets/chunk-55IACEB6-YlYJ8HnF.js +1 -0
- pythinker_code/web/static/assets/chunk-B4BG7PRW-Bwtz_AHU.js +165 -0
- pythinker_code/web/static/assets/chunk-DI55MBZ5-BbEHkl8h.js +220 -0
- pythinker_code/web/static/assets/chunk-FMBD7UC4-BKPbvjLC.js +15 -0
- pythinker_code/web/static/assets/chunk-QN33PNHL-D73dQvKf.js +1 -0
- pythinker_code/web/static/assets/chunk-QZHKN3VN-zGiLKes_.js +1 -0
- pythinker_code/web/static/assets/chunk-TZMSLE5B-LHJCi2fy.js +1 -0
- pythinker_code/web/static/assets/clarity-D53aC0YG.js +1 -0
- pythinker_code/web/static/assets/classDiagram-2ON5EDUG-vX27iZwa.js +1 -0
- pythinker_code/web/static/assets/classDiagram-v2-WZHVMYZB-vX27iZwa.js +1 -0
- pythinker_code/web/static/assets/clojure-P80f7IUj.js +1 -0
- pythinker_code/web/static/assets/clone-DYBkaPm2.js +1 -0
- pythinker_code/web/static/assets/cmake-D1j8_8rp.js +1 -0
- pythinker_code/web/static/assets/cobol-nwyudZeR.js +1 -0
- pythinker_code/web/static/assets/code-block-IT6T5CEO-NtKViZGl.js +2 -0
- pythinker_code/web/static/assets/codeowners-Bp6g37R7.js +1 -0
- pythinker_code/web/static/assets/codeql-DsOJ9woJ.js +1 -0
- pythinker_code/web/static/assets/coffee-Ch7k5sss.js +1 -0
- pythinker_code/web/static/assets/common-lisp-Cg-RD9OK.js +1 -0
- pythinker_code/web/static/assets/coq-DkFqJrB1.js +1 -0
- pythinker_code/web/static/assets/cose-bilkent-S5V4N54A-DialjZpd.js +1 -0
- pythinker_code/web/static/assets/cpp-CofmeUqb.js +1 -0
- pythinker_code/web/static/assets/crystal-tKQVLTB8.js +1 -0
- pythinker_code/web/static/assets/csharp-K5feNrxe.js +1 -0
- pythinker_code/web/static/assets/css-DPfMkruS.js +1 -0
- pythinker_code/web/static/assets/csv-fuZLfV_i.js +1 -0
- pythinker_code/web/static/assets/cue-D82EKSYY.js +1 -0
- pythinker_code/web/static/assets/cypher-COkxafJQ.js +1 -0
- pythinker_code/web/static/assets/cytoscape.esm-C_Fzpdck.js +321 -0
- pythinker_code/web/static/assets/d-85-TOEBH.js +1 -0
- pythinker_code/web/static/assets/dagre-6UL2VRFP-DfuvkZZ7.js +4 -0
- pythinker_code/web/static/assets/dark-plus-C3mMm8J8.js +1 -0
- pythinker_code/web/static/assets/dart-CF10PKvl.js +1 -0
- pythinker_code/web/static/assets/dax-CEL-wOlO.js +1 -0
- pythinker_code/web/static/assets/defaultLocale-DX6XiGOO.js +1 -0
- pythinker_code/web/static/assets/desktop-BmXAJ9_W.js +1 -0
- pythinker_code/web/static/assets/diagram-PSM6KHXK-DLGctX3v.js +24 -0
- pythinker_code/web/static/assets/diagram-QEK2KX5R-DnxN6S0F.js +43 -0
- pythinker_code/web/static/assets/diagram-S2PKOQOG-Caq_Set9.js +24 -0
- pythinker_code/web/static/assets/diff-D97Zzqfu.js +1 -0
- pythinker_code/web/static/assets/docker-BcOcwvcX.js +1 -0
- pythinker_code/web/static/assets/dotenv-Da5cRb03.js +1 -0
- pythinker_code/web/static/assets/dracula-BzJJZx-M.js +1 -0
- pythinker_code/web/static/assets/dracula-soft-BXkSAIEj.js +1 -0
- pythinker_code/web/static/assets/dream-maker-BtqSS_iP.js +1 -0
- pythinker_code/web/static/assets/edge-BkV0erSs.js +1 -0
- pythinker_code/web/static/assets/elixir-CDX3lj18.js +1 -0
- pythinker_code/web/static/assets/elm-DbKCFpqz.js +1 -0
- pythinker_code/web/static/assets/emacs-lisp-C9XAeP06.js +1 -0
- pythinker_code/web/static/assets/erDiagram-Q2GNP2WA-BgTfALoK.js +60 -0
- pythinker_code/web/static/assets/erb-BOJIQeun.js +1 -0
- pythinker_code/web/static/assets/erlang-DsQrWhSR.js +1 -0
- pythinker_code/web/static/assets/everforest-dark-BgDCqdQA.js +1 -0
- pythinker_code/web/static/assets/everforest-light-C8M2exoo.js +1 -0
- pythinker_code/web/static/assets/fennel-BYunw83y.js +1 -0
- pythinker_code/web/static/assets/fish-BvzEVeQv.js +1 -0
- pythinker_code/web/static/assets/flowDiagram-NV44I4VS-QjW_fnGi.js +162 -0
- pythinker_code/web/static/assets/fluent-C4IJs8-o.js +1 -0
- pythinker_code/web/static/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
- pythinker_code/web/static/assets/fortran-free-form-BxgE0vQu.js +1 -0
- pythinker_code/web/static/assets/fsharp-CXgrBDvD.js +1 -0
- pythinker_code/web/static/assets/ganttDiagram-JELNMOA3-fqi8JFof.js +267 -0
- pythinker_code/web/static/assets/gdresource-B7Tvp0Sc.js +1 -0
- pythinker_code/web/static/assets/gdscript-DTMYz4Jt.js +1 -0
- pythinker_code/web/static/assets/gdshader-DkwncUOv.js +1 -0
- pythinker_code/web/static/assets/genie-D0YGMca9.js +1 -0
- pythinker_code/web/static/assets/gherkin-DyxjwDmM.js +1 -0
- pythinker_code/web/static/assets/git-commit-F4YmCXRG.js +1 -0
- pythinker_code/web/static/assets/git-rebase-r7XF79zn.js +1 -0
- pythinker_code/web/static/assets/gitGraphDiagram-NY62KEGX-i7o6VQ8x.js +65 -0
- pythinker_code/web/static/assets/github-dark-DHJKELXO.js +1 -0
- pythinker_code/web/static/assets/github-dark-default-Cuk6v7N8.js +1 -0
- pythinker_code/web/static/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- pythinker_code/web/static/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- pythinker_code/web/static/assets/github-light-DAi9KRSo.js +1 -0
- pythinker_code/web/static/assets/github-light-default-D7oLnXFd.js +1 -0
- pythinker_code/web/static/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- pythinker_code/web/static/assets/gleam-BspZqrRM.js +1 -0
- pythinker_code/web/static/assets/glimmer-js-Rg0-pVw9.js +1 -0
- pythinker_code/web/static/assets/glimmer-ts-U6CK756n.js +1 -0
- pythinker_code/web/static/assets/glsl-DplSGwfg.js +1 -0
- pythinker_code/web/static/assets/gn-n2N0HUVH.js +1 -0
- pythinker_code/web/static/assets/gnuplot-DdkO51Og.js +1 -0
- pythinker_code/web/static/assets/go-Dn2_MT6a.js +1 -0
- pythinker_code/web/static/assets/graph-C0vZK2pT.js +1 -0
- pythinker_code/web/static/assets/graphql-ChdNCCLP.js +1 -0
- pythinker_code/web/static/assets/groovy-gcz8RCvz.js +1 -0
- pythinker_code/web/static/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
- pythinker_code/web/static/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
- pythinker_code/web/static/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
- pythinker_code/web/static/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
- pythinker_code/web/static/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
- pythinker_code/web/static/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
- pythinker_code/web/static/assets/hack-CaT9iCJl.js +1 -0
- pythinker_code/web/static/assets/haml-B8DHNrY2.js +1 -0
- pythinker_code/web/static/assets/handlebars-BL8al0AC.js +1 -0
- pythinker_code/web/static/assets/haskell-Df6bDoY_.js +1 -0
- pythinker_code/web/static/assets/haxe-CzTSHFRz.js +1 -0
- pythinker_code/web/static/assets/hcl-BWvSN4gD.js +1 -0
- pythinker_code/web/static/assets/hjson-D5-asLiD.js +1 -0
- pythinker_code/web/static/assets/hlsl-D3lLCCz7.js +1 -0
- pythinker_code/web/static/assets/houston-DnULxvSX.js +1 -0
- pythinker_code/web/static/assets/html-GMplVEZG.js +1 -0
- pythinker_code/web/static/assets/html-derivative-BFtXZ54Q.js +1 -0
- pythinker_code/web/static/assets/http-jrhK8wxY.js +1 -0
- pythinker_code/web/static/assets/hurl-irOxFIW8.js +1 -0
- pythinker_code/web/static/assets/hxml-Bvhsp5Yf.js +1 -0
- pythinker_code/web/static/assets/hy-DFXneXwc.js +1 -0
- pythinker_code/web/static/assets/imba-DGztddWO.js +1 -0
- pythinker_code/web/static/assets/index-BYCCk6-K.js +153 -0
- pythinker_code/web/static/assets/index-BpoLgcEt.js +1 -0
- pythinker_code/web/static/assets/index-Cpy4G3uJ.js +2 -0
- pythinker_code/web/static/assets/index-CzV_vCfu.css +1 -0
- pythinker_code/web/static/assets/index-DI2oedCt.js +19 -0
- pythinker_code/web/static/assets/index-DdIkp80K.js +5 -0
- pythinker_code/web/static/assets/infoDiagram-WHAUD3N6-BMPpeZSM.js +2 -0
- pythinker_code/web/static/assets/ini-BEwlwnbL.js +1 -0
- pythinker_code/web/static/assets/init-Gi6I4Gst.js +1 -0
- pythinker_code/web/static/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- pythinker_code/web/static/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- pythinker_code/web/static/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- pythinker_code/web/static/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- pythinker_code/web/static/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- pythinker_code/web/static/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- pythinker_code/web/static/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- pythinker_code/web/static/assets/java-CylS5w8V.js +1 -0
- pythinker_code/web/static/assets/javascript-wDzz0qaB.js +1 -0
- pythinker_code/web/static/assets/jinja-4LBKfQ-Z.js +1 -0
- pythinker_code/web/static/assets/jison-wvAkD_A8.js +1 -0
- pythinker_code/web/static/assets/journeyDiagram-XKPGCS4Q-DAM7gngo.js +139 -0
- pythinker_code/web/static/assets/json-Cp-IABpG.js +1 -0
- pythinker_code/web/static/assets/json5-C9tS-k6U.js +1 -0
- pythinker_code/web/static/assets/jsonc-Des-eS-w.js +1 -0
- pythinker_code/web/static/assets/jsonl-DcaNXYhu.js +1 -0
- pythinker_code/web/static/assets/jsonnet-DFQXde-d.js +1 -0
- pythinker_code/web/static/assets/jssm-C2t-YnRu.js +1 -0
- pythinker_code/web/static/assets/jsx-g9-lgVsj.js +1 -0
- pythinker_code/web/static/assets/julia-CxzCAyBv.js +1 -0
- pythinker_code/web/static/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
- pythinker_code/web/static/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
- pythinker_code/web/static/assets/kanagawa-wave-DWedfzmr.js +1 -0
- pythinker_code/web/static/assets/kanban-definition-3W4ZIXB7-ChpBpV0k.js +89 -0
- pythinker_code/web/static/assets/katex-D2lIc1rk.css +1 -0
- pythinker_code/web/static/assets/kdl-DV7GczEv.js +1 -0
- pythinker_code/web/static/assets/kotlin-BdnUsdx6.js +1 -0
- pythinker_code/web/static/assets/kusto-DZf3V79B.js +1 -0
- pythinker_code/web/static/assets/laserwave-DUszq2jm.js +1 -0
- pythinker_code/web/static/assets/latex-B4uzh10-.js +1 -0
- pythinker_code/web/static/assets/layout-C3Jp1gKO.js +1 -0
- pythinker_code/web/static/assets/lean-BZvkOJ9d.js +1 -0
- pythinker_code/web/static/assets/less-B1dDrJ26.js +1 -0
- pythinker_code/web/static/assets/light-plus-B7mTdjB0.js +1 -0
- pythinker_code/web/static/assets/linear-BGHtL1N4.js +1 -0
- pythinker_code/web/static/assets/liquid-DYVedYrR.js +1 -0
- pythinker_code/web/static/assets/llvm-BtvRca6l.js +1 -0
- pythinker_code/web/static/assets/log-2UxHyX5q.js +1 -0
- pythinker_code/web/static/assets/logo-BtOb2qkB.js +1 -0
- pythinker_code/web/static/assets/lua-BbnMAYS6.js +1 -0
- pythinker_code/web/static/assets/luau-C-HG3fhB.js +1 -0
- pythinker_code/web/static/assets/make-CHLpvVh8.js +1 -0
- pythinker_code/web/static/assets/markdown-Cvjx9yec.js +1 -0
- pythinker_code/web/static/assets/marko-DZsq8hO1.js +1 -0
- pythinker_code/web/static/assets/material-theme-D5KoaKCx.js +1 -0
- pythinker_code/web/static/assets/material-theme-darker-BfHTSMKl.js +1 -0
- pythinker_code/web/static/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- pythinker_code/web/static/assets/material-theme-ocean-CyktbL80.js +1 -0
- pythinker_code/web/static/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- pythinker_code/web/static/assets/matlab-D7o27uSR.js +1 -0
- pythinker_code/web/static/assets/mdc-DUICxH0z.js +1 -0
- pythinker_code/web/static/assets/mdx-Cmh6b_Ma.js +1 -0
- pythinker_code/web/static/assets/mermaid-VLURNSYL-B2P5VJ9v.css +1 -0
- pythinker_code/web/static/assets/mermaid-VLURNSYL-C_HW6koB.js +465 -0
- pythinker_code/web/static/assets/mermaid-mWjccvbQ.js +1 -0
- pythinker_code/web/static/assets/mermaid.core-CnT4VrPC.js +191 -0
- pythinker_code/web/static/assets/min-Dn5VRVmX.js +1 -0
- pythinker_code/web/static/assets/min-dark-CafNBF8u.js +1 -0
- pythinker_code/web/static/assets/min-light-CTRr51gU.js +1 -0
- pythinker_code/web/static/assets/mindmap-definition-VGOIOE7T-x8EwhfIt.js +68 -0
- pythinker_code/web/static/assets/mipsasm-CKIfxQSi.js +1 -0
- pythinker_code/web/static/assets/mojo-B93PlW-d.js +1 -0
- pythinker_code/web/static/assets/monokai-D4h5O-jR.js +1 -0
- pythinker_code/web/static/assets/moonbit-Ba13S78F.js +1 -0
- pythinker_code/web/static/assets/move-Bu9oaDYs.js +1 -0
- pythinker_code/web/static/assets/narrat-DRg8JJMk.js +1 -0
- pythinker_code/web/static/assets/nextflow-BrzmwbiE.js +1 -0
- pythinker_code/web/static/assets/nginx-DknmC5AR.js +1 -0
- pythinker_code/web/static/assets/night-owl-C39BiMTA.js +1 -0
- pythinker_code/web/static/assets/nim-CVrawwO9.js +1 -0
- pythinker_code/web/static/assets/nix-CwoSXNpI.js +1 -0
- pythinker_code/web/static/assets/nord-Ddv68eIx.js +1 -0
- pythinker_code/web/static/assets/nushell-C-sUppwS.js +1 -0
- pythinker_code/web/static/assets/objective-c-DXmwc3jG.js +1 -0
- pythinker_code/web/static/assets/objective-cpp-CLxacb5B.js +1 -0
- pythinker_code/web/static/assets/ocaml-C0hk2d4L.js +1 -0
- pythinker_code/web/static/assets/one-dark-pro-DVMEJ2y_.js +1 -0
- pythinker_code/web/static/assets/one-light-PoHY5YXO.js +1 -0
- pythinker_code/web/static/assets/openscad-C4EeE6gA.js +1 -0
- pythinker_code/web/static/assets/ordinal-Cboi1Yqb.js +1 -0
- pythinker_code/web/static/assets/pascal-D93ZcfNL.js +1 -0
- pythinker_code/web/static/assets/perl-C0TMdlhV.js +1 -0
- pythinker_code/web/static/assets/php-CDn_0X-4.js +1 -0
- pythinker_code/web/static/assets/pieDiagram-ADFJNKIX-DgxBKGz2.js +30 -0
- pythinker_code/web/static/assets/pkl-u5AG7uiY.js +1 -0
- pythinker_code/web/static/assets/plastic-3e1v2bzS.js +1 -0
- pythinker_code/web/static/assets/plsql-ChMvpjG-.js +1 -0
- pythinker_code/web/static/assets/po-BTJTHyun.js +1 -0
- pythinker_code/web/static/assets/poimandres-CS3Unz2-.js +1 -0
- pythinker_code/web/static/assets/polar-C0HS_06l.js +1 -0
- pythinker_code/web/static/assets/postcss-CXtECtnM.js +1 -0
- pythinker_code/web/static/assets/powerquery-CEu0bR-o.js +1 -0
- pythinker_code/web/static/assets/powershell-Dpen1YoG.js +1 -0
- pythinker_code/web/static/assets/prisma-Dd19v3D-.js +1 -0
- pythinker_code/web/static/assets/prolog-CbFg5uaA.js +1 -0
- pythinker_code/web/static/assets/proto-C7zT0LnQ.js +1 -0
- pythinker_code/web/static/assets/pug-CGlum2m_.js +1 -0
- pythinker_code/web/static/assets/puppet-BMWR74SV.js +1 -0
- pythinker_code/web/static/assets/purescript-CklMAg4u.js +1 -0
- pythinker_code/web/static/assets/python-B6aJPvgy.js +1 -0
- pythinker_code/web/static/assets/qml-3beO22l8.js +1 -0
- pythinker_code/web/static/assets/qmldir-C8lEn-DE.js +1 -0
- pythinker_code/web/static/assets/qss-IeuSbFQv.js +1 -0
- pythinker_code/web/static/assets/quadrantDiagram-AYHSOK5B-DSpe_dqk.js +7 -0
- pythinker_code/web/static/assets/r-Dspwwk_N.js +1 -0
- pythinker_code/web/static/assets/racket-BqYA7rlc.js +1 -0
- pythinker_code/web/static/assets/raku-DXvB9xmW.js +1 -0
- pythinker_code/web/static/assets/razor-C1TweQQi.js +1 -0
- pythinker_code/web/static/assets/red-bN70gL4F.js +1 -0
- pythinker_code/web/static/assets/reg-C-SQnVFl.js +1 -0
- pythinker_code/web/static/assets/regexp-CDVJQ6XC.js +1 -0
- pythinker_code/web/static/assets/rel-C3B-1QV4.js +1 -0
- pythinker_code/web/static/assets/requirementDiagram-UZGBJVZJ-8o9hozL-.js +64 -0
- pythinker_code/web/static/assets/riscv-BM1_JUlF.js +1 -0
- pythinker_code/web/static/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
- pythinker_code/web/static/assets/rose-pine-moon-D4_iv3hh.js +1 -0
- pythinker_code/web/static/assets/rose-pine-qdsjHGoJ.js +1 -0
- pythinker_code/web/static/assets/rosmsg-BJDFO7_C.js +1 -0
- pythinker_code/web/static/assets/rst-B0xPkSld.js +1 -0
- pythinker_code/web/static/assets/ruby-BvKwtOVI.js +1 -0
- pythinker_code/web/static/assets/rust-B1yitclQ.js +1 -0
- pythinker_code/web/static/assets/sankeyDiagram-TZEHDZUN-BLOSUixH.js +10 -0
- pythinker_code/web/static/assets/sas-cz2c8ADy.js +1 -0
- pythinker_code/web/static/assets/sass-Cj5Yp3dK.js +1 -0
- pythinker_code/web/static/assets/scala-C151Ov-r.js +1 -0
- pythinker_code/web/static/assets/scheme-C98Dy4si.js +1 -0
- pythinker_code/web/static/assets/scss-OYdSNvt2.js +1 -0
- pythinker_code/web/static/assets/sdbl-DVxCFoDh.js +1 -0
- pythinker_code/web/static/assets/sequenceDiagram-WL72ISMW-6F2G8JTU.js +145 -0
- pythinker_code/web/static/assets/shaderlab-Dg9Lc6iA.js +1 -0
- pythinker_code/web/static/assets/shellscript-Yzrsuije.js +1 -0
- pythinker_code/web/static/assets/shellsession-BADoaaVG.js +1 -0
- pythinker_code/web/static/assets/slack-dark-BthQWCQV.js +1 -0
- pythinker_code/web/static/assets/slack-ochin-DqwNpetd.js +1 -0
- pythinker_code/web/static/assets/smalltalk-BERRCDM3.js +1 -0
- pythinker_code/web/static/assets/snazzy-light-Bw305WKR.js +1 -0
- pythinker_code/web/static/assets/solarized-dark-DXbdFlpD.js +1 -0
- pythinker_code/web/static/assets/solarized-light-L9t79GZl.js +1 -0
- pythinker_code/web/static/assets/solidity-rGO070M0.js +1 -0
- pythinker_code/web/static/assets/soy-Brmx7dQM.js +1 -0
- pythinker_code/web/static/assets/sparql-rVzFXLq3.js +1 -0
- pythinker_code/web/static/assets/splunk-BtCnVYZw.js +1 -0
- pythinker_code/web/static/assets/sql-BLtJtn59.js +1 -0
- pythinker_code/web/static/assets/ssh-config-_ykCGR6B.js +1 -0
- pythinker_code/web/static/assets/stata-BH5u7GGu.js +1 -0
- pythinker_code/web/static/assets/stateDiagram-FKZM4ZOC-DP8xP0iJ.js +1 -0
- pythinker_code/web/static/assets/stateDiagram-v2-4FDKWEC3-1l6-EZNX.js +1 -0
- pythinker_code/web/static/assets/stylus-BEDo0Tqx.js +1 -0
- pythinker_code/web/static/assets/svelte-zxCyuUbr.js +1 -0
- pythinker_code/web/static/assets/swift-Dg5xB15N.js +1 -0
- pythinker_code/web/static/assets/synthwave-84-CbfX1IO0.js +1 -0
- pythinker_code/web/static/assets/system-verilog-CnnmHF94.js +1 -0
- pythinker_code/web/static/assets/systemd-4A_iFExJ.js +1 -0
- pythinker_code/web/static/assets/talonscript-CkByrt1z.js +1 -0
- pythinker_code/web/static/assets/tasl-QIJgUcNo.js +1 -0
- pythinker_code/web/static/assets/tcl-dwOrl1Do.js +1 -0
- pythinker_code/web/static/assets/templ-W15q3VgB.js +1 -0
- pythinker_code/web/static/assets/terraform-BETggiCN.js +1 -0
- pythinker_code/web/static/assets/tex-CvyZ59Mk.js +1 -0
- pythinker_code/web/static/assets/timeline-definition-IT6M3QCI-DMgruDfK.js +61 -0
- pythinker_code/web/static/assets/tokyo-night-hegEt444.js +1 -0
- pythinker_code/web/static/assets/toml-vGWfd6FD.js +1 -0
- pythinker_code/web/static/assets/treemap-KMMF4GRG-Bo9ZkrAK.js +128 -0
- pythinker_code/web/static/assets/ts-tags-zn1MmPIZ.js +1 -0
- pythinker_code/web/static/assets/tsv-B_m7g4N7.js +1 -0
- pythinker_code/web/static/assets/tsx-COt5Ahok.js +1 -0
- pythinker_code/web/static/assets/turtle-BsS91CYL.js +1 -0
- pythinker_code/web/static/assets/twig-CO9l9SDP.js +1 -0
- pythinker_code/web/static/assets/typescript-BPQ3VLAy.js +1 -0
- pythinker_code/web/static/assets/typespec-BGHnOYBU.js +1 -0
- pythinker_code/web/static/assets/typst-DHCkPAjA.js +1 -0
- pythinker_code/web/static/assets/v-BcVCzyr7.js +1 -0
- pythinker_code/web/static/assets/vala-CsfeWuGM.js +1 -0
- pythinker_code/web/static/assets/vb-D17OF-Vu.js +1 -0
- pythinker_code/web/static/assets/verilog-BQ8w6xss.js +1 -0
- pythinker_code/web/static/assets/vesper-DU1UobuO.js +1 -0
- pythinker_code/web/static/assets/vhdl-CeAyd5Ju.js +1 -0
- pythinker_code/web/static/assets/viml-CJc9bBzg.js +1 -0
- pythinker_code/web/static/assets/vitesse-black-Bkuqu6BP.js +1 -0
- pythinker_code/web/static/assets/vitesse-dark-D0r3Knsf.js +1 -0
- pythinker_code/web/static/assets/vitesse-light-CVO1_9PV.js +1 -0
- pythinker_code/web/static/assets/vue-DN_0RTcg.js +1 -0
- pythinker_code/web/static/assets/vue-html-AaS7Mt5G.js +1 -0
- pythinker_code/web/static/assets/vue-vine-CQOfvN7w.js +1 -0
- pythinker_code/web/static/assets/vyper-CDx5xZoG.js +1 -0
- pythinker_code/web/static/assets/wasm-CG6Dc4jp.js +1 -0
- pythinker_code/web/static/assets/wasm-MzD3tlZU.js +1 -0
- pythinker_code/web/static/assets/wenyan-BV7otONQ.js +1 -0
- pythinker_code/web/static/assets/wgsl-Dx-B1_4e.js +1 -0
- pythinker_code/web/static/assets/wikitext-BhOHFoWU.js +1 -0
- pythinker_code/web/static/assets/wit-5i3qLPDT.js +1 -0
- pythinker_code/web/static/assets/wolfram-lXgVvXCa.js +1 -0
- pythinker_code/web/static/assets/xml-sdJ4AIDG.js +1 -0
- pythinker_code/web/static/assets/xsl-CtQFsRM5.js +1 -0
- pythinker_code/web/static/assets/xychartDiagram-PRI3JC2R-GeF2johi.js +7 -0
- pythinker_code/web/static/assets/yaml-Buea-lGh.js +1 -0
- pythinker_code/web/static/assets/zenscript-DVFEvuxE.js +1 -0
- pythinker_code/web/static/assets/zig-VOosw3JB.js +1 -0
- pythinker_code/web/static/brand/apple-touch-icon.png +0 -0
- pythinker_code/web/static/brand/arctecture.webp +0 -0
- pythinker_code/web/static/brand/bimi-logo.svg +46 -0
- pythinker_code/web/static/brand/favicon.ico +0 -0
- pythinker_code/web/static/brand/fonts/dm-sans-latin-ext.woff2 +0 -0
- pythinker_code/web/static/brand/fonts/dm-sans-latin.woff2 +0 -0
- pythinker_code/web/static/brand/fonts/instrument-sans-latin-ext.woff2 +0 -0
- pythinker_code/web/static/brand/fonts/instrument-sans-latin.woff2 +0 -0
- pythinker_code/web/static/brand/fonts/instrument-serif-latin-ext.woff2 +0 -0
- pythinker_code/web/static/brand/fonts/instrument-serif-latin.woff2 +0 -0
- pythinker_code/web/static/brand/fonts/libre-baskerville-italic-latin-ext.woff2 +0 -0
- pythinker_code/web/static/brand/fonts/libre-baskerville-italic-latin.woff2 +0 -0
- pythinker_code/web/static/brand/fonts/libre-baskerville-latin-ext.woff2 +0 -0
- pythinker_code/web/static/brand/fonts/libre-baskerville-latin.woff2 +0 -0
- pythinker_code/web/static/brand/fonts/roboto-latin-ext.woff2 +0 -0
- pythinker_code/web/static/brand/fonts/roboto-latin.woff2 +0 -0
- pythinker_code/web/static/brand/icon-192.png +0 -0
- pythinker_code/web/static/brand/icon-512.png +0 -0
- pythinker_code/web/static/brand/icon.svg +1 -0
- pythinker_code/web/static/brand/logo.png +0 -0
- pythinker_code/web/static/brand/pythinker_animated.svg +79 -0
- pythinker_code/web/static/brand/robots.txt +4 -0
- pythinker_code/web/static/index.html +15 -0
- pythinker_code/web/static/logo.png +0 -0
- pythinker_code/web/store/__init__.py +1 -0
- pythinker_code/web/store/sessions.py +432 -0
- pythinker_code/wire/__init__.py +148 -0
- pythinker_code/wire/file.py +151 -0
- pythinker_code/wire/jsonrpc.py +263 -0
- pythinker_code/wire/protocol.py +2 -0
- pythinker_code/wire/root_hub.py +27 -0
- pythinker_code/wire/serde.py +26 -0
- pythinker_code/wire/server.py +1069 -0
- pythinker_code/wire/types.py +698 -0
- pythinker_code-2.0.0.dist-info/METADATA +660 -0
- pythinker_code-2.0.0.dist-info/RECORD +731 -0
- pythinker_code-2.0.0.dist-info/WHEEL +4 -0
- pythinker_code-2.0.0.dist-info/entry_points.txt +4 -0
- pythinker_code-2.0.0.dist-info/licenses/LICENSE +202 -0
- pythinker_code-2.0.0.dist-info/licenses/NOTICE +14 -0
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-BYCCk6-K.js","./index-Cpy4G3uJ.js","./index-BpoLgcEt.js","./mermaid.core-CnT4VrPC.js","./code-block-IT6T5CEO-NtKViZGl.js","./katex-D2lIc1rk.css","./index-DdIkp80K.js","./index-CzV_vCfu.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as cu}from"./index-Cpy4G3uJ.js";function UF(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const s=Object.getOwnPropertyDescriptor(r,a);s&&Object.defineProperty(e,a,s.get?s:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function f1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Sb={exports:{}},ud={};var ME;function $F(){if(ME)return ud;ME=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,s){var o=null;if(s!==void 0&&(o=""+s),a.key!==void 0&&(o=""+a.key),"key"in a){s={};for(var u in a)u!=="key"&&(s[u]=a[u])}else s=a;return a=s.ref,{$$typeof:e,type:r,key:o,ref:a!==void 0?a:null,props:s}}return ud.Fragment=t,ud.jsx=n,ud.jsxs=n,ud}var DE;function qF(){return DE||(DE=1,Sb.exports=$F()),Sb.exports}var h=qF(),Cb={exports:{}};function VF(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _9={exports:{}},yr=_9.exports={},si,ii;function fy(){throw new Error("setTimeout has not been defined")}function hy(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?si=setTimeout:si=fy}catch{si=fy}try{typeof clearTimeout=="function"?ii=clearTimeout:ii=hy}catch{ii=hy}})();function R9(e){if(si===setTimeout)return setTimeout(e,0);if((si===fy||!si)&&setTimeout)return si=setTimeout,setTimeout(e,0);try{return si(e,0)}catch{try{return si.call(null,e,0)}catch{return si.call(this,e,0)}}}function GF(e){if(ii===clearTimeout)return clearTimeout(e);if((ii===hy||!ii)&&clearTimeout)return ii=clearTimeout,clearTimeout(e);try{return ii(e)}catch{try{return ii.call(null,e)}catch{return ii.call(this,e)}}}var Qi=[],Sc=!1,Yl,rp=-1;function YF(){!Sc||!Yl||(Sc=!1,Yl.length?Qi=Yl.concat(Qi):rp=-1,Qi.length&&M9())}function M9(){if(!Sc){var e=R9(YF);Sc=!0;for(var t=Qi.length;t;){for(Yl=Qi,Qi=[];++rp<t;)Yl&&Yl[rp].run();rp=-1,t=Qi.length}Yl=null,Sc=!1,GF(e)}}yr.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Qi.push(new D9(e,t)),Qi.length===1&&!Sc&&R9(M9)};function D9(e,t){this.fun=e,this.array=t}D9.prototype.run=function(){this.fun.apply(null,this.array)};yr.title="browser";yr.browser=!0;yr.env={};yr.argv=[];yr.version="";yr.versions={};function co(){}yr.on=co;yr.addListener=co;yr.once=co;yr.off=co;yr.removeListener=co;yr.removeAllListeners=co;yr.emit=co;yr.prependListener=co;yr.prependOnceListener=co;yr.listeners=function(e){return[]};yr.binding=function(e){throw new Error("process.binding is not supported")};yr.cwd=function(){return"/"};yr.chdir=function(e){throw new Error("process.chdir is not supported")};yr.umask=function(){return 0};var WF=_9.exports;const Cc=VF(WF);var Gt={},IE;function XF(){if(IE)return Gt;IE=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),b=Symbol.iterator;function y(H){return H===null||typeof H!="object"?null:(H=b&&H[b]||H["@@iterator"],typeof H=="function"?H:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,k={};function E(H,G,L){this.props=H,this.context=G,this.refs=k,this.updater=L||w}E.prototype.isReactComponent={},E.prototype.setState=function(H,G){if(typeof H!="object"&&typeof H!="function"&&H!=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,H,G,"setState")},E.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function A(){}A.prototype=E.prototype;function _(H,G,L){this.props=H,this.context=G,this.refs=k,this.updater=L||w}var I=_.prototype=new A;I.constructor=_,S(I,E.prototype),I.isPureReactComponent=!0;var P=Array.isArray;function O(){}var R={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function F(H,G,L){var ae=L.ref;return{$$typeof:e,type:H,key:G,ref:ae!==void 0?ae:null,props:L}}function U(H,G){return F(H.type,G,H.props)}function X(H){return typeof H=="object"&&H!==null&&H.$$typeof===e}function W(H){var G={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(L){return G[L]})}var le=/\/+/g;function se(H,G){return typeof H=="object"&&H!==null&&H.key!=null?W(""+H.key):G.toString(36)}function ie(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(O,O):(H.status="pending",H.then(function(G){H.status==="pending"&&(H.status="fulfilled",H.value=G)},function(G){H.status==="pending"&&(H.status="rejected",H.reason=G)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function $(H,G,L,ae,oe){var Se=typeof H;(Se==="undefined"||Se==="boolean")&&(H=null);var be=!1;if(H===null)be=!0;else switch(Se){case"bigint":case"string":case"number":be=!0;break;case"object":switch(H.$$typeof){case e:case t:be=!0;break;case m:return be=H._init,$(be(H._payload),G,L,ae,oe)}}if(be)return oe=oe(H),be=ae===""?"."+se(H,0):ae,P(oe)?(L="",be!=null&&(L=be.replace(le,"$&/")+"/"),$(oe,G,L,"",function(at){return at})):oe!=null&&(X(oe)&&(oe=U(oe,L+(oe.key==null||H&&H.key===oe.key?"":(""+oe.key).replace(le,"$&/")+"/")+be)),G.push(oe)),1;be=0;var fe=ae===""?".":ae+":";if(P(H))for(var Ne=0;Ne<H.length;Ne++)ae=H[Ne],Se=fe+se(ae,Ne),be+=$(ae,G,L,Se,oe);else if(Ne=y(H),typeof Ne=="function")for(H=Ne.call(H),Ne=0;!(ae=H.next()).done;)ae=ae.value,Se=fe+se(ae,Ne++),be+=$(ae,G,L,Se,oe);else if(Se==="object"){if(typeof H.then=="function")return $(ie(H),G,L,ae,oe);throw G=String(H),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return be}function K(H,G,L){if(H==null)return H;var ae=[],oe=0;return $(H,ae,"","",function(Se){return G.call(L,Se,oe++)}),ae}function Z(H){if(H._status===-1){var G=H._result;G=G(),G.then(function(L){(H._status===0||H._status===-1)&&(H._status=1,H._result=L)},function(L){(H._status===0||H._status===-1)&&(H._status=2,H._result=L)}),H._status===-1&&(H._status=0,H._result=G)}if(H._status===1)return H._result.default;throw H._result}var re=typeof reportError=="function"?reportError:function(H){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof H=="object"&&H!==null&&typeof H.message=="string"?String(H.message):String(H),error:H});if(!window.dispatchEvent(G))return}else if(typeof Cc=="object"&&typeof Cc.emit=="function"){Cc.emit("uncaughtException",H);return}console.error(H)},j={map:K,forEach:function(H,G,L){K(H,function(){G.apply(this,arguments)},L)},count:function(H){var G=0;return K(H,function(){G++}),G},toArray:function(H){return K(H,function(G){return G})||[]},only:function(H){if(!X(H))throw Error("React.Children.only expected to receive a single React element child.");return H}};return Gt.Activity=p,Gt.Children=j,Gt.Component=E,Gt.Fragment=n,Gt.Profiler=a,Gt.PureComponent=_,Gt.StrictMode=r,Gt.Suspense=c,Gt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,Gt.__COMPILER_RUNTIME={__proto__:null,c:function(H){return R.H.useMemoCache(H)}},Gt.cache=function(H){return function(){return H.apply(null,arguments)}},Gt.cacheSignal=function(){return null},Gt.cloneElement=function(H,G,L){if(H==null)throw Error("The argument must be a React element, but you passed "+H+".");var ae=S({},H.props),oe=H.key;if(G!=null)for(Se in G.key!==void 0&&(oe=""+G.key),G)!z.call(G,Se)||Se==="key"||Se==="__self"||Se==="__source"||Se==="ref"&&G.ref===void 0||(ae[Se]=G[Se]);var Se=arguments.length-2;if(Se===1)ae.children=L;else if(1<Se){for(var be=Array(Se),fe=0;fe<Se;fe++)be[fe]=arguments[fe+2];ae.children=be}return F(H.type,oe,ae)},Gt.createContext=function(H){return H={$$typeof:o,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null},H.Provider=H,H.Consumer={$$typeof:s,_context:H},H},Gt.createElement=function(H,G,L){var ae,oe={},Se=null;if(G!=null)for(ae in G.key!==void 0&&(Se=""+G.key),G)z.call(G,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(oe[ae]=G[ae]);var be=arguments.length-2;if(be===1)oe.children=L;else if(1<be){for(var fe=Array(be),Ne=0;Ne<be;Ne++)fe[Ne]=arguments[Ne+2];oe.children=fe}if(H&&H.defaultProps)for(ae in be=H.defaultProps,be)oe[ae]===void 0&&(oe[ae]=be[ae]);return F(H,Se,oe)},Gt.createRef=function(){return{current:null}},Gt.forwardRef=function(H){return{$$typeof:u,render:H}},Gt.isValidElement=X,Gt.lazy=function(H){return{$$typeof:m,_payload:{_status:-1,_result:H},_init:Z}},Gt.memo=function(H,G){return{$$typeof:d,type:H,compare:G===void 0?null:G}},Gt.startTransition=function(H){var G=R.T,L={};R.T=L;try{var ae=H(),oe=R.S;oe!==null&&oe(L,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(O,re)}catch(Se){re(Se)}finally{G!==null&&L.types!==null&&(G.types=L.types),R.T=G}},Gt.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},Gt.use=function(H){return R.H.use(H)},Gt.useActionState=function(H,G,L){return R.H.useActionState(H,G,L)},Gt.useCallback=function(H,G){return R.H.useCallback(H,G)},Gt.useContext=function(H){return R.H.useContext(H)},Gt.useDebugValue=function(){},Gt.useDeferredValue=function(H,G){return R.H.useDeferredValue(H,G)},Gt.useEffect=function(H,G){return R.H.useEffect(H,G)},Gt.useEffectEvent=function(H){return R.H.useEffectEvent(H)},Gt.useId=function(){return R.H.useId()},Gt.useImperativeHandle=function(H,G,L){return R.H.useImperativeHandle(H,G,L)},Gt.useInsertionEffect=function(H,G){return R.H.useInsertionEffect(H,G)},Gt.useLayoutEffect=function(H,G){return R.H.useLayoutEffect(H,G)},Gt.useMemo=function(H,G){return R.H.useMemo(H,G)},Gt.useOptimistic=function(H,G){return R.H.useOptimistic(H,G)},Gt.useReducer=function(H,G,L){return R.H.useReducer(H,G,L)},Gt.useRef=function(H){return R.H.useRef(H)},Gt.useState=function(H){return R.H.useState(H)},Gt.useSyncExternalStore=function(H,G,L){return R.H.useSyncExternalStore(H,G,L)},Gt.useTransition=function(){return R.H.useTransition()},Gt.version="19.2.3",Gt}var OE;function Gv(){return OE||(OE=1,Cb.exports=XF()),Cb.exports}var x=Gv();const ge=f1(x),Yv=UF({__proto__:null,default:ge},[x]);var kb={exports:{}},cd={},Ab={exports:{}},Nb={};var LE;function KF(){return LE||(LE=1,(function(e){function t($,K){var Z=$.length;$.push(K);e:for(;0<Z;){var re=Z-1>>>1,j=$[re];if(0<a(j,K))$[re]=K,$[Z]=j,Z=re;else break e}}function n($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var K=$[0],Z=$.pop();if(Z!==K){$[0]=Z;e:for(var re=0,j=$.length,H=j>>>1;re<H;){var G=2*(re+1)-1,L=$[G],ae=G+1,oe=$[ae];if(0>a(L,Z))ae<j&&0>a(oe,L)?($[re]=oe,$[ae]=Z,re=ae):($[re]=L,$[G]=Z,re=G);else if(ae<j&&0>a(oe,Z))$[re]=oe,$[ae]=Z,re=ae;else break e}}return K}function a($,K){var Z=$.sortIndex-K.sortIndex;return Z!==0?Z:$.id-K.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,u=o.now();e.unstable_now=function(){return o.now()-u}}var c=[],d=[],m=1,p=null,b=3,y=!1,w=!1,S=!1,k=!1,E=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function I($){for(var K=n(d);K!==null;){if(K.callback===null)r(d);else if(K.startTime<=$)r(d),K.sortIndex=K.expirationTime,t(c,K);else break;K=n(d)}}function P($){if(S=!1,I($),!w)if(n(c)!==null)w=!0,O||(O=!0,W());else{var K=n(d);K!==null&&ie(P,K.startTime-$)}}var O=!1,R=-1,z=5,F=-1;function U(){return k?!0:!(e.unstable_now()-F<z)}function X(){if(k=!1,O){var $=e.unstable_now();F=$;var K=!0;try{e:{w=!1,S&&(S=!1,A(R),R=-1),y=!0;var Z=b;try{t:{for(I($),p=n(c);p!==null&&!(p.expirationTime>$&&U());){var re=p.callback;if(typeof re=="function"){p.callback=null,b=p.priorityLevel;var j=re(p.expirationTime<=$);if($=e.unstable_now(),typeof j=="function"){p.callback=j,I($),K=!0;break t}p===n(c)&&r(c),I($)}else r(c);p=n(c)}if(p!==null)K=!0;else{var H=n(d);H!==null&&ie(P,H.startTime-$),K=!1}}break e}finally{p=null,b=Z,y=!1}K=void 0}}finally{K?W():O=!1}}}var W;if(typeof _=="function")W=function(){_(X)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,se=le.port2;le.port1.onmessage=X,W=function(){se.postMessage(null)}}else W=function(){E(X,0)};function ie($,K){R=E(function(){$(e.unstable_now())},K)}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($){$.callback=null},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function($){switch(b){case 1:case 2:case 3:var K=3;break;default:K=b}var Z=b;b=K;try{return $()}finally{b=Z}},e.unstable_requestPaint=function(){k=!0},e.unstable_runWithPriority=function($,K){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var Z=b;b=$;try{return K()}finally{b=Z}},e.unstable_scheduleCallback=function($,K,Z){var re=e.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?re+Z:re):Z=re,$){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=Z+j,$={id:m++,callback:K,priorityLevel:$,startTime:Z,expirationTime:j,sortIndex:-1},Z>re?($.sortIndex=Z,t(d,$),n(c)===null&&$===n(d)&&(S?(A(R),R=-1):S=!0,ie(P,Z-re))):($.sortIndex=j,t(c,$),w||y||(w=!0,O||(O=!0,W()))),$},e.unstable_shouldYield=U,e.unstable_wrapCallback=function($){var K=b;return function(){var Z=b;b=K;try{return $.apply(this,arguments)}finally{b=Z}}}})(Nb)),Nb}var PE;function QF(){return PE||(PE=1,Ab.exports=KF()),Ab.exports}var _b={exports:{}},ta={};var jE;function ZF(){if(jE)return ta;jE=1;var e=Gv();function t(c){var d="https://react.dev/errors/"+c;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)d+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+c+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function s(c,d,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:p==null?null:""+p,children:c,containerInfo:d,implementation:m}}var o=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(c,d){if(c==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return ta.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ta.createPortal=function(c,d){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return s(c,d,null,m)},ta.flushSync=function(c){var d=o.T,m=r.p;try{if(o.T=null,r.p=2,c)return c()}finally{o.T=d,r.p=m,r.d.f()}},ta.preconnect=function(c,d){typeof c=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,r.d.C(c,d))},ta.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},ta.preinit=function(c,d){if(typeof c=="string"&&d&&typeof d.as=="string"){var m=d.as,p=u(m,d.crossOrigin),b=typeof d.integrity=="string"?d.integrity:void 0,y=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;m==="style"?r.d.S(c,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:p,integrity:b,fetchPriority:y}):m==="script"&&r.d.X(c,{crossOrigin:p,integrity:b,fetchPriority:y,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},ta.preinitModule=function(c,d){if(typeof c=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var m=u(d.as,d.crossOrigin);r.d.M(c,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&r.d.M(c)},ta.preload=function(c,d){if(typeof c=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var m=d.as,p=u(m,d.crossOrigin);r.d.L(c,m,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},ta.preloadModule=function(c,d){if(typeof c=="string")if(d){var m=u(d.as,d.crossOrigin);r.d.m(c,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else r.d.m(c)},ta.requestFormReset=function(c){r.d.r(c)},ta.unstable_batchedUpdates=function(c,d){return c(d)},ta.useFormState=function(c,d,m){return o.H.useFormState(c,d,m)},ta.useFormStatus=function(){return o.H.useHostTransitionStatus()},ta.version="19.2.3",ta}var zE;function I9(){if(zE)return _b.exports;zE=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),_b.exports=ZF(),_b.exports}var BE;function JF(){if(BE)return cd;BE=1;var e=QF(),t=Gv(),n=I9();function r(i){var l="https://react.dev/errors/"+i;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)l+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+i+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function s(i){var l=i,f=i;if(i.alternate)for(;l.return;)l=l.return;else{i=l;do l=i,(l.flags&4098)!==0&&(f=l.return),i=l.return;while(i)}return l.tag===3?f:null}function o(i){if(i.tag===13){var l=i.memoizedState;if(l===null&&(i=i.alternate,i!==null&&(l=i.memoizedState)),l!==null)return l.dehydrated}return null}function u(i){if(i.tag===31){var l=i.memoizedState;if(l===null&&(i=i.alternate,i!==null&&(l=i.memoizedState)),l!==null)return l.dehydrated}return null}function c(i){if(s(i)!==i)throw Error(r(188))}function d(i){var l=i.alternate;if(!l){if(l=s(i),l===null)throw Error(r(188));return l!==i?null:i}for(var f=i,g=l;;){var v=f.return;if(v===null)break;var T=v.alternate;if(T===null){if(g=v.return,g!==null){f=g;continue}break}if(v.child===T.child){for(T=v.child;T;){if(T===f)return c(v),i;if(T===g)return c(v),l;T=T.sibling}throw Error(r(188))}if(f.return!==g.return)f=v,g=T;else{for(var D=!1,q=v.child;q;){if(q===f){D=!0,f=v,g=T;break}if(q===g){D=!0,g=v,f=T;break}q=q.sibling}if(!D){for(q=T.child;q;){if(q===f){D=!0,f=T,g=v;break}if(q===g){D=!0,g=T,f=v;break}q=q.sibling}if(!D)throw Error(r(189))}}if(f.alternate!==g)throw Error(r(190))}if(f.tag!==3)throw Error(r(188));return f.stateNode.current===f?i:l}function m(i){var l=i.tag;if(l===5||l===26||l===27||l===6)return i;for(i=i.child;i!==null;){if(l=m(i),l!==null)return l;i=i.sibling}return null}var p=Object.assign,b=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),_=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),U=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function W(i){return i===null||typeof i!="object"?null:(i=X&&i[X]||i["@@iterator"],typeof i=="function"?i:null)}var le=Symbol.for("react.client.reference");function se(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===le?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case S:return"Fragment";case E:return"Profiler";case k:return"StrictMode";case P:return"Suspense";case O:return"SuspenseList";case F:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case w:return"Portal";case _:return i.displayName||"Context";case A:return(i._context.displayName||"Context")+".Consumer";case I:var l=i.render;return i=i.displayName,i||(i=l.displayName||l.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case R:return l=i.displayName||null,l!==null?l:se(i.type)||"Memo";case z:l=i._payload,i=i._init;try{return se(i(l))}catch{}}return null}var ie=Array.isArray,$=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},re=[],j=-1;function H(i){return{current:i}}function G(i){0>j||(i.current=re[j],re[j]=null,j--)}function L(i,l){j++,re[j]=i.current,i.current=l}var ae=H(null),oe=H(null),Se=H(null),be=H(null);function fe(i,l){switch(L(Se,l),L(oe,i),L(ae,null),l.nodeType){case 9:case 11:i=(i=l.documentElement)&&(i=i.namespaceURI)?eE(i):0;break;default:if(i=l.tagName,l=l.namespaceURI)l=eE(l),i=tE(l,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}G(ae),L(ae,i)}function Ne(){G(ae),G(oe),G(Se)}function at(i){i.memoizedState!==null&&L(be,i);var l=ae.current,f=tE(l,i.type);l!==f&&(L(oe,i),L(ae,f))}function Ce(i){oe.current===i&&(G(ae),G(oe)),be.current===i&&(G(be),sd._currentValue=Z)}var Re,Ee;function we(i){if(Re===void 0)try{throw Error()}catch(f){var l=f.stack.trim().match(/\n( *(at )?)/);Re=l&&l[1]||"",Ee=-1<f.stack.indexOf(`
|
|
3
|
+
at`)?" (<anonymous>)":-1<f.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
+
`+Re+i+Ee}var Oe=!1;function ze(i,l){if(!i||Oe)return"";Oe=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var g={DetermineComponentFrameRoot:function(){try{if(l){var je=function(){throw Error()};if(Object.defineProperty(je.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(je,[])}catch(Ae){var Te=Ae}Reflect.construct(i,[],je)}else{try{je.call()}catch(Ae){Te=Ae}i.call(je.prototype)}}else{try{throw Error()}catch(Ae){Te=Ae}(je=i())&&typeof je.catch=="function"&&je.catch(function(){})}}catch(Ae){if(Ae&&Te&&typeof Ae.stack=="string")return[Ae.stack,Te.stack]}return[null,null]}};g.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(g.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(g.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var T=g.DetermineComponentFrameRoot(),D=T[0],q=T[1];if(D&&q){var ne=D.split(`
|
|
5
|
+
`),ve=q.split(`
|
|
6
|
+
`);for(v=g=0;g<ne.length&&!ne[g].includes("DetermineComponentFrameRoot");)g++;for(;v<ve.length&&!ve[v].includes("DetermineComponentFrameRoot");)v++;if(g===ne.length||v===ve.length)for(g=ne.length-1,v=ve.length-1;1<=g&&0<=v&&ne[g]!==ve[v];)v--;for(;1<=g&&0<=v;g--,v--)if(ne[g]!==ve[v]){if(g!==1||v!==1)do if(g--,v--,0>v||ne[g]!==ve[v]){var Ie=`
|
|
7
|
+
`+ne[g].replace(" at new "," at ");return i.displayName&&Ie.includes("<anonymous>")&&(Ie=Ie.replace("<anonymous>",i.displayName)),Ie}while(1<=g&&0<=v);break}}}finally{Oe=!1,Error.prepareStackTrace=f}return(f=i?i.displayName||i.name:"")?we(f):""}function Ge(i,l){switch(i.tag){case 26:case 27:case 5:return we(i.type);case 16:return we("Lazy");case 13:return i.child!==l&&l!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return ze(i.type,!1);case 11:return ze(i.type.render,!1);case 1:return ze(i.type,!0);case 31:return we("Activity");default:return""}}function it(i){try{var l="",f=null;do l+=Ge(i,f),f=i,i=i.return;while(i);return l}catch(g){return`
|
|
8
|
+
Error generating stack: `+g.message+`
|
|
9
|
+
`+g.stack}}var At=Object.prototype.hasOwnProperty,st=e.unstable_scheduleCallback,Ft=e.unstable_cancelCallback,Nt=e.unstable_shouldYield,qt=e.unstable_requestPaint,Ht=e.unstable_now,Mn=e.unstable_getCurrentPriorityLevel,ke=e.unstable_ImmediatePriority,Be=e.unstable_UserBlockingPriority,xt=e.unstable_NormalPriority,Et=e.unstable_LowPriority,Ze=e.unstable_IdlePriority,Rt=e.log,mn=e.unstable_setDisableYieldValue,Qe=null,_t=null;function vn(i){if(typeof Rt=="function"&&mn(i),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(Qe,i)}catch{}}var an=Math.clz32?Math.clz32:Qr,lr=Math.log,mr=Math.LN2;function Qr(i){return i>>>=0,i===0?32:31-(lr(i)/mr|0)|0}var $e=256,tt=262144,Tt=4194304;function Mt(i){var l=i&42;if(l!==0)return l;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Je(i,l,f){var g=i.pendingLanes;if(g===0)return 0;var v=0,T=i.suspendedLanes,D=i.pingedLanes;i=i.warmLanes;var q=g&134217727;return q!==0?(g=q&~T,g!==0?v=Mt(g):(D&=q,D!==0?v=Mt(D):f||(f=q&~i,f!==0&&(v=Mt(f))))):(q=g&~T,q!==0?v=Mt(q):D!==0?v=Mt(D):f||(f=g&~i,f!==0&&(v=Mt(f)))),v===0?0:l!==0&&l!==v&&(l&T)===0&&(T=v&-v,f=l&-l,T>=f||T===32&&(f&4194048)!==0)?l:v}function Vt(i,l){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&l)===0}function nn(i,l){switch(i){case 1:case 2:case 4:case 8:case 64:return l+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 l+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 Zn(){var i=Tt;return Tt<<=1,(Tt&62914560)===0&&(Tt=4194304),i}function ca(i){for(var l=[],f=0;31>f;f++)l.push(i);return l}function Ln(i,l){i.pendingLanes|=l,l!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function Ur(i,l,f,g,v,T){var D=i.pendingLanes;i.pendingLanes=f,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=f,i.entangledLanes&=f,i.errorRecoveryDisabledLanes&=f,i.shellSuspendCounter=0;var q=i.entanglements,ne=i.expirationTimes,ve=i.hiddenUpdates;for(f=D&~f;0<f;){var Ie=31-an(f),je=1<<Ie;q[Ie]=0,ne[Ie]=-1;var Te=ve[Ie];if(Te!==null)for(ve[Ie]=null,Ie=0;Ie<Te.length;Ie++){var Ae=Te[Ie];Ae!==null&&(Ae.lane&=-536870913)}f&=~je}g!==0&&Xs(i,g,0),T!==0&&v===0&&i.tag!==0&&(i.suspendedLanes|=T&~(D&~l))}function Xs(i,l,f){i.pendingLanes|=l,i.suspendedLanes&=~l;var g=31-an(l);i.entangledLanes|=l,i.entanglements[g]=i.entanglements[g]|1073741824|f&261930}function Zr(i,l){var f=i.entangledLanes|=l;for(i=i.entanglements;f;){var g=31-an(f),v=1<<g;v&l|i[g]&l&&(i[g]|=l),f&=~v}}function Jr(i,l){var f=l&-l;return f=(f&42)!==0?1:Va(f),(f&(i.suspendedLanes|l))!==0?0:f}function Va(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function Lr(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function x0(){var i=K.p;return i!==0?i:(i=window.event,i===void 0?32:SE(i.type))}function y0(i,l){var f=K.p;try{return K.p=i,l()}finally{K.p=f}}var Ks=Math.random().toString(36).slice(2),Nr="__reactFiber$"+Ks,ea="__reactProps$"+Ks,Pe="__reactContainer$"+Ks,Me="__reactEvents$"+Ks,We="__reactListeners$"+Ks,ce="__reactHandles$"+Ks,De="__reactResources$"+Ks,ot="__reactMarker$"+Ks;function rt(i){delete i[Nr],delete i[ea],delete i[Me],delete i[We],delete i[ce]}function nt(i){var l=i[Nr];if(l)return l;for(var f=i.parentNode;f;){if(l=f[Pe]||f[Nr]){if(f=l.alternate,l.child!==null||f!==null&&f.child!==null)for(i=lE(i);i!==null;){if(f=i[Nr])return f;i=lE(i)}return l}i=f,f=i.parentNode}return null}function Ct(i){if(i=i[Nr]||i[Pe]){var l=i.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return i}return null}function Ut(i){var l=i.tag;if(l===5||l===26||l===27||l===6)return i.stateNode;throw Error(r(33))}function ht(i){var l=i[De];return l||(l=i[De]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function St(i){i[ot]=!0}var Lt=new Set,sn={};function Xt(i,l){Pr(i,l),Pr(i+"Capture",l)}function Pr(i,l){for(sn[i]=l,i=0;i<l.length;i++)Lt.add(l[i])}var Dn=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),bo={},v0={};function w0(i){return At.call(v0,i)?!0:At.call(bo,i)?!1:Dn.test(i)?v0[i]=!0:(bo[i]=!0,!1)}function Tl(i,l,f){if(w0(l))if(f===null)i.removeAttribute(l);else{switch(typeof f){case"undefined":case"function":case"symbol":i.removeAttribute(l);return;case"boolean":var g=l.toLowerCase().slice(0,5);if(g!=="data-"&&g!=="aria-"){i.removeAttribute(l);return}}i.setAttribute(l,""+f)}}function Jn(i,l,f){if(f===null)i.removeAttribute(l);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(l);return}i.setAttribute(l,""+f)}}function Ds(i,l,f,g){if(g===null)i.removeAttribute(f);else{switch(typeof g){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(f);return}i.setAttributeNS(l,f,""+g)}}function Ea(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function ih(i){var l=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Lz(i,l,f){var g=Object.getOwnPropertyDescriptor(i.constructor.prototype,l);if(!i.hasOwnProperty(l)&&typeof g<"u"&&typeof g.get=="function"&&typeof g.set=="function"){var v=g.get,T=g.set;return Object.defineProperty(i,l,{configurable:!0,get:function(){return v.call(this)},set:function(D){f=""+D,T.call(this,D)}}),Object.defineProperty(i,l,{enumerable:g.enumerable}),{getValue:function(){return f},setValue:function(D){f=""+D},stopTracking:function(){i._valueTracker=null,delete i[l]}}}}function bg(i){if(!i._valueTracker){var l=ih(i)?"checked":"value";i._valueTracker=Lz(i,l,""+i[l])}}function Y6(i){if(!i)return!1;var l=i._valueTracker;if(!l)return!0;var f=l.getValue(),g="";return i&&(g=ih(i)?i.checked?"true":"false":i.value),i=g,i!==f?(l.setValue(i),!0):!1}function oh(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var Pz=/[\n"\\]/g;function cs(i){return i.replace(Pz,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function xg(i,l,f,g,v,T,D,q){i.name="",D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?i.type=D:i.removeAttribute("type"),l!=null?D==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+Ea(l)):i.value!==""+Ea(l)&&(i.value=""+Ea(l)):D!=="submit"&&D!=="reset"||i.removeAttribute("value"),l!=null?yg(i,D,Ea(l)):f!=null?yg(i,D,Ea(f)):g!=null&&i.removeAttribute("value"),v==null&&T!=null&&(i.defaultChecked=!!T),v!=null&&(i.checked=v&&typeof v!="function"&&typeof v!="symbol"),q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"?i.name=""+Ea(q):i.removeAttribute("name")}function W6(i,l,f,g,v,T,D,q){if(T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(i.type=T),l!=null||f!=null){if(!(T!=="submit"&&T!=="reset"||l!=null)){bg(i);return}f=f!=null?""+Ea(f):"",l=l!=null?""+Ea(l):f,q||l===i.value||(i.value=l),i.defaultValue=l}g=g??v,g=typeof g!="function"&&typeof g!="symbol"&&!!g,i.checked=q?i.checked:!!g,i.defaultChecked=!!g,D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(i.name=D),bg(i)}function yg(i,l,f){l==="number"&&oh(i.ownerDocument)===i||i.defaultValue===""+f||(i.defaultValue=""+f)}function Cu(i,l,f,g){if(i=i.options,l){l={};for(var v=0;v<f.length;v++)l["$"+f[v]]=!0;for(f=0;f<i.length;f++)v=l.hasOwnProperty("$"+i[f].value),i[f].selected!==v&&(i[f].selected=v),v&&g&&(i[f].defaultSelected=!0)}else{for(f=""+Ea(f),l=null,v=0;v<i.length;v++){if(i[v].value===f){i[v].selected=!0,g&&(i[v].defaultSelected=!0);return}l!==null||i[v].disabled||(l=i[v])}l!==null&&(l.selected=!0)}}function X6(i,l,f){if(l!=null&&(l=""+Ea(l),l!==i.value&&(i.value=l),f==null)){i.defaultValue!==l&&(i.defaultValue=l);return}i.defaultValue=f!=null?""+Ea(f):""}function K6(i,l,f,g){if(l==null){if(g!=null){if(f!=null)throw Error(r(92));if(ie(g)){if(1<g.length)throw Error(r(93));g=g[0]}f=g}f==null&&(f=""),l=f}f=Ea(l),i.defaultValue=f,g=i.textContent,g===f&&g!==""&&g!==null&&(i.value=g),bg(i)}function ku(i,l){if(l){var f=i.firstChild;if(f&&f===i.lastChild&&f.nodeType===3){f.nodeValue=l;return}}i.textContent=l}var jz=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Q6(i,l,f){var g=l.indexOf("--")===0;f==null||typeof f=="boolean"||f===""?g?i.setProperty(l,""):l==="float"?i.cssFloat="":i[l]="":g?i.setProperty(l,f):typeof f!="number"||f===0||jz.has(l)?l==="float"?i.cssFloat=f:i[l]=(""+f).trim():i[l]=f+"px"}function Z6(i,l,f){if(l!=null&&typeof l!="object")throw Error(r(62));if(i=i.style,f!=null){for(var g in f)!f.hasOwnProperty(g)||l!=null&&l.hasOwnProperty(g)||(g.indexOf("--")===0?i.setProperty(g,""):g==="float"?i.cssFloat="":i[g]="");for(var v in l)g=l[v],l.hasOwnProperty(v)&&f[v]!==g&&Q6(i,v,g)}else for(var T in l)l.hasOwnProperty(T)&&Q6(i,T,l[T])}function vg(i){if(i.indexOf("-")===-1)return!1;switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var zz=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Bz=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function lh(i){return Bz.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function _i(){}var wg=null;function Tg(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Au=null,Nu=null;function J6(i){var l=Ct(i);if(l&&(i=l.stateNode)){var f=i[ea]||null;e:switch(i=l.stateNode,l.type){case"input":if(xg(i,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name),l=f.name,f.type==="radio"&&l!=null){for(f=i;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll('input[name="'+cs(""+l)+'"][type="radio"]'),l=0;l<f.length;l++){var g=f[l];if(g!==i&&g.form===i.form){var v=g[ea]||null;if(!v)throw Error(r(90));xg(g,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(l=0;l<f.length;l++)g=f[l],g.form===i.form&&Y6(g)}break e;case"textarea":X6(i,f.value,f.defaultValue);break e;case"select":l=f.value,l!=null&&Cu(i,!!f.multiple,l,!1)}}}var Eg=!1;function e5(i,l,f){if(Eg)return i(l,f);Eg=!0;try{var g=i(l);return g}finally{if(Eg=!1,(Au!==null||Nu!==null)&&(Xh(),Au&&(l=Au,i=Nu,Nu=Au=null,J6(l),i)))for(l=0;l<i.length;l++)J6(i[l])}}function T0(i,l){var f=i.stateNode;if(f===null)return null;var g=f[ea]||null;if(g===null)return null;f=g[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(g=!g.disabled)||(i=i.type,g=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!g;break e;default:i=!1}if(i)return null;if(f&&typeof f!="function")throw Error(r(231,l,typeof f));return f}var Ri=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sg=!1;if(Ri)try{var E0={};Object.defineProperty(E0,"passive",{get:function(){Sg=!0}}),window.addEventListener("test",E0,E0),window.removeEventListener("test",E0,E0)}catch{Sg=!1}var xo=null,Cg=null,uh=null;function t5(){if(uh)return uh;var i,l=Cg,f=l.length,g,v="value"in xo?xo.value:xo.textContent,T=v.length;for(i=0;i<f&&l[i]===v[i];i++);var D=f-i;for(g=1;g<=D&&l[f-g]===v[T-g];g++);return uh=v.slice(i,1<g?1-g:void 0)}function ch(i){var l=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&l===13&&(i=13)):i=l,i===10&&(i=13),32<=i||i===13?i:0}function dh(){return!0}function n5(){return!1}function Sa(i){function l(f,g,v,T,D){this._reactName=f,this._targetInst=v,this.type=g,this.nativeEvent=T,this.target=D,this.currentTarget=null;for(var q in i)i.hasOwnProperty(q)&&(f=i[q],this[q]=f?f(T):T[q]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?dh:n5,this.isPropagationStopped=n5,this}return p(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=dh)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=dh)},persist:function(){},isPersistent:dh}),l}var El={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fh=Sa(El),S0=p({},El,{view:0,detail:0}),Fz=Sa(S0),kg,Ag,C0,hh=p({},S0,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_g,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==C0&&(C0&&i.type==="mousemove"?(kg=i.screenX-C0.screenX,Ag=i.screenY-C0.screenY):Ag=kg=0,C0=i),kg)},movementY:function(i){return"movementY"in i?i.movementY:Ag}}),r5=Sa(hh),Hz=p({},hh,{dataTransfer:0}),Uz=Sa(Hz),$z=p({},S0,{relatedTarget:0}),Ng=Sa($z),qz=p({},El,{animationName:0,elapsedTime:0,pseudoElement:0}),Vz=Sa(qz),Gz=p({},El,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),Yz=Sa(Gz),Wz=p({},El,{data:0}),a5=Sa(Wz),Xz={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Kz={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Qz={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Zz(i){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(i):(i=Qz[i])?!!l[i]:!1}function _g(){return Zz}var Jz=p({},S0,{key:function(i){if(i.key){var l=Xz[i.key]||i.key;if(l!=="Unidentified")return l}return i.type==="keypress"?(i=ch(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?Kz[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_g,charCode:function(i){return i.type==="keypress"?ch(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?ch(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),eB=Sa(Jz),tB=p({},hh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),s5=Sa(tB),nB=p({},S0,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_g}),rB=Sa(nB),aB=p({},El,{propertyName:0,elapsedTime:0,pseudoElement:0}),sB=Sa(aB),iB=p({},hh,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),oB=Sa(iB),lB=p({},El,{newState:0,oldState:0}),uB=Sa(lB),cB=[9,13,27,32],Rg=Ri&&"CompositionEvent"in window,k0=null;Ri&&"documentMode"in document&&(k0=document.documentMode);var dB=Ri&&"TextEvent"in window&&!k0,i5=Ri&&(!Rg||k0&&8<k0&&11>=k0),o5=" ",l5=!1;function u5(i,l){switch(i){case"keyup":return cB.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function c5(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var _u=!1;function fB(i,l){switch(i){case"compositionend":return c5(l);case"keypress":return l.which!==32?null:(l5=!0,o5);case"textInput":return i=l.data,i===o5&&l5?null:i;default:return null}}function hB(i,l){if(_u)return i==="compositionend"||!Rg&&u5(i,l)?(i=t5(),uh=Cg=xo=null,_u=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return i5&&l.locale!=="ko"?null:l.data;default:return null}}var mB={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function d5(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l==="input"?!!mB[i.type]:l==="textarea"}function f5(i,l,f,g){Au?Nu?Nu.push(g):Nu=[g]:Au=g,l=nm(l,"onChange"),0<l.length&&(f=new fh("onChange","change",null,f,g),i.push({event:f,listeners:l}))}var A0=null,N0=null;function pB(i){WT(i,0)}function mh(i){var l=Ut(i);if(Y6(l))return i}function h5(i,l){if(i==="change")return l}var m5=!1;if(Ri){var Mg;if(Ri){var Dg="oninput"in document;if(!Dg){var p5=document.createElement("div");p5.setAttribute("oninput","return;"),Dg=typeof p5.oninput=="function"}Mg=Dg}else Mg=!1;m5=Mg&&(!document.documentMode||9<document.documentMode)}function g5(){A0&&(A0.detachEvent("onpropertychange",b5),N0=A0=null)}function b5(i){if(i.propertyName==="value"&&mh(N0)){var l=[];f5(l,N0,i,Tg(i)),e5(pB,l)}}function gB(i,l,f){i==="focusin"?(g5(),A0=l,N0=f,A0.attachEvent("onpropertychange",b5)):i==="focusout"&&g5()}function bB(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return mh(N0)}function xB(i,l){if(i==="click")return mh(l)}function yB(i,l){if(i==="input"||i==="change")return mh(l)}function vB(i,l){return i===l&&(i!==0||1/i===1/l)||i!==i&&l!==l}var Ga=typeof Object.is=="function"?Object.is:vB;function _0(i,l){if(Ga(i,l))return!0;if(typeof i!="object"||i===null||typeof l!="object"||l===null)return!1;var f=Object.keys(i),g=Object.keys(l);if(f.length!==g.length)return!1;for(g=0;g<f.length;g++){var v=f[g];if(!At.call(l,v)||!Ga(i[v],l[v]))return!1}return!0}function x5(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function y5(i,l){var f=x5(i);i=0;for(var g;f;){if(f.nodeType===3){if(g=i+f.textContent.length,i<=l&&g>=l)return{node:f,offset:l-i};i=g}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=x5(f)}}function v5(i,l){return i&&l?i===l?!0:i&&i.nodeType===3?!1:l&&l.nodeType===3?v5(i,l.parentNode):"contains"in i?i.contains(l):i.compareDocumentPosition?!!(i.compareDocumentPosition(l)&16):!1:!1}function w5(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var l=oh(i.document);l instanceof i.HTMLIFrameElement;){try{var f=typeof l.contentWindow.location.href=="string"}catch{f=!1}if(f)i=l.contentWindow;else break;l=oh(i.document)}return l}function Ig(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l&&(l==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||l==="textarea"||i.contentEditable==="true")}var wB=Ri&&"documentMode"in document&&11>=document.documentMode,Ru=null,Og=null,R0=null,Lg=!1;function T5(i,l,f){var g=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;Lg||Ru==null||Ru!==oh(g)||(g=Ru,"selectionStart"in g&&Ig(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),R0&&_0(R0,g)||(R0=g,g=nm(Og,"onSelect"),0<g.length&&(l=new fh("onSelect","select",null,l,f),i.push({event:l,listeners:g}),l.target=Ru)))}function Sl(i,l){var f={};return f[i.toLowerCase()]=l.toLowerCase(),f["Webkit"+i]="webkit"+l,f["Moz"+i]="moz"+l,f}var Mu={animationend:Sl("Animation","AnimationEnd"),animationiteration:Sl("Animation","AnimationIteration"),animationstart:Sl("Animation","AnimationStart"),transitionrun:Sl("Transition","TransitionRun"),transitionstart:Sl("Transition","TransitionStart"),transitioncancel:Sl("Transition","TransitionCancel"),transitionend:Sl("Transition","TransitionEnd")},Pg={},E5={};Ri&&(E5=document.createElement("div").style,"AnimationEvent"in window||(delete Mu.animationend.animation,delete Mu.animationiteration.animation,delete Mu.animationstart.animation),"TransitionEvent"in window||delete Mu.transitionend.transition);function Cl(i){if(Pg[i])return Pg[i];if(!Mu[i])return i;var l=Mu[i],f;for(f in l)if(l.hasOwnProperty(f)&&f in E5)return Pg[i]=l[f];return i}var S5=Cl("animationend"),C5=Cl("animationiteration"),k5=Cl("animationstart"),TB=Cl("transitionrun"),EB=Cl("transitionstart"),SB=Cl("transitioncancel"),A5=Cl("transitionend"),N5=new Map,jg="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");jg.push("scrollEnd");function Is(i,l){N5.set(i,l),Xt(l,[i])}var ph=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(l))return}else if(typeof Cc=="object"&&typeof Cc.emit=="function"){Cc.emit("uncaughtException",i);return}console.error(i)},ds=[],Du=0,zg=0;function gh(){for(var i=Du,l=zg=Du=0;l<i;){var f=ds[l];ds[l++]=null;var g=ds[l];ds[l++]=null;var v=ds[l];ds[l++]=null;var T=ds[l];if(ds[l++]=null,g!==null&&v!==null){var D=g.pending;D===null?v.next=v:(v.next=D.next,D.next=v),g.pending=v}T!==0&&_5(f,v,T)}}function bh(i,l,f,g){ds[Du++]=i,ds[Du++]=l,ds[Du++]=f,ds[Du++]=g,zg|=g,i.lanes|=g,i=i.alternate,i!==null&&(i.lanes|=g)}function Bg(i,l,f,g){return bh(i,l,f,g),xh(i)}function kl(i,l){return bh(i,null,null,l),xh(i)}function _5(i,l,f){i.lanes|=f;var g=i.alternate;g!==null&&(g.lanes|=f);for(var v=!1,T=i.return;T!==null;)T.childLanes|=f,g=T.alternate,g!==null&&(g.childLanes|=f),T.tag===22&&(i=T.stateNode,i===null||i._visibility&1||(v=!0)),i=T,T=T.return;return i.tag===3?(T=i.stateNode,v&&l!==null&&(v=31-an(f),i=T.hiddenUpdates,g=i[v],g===null?i[v]=[l]:g.push(l),l.lane=f|536870912),T):null}function xh(i){if(50<Z0)throw Z0=0,W2=null,Error(r(185));for(var l=i.return;l!==null;)i=l,l=i.return;return i.tag===3?i.stateNode:null}var Iu={};function CB(i,l,f,g){this.tag=i,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ya(i,l,f,g){return new CB(i,l,f,g)}function Fg(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Mi(i,l){var f=i.alternate;return f===null?(f=Ya(i.tag,l,i.key,i.mode),f.elementType=i.elementType,f.type=i.type,f.stateNode=i.stateNode,f.alternate=i,i.alternate=f):(f.pendingProps=l,f.type=i.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=i.flags&65011712,f.childLanes=i.childLanes,f.lanes=i.lanes,f.child=i.child,f.memoizedProps=i.memoizedProps,f.memoizedState=i.memoizedState,f.updateQueue=i.updateQueue,l=i.dependencies,f.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},f.sibling=i.sibling,f.index=i.index,f.ref=i.ref,f.refCleanup=i.refCleanup,f}function R5(i,l){i.flags&=65011714;var f=i.alternate;return f===null?(i.childLanes=0,i.lanes=l,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=f.childLanes,i.lanes=f.lanes,i.child=f.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=f.memoizedProps,i.memoizedState=f.memoizedState,i.updateQueue=f.updateQueue,i.type=f.type,l=f.dependencies,i.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),i}function yh(i,l,f,g,v,T){var D=0;if(g=i,typeof i=="function")Fg(i)&&(D=1);else if(typeof i=="string")D=RF(i,f,ae.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case F:return i=Ya(31,f,l,v),i.elementType=F,i.lanes=T,i;case S:return Al(f.children,v,T,l);case k:D=8,v|=24;break;case E:return i=Ya(12,f,l,v|2),i.elementType=E,i.lanes=T,i;case P:return i=Ya(13,f,l,v),i.elementType=P,i.lanes=T,i;case O:return i=Ya(19,f,l,v),i.elementType=O,i.lanes=T,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case _:D=10;break e;case A:D=9;break e;case I:D=11;break e;case R:D=14;break e;case z:D=16,g=null;break e}D=29,f=Error(r(130,i===null?"null":typeof i,"")),g=null}return l=Ya(D,f,l,v),l.elementType=i,l.type=g,l.lanes=T,l}function Al(i,l,f,g){return i=Ya(7,i,g,l),i.lanes=f,i}function Hg(i,l,f){return i=Ya(6,i,null,l),i.lanes=f,i}function M5(i){var l=Ya(18,null,null,0);return l.stateNode=i,l}function Ug(i,l,f){return l=Ya(4,i.children!==null?i.children:[],i.key,l),l.lanes=f,l.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},l}var D5=new WeakMap;function fs(i,l){if(typeof i=="object"&&i!==null){var f=D5.get(i);return f!==void 0?f:(l={value:i,source:l,stack:it(l)},D5.set(i,l),l)}return{value:i,source:l,stack:it(l)}}var Ou=[],Lu=0,vh=null,M0=0,hs=[],ms=0,yo=null,Qs=1,Zs="";function Di(i,l){Ou[Lu++]=M0,Ou[Lu++]=vh,vh=i,M0=l}function I5(i,l,f){hs[ms++]=Qs,hs[ms++]=Zs,hs[ms++]=yo,yo=i;var g=Qs;i=Zs;var v=32-an(g)-1;g&=~(1<<v),f+=1;var T=32-an(l)+v;if(30<T){var D=v-v%5;T=(g&(1<<D)-1).toString(32),g>>=D,v-=D,Qs=1<<32-an(l)+v|f<<v|g,Zs=T+i}else Qs=1<<T|f<<v|g,Zs=i}function $g(i){i.return!==null&&(Di(i,1),I5(i,1,0))}function qg(i){for(;i===vh;)vh=Ou[--Lu],Ou[Lu]=null,M0=Ou[--Lu],Ou[Lu]=null;for(;i===yo;)yo=hs[--ms],hs[ms]=null,Zs=hs[--ms],hs[ms]=null,Qs=hs[--ms],hs[ms]=null}function O5(i,l){hs[ms++]=Qs,hs[ms++]=Zs,hs[ms++]=yo,Qs=l.id,Zs=l.overflow,yo=i}var $r=null,Yn=null,pn=!1,vo=null,ps=!1,Vg=Error(r(519));function wo(i){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw D0(fs(l,i)),Vg}function L5(i){var l=i.stateNode,f=i.type,g=i.memoizedProps;switch(l[Nr]=i,l[ea]=g,f){case"dialog":cn("cancel",l),cn("close",l);break;case"iframe":case"object":case"embed":cn("load",l);break;case"video":case"audio":for(f=0;f<ed.length;f++)cn(ed[f],l);break;case"source":cn("error",l);break;case"img":case"image":case"link":cn("error",l),cn("load",l);break;case"details":cn("toggle",l);break;case"input":cn("invalid",l),W6(l,g.value,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name,!0);break;case"select":cn("invalid",l);break;case"textarea":cn("invalid",l),K6(l,g.value,g.defaultValue,g.children)}f=g.children,typeof f!="string"&&typeof f!="number"&&typeof f!="bigint"||l.textContent===""+f||g.suppressHydrationWarning===!0||ZT(l.textContent,f)?(g.popover!=null&&(cn("beforetoggle",l),cn("toggle",l)),g.onScroll!=null&&cn("scroll",l),g.onScrollEnd!=null&&cn("scrollend",l),g.onClick!=null&&(l.onclick=_i),l=!0):l=!1,l||wo(i,!0)}function P5(i){for($r=i.return;$r;)switch($r.tag){case 5:case 31:case 13:ps=!1;return;case 27:case 3:ps=!0;return;default:$r=$r.return}}function Pu(i){if(i!==$r)return!1;if(!pn)return P5(i),pn=!0,!1;var l=i.tag,f;if((f=l!==3&&l!==27)&&((f=l===5)&&(f=i.type,f=!(f!=="form"&&f!=="button")||ub(i.type,i.memoizedProps)),f=!f),f&&Yn&&wo(i),P5(i),l===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Yn=oE(i)}else if(l===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Yn=oE(i)}else l===27?(l=Yn,Lo(i.type)?(i=mb,mb=null,Yn=i):Yn=l):Yn=$r?bs(i.stateNode.nextSibling):null;return!0}function Nl(){Yn=$r=null,pn=!1}function Gg(){var i=vo;return i!==null&&(Na===null?Na=i:Na.push.apply(Na,i),vo=null),i}function D0(i){vo===null?vo=[i]:vo.push(i)}var Yg=H(null),_l=null,Ii=null;function To(i,l,f){L(Yg,l._currentValue),l._currentValue=f}function Oi(i){i._currentValue=Yg.current,G(Yg)}function Wg(i,l,f){for(;i!==null;){var g=i.alternate;if((i.childLanes&l)!==l?(i.childLanes|=l,g!==null&&(g.childLanes|=l)):g!==null&&(g.childLanes&l)!==l&&(g.childLanes|=l),i===f)break;i=i.return}}function Xg(i,l,f,g){var v=i.child;for(v!==null&&(v.return=i);v!==null;){var T=v.dependencies;if(T!==null){var D=v.child;T=T.firstContext;e:for(;T!==null;){var q=T;T=v;for(var ne=0;ne<l.length;ne++)if(q.context===l[ne]){T.lanes|=f,q=T.alternate,q!==null&&(q.lanes|=f),Wg(T.return,f,i),g||(D=null);break e}T=q.next}}else if(v.tag===18){if(D=v.return,D===null)throw Error(r(341));D.lanes|=f,T=D.alternate,T!==null&&(T.lanes|=f),Wg(D,f,i),D=null}else D=v.child;if(D!==null)D.return=v;else for(D=v;D!==null;){if(D===i){D=null;break}if(v=D.sibling,v!==null){v.return=D.return,D=v;break}D=D.return}v=D}}function ju(i,l,f,g){i=null;for(var v=l,T=!1;v!==null;){if(!T){if((v.flags&524288)!==0)T=!0;else if((v.flags&262144)!==0)break}if(v.tag===10){var D=v.alternate;if(D===null)throw Error(r(387));if(D=D.memoizedProps,D!==null){var q=v.type;Ga(v.pendingProps.value,D.value)||(i!==null?i.push(q):i=[q])}}else if(v===be.current){if(D=v.alternate,D===null)throw Error(r(387));D.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(i!==null?i.push(sd):i=[sd])}v=v.return}i!==null&&Xg(l,i,f,g),l.flags|=262144}function wh(i){for(i=i.firstContext;i!==null;){if(!Ga(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Rl(i){_l=i,Ii=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function qr(i){return j5(_l,i)}function Th(i,l){return _l===null&&Rl(i),j5(i,l)}function j5(i,l){var f=l._currentValue;if(l={context:l,memoizedValue:f,next:null},Ii===null){if(i===null)throw Error(r(308));Ii=l,i.dependencies={lanes:0,firstContext:l},i.flags|=524288}else Ii=Ii.next=l;return f}var kB=typeof AbortController<"u"?AbortController:function(){var i=[],l=this.signal={aborted:!1,addEventListener:function(f,g){i.push(g)}};this.abort=function(){l.aborted=!0,i.forEach(function(f){return f()})}},AB=e.unstable_scheduleCallback,NB=e.unstable_NormalPriority,vr={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Kg(){return{controller:new kB,data:new Map,refCount:0}}function I0(i){i.refCount--,i.refCount===0&&AB(NB,function(){i.controller.abort()})}var O0=null,Qg=0,zu=0,Bu=null;function _B(i,l){if(O0===null){var f=O0=[];Qg=0,zu=eb(),Bu={status:"pending",value:void 0,then:function(g){f.push(g)}}}return Qg++,l.then(z5,z5),l}function z5(){if(--Qg===0&&O0!==null){Bu!==null&&(Bu.status="fulfilled");var i=O0;O0=null,zu=0,Bu=null;for(var l=0;l<i.length;l++)(0,i[l])()}}function RB(i,l){var f=[],g={status:"pending",value:null,reason:null,then:function(v){f.push(v)}};return i.then(function(){g.status="fulfilled",g.value=l;for(var v=0;v<f.length;v++)(0,f[v])(l)},function(v){for(g.status="rejected",g.reason=v,v=0;v<f.length;v++)(0,f[v])(void 0)}),g}var B5=$.S;$.S=function(i,l){TT=Ht(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&_B(i,l),B5!==null&&B5(i,l)};var Ml=H(null);function Zg(){var i=Ml.current;return i!==null?i:Un.pooledCache}function Eh(i,l){l===null?L(Ml,Ml.current):L(Ml,l.pool)}function F5(){var i=Zg();return i===null?null:{parent:vr._currentValue,pool:i}}var Fu=Error(r(460)),Jg=Error(r(474)),Sh=Error(r(542)),Ch={then:function(){}};function H5(i){return i=i.status,i==="fulfilled"||i==="rejected"}function U5(i,l,f){switch(f=i[f],f===void 0?i.push(l):f!==l&&(l.then(_i,_i),l=f),l.status){case"fulfilled":return l.value;case"rejected":throw i=l.reason,q5(i),i;default:if(typeof l.status=="string")l.then(_i,_i);else{if(i=Un,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=l,i.status="pending",i.then(function(g){if(l.status==="pending"){var v=l;v.status="fulfilled",v.value=g}},function(g){if(l.status==="pending"){var v=l;v.status="rejected",v.reason=g}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw i=l.reason,q5(i),i}throw Il=l,Fu}}function Dl(i){try{var l=i._init;return l(i._payload)}catch(f){throw f!==null&&typeof f=="object"&&typeof f.then=="function"?(Il=f,Fu):f}}var Il=null;function $5(){if(Il===null)throw Error(r(459));var i=Il;return Il=null,i}function q5(i){if(i===Fu||i===Sh)throw Error(r(483))}var Hu=null,L0=0;function kh(i){var l=L0;return L0+=1,Hu===null&&(Hu=[]),U5(Hu,i,l)}function P0(i,l){l=l.props.ref,i.ref=l!==void 0?l:null}function Ah(i,l){throw l.$$typeof===b?Error(r(525)):(i=Object.prototype.toString.call(l),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":i)))}function V5(i){function l(he,ue){if(i){var xe=he.deletions;xe===null?(he.deletions=[ue],he.flags|=16):xe.push(ue)}}function f(he,ue){if(!i)return null;for(;ue!==null;)l(he,ue),ue=ue.sibling;return null}function g(he){for(var ue=new Map;he!==null;)he.key!==null?ue.set(he.key,he):ue.set(he.index,he),he=he.sibling;return ue}function v(he,ue){return he=Mi(he,ue),he.index=0,he.sibling=null,he}function T(he,ue,xe){return he.index=xe,i?(xe=he.alternate,xe!==null?(xe=xe.index,xe<ue?(he.flags|=67108866,ue):xe):(he.flags|=67108866,ue)):(he.flags|=1048576,ue)}function D(he){return i&&he.alternate===null&&(he.flags|=67108866),he}function q(he,ue,xe,Le){return ue===null||ue.tag!==6?(ue=Hg(xe,he.mode,Le),ue.return=he,ue):(ue=v(ue,xe),ue.return=he,ue)}function ne(he,ue,xe,Le){var kt=xe.type;return kt===S?Ie(he,ue,xe.props.children,Le,xe.key):ue!==null&&(ue.elementType===kt||typeof kt=="object"&&kt!==null&&kt.$$typeof===z&&Dl(kt)===ue.type)?(ue=v(ue,xe.props),P0(ue,xe),ue.return=he,ue):(ue=yh(xe.type,xe.key,xe.props,null,he.mode,Le),P0(ue,xe),ue.return=he,ue)}function ve(he,ue,xe,Le){return ue===null||ue.tag!==4||ue.stateNode.containerInfo!==xe.containerInfo||ue.stateNode.implementation!==xe.implementation?(ue=Ug(xe,he.mode,Le),ue.return=he,ue):(ue=v(ue,xe.children||[]),ue.return=he,ue)}function Ie(he,ue,xe,Le,kt){return ue===null||ue.tag!==7?(ue=Al(xe,he.mode,Le,kt),ue.return=he,ue):(ue=v(ue,xe),ue.return=he,ue)}function je(he,ue,xe){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return ue=Hg(""+ue,he.mode,xe),ue.return=he,ue;if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case y:return xe=yh(ue.type,ue.key,ue.props,null,he.mode,xe),P0(xe,ue),xe.return=he,xe;case w:return ue=Ug(ue,he.mode,xe),ue.return=he,ue;case z:return ue=Dl(ue),je(he,ue,xe)}if(ie(ue)||W(ue))return ue=Al(ue,he.mode,xe,null),ue.return=he,ue;if(typeof ue.then=="function")return je(he,kh(ue),xe);if(ue.$$typeof===_)return je(he,Th(he,ue),xe);Ah(he,ue)}return null}function Te(he,ue,xe,Le){var kt=ue!==null?ue.key:null;if(typeof xe=="string"&&xe!==""||typeof xe=="number"||typeof xe=="bigint")return kt!==null?null:q(he,ue,""+xe,Le);if(typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case y:return xe.key===kt?ne(he,ue,xe,Le):null;case w:return xe.key===kt?ve(he,ue,xe,Le):null;case z:return xe=Dl(xe),Te(he,ue,xe,Le)}if(ie(xe)||W(xe))return kt!==null?null:Ie(he,ue,xe,Le,null);if(typeof xe.then=="function")return Te(he,ue,kh(xe),Le);if(xe.$$typeof===_)return Te(he,ue,Th(he,xe),Le);Ah(he,xe)}return null}function Ae(he,ue,xe,Le,kt){if(typeof Le=="string"&&Le!==""||typeof Le=="number"||typeof Le=="bigint")return he=he.get(xe)||null,q(ue,he,""+Le,kt);if(typeof Le=="object"&&Le!==null){switch(Le.$$typeof){case y:return he=he.get(Le.key===null?xe:Le.key)||null,ne(ue,he,Le,kt);case w:return he=he.get(Le.key===null?xe:Le.key)||null,ve(ue,he,Le,kt);case z:return Le=Dl(Le),Ae(he,ue,xe,Le,kt)}if(ie(Le)||W(Le))return he=he.get(xe)||null,Ie(ue,he,Le,kt,null);if(typeof Le.then=="function")return Ae(he,ue,xe,kh(Le),kt);if(Le.$$typeof===_)return Ae(he,ue,xe,Th(ue,Le),kt);Ah(ue,Le)}return null}function mt(he,ue,xe,Le){for(var kt=null,En=null,yt=ue,Kt=ue=0,hn=null;yt!==null&&Kt<xe.length;Kt++){yt.index>Kt?(hn=yt,yt=null):hn=yt.sibling;var Sn=Te(he,yt,xe[Kt],Le);if(Sn===null){yt===null&&(yt=hn);break}i&&yt&&Sn.alternate===null&&l(he,yt),ue=T(Sn,ue,Kt),En===null?kt=Sn:En.sibling=Sn,En=Sn,yt=hn}if(Kt===xe.length)return f(he,yt),pn&&Di(he,Kt),kt;if(yt===null){for(;Kt<xe.length;Kt++)yt=je(he,xe[Kt],Le),yt!==null&&(ue=T(yt,ue,Kt),En===null?kt=yt:En.sibling=yt,En=yt);return pn&&Di(he,Kt),kt}for(yt=g(yt);Kt<xe.length;Kt++)hn=Ae(yt,he,Kt,xe[Kt],Le),hn!==null&&(i&&hn.alternate!==null&&yt.delete(hn.key===null?Kt:hn.key),ue=T(hn,ue,Kt),En===null?kt=hn:En.sibling=hn,En=hn);return i&&yt.forEach(function(Fo){return l(he,Fo)}),pn&&Di(he,Kt),kt}function Ot(he,ue,xe,Le){if(xe==null)throw Error(r(151));for(var kt=null,En=null,yt=ue,Kt=ue=0,hn=null,Sn=xe.next();yt!==null&&!Sn.done;Kt++,Sn=xe.next()){yt.index>Kt?(hn=yt,yt=null):hn=yt.sibling;var Fo=Te(he,yt,Sn.value,Le);if(Fo===null){yt===null&&(yt=hn);break}i&&yt&&Fo.alternate===null&&l(he,yt),ue=T(Fo,ue,Kt),En===null?kt=Fo:En.sibling=Fo,En=Fo,yt=hn}if(Sn.done)return f(he,yt),pn&&Di(he,Kt),kt;if(yt===null){for(;!Sn.done;Kt++,Sn=xe.next())Sn=je(he,Sn.value,Le),Sn!==null&&(ue=T(Sn,ue,Kt),En===null?kt=Sn:En.sibling=Sn,En=Sn);return pn&&Di(he,Kt),kt}for(yt=g(yt);!Sn.done;Kt++,Sn=xe.next())Sn=Ae(yt,he,Kt,Sn.value,Le),Sn!==null&&(i&&Sn.alternate!==null&&yt.delete(Sn.key===null?Kt:Sn.key),ue=T(Sn,ue,Kt),En===null?kt=Sn:En.sibling=Sn,En=Sn);return i&&yt.forEach(function(HF){return l(he,HF)}),pn&&Di(he,Kt),kt}function zn(he,ue,xe,Le){if(typeof xe=="object"&&xe!==null&&xe.type===S&&xe.key===null&&(xe=xe.props.children),typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case y:e:{for(var kt=xe.key;ue!==null;){if(ue.key===kt){if(kt=xe.type,kt===S){if(ue.tag===7){f(he,ue.sibling),Le=v(ue,xe.props.children),Le.return=he,he=Le;break e}}else if(ue.elementType===kt||typeof kt=="object"&&kt!==null&&kt.$$typeof===z&&Dl(kt)===ue.type){f(he,ue.sibling),Le=v(ue,xe.props),P0(Le,xe),Le.return=he,he=Le;break e}f(he,ue);break}else l(he,ue);ue=ue.sibling}xe.type===S?(Le=Al(xe.props.children,he.mode,Le,xe.key),Le.return=he,he=Le):(Le=yh(xe.type,xe.key,xe.props,null,he.mode,Le),P0(Le,xe),Le.return=he,he=Le)}return D(he);case w:e:{for(kt=xe.key;ue!==null;){if(ue.key===kt)if(ue.tag===4&&ue.stateNode.containerInfo===xe.containerInfo&&ue.stateNode.implementation===xe.implementation){f(he,ue.sibling),Le=v(ue,xe.children||[]),Le.return=he,he=Le;break e}else{f(he,ue);break}else l(he,ue);ue=ue.sibling}Le=Ug(xe,he.mode,Le),Le.return=he,he=Le}return D(he);case z:return xe=Dl(xe),zn(he,ue,xe,Le)}if(ie(xe))return mt(he,ue,xe,Le);if(W(xe)){if(kt=W(xe),typeof kt!="function")throw Error(r(150));return xe=kt.call(xe),Ot(he,ue,xe,Le)}if(typeof xe.then=="function")return zn(he,ue,kh(xe),Le);if(xe.$$typeof===_)return zn(he,ue,Th(he,xe),Le);Ah(he,xe)}return typeof xe=="string"&&xe!==""||typeof xe=="number"||typeof xe=="bigint"?(xe=""+xe,ue!==null&&ue.tag===6?(f(he,ue.sibling),Le=v(ue,xe),Le.return=he,he=Le):(f(he,ue),Le=Hg(xe,he.mode,Le),Le.return=he,he=Le),D(he)):f(he,ue)}return function(he,ue,xe,Le){try{L0=0;var kt=zn(he,ue,xe,Le);return Hu=null,kt}catch(yt){if(yt===Fu||yt===Sh)throw yt;var En=Ya(29,yt,null,he.mode);return En.lanes=Le,En.return=he,En}}}var Ol=V5(!0),G5=V5(!1),Eo=!1;function e2(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function t2(i,l){i=i.updateQueue,l.updateQueue===i&&(l.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function So(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Co(i,l,f){var g=i.updateQueue;if(g===null)return null;if(g=g.shared,(_n&2)!==0){var v=g.pending;return v===null?l.next=l:(l.next=v.next,v.next=l),g.pending=l,l=xh(i),_5(i,null,f),l}return bh(i,g,l,f),xh(i)}function j0(i,l,f){if(l=l.updateQueue,l!==null&&(l=l.shared,(f&4194048)!==0)){var g=l.lanes;g&=i.pendingLanes,f|=g,l.lanes=f,Zr(i,f)}}function n2(i,l){var f=i.updateQueue,g=i.alternate;if(g!==null&&(g=g.updateQueue,f===g)){var v=null,T=null;if(f=f.firstBaseUpdate,f!==null){do{var D={lane:f.lane,tag:f.tag,payload:f.payload,callback:null,next:null};T===null?v=T=D:T=T.next=D,f=f.next}while(f!==null);T===null?v=T=l:T=T.next=l}else v=T=l;f={baseState:g.baseState,firstBaseUpdate:v,lastBaseUpdate:T,shared:g.shared,callbacks:g.callbacks},i.updateQueue=f;return}i=f.lastBaseUpdate,i===null?f.firstBaseUpdate=l:i.next=l,f.lastBaseUpdate=l}var r2=!1;function z0(){if(r2){var i=Bu;if(i!==null)throw i}}function B0(i,l,f,g){r2=!1;var v=i.updateQueue;Eo=!1;var T=v.firstBaseUpdate,D=v.lastBaseUpdate,q=v.shared.pending;if(q!==null){v.shared.pending=null;var ne=q,ve=ne.next;ne.next=null,D===null?T=ve:D.next=ve,D=ne;var Ie=i.alternate;Ie!==null&&(Ie=Ie.updateQueue,q=Ie.lastBaseUpdate,q!==D&&(q===null?Ie.firstBaseUpdate=ve:q.next=ve,Ie.lastBaseUpdate=ne))}if(T!==null){var je=v.baseState;D=0,Ie=ve=ne=null,q=T;do{var Te=q.lane&-536870913,Ae=Te!==q.lane;if(Ae?(fn&Te)===Te:(g&Te)===Te){Te!==0&&Te===zu&&(r2=!0),Ie!==null&&(Ie=Ie.next={lane:0,tag:q.tag,payload:q.payload,callback:null,next:null});e:{var mt=i,Ot=q;Te=l;var zn=f;switch(Ot.tag){case 1:if(mt=Ot.payload,typeof mt=="function"){je=mt.call(zn,je,Te);break e}je=mt;break e;case 3:mt.flags=mt.flags&-65537|128;case 0:if(mt=Ot.payload,Te=typeof mt=="function"?mt.call(zn,je,Te):mt,Te==null)break e;je=p({},je,Te);break e;case 2:Eo=!0}}Te=q.callback,Te!==null&&(i.flags|=64,Ae&&(i.flags|=8192),Ae=v.callbacks,Ae===null?v.callbacks=[Te]:Ae.push(Te))}else Ae={lane:Te,tag:q.tag,payload:q.payload,callback:q.callback,next:null},Ie===null?(ve=Ie=Ae,ne=je):Ie=Ie.next=Ae,D|=Te;if(q=q.next,q===null){if(q=v.shared.pending,q===null)break;Ae=q,q=Ae.next,Ae.next=null,v.lastBaseUpdate=Ae,v.shared.pending=null}}while(!0);Ie===null&&(ne=je),v.baseState=ne,v.firstBaseUpdate=ve,v.lastBaseUpdate=Ie,T===null&&(v.shared.lanes=0),Ro|=D,i.lanes=D,i.memoizedState=je}}function Y5(i,l){if(typeof i!="function")throw Error(r(191,i));i.call(l)}function W5(i,l){var f=i.callbacks;if(f!==null)for(i.callbacks=null,i=0;i<f.length;i++)Y5(f[i],l)}var Uu=H(null),Nh=H(0);function X5(i,l){i=$i,L(Nh,i),L(Uu,l),$i=i|l.baseLanes}function a2(){L(Nh,$i),L(Uu,Uu.current)}function s2(){$i=Nh.current,G(Uu),G(Nh)}var Wa=H(null),gs=null;function ko(i){var l=i.alternate;L(pr,pr.current&1),L(Wa,i),gs===null&&(l===null||Uu.current!==null||l.memoizedState!==null)&&(gs=i)}function i2(i){L(pr,pr.current),L(Wa,i),gs===null&&(gs=i)}function K5(i){i.tag===22?(L(pr,pr.current),L(Wa,i),gs===null&&(gs=i)):Ao()}function Ao(){L(pr,pr.current),L(Wa,Wa.current)}function Xa(i){G(Wa),gs===i&&(gs=null),G(pr)}var pr=H(0);function _h(i){for(var l=i;l!==null;){if(l.tag===13){var f=l.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||fb(f)||hb(f)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===i)break;for(;l.sibling===null;){if(l.return===null||l.return===i)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Li=0,Wt=null,Pn=null,wr=null,Rh=!1,$u=!1,Ll=!1,Mh=0,F0=0,qu=null,MB=0;function ur(){throw Error(r(321))}function o2(i,l){if(l===null)return!1;for(var f=0;f<l.length&&f<i.length;f++)if(!Ga(i[f],l[f]))return!1;return!0}function l2(i,l,f,g,v,T){return Li=T,Wt=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,$.H=i===null||i.memoizedState===null?Iw:E2,Ll=!1,T=f(g,v),Ll=!1,$u&&(T=Z5(l,f,g,v)),Q5(i),T}function Q5(i){$.H=$0;var l=Pn!==null&&Pn.next!==null;if(Li=0,wr=Pn=Wt=null,Rh=!1,F0=0,qu=null,l)throw Error(r(300));i===null||Tr||(i=i.dependencies,i!==null&&wh(i)&&(Tr=!0))}function Z5(i,l,f,g){Wt=i;var v=0;do{if($u&&(qu=null),F0=0,$u=!1,25<=v)throw Error(r(301));if(v+=1,wr=Pn=null,i.updateQueue!=null){var T=i.updateQueue;T.lastEffect=null,T.events=null,T.stores=null,T.memoCache!=null&&(T.memoCache.index=0)}$.H=Ow,T=l(f,g)}while($u);return T}function DB(){var i=$.H,l=i.useState()[0];return l=typeof l.then=="function"?H0(l):l,i=i.useState()[0],(Pn!==null?Pn.memoizedState:null)!==i&&(Wt.flags|=1024),l}function u2(){var i=Mh!==0;return Mh=0,i}function c2(i,l,f){l.updateQueue=i.updateQueue,l.flags&=-2053,i.lanes&=~f}function d2(i){if(Rh){for(i=i.memoizedState;i!==null;){var l=i.queue;l!==null&&(l.pending=null),i=i.next}Rh=!1}Li=0,wr=Pn=Wt=null,$u=!1,F0=Mh=0,qu=null}function da(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wr===null?Wt.memoizedState=wr=i:wr=wr.next=i,wr}function gr(){if(Pn===null){var i=Wt.alternate;i=i!==null?i.memoizedState:null}else i=Pn.next;var l=wr===null?Wt.memoizedState:wr.next;if(l!==null)wr=l,Pn=i;else{if(i===null)throw Wt.alternate===null?Error(r(467)):Error(r(310));Pn=i,i={memoizedState:Pn.memoizedState,baseState:Pn.baseState,baseQueue:Pn.baseQueue,queue:Pn.queue,next:null},wr===null?Wt.memoizedState=wr=i:wr=wr.next=i}return wr}function Dh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function H0(i){var l=F0;return F0+=1,qu===null&&(qu=[]),i=U5(qu,i,l),l=Wt,(wr===null?l.memoizedState:wr.next)===null&&(l=l.alternate,$.H=l===null||l.memoizedState===null?Iw:E2),i}function Ih(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return H0(i);if(i.$$typeof===_)return qr(i)}throw Error(r(438,String(i)))}function f2(i){var l=null,f=Wt.updateQueue;if(f!==null&&(l=f.memoCache),l==null){var g=Wt.alternate;g!==null&&(g=g.updateQueue,g!==null&&(g=g.memoCache,g!=null&&(l={data:g.data.map(function(v){return v.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),f===null&&(f=Dh(),Wt.updateQueue=f),f.memoCache=l,f=l.data[l.index],f===void 0)for(f=l.data[l.index]=Array(i),g=0;g<i;g++)f[g]=U;return l.index++,f}function Pi(i,l){return typeof l=="function"?l(i):l}function Oh(i){var l=gr();return h2(l,Pn,i)}function h2(i,l,f){var g=i.queue;if(g===null)throw Error(r(311));g.lastRenderedReducer=f;var v=i.baseQueue,T=g.pending;if(T!==null){if(v!==null){var D=v.next;v.next=T.next,T.next=D}l.baseQueue=v=T,g.pending=null}if(T=i.baseState,v===null)i.memoizedState=T;else{l=v.next;var q=D=null,ne=null,ve=l,Ie=!1;do{var je=ve.lane&-536870913;if(je!==ve.lane?(fn&je)===je:(Li&je)===je){var Te=ve.revertLane;if(Te===0)ne!==null&&(ne=ne.next={lane:0,revertLane:0,gesture:null,action:ve.action,hasEagerState:ve.hasEagerState,eagerState:ve.eagerState,next:null}),je===zu&&(Ie=!0);else if((Li&Te)===Te){ve=ve.next,Te===zu&&(Ie=!0);continue}else je={lane:0,revertLane:ve.revertLane,gesture:null,action:ve.action,hasEagerState:ve.hasEagerState,eagerState:ve.eagerState,next:null},ne===null?(q=ne=je,D=T):ne=ne.next=je,Wt.lanes|=Te,Ro|=Te;je=ve.action,Ll&&f(T,je),T=ve.hasEagerState?ve.eagerState:f(T,je)}else Te={lane:je,revertLane:ve.revertLane,gesture:ve.gesture,action:ve.action,hasEagerState:ve.hasEagerState,eagerState:ve.eagerState,next:null},ne===null?(q=ne=Te,D=T):ne=ne.next=Te,Wt.lanes|=je,Ro|=je;ve=ve.next}while(ve!==null&&ve!==l);if(ne===null?D=T:ne.next=q,!Ga(T,i.memoizedState)&&(Tr=!0,Ie&&(f=Bu,f!==null)))throw f;i.memoizedState=T,i.baseState=D,i.baseQueue=ne,g.lastRenderedState=T}return v===null&&(g.lanes=0),[i.memoizedState,g.dispatch]}function m2(i){var l=gr(),f=l.queue;if(f===null)throw Error(r(311));f.lastRenderedReducer=i;var g=f.dispatch,v=f.pending,T=l.memoizedState;if(v!==null){f.pending=null;var D=v=v.next;do T=i(T,D.action),D=D.next;while(D!==v);Ga(T,l.memoizedState)||(Tr=!0),l.memoizedState=T,l.baseQueue===null&&(l.baseState=T),f.lastRenderedState=T}return[T,g]}function J5(i,l,f){var g=Wt,v=gr(),T=pn;if(T){if(f===void 0)throw Error(r(407));f=f()}else f=l();var D=!Ga((Pn||v).memoizedState,f);if(D&&(v.memoizedState=f,Tr=!0),v=v.queue,b2(nw.bind(null,g,v,i),[i]),v.getSnapshot!==l||D||wr!==null&&wr.memoizedState.tag&1){if(g.flags|=2048,Vu(9,{destroy:void 0},tw.bind(null,g,v,f,l),null),Un===null)throw Error(r(349));T||(Li&127)!==0||ew(g,l,f)}return f}function ew(i,l,f){i.flags|=16384,i={getSnapshot:l,value:f},l=Wt.updateQueue,l===null?(l=Dh(),Wt.updateQueue=l,l.stores=[i]):(f=l.stores,f===null?l.stores=[i]:f.push(i))}function tw(i,l,f,g){l.value=f,l.getSnapshot=g,rw(l)&&aw(i)}function nw(i,l,f){return f(function(){rw(l)&&aw(i)})}function rw(i){var l=i.getSnapshot;i=i.value;try{var f=l();return!Ga(i,f)}catch{return!0}}function aw(i){var l=kl(i,2);l!==null&&_a(l,i,2)}function p2(i){var l=da();if(typeof i=="function"){var f=i;if(i=f(),Ll){vn(!0);try{f()}finally{vn(!1)}}}return l.memoizedState=l.baseState=i,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pi,lastRenderedState:i},l}function sw(i,l,f,g){return i.baseState=f,h2(i,Pn,typeof g=="function"?g:Pi)}function IB(i,l,f,g,v){if(jh(i))throw Error(r(485));if(i=l.action,i!==null){var T={payload:v,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(D){T.listeners.push(D)}};$.T!==null?f(!0):T.isTransition=!1,g(T),f=l.pending,f===null?(T.next=l.pending=T,iw(l,T)):(T.next=f.next,l.pending=f.next=T)}}function iw(i,l){var f=l.action,g=l.payload,v=i.state;if(l.isTransition){var T=$.T,D={};$.T=D;try{var q=f(v,g),ne=$.S;ne!==null&&ne(D,q),ow(i,l,q)}catch(ve){g2(i,l,ve)}finally{T!==null&&D.types!==null&&(T.types=D.types),$.T=T}}else try{T=f(v,g),ow(i,l,T)}catch(ve){g2(i,l,ve)}}function ow(i,l,f){f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(function(g){lw(i,l,g)},function(g){return g2(i,l,g)}):lw(i,l,f)}function lw(i,l,f){l.status="fulfilled",l.value=f,uw(l),i.state=f,l=i.pending,l!==null&&(f=l.next,f===l?i.pending=null:(f=f.next,l.next=f,iw(i,f)))}function g2(i,l,f){var g=i.pending;if(i.pending=null,g!==null){g=g.next;do l.status="rejected",l.reason=f,uw(l),l=l.next;while(l!==g)}i.action=null}function uw(i){i=i.listeners;for(var l=0;l<i.length;l++)(0,i[l])()}function cw(i,l){return l}function dw(i,l){if(pn){var f=Un.formState;if(f!==null){e:{var g=Wt;if(pn){if(Yn){t:{for(var v=Yn,T=ps;v.nodeType!==8;){if(!T){v=null;break t}if(v=bs(v.nextSibling),v===null){v=null;break t}}T=v.data,v=T==="F!"||T==="F"?v:null}if(v){Yn=bs(v.nextSibling),g=v.data==="F!";break e}}wo(g)}g=!1}g&&(l=f[0])}}return f=da(),f.memoizedState=f.baseState=l,g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cw,lastRenderedState:l},f.queue=g,f=Rw.bind(null,Wt,g),g.dispatch=f,g=p2(!1),T=T2.bind(null,Wt,!1,g.queue),g=da(),v={state:l,dispatch:null,action:i,pending:null},g.queue=v,f=IB.bind(null,Wt,v,T,f),v.dispatch=f,g.memoizedState=i,[l,f,!1]}function fw(i){var l=gr();return hw(l,Pn,i)}function hw(i,l,f){if(l=h2(i,l,cw)[0],i=Oh(Pi)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var g=H0(l)}catch(D){throw D===Fu?Sh:D}else g=l;l=gr();var v=l.queue,T=v.dispatch;return f!==l.memoizedState&&(Wt.flags|=2048,Vu(9,{destroy:void 0},OB.bind(null,v,f),null)),[g,T,i]}function OB(i,l){i.action=l}function mw(i){var l=gr(),f=Pn;if(f!==null)return hw(l,f,i);gr(),l=l.memoizedState,f=gr();var g=f.queue.dispatch;return f.memoizedState=i,[l,g,!1]}function Vu(i,l,f,g){return i={tag:i,create:f,deps:g,inst:l,next:null},l=Wt.updateQueue,l===null&&(l=Dh(),Wt.updateQueue=l),f=l.lastEffect,f===null?l.lastEffect=i.next=i:(g=f.next,f.next=i,i.next=g,l.lastEffect=i),i}function pw(){return gr().memoizedState}function Lh(i,l,f,g){var v=da();Wt.flags|=i,v.memoizedState=Vu(1|l,{destroy:void 0},f,g===void 0?null:g)}function Ph(i,l,f,g){var v=gr();g=g===void 0?null:g;var T=v.memoizedState.inst;Pn!==null&&g!==null&&o2(g,Pn.memoizedState.deps)?v.memoizedState=Vu(l,T,f,g):(Wt.flags|=i,v.memoizedState=Vu(1|l,T,f,g))}function gw(i,l){Lh(8390656,8,i,l)}function b2(i,l){Ph(2048,8,i,l)}function LB(i){Wt.flags|=4;var l=Wt.updateQueue;if(l===null)l=Dh(),Wt.updateQueue=l,l.events=[i];else{var f=l.events;f===null?l.events=[i]:f.push(i)}}function bw(i){var l=gr().memoizedState;return LB({ref:l,nextImpl:i}),function(){if((_n&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function xw(i,l){return Ph(4,2,i,l)}function yw(i,l){return Ph(4,4,i,l)}function vw(i,l){if(typeof l=="function"){i=i();var f=l(i);return function(){typeof f=="function"?f():l(null)}}if(l!=null)return i=i(),l.current=i,function(){l.current=null}}function ww(i,l,f){f=f!=null?f.concat([i]):null,Ph(4,4,vw.bind(null,l,i),f)}function x2(){}function Tw(i,l){var f=gr();l=l===void 0?null:l;var g=f.memoizedState;return l!==null&&o2(l,g[1])?g[0]:(f.memoizedState=[i,l],i)}function Ew(i,l){var f=gr();l=l===void 0?null:l;var g=f.memoizedState;if(l!==null&&o2(l,g[1]))return g[0];if(g=i(),Ll){vn(!0);try{i()}finally{vn(!1)}}return f.memoizedState=[g,l],g}function y2(i,l,f){return f===void 0||(Li&1073741824)!==0&&(fn&261930)===0?i.memoizedState=l:(i.memoizedState=f,i=ST(),Wt.lanes|=i,Ro|=i,f)}function Sw(i,l,f,g){return Ga(f,l)?f:Uu.current!==null?(i=y2(i,f,g),Ga(i,l)||(Tr=!0),i):(Li&42)===0||(Li&1073741824)!==0&&(fn&261930)===0?(Tr=!0,i.memoizedState=f):(i=ST(),Wt.lanes|=i,Ro|=i,l)}function Cw(i,l,f,g,v){var T=K.p;K.p=T!==0&&8>T?T:8;var D=$.T,q={};$.T=q,T2(i,!1,l,f);try{var ne=v(),ve=$.S;if(ve!==null&&ve(q,ne),ne!==null&&typeof ne=="object"&&typeof ne.then=="function"){var Ie=RB(ne,g);U0(i,l,Ie,Za(i))}else U0(i,l,g,Za(i))}catch(je){U0(i,l,{then:function(){},status:"rejected",reason:je},Za())}finally{K.p=T,D!==null&&q.types!==null&&(D.types=q.types),$.T=D}}function PB(){}function v2(i,l,f,g){if(i.tag!==5)throw Error(r(476));var v=kw(i).queue;Cw(i,v,l,Z,f===null?PB:function(){return Aw(i),f(g)})}function kw(i){var l=i.memoizedState;if(l!==null)return l;l={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pi,lastRenderedState:Z},next:null};var f={};return l.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pi,lastRenderedState:f},next:null},i.memoizedState=l,i=i.alternate,i!==null&&(i.memoizedState=l),l}function Aw(i){var l=kw(i);l.next===null&&(l=i.alternate.memoizedState),U0(i,l.next.queue,{},Za())}function w2(){return qr(sd)}function Nw(){return gr().memoizedState}function _w(){return gr().memoizedState}function jB(i){for(var l=i.return;l!==null;){switch(l.tag){case 24:case 3:var f=Za();i=So(f);var g=Co(l,i,f);g!==null&&(_a(g,l,f),j0(g,l,f)),l={cache:Kg()},i.payload=l;return}l=l.return}}function zB(i,l,f){var g=Za();f={lane:g,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},jh(i)?Mw(l,f):(f=Bg(i,l,f,g),f!==null&&(_a(f,i,g),Dw(f,l,g)))}function Rw(i,l,f){var g=Za();U0(i,l,f,g)}function U0(i,l,f,g){var v={lane:g,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null};if(jh(i))Mw(l,v);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=l.lastRenderedReducer,T!==null))try{var D=l.lastRenderedState,q=T(D,f);if(v.hasEagerState=!0,v.eagerState=q,Ga(q,D))return bh(i,l,v,0),Un===null&&gh(),!1}catch{}if(f=Bg(i,l,v,g),f!==null)return _a(f,i,g),Dw(f,l,g),!0}return!1}function T2(i,l,f,g){if(g={lane:2,revertLane:eb(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},jh(i)){if(l)throw Error(r(479))}else l=Bg(i,f,g,2),l!==null&&_a(l,i,2)}function jh(i){var l=i.alternate;return i===Wt||l!==null&&l===Wt}function Mw(i,l){$u=Rh=!0;var f=i.pending;f===null?l.next=l:(l.next=f.next,f.next=l),i.pending=l}function Dw(i,l,f){if((f&4194048)!==0){var g=l.lanes;g&=i.pendingLanes,f|=g,l.lanes=f,Zr(i,f)}}var $0={readContext:qr,use:Ih,useCallback:ur,useContext:ur,useEffect:ur,useImperativeHandle:ur,useLayoutEffect:ur,useInsertionEffect:ur,useMemo:ur,useReducer:ur,useRef:ur,useState:ur,useDebugValue:ur,useDeferredValue:ur,useTransition:ur,useSyncExternalStore:ur,useId:ur,useHostTransitionStatus:ur,useFormState:ur,useActionState:ur,useOptimistic:ur,useMemoCache:ur,useCacheRefresh:ur};$0.useEffectEvent=ur;var Iw={readContext:qr,use:Ih,useCallback:function(i,l){return da().memoizedState=[i,l===void 0?null:l],i},useContext:qr,useEffect:gw,useImperativeHandle:function(i,l,f){f=f!=null?f.concat([i]):null,Lh(4194308,4,vw.bind(null,l,i),f)},useLayoutEffect:function(i,l){return Lh(4194308,4,i,l)},useInsertionEffect:function(i,l){Lh(4,2,i,l)},useMemo:function(i,l){var f=da();l=l===void 0?null:l;var g=i();if(Ll){vn(!0);try{i()}finally{vn(!1)}}return f.memoizedState=[g,l],g},useReducer:function(i,l,f){var g=da();if(f!==void 0){var v=f(l);if(Ll){vn(!0);try{f(l)}finally{vn(!1)}}}else v=l;return g.memoizedState=g.baseState=v,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:v},g.queue=i,i=i.dispatch=zB.bind(null,Wt,i),[g.memoizedState,i]},useRef:function(i){var l=da();return i={current:i},l.memoizedState=i},useState:function(i){i=p2(i);var l=i.queue,f=Rw.bind(null,Wt,l);return l.dispatch=f,[i.memoizedState,f]},useDebugValue:x2,useDeferredValue:function(i,l){var f=da();return y2(f,i,l)},useTransition:function(){var i=p2(!1);return i=Cw.bind(null,Wt,i.queue,!0,!1),da().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,l,f){var g=Wt,v=da();if(pn){if(f===void 0)throw Error(r(407));f=f()}else{if(f=l(),Un===null)throw Error(r(349));(fn&127)!==0||ew(g,l,f)}v.memoizedState=f;var T={value:f,getSnapshot:l};return v.queue=T,gw(nw.bind(null,g,T,i),[i]),g.flags|=2048,Vu(9,{destroy:void 0},tw.bind(null,g,T,f,l),null),f},useId:function(){var i=da(),l=Un.identifierPrefix;if(pn){var f=Zs,g=Qs;f=(g&~(1<<32-an(g)-1)).toString(32)+f,l="_"+l+"R_"+f,f=Mh++,0<f&&(l+="H"+f.toString(32)),l+="_"}else f=MB++,l="_"+l+"r_"+f.toString(32)+"_";return i.memoizedState=l},useHostTransitionStatus:w2,useFormState:dw,useActionState:dw,useOptimistic:function(i){var l=da();l.memoizedState=l.baseState=i;var f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=f,l=T2.bind(null,Wt,!0,f),f.dispatch=l,[i,l]},useMemoCache:f2,useCacheRefresh:function(){return da().memoizedState=jB.bind(null,Wt)},useEffectEvent:function(i){var l=da(),f={impl:i};return l.memoizedState=f,function(){if((_n&2)!==0)throw Error(r(440));return f.impl.apply(void 0,arguments)}}},E2={readContext:qr,use:Ih,useCallback:Tw,useContext:qr,useEffect:b2,useImperativeHandle:ww,useInsertionEffect:xw,useLayoutEffect:yw,useMemo:Ew,useReducer:Oh,useRef:pw,useState:function(){return Oh(Pi)},useDebugValue:x2,useDeferredValue:function(i,l){var f=gr();return Sw(f,Pn.memoizedState,i,l)},useTransition:function(){var i=Oh(Pi)[0],l=gr().memoizedState;return[typeof i=="boolean"?i:H0(i),l]},useSyncExternalStore:J5,useId:Nw,useHostTransitionStatus:w2,useFormState:fw,useActionState:fw,useOptimistic:function(i,l){var f=gr();return sw(f,Pn,i,l)},useMemoCache:f2,useCacheRefresh:_w};E2.useEffectEvent=bw;var Ow={readContext:qr,use:Ih,useCallback:Tw,useContext:qr,useEffect:b2,useImperativeHandle:ww,useInsertionEffect:xw,useLayoutEffect:yw,useMemo:Ew,useReducer:m2,useRef:pw,useState:function(){return m2(Pi)},useDebugValue:x2,useDeferredValue:function(i,l){var f=gr();return Pn===null?y2(f,i,l):Sw(f,Pn.memoizedState,i,l)},useTransition:function(){var i=m2(Pi)[0],l=gr().memoizedState;return[typeof i=="boolean"?i:H0(i),l]},useSyncExternalStore:J5,useId:Nw,useHostTransitionStatus:w2,useFormState:mw,useActionState:mw,useOptimistic:function(i,l){var f=gr();return Pn!==null?sw(f,Pn,i,l):(f.baseState=i,[i,f.queue.dispatch])},useMemoCache:f2,useCacheRefresh:_w};Ow.useEffectEvent=bw;function S2(i,l,f,g){l=i.memoizedState,f=f(g,l),f=f==null?l:p({},l,f),i.memoizedState=f,i.lanes===0&&(i.updateQueue.baseState=f)}var C2={enqueueSetState:function(i,l,f){i=i._reactInternals;var g=Za(),v=So(g);v.payload=l,f!=null&&(v.callback=f),l=Co(i,v,g),l!==null&&(_a(l,i,g),j0(l,i,g))},enqueueReplaceState:function(i,l,f){i=i._reactInternals;var g=Za(),v=So(g);v.tag=1,v.payload=l,f!=null&&(v.callback=f),l=Co(i,v,g),l!==null&&(_a(l,i,g),j0(l,i,g))},enqueueForceUpdate:function(i,l){i=i._reactInternals;var f=Za(),g=So(f);g.tag=2,l!=null&&(g.callback=l),l=Co(i,g,f),l!==null&&(_a(l,i,f),j0(l,i,f))}};function Lw(i,l,f,g,v,T,D){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(g,T,D):l.prototype&&l.prototype.isPureReactComponent?!_0(f,g)||!_0(v,T):!0}function Pw(i,l,f,g){i=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(f,g),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(f,g),l.state!==i&&C2.enqueueReplaceState(l,l.state,null)}function Pl(i,l){var f=l;if("ref"in l){f={};for(var g in l)g!=="ref"&&(f[g]=l[g])}if(i=i.defaultProps){f===l&&(f=p({},f));for(var v in i)f[v]===void 0&&(f[v]=i[v])}return f}function jw(i){ph(i)}function zw(i){console.error(i)}function Bw(i){ph(i)}function zh(i,l){try{var f=i.onUncaughtError;f(l.value,{componentStack:l.stack})}catch(g){setTimeout(function(){throw g})}}function Fw(i,l,f){try{var g=i.onCaughtError;g(f.value,{componentStack:f.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function k2(i,l,f){return f=So(f),f.tag=3,f.payload={element:null},f.callback=function(){zh(i,l)},f}function Hw(i){return i=So(i),i.tag=3,i}function Uw(i,l,f,g){var v=f.type.getDerivedStateFromError;if(typeof v=="function"){var T=g.value;i.payload=function(){return v(T)},i.callback=function(){Fw(l,f,g)}}var D=f.stateNode;D!==null&&typeof D.componentDidCatch=="function"&&(i.callback=function(){Fw(l,f,g),typeof v!="function"&&(Mo===null?Mo=new Set([this]):Mo.add(this));var q=g.stack;this.componentDidCatch(g.value,{componentStack:q!==null?q:""})})}function BB(i,l,f,g,v){if(f.flags|=32768,g!==null&&typeof g=="object"&&typeof g.then=="function"){if(l=f.alternate,l!==null&&ju(l,f,v,!0),f=Wa.current,f!==null){switch(f.tag){case 31:case 13:return gs===null?Kh():f.alternate===null&&cr===0&&(cr=3),f.flags&=-257,f.flags|=65536,f.lanes=v,g===Ch?f.flags|=16384:(l=f.updateQueue,l===null?f.updateQueue=new Set([g]):l.add(g),Q2(i,g,v)),!1;case 22:return f.flags|=65536,g===Ch?f.flags|=16384:(l=f.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([g])},f.updateQueue=l):(f=l.retryQueue,f===null?l.retryQueue=new Set([g]):f.add(g)),Q2(i,g,v)),!1}throw Error(r(435,f.tag))}return Q2(i,g,v),Kh(),!1}if(pn)return l=Wa.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=v,g!==Vg&&(i=Error(r(422),{cause:g}),D0(fs(i,f)))):(g!==Vg&&(l=Error(r(423),{cause:g}),D0(fs(l,f))),i=i.current.alternate,i.flags|=65536,v&=-v,i.lanes|=v,g=fs(g,f),v=k2(i.stateNode,g,v),n2(i,v),cr!==4&&(cr=2)),!1;var T=Error(r(520),{cause:g});if(T=fs(T,f),Q0===null?Q0=[T]:Q0.push(T),cr!==4&&(cr=2),l===null)return!0;g=fs(g,f),f=l;do{switch(f.tag){case 3:return f.flags|=65536,i=v&-v,f.lanes|=i,i=k2(f.stateNode,g,i),n2(f,i),!1;case 1:if(l=f.type,T=f.stateNode,(f.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Mo===null||!Mo.has(T))))return f.flags|=65536,v&=-v,f.lanes|=v,v=Hw(v),Uw(v,i,f,g),n2(f,v),!1}f=f.return}while(f!==null);return!1}var A2=Error(r(461)),Tr=!1;function Vr(i,l,f,g){l.child=i===null?G5(l,null,f,g):Ol(l,i.child,f,g)}function $w(i,l,f,g,v){f=f.render;var T=l.ref;if("ref"in g){var D={};for(var q in g)q!=="ref"&&(D[q]=g[q])}else D=g;return Rl(l),g=l2(i,l,f,D,T,v),q=u2(),i!==null&&!Tr?(c2(i,l,v),ji(i,l,v)):(pn&&q&&$g(l),l.flags|=1,Vr(i,l,g,v),l.child)}function qw(i,l,f,g,v){if(i===null){var T=f.type;return typeof T=="function"&&!Fg(T)&&T.defaultProps===void 0&&f.compare===null?(l.tag=15,l.type=T,Vw(i,l,T,g,v)):(i=yh(f.type,null,g,l,l.mode,v),i.ref=l.ref,i.return=l,l.child=i)}if(T=i.child,!L2(i,v)){var D=T.memoizedProps;if(f=f.compare,f=f!==null?f:_0,f(D,g)&&i.ref===l.ref)return ji(i,l,v)}return l.flags|=1,i=Mi(T,g),i.ref=l.ref,i.return=l,l.child=i}function Vw(i,l,f,g,v){if(i!==null){var T=i.memoizedProps;if(_0(T,g)&&i.ref===l.ref)if(Tr=!1,l.pendingProps=g=T,L2(i,v))(i.flags&131072)!==0&&(Tr=!0);else return l.lanes=i.lanes,ji(i,l,v)}return N2(i,l,f,g,v)}function Gw(i,l,f,g){var v=g.children,T=i!==null?i.memoizedState:null;if(i===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),g.mode==="hidden"){if((l.flags&128)!==0){if(T=T!==null?T.baseLanes|f:f,i!==null){for(g=l.child=i.child,v=0;g!==null;)v=v|g.lanes|g.childLanes,g=g.sibling;g=v&~T}else g=0,l.child=null;return Yw(i,l,T,f,g)}if((f&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},i!==null&&Eh(l,T!==null?T.cachePool:null),T!==null?X5(l,T):a2(),K5(l);else return g=l.lanes=536870912,Yw(i,l,T!==null?T.baseLanes|f:f,f,g)}else T!==null?(Eh(l,T.cachePool),X5(l,T),Ao(),l.memoizedState=null):(i!==null&&Eh(l,null),a2(),Ao());return Vr(i,l,v,f),l.child}function q0(i,l){return i!==null&&i.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function Yw(i,l,f,g,v){var T=Zg();return T=T===null?null:{parent:vr._currentValue,pool:T},l.memoizedState={baseLanes:f,cachePool:T},i!==null&&Eh(l,null),a2(),K5(l),i!==null&&ju(i,l,g,!0),l.childLanes=v,null}function Bh(i,l){return l=Hh({mode:l.mode,children:l.children},i.mode),l.ref=i.ref,i.child=l,l.return=i,l}function Ww(i,l,f){return Ol(l,i.child,null,f),i=Bh(l,l.pendingProps),i.flags|=2,Xa(l),l.memoizedState=null,i}function FB(i,l,f){var g=l.pendingProps,v=(l.flags&128)!==0;if(l.flags&=-129,i===null){if(pn){if(g.mode==="hidden")return i=Bh(l,g),l.lanes=536870912,q0(null,i);if(i2(l),(i=Yn)?(i=iE(i,ps),i=i!==null&&i.data==="&"?i:null,i!==null&&(l.memoizedState={dehydrated:i,treeContext:yo!==null?{id:Qs,overflow:Zs}:null,retryLane:536870912,hydrationErrors:null},f=M5(i),f.return=l,l.child=f,$r=l,Yn=null)):i=null,i===null)throw wo(l);return l.lanes=536870912,null}return Bh(l,g)}var T=i.memoizedState;if(T!==null){var D=T.dehydrated;if(i2(l),v)if(l.flags&256)l.flags&=-257,l=Ww(i,l,f);else if(l.memoizedState!==null)l.child=i.child,l.flags|=128,l=null;else throw Error(r(558));else if(Tr||ju(i,l,f,!1),v=(f&i.childLanes)!==0,Tr||v){if(g=Un,g!==null&&(D=Jr(g,f),D!==0&&D!==T.retryLane))throw T.retryLane=D,kl(i,D),_a(g,i,D),A2;Kh(),l=Ww(i,l,f)}else i=T.treeContext,Yn=bs(D.nextSibling),$r=l,pn=!0,vo=null,ps=!1,i!==null&&O5(l,i),l=Bh(l,g),l.flags|=4096;return l}return i=Mi(i.child,{mode:g.mode,children:g.children}),i.ref=l.ref,l.child=i,i.return=l,i}function Fh(i,l){var f=l.ref;if(f===null)i!==null&&i.ref!==null&&(l.flags|=4194816);else{if(typeof f!="function"&&typeof f!="object")throw Error(r(284));(i===null||i.ref!==f)&&(l.flags|=4194816)}}function N2(i,l,f,g,v){return Rl(l),f=l2(i,l,f,g,void 0,v),g=u2(),i!==null&&!Tr?(c2(i,l,v),ji(i,l,v)):(pn&&g&&$g(l),l.flags|=1,Vr(i,l,f,v),l.child)}function Xw(i,l,f,g,v,T){return Rl(l),l.updateQueue=null,f=Z5(l,g,f,v),Q5(i),g=u2(),i!==null&&!Tr?(c2(i,l,T),ji(i,l,T)):(pn&&g&&$g(l),l.flags|=1,Vr(i,l,f,T),l.child)}function Kw(i,l,f,g,v){if(Rl(l),l.stateNode===null){var T=Iu,D=f.contextType;typeof D=="object"&&D!==null&&(T=qr(D)),T=new f(g,T),l.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,T.updater=C2,l.stateNode=T,T._reactInternals=l,T=l.stateNode,T.props=g,T.state=l.memoizedState,T.refs={},e2(l),D=f.contextType,T.context=typeof D=="object"&&D!==null?qr(D):Iu,T.state=l.memoizedState,D=f.getDerivedStateFromProps,typeof D=="function"&&(S2(l,f,D,g),T.state=l.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(D=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),D!==T.state&&C2.enqueueReplaceState(T,T.state,null),B0(l,g,T,v),z0(),T.state=l.memoizedState),typeof T.componentDidMount=="function"&&(l.flags|=4194308),g=!0}else if(i===null){T=l.stateNode;var q=l.memoizedProps,ne=Pl(f,q);T.props=ne;var ve=T.context,Ie=f.contextType;D=Iu,typeof Ie=="object"&&Ie!==null&&(D=qr(Ie));var je=f.getDerivedStateFromProps;Ie=typeof je=="function"||typeof T.getSnapshotBeforeUpdate=="function",q=l.pendingProps!==q,Ie||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(q||ve!==D)&&Pw(l,T,g,D),Eo=!1;var Te=l.memoizedState;T.state=Te,B0(l,g,T,v),z0(),ve=l.memoizedState,q||Te!==ve||Eo?(typeof je=="function"&&(S2(l,f,je,g),ve=l.memoizedState),(ne=Eo||Lw(l,f,ne,g,Te,ve,D))?(Ie||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(l.flags|=4194308)):(typeof T.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=g,l.memoizedState=ve),T.props=g,T.state=ve,T.context=D,g=ne):(typeof T.componentDidMount=="function"&&(l.flags|=4194308),g=!1)}else{T=l.stateNode,t2(i,l),D=l.memoizedProps,Ie=Pl(f,D),T.props=Ie,je=l.pendingProps,Te=T.context,ve=f.contextType,ne=Iu,typeof ve=="object"&&ve!==null&&(ne=qr(ve)),q=f.getDerivedStateFromProps,(ve=typeof q=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(D!==je||Te!==ne)&&Pw(l,T,g,ne),Eo=!1,Te=l.memoizedState,T.state=Te,B0(l,g,T,v),z0();var Ae=l.memoizedState;D!==je||Te!==Ae||Eo||i!==null&&i.dependencies!==null&&wh(i.dependencies)?(typeof q=="function"&&(S2(l,f,q,g),Ae=l.memoizedState),(Ie=Eo||Lw(l,f,Ie,g,Te,Ae,ne)||i!==null&&i.dependencies!==null&&wh(i.dependencies))?(ve||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(g,Ae,ne),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(g,Ae,ne)),typeof T.componentDidUpdate=="function"&&(l.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof T.componentDidUpdate!="function"||D===i.memoizedProps&&Te===i.memoizedState||(l.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&Te===i.memoizedState||(l.flags|=1024),l.memoizedProps=g,l.memoizedState=Ae),T.props=g,T.state=Ae,T.context=ne,g=Ie):(typeof T.componentDidUpdate!="function"||D===i.memoizedProps&&Te===i.memoizedState||(l.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&Te===i.memoizedState||(l.flags|=1024),g=!1)}return T=g,Fh(i,l),g=(l.flags&128)!==0,T||g?(T=l.stateNode,f=g&&typeof f.getDerivedStateFromError!="function"?null:T.render(),l.flags|=1,i!==null&&g?(l.child=Ol(l,i.child,null,v),l.child=Ol(l,null,f,v)):Vr(i,l,f,v),l.memoizedState=T.state,i=l.child):i=ji(i,l,v),i}function Qw(i,l,f,g){return Nl(),l.flags|=256,Vr(i,l,f,g),l.child}var _2={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function R2(i){return{baseLanes:i,cachePool:F5()}}function M2(i,l,f){return i=i!==null?i.childLanes&~f:0,l&&(i|=Qa),i}function Zw(i,l,f){var g=l.pendingProps,v=!1,T=(l.flags&128)!==0,D;if((D=T)||(D=i!==null&&i.memoizedState===null?!1:(pr.current&2)!==0),D&&(v=!0,l.flags&=-129),D=(l.flags&32)!==0,l.flags&=-33,i===null){if(pn){if(v?ko(l):Ao(),(i=Yn)?(i=iE(i,ps),i=i!==null&&i.data!=="&"?i:null,i!==null&&(l.memoizedState={dehydrated:i,treeContext:yo!==null?{id:Qs,overflow:Zs}:null,retryLane:536870912,hydrationErrors:null},f=M5(i),f.return=l,l.child=f,$r=l,Yn=null)):i=null,i===null)throw wo(l);return hb(i)?l.lanes=32:l.lanes=536870912,null}var q=g.children;return g=g.fallback,v?(Ao(),v=l.mode,q=Hh({mode:"hidden",children:q},v),g=Al(g,v,f,null),q.return=l,g.return=l,q.sibling=g,l.child=q,g=l.child,g.memoizedState=R2(f),g.childLanes=M2(i,D,f),l.memoizedState=_2,q0(null,g)):(ko(l),D2(l,q))}var ne=i.memoizedState;if(ne!==null&&(q=ne.dehydrated,q!==null)){if(T)l.flags&256?(ko(l),l.flags&=-257,l=I2(i,l,f)):l.memoizedState!==null?(Ao(),l.child=i.child,l.flags|=128,l=null):(Ao(),q=g.fallback,v=l.mode,g=Hh({mode:"visible",children:g.children},v),q=Al(q,v,f,null),q.flags|=2,g.return=l,q.return=l,g.sibling=q,l.child=g,Ol(l,i.child,null,f),g=l.child,g.memoizedState=R2(f),g.childLanes=M2(i,D,f),l.memoizedState=_2,l=q0(null,g));else if(ko(l),hb(q)){if(D=q.nextSibling&&q.nextSibling.dataset,D)var ve=D.dgst;D=ve,g=Error(r(419)),g.stack="",g.digest=D,D0({value:g,source:null,stack:null}),l=I2(i,l,f)}else if(Tr||ju(i,l,f,!1),D=(f&i.childLanes)!==0,Tr||D){if(D=Un,D!==null&&(g=Jr(D,f),g!==0&&g!==ne.retryLane))throw ne.retryLane=g,kl(i,g),_a(D,i,g),A2;fb(q)||Kh(),l=I2(i,l,f)}else fb(q)?(l.flags|=192,l.child=i.child,l=null):(i=ne.treeContext,Yn=bs(q.nextSibling),$r=l,pn=!0,vo=null,ps=!1,i!==null&&O5(l,i),l=D2(l,g.children),l.flags|=4096);return l}return v?(Ao(),q=g.fallback,v=l.mode,ne=i.child,ve=ne.sibling,g=Mi(ne,{mode:"hidden",children:g.children}),g.subtreeFlags=ne.subtreeFlags&65011712,ve!==null?q=Mi(ve,q):(q=Al(q,v,f,null),q.flags|=2),q.return=l,g.return=l,g.sibling=q,l.child=g,q0(null,g),g=l.child,q=i.child.memoizedState,q===null?q=R2(f):(v=q.cachePool,v!==null?(ne=vr._currentValue,v=v.parent!==ne?{parent:ne,pool:ne}:v):v=F5(),q={baseLanes:q.baseLanes|f,cachePool:v}),g.memoizedState=q,g.childLanes=M2(i,D,f),l.memoizedState=_2,q0(i.child,g)):(ko(l),f=i.child,i=f.sibling,f=Mi(f,{mode:"visible",children:g.children}),f.return=l,f.sibling=null,i!==null&&(D=l.deletions,D===null?(l.deletions=[i],l.flags|=16):D.push(i)),l.child=f,l.memoizedState=null,f)}function D2(i,l){return l=Hh({mode:"visible",children:l},i.mode),l.return=i,i.child=l}function Hh(i,l){return i=Ya(22,i,null,l),i.lanes=0,i}function I2(i,l,f){return Ol(l,i.child,null,f),i=D2(l,l.pendingProps.children),i.flags|=2,l.memoizedState=null,i}function Jw(i,l,f){i.lanes|=l;var g=i.alternate;g!==null&&(g.lanes|=l),Wg(i.return,l,f)}function O2(i,l,f,g,v,T){var D=i.memoizedState;D===null?i.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:g,tail:f,tailMode:v,treeForkCount:T}:(D.isBackwards=l,D.rendering=null,D.renderingStartTime=0,D.last=g,D.tail=f,D.tailMode=v,D.treeForkCount=T)}function eT(i,l,f){var g=l.pendingProps,v=g.revealOrder,T=g.tail;g=g.children;var D=pr.current,q=(D&2)!==0;if(q?(D=D&1|2,l.flags|=128):D&=1,L(pr,D),Vr(i,l,g,f),g=pn?M0:0,!q&&i!==null&&(i.flags&128)!==0)e:for(i=l.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Jw(i,f,l);else if(i.tag===19)Jw(i,f,l);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break e;for(;i.sibling===null;){if(i.return===null||i.return===l)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(v){case"forwards":for(f=l.child,v=null;f!==null;)i=f.alternate,i!==null&&_h(i)===null&&(v=f),f=f.sibling;f=v,f===null?(v=l.child,l.child=null):(v=f.sibling,f.sibling=null),O2(l,!1,v,f,T,g);break;case"backwards":case"unstable_legacy-backwards":for(f=null,v=l.child,l.child=null;v!==null;){if(i=v.alternate,i!==null&&_h(i)===null){l.child=v;break}i=v.sibling,v.sibling=f,f=v,v=i}O2(l,!0,f,null,T,g);break;case"together":O2(l,!1,null,null,void 0,g);break;default:l.memoizedState=null}return l.child}function ji(i,l,f){if(i!==null&&(l.dependencies=i.dependencies),Ro|=l.lanes,(f&l.childLanes)===0)if(i!==null){if(ju(i,l,f,!1),(f&l.childLanes)===0)return null}else return null;if(i!==null&&l.child!==i.child)throw Error(r(153));if(l.child!==null){for(i=l.child,f=Mi(i,i.pendingProps),l.child=f,f.return=l;i.sibling!==null;)i=i.sibling,f=f.sibling=Mi(i,i.pendingProps),f.return=l;f.sibling=null}return l.child}function L2(i,l){return(i.lanes&l)!==0?!0:(i=i.dependencies,!!(i!==null&&wh(i)))}function HB(i,l,f){switch(l.tag){case 3:fe(l,l.stateNode.containerInfo),To(l,vr,i.memoizedState.cache),Nl();break;case 27:case 5:at(l);break;case 4:fe(l,l.stateNode.containerInfo);break;case 10:To(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,i2(l),null;break;case 13:var g=l.memoizedState;if(g!==null)return g.dehydrated!==null?(ko(l),l.flags|=128,null):(f&l.child.childLanes)!==0?Zw(i,l,f):(ko(l),i=ji(i,l,f),i!==null?i.sibling:null);ko(l);break;case 19:var v=(i.flags&128)!==0;if(g=(f&l.childLanes)!==0,g||(ju(i,l,f,!1),g=(f&l.childLanes)!==0),v){if(g)return eT(i,l,f);l.flags|=128}if(v=l.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),L(pr,pr.current),g)break;return null;case 22:return l.lanes=0,Gw(i,l,f,l.pendingProps);case 24:To(l,vr,i.memoizedState.cache)}return ji(i,l,f)}function tT(i,l,f){if(i!==null)if(i.memoizedProps!==l.pendingProps)Tr=!0;else{if(!L2(i,f)&&(l.flags&128)===0)return Tr=!1,HB(i,l,f);Tr=(i.flags&131072)!==0}else Tr=!1,pn&&(l.flags&1048576)!==0&&I5(l,M0,l.index);switch(l.lanes=0,l.tag){case 16:e:{var g=l.pendingProps;if(i=Dl(l.elementType),l.type=i,typeof i=="function")Fg(i)?(g=Pl(i,g),l.tag=1,l=Kw(null,l,i,g,f)):(l.tag=0,l=N2(null,l,i,g,f));else{if(i!=null){var v=i.$$typeof;if(v===I){l.tag=11,l=$w(null,l,i,g,f);break e}else if(v===R){l.tag=14,l=qw(null,l,i,g,f);break e}}throw l=se(i)||i,Error(r(306,l,""))}}return l;case 0:return N2(i,l,l.type,l.pendingProps,f);case 1:return g=l.type,v=Pl(g,l.pendingProps),Kw(i,l,g,v,f);case 3:e:{if(fe(l,l.stateNode.containerInfo),i===null)throw Error(r(387));g=l.pendingProps;var T=l.memoizedState;v=T.element,t2(i,l),B0(l,g,null,f);var D=l.memoizedState;if(g=D.cache,To(l,vr,g),g!==T.cache&&Xg(l,[vr],f,!0),z0(),g=D.element,T.isDehydrated)if(T={element:g,isDehydrated:!1,cache:D.cache},l.updateQueue.baseState=T,l.memoizedState=T,l.flags&256){l=Qw(i,l,g,f);break e}else if(g!==v){v=fs(Error(r(424)),l),D0(v),l=Qw(i,l,g,f);break e}else for(i=l.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,Yn=bs(i.firstChild),$r=l,pn=!0,vo=null,ps=!0,f=G5(l,null,g,f),l.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(Nl(),g===v){l=ji(i,l,f);break e}Vr(i,l,g,f)}l=l.child}return l;case 26:return Fh(i,l),i===null?(f=fE(l.type,null,l.pendingProps,null))?l.memoizedState=f:pn||(f=l.type,i=l.pendingProps,g=rm(Se.current).createElement(f),g[Nr]=l,g[ea]=i,Gr(g,f,i),St(g),l.stateNode=g):l.memoizedState=fE(l.type,i.memoizedProps,l.pendingProps,i.memoizedState),null;case 27:return at(l),i===null&&pn&&(g=l.stateNode=uE(l.type,l.pendingProps,Se.current),$r=l,ps=!0,v=Yn,Lo(l.type)?(mb=v,Yn=bs(g.firstChild)):Yn=v),Vr(i,l,l.pendingProps.children,f),Fh(i,l),i===null&&(l.flags|=4194304),l.child;case 5:return i===null&&pn&&((v=g=Yn)&&(g=bF(g,l.type,l.pendingProps,ps),g!==null?(l.stateNode=g,$r=l,Yn=bs(g.firstChild),ps=!1,v=!0):v=!1),v||wo(l)),at(l),v=l.type,T=l.pendingProps,D=i!==null?i.memoizedProps:null,g=T.children,ub(v,T)?g=null:D!==null&&ub(v,D)&&(l.flags|=32),l.memoizedState!==null&&(v=l2(i,l,DB,null,null,f),sd._currentValue=v),Fh(i,l),Vr(i,l,g,f),l.child;case 6:return i===null&&pn&&((i=f=Yn)&&(f=xF(f,l.pendingProps,ps),f!==null?(l.stateNode=f,$r=l,Yn=null,i=!0):i=!1),i||wo(l)),null;case 13:return Zw(i,l,f);case 4:return fe(l,l.stateNode.containerInfo),g=l.pendingProps,i===null?l.child=Ol(l,null,g,f):Vr(i,l,g,f),l.child;case 11:return $w(i,l,l.type,l.pendingProps,f);case 7:return Vr(i,l,l.pendingProps,f),l.child;case 8:return Vr(i,l,l.pendingProps.children,f),l.child;case 12:return Vr(i,l,l.pendingProps.children,f),l.child;case 10:return g=l.pendingProps,To(l,l.type,g.value),Vr(i,l,g.children,f),l.child;case 9:return v=l.type._context,g=l.pendingProps.children,Rl(l),v=qr(v),g=g(v),l.flags|=1,Vr(i,l,g,f),l.child;case 14:return qw(i,l,l.type,l.pendingProps,f);case 15:return Vw(i,l,l.type,l.pendingProps,f);case 19:return eT(i,l,f);case 31:return FB(i,l,f);case 22:return Gw(i,l,f,l.pendingProps);case 24:return Rl(l),g=qr(vr),i===null?(v=Zg(),v===null&&(v=Un,T=Kg(),v.pooledCache=T,T.refCount++,T!==null&&(v.pooledCacheLanes|=f),v=T),l.memoizedState={parent:g,cache:v},e2(l),To(l,vr,v)):((i.lanes&f)!==0&&(t2(i,l),B0(l,null,null,f),z0()),v=i.memoizedState,T=l.memoizedState,v.parent!==g?(v={parent:g,cache:g},l.memoizedState=v,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=v),To(l,vr,g)):(g=T.cache,To(l,vr,g),g!==v.cache&&Xg(l,[vr],f,!0))),Vr(i,l,l.pendingProps.children,f),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function zi(i){i.flags|=4}function P2(i,l,f,g,v){if((l=(i.mode&32)!==0)&&(l=!1),l){if(i.flags|=16777216,(v&335544128)===v)if(i.stateNode.complete)i.flags|=8192;else if(NT())i.flags|=8192;else throw Il=Ch,Jg}else i.flags&=-16777217}function nT(i,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!bE(l))if(NT())i.flags|=8192;else throw Il=Ch,Jg}function Uh(i,l){l!==null&&(i.flags|=4),i.flags&16384&&(l=i.tag!==22?Zn():536870912,i.lanes|=l,Xu|=l)}function V0(i,l){if(!pn)switch(i.tailMode){case"hidden":l=i.tail;for(var f=null;l!==null;)l.alternate!==null&&(f=l),l=l.sibling;f===null?i.tail=null:f.sibling=null;break;case"collapsed":f=i.tail;for(var g=null;f!==null;)f.alternate!==null&&(g=f),f=f.sibling;g===null?l||i.tail===null?i.tail=null:i.tail.sibling=null:g.sibling=null}}function Wn(i){var l=i.alternate!==null&&i.alternate.child===i.child,f=0,g=0;if(l)for(var v=i.child;v!==null;)f|=v.lanes|v.childLanes,g|=v.subtreeFlags&65011712,g|=v.flags&65011712,v.return=i,v=v.sibling;else for(v=i.child;v!==null;)f|=v.lanes|v.childLanes,g|=v.subtreeFlags,g|=v.flags,v.return=i,v=v.sibling;return i.subtreeFlags|=g,i.childLanes=f,l}function UB(i,l,f){var g=l.pendingProps;switch(qg(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wn(l),null;case 1:return Wn(l),null;case 3:return f=l.stateNode,g=null,i!==null&&(g=i.memoizedState.cache),l.memoizedState.cache!==g&&(l.flags|=2048),Oi(vr),Ne(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(i===null||i.child===null)&&(Pu(l)?zi(l):i===null||i.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Gg())),Wn(l),null;case 26:var v=l.type,T=l.memoizedState;return i===null?(zi(l),T!==null?(Wn(l),nT(l,T)):(Wn(l),P2(l,v,null,g,f))):T?T!==i.memoizedState?(zi(l),Wn(l),nT(l,T)):(Wn(l),l.flags&=-16777217):(i=i.memoizedProps,i!==g&&zi(l),Wn(l),P2(l,v,i,g,f)),null;case 27:if(Ce(l),f=Se.current,v=l.type,i!==null&&l.stateNode!=null)i.memoizedProps!==g&&zi(l);else{if(!g){if(l.stateNode===null)throw Error(r(166));return Wn(l),null}i=ae.current,Pu(l)?L5(l):(i=uE(v,g,f),l.stateNode=i,zi(l))}return Wn(l),null;case 5:if(Ce(l),v=l.type,i!==null&&l.stateNode!=null)i.memoizedProps!==g&&zi(l);else{if(!g){if(l.stateNode===null)throw Error(r(166));return Wn(l),null}if(T=ae.current,Pu(l))L5(l);else{var D=rm(Se.current);switch(T){case 1:T=D.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:T=D.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":T=D.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":T=D.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":T=D.createElement("div"),T.innerHTML="<script><\/script>",T=T.removeChild(T.firstChild);break;case"select":T=typeof g.is=="string"?D.createElement("select",{is:g.is}):D.createElement("select"),g.multiple?T.multiple=!0:g.size&&(T.size=g.size);break;default:T=typeof g.is=="string"?D.createElement(v,{is:g.is}):D.createElement(v)}}T[Nr]=l,T[ea]=g;e:for(D=l.child;D!==null;){if(D.tag===5||D.tag===6)T.appendChild(D.stateNode);else if(D.tag!==4&&D.tag!==27&&D.child!==null){D.child.return=D,D=D.child;continue}if(D===l)break e;for(;D.sibling===null;){if(D.return===null||D.return===l)break e;D=D.return}D.sibling.return=D.return,D=D.sibling}l.stateNode=T;e:switch(Gr(T,v,g),v){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}g&&zi(l)}}return Wn(l),P2(l,l.type,i===null?null:i.memoizedProps,l.pendingProps,f),null;case 6:if(i&&l.stateNode!=null)i.memoizedProps!==g&&zi(l);else{if(typeof g!="string"&&l.stateNode===null)throw Error(r(166));if(i=Se.current,Pu(l)){if(i=l.stateNode,f=l.memoizedProps,g=null,v=$r,v!==null)switch(v.tag){case 27:case 5:g=v.memoizedProps}i[Nr]=l,i=!!(i.nodeValue===f||g!==null&&g.suppressHydrationWarning===!0||ZT(i.nodeValue,f)),i||wo(l,!0)}else i=rm(i).createTextNode(g),i[Nr]=l,l.stateNode=i}return Wn(l),null;case 31:if(f=l.memoizedState,i===null||i.memoizedState!==null){if(g=Pu(l),f!==null){if(i===null){if(!g)throw Error(r(318));if(i=l.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[Nr]=l}else Nl(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Wn(l),i=!1}else f=Gg(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=f),i=!0;if(!i)return l.flags&256?(Xa(l),l):(Xa(l),null);if((l.flags&128)!==0)throw Error(r(558))}return Wn(l),null;case 13:if(g=l.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(v=Pu(l),g!==null&&g.dehydrated!==null){if(i===null){if(!v)throw Error(r(318));if(v=l.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(r(317));v[Nr]=l}else Nl(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Wn(l),v=!1}else v=Gg(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=v),v=!0;if(!v)return l.flags&256?(Xa(l),l):(Xa(l),null)}return Xa(l),(l.flags&128)!==0?(l.lanes=f,l):(f=g!==null,i=i!==null&&i.memoizedState!==null,f&&(g=l.child,v=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(v=g.alternate.memoizedState.cachePool.pool),T=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(T=g.memoizedState.cachePool.pool),T!==v&&(g.flags|=2048)),f!==i&&f&&(l.child.flags|=8192),Uh(l,l.updateQueue),Wn(l),null);case 4:return Ne(),i===null&&ab(l.stateNode.containerInfo),Wn(l),null;case 10:return Oi(l.type),Wn(l),null;case 19:if(G(pr),g=l.memoizedState,g===null)return Wn(l),null;if(v=(l.flags&128)!==0,T=g.rendering,T===null)if(v)V0(g,!1);else{if(cr!==0||i!==null&&(i.flags&128)!==0)for(i=l.child;i!==null;){if(T=_h(i),T!==null){for(l.flags|=128,V0(g,!1),i=T.updateQueue,l.updateQueue=i,Uh(l,i),l.subtreeFlags=0,i=f,f=l.child;f!==null;)R5(f,i),f=f.sibling;return L(pr,pr.current&1|2),pn&&Di(l,g.treeForkCount),l.child}i=i.sibling}g.tail!==null&&Ht()>Yh&&(l.flags|=128,v=!0,V0(g,!1),l.lanes=4194304)}else{if(!v)if(i=_h(T),i!==null){if(l.flags|=128,v=!0,i=i.updateQueue,l.updateQueue=i,Uh(l,i),V0(g,!0),g.tail===null&&g.tailMode==="hidden"&&!T.alternate&&!pn)return Wn(l),null}else 2*Ht()-g.renderingStartTime>Yh&&f!==536870912&&(l.flags|=128,v=!0,V0(g,!1),l.lanes=4194304);g.isBackwards?(T.sibling=l.child,l.child=T):(i=g.last,i!==null?i.sibling=T:l.child=T,g.last=T)}return g.tail!==null?(i=g.tail,g.rendering=i,g.tail=i.sibling,g.renderingStartTime=Ht(),i.sibling=null,f=pr.current,L(pr,v?f&1|2:f&1),pn&&Di(l,g.treeForkCount),i):(Wn(l),null);case 22:case 23:return Xa(l),s2(),g=l.memoizedState!==null,i!==null?i.memoizedState!==null!==g&&(l.flags|=8192):g&&(l.flags|=8192),g?(f&536870912)!==0&&(l.flags&128)===0&&(Wn(l),l.subtreeFlags&6&&(l.flags|=8192)):Wn(l),f=l.updateQueue,f!==null&&Uh(l,f.retryQueue),f=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),g=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),g!==f&&(l.flags|=2048),i!==null&&G(Ml),null;case 24:return f=null,i!==null&&(f=i.memoizedState.cache),l.memoizedState.cache!==f&&(l.flags|=2048),Oi(vr),Wn(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function $B(i,l){switch(qg(l),l.tag){case 1:return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 3:return Oi(vr),Ne(),i=l.flags,(i&65536)!==0&&(i&128)===0?(l.flags=i&-65537|128,l):null;case 26:case 27:case 5:return Ce(l),null;case 31:if(l.memoizedState!==null){if(Xa(l),l.alternate===null)throw Error(r(340));Nl()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 13:if(Xa(l),i=l.memoizedState,i!==null&&i.dehydrated!==null){if(l.alternate===null)throw Error(r(340));Nl()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 19:return G(pr),null;case 4:return Ne(),null;case 10:return Oi(l.type),null;case 22:case 23:return Xa(l),s2(),i!==null&&G(Ml),i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 24:return Oi(vr),null;case 25:return null;default:return null}}function rT(i,l){switch(qg(l),l.tag){case 3:Oi(vr),Ne();break;case 26:case 27:case 5:Ce(l);break;case 4:Ne();break;case 31:l.memoizedState!==null&&Xa(l);break;case 13:Xa(l);break;case 19:G(pr);break;case 10:Oi(l.type);break;case 22:case 23:Xa(l),s2(),i!==null&&G(Ml);break;case 24:Oi(vr)}}function G0(i,l){try{var f=l.updateQueue,g=f!==null?f.lastEffect:null;if(g!==null){var v=g.next;f=v;do{if((f.tag&i)===i){g=void 0;var T=f.create,D=f.inst;g=T(),D.destroy=g}f=f.next}while(f!==v)}}catch(q){On(l,l.return,q)}}function No(i,l,f){try{var g=l.updateQueue,v=g!==null?g.lastEffect:null;if(v!==null){var T=v.next;g=T;do{if((g.tag&i)===i){var D=g.inst,q=D.destroy;if(q!==void 0){D.destroy=void 0,v=l;var ne=f,ve=q;try{ve()}catch(Ie){On(v,ne,Ie)}}}g=g.next}while(g!==T)}}catch(Ie){On(l,l.return,Ie)}}function aT(i){var l=i.updateQueue;if(l!==null){var f=i.stateNode;try{W5(l,f)}catch(g){On(i,i.return,g)}}}function sT(i,l,f){f.props=Pl(i.type,i.memoizedProps),f.state=i.memoizedState;try{f.componentWillUnmount()}catch(g){On(i,l,g)}}function Y0(i,l){try{var f=i.ref;if(f!==null){switch(i.tag){case 26:case 27:case 5:var g=i.stateNode;break;case 30:g=i.stateNode;break;default:g=i.stateNode}typeof f=="function"?i.refCleanup=f(g):f.current=g}}catch(v){On(i,l,v)}}function Js(i,l){var f=i.ref,g=i.refCleanup;if(f!==null)if(typeof g=="function")try{g()}catch(v){On(i,l,v)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof f=="function")try{f(null)}catch(v){On(i,l,v)}else f.current=null}function iT(i){var l=i.type,f=i.memoizedProps,g=i.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":f.autoFocus&&g.focus();break e;case"img":f.src?g.src=f.src:f.srcSet&&(g.srcset=f.srcSet)}}catch(v){On(i,i.return,v)}}function j2(i,l,f){try{var g=i.stateNode;dF(g,i.type,f,l),g[ea]=l}catch(v){On(i,i.return,v)}}function oT(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Lo(i.type)||i.tag===4}function z2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||oT(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Lo(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function B2(i,l,f){var g=i.tag;if(g===5||g===6)i=i.stateNode,l?(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f).insertBefore(i,l):(l=f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,l.appendChild(i),f=f._reactRootContainer,f!=null||l.onclick!==null||(l.onclick=_i));else if(g!==4&&(g===27&&Lo(i.type)&&(f=i.stateNode,l=null),i=i.child,i!==null))for(B2(i,l,f),i=i.sibling;i!==null;)B2(i,l,f),i=i.sibling}function $h(i,l,f){var g=i.tag;if(g===5||g===6)i=i.stateNode,l?f.insertBefore(i,l):f.appendChild(i);else if(g!==4&&(g===27&&Lo(i.type)&&(f=i.stateNode),i=i.child,i!==null))for($h(i,l,f),i=i.sibling;i!==null;)$h(i,l,f),i=i.sibling}function lT(i){var l=i.stateNode,f=i.memoizedProps;try{for(var g=i.type,v=l.attributes;v.length;)l.removeAttributeNode(v[0]);Gr(l,g,f),l[Nr]=i,l[ea]=f}catch(T){On(i,i.return,T)}}var Bi=!1,Er=!1,F2=!1,uT=typeof WeakSet=="function"?WeakSet:Set,jr=null;function qB(i,l){if(i=i.containerInfo,ob=cm,i=w5(i),Ig(i)){if("selectionStart"in i)var f={start:i.selectionStart,end:i.selectionEnd};else e:{f=(f=i.ownerDocument)&&f.defaultView||window;var g=f.getSelection&&f.getSelection();if(g&&g.rangeCount!==0){f=g.anchorNode;var v=g.anchorOffset,T=g.focusNode;g=g.focusOffset;try{f.nodeType,T.nodeType}catch{f=null;break e}var D=0,q=-1,ne=-1,ve=0,Ie=0,je=i,Te=null;t:for(;;){for(var Ae;je!==f||v!==0&&je.nodeType!==3||(q=D+v),je!==T||g!==0&&je.nodeType!==3||(ne=D+g),je.nodeType===3&&(D+=je.nodeValue.length),(Ae=je.firstChild)!==null;)Te=je,je=Ae;for(;;){if(je===i)break t;if(Te===f&&++ve===v&&(q=D),Te===T&&++Ie===g&&(ne=D),(Ae=je.nextSibling)!==null)break;je=Te,Te=je.parentNode}je=Ae}f=q===-1||ne===-1?null:{start:q,end:ne}}else f=null}f=f||{start:0,end:0}}else f=null;for(lb={focusedElem:i,selectionRange:f},cm=!1,jr=l;jr!==null;)if(l=jr,i=l.child,(l.subtreeFlags&1028)!==0&&i!==null)i.return=l,jr=i;else for(;jr!==null;){switch(l=jr,T=l.alternate,i=l.flags,l.tag){case 0:if((i&4)!==0&&(i=l.updateQueue,i=i!==null?i.events:null,i!==null))for(f=0;f<i.length;f++)v=i[f],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&T!==null){i=void 0,f=l,v=T.memoizedProps,T=T.memoizedState,g=f.stateNode;try{var mt=Pl(f.type,v);i=g.getSnapshotBeforeUpdate(mt,T),g.__reactInternalSnapshotBeforeUpdate=i}catch(Ot){On(f,f.return,Ot)}}break;case 3:if((i&1024)!==0){if(i=l.stateNode.containerInfo,f=i.nodeType,f===9)db(i);else if(f===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":db(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=l.sibling,i!==null){i.return=l.return,jr=i;break}jr=l.return}}function cT(i,l,f){var g=f.flags;switch(f.tag){case 0:case 11:case 15:Hi(i,f),g&4&&G0(5,f);break;case 1:if(Hi(i,f),g&4)if(i=f.stateNode,l===null)try{i.componentDidMount()}catch(D){On(f,f.return,D)}else{var v=Pl(f.type,l.memoizedProps);l=l.memoizedState;try{i.componentDidUpdate(v,l,i.__reactInternalSnapshotBeforeUpdate)}catch(D){On(f,f.return,D)}}g&64&&aT(f),g&512&&Y0(f,f.return);break;case 3:if(Hi(i,f),g&64&&(i=f.updateQueue,i!==null)){if(l=null,f.child!==null)switch(f.child.tag){case 27:case 5:l=f.child.stateNode;break;case 1:l=f.child.stateNode}try{W5(i,l)}catch(D){On(f,f.return,D)}}break;case 27:l===null&&g&4&&lT(f);case 26:case 5:Hi(i,f),l===null&&g&4&&iT(f),g&512&&Y0(f,f.return);break;case 12:Hi(i,f);break;case 31:Hi(i,f),g&4&&hT(i,f);break;case 13:Hi(i,f),g&4&&mT(i,f),g&64&&(i=f.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(f=JB.bind(null,f),yF(i,f))));break;case 22:if(g=f.memoizedState!==null||Bi,!g){l=l!==null&&l.memoizedState!==null||Er,v=Bi;var T=Er;Bi=g,(Er=l)&&!T?Ui(i,f,(f.subtreeFlags&8772)!==0):Hi(i,f),Bi=v,Er=T}break;case 30:break;default:Hi(i,f)}}function dT(i){var l=i.alternate;l!==null&&(i.alternate=null,dT(l)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(l=i.stateNode,l!==null&&rt(l)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var er=null,Ca=!1;function Fi(i,l,f){for(f=f.child;f!==null;)fT(i,l,f),f=f.sibling}function fT(i,l,f){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(Qe,f)}catch{}switch(f.tag){case 26:Er||Js(f,l),Fi(i,l,f),f.memoizedState?f.memoizedState.count--:f.stateNode&&(f=f.stateNode,f.parentNode.removeChild(f));break;case 27:Er||Js(f,l);var g=er,v=Ca;Lo(f.type)&&(er=f.stateNode,Ca=!1),Fi(i,l,f),nd(f.stateNode),er=g,Ca=v;break;case 5:Er||Js(f,l);case 6:if(g=er,v=Ca,er=null,Fi(i,l,f),er=g,Ca=v,er!==null)if(Ca)try{(er.nodeType===9?er.body:er.nodeName==="HTML"?er.ownerDocument.body:er).removeChild(f.stateNode)}catch(T){On(f,l,T)}else try{er.removeChild(f.stateNode)}catch(T){On(f,l,T)}break;case 18:er!==null&&(Ca?(i=er,aE(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,f.stateNode),rc(i)):aE(er,f.stateNode));break;case 4:g=er,v=Ca,er=f.stateNode.containerInfo,Ca=!0,Fi(i,l,f),er=g,Ca=v;break;case 0:case 11:case 14:case 15:No(2,f,l),Er||No(4,f,l),Fi(i,l,f);break;case 1:Er||(Js(f,l),g=f.stateNode,typeof g.componentWillUnmount=="function"&&sT(f,l,g)),Fi(i,l,f);break;case 21:Fi(i,l,f);break;case 22:Er=(g=Er)||f.memoizedState!==null,Fi(i,l,f),Er=g;break;default:Fi(i,l,f)}}function hT(i,l){if(l.memoizedState===null&&(i=l.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{rc(i)}catch(f){On(l,l.return,f)}}}function mT(i,l){if(l.memoizedState===null&&(i=l.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{rc(i)}catch(f){On(l,l.return,f)}}function VB(i){switch(i.tag){case 31:case 13:case 19:var l=i.stateNode;return l===null&&(l=i.stateNode=new uT),l;case 22:return i=i.stateNode,l=i._retryCache,l===null&&(l=i._retryCache=new uT),l;default:throw Error(r(435,i.tag))}}function qh(i,l){var f=VB(i);l.forEach(function(g){if(!f.has(g)){f.add(g);var v=eF.bind(null,i,g);g.then(v,v)}})}function ka(i,l){var f=l.deletions;if(f!==null)for(var g=0;g<f.length;g++){var v=f[g],T=i,D=l,q=D;e:for(;q!==null;){switch(q.tag){case 27:if(Lo(q.type)){er=q.stateNode,Ca=!1;break e}break;case 5:er=q.stateNode,Ca=!1;break e;case 3:case 4:er=q.stateNode.containerInfo,Ca=!0;break e}q=q.return}if(er===null)throw Error(r(160));fT(T,D,v),er=null,Ca=!1,T=v.alternate,T!==null&&(T.return=null),v.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)pT(l,i),l=l.sibling}var Os=null;function pT(i,l){var f=i.alternate,g=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:ka(l,i),Aa(i),g&4&&(No(3,i,i.return),G0(3,i),No(5,i,i.return));break;case 1:ka(l,i),Aa(i),g&512&&(Er||f===null||Js(f,f.return)),g&64&&Bi&&(i=i.updateQueue,i!==null&&(g=i.callbacks,g!==null&&(f=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=f===null?g:f.concat(g))));break;case 26:var v=Os;if(ka(l,i),Aa(i),g&512&&(Er||f===null||Js(f,f.return)),g&4){var T=f!==null?f.memoizedState:null;if(g=i.memoizedState,f===null)if(g===null)if(i.stateNode===null){e:{g=i.type,f=i.memoizedProps,v=v.ownerDocument||v;t:switch(g){case"title":T=v.getElementsByTagName("title")[0],(!T||T[ot]||T[Nr]||T.namespaceURI==="http://www.w3.org/2000/svg"||T.hasAttribute("itemprop"))&&(T=v.createElement(g),v.head.insertBefore(T,v.querySelector("head > title"))),Gr(T,g,f),T[Nr]=i,St(T),g=T;break e;case"link":var D=pE("link","href",v).get(g+(f.href||""));if(D){for(var q=0;q<D.length;q++)if(T=D[q],T.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&T.getAttribute("rel")===(f.rel==null?null:f.rel)&&T.getAttribute("title")===(f.title==null?null:f.title)&&T.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){D.splice(q,1);break t}}T=v.createElement(g),Gr(T,g,f),v.head.appendChild(T);break;case"meta":if(D=pE("meta","content",v).get(g+(f.content||""))){for(q=0;q<D.length;q++)if(T=D[q],T.getAttribute("content")===(f.content==null?null:""+f.content)&&T.getAttribute("name")===(f.name==null?null:f.name)&&T.getAttribute("property")===(f.property==null?null:f.property)&&T.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&T.getAttribute("charset")===(f.charSet==null?null:f.charSet)){D.splice(q,1);break t}}T=v.createElement(g),Gr(T,g,f),v.head.appendChild(T);break;default:throw Error(r(468,g))}T[Nr]=i,St(T),g=T}i.stateNode=g}else gE(v,i.type,i.stateNode);else i.stateNode=mE(v,g,i.memoizedProps);else T!==g?(T===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):T.count--,g===null?gE(v,i.type,i.stateNode):mE(v,g,i.memoizedProps)):g===null&&i.stateNode!==null&&j2(i,i.memoizedProps,f.memoizedProps)}break;case 27:ka(l,i),Aa(i),g&512&&(Er||f===null||Js(f,f.return)),f!==null&&g&4&&j2(i,i.memoizedProps,f.memoizedProps);break;case 5:if(ka(l,i),Aa(i),g&512&&(Er||f===null||Js(f,f.return)),i.flags&32){v=i.stateNode;try{ku(v,"")}catch(mt){On(i,i.return,mt)}}g&4&&i.stateNode!=null&&(v=i.memoizedProps,j2(i,v,f!==null?f.memoizedProps:v)),g&1024&&(F2=!0);break;case 6:if(ka(l,i),Aa(i),g&4){if(i.stateNode===null)throw Error(r(162));g=i.memoizedProps,f=i.stateNode;try{f.nodeValue=g}catch(mt){On(i,i.return,mt)}}break;case 3:if(im=null,v=Os,Os=am(l.containerInfo),ka(l,i),Os=v,Aa(i),g&4&&f!==null&&f.memoizedState.isDehydrated)try{rc(l.containerInfo)}catch(mt){On(i,i.return,mt)}F2&&(F2=!1,gT(i));break;case 4:g=Os,Os=am(i.stateNode.containerInfo),ka(l,i),Aa(i),Os=g;break;case 12:ka(l,i),Aa(i);break;case 31:ka(l,i),Aa(i),g&4&&(g=i.updateQueue,g!==null&&(i.updateQueue=null,qh(i,g)));break;case 13:ka(l,i),Aa(i),i.child.flags&8192&&i.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&(Gh=Ht()),g&4&&(g=i.updateQueue,g!==null&&(i.updateQueue=null,qh(i,g)));break;case 22:v=i.memoizedState!==null;var ne=f!==null&&f.memoizedState!==null,ve=Bi,Ie=Er;if(Bi=ve||v,Er=Ie||ne,ka(l,i),Er=Ie,Bi=ve,Aa(i),g&8192)e:for(l=i.stateNode,l._visibility=v?l._visibility&-2:l._visibility|1,v&&(f===null||ne||Bi||Er||jl(i)),f=null,l=i;;){if(l.tag===5||l.tag===26){if(f===null){ne=f=l;try{if(T=ne.stateNode,v)D=T.style,typeof D.setProperty=="function"?D.setProperty("display","none","important"):D.display="none";else{q=ne.stateNode;var je=ne.memoizedProps.style,Te=je!=null&&je.hasOwnProperty("display")?je.display:null;q.style.display=Te==null||typeof Te=="boolean"?"":(""+Te).trim()}}catch(mt){On(ne,ne.return,mt)}}}else if(l.tag===6){if(f===null){ne=l;try{ne.stateNode.nodeValue=v?"":ne.memoizedProps}catch(mt){On(ne,ne.return,mt)}}}else if(l.tag===18){if(f===null){ne=l;try{var Ae=ne.stateNode;v?sE(Ae,!0):sE(ne.stateNode,!1)}catch(mt){On(ne,ne.return,mt)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===i)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===i)break e;for(;l.sibling===null;){if(l.return===null||l.return===i)break e;f===l&&(f=null),l=l.return}f===l&&(f=null),l.sibling.return=l.return,l=l.sibling}g&4&&(g=i.updateQueue,g!==null&&(f=g.retryQueue,f!==null&&(g.retryQueue=null,qh(i,f))));break;case 19:ka(l,i),Aa(i),g&4&&(g=i.updateQueue,g!==null&&(i.updateQueue=null,qh(i,g)));break;case 30:break;case 21:break;default:ka(l,i),Aa(i)}}function Aa(i){var l=i.flags;if(l&2){try{for(var f,g=i.return;g!==null;){if(oT(g)){f=g;break}g=g.return}if(f==null)throw Error(r(160));switch(f.tag){case 27:var v=f.stateNode,T=z2(i);$h(i,T,v);break;case 5:var D=f.stateNode;f.flags&32&&(ku(D,""),f.flags&=-33);var q=z2(i);$h(i,q,D);break;case 3:case 4:var ne=f.stateNode.containerInfo,ve=z2(i);B2(i,ve,ne);break;default:throw Error(r(161))}}catch(Ie){On(i,i.return,Ie)}i.flags&=-3}l&4096&&(i.flags&=-4097)}function gT(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var l=i;gT(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),i=i.sibling}}function Hi(i,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)cT(i,l.alternate,l),l=l.sibling}function jl(i){for(i=i.child;i!==null;){var l=i;switch(l.tag){case 0:case 11:case 14:case 15:No(4,l,l.return),jl(l);break;case 1:Js(l,l.return);var f=l.stateNode;typeof f.componentWillUnmount=="function"&&sT(l,l.return,f),jl(l);break;case 27:nd(l.stateNode);case 26:case 5:Js(l,l.return),jl(l);break;case 22:l.memoizedState===null&&jl(l);break;case 30:jl(l);break;default:jl(l)}i=i.sibling}}function Ui(i,l,f){for(f=f&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var g=l.alternate,v=i,T=l,D=T.flags;switch(T.tag){case 0:case 11:case 15:Ui(v,T,f),G0(4,T);break;case 1:if(Ui(v,T,f),g=T,v=g.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(ve){On(g,g.return,ve)}if(g=T,v=g.updateQueue,v!==null){var q=g.stateNode;try{var ne=v.shared.hiddenCallbacks;if(ne!==null)for(v.shared.hiddenCallbacks=null,v=0;v<ne.length;v++)Y5(ne[v],q)}catch(ve){On(g,g.return,ve)}}f&&D&64&&aT(T),Y0(T,T.return);break;case 27:lT(T);case 26:case 5:Ui(v,T,f),f&&g===null&&D&4&&iT(T),Y0(T,T.return);break;case 12:Ui(v,T,f);break;case 31:Ui(v,T,f),f&&D&4&&hT(v,T);break;case 13:Ui(v,T,f),f&&D&4&&mT(v,T);break;case 22:T.memoizedState===null&&Ui(v,T,f),Y0(T,T.return);break;case 30:break;default:Ui(v,T,f)}l=l.sibling}}function H2(i,l){var f=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==f&&(i!=null&&i.refCount++,f!=null&&I0(f))}function U2(i,l){i=null,l.alternate!==null&&(i=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==i&&(l.refCount++,i!=null&&I0(i))}function Ls(i,l,f,g){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)bT(i,l,f,g),l=l.sibling}function bT(i,l,f,g){var v=l.flags;switch(l.tag){case 0:case 11:case 15:Ls(i,l,f,g),v&2048&&G0(9,l);break;case 1:Ls(i,l,f,g);break;case 3:Ls(i,l,f,g),v&2048&&(i=null,l.alternate!==null&&(i=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==i&&(l.refCount++,i!=null&&I0(i)));break;case 12:if(v&2048){Ls(i,l,f,g),i=l.stateNode;try{var T=l.memoizedProps,D=T.id,q=T.onPostCommit;typeof q=="function"&&q(D,l.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(ne){On(l,l.return,ne)}}else Ls(i,l,f,g);break;case 31:Ls(i,l,f,g);break;case 13:Ls(i,l,f,g);break;case 23:break;case 22:T=l.stateNode,D=l.alternate,l.memoizedState!==null?T._visibility&2?Ls(i,l,f,g):W0(i,l):T._visibility&2?Ls(i,l,f,g):(T._visibility|=2,Gu(i,l,f,g,(l.subtreeFlags&10256)!==0||!1)),v&2048&&H2(D,l);break;case 24:Ls(i,l,f,g),v&2048&&U2(l.alternate,l);break;default:Ls(i,l,f,g)}}function Gu(i,l,f,g,v){for(v=v&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var T=i,D=l,q=f,ne=g,ve=D.flags;switch(D.tag){case 0:case 11:case 15:Gu(T,D,q,ne,v),G0(8,D);break;case 23:break;case 22:var Ie=D.stateNode;D.memoizedState!==null?Ie._visibility&2?Gu(T,D,q,ne,v):W0(T,D):(Ie._visibility|=2,Gu(T,D,q,ne,v)),v&&ve&2048&&H2(D.alternate,D);break;case 24:Gu(T,D,q,ne,v),v&&ve&2048&&U2(D.alternate,D);break;default:Gu(T,D,q,ne,v)}l=l.sibling}}function W0(i,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var f=i,g=l,v=g.flags;switch(g.tag){case 22:W0(f,g),v&2048&&H2(g.alternate,g);break;case 24:W0(f,g),v&2048&&U2(g.alternate,g);break;default:W0(f,g)}l=l.sibling}}var X0=8192;function Yu(i,l,f){if(i.subtreeFlags&X0)for(i=i.child;i!==null;)xT(i,l,f),i=i.sibling}function xT(i,l,f){switch(i.tag){case 26:Yu(i,l,f),i.flags&X0&&i.memoizedState!==null&&MF(f,Os,i.memoizedState,i.memoizedProps);break;case 5:Yu(i,l,f);break;case 3:case 4:var g=Os;Os=am(i.stateNode.containerInfo),Yu(i,l,f),Os=g;break;case 22:i.memoizedState===null&&(g=i.alternate,g!==null&&g.memoizedState!==null?(g=X0,X0=16777216,Yu(i,l,f),X0=g):Yu(i,l,f));break;default:Yu(i,l,f)}}function yT(i){var l=i.alternate;if(l!==null&&(i=l.child,i!==null)){l.child=null;do l=i.sibling,i.sibling=null,i=l;while(i!==null)}}function K0(i){var l=i.deletions;if((i.flags&16)!==0){if(l!==null)for(var f=0;f<l.length;f++){var g=l[f];jr=g,wT(g,i)}yT(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)vT(i),i=i.sibling}function vT(i){switch(i.tag){case 0:case 11:case 15:K0(i),i.flags&2048&&No(9,i,i.return);break;case 3:K0(i);break;case 12:K0(i);break;case 22:var l=i.stateNode;i.memoizedState!==null&&l._visibility&2&&(i.return===null||i.return.tag!==13)?(l._visibility&=-3,Vh(i)):K0(i);break;default:K0(i)}}function Vh(i){var l=i.deletions;if((i.flags&16)!==0){if(l!==null)for(var f=0;f<l.length;f++){var g=l[f];jr=g,wT(g,i)}yT(i)}for(i=i.child;i!==null;){switch(l=i,l.tag){case 0:case 11:case 15:No(8,l,l.return),Vh(l);break;case 22:f=l.stateNode,f._visibility&2&&(f._visibility&=-3,Vh(l));break;default:Vh(l)}i=i.sibling}}function wT(i,l){for(;jr!==null;){var f=jr;switch(f.tag){case 0:case 11:case 15:No(8,f,l);break;case 23:case 22:if(f.memoizedState!==null&&f.memoizedState.cachePool!==null){var g=f.memoizedState.cachePool.pool;g!=null&&g.refCount++}break;case 24:I0(f.memoizedState.cache)}if(g=f.child,g!==null)g.return=f,jr=g;else e:for(f=i;jr!==null;){g=jr;var v=g.sibling,T=g.return;if(dT(g),g===f){jr=null;break e}if(v!==null){v.return=T,jr=v;break e}jr=T}}}var GB={getCacheForType:function(i){var l=qr(vr),f=l.data.get(i);return f===void 0&&(f=i(),l.data.set(i,f)),f},cacheSignal:function(){return qr(vr).controller.signal}},YB=typeof WeakMap=="function"?WeakMap:Map,_n=0,Un=null,un=null,fn=0,In=0,Ka=null,_o=!1,Wu=!1,$2=!1,$i=0,cr=0,Ro=0,zl=0,q2=0,Qa=0,Xu=0,Q0=null,Na=null,V2=!1,Gh=0,TT=0,Yh=1/0,Wh=null,Mo=null,_r=0,Do=null,Ku=null,qi=0,G2=0,Y2=null,ET=null,Z0=0,W2=null;function Za(){return(_n&2)!==0&&fn!==0?fn&-fn:$.T!==null?eb():x0()}function ST(){if(Qa===0)if((fn&536870912)===0||pn){var i=tt;tt<<=1,(tt&3932160)===0&&(tt=262144),Qa=i}else Qa=536870912;return i=Wa.current,i!==null&&(i.flags|=32),Qa}function _a(i,l,f){(i===Un&&(In===2||In===9)||i.cancelPendingCommit!==null)&&(Qu(i,0),Io(i,fn,Qa,!1)),Ln(i,f),((_n&2)===0||i!==Un)&&(i===Un&&((_n&2)===0&&(zl|=f),cr===4&&Io(i,fn,Qa,!1)),ei(i))}function CT(i,l,f){if((_n&6)!==0)throw Error(r(327));var g=!f&&(l&127)===0&&(l&i.expiredLanes)===0||Vt(i,l),v=g?KB(i,l):K2(i,l,!0),T=g;do{if(v===0){Wu&&!g&&Io(i,l,0,!1);break}else{if(f=i.current.alternate,T&&!WB(f)){v=K2(i,l,!1),T=!1;continue}if(v===2){if(T=l,i.errorRecoveryDisabledLanes&T)var D=0;else D=i.pendingLanes&-536870913,D=D!==0?D:D&536870912?536870912:0;if(D!==0){l=D;e:{var q=i;v=Q0;var ne=q.current.memoizedState.isDehydrated;if(ne&&(Qu(q,D).flags|=256),D=K2(q,D,!1),D!==2){if($2&&!ne){q.errorRecoveryDisabledLanes|=T,zl|=T,v=4;break e}T=Na,Na=v,T!==null&&(Na===null?Na=T:Na.push.apply(Na,T))}v=D}if(T=!1,v!==2)continue}}if(v===1){Qu(i,0),Io(i,l,0,!0);break}e:{switch(g=i,T=v,T){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:Io(g,l,Qa,!_o);break e;case 2:Na=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(v=Gh+300-Ht(),10<v)){if(Io(g,l,Qa,!_o),Je(g,0,!0)!==0)break e;qi=l,g.timeoutHandle=nE(kT.bind(null,g,f,Na,Wh,V2,l,Qa,zl,Xu,_o,T,"Throttled",-0,0),v);break e}kT(g,f,Na,Wh,V2,l,Qa,zl,Xu,_o,T,null,-0,0)}}break}while(!0);ei(i)}function kT(i,l,f,g,v,T,D,q,ne,ve,Ie,je,Te,Ae){if(i.timeoutHandle=-1,je=l.subtreeFlags,je&8192||(je&16785408)===16785408){je={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_i},xT(l,T,je);var mt=(T&62914560)===T?Gh-Ht():(T&4194048)===T?TT-Ht():0;if(mt=DF(je,mt),mt!==null){qi=T,i.cancelPendingCommit=mt(OT.bind(null,i,l,T,f,g,v,D,q,ne,Ie,je,null,Te,Ae)),Io(i,T,D,!ve);return}}OT(i,l,T,f,g,v,D,q,ne)}function WB(i){for(var l=i;;){var f=l.tag;if((f===0||f===11||f===15)&&l.flags&16384&&(f=l.updateQueue,f!==null&&(f=f.stores,f!==null)))for(var g=0;g<f.length;g++){var v=f[g],T=v.getSnapshot;v=v.value;try{if(!Ga(T(),v))return!1}catch{return!1}}if(f=l.child,l.subtreeFlags&16384&&f!==null)f.return=l,l=f;else{if(l===i)break;for(;l.sibling===null;){if(l.return===null||l.return===i)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function Io(i,l,f,g){l&=~q2,l&=~zl,i.suspendedLanes|=l,i.pingedLanes&=~l,g&&(i.warmLanes|=l),g=i.expirationTimes;for(var v=l;0<v;){var T=31-an(v),D=1<<T;g[T]=-1,v&=~D}f!==0&&Xs(i,f,l)}function Xh(){return(_n&6)===0?(J0(0),!1):!0}function X2(){if(un!==null){if(In===0)var i=un.return;else i=un,Ii=_l=null,d2(i),Hu=null,L0=0,i=un;for(;i!==null;)rT(i.alternate,i),i=i.return;un=null}}function Qu(i,l){var f=i.timeoutHandle;f!==-1&&(i.timeoutHandle=-1,mF(f)),f=i.cancelPendingCommit,f!==null&&(i.cancelPendingCommit=null,f()),qi=0,X2(),Un=i,un=f=Mi(i.current,null),fn=l,In=0,Ka=null,_o=!1,Wu=Vt(i,l),$2=!1,Xu=Qa=q2=zl=Ro=cr=0,Na=Q0=null,V2=!1,(l&8)!==0&&(l|=l&32);var g=i.entangledLanes;if(g!==0)for(i=i.entanglements,g&=l;0<g;){var v=31-an(g),T=1<<v;l|=i[v],g&=~T}return $i=l,gh(),f}function AT(i,l){Wt=null,$.H=$0,l===Fu||l===Sh?(l=$5(),In=3):l===Jg?(l=$5(),In=4):In=l===A2?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Ka=l,un===null&&(cr=1,zh(i,fs(l,i.current)))}function NT(){var i=Wa.current;return i===null?!0:(fn&4194048)===fn?gs===null:(fn&62914560)===fn||(fn&536870912)!==0?i===gs:!1}function _T(){var i=$.H;return $.H=$0,i===null?$0:i}function RT(){var i=$.A;return $.A=GB,i}function Kh(){cr=4,_o||(fn&4194048)!==fn&&Wa.current!==null||(Wu=!0),(Ro&134217727)===0&&(zl&134217727)===0||Un===null||Io(Un,fn,Qa,!1)}function K2(i,l,f){var g=_n;_n|=2;var v=_T(),T=RT();(Un!==i||fn!==l)&&(Wh=null,Qu(i,l)),l=!1;var D=cr;e:do try{if(In!==0&&un!==null){var q=un,ne=Ka;switch(In){case 8:X2(),D=6;break e;case 3:case 2:case 9:case 6:Wa.current===null&&(l=!0);var ve=In;if(In=0,Ka=null,Zu(i,q,ne,ve),f&&Wu){D=0;break e}break;default:ve=In,In=0,Ka=null,Zu(i,q,ne,ve)}}XB(),D=cr;break}catch(Ie){AT(i,Ie)}while(!0);return l&&i.shellSuspendCounter++,Ii=_l=null,_n=g,$.H=v,$.A=T,un===null&&(Un=null,fn=0,gh()),D}function XB(){for(;un!==null;)MT(un)}function KB(i,l){var f=_n;_n|=2;var g=_T(),v=RT();Un!==i||fn!==l?(Wh=null,Yh=Ht()+500,Qu(i,l)):Wu=Vt(i,l);e:do try{if(In!==0&&un!==null){l=un;var T=Ka;t:switch(In){case 1:In=0,Ka=null,Zu(i,l,T,1);break;case 2:case 9:if(H5(T)){In=0,Ka=null,DT(l);break}l=function(){In!==2&&In!==9||Un!==i||(In=7),ei(i)},T.then(l,l);break e;case 3:In=7;break e;case 4:In=5;break e;case 7:H5(T)?(In=0,Ka=null,DT(l)):(In=0,Ka=null,Zu(i,l,T,7));break;case 5:var D=null;switch(un.tag){case 26:D=un.memoizedState;case 5:case 27:var q=un;if(D?bE(D):q.stateNode.complete){In=0,Ka=null;var ne=q.sibling;if(ne!==null)un=ne;else{var ve=q.return;ve!==null?(un=ve,Qh(ve)):un=null}break t}}In=0,Ka=null,Zu(i,l,T,5);break;case 6:In=0,Ka=null,Zu(i,l,T,6);break;case 8:X2(),cr=6;break e;default:throw Error(r(462))}}QB();break}catch(Ie){AT(i,Ie)}while(!0);return Ii=_l=null,$.H=g,$.A=v,_n=f,un!==null?0:(Un=null,fn=0,gh(),cr)}function QB(){for(;un!==null&&!Nt();)MT(un)}function MT(i){var l=tT(i.alternate,i,$i);i.memoizedProps=i.pendingProps,l===null?Qh(i):un=l}function DT(i){var l=i,f=l.alternate;switch(l.tag){case 15:case 0:l=Xw(f,l,l.pendingProps,l.type,void 0,fn);break;case 11:l=Xw(f,l,l.pendingProps,l.type.render,l.ref,fn);break;case 5:d2(l);default:rT(f,l),l=un=R5(l,$i),l=tT(f,l,$i)}i.memoizedProps=i.pendingProps,l===null?Qh(i):un=l}function Zu(i,l,f,g){Ii=_l=null,d2(l),Hu=null,L0=0;var v=l.return;try{if(BB(i,v,l,f,fn)){cr=1,zh(i,fs(f,i.current)),un=null;return}}catch(T){if(v!==null)throw un=v,T;cr=1,zh(i,fs(f,i.current)),un=null;return}l.flags&32768?(pn||g===1?i=!0:Wu||(fn&536870912)!==0?i=!1:(_o=i=!0,(g===2||g===9||g===3||g===6)&&(g=Wa.current,g!==null&&g.tag===13&&(g.flags|=16384))),IT(l,i)):Qh(l)}function Qh(i){var l=i;do{if((l.flags&32768)!==0){IT(l,_o);return}i=l.return;var f=UB(l.alternate,l,$i);if(f!==null){un=f;return}if(l=l.sibling,l!==null){un=l;return}un=l=i}while(l!==null);cr===0&&(cr=5)}function IT(i,l){do{var f=$B(i.alternate,i);if(f!==null){f.flags&=32767,un=f;return}if(f=i.return,f!==null&&(f.flags|=32768,f.subtreeFlags=0,f.deletions=null),!l&&(i=i.sibling,i!==null)){un=i;return}un=i=f}while(i!==null);cr=6,un=null}function OT(i,l,f,g,v,T,D,q,ne){i.cancelPendingCommit=null;do Zh();while(_r!==0);if((_n&6)!==0)throw Error(r(327));if(l!==null){if(l===i.current)throw Error(r(177));if(T=l.lanes|l.childLanes,T|=zg,Ur(i,f,T,D,q,ne),i===Un&&(un=Un=null,fn=0),Ku=l,Do=i,qi=f,G2=T,Y2=v,ET=g,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,tF(xt,function(){return BT(),null})):(i.callbackNode=null,i.callbackPriority=0),g=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||g){g=$.T,$.T=null,v=K.p,K.p=2,D=_n,_n|=4;try{qB(i,l,f)}finally{_n=D,K.p=v,$.T=g}}_r=1,LT(),PT(),jT()}}function LT(){if(_r===1){_r=0;var i=Do,l=Ku,f=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||f){f=$.T,$.T=null;var g=K.p;K.p=2;var v=_n;_n|=4;try{pT(l,i);var T=lb,D=w5(i.containerInfo),q=T.focusedElem,ne=T.selectionRange;if(D!==q&&q&&q.ownerDocument&&v5(q.ownerDocument.documentElement,q)){if(ne!==null&&Ig(q)){var ve=ne.start,Ie=ne.end;if(Ie===void 0&&(Ie=ve),"selectionStart"in q)q.selectionStart=ve,q.selectionEnd=Math.min(Ie,q.value.length);else{var je=q.ownerDocument||document,Te=je&&je.defaultView||window;if(Te.getSelection){var Ae=Te.getSelection(),mt=q.textContent.length,Ot=Math.min(ne.start,mt),zn=ne.end===void 0?Ot:Math.min(ne.end,mt);!Ae.extend&&Ot>zn&&(D=zn,zn=Ot,Ot=D);var he=y5(q,Ot),ue=y5(q,zn);if(he&&ue&&(Ae.rangeCount!==1||Ae.anchorNode!==he.node||Ae.anchorOffset!==he.offset||Ae.focusNode!==ue.node||Ae.focusOffset!==ue.offset)){var xe=je.createRange();xe.setStart(he.node,he.offset),Ae.removeAllRanges(),Ot>zn?(Ae.addRange(xe),Ae.extend(ue.node,ue.offset)):(xe.setEnd(ue.node,ue.offset),Ae.addRange(xe))}}}}for(je=[],Ae=q;Ae=Ae.parentNode;)Ae.nodeType===1&&je.push({element:Ae,left:Ae.scrollLeft,top:Ae.scrollTop});for(typeof q.focus=="function"&&q.focus(),q=0;q<je.length;q++){var Le=je[q];Le.element.scrollLeft=Le.left,Le.element.scrollTop=Le.top}}cm=!!ob,lb=ob=null}finally{_n=v,K.p=g,$.T=f}}i.current=l,_r=2}}function PT(){if(_r===2){_r=0;var i=Do,l=Ku,f=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||f){f=$.T,$.T=null;var g=K.p;K.p=2;var v=_n;_n|=4;try{cT(i,l.alternate,l)}finally{_n=v,K.p=g,$.T=f}}_r=3}}function jT(){if(_r===4||_r===3){_r=0,qt();var i=Do,l=Ku,f=qi,g=ET;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?_r=5:(_r=0,Ku=Do=null,zT(i,i.pendingLanes));var v=i.pendingLanes;if(v===0&&(Mo=null),Lr(f),l=l.stateNode,_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(Qe,l,void 0,(l.current.flags&128)===128)}catch{}if(g!==null){l=$.T,v=K.p,K.p=2,$.T=null;try{for(var T=i.onRecoverableError,D=0;D<g.length;D++){var q=g[D];T(q.value,{componentStack:q.stack})}}finally{$.T=l,K.p=v}}(qi&3)!==0&&Zh(),ei(i),v=i.pendingLanes,(f&261930)!==0&&(v&42)!==0?i===W2?Z0++:(Z0=0,W2=i):Z0=0,J0(0)}}function zT(i,l){(i.pooledCacheLanes&=l)===0&&(l=i.pooledCache,l!=null&&(i.pooledCache=null,I0(l)))}function Zh(){return LT(),PT(),jT(),BT()}function BT(){if(_r!==5)return!1;var i=Do,l=G2;G2=0;var f=Lr(qi),g=$.T,v=K.p;try{K.p=32>f?32:f,$.T=null,f=Y2,Y2=null;var T=Do,D=qi;if(_r=0,Ku=Do=null,qi=0,(_n&6)!==0)throw Error(r(331));var q=_n;if(_n|=4,vT(T.current),bT(T,T.current,D,f),_n=q,J0(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(Qe,T)}catch{}return!0}finally{K.p=v,$.T=g,zT(i,l)}}function FT(i,l,f){l=fs(f,l),l=k2(i.stateNode,l,2),i=Co(i,l,2),i!==null&&(Ln(i,2),ei(i))}function On(i,l,f){if(i.tag===3)FT(i,i,f);else for(;l!==null;){if(l.tag===3){FT(l,i,f);break}else if(l.tag===1){var g=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(Mo===null||!Mo.has(g))){i=fs(f,i),f=Hw(2),g=Co(l,f,2),g!==null&&(Uw(f,g,l,i),Ln(g,2),ei(g));break}}l=l.return}}function Q2(i,l,f){var g=i.pingCache;if(g===null){g=i.pingCache=new YB;var v=new Set;g.set(l,v)}else v=g.get(l),v===void 0&&(v=new Set,g.set(l,v));v.has(f)||($2=!0,v.add(f),i=ZB.bind(null,i,l,f),l.then(i,i))}function ZB(i,l,f){var g=i.pingCache;g!==null&&g.delete(l),i.pingedLanes|=i.suspendedLanes&f,i.warmLanes&=~f,Un===i&&(fn&f)===f&&(cr===4||cr===3&&(fn&62914560)===fn&&300>Ht()-Gh?(_n&2)===0&&Qu(i,0):q2|=f,Xu===fn&&(Xu=0)),ei(i)}function HT(i,l){l===0&&(l=Zn()),i=kl(i,l),i!==null&&(Ln(i,l),ei(i))}function JB(i){var l=i.memoizedState,f=0;l!==null&&(f=l.retryLane),HT(i,f)}function eF(i,l){var f=0;switch(i.tag){case 31:case 13:var g=i.stateNode,v=i.memoizedState;v!==null&&(f=v.retryLane);break;case 19:g=i.stateNode;break;case 22:g=i.stateNode._retryCache;break;default:throw Error(r(314))}g!==null&&g.delete(l),HT(i,f)}function tF(i,l){return st(i,l)}var Jh=null,Ju=null,Z2=!1,em=!1,J2=!1,Oo=0;function ei(i){i!==Ju&&i.next===null&&(Ju===null?Jh=Ju=i:Ju=Ju.next=i),em=!0,Z2||(Z2=!0,rF())}function J0(i,l){if(!J2&&em){J2=!0;do for(var f=!1,g=Jh;g!==null;){if(i!==0){var v=g.pendingLanes;if(v===0)var T=0;else{var D=g.suspendedLanes,q=g.pingedLanes;T=(1<<31-an(42|i)+1)-1,T&=v&~(D&~q),T=T&201326741?T&201326741|1:T?T|2:0}T!==0&&(f=!0,VT(g,T))}else T=fn,T=Je(g,g===Un?T:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(T&3)===0||Vt(g,T)||(f=!0,VT(g,T));g=g.next}while(f);J2=!1}}function nF(){UT()}function UT(){em=Z2=!1;var i=0;Oo!==0&&hF()&&(i=Oo);for(var l=Ht(),f=null,g=Jh;g!==null;){var v=g.next,T=$T(g,l);T===0?(g.next=null,f===null?Jh=v:f.next=v,v===null&&(Ju=f)):(f=g,(i!==0||(T&3)!==0)&&(em=!0)),g=v}_r!==0&&_r!==5||J0(i),Oo!==0&&(Oo=0)}function $T(i,l){for(var f=i.suspendedLanes,g=i.pingedLanes,v=i.expirationTimes,T=i.pendingLanes&-62914561;0<T;){var D=31-an(T),q=1<<D,ne=v[D];ne===-1?((q&f)===0||(q&g)!==0)&&(v[D]=nn(q,l)):ne<=l&&(i.expiredLanes|=q),T&=~q}if(l=Un,f=fn,f=Je(i,i===l?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),g=i.callbackNode,f===0||i===l&&(In===2||In===9)||i.cancelPendingCommit!==null)return g!==null&&g!==null&&Ft(g),i.callbackNode=null,i.callbackPriority=0;if((f&3)===0||Vt(i,f)){if(l=f&-f,l===i.callbackPriority)return l;switch(g!==null&&Ft(g),Lr(f)){case 2:case 8:f=Be;break;case 32:f=xt;break;case 268435456:f=Ze;break;default:f=xt}return g=qT.bind(null,i),f=st(f,g),i.callbackPriority=l,i.callbackNode=f,l}return g!==null&&g!==null&&Ft(g),i.callbackPriority=2,i.callbackNode=null,2}function qT(i,l){if(_r!==0&&_r!==5)return i.callbackNode=null,i.callbackPriority=0,null;var f=i.callbackNode;if(Zh()&&i.callbackNode!==f)return null;var g=fn;return g=Je(i,i===Un?g:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),g===0?null:(CT(i,g,l),$T(i,Ht()),i.callbackNode!=null&&i.callbackNode===f?qT.bind(null,i):null)}function VT(i,l){if(Zh())return null;CT(i,l,!0)}function rF(){pF(function(){(_n&6)!==0?st(ke,nF):UT()})}function eb(){if(Oo===0){var i=zu;i===0&&(i=$e,$e<<=1,($e&261888)===0&&($e=256)),Oo=i}return Oo}function GT(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:lh(""+i)}function YT(i,l){var f=l.ownerDocument.createElement("input");return f.name=l.name,f.value=l.value,i.id&&f.setAttribute("form",i.id),l.parentNode.insertBefore(f,l),i=new FormData(i),f.parentNode.removeChild(f),i}function aF(i,l,f,g,v){if(l==="submit"&&f&&f.stateNode===v){var T=GT((v[ea]||null).action),D=g.submitter;D&&(l=(l=D[ea]||null)?GT(l.formAction):D.getAttribute("formAction"),l!==null&&(T=l,D=null));var q=new fh("action","action",null,g,v);i.push({event:q,listeners:[{instance:null,listener:function(){if(g.defaultPrevented){if(Oo!==0){var ne=D?YT(v,D):new FormData(v);v2(f,{pending:!0,data:ne,method:v.method,action:T},null,ne)}}else typeof T=="function"&&(q.preventDefault(),ne=D?YT(v,D):new FormData(v),v2(f,{pending:!0,data:ne,method:v.method,action:T},T,ne))},currentTarget:v}]})}}for(var tb=0;tb<jg.length;tb++){var nb=jg[tb],sF=nb.toLowerCase(),iF=nb[0].toUpperCase()+nb.slice(1);Is(sF,"on"+iF)}Is(S5,"onAnimationEnd"),Is(C5,"onAnimationIteration"),Is(k5,"onAnimationStart"),Is("dblclick","onDoubleClick"),Is("focusin","onFocus"),Is("focusout","onBlur"),Is(TB,"onTransitionRun"),Is(EB,"onTransitionStart"),Is(SB,"onTransitionCancel"),Is(A5,"onTransitionEnd"),Pr("onMouseEnter",["mouseout","mouseover"]),Pr("onMouseLeave",["mouseout","mouseover"]),Pr("onPointerEnter",["pointerout","pointerover"]),Pr("onPointerLeave",["pointerout","pointerover"]),Xt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ed="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),oF=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ed));function WT(i,l){l=(l&4)!==0;for(var f=0;f<i.length;f++){var g=i[f],v=g.event;g=g.listeners;e:{var T=void 0;if(l)for(var D=g.length-1;0<=D;D--){var q=g[D],ne=q.instance,ve=q.currentTarget;if(q=q.listener,ne!==T&&v.isPropagationStopped())break e;T=q,v.currentTarget=ve;try{T(v)}catch(Ie){ph(Ie)}v.currentTarget=null,T=ne}else for(D=0;D<g.length;D++){if(q=g[D],ne=q.instance,ve=q.currentTarget,q=q.listener,ne!==T&&v.isPropagationStopped())break e;T=q,v.currentTarget=ve;try{T(v)}catch(Ie){ph(Ie)}v.currentTarget=null,T=ne}}}}function cn(i,l){var f=l[Me];f===void 0&&(f=l[Me]=new Set);var g=i+"__bubble";f.has(g)||(XT(l,i,2,!1),f.add(g))}function rb(i,l,f){var g=0;l&&(g|=4),XT(f,i,g,l)}var tm="_reactListening"+Math.random().toString(36).slice(2);function ab(i){if(!i[tm]){i[tm]=!0,Lt.forEach(function(f){f!=="selectionchange"&&(oF.has(f)||rb(f,!1,i),rb(f,!0,i))});var l=i.nodeType===9?i:i.ownerDocument;l===null||l[tm]||(l[tm]=!0,rb("selectionchange",!1,l))}}function XT(i,l,f,g){switch(SE(l)){case 2:var v=LF;break;case 8:v=PF;break;default:v=yb}f=v.bind(null,l,f,i),v=void 0,!Sg||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(v=!0),g?v!==void 0?i.addEventListener(l,f,{capture:!0,passive:v}):i.addEventListener(l,f,!0):v!==void 0?i.addEventListener(l,f,{passive:v}):i.addEventListener(l,f,!1)}function sb(i,l,f,g,v){var T=g;if((l&1)===0&&(l&2)===0&&g!==null)e:for(;;){if(g===null)return;var D=g.tag;if(D===3||D===4){var q=g.stateNode.containerInfo;if(q===v)break;if(D===4)for(D=g.return;D!==null;){var ne=D.tag;if((ne===3||ne===4)&&D.stateNode.containerInfo===v)return;D=D.return}for(;q!==null;){if(D=nt(q),D===null)return;if(ne=D.tag,ne===5||ne===6||ne===26||ne===27){g=T=D;continue e}q=q.parentNode}}g=g.return}e5(function(){var ve=T,Ie=Tg(f),je=[];e:{var Te=N5.get(i);if(Te!==void 0){var Ae=fh,mt=i;switch(i){case"keypress":if(ch(f)===0)break e;case"keydown":case"keyup":Ae=eB;break;case"focusin":mt="focus",Ae=Ng;break;case"focusout":mt="blur",Ae=Ng;break;case"beforeblur":case"afterblur":Ae=Ng;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ae=r5;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ae=Uz;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ae=rB;break;case S5:case C5:case k5:Ae=Vz;break;case A5:Ae=sB;break;case"scroll":case"scrollend":Ae=Fz;break;case"wheel":Ae=oB;break;case"copy":case"cut":case"paste":Ae=Yz;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ae=s5;break;case"toggle":case"beforetoggle":Ae=uB}var Ot=(l&4)!==0,zn=!Ot&&(i==="scroll"||i==="scrollend"),he=Ot?Te!==null?Te+"Capture":null:Te;Ot=[];for(var ue=ve,xe;ue!==null;){var Le=ue;if(xe=Le.stateNode,Le=Le.tag,Le!==5&&Le!==26&&Le!==27||xe===null||he===null||(Le=T0(ue,he),Le!=null&&Ot.push(td(ue,Le,xe))),zn)break;ue=ue.return}0<Ot.length&&(Te=new Ae(Te,mt,null,f,Ie),je.push({event:Te,listeners:Ot}))}}if((l&7)===0){e:{if(Te=i==="mouseover"||i==="pointerover",Ae=i==="mouseout"||i==="pointerout",Te&&f!==wg&&(mt=f.relatedTarget||f.fromElement)&&(nt(mt)||mt[Pe]))break e;if((Ae||Te)&&(Te=Ie.window===Ie?Ie:(Te=Ie.ownerDocument)?Te.defaultView||Te.parentWindow:window,Ae?(mt=f.relatedTarget||f.toElement,Ae=ve,mt=mt?nt(mt):null,mt!==null&&(zn=s(mt),Ot=mt.tag,mt!==zn||Ot!==5&&Ot!==27&&Ot!==6)&&(mt=null)):(Ae=null,mt=ve),Ae!==mt)){if(Ot=r5,Le="onMouseLeave",he="onMouseEnter",ue="mouse",(i==="pointerout"||i==="pointerover")&&(Ot=s5,Le="onPointerLeave",he="onPointerEnter",ue="pointer"),zn=Ae==null?Te:Ut(Ae),xe=mt==null?Te:Ut(mt),Te=new Ot(Le,ue+"leave",Ae,f,Ie),Te.target=zn,Te.relatedTarget=xe,Le=null,nt(Ie)===ve&&(Ot=new Ot(he,ue+"enter",mt,f,Ie),Ot.target=xe,Ot.relatedTarget=zn,Le=Ot),zn=Le,Ae&&mt)t:{for(Ot=lF,he=Ae,ue=mt,xe=0,Le=he;Le;Le=Ot(Le))xe++;Le=0;for(var kt=ue;kt;kt=Ot(kt))Le++;for(;0<xe-Le;)he=Ot(he),xe--;for(;0<Le-xe;)ue=Ot(ue),Le--;for(;xe--;){if(he===ue||ue!==null&&he===ue.alternate){Ot=he;break t}he=Ot(he),ue=Ot(ue)}Ot=null}else Ot=null;Ae!==null&&KT(je,Te,Ae,Ot,!1),mt!==null&&zn!==null&&KT(je,zn,mt,Ot,!0)}}e:{if(Te=ve?Ut(ve):window,Ae=Te.nodeName&&Te.nodeName.toLowerCase(),Ae==="select"||Ae==="input"&&Te.type==="file")var En=h5;else if(d5(Te))if(m5)En=yB;else{En=bB;var yt=gB}else Ae=Te.nodeName,!Ae||Ae.toLowerCase()!=="input"||Te.type!=="checkbox"&&Te.type!=="radio"?ve&&vg(ve.elementType)&&(En=h5):En=xB;if(En&&(En=En(i,ve))){f5(je,En,f,Ie);break e}yt&&yt(i,Te,ve),i==="focusout"&&ve&&Te.type==="number"&&ve.memoizedProps.value!=null&&yg(Te,"number",Te.value)}switch(yt=ve?Ut(ve):window,i){case"focusin":(d5(yt)||yt.contentEditable==="true")&&(Ru=yt,Og=ve,R0=null);break;case"focusout":R0=Og=Ru=null;break;case"mousedown":Lg=!0;break;case"contextmenu":case"mouseup":case"dragend":Lg=!1,T5(je,f,Ie);break;case"selectionchange":if(wB)break;case"keydown":case"keyup":T5(je,f,Ie)}var Kt;if(Rg)e:{switch(i){case"compositionstart":var hn="onCompositionStart";break e;case"compositionend":hn="onCompositionEnd";break e;case"compositionupdate":hn="onCompositionUpdate";break e}hn=void 0}else _u?u5(i,f)&&(hn="onCompositionEnd"):i==="keydown"&&f.keyCode===229&&(hn="onCompositionStart");hn&&(i5&&f.locale!=="ko"&&(_u||hn!=="onCompositionStart"?hn==="onCompositionEnd"&&_u&&(Kt=t5()):(xo=Ie,Cg="value"in xo?xo.value:xo.textContent,_u=!0)),yt=nm(ve,hn),0<yt.length&&(hn=new a5(hn,i,null,f,Ie),je.push({event:hn,listeners:yt}),Kt?hn.data=Kt:(Kt=c5(f),Kt!==null&&(hn.data=Kt)))),(Kt=dB?fB(i,f):hB(i,f))&&(hn=nm(ve,"onBeforeInput"),0<hn.length&&(yt=new a5("onBeforeInput","beforeinput",null,f,Ie),je.push({event:yt,listeners:hn}),yt.data=Kt)),aF(je,i,ve,f,Ie)}WT(je,l)})}function td(i,l,f){return{instance:i,listener:l,currentTarget:f}}function nm(i,l){for(var f=l+"Capture",g=[];i!==null;){var v=i,T=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||T===null||(v=T0(i,f),v!=null&&g.unshift(td(i,v,T)),v=T0(i,l),v!=null&&g.push(td(i,v,T))),i.tag===3)return g;i=i.return}return[]}function lF(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function KT(i,l,f,g,v){for(var T=l._reactName,D=[];f!==null&&f!==g;){var q=f,ne=q.alternate,ve=q.stateNode;if(q=q.tag,ne!==null&&ne===g)break;q!==5&&q!==26&&q!==27||ve===null||(ne=ve,v?(ve=T0(f,T),ve!=null&&D.unshift(td(f,ve,ne))):v||(ve=T0(f,T),ve!=null&&D.push(td(f,ve,ne)))),f=f.return}D.length!==0&&i.push({event:l,listeners:D})}var uF=/\r\n?/g,cF=/\u0000|\uFFFD/g;function QT(i){return(typeof i=="string"?i:""+i).replace(uF,`
|
|
10
|
+
`).replace(cF,"")}function ZT(i,l){return l=QT(l),QT(i)===l}function jn(i,l,f,g,v,T){switch(f){case"children":typeof g=="string"?l==="body"||l==="textarea"&&g===""||ku(i,g):(typeof g=="number"||typeof g=="bigint")&&l!=="body"&&ku(i,""+g);break;case"className":Jn(i,"class",g);break;case"tabIndex":Jn(i,"tabindex",g);break;case"dir":case"role":case"viewBox":case"width":case"height":Jn(i,f,g);break;case"style":Z6(i,g,T);break;case"data":if(l!=="object"){Jn(i,"data",g);break}case"src":case"href":if(g===""&&(l!=="a"||f!=="href")){i.removeAttribute(f);break}if(g==null||typeof g=="function"||typeof g=="symbol"||typeof g=="boolean"){i.removeAttribute(f);break}g=lh(""+g),i.setAttribute(f,g);break;case"action":case"formAction":if(typeof g=="function"){i.setAttribute(f,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof T=="function"&&(f==="formAction"?(l!=="input"&&jn(i,l,"name",v.name,v,null),jn(i,l,"formEncType",v.formEncType,v,null),jn(i,l,"formMethod",v.formMethod,v,null),jn(i,l,"formTarget",v.formTarget,v,null)):(jn(i,l,"encType",v.encType,v,null),jn(i,l,"method",v.method,v,null),jn(i,l,"target",v.target,v,null)));if(g==null||typeof g=="symbol"||typeof g=="boolean"){i.removeAttribute(f);break}g=lh(""+g),i.setAttribute(f,g);break;case"onClick":g!=null&&(i.onclick=_i);break;case"onScroll":g!=null&&cn("scroll",i);break;case"onScrollEnd":g!=null&&cn("scrollend",i);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(r(61));if(f=g.__html,f!=null){if(v.children!=null)throw Error(r(60));i.innerHTML=f}}break;case"multiple":i.multiple=g&&typeof g!="function"&&typeof g!="symbol";break;case"muted":i.muted=g&&typeof g!="function"&&typeof g!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(g==null||typeof g=="function"||typeof g=="boolean"||typeof g=="symbol"){i.removeAttribute("xlink:href");break}f=lh(""+g),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":g!=null&&typeof g!="function"&&typeof g!="symbol"?i.setAttribute(f,""+g):i.removeAttribute(f);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":g&&typeof g!="function"&&typeof g!="symbol"?i.setAttribute(f,""):i.removeAttribute(f);break;case"capture":case"download":g===!0?i.setAttribute(f,""):g!==!1&&g!=null&&typeof g!="function"&&typeof g!="symbol"?i.setAttribute(f,g):i.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":g!=null&&typeof g!="function"&&typeof g!="symbol"&&!isNaN(g)&&1<=g?i.setAttribute(f,g):i.removeAttribute(f);break;case"rowSpan":case"start":g==null||typeof g=="function"||typeof g=="symbol"||isNaN(g)?i.removeAttribute(f):i.setAttribute(f,g);break;case"popover":cn("beforetoggle",i),cn("toggle",i),Tl(i,"popover",g);break;case"xlinkActuate":Ds(i,"http://www.w3.org/1999/xlink","xlink:actuate",g);break;case"xlinkArcrole":Ds(i,"http://www.w3.org/1999/xlink","xlink:arcrole",g);break;case"xlinkRole":Ds(i,"http://www.w3.org/1999/xlink","xlink:role",g);break;case"xlinkShow":Ds(i,"http://www.w3.org/1999/xlink","xlink:show",g);break;case"xlinkTitle":Ds(i,"http://www.w3.org/1999/xlink","xlink:title",g);break;case"xlinkType":Ds(i,"http://www.w3.org/1999/xlink","xlink:type",g);break;case"xmlBase":Ds(i,"http://www.w3.org/XML/1998/namespace","xml:base",g);break;case"xmlLang":Ds(i,"http://www.w3.org/XML/1998/namespace","xml:lang",g);break;case"xmlSpace":Ds(i,"http://www.w3.org/XML/1998/namespace","xml:space",g);break;case"is":Tl(i,"is",g);break;case"innerText":case"textContent":break;default:(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(f=zz.get(f)||f,Tl(i,f,g))}}function ib(i,l,f,g,v,T){switch(f){case"style":Z6(i,g,T);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(r(61));if(f=g.__html,f!=null){if(v.children!=null)throw Error(r(60));i.innerHTML=f}}break;case"children":typeof g=="string"?ku(i,g):(typeof g=="number"||typeof g=="bigint")&&ku(i,""+g);break;case"onScroll":g!=null&&cn("scroll",i);break;case"onScrollEnd":g!=null&&cn("scrollend",i);break;case"onClick":g!=null&&(i.onclick=_i);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!sn.hasOwnProperty(f))e:{if(f[0]==="o"&&f[1]==="n"&&(v=f.endsWith("Capture"),l=f.slice(2,v?f.length-7:void 0),T=i[ea]||null,T=T!=null?T[f]:null,typeof T=="function"&&i.removeEventListener(l,T,v),typeof g=="function")){typeof T!="function"&&T!==null&&(f in i?i[f]=null:i.hasAttribute(f)&&i.removeAttribute(f)),i.addEventListener(l,g,v);break e}f in i?i[f]=g:g===!0?i.setAttribute(f,""):Tl(i,f,g)}}}function Gr(i,l,f){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":cn("error",i),cn("load",i);var g=!1,v=!1,T;for(T in f)if(f.hasOwnProperty(T)){var D=f[T];if(D!=null)switch(T){case"src":g=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:jn(i,l,T,D,f,null)}}v&&jn(i,l,"srcSet",f.srcSet,f,null),g&&jn(i,l,"src",f.src,f,null);return;case"input":cn("invalid",i);var q=T=D=v=null,ne=null,ve=null;for(g in f)if(f.hasOwnProperty(g)){var Ie=f[g];if(Ie!=null)switch(g){case"name":v=Ie;break;case"type":D=Ie;break;case"checked":ne=Ie;break;case"defaultChecked":ve=Ie;break;case"value":T=Ie;break;case"defaultValue":q=Ie;break;case"children":case"dangerouslySetInnerHTML":if(Ie!=null)throw Error(r(137,l));break;default:jn(i,l,g,Ie,f,null)}}W6(i,T,q,ne,ve,D,v,!1);return;case"select":cn("invalid",i),g=D=T=null;for(v in f)if(f.hasOwnProperty(v)&&(q=f[v],q!=null))switch(v){case"value":T=q;break;case"defaultValue":D=q;break;case"multiple":g=q;default:jn(i,l,v,q,f,null)}l=T,f=D,i.multiple=!!g,l!=null?Cu(i,!!g,l,!1):f!=null&&Cu(i,!!g,f,!0);return;case"textarea":cn("invalid",i),T=v=g=null;for(D in f)if(f.hasOwnProperty(D)&&(q=f[D],q!=null))switch(D){case"value":g=q;break;case"defaultValue":v=q;break;case"children":T=q;break;case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(91));break;default:jn(i,l,D,q,f,null)}K6(i,g,v,T);return;case"option":for(ne in f)f.hasOwnProperty(ne)&&(g=f[ne],g!=null)&&(ne==="selected"?i.selected=g&&typeof g!="function"&&typeof g!="symbol":jn(i,l,ne,g,f,null));return;case"dialog":cn("beforetoggle",i),cn("toggle",i),cn("cancel",i),cn("close",i);break;case"iframe":case"object":cn("load",i);break;case"video":case"audio":for(g=0;g<ed.length;g++)cn(ed[g],i);break;case"image":cn("error",i),cn("load",i);break;case"details":cn("toggle",i);break;case"embed":case"source":case"link":cn("error",i),cn("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ve in f)if(f.hasOwnProperty(ve)&&(g=f[ve],g!=null))switch(ve){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:jn(i,l,ve,g,f,null)}return;default:if(vg(l)){for(Ie in f)f.hasOwnProperty(Ie)&&(g=f[Ie],g!==void 0&&ib(i,l,Ie,g,f,void 0));return}}for(q in f)f.hasOwnProperty(q)&&(g=f[q],g!=null&&jn(i,l,q,g,f,null))}function dF(i,l,f,g){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,T=null,D=null,q=null,ne=null,ve=null,Ie=null;for(Ae in f){var je=f[Ae];if(f.hasOwnProperty(Ae)&&je!=null)switch(Ae){case"checked":break;case"value":break;case"defaultValue":ne=je;default:g.hasOwnProperty(Ae)||jn(i,l,Ae,null,g,je)}}for(var Te in g){var Ae=g[Te];if(je=f[Te],g.hasOwnProperty(Te)&&(Ae!=null||je!=null))switch(Te){case"type":T=Ae;break;case"name":v=Ae;break;case"checked":ve=Ae;break;case"defaultChecked":Ie=Ae;break;case"value":D=Ae;break;case"defaultValue":q=Ae;break;case"children":case"dangerouslySetInnerHTML":if(Ae!=null)throw Error(r(137,l));break;default:Ae!==je&&jn(i,l,Te,Ae,g,je)}}xg(i,D,q,ne,ve,Ie,T,v);return;case"select":Ae=D=q=Te=null;for(T in f)if(ne=f[T],f.hasOwnProperty(T)&&ne!=null)switch(T){case"value":break;case"multiple":Ae=ne;default:g.hasOwnProperty(T)||jn(i,l,T,null,g,ne)}for(v in g)if(T=g[v],ne=f[v],g.hasOwnProperty(v)&&(T!=null||ne!=null))switch(v){case"value":Te=T;break;case"defaultValue":q=T;break;case"multiple":D=T;default:T!==ne&&jn(i,l,v,T,g,ne)}l=q,f=D,g=Ae,Te!=null?Cu(i,!!f,Te,!1):!!g!=!!f&&(l!=null?Cu(i,!!f,l,!0):Cu(i,!!f,f?[]:"",!1));return;case"textarea":Ae=Te=null;for(q in f)if(v=f[q],f.hasOwnProperty(q)&&v!=null&&!g.hasOwnProperty(q))switch(q){case"value":break;case"children":break;default:jn(i,l,q,null,g,v)}for(D in g)if(v=g[D],T=f[D],g.hasOwnProperty(D)&&(v!=null||T!=null))switch(D){case"value":Te=v;break;case"defaultValue":Ae=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==T&&jn(i,l,D,v,g,T)}X6(i,Te,Ae);return;case"option":for(var mt in f)Te=f[mt],f.hasOwnProperty(mt)&&Te!=null&&!g.hasOwnProperty(mt)&&(mt==="selected"?i.selected=!1:jn(i,l,mt,null,g,Te));for(ne in g)Te=g[ne],Ae=f[ne],g.hasOwnProperty(ne)&&Te!==Ae&&(Te!=null||Ae!=null)&&(ne==="selected"?i.selected=Te&&typeof Te!="function"&&typeof Te!="symbol":jn(i,l,ne,Te,g,Ae));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ot in f)Te=f[Ot],f.hasOwnProperty(Ot)&&Te!=null&&!g.hasOwnProperty(Ot)&&jn(i,l,Ot,null,g,Te);for(ve in g)if(Te=g[ve],Ae=f[ve],g.hasOwnProperty(ve)&&Te!==Ae&&(Te!=null||Ae!=null))switch(ve){case"children":case"dangerouslySetInnerHTML":if(Te!=null)throw Error(r(137,l));break;default:jn(i,l,ve,Te,g,Ae)}return;default:if(vg(l)){for(var zn in f)Te=f[zn],f.hasOwnProperty(zn)&&Te!==void 0&&!g.hasOwnProperty(zn)&&ib(i,l,zn,void 0,g,Te);for(Ie in g)Te=g[Ie],Ae=f[Ie],!g.hasOwnProperty(Ie)||Te===Ae||Te===void 0&&Ae===void 0||ib(i,l,Ie,Te,g,Ae);return}}for(var he in f)Te=f[he],f.hasOwnProperty(he)&&Te!=null&&!g.hasOwnProperty(he)&&jn(i,l,he,null,g,Te);for(je in g)Te=g[je],Ae=f[je],!g.hasOwnProperty(je)||Te===Ae||Te==null&&Ae==null||jn(i,l,je,Te,g,Ae)}function JT(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function fF(){if(typeof performance.getEntriesByType=="function"){for(var i=0,l=0,f=performance.getEntriesByType("resource"),g=0;g<f.length;g++){var v=f[g],T=v.transferSize,D=v.initiatorType,q=v.duration;if(T&&q&&JT(D)){for(D=0,q=v.responseEnd,g+=1;g<f.length;g++){var ne=f[g],ve=ne.startTime;if(ve>q)break;var Ie=ne.transferSize,je=ne.initiatorType;Ie&&JT(je)&&(ne=ne.responseEnd,D+=Ie*(ne<q?1:(q-ve)/(ne-ve)))}if(--g,l+=8*(T+D)/(v.duration/1e3),i++,10<i)break}}if(0<i)return l/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var ob=null,lb=null;function rm(i){return i.nodeType===9?i:i.ownerDocument}function eE(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function tE(i,l){if(i===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&l==="foreignObject"?0:i}function ub(i,l){return i==="textarea"||i==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var cb=null;function hF(){var i=window.event;return i&&i.type==="popstate"?i===cb?!1:(cb=i,!0):(cb=null,!1)}var nE=typeof setTimeout=="function"?setTimeout:void 0,mF=typeof clearTimeout=="function"?clearTimeout:void 0,rE=typeof Promise=="function"?Promise:void 0,pF=typeof queueMicrotask=="function"?queueMicrotask:typeof rE<"u"?function(i){return rE.resolve(null).then(i).catch(gF)}:nE;function gF(i){setTimeout(function(){throw i})}function Lo(i){return i==="head"}function aE(i,l){var f=l,g=0;do{var v=f.nextSibling;if(i.removeChild(f),v&&v.nodeType===8)if(f=v.data,f==="/$"||f==="/&"){if(g===0){i.removeChild(v),rc(l);return}g--}else if(f==="$"||f==="$?"||f==="$~"||f==="$!"||f==="&")g++;else if(f==="html")nd(i.ownerDocument.documentElement);else if(f==="head"){f=i.ownerDocument.head,nd(f);for(var T=f.firstChild;T;){var D=T.nextSibling,q=T.nodeName;T[ot]||q==="SCRIPT"||q==="STYLE"||q==="LINK"&&T.rel.toLowerCase()==="stylesheet"||f.removeChild(T),T=D}}else f==="body"&&nd(i.ownerDocument.body);f=v}while(f);rc(l)}function sE(i,l){var f=i;i=0;do{var g=f.nextSibling;if(f.nodeType===1?l?(f._stashedDisplay=f.style.display,f.style.display="none"):(f.style.display=f._stashedDisplay||"",f.getAttribute("style")===""&&f.removeAttribute("style")):f.nodeType===3&&(l?(f._stashedText=f.nodeValue,f.nodeValue=""):f.nodeValue=f._stashedText||""),g&&g.nodeType===8)if(f=g.data,f==="/$"){if(i===0)break;i--}else f!=="$"&&f!=="$?"&&f!=="$~"&&f!=="$!"||i++;f=g}while(f)}function db(i){var l=i.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var f=l;switch(l=l.nextSibling,f.nodeName){case"HTML":case"HEAD":case"BODY":db(f),rt(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}i.removeChild(f)}}function bF(i,l,f,g){for(;i.nodeType===1;){var v=f;if(i.nodeName.toLowerCase()!==l.toLowerCase()){if(!g&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(g){if(!i[ot])switch(l){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(T=i.getAttribute("rel"),T==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(T!==v.rel||i.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||i.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||i.getAttribute("title")!==(v.title==null?null:v.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(T=i.getAttribute("src"),(T!==(v.src==null?null:v.src)||i.getAttribute("type")!==(v.type==null?null:v.type)||i.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&T&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(l==="input"&&i.type==="hidden"){var T=v.name==null?null:""+v.name;if(v.type==="hidden"&&i.getAttribute("name")===T)return i}else return i;if(i=bs(i.nextSibling),i===null)break}return null}function xF(i,l,f){if(l==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!f||(i=bs(i.nextSibling),i===null))return null;return i}function iE(i,l){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!l||(i=bs(i.nextSibling),i===null))return null;return i}function fb(i){return i.data==="$?"||i.data==="$~"}function hb(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function yF(i,l){var f=i.ownerDocument;if(i.data==="$~")i._reactRetry=l;else if(i.data!=="$?"||f.readyState!=="loading")l();else{var g=function(){l(),f.removeEventListener("DOMContentLoaded",g)};f.addEventListener("DOMContentLoaded",g),i._reactRetry=g}}function bs(i){for(;i!=null;i=i.nextSibling){var l=i.nodeType;if(l===1||l===3)break;if(l===8){if(l=i.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return i}var mb=null;function oE(i){i=i.nextSibling;for(var l=0;i;){if(i.nodeType===8){var f=i.data;if(f==="/$"||f==="/&"){if(l===0)return bs(i.nextSibling);l--}else f!=="$"&&f!=="$!"&&f!=="$?"&&f!=="$~"&&f!=="&"||l++}i=i.nextSibling}return null}function lE(i){i=i.previousSibling;for(var l=0;i;){if(i.nodeType===8){var f=i.data;if(f==="$"||f==="$!"||f==="$?"||f==="$~"||f==="&"){if(l===0)return i;l--}else f!=="/$"&&f!=="/&"||l++}i=i.previousSibling}return null}function uE(i,l,f){switch(l=rm(f),i){case"html":if(i=l.documentElement,!i)throw Error(r(452));return i;case"head":if(i=l.head,!i)throw Error(r(453));return i;case"body":if(i=l.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function nd(i){for(var l=i.attributes;l.length;)i.removeAttributeNode(l[0]);rt(i)}var xs=new Map,cE=new Set;function am(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Vi=K.d;K.d={f:vF,r:wF,D:TF,C:EF,L:SF,m:CF,X:AF,S:kF,M:NF};function vF(){var i=Vi.f(),l=Xh();return i||l}function wF(i){var l=Ct(i);l!==null&&l.tag===5&&l.type==="form"?Aw(l):Vi.r(i)}var ec=typeof document>"u"?null:document;function dE(i,l,f){var g=ec;if(g&&typeof l=="string"&&l){var v=cs(l);v='link[rel="'+i+'"][href="'+v+'"]',typeof f=="string"&&(v+='[crossorigin="'+f+'"]'),cE.has(v)||(cE.add(v),i={rel:i,crossOrigin:f,href:l},g.querySelector(v)===null&&(l=g.createElement("link"),Gr(l,"link",i),St(l),g.head.appendChild(l)))}}function TF(i){Vi.D(i),dE("dns-prefetch",i,null)}function EF(i,l){Vi.C(i,l),dE("preconnect",i,l)}function SF(i,l,f){Vi.L(i,l,f);var g=ec;if(g&&i&&l){var v='link[rel="preload"][as="'+cs(l)+'"]';l==="image"&&f&&f.imageSrcSet?(v+='[imagesrcset="'+cs(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(v+='[imagesizes="'+cs(f.imageSizes)+'"]')):v+='[href="'+cs(i)+'"]';var T=v;switch(l){case"style":T=tc(i);break;case"script":T=nc(i)}xs.has(T)||(i=p({rel:"preload",href:l==="image"&&f&&f.imageSrcSet?void 0:i,as:l},f),xs.set(T,i),g.querySelector(v)!==null||l==="style"&&g.querySelector(rd(T))||l==="script"&&g.querySelector(ad(T))||(l=g.createElement("link"),Gr(l,"link",i),St(l),g.head.appendChild(l)))}}function CF(i,l){Vi.m(i,l);var f=ec;if(f&&i){var g=l&&typeof l.as=="string"?l.as:"script",v='link[rel="modulepreload"][as="'+cs(g)+'"][href="'+cs(i)+'"]',T=v;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":T=nc(i)}if(!xs.has(T)&&(i=p({rel:"modulepreload",href:i},l),xs.set(T,i),f.querySelector(v)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(ad(T)))return}g=f.createElement("link"),Gr(g,"link",i),St(g),f.head.appendChild(g)}}}function kF(i,l,f){Vi.S(i,l,f);var g=ec;if(g&&i){var v=ht(g).hoistableStyles,T=tc(i);l=l||"default";var D=v.get(T);if(!D){var q={loading:0,preload:null};if(D=g.querySelector(rd(T)))q.loading=5;else{i=p({rel:"stylesheet",href:i,"data-precedence":l},f),(f=xs.get(T))&&pb(i,f);var ne=D=g.createElement("link");St(ne),Gr(ne,"link",i),ne._p=new Promise(function(ve,Ie){ne.onload=ve,ne.onerror=Ie}),ne.addEventListener("load",function(){q.loading|=1}),ne.addEventListener("error",function(){q.loading|=2}),q.loading|=4,sm(D,l,g)}D={type:"stylesheet",instance:D,count:1,state:q},v.set(T,D)}}}function AF(i,l){Vi.X(i,l);var f=ec;if(f&&i){var g=ht(f).hoistableScripts,v=nc(i),T=g.get(v);T||(T=f.querySelector(ad(v)),T||(i=p({src:i,async:!0},l),(l=xs.get(v))&&gb(i,l),T=f.createElement("script"),St(T),Gr(T,"link",i),f.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},g.set(v,T))}}function NF(i,l){Vi.M(i,l);var f=ec;if(f&&i){var g=ht(f).hoistableScripts,v=nc(i),T=g.get(v);T||(T=f.querySelector(ad(v)),T||(i=p({src:i,async:!0,type:"module"},l),(l=xs.get(v))&&gb(i,l),T=f.createElement("script"),St(T),Gr(T,"link",i),f.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},g.set(v,T))}}function fE(i,l,f,g){var v=(v=Se.current)?am(v):null;if(!v)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(l=tc(f.href),f=ht(v).hoistableStyles,g=f.get(l),g||(g={type:"style",instance:null,count:0,state:null},f.set(l,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){i=tc(f.href);var T=ht(v).hoistableStyles,D=T.get(i);if(D||(v=v.ownerDocument||v,D={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},T.set(i,D),(T=v.querySelector(rd(i)))&&!T._p&&(D.instance=T,D.state.loading=5),xs.has(i)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},xs.set(i,f),T||_F(v,i,f,D.state))),l&&g===null)throw Error(r(528,""));return D}if(l&&g!==null)throw Error(r(529,""));return null;case"script":return l=f.async,f=f.src,typeof f=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=nc(f),f=ht(v).hoistableScripts,g=f.get(l),g||(g={type:"script",instance:null,count:0,state:null},f.set(l,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function tc(i){return'href="'+cs(i)+'"'}function rd(i){return'link[rel="stylesheet"]['+i+"]"}function hE(i){return p({},i,{"data-precedence":i.precedence,precedence:null})}function _F(i,l,f,g){i.querySelector('link[rel="preload"][as="style"]['+l+"]")?g.loading=1:(l=i.createElement("link"),g.preload=l,l.addEventListener("load",function(){return g.loading|=1}),l.addEventListener("error",function(){return g.loading|=2}),Gr(l,"link",f),St(l),i.head.appendChild(l))}function nc(i){return'[src="'+cs(i)+'"]'}function ad(i){return"script[async]"+i}function mE(i,l,f){if(l.count++,l.instance===null)switch(l.type){case"style":var g=i.querySelector('style[data-href~="'+cs(f.href)+'"]');if(g)return l.instance=g,St(g),g;var v=p({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return g=(i.ownerDocument||i).createElement("style"),St(g),Gr(g,"style",v),sm(g,f.precedence,i),l.instance=g;case"stylesheet":v=tc(f.href);var T=i.querySelector(rd(v));if(T)return l.state.loading|=4,l.instance=T,St(T),T;g=hE(f),(v=xs.get(v))&&pb(g,v),T=(i.ownerDocument||i).createElement("link"),St(T);var D=T;return D._p=new Promise(function(q,ne){D.onload=q,D.onerror=ne}),Gr(T,"link",g),l.state.loading|=4,sm(T,f.precedence,i),l.instance=T;case"script":return T=nc(f.src),(v=i.querySelector(ad(T)))?(l.instance=v,St(v),v):(g=f,(v=xs.get(T))&&(g=p({},f),gb(g,v)),i=i.ownerDocument||i,v=i.createElement("script"),St(v),Gr(v,"link",g),i.head.appendChild(v),l.instance=v);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(g=l.instance,l.state.loading|=4,sm(g,f.precedence,i));return l.instance}function sm(i,l,f){for(var g=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=g.length?g[g.length-1]:null,T=v,D=0;D<g.length;D++){var q=g[D];if(q.dataset.precedence===l)T=q;else if(T!==v)break}T?T.parentNode.insertBefore(i,T.nextSibling):(l=f.nodeType===9?f.head:f,l.insertBefore(i,l.firstChild))}function pb(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.title==null&&(i.title=l.title)}function gb(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.integrity==null&&(i.integrity=l.integrity)}var im=null;function pE(i,l,f){if(im===null){var g=new Map,v=im=new Map;v.set(f,g)}else v=im,g=v.get(f),g||(g=new Map,v.set(f,g));if(g.has(i))return g;for(g.set(i,null),f=f.getElementsByTagName(i),v=0;v<f.length;v++){var T=f[v];if(!(T[ot]||T[Nr]||i==="link"&&T.getAttribute("rel")==="stylesheet")&&T.namespaceURI!=="http://www.w3.org/2000/svg"){var D=T.getAttribute(l)||"";D=i+D;var q=g.get(D);q?q.push(T):g.set(D,[T])}}return g}function gE(i,l,f){i=i.ownerDocument||i,i.head.insertBefore(f,l==="title"?i.querySelector("head > title"):null)}function RF(i,l,f){if(f===1||l.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;return l.rel==="stylesheet"?(i=l.disabled,typeof l.precedence=="string"&&i==null):!0;case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function bE(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function MF(i,l,f,g){if(f.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(f.state.loading&4)===0){if(f.instance===null){var v=tc(g.href),T=l.querySelector(rd(v));if(T){l=T._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(i.count++,i=om.bind(i),l.then(i,i)),f.state.loading|=4,f.instance=T,St(T);return}T=l.ownerDocument||l,g=hE(g),(v=xs.get(v))&&pb(g,v),T=T.createElement("link"),St(T);var D=T;D._p=new Promise(function(q,ne){D.onload=q,D.onerror=ne}),Gr(T,"link",g),f.instance=T}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(f,l),(l=f.state.preload)&&(f.state.loading&3)===0&&(i.count++,f=om.bind(i),l.addEventListener("load",f),l.addEventListener("error",f))}}var bb=0;function DF(i,l){return i.stylesheets&&i.count===0&&um(i,i.stylesheets),0<i.count||0<i.imgCount?function(f){var g=setTimeout(function(){if(i.stylesheets&&um(i,i.stylesheets),i.unsuspend){var T=i.unsuspend;i.unsuspend=null,T()}},6e4+l);0<i.imgBytes&&bb===0&&(bb=62500*fF());var v=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&um(i,i.stylesheets),i.unsuspend)){var T=i.unsuspend;i.unsuspend=null,T()}},(i.imgBytes>bb?50:800)+l);return i.unsuspend=f,function(){i.unsuspend=null,clearTimeout(g),clearTimeout(v)}}:null}function om(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)um(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var lm=null;function um(i,l){i.stylesheets=null,i.unsuspend!==null&&(i.count++,lm=new Map,l.forEach(IF,i),lm=null,om.call(i))}function IF(i,l){if(!(l.state.loading&4)){var f=lm.get(i);if(f)var g=f.get(null);else{f=new Map,lm.set(i,f);for(var v=i.querySelectorAll("link[data-precedence],style[data-precedence]"),T=0;T<v.length;T++){var D=v[T];(D.nodeName==="LINK"||D.getAttribute("media")!=="not all")&&(f.set(D.dataset.precedence,D),g=D)}g&&f.set(null,g)}v=l.instance,D=v.getAttribute("data-precedence"),T=f.get(D)||g,T===g&&f.set(null,v),f.set(D,v),this.count++,g=om.bind(this),v.addEventListener("load",g),v.addEventListener("error",g),T?T.parentNode.insertBefore(v,T.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(v,i.firstChild)),l.state.loading|=4}}var sd={$$typeof:_,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function OF(i,l,f,g,v,T,D,q,ne){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ca(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ca(0),this.hiddenUpdates=ca(null),this.identifierPrefix=g,this.onUncaughtError=v,this.onCaughtError=T,this.onRecoverableError=D,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ne,this.incompleteTransitions=new Map}function xE(i,l,f,g,v,T,D,q,ne,ve,Ie,je){return i=new OF(i,l,f,D,ne,ve,Ie,je,q),l=1,T===!0&&(l|=24),T=Ya(3,null,null,l),i.current=T,T.stateNode=i,l=Kg(),l.refCount++,i.pooledCache=l,l.refCount++,T.memoizedState={element:g,isDehydrated:f,cache:l},e2(T),i}function yE(i){return i?(i=Iu,i):Iu}function vE(i,l,f,g,v,T){v=yE(v),g.context===null?g.context=v:g.pendingContext=v,g=So(l),g.payload={element:f},T=T===void 0?null:T,T!==null&&(g.callback=T),f=Co(i,g,l),f!==null&&(_a(f,i,l),j0(f,i,l))}function wE(i,l){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var f=i.retryLane;i.retryLane=f!==0&&f<l?f:l}}function xb(i,l){wE(i,l),(i=i.alternate)&&wE(i,l)}function TE(i){if(i.tag===13||i.tag===31){var l=kl(i,67108864);l!==null&&_a(l,i,67108864),xb(i,67108864)}}function EE(i){if(i.tag===13||i.tag===31){var l=Za();l=Va(l);var f=kl(i,l);f!==null&&_a(f,i,l),xb(i,l)}}var cm=!0;function LF(i,l,f,g){var v=$.T;$.T=null;var T=K.p;try{K.p=2,yb(i,l,f,g)}finally{K.p=T,$.T=v}}function PF(i,l,f,g){var v=$.T;$.T=null;var T=K.p;try{K.p=8,yb(i,l,f,g)}finally{K.p=T,$.T=v}}function yb(i,l,f,g){if(cm){var v=vb(g);if(v===null)sb(i,l,g,dm,f),CE(i,g);else if(zF(v,i,l,f,g))g.stopPropagation();else if(CE(i,g),l&4&&-1<jF.indexOf(i)){for(;v!==null;){var T=Ct(v);if(T!==null)switch(T.tag){case 3:if(T=T.stateNode,T.current.memoizedState.isDehydrated){var D=Mt(T.pendingLanes);if(D!==0){var q=T;for(q.pendingLanes|=2,q.entangledLanes|=2;D;){var ne=1<<31-an(D);q.entanglements[1]|=ne,D&=~ne}ei(T),(_n&6)===0&&(Yh=Ht()+500,J0(0))}}break;case 31:case 13:q=kl(T,2),q!==null&&_a(q,T,2),Xh(),xb(T,2)}if(T=vb(g),T===null&&sb(i,l,g,dm,f),T===v)break;v=T}v!==null&&g.stopPropagation()}else sb(i,l,g,null,f)}}function vb(i){return i=Tg(i),wb(i)}var dm=null;function wb(i){if(dm=null,i=nt(i),i!==null){var l=s(i);if(l===null)i=null;else{var f=l.tag;if(f===13){if(i=o(l),i!==null)return i;i=null}else if(f===31){if(i=u(l),i!==null)return i;i=null}else if(f===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;i=null}else l!==i&&(i=null)}}return dm=i,null}function SE(i){switch(i){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Mn()){case ke:return 2;case Be:return 8;case xt:case Et:return 32;case Ze:return 268435456;default:return 32}default:return 32}}var Tb=!1,Po=null,jo=null,zo=null,id=new Map,od=new Map,Bo=[],jF="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function CE(i,l){switch(i){case"focusin":case"focusout":Po=null;break;case"dragenter":case"dragleave":jo=null;break;case"mouseover":case"mouseout":zo=null;break;case"pointerover":case"pointerout":id.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":od.delete(l.pointerId)}}function ld(i,l,f,g,v,T){return i===null||i.nativeEvent!==T?(i={blockedOn:l,domEventName:f,eventSystemFlags:g,nativeEvent:T,targetContainers:[v]},l!==null&&(l=Ct(l),l!==null&&TE(l)),i):(i.eventSystemFlags|=g,l=i.targetContainers,v!==null&&l.indexOf(v)===-1&&l.push(v),i)}function zF(i,l,f,g,v){switch(l){case"focusin":return Po=ld(Po,i,l,f,g,v),!0;case"dragenter":return jo=ld(jo,i,l,f,g,v),!0;case"mouseover":return zo=ld(zo,i,l,f,g,v),!0;case"pointerover":var T=v.pointerId;return id.set(T,ld(id.get(T)||null,i,l,f,g,v)),!0;case"gotpointercapture":return T=v.pointerId,od.set(T,ld(od.get(T)||null,i,l,f,g,v)),!0}return!1}function kE(i){var l=nt(i.target);if(l!==null){var f=s(l);if(f!==null){if(l=f.tag,l===13){if(l=o(f),l!==null){i.blockedOn=l,y0(i.priority,function(){EE(f)});return}}else if(l===31){if(l=u(f),l!==null){i.blockedOn=l,y0(i.priority,function(){EE(f)});return}}else if(l===3&&f.stateNode.current.memoizedState.isDehydrated){i.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}i.blockedOn=null}function fm(i){if(i.blockedOn!==null)return!1;for(var l=i.targetContainers;0<l.length;){var f=vb(i.nativeEvent);if(f===null){f=i.nativeEvent;var g=new f.constructor(f.type,f);wg=g,f.target.dispatchEvent(g),wg=null}else return l=Ct(f),l!==null&&TE(l),i.blockedOn=f,!1;l.shift()}return!0}function AE(i,l,f){fm(i)&&f.delete(l)}function BF(){Tb=!1,Po!==null&&fm(Po)&&(Po=null),jo!==null&&fm(jo)&&(jo=null),zo!==null&&fm(zo)&&(zo=null),id.forEach(AE),od.forEach(AE)}function hm(i,l){i.blockedOn===l&&(i.blockedOn=null,Tb||(Tb=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,BF)))}var mm=null;function NE(i){mm!==i&&(mm=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){mm===i&&(mm=null);for(var l=0;l<i.length;l+=3){var f=i[l],g=i[l+1],v=i[l+2];if(typeof g!="function"){if(wb(g||f)===null)continue;break}var T=Ct(f);T!==null&&(i.splice(l,3),l-=3,v2(T,{pending:!0,data:v,method:f.method,action:g},g,v))}}))}function rc(i){function l(ne){return hm(ne,i)}Po!==null&&hm(Po,i),jo!==null&&hm(jo,i),zo!==null&&hm(zo,i),id.forEach(l),od.forEach(l);for(var f=0;f<Bo.length;f++){var g=Bo[f];g.blockedOn===i&&(g.blockedOn=null)}for(;0<Bo.length&&(f=Bo[0],f.blockedOn===null);)kE(f),f.blockedOn===null&&Bo.shift();if(f=(i.ownerDocument||i).$$reactFormReplay,f!=null)for(g=0;g<f.length;g+=3){var v=f[g],T=f[g+1],D=v[ea]||null;if(typeof T=="function")D||NE(f);else if(D){var q=null;if(T&&T.hasAttribute("formAction")){if(v=T,D=T[ea]||null)q=D.formAction;else if(wb(v)!==null)continue}else q=D.action;typeof q=="function"?f[g+1]=q:(f.splice(g,3),g-=3),NE(f)}}}function _E(){function i(T){T.canIntercept&&T.info==="react-transition"&&T.intercept({handler:function(){return new Promise(function(D){return v=D})},focusReset:"manual",scroll:"manual"})}function l(){v!==null&&(v(),v=null),g||setTimeout(f,20)}function f(){if(!g&&!navigation.transition){var T=navigation.currentEntry;T&&T.url!=null&&navigation.navigate(T.url,{state:T.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var g=!1,v=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(f,100),function(){g=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),v!==null&&(v(),v=null)}}}function Eb(i){this._internalRoot=i}pm.prototype.render=Eb.prototype.render=function(i){var l=this._internalRoot;if(l===null)throw Error(r(409));var f=l.current,g=Za();vE(f,g,i,l,null,null)},pm.prototype.unmount=Eb.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var l=i.containerInfo;vE(i.current,2,null,i,null,null),Xh(),l[Pe]=null}};function pm(i){this._internalRoot=i}pm.prototype.unstable_scheduleHydration=function(i){if(i){var l=x0();i={blockedOn:null,target:i,priority:l};for(var f=0;f<Bo.length&&l!==0&&l<Bo[f].priority;f++);Bo.splice(f,0,i),f===0&&kE(i)}};var RE=t.version;if(RE!=="19.2.3")throw Error(r(527,RE,"19.2.3"));K.findDOMNode=function(i){var l=i._reactInternals;if(l===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=d(l),i=i!==null?m(i):null,i=i===null?null:i.stateNode,i};var FF={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var gm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gm.isDisabled&&gm.supportsFiber)try{Qe=gm.inject(FF),_t=gm}catch{}}return cd.createRoot=function(i,l){if(!a(i))throw Error(r(299));var f=!1,g="",v=jw,T=zw,D=Bw;return l!=null&&(l.unstable_strictMode===!0&&(f=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onUncaughtError!==void 0&&(v=l.onUncaughtError),l.onCaughtError!==void 0&&(T=l.onCaughtError),l.onRecoverableError!==void 0&&(D=l.onRecoverableError)),l=xE(i,1,!1,null,null,f,g,null,v,T,D,_E),i[Pe]=l.current,ab(i),new Eb(l)},cd.hydrateRoot=function(i,l,f){if(!a(i))throw Error(r(299));var g=!1,v="",T=jw,D=zw,q=Bw,ne=null;return f!=null&&(f.unstable_strictMode===!0&&(g=!0),f.identifierPrefix!==void 0&&(v=f.identifierPrefix),f.onUncaughtError!==void 0&&(T=f.onUncaughtError),f.onCaughtError!==void 0&&(D=f.onCaughtError),f.onRecoverableError!==void 0&&(q=f.onRecoverableError),f.formState!==void 0&&(ne=f.formState)),l=xE(i,1,!0,l,f??null,g,v,ne,T,D,q,_E),l.context=yE(null),f=l.current,g=Za(),g=Va(g),v=So(g),v.callback=null,Co(f,v,g),f=g,l.current.lanes=f,Ln(l,f),ei(l),i[Pe]=l.current,ab(i),new pm(l)},cd.version="19.2.3",cd}var FE;function eH(){if(FE)return kb.exports;FE=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),kb.exports=JF(),kb.exports}var tH=eH(),xi=globalThis?.document?x.useLayoutEffect:()=>{},nH=Yv[" useInsertionEffect ".trim().toString()]||xi;function Fa({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,s,o]=rH({defaultProp:t,onChange:n}),u=e!==void 0,c=u?e:a;{const m=x.useRef(e!==void 0);x.useEffect(()=>{const p=m.current;p!==u&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=u},[u,r])}const d=x.useCallback(m=>{if(u){const p=aH(m)?m(e):m;p!==e&&o.current?.(p)}else s(m)},[u,e,s,o]);return[c,d]}function rH({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),a=x.useRef(n),s=x.useRef(t);return nH(()=>{s.current=t},[t]),x.useEffect(()=>{a.current!==n&&(s.current?.(n),a.current=n)},[n,a]),[n,r,s]}function aH(e){return typeof e=="function"}function HE(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ha(...e){return t=>{let n=!1;const r=e.map(a=>{const s=HE(a,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let a=0;a<r.length;a++){const s=r[a];typeof s=="function"?s():HE(e[a],null)}}}}function Tn(...e){return x.useCallback(Ha(...e),e)}var sH=Symbol.for("react.lazy"),vp=Yv[" use ".trim().toString()];function iH(e){return typeof e=="object"&&e!==null&&"then"in e}function O9(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===sH&&"_payload"in e&&iH(e._payload)}function L9(e){const t=oH(e),n=x.forwardRef((r,a)=>{let{children:s,...o}=r;O9(s)&&typeof vp=="function"&&(s=vp(s._payload));const u=x.Children.toArray(s),c=u.find(uH);if(c){const d=c.props.children,m=u.map(p=>p===c?x.Children.count(d)>1?x.Children.only(null):x.isValidElement(d)?d.props.children:null:p);return h.jsx(t,{...o,ref:a,children:x.isValidElement(d)?x.cloneElement(d,void 0,m):null})}return h.jsx(t,{...o,ref:a,children:s})});return n.displayName=`${e}.Slot`,n}var P9=L9("Slot");function oH(e){const t=x.forwardRef((n,r)=>{let{children:a,...s}=n;if(O9(a)&&typeof vp=="function"&&(a=vp(a._payload)),x.isValidElement(a)){const o=dH(a),u=cH(s,a.props);return a.type!==x.Fragment&&(u.ref=r?Ha(r,o):o),x.cloneElement(a,u)}return x.Children.count(a)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var lH=Symbol("radix.slottable");function uH(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lH}function cH(e,t){const n={...t};for(const r in t){const a=e[r],s=t[r];/^on[A-Z]/.test(r)?a&&s?n[r]=(...u)=>{const c=s(...u);return a(...u),c}:a&&(n[r]=a):r==="style"?n[r]={...a,...s}:r==="className"&&(n[r]=[a,s].filter(Boolean).join(" "))}return{...e,...n}}function dH(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function j9(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=j9(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Wv(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=j9(e))&&(r&&(r+=" "),r+=t);return r}const UE=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,$E=Wv,du=(e,t)=>n=>{var r;if(t?.variants==null)return $E(e,n?.class,n?.className);const{variants:a,defaultVariants:s}=t,o=Object.keys(a).map(d=>{const m=n?.[d],p=s?.[d];if(m===null)return null;const b=UE(m)||UE(p);return a[d][b]}),u=n&&Object.entries(n).reduce((d,m)=>{let[p,b]=m;return b===void 0||(d[p]=b),d},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,m)=>{let{class:p,className:b,...y}=m;return Object.entries(y).every(w=>{let[S,k]=w;return Array.isArray(k)?k.includes({...s,...u}[S]):{...s,...u}[S]===k})?[...d,p,b]:d},[]);return $E(e,o,c,n?.class,n?.className)},fH=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},hH=(e,t)=>({classGroupId:e,validator:t}),z9=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),wp="-",qE=[],mH="arbitrary..",pH=e=>{const t=bH(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return gH(o);const u=o.split(wp),c=u[0]===""&&u.length>1?1:0;return B9(u,c,t)},getConflictingClassGroupIds:(o,u)=>{if(u){const c=r[o],d=n[o];return c?d?fH(d,c):c:d||qE}return n[o]||qE}}},B9=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],s=n.nextPart.get(a);if(s){const d=B9(e,t+1,s);if(d)return d}const o=n.validators;if(o===null)return;const u=t===0?e.join(wp):e.slice(t).join(wp),c=o.length;for(let d=0;d<c;d++){const m=o[d];if(m.validator(u))return m.classGroupId}},gH=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?mH+r:void 0})(),bH=e=>{const{theme:t,classGroups:n}=e;return xH(n,t)},xH=(e,t)=>{const n=z9();for(const r in e){const a=e[r];Xv(a,n,r,t)}return n},Xv=(e,t,n,r)=>{const a=e.length;for(let s=0;s<a;s++){const o=e[s];yH(o,t,n,r)}},yH=(e,t,n,r)=>{if(typeof e=="string"){vH(e,t,n);return}if(typeof e=="function"){wH(e,t,n,r);return}TH(e,t,n,r)},vH=(e,t,n)=>{const r=e===""?t:F9(t,e);r.classGroupId=n},wH=(e,t,n,r)=>{if(EH(e)){Xv(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(hH(n,e))},TH=(e,t,n,r)=>{const a=Object.entries(e),s=a.length;for(let o=0;o<s;o++){const[u,c]=a[o];Xv(c,F9(t,u),n,r)}},F9=(e,t)=>{let n=e;const r=t.split(wp),a=r.length;for(let s=0;s<a;s++){const o=r[s];let u=n.nextPart.get(o);u||(u=z9(),n.nextPart.set(o,u)),n=u}return n},EH=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,SH=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const a=(s,o)=>{n[s]=o,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let o=n[s];if(o!==void 0)return o;if((o=r[s])!==void 0)return a(s,o),o},set(s,o){s in n?n[s]=o:a(s,o)}}},my="!",VE=":",CH=[],GE=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),kH=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const s=[];let o=0,u=0,c=0,d;const m=a.length;for(let S=0;S<m;S++){const k=a[S];if(o===0&&u===0){if(k===VE){s.push(a.slice(c,S)),c=S+1;continue}if(k==="/"){d=S;continue}}k==="["?o++:k==="]"?o--:k==="("?u++:k===")"&&u--}const p=s.length===0?a:a.slice(c);let b=p,y=!1;p.endsWith(my)?(b=p.slice(0,-1),y=!0):p.startsWith(my)&&(b=p.slice(1),y=!0);const w=d&&d>c?d-c:void 0;return GE(s,y,b,w)};if(t){const a=t+VE,s=r;r=o=>o.startsWith(a)?s(o.slice(a.length)):GE(CH,!1,o,void 0,!0)}if(n){const a=r;r=s=>n({className:s,parseClassName:a})}return r},AH=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let a=[];for(let s=0;s<n.length;s++){const o=n[s],u=o[0]==="[",c=t.has(o);u||c?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(o)):a.push(o)}return a.length>0&&(a.sort(),r.push(...a)),r}},NH=e=>({cache:SH(e.cacheSize),parseClassName:kH(e),sortModifiers:AH(e),...pH(e)}),_H=/\s+/,RH=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:s}=t,o=[],u=e.trim().split(_H);let c="";for(let d=u.length-1;d>=0;d-=1){const m=u[d],{isExternal:p,modifiers:b,hasImportantModifier:y,baseClassName:w,maybePostfixModifierPosition:S}=n(m);if(p){c=m+(c.length>0?" "+c:c);continue}let k=!!S,E=r(k?w.substring(0,S):w);if(!E){if(!k){c=m+(c.length>0?" "+c:c);continue}if(E=r(w),!E){c=m+(c.length>0?" "+c:c);continue}k=!1}const A=b.length===0?"":b.length===1?b[0]:s(b).join(":"),_=y?A+my:A,I=_+E;if(o.indexOf(I)>-1)continue;o.push(I);const P=a(E,k);for(let O=0;O<P.length;++O){const R=P[O];o.push(_+R)}c=m+(c.length>0?" "+c:c)}return c},MH=(...e)=>{let t=0,n,r,a="";for(;t<e.length;)(n=e[t++])&&(r=H9(n))&&(a&&(a+=" "),a+=r);return a},H9=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=H9(e[r]))&&(n&&(n+=" "),n+=t);return n},DH=(e,...t)=>{let n,r,a,s;const o=c=>{const d=t.reduce((m,p)=>p(m),e());return n=NH(d),r=n.cache.get,a=n.cache.set,s=u,u(c)},u=c=>{const d=r(c);if(d)return d;const m=RH(c,n);return a(c,m),m};return s=o,(...c)=>s(MH(...c))},IH=[],Rr=e=>{const t=n=>n[e]||IH;return t.isThemeGetter=!0,t},U9=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$9=/^\((?:(\w[\w-]*):)?(.+)\)$/i,OH=/^\d+\/\d+$/,LH=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,PH=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jH=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zH=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,BH=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ac=e=>OH.test(e),rn=e=>!!e&&!Number.isNaN(Number(e)),Ho=e=>!!e&&Number.isInteger(Number(e)),Rb=e=>e.endsWith("%")&&rn(e.slice(0,-1)),Gi=e=>LH.test(e),FH=()=>!0,HH=e=>PH.test(e)&&!jH.test(e),q9=()=>!1,UH=e=>zH.test(e),$H=e=>BH.test(e),qH=e=>!pt(e)&&!gt(e),VH=e=>Wc(e,Y9,q9),pt=e=>U9.test(e),Bl=e=>Wc(e,W9,HH),Mb=e=>Wc(e,KH,rn),YE=e=>Wc(e,V9,q9),GH=e=>Wc(e,G9,$H),bm=e=>Wc(e,X9,UH),gt=e=>$9.test(e),dd=e=>Xc(e,W9),YH=e=>Xc(e,QH),WE=e=>Xc(e,V9),WH=e=>Xc(e,Y9),XH=e=>Xc(e,G9),xm=e=>Xc(e,X9,!0),Wc=(e,t,n)=>{const r=U9.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Xc=(e,t,n=!1)=>{const r=$9.exec(e);return r?r[1]?t(r[1]):n:!1},V9=e=>e==="position"||e==="percentage",G9=e=>e==="image"||e==="url",Y9=e=>e==="length"||e==="size"||e==="bg-size",W9=e=>e==="length",KH=e=>e==="number",QH=e=>e==="family-name",X9=e=>e==="shadow",ZH=()=>{const e=Rr("color"),t=Rr("font"),n=Rr("text"),r=Rr("font-weight"),a=Rr("tracking"),s=Rr("leading"),o=Rr("breakpoint"),u=Rr("container"),c=Rr("spacing"),d=Rr("radius"),m=Rr("shadow"),p=Rr("inset-shadow"),b=Rr("text-shadow"),y=Rr("drop-shadow"),w=Rr("blur"),S=Rr("perspective"),k=Rr("aspect"),E=Rr("ease"),A=Rr("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...I(),gt,pt],O=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],z=()=>[gt,pt,c],F=()=>[ac,"full","auto",...z()],U=()=>[Ho,"none","subgrid",gt,pt],X=()=>["auto",{span:["full",Ho,gt,pt]},Ho,gt,pt],W=()=>[Ho,"auto",gt,pt],le=()=>["auto","min","max","fr",gt,pt],se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ie=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...z()],K=()=>[ac,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],Z=()=>[e,gt,pt],re=()=>[...I(),WE,YE,{position:[gt,pt]}],j=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",WH,VH,{size:[gt,pt]}],G=()=>[Rb,dd,Bl],L=()=>["","none","full",d,gt,pt],ae=()=>["",rn,dd,Bl],oe=()=>["solid","dashed","dotted","double"],Se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],be=()=>[rn,Rb,WE,YE],fe=()=>["","none",w,gt,pt],Ne=()=>["none",rn,gt,pt],at=()=>["none",rn,gt,pt],Ce=()=>[rn,gt,pt],Re=()=>[ac,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Gi],breakpoint:[Gi],color:[FH],container:[Gi],"drop-shadow":[Gi],ease:["in","out","in-out"],font:[qH],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Gi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Gi],shadow:[Gi],spacing:["px",rn],text:[Gi],"text-shadow":[Gi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ac,pt,gt,k]}],container:["container"],columns:[{columns:[rn,pt,gt,u]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:P()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{start:F()}],end:[{end:F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[Ho,"auto",gt,pt]}],basis:[{basis:[ac,"full","auto",u,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[rn,ac,"auto","initial","none",pt]}],grow:[{grow:["",rn,gt,pt]}],shrink:[{shrink:["",rn,gt,pt]}],order:[{order:[Ho,"first","last","none",gt,pt]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:X()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:X()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":le()}],"auto-rows":[{"auto-rows":le()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...se(),"normal"]}],"justify-items":[{"justify-items":[...ie(),"normal"]}],"justify-self":[{"justify-self":["auto",...ie()]}],"align-content":[{content:["normal",...se()]}],"align-items":[{items:[...ie(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ie(),{baseline:["","last"]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...ie(),"baseline"]}],"place-self":[{"place-self":["auto",...ie()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:K()}],w:[{w:[u,"screen",...K()]}],"min-w":[{"min-w":[u,"screen","none",...K()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[o]},...K()]}],h:[{h:["screen","lh",...K()]}],"min-h":[{"min-h":["screen","lh","none",...K()]}],"max-h":[{"max-h":["screen","lh",...K()]}],"font-size":[{text:["base",n,dd,Bl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,gt,Mb]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Rb,pt]}],"font-family":[{font:[YH,pt,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,gt,pt]}],"line-clamp":[{"line-clamp":[rn,"none",gt,Mb]}],leading:[{leading:[s,...z()]}],"list-image":[{"list-image":["none",gt,pt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",gt,pt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Z()}],"text-color":[{text:Z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[rn,"from-font","auto",gt,Bl]}],"text-decoration-color":[{decoration:Z()}],"underline-offset":[{"underline-offset":[rn,"auto",gt,pt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",gt,pt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",gt,pt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:j()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ho,gt,pt],radial:["",gt,pt],conic:[Ho,gt,pt]},XH,GH]}],"bg-color":[{bg:Z()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:Z()}],"gradient-via":[{via:Z()}],"gradient-to":[{to:Z()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...oe(),"hidden","none"]}],"divide-style":[{divide:[...oe(),"hidden","none"]}],"border-color":[{border:Z()}],"border-color-x":[{"border-x":Z()}],"border-color-y":[{"border-y":Z()}],"border-color-s":[{"border-s":Z()}],"border-color-e":[{"border-e":Z()}],"border-color-t":[{"border-t":Z()}],"border-color-r":[{"border-r":Z()}],"border-color-b":[{"border-b":Z()}],"border-color-l":[{"border-l":Z()}],"divide-color":[{divide:Z()}],"outline-style":[{outline:[...oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[rn,gt,pt]}],"outline-w":[{outline:["",rn,dd,Bl]}],"outline-color":[{outline:Z()}],shadow:[{shadow:["","none",m,xm,bm]}],"shadow-color":[{shadow:Z()}],"inset-shadow":[{"inset-shadow":["none",p,xm,bm]}],"inset-shadow-color":[{"inset-shadow":Z()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Z()}],"ring-offset-w":[{"ring-offset":[rn,Bl]}],"ring-offset-color":[{"ring-offset":Z()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":Z()}],"text-shadow":[{"text-shadow":["none",b,xm,bm]}],"text-shadow-color":[{"text-shadow":Z()}],opacity:[{opacity:[rn,gt,pt]}],"mix-blend":[{"mix-blend":[...Se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[rn]}],"mask-image-linear-from-pos":[{"mask-linear-from":be()}],"mask-image-linear-to-pos":[{"mask-linear-to":be()}],"mask-image-linear-from-color":[{"mask-linear-from":Z()}],"mask-image-linear-to-color":[{"mask-linear-to":Z()}],"mask-image-t-from-pos":[{"mask-t-from":be()}],"mask-image-t-to-pos":[{"mask-t-to":be()}],"mask-image-t-from-color":[{"mask-t-from":Z()}],"mask-image-t-to-color":[{"mask-t-to":Z()}],"mask-image-r-from-pos":[{"mask-r-from":be()}],"mask-image-r-to-pos":[{"mask-r-to":be()}],"mask-image-r-from-color":[{"mask-r-from":Z()}],"mask-image-r-to-color":[{"mask-r-to":Z()}],"mask-image-b-from-pos":[{"mask-b-from":be()}],"mask-image-b-to-pos":[{"mask-b-to":be()}],"mask-image-b-from-color":[{"mask-b-from":Z()}],"mask-image-b-to-color":[{"mask-b-to":Z()}],"mask-image-l-from-pos":[{"mask-l-from":be()}],"mask-image-l-to-pos":[{"mask-l-to":be()}],"mask-image-l-from-color":[{"mask-l-from":Z()}],"mask-image-l-to-color":[{"mask-l-to":Z()}],"mask-image-x-from-pos":[{"mask-x-from":be()}],"mask-image-x-to-pos":[{"mask-x-to":be()}],"mask-image-x-from-color":[{"mask-x-from":Z()}],"mask-image-x-to-color":[{"mask-x-to":Z()}],"mask-image-y-from-pos":[{"mask-y-from":be()}],"mask-image-y-to-pos":[{"mask-y-to":be()}],"mask-image-y-from-color":[{"mask-y-from":Z()}],"mask-image-y-to-color":[{"mask-y-to":Z()}],"mask-image-radial":[{"mask-radial":[gt,pt]}],"mask-image-radial-from-pos":[{"mask-radial-from":be()}],"mask-image-radial-to-pos":[{"mask-radial-to":be()}],"mask-image-radial-from-color":[{"mask-radial-from":Z()}],"mask-image-radial-to-color":[{"mask-radial-to":Z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":I()}],"mask-image-conic-pos":[{"mask-conic":[rn]}],"mask-image-conic-from-pos":[{"mask-conic-from":be()}],"mask-image-conic-to-pos":[{"mask-conic-to":be()}],"mask-image-conic-from-color":[{"mask-conic-from":Z()}],"mask-image-conic-to-color":[{"mask-conic-to":Z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:j()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",gt,pt]}],filter:[{filter:["","none",gt,pt]}],blur:[{blur:fe()}],brightness:[{brightness:[rn,gt,pt]}],contrast:[{contrast:[rn,gt,pt]}],"drop-shadow":[{"drop-shadow":["","none",y,xm,bm]}],"drop-shadow-color":[{"drop-shadow":Z()}],grayscale:[{grayscale:["",rn,gt,pt]}],"hue-rotate":[{"hue-rotate":[rn,gt,pt]}],invert:[{invert:["",rn,gt,pt]}],saturate:[{saturate:[rn,gt,pt]}],sepia:[{sepia:["",rn,gt,pt]}],"backdrop-filter":[{"backdrop-filter":["","none",gt,pt]}],"backdrop-blur":[{"backdrop-blur":fe()}],"backdrop-brightness":[{"backdrop-brightness":[rn,gt,pt]}],"backdrop-contrast":[{"backdrop-contrast":[rn,gt,pt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",rn,gt,pt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[rn,gt,pt]}],"backdrop-invert":[{"backdrop-invert":["",rn,gt,pt]}],"backdrop-opacity":[{"backdrop-opacity":[rn,gt,pt]}],"backdrop-saturate":[{"backdrop-saturate":[rn,gt,pt]}],"backdrop-sepia":[{"backdrop-sepia":["",rn,gt,pt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",gt,pt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[rn,"initial",gt,pt]}],ease:[{ease:["linear","initial",E,gt,pt]}],delay:[{delay:[rn,gt,pt]}],animate:[{animate:["none",A,gt,pt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,gt,pt]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:Ne()}],"rotate-x":[{"rotate-x":Ne()}],"rotate-y":[{"rotate-y":Ne()}],"rotate-z":[{"rotate-z":Ne()}],scale:[{scale:at()}],"scale-x":[{"scale-x":at()}],"scale-y":[{"scale-y":at()}],"scale-z":[{"scale-z":at()}],"scale-3d":["scale-3d"],skew:[{skew:Ce()}],"skew-x":[{"skew-x":Ce()}],"skew-y":[{"skew-y":Ce()}],transform:[{transform:[gt,pt,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Re()}],"translate-x":[{"translate-x":Re()}],"translate-y":[{"translate-y":Re()}],"translate-z":[{"translate-z":Re()}],"translate-none":["translate-none"],accent:[{accent:Z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",gt,pt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",gt,pt]}],fill:[{fill:["none",...Z()]}],"stroke-w":[{stroke:[rn,dd,Bl,Mb]}],stroke:[{stroke:["none",...Z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},K9=DH(ZH);function me(...e){return K9(Wv(e))}function JH(e,t=50){if(!e)return"";const n=e.replace(/\s+/g," ").trim();return n.length<=t?n:`${n.slice(0,t-1)}…`}const eU=du("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-destructive-foreground [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Kv({className:e,variant:t,asChild:n=!1,...r}){const a=n?P9:"span";return h.jsx(a,{"data-slot":"badge",className:me(eU({variant:t}),e),...r})}function ft(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e?.(a),n===!1||!a.defaultPrevented)return t?.(a)}}function tU(e,t){const n=x.createContext(t),r=s=>{const{children:o,...u}=s,c=x.useMemo(()=>u,Object.values(u));return h.jsx(n.Provider,{value:c,children:o})};r.displayName=e+"Provider";function a(s){const o=x.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,a]}function Ua(e,t=[]){let n=[];function r(s,o){const u=x.createContext(o),c=n.length;n=[...n,o];const d=p=>{const{scope:b,children:y,...w}=p,S=b?.[e]?.[c]||u,k=x.useMemo(()=>w,Object.values(w));return h.jsx(S.Provider,{value:k,children:y})};d.displayName=s+"Provider";function m(p,b){const y=b?.[e]?.[c]||u,w=x.useContext(y);if(w)return w;if(o!==void 0)return o;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[d,m]}const a=()=>{const s=n.map(o=>x.createContext(o));return function(u){const c=u?.[e]||s;return x.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return a.scopeName=e,[r,nU(a,...t)]}function nU(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const o=r.reduce((u,{useScope:c,scopeName:d})=>{const p=c(s)[`__scope${d}`];return{...u,...p}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var Pc=I9();const Qv=f1(Pc);function rU(e){const t=aU(e),n=x.forwardRef((r,a)=>{const{children:s,...o}=r,u=x.Children.toArray(s),c=u.find(iU);if(c){const d=c.props.children,m=u.map(p=>p===c?x.Children.count(d)>1?x.Children.only(null):x.isValidElement(d)?d.props.children:null:p);return h.jsx(t,{...o,ref:a,children:x.isValidElement(d)?x.cloneElement(d,void 0,m):null})}return h.jsx(t,{...o,ref:a,children:s})});return n.displayName=`${e}.Slot`,n}function aU(e){const t=x.forwardRef((n,r)=>{const{children:a,...s}=n;if(x.isValidElement(a)){const o=lU(a),u=oU(s,a.props);return a.type!==x.Fragment&&(u.ref=r?Ha(r,o):o),x.cloneElement(a,u)}return x.Children.count(a)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sU=Symbol("radix.slottable");function iU(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sU}function oU(e,t){const n={...t};for(const r in t){const a=e[r],s=t[r];/^on[A-Z]/.test(r)?a&&s?n[r]=(...u)=>{const c=s(...u);return a(...u),c}:a&&(n[r]=a):r==="style"?n[r]={...a,...s}:r==="className"&&(n[r]=[a,s].filter(Boolean).join(" "))}return{...e,...n}}function lU(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var uU=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$t=uU.reduce((e,t)=>{const n=rU(`Primitive.${t}`),r=x.forwardRef((a,s)=>{const{asChild:o,...u}=a,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(c,{...u,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Q9(e,t){e&&Pc.flushSync(()=>e.dispatchEvent(t))}function cU(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var Hr=e=>{const{present:t,children:n}=e,r=dU(t),a=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),s=Tn(r.ref,fU(a));return typeof n=="function"||r.isPresent?x.cloneElement(a,{ref:s}):null};Hr.displayName="Presence";function dU(e){const[t,n]=x.useState(),r=x.useRef(null),a=x.useRef(e),s=x.useRef("none"),o=e?"mounted":"unmounted",[u,c]=cU(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const d=ym(r.current);s.current=u==="mounted"?d:"none"},[u]),xi(()=>{const d=r.current,m=a.current;if(m!==e){const b=s.current,y=ym(d);e?c("MOUNT"):y==="none"||d?.display==="none"?c("UNMOUNT"):c(m&&b!==y?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,c]),xi(()=>{if(t){let d;const m=t.ownerDocument.defaultView??window,p=y=>{const S=ym(r.current).includes(CSS.escape(y.animationName));if(y.target===t&&S&&(c("ANIMATION_END"),!a.current)){const k=t.style.animationFillMode;t.style.animationFillMode="forwards",d=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=k)})}},b=y=>{y.target===t&&(s.current=ym(r.current))};return t.addEventListener("animationstart",b),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{m.clearTimeout(d),t.removeEventListener("animationstart",b),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:x.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function ym(e){return e?.animationName||"none"}function fU(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var hU=Yv[" useId ".trim().toString()]||(()=>{}),mU=0;function za(e){const[t,n]=x.useState(hU());return xi(()=>{n(r=>r??String(mU++))},[e]),e||(t?`radix-${t}`:"")}var h1="Collapsible",[pU]=Ua(h1),[gU,Zv]=pU(h1),Z9=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:a,disabled:s,onOpenChange:o,...u}=e,[c,d]=Fa({prop:r,defaultProp:a??!1,onChange:o,caller:h1});return h.jsx(gU,{scope:n,disabled:s,contentId:za(),open:c,onOpenToggle:x.useCallback(()=>d(m=>!m),[d]),children:h.jsx($t.div,{"data-state":e4(c),"data-disabled":s?"":void 0,...u,ref:t})})});Z9.displayName=h1;var J9="CollapsibleTrigger",eA=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,a=Zv(J9,n);return h.jsx($t.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":e4(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...r,ref:t,onClick:ft(e.onClick,a.onOpenToggle)})});eA.displayName=J9;var Jv="CollapsibleContent",tA=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Zv(Jv,e.__scopeCollapsible);return h.jsx(Hr,{present:n||a.open,children:({present:s})=>h.jsx(bU,{...r,ref:t,present:s})})});tA.displayName=Jv;var bU=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:a,...s}=e,o=Zv(Jv,n),[u,c]=x.useState(r),d=x.useRef(null),m=Tn(t,d),p=x.useRef(0),b=p.current,y=x.useRef(0),w=y.current,S=o.open||u,k=x.useRef(S),E=x.useRef(void 0);return x.useEffect(()=>{const A=requestAnimationFrame(()=>k.current=!1);return()=>cancelAnimationFrame(A)},[]),xi(()=>{const A=d.current;if(A){E.current=E.current||{transitionDuration:A.style.transitionDuration,animationName:A.style.animationName},A.style.transitionDuration="0s",A.style.animationName="none";const _=A.getBoundingClientRect();p.current=_.height,y.current=_.width,k.current||(A.style.transitionDuration=E.current.transitionDuration,A.style.animationName=E.current.animationName),c(r)}},[o.open,r]),h.jsx($t.div,{"data-state":e4(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!S,...s,ref:m,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:S&&a})});function e4(e){return e?"open":"closed"}var xU=Z9;function rl({...e}){return h.jsx(xU,{"data-slot":"collapsible",...e})}function eu({...e}){return h.jsx(eA,{"data-slot":"collapsible-trigger",...e,className:me(e.className,"cursor-pointer")})}function tu({...e}){return h.jsx(tA,{"data-slot":"collapsible-content",...e})}const yU=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),vU=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),XE=e=>{const t=vU(e);return t.charAt(0).toUpperCase()+t.slice(1)},nA=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),wU=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var TU={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"};const EU=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:s,iconNode:o,...u},c)=>x.createElement("svg",{ref:c,...TU,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:nA("lucide",a),...!s&&!wU(u)&&{"aria-hidden":"true"},...u},[...o.map(([d,m])=>x.createElement(d,m)),...Array.isArray(s)?s:[s]]));const lt=(e,t)=>{const n=x.forwardRef(({className:r,...a},s)=>x.createElement(EU,{ref:s,iconNode:t,className:nA(`lucide-${yU(XE(e))}`,`lucide-${e}`,r),...a}));return n.displayName=XE(e),n};const SU=[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]],rA=lt("app-window",SU);const CU=[["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"}]],Db=lt("archive-restore",CU);const kU=[["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"}]],vm=lt("archive",kU);const AU=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],NU=lt("arrow-down",AU);const _U=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],RU=lt("arrow-right",_U);const MU=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],aA=lt("arrow-up",MU);const DU=[["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"}]],sA=lt("bot",DU);const IU=[["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"}]],t4=lt("brain",IU);const OU=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],fo=lt("check",OU);const LU=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ro=lt("chevron-down",LU);const PU=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],jU=lt("chevron-left",PU);const zU=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],fu=lt("chevron-right",zU);const BU=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],FU=lt("chevron-up",BU);const HU=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],UU=lt("chevrons-down-up",HU);const $U=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],qU=lt("chevrons-up-down",$U);const VU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],GU=lt("circle-alert",VU);const YU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],iA=lt("circle-check",YU);const WU=[["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"}]],XU=lt("circle-dashed",WU);const KU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],QU=lt("circle-dot",KU);const ZU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],oA=lt("circle",ZU);const JU=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],lA=lt("code",JU);const e$=[["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"}]],Kc=lt("copy",e$);const t$=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],n$=lt("corner-down-left",t$);const r$=[["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"}]],a$=lt("cpu",r$);const s$=[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]],i$=lt("dot",s$);const o$=[["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"}]],uA=lt("download",o$);const l$=[["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"}]],cA=lt("external-link",l$);const u$=[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],KE=lt("file-pen",u$);const c$=[["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"}]],dA=lt("file-text",c$);const d$=[["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"}]],fA=lt("file",d$);const f$=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Zd=lt("folder-open",f$);const h$=[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 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 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]],m$=lt("folder-search",h$);const p$=[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]],g$=lt("folder-tree",p$);const b$=[["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"}]],QE=lt("folder",b$);const x$=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],hA=lt("git-branch",x$);const y$=[["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"}]],v$=lt("globe",y$);const w$=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],T$=lt("house",w$);const E$=[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]],mA=lt("image-off",E$);const S$=[["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"}]],C$=lt("image",S$);const k$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],A$=lt("info",k$);const N$=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],_$=lt("link",N$);const R$=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],M$=lt("list-checks",R$);const D$=[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]],I$=lt("list-ordered",D$);const O$=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],L$=lt("list",O$);const P$=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ma=lt("loader-circle",P$);const j$=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],z$=lt("mail",j$);const B$=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],pA=lt("maximize-2",B$);const F$=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],gA=lt("minimize-2",F$);const H$=[["path",{d:"M5 12h14",key:"1ays0h"}]],U$=lt("minus",H$);const $$=[["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"}]],q$=lt("moon",$$);const V$=[["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"}]],bA=lt("panel-left-close",V$);const G$=[["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"}]],xA=lt("panel-left-open",G$);const Y$=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]],yA=lt("panel-right-close",Y$);const W$=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}]],X$=lt("panel-right-open",W$);const K$=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],m1=lt("paperclip",K$);const Q$=[["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"}]],vA=lt("pencil",Q$);const Z$=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],py=lt("plus",Z$);const J$=[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]],ZE=lt("refresh-ccw",J$);const eq=[["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"}]],p1=lt("refresh-cw",eq);const tq=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Nf=lt("search",tq);const nq=[["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"}]],wA=lt("sparkles",nq);const rq=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],wm=lt("square-check-big",rq);const aq=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],sq=lt("square-check",aq);const iq=[["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"}]],TA=lt("square-terminal",iq);const oq=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Rd=lt("square",oq);const lq=[["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"}]],uq=lt("sun",lq);const cq=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],n4=lt("terminal",cq);const dq=[["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"}]],fc=lt("trash-2",dq);const fq=[["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"}]],r4=lt("triangle-alert",fq);const hq=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],mq=lt("user",hq);const pq=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],gq=lt("video",pq);const bq=[["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"}]],xq=lt("workflow",bq);const yq=[["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"}]],vq=lt("wrench",yq);const wq=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],rs=lt("x",wq),EA=x.createContext(null),SA=()=>{const e=x.useContext(EA);if(!e)throw new Error("ChainOfThought components must be used within ChainOfThought");return e},CA=x.memo(({className:e,open:t,defaultOpen:n=!1,onOpenChange:r,children:a,...s})=>{const[o,u]=Fa({prop:t,defaultProp:n,onChange:r}),c=x.useMemo(()=>({isOpen:o,setIsOpen:u}),[o,u]);return h.jsx(EA.Provider,{value:c,children:h.jsx("div",{className:me("not-prose max-w-prose space-y-4",e),...s,children:a})})}),kA=x.memo(({className:e,children:t,...n})=>{const{isOpen:r,setIsOpen:a}=SA();return h.jsx(rl,{onOpenChange:a,open:r,children:h.jsxs(eu,{className:me("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...n,children:[h.jsx(t4,{className:"size-4"}),h.jsx("span",{className:"flex-1 text-left",children:t??"Chain of Thought"}),h.jsx(ro,{className:me("size-4 transition-transform",r?"rotate-180":"rotate-0")})]})})}),AA=x.memo(({className:e,icon:t=i$,label:n,description:r,status:a="complete",children:s,...o})=>{const u={complete:"text-muted-foreground",active:"text-foreground",pending:"text-muted-foreground/50"};return h.jsxs("div",{className:me("flex gap-2 text-sm group/step",u[a],"fade-in-0 slide-in-from-top-2 animate-in",e),...o,children:[h.jsxs("div",{className:"relative mt-0.5",children:[h.jsx(t,{className:"size-4"}),h.jsx("div",{className:"-mx-px absolute top-7 bottom-0 left-1/2 w-px bg-border group-last/step:hidden"})]}),h.jsxs("div",{className:"flex-1 space-y-2",children:[h.jsx("div",{children:n}),r&&h.jsx("div",{className:"text-muted-foreground text-xs",children:r}),s]})]})}),NA=x.memo(({className:e,...t})=>h.jsx("div",{className:me("flex items-center gap-2",e),...t})),_A=x.memo(({className:e,children:t,...n})=>h.jsx(Kv,{className:me("gap-1 px-2 py-0.5 font-normal text-xs",e),variant:"secondary",...n,children:t})),RA=x.memo(({className:e,children:t,...n})=>{const{isOpen:r}=SA();return h.jsx(rl,{open:r,children:h.jsx(tu,{className:me("mt-2 space-y-3","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...n,children:t})})}),Tq=x.memo(({className:e,children:t,caption:n,...r})=>h.jsxs("div",{className:me("mt-2 space-y-2",e),...r,children:[h.jsx("div",{className:"relative flex max-h-[22rem] items-center justify-center overflow-hidden rounded-lg bg-muted p-3",children:t}),n&&h.jsx("p",{className:"text-muted-foreground text-xs",children:n})]}));CA.displayName="ChainOfThought";kA.displayName="ChainOfThoughtHeader";AA.displayName="ChainOfThoughtStep";NA.displayName="ChainOfThoughtSearchResults";_A.displayName="ChainOfThoughtSearchResult";RA.displayName="ChainOfThoughtContent";Tq.displayName="ChainOfThoughtImage";var Eq=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Sq="VisuallyHidden",MA=x.forwardRef((e,t)=>h.jsx($t.span,{...e,ref:t,style:{...Eq,...e.style}}));MA.displayName=Sq;var Cq=MA;function JE(e){const t=kq(e),n=x.forwardRef((r,a)=>{const{children:s,...o}=r,u=x.Children.toArray(s),c=u.find(Nq);if(c){const d=c.props.children,m=u.map(p=>p===c?x.Children.count(d)>1?x.Children.only(null):x.isValidElement(d)?d.props.children:null:p);return h.jsx(t,{...o,ref:a,children:x.isValidElement(d)?x.cloneElement(d,void 0,m):null})}return h.jsx(t,{...o,ref:a,children:s})});return n.displayName=`${e}.Slot`,n}function kq(e){const t=x.forwardRef((n,r)=>{const{children:a,...s}=n;if(x.isValidElement(a)){const o=Rq(a),u=_q(s,a.props);return a.type!==x.Fragment&&(u.ref=r?Ha(r,o):o),x.cloneElement(a,u)}return x.Children.count(a)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Aq=Symbol("radix.slottable");function Nq(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Aq}function _q(e,t){const n={...t};for(const r in t){const a=e[r],s=t[r];/^on[A-Z]/.test(r)?a&&s?n[r]=(...u)=>{const c=s(...u);return a(...u),c}:a&&(n[r]=a):r==="style"?n[r]={...a,...s}:r==="className"&&(n[r]=[a,s].filter(Boolean).join(" "))}return{...e,...n}}function Rq(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function DA(e){const t=e+"CollectionProvider",[n,r]=Ua(t),[a,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=S=>{const{scope:k,children:E}=S,A=ge.useRef(null),_=ge.useRef(new Map).current;return h.jsx(a,{scope:k,itemMap:_,collectionRef:A,children:E})};o.displayName=t;const u=e+"CollectionSlot",c=JE(u),d=ge.forwardRef((S,k)=>{const{scope:E,children:A}=S,_=s(u,E),I=Tn(k,_.collectionRef);return h.jsx(c,{ref:I,children:A})});d.displayName=u;const m=e+"CollectionItemSlot",p="data-radix-collection-item",b=JE(m),y=ge.forwardRef((S,k)=>{const{scope:E,children:A,..._}=S,I=ge.useRef(null),P=Tn(k,I),O=s(m,E);return ge.useEffect(()=>(O.itemMap.set(I,{ref:I,..._}),()=>{O.itemMap.delete(I)})),h.jsx(b,{[p]:"",ref:P,children:A})});y.displayName=m;function w(S){const k=s(e+"CollectionConsumer",S);return ge.useCallback(()=>{const A=k.collectionRef.current;if(!A)return[];const _=Array.from(A.querySelectorAll(`[${p}]`));return Array.from(k.itemMap.values()).sort((O,R)=>_.indexOf(O.ref.current)-_.indexOf(R.ref.current))},[k.collectionRef,k.itemMap])}return[{Provider:o,Slot:d,ItemSlot:y},w,r]}var Mq=x.createContext(void 0);function g1(e){const t=x.useContext(Mq);return e||t||"ltr"}function ra(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>t.current?.(...n),[])}function Dq(e,t=globalThis?.document){const n=ra(e);x.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Iq="DismissableLayer",gy="dismissableLayer.update",Oq="dismissableLayer.pointerDownOutside",Lq="dismissableLayer.focusOutside",e8,IA=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_f=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:o,onDismiss:u,...c}=e,d=x.useContext(IA),[m,p]=x.useState(null),b=m?.ownerDocument??globalThis?.document,[,y]=x.useState({}),w=Tn(t,R=>p(R)),S=Array.from(d.layers),[k]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),E=S.indexOf(k),A=m?S.indexOf(m):-1,_=d.layersWithOutsidePointerEventsDisabled.size>0,I=A>=E,P=zq(R=>{const z=R.target,F=[...d.branches].some(U=>U.contains(z));!I||F||(a?.(R),o?.(R),R.defaultPrevented||u?.())},b),O=Bq(R=>{const z=R.target;[...d.branches].some(U=>U.contains(z))||(s?.(R),o?.(R),R.defaultPrevented||u?.())},b);return Dq(R=>{A===d.layers.size-1&&(r?.(R),!R.defaultPrevented&&u&&(R.preventDefault(),u()))},b),x.useEffect(()=>{if(m)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(e8=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(m)),d.layers.add(m),t8(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=e8)}},[m,b,n,d]),x.useEffect(()=>()=>{m&&(d.layers.delete(m),d.layersWithOutsidePointerEventsDisabled.delete(m),t8())},[m,d]),x.useEffect(()=>{const R=()=>y({});return document.addEventListener(gy,R),()=>document.removeEventListener(gy,R)},[]),h.jsx($t.div,{...c,ref:w,style:{pointerEvents:_?I?"auto":"none":void 0,...e.style},onFocusCapture:ft(e.onFocusCapture,O.onFocusCapture),onBlurCapture:ft(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:ft(e.onPointerDownCapture,P.onPointerDownCapture)})});_f.displayName=Iq;var Pq="DismissableLayerBranch",jq=x.forwardRef((e,t)=>{const n=x.useContext(IA),r=x.useRef(null),a=Tn(t,r);return x.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),h.jsx($t.div,{...e,ref:a})});jq.displayName=Pq;function zq(e,t=globalThis?.document){const n=ra(e),r=x.useRef(!1),a=x.useRef(()=>{});return x.useEffect(()=>{const s=u=>{if(u.target&&!r.current){let c=function(){OA(Oq,n,d,{discrete:!0})};const d={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=c,t.addEventListener("click",a.current,{once:!0})):c()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",s),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Bq(e,t=globalThis?.document){const n=ra(e),r=x.useRef(!1);return x.useEffect(()=>{const a=s=>{s.target&&!r.current&&OA(Lq,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function t8(){const e=new CustomEvent(gy);document.dispatchEvent(e)}function OA(e,t,n,{discrete:r}){const a=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Q9(a,s):a.dispatchEvent(s)}var Ib="focusScope.autoFocusOnMount",Ob="focusScope.autoFocusOnUnmount",n8={bubbles:!1,cancelable:!0},Fq="FocusScope",a4=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...o}=e,[u,c]=x.useState(null),d=ra(a),m=ra(s),p=x.useRef(null),b=Tn(t,S=>c(S)),y=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let S=function(_){if(y.paused||!u)return;const I=_.target;u.contains(I)?p.current=I:Go(p.current,{select:!0})},k=function(_){if(y.paused||!u)return;const I=_.relatedTarget;I!==null&&(u.contains(I)||Go(p.current,{select:!0}))},E=function(_){if(document.activeElement===document.body)for(const P of _)P.removedNodes.length>0&&Go(u)};document.addEventListener("focusin",S),document.addEventListener("focusout",k);const A=new MutationObserver(E);return u&&A.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",k),A.disconnect()}}},[r,u,y.paused]),x.useEffect(()=>{if(u){a8.add(y);const S=document.activeElement;if(!u.contains(S)){const E=new CustomEvent(Ib,n8);u.addEventListener(Ib,d),u.dispatchEvent(E),E.defaultPrevented||(Hq(Gq(LA(u)),{select:!0}),document.activeElement===S&&Go(u))}return()=>{u.removeEventListener(Ib,d),setTimeout(()=>{const E=new CustomEvent(Ob,n8);u.addEventListener(Ob,m),u.dispatchEvent(E),E.defaultPrevented||Go(S??document.body,{select:!0}),u.removeEventListener(Ob,m),a8.remove(y)},0)}}},[u,d,m,y]);const w=x.useCallback(S=>{if(!n&&!r||y.paused)return;const k=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,E=document.activeElement;if(k&&E){const A=S.currentTarget,[_,I]=Uq(A);_&&I?!S.shiftKey&&E===I?(S.preventDefault(),n&&Go(_,{select:!0})):S.shiftKey&&E===_&&(S.preventDefault(),n&&Go(I,{select:!0})):E===A&&S.preventDefault()}},[n,r,y.paused]);return h.jsx($t.div,{tabIndex:-1,...o,ref:b,onKeyDown:w})});a4.displayName=Fq;function Hq(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Go(r,{select:t}),document.activeElement!==n)return}function Uq(e){const t=LA(e),n=r8(t,e),r=r8(t.reverse(),e);return[n,r]}function LA(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function r8(e,t){for(const n of e)if(!$q(n,{upTo:t}))return n}function $q(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function qq(e){return e instanceof HTMLInputElement&&"select"in e}function Go(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&qq(e)&&t&&e.select()}}var a8=Vq();function Vq(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=s8(e,t),e.unshift(t)},remove(t){e=s8(e,t),e[0]?.resume()}}}function s8(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Gq(e){return e.filter(t=>t.tagName!=="A")}var Yq="Portal",Rf=x.forwardRef((e,t)=>{const{container:n,...r}=e,[a,s]=x.useState(!1);xi(()=>s(!0),[]);const o=n||a&&globalThis?.document?.body;return o?Qv.createPortal(h.jsx($t.div,{...r,ref:t}),o):null});Rf.displayName=Yq;var Lb=0;function PA(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??i8()),document.body.insertAdjacentElement("beforeend",e[1]??i8()),Lb++,()=>{Lb===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Lb--}},[])}function i8(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ci=function(){return ci=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ci.apply(this,arguments)};function jA(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function Wq(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,s;r<a;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var ap="right-scroll-bar-position",sp="width-before-scroll-bar",Xq="with-scroll-bars-hidden",Kq="--removed-body-scroll-bar-size";function Pb(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Qq(e,t){var n=x.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var Zq=typeof window<"u"?x.useLayoutEffect:x.useEffect,o8=new WeakMap;function Jq(e,t){var n=Qq(null,function(r){return e.forEach(function(a){return Pb(a,r)})});return Zq(function(){var r=o8.get(n);if(r){var a=new Set(r),s=new Set(e),o=n.current;a.forEach(function(u){s.has(u)||Pb(u,null)}),s.forEach(function(u){a.has(u)||Pb(u,o)})}o8.set(n,e)},[e]),n}function eV(e){return e}function tV(e,t){t===void 0&&(t=eV);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var o=t(s,r);return n.push(o),function(){n=n.filter(function(u){return u!==o})}},assignSyncMedium:function(s){for(r=!0;n.length;){var o=n;n=[],o.forEach(s)}n={push:function(u){return s(u)},filter:function(){return n}}},assignMedium:function(s){r=!0;var o=[];if(n.length){var u=n;n=[],u.forEach(s),o=n}var c=function(){var m=o;o=[],m.forEach(s)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(m){o.push(m),d()},filter:function(m){return o=o.filter(m),n}}}};return a}function nV(e){e===void 0&&(e={});var t=tV(null);return t.options=ci({async:!0,ssr:!1},e),t}var zA=function(e){var t=e.sideCar,n=jA(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x.createElement(r,ci({},n))};zA.isSideCarExport=!0;function rV(e,t){return e.useMedium(t),zA}var BA=nV(),jb=function(){},b1=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:jb,onWheelCapture:jb,onTouchMoveCapture:jb}),a=r[0],s=r[1],o=e.forwardProps,u=e.children,c=e.className,d=e.removeScrollBar,m=e.enabled,p=e.shards,b=e.sideCar,y=e.noRelative,w=e.noIsolation,S=e.inert,k=e.allowPinchZoom,E=e.as,A=E===void 0?"div":E,_=e.gapMode,I=jA(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=b,O=Jq([n,t]),R=ci(ci({},I),a);return x.createElement(x.Fragment,null,m&&x.createElement(P,{sideCar:BA,removeScrollBar:d,shards:p,noRelative:y,noIsolation:w,inert:S,setCallbacks:s,allowPinchZoom:!!k,lockRef:n,gapMode:_}),o?x.cloneElement(x.Children.only(u),ci(ci({},R),{ref:O})):x.createElement(A,ci({},R,{className:c,ref:O}),u))});b1.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};b1.classNames={fullWidth:sp,zeroRight:ap};var aV=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function sV(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=aV();return t&&e.setAttribute("nonce",t),e}function iV(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function oV(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var lV=function(){var e=0,t=null;return{add:function(n){e==0&&(t=sV())&&(iV(t,n),oV(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},uV=function(){var e=lV();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},FA=function(){var e=uV(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},cV={left:0,top:0,right:0,gap:0},zb=function(e){return parseInt(e||"",10)||0},dV=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[zb(n),zb(r),zb(a)]},fV=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return cV;var t=dV(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},hV=FA(),kc="data-scroll-locked",mV=function(e,t,n,r){var a=e.left,s=e.top,o=e.right,u=e.gap;return n===void 0&&(n="margin"),`
|
|
11
|
+
.`.concat(Xq,` {
|
|
12
|
+
overflow: hidden `).concat(r,`;
|
|
13
|
+
padding-right: `).concat(u,"px ").concat(r,`;
|
|
14
|
+
}
|
|
15
|
+
body[`).concat(kc,`] {
|
|
16
|
+
overflow: hidden `).concat(r,`;
|
|
17
|
+
overscroll-behavior: contain;
|
|
18
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
19
|
+
padding-left: `.concat(a,`px;
|
|
20
|
+
padding-top: `).concat(s,`px;
|
|
21
|
+
padding-right: `).concat(o,`px;
|
|
22
|
+
margin-left:0;
|
|
23
|
+
margin-top:0;
|
|
24
|
+
margin-right: `).concat(u,"px ").concat(r,`;
|
|
25
|
+
`),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.`).concat(ap,` {
|
|
29
|
+
right: `).concat(u,"px ").concat(r,`;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.`).concat(sp,` {
|
|
33
|
+
margin-right: `).concat(u,"px ").concat(r,`;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.`).concat(ap," .").concat(ap,` {
|
|
37
|
+
right: 0 `).concat(r,`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.`).concat(sp," .").concat(sp,` {
|
|
41
|
+
margin-right: 0 `).concat(r,`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
body[`).concat(kc,`] {
|
|
45
|
+
`).concat(Kq,": ").concat(u,`px;
|
|
46
|
+
}
|
|
47
|
+
`)},l8=function(){var e=parseInt(document.body.getAttribute(kc)||"0",10);return isFinite(e)?e:0},pV=function(){x.useEffect(function(){return document.body.setAttribute(kc,(l8()+1).toString()),function(){var e=l8()-1;e<=0?document.body.removeAttribute(kc):document.body.setAttribute(kc,e.toString())}},[])},gV=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;pV();var s=x.useMemo(function(){return fV(a)},[a]);return x.createElement(hV,{styles:mV(s,!t,a,n?"":"!important")})},by=!1;if(typeof window<"u")try{var Tm=Object.defineProperty({},"passive",{get:function(){return by=!0,!0}});window.addEventListener("test",Tm,Tm),window.removeEventListener("test",Tm,Tm)}catch{by=!1}var sc=by?{passive:!1}:!1,bV=function(e){return e.tagName==="TEXTAREA"},HA=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!bV(e)&&n[t]==="visible")},xV=function(e){return HA(e,"overflowY")},yV=function(e){return HA(e,"overflowX")},u8=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=UA(e,r);if(a){var s=$A(e,r),o=s[1],u=s[2];if(o>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},vV=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},wV=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},UA=function(e,t){return e==="v"?xV(t):yV(t)},$A=function(e,t){return e==="v"?vV(t):wV(t)},TV=function(e,t){return e==="h"&&t==="rtl"?-1:1},EV=function(e,t,n,r,a){var s=TV(e,window.getComputedStyle(t).direction),o=s*r,u=n.target,c=t.contains(u),d=!1,m=o>0,p=0,b=0;do{if(!u)break;var y=$A(e,u),w=y[0],S=y[1],k=y[2],E=S-k-s*w;(w||E)&&UA(e,u)&&(p+=E,b+=w);var A=u.parentNode;u=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!c&&u!==document.body||c&&(t.contains(u)||t===u));return(m&&Math.abs(p)<1||!m&&Math.abs(b)<1)&&(d=!0),d},Em=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},c8=function(e){return[e.deltaX,e.deltaY]},d8=function(e){return e&&"current"in e?e.current:e},SV=function(e,t){return e[0]===t[0]&&e[1]===t[1]},CV=function(e){return`
|
|
48
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
49
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
50
|
+
`)},kV=0,ic=[];function AV(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),a=x.useState(kV++)[0],s=x.useState(FA)[0],o=x.useRef(e);x.useEffect(function(){o.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var S=Wq([e.lockRef.current],(e.shards||[]).map(d8),!0).filter(Boolean);return S.forEach(function(k){return k.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),S.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var u=x.useCallback(function(S,k){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!o.current.allowPinchZoom;var E=Em(S),A=n.current,_="deltaX"in S?S.deltaX:A[0]-E[0],I="deltaY"in S?S.deltaY:A[1]-E[1],P,O=S.target,R=Math.abs(_)>Math.abs(I)?"h":"v";if("touches"in S&&R==="h"&&O.type==="range")return!1;var z=window.getSelection(),F=z&&z.anchorNode,U=F?F===O||F.contains(O):!1;if(U)return!1;var X=u8(R,O);if(!X)return!0;if(X?P=R:(P=R==="v"?"h":"v",X=u8(R,O)),!X)return!1;if(!r.current&&"changedTouches"in S&&(_||I)&&(r.current=P),!P)return!0;var W=r.current||P;return EV(W,k,S,W==="h"?_:I)},[]),c=x.useCallback(function(S){var k=S;if(!(!ic.length||ic[ic.length-1]!==s)){var E="deltaY"in k?c8(k):Em(k),A=t.current.filter(function(P){return P.name===k.type&&(P.target===k.target||k.target===P.shadowParent)&&SV(P.delta,E)})[0];if(A&&A.should){k.cancelable&&k.preventDefault();return}if(!A){var _=(o.current.shards||[]).map(d8).filter(Boolean).filter(function(P){return P.contains(k.target)}),I=_.length>0?u(k,_[0]):!o.current.noIsolation;I&&k.cancelable&&k.preventDefault()}}},[]),d=x.useCallback(function(S,k,E,A){var _={name:S,delta:k,target:E,should:A,shadowParent:NV(E)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(I){return I!==_})},1)},[]),m=x.useCallback(function(S){n.current=Em(S),r.current=void 0},[]),p=x.useCallback(function(S){d(S.type,c8(S),S.target,u(S,e.lockRef.current))},[]),b=x.useCallback(function(S){d(S.type,Em(S),S.target,u(S,e.lockRef.current))},[]);x.useEffect(function(){return ic.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:b}),document.addEventListener("wheel",c,sc),document.addEventListener("touchmove",c,sc),document.addEventListener("touchstart",m,sc),function(){ic=ic.filter(function(S){return S!==s}),document.removeEventListener("wheel",c,sc),document.removeEventListener("touchmove",c,sc),document.removeEventListener("touchstart",m,sc)}},[]);var y=e.removeScrollBar,w=e.inert;return x.createElement(x.Fragment,null,w?x.createElement(s,{styles:CV(a)}):null,y?x.createElement(gV,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function NV(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const _V=rV(BA,AV);var s4=x.forwardRef(function(e,t){return x.createElement(b1,ci({},e,{ref:t,sideCar:_V}))});s4.classNames=b1.classNames;var RV=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},oc=new WeakMap,Sm=new WeakMap,Cm={},Bb=0,qA=function(e){return e&&(e.host||qA(e.parentNode))},MV=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=qA(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},DV=function(e,t,n,r){var a=MV(t,Array.isArray(e)?e:[e]);Cm[n]||(Cm[n]=new WeakMap);var s=Cm[n],o=[],u=new Set,c=new Set(a),d=function(p){!p||u.has(p)||(u.add(p),d(p.parentNode))};a.forEach(d);var m=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(b){if(u.has(b))m(b);else try{var y=b.getAttribute(r),w=y!==null&&y!=="false",S=(oc.get(b)||0)+1,k=(s.get(b)||0)+1;oc.set(b,S),s.set(b,k),o.push(b),S===1&&w&&Sm.set(b,!0),k===1&&b.setAttribute(n,"true"),w||b.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",b,E)}})};return m(t),u.clear(),Bb++,function(){o.forEach(function(p){var b=oc.get(p)-1,y=s.get(p)-1;oc.set(p,b),s.set(p,y),b||(Sm.has(p)||p.removeAttribute(r),Sm.delete(p)),y||p.removeAttribute(n)}),Bb--,Bb||(oc=new WeakMap,oc=new WeakMap,Sm=new WeakMap,Cm={})}},VA=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=RV(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),DV(r,a,n,"aria-hidden")):function(){return null}};function IV(e){const t=OV(e),n=x.forwardRef((r,a)=>{const{children:s,...o}=r,u=x.Children.toArray(s),c=u.find(PV);if(c){const d=c.props.children,m=u.map(p=>p===c?x.Children.count(d)>1?x.Children.only(null):x.isValidElement(d)?d.props.children:null:p);return h.jsx(t,{...o,ref:a,children:x.isValidElement(d)?x.cloneElement(d,void 0,m):null})}return h.jsx(t,{...o,ref:a,children:s})});return n.displayName=`${e}.Slot`,n}function OV(e){const t=x.forwardRef((n,r)=>{const{children:a,...s}=n;if(x.isValidElement(a)){const o=zV(a),u=jV(s,a.props);return a.type!==x.Fragment&&(u.ref=r?Ha(r,o):o),x.cloneElement(a,u)}return x.Children.count(a)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var LV=Symbol("radix.slottable");function PV(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===LV}function jV(e,t){const n={...t};for(const r in t){const a=e[r],s=t[r];/^on[A-Z]/.test(r)?a&&s?n[r]=(...u)=>{const c=s(...u);return a(...u),c}:a&&(n[r]=a):r==="style"?n[r]={...a,...s}:r==="className"&&(n[r]=[a,s].filter(Boolean).join(" "))}return{...e,...n}}function zV(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var x1="Dialog",[GA,YA]=Ua(x1),[BV,Ys]=GA(x1),WA=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:s,modal:o=!0}=e,u=x.useRef(null),c=x.useRef(null),[d,m]=Fa({prop:r,defaultProp:a??!1,onChange:s,caller:x1});return h.jsx(BV,{scope:t,triggerRef:u,contentRef:c,contentId:za(),titleId:za(),descriptionId:za(),open:d,onOpenChange:m,onOpenToggle:x.useCallback(()=>m(p=>!p),[m]),modal:o,children:n})};WA.displayName=x1;var XA="DialogTrigger",KA=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ys(XA,n),s=Tn(t,a.triggerRef);return h.jsx($t.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":l4(a.open),...r,ref:s,onClick:ft(e.onClick,a.onOpenToggle)})});KA.displayName=XA;var i4="DialogPortal",[FV,QA]=GA(i4,{forceMount:void 0}),ZA=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,s=Ys(i4,t);return h.jsx(FV,{scope:t,forceMount:n,children:x.Children.map(r,o=>h.jsx(Hr,{present:n||s.open,children:h.jsx(Rf,{asChild:!0,container:a,children:o})}))})};ZA.displayName=i4;var Tp="DialogOverlay",JA=x.forwardRef((e,t)=>{const n=QA(Tp,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,s=Ys(Tp,e.__scopeDialog);return s.modal?h.jsx(Hr,{present:r||s.open,children:h.jsx(UV,{...a,ref:t})}):null});JA.displayName=Tp;var HV=IV("DialogOverlay.RemoveScroll"),UV=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ys(Tp,n);return h.jsx(s4,{as:HV,allowPinchZoom:!0,shards:[a.contentRef],children:h.jsx($t.div,{"data-state":l4(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),nu="DialogContent",eN=x.forwardRef((e,t)=>{const n=QA(nu,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,s=Ys(nu,e.__scopeDialog);return h.jsx(Hr,{present:r||s.open,children:s.modal?h.jsx($V,{...a,ref:t}):h.jsx(qV,{...a,ref:t})})});eN.displayName=nu;var $V=x.forwardRef((e,t)=>{const n=Ys(nu,e.__scopeDialog),r=x.useRef(null),a=Tn(t,n.contentRef,r);return x.useEffect(()=>{const s=r.current;if(s)return VA(s)},[]),h.jsx(tN,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ft(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:ft(e.onPointerDownOutside,s=>{const o=s.detail.originalEvent,u=o.button===0&&o.ctrlKey===!0;(o.button===2||u)&&s.preventDefault()}),onFocusOutside:ft(e.onFocusOutside,s=>s.preventDefault())})}),qV=x.forwardRef((e,t)=>{const n=Ys(nu,e.__scopeDialog),r=x.useRef(!1),a=x.useRef(!1);return h.jsx(tN,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const o=s.target;n.triggerRef.current?.contains(o)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&a.current&&s.preventDefault()}})}),tN=x.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:s,...o}=e,u=Ys(nu,n),c=x.useRef(null),d=Tn(t,c);return PA(),h.jsxs(h.Fragment,{children:[h.jsx(a4,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:s,children:h.jsx(_f,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":l4(u.open),...o,ref:d,onDismiss:()=>u.onOpenChange(!1)})}),h.jsxs(h.Fragment,{children:[h.jsx(GV,{titleId:u.titleId}),h.jsx(WV,{contentRef:c,descriptionId:u.descriptionId})]})]})}),o4="DialogTitle",nN=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ys(o4,n);return h.jsx($t.h2,{id:a.titleId,...r,ref:t})});nN.displayName=o4;var rN="DialogDescription",aN=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ys(rN,n);return h.jsx($t.p,{id:a.descriptionId,...r,ref:t})});aN.displayName=rN;var sN="DialogClose",iN=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ys(sN,n);return h.jsx($t.button,{type:"button",...r,ref:t,onClick:ft(e.onClick,()=>a.onOpenChange(!1))})});iN.displayName=sN;function l4(e){return e?"open":"closed"}var oN="DialogTitleWarning",[VV,lN]=tU(oN,{contentName:nu,titleName:o4,docsSlug:"dialog"}),GV=({titleId:e})=>{const t=lN(oN),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
51
|
+
|
|
52
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
53
|
+
|
|
54
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},YV="DialogDescriptionWarning",WV=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${lN(YV).contentName}}.`;return x.useEffect(()=>{const a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},u4=WA,uN=KA,c4=ZA,d4=JA,f4=eN,cN=nN,dN=aN,y1=iN,XV=Symbol("radix.slottable");function KV(e){const t=({children:n})=>h.jsx(h.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=XV,t}var fN="AlertDialog",[QV]=Ua(fN,[YA]),ho=YA(),hN=e=>{const{__scopeAlertDialog:t,...n}=e,r=ho(t);return h.jsx(u4,{...r,...n,modal:!0})};hN.displayName=fN;var ZV="AlertDialogTrigger",mN=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=ho(n);return h.jsx(uN,{...a,...r,ref:t})});mN.displayName=ZV;var JV="AlertDialogPortal",pN=e=>{const{__scopeAlertDialog:t,...n}=e,r=ho(t);return h.jsx(c4,{...r,...n})};pN.displayName=JV;var eG="AlertDialogOverlay",gN=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=ho(n);return h.jsx(d4,{...a,...r,ref:t})});gN.displayName=eG;var Ac="AlertDialogContent",[tG,nG]=QV(Ac),rG=KV("AlertDialogContent"),bN=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...a}=e,s=ho(n),o=x.useRef(null),u=Tn(t,o),c=x.useRef(null);return h.jsx(VV,{contentName:Ac,titleName:xN,docsSlug:"alert-dialog",children:h.jsx(tG,{scope:n,cancelRef:c,children:h.jsxs(f4,{role:"alertdialog",...s,...a,ref:u,onOpenAutoFocus:ft(a.onOpenAutoFocus,d=>{d.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[h.jsx(rG,{children:r}),h.jsx(sG,{contentRef:o})]})})})});bN.displayName=Ac;var xN="AlertDialogTitle",yN=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=ho(n);return h.jsx(cN,{...a,...r,ref:t})});yN.displayName=xN;var vN="AlertDialogDescription",wN=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=ho(n);return h.jsx(dN,{...a,...r,ref:t})});wN.displayName=vN;var aG="AlertDialogAction",TN=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=ho(n);return h.jsx(y1,{...a,...r,ref:t})});TN.displayName=aG;var EN="AlertDialogCancel",SN=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:a}=nG(EN,n),s=ho(n),o=Tn(t,a);return h.jsx(y1,{...s,...r,ref:o})});SN.displayName=EN;var sG=({contentRef:e})=>{const t=`\`${Ac}\` requires a description for the component to be accessible for screen reader users.
|
|
55
|
+
|
|
56
|
+
You can add a description to the \`${Ac}\` by passing a \`${vN}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
57
|
+
|
|
58
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Ac}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
59
|
+
|
|
60
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return x.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},iG=hN,oG=mN,lG=pN,uG=gN,cG=bN,dG=TN,fG=SN,hG=yN,mG=wN;function CN(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function h4(e){const[t,n]=x.useState(void 0);return xi(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const s=a[0];let o,u;if("borderBoxSize"in s){const c=s.borderBoxSize,d=Array.isArray(c)?c[0]:c;o=d.inlineSize,u=d.blockSize}else o=e.offsetWidth,u=e.offsetHeight;n({width:o,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var v1="Checkbox",[pG]=Ua(v1),[gG,m4]=pG(v1);function bG(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:a,disabled:s,form:o,name:u,onCheckedChange:c,required:d,value:m="on",internal_do_not_use_render:p}=e,[b,y]=Fa({prop:n,defaultProp:a??!1,onChange:c,caller:v1}),[w,S]=x.useState(null),[k,E]=x.useState(null),A=x.useRef(!1),_=w?!!o||!!w.closest("form"):!0,I={checked:b,disabled:s,setChecked:y,control:w,setControl:S,name:u,form:o,value:m,hasConsumerStoppedPropagationRef:A,required:d,defaultChecked:nl(a)?!1:a,isFormControl:_,bubbleInput:k,setBubbleInput:E};return h.jsx(gG,{scope:t,...I,children:xG(p)?p(I):r})}var kN="CheckboxTrigger",AN=x.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},a)=>{const{control:s,value:o,disabled:u,checked:c,required:d,setControl:m,setChecked:p,hasConsumerStoppedPropagationRef:b,isFormControl:y,bubbleInput:w}=m4(kN,e),S=Tn(a,m),k=x.useRef(c);return x.useEffect(()=>{const E=s?.form;if(E){const A=()=>p(k.current);return E.addEventListener("reset",A),()=>E.removeEventListener("reset",A)}},[s,p]),h.jsx($t.button,{type:"button",role:"checkbox","aria-checked":nl(c)?"mixed":c,"aria-required":d,"data-state":IN(c),"data-disabled":u?"":void 0,disabled:u,value:o,...r,ref:S,onKeyDown:ft(t,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:ft(n,E=>{p(A=>nl(A)?!0:!A),w&&y&&(b.current=E.isPropagationStopped(),b.current||E.stopPropagation())})})});AN.displayName=kN;var NN=x.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:s,required:o,disabled:u,value:c,onCheckedChange:d,form:m,...p}=e;return h.jsx(bG,{__scopeCheckbox:n,checked:a,defaultChecked:s,disabled:u,required:o,onCheckedChange:d,name:r,form:m,value:c,internal_do_not_use_render:({isFormControl:b})=>h.jsxs(h.Fragment,{children:[h.jsx(AN,{...p,ref:t,__scopeCheckbox:n}),b&&h.jsx(DN,{__scopeCheckbox:n})]})})});NN.displayName=v1;var _N="CheckboxIndicator",RN=x.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,s=m4(_N,n);return h.jsx(Hr,{present:r||nl(s.checked)||s.checked===!0,children:h.jsx($t.span,{"data-state":IN(s.checked),"data-disabled":s.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});RN.displayName=_N;var MN="CheckboxBubbleInput",DN=x.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:a,checked:s,defaultChecked:o,required:u,disabled:c,name:d,value:m,form:p,bubbleInput:b,setBubbleInput:y}=m4(MN,e),w=Tn(n,y),S=CN(s),k=h4(r);x.useEffect(()=>{const A=b;if(!A)return;const _=window.HTMLInputElement.prototype,P=Object.getOwnPropertyDescriptor(_,"checked").set,O=!a.current;if(S!==s&&P){const R=new Event("click",{bubbles:O});A.indeterminate=nl(s),P.call(A,nl(s)?!1:s),A.dispatchEvent(R)}},[b,S,s,a]);const E=x.useRef(nl(s)?!1:s);return h.jsx($t.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??E.current,required:u,disabled:c,name:d,value:m,form:p,...t,tabIndex:-1,ref:w,style:{...t.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});DN.displayName=MN;function xG(e){return typeof e=="function"}function nl(e){return e==="indeterminate"}function IN(e){return nl(e)?"indeterminate":e?"checked":"unchecked"}const yG=["top","right","bottom","left"],al=Math.min,es=Math.max,Ep=Math.round,km=Math.floor,gi=e=>({x:e,y:e}),vG={left:"right",right:"left",bottom:"top",top:"bottom"},wG={start:"end",end:"start"};function xy(e,t,n){return es(e,al(t,n))}function ao(e,t){return typeof e=="function"?e(t):e}function so(e){return e.split("-")[0]}function Qc(e){return e.split("-")[1]}function p4(e){return e==="x"?"y":"x"}function g4(e){return e==="y"?"height":"width"}const TG=new Set(["top","bottom"]);function di(e){return TG.has(so(e))?"y":"x"}function b4(e){return p4(di(e))}function EG(e,t,n){n===void 0&&(n=!1);const r=Qc(e),a=b4(e),s=g4(a);let o=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=Sp(o)),[o,Sp(o)]}function SG(e){const t=Sp(e);return[yy(e),t,yy(t)]}function yy(e){return e.replace(/start|end/g,t=>wG[t])}const f8=["left","right"],h8=["right","left"],CG=["top","bottom"],kG=["bottom","top"];function AG(e,t,n){switch(e){case"top":case"bottom":return n?t?h8:f8:t?f8:h8;case"left":case"right":return t?CG:kG;default:return[]}}function NG(e,t,n,r){const a=Qc(e);let s=AG(so(e),n==="start",r);return a&&(s=s.map(o=>o+"-"+a),t&&(s=s.concat(s.map(yy)))),s}function Sp(e){return e.replace(/left|right|bottom|top/g,t=>vG[t])}function _G(e){return{top:0,right:0,bottom:0,left:0,...e}}function ON(e){return typeof e!="number"?_G(e):{top:e,right:e,bottom:e,left:e}}function Cp(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function m8(e,t,n){let{reference:r,floating:a}=e;const s=di(t),o=b4(t),u=g4(o),c=so(t),d=s==="y",m=r.x+r.width/2-a.width/2,p=r.y+r.height/2-a.height/2,b=r[u]/2-a[u]/2;let y;switch(c){case"top":y={x:m,y:r.y-a.height};break;case"bottom":y={x:m,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-a.width,y:p};break;default:y={x:r.x,y:r.y}}switch(Qc(t)){case"start":y[o]-=b*(n&&d?-1:1);break;case"end":y[o]+=b*(n&&d?-1:1);break}return y}const RG=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:s=[],platform:o}=n,u=s.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let d=await o.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:p}=m8(d,r,c),b=r,y={},w=0;for(let S=0;S<u.length;S++){const{name:k,fn:E}=u[S],{x:A,y:_,data:I,reset:P}=await E({x:m,y:p,initialPlacement:r,placement:b,strategy:a,middlewareData:y,rects:d,platform:o,elements:{reference:e,floating:t}});m=A??m,p=_??p,y={...y,[k]:{...y[k],...I}},P&&w<=50&&(w++,typeof P=="object"&&(P.placement&&(b=P.placement),P.rects&&(d=P.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:a}):P.rects),{x:m,y:p}=m8(d,b,c)),S=-1)}return{x:m,y:p,placement:b,strategy:a,middlewareData:y}};async function Jd(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:s,rects:o,elements:u,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:b=!1,padding:y=0}=ao(t,e),w=ON(y),k=u[b?p==="floating"?"reference":"floating":p],E=Cp(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(k)))==null||n?k:k.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(u.floating)),boundary:d,rootBoundary:m,strategy:c})),A=p==="floating"?{x:r,y:a,width:o.floating.width,height:o.floating.height}:o.reference,_=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u.floating)),I=await(s.isElement==null?void 0:s.isElement(_))?await(s.getScale==null?void 0:s.getScale(_))||{x:1,y:1}:{x:1,y:1},P=Cp(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:A,offsetParent:_,strategy:c}):A);return{top:(E.top-P.top+w.top)/I.y,bottom:(P.bottom-E.bottom+w.bottom)/I.y,left:(E.left-P.left+w.left)/I.x,right:(P.right-E.right+w.right)/I.x}}const MG=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:s,platform:o,elements:u,middlewareData:c}=t,{element:d,padding:m=0}=ao(e,t)||{};if(d==null)return{};const p=ON(m),b={x:n,y:r},y=b4(a),w=g4(y),S=await o.getDimensions(d),k=y==="y",E=k?"top":"left",A=k?"bottom":"right",_=k?"clientHeight":"clientWidth",I=s.reference[w]+s.reference[y]-b[y]-s.floating[w],P=b[y]-s.reference[y],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(d));let R=O?O[_]:0;(!R||!await(o.isElement==null?void 0:o.isElement(O)))&&(R=u.floating[_]||s.floating[w]);const z=I/2-P/2,F=R/2-S[w]/2-1,U=al(p[E],F),X=al(p[A],F),W=U,le=R-S[w]-X,se=R/2-S[w]/2+z,ie=xy(W,se,le),$=!c.arrow&&Qc(a)!=null&&se!==ie&&s.reference[w]/2-(se<W?U:X)-S[w]/2<0,K=$?se<W?se-W:se-le:0;return{[y]:b[y]+K,data:{[y]:ie,centerOffset:se-ie-K,...$&&{alignmentOffset:K}},reset:$}}}),DG=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:s,rects:o,initialPlacement:u,platform:c,elements:d}=t,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:b,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...k}=ao(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const E=so(a),A=di(u),_=so(u)===u,I=await(c.isRTL==null?void 0:c.isRTL(d.floating)),P=b||(_||!S?[Sp(u)]:SG(u)),O=w!=="none";!b&&O&&P.push(...NG(u,S,w,I));const R=[u,...P],z=await Jd(t,k),F=[];let U=((r=s.flip)==null?void 0:r.overflows)||[];if(m&&F.push(z[E]),p){const se=EG(a,o,I);F.push(z[se[0]],z[se[1]])}if(U=[...U,{placement:a,overflows:F}],!F.every(se=>se<=0)){var X,W;const se=(((X=s.flip)==null?void 0:X.index)||0)+1,ie=R[se];if(ie&&(!(p==="alignment"?A!==di(ie):!1)||U.every(Z=>di(Z.placement)===A?Z.overflows[0]>0:!0)))return{data:{index:se,overflows:U},reset:{placement:ie}};let $=(W=U.filter(K=>K.overflows[0]<=0).sort((K,Z)=>K.overflows[1]-Z.overflows[1])[0])==null?void 0:W.placement;if(!$)switch(y){case"bestFit":{var le;const K=(le=U.filter(Z=>{if(O){const re=di(Z.placement);return re===A||re==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(re=>re>0).reduce((re,j)=>re+j,0)]).sort((Z,re)=>Z[1]-re[1])[0])==null?void 0:le[0];K&&($=K);break}case"initialPlacement":$=u;break}if(a!==$)return{reset:{placement:$}}}return{}}}};function p8(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function g8(e){return yG.some(t=>e[t]>=0)}const IG=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=ao(e,t);switch(r){case"referenceHidden":{const s=await Jd(t,{...a,elementContext:"reference"}),o=p8(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:g8(o)}}}case"escaped":{const s=await Jd(t,{...a,altBoundary:!0}),o=p8(s,n.floating);return{data:{escapedOffsets:o,escaped:g8(o)}}}default:return{}}}}},LN=new Set(["left","top"]);async function OG(e,t){const{placement:n,platform:r,elements:a}=e,s=await(r.isRTL==null?void 0:r.isRTL(a.floating)),o=so(n),u=Qc(n),c=di(n)==="y",d=LN.has(o)?-1:1,m=s&&c?-1:1,p=ao(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof w=="number"&&(y=u==="end"?w*-1:w),c?{x:y*m,y:b*d}:{x:b*d,y:y*m}}const LG=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:s,placement:o,middlewareData:u}=t,c=await OG(t,e);return o===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:a+c.x,y:s+c.y,data:{...c,placement:o}}}}},PG=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:u={fn:k=>{let{x:E,y:A}=k;return{x:E,y:A}}},...c}=ao(e,t),d={x:n,y:r},m=await Jd(t,c),p=di(so(a)),b=p4(p);let y=d[b],w=d[p];if(s){const k=b==="y"?"top":"left",E=b==="y"?"bottom":"right",A=y+m[k],_=y-m[E];y=xy(A,y,_)}if(o){const k=p==="y"?"top":"left",E=p==="y"?"bottom":"right",A=w+m[k],_=w-m[E];w=xy(A,w,_)}const S=u.fn({...t,[b]:y,[p]:w});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[b]:s,[p]:o}}}}}},jG=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:s,middlewareData:o}=t,{offset:u=0,mainAxis:c=!0,crossAxis:d=!0}=ao(e,t),m={x:n,y:r},p=di(a),b=p4(p);let y=m[b],w=m[p];const S=ao(u,t),k=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(c){const _=b==="y"?"height":"width",I=s.reference[b]-s.floating[_]+k.mainAxis,P=s.reference[b]+s.reference[_]-k.mainAxis;y<I?y=I:y>P&&(y=P)}if(d){var E,A;const _=b==="y"?"width":"height",I=LN.has(so(a)),P=s.reference[p]-s.floating[_]+(I&&((E=o.offset)==null?void 0:E[p])||0)+(I?0:k.crossAxis),O=s.reference[p]+s.reference[_]+(I?0:((A=o.offset)==null?void 0:A[p])||0)-(I?k.crossAxis:0);w<P?w=P:w>O&&(w=O)}return{[b]:y,[p]:w}}}},zG=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:s,platform:o,elements:u}=t,{apply:c=()=>{},...d}=ao(e,t),m=await Jd(t,d),p=so(a),b=Qc(a),y=di(a)==="y",{width:w,height:S}=s.floating;let k,E;p==="top"||p==="bottom"?(k=p,E=b===(await(o.isRTL==null?void 0:o.isRTL(u.floating))?"start":"end")?"left":"right"):(E=p,k=b==="end"?"top":"bottom");const A=S-m.top-m.bottom,_=w-m.left-m.right,I=al(S-m[k],A),P=al(w-m[E],_),O=!t.middlewareData.shift;let R=I,z=P;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(z=_),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=A),O&&!b){const U=es(m.left,0),X=es(m.right,0),W=es(m.top,0),le=es(m.bottom,0);y?z=w-2*(U!==0||X!==0?U+X:es(m.left,m.right)):R=S-2*(W!==0||le!==0?W+le:es(m.top,m.bottom))}await c({...t,availableWidth:z,availableHeight:R});const F=await o.getDimensions(u.floating);return w!==F.width||S!==F.height?{reset:{rects:!0}}:{}}}};function w1(){return typeof window<"u"}function Zc(e){return PN(e)?(e.nodeName||"").toLowerCase():"#document"}function as(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wi(e){var t;return(t=(PN(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function PN(e){return w1()?e instanceof Node||e instanceof as(e).Node:!1}function $s(e){return w1()?e instanceof Element||e instanceof as(e).Element:!1}function yi(e){return w1()?e instanceof HTMLElement||e instanceof as(e).HTMLElement:!1}function b8(e){return!w1()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof as(e).ShadowRoot}const BG=new Set(["inline","contents"]);function Mf(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=qs(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!BG.has(a)}const FG=new Set(["table","td","th"]);function HG(e){return FG.has(Zc(e))}const UG=[":popover-open",":modal"];function T1(e){return UG.some(t=>{try{return e.matches(t)}catch{return!1}})}const $G=["transform","translate","scale","rotate","perspective"],qG=["transform","translate","scale","rotate","perspective","filter"],VG=["paint","layout","strict","content"];function x4(e){const t=y4(),n=$s(e)?qs(e):e;return $G.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||qG.some(r=>(n.willChange||"").includes(r))||VG.some(r=>(n.contain||"").includes(r))}function GG(e){let t=sl(e);for(;yi(t)&&!jc(t);){if(x4(t))return t;if(T1(t))return null;t=sl(t)}return null}function y4(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const YG=new Set(["html","body","#document"]);function jc(e){return YG.has(Zc(e))}function qs(e){return as(e).getComputedStyle(e)}function E1(e){return $s(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function sl(e){if(Zc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||b8(e)&&e.host||wi(e);return b8(t)?t.host:t}function jN(e){const t=sl(e);return jc(t)?e.ownerDocument?e.ownerDocument.body:e.body:yi(t)&&Mf(t)?t:jN(t)}function ef(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=jN(e),s=a===((r=e.ownerDocument)==null?void 0:r.body),o=as(a);if(s){const u=vy(o);return t.concat(o,o.visualViewport||[],Mf(a)?a:[],u&&n?ef(u):[])}return t.concat(a,ef(a,[],n))}function vy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zN(e){const t=qs(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=yi(e),s=a?e.offsetWidth:n,o=a?e.offsetHeight:r,u=Ep(n)!==s||Ep(r)!==o;return u&&(n=s,r=o),{width:n,height:r,$:u}}function v4(e){return $s(e)?e:e.contextElement}function Nc(e){const t=v4(e);if(!yi(t))return gi(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:s}=zN(t);let o=(s?Ep(n.width):n.width)/r,u=(s?Ep(n.height):n.height)/a;return(!o||!Number.isFinite(o))&&(o=1),(!u||!Number.isFinite(u))&&(u=1),{x:o,y:u}}const WG=gi(0);function BN(e){const t=as(e);return!y4()||!t.visualViewport?WG:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function XG(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==as(e)?!1:t}function ru(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),s=v4(e);let o=gi(1);t&&(r?$s(r)&&(o=Nc(r)):o=Nc(e));const u=XG(s,n,r)?BN(s):gi(0);let c=(a.left+u.x)/o.x,d=(a.top+u.y)/o.y,m=a.width/o.x,p=a.height/o.y;if(s){const b=as(s),y=r&&$s(r)?as(r):r;let w=b,S=vy(w);for(;S&&r&&y!==w;){const k=Nc(S),E=S.getBoundingClientRect(),A=qs(S),_=E.left+(S.clientLeft+parseFloat(A.paddingLeft))*k.x,I=E.top+(S.clientTop+parseFloat(A.paddingTop))*k.y;c*=k.x,d*=k.y,m*=k.x,p*=k.y,c+=_,d+=I,w=as(S),S=vy(w)}}return Cp({width:m,height:p,x:c,y:d})}function S1(e,t){const n=E1(e).scrollLeft;return t?t.left+n:ru(wi(e)).left+n}function FN(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-S1(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function KG(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const s=a==="fixed",o=wi(r),u=t?T1(t.floating):!1;if(r===o||u&&s)return n;let c={scrollLeft:0,scrollTop:0},d=gi(1);const m=gi(0),p=yi(r);if((p||!p&&!s)&&((Zc(r)!=="body"||Mf(o))&&(c=E1(r)),yi(r))){const y=ru(r);d=Nc(r),m.x=y.x+r.clientLeft,m.y=y.y+r.clientTop}const b=o&&!p&&!s?FN(o,c):gi(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+m.x+b.x,y:n.y*d.y-c.scrollTop*d.y+m.y+b.y}}function QG(e){return Array.from(e.getClientRects())}function ZG(e){const t=wi(e),n=E1(e),r=e.ownerDocument.body,a=es(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=es(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+S1(e);const u=-n.scrollTop;return qs(r).direction==="rtl"&&(o+=es(t.clientWidth,r.clientWidth)-a),{width:a,height:s,x:o,y:u}}const x8=25;function JG(e,t){const n=as(e),r=wi(e),a=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,u=0,c=0;if(a){s=a.width,o=a.height;const m=y4();(!m||m&&t==="fixed")&&(u=a.offsetLeft,c=a.offsetTop)}const d=S1(r);if(d<=0){const m=r.ownerDocument,p=m.body,b=getComputedStyle(p),y=m.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,w=Math.abs(r.clientWidth-p.clientWidth-y);w<=x8&&(s-=w)}else d<=x8&&(s+=d);return{width:s,height:o,x:u,y:c}}const eY=new Set(["absolute","fixed"]);function tY(e,t){const n=ru(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,s=yi(e)?Nc(e):gi(1),o=e.clientWidth*s.x,u=e.clientHeight*s.y,c=a*s.x,d=r*s.y;return{width:o,height:u,x:c,y:d}}function y8(e,t,n){let r;if(t==="viewport")r=JG(e,n);else if(t==="document")r=ZG(wi(e));else if($s(t))r=tY(t,n);else{const a=BN(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Cp(r)}function HN(e,t){const n=sl(e);return n===t||!$s(n)||jc(n)?!1:qs(n).position==="fixed"||HN(n,t)}function nY(e,t){const n=t.get(e);if(n)return n;let r=ef(e,[],!1).filter(u=>$s(u)&&Zc(u)!=="body"),a=null;const s=qs(e).position==="fixed";let o=s?sl(e):e;for(;$s(o)&&!jc(o);){const u=qs(o),c=x4(o);!c&&u.position==="fixed"&&(a=null),(s?!c&&!a:!c&&u.position==="static"&&!!a&&eY.has(a.position)||Mf(o)&&!c&&HN(e,o))?r=r.filter(m=>m!==o):a=u,o=sl(o)}return t.set(e,r),r}function rY(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o=[...n==="clippingAncestors"?T1(t)?[]:nY(t,this._c):[].concat(n),r],u=o[0],c=o.reduce((d,m)=>{const p=y8(t,m,a);return d.top=es(p.top,d.top),d.right=al(p.right,d.right),d.bottom=al(p.bottom,d.bottom),d.left=es(p.left,d.left),d},y8(t,u,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function aY(e){const{width:t,height:n}=zN(e);return{width:t,height:n}}function sY(e,t,n){const r=yi(t),a=wi(t),s=n==="fixed",o=ru(e,!0,s,t);let u={scrollLeft:0,scrollTop:0};const c=gi(0);function d(){c.x=S1(a)}if(r||!r&&!s)if((Zc(t)!=="body"||Mf(a))&&(u=E1(t)),r){const y=ru(t,!0,s,t);c.x=y.x+t.clientLeft,c.y=y.y+t.clientTop}else a&&d();s&&!r&&a&&d();const m=a&&!r&&!s?FN(a,u):gi(0),p=o.left+u.scrollLeft-c.x-m.x,b=o.top+u.scrollTop-c.y-m.y;return{x:p,y:b,width:o.width,height:o.height}}function Fb(e){return qs(e).position==="static"}function v8(e,t){if(!yi(e)||qs(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return wi(e)===n&&(n=n.ownerDocument.body),n}function UN(e,t){const n=as(e);if(T1(e))return n;if(!yi(e)){let a=sl(e);for(;a&&!jc(a);){if($s(a)&&!Fb(a))return a;a=sl(a)}return n}let r=v8(e,t);for(;r&&HG(r)&&Fb(r);)r=v8(r,t);return r&&jc(r)&&Fb(r)&&!x4(r)?n:r||GG(e)||n}const iY=async function(e){const t=this.getOffsetParent||UN,n=this.getDimensions,r=await n(e.floating);return{reference:sY(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function oY(e){return qs(e).direction==="rtl"}const lY={convertOffsetParentRelativeRectToViewportRelativeRect:KG,getDocumentElement:wi,getClippingRect:rY,getOffsetParent:UN,getElementRects:iY,getClientRects:QG,getDimensions:aY,getScale:Nc,isElement:$s,isRTL:oY};function $N(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function uY(e,t){let n=null,r;const a=wi(e);function s(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function o(u,c){u===void 0&&(u=!1),c===void 0&&(c=1),s();const d=e.getBoundingClientRect(),{left:m,top:p,width:b,height:y}=d;if(u||t(),!b||!y)return;const w=km(p),S=km(a.clientWidth-(m+b)),k=km(a.clientHeight-(p+y)),E=km(m),_={rootMargin:-w+"px "+-S+"px "+-k+"px "+-E+"px",threshold:es(0,al(1,c))||1};let I=!0;function P(O){const R=O[0].intersectionRatio;if(R!==c){if(!I)return o();R?o(!1,R):r=setTimeout(()=>{o(!1,1e-7)},1e3)}R===1&&!$N(d,e.getBoundingClientRect())&&o(),I=!1}try{n=new IntersectionObserver(P,{..._,root:a.ownerDocument})}catch{n=new IntersectionObserver(P,_)}n.observe(e)}return o(!0),s}function cY(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=v4(e),m=a||s?[...d?ef(d):[],...ef(t)]:[];m.forEach(E=>{a&&E.addEventListener("scroll",n,{passive:!0}),s&&E.addEventListener("resize",n)});const p=d&&u?uY(d,n):null;let b=-1,y=null;o&&(y=new ResizeObserver(E=>{let[A]=E;A&&A.target===d&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var _;(_=y)==null||_.observe(t)})),n()}),d&&!c&&y.observe(d),y.observe(t));let w,S=c?ru(e):null;c&&k();function k(){const E=ru(e);S&&!$N(S,E)&&n(),S=E,w=requestAnimationFrame(k)}return n(),()=>{var E;m.forEach(A=>{a&&A.removeEventListener("scroll",n),s&&A.removeEventListener("resize",n)}),p?.(),(E=y)==null||E.disconnect(),y=null,c&&cancelAnimationFrame(w)}}const dY=LG,fY=PG,hY=DG,mY=zG,pY=IG,w8=MG,gY=jG,bY=(e,t,n)=>{const r=new Map,a={platform:lY,...n},s={...a.platform,_c:r};return RG(e,t,{...a,platform:s})};var xY=typeof document<"u",yY=function(){},ip=xY?x.useLayoutEffect:yY;function kp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!kp(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const s=a[r];if(!(s==="_owner"&&e.$$typeof)&&!kp(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function qN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function T8(e,t){const n=qN(e);return Math.round(t*n)/n}function Hb(e){const t=x.useRef(e);return ip(()=>{t.current=e}),t}function vY(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:s,floating:o}={},transform:u=!0,whileElementsMounted:c,open:d}=e,[m,p]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,y]=x.useState(r);kp(b,r)||y(r);const[w,S]=x.useState(null),[k,E]=x.useState(null),A=x.useCallback(Z=>{Z!==O.current&&(O.current=Z,S(Z))},[]),_=x.useCallback(Z=>{Z!==R.current&&(R.current=Z,E(Z))},[]),I=s||w,P=o||k,O=x.useRef(null),R=x.useRef(null),z=x.useRef(m),F=c!=null,U=Hb(c),X=Hb(a),W=Hb(d),le=x.useCallback(()=>{if(!O.current||!R.current)return;const Z={placement:t,strategy:n,middleware:b};X.current&&(Z.platform=X.current),bY(O.current,R.current,Z).then(re=>{const j={...re,isPositioned:W.current!==!1};se.current&&!kp(z.current,j)&&(z.current=j,Pc.flushSync(()=>{p(j)}))})},[b,t,n,X,W]);ip(()=>{d===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,p(Z=>({...Z,isPositioned:!1})))},[d]);const se=x.useRef(!1);ip(()=>(se.current=!0,()=>{se.current=!1}),[]),ip(()=>{if(I&&(O.current=I),P&&(R.current=P),I&&P){if(U.current)return U.current(I,P,le);le()}},[I,P,le,U,F]);const ie=x.useMemo(()=>({reference:O,floating:R,setReference:A,setFloating:_}),[A,_]),$=x.useMemo(()=>({reference:I,floating:P}),[I,P]),K=x.useMemo(()=>{const Z={position:n,left:0,top:0};if(!$.floating)return Z;const re=T8($.floating,m.x),j=T8($.floating,m.y);return u?{...Z,transform:"translate("+re+"px, "+j+"px)",...qN($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:re,top:j}},[n,u,$.floating,m.x,m.y]);return x.useMemo(()=>({...m,update:le,refs:ie,elements:$,floatingStyles:K}),[m,le,ie,$,K])}const wY=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?w8({element:r.current,padding:a}).fn(n):{}:r?w8({element:r,padding:a}).fn(n):{}}}},TY=(e,t)=>({...dY(e),options:[e,t]}),EY=(e,t)=>({...fY(e),options:[e,t]}),SY=(e,t)=>({...gY(e),options:[e,t]}),CY=(e,t)=>({...hY(e),options:[e,t]}),kY=(e,t)=>({...mY(e),options:[e,t]}),AY=(e,t)=>({...pY(e),options:[e,t]}),NY=(e,t)=>({...wY(e),options:[e,t]});var _Y="Arrow",VN=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...s}=e;return h.jsx($t.svg,{...s,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});VN.displayName=_Y;var RY=VN,w4="Popper",[GN,Jc]=Ua(w4),[MY,YN]=GN(w4),WN=e=>{const{__scopePopper:t,children:n}=e,[r,a]=x.useState(null);return h.jsx(MY,{scope:t,anchor:r,onAnchorChange:a,children:n})};WN.displayName=w4;var XN="PopperAnchor",KN=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,s=YN(XN,n),o=x.useRef(null),u=Tn(t,o),c=x.useRef(null);return x.useEffect(()=>{const d=c.current;c.current=r?.current||o.current,d!==c.current&&s.onAnchorChange(c.current)}),r?null:h.jsx($t.div,{...a,ref:u})});KN.displayName=XN;var T4="PopperContent",[DY,IY]=GN(T4),QN=x.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:s="center",alignOffset:o=0,arrowPadding:u=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:m=0,sticky:p="partial",hideWhenDetached:b=!1,updatePositionStrategy:y="optimized",onPlaced:w,...S}=e,k=YN(T4,n),[E,A]=x.useState(null),_=Tn(t,be=>A(be)),[I,P]=x.useState(null),O=h4(I),R=O?.width??0,z=O?.height??0,F=r+(s!=="center"?"-"+s:""),U=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},X=Array.isArray(d)?d:[d],W=X.length>0,le={padding:U,boundary:X.filter(LY),altBoundary:W},{refs:se,floatingStyles:ie,placement:$,isPositioned:K,middlewareData:Z}=vY({strategy:"fixed",placement:F,whileElementsMounted:(...be)=>cY(...be,{animationFrame:y==="always"}),elements:{reference:k.anchor},middleware:[TY({mainAxis:a+z,alignmentAxis:o}),c&&EY({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?SY():void 0,...le}),c&&CY({...le}),kY({...le,apply:({elements:be,rects:fe,availableWidth:Ne,availableHeight:at})=>{const{width:Ce,height:Re}=fe.reference,Ee=be.floating.style;Ee.setProperty("--radix-popper-available-width",`${Ne}px`),Ee.setProperty("--radix-popper-available-height",`${at}px`),Ee.setProperty("--radix-popper-anchor-width",`${Ce}px`),Ee.setProperty("--radix-popper-anchor-height",`${Re}px`)}}),I&&NY({element:I,padding:u}),PY({arrowWidth:R,arrowHeight:z}),b&&AY({strategy:"referenceHidden",...le})]}),[re,j]=e_($),H=ra(w);xi(()=>{K&&H?.()},[K,H]);const G=Z.arrow?.x,L=Z.arrow?.y,ae=Z.arrow?.centerOffset!==0,[oe,Se]=x.useState();return xi(()=>{E&&Se(window.getComputedStyle(E).zIndex)},[E]),h.jsx("div",{ref:se.setFloating,"data-radix-popper-content-wrapper":"",style:{...ie,transform:K?ie.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[Z.transformOrigin?.x,Z.transformOrigin?.y].join(" "),...Z.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:h.jsx(DY,{scope:n,placedSide:re,onArrowChange:P,arrowX:G,arrowY:L,shouldHideArrow:ae,children:h.jsx($t.div,{"data-side":re,"data-align":j,...S,ref:_,style:{...S.style,animation:K?void 0:"none"}})})})});QN.displayName=T4;var ZN="PopperArrow",OY={top:"bottom",right:"left",bottom:"top",left:"right"},JN=x.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,s=IY(ZN,r),o=OY[s.placedSide];return h.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:h.jsx(RY,{...a,ref:n,style:{...a.style,display:"block"}})})});JN.displayName=ZN;function LY(e){return e!==null}var PY=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:a}=t,o=a.arrow?.centerOffset!==0,u=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[d,m]=e_(n),p={start:"0%",center:"50%",end:"100%"}[m],b=(a.arrow?.x??0)+u/2,y=(a.arrow?.y??0)+c/2;let w="",S="";return d==="bottom"?(w=o?p:`${b}px`,S=`${-c}px`):d==="top"?(w=o?p:`${b}px`,S=`${r.floating.height+c}px`):d==="right"?(w=`${-c}px`,S=o?p:`${y}px`):d==="left"&&(w=`${r.floating.width+c}px`,S=o?p:`${y}px`),{data:{x:w,y:S}}}});function e_(e){const[t,n="center"]=e.split("-");return[t,n]}var E4=WN,S4=KN,C4=QN,k4=JN,Ub="rovingFocusGroup.onEntryFocus",jY={bubbles:!1,cancelable:!0},Df="RovingFocusGroup",[wy,t_,zY]=DA(Df),[BY,C1]=Ua(Df,[zY]),[FY,HY]=BY(Df),n_=x.forwardRef((e,t)=>h.jsx(wy.Provider,{scope:e.__scopeRovingFocusGroup,children:h.jsx(wy.Slot,{scope:e.__scopeRovingFocusGroup,children:h.jsx(UY,{...e,ref:t})})}));n_.displayName=Df;var UY=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:m=!1,...p}=e,b=x.useRef(null),y=Tn(t,b),w=g1(s),[S,k]=Fa({prop:o,defaultProp:u??null,onChange:c,caller:Df}),[E,A]=x.useState(!1),_=ra(d),I=t_(n),P=x.useRef(!1),[O,R]=x.useState(0);return x.useEffect(()=>{const z=b.current;if(z)return z.addEventListener(Ub,_),()=>z.removeEventListener(Ub,_)},[_]),h.jsx(FY,{scope:n,orientation:r,dir:w,loop:a,currentTabStopId:S,onItemFocus:x.useCallback(z=>k(z),[k]),onItemShiftTab:x.useCallback(()=>A(!0),[]),onFocusableItemAdd:x.useCallback(()=>R(z=>z+1),[]),onFocusableItemRemove:x.useCallback(()=>R(z=>z-1),[]),children:h.jsx($t.div,{tabIndex:E||O===0?-1:0,"data-orientation":r,...p,ref:y,style:{outline:"none",...e.style},onMouseDown:ft(e.onMouseDown,()=>{P.current=!0}),onFocus:ft(e.onFocus,z=>{const F=!P.current;if(z.target===z.currentTarget&&F&&!E){const U=new CustomEvent(Ub,jY);if(z.currentTarget.dispatchEvent(U),!U.defaultPrevented){const X=I().filter($=>$.focusable),W=X.find($=>$.active),le=X.find($=>$.id===S),ie=[W,le,...X].filter(Boolean).map($=>$.ref.current);s_(ie,m)}}P.current=!1}),onBlur:ft(e.onBlur,()=>A(!1))})})}),r_="RovingFocusGroupItem",a_=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:s,children:o,...u}=e,c=za(),d=s||c,m=HY(r_,n),p=m.currentTabStopId===d,b=t_(n),{onFocusableItemAdd:y,onFocusableItemRemove:w,currentTabStopId:S}=m;return x.useEffect(()=>{if(r)return y(),()=>w()},[r,y,w]),h.jsx(wy.ItemSlot,{scope:n,id:d,focusable:r,active:a,children:h.jsx($t.span,{tabIndex:p?0:-1,"data-orientation":m.orientation,...u,ref:t,onMouseDown:ft(e.onMouseDown,k=>{r?m.onItemFocus(d):k.preventDefault()}),onFocus:ft(e.onFocus,()=>m.onItemFocus(d)),onKeyDown:ft(e.onKeyDown,k=>{if(k.key==="Tab"&&k.shiftKey){m.onItemShiftTab();return}if(k.target!==k.currentTarget)return;const E=VY(k,m.orientation,m.dir);if(E!==void 0){if(k.metaKey||k.ctrlKey||k.altKey||k.shiftKey)return;k.preventDefault();let _=b().filter(I=>I.focusable).map(I=>I.ref.current);if(E==="last")_.reverse();else if(E==="prev"||E==="next"){E==="prev"&&_.reverse();const I=_.indexOf(k.currentTarget);_=m.loop?GY(_,I+1):_.slice(I+1)}setTimeout(()=>s_(_))}}),children:typeof o=="function"?o({isCurrentTabStop:p,hasTabStop:S!=null}):o})})});a_.displayName=r_;var $Y={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qY(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function VY(e,t,n){const r=qY(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return $Y[r]}function s_(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function GY(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var i_=n_,o_=a_;function YY(e){const t=WY(e),n=x.forwardRef((r,a)=>{const{children:s,...o}=r,u=x.Children.toArray(s),c=u.find(KY);if(c){const d=c.props.children,m=u.map(p=>p===c?x.Children.count(d)>1?x.Children.only(null):x.isValidElement(d)?d.props.children:null:p);return h.jsx(t,{...o,ref:a,children:x.isValidElement(d)?x.cloneElement(d,void 0,m):null})}return h.jsx(t,{...o,ref:a,children:s})});return n.displayName=`${e}.Slot`,n}function WY(e){const t=x.forwardRef((n,r)=>{const{children:a,...s}=n;if(x.isValidElement(a)){const o=ZY(a),u=QY(s,a.props);return a.type!==x.Fragment&&(u.ref=r?Ha(r,o):o),x.cloneElement(a,u)}return x.Children.count(a)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var XY=Symbol("radix.slottable");function KY(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===XY}function QY(e,t){const n={...t};for(const r in t){const a=e[r],s=t[r];/^on[A-Z]/.test(r)?a&&s?n[r]=(...u)=>{const c=s(...u);return a(...u),c}:a&&(n[r]=a):r==="style"?n[r]={...a,...s}:r==="className"&&(n[r]=[a,s].filter(Boolean).join(" "))}return{...e,...n}}function ZY(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ty=["Enter"," "],JY=["ArrowDown","PageUp","Home"],l_=["ArrowUp","PageDown","End"],eW=[...JY,...l_],tW={ltr:[...Ty,"ArrowRight"],rtl:[...Ty,"ArrowLeft"]},nW={ltr:["ArrowLeft"],rtl:["ArrowRight"]},If="Menu",[tf,rW,aW]=DA(If),[hu,u_]=Ua(If,[aW,Jc,C1]),k1=Jc(),c_=C1(),[sW,mu]=hu(If),[iW,Of]=hu(If),d_=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:s,modal:o=!0}=e,u=k1(t),[c,d]=x.useState(null),m=x.useRef(!1),p=ra(s),b=g1(a);return x.useEffect(()=>{const y=()=>{m.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>m.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),h.jsx(E4,{...u,children:h.jsx(sW,{scope:t,open:n,onOpenChange:p,content:c,onContentChange:d,children:h.jsx(iW,{scope:t,onClose:x.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:m,dir:b,modal:o,children:r})})})};d_.displayName=If;var oW="MenuAnchor",A4=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=k1(n);return h.jsx(S4,{...a,...r,ref:t})});A4.displayName=oW;var N4="MenuPortal",[lW,f_]=hu(N4,{forceMount:void 0}),h_=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,s=mu(N4,t);return h.jsx(lW,{scope:t,forceMount:n,children:h.jsx(Hr,{present:n||s.open,children:h.jsx(Rf,{asChild:!0,container:a,children:r})})})};h_.displayName=N4;var As="MenuContent",[uW,_4]=hu(As),m_=x.forwardRef((e,t)=>{const n=f_(As,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,s=mu(As,e.__scopeMenu),o=Of(As,e.__scopeMenu);return h.jsx(tf.Provider,{scope:e.__scopeMenu,children:h.jsx(Hr,{present:r||s.open,children:h.jsx(tf.Slot,{scope:e.__scopeMenu,children:o.modal?h.jsx(cW,{...a,ref:t}):h.jsx(dW,{...a,ref:t})})})})}),cW=x.forwardRef((e,t)=>{const n=mu(As,e.__scopeMenu),r=x.useRef(null),a=Tn(t,r);return x.useEffect(()=>{const s=r.current;if(s)return VA(s)},[]),h.jsx(R4,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ft(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),dW=x.forwardRef((e,t)=>{const n=mu(As,e.__scopeMenu);return h.jsx(R4,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),fW=YY("MenuContent.ScrollLock"),R4=x.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:o,disableOutsidePointerEvents:u,onEntryFocus:c,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:b,onDismiss:y,disableOutsideScroll:w,...S}=e,k=mu(As,n),E=Of(As,n),A=k1(n),_=c_(n),I=rW(n),[P,O]=x.useState(null),R=x.useRef(null),z=Tn(t,R,k.onContentChange),F=x.useRef(0),U=x.useRef(""),X=x.useRef(0),W=x.useRef(null),le=x.useRef("right"),se=x.useRef(0),ie=w?s4:x.Fragment,$=w?{as:fW,allowPinchZoom:!0}:void 0,K=re=>{const j=U.current+re,H=I().filter(be=>!be.disabled),G=document.activeElement,L=H.find(be=>be.ref.current===G)?.textValue,ae=H.map(be=>be.textValue),oe=SW(ae,j,L),Se=H.find(be=>be.textValue===oe)?.ref.current;(function be(fe){U.current=fe,window.clearTimeout(F.current),fe!==""&&(F.current=window.setTimeout(()=>be(""),1e3))})(j),Se&&setTimeout(()=>Se.focus())};x.useEffect(()=>()=>window.clearTimeout(F.current),[]),PA();const Z=x.useCallback(re=>le.current===W.current?.side&&kW(re,W.current?.area),[]);return h.jsx(uW,{scope:n,searchRef:U,onItemEnter:x.useCallback(re=>{Z(re)&&re.preventDefault()},[Z]),onItemLeave:x.useCallback(re=>{Z(re)||(R.current?.focus(),O(null))},[Z]),onTriggerLeave:x.useCallback(re=>{Z(re)&&re.preventDefault()},[Z]),pointerGraceTimerRef:X,onPointerGraceIntentChange:x.useCallback(re=>{W.current=re},[]),children:h.jsx(ie,{...$,children:h.jsx(a4,{asChild:!0,trapped:a,onMountAutoFocus:ft(s,re=>{re.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:h.jsx(_f,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:b,onDismiss:y,children:h.jsx(i_,{asChild:!0,..._,dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:P,onCurrentTabStopIdChange:O,onEntryFocus:ft(c,re=>{E.isUsingKeyboardRef.current||re.preventDefault()}),preventScrollOnEntryFocus:!0,children:h.jsx(C4,{role:"menu","aria-orientation":"vertical","data-state":R_(k.open),"data-radix-menu-content":"",dir:E.dir,...A,...S,ref:z,style:{outline:"none",...S.style},onKeyDown:ft(S.onKeyDown,re=>{const H=re.target.closest("[data-radix-menu-content]")===re.currentTarget,G=re.ctrlKey||re.altKey||re.metaKey,L=re.key.length===1;H&&(re.key==="Tab"&&re.preventDefault(),!G&&L&&K(re.key));const ae=R.current;if(re.target!==ae||!eW.includes(re.key))return;re.preventDefault();const Se=I().filter(be=>!be.disabled).map(be=>be.ref.current);l_.includes(re.key)&&Se.reverse(),TW(Se)}),onBlur:ft(e.onBlur,re=>{re.currentTarget.contains(re.target)||(window.clearTimeout(F.current),U.current="")}),onPointerMove:ft(e.onPointerMove,nf(re=>{const j=re.target,H=se.current!==re.clientX;if(re.currentTarget.contains(j)&&H){const G=re.clientX>se.current?"right":"left";le.current=G,se.current=re.clientX}}))})})})})})})});m_.displayName=As;var hW="MenuGroup",M4=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx($t.div,{role:"group",...r,ref:t})});M4.displayName=hW;var mW="MenuLabel",p_=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx($t.div,{...r,ref:t})});p_.displayName=mW;var Ap="MenuItem",E8="menu.itemSelect",A1=x.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,s=x.useRef(null),o=Of(Ap,e.__scopeMenu),u=_4(Ap,e.__scopeMenu),c=Tn(t,s),d=x.useRef(!1),m=()=>{const p=s.current;if(!n&&p){const b=new CustomEvent(E8,{bubbles:!0,cancelable:!0});p.addEventListener(E8,y=>r?.(y),{once:!0}),Q9(p,b),b.defaultPrevented?d.current=!1:o.onClose()}};return h.jsx(g_,{...a,ref:c,disabled:n,onClick:ft(e.onClick,m),onPointerDown:p=>{e.onPointerDown?.(p),d.current=!0},onPointerUp:ft(e.onPointerUp,p=>{d.current||p.currentTarget?.click()}),onKeyDown:ft(e.onKeyDown,p=>{const b=u.searchRef.current!=="";n||b&&p.key===" "||Ty.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});A1.displayName=Ap;var g_=x.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...s}=e,o=_4(Ap,n),u=c_(n),c=x.useRef(null),d=Tn(t,c),[m,p]=x.useState(!1),[b,y]=x.useState("");return x.useEffect(()=>{const w=c.current;w&&y((w.textContent??"").trim())},[s.children]),h.jsx(tf.ItemSlot,{scope:n,disabled:r,textValue:a??b,children:h.jsx(o_,{asChild:!0,...u,focusable:!r,children:h.jsx($t.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:d,onPointerMove:ft(e.onPointerMove,nf(w=>{r?o.onItemLeave(w):(o.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ft(e.onPointerLeave,nf(w=>o.onItemLeave(w))),onFocus:ft(e.onFocus,()=>p(!0)),onBlur:ft(e.onBlur,()=>p(!1))})})})}),pW="MenuCheckboxItem",b_=x.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return h.jsx(T_,{scope:e.__scopeMenu,checked:n,children:h.jsx(A1,{role:"menuitemcheckbox","aria-checked":Np(n)?"mixed":n,...a,ref:t,"data-state":I4(n),onSelect:ft(a.onSelect,()=>r?.(Np(n)?!0:!n),{checkForDefaultPrevented:!1})})})});b_.displayName=pW;var x_="MenuRadioGroup",[gW,bW]=hu(x_,{value:void 0,onValueChange:()=>{}}),y_=x.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,s=ra(r);return h.jsx(gW,{scope:e.__scopeMenu,value:n,onValueChange:s,children:h.jsx(M4,{...a,ref:t})})});y_.displayName=x_;var v_="MenuRadioItem",w_=x.forwardRef((e,t)=>{const{value:n,...r}=e,a=bW(v_,e.__scopeMenu),s=n===a.value;return h.jsx(T_,{scope:e.__scopeMenu,checked:s,children:h.jsx(A1,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":I4(s),onSelect:ft(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});w_.displayName=v_;var D4="MenuItemIndicator",[T_,xW]=hu(D4,{checked:!1}),E_=x.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,s=xW(D4,n);return h.jsx(Hr,{present:r||Np(s.checked)||s.checked===!0,children:h.jsx($t.span,{...a,ref:t,"data-state":I4(s.checked)})})});E_.displayName=D4;var yW="MenuSeparator",S_=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx($t.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});S_.displayName=yW;var vW="MenuArrow",C_=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=k1(n);return h.jsx(k4,{...a,...r,ref:t})});C_.displayName=vW;var wW="MenuSub",[N3e,k_]=hu(wW),Ed="MenuSubTrigger",A_=x.forwardRef((e,t)=>{const n=mu(Ed,e.__scopeMenu),r=Of(Ed,e.__scopeMenu),a=k_(Ed,e.__scopeMenu),s=_4(Ed,e.__scopeMenu),o=x.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:c}=s,d={__scopeMenu:e.__scopeMenu},m=x.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return x.useEffect(()=>m,[m]),x.useEffect(()=>{const p=u.current;return()=>{window.clearTimeout(p),c(null)}},[u,c]),h.jsx(A4,{asChild:!0,...d,children:h.jsx(g_,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":R_(n.open),...e,ref:Ha(t,a.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ft(e.onPointerMove,nf(p=>{s.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(s.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:ft(e.onPointerLeave,nf(p=>{m();const b=n.content?.getBoundingClientRect();if(b){const y=n.content?.dataset.side,w=y==="right",S=w?-5:5,k=b[w?"left":"right"],E=b[w?"right":"left"];s.onPointerGraceIntentChange({area:[{x:p.clientX+S,y:p.clientY},{x:k,y:b.top},{x:E,y:b.top},{x:E,y:b.bottom},{x:k,y:b.bottom}],side:y}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(p),p.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:ft(e.onKeyDown,p=>{const b=s.searchRef.current!=="";e.disabled||b&&p.key===" "||tW[r.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});A_.displayName=Ed;var N_="MenuSubContent",__=x.forwardRef((e,t)=>{const n=f_(As,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,s=mu(As,e.__scopeMenu),o=Of(As,e.__scopeMenu),u=k_(N_,e.__scopeMenu),c=x.useRef(null),d=Tn(t,c);return h.jsx(tf.Provider,{scope:e.__scopeMenu,children:h.jsx(Hr,{present:r||s.open,children:h.jsx(tf.Slot,{scope:e.__scopeMenu,children:h.jsx(R4,{id:u.contentId,"aria-labelledby":u.triggerId,...a,ref:d,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{o.isUsingKeyboardRef.current&&c.current?.focus(),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:ft(e.onFocusOutside,m=>{m.target!==u.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:ft(e.onEscapeKeyDown,m=>{o.onClose(),m.preventDefault()}),onKeyDown:ft(e.onKeyDown,m=>{const p=m.currentTarget.contains(m.target),b=nW[o.dir].includes(m.key);p&&b&&(s.onOpenChange(!1),u.trigger?.focus(),m.preventDefault())})})})})})});__.displayName=N_;function R_(e){return e?"open":"closed"}function Np(e){return e==="indeterminate"}function I4(e){return Np(e)?"indeterminate":e?"checked":"unchecked"}function TW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function EW(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function SW(e,t,n){const a=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let o=EW(e,Math.max(s,0));a.length===1&&(o=o.filter(d=>d!==n));const c=o.find(d=>d.toLowerCase().startsWith(a.toLowerCase()));return c!==n?c:void 0}function CW(e,t){const{x:n,y:r}=e;let a=!1;for(let s=0,o=t.length-1;s<t.length;o=s++){const u=t[s],c=t[o],d=u.x,m=u.y,p=c.x,b=c.y;m>r!=b>r&&n<(p-d)*(r-m)/(b-m)+d&&(a=!a)}return a}function kW(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return CW(n,t)}function nf(e){return t=>t.pointerType==="mouse"?e(t):void 0}var AW=d_,NW=A4,_W=h_,RW=m_,MW=M4,DW=p_,IW=A1,OW=b_,LW=y_,PW=w_,jW=E_,zW=S_,BW=C_,FW=A_,HW=__,N1="DropdownMenu",[UW]=Ua(N1,[u_]),va=u_(),[$W,M_]=UW(N1),D_=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:s,onOpenChange:o,modal:u=!0}=e,c=va(t),d=x.useRef(null),[m,p]=Fa({prop:a,defaultProp:s??!1,onChange:o,caller:N1});return h.jsx($W,{scope:t,triggerId:za(),triggerRef:d,contentId:za(),open:m,onOpenChange:p,onOpenToggle:x.useCallback(()=>p(b=>!b),[p]),modal:u,children:h.jsx(AW,{...c,open:m,onOpenChange:p,dir:r,modal:u,children:n})})};D_.displayName=N1;var I_="DropdownMenuTrigger",O_=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,s=M_(I_,n),o=va(n);return h.jsx(NW,{asChild:!0,...o,children:h.jsx($t.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:Ha(t,s.triggerRef),onPointerDown:ft(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(s.onOpenToggle(),s.open||u.preventDefault())}),onKeyDown:ft(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&s.onOpenToggle(),u.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});O_.displayName=I_;var qW="DropdownMenuPortal",L_=e=>{const{__scopeDropdownMenu:t,...n}=e,r=va(t);return h.jsx(_W,{...r,...n})};L_.displayName=qW;var P_="DropdownMenuContent",j_=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=M_(P_,n),s=va(n),o=x.useRef(!1);return h.jsx(RW,{id:a.contentId,"aria-labelledby":a.triggerId,...s,...r,ref:t,onCloseAutoFocus:ft(e.onCloseAutoFocus,u=>{o.current||a.triggerRef.current?.focus(),o.current=!1,u.preventDefault()}),onInteractOutside:ft(e.onInteractOutside,u=>{const c=u.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0,m=c.button===2||d;(!a.modal||m)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});j_.displayName=P_;var VW="DropdownMenuGroup",GW=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=va(n);return h.jsx(MW,{...a,...r,ref:t})});GW.displayName=VW;var YW="DropdownMenuLabel",WW=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=va(n);return h.jsx(DW,{...a,...r,ref:t})});WW.displayName=YW;var XW="DropdownMenuItem",z_=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=va(n);return h.jsx(IW,{...a,...r,ref:t})});z_.displayName=XW;var KW="DropdownMenuCheckboxItem",QW=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=va(n);return h.jsx(OW,{...a,...r,ref:t})});QW.displayName=KW;var ZW="DropdownMenuRadioGroup",JW=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=va(n);return h.jsx(LW,{...a,...r,ref:t})});JW.displayName=ZW;var eX="DropdownMenuRadioItem",tX=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=va(n);return h.jsx(PW,{...a,...r,ref:t})});tX.displayName=eX;var nX="DropdownMenuItemIndicator",rX=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=va(n);return h.jsx(jW,{...a,...r,ref:t})});rX.displayName=nX;var aX="DropdownMenuSeparator",B_=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=va(n);return h.jsx(zW,{...a,...r,ref:t})});B_.displayName=aX;var sX="DropdownMenuArrow",iX=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=va(n);return h.jsx(BW,{...a,...r,ref:t})});iX.displayName=sX;var oX="DropdownMenuSubTrigger",lX=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=va(n);return h.jsx(FW,{...a,...r,ref:t})});lX.displayName=oX;var uX="DropdownMenuSubContent",cX=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=va(n);return h.jsx(HW,{...a,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});cX.displayName=uX;var dX=D_,fX=O_,hX=L_,mX=j_,pX=z_,gX=B_,$b,_1="HoverCard",[F_]=Ua(_1,[Jc]),R1=Jc(),[bX,M1]=F_(_1),H_=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:a,onOpenChange:s,openDelay:o=700,closeDelay:u=300}=e,c=R1(t),d=x.useRef(0),m=x.useRef(0),p=x.useRef(!1),b=x.useRef(!1),[y,w]=Fa({prop:r,defaultProp:a??!1,onChange:s,caller:_1}),S=x.useCallback(()=>{clearTimeout(m.current),d.current=window.setTimeout(()=>w(!0),o)},[o,w]),k=x.useCallback(()=>{clearTimeout(d.current),!p.current&&!b.current&&(m.current=window.setTimeout(()=>w(!1),u))},[u,w]),E=x.useCallback(()=>w(!1),[w]);return x.useEffect(()=>()=>{clearTimeout(d.current),clearTimeout(m.current)},[]),h.jsx(bX,{scope:t,open:y,onOpenChange:w,onOpen:S,onClose:k,onDismiss:E,hasSelectionRef:p,isPointerDownOnContentRef:b,children:h.jsx(E4,{...c,children:n})})};H_.displayName=_1;var U_="HoverCardTrigger",$_=x.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,a=M1(U_,n),s=R1(n);return h.jsx(S4,{asChild:!0,...s,children:h.jsx($t.a,{"data-state":a.open?"open":"closed",...r,ref:t,onPointerEnter:ft(e.onPointerEnter,Rp(a.onOpen)),onPointerLeave:ft(e.onPointerLeave,Rp(a.onClose)),onFocus:ft(e.onFocus,a.onOpen),onBlur:ft(e.onBlur,a.onClose),onTouchStart:ft(e.onTouchStart,o=>o.preventDefault())})})});$_.displayName=U_;var O4="HoverCardPortal",[xX,yX]=F_(O4,{forceMount:void 0}),q_=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:a}=e,s=M1(O4,t);return h.jsx(xX,{scope:t,forceMount:n,children:h.jsx(Hr,{present:n||s.open,children:h.jsx(Rf,{asChild:!0,container:a,children:r})})})};q_.displayName=O4;var _p="HoverCardContent",V_=x.forwardRef((e,t)=>{const n=yX(_p,e.__scopeHoverCard),{forceMount:r=n.forceMount,...a}=e,s=M1(_p,e.__scopeHoverCard);return h.jsx(Hr,{present:r||s.open,children:h.jsx(vX,{"data-state":s.open?"open":"closed",...a,onPointerEnter:ft(e.onPointerEnter,Rp(s.onOpen)),onPointerLeave:ft(e.onPointerLeave,Rp(s.onClose)),ref:t})})});V_.displayName=_p;var vX=x.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:o,...u}=e,c=M1(_p,n),d=R1(n),m=x.useRef(null),p=Tn(t,m),[b,y]=x.useState(!1);return x.useEffect(()=>{if(b){const w=document.body;return $b=w.style.userSelect||w.style.webkitUserSelect,w.style.userSelect="none",w.style.webkitUserSelect="none",()=>{w.style.userSelect=$b,w.style.webkitUserSelect=$b}}},[b]),x.useEffect(()=>{if(m.current){const w=()=>{y(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",w),()=>{document.removeEventListener("pointerup",w),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),x.useEffect(()=>{m.current&&EX(m.current).forEach(S=>S.setAttribute("tabindex","-1"))}),h.jsx(_f,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:o,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:ft(s,w=>{w.preventDefault()}),onDismiss:c.onDismiss,children:h.jsx(C4,{...d,...u,onPointerDown:ft(u.onPointerDown,w=>{w.currentTarget.contains(w.target)&&y(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:p,style:{...u.style,userSelect:b?"text":void 0,WebkitUserSelect:b?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),wX="HoverCardArrow",TX=x.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,a=R1(n);return h.jsx(k4,{...a,...r,ref:t})});TX.displayName=wX;function Rp(e){return t=>t.pointerType==="touch"?void 0:e()}function EX(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var SX=H_,CX=$_,kX=q_,AX=V_;function NX(e,[t,n]){return Math.min(n,Math.max(t,e))}function _X(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var L4="ScrollArea",[G_]=Ua(L4),[RX,Ms]=G_(L4),Y_=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:s=600,...o}=e,[u,c]=x.useState(null),[d,m]=x.useState(null),[p,b]=x.useState(null),[y,w]=x.useState(null),[S,k]=x.useState(null),[E,A]=x.useState(0),[_,I]=x.useState(0),[P,O]=x.useState(!1),[R,z]=x.useState(!1),F=Tn(t,X=>c(X)),U=g1(a);return h.jsx(RX,{scope:n,type:r,dir:U,scrollHideDelay:s,scrollArea:u,viewport:d,onViewportChange:m,content:p,onContentChange:b,scrollbarX:y,onScrollbarXChange:w,scrollbarXEnabled:P,onScrollbarXEnabledChange:O,scrollbarY:S,onScrollbarYChange:k,scrollbarYEnabled:R,onScrollbarYEnabledChange:z,onCornerWidthChange:A,onCornerHeightChange:I,children:h.jsx($t.div,{dir:U,...o,ref:F,style:{position:"relative","--radix-scroll-area-corner-width":E+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})})});Y_.displayName=L4;var W_="ScrollAreaViewport",X_=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...s}=e,o=Ms(W_,n),u=x.useRef(null),c=Tn(t,u,o.onViewportChange);return h.jsxs(h.Fragment,{children:[h.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),h.jsx($t.div,{"data-radix-scroll-area-viewport":"",...s,ref:c,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:h.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});X_.displayName=W_;var Ti="ScrollAreaScrollbar",K_=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Ms(Ti,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:o}=a,u=e.orientation==="horizontal";return x.useEffect(()=>(u?s(!0):o(!0),()=>{u?s(!1):o(!1)}),[u,s,o]),a.type==="hover"?h.jsx(MX,{...r,ref:t,forceMount:n}):a.type==="scroll"?h.jsx(DX,{...r,ref:t,forceMount:n}):a.type==="auto"?h.jsx(Q_,{...r,ref:t,forceMount:n}):a.type==="always"?h.jsx(P4,{...r,ref:t}):null});K_.displayName=Ti;var MX=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Ms(Ti,e.__scopeScrollArea),[s,o]=x.useState(!1);return x.useEffect(()=>{const u=a.scrollArea;let c=0;if(u){const d=()=>{window.clearTimeout(c),o(!0)},m=()=>{c=window.setTimeout(()=>o(!1),a.scrollHideDelay)};return u.addEventListener("pointerenter",d),u.addEventListener("pointerleave",m),()=>{window.clearTimeout(c),u.removeEventListener("pointerenter",d),u.removeEventListener("pointerleave",m)}}},[a.scrollArea,a.scrollHideDelay]),h.jsx(Hr,{present:n||s,children:h.jsx(Q_,{"data-state":s?"visible":"hidden",...r,ref:t})})}),DX=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Ms(Ti,e.__scopeScrollArea),s=e.orientation==="horizontal",o=I1(()=>c("SCROLL_END"),100),[u,c]=_X("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return x.useEffect(()=>{if(u==="idle"){const d=window.setTimeout(()=>c("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(d)}},[u,a.scrollHideDelay,c]),x.useEffect(()=>{const d=a.viewport,m=s?"scrollLeft":"scrollTop";if(d){let p=d[m];const b=()=>{const y=d[m];p!==y&&(c("SCROLL"),o()),p=y};return d.addEventListener("scroll",b),()=>d.removeEventListener("scroll",b)}},[a.viewport,s,c,o]),h.jsx(Hr,{present:n||u!=="hidden",children:h.jsx(P4,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ft(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:ft(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),Q_=x.forwardRef((e,t)=>{const n=Ms(Ti,e.__scopeScrollArea),{forceMount:r,...a}=e,[s,o]=x.useState(!1),u=e.orientation==="horizontal",c=I1(()=>{if(n.viewport){const d=n.viewport.offsetWidth<n.viewport.scrollWidth,m=n.viewport.offsetHeight<n.viewport.scrollHeight;o(u?d:m)}},10);return zc(n.viewport,c),zc(n.content,c),h.jsx(Hr,{present:r||s,children:h.jsx(P4,{"data-state":s?"visible":"hidden",...a,ref:t})})}),P4=x.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,a=Ms(Ti,e.__scopeScrollArea),s=x.useRef(null),o=x.useRef(0),[u,c]=x.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=nR(u.viewport,u.content),m={...r,sizes:u,onSizesChange:c,hasThumb:d>0&&d<1,onThumbChange:b=>s.current=b,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:b=>o.current=b};function p(b,y){return zX(b,o.current,u,y)}return n==="horizontal"?h.jsx(IX,{...m,ref:t,onThumbPositionChange:()=>{if(a.viewport&&s.current){const b=a.viewport.scrollLeft,y=S8(b,u,a.dir);s.current.style.transform=`translate3d(${y}px, 0, 0)`}},onWheelScroll:b=>{a.viewport&&(a.viewport.scrollLeft=b)},onDragScroll:b=>{a.viewport&&(a.viewport.scrollLeft=p(b,a.dir))}}):n==="vertical"?h.jsx(OX,{...m,ref:t,onThumbPositionChange:()=>{if(a.viewport&&s.current){const b=a.viewport.scrollTop,y=S8(b,u);s.current.style.transform=`translate3d(0, ${y}px, 0)`}},onWheelScroll:b=>{a.viewport&&(a.viewport.scrollTop=b)},onDragScroll:b=>{a.viewport&&(a.viewport.scrollTop=p(b))}}):null}),IX=x.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,s=Ms(Ti,e.__scopeScrollArea),[o,u]=x.useState(),c=x.useRef(null),d=Tn(t,c,s.onScrollbarXChange);return x.useEffect(()=>{c.current&&u(getComputedStyle(c.current))},[c]),h.jsx(J_,{"data-orientation":"horizontal",...a,ref:d,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":D1(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.x),onDragScroll:m=>e.onDragScroll(m.x),onWheelScroll:(m,p)=>{if(s.viewport){const b=s.viewport.scrollLeft+m.deltaX;e.onWheelScroll(b),aR(b,p)&&m.preventDefault()}},onResize:()=>{c.current&&s.viewport&&o&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Dp(o.paddingLeft),paddingEnd:Dp(o.paddingRight)}})}})}),OX=x.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,s=Ms(Ti,e.__scopeScrollArea),[o,u]=x.useState(),c=x.useRef(null),d=Tn(t,c,s.onScrollbarYChange);return x.useEffect(()=>{c.current&&u(getComputedStyle(c.current))},[c]),h.jsx(J_,{"data-orientation":"vertical",...a,ref:d,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":D1(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.y),onDragScroll:m=>e.onDragScroll(m.y),onWheelScroll:(m,p)=>{if(s.viewport){const b=s.viewport.scrollTop+m.deltaY;e.onWheelScroll(b),aR(b,p)&&m.preventDefault()}},onResize:()=>{c.current&&s.viewport&&o&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Dp(o.paddingTop),paddingEnd:Dp(o.paddingBottom)}})}})}),[LX,Z_]=G_(Ti),J_=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:s,onThumbPointerUp:o,onThumbPointerDown:u,onThumbPositionChange:c,onDragScroll:d,onWheelScroll:m,onResize:p,...b}=e,y=Ms(Ti,n),[w,S]=x.useState(null),k=Tn(t,F=>S(F)),E=x.useRef(null),A=x.useRef(""),_=y.viewport,I=r.content-r.viewport,P=ra(m),O=ra(c),R=I1(p,10);function z(F){if(E.current){const U=F.clientX-E.current.left,X=F.clientY-E.current.top;d({x:U,y:X})}}return x.useEffect(()=>{const F=U=>{const X=U.target;w?.contains(X)&&P(U,I)};return document.addEventListener("wheel",F,{passive:!1}),()=>document.removeEventListener("wheel",F,{passive:!1})},[_,w,I,P]),x.useEffect(O,[r,O]),zc(w,R),zc(y.content,R),h.jsx(LX,{scope:n,scrollbar:w,hasThumb:a,onThumbChange:ra(s),onThumbPointerUp:ra(o),onThumbPositionChange:O,onThumbPointerDown:ra(u),children:h.jsx($t.div,{...b,ref:k,style:{position:"absolute",...b.style},onPointerDown:ft(e.onPointerDown,F=>{F.button===0&&(F.target.setPointerCapture(F.pointerId),E.current=w.getBoundingClientRect(),A.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",y.viewport&&(y.viewport.style.scrollBehavior="auto"),z(F))}),onPointerMove:ft(e.onPointerMove,z),onPointerUp:ft(e.onPointerUp,F=>{const U=F.target;U.hasPointerCapture(F.pointerId)&&U.releasePointerCapture(F.pointerId),document.body.style.webkitUserSelect=A.current,y.viewport&&(y.viewport.style.scrollBehavior=""),E.current=null})})})}),Mp="ScrollAreaThumb",eR=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Z_(Mp,e.__scopeScrollArea);return h.jsx(Hr,{present:n||a.hasThumb,children:h.jsx(PX,{ref:t,...r})})}),PX=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,s=Ms(Mp,n),o=Z_(Mp,n),{onThumbPositionChange:u}=o,c=Tn(t,p=>o.onThumbChange(p)),d=x.useRef(void 0),m=I1(()=>{d.current&&(d.current(),d.current=void 0)},100);return x.useEffect(()=>{const p=s.viewport;if(p){const b=()=>{if(m(),!d.current){const y=BX(p,u);d.current=y,u()}};return u(),p.addEventListener("scroll",b),()=>p.removeEventListener("scroll",b)}},[s.viewport,m,u]),h.jsx($t.div,{"data-state":o.hasThumb?"visible":"hidden",...a,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ft(e.onPointerDownCapture,p=>{const y=p.target.getBoundingClientRect(),w=p.clientX-y.left,S=p.clientY-y.top;o.onThumbPointerDown({x:w,y:S})}),onPointerUp:ft(e.onPointerUp,o.onThumbPointerUp)})});eR.displayName=Mp;var j4="ScrollAreaCorner",tR=x.forwardRef((e,t)=>{const n=Ms(j4,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?h.jsx(jX,{...e,ref:t}):null});tR.displayName=j4;var jX=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=Ms(j4,n),[s,o]=x.useState(0),[u,c]=x.useState(0),d=!!(s&&u);return zc(a.scrollbarX,()=>{const m=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(m),c(m)}),zc(a.scrollbarY,()=>{const m=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(m),o(m)}),d?h.jsx($t.div,{...r,ref:t,style:{width:s,height:u,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Dp(e){return e?parseInt(e,10):0}function nR(e,t){const n=e/t;return isNaN(n)?0:n}function D1(e){const t=nR(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function zX(e,t,n,r="ltr"){const a=D1(n),s=a/2,o=t||s,u=a-o,c=n.scrollbar.paddingStart+o,d=n.scrollbar.size-n.scrollbar.paddingEnd-u,m=n.content-n.viewport,p=r==="ltr"?[0,m]:[m*-1,0];return rR([c,d],p)(e)}function S8(e,t,n="ltr"){const r=D1(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-a,o=t.content-t.viewport,u=s-r,c=n==="ltr"?[0,o]:[o*-1,0],d=NX(e,c);return rR([0,o],[0,u])(d)}function rR(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function aR(e,t){return e>0&&e<t}var BX=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function a(){const s={left:e.scrollLeft,top:e.scrollTop},o=n.left!==s.left,u=n.top!==s.top;(o||u)&&t(),n=s,r=window.requestAnimationFrame(a)})(),()=>window.cancelAnimationFrame(r)};function I1(e,t){const n=ra(e),r=x.useRef(0);return x.useEffect(()=>()=>window.clearTimeout(r.current),[]),x.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function zc(e,t){const n=ra(t);xi(()=>{let r=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return a.observe(e),()=>{window.cancelAnimationFrame(r),a.unobserve(e)}}},[e,n])}var FX=Y_,HX=X_,UX=tR;function $X(e){const t=VX(e),n=x.forwardRef((r,a)=>{const{children:s,...o}=r,u=x.Children.toArray(s),c=u.find(YX);if(c){const d=c.props.children,m=u.map(p=>p===c?x.Children.count(d)>1?x.Children.only(null):x.isValidElement(d)?d.props.children:null:p);return h.jsx(t,{...o,ref:a,children:x.isValidElement(d)?x.cloneElement(d,void 0,m):null})}return h.jsx(t,{...o,ref:a,children:s})});return n.displayName=`${e}.Slot`,n}var qX=$X("Slot");function VX(e){const t=x.forwardRef((n,r)=>{const{children:a,...s}=n;if(x.isValidElement(a)){const o=XX(a),u=WX(s,a.props);return a.type!==x.Fragment&&(u.ref=r?Ha(r,o):o),x.cloneElement(a,u)}return x.Children.count(a)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var GX=Symbol("radix.slottable");function YX(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===GX}function WX(e,t){const n={...t};for(const r in t){const a=e[r],s=t[r];/^on[A-Z]/.test(r)?a&&s?n[r]=(...u)=>{const c=s(...u);return a(...u),c}:a&&(n[r]=a):r==="style"?n[r]={...a,...s}:r==="className"&&(n[r]=[a,s].filter(Boolean).join(" "))}return{...e,...n}}function XX(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var O1="Switch",[KX]=Ua(O1),[QX,ZX]=KX(O1),sR=x.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:a,defaultChecked:s,required:o,disabled:u,value:c="on",onCheckedChange:d,form:m,...p}=e,[b,y]=x.useState(null),w=Tn(t,_=>y(_)),S=x.useRef(!1),k=b?m||!!b.closest("form"):!0,[E,A]=Fa({prop:a,defaultProp:s??!1,onChange:d,caller:O1});return h.jsxs(QX,{scope:n,checked:E,disabled:u,children:[h.jsx($t.button,{type:"button",role:"switch","aria-checked":E,"aria-required":o,"data-state":uR(E),"data-disabled":u?"":void 0,disabled:u,value:c,...p,ref:w,onClick:ft(e.onClick,_=>{A(I=>!I),k&&(S.current=_.isPropagationStopped(),S.current||_.stopPropagation())})}),k&&h.jsx(lR,{control:b,bubbles:!S.current,name:r,value:c,checked:E,required:o,disabled:u,form:m,style:{transform:"translateX(-100%)"}})]})});sR.displayName=O1;var iR="SwitchThumb",oR=x.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,a=ZX(iR,n);return h.jsx($t.span,{"data-state":uR(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})});oR.displayName=iR;var JX="SwitchBubbleInput",lR=x.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...a},s)=>{const o=x.useRef(null),u=Tn(o,s),c=CN(n),d=h4(t);return x.useEffect(()=>{const m=o.current;if(!m)return;const p=window.HTMLInputElement.prototype,y=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==n&&y){const w=new Event("click",{bubbles:r});y.call(m,n),m.dispatchEvent(w)}},[c,n,r]),h.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:u,style:{...a.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});lR.displayName=JX;function uR(e){return e?"checked":"unchecked"}var eK=sR,tK=oR,cR="Toggle",dR=x.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:a,...s}=e,[o,u]=Fa({prop:n,onChange:a,defaultProp:r??!1,caller:cR});return h.jsx($t.button,{type:"button","aria-pressed":o,"data-state":o?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:ft(e.onClick,()=>{e.disabled||u(!o)})})});dR.displayName=cR;var ml="ToggleGroup",[fR]=Ua(ml,[C1]),hR=C1(),z4=ge.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const a=r;return h.jsx(nK,{...a,ref:t})}if(n==="multiple"){const a=r;return h.jsx(rK,{...a,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${ml}\``)});z4.displayName=ml;var[mR,pR]=fR(ml),nK=ge.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:a=()=>{},...s}=e,[o,u]=Fa({prop:n,defaultProp:r??"",onChange:a,caller:ml});return h.jsx(mR,{scope:e.__scopeToggleGroup,type:"single",value:ge.useMemo(()=>o?[o]:[],[o]),onItemActivate:u,onItemDeactivate:ge.useCallback(()=>u(""),[u]),children:h.jsx(gR,{...s,ref:t})})}),rK=ge.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:a=()=>{},...s}=e,[o,u]=Fa({prop:n,defaultProp:r??[],onChange:a,caller:ml}),c=ge.useCallback(m=>u((p=[])=>[...p,m]),[u]),d=ge.useCallback(m=>u((p=[])=>p.filter(b=>b!==m)),[u]);return h.jsx(mR,{scope:e.__scopeToggleGroup,type:"multiple",value:o,onItemActivate:c,onItemDeactivate:d,children:h.jsx(gR,{...s,ref:t})})});z4.displayName=ml;var[aK,sK]=fR(ml),gR=ge.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:a=!0,orientation:s,dir:o,loop:u=!0,...c}=e,d=hR(n),m=g1(o),p={role:"group",dir:m,...c};return h.jsx(aK,{scope:n,rovingFocus:a,disabled:r,children:a?h.jsx(i_,{asChild:!0,...d,orientation:s,dir:m,loop:u,children:h.jsx($t.div,{...p,ref:t})}):h.jsx($t.div,{...p,ref:t})})}),Ip="ToggleGroupItem",bR=ge.forwardRef((e,t)=>{const n=pR(Ip,e.__scopeToggleGroup),r=sK(Ip,e.__scopeToggleGroup),a=hR(e.__scopeToggleGroup),s=n.value.includes(e.value),o=r.disabled||e.disabled,u={...e,pressed:s,disabled:o},c=ge.useRef(null);return r.rovingFocus?h.jsx(o_,{asChild:!0,...a,focusable:!o,active:s,ref:c,children:h.jsx(C8,{...u,ref:t})}):h.jsx(C8,{...u,ref:t})});bR.displayName=Ip;var C8=ge.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...a}=e,s=pR(Ip,n),o={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},u=s.type==="single"?o:void 0;return h.jsx(dR,{...u,...a,ref:t,onPressedChange:c=>{c?s.onItemActivate(r):s.onItemDeactivate(r)}})}),iK=z4,oK=bR,lK=Symbol("radix.slottable");function uK(e){const t=({children:n})=>h.jsx(h.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=lK,t}var[L1]=Ua("Tooltip",[Jc]),P1=Jc(),xR="TooltipProvider",cK=700,Ey="tooltip.open",[dK,B4]=L1(xR),yR=e=>{const{__scopeTooltip:t,delayDuration:n=cK,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:s}=e,o=x.useRef(!0),u=x.useRef(!1),c=x.useRef(0);return x.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),h.jsx(dK,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:x.useCallback(d=>{u.current=d},[]),disableHoverableContent:a,children:s})};yR.displayName=xR;var rf="Tooltip",[fK,Lf]=L1(rf),vR=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a,onOpenChange:s,disableHoverableContent:o,delayDuration:u}=e,c=B4(rf,e.__scopeTooltip),d=P1(t),[m,p]=x.useState(null),b=za(),y=x.useRef(0),w=o??c.disableHoverableContent,S=u??c.delayDuration,k=x.useRef(!1),[E,A]=Fa({prop:r,defaultProp:a??!1,onChange:R=>{R?(c.onOpen(),document.dispatchEvent(new CustomEvent(Ey))):c.onClose(),s?.(R)},caller:rf}),_=x.useMemo(()=>E?k.current?"delayed-open":"instant-open":"closed",[E]),I=x.useCallback(()=>{window.clearTimeout(y.current),y.current=0,k.current=!1,A(!0)},[A]),P=x.useCallback(()=>{window.clearTimeout(y.current),y.current=0,A(!1)},[A]),O=x.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{k.current=!0,A(!0),y.current=0},S)},[S,A]);return x.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),h.jsx(E4,{...d,children:h.jsx(fK,{scope:t,contentId:b,open:E,stateAttribute:_,trigger:m,onTriggerChange:p,onTriggerEnter:x.useCallback(()=>{c.isOpenDelayedRef.current?O():I()},[c.isOpenDelayedRef,O,I]),onTriggerLeave:x.useCallback(()=>{w?P():(window.clearTimeout(y.current),y.current=0)},[P,w]),onOpen:I,onClose:P,disableHoverableContent:w,children:n})})};vR.displayName=rf;var Sy="TooltipTrigger",wR=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=Lf(Sy,n),s=B4(Sy,n),o=P1(n),u=x.useRef(null),c=Tn(t,u,a.onTriggerChange),d=x.useRef(!1),m=x.useRef(!1),p=x.useCallback(()=>d.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),h.jsx(S4,{asChild:!0,...o,children:h.jsx($t.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:c,onPointerMove:ft(e.onPointerMove,b=>{b.pointerType!=="touch"&&!m.current&&!s.isPointerInTransitRef.current&&(a.onTriggerEnter(),m.current=!0)}),onPointerLeave:ft(e.onPointerLeave,()=>{a.onTriggerLeave(),m.current=!1}),onPointerDown:ft(e.onPointerDown,()=>{a.open&&a.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:ft(e.onFocus,()=>{d.current||a.onOpen()}),onBlur:ft(e.onBlur,a.onClose),onClick:ft(e.onClick,a.onClose)})})});wR.displayName=Sy;var F4="TooltipPortal",[hK,mK]=L1(F4,{forceMount:void 0}),TR=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:a}=e,s=Lf(F4,t);return h.jsx(hK,{scope:t,forceMount:n,children:h.jsx(Hr,{present:n||s.open,children:h.jsx(Rf,{asChild:!0,container:a,children:r})})})};TR.displayName=F4;var Bc="TooltipContent",ER=x.forwardRef((e,t)=>{const n=mK(Bc,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...s}=e,o=Lf(Bc,e.__scopeTooltip);return h.jsx(Hr,{present:r||o.open,children:o.disableHoverableContent?h.jsx(SR,{side:a,...s,ref:t}):h.jsx(pK,{side:a,...s,ref:t})})}),pK=x.forwardRef((e,t)=>{const n=Lf(Bc,e.__scopeTooltip),r=B4(Bc,e.__scopeTooltip),a=x.useRef(null),s=Tn(t,a),[o,u]=x.useState(null),{trigger:c,onClose:d}=n,m=a.current,{onPointerInTransitChange:p}=r,b=x.useCallback(()=>{u(null),p(!1)},[p]),y=x.useCallback((w,S)=>{const k=w.currentTarget,E={x:w.clientX,y:w.clientY},A=yK(E,k.getBoundingClientRect()),_=vK(E,A),I=wK(S.getBoundingClientRect()),P=EK([..._,...I]);u(P),p(!0)},[p]);return x.useEffect(()=>()=>b(),[b]),x.useEffect(()=>{if(c&&m){const w=k=>y(k,m),S=k=>y(k,c);return c.addEventListener("pointerleave",w),m.addEventListener("pointerleave",S),()=>{c.removeEventListener("pointerleave",w),m.removeEventListener("pointerleave",S)}}},[c,m,y,b]),x.useEffect(()=>{if(o){const w=S=>{const k=S.target,E={x:S.clientX,y:S.clientY},A=c?.contains(k)||m?.contains(k),_=!TK(E,o);A?b():_&&(b(),d())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[c,m,o,d,b]),h.jsx(SR,{...e,ref:s})}),[gK,bK]=L1(rf,{isInside:!1}),xK=uK("TooltipContent"),SR=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:s,onPointerDownOutside:o,...u}=e,c=Lf(Bc,n),d=P1(n),{onClose:m}=c;return x.useEffect(()=>(document.addEventListener(Ey,m),()=>document.removeEventListener(Ey,m)),[m]),x.useEffect(()=>{if(c.trigger){const p=b=>{b.target?.contains(c.trigger)&&m()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,m]),h.jsx(_f,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:p=>p.preventDefault(),onDismiss:m,children:h.jsxs(C4,{"data-state":c.stateAttribute,...d,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[h.jsx(xK,{children:r}),h.jsx(gK,{scope:n,isInside:!0,children:h.jsx(Cq,{id:c.contentId,role:"tooltip",children:a||r})})]})})});ER.displayName=Bc;var CR="TooltipArrow",kR=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=P1(n);return bK(CR,n).isInside?null:h.jsx(k4,{...a,...r,ref:t})});kR.displayName=CR;function yK(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,a,s)){case s:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function vK(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function wK(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}function TK(e,t){const{x:n,y:r}=e;let a=!1;for(let s=0,o=t.length-1;s<t.length;o=s++){const u=t[s],c=t[o],d=u.x,m=u.y,p=c.x,b=c.y;m>r!=b>r&&n<(p-d)*(r-m)/(b-m)+d&&(a=!a)}return a}function EK(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),SK(t)}function SK(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const a=e[r];for(;t.length>=2;){const s=t[t.length-1],o=t[t.length-2];if((s.x-o.x)*(a.y-o.y)>=(s.y-o.y)*(a.x-o.x))t.pop();else break}t.push(a)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const a=e[r];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(a.y-o.y)>=(s.y-o.y)*(a.x-o.x))n.pop();else break}n.push(a)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var CK=yR,kK=vR,AK=wR,NK=TR,_K=ER,RK=kR;const MK=du("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Bt({className:e,variant:t="default",size:n="default",asChild:r=!1,...a}){const s=r?qX:"button";return h.jsx(s,{"data-slot":"button","data-variant":t,"data-size":n,className:me(MK({variant:t,size:n,className:e})),...a})}function H4({delayDuration:e=0,...t}){return h.jsx(CK,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function gn({...e}){return h.jsx(H4,{children:h.jsx(kK,{"data-slot":"tooltip",...e})})}function bn({...e}){return h.jsx(AK,{"data-slot":"tooltip-trigger",...e})}function xn({className:e,sideOffset:t=0,children:n,...r}){return h.jsx(NK,{children:h.jsxs(_K,{"data-slot":"tooltip-content",sideOffset:t,className:me("bg-foreground text-background [&_p]:text-inherit animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r,children:[n,h.jsx(RK,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px]"})]})})}const j1=x.createContext({code:""}),k8=[/^\s{0,6}(\d+)\t/,/^\s{0,6}(\d+)\s{2,}/,/^\s*(\d+):\s/],DK=50,A8="txt",IK={bash:"sh",sh:"sh",shell:"sh",zsh:"sh",fish:"fish",javascript:"js",js:"js",jsx:"jsx",typescript:"ts",ts:"ts",tsx:"tsx",json:"json",yaml:"yaml",yml:"yml",markdown:"md",md:"md",python:"py",py:"py",go:"go",rust:"rs",java:"java",c:"c",cpp:"cpp",csharp:"cs",html:"html",css:"css",sql:"sql"};let qb=null;const OK=async()=>(qb||(qb=cu(()=>import("./index-BYCCk6-K.js"),__vite__mapDeps([0,1,2]),import.meta.url)),qb),LK=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Wl=new Map;function PK(e,t,n,r){const a=r?`${r[0]??0}:${r.length}`:"none";return`${t}|${n?"lines":"plain"}|${a}|${e}`}function jK(e){const t=Wl.get(e);if(t)return Wl.delete(e),Wl.set(e,t),t}function zK(e,t){if(Wl.set(e,t),Wl.size<=DK)return;const n=Wl.keys().next().value;n!==void 0&&Wl.delete(n)}function BK(e){if(!e)return A8;const t=e.toLowerCase(),n=IK[t];if(n)return n;const r=t.replace(/[^a-z0-9]+/g,"");return r.length>0?r:A8}function FK(e){return`code.${BK(e)}`}function HK(e){const t=typeof e=="string"?e:String(e??""),n=t.replace(/\r\n/g,`
|
|
61
|
+
`).split(`
|
|
62
|
+
`),r=n.map((y,w)=>({l:y,i:w})).filter(({l:y})=>y.length>0);if(r.length<3)return{code:t,hadLineNumbers:!1};const a=k8.map(y=>r.reduce((w,{l:S})=>y.test(S)?w+1:w,0)),s=a.indexOf(Math.max(...a)),o=a[s]??0,u=o/r.length;if(o<3||u<.6)return{code:t,hadLineNumbers:!1};const c=k8[s];let d=-1,m=1;for(let y=0;y<n.length;y++){const w=n[y]?.match(c);if(w){d=y,m=Number.parseInt(w[1],10)||1;break}}const p=new Array(n.length).fill(0).map((y,w)=>d>=0?m+(w-d):w+1);return{code:n.map(y=>y.replace(c,"")).join(`
|
|
63
|
+
`),hadLineNumbers:!0,numbers:p}}function UK(e){return{name:"line-numbers",line(t,n){const r=Array.isArray(e)&&e[n-1]!=null?e[n-1]:n;t.children.unshift({type:"element",tagName:"span",properties:{className:["inline-block","min-w-10","mr-4","text-right","select-none","text-muted-foreground"]},children:[{type:"text",value:String(r)}]})}}}async function $K(e,t,n=!1,r){const{bundledLanguages:a,codeToHtml:s}=await OK();if(!LK(a,t))return null;const o=n||r&&r.length>0?[UK(r)]:[],[u,c]=await Promise.all([s(e,{lang:t,theme:"one-light",transformers:o}),s(e,{lang:t,theme:"one-dark-pro",transformers:o})]);return{light:u,dark:c}}const qK=300,Fc=({code:e,language:t,showLineNumbers:n=!1,className:r,children:a,...s})=>{const[o,u]=x.useState(""),[c,d]=x.useState(""),[m,p]=x.useState(!1),[b,y]=x.useState(!1),[w,S]=x.useState(!1),k=x.useRef(null),E=x.useCallback(()=>{const F=k.current;F&&(y(F.scrollHeight>qK),p(F.scrollHeight>F.clientHeight))},[]);x.useLayoutEffect(()=>{E()},[E,o,c]),x.useEffect(()=>{const F=k.current;if(!F)return;const U=new ResizeObserver(E);return U.observe(F),()=>U.disconnect()},[E]);const{code:A,hadLineNumbers:_,numbers:I}=x.useMemo(()=>HK(e??""),[e]),P=A,O=n||_,R=x.useMemo(()=>t?PK(A,t,O,I):null,[A,t,O,I]);x.useEffect(()=>{let F=!1;if(u(""),d(""),!t||!R)return()=>{F=!0};const U=jK(R);return U?(u(U.light),d(U.dark),()=>{F=!0}):($K(A,t,O,I).then(X=>{F||!X||(zK(R,X),u(X.light),d(X.dark))}),()=>{F=!0})},[R,t,I,A,O]);const z=["[&>pre]:m-0","[&>pre]:whitespace-pre","[&>pre]:bg-card!","[&>pre]:p-3","[&>pre]:text-foreground!","[&>pre]:text-xs","[&_code]:font-mono","[&_code]:text-xs"].join(" ");return h.jsx(j1.Provider,{value:{code:P},children:h.jsxs("div",{className:me("group relative w-full rounded border border-term-border bg-card text-foreground",r),...s,children:[h.jsxs("div",{className:"hover-reveal absolute top-1.5 right-1.5 z-10 flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[b&&h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx(Bt,{className:"shrink-0",onClick:()=>S(!w),size:"icon-xs",variant:"ghost",children:w?h.jsx(gA,{className:"size-3.5"}):h.jsx(pA,{className:"size-3.5"})})}),h.jsx(xn,{className:"px-1.5 py-0.5",children:h.jsx("p",{className:"text-[12px]",children:w?"Collapse":"Expand"})})]}),t==="html"&&h.jsx(YK,{}),h.jsx(GK,{language:t}),h.jsx(VK,{}),a]}),h.jsxs("div",{className:"relative",children:[h.jsx("div",{ref:k,className:me("overflow-auto",b&&!w?"max-h-[200px] overflow-hidden":"max-h-[60vh]",m&&w&&"overscroll-contain"),children:h.jsxs("div",{className:"relative",children:[o?h.jsx("div",{className:me("dark:hidden",z),dangerouslySetInnerHTML:{__html:o}}):h.jsx("div",{className:me("dark:hidden",z),children:h.jsx("pre",{children:h.jsx("code",{children:P})})}),c?h.jsx("div",{className:me("hidden dark:block",z),dangerouslySetInnerHTML:{__html:c}}):h.jsx("div",{className:me("hidden dark:block",z),children:h.jsx("pre",{children:h.jsx("code",{children:P})})})]})}),b&&!w&&h.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-12 bg-gradient-to-t from-card to-transparent pointer-events-none"})]}),b&&h.jsxs("button",{type:"button",className:"flex w-full items-center justify-center gap-1 border-t border-term-border py-1 text-xs text-muted-foreground cursor-pointer hover:text-foreground hover:bg-muted/30 transition-colors",onClick:()=>S(!w),children:[h.jsx(ro,{className:me("size-3 transition-transform duration-200",w&&"rotate-180")}),w?"Show less":"Show more"]})]})})},VK=({ref:e,onCopy:t,onError:n,timeout:r=2e3,tooltip:a="Copy",children:s,className:o,...u})=>{const[c,d]=x.useState(!1),{code:m}=x.useContext(j1),p=async()=>{if(typeof window>"u"||!navigator?.clipboard?.writeText){n?.(new Error("Clipboard API not available"));return}try{await navigator.clipboard.writeText(m),d(!0),t?.(),setTimeout(()=>d(!1),r)}catch(y){n?.(y)}},b=c?fo:Kc;return h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx(Bt,{ref:e,className:me("shrink-0",o),onClick:p,size:"icon-xs",variant:"ghost",...u,children:s??h.jsx(b,{className:"size-3.5"})})}),h.jsx(xn,{className:"px-1.5 py-0.5",children:h.jsx("p",{className:"text-[12px]",children:a})})]})},GK=({ref:e,language:t,filename:n,mimeType:r="text/plain",onDownload:a,onError:s,tooltip:o="Download",children:u,className:c,...d})=>{const{code:m}=x.useContext(j1),p=n??FK(t),b=()=>{if(typeof window>"u"||typeof document>"u"){s?.(new Error("Download is not available"));return}try{const y=new Blob([m],{type:r}),w=URL.createObjectURL(y),S=document.createElement("a");S.href=w,S.download=p,document.body.appendChild(S),S.click(),document.body.removeChild(S),setTimeout(()=>URL.revokeObjectURL(w),0),a?.(p)}catch(y){const w=y instanceof Error?y:new Error("Failed to download code");s?.(w)}};return h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx(Bt,{ref:e,className:me("shrink-0",c),onClick:b,size:"icon-xs",variant:"ghost",...d,children:u??h.jsx(uA,{className:"size-3.5"})})}),h.jsx(xn,{className:"px-1.5 py-0.5",children:h.jsx("p",{className:"text-[12px]",children:o})})]})},YK=({ref:e,onPreview:t,onError:n,tooltip:r="Preview",children:a,className:s,...o})=>{const{code:u}=x.useContext(j1),c=()=>{if(typeof window>"u"){n?.(new Error("Preview is not available"));return}try{const d=new Blob([u],{type:"text/html"}),m=URL.createObjectURL(d);window.open(m,"_blank"),setTimeout(()=>URL.revokeObjectURL(m),5e3),t?.()}catch(d){const m=d instanceof Error?d:new Error("Failed to preview");n?.(m)}};return h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx(Bt,{ref:e,className:me("shrink-0",s),onClick:c,size:"icon-xs",variant:"ghost",...o,children:a??h.jsx(cA,{className:"size-3.5"})})}),h.jsx(xn,{className:"px-1.5 py-0.5",children:h.jsx("p",{className:"text-[12px]",children:r})})]})},WK=du("relative w-full border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function XK({className:e,variant:t,...n}){return h.jsx("div",{"data-slot":"alert",role:"alert",className:me(WK({variant:t}),e),...n})}function KK({className:e,...t}){return h.jsx("div",{"data-slot":"alert-description",className:me("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}const AR=x.createContext(null),z1=()=>{const e=x.useContext(AR);if(!e)throw new Error("Confirmation components must be used within Confirmation");return e},QK=({className:e,approval:t,state:n,...r})=>!t||n==="input-streaming"||n==="input-available"?null:h.jsx(AR.Provider,{value:{approval:t,state:n},children:h.jsx(XK,{className:me("flex flex-col gap-2",e),...r})}),ZK=({className:e,...t})=>h.jsx(KK,{className:me("inline",e),...t}),JK=({children:e})=>{const{state:t}=z1();return t!=="approval-requested"?null:e},eQ=({children:e})=>{const{approval:t,state:n}=z1();return!t?.approved||n!=="approval-responded"&&n!=="output-denied"&&n!=="output-available"?null:e},tQ=({children:e})=>{const{approval:t,state:n}=z1();return t?.approved!==!1||n!=="approval-responded"&&n!=="output-denied"&&n!=="output-available"?null:e},nQ=({className:e,...t})=>{const{state:n}=z1();return n!=="approval-requested"?null:h.jsx("div",{className:me("flex items-center justify-start gap-2",e),...t})},Vb=e=>h.jsx(Bt,{className:"h-8 px-3 text-sm",type:"button",...e});function NR({...e}){return h.jsx(SX,{"data-slot":"hover-card",...e})}function _R({...e}){return h.jsx(CX,{"data-slot":"hover-card-trigger",...e})}function RR({className:e,align:t="center",sideOffset:n=4,...r}){return h.jsx(kX,{"data-slot":"hover-card-portal",children:h.jsx(AX,{"data-slot":"hover-card-content",align:t,sideOffset:n,className:me("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...r})})}function rQ(e,t=[]){let n=[];function r(s,o){const u=x.createContext(o);u.displayName=s+"Context";const c=n.length;n=[...n,o];const d=p=>{const{scope:b,children:y,...w}=p,S=b?.[e]?.[c]||u,k=x.useMemo(()=>w,Object.values(w));return h.jsx(S.Provider,{value:k,children:y})};d.displayName=s+"Provider";function m(p,b){const y=b?.[e]?.[c]||u,w=x.useContext(y);if(w)return w;if(o!==void 0)return o;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[d,m]}const a=()=>{const s=n.map(o=>x.createContext(o));return function(u){const c=u?.[e]||s;return x.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return a.scopeName=e,[r,aQ(a,...t)]}function aQ(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const o=r.reduce((u,{useScope:c,scopeName:d})=>{const p=c(s)[`__scope${d}`];return{...u,...p}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var sQ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],MR=sQ.reduce((e,t)=>{const n=L9(`Primitive.${t}`),r=x.forwardRef((a,s)=>{const{asChild:o,...u}=a,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(c,{...u,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),U4="Progress",$4=100,[iQ]=rQ(U4),[oQ,lQ]=iQ(U4),DR=x.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:a,getValueLabel:s=uQ,...o}=e;(a||a===0)&&!N8(a)&&console.error(cQ(`${a}`,"Progress"));const u=N8(a)?a:$4;r!==null&&!_8(r,u)&&console.error(dQ(`${r}`,"Progress"));const c=_8(r,u)?r:null,d=Op(c)?s(c,u):void 0;return h.jsx(oQ,{scope:n,value:c,max:u,children:h.jsx(MR.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":Op(c)?c:void 0,"aria-valuetext":d,role:"progressbar","data-state":LR(c,u),"data-value":c??void 0,"data-max":u,...o,ref:t})})});DR.displayName=U4;var IR="ProgressIndicator",OR=x.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,a=lQ(IR,n);return h.jsx(MR.div,{"data-state":LR(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...r,ref:t})});OR.displayName=IR;function uQ(e,t){return`${Math.round(e/t*100)}%`}function LR(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Op(e){return typeof e=="number"}function N8(e){return Op(e)&&!isNaN(e)&&e>0}function _8(e,t){return Op(e)&&!isNaN(e)&&e<=t&&e>=0}function cQ(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${$4}\`.`}function dQ(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
64
|
+
- a positive number
|
|
65
|
+
- less than the value passed to \`max\` (or ${$4} if no \`max\` prop is set)
|
|
66
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
67
|
+
|
|
68
|
+
Defaulting to \`null\`.`}var fQ=DR,hQ=OR;function mQ({className:e,value:t,...n}){return h.jsx(fQ,{"data-slot":"progress",className:me("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",e),...n,children:h.jsx(hQ,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}const Gb=10,R8=24,Am=12,M8=2;x.createContext(null);const pQ=({usedPercent:e,size:t=20})=>{const n=Number.isFinite(e)?Math.max(0,Math.min(1,e)):0,r=2*Math.PI*Gb,a=r*(1-n);return h.jsxs("svg",{"aria-label":"Model context usage",height:t,role:"img",style:{color:"currentcolor"},viewBox:`0 0 ${R8} ${R8}`,width:t,children:[h.jsx("circle",{cx:Am,cy:Am,fill:"none",opacity:"0.25",r:Gb,stroke:"currentColor",strokeWidth:M8}),h.jsx("circle",{cx:Am,cy:Am,fill:"none",opacity:"0.7",r:Gb,stroke:"currentColor",strokeDasharray:`${r} ${r}`,strokeDashoffset:a,strokeLinecap:"round",strokeWidth:M8,style:{transformOrigin:"center",transform:"rotate(-90deg)"}})]})},D8=({className:e,title:t="No messages yet",description:n="Start a conversation to see messages here",icon:r,children:a,...s})=>h.jsx("div",{className:me("flex size-full flex-col items-center justify-center gap-3 p-8 text-center",e),...s,children:a??h.jsxs(h.Fragment,{children:[r&&h.jsx("div",{className:"text-muted-foreground",children:r}),h.jsxs("div",{className:"space-y-1",children:[h.jsx("h3",{className:"font-medium text-sm",children:t}),n&&h.jsx("p",{className:"text-muted-foreground text-sm",children:n})]})]})}),gQ=({size:e=16})=>h.jsxs("svg",{height:e,strokeLinejoin:"round",style:{color:"currentcolor"},viewBox:"0 0 16 16",width:e,children:[h.jsx("title",{children:"Loader"}),h.jsxs("g",{clipPath:"url(#clip0_2393_1490)",children:[h.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),h.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),h.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),h.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),h.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),h.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),h.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),h.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),h.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),h.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),h.jsx("defs",{children:h.jsx("clipPath",{id:"clip0_2393_1490",children:h.jsx("rect",{fill:"currentColor",height:"16",width:"16"})})})]}),PR=({className:e,size:t=16,...n})=>h.jsx("div",{className:me("inline-flex animate-spin items-center justify-center",e),...n,children:h.jsx(gQ,{size:t})});function jR({...e}){return h.jsx(iG,{"data-slot":"alert-dialog",...e})}function bQ({...e}){return h.jsx(oG,{"data-slot":"alert-dialog-trigger",...e})}function xQ({...e}){return h.jsx(lG,{"data-slot":"alert-dialog-portal",...e})}function yQ({className:e,...t}){return h.jsx(uG,{"data-slot":"alert-dialog-overlay",className:me("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function zR({className:e,size:t="default",...n}){return h.jsxs(xQ,{children:[h.jsx(yQ,{}),h.jsx(cG,{"data-slot":"alert-dialog-content","data-size":t,className:me("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg",e),...n})]})}function BR({className:e,...t}){return h.jsx("div",{"data-slot":"alert-dialog-header",className:me("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...t})}function FR({className:e,...t}){return h.jsx("div",{"data-slot":"alert-dialog-footer",className:me("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...t})}function HR({className:e,...t}){return h.jsx(hG,{"data-slot":"alert-dialog-title",className:me("text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...t})}function UR({className:e,...t}){return h.jsx(mG,{"data-slot":"alert-dialog-description",className:me("text-muted-foreground text-sm",e),...t})}function $R({className:e,variant:t="default",size:n="default",...r}){return h.jsx(Bt,{variant:t,size:n,asChild:!0,children:h.jsx(dG,{"data-slot":"alert-dialog-action",className:me(e),...r})})}function qR({className:e,variant:t="outline",size:n="default",...r}){return h.jsx(Bt,{variant:t,size:n,asChild:!0,children:h.jsx(fG,{"data-slot":"alert-dialog-cancel",className:me(e),...r})})}const vQ=du("flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",{variants:{orientation:{horizontal:"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",vertical:"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}});function wQ({className:e,orientation:t,...n}){return h.jsx("div",{role:"group","data-slot":"button-group","data-orientation":t,className:me(vQ({orientation:t}),e),...n})}function TQ({className:e,asChild:t=!1,...n}){const r=t?P9:"div";return h.jsx(r,{className:me("bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...n})}function e0({...e}){return h.jsx(u4,{"data-slot":"dialog",...e})}function EQ({...e}){return h.jsx(uN,{"data-slot":"dialog-trigger",...e})}function SQ({...e}){return h.jsx(c4,{"data-slot":"dialog-portal",...e})}function CQ({className:e,...t}){return h.jsx(d4,{"data-slot":"dialog-overlay",className:me("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function t0({className:e,children:t,showCloseButton:n=!0,...r}){return h.jsxs(SQ,{"data-slot":"dialog-portal",children:[h.jsx(CQ,{}),h.jsxs(f4,{"data-slot":"dialog-content",className:me("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",e),...r,children:[t,n&&h.jsxs(y1,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[h.jsx(rs,{}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Pf({className:e,...t}){return h.jsx("div",{"data-slot":"dialog-header",className:me("flex flex-col gap-2 text-center sm:text-left",e),...t})}function kQ({className:e,showCloseButton:t=!1,children:n,...r}){return h.jsxs("div",{"data-slot":"dialog-footer",className:me("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r,children:[n,t&&h.jsx(y1,{asChild:!0,children:h.jsx(Bt,{variant:"outline",children:"Close"})})]})}function n0({className:e,...t}){return h.jsx(cN,{"data-slot":"dialog-title",className:me("text-lg leading-none font-semibold",e),...t})}function VR({className:e,...t}){return h.jsx(dN,{"data-slot":"dialog-description",className:me("text-muted-foreground text-sm",e),...t})}function B1(e){const[t,n]=x.useState(null);return x.useEffect(()=>{if(!e){n(null);return}let r=!1;n(null);const a=document.createElement("video");a.muted=!0,a.playsInline=!0,a.preload="metadata",a.crossOrigin="anonymous";const s=()=>{if(r||!(a.videoWidth&&a.videoHeight))return;const d=document.createElement("canvas");d.width=a.videoWidth,d.height=a.videoHeight;const m=d.getContext("2d");if(m)try{m.drawImage(a,0,0,d.width,d.height);const p=d.toDataURL("image/jpeg",.7);r||n(p)}catch{}},o=()=>{const d=a.duration;if(Number.isFinite(d)&&d>0){const m=Math.min(.1,d/2);try{a.currentTime=m}catch{}}},u=()=>{s()},c=()=>{s()};return a.addEventListener("loadedmetadata",o),a.addEventListener("loadeddata",u),a.addEventListener("seeked",c),a.src=e,a.load(),()=>{r=!0,a.removeEventListener("loadedmetadata",o),a.removeEventListener("loadeddata",u),a.removeEventListener("seeked",c),a.removeAttribute("src"),a.load()}},[e]),t}const jf=(function(e){if(e==null)return RQ;if(typeof e=="function")return F1(e);if(typeof e=="object")return Array.isArray(e)?AQ(e):NQ(e);if(typeof e=="string")return _Q(e);throw new Error("Expected function, string, or object as test")});function AQ(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=jf(e[n]);return F1(r);function r(...a){let s=-1;for(;++s<t.length;)if(t[s].apply(this,a))return!0;return!1}}function NQ(e){const t=e;return F1(n);function n(r){const a=r;let s;for(s in e)if(a[s]!==t[s])return!1;return!0}}function _Q(e){return F1(t);function t(n){return n&&n.type===e}}function F1(e){return t;function t(n,r,a){return!!(MQ(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function RQ(){return!0}function MQ(e){return e!==null&&typeof e=="object"&&"type"in e}const GR=[],Sd=!0,Cy=!1,Lp="skip";function q4(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const s=jf(a),o=r?-1:1;u(e,void 0,[])();function u(c,d,m){const p=c&&typeof c=="object"?c:{};if(typeof p.type=="string"){const y=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(c.type+(y?"<"+y+">":""))+")"})}return b;function b(){let y=GR,w,S,k;if((!t||s(c,d,m[m.length-1]||void 0))&&(y=DQ(n(c,m)),y[0]===Cy))return y;if("children"in c&&c.children){const E=c;if(E.children&&y[0]!==Lp)for(S=(r?E.children.length:-1)+o,k=m.concat(E);S>-1&&S<E.children.length;){const A=E.children[S];if(w=u(A,S,k)(),w[0]===Cy)return w;S=typeof w[1]=="number"?w[1]:S+o}}return y}}}function DQ(e){return Array.isArray(e)?e:typeof e=="number"?[Sd,e]:e==null?GR:[e]}function Hc(e,t,n,r){let a,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,a=n):(s=t,o=n,a=r),q4(e,s,u,a);function u(c,d){const m=d[d.length-1],p=m?m.children.indexOf(c):void 0;return o(c,p,m)}}function IQ({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:a=[],blockedImageClass:s="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:o="text-gray-500"}){const u=t.length&&!t.every(d=>d==="*"),c=n.length&&!n.every(d=>d==="*");if(!e&&(u||c))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return d=>{const m=jQ(e,t,n,r,a,s,o);Hc(d,m)}}function I8(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function OQ(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const LQ=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),PQ=new Set(["javascript:","data:","file:","vbscript:"]);function O8(e,t,n,r=!1,a=!1,s=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!a)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return a&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const m=e.substring(5);if(m&&m.length>0&&m!=="invalid")return e}}catch{return null}return null}const o=I8(e,n);if(!o||PQ.has(o.protocol)||!(LQ.has(o.protocol)||s.includes(o.protocol)||s.includes("*")))return null;if(o.protocol==="mailto:"||!o.protocol.match(/^https?:$/))return o.href;const c=OQ(e);return o&&t.some(d=>{const m=I8(d,n);return!m||m.origin!==o.origin?!1:o.href.startsWith(m.href)})?c?o.pathname+o.search+o.hash:o.href:t.includes("*")?o.protocol!=="https:"&&o.protocol!=="http:"?null:c?o.pathname+o.search+o.hash:o.href:null}const Yb=Symbol("node-seen"),jQ=(e,t,n,r,a,s,o)=>{const u=(c,d,m)=>{if(c.type!=="element"||c[Yb])return Sd;if(c.tagName==="a"){const p=O8(c.properties.href,t,e,!1,!1,a);return p===null?(c[Yb]=!0,Hc(c,u),m&&typeof d=="number"&&(m.children[d]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(c.properties.href),class:o},children:[...c.children,{type:"text",value:" [blocked]"}]}),Lp):(c.properties.href=p,c.properties.target="_blank",c.properties.rel="noopener noreferrer",Sd)}if(c.tagName==="img"){const p=O8(c.properties.src,n,e,r,!0,a);return p===null?(c[Yb]=!0,Hc(c,u),m&&typeof d=="number"&&(m.children[d]={type:"element",tagName:"span",properties:{class:s},children:[{type:"text",value:"[Image blocked: "+String(c.properties.alt||"No description")+"]"}]}),Lp):(c.properties.src=p,Sd)}return Sd};return u};class zf{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}zf.prototype.normal={};zf.prototype.property={};zf.prototype.space=void 0;function YR(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new zf(n,r,t)}function af(e){return e.toLowerCase()}class $a{constructor(t,n){this.attribute=n,this.property=t}}$a.prototype.attribute="";$a.prototype.booleanish=!1;$a.prototype.boolean=!1;$a.prototype.commaOrSpaceSeparated=!1;$a.prototype.commaSeparated=!1;$a.prototype.defined=!1;$a.prototype.mustUseProperty=!1;$a.prototype.number=!1;$a.prototype.overloadedBoolean=!1;$a.prototype.property="";$a.prototype.spaceSeparated=!1;$a.prototype.space=void 0;let zQ=0;const Qt=pu(),Sr=pu(),ky=pu(),Xe=pu(),Vn=pu(),_c=pu(),Ja=pu();function pu(){return 2**++zQ}const Ay=Object.freeze(Object.defineProperty({__proto__:null,boolean:Qt,booleanish:Sr,commaOrSpaceSeparated:Ja,commaSeparated:_c,number:Xe,overloadedBoolean:ky,spaceSeparated:Vn},Symbol.toStringTag,{value:"Module"})),Wb=Object.keys(Ay);class V4 extends $a{constructor(t,n,r,a){let s=-1;if(super(t,n),L8(this,"space",a),typeof r=="number")for(;++s<Wb.length;){const o=Wb[s];L8(this,Wb[s],(r&Ay[o])===Ay[o])}}}V4.prototype.defined=!0;function L8(e,t,n){n&&(e[t]=n)}function r0(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const s=new V4(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[af(r)]=r,n[af(s.attribute)]=r}return new zf(t,n,e.space)}const WR=r0({properties:{ariaActiveDescendant:null,ariaAtomic:Sr,ariaAutoComplete:null,ariaBusy:Sr,ariaChecked:Sr,ariaColCount:Xe,ariaColIndex:Xe,ariaColSpan:Xe,ariaControls:Vn,ariaCurrent:null,ariaDescribedBy:Vn,ariaDetails:null,ariaDisabled:Sr,ariaDropEffect:Vn,ariaErrorMessage:null,ariaExpanded:Sr,ariaFlowTo:Vn,ariaGrabbed:Sr,ariaHasPopup:null,ariaHidden:Sr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Vn,ariaLevel:Xe,ariaLive:null,ariaModal:Sr,ariaMultiLine:Sr,ariaMultiSelectable:Sr,ariaOrientation:null,ariaOwns:Vn,ariaPlaceholder:null,ariaPosInSet:Xe,ariaPressed:Sr,ariaReadOnly:Sr,ariaRelevant:null,ariaRequired:Sr,ariaRoleDescription:Vn,ariaRowCount:Xe,ariaRowIndex:Xe,ariaRowSpan:Xe,ariaSelected:Sr,ariaSetSize:Xe,ariaSort:null,ariaValueMax:Xe,ariaValueMin:Xe,ariaValueNow:Xe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function XR(e,t){return t in e?e[t]:t}function KR(e,t){return XR(e,t.toLowerCase())}const BQ=r0({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:_c,acceptCharset:Vn,accessKey:Vn,action:null,allow:null,allowFullScreen:Qt,allowPaymentRequest:Qt,allowUserMedia:Qt,alt:null,as:null,async:Qt,autoCapitalize:null,autoComplete:Vn,autoFocus:Qt,autoPlay:Qt,blocking:Vn,capture:null,charSet:null,checked:Qt,cite:null,className:Vn,cols:Xe,colSpan:null,content:null,contentEditable:Sr,controls:Qt,controlsList:Vn,coords:Xe|_c,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Qt,defer:Qt,dir:null,dirName:null,disabled:Qt,download:ky,draggable:Sr,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Qt,formTarget:null,headers:Vn,height:Xe,hidden:ky,high:Xe,href:null,hrefLang:null,htmlFor:Vn,httpEquiv:Vn,id:null,imageSizes:null,imageSrcSet:null,inert:Qt,inputMode:null,integrity:null,is:null,isMap:Qt,itemId:null,itemProp:Vn,itemRef:Vn,itemScope:Qt,itemType:Vn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Qt,low:Xe,manifest:null,max:null,maxLength:Xe,media:null,method:null,min:null,minLength:Xe,multiple:Qt,muted:Qt,name:null,nonce:null,noModule:Qt,noValidate:Qt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Qt,optimum:Xe,pattern:null,ping:Vn,placeholder:null,playsInline:Qt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Qt,referrerPolicy:null,rel:Vn,required:Qt,reversed:Qt,rows:Xe,rowSpan:Xe,sandbox:Vn,scope:null,scoped:Qt,seamless:Qt,selected:Qt,shadowRootClonable:Qt,shadowRootDelegatesFocus:Qt,shadowRootMode:null,shape:null,size:Xe,sizes:null,slot:null,span:Xe,spellCheck:Sr,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Xe,step:null,style:null,tabIndex:Xe,target:null,title:null,translate:null,type:null,typeMustMatch:Qt,useMap:null,value:Sr,width:Xe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Vn,axis:null,background:null,bgColor:null,border:Xe,borderColor:null,bottomMargin:Xe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Qt,declare:Qt,event:null,face:null,frame:null,frameBorder:null,hSpace:Xe,leftMargin:Xe,link:null,longDesc:null,lowSrc:null,marginHeight:Xe,marginWidth:Xe,noResize:Qt,noHref:Qt,noShade:Qt,noWrap:Qt,object:null,profile:null,prompt:null,rev:null,rightMargin:Xe,rules:null,scheme:null,scrolling:Sr,standby:null,summary:null,text:null,topMargin:Xe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Xe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Qt,disableRemotePlayback:Qt,prefix:null,property:null,results:Xe,security:null,unselectable:null},space:"html",transform:KR}),FQ=r0({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ja,accentHeight:Xe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Xe,amplitude:Xe,arabicForm:null,ascent:Xe,attributeName:null,attributeType:null,azimuth:Xe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Xe,by:null,calcMode:null,capHeight:Xe,className:Vn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Xe,diffuseConstant:Xe,direction:null,display:null,dur:null,divisor:Xe,dominantBaseline:null,download:Qt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Xe,enableBackground:null,end:null,event:null,exponent:Xe,externalResourcesRequired:null,fill:null,fillOpacity:Xe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:_c,g2:_c,glyphName:_c,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Xe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Xe,horizOriginX:Xe,horizOriginY:Xe,id:null,ideographic:Xe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Xe,k:Xe,k1:Xe,k2:Xe,k3:Xe,k4:Xe,kernelMatrix:Ja,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Xe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Xe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Xe,overlineThickness:Xe,paintOrder:null,panose1:null,path:null,pathLength:Xe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Vn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Xe,pointsAtY:Xe,pointsAtZ:Xe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ja,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ja,rev:Ja,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ja,requiredFeatures:Ja,requiredFonts:Ja,requiredFormats:Ja,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Xe,specularExponent:Xe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Xe,strikethroughThickness:Xe,string:null,stroke:null,strokeDashArray:Ja,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Xe,strokeOpacity:Xe,strokeWidth:null,style:null,surfaceScale:Xe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ja,tabIndex:Xe,tableValues:null,target:null,targetX:Xe,targetY:Xe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ja,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Xe,underlineThickness:Xe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Xe,values:null,vAlphabetic:Xe,vMathematical:Xe,vectorEffect:null,vHanging:Xe,vIdeographic:Xe,version:null,vertAdvY:Xe,vertOriginX:Xe,vertOriginY:Xe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Xe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:XR}),QR=r0({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),ZR=r0({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:KR}),JR=r0({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),HQ={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},UQ=/[A-Z]/g,P8=/-[a-z]/g,$Q=/^data[-\w.:]+$/i;function H1(e,t){const n=af(t);let r=t,a=$a;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&$Q.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(P8,VQ);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!P8.test(s)){let o=s.replace(UQ,qQ);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}a=V4}return new a(r,t)}function qQ(e){return"-"+e.toLowerCase()}function VQ(e){return e.charAt(1).toUpperCase()}const Bf=YR([WR,BQ,QR,ZR,JR],"html"),pl=YR([WR,FQ,QR,ZR,JR],"svg");function j8(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const o=n.slice(a,r).trim();(o||!s)&&t.push(o),a=r+1,r=n.indexOf(",",a)}return t}function eM(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const z8=/[#.]/g;function GQ(e,t){const n=e||"",r={};let a=0,s,o;for(;a<n.length;){z8.lastIndex=a;const u=z8.exec(n),c=n.slice(a,u?u.index:n.length);c&&(s?s==="#"?r.id=c:Array.isArray(r.className)?r.className.push(c):r.className=[c]:o=c,a+=c.length),u&&(s=u[0],a++)}return{type:"element",tagName:o||t||"div",properties:r,children:[]}}function B8(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function tM(e){return e.join(" ").trim()}function nM(e,t,n){const r=n?KQ(n):void 0;function a(s,o,...u){let c;if(s==null){c={type:"root",children:[]};const d=o;u.unshift(d)}else{c=GQ(s,t);const d=c.tagName.toLowerCase(),m=r?r.get(d):void 0;if(c.tagName=m||d,YQ(o))u.unshift(o);else for(const[p,b]of Object.entries(o))WQ(e,c.properties,p,b)}for(const d of u)Ny(c.children,d);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return a}function YQ(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const a=t[r];if(a&&typeof a=="object"){if(!Array.isArray(a))return!0;const s=a;for(const o of s)if(typeof o!="number"&&typeof o!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function WQ(e,t,n,r){const a=H1(e,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?a.spaceSeparated?s=B8(r):a.commaSeparated?s=j8(r):a.commaOrSpaceSeparated?s=B8(j8(r).join(" ")):s=F8(a,a.property,r):Array.isArray(r)?s=[...r]:s=a.property==="style"?XQ(r):String(r);if(Array.isArray(s)){const o=[];for(const u of s)o.push(F8(a,a.property,u));s=o}a.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[a.property]=s}}function Ny(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Ny(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Ny(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function F8(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||af(n)===af(t)))return!0}return n}function XQ(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function KQ(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const QQ=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],rM=nM(Bf,"div"),aM=nM(pl,"g",QQ),fi={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ZQ(e,t){return sM(e,{})||{type:"root",children:[]}}function sM(e,t){const n=JQ(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function JQ(e,t){switch(e.nodeType){case 1:return rZ(e,t);case 3:return tZ(e);case 8:return nZ(e);case 9:return H8(e,t);case 10:return eZ();case 11:return H8(e,t);default:return}}function H8(e,t){return{type:"root",children:iM(e,t)}}function eZ(){return{type:"doctype"}}function tZ(e){return{type:"text",value:e.nodeValue||""}}function nZ(e){return{type:"comment",value:e.nodeValue||""}}function rZ(e,t){const n=e.namespaceURI,r=n===fi.svg?aM:rM,a=n===fi.html?e.tagName.toLowerCase():e.tagName,s=n===fi.html&&a==="template"?e.content:e,o=e.getAttributeNames(),u={};let c=-1;for(;++c<o.length;)u[o[c]]=e.getAttribute(o[c])||"";return r(a,u,iM(s,t))}function iM(e,t){const n=e.childNodes,r=[];let a=-1;for(;++a<n.length;){const s=sM(n[a],t);s!==void 0&&r.push(s)}return r}new DOMParser;function aZ(e,t){const n=sZ(e);return ZQ(n)}function sZ(e){const t=document.createElement("template");return t.innerHTML=e,t.content}const U8=(function(e,t,n){const r=jf(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),gu=(function(e){if(e==null)return lZ;if(typeof e=="string")return oZ(e);if(typeof e=="object")return iZ(e);if(typeof e=="function")return G4(e);throw new Error("Expected function, string, or array as `test`")});function iZ(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=gu(e[n]);return G4(r);function r(...a){let s=-1;for(;++s<t.length;)if(t[s].apply(this,a))return!0;return!1}}function oZ(e){return G4(t);function t(n){return n.tagName===e}}function G4(e){return t;function t(n,r,a){return!!(uZ(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function lZ(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function uZ(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const $8=/\n/g,q8=/[\t ]+/g,_y=gu("br"),V8=gu(bZ),cZ=gu("p"),G8=gu("tr"),dZ=gu(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",gZ,xZ]),oM=gu(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function fZ(e,t){const n=t||{},r="children"in e?e.children:[],a=oM(e),s=cM(e,{whitespace:n.whitespace||"normal"}),o=[];(e.type==="text"||e.type==="comment")&&o.push(...uM(e,{breakBefore:!0,breakAfter:!0}));let u=-1;for(;++u<r.length;)o.push(...lM(r[u],e,{whitespace:s,breakBefore:u?void 0:a,breakAfter:u<r.length-1?_y(r[u+1]):a}));const c=[];let d;for(u=-1;++u<o.length;){const m=o[u];typeof m=="number"?d!==void 0&&m>d&&(d=m):m&&(d!==void 0&&d>-1&&c.push(`
|
|
69
|
+
`.repeat(d)||" "),d=-1,c.push(m))}return c.join("")}function lM(e,t,n){return e.type==="element"?hZ(e,t,n):e.type==="text"?n.whitespace==="normal"?uM(e,n):mZ(e):[]}function hZ(e,t,n){const r=cM(e,n),a=e.children||[];let s=-1,o=[];if(dZ(e))return o;let u,c;for(_y(e)||G8(e)&&U8(t,e,G8)?c=`
|
|
70
|
+
`:cZ(e)?(u=2,c=2):oM(e)&&(u=1,c=1);++s<a.length;)o=o.concat(lM(a[s],e,{whitespace:r,breakBefore:s?void 0:u,breakAfter:s<a.length-1?_y(a[s+1]):c}));return V8(e)&&U8(t,e,V8)&&o.push(" "),u&&o.unshift(u),c&&o.push(c),o}function uM(e,t){const n=String(e.value),r=[],a=[];let s=0;for(;s<=n.length;){$8.lastIndex=s;const c=$8.exec(n),d=c&&"index"in c?c.index:n.length;r.push(pZ(n.slice(s,d).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),s===0?t.breakBefore:!0,d===n.length?t.breakAfter:!0)),s=d+1}let o=-1,u;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(a.push(r[o]),u=void 0):r[o]?(typeof u=="number"&&a.push(u),a.push(r[o]),u=0):(o===0||o===r.length-1)&&a.push(0);return a}function mZ(e){return[String(e.value)]}function pZ(e,t,n){const r=[];let a=0,s;for(;a<e.length;){q8.lastIndex=a;const o=q8.exec(e);s=o?o.index:e.length,!a&&!s&&o&&!t&&r.push(""),a!==s&&r.push(e.slice(a,s)),a=o?s+o[0].length:s}return a!==s&&!n&&r.push(""),r.join(" ")}function cM(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function gZ(e){return!!(e.properties||{}).hidden}function bZ(e){return e.tagName==="td"||e.tagName==="th"}function xZ(e){return e.tagName==="dialog"&&!(e.properties||{}).open}class Pa{constructor(t,n,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=n,this.end=r}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new Pa(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}}class ss{constructor(t,n){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=n}range(t,n){return new ss(n,Pa.range(this,t))}}class Ye{constructor(t,n){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r="KaTeX parse error: "+t,a,s,o=n&&n.loc;if(o&&o.start<=o.end){var u=o.lexer.input;a=o.start,s=o.end,a===u.length?r+=" at end of input: ":r+=" at position "+(a+1)+": ";var c=u.slice(a,s).replace(/[^]/g,"$&̲"),d;a>15?d="…"+u.slice(a-15,a):d=u.slice(0,a);var m;s+15<u.length?m=u.slice(s,s+15)+"…":m=u.slice(s),r+=d+c+m}var p=new Error(r);return p.name="ParseError",p.__proto__=Ye.prototype,p.position=a,a!=null&&s!=null&&(p.length=s-a),p.rawMessage=t,p}}Ye.prototype.__proto__=Error.prototype;var yZ=function(t,n){return t===void 0?n:t},vZ=/([A-Z])/g,wZ=function(t){return t.replace(vZ,"-$1").toLowerCase()},TZ={"&":"&",">":">","<":"<",'"':""","'":"'"},EZ=/[&><"']/g;function SZ(e){return String(e).replace(EZ,t=>TZ[t])}var dM=function e(t){return t.type==="ordgroup"||t.type==="color"?t.body.length===1?e(t.body[0]):t:t.type==="font"?e(t.body):t},CZ=function(t){var n=dM(t);return n.type==="mathord"||n.type==="textord"||n.type==="atom"},kZ=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t},AZ=function(t){var n=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t);return n?n[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(n[1])?null:n[1].toLowerCase():"_relative"},kn={deflt:yZ,escape:SZ,hyphenate:wZ,getBaseElem:dM,isCharacterBox:CZ,protocolFromUrl:AZ},Md={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function NZ(e){if(e.default)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if(typeof n!="string")return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Y4{constructor(t){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{};for(var n in Md)if(Md.hasOwnProperty(n)){var r=Md[n];this[n]=t[n]!==void 0?r.processor?r.processor(t[n]):t[n]:NZ(r)}}reportNonstrict(t,n,r){var a=this.strict;if(typeof a=="function"&&(a=a(t,n,r)),!(!a||a==="ignore")){if(a===!0||a==="error")throw new Ye("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+t+"]"),r);a==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+n+" ["+t+"]"))}}useStrictBehavior(t,n,r){var a=this.strict;if(typeof a=="function")try{a=a(t,n,r)}catch{a="error"}return!a||a==="ignore"?!1:a===!0||a==="error"?!0:a==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+n+" ["+t+"]")),!1)}isTrusted(t){if(t.url&&!t.protocol){var n=kn.protocolFromUrl(t.url);if(n==null)return!1;t.protocol=n}var r=typeof this.trust=="function"?this.trust(t):this.trust;return!!r}}class Uo{constructor(t,n,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=n,this.cramped=r}sup(){return oi[_Z[this.id]]}sub(){return oi[RZ[this.id]]}fracNum(){return oi[MZ[this.id]]}fracDen(){return oi[DZ[this.id]]}cramp(){return oi[IZ[this.id]]}text(){return oi[OZ[this.id]]}isTight(){return this.size>=2}}var W4=0,Pp=1,Rc=2,eo=3,sf=4,Es=5,Uc=6,ga=7,oi=[new Uo(W4,0,!1),new Uo(Pp,0,!0),new Uo(Rc,1,!1),new Uo(eo,1,!0),new Uo(sf,2,!1),new Uo(Es,2,!0),new Uo(Uc,3,!1),new Uo(ga,3,!0)],_Z=[sf,Es,sf,Es,Uc,ga,Uc,ga],RZ=[Es,Es,Es,Es,ga,ga,ga,ga],MZ=[Rc,eo,sf,Es,Uc,ga,Uc,ga],DZ=[eo,eo,Es,Es,ga,ga,ga,ga],IZ=[Pp,Pp,eo,eo,Es,Es,ga,ga],OZ=[W4,Pp,Rc,eo,Rc,eo,Rc,eo],It={DISPLAY:oi[W4],TEXT:oi[Rc],SCRIPT:oi[sf],SCRIPTSCRIPT:oi[Uc]},Ry=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function LZ(e){for(var t=0;t<Ry.length;t++)for(var n=Ry[t],r=0;r<n.blocks.length;r++){var a=n.blocks[r];if(e>=a[0]&&e<=a[1])return n.name}return null}var op=[];Ry.forEach(e=>e.blocks.forEach(t=>op.push(...t)));function fM(e){for(var t=0;t<op.length;t+=2)if(e>=op[t]&&e<=op[t+1])return!0;return!1}var lc=80,PZ=function(t,n){return"M95,"+(622+t+n)+`
|
|
71
|
+
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
72
|
+
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
73
|
+
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
|
74
|
+
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
|
75
|
+
c69,-144,104.5,-217.7,106.5,-221
|
|
76
|
+
l`+t/2.075+" -"+t+`
|
|
77
|
+
c5.3,-9.3,12,-14,20,-14
|
|
78
|
+
H400000v`+(40+t)+`H845.2724
|
|
79
|
+
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
|
80
|
+
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
|
81
|
+
M`+(834+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},jZ=function(t,n){return"M263,"+(601+t+n)+`c0.7,0,18,39.7,52,119
|
|
82
|
+
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
83
|
+
c340,-704.7,510.7,-1060.3,512,-1067
|
|
84
|
+
l`+t/2.084+" -"+t+`
|
|
85
|
+
c4.7,-7.3,11,-11,19,-11
|
|
86
|
+
H40000v`+(40+t)+`H1012.3
|
|
87
|
+
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
|
88
|
+
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
|
89
|
+
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
90
|
+
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
91
|
+
M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},zZ=function(t,n){return"M983 "+(10+t+n)+`
|
|
92
|
+
l`+t/3.13+" -"+t+`
|
|
93
|
+
c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+`
|
|
94
|
+
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
|
95
|
+
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
|
|
96
|
+
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
97
|
+
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
98
|
+
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
99
|
+
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
100
|
+
M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},BZ=function(t,n){return"M424,"+(2398+t+n)+`
|
|
101
|
+
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
102
|
+
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
|
103
|
+
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
104
|
+
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
|
105
|
+
l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000
|
|
106
|
+
v`+(40+t)+`H1014.6
|
|
107
|
+
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
108
|
+
c-2,6,-10,9,-24,9
|
|
109
|
+
c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+n+`
|
|
110
|
+
h400000v`+(40+t)+"h-400000z"},FZ=function(t,n){return"M473,"+(2713+t+n)+`
|
|
111
|
+
c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+`
|
|
112
|
+
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7
|
|
113
|
+
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
114
|
+
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
|
115
|
+
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
|
|
116
|
+
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
117
|
+
606zM`+(1001+t)+" "+n+"h400000v"+(40+t)+"H1017.7z"},HZ=function(t){var n=t/2;return"M400000 "+t+" H0 L"+n+" 0 l65 45 L145 "+(t-80)+" H400000z"},UZ=function(t,n,r){var a=r-54-n-t;return"M702 "+(t+n)+"H400000"+(40+t)+`
|
|
118
|
+
H742v`+a+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
|
119
|
+
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
120
|
+
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
121
|
+
219 661 l218 661zM702 `+n+"H400000v"+(40+t)+"H742z"},$Z=function(t,n,r){n=1e3*n;var a="";switch(t){case"sqrtMain":a=PZ(n,lc);break;case"sqrtSize1":a=jZ(n,lc);break;case"sqrtSize2":a=zZ(n,lc);break;case"sqrtSize3":a=BZ(n,lc);break;case"sqrtSize4":a=FZ(n,lc);break;case"sqrtTall":a=UZ(n,lc,r)}return a},qZ=function(t,n){switch(t){case"⎜":return"M291 0 H417 V"+n+" H291z M291 0 H417 V"+n+" H291z";case"∣":return"M145 0 H188 V"+n+" H145z M145 0 H188 V"+n+" H145z";case"∥":return"M145 0 H188 V"+n+" H145z M145 0 H188 V"+n+" H145z"+("M367 0 H410 V"+n+" H367z M367 0 H410 V"+n+" H367z");case"⎟":return"M457 0 H583 V"+n+" H457z M457 0 H583 V"+n+" H457z";case"⎢":return"M319 0 H403 V"+n+" H319z M319 0 H403 V"+n+" H319z";case"⎥":return"M263 0 H347 V"+n+" H263z M263 0 H347 V"+n+" H263z";case"⎪":return"M384 0 H504 V"+n+" H384z M384 0 H504 V"+n+" H384z";case"⏐":return"M312 0 H355 V"+n+" H312z M312 0 H355 V"+n+" H312z";case"‖":return"M257 0 H300 V"+n+" H257z M257 0 H300 V"+n+" H257z"+("M478 0 H521 V"+n+" H478z M478 0 H521 V"+n+" H478z");default:return""}},Y8={doubleleftarrow:`M262 157
|
|
122
|
+
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
123
|
+
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
124
|
+
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
125
|
+
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
|
126
|
+
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
|
127
|
+
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
128
|
+
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
129
|
+
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
130
|
+
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
|
131
|
+
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
|
132
|
+
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
|
133
|
+
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
|
134
|
+
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
135
|
+
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
|
136
|
+
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
137
|
+
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
|
138
|
+
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
|
139
|
+
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
|
140
|
+
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
|
141
|
+
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
|
142
|
+
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
143
|
+
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
144
|
+
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
|
145
|
+
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
|
146
|
+
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
147
|
+
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
|
148
|
+
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
|
149
|
+
435 0h399565z`,leftgroupunder:`M400000 262
|
|
150
|
+
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
151
|
+
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
152
|
+
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
|
153
|
+
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
|
154
|
+
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
|
155
|
+
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
|
156
|
+
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
|
157
|
+
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
158
|
+
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
159
|
+
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
160
|
+
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
|
161
|
+
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
|
162
|
+
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
|
163
|
+
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
164
|
+
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
165
|
+
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
|
166
|
+
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
|
167
|
+
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
|
|
168
|
+
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
|
|
169
|
+
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
170
|
+
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
171
|
+
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
|
172
|
+
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
|
|
173
|
+
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
|
|
174
|
+
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
|
175
|
+
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
176
|
+
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
|
177
|
+
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
178
|
+
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
|
179
|
+
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
180
|
+
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
|
181
|
+
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
|
182
|
+
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
183
|
+
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
|
184
|
+
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
|
185
|
+
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
186
|
+
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
187
|
+
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
|
188
|
+
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
189
|
+
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
190
|
+
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
|
191
|
+
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
192
|
+
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
193
|
+
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
|
194
|
+
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
|
195
|
+
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
|
196
|
+
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
|
197
|
+
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
198
|
+
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
199
|
+
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
200
|
+
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
|
201
|
+
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
202
|
+
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
|
203
|
+
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
204
|
+
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
|
205
|
+
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
|
206
|
+
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
|
207
|
+
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
|
208
|
+
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
|
209
|
+
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
|
210
|
+
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
|
211
|
+
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
|
212
|
+
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
|
213
|
+
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
|
214
|
+
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
|
215
|
+
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
|
216
|
+
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
|
217
|
+
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
|
218
|
+
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
219
|
+
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
|
220
|
+
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
|
221
|
+
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
|
222
|
+
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
|
|
223
|
+
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
|
224
|
+
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
225
|
+
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
|
226
|
+
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
227
|
+
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
|
228
|
+
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
229
|
+
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
230
|
+
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
231
|
+
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
|
232
|
+
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
|
233
|
+
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
|
234
|
+
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
235
|
+
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
236
|
+
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
|
237
|
+
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
|
238
|
+
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
|
239
|
+
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
240
|
+
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
241
|
+
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
|
242
|
+
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
243
|
+
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
|
244
|
+
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
|
245
|
+
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
246
|
+
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
247
|
+
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
248
|
+
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
249
|
+
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
250
|
+
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
251
|
+
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
252
|
+
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
|
253
|
+
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
254
|
+
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
255
|
+
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
|
256
|
+
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
257
|
+
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
258
|
+
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
259
|
+
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
260
|
+
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
261
|
+
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
262
|
+
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
|
263
|
+
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
264
|
+
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
265
|
+
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
266
|
+
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
|
267
|
+
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
268
|
+
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
|
269
|
+
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
270
|
+
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
|
271
|
+
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
|
272
|
+
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
273
|
+
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
274
|
+
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
|
275
|
+
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
|
276
|
+
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
|
277
|
+
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
278
|
+
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
279
|
+
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
280
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
281
|
+
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
|
282
|
+
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
283
|
+
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
284
|
+
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
285
|
+
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
286
|
+
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
287
|
+
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
288
|
+
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
289
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
|
290
|
+
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
|
291
|
+
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
292
|
+
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
|
293
|
+
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
294
|
+
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
295
|
+
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
296
|
+
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},VZ=function(t,n){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v1759 h347 v-84
|
|
297
|
+
H403z M403 1759 V0 H319 V1759 v`+n+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v1759 H0 v84 H347z
|
|
298
|
+
M347 1759 V0 H263 V1759 v`+n+" v1759 h84z";case"vert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15
|
|
299
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
300
|
+
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+" v585 h43z";case"doublevert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15
|
|
301
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
302
|
+
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+` v585 h43z
|
|
303
|
+
M367 15 v585 v`+n+` v585 c2.667,10,9.667,15,21,15
|
|
304
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
305
|
+
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+n+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+n+` v1715 h263 v84 H319z
|
|
306
|
+
MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+n+` v1799 H0 v-84 H319z
|
|
307
|
+
MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v602 h84z
|
|
308
|
+
M403 1759 V0 H319 V1759 v`+n+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v602 h84z
|
|
309
|
+
M347 1759 V0 h-84 V1759 v`+n+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
|
|
310
|
+
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
|
|
311
|
+
-36,557 l0,`+(n+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
|
312
|
+
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
|
|
313
|
+
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
|
|
314
|
+
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
|
315
|
+
l0,-`+(n+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
|
316
|
+
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
|
|
317
|
+
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
|
318
|
+
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(n+9)+`
|
|
319
|
+
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
|
|
320
|
+
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
|
|
321
|
+
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
|
|
322
|
+
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
323
|
+
l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
324
|
+
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class Ff{constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return this.classes.includes(t)}toNode(){for(var t=document.createDocumentFragment(),n=0;n<this.children.length;n++)t.appendChild(this.children[n].toNode());return t}toMarkup(){for(var t="",n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t}toText(){var t=n=>n.toText();return this.children.map(t).join("")}}var hi={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Nm={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},W8={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function hM(e,t){hi[e]=t}function X4(e,t,n){if(!hi[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),a=hi[t][r];if(!a&&e[0]in W8&&(r=W8[e[0]].charCodeAt(0),a=hi[t][r]),!a&&n==="text"&&fM(r)&&(a=hi[t][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}var Xb={};function GZ(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!Xb[t]){var n=Xb[t]={cssEmPerMu:Nm.quad[t]/18};for(var r in Nm)Nm.hasOwnProperty(r)&&(n[r]=Nm[r][t])}return Xb[t]}var YZ=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],X8=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],K8=function(t,n){return n.size<2?t:YZ[t-1][n.size-1]};class Xi{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||Xi.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=X8[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return new Xi(n)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:K8(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:X8[t-1]})}havingBaseStyle(t){t=t||this.style.text();var n=K8(Xi.BASESIZE,t);return this.size===n&&this.textSize===Xi.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Xi.BASESIZE?["sizing","reset-size"+this.size,"size"+Xi.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=GZ(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Xi.BASESIZE=6;var My={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},WZ={ex:!0,em:!0,mu:!0},mM=function(t){return typeof t!="string"&&(t=t.unit),t in My||t in WZ||t==="ex"},ir=function(t,n){var r;if(t.unit in My)r=My[t.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(t.unit==="mu")r=n.fontMetrics().cssEmPerMu;else{var a;if(n.style.isTight()?a=n.havingStyle(n.style.text()):a=n,t.unit==="ex")r=a.fontMetrics().xHeight;else if(t.unit==="em")r=a.fontMetrics().quad;else throw new Ye("Invalid unit: '"+t.unit+"'");a!==n&&(r*=a.sizeMultiplier/n.sizeMultiplier)}return Math.min(t.number*r,n.maxSize)},et=function(t){return+t.toFixed(4)+"em"},il=function(t){return t.filter(n=>n).join(" ")},pM=function(t,n,r){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},n){n.style.isTight()&&this.classes.push("mtight");var a=n.getColor();a&&(this.style.color=a)}},gM=function(t){var n=document.createElement(t);n.className=il(this.classes);for(var r in this.style)this.style.hasOwnProperty(r)&&(n.style[r]=this.style[r]);for(var a in this.attributes)this.attributes.hasOwnProperty(a)&&n.setAttribute(a,this.attributes[a]);for(var s=0;s<this.children.length;s++)n.appendChild(this.children[s].toNode());return n},XZ=/[\s"'>/=\x00-\x1f]/,bM=function(t){var n="<"+t;this.classes.length&&(n+=' class="'+kn.escape(il(this.classes))+'"');var r="";for(var a in this.style)this.style.hasOwnProperty(a)&&(r+=kn.hyphenate(a)+":"+this.style[a]+";");r&&(n+=' style="'+kn.escape(r)+'"');for(var s in this.attributes)if(this.attributes.hasOwnProperty(s)){if(XZ.test(s))throw new Ye("Invalid attribute name '"+s+"'");n+=" "+s+'="'+kn.escape(this.attributes[s])+'"'}n+=">";for(var o=0;o<this.children.length;o++)n+=this.children[o].toMarkup();return n+="</"+t+">",n};class Hf{constructor(t,n,r,a){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,pM.call(this,t,r,a),this.children=n||[]}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return gM.call(this,"span")}toMarkup(){return bM.call(this,"span")}}class K4{constructor(t,n,r,a){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,pM.call(this,n,a),this.children=r||[],this.setAttribute("href",t)}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return gM.call(this,"a")}toMarkup(){return bM.call(this,"a")}}class KZ{constructor(t,n,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=n,this.src=t,this.classes=["mord"],this.style=r}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createElement("img");t.src=this.src,t.alt=this.alt,t.className="mord";for(var n in this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);return t}toMarkup(){var t='<img src="'+kn.escape(this.src)+'"'+(' alt="'+kn.escape(this.alt)+'"'),n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=kn.hyphenate(r)+":"+this.style[r]+";");return n&&(t+=' style="'+kn.escape(n)+'"'),t+="'/>",t}}var QZ={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class _s{constructor(t,n,r,a,s,o,u,c){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=t,this.height=n||0,this.depth=r||0,this.italic=a||0,this.skew=s||0,this.width=o||0,this.classes=u||[],this.style=c||{},this.maxFontSize=0;var d=LZ(this.text.charCodeAt(0));d&&this.classes.push(d+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=QZ[this.text])}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createTextNode(this.text),n=null;this.italic>0&&(n=document.createElement("span"),n.style.marginRight=et(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=il(this.classes));for(var r in this.style)this.style.hasOwnProperty(r)&&(n=n||document.createElement("span"),n.style[r]=this.style[r]);return n?(n.appendChild(t),n):t}toMarkup(){var t=!1,n="<span";this.classes.length&&(t=!0,n+=' class="',n+=kn.escape(il(this.classes)),n+='"');var r="";this.italic>0&&(r+="margin-right:"+this.italic+"em;");for(var a in this.style)this.style.hasOwnProperty(a)&&(r+=kn.hyphenate(a)+":"+this.style[a]+";");r&&(t=!0,n+=' style="'+kn.escape(r)+'"');var s=kn.escape(this.text);return t?(n+=">",n+=s,n+="</span>",n):s}}class io{constructor(t,n){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=n||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&n.setAttribute(r,this.attributes[r]);for(var a=0;a<this.children.length;a++)n.appendChild(this.children[a].toNode());return n}toMarkup(){var t='<svg xmlns="http://www.w3.org/2000/svg"';for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(t+=" "+n+'="'+kn.escape(this.attributes[n])+'"');t+=">";for(var r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t+="</svg>",t}}class ol{constructor(t,n){this.pathName=void 0,this.alternate=void 0,this.pathName=t,this.alternate=n}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"path");return this.alternate?n.setAttribute("d",this.alternate):n.setAttribute("d",Y8[this.pathName]),n}toMarkup(){return this.alternate?'<path d="'+kn.escape(this.alternate)+'"/>':'<path d="'+kn.escape(Y8[this.pathName])+'"/>'}}class Dy{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"line");for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&n.setAttribute(r,this.attributes[r]);return n}toMarkup(){var t="<line";for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(t+=" "+n+'="'+kn.escape(this.attributes[n])+'"');return t+="/>",t}}function Q8(e){if(e instanceof _s)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function ZZ(e){if(e instanceof Hf)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var JZ={bin:1,close:1,inner:1,open:1,punct:1,rel:1},eJ={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Gn={math:{},text:{}};function N(e,t,n,r,a,s){Gn[e][a]={font:t,group:n,replace:r},s&&r&&(Gn[e][r]=Gn[e][a])}var M="math",Fe="text",B="main",J="ams",ar="accent-token",dt="bin",wa="close",a0="inner",Dt="mathord",Ar="op-token",us="open",U1="punct",ee="rel",mo="spacing",de="textord";N(M,B,ee,"≡","\\equiv",!0);N(M,B,ee,"≺","\\prec",!0);N(M,B,ee,"≻","\\succ",!0);N(M,B,ee,"∼","\\sim",!0);N(M,B,ee,"⊥","\\perp");N(M,B,ee,"⪯","\\preceq",!0);N(M,B,ee,"⪰","\\succeq",!0);N(M,B,ee,"≃","\\simeq",!0);N(M,B,ee,"∣","\\mid",!0);N(M,B,ee,"≪","\\ll",!0);N(M,B,ee,"≫","\\gg",!0);N(M,B,ee,"≍","\\asymp",!0);N(M,B,ee,"∥","\\parallel");N(M,B,ee,"⋈","\\bowtie",!0);N(M,B,ee,"⌣","\\smile",!0);N(M,B,ee,"⊑","\\sqsubseteq",!0);N(M,B,ee,"⊒","\\sqsupseteq",!0);N(M,B,ee,"≐","\\doteq",!0);N(M,B,ee,"⌢","\\frown",!0);N(M,B,ee,"∋","\\ni",!0);N(M,B,ee,"∝","\\propto",!0);N(M,B,ee,"⊢","\\vdash",!0);N(M,B,ee,"⊣","\\dashv",!0);N(M,B,ee,"∋","\\owns");N(M,B,U1,".","\\ldotp");N(M,B,U1,"⋅","\\cdotp");N(M,B,de,"#","\\#");N(Fe,B,de,"#","\\#");N(M,B,de,"&","\\&");N(Fe,B,de,"&","\\&");N(M,B,de,"ℵ","\\aleph",!0);N(M,B,de,"∀","\\forall",!0);N(M,B,de,"ℏ","\\hbar",!0);N(M,B,de,"∃","\\exists",!0);N(M,B,de,"∇","\\nabla",!0);N(M,B,de,"♭","\\flat",!0);N(M,B,de,"ℓ","\\ell",!0);N(M,B,de,"♮","\\natural",!0);N(M,B,de,"♣","\\clubsuit",!0);N(M,B,de,"℘","\\wp",!0);N(M,B,de,"♯","\\sharp",!0);N(M,B,de,"♢","\\diamondsuit",!0);N(M,B,de,"ℜ","\\Re",!0);N(M,B,de,"♡","\\heartsuit",!0);N(M,B,de,"ℑ","\\Im",!0);N(M,B,de,"♠","\\spadesuit",!0);N(M,B,de,"§","\\S",!0);N(Fe,B,de,"§","\\S");N(M,B,de,"¶","\\P",!0);N(Fe,B,de,"¶","\\P");N(M,B,de,"†","\\dag");N(Fe,B,de,"†","\\dag");N(Fe,B,de,"†","\\textdagger");N(M,B,de,"‡","\\ddag");N(Fe,B,de,"‡","\\ddag");N(Fe,B,de,"‡","\\textdaggerdbl");N(M,B,wa,"⎱","\\rmoustache",!0);N(M,B,us,"⎰","\\lmoustache",!0);N(M,B,wa,"⟯","\\rgroup",!0);N(M,B,us,"⟮","\\lgroup",!0);N(M,B,dt,"∓","\\mp",!0);N(M,B,dt,"⊖","\\ominus",!0);N(M,B,dt,"⊎","\\uplus",!0);N(M,B,dt,"⊓","\\sqcap",!0);N(M,B,dt,"∗","\\ast");N(M,B,dt,"⊔","\\sqcup",!0);N(M,B,dt,"◯","\\bigcirc",!0);N(M,B,dt,"∙","\\bullet",!0);N(M,B,dt,"‡","\\ddagger");N(M,B,dt,"≀","\\wr",!0);N(M,B,dt,"⨿","\\amalg");N(M,B,dt,"&","\\And");N(M,B,ee,"⟵","\\longleftarrow",!0);N(M,B,ee,"⇐","\\Leftarrow",!0);N(M,B,ee,"⟸","\\Longleftarrow",!0);N(M,B,ee,"⟶","\\longrightarrow",!0);N(M,B,ee,"⇒","\\Rightarrow",!0);N(M,B,ee,"⟹","\\Longrightarrow",!0);N(M,B,ee,"↔","\\leftrightarrow",!0);N(M,B,ee,"⟷","\\longleftrightarrow",!0);N(M,B,ee,"⇔","\\Leftrightarrow",!0);N(M,B,ee,"⟺","\\Longleftrightarrow",!0);N(M,B,ee,"↦","\\mapsto",!0);N(M,B,ee,"⟼","\\longmapsto",!0);N(M,B,ee,"↗","\\nearrow",!0);N(M,B,ee,"↩","\\hookleftarrow",!0);N(M,B,ee,"↪","\\hookrightarrow",!0);N(M,B,ee,"↘","\\searrow",!0);N(M,B,ee,"↼","\\leftharpoonup",!0);N(M,B,ee,"⇀","\\rightharpoonup",!0);N(M,B,ee,"↙","\\swarrow",!0);N(M,B,ee,"↽","\\leftharpoondown",!0);N(M,B,ee,"⇁","\\rightharpoondown",!0);N(M,B,ee,"↖","\\nwarrow",!0);N(M,B,ee,"⇌","\\rightleftharpoons",!0);N(M,J,ee,"≮","\\nless",!0);N(M,J,ee,"","\\@nleqslant");N(M,J,ee,"","\\@nleqq");N(M,J,ee,"⪇","\\lneq",!0);N(M,J,ee,"≨","\\lneqq",!0);N(M,J,ee,"","\\@lvertneqq");N(M,J,ee,"⋦","\\lnsim",!0);N(M,J,ee,"⪉","\\lnapprox",!0);N(M,J,ee,"⊀","\\nprec",!0);N(M,J,ee,"⋠","\\npreceq",!0);N(M,J,ee,"⋨","\\precnsim",!0);N(M,J,ee,"⪹","\\precnapprox",!0);N(M,J,ee,"≁","\\nsim",!0);N(M,J,ee,"","\\@nshortmid");N(M,J,ee,"∤","\\nmid",!0);N(M,J,ee,"⊬","\\nvdash",!0);N(M,J,ee,"⊭","\\nvDash",!0);N(M,J,ee,"⋪","\\ntriangleleft");N(M,J,ee,"⋬","\\ntrianglelefteq",!0);N(M,J,ee,"⊊","\\subsetneq",!0);N(M,J,ee,"","\\@varsubsetneq");N(M,J,ee,"⫋","\\subsetneqq",!0);N(M,J,ee,"","\\@varsubsetneqq");N(M,J,ee,"≯","\\ngtr",!0);N(M,J,ee,"","\\@ngeqslant");N(M,J,ee,"","\\@ngeqq");N(M,J,ee,"⪈","\\gneq",!0);N(M,J,ee,"≩","\\gneqq",!0);N(M,J,ee,"","\\@gvertneqq");N(M,J,ee,"⋧","\\gnsim",!0);N(M,J,ee,"⪊","\\gnapprox",!0);N(M,J,ee,"⊁","\\nsucc",!0);N(M,J,ee,"⋡","\\nsucceq",!0);N(M,J,ee,"⋩","\\succnsim",!0);N(M,J,ee,"⪺","\\succnapprox",!0);N(M,J,ee,"≆","\\ncong",!0);N(M,J,ee,"","\\@nshortparallel");N(M,J,ee,"∦","\\nparallel",!0);N(M,J,ee,"⊯","\\nVDash",!0);N(M,J,ee,"⋫","\\ntriangleright");N(M,J,ee,"⋭","\\ntrianglerighteq",!0);N(M,J,ee,"","\\@nsupseteqq");N(M,J,ee,"⊋","\\supsetneq",!0);N(M,J,ee,"","\\@varsupsetneq");N(M,J,ee,"⫌","\\supsetneqq",!0);N(M,J,ee,"","\\@varsupsetneqq");N(M,J,ee,"⊮","\\nVdash",!0);N(M,J,ee,"⪵","\\precneqq",!0);N(M,J,ee,"⪶","\\succneqq",!0);N(M,J,ee,"","\\@nsubseteqq");N(M,J,dt,"⊴","\\unlhd");N(M,J,dt,"⊵","\\unrhd");N(M,J,ee,"↚","\\nleftarrow",!0);N(M,J,ee,"↛","\\nrightarrow",!0);N(M,J,ee,"⇍","\\nLeftarrow",!0);N(M,J,ee,"⇏","\\nRightarrow",!0);N(M,J,ee,"↮","\\nleftrightarrow",!0);N(M,J,ee,"⇎","\\nLeftrightarrow",!0);N(M,J,ee,"△","\\vartriangle");N(M,J,de,"ℏ","\\hslash");N(M,J,de,"▽","\\triangledown");N(M,J,de,"◊","\\lozenge");N(M,J,de,"Ⓢ","\\circledS");N(M,J,de,"®","\\circledR");N(Fe,J,de,"®","\\circledR");N(M,J,de,"∡","\\measuredangle",!0);N(M,J,de,"∄","\\nexists");N(M,J,de,"℧","\\mho");N(M,J,de,"Ⅎ","\\Finv",!0);N(M,J,de,"⅁","\\Game",!0);N(M,J,de,"‵","\\backprime");N(M,J,de,"▲","\\blacktriangle");N(M,J,de,"▼","\\blacktriangledown");N(M,J,de,"■","\\blacksquare");N(M,J,de,"⧫","\\blacklozenge");N(M,J,de,"★","\\bigstar");N(M,J,de,"∢","\\sphericalangle",!0);N(M,J,de,"∁","\\complement",!0);N(M,J,de,"ð","\\eth",!0);N(Fe,B,de,"ð","ð");N(M,J,de,"╱","\\diagup");N(M,J,de,"╲","\\diagdown");N(M,J,de,"□","\\square");N(M,J,de,"□","\\Box");N(M,J,de,"◊","\\Diamond");N(M,J,de,"¥","\\yen",!0);N(Fe,J,de,"¥","\\yen",!0);N(M,J,de,"✓","\\checkmark",!0);N(Fe,J,de,"✓","\\checkmark");N(M,J,de,"ℶ","\\beth",!0);N(M,J,de,"ℸ","\\daleth",!0);N(M,J,de,"ℷ","\\gimel",!0);N(M,J,de,"ϝ","\\digamma",!0);N(M,J,de,"ϰ","\\varkappa");N(M,J,us,"┌","\\@ulcorner",!0);N(M,J,wa,"┐","\\@urcorner",!0);N(M,J,us,"└","\\@llcorner",!0);N(M,J,wa,"┘","\\@lrcorner",!0);N(M,J,ee,"≦","\\leqq",!0);N(M,J,ee,"⩽","\\leqslant",!0);N(M,J,ee,"⪕","\\eqslantless",!0);N(M,J,ee,"≲","\\lesssim",!0);N(M,J,ee,"⪅","\\lessapprox",!0);N(M,J,ee,"≊","\\approxeq",!0);N(M,J,dt,"⋖","\\lessdot");N(M,J,ee,"⋘","\\lll",!0);N(M,J,ee,"≶","\\lessgtr",!0);N(M,J,ee,"⋚","\\lesseqgtr",!0);N(M,J,ee,"⪋","\\lesseqqgtr",!0);N(M,J,ee,"≑","\\doteqdot");N(M,J,ee,"≓","\\risingdotseq",!0);N(M,J,ee,"≒","\\fallingdotseq",!0);N(M,J,ee,"∽","\\backsim",!0);N(M,J,ee,"⋍","\\backsimeq",!0);N(M,J,ee,"⫅","\\subseteqq",!0);N(M,J,ee,"⋐","\\Subset",!0);N(M,J,ee,"⊏","\\sqsubset",!0);N(M,J,ee,"≼","\\preccurlyeq",!0);N(M,J,ee,"⋞","\\curlyeqprec",!0);N(M,J,ee,"≾","\\precsim",!0);N(M,J,ee,"⪷","\\precapprox",!0);N(M,J,ee,"⊲","\\vartriangleleft");N(M,J,ee,"⊴","\\trianglelefteq");N(M,J,ee,"⊨","\\vDash",!0);N(M,J,ee,"⊪","\\Vvdash",!0);N(M,J,ee,"⌣","\\smallsmile");N(M,J,ee,"⌢","\\smallfrown");N(M,J,ee,"≏","\\bumpeq",!0);N(M,J,ee,"≎","\\Bumpeq",!0);N(M,J,ee,"≧","\\geqq",!0);N(M,J,ee,"⩾","\\geqslant",!0);N(M,J,ee,"⪖","\\eqslantgtr",!0);N(M,J,ee,"≳","\\gtrsim",!0);N(M,J,ee,"⪆","\\gtrapprox",!0);N(M,J,dt,"⋗","\\gtrdot");N(M,J,ee,"⋙","\\ggg",!0);N(M,J,ee,"≷","\\gtrless",!0);N(M,J,ee,"⋛","\\gtreqless",!0);N(M,J,ee,"⪌","\\gtreqqless",!0);N(M,J,ee,"≖","\\eqcirc",!0);N(M,J,ee,"≗","\\circeq",!0);N(M,J,ee,"≜","\\triangleq",!0);N(M,J,ee,"∼","\\thicksim");N(M,J,ee,"≈","\\thickapprox");N(M,J,ee,"⫆","\\supseteqq",!0);N(M,J,ee,"⋑","\\Supset",!0);N(M,J,ee,"⊐","\\sqsupset",!0);N(M,J,ee,"≽","\\succcurlyeq",!0);N(M,J,ee,"⋟","\\curlyeqsucc",!0);N(M,J,ee,"≿","\\succsim",!0);N(M,J,ee,"⪸","\\succapprox",!0);N(M,J,ee,"⊳","\\vartriangleright");N(M,J,ee,"⊵","\\trianglerighteq");N(M,J,ee,"⊩","\\Vdash",!0);N(M,J,ee,"∣","\\shortmid");N(M,J,ee,"∥","\\shortparallel");N(M,J,ee,"≬","\\between",!0);N(M,J,ee,"⋔","\\pitchfork",!0);N(M,J,ee,"∝","\\varpropto");N(M,J,ee,"◀","\\blacktriangleleft");N(M,J,ee,"∴","\\therefore",!0);N(M,J,ee,"∍","\\backepsilon");N(M,J,ee,"▶","\\blacktriangleright");N(M,J,ee,"∵","\\because",!0);N(M,J,ee,"⋘","\\llless");N(M,J,ee,"⋙","\\gggtr");N(M,J,dt,"⊲","\\lhd");N(M,J,dt,"⊳","\\rhd");N(M,J,ee,"≂","\\eqsim",!0);N(M,B,ee,"⋈","\\Join");N(M,J,ee,"≑","\\Doteq",!0);N(M,J,dt,"∔","\\dotplus",!0);N(M,J,dt,"∖","\\smallsetminus");N(M,J,dt,"⋒","\\Cap",!0);N(M,J,dt,"⋓","\\Cup",!0);N(M,J,dt,"⩞","\\doublebarwedge",!0);N(M,J,dt,"⊟","\\boxminus",!0);N(M,J,dt,"⊞","\\boxplus",!0);N(M,J,dt,"⋇","\\divideontimes",!0);N(M,J,dt,"⋉","\\ltimes",!0);N(M,J,dt,"⋊","\\rtimes",!0);N(M,J,dt,"⋋","\\leftthreetimes",!0);N(M,J,dt,"⋌","\\rightthreetimes",!0);N(M,J,dt,"⋏","\\curlywedge",!0);N(M,J,dt,"⋎","\\curlyvee",!0);N(M,J,dt,"⊝","\\circleddash",!0);N(M,J,dt,"⊛","\\circledast",!0);N(M,J,dt,"⋅","\\centerdot");N(M,J,dt,"⊺","\\intercal",!0);N(M,J,dt,"⋒","\\doublecap");N(M,J,dt,"⋓","\\doublecup");N(M,J,dt,"⊠","\\boxtimes",!0);N(M,J,ee,"⇢","\\dashrightarrow",!0);N(M,J,ee,"⇠","\\dashleftarrow",!0);N(M,J,ee,"⇇","\\leftleftarrows",!0);N(M,J,ee,"⇆","\\leftrightarrows",!0);N(M,J,ee,"⇚","\\Lleftarrow",!0);N(M,J,ee,"↞","\\twoheadleftarrow",!0);N(M,J,ee,"↢","\\leftarrowtail",!0);N(M,J,ee,"↫","\\looparrowleft",!0);N(M,J,ee,"⇋","\\leftrightharpoons",!0);N(M,J,ee,"↶","\\curvearrowleft",!0);N(M,J,ee,"↺","\\circlearrowleft",!0);N(M,J,ee,"↰","\\Lsh",!0);N(M,J,ee,"⇈","\\upuparrows",!0);N(M,J,ee,"↿","\\upharpoonleft",!0);N(M,J,ee,"⇃","\\downharpoonleft",!0);N(M,B,ee,"⊶","\\origof",!0);N(M,B,ee,"⊷","\\imageof",!0);N(M,J,ee,"⊸","\\multimap",!0);N(M,J,ee,"↭","\\leftrightsquigarrow",!0);N(M,J,ee,"⇉","\\rightrightarrows",!0);N(M,J,ee,"⇄","\\rightleftarrows",!0);N(M,J,ee,"↠","\\twoheadrightarrow",!0);N(M,J,ee,"↣","\\rightarrowtail",!0);N(M,J,ee,"↬","\\looparrowright",!0);N(M,J,ee,"↷","\\curvearrowright",!0);N(M,J,ee,"↻","\\circlearrowright",!0);N(M,J,ee,"↱","\\Rsh",!0);N(M,J,ee,"⇊","\\downdownarrows",!0);N(M,J,ee,"↾","\\upharpoonright",!0);N(M,J,ee,"⇂","\\downharpoonright",!0);N(M,J,ee,"⇝","\\rightsquigarrow",!0);N(M,J,ee,"⇝","\\leadsto");N(M,J,ee,"⇛","\\Rrightarrow",!0);N(M,J,ee,"↾","\\restriction");N(M,B,de,"‘","`");N(M,B,de,"$","\\$");N(Fe,B,de,"$","\\$");N(Fe,B,de,"$","\\textdollar");N(M,B,de,"%","\\%");N(Fe,B,de,"%","\\%");N(M,B,de,"_","\\_");N(Fe,B,de,"_","\\_");N(Fe,B,de,"_","\\textunderscore");N(M,B,de,"∠","\\angle",!0);N(M,B,de,"∞","\\infty",!0);N(M,B,de,"′","\\prime");N(M,B,de,"△","\\triangle");N(M,B,de,"Γ","\\Gamma",!0);N(M,B,de,"Δ","\\Delta",!0);N(M,B,de,"Θ","\\Theta",!0);N(M,B,de,"Λ","\\Lambda",!0);N(M,B,de,"Ξ","\\Xi",!0);N(M,B,de,"Π","\\Pi",!0);N(M,B,de,"Σ","\\Sigma",!0);N(M,B,de,"Υ","\\Upsilon",!0);N(M,B,de,"Φ","\\Phi",!0);N(M,B,de,"Ψ","\\Psi",!0);N(M,B,de,"Ω","\\Omega",!0);N(M,B,de,"A","Α");N(M,B,de,"B","Β");N(M,B,de,"E","Ε");N(M,B,de,"Z","Ζ");N(M,B,de,"H","Η");N(M,B,de,"I","Ι");N(M,B,de,"K","Κ");N(M,B,de,"M","Μ");N(M,B,de,"N","Ν");N(M,B,de,"O","Ο");N(M,B,de,"P","Ρ");N(M,B,de,"T","Τ");N(M,B,de,"X","Χ");N(M,B,de,"¬","\\neg",!0);N(M,B,de,"¬","\\lnot");N(M,B,de,"⊤","\\top");N(M,B,de,"⊥","\\bot");N(M,B,de,"∅","\\emptyset");N(M,J,de,"∅","\\varnothing");N(M,B,Dt,"α","\\alpha",!0);N(M,B,Dt,"β","\\beta",!0);N(M,B,Dt,"γ","\\gamma",!0);N(M,B,Dt,"δ","\\delta",!0);N(M,B,Dt,"ϵ","\\epsilon",!0);N(M,B,Dt,"ζ","\\zeta",!0);N(M,B,Dt,"η","\\eta",!0);N(M,B,Dt,"θ","\\theta",!0);N(M,B,Dt,"ι","\\iota",!0);N(M,B,Dt,"κ","\\kappa",!0);N(M,B,Dt,"λ","\\lambda",!0);N(M,B,Dt,"μ","\\mu",!0);N(M,B,Dt,"ν","\\nu",!0);N(M,B,Dt,"ξ","\\xi",!0);N(M,B,Dt,"ο","\\omicron",!0);N(M,B,Dt,"π","\\pi",!0);N(M,B,Dt,"ρ","\\rho",!0);N(M,B,Dt,"σ","\\sigma",!0);N(M,B,Dt,"τ","\\tau",!0);N(M,B,Dt,"υ","\\upsilon",!0);N(M,B,Dt,"ϕ","\\phi",!0);N(M,B,Dt,"χ","\\chi",!0);N(M,B,Dt,"ψ","\\psi",!0);N(M,B,Dt,"ω","\\omega",!0);N(M,B,Dt,"ε","\\varepsilon",!0);N(M,B,Dt,"ϑ","\\vartheta",!0);N(M,B,Dt,"ϖ","\\varpi",!0);N(M,B,Dt,"ϱ","\\varrho",!0);N(M,B,Dt,"ς","\\varsigma",!0);N(M,B,Dt,"φ","\\varphi",!0);N(M,B,dt,"∗","*",!0);N(M,B,dt,"+","+");N(M,B,dt,"−","-",!0);N(M,B,dt,"⋅","\\cdot",!0);N(M,B,dt,"∘","\\circ",!0);N(M,B,dt,"÷","\\div",!0);N(M,B,dt,"±","\\pm",!0);N(M,B,dt,"×","\\times",!0);N(M,B,dt,"∩","\\cap",!0);N(M,B,dt,"∪","\\cup",!0);N(M,B,dt,"∖","\\setminus",!0);N(M,B,dt,"∧","\\land");N(M,B,dt,"∨","\\lor");N(M,B,dt,"∧","\\wedge",!0);N(M,B,dt,"∨","\\vee",!0);N(M,B,de,"√","\\surd");N(M,B,us,"⟨","\\langle",!0);N(M,B,us,"∣","\\lvert");N(M,B,us,"∥","\\lVert");N(M,B,wa,"?","?");N(M,B,wa,"!","!");N(M,B,wa,"⟩","\\rangle",!0);N(M,B,wa,"∣","\\rvert");N(M,B,wa,"∥","\\rVert");N(M,B,ee,"=","=");N(M,B,ee,":",":");N(M,B,ee,"≈","\\approx",!0);N(M,B,ee,"≅","\\cong",!0);N(M,B,ee,"≥","\\ge");N(M,B,ee,"≥","\\geq",!0);N(M,B,ee,"←","\\gets");N(M,B,ee,">","\\gt",!0);N(M,B,ee,"∈","\\in",!0);N(M,B,ee,"","\\@not");N(M,B,ee,"⊂","\\subset",!0);N(M,B,ee,"⊃","\\supset",!0);N(M,B,ee,"⊆","\\subseteq",!0);N(M,B,ee,"⊇","\\supseteq",!0);N(M,J,ee,"⊈","\\nsubseteq",!0);N(M,J,ee,"⊉","\\nsupseteq",!0);N(M,B,ee,"⊨","\\models");N(M,B,ee,"←","\\leftarrow",!0);N(M,B,ee,"≤","\\le");N(M,B,ee,"≤","\\leq",!0);N(M,B,ee,"<","\\lt",!0);N(M,B,ee,"→","\\rightarrow",!0);N(M,B,ee,"→","\\to");N(M,J,ee,"≱","\\ngeq",!0);N(M,J,ee,"≰","\\nleq",!0);N(M,B,mo," ","\\ ");N(M,B,mo," ","\\space");N(M,B,mo," ","\\nobreakspace");N(Fe,B,mo," ","\\ ");N(Fe,B,mo," "," ");N(Fe,B,mo," ","\\space");N(Fe,B,mo," ","\\nobreakspace");N(M,B,mo,null,"\\nobreak");N(M,B,mo,null,"\\allowbreak");N(M,B,U1,",",",");N(M,B,U1,";",";");N(M,J,dt,"⊼","\\barwedge",!0);N(M,J,dt,"⊻","\\veebar",!0);N(M,B,dt,"⊙","\\odot",!0);N(M,B,dt,"⊕","\\oplus",!0);N(M,B,dt,"⊗","\\otimes",!0);N(M,B,de,"∂","\\partial",!0);N(M,B,dt,"⊘","\\oslash",!0);N(M,J,dt,"⊚","\\circledcirc",!0);N(M,J,dt,"⊡","\\boxdot",!0);N(M,B,dt,"△","\\bigtriangleup");N(M,B,dt,"▽","\\bigtriangledown");N(M,B,dt,"†","\\dagger");N(M,B,dt,"⋄","\\diamond");N(M,B,dt,"⋆","\\star");N(M,B,dt,"◃","\\triangleleft");N(M,B,dt,"▹","\\triangleright");N(M,B,us,"{","\\{");N(Fe,B,de,"{","\\{");N(Fe,B,de,"{","\\textbraceleft");N(M,B,wa,"}","\\}");N(Fe,B,de,"}","\\}");N(Fe,B,de,"}","\\textbraceright");N(M,B,us,"{","\\lbrace");N(M,B,wa,"}","\\rbrace");N(M,B,us,"[","\\lbrack",!0);N(Fe,B,de,"[","\\lbrack",!0);N(M,B,wa,"]","\\rbrack",!0);N(Fe,B,de,"]","\\rbrack",!0);N(M,B,us,"(","\\lparen",!0);N(M,B,wa,")","\\rparen",!0);N(Fe,B,de,"<","\\textless",!0);N(Fe,B,de,">","\\textgreater",!0);N(M,B,us,"⌊","\\lfloor",!0);N(M,B,wa,"⌋","\\rfloor",!0);N(M,B,us,"⌈","\\lceil",!0);N(M,B,wa,"⌉","\\rceil",!0);N(M,B,de,"\\","\\backslash");N(M,B,de,"∣","|");N(M,B,de,"∣","\\vert");N(Fe,B,de,"|","\\textbar",!0);N(M,B,de,"∥","\\|");N(M,B,de,"∥","\\Vert");N(Fe,B,de,"∥","\\textbardbl");N(Fe,B,de,"~","\\textasciitilde");N(Fe,B,de,"\\","\\textbackslash");N(Fe,B,de,"^","\\textasciicircum");N(M,B,ee,"↑","\\uparrow",!0);N(M,B,ee,"⇑","\\Uparrow",!0);N(M,B,ee,"↓","\\downarrow",!0);N(M,B,ee,"⇓","\\Downarrow",!0);N(M,B,ee,"↕","\\updownarrow",!0);N(M,B,ee,"⇕","\\Updownarrow",!0);N(M,B,Ar,"∐","\\coprod");N(M,B,Ar,"⋁","\\bigvee");N(M,B,Ar,"⋀","\\bigwedge");N(M,B,Ar,"⨄","\\biguplus");N(M,B,Ar,"⋂","\\bigcap");N(M,B,Ar,"⋃","\\bigcup");N(M,B,Ar,"∫","\\int");N(M,B,Ar,"∫","\\intop");N(M,B,Ar,"∬","\\iint");N(M,B,Ar,"∭","\\iiint");N(M,B,Ar,"∏","\\prod");N(M,B,Ar,"∑","\\sum");N(M,B,Ar,"⨂","\\bigotimes");N(M,B,Ar,"⨁","\\bigoplus");N(M,B,Ar,"⨀","\\bigodot");N(M,B,Ar,"∮","\\oint");N(M,B,Ar,"∯","\\oiint");N(M,B,Ar,"∰","\\oiiint");N(M,B,Ar,"⨆","\\bigsqcup");N(M,B,Ar,"∫","\\smallint");N(Fe,B,a0,"…","\\textellipsis");N(M,B,a0,"…","\\mathellipsis");N(Fe,B,a0,"…","\\ldots",!0);N(M,B,a0,"…","\\ldots",!0);N(M,B,a0,"⋯","\\@cdots",!0);N(M,B,a0,"⋱","\\ddots",!0);N(M,B,de,"⋮","\\varvdots");N(Fe,B,de,"⋮","\\varvdots");N(M,B,ar,"ˊ","\\acute");N(M,B,ar,"ˋ","\\grave");N(M,B,ar,"¨","\\ddot");N(M,B,ar,"~","\\tilde");N(M,B,ar,"ˉ","\\bar");N(M,B,ar,"˘","\\breve");N(M,B,ar,"ˇ","\\check");N(M,B,ar,"^","\\hat");N(M,B,ar,"⃗","\\vec");N(M,B,ar,"˙","\\dot");N(M,B,ar,"˚","\\mathring");N(M,B,Dt,"","\\@imath");N(M,B,Dt,"","\\@jmath");N(M,B,de,"ı","ı");N(M,B,de,"ȷ","ȷ");N(Fe,B,de,"ı","\\i",!0);N(Fe,B,de,"ȷ","\\j",!0);N(Fe,B,de,"ß","\\ss",!0);N(Fe,B,de,"æ","\\ae",!0);N(Fe,B,de,"œ","\\oe",!0);N(Fe,B,de,"ø","\\o",!0);N(Fe,B,de,"Æ","\\AE",!0);N(Fe,B,de,"Œ","\\OE",!0);N(Fe,B,de,"Ø","\\O",!0);N(Fe,B,ar,"ˊ","\\'");N(Fe,B,ar,"ˋ","\\`");N(Fe,B,ar,"ˆ","\\^");N(Fe,B,ar,"˜","\\~");N(Fe,B,ar,"ˉ","\\=");N(Fe,B,ar,"˘","\\u");N(Fe,B,ar,"˙","\\.");N(Fe,B,ar,"¸","\\c");N(Fe,B,ar,"˚","\\r");N(Fe,B,ar,"ˇ","\\v");N(Fe,B,ar,"¨",'\\"');N(Fe,B,ar,"˝","\\H");N(Fe,B,ar,"◯","\\textcircled");var xM={"--":!0,"---":!0,"``":!0,"''":!0};N(Fe,B,de,"–","--",!0);N(Fe,B,de,"–","\\textendash");N(Fe,B,de,"—","---",!0);N(Fe,B,de,"—","\\textemdash");N(Fe,B,de,"‘","`",!0);N(Fe,B,de,"‘","\\textquoteleft");N(Fe,B,de,"’","'",!0);N(Fe,B,de,"’","\\textquoteright");N(Fe,B,de,"“","``",!0);N(Fe,B,de,"“","\\textquotedblleft");N(Fe,B,de,"”","''",!0);N(Fe,B,de,"”","\\textquotedblright");N(M,B,de,"°","\\degree",!0);N(Fe,B,de,"°","\\degree");N(Fe,B,de,"°","\\textdegree",!0);N(M,B,de,"£","\\pounds");N(M,B,de,"£","\\mathsterling",!0);N(Fe,B,de,"£","\\pounds");N(Fe,B,de,"£","\\textsterling",!0);N(M,J,de,"✠","\\maltese");N(Fe,J,de,"✠","\\maltese");var Z8='0123456789/@."';for(var Kb=0;Kb<Z8.length;Kb++){var J8=Z8.charAt(Kb);N(M,B,de,J8,J8)}var eS='0123456789!@*()-=+";:?/.,';for(var Qb=0;Qb<eS.length;Qb++){var tS=eS.charAt(Qb);N(Fe,B,de,tS,tS)}var jp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var Zb=0;Zb<jp.length;Zb++){var _m=jp.charAt(Zb);N(M,B,Dt,_m,_m),N(Fe,B,de,_m,_m)}N(M,J,de,"C","ℂ");N(Fe,J,de,"C","ℂ");N(M,J,de,"H","ℍ");N(Fe,J,de,"H","ℍ");N(M,J,de,"N","ℕ");N(Fe,J,de,"N","ℕ");N(M,J,de,"P","ℙ");N(Fe,J,de,"P","ℙ");N(M,J,de,"Q","ℚ");N(Fe,J,de,"Q","ℚ");N(M,J,de,"R","ℝ");N(Fe,J,de,"R","ℝ");N(M,J,de,"Z","ℤ");N(Fe,J,de,"Z","ℤ");N(M,B,Dt,"h","ℎ");N(Fe,B,Dt,"h","ℎ");var zt="";for(var fa=0;fa<jp.length;fa++){var dr=jp.charAt(fa);zt=String.fromCharCode(55349,56320+fa),N(M,B,Dt,dr,zt),N(Fe,B,de,dr,zt),zt=String.fromCharCode(55349,56372+fa),N(M,B,Dt,dr,zt),N(Fe,B,de,dr,zt),zt=String.fromCharCode(55349,56424+fa),N(M,B,Dt,dr,zt),N(Fe,B,de,dr,zt),zt=String.fromCharCode(55349,56580+fa),N(M,B,Dt,dr,zt),N(Fe,B,de,dr,zt),zt=String.fromCharCode(55349,56684+fa),N(M,B,Dt,dr,zt),N(Fe,B,de,dr,zt),zt=String.fromCharCode(55349,56736+fa),N(M,B,Dt,dr,zt),N(Fe,B,de,dr,zt),zt=String.fromCharCode(55349,56788+fa),N(M,B,Dt,dr,zt),N(Fe,B,de,dr,zt),zt=String.fromCharCode(55349,56840+fa),N(M,B,Dt,dr,zt),N(Fe,B,de,dr,zt),zt=String.fromCharCode(55349,56944+fa),N(M,B,Dt,dr,zt),N(Fe,B,de,dr,zt),fa<26&&(zt=String.fromCharCode(55349,56632+fa),N(M,B,Dt,dr,zt),N(Fe,B,de,dr,zt),zt=String.fromCharCode(55349,56476+fa),N(M,B,Dt,dr,zt),N(Fe,B,de,dr,zt))}zt="𝕜";N(M,B,Dt,"k",zt);N(Fe,B,de,"k",zt);for(var Fl=0;Fl<10;Fl++){var $o=Fl.toString();zt=String.fromCharCode(55349,57294+Fl),N(M,B,Dt,$o,zt),N(Fe,B,de,$o,zt),zt=String.fromCharCode(55349,57314+Fl),N(M,B,Dt,$o,zt),N(Fe,B,de,$o,zt),zt=String.fromCharCode(55349,57324+Fl),N(M,B,Dt,$o,zt),N(Fe,B,de,$o,zt),zt=String.fromCharCode(55349,57334+Fl),N(M,B,Dt,$o,zt),N(Fe,B,de,$o,zt)}var Iy="ÐÞþ";for(var Jb=0;Jb<Iy.length;Jb++){var Rm=Iy.charAt(Jb);N(M,B,Dt,Rm,Rm),N(Fe,B,de,Rm,Rm)}var Mm=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],nS=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],tJ=function(t,n){var r=t.charCodeAt(0),a=t.charCodeAt(1),s=(r-55296)*1024+(a-56320)+65536,o=n==="math"?0:1;if(119808<=s&&s<120484){var u=Math.floor((s-119808)/26);return[Mm[u][2],Mm[u][o]]}else if(120782<=s&&s<=120831){var c=Math.floor((s-120782)/10);return[nS[c][2],nS[c][o]]}else{if(s===120485||s===120486)return[Mm[0][2],Mm[0][o]];if(120486<s&&s<120782)return["",""];throw new Ye("Unsupported character: "+t)}},$1=function(t,n,r){return Gn[r][t]&&Gn[r][t].replace&&(t=Gn[r][t].replace),{value:t,metrics:X4(t,n,r)}},zs=function(t,n,r,a,s){var o=$1(t,n,r),u=o.metrics;t=o.value;var c;if(u){var d=u.italic;(r==="text"||a&&a.font==="mathit")&&(d=0),c=new _s(t,u.height,u.depth,d,u.skew,u.width,s)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+t+"' in style '"+n+"' and mode '"+r+"'")),c=new _s(t,0,0,0,0,0,s);if(a){c.maxFontSize=a.sizeMultiplier,a.style.isTight()&&c.classes.push("mtight");var m=a.getColor();m&&(c.style.color=m)}return c},nJ=function(t,n,r,a){return a===void 0&&(a=[]),r.font==="boldsymbol"&&$1(t,"Main-Bold",n).metrics?zs(t,"Main-Bold",n,r,a.concat(["mathbf"])):t==="\\"||Gn[n][t].font==="main"?zs(t,"Main-Regular",n,r,a):zs(t,"AMS-Regular",n,r,a.concat(["amsrm"]))},rJ=function(t,n,r,a,s){return s!=="textord"&&$1(t,"Math-BoldItalic",n).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},aJ=function(t,n,r){var a=t.mode,s=t.text,o=["mord"],u=a==="math"||a==="text"&&n.font,c=u?n.font:n.fontFamily,d="",m="";if(s.charCodeAt(0)===55349&&([d,m]=tJ(s,a)),d.length>0)return zs(s,d,a,n,o.concat(m));if(c){var p,b;if(c==="boldsymbol"){var y=rJ(s,a,n,o,r);p=y.fontName,b=[y.fontClass]}else u?(p=wM[c].fontName,b=[c]):(p=Dm(c,n.fontWeight,n.fontShape),b=[c,n.fontWeight,n.fontShape]);if($1(s,p,a).metrics)return zs(s,p,a,n,o.concat(b));if(xM.hasOwnProperty(s)&&p.slice(0,10)==="Typewriter"){for(var w=[],S=0;S<s.length;S++)w.push(zs(s[S],p,a,n,o.concat(b)));return vM(w)}}if(r==="mathord")return zs(s,"Math-Italic",a,n,o.concat(["mathnormal"]));if(r==="textord"){var k=Gn[a][s]&&Gn[a][s].font;if(k==="ams"){var E=Dm("amsrm",n.fontWeight,n.fontShape);return zs(s,E,a,n,o.concat("amsrm",n.fontWeight,n.fontShape))}else if(k==="main"||!k){var A=Dm("textrm",n.fontWeight,n.fontShape);return zs(s,A,a,n,o.concat(n.fontWeight,n.fontShape))}else{var _=Dm(k,n.fontWeight,n.fontShape);return zs(s,_,a,n,o.concat(_,n.fontWeight,n.fontShape))}}else throw new Error("unexpected type: "+r+" in makeOrd")},sJ=(e,t)=>{if(il(e.classes)!==il(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(e.classes.length===1){var n=e.classes[0];if(n==="mbin"||n==="mord")return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var a in t.style)if(t.style.hasOwnProperty(a)&&e.style[a]!==t.style[a])return!1;return!0},iJ=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof _s&&r instanceof _s&&sJ(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e},Q4=function(t){for(var n=0,r=0,a=0,s=0;s<t.children.length;s++){var o=t.children[s];o.height>n&&(n=o.height),o.depth>r&&(r=o.depth),o.maxFontSize>a&&(a=o.maxFontSize)}t.height=n,t.depth=r,t.maxFontSize=a},Ia=function(t,n,r,a){var s=new Hf(t,n,r,a);return Q4(s),s},yM=(e,t,n,r)=>new Hf(e,t,n,r),oJ=function(t,n,r){var a=Ia([t],[],n);return a.height=Math.max(r||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),a.style.borderBottomWidth=et(a.height),a.maxFontSize=1,a},lJ=function(t,n,r,a){var s=new K4(t,n,r,a);return Q4(s),s},vM=function(t){var n=new Ff(t);return Q4(n),n},uJ=function(t,n){return t instanceof Ff?Ia([],[t],n):t},cJ=function(t){if(t.positionType==="individualShift"){for(var n=t.children,r=[n[0]],a=-n[0].shift-n[0].elem.depth,s=a,o=1;o<n.length;o++){var u=-n[o].shift-s-n[o].elem.depth,c=u-(n[o-1].elem.height+n[o-1].elem.depth);s=s+u,r.push({type:"kern",size:c}),r.push(n[o])}return{children:r,depth:a}}var d;if(t.positionType==="top"){for(var m=t.positionData,p=0;p<t.children.length;p++){var b=t.children[p];m-=b.type==="kern"?b.size:b.elem.height+b.elem.depth}d=m}else if(t.positionType==="bottom")d=-t.positionData;else{var y=t.children[0];if(y.type!=="elem")throw new Error('First child must have type "elem".');if(t.positionType==="shift")d=-y.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")d=-y.elem.depth;else throw new Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:d}},dJ=function(t,n){for(var{children:r,depth:a}=cJ(t),s=0,o=0;o<r.length;o++){var u=r[o];if(u.type==="elem"){var c=u.elem;s=Math.max(s,c.maxFontSize,c.height)}}s+=2;var d=Ia(["pstrut"],[]);d.style.height=et(s);for(var m=[],p=a,b=a,y=a,w=0;w<r.length;w++){var S=r[w];if(S.type==="kern")y+=S.size;else{var k=S.elem,E=S.wrapperClasses||[],A=S.wrapperStyle||{},_=Ia(E,[d,k],void 0,A);_.style.top=et(-s-y-k.depth),S.marginLeft&&(_.style.marginLeft=S.marginLeft),S.marginRight&&(_.style.marginRight=S.marginRight),m.push(_),y+=k.height+k.depth}p=Math.min(p,y),b=Math.max(b,y)}var I=Ia(["vlist"],m);I.style.height=et(b);var P;if(p<0){var O=Ia([],[]),R=Ia(["vlist"],[O]);R.style.height=et(-p);var z=Ia(["vlist-s"],[new _s("")]);P=[Ia(["vlist-r"],[I,z]),Ia(["vlist-r"],[R])]}else P=[Ia(["vlist-r"],[I])];var F=Ia(["vlist-t"],P);return P.length===2&&F.classes.push("vlist-t2"),F.height=b,F.depth=-p,F},fJ=(e,t)=>{var n=Ia(["mspace"],[],t),r=ir(e,t);return n.style.marginRight=et(r),n},Dm=function(t,n,r){var a="";switch(t){case"amsrm":a="AMS";break;case"textrm":a="Main";break;case"textsf":a="SansSerif";break;case"texttt":a="Typewriter";break;default:a=t}var s;return n==="textbf"&&r==="textit"?s="BoldItalic":n==="textbf"?s="Bold":n==="textit"?s="Italic":s="Regular",a+"-"+s},wM={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},TM={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},hJ=function(t,n){var[r,a,s]=TM[t],o=new ol(r),u=new io([o],{width:et(a),height:et(s),style:"width:"+et(a),viewBox:"0 0 "+1e3*a+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),c=yM(["overlay"],[u],n);return c.height=s,c.style.height=et(s),c.style.width=et(a),c},ye={fontMap:wM,makeSymbol:zs,mathsym:nJ,makeSpan:Ia,makeSvgSpan:yM,makeLineSpan:oJ,makeAnchor:lJ,makeFragment:vM,wrapFragment:uJ,makeVList:dJ,makeOrd:aJ,makeGlue:fJ,staticSvg:hJ,svgData:TM,tryCombineChars:iJ},sr={number:3,unit:"mu"},Hl={number:4,unit:"mu"},Yi={number:5,unit:"mu"},mJ={mord:{mop:sr,mbin:Hl,mrel:Yi,minner:sr},mop:{mord:sr,mop:sr,mrel:Yi,minner:sr},mbin:{mord:Hl,mop:Hl,mopen:Hl,minner:Hl},mrel:{mord:Yi,mop:Yi,mopen:Yi,minner:Yi},mopen:{},mclose:{mop:sr,mbin:Hl,mrel:Yi,minner:sr},mpunct:{mord:sr,mop:sr,mrel:Yi,mopen:sr,mclose:sr,mpunct:sr,minner:sr},minner:{mord:sr,mop:sr,mbin:Hl,mrel:Yi,mopen:sr,mpunct:sr,minner:sr}},pJ={mord:{mop:sr},mop:{mord:sr,mop:sr},mbin:{},mrel:{},mopen:{},mclose:{mop:sr},mpunct:{},minner:{mop:sr}},EM={},zp={},Bp={};function ut(e){for(var{type:t,names:n,props:r,handler:a,htmlBuilder:s,mathmlBuilder:o}=e,u={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:a},c=0;c<n.length;++c)EM[n[c]]=u;t&&(s&&(zp[t]=s),o&&(Bp[t]=o))}function bu(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;ut({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:r})}var Fp=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},xr=function(t){return t.type==="ordgroup"?t.body:[t]},oo=ye.makeSpan,gJ=["leftmost","mbin","mopen","mrel","mop","mpunct"],bJ=["rightmost","mrel","mclose","mpunct"],xJ={display:It.DISPLAY,text:It.TEXT,script:It.SCRIPT,scriptscript:It.SCRIPTSCRIPT},yJ={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Or=function(t,n,r,a){a===void 0&&(a=[null,null]);for(var s=[],o=0;o<t.length;o++){var u=wn(t[o],n);if(u instanceof Ff){var c=u.children;s.push(...c)}else s.push(u)}if(ye.tryCombineChars(s),!r)return s;var d=n;if(t.length===1){var m=t[0];m.type==="sizing"?d=n.havingSize(m.size):m.type==="styling"&&(d=n.havingStyle(xJ[m.style]))}var p=oo([a[0]||"leftmost"],[],n),b=oo([a[1]||"rightmost"],[],n),y=r==="root";return rS(s,(w,S)=>{var k=S.classes[0],E=w.classes[0];k==="mbin"&&bJ.includes(E)?S.classes[0]="mord":E==="mbin"&&gJ.includes(k)&&(w.classes[0]="mord")},{node:p},b,y),rS(s,(w,S)=>{var k=Oy(S),E=Oy(w),A=k&&E?w.hasClass("mtight")?pJ[k][E]:mJ[k][E]:null;if(A)return ye.makeGlue(A,d)},{node:p},b,y),s},rS=function e(t,n,r,a,s){a&&t.push(a);for(var o=0;o<t.length;o++){var u=t[o],c=SM(u);if(c){e(c.children,n,r,null,s);continue}var d=!u.hasClass("mspace");if(d){var m=n(u,r.node);m&&(r.insertAfter?r.insertAfter(m):(t.unshift(m),o++))}d?r.node=u:s&&u.hasClass("newline")&&(r.node=oo(["leftmost"])),r.insertAfter=(p=>b=>{t.splice(p+1,0,b),o++})(o)}a&&t.pop()},SM=function(t){return t instanceof Ff||t instanceof K4||t instanceof Hf&&t.hasClass("enclosing")?t:null},vJ=function e(t,n){var r=SM(t);if(r){var a=r.children;if(a.length){if(n==="right")return e(a[a.length-1],"right");if(n==="left")return e(a[0],"left")}}return t},Oy=function(t,n){return t?(n&&(t=vJ(t,n)),yJ[t.classes[0]]||null):null},of=function(t,n){var r=["nulldelimiter"].concat(t.baseSizingClasses());return oo(n.concat(r))},wn=function(t,n,r){if(!t)return oo();if(zp[t.type]){var a=zp[t.type](t,n);if(r&&n.size!==r.size){a=oo(n.sizingClasses(r),[a],n);var s=n.sizeMultiplier/r.sizeMultiplier;a.height*=s,a.depth*=s}return a}else throw new Ye("Got group of unknown type: '"+t.type+"'")};function Im(e,t){var n=oo(["base"],e,t),r=oo(["strut"]);return r.style.height=et(n.height+n.depth),n.depth&&(r.style.verticalAlign=et(-n.depth)),n.children.unshift(r),n}function Ly(e,t){var n=null;e.length===1&&e[0].type==="tag"&&(n=e[0].tag,e=e[0].body);var r=Or(e,t,"root"),a;r.length===2&&r[1].hasClass("tag")&&(a=r.pop());for(var s=[],o=[],u=0;u<r.length;u++)if(o.push(r[u]),r[u].hasClass("mbin")||r[u].hasClass("mrel")||r[u].hasClass("allowbreak")){for(var c=!1;u<r.length-1&&r[u+1].hasClass("mspace")&&!r[u+1].hasClass("newline");)u++,o.push(r[u]),r[u].hasClass("nobreak")&&(c=!0);c||(s.push(Im(o,t)),o=[])}else r[u].hasClass("newline")&&(o.pop(),o.length>0&&(s.push(Im(o,t)),o=[]),s.push(r[u]));o.length>0&&s.push(Im(o,t));var d;n?(d=Im(Or(n,t,!0)),d.classes=["tag"],s.push(d)):a&&s.push(a);var m=oo(["katex-html"],s);if(m.setAttribute("aria-hidden","true"),d){var p=d.children[0];p.style.height=et(m.height+m.depth),m.depth&&(p.style.verticalAlign=et(-m.depth))}return m}function CM(e){return new Ff(e)}class ts{constructor(t,n,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=n||[],this.classes=r||[]}setAttribute(t,n){this.attributes[t]=n}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);this.classes.length>0&&(t.className=il(this.classes));for(var r=0;r<this.children.length;r++)if(this.children[r]instanceof mi&&this.children[r+1]instanceof mi){for(var a=this.children[r].toText()+this.children[++r].toText();this.children[r+1]instanceof mi;)a+=this.children[++r].toText();t.appendChild(new mi(a).toNode())}else t.appendChild(this.children[r].toNode());return t}toMarkup(){var t="<"+this.type;for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(t+=" "+n+'="',t+=kn.escape(this.attributes[n]),t+='"');this.classes.length>0&&(t+=' class ="'+kn.escape(il(this.classes))+'"'),t+=">";for(var r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t+="</"+this.type+">",t}toText(){return this.children.map(t=>t.toText()).join("")}}class mi{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return kn.escape(this.toText())}toText(){return this.text}}class wJ{constructor(t){this.width=void 0,this.character=void 0,this.width=t,t>=.05555&&t<=.05556?this.character=" ":t>=.1666&&t<=.1667?this.character=" ":t>=.2222&&t<=.2223?this.character=" ":t>=.2777&&t<=.2778?this.character=" ":t>=-.05556&&t<=-.05555?this.character=" ":t>=-.1667&&t<=-.1666?this.character=" ":t>=-.2223&&t<=-.2222?this.character=" ":t>=-.2778&&t<=-.2777?this.character=" ":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",et(this.width)),t}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+et(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var Ve={MathNode:ts,TextNode:mi,SpaceNode:wJ,newDocumentFragment:CM},Rs=function(t,n,r){return Gn[n][t]&&Gn[n][t].replace&&t.charCodeAt(0)!==55349&&!(xM.hasOwnProperty(t)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(t=Gn[n][t].replace),new Ve.TextNode(t)},Z4=function(t){return t.length===1?t[0]:new Ve.MathNode("mrow",t)},J4=function(t,n){if(n.fontFamily==="texttt")return"monospace";if(n.fontFamily==="textsf")return n.fontShape==="textit"&&n.fontWeight==="textbf"?"sans-serif-bold-italic":n.fontShape==="textit"?"sans-serif-italic":n.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(n.fontShape==="textit"&&n.fontWeight==="textbf")return"bold-italic";if(n.fontShape==="textit")return"italic";if(n.fontWeight==="textbf")return"bold";var r=n.font;if(!r||r==="mathnormal")return null;var a=t.mode;if(r==="mathit")return"italic";if(r==="boldsymbol")return t.type==="textord"?"bold":"bold-italic";if(r==="mathbf")return"bold";if(r==="mathbb")return"double-struck";if(r==="mathsfit")return"sans-serif-italic";if(r==="mathfrak")return"fraktur";if(r==="mathscr"||r==="mathcal")return"script";if(r==="mathsf")return"sans-serif";if(r==="mathtt")return"monospace";var s=t.text;if(["\\imath","\\jmath"].includes(s))return null;Gn[a][s]&&Gn[a][s].replace&&(s=Gn[a][s].replace);var o=ye.fontMap[r].fontName;return X4(s,o,a)?ye.fontMap[r].variant:null};function ex(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof mi&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var n=e.children[0];return n instanceof mi&&n.text===","}else return!1}var qa=function(t,n,r){if(t.length===1){var a=qn(t[0],n);return r&&a instanceof ts&&a.type==="mo"&&(a.setAttribute("lspace","0em"),a.setAttribute("rspace","0em")),[a]}for(var s=[],o,u=0;u<t.length;u++){var c=qn(t[u],n);if(c instanceof ts&&o instanceof ts){if(c.type==="mtext"&&o.type==="mtext"&&c.getAttribute("mathvariant")===o.getAttribute("mathvariant")){o.children.push(...c.children);continue}else if(c.type==="mn"&&o.type==="mn"){o.children.push(...c.children);continue}else if(ex(c)&&o.type==="mn"){o.children.push(...c.children);continue}else if(c.type==="mn"&&ex(o))c.children=[...o.children,...c.children],s.pop();else if((c.type==="msup"||c.type==="msub")&&c.children.length>=1&&(o.type==="mn"||ex(o))){var d=c.children[0];d instanceof ts&&d.type==="mn"&&(d.children=[...o.children,...d.children],s.pop())}else if(o.type==="mi"&&o.children.length===1){var m=o.children[0];if(m instanceof mi&&m.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var p=c.children[0];p instanceof mi&&p.text.length>0&&(p.text=p.text.slice(0,1)+"̸"+p.text.slice(1),s.pop())}}}s.push(c),o=c}return s},ll=function(t,n,r){return Z4(qa(t,n,r))},qn=function(t,n){if(!t)return new Ve.MathNode("mrow");if(Bp[t.type]){var r=Bp[t.type](t,n);return r}else throw new Ye("Got group of unknown type: '"+t.type+"'")};function aS(e,t,n,r,a){var s=qa(e,n),o;s.length===1&&s[0]instanceof ts&&["mrow","mtable"].includes(s[0].type)?o=s[0]:o=new Ve.MathNode("mrow",s);var u=new Ve.MathNode("annotation",[new Ve.TextNode(t)]);u.setAttribute("encoding","application/x-tex");var c=new Ve.MathNode("semantics",[o,u]),d=new Ve.MathNode("math",[c]);d.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&d.setAttribute("display","block");var m=a?"katex":"katex-mathml";return ye.makeSpan([m],[d])}var kM=function(t){return new Xi({style:t.displayMode?It.DISPLAY:It.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},AM=function(t,n){if(n.displayMode){var r=["katex-display"];n.leqno&&r.push("leqno"),n.fleqn&&r.push("fleqn"),t=ye.makeSpan(r,[t])}return t},TJ=function(t,n,r){var a=kM(r),s;if(r.output==="mathml")return aS(t,n,a,r.displayMode,!0);if(r.output==="html"){var o=Ly(t,a);s=ye.makeSpan(["katex"],[o])}else{var u=aS(t,n,a,r.displayMode,!1),c=Ly(t,a);s=ye.makeSpan(["katex"],[u,c])}return AM(s,r)},EJ=function(t,n,r){var a=kM(r),s=Ly(t,a),o=ye.makeSpan(["katex"],[s]);return AM(o,r)},SJ={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},CJ=function(t){var n=new Ve.MathNode("mo",[new Ve.TextNode(SJ[t.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},kJ={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},AJ=function(t){return t.type==="ordgroup"?t.body.length:1},NJ=function(t,n){function r(){var u=4e5,c=t.label.slice(1);if(["widehat","widecheck","widetilde","utilde"].includes(c)){var d=t,m=AJ(d.base),p,b,y;if(m>5)c==="widehat"||c==="widecheck"?(p=420,u=2364,y=.42,b=c+"4"):(p=312,u=2340,y=.34,b="tilde4");else{var w=[1,1,2,2,3,3][m];c==="widehat"||c==="widecheck"?(u=[0,1062,2364,2364,2364][w],p=[0,239,300,360,420][w],y=[0,.24,.3,.3,.36,.42][w],b=c+w):(u=[0,600,1033,2339,2340][w],p=[0,260,286,306,312][w],y=[0,.26,.286,.3,.306,.34][w],b="tilde"+w)}var S=new ol(b),k=new io([S],{width:"100%",height:et(y),viewBox:"0 0 "+u+" "+p,preserveAspectRatio:"none"});return{span:ye.makeSvgSpan([],[k],n),minWidth:0,height:y}}else{var E=[],A=kJ[c],[_,I,P]=A,O=P/1e3,R=_.length,z,F;if(R===1){var U=A[3];z=["hide-tail"],F=[U]}else if(R===2)z=["halfarrow-left","halfarrow-right"],F=["xMinYMin","xMaxYMin"];else if(R===3)z=["brace-left","brace-center","brace-right"],F=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
325
|
+
`+R+" children.");for(var X=0;X<R;X++){var W=new ol(_[X]),le=new io([W],{width:"400em",height:et(O),viewBox:"0 0 "+u+" "+P,preserveAspectRatio:F[X]+" slice"}),se=ye.makeSvgSpan([z[X]],[le],n);if(R===1)return{span:se,minWidth:I,height:O};se.style.height=et(O),E.push(se)}return{span:ye.makeSpan(["stretchy"],E,n),minWidth:I,height:O}}}var{span:a,minWidth:s,height:o}=r();return a.height=o,a.style.height=et(o),s>0&&(a.style.minWidth=et(s)),a},_J=function(t,n,r,a,s){var o,u=t.height+t.depth+r+a;if(/fbox|color|angl/.test(n)){if(o=ye.makeSpan(["stretchy",n],[],s),n==="fbox"){var c=s.color&&s.getColor();c&&(o.style.borderColor=c)}}else{var d=[];/^[bx]cancel$/.test(n)&&d.push(new Dy({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&d.push(new Dy({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var m=new io(d,{width:"100%",height:et(u)});o=ye.makeSvgSpan([],[m],s)}return o.height=u,o.style.height=et(u),o},lo={encloseSpan:_J,mathMLnode:CJ,svgSpan:NJ};function en(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function e3(e){var t=q1(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function q1(e){return e&&(e.type==="atom"||eJ.hasOwnProperty(e.type))?e:null}var t3=(e,t)=>{var n,r,a;e&&e.type==="supsub"?(r=en(e.base,"accent"),n=r.base,e.base=n,a=ZZ(wn(e,t)),e.base=r):(r=en(e,"accent"),n=r.base);var s=wn(n,t.havingCrampedStyle()),o=r.isShifty&&kn.isCharacterBox(n),u=0;if(o){var c=kn.getBaseElem(n),d=wn(c,t.havingCrampedStyle());u=Q8(d).skew}var m=r.label==="\\c",p=m?s.height+s.depth:Math.min(s.height,t.fontMetrics().xHeight),b;if(r.isStretchy)b=lo.svgSpan(r,t),b=ye.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:b,wrapperClasses:["svg-align"],wrapperStyle:u>0?{width:"calc(100% - "+et(2*u)+")",marginLeft:et(2*u)}:void 0}]},t);else{var y,w;r.label==="\\vec"?(y=ye.staticSvg("vec",t),w=ye.svgData.vec[1]):(y=ye.makeOrd({mode:r.mode,text:r.label},t,"textord"),y=Q8(y),y.italic=0,w=y.width,m&&(p+=y.depth)),b=ye.makeSpan(["accent-body"],[y]);var S=r.label==="\\textcircled";S&&(b.classes.push("accent-full"),p=s.height);var k=u;S||(k-=w/2),b.style.left=et(k),r.label==="\\textcircled"&&(b.style.top=".2em"),b=ye.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-p},{type:"elem",elem:b}]},t)}var E=ye.makeSpan(["mord","accent"],[b],t);return a?(a.children[0]=E,a.height=Math.max(E.height,a.height),a.classes[0]="mord",a):E},NM=(e,t)=>{var n=e.isStretchy?lo.mathMLnode(e.label):new Ve.MathNode("mo",[Rs(e.label,e.mode)]),r=new Ve.MathNode("mover",[qn(e.base,t),n]);return r.setAttribute("accent","true"),r},RJ=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));ut({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var n=Fp(t[0]),r=!RJ.test(e.funcName),a=!r||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:a,base:n}},htmlBuilder:t3,mathmlBuilder:NM});ut({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:t3,mathmlBuilder:NM});ut({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:a}},htmlBuilder:(e,t)=>{var n=wn(e.base,t),r=lo.svgSpan(e,t),a=e.label==="\\utilde"?.12:0,s=ye.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:n}]},t);return ye.makeSpan(["mord","accentunder"],[s],t)},mathmlBuilder:(e,t)=>{var n=lo.mathMLnode(e.label),r=new Ve.MathNode("munder",[qn(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var Om=e=>{var t=new Ve.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};ut({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:a}=e;return{type:"xArrow",mode:r.mode,label:a,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),a=ye.wrapFragment(wn(e.body,r,t),t),s=e.label.slice(0,2)==="\\x"?"x":"cd";a.classes.push(s+"-arrow-pad");var o;e.below&&(r=t.havingStyle(n.sub()),o=ye.wrapFragment(wn(e.below,r,t),t),o.classes.push(s+"-arrow-pad"));var u=lo.svgSpan(e,t),c=-t.fontMetrics().axisHeight+.5*u.height,d=-t.fontMetrics().axisHeight-.5*u.height-.111;(a.depth>.25||e.label==="\\xleftequilibrium")&&(d-=a.depth);var m;if(o){var p=-t.fontMetrics().axisHeight+o.height+.5*u.height+.111;m=ye.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:d},{type:"elem",elem:u,shift:c},{type:"elem",elem:o,shift:p}]},t)}else m=ye.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:d},{type:"elem",elem:u,shift:c}]},t);return m.children[0].children[0].children[1].classes.push("svg-align"),ye.makeSpan(["mrel","x-arrow"],[m],t)},mathmlBuilder(e,t){var n=lo.mathMLnode(e.label);n.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var a=Om(qn(e.body,t));if(e.below){var s=Om(qn(e.below,t));r=new Ve.MathNode("munderover",[n,s,a])}else r=new Ve.MathNode("mover",[n,a])}else if(e.below){var o=Om(qn(e.below,t));r=new Ve.MathNode("munder",[n,o])}else r=Om(),r=new Ve.MathNode("mover",[n,r]);return r}});var MJ=ye.makeSpan;function _M(e,t){var n=Or(e.body,t,!0);return MJ([e.mclass],n,t)}function RM(e,t){var n,r=qa(e.body,t);return e.mclass==="minner"?n=new Ve.MathNode("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(n=r[0],n.type="mi"):n=new Ve.MathNode("mi",r):(e.isCharacterBox?(n=r[0],n.type="mo"):n=new Ve.MathNode("mo",r),e.mclass==="mbin"?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):e.mclass==="mpunct"?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(n.attributes.lspace="0em",n.attributes.rspace="0em"):e.mclass==="minner"&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}ut({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,a=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:xr(a),isCharacterBox:kn.isCharacterBox(a)}},htmlBuilder:_M,mathmlBuilder:RM});var V1=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};ut({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:V1(t[0]),body:xr(t[1]),isCharacterBox:kn.isCharacterBox(t[1])}}});ut({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,a=t[1],s=t[0],o;r!=="\\stackrel"?o=V1(a):o="mrel";var u={type:"op",mode:a.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:xr(a)},c={type:"supsub",mode:s.mode,base:u,sup:r==="\\underset"?null:s,sub:r==="\\underset"?s:null};return{type:"mclass",mode:n.mode,mclass:o,body:[c],isCharacterBox:kn.isCharacterBox(c)}},htmlBuilder:_M,mathmlBuilder:RM});ut({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:V1(t[0]),body:xr(t[0])}},htmlBuilder(e,t){var n=Or(e.body,t,!0),r=ye.makeSpan([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=qa(e.body,t),r=new Ve.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var DJ={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},sS=()=>({type:"styling",body:[],mode:"math",style:"display"}),iS=e=>e.type==="textord"&&e.text==="@",IJ=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function OJ(e,t,n){var r=DJ[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var a=n.callFunction("\\\\cdleft",[t[0]],[]),s={type:"atom",text:r,mode:"math",family:"rel"},o=n.callFunction("\\Big",[s],[]),u=n.callFunction("\\\\cdright",[t[1]],[]),c={type:"ordgroup",mode:"math",body:[a,o,u]};return n.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var d={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[d],[])}default:return{type:"textord",text:" ",mode:"math"}}}function LJ(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n==="&"||n==="\\\\")e.consume();else if(n==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new Ye("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],a=[r],s=0;s<t.length;s++){for(var o=t[s],u=sS(),c=0;c<o.length;c++)if(!iS(o[c]))u.body.push(o[c]);else{r.push(u),c+=1;var d=e3(o[c]).text,m=new Array(2);if(m[0]={type:"ordgroup",mode:"math",body:[]},m[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(d)>-1))if("<>AV".indexOf(d)>-1)for(var p=0;p<2;p++){for(var b=!0,y=c+1;y<o.length;y++){if(IJ(o[y],d)){b=!1,c=y;break}if(iS(o[y]))throw new Ye("Missing a "+d+" character to complete a CD arrow.",o[y]);m[p].body.push(o[y])}if(b)throw new Ye("Missing a "+d+" character to complete a CD arrow.",o[c])}else throw new Ye('Expected one of "<>AV=|." after @',o[c]);var w=OJ(d,m,e),S={type:"styling",body:[w],mode:"math",style:"display"};r.push(S),u=sS()}s%2===0?r.push(u):r.shift(),r=[],a.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var k=new Array(a[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:a,arraystretch:1,addJot:!0,rowGaps:[null],cols:k,colSeparationType:"CD",hLinesBeforeRow:new Array(a.length+1).fill([])}}ut({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=ye.wrapFragment(wn(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=et(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new Ve.MathNode("mrow",[qn(e.label,t)]);return n=new Ve.MathNode("mpadded",[n]),n.setAttribute("width","0"),e.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new Ve.MathNode("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});ut({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=ye.wrapFragment(wn(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new Ve.MathNode("mrow",[qn(e.fragment,t)])}});ut({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=en(t[0],"ordgroup"),a=r.body,s="",o=0;o<a.length;o++){var u=en(a[o],"textord");s+=u.text}var c=parseInt(s),d;if(isNaN(c))throw new Ye("\\@char has non-numeric argument "+s);if(c<0||c>=1114111)throw new Ye("\\@char with invalid code point "+s);return c<=65535?d=String.fromCharCode(c):(c-=65536,d=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:n.mode,text:d}}});var MM=(e,t)=>{var n=Or(e.body,t.withColor(e.color),!1);return ye.makeFragment(n)},DM=(e,t)=>{var n=qa(e.body,t.withColor(e.color)),r=new Ve.MathNode("mstyle",n);return r.setAttribute("mathcolor",e.color),r};ut({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,r=en(t[0],"color-token").color,a=t[1];return{type:"color",mode:n.mode,color:r,body:xr(a)}},htmlBuilder:MM,mathmlBuilder:DM});ut({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,a=en(t[0],"color-token").color;n.gullet.macros.set("\\current@color",a);var s=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:a,body:s}},htmlBuilder:MM,mathmlBuilder:DM});ut({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,a=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,s=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:s,size:a&&en(a,"size").value}},htmlBuilder(e,t){var n=ye.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=et(ir(e.size,t)))),n},mathmlBuilder(e,t){var n=new Ve.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",et(ir(e.size,t)))),n}});var Py={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},IM=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Ye("Expected a control sequence",e);return t},PJ=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},OM=(e,t,n,r)=>{var a=e.gullet.macros.get(n.text);a==null&&(n.noexpand=!0,a={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,a,r)};ut({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(Py[r.text])return(n==="\\global"||n==="\\\\globallong")&&(r.text=Py[r.text]),en(t.parseFunction(),"internal");throw new Ye("Invalid token after macro prefix",r)}});ut({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),a=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new Ye("Expected a control sequence",r);for(var s=0,o,u=[[]];t.gullet.future().text!=="{";)if(r=t.gullet.popToken(),r.text==="#"){if(t.gullet.future().text==="{"){o=t.gullet.future(),u[s].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Ye('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==s+1)throw new Ye('Argument number "'+r.text+'" out of order');s++,u.push([])}else{if(r.text==="EOF")throw new Ye("Expected a macro definition");u[s].push(r.text)}var{tokens:c}=t.gullet.consumeArg();return o&&c.unshift(o),(n==="\\edef"||n==="\\xdef")&&(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(a,{tokens:c,numArgs:s,delimiters:u},n===Py[n]),{type:"internal",mode:t.mode}}});ut({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=IM(t.gullet.popToken());t.gullet.consumeSpaces();var a=PJ(t);return OM(t,r,a,n==="\\\\globallet"),{type:"internal",mode:t.mode}}});ut({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=IM(t.gullet.popToken()),a=t.gullet.popToken(),s=t.gullet.popToken();return OM(t,r,s,n==="\\\\globalfuture"),t.gullet.pushToken(s),t.gullet.pushToken(a),{type:"internal",mode:t.mode}}});var Cd=function(t,n,r){var a=Gn.math[t]&&Gn.math[t].replace,s=X4(a||t,n,r);if(!s)throw new Error("Unsupported symbol "+t+" and font size "+n+".");return s},n3=function(t,n,r,a){var s=r.havingBaseStyle(n),o=ye.makeSpan(a.concat(s.sizingClasses(r)),[t],r),u=s.sizeMultiplier/r.sizeMultiplier;return o.height*=u,o.depth*=u,o.maxFontSize=s.sizeMultiplier,o},LM=function(t,n,r){var a=n.havingBaseStyle(r),s=(1-n.sizeMultiplier/a.sizeMultiplier)*n.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=et(s),t.height-=s,t.depth+=s},jJ=function(t,n,r,a,s,o){var u=ye.makeSymbol(t,"Main-Regular",s,a),c=n3(u,n,a,o);return r&&LM(c,a,n),c},zJ=function(t,n,r,a){return ye.makeSymbol(t,"Size"+n+"-Regular",r,a)},PM=function(t,n,r,a,s,o){var u=zJ(t,n,s,a),c=n3(ye.makeSpan(["delimsizing","size"+n],[u],a),It.TEXT,a,o);return r&&LM(c,a,It.TEXT),c},tx=function(t,n,r){var a;n==="Size1-Regular"?a="delim-size1":a="delim-size4";var s=ye.makeSpan(["delimsizinginner",a],[ye.makeSpan([],[ye.makeSymbol(t,n,r)])]);return{type:"elem",elem:s}},nx=function(t,n,r){var a=hi["Size4-Regular"][t.charCodeAt(0)]?hi["Size4-Regular"][t.charCodeAt(0)][4]:hi["Size1-Regular"][t.charCodeAt(0)][4],s=new ol("inner",qZ(t,Math.round(1e3*n))),o=new io([s],{width:et(a),height:et(n),style:"width:"+et(a),viewBox:"0 0 "+1e3*a+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),u=ye.makeSvgSpan([],[o],r);return u.height=n,u.style.height=et(n),u.style.width=et(a),{type:"elem",elem:u}},jy=.008,Lm={type:"kern",size:-1*jy},BJ=["|","\\lvert","\\rvert","\\vert"],FJ=["\\|","\\lVert","\\rVert","\\Vert"],jM=function(t,n,r,a,s,o){var u,c,d,m,p="",b=0;u=d=m=t,c=null;var y="Size1-Regular";t==="\\uparrow"?d=m="⏐":t==="\\Uparrow"?d=m="‖":t==="\\downarrow"?u=d="⏐":t==="\\Downarrow"?u=d="‖":t==="\\updownarrow"?(u="\\uparrow",d="⏐",m="\\downarrow"):t==="\\Updownarrow"?(u="\\Uparrow",d="‖",m="\\Downarrow"):BJ.includes(t)?(d="∣",p="vert",b=333):FJ.includes(t)?(d="∥",p="doublevert",b=556):t==="["||t==="\\lbrack"?(u="⎡",d="⎢",m="⎣",y="Size4-Regular",p="lbrack",b=667):t==="]"||t==="\\rbrack"?(u="⎤",d="⎥",m="⎦",y="Size4-Regular",p="rbrack",b=667):t==="\\lfloor"||t==="⌊"?(d=u="⎢",m="⎣",y="Size4-Regular",p="lfloor",b=667):t==="\\lceil"||t==="⌈"?(u="⎡",d=m="⎢",y="Size4-Regular",p="lceil",b=667):t==="\\rfloor"||t==="⌋"?(d=u="⎥",m="⎦",y="Size4-Regular",p="rfloor",b=667):t==="\\rceil"||t==="⌉"?(u="⎤",d=m="⎥",y="Size4-Regular",p="rceil",b=667):t==="("||t==="\\lparen"?(u="⎛",d="⎜",m="⎝",y="Size4-Regular",p="lparen",b=875):t===")"||t==="\\rparen"?(u="⎞",d="⎟",m="⎠",y="Size4-Regular",p="rparen",b=875):t==="\\{"||t==="\\lbrace"?(u="⎧",c="⎨",m="⎩",d="⎪",y="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(u="⎫",c="⎬",m="⎭",d="⎪",y="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(u="⎧",m="⎩",d="⎪",y="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(u="⎫",m="⎭",d="⎪",y="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(u="⎧",m="⎭",d="⎪",y="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(u="⎫",m="⎩",d="⎪",y="Size4-Regular");var w=Cd(u,y,s),S=w.height+w.depth,k=Cd(d,y,s),E=k.height+k.depth,A=Cd(m,y,s),_=A.height+A.depth,I=0,P=1;if(c!==null){var O=Cd(c,y,s);I=O.height+O.depth,P=2}var R=S+_+I,z=Math.max(0,Math.ceil((n-R)/(P*E))),F=R+z*P*E,U=a.fontMetrics().axisHeight;r&&(U*=a.sizeMultiplier);var X=F/2-U,W=[];if(p.length>0){var le=F-S-_,se=Math.round(F*1e3),ie=VZ(p,Math.round(le*1e3)),$=new ol(p,ie),K=(b/1e3).toFixed(3)+"em",Z=(se/1e3).toFixed(3)+"em",re=new io([$],{width:K,height:Z,viewBox:"0 0 "+b+" "+se}),j=ye.makeSvgSpan([],[re],a);j.height=se/1e3,j.style.width=K,j.style.height=Z,W.push({type:"elem",elem:j})}else{if(W.push(tx(m,y,s)),W.push(Lm),c===null){var H=F-S-_+2*jy;W.push(nx(d,H,a))}else{var G=(F-S-_-I)/2+2*jy;W.push(nx(d,G,a)),W.push(Lm),W.push(tx(c,y,s)),W.push(Lm),W.push(nx(d,G,a))}W.push(Lm),W.push(tx(u,y,s))}var L=a.havingBaseStyle(It.TEXT),ae=ye.makeVList({positionType:"bottom",positionData:X,children:W},L);return n3(ye.makeSpan(["delimsizing","mult"],[ae],L),It.TEXT,a,o)},rx=80,ax=.08,sx=function(t,n,r,a,s){var o=$Z(t,a,r),u=new ol(t,o),c=new io([u],{width:"400em",height:et(n),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return ye.makeSvgSpan(["hide-tail"],[c],s)},HJ=function(t,n){var r=n.havingBaseSizing(),a=HM("\\surd",t*r.sizeMultiplier,FM,r),s=r.sizeMultiplier,o=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),u,c=0,d=0,m=0,p;return a.type==="small"?(m=1e3+1e3*o+rx,t<1?s=1:t<1.4&&(s=.7),c=(1+o+ax)/s,d=(1+o)/s,u=sx("sqrtMain",c,m,o,n),u.style.minWidth="0.853em",p=.833/s):a.type==="large"?(m=(1e3+rx)*Dd[a.size],d=(Dd[a.size]+o)/s,c=(Dd[a.size]+o+ax)/s,u=sx("sqrtSize"+a.size,c,m,o,n),u.style.minWidth="1.02em",p=1/s):(c=t+o+ax,d=t+o,m=Math.floor(1e3*t+o)+rx,u=sx("sqrtTall",c,m,o,n),u.style.minWidth="0.742em",p=1.056),u.height=d,u.style.height=et(c),{span:u,advanceWidth:p,ruleWidth:(n.fontMetrics().sqrtRuleThickness+o)*s}},zM=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],UJ=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],BM=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Dd=[0,1.2,1.8,2.4,3],$J=function(t,n,r,a,s){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),zM.includes(t)||BM.includes(t))return PM(t,n,!1,r,a,s);if(UJ.includes(t))return jM(t,Dd[n],!1,r,a,s);throw new Ye("Illegal delimiter: '"+t+"'")},qJ=[{type:"small",style:It.SCRIPTSCRIPT},{type:"small",style:It.SCRIPT},{type:"small",style:It.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],VJ=[{type:"small",style:It.SCRIPTSCRIPT},{type:"small",style:It.SCRIPT},{type:"small",style:It.TEXT},{type:"stack"}],FM=[{type:"small",style:It.SCRIPTSCRIPT},{type:"small",style:It.SCRIPT},{type:"small",style:It.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],GJ=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},HM=function(t,n,r,a){for(var s=Math.min(2,3-a.style.size),o=s;o<r.length&&r[o].type!=="stack";o++){var u=Cd(t,GJ(r[o]),"math"),c=u.height+u.depth;if(r[o].type==="small"){var d=a.havingBaseStyle(r[o].style);c*=d.sizeMultiplier}if(c>n)return r[o]}return r[r.length-1]},UM=function(t,n,r,a,s,o){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var u;BM.includes(t)?u=qJ:zM.includes(t)?u=FM:u=VJ;var c=HM(t,n,u,a);return c.type==="small"?jJ(t,c.style,r,a,s,o):c.type==="large"?PM(t,c.size,r,a,s,o):jM(t,n,r,a,s,o)},YJ=function(t,n,r,a,s,o){var u=a.fontMetrics().axisHeight*a.sizeMultiplier,c=901,d=5/a.fontMetrics().ptPerEm,m=Math.max(n-u,r+u),p=Math.max(m/500*c,2*m-d);return UM(t,p,!0,a,s,o)},to={sqrtImage:HJ,sizedDelim:$J,sizeToMaxHeight:Dd,customSizedDelim:UM,leftRightDelim:YJ},oS={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},WJ=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function G1(e,t){var n=q1(e);if(n&&WJ.includes(n.text))return n;throw n?new Ye("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e):new Ye("Invalid delimiter type '"+e.type+"'",e)}ut({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var n=G1(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:oS[e.funcName].size,mclass:oS[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim==="."?ye.makeSpan([e.mclass]):to.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(Rs(e.delim,e.mode));var n=new Ve.MathNode("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=et(to.sizeToMaxHeight[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}});function lS(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ut({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&typeof n!="string")throw new Ye("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:G1(t[0],e).text,color:n}}});ut({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=G1(t[0],e),r=e.parser;++r.leftrightDepth;var a=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var s=en(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:a,left:n.text,right:s.delim,rightColor:s.color}},htmlBuilder:(e,t)=>{lS(e);for(var n=Or(e.body,t,!0,["mopen","mclose"]),r=0,a=0,s=!1,o=0;o<n.length;o++)n[o].isMiddle?s=!0:(r=Math.max(n[o].height,r),a=Math.max(n[o].depth,a));r*=t.sizeMultiplier,a*=t.sizeMultiplier;var u;if(e.left==="."?u=of(t,["mopen"]):u=to.leftRightDelim(e.left,r,a,t,e.mode,["mopen"]),n.unshift(u),s)for(var c=1;c<n.length;c++){var d=n[c],m=d.isMiddle;m&&(n[c]=to.leftRightDelim(m.delim,r,a,m.options,e.mode,[]))}var p;if(e.right===".")p=of(t,["mclose"]);else{var b=e.rightColor?t.withColor(e.rightColor):t;p=to.leftRightDelim(e.right,r,a,b,e.mode,["mclose"])}return n.push(p),ye.makeSpan(["minner"],n,t)},mathmlBuilder:(e,t)=>{lS(e);var n=qa(e.body,t);if(e.left!=="."){var r=new Ve.MathNode("mo",[Rs(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if(e.right!=="."){var a=new Ve.MathNode("mo",[Rs(e.right,e.mode)]);a.setAttribute("fence","true"),e.rightColor&&a.setAttribute("mathcolor",e.rightColor),n.push(a)}return Z4(n)}});ut({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=G1(t[0],e);if(!e.parser.leftrightDepth)throw new Ye("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if(e.delim===".")n=of(t,[]);else{n=to.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{var n=e.delim==="\\vert"||e.delim==="|"?Rs("|","text"):Rs(e.delim,e.mode),r=new Ve.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var r3=(e,t)=>{var n=ye.wrapFragment(wn(e.body,t),t),r=e.label.slice(1),a=t.sizeMultiplier,s,o=0,u=kn.isCharacterBox(e.body);if(r==="sout")s=ye.makeSpan(["stretchy","sout"]),s.height=t.fontMetrics().defaultRuleThickness/a,o=-.5*t.fontMetrics().xHeight;else if(r==="phase"){var c=ir({number:.6,unit:"pt"},t),d=ir({number:.35,unit:"ex"},t),m=t.havingBaseSizing();a=a/m.sizeMultiplier;var p=n.height+n.depth+c+d;n.style.paddingLeft=et(p/2+c);var b=Math.floor(1e3*p*a),y=HZ(b),w=new io([new ol("phase",y)],{width:"400em",height:et(b/1e3),viewBox:"0 0 400000 "+b,preserveAspectRatio:"xMinYMin slice"});s=ye.makeSvgSpan(["hide-tail"],[w],t),s.style.height=et(p),o=n.depth+c+d}else{/cancel/.test(r)?u||n.classes.push("cancel-pad"):r==="angl"?n.classes.push("anglpad"):n.classes.push("boxpad");var S=0,k=0,E=0;/box/.test(r)?(E=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),S=t.fontMetrics().fboxsep+(r==="colorbox"?0:E),k=S):r==="angl"?(E=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),S=4*E,k=Math.max(0,.25-n.depth)):(S=u?.2:0,k=S),s=lo.encloseSpan(n,r,S,k,t),/fbox|boxed|fcolorbox/.test(r)?(s.style.borderStyle="solid",s.style.borderWidth=et(E)):r==="angl"&&E!==.049&&(s.style.borderTopWidth=et(E),s.style.borderRightWidth=et(E)),o=n.depth+k,e.backgroundColor&&(s.style.backgroundColor=e.backgroundColor,e.borderColor&&(s.style.borderColor=e.borderColor))}var A;if(e.backgroundColor)A=ye.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:o},{type:"elem",elem:n,shift:0}]},t);else{var _=/cancel|phase/.test(r)?["svg-align"]:[];A=ye.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:s,shift:o,wrapperClasses:_}]},t)}return/cancel/.test(r)&&(A.height=n.height,A.depth=n.depth),/cancel/.test(r)&&!u?ye.makeSpan(["mord","cancel-lap"],[A],t):ye.makeSpan(["mord"],[A],t)},a3=(e,t)=>{var n=0,r=new Ve.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[qn(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),e.label==="\\fcolorbox"){var a=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+a+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};ut({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,n){var{parser:r,funcName:a}=e,s=en(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:r.mode,label:a,backgroundColor:s,body:o}},htmlBuilder:r3,mathmlBuilder:a3});ut({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,n){var{parser:r,funcName:a}=e,s=en(t[0],"color-token").color,o=en(t[1],"color-token").color,u=t[2];return{type:"enclose",mode:r.mode,label:a,backgroundColor:o,borderColor:s,body:u}},htmlBuilder:r3,mathmlBuilder:a3});ut({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}});ut({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,a=t[0];return{type:"enclose",mode:n.mode,label:r,body:a}},htmlBuilder:r3,mathmlBuilder:a3});ut({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var $M={};function Ei(e){for(var{type:t,names:n,props:r,handler:a,htmlBuilder:s,mathmlBuilder:o}=e,u={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},c=0;c<n.length;++c)$M[n[c]]=u;s&&(zp[t]=s),o&&(Bp[t]=o)}var qM={};function V(e,t){qM[e]=t}function uS(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for(n==="\\relax"&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);n==="\\hline"||n==="\\hdashline";)e.consume(),t.push(n==="\\hdashline"),e.consumeSpaces(),n=e.fetch().text;return t}var Y1=e=>{var t=e.parser.settings;if(!t.displayMode)throw new Ye("{"+e.envName+"} can be used only in display mode.")};function s3(e){if(e.indexOf("ed")===-1)return e.indexOf("*")===-1}function gl(e,t,n){var{hskipBeforeAndAfter:r,addJot:a,cols:s,arraystretch:o,colSeparationType:u,autoTag:c,singleRow:d,emptySingleRow:m,maxNumCols:p,leqno:b}=t;if(e.gullet.beginGroup(),d||e.gullet.macros.set("\\cr","\\\\\\relax"),!o){var y=e.gullet.expandMacroAsText("\\arraystretch");if(y==null)o=1;else if(o=parseFloat(y),!o||o<0)throw new Ye("Invalid \\arraystretch: "+y)}e.gullet.beginGroup();var w=[],S=[w],k=[],E=[],A=c!=null?[]:void 0;function _(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function I(){A&&(e.gullet.macros.get("\\df@tag")?(A.push(e.subparse([new ss("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):A.push(!!c&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(_(),E.push(uS(e));;){var P=e.parseExpression(!1,d?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),P={type:"ordgroup",mode:e.mode,body:P},n&&(P={type:"styling",mode:e.mode,style:n,body:[P]}),w.push(P);var O=e.fetch().text;if(O==="&"){if(p&&w.length===p){if(d||u)throw new Ye("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(O==="\\end"){I(),w.length===1&&P.type==="styling"&&P.body[0].body.length===0&&(S.length>1||!m)&&S.pop(),E.length<S.length+1&&E.push([]);break}else if(O==="\\\\"){e.consume();var R=void 0;e.gullet.future().text!==" "&&(R=e.parseSizeGroup(!0)),k.push(R?R.value:null),I(),E.push(uS(e)),w=[],S.push(w),_()}else throw new Ye("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:a,arraystretch:o,body:S,cols:s,rowGaps:k,hskipBeforeAndAfter:r,hLinesBeforeRow:E,colSeparationType:u,tags:A,leqno:b}}function i3(e){return e.slice(0,1)==="d"?"display":"text"}var Si=function(t,n){var r,a,s=t.body.length,o=t.hLinesBeforeRow,u=0,c=new Array(s),d=[],m=Math.max(n.fontMetrics().arrayRuleWidth,n.minRuleThickness),p=1/n.fontMetrics().ptPerEm,b=5*p;if(t.colSeparationType&&t.colSeparationType==="small"){var y=n.havingStyle(It.SCRIPT).sizeMultiplier;b=.2778*(y/n.sizeMultiplier)}var w=t.colSeparationType==="CD"?ir({number:3,unit:"ex"},n):12*p,S=3*p,k=t.arraystretch*w,E=.7*k,A=.3*k,_=0;function I(it){for(var At=0;At<it.length;++At)At>0&&(_+=.25),d.push({pos:_,isDashed:it[At]})}for(I(o[0]),r=0;r<t.body.length;++r){var P=t.body[r],O=E,R=A;u<P.length&&(u=P.length);var z=new Array(P.length);for(a=0;a<P.length;++a){var F=wn(P[a],n);R<F.depth&&(R=F.depth),O<F.height&&(O=F.height),z[a]=F}var U=t.rowGaps[r],X=0;U&&(X=ir(U,n),X>0&&(X+=A,R<X&&(R=X),X=0)),t.addJot&&(R+=S),z.height=O,z.depth=R,_+=O,z.pos=_,_+=R+X,c[r]=z,I(o[r+1])}var W=_/2+n.fontMetrics().axisHeight,le=t.cols||[],se=[],ie,$,K=[];if(t.tags&&t.tags.some(it=>it))for(r=0;r<s;++r){var Z=c[r],re=Z.pos-W,j=t.tags[r],H=void 0;j===!0?H=ye.makeSpan(["eqn-num"],[],n):j===!1?H=ye.makeSpan([],[],n):H=ye.makeSpan([],Or(j,n,!0),n),H.depth=Z.depth,H.height=Z.height,K.push({type:"elem",elem:H,shift:re})}for(a=0,$=0;a<u||$<le.length;++a,++$){for(var G=le[$]||{},L=!0;G.type==="separator";){if(L||(ie=ye.makeSpan(["arraycolsep"],[]),ie.style.width=et(n.fontMetrics().doubleRuleSep),se.push(ie)),G.separator==="|"||G.separator===":"){var ae=G.separator==="|"?"solid":"dashed",oe=ye.makeSpan(["vertical-separator"],[],n);oe.style.height=et(_),oe.style.borderRightWidth=et(m),oe.style.borderRightStyle=ae,oe.style.margin="0 "+et(-m/2);var Se=_-W;Se&&(oe.style.verticalAlign=et(-Se)),se.push(oe)}else throw new Ye("Invalid separator type: "+G.separator);$++,G=le[$]||{},L=!1}if(!(a>=u)){var be=void 0;(a>0||t.hskipBeforeAndAfter)&&(be=kn.deflt(G.pregap,b),be!==0&&(ie=ye.makeSpan(["arraycolsep"],[]),ie.style.width=et(be),se.push(ie)));var fe=[];for(r=0;r<s;++r){var Ne=c[r],at=Ne[a];if(at){var Ce=Ne.pos-W;at.depth=Ne.depth,at.height=Ne.height,fe.push({type:"elem",elem:at,shift:Ce})}}fe=ye.makeVList({positionType:"individualShift",children:fe},n),fe=ye.makeSpan(["col-align-"+(G.align||"c")],[fe]),se.push(fe),(a<u-1||t.hskipBeforeAndAfter)&&(be=kn.deflt(G.postgap,b),be!==0&&(ie=ye.makeSpan(["arraycolsep"],[]),ie.style.width=et(be),se.push(ie)))}}if(c=ye.makeSpan(["mtable"],se),d.length>0){for(var Re=ye.makeLineSpan("hline",n,m),Ee=ye.makeLineSpan("hdashline",n,m),we=[{type:"elem",elem:c,shift:0}];d.length>0;){var Oe=d.pop(),ze=Oe.pos-W;Oe.isDashed?we.push({type:"elem",elem:Ee,shift:ze}):we.push({type:"elem",elem:Re,shift:ze})}c=ye.makeVList({positionType:"individualShift",children:we},n)}if(K.length===0)return ye.makeSpan(["mord"],[c],n);var Ge=ye.makeVList({positionType:"individualShift",children:K},n);return Ge=ye.makeSpan(["tag"],[Ge],n),ye.makeFragment([c,Ge])},XJ={c:"center ",l:"left ",r:"right "},Ci=function(t,n){for(var r=[],a=new Ve.MathNode("mtd",[],["mtr-glue"]),s=new Ve.MathNode("mtd",[],["mml-eqn-num"]),o=0;o<t.body.length;o++){for(var u=t.body[o],c=[],d=0;d<u.length;d++)c.push(new Ve.MathNode("mtd",[qn(u[d],n)]));t.tags&&t.tags[o]&&(c.unshift(a),c.push(a),t.leqno?c.unshift(s):c.push(s)),r.push(new Ve.MathNode("mtr",c))}var m=new Ve.MathNode("mtable",r),p=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);m.setAttribute("rowspacing",et(p));var b="",y="";if(t.cols&&t.cols.length>0){var w=t.cols,S="",k=!1,E=0,A=w.length;w[0].type==="separator"&&(b+="top ",E=1),w[w.length-1].type==="separator"&&(b+="bottom ",A-=1);for(var _=E;_<A;_++)w[_].type==="align"?(y+=XJ[w[_].align],k&&(S+="none "),k=!0):w[_].type==="separator"&&k&&(S+=w[_].separator==="|"?"solid ":"dashed ",k=!1);m.setAttribute("columnalign",y.trim()),/[sd]/.test(S)&&m.setAttribute("columnlines",S.trim())}if(t.colSeparationType==="align"){for(var I=t.cols||[],P="",O=1;O<I.length;O++)P+=O%2?"0em ":"1em ";m.setAttribute("columnspacing",P.trim())}else t.colSeparationType==="alignat"||t.colSeparationType==="gather"?m.setAttribute("columnspacing","0em"):t.colSeparationType==="small"?m.setAttribute("columnspacing","0.2778em"):t.colSeparationType==="CD"?m.setAttribute("columnspacing","0.5em"):m.setAttribute("columnspacing","1em");var R="",z=t.hLinesBeforeRow;b+=z[0].length>0?"left ":"",b+=z[z.length-1].length>0?"right ":"";for(var F=1;F<z.length-1;F++)R+=z[F].length===0?"none ":z[F][0]?"dashed ":"solid ";return/[sd]/.test(R)&&m.setAttribute("rowlines",R.trim()),b!==""&&(m=new Ve.MathNode("menclose",[m]),m.setAttribute("notation",b.trim())),t.arraystretch&&t.arraystretch<1&&(m=new Ve.MathNode("mstyle",[m]),m.setAttribute("scriptlevel","1")),m},VM=function(t,n){t.envName.indexOf("ed")===-1&&Y1(t);var r=[],a=t.envName.indexOf("at")>-1?"alignat":"align",s=t.envName==="split",o=gl(t.parser,{cols:r,addJot:!0,autoTag:s?void 0:s3(t.envName),emptySingleRow:!0,colSeparationType:a,maxNumCols:s?2:void 0,leqno:t.parser.settings.leqno},"display"),u,c=0,d={type:"ordgroup",mode:t.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){for(var m="",p=0;p<n[0].body.length;p++){var b=en(n[0].body[p],"textord");m+=b.text}u=Number(m),c=u*2}var y=!c;o.body.forEach(function(E){for(var A=1;A<E.length;A+=2){var _=en(E[A],"styling"),I=en(_.body[0],"ordgroup");I.body.unshift(d)}if(y)c<E.length&&(c=E.length);else{var P=E.length/2;if(u<P)throw new Ye("Too many math in a row: "+("expected "+u+", but got "+P),E[0])}});for(var w=0;w<c;++w){var S="r",k=0;w%2===1?S="l":w>0&&y&&(k=1),r[w]={type:"align",align:S,pregap:k,postgap:0}}return o.colSeparationType=y?"align":"alignat",o};Ei({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=q1(t[0]),r=n?[t[0]]:en(t[0],"ordgroup").body,a=r.map(function(o){var u=e3(o),c=u.text;if("lcr".indexOf(c)!==-1)return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new Ye("Unknown column alignment: "+c,o)}),s={cols:a,hskipBeforeAndAfter:!0,maxNumCols:a.length};return gl(e.parser,s,i3(e.envName))},htmlBuilder:Si,mathmlBuilder:Ci});Ei({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(e.envName.charAt(e.envName.length-1)==="*"){var a=e.parser;if(a.consumeSpaces(),a.fetch().text==="["){if(a.consume(),a.consumeSpaces(),n=a.fetch().text,"lcr".indexOf(n)===-1)throw new Ye("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),r.cols=[{type:"align",align:n}]}}var s=gl(e.parser,r,i3(e.envName)),o=Math.max(0,...s.body.map(u=>u.length));return s.cols=new Array(o).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[s],left:t[0],right:t[1],rightColor:void 0}:s},htmlBuilder:Si,mathmlBuilder:Ci});Ei({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},n=gl(e.parser,t,"script");return n.colSeparationType="small",n},htmlBuilder:Si,mathmlBuilder:Ci});Ei({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=q1(t[0]),r=n?[t[0]]:en(t[0],"ordgroup").body,a=r.map(function(o){var u=e3(o),c=u.text;if("lc".indexOf(c)!==-1)return{type:"align",align:c};throw new Ye("Unknown column alignment: "+c,o)});if(a.length>1)throw new Ye("{subarray} can contain only one column");var s={cols:a,hskipBeforeAndAfter:!1,arraystretch:.5};if(s=gl(e.parser,s,"script"),s.body.length>0&&s.body[0].length>1)throw new Ye("{subarray} can contain only one column");return s},htmlBuilder:Si,mathmlBuilder:Ci});Ei({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=gl(e.parser,t,i3(e.envName));return{type:"leftright",mode:e.mode,body:[n],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Si,mathmlBuilder:Ci});Ei({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:VM,htmlBuilder:Si,mathmlBuilder:Ci});Ei({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){["gather","gather*"].includes(e.envName)&&Y1(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:s3(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return gl(e.parser,t,"display")},htmlBuilder:Si,mathmlBuilder:Ci});Ei({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:VM,htmlBuilder:Si,mathmlBuilder:Ci});Ei({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Y1(e);var t={autoTag:s3(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return gl(e.parser,t,"display")},htmlBuilder:Si,mathmlBuilder:Ci});Ei({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Y1(e),LJ(e.parser)},htmlBuilder:Si,mathmlBuilder:Ci});V("\\nonumber","\\gdef\\@eqnsw{0}");V("\\notag","\\nonumber");ut({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Ye(e.funcName+" valid only within array environment")}});var cS=$M;ut({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:n,funcName:r}=e,a=t[0];if(a.type!=="ordgroup")throw new Ye("Invalid environment name",a);for(var s="",o=0;o<a.body.length;++o)s+=en(a.body[o],"textord").text;if(r==="\\begin"){if(!cS.hasOwnProperty(s))throw new Ye("No such environment: "+s,a);var u=cS[s],{args:c,optArgs:d}=n.parseArguments("\\begin{"+s+"}",u),m={mode:n.mode,envName:s,parser:n},p=u.handler(m,c,d);n.expect("\\end",!1);var b=n.nextToken,y=en(n.parseFunction(),"environment");if(y.name!==s)throw new Ye("Mismatch: \\begin{"+s+"} matched by \\end{"+y.name+"}",b);return p}return{type:"environment",mode:n.mode,name:s,nameGroup:a}}});var GM=(e,t)=>{var n=e.font,r=t.withFont(n);return wn(e.body,r)},YM=(e,t)=>{var n=e.font,r=t.withFont(n);return qn(e.body,r)},dS={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};ut({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,a=Fp(t[0]),s=r;return s in dS&&(s=dS[s]),{type:"font",mode:n.mode,font:s.slice(1),body:a}},htmlBuilder:GM,mathmlBuilder:YM});ut({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0],a=kn.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:V1(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:a}}});ut({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:a}=e,{mode:s}=n,o=n.parseExpression(!0,a),u="math"+r.slice(1);return{type:"font",mode:s,font:u,body:{type:"ordgroup",mode:n.mode,body:o}}},htmlBuilder:GM,mathmlBuilder:YM});var WM=(e,t)=>{var n=t;return e==="display"?n=n.id>=It.SCRIPT.id?n.text():It.DISPLAY:e==="text"&&n.size===It.DISPLAY.size?n=It.TEXT:e==="script"?n=It.SCRIPT:e==="scriptscript"&&(n=It.SCRIPTSCRIPT),n},o3=(e,t)=>{var n=WM(e.size,t.style),r=n.fracNum(),a=n.fracDen(),s;s=t.havingStyle(r);var o=wn(e.numer,s,t);if(e.continued){var u=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height<u?u:o.height,o.depth=o.depth<c?c:o.depth}s=t.havingStyle(a);var d=wn(e.denom,s,t),m,p,b;e.hasBarLine?(e.barSize?(p=ir(e.barSize,t),m=ye.makeLineSpan("frac-line",t,p)):m=ye.makeLineSpan("frac-line",t),p=m.height,b=m.height):(m=null,p=0,b=t.fontMetrics().defaultRuleThickness);var y,w,S;n.size===It.DISPLAY.size||e.size==="display"?(y=t.fontMetrics().num1,p>0?w=3*b:w=7*b,S=t.fontMetrics().denom1):(p>0?(y=t.fontMetrics().num2,w=b):(y=t.fontMetrics().num3,w=3*b),S=t.fontMetrics().denom2);var k;if(m){var A=t.fontMetrics().axisHeight;y-o.depth-(A+.5*p)<w&&(y+=w-(y-o.depth-(A+.5*p))),A-.5*p-(d.height-S)<w&&(S+=w-(A-.5*p-(d.height-S)));var _=-(A-.5*p);k=ye.makeVList({positionType:"individualShift",children:[{type:"elem",elem:d,shift:S},{type:"elem",elem:m,shift:_},{type:"elem",elem:o,shift:-y}]},t)}else{var E=y-o.depth-(d.height-S);E<w&&(y+=.5*(w-E),S+=.5*(w-E)),k=ye.makeVList({positionType:"individualShift",children:[{type:"elem",elem:d,shift:S},{type:"elem",elem:o,shift:-y}]},t)}s=t.havingStyle(n),k.height*=s.sizeMultiplier/t.sizeMultiplier,k.depth*=s.sizeMultiplier/t.sizeMultiplier;var I;n.size===It.DISPLAY.size?I=t.fontMetrics().delim1:n.size===It.SCRIPTSCRIPT.size?I=t.havingStyle(It.SCRIPT).fontMetrics().delim2:I=t.fontMetrics().delim2;var P,O;return e.leftDelim==null?P=of(t,["mopen"]):P=to.customSizedDelim(e.leftDelim,I,!0,t.havingStyle(n),e.mode,["mopen"]),e.continued?O=ye.makeSpan([]):e.rightDelim==null?O=of(t,["mclose"]):O=to.customSizedDelim(e.rightDelim,I,!0,t.havingStyle(n),e.mode,["mclose"]),ye.makeSpan(["mord"].concat(s.sizingClasses(t)),[P,ye.makeSpan(["mfrac"],[k]),O],t)},l3=(e,t)=>{var n=new Ve.MathNode("mfrac",[qn(e.numer,t),qn(e.denom,t)]);if(!e.hasBarLine)n.setAttribute("linethickness","0px");else if(e.barSize){var r=ir(e.barSize,t);n.setAttribute("linethickness",et(r))}var a=WM(e.size,t.style);if(a.size!==t.style.size){n=new Ve.MathNode("mstyle",[n]);var s=a.size===It.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",s),n.setAttribute("scriptlevel","0")}if(e.leftDelim!=null||e.rightDelim!=null){var o=[];if(e.leftDelim!=null){var u=new Ve.MathNode("mo",[new Ve.TextNode(e.leftDelim.replace("\\",""))]);u.setAttribute("fence","true"),o.push(u)}if(o.push(n),e.rightDelim!=null){var c=new Ve.MathNode("mo",[new Ve.TextNode(e.rightDelim.replace("\\",""))]);c.setAttribute("fence","true"),o.push(c)}return Z4(o)}return n};ut({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0],s=t[1],o,u=null,c=null,d="auto";switch(r){case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,u="(",c=")";break;case"\\\\bracefrac":o=!1,u="\\{",c="\\}";break;case"\\\\brackfrac":o=!1,u="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}switch(r){case"\\dfrac":case"\\dbinom":d="display";break;case"\\tfrac":case"\\tbinom":d="text";break}return{type:"genfrac",mode:n.mode,continued:!1,numer:a,denom:s,hasBarLine:o,leftDelim:u,rightDelim:c,size:d,barSize:null}},htmlBuilder:o3,mathmlBuilder:l3});ut({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0],s=t[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:a,denom:s,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});ut({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,a;switch(n){case"\\over":a="\\frac";break;case"\\choose":a="\\binom";break;case"\\atop":a="\\\\atopfrac";break;case"\\brace":a="\\\\bracefrac";break;case"\\brack":a="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:a,token:r}}});var fS=["display","text","script","scriptscript"],hS=function(t){var n=null;return t.length>0&&(n=t,n=n==="."?null:n),n};ut({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:n}=e,r=t[4],a=t[5],s=Fp(t[0]),o=s.type==="atom"&&s.family==="open"?hS(s.text):null,u=Fp(t[1]),c=u.type==="atom"&&u.family==="close"?hS(u.text):null,d=en(t[2],"size"),m,p=null;d.isBlank?m=!0:(p=d.value,m=p.number>0);var b="auto",y=t[3];if(y.type==="ordgroup"){if(y.body.length>0){var w=en(y.body[0],"textord");b=fS[Number(w.text)]}}else y=en(y,"textord"),b=fS[Number(y.text)];return{type:"genfrac",mode:n.mode,numer:r,denom:a,continued:!1,hasBarLine:m,barSize:p,leftDelim:o,rightDelim:c,size:b}},htmlBuilder:o3,mathmlBuilder:l3});ut({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:n,funcName:r,token:a}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:en(t[0],"size").value,token:a}}});ut({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0],s=kZ(en(t[1],"infix").size),o=t[2],u=s.number>0;return{type:"genfrac",mode:n.mode,numer:a,denom:o,continued:!1,hasBarLine:u,barSize:s,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:o3,mathmlBuilder:l3});var XM=(e,t)=>{var n=t.style,r,a;e.type==="supsub"?(r=e.sup?wn(e.sup,t.havingStyle(n.sup()),t):wn(e.sub,t.havingStyle(n.sub()),t),a=en(e.base,"horizBrace")):a=en(e,"horizBrace");var s=wn(a.base,t.havingBaseStyle(It.DISPLAY)),o=lo.svgSpan(a,t),u;if(a.isOver?(u=ye.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},t),u.children[0].children[0].children[1].classes.push("svg-align")):(u=ye.makeVList({positionType:"bottom",positionData:s.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},t),u.children[0].children[0].children[0].classes.push("svg-align")),r){var c=ye.makeSpan(["mord",a.isOver?"mover":"munder"],[u],t);a.isOver?u=ye.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:r}]},t):u=ye.makeVList({positionType:"bottom",positionData:c.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:c}]},t)}return ye.makeSpan(["mord",a.isOver?"mover":"munder"],[u],t)},KJ=(e,t)=>{var n=lo.mathMLnode(e.label);return new Ve.MathNode(e.isOver?"mover":"munder",[qn(e.base,t),n])};ut({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:XM,mathmlBuilder:KJ});ut({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],a=en(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:n.mode,href:a,body:xr(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=Or(e.body,t,!1);return ye.makeAnchor(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=ll(e.body,t);return n instanceof ts||(n=new ts("mrow",[n])),n.setAttribute("href",e.href),n}});ut({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=en(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var a=[],s=0;s<r.length;s++){var o=r[s];o==="~"&&(o="\\textasciitilde"),a.push({type:"textord",mode:"text",text:o})}var u={type:"text",mode:n.mode,font:"\\texttt",body:a};return{type:"href",mode:n.mode,href:r,body:xr(u)}}});ut({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:"hbox",mode:n.mode,body:xr(t[0])}},htmlBuilder(e,t){var n=Or(e.body,t,!1);return ye.makeFragment(n)},mathmlBuilder(e,t){return new Ve.MathNode("mrow",qa(e.body,t))}});ut({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,token:a}=e,s=en(t[0],"raw").string,o=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var u,c={};switch(r){case"\\htmlClass":c.class=s,u={command:"\\htmlClass",class:s};break;case"\\htmlId":c.id=s,u={command:"\\htmlId",id:s};break;case"\\htmlStyle":c.style=s,u={command:"\\htmlStyle",style:s};break;case"\\htmlData":{for(var d=s.split(","),m=0;m<d.length;m++){var p=d[m],b=p.indexOf("=");if(b<0)throw new Ye("\\htmlData key/value '"+p+"' missing equals sign");var y=p.slice(0,b),w=p.slice(b+1);c["data-"+y.trim()]=w}u={command:"\\htmlData",attributes:c};break}default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(u)?{type:"html",mode:n.mode,attributes:c,body:xr(o)}:n.formatUnsupportedCmd(r)},htmlBuilder:(e,t)=>{var n=Or(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var a=ye.makeSpan(r,n,t);for(var s in e.attributes)s!=="class"&&e.attributes.hasOwnProperty(s)&&a.setAttribute(s,e.attributes[s]);return a},mathmlBuilder:(e,t)=>ll(e.body,t)});ut({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:xr(t[0]),mathml:xr(t[1])}},htmlBuilder:(e,t)=>{var n=Or(e.html,t,!1);return ye.makeFragment(n)},mathmlBuilder:(e,t)=>ll(e.mathml,t)});var ix=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!n)throw new Ye("Invalid size: '"+t+"' in \\includegraphics");var r={number:+(n[1]+n[2]),unit:n[3]};if(!mM(r))throw new Ye("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};ut({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,a={number:0,unit:"em"},s={number:.9,unit:"em"},o={number:0,unit:"em"},u="";if(n[0])for(var c=en(n[0],"raw").string,d=c.split(","),m=0;m<d.length;m++){var p=d[m].split("=");if(p.length===2){var b=p[1].trim();switch(p[0].trim()){case"alt":u=b;break;case"width":a=ix(b);break;case"height":s=ix(b);break;case"totalheight":o=ix(b);break;default:throw new Ye("Invalid key: '"+p[0]+"' in \\includegraphics.")}}}var y=en(t[0],"url").url;return u===""&&(u=y,u=u.replace(/^.*[\\/]/,""),u=u.substring(0,u.lastIndexOf("."))),r.settings.isTrusted({command:"\\includegraphics",url:y})?{type:"includegraphics",mode:r.mode,alt:u,width:a,height:s,totalheight:o,src:y}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var n=ir(e.height,t),r=0;e.totalheight.number>0&&(r=ir(e.totalheight,t)-n);var a=0;e.width.number>0&&(a=ir(e.width,t));var s={height:et(n+r)};a>0&&(s.width=et(a)),r>0&&(s.verticalAlign=et(-r));var o=new KZ(e.src,e.alt,s);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new Ve.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);var r=ir(e.height,t),a=0;if(e.totalheight.number>0&&(a=ir(e.totalheight,t)-r,n.setAttribute("valign",et(-a))),n.setAttribute("height",et(r+a)),e.width.number>0){var s=ir(e.width,t);n.setAttribute("width",et(s))}return n.setAttribute("src",e.src),n}});ut({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,a=en(t[0],"size");if(n.settings.strict){var s=r[1]==="m",o=a.value.unit==="mu";s?(o||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+a.value.unit+" units")),n.mode!=="math"&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):o&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:a.value}},htmlBuilder(e,t){return ye.makeGlue(e.dimension,t)},mathmlBuilder(e,t){var n=ir(e.dimension,t);return new Ve.SpaceNode(n)}});ut({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:a}},htmlBuilder:(e,t)=>{var n;e.alignment==="clap"?(n=ye.makeSpan([],[wn(e.body,t)]),n=ye.makeSpan(["inner"],[n],t)):n=ye.makeSpan(["inner"],[wn(e.body,t)]);var r=ye.makeSpan(["fix"],[]),a=ye.makeSpan([e.alignment],[n,r],t),s=ye.makeSpan(["strut"]);return s.style.height=et(a.height+a.depth),a.depth&&(s.style.verticalAlign=et(-a.depth)),a.children.unshift(s),a=ye.makeSpan(["thinbox"],[a],t),ye.makeSpan(["mord","vbox"],[a],t)},mathmlBuilder:(e,t)=>{var n=new Ve.MathNode("mpadded",[qn(e.body,t)]);if(e.alignment!=="rlap"){var r=e.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}});ut({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,a=r.mode;r.switchMode("math");var s=n==="\\("?"\\)":"$",o=r.parseExpression(!1,s);return r.expect(s),r.switchMode(a),{type:"styling",mode:r.mode,style:"text",body:o}}});ut({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Ye("Mismatched "+e.funcName)}});var mS=(e,t)=>{switch(t.style.size){case It.DISPLAY.size:return e.display;case It.TEXT.size:return e.text;case It.SCRIPT.size:return e.script;case It.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};ut({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:xr(t[0]),text:xr(t[1]),script:xr(t[2]),scriptscript:xr(t[3])}},htmlBuilder:(e,t)=>{var n=mS(e,t),r=Or(n,t,!1);return ye.makeFragment(r)},mathmlBuilder:(e,t)=>{var n=mS(e,t);return ll(n,t)}});var KM=(e,t,n,r,a,s,o)=>{e=ye.makeSpan([],[e]);var u=n&&kn.isCharacterBox(n),c,d;if(t){var m=wn(t,r.havingStyle(a.sup()),r);d={elem:m,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-m.depth)}}if(n){var p=wn(n,r.havingStyle(a.sub()),r);c={elem:p,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-p.height)}}var b;if(d&&c){var y=r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o;b=ye.makeVList({positionType:"bottom",positionData:y,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:et(-s)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:d.kern},{type:"elem",elem:d.elem,marginLeft:et(s)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(c){var w=e.height-o;b=ye.makeVList({positionType:"top",positionData:w,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:et(-s)},{type:"kern",size:c.kern},{type:"elem",elem:e}]},r)}else if(d){var S=e.depth+o;b=ye.makeVList({positionType:"bottom",positionData:S,children:[{type:"elem",elem:e},{type:"kern",size:d.kern},{type:"elem",elem:d.elem,marginLeft:et(s)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else return e;var k=[b];if(c&&s!==0&&!u){var E=ye.makeSpan(["mspace"],[],r);E.style.marginRight=et(s),k.unshift(E)}return ye.makeSpan(["mop","op-limits"],k,r)},QM=["\\smallint"],s0=(e,t)=>{var n,r,a=!1,s;e.type==="supsub"?(n=e.sup,r=e.sub,s=en(e.base,"op"),a=!0):s=en(e,"op");var o=t.style,u=!1;o.size===It.DISPLAY.size&&s.symbol&&!QM.includes(s.name)&&(u=!0);var c;if(s.symbol){var d=u?"Size2-Regular":"Size1-Regular",m="";if((s.name==="\\oiint"||s.name==="\\oiiint")&&(m=s.name.slice(1),s.name=m==="oiint"?"\\iint":"\\iiint"),c=ye.makeSymbol(s.name,d,"math",t,["mop","op-symbol",u?"large-op":"small-op"]),m.length>0){var p=c.italic,b=ye.staticSvg(m+"Size"+(u?"2":"1"),t);c=ye.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:b,shift:u?.08:0}]},t),s.name="\\"+m,c.classes.unshift("mop"),c.italic=p}}else if(s.body){var y=Or(s.body,t,!0);y.length===1&&y[0]instanceof _s?(c=y[0],c.classes[0]="mop"):c=ye.makeSpan(["mop"],y,t)}else{for(var w=[],S=1;S<s.name.length;S++)w.push(ye.mathsym(s.name[S],s.mode,t));c=ye.makeSpan(["mop"],w,t)}var k=0,E=0;return(c instanceof _s||s.name==="\\oiint"||s.name==="\\oiiint")&&!s.suppressBaseShift&&(k=(c.height-c.depth)/2-t.fontMetrics().axisHeight,E=c.italic),a?KM(c,n,r,t,o,E,k):(k&&(c.style.position="relative",c.style.top=et(k)),c)},Uf=(e,t)=>{var n;if(e.symbol)n=new ts("mo",[Rs(e.name,e.mode)]),QM.includes(e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new ts("mo",qa(e.body,t));else{n=new ts("mi",[new mi(e.name.slice(1))]);var r=new ts("mo",[Rs("","text")]);e.parentIsSupSub?n=new ts("mrow",[n,r]):n=CM([n,r])}return n},QJ={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};ut({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,a=r;return a.length===1&&(a=QJ[a]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:s0,mathmlBuilder:Uf});ut({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:xr(r)}},htmlBuilder:s0,mathmlBuilder:Uf});var ZJ={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};ut({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:s0,mathmlBuilder:Uf});ut({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:s0,mathmlBuilder:Uf});ut({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=ZJ[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:s0,mathmlBuilder:Uf});var ZM=(e,t)=>{var n,r,a=!1,s;e.type==="supsub"?(n=e.sup,r=e.sub,s=en(e.base,"operatorname"),a=!0):s=en(e,"operatorname");var o;if(s.body.length>0){for(var u=s.body.map(p=>{var b=p.text;return typeof b=="string"?{type:"textord",mode:p.mode,text:b}:p}),c=Or(u,t.withFont("mathrm"),!0),d=0;d<c.length;d++){var m=c[d];m instanceof _s&&(m.text=m.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}o=ye.makeSpan(["mop"],c,t)}else o=ye.makeSpan(["mop"],[],t);return a?KM(o,n,r,t,t.style,0,0):o},JJ=(e,t)=>{for(var n=qa(e.body,t.withFont("mathrm")),r=!0,a=0;a<n.length;a++){var s=n[a];if(!(s instanceof Ve.SpaceNode))if(s instanceof Ve.MathNode)switch(s.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var o=s.children[0];s.children.length===1&&o instanceof Ve.TextNode?o.text=o.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break}default:r=!1}else r=!1}if(r){var u=n.map(m=>m.toText()).join("");n=[new Ve.TextNode(u)]}var c=new Ve.MathNode("mi",n);c.setAttribute("mathvariant","normal");var d=new Ve.MathNode("mo",[Rs("","text")]);return e.parentIsSupSub?new Ve.MathNode("mrow",[c,d]):Ve.newDocumentFragment([c,d])};ut({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0];return{type:"operatorname",mode:n.mode,body:xr(a),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:ZM,mathmlBuilder:JJ});V("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");bu({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?ye.makeFragment(Or(e.body,t,!1)):ye.makeSpan(["mord"],Or(e.body,t,!0),t)},mathmlBuilder(e,t){return ll(e.body,t,!0)}});ut({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=wn(e.body,t.havingCrampedStyle()),r=ye.makeLineSpan("overline-line",t),a=t.fontMetrics().defaultRuleThickness,s=ye.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r},{type:"kern",size:a}]},t);return ye.makeSpan(["mord","overline"],[s],t)},mathmlBuilder(e,t){var n=new Ve.MathNode("mo",[new Ve.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new Ve.MathNode("mover",[qn(e.body,t),n]);return r.setAttribute("accent","true"),r}});ut({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"phantom",mode:n.mode,body:xr(r)}},htmlBuilder:(e,t)=>{var n=Or(e.body,t.withPhantom(),!1);return ye.makeFragment(n)},mathmlBuilder:(e,t)=>{var n=qa(e.body,t);return new Ve.MathNode("mphantom",n)}});ut({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=ye.makeSpan([],[wn(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r<n.children.length;r++)n.children[r].height=0,n.children[r].depth=0;return n=ye.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t),ye.makeSpan(["mord"],[n],t)},mathmlBuilder:(e,t)=>{var n=qa(xr(e.body),t),r=new Ve.MathNode("mphantom",n),a=new Ve.MathNode("mpadded",[r]);return a.setAttribute("height","0px"),a.setAttribute("depth","0px"),a}});ut({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=ye.makeSpan(["inner"],[wn(e.body,t.withPhantom())]),r=ye.makeSpan(["fix"],[]);return ye.makeSpan(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=qa(xr(e.body),t),r=new Ve.MathNode("mphantom",n),a=new Ve.MathNode("mpadded",[r]);return a.setAttribute("width","0px"),a}});ut({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,r=en(t[0],"size").value,a=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:a}},htmlBuilder(e,t){var n=wn(e.body,t),r=ir(e.dy,t);return ye.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){var n=new Ve.MathNode("mpadded",[qn(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}});ut({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});ut({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,n){var{parser:r}=e,a=n[0],s=en(t[0],"size"),o=en(t[1],"size");return{type:"rule",mode:r.mode,shift:a&&en(a,"size").value,width:s.value,height:o.value}},htmlBuilder(e,t){var n=ye.makeSpan(["mord","rule"],[],t),r=ir(e.width,t),a=ir(e.height,t),s=e.shift?ir(e.shift,t):0;return n.style.borderRightWidth=et(r),n.style.borderTopWidth=et(a),n.style.bottom=et(s),n.width=r,n.height=a+s,n.depth=-s,n.maxFontSize=a*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=ir(e.width,t),r=ir(e.height,t),a=e.shift?ir(e.shift,t):0,s=t.color&&t.getColor()||"black",o=new Ve.MathNode("mspace");o.setAttribute("mathbackground",s),o.setAttribute("width",et(n)),o.setAttribute("height",et(r));var u=new Ve.MathNode("mpadded",[o]);return a>=0?u.setAttribute("height",et(a)):(u.setAttribute("height",et(a)),u.setAttribute("depth",et(-a))),u.setAttribute("voffset",et(a)),u}});function JM(e,t,n){for(var r=Or(e,t,!1),a=t.sizeMultiplier/n.sizeMultiplier,s=0;s<r.length;s++){var o=r[s].classes.indexOf("sizing");o<0?Array.prototype.push.apply(r[s].classes,t.sizingClasses(n)):r[s].classes[o+1]==="reset-size"+t.size&&(r[s].classes[o+1]="reset-size"+n.size),r[s].height*=a,r[s].depth*=a}return ye.makeFragment(r)}var pS=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],eee=(e,t)=>{var n=t.havingSize(e.size);return JM(e.body,n,t)};ut({type:"sizing",names:pS,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:a}=e,s=a.parseExpression(!1,n);return{type:"sizing",mode:a.mode,size:pS.indexOf(r)+1,body:s}},htmlBuilder:eee,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=qa(e.body,n),a=new Ve.MathNode("mstyle",r);return a.setAttribute("mathsize",et(n.sizeMultiplier)),a}});ut({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,a=!1,s=!1,o=n[0]&&en(n[0],"ordgroup");if(o)for(var u="",c=0;c<o.body.length;++c){var d=o.body[c];if(u=d.text,u==="t")a=!0;else if(u==="b")s=!0;else{a=!1,s=!1;break}}else a=!0,s=!0;var m=t[0];return{type:"smash",mode:r.mode,body:m,smashHeight:a,smashDepth:s}},htmlBuilder:(e,t)=>{var n=ye.makeSpan([],[wn(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(var r=0;r<n.children.length;r++)n.children[r].height=0;if(e.smashDepth&&(n.depth=0,n.children))for(var a=0;a<n.children.length;a++)n.children[a].depth=0;var s=ye.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t);return ye.makeSpan(["mord"],[s],t)},mathmlBuilder:(e,t)=>{var n=new Ve.MathNode("mpadded",[qn(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}});ut({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,a=n[0],s=t[0];return{type:"sqrt",mode:r.mode,body:s,index:a}},htmlBuilder(e,t){var n=wn(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=ye.wrapFragment(n,t);var r=t.fontMetrics(),a=r.defaultRuleThickness,s=a;t.style.id<It.TEXT.id&&(s=t.fontMetrics().xHeight);var o=a+s/4,u=n.height+n.depth+o+a,{span:c,ruleWidth:d,advanceWidth:m}=to.sqrtImage(u,t),p=c.height-d;p>n.height+n.depth+o&&(o=(o+p-n.height-n.depth)/2);var b=c.height-n.height-o-d;n.style.paddingLeft=et(m);var y=ye.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+b)},{type:"elem",elem:c},{type:"kern",size:d}]},t);if(e.index){var w=t.havingStyle(It.SCRIPTSCRIPT),S=wn(e.index,w,t),k=.6*(y.height-y.depth),E=ye.makeVList({positionType:"shift",positionData:-k,children:[{type:"elem",elem:S}]},t),A=ye.makeSpan(["root"],[E]);return ye.makeSpan(["mord","sqrt"],[A,y],t)}else return ye.makeSpan(["mord","sqrt"],[y],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new Ve.MathNode("mroot",[qn(n,t),qn(r,t)]):new Ve.MathNode("msqrt",[qn(n,t)])}});var gS={display:It.DISPLAY,text:It.TEXT,script:It.SCRIPT,scriptscript:It.SCRIPTSCRIPT};ut({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:a}=e,s=a.parseExpression(!0,n),o=r.slice(1,r.length-5);return{type:"styling",mode:a.mode,style:o,body:s}},htmlBuilder(e,t){var n=gS[e.style],r=t.havingStyle(n).withFont("");return JM(e.body,r,t)},mathmlBuilder(e,t){var n=gS[e.style],r=t.havingStyle(n),a=qa(e.body,r),s=new Ve.MathNode("mstyle",a),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},u=o[e.style];return s.setAttribute("scriptlevel",u[0]),s.setAttribute("displaystyle",u[1]),s}});var tee=function(t,n){var r=t.base;if(r)if(r.type==="op"){var a=r.limits&&(n.style.size===It.DISPLAY.size||r.alwaysHandleSupSub);return a?s0:null}else if(r.type==="operatorname"){var s=r.alwaysHandleSupSub&&(n.style.size===It.DISPLAY.size||r.limits);return s?ZM:null}else{if(r.type==="accent")return kn.isCharacterBox(r.base)?t3:null;if(r.type==="horizBrace"){var o=!t.sub;return o===r.isOver?XM:null}else return null}else return null};bu({type:"supsub",htmlBuilder(e,t){var n=tee(e,t);if(n)return n(e,t);var{base:r,sup:a,sub:s}=e,o=wn(r,t),u,c,d=t.fontMetrics(),m=0,p=0,b=r&&kn.isCharacterBox(r);if(a){var y=t.havingStyle(t.style.sup());u=wn(a,y,t),b||(m=o.height-y.fontMetrics().supDrop*y.sizeMultiplier/t.sizeMultiplier)}if(s){var w=t.havingStyle(t.style.sub());c=wn(s,w,t),b||(p=o.depth+w.fontMetrics().subDrop*w.sizeMultiplier/t.sizeMultiplier)}var S;t.style===It.DISPLAY?S=d.sup1:t.style.cramped?S=d.sup3:S=d.sup2;var k=t.sizeMultiplier,E=et(.5/d.ptPerEm/k),A=null;if(c){var _=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");(o instanceof _s||_)&&(A=et(-o.italic))}var I;if(u&&c){m=Math.max(m,S,u.depth+.25*d.xHeight),p=Math.max(p,d.sub2);var P=d.defaultRuleThickness,O=4*P;if(m-u.depth-(c.height-p)<O){p=O-(m-u.depth)+c.height;var R=.8*d.xHeight-(m-u.depth);R>0&&(m+=R,p-=R)}var z=[{type:"elem",elem:c,shift:p,marginRight:E,marginLeft:A},{type:"elem",elem:u,shift:-m,marginRight:E}];I=ye.makeVList({positionType:"individualShift",children:z},t)}else if(c){p=Math.max(p,d.sub1,c.height-.8*d.xHeight);var F=[{type:"elem",elem:c,marginLeft:A,marginRight:E}];I=ye.makeVList({positionType:"shift",positionData:p,children:F},t)}else if(u)m=Math.max(m,S,u.depth+.25*d.xHeight),I=ye.makeVList({positionType:"shift",positionData:-m,children:[{type:"elem",elem:u,marginRight:E}]},t);else throw new Error("supsub must have either sup or sub.");var U=Oy(o,"right")||"mord";return ye.makeSpan([U],[o,ye.makeSpan(["msupsub"],[I])],t)},mathmlBuilder(e,t){var n=!1,r,a;e.base&&e.base.type==="horizBrace"&&(a=!!e.sup,a===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var s=[qn(e.base,t)];e.sub&&s.push(qn(e.sub,t)),e.sup&&s.push(qn(e.sup,t));var o;if(n)o=r?"mover":"munder";else if(e.sub)if(e.sup){var d=e.base;d&&d.type==="op"&&d.limits&&t.style===It.DISPLAY||d&&d.type==="operatorname"&&d.alwaysHandleSupSub&&(t.style===It.DISPLAY||d.limits)?o="munderover":o="msubsup"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(t.style===It.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||t.style===It.DISPLAY)?o="munder":o="msub"}else{var u=e.base;u&&u.type==="op"&&u.limits&&(t.style===It.DISPLAY||u.alwaysHandleSupSub)||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(u.limits||t.style===It.DISPLAY)?o="mover":o="msup"}return new Ve.MathNode(o,s)}});bu({type:"atom",htmlBuilder(e,t){return ye.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new Ve.MathNode("mo",[Rs(e.text,e.mode)]);if(e.family==="bin"){var r=J4(e,t);r==="bold-italic"&&n.setAttribute("mathvariant",r)}else e.family==="punct"?n.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&n.setAttribute("stretchy","false");return n}});var eD={mi:"italic",mn:"normal",mtext:"normal"};bu({type:"mathord",htmlBuilder(e,t){return ye.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var n=new Ve.MathNode("mi",[Rs(e.text,e.mode,t)]),r=J4(e,t)||"italic";return r!==eD[n.type]&&n.setAttribute("mathvariant",r),n}});bu({type:"textord",htmlBuilder(e,t){return ye.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var n=Rs(e.text,e.mode,t),r=J4(e,t)||"normal",a;return e.mode==="text"?a=new Ve.MathNode("mtext",[n]):/[0-9]/.test(e.text)?a=new Ve.MathNode("mn",[n]):e.text==="\\prime"?a=new Ve.MathNode("mo",[n]):a=new Ve.MathNode("mi",[n]),r!==eD[a.type]&&a.setAttribute("mathvariant",r),a}});var ox={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},lx={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};bu({type:"spacing",htmlBuilder(e,t){if(lx.hasOwnProperty(e.text)){var n=lx[e.text].className||"";if(e.mode==="text"){var r=ye.makeOrd(e,t,"textord");return r.classes.push(n),r}else return ye.makeSpan(["mspace",n],[ye.mathsym(e.text,e.mode,t)],t)}else{if(ox.hasOwnProperty(e.text))return ye.makeSpan(["mspace",ox[e.text]],[],t);throw new Ye('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var n;if(lx.hasOwnProperty(e.text))n=new Ve.MathNode("mtext",[new Ve.TextNode(" ")]);else{if(ox.hasOwnProperty(e.text))return new Ve.MathNode("mspace");throw new Ye('Unknown type of space "'+e.text+'"')}return n}});var bS=()=>{var e=new Ve.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};bu({type:"tag",mathmlBuilder(e,t){var n=new Ve.MathNode("mtable",[new Ve.MathNode("mtr",[bS(),new Ve.MathNode("mtd",[ll(e.body,t)]),bS(),new Ve.MathNode("mtd",[ll(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var xS={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},yS={"\\textbf":"textbf","\\textmd":"textmd"},nee={"\\textit":"textit","\\textup":"textup"},vS=(e,t)=>{var n=e.font;if(n){if(xS[n])return t.withTextFontFamily(xS[n]);if(yS[n])return t.withTextFontWeight(yS[n]);if(n==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(nee[n])};ut({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,a=t[0];return{type:"text",mode:n.mode,body:xr(a),font:r}},htmlBuilder(e,t){var n=vS(e,t),r=Or(e.body,n,!0);return ye.makeSpan(["mord","text"],r,n)},mathmlBuilder(e,t){var n=vS(e,t);return ll(e.body,n)}});ut({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=wn(e.body,t),r=ye.makeLineSpan("underline-line",t),a=t.fontMetrics().defaultRuleThickness,s=ye.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:a},{type:"elem",elem:r},{type:"kern",size:3*a},{type:"elem",elem:n}]},t);return ye.makeSpan(["mord","underline"],[s],t)},mathmlBuilder(e,t){var n=new Ve.MathNode("mo",[new Ve.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new Ve.MathNode("munder",[qn(e.body,t),n]);return r.setAttribute("accentunder","true"),r}});ut({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=wn(e.body,t),r=t.fontMetrics().axisHeight,a=.5*(n.height-r-(n.depth+r));return ye.makeVList({positionType:"shift",positionData:a,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){return new Ve.MathNode("mpadded",[qn(e.body,t)],["vcenter"])}});ut({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new Ye("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=wS(e),r=[],a=t.havingStyle(t.style.text()),s=0;s<n.length;s++){var o=n[s];o==="~"&&(o="\\textasciitilde"),r.push(ye.makeSymbol(o,"Typewriter-Regular",e.mode,a,["mord","texttt"]))}return ye.makeSpan(["mord","text"].concat(a.sizingClasses(t)),ye.tryCombineChars(r),a)},mathmlBuilder(e,t){var n=new Ve.TextNode(wS(e)),r=new Ve.MathNode("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var wS=e=>e.body.replace(/ /g,e.star?"␣":" "),Qo=EM,tD=`[ \r
|
|
326
|
+
]`,ree="\\\\[a-zA-Z@]+",aee="\\\\[^\uD800-\uDFFF]",see="("+ree+")"+tD+"*",iee=`\\\\(
|
|
327
|
+
|[ \r ]+
|
|
328
|
+
?)[ \r ]*`,zy="[̀-ͯ]",oee=new RegExp(zy+"+$"),lee="("+tD+"+)|"+(iee+"|")+"([!-\\[\\]-‧-豈-]"+(zy+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(zy+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+see)+("|"+aee+")");class TS{constructor(t,n){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=n,this.tokenRegex=new RegExp(lee,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,n){this.catcodes[t]=n}lex(){var t=this.input,n=this.tokenRegex.lastIndex;if(n===t.length)return new ss("EOF",new Pa(this,n,n));var r=this.tokenRegex.exec(t);if(r===null||r.index!==n)throw new Ye("Unexpected character: '"+t[n]+"'",new ss(t[n],new Pa(this,n,n+1)));var a=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[a]===14){var s=t.indexOf(`
|
|
329
|
+
`,this.tokenRegex.lastIndex);return s===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new ss(a,new Pa(this,n,this.tokenRegex.lastIndex))}}class uee{constructor(t,n){t===void 0&&(t={}),n===void 0&&(n={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=n,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Ye("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var n in t)t.hasOwnProperty(n)&&(t[n]==null?delete this.current[n]:this.current[n]=t[n])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,n,r){if(r===void 0&&(r=!1),r){for(var a=0;a<this.undefStack.length;a++)delete this.undefStack[a][t];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][t]=n)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(t)&&(s[t]=this.current[t])}n==null?delete this.current[t]:this.current[t]=n}}var cee=qM;V("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});V("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});V("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});V("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});V("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});V("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");V("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var ES={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};V("\\char",function(e){var t=e.popToken(),n,r="";if(t.text==="'")n=8,t=e.popToken();else if(t.text==='"')n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")r=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new Ye("\\char` missing argument");r=t.text.charCodeAt(0)}else n=10;if(n){if(r=ES[t.text],r==null||r>=n)throw new Ye("Invalid base-"+n+" digit "+t.text);for(var a;(a=ES[e.future().text])!=null&&a<n;)r*=n,r+=a,e.popToken()}return"\\@char{"+r+"}"});var u3=(e,t,n,r)=>{var a=e.consumeArg().tokens;if(a.length!==1)throw new Ye("\\newcommand's first argument must be a macro name");var s=a[0].text,o=e.isDefined(s);if(o&&!t)throw new Ye("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!o&&!n)throw new Ye("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var u=0;if(a=e.consumeArg().tokens,a.length===1&&a[0].text==="["){for(var c="",d=e.expandNextToken();d.text!=="]"&&d.text!=="EOF";)c+=d.text,d=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new Ye("Invalid number of arguments: "+c);u=parseInt(c),a=e.consumeArg().tokens}return o&&r||e.macros.set(s,{tokens:a,numArgs:u}),""};V("\\newcommand",e=>u3(e,!1,!0,!1));V("\\renewcommand",e=>u3(e,!0,!1,!1));V("\\providecommand",e=>u3(e,!0,!0,!0));V("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(n=>n.text).join("")),""});V("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(n=>n.text).join("")),""});V("\\show",e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),Qo[n],Gn.math[n],Gn.text[n]),""});V("\\bgroup","{");V("\\egroup","}");V("~","\\nobreakspace");V("\\lq","`");V("\\rq","'");V("\\aa","\\r a");V("\\AA","\\r A");V("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");V("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");V("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");V("ℬ","\\mathscr{B}");V("ℰ","\\mathscr{E}");V("ℱ","\\mathscr{F}");V("ℋ","\\mathscr{H}");V("ℐ","\\mathscr{I}");V("ℒ","\\mathscr{L}");V("ℳ","\\mathscr{M}");V("ℛ","\\mathscr{R}");V("ℭ","\\mathfrak{C}");V("ℌ","\\mathfrak{H}");V("ℨ","\\mathfrak{Z}");V("\\Bbbk","\\Bbb{k}");V("·","\\cdotp");V("\\llap","\\mathllap{\\textrm{#1}}");V("\\rlap","\\mathrlap{\\textrm{#1}}");V("\\clap","\\mathclap{\\textrm{#1}}");V("\\mathstrut","\\vphantom{(}");V("\\underbar","\\underline{\\text{#1}}");V("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');V("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");V("\\ne","\\neq");V("≠","\\neq");V("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");V("∉","\\notin");V("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");V("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");V("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");V("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");V("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");V("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");V("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");V("⟂","\\perp");V("‼","\\mathclose{!\\mkern-0.8mu!}");V("∌","\\notni");V("⌜","\\ulcorner");V("⌝","\\urcorner");V("⌞","\\llcorner");V("⌟","\\lrcorner");V("©","\\copyright");V("®","\\textregistered");V("️","\\textregistered");V("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');V("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');V("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');V("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');V("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");V("⋮","\\vdots");V("\\varGamma","\\mathit{\\Gamma}");V("\\varDelta","\\mathit{\\Delta}");V("\\varTheta","\\mathit{\\Theta}");V("\\varLambda","\\mathit{\\Lambda}");V("\\varXi","\\mathit{\\Xi}");V("\\varPi","\\mathit{\\Pi}");V("\\varSigma","\\mathit{\\Sigma}");V("\\varUpsilon","\\mathit{\\Upsilon}");V("\\varPhi","\\mathit{\\Phi}");V("\\varPsi","\\mathit{\\Psi}");V("\\varOmega","\\mathit{\\Omega}");V("\\substack","\\begin{subarray}{c}#1\\end{subarray}");V("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");V("\\boxed","\\fbox{$\\displaystyle{#1}$}");V("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");V("\\implies","\\DOTSB\\;\\Longrightarrow\\;");V("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");V("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");V("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var SS={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};V("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in SS?t=SS[n]:(n.slice(0,4)==="\\not"||n in Gn.math&&["bin","rel"].includes(Gn.math[n].group))&&(t="\\dotsb"),t});var c3={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};V("\\dotso",function(e){var t=e.future().text;return t in c3?"\\ldots\\,":"\\ldots"});V("\\dotsc",function(e){var t=e.future().text;return t in c3&&t!==","?"\\ldots\\,":"\\ldots"});V("\\cdots",function(e){var t=e.future().text;return t in c3?"\\@cdots\\,":"\\@cdots"});V("\\dotsb","\\cdots");V("\\dotsm","\\cdots");V("\\dotsi","\\!\\cdots");V("\\dotsx","\\ldots\\,");V("\\DOTSI","\\relax");V("\\DOTSB","\\relax");V("\\DOTSX","\\relax");V("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");V("\\,","\\tmspace+{3mu}{.1667em}");V("\\thinspace","\\,");V("\\>","\\mskip{4mu}");V("\\:","\\tmspace+{4mu}{.2222em}");V("\\medspace","\\:");V("\\;","\\tmspace+{5mu}{.2777em}");V("\\thickspace","\\;");V("\\!","\\tmspace-{3mu}{.1667em}");V("\\negthinspace","\\!");V("\\negmedspace","\\tmspace-{4mu}{.2222em}");V("\\negthickspace","\\tmspace-{5mu}{.277em}");V("\\enspace","\\kern.5em ");V("\\enskip","\\hskip.5em\\relax");V("\\quad","\\hskip1em\\relax");V("\\qquad","\\hskip2em\\relax");V("\\tag","\\@ifstar\\tag@literal\\tag@paren");V("\\tag@paren","\\tag@literal{({#1})}");V("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Ye("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});V("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");V("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");V("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");V("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");V("\\newline","\\\\\\relax");V("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var nD=et(hi["Main-Regular"][84][1]-.7*hi["Main-Regular"][65][1]);V("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+nD+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");V("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+nD+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");V("\\hspace","\\@ifstar\\@hspacer\\@hspace");V("\\@hspace","\\hskip #1\\relax");V("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");V("\\ordinarycolon",":");V("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");V("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');V("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');V("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');V("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');V("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');V("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');V("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');V("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');V("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');V("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');V("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');V("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');V("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');V("∷","\\dblcolon");V("∹","\\eqcolon");V("≔","\\coloneqq");V("≕","\\eqqcolon");V("⩴","\\Coloneqq");V("\\ratio","\\vcentcolon");V("\\coloncolon","\\dblcolon");V("\\colonequals","\\coloneqq");V("\\coloncolonequals","\\Coloneqq");V("\\equalscolon","\\eqqcolon");V("\\equalscoloncolon","\\Eqqcolon");V("\\colonminus","\\coloneq");V("\\coloncolonminus","\\Coloneq");V("\\minuscolon","\\eqcolon");V("\\minuscoloncolon","\\Eqcolon");V("\\coloncolonapprox","\\Colonapprox");V("\\coloncolonsim","\\Colonsim");V("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");V("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");V("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");V("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");V("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");V("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");V("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");V("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");V("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");V("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");V("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");V("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");V("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");V("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");V("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");V("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");V("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");V("\\nleqq","\\html@mathml{\\@nleqq}{≰}");V("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");V("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");V("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");V("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");V("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");V("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");V("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");V("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");V("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");V("\\imath","\\html@mathml{\\@imath}{ı}");V("\\jmath","\\html@mathml{\\@jmath}{ȷ}");V("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");V("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");V("⟦","\\llbracket");V("⟧","\\rrbracket");V("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");V("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");V("⦃","\\lBrace");V("⦄","\\rBrace");V("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");V("⦵","\\minuso");V("\\darr","\\downarrow");V("\\dArr","\\Downarrow");V("\\Darr","\\Downarrow");V("\\lang","\\langle");V("\\rang","\\rangle");V("\\uarr","\\uparrow");V("\\uArr","\\Uparrow");V("\\Uarr","\\Uparrow");V("\\N","\\mathbb{N}");V("\\R","\\mathbb{R}");V("\\Z","\\mathbb{Z}");V("\\alef","\\aleph");V("\\alefsym","\\aleph");V("\\Alpha","\\mathrm{A}");V("\\Beta","\\mathrm{B}");V("\\bull","\\bullet");V("\\Chi","\\mathrm{X}");V("\\clubs","\\clubsuit");V("\\cnums","\\mathbb{C}");V("\\Complex","\\mathbb{C}");V("\\Dagger","\\ddagger");V("\\diamonds","\\diamondsuit");V("\\empty","\\emptyset");V("\\Epsilon","\\mathrm{E}");V("\\Eta","\\mathrm{H}");V("\\exist","\\exists");V("\\harr","\\leftrightarrow");V("\\hArr","\\Leftrightarrow");V("\\Harr","\\Leftrightarrow");V("\\hearts","\\heartsuit");V("\\image","\\Im");V("\\infin","\\infty");V("\\Iota","\\mathrm{I}");V("\\isin","\\in");V("\\Kappa","\\mathrm{K}");V("\\larr","\\leftarrow");V("\\lArr","\\Leftarrow");V("\\Larr","\\Leftarrow");V("\\lrarr","\\leftrightarrow");V("\\lrArr","\\Leftrightarrow");V("\\Lrarr","\\Leftrightarrow");V("\\Mu","\\mathrm{M}");V("\\natnums","\\mathbb{N}");V("\\Nu","\\mathrm{N}");V("\\Omicron","\\mathrm{O}");V("\\plusmn","\\pm");V("\\rarr","\\rightarrow");V("\\rArr","\\Rightarrow");V("\\Rarr","\\Rightarrow");V("\\real","\\Re");V("\\reals","\\mathbb{R}");V("\\Reals","\\mathbb{R}");V("\\Rho","\\mathrm{P}");V("\\sdot","\\cdot");V("\\sect","\\S");V("\\spades","\\spadesuit");V("\\sub","\\subset");V("\\sube","\\subseteq");V("\\supe","\\supseteq");V("\\Tau","\\mathrm{T}");V("\\thetasym","\\vartheta");V("\\weierp","\\wp");V("\\Zeta","\\mathrm{Z}");V("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");V("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");V("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");V("\\bra","\\mathinner{\\langle{#1}|}");V("\\ket","\\mathinner{|{#1}\\rangle}");V("\\braket","\\mathinner{\\langle{#1}\\rangle}");V("\\Bra","\\left\\langle#1\\right|");V("\\Ket","\\left|#1\\right\\rangle");var rD=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,a=t.consumeArg().tokens,s=t.consumeArg().tokens,o=t.macros.get("|"),u=t.macros.get("\\|");t.macros.beginGroup();var c=p=>b=>{e&&(b.macros.set("|",o),a.length&&b.macros.set("\\|",u));var y=p;if(!p&&a.length){var w=b.future();w.text==="|"&&(b.popToken(),y=!0)}return{tokens:y?a:r,numArgs:0}};t.macros.set("|",c(!1)),a.length&&t.macros.set("\\|",c(!0));var d=t.consumeArg().tokens,m=t.expandTokens([...s,...d,...n]);return t.macros.endGroup(),{tokens:m.reverse(),numArgs:0}};V("\\bra@ket",rD(!1));V("\\bra@set",rD(!0));V("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");V("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");V("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");V("\\angln","{\\angl n}");V("\\blue","\\textcolor{##6495ed}{#1}");V("\\orange","\\textcolor{##ffa500}{#1}");V("\\pink","\\textcolor{##ff00af}{#1}");V("\\red","\\textcolor{##df0030}{#1}");V("\\green","\\textcolor{##28ae7b}{#1}");V("\\gray","\\textcolor{gray}{#1}");V("\\purple","\\textcolor{##9d38bd}{#1}");V("\\blueA","\\textcolor{##ccfaff}{#1}");V("\\blueB","\\textcolor{##80f6ff}{#1}");V("\\blueC","\\textcolor{##63d9ea}{#1}");V("\\blueD","\\textcolor{##11accd}{#1}");V("\\blueE","\\textcolor{##0c7f99}{#1}");V("\\tealA","\\textcolor{##94fff5}{#1}");V("\\tealB","\\textcolor{##26edd5}{#1}");V("\\tealC","\\textcolor{##01d1c1}{#1}");V("\\tealD","\\textcolor{##01a995}{#1}");V("\\tealE","\\textcolor{##208170}{#1}");V("\\greenA","\\textcolor{##b6ffb0}{#1}");V("\\greenB","\\textcolor{##8af281}{#1}");V("\\greenC","\\textcolor{##74cf70}{#1}");V("\\greenD","\\textcolor{##1fab54}{#1}");V("\\greenE","\\textcolor{##0d923f}{#1}");V("\\goldA","\\textcolor{##ffd0a9}{#1}");V("\\goldB","\\textcolor{##ffbb71}{#1}");V("\\goldC","\\textcolor{##ff9c39}{#1}");V("\\goldD","\\textcolor{##e07d10}{#1}");V("\\goldE","\\textcolor{##a75a05}{#1}");V("\\redA","\\textcolor{##fca9a9}{#1}");V("\\redB","\\textcolor{##ff8482}{#1}");V("\\redC","\\textcolor{##f9685d}{#1}");V("\\redD","\\textcolor{##e84d39}{#1}");V("\\redE","\\textcolor{##bc2612}{#1}");V("\\maroonA","\\textcolor{##ffbde0}{#1}");V("\\maroonB","\\textcolor{##ff92c6}{#1}");V("\\maroonC","\\textcolor{##ed5fa6}{#1}");V("\\maroonD","\\textcolor{##ca337c}{#1}");V("\\maroonE","\\textcolor{##9e034e}{#1}");V("\\purpleA","\\textcolor{##ddd7ff}{#1}");V("\\purpleB","\\textcolor{##c6b9fc}{#1}");V("\\purpleC","\\textcolor{##aa87ff}{#1}");V("\\purpleD","\\textcolor{##7854ab}{#1}");V("\\purpleE","\\textcolor{##543b78}{#1}");V("\\mintA","\\textcolor{##f5f9e8}{#1}");V("\\mintB","\\textcolor{##edf2df}{#1}");V("\\mintC","\\textcolor{##e0e5cc}{#1}");V("\\grayA","\\textcolor{##f6f7f7}{#1}");V("\\grayB","\\textcolor{##f0f1f2}{#1}");V("\\grayC","\\textcolor{##e3e5e6}{#1}");V("\\grayD","\\textcolor{##d6d8da}{#1}");V("\\grayE","\\textcolor{##babec2}{#1}");V("\\grayF","\\textcolor{##888d93}{#1}");V("\\grayG","\\textcolor{##626569}{#1}");V("\\grayH","\\textcolor{##3b3e40}{#1}");V("\\grayI","\\textcolor{##21242c}{#1}");V("\\kaBlue","\\textcolor{##314453}{#1}");V("\\kaGreen","\\textcolor{##71B307}{#1}");var aD={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class dee{constructor(t,n,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=n,this.expansionCount=0,this.feed(t),this.macros=new uee(cee,n.macros),this.mode=r,this.stack=[]}feed(t){this.lexer=new TS(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var n,r,a;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;n=this.popToken(),{tokens:a,end:r}=this.consumeArg(["]"])}else({tokens:a,start:n,end:r}=this.consumeArg());return this.pushToken(new ss("EOF",r.loc)),this.pushTokens(a),new ss("",Pa.range(n,r))}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var n=[],r=t&&t.length>0;r||this.consumeSpaces();var a=this.future(),s,o=0,u=0;do{if(s=this.popToken(),n.push(s),s.text==="{")++o;else if(s.text==="}"){if(--o,o===-1)throw new Ye("Extra }",s)}else if(s.text==="EOF")throw new Ye("Unexpected end of input in a macro argument, expected '"+(t&&r?t[u]:"}")+"'",s);if(t&&r)if((o===0||o===1&&t[u]==="{")&&s.text===t[u]){if(++u,u===t.length){n.splice(-u,u);break}}else u=0}while(o!==0||r);return a.text==="{"&&n[n.length-1].text==="}"&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:a,end:s}}consumeArgs(t,n){if(n){if(n.length!==t+1)throw new Ye("The length of delimiters doesn't match the number of args!");for(var r=n[0],a=0;a<r.length;a++){var s=this.popToken();if(r[a]!==s.text)throw new Ye("Use of the macro doesn't match its definition",s)}}for(var o=[],u=0;u<t;u++)o.push(this.consumeArg(n&&n[u+1]).tokens);return o}countExpansion(t){if(this.expansionCount+=t,this.expansionCount>this.settings.maxExpand)throw new Ye("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var n=this.popToken(),r=n.text,a=n.noexpand?null:this._getExpansion(r);if(a==null||t&&a.unexpandable){if(t&&a==null&&r[0]==="\\"&&!this.isDefined(r))throw new Ye("Undefined control sequence: "+r);return this.pushToken(n),!1}this.countExpansion(1);var s=a.tokens,o=this.consumeArgs(a.numArgs,a.delimiters);if(a.numArgs){s=s.slice();for(var u=s.length-1;u>=0;--u){var c=s[u];if(c.text==="#"){if(u===0)throw new Ye("Incomplete placeholder at end of macro body",c);if(c=s[--u],c.text==="#")s.splice(u+1,1);else if(/^[1-9]$/.test(c.text))s.splice(u,2,...o[+c.text-1]);else throw new Ye("Not a valid argument number",c)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}throw new Error}expandMacro(t){return this.macros.has(t)?this.expandTokens([new ss(t)]):void 0}expandTokens(t){var n=[],r=this.stack.length;for(this.pushTokens(t);this.stack.length>r;)if(this.expandOnce(!0)===!1){var a=this.stack.pop();a.treatAsRelax&&(a.noexpand=!1,a.treatAsRelax=!1),n.push(a)}return this.countExpansion(n.length),n}expandMacroAsText(t){var n=this.expandMacro(t);return n&&n.map(r=>r.text).join("")}_getExpansion(t){var n=this.macros.get(t);if(n==null)return n;if(t.length===1){var r=this.lexer.catcodes[t];if(r!=null&&r!==13)return}var a=typeof n=="function"?n(this):n;if(typeof a=="string"){var s=0;if(a.indexOf("#")!==-1)for(var o=a.replace(/##/g,"");o.indexOf("#"+(s+1))!==-1;)++s;for(var u=new TS(a,this.settings),c=[],d=u.lex();d.text!=="EOF";)c.push(d),d=u.lex();c.reverse();var m={tokens:c,numArgs:s};return m}return a}isDefined(t){return this.macros.has(t)||Qo.hasOwnProperty(t)||Gn.math.hasOwnProperty(t)||Gn.text.hasOwnProperty(t)||aD.hasOwnProperty(t)}isExpandable(t){var n=this.macros.get(t);return n!=null?typeof n=="string"||typeof n=="function"||!n.unexpandable:Qo.hasOwnProperty(t)&&!Qo[t].primitive}}var CS=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Pm=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),ux={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},kS={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};let sD=class iD{constructor(t,n){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new dee(t,n,this.mode),this.settings=n,this.leftrightDepth=0}expect(t,n){if(n===void 0&&(n=!0),this.fetch().text!==t)throw new Ye("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());n&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var n=this.nextToken;this.consume(),this.gullet.pushToken(new ss("}")),this.gullet.pushTokens(t);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=n,r}parseExpression(t,n){for(var r=[];;){this.mode==="math"&&this.consumeSpaces();var a=this.fetch();if(iD.endOfExpression.indexOf(a.text)!==-1||n&&a.text===n||t&&Qo[a.text]&&Qo[a.text].infix)break;var s=this.parseAtom(n);if(s){if(s.type==="internal")continue}else break;r.push(s)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){for(var n=-1,r,a=0;a<t.length;a++)if(t[a].type==="infix"){if(n!==-1)throw new Ye("only one infix operator per group",t[a].token);n=a,r=t[a].replaceWith}if(n!==-1&&r){var s,o,u=t.slice(0,n),c=t.slice(n+1);u.length===1&&u[0].type==="ordgroup"?s=u[0]:s={type:"ordgroup",mode:this.mode,body:u},c.length===1&&c[0].type==="ordgroup"?o=c[0]:o={type:"ordgroup",mode:this.mode,body:c};var d;return r==="\\\\abovefrac"?d=this.callFunction(r,[s,t[n],o],[]):d=this.callFunction(r,[s,o],[]),[d]}else return t}handleSupSubscript(t){var n=this.fetch(),r=n.text;this.consume(),this.consumeSpaces();var a;do{var s;a=this.parseGroup(t)}while(((s=a)==null?void 0:s.type)==="internal");if(!a)throw new Ye("Expected group after '"+r+"'",n);return a}formatUnsupportedCmd(t){for(var n=[],r=0;r<t.length;r++)n.push({type:"textord",mode:"text",text:t[r]});var a={type:"text",mode:this.mode,body:n},s={type:"color",mode:this.mode,color:this.settings.errorColor,body:[a]};return s}parseAtom(t){var n=this.parseGroup("atom",t);if(n?.type==="internal"||this.mode==="text")return n;for(var r,a;;){this.consumeSpaces();var s=this.fetch();if(s.text==="\\limits"||s.text==="\\nolimits"){if(n&&n.type==="op"){var o=s.text==="\\limits";n.limits=o,n.alwaysHandleSupSub=!0}else if(n&&n.type==="operatorname")n.alwaysHandleSupSub&&(n.limits=s.text==="\\limits");else throw new Ye("Limit controls must follow a math operator",s);this.consume()}else if(s.text==="^"){if(r)throw new Ye("Double superscript",s);r=this.handleSupSubscript("superscript")}else if(s.text==="_"){if(a)throw new Ye("Double subscript",s);a=this.handleSupSubscript("subscript")}else if(s.text==="'"){if(r)throw new Ye("Double superscript",s);var u={type:"textord",mode:this.mode,text:"\\prime"},c=[u];for(this.consume();this.fetch().text==="'";)c.push(u),this.consume();this.fetch().text==="^"&&c.push(this.handleSupSubscript("superscript")),r={type:"ordgroup",mode:this.mode,body:c}}else if(Pm[s.text]){var d=CS.test(s.text),m=[];for(m.push(new ss(Pm[s.text])),this.consume();;){var p=this.fetch().text;if(!Pm[p]||CS.test(p)!==d)break;m.unshift(new ss(Pm[p])),this.consume()}var b=this.subparse(m);d?a={type:"ordgroup",mode:"math",body:b}:r={type:"ordgroup",mode:"math",body:b}}else break}return r||a?{type:"supsub",mode:this.mode,base:n,sup:r,sub:a}:n}parseFunction(t,n){var r=this.fetch(),a=r.text,s=Qo[a];if(!s)return null;if(this.consume(),n&&n!=="atom"&&!s.allowedInArgument)throw new Ye("Got function '"+a+"' with no arguments"+(n?" as "+n:""),r);if(this.mode==="text"&&!s.allowedInText)throw new Ye("Can't use function '"+a+"' in text mode",r);if(this.mode==="math"&&s.allowedInMath===!1)throw new Ye("Can't use function '"+a+"' in math mode",r);var{args:o,optArgs:u}=this.parseArguments(a,s);return this.callFunction(a,o,u,r,t)}callFunction(t,n,r,a,s){var o={funcName:t,parser:this,token:a,breakOnTokenText:s},u=Qo[t];if(u&&u.handler)return u.handler(o,n,r);throw new Ye("No function handler for "+t)}parseArguments(t,n){var r=n.numArgs+n.numOptionalArgs;if(r===0)return{args:[],optArgs:[]};for(var a=[],s=[],o=0;o<r;o++){var u=n.argTypes&&n.argTypes[o],c=o<n.numOptionalArgs;(n.primitive&&u==null||n.type==="sqrt"&&o===1&&s[0]==null)&&(u="primitive");var d=this.parseGroupOfType("argument to '"+t+"'",u,c);if(c)s.push(d);else if(d!=null)a.push(d);else throw new Ye("Null argument, please report this as a bug")}return{args:a,optArgs:s}}parseGroupOfType(t,n,r){switch(n){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,n);case"hbox":{var a=this.parseArgumentGroup(r,"text");return a!=null?{type:"styling",mode:a.mode,body:[a],style:"text"}:null}case"raw":{var s=this.parseStringGroup("raw",r);return s!=null?{type:"raw",mode:"text",string:s.text}:null}case"primitive":{if(r)throw new Ye("A primitive argument cannot be optional");var o=this.parseGroup(t);if(o==null)throw new Ye("Expected group as "+t,this.fetch());return o}case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new Ye("Unknown group type as "+t,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(t,n){var r=this.gullet.scanArgument(n);if(r==null)return null;for(var a="",s;(s=this.fetch()).text!=="EOF";)a+=s.text,this.consume();return this.consume(),r.text=a,r}parseRegexGroup(t,n){for(var r=this.fetch(),a=r,s="",o;(o=this.fetch()).text!=="EOF"&&t.test(s+o.text);)a=o,s+=a.text,this.consume();if(s==="")throw new Ye("Invalid "+n+": '"+r.text+"'",r);return r.range(a,s)}parseColorGroup(t){var n=this.parseStringGroup("color",t);if(n==null)return null;var r=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(n.text);if(!r)throw new Ye("Invalid color: '"+n.text+"'",n);var a=r[0];return/^[0-9a-f]{6}$/i.test(a)&&(a="#"+a),{type:"color-token",mode:this.mode,color:a}}parseSizeGroup(t){var n,r=!1;if(this.gullet.consumeSpaces(),!t&&this.gullet.future().text!=="{"?n=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):n=this.parseStringGroup("size",t),!n)return null;!t&&n.text.length===0&&(n.text="0pt",r=!0);var a=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(n.text);if(!a)throw new Ye("Invalid size: '"+n.text+"'",n);var s={number:+(a[1]+a[2]),unit:a[3]};if(!mM(s))throw new Ye("Invalid unit: '"+s.unit+"'",n);return{type:"size",mode:this.mode,value:s,isBlank:r}}parseUrlGroup(t){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var n=this.parseStringGroup("url",t);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),n==null)return null;var r=n.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}}parseArgumentGroup(t,n){var r=this.gullet.scanArgument(t);if(r==null)return null;var a=this.mode;n&&this.switchMode(n),this.gullet.beginGroup();var s=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var o={type:"ordgroup",mode:this.mode,loc:r.loc,body:s};return n&&this.switchMode(a),o}parseGroup(t,n){var r=this.fetch(),a=r.text,s;if(a==="{"||a==="\\begingroup"){this.consume();var o=a==="{"?"}":"\\endgroup";this.gullet.beginGroup();var u=this.parseExpression(!1,o),c=this.fetch();this.expect(o),this.gullet.endGroup(),s={type:"ordgroup",mode:this.mode,loc:Pa.range(r,c),body:u,semisimple:a==="\\begingroup"||void 0}}else if(s=this.parseFunction(n,t)||this.parseSymbol(),s==null&&a[0]==="\\"&&!aD.hasOwnProperty(a)){if(this.settings.throwOnError)throw new Ye("Undefined control sequence: "+a,r);s=this.formatUnsupportedCmd(a),this.consume()}return s}formLigatures(t){for(var n=t.length-1,r=0;r<n;++r){var a=t[r],s=a.text;s==="-"&&t[r+1].text==="-"&&(r+1<n&&t[r+2].text==="-"?(t.splice(r,3,{type:"textord",mode:"text",loc:Pa.range(a,t[r+2]),text:"---"}),n-=2):(t.splice(r,2,{type:"textord",mode:"text",loc:Pa.range(a,t[r+1]),text:"--"}),n-=1)),(s==="'"||s==="`")&&t[r+1].text===s&&(t.splice(r,2,{type:"textord",mode:"text",loc:Pa.range(a,t[r+1]),text:s+s}),n-=1)}}parseSymbol(){var t=this.fetch(),n=t.text;if(/^\\verb[^a-zA-Z]/.test(n)){this.consume();var r=n.slice(5),a=r.charAt(0)==="*";if(a&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new Ye(`\\verb assertion failed --
|
|
330
|
+
please report what input caused this bug`);return r=r.slice(1,-1),{type:"verb",mode:"text",body:r,star:a}}kS.hasOwnProperty(n[0])&&!Gn[this.mode][n[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+n[0]+'" used in math mode',t),n=kS[n[0]]+n.slice(1));var s=oee.exec(n);s&&(n=n.substring(0,s.index),n==="i"?n="ı":n==="j"&&(n="ȷ"));var o;if(Gn[this.mode][n]){this.settings.strict&&this.mode==="math"&&Iy.indexOf(n)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',t);var u=Gn[this.mode][n].group,c=Pa.range(t),d;if(JZ.hasOwnProperty(u)){var m=u;d={type:"atom",mode:this.mode,family:m,loc:c,text:n}}else d={type:u,mode:this.mode,loc:c,text:n};o=d}else if(n.charCodeAt(0)>=128)this.settings.strict&&(fM(n.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+n[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+n[0]+'"'+(" ("+n.charCodeAt(0)+")"),t)),o={type:"textord",mode:"text",loc:Pa.range(t),text:n};else return null;if(this.consume(),s)for(var p=0;p<s[0].length;p++){var b=s[0][p];if(!ux[b])throw new Ye("Unknown accent ' "+b+"'",t);var y=ux[b][this.mode]||ux[b].text;if(!y)throw new Ye("Accent "+b+" unsupported in "+this.mode+" mode",t);o={type:"accent",mode:this.mode,loc:Pa.range(t),label:y,isStretchy:!1,isShifty:!0,base:o}}return o}};sD.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var d3=function(t,n){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var r=new sD(t,n);delete r.gullet.macros.current["\\df@tag"];var a=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!n.displayMode)throw new Ye("\\tag works only in display equations");a=[{type:"tag",mode:"text",body:a,tag:r.subparse([new ss("\\df@tag")])}]}return a},f3=function(t,n,r){n.textContent="";var a=W1(t,r).toNode();n.appendChild(a)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),f3=function(){throw new Ye("KaTeX doesn't work in quirks mode.")});var oD=function(t,n){var r=W1(t,n).toMarkup();return r},lD=function(t,n){var r=new Y4(n);return d3(t,r)},uD=function(t,n,r){if(r.throwOnError||!(t instanceof Ye))throw t;var a=ye.makeSpan(["katex-error"],[new _s(n)]);return a.setAttribute("title",t.toString()),a.setAttribute("style","color:"+r.errorColor),a},W1=function(t,n){var r=new Y4(n);try{var a=d3(t,r);return TJ(a,t,r)}catch(s){return uD(s,t,r)}},cD=function(t,n){var r=new Y4(n);try{var a=d3(t,r);return EJ(a,t,r)}catch(s){return uD(s,t,r)}},dD="0.16.28",fD={Span:Hf,Anchor:K4,SymbolNode:_s,SvgNode:io,PathNode:ol,LineNode:Dy},By={version:dD,render:f3,renderToString:oD,ParseError:Ye,SETTINGS_SCHEMA:Md,__parse:lD,__renderToDomTree:W1,__renderToHTMLTree:cD,__setFontMetrics:hM,__defineSymbol:N,__defineFunction:ut,__defineMacro:V,__domTree:fD};const _3e=Object.freeze(Object.defineProperty({__proto__:null,ParseError:Ye,SETTINGS_SCHEMA:Md,__defineFunction:ut,__defineMacro:V,__defineSymbol:N,__domTree:fD,__parse:lD,__renderToDomTree:W1,__renderToHTMLTree:cD,__setFontMetrics:hM,default:By,get render(){return f3},renderToString:oD,version:dD},Symbol.toStringTag,{value:"Module"})),fee={},hee=[];function Fy(e){const t=e||fee;return function(n,r){q4(n,"element",function(a,s){const o=Array.isArray(a.properties.className)?a.properties.className:hee,u=o.includes("language-math"),c=o.includes("math-display"),d=o.includes("math-inline");let m=c;if(!u&&!c&&!d)return;let p=s[s.length-1],b=a;if(a.tagName==="code"&&u&&p&&p.type==="element"&&p.tagName==="pre"&&(b=p,p=s[s.length-2],m=!0),!p)return;const y=fZ(b,{whitespace:"pre"});let w;try{w=By.renderToString(y,{...t,displayMode:m,throwOnError:!0})}catch(k){const E=k,A=E.name.toLowerCase();r.message("Could not render math with KaTeX",{ancestors:[...s,a],cause:E,place:a.position,ruleId:A,source:"rehype-katex"});try{w=By.renderToString(y,{...t,displayMode:m,strict:"ignore",throwOnError:!1})}catch{w=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(k)},children:[{type:"text",value:y}]}]}}typeof w=="string"&&(w=aZ(w).children);const S=p.children.indexOf(b);return p.children.splice(S,1,...w),Lp})}}const hD=-1,X1=0,Id=1,Hp=2,h3=3,m3=4,p3=5,g3=6,mD=7,pD=8,AS=typeof self=="object"?self:globalThis,mee=(e,t)=>{const n=(a,s)=>(e.set(s,a),a),r=a=>{if(e.has(a))return e.get(a);const[s,o]=t[a];switch(s){case X1:case hD:return n(o,a);case Id:{const u=n([],a);for(const c of o)u.push(r(c));return u}case Hp:{const u=n({},a);for(const[c,d]of o)u[r(c)]=r(d);return u}case h3:return n(new Date(o),a);case m3:{const{source:u,flags:c}=o;return n(new RegExp(u,c),a)}case p3:{const u=n(new Map,a);for(const[c,d]of o)u.set(r(c),r(d));return u}case g3:{const u=n(new Set,a);for(const c of o)u.add(r(c));return u}case mD:{const{name:u,message:c}=o;return n(new AS[u](c),a)}case pD:return n(BigInt(o),a);case"BigInt":return n(Object(BigInt(o)),a);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:u}=new Uint8Array(o);return n(new DataView(u),o)}}return n(new AS[s](o),a)};return r},NS=e=>mee(new Map,e)(0),uc="",{toString:pee}={},{keys:gee}=Object,fd=e=>{const t=typeof e;if(t!=="object"||!e)return[X1,t];const n=pee.call(e).slice(8,-1);switch(n){case"Array":return[Id,uc];case"Object":return[Hp,uc];case"Date":return[h3,uc];case"RegExp":return[m3,uc];case"Map":return[p3,uc];case"Set":return[g3,uc];case"DataView":return[Id,n]}return n.includes("Array")?[Id,n]:n.includes("Error")?[mD,n]:[Hp,n]},jm=([e,t])=>e===X1&&(t==="function"||t==="symbol"),bee=(e,t,n,r)=>{const a=(o,u)=>{const c=r.push(o)-1;return n.set(u,c),c},s=o=>{if(n.has(o))return n.get(o);let[u,c]=fd(o);switch(u){case X1:{let m=o;switch(c){case"bigint":u=pD,m=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);m=null;break;case"undefined":return a([hD],o)}return a([u,m],o)}case Id:{if(c){let b=o;return c==="DataView"?b=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(b=new Uint8Array(o)),a([c,[...b]],o)}const m=[],p=a([u,m],o);for(const b of o)m.push(s(b));return p}case Hp:{if(c)switch(c){case"BigInt":return a([c,o.toString()],o);case"Boolean":case"Number":case"String":return a([c,o.valueOf()],o)}if(t&&"toJSON"in o)return s(o.toJSON());const m=[],p=a([u,m],o);for(const b of gee(o))(e||!jm(fd(o[b])))&&m.push([s(b),s(o[b])]);return p}case h3:return a([u,o.toISOString()],o);case m3:{const{source:m,flags:p}=o;return a([u,{source:m,flags:p}],o)}case p3:{const m=[],p=a([u,m],o);for(const[b,y]of o)(e||!(jm(fd(b))||jm(fd(y))))&&m.push([s(b),s(y)]);return p}case g3:{const m=[],p=a([u,m],o);for(const b of o)(e||!jm(fd(b)))&&m.push(s(b));return p}}const{message:d}=o;return a([u,{name:c,message:d}],o)};return s},_S=(e,{json:t,lossy:n}={})=>{const r=[];return bee(!(t||n),!!t,new Map,r)(e),r},au=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?NS(_S(e,t)):structuredClone(e):(e,t)=>NS(_S(e,t));function xee(e){const t=String(e),n=[];return{toOffset:a,toPoint:r};function r(s){if(typeof s=="number"&&s>-1&&s<=t.length){let o=0;for(;;){let u=n[o];if(u===void 0){const c=RS(t,n[o-1]);u=c===-1?t.length+1:c+1,n[o]=u}if(u>s)return{line:o+1,column:s-(o>0?n[o-1]:0)+1,offset:s};o++}}}function a(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const u=n[n.length-1],c=RS(t,u),d=c===-1?t.length+1:c+1;if(u===d)break;n.push(d)}const o=(s.line>1?n[s.line-2]:0)+s.column-1;if(o<n[s.line-1])return o}}}function RS(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
331
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const gD={}.hasOwnProperty,yee=Object.prototype;function vee(e,t){const n=t||{};return b3({file:n.file||void 0,location:!1,schema:n.space==="svg"?pl:Bf,verbose:n.verbose||!1},e)}function b3(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},lp(e,r,n),n}case"#document":case"#document-fragment":{const r=t,a="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:bD(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const s=String(e.file),o=xee(s),u=o.toPoint(0),c=o.toPoint(s.length);n.position={start:u,end:c}}return n}case"#documentType":{const r=t;return n={type:"doctype"},lp(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},lp(e,r,n),n}default:return n=wee(e,t),n}}function bD(e,t){let n=-1;const r=[];for(;++n<t.length;){const a=b3(e,t[n]);r.push(a)}return r}function wee(e,t){const n=e.schema;e.schema=t.namespaceURI===fi.svg?pl:Bf;let r=-1;const a={};for(;++r<t.attrs.length;){const u=t.attrs[r],c=(u.prefix?u.prefix+":":"")+u.name;gD.call(yee,c)||(a[c]=u.value)}const o=(e.schema.space==="svg"?aM:rM)(t.tagName,a,bD(e,t.childNodes));if(lp(e,t,o),o.tagName==="template"){const u=t,c=u.sourceCodeLocation,d=c&&c.startTag&&bc(c.startTag),m=c&&c.endTag&&bc(c.endTag),p=b3(e,u.content);d&&m&&e.file&&(p.position={start:d.end,end:m.start}),o.content=p}return e.schema=n,o}function lp(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=Tee(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Tee(e,t,n){const r=bc(n);if(t.type==="element"){const a=t.children[t.children.length-1];if(r&&!n.endTag&&a&&a.position&&a.position.end&&(r.end=Object.assign({},a.position.end)),e.verbose){const s={};let o;if(n.attrs)for(o in n.attrs)gD.call(n.attrs,o)&&(s[H1(e.schema,o).property]=bc(n.attrs[o]));n.startTag;const u=bc(n.startTag),c=n.endTag?bc(n.endTag):void 0,d={opening:u};c&&(d.closing=c),d.properties=s,t.data={position:d}}}return r}function bc(e){const t=MS({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=MS({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function MS(e){return e.line&&e.column?e:void 0}const DS={}.hasOwnProperty;function xD(e,t){const n=t||{};function r(a,...s){let o=r.invalid;const u=r.handlers;if(a&&DS.call(a,e)){const c=String(a[e]);o=DS.call(u,c)?u[c]:r.unknown}if(o)return o.call(this,a,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Eee={},See={}.hasOwnProperty,yD=xD("type",{handlers:{root:kee,element:Mee,text:_ee,comment:Ree,doctype:Nee}});function Cee(e,t){const r=(t||Eee).space;return yD(e,r==="svg"?pl:Bf)}function kee(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=x3(e.children,n,t),i0(e,n),n}function Aee(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=x3(e.children,n,t),i0(e,n),n}function Nee(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return i0(e,t),t}function _ee(e){const t={nodeName:"#text",value:e.value,parentNode:null};return i0(e,t),t}function Ree(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return i0(e,t),t}function Mee(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=pl);const a=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&See.call(e.properties,s)){const c=Dee(r,s,e.properties[s]);c&&a.push(c)}}const o=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:fi[o],childNodes:[],parentNode:null};return u.childNodes=x3(e.children,u,r),i0(e,u),e.tagName==="template"&&e.content&&(u.content=Aee(e.content,r)),u}function Dee(e,t,n){const r=H1(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?eM(n):tM(n));const a={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const s=a.name.indexOf(":");s<0?a.prefix="":(a.name=a.name.slice(s+1),a.prefix=r.attribute.slice(0,s)),a.namespace=fi[r.space]}return a}function x3(e,t,n){let r=-1;const a=[];if(e)for(;++r<e.length;){const s=yD(e[r],n);s.parentNode=t,a.push(s)}return a}function i0(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const Iee=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Oee=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),tr="�";var Y;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(Y||(Y={}));const Ra={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function vD(e){return e>=55296&&e<=57343}function Lee(e){return e>=56320&&e<=57343}function Pee(e,t){return(e-55296)*1024+9216+t}function wD(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function TD(e){return e>=64976&&e<=65007||Oee.has(e)}var _e;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(_e||(_e={}));const jee=65536;class zee{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=jee,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:a,offset:s}=this,o=a+n,u=s+n;return{code:t,startLine:r,endLine:r,startCol:o,endCol:o,startOffset:u,endOffset:u}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(Lee(n))return this.pos++,this._addGap(),Pee(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Y.EOF;return this._err(_e.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Y.EOF;const r=this.html.charCodeAt(n);return r===Y.CARRIAGE_RETURN?Y.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Y.EOF;let t=this.html.charCodeAt(this.pos);return t===Y.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,Y.LINE_FEED):t===Y.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,vD(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===Y.LINE_FEED||t===Y.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){wD(t)?this._err(_e.controlCharacterInInputStream):TD(t)&&this._err(_e.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var on;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(on||(on={}));function ED(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const Bee=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Fee=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function Hee(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Fee.get(e))!==null&&t!==void 0?t:e}var Fr;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Fr||(Fr={}));const Uee=32;var Zo;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Zo||(Zo={}));function Hy(e){return e>=Fr.ZERO&&e<=Fr.NINE}function $ee(e){return e>=Fr.UPPER_A&&e<=Fr.UPPER_F||e>=Fr.LOWER_A&&e<=Fr.LOWER_F}function qee(e){return e>=Fr.UPPER_A&&e<=Fr.UPPER_Z||e>=Fr.LOWER_A&&e<=Fr.LOWER_Z||Hy(e)}function Vee(e){return e===Fr.EQUALS||qee(e)}var zr;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(zr||(zr={}));var Ki;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ki||(Ki={}));class Gee{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=zr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ki.Strict}startEntity(t){this.decodeMode=t,this.state=zr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case zr.EntityStart:return t.charCodeAt(n)===Fr.NUM?(this.state=zr.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=zr.NamedEntity,this.stateNamedEntity(t,n));case zr.NumericStart:return this.stateNumericStart(t,n);case zr.NumericDecimal:return this.stateNumericDecimal(t,n);case zr.NumericHex:return this.stateNumericHex(t,n);case zr.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Uee)===Fr.LOWER_X?(this.state=zr.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=zr.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,a){if(n!==r){const s=r-n;this.result=this.result*Math.pow(a,s)+Number.parseInt(t.substr(n,s),a),this.consumed+=s}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const a=t.charCodeAt(n);if(Hy(a)||$ee(a))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(a,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const a=t.charCodeAt(n);if(Hy(a))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(a,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Fr.SEMI)this.consumed+=1;else if(this.decodeMode===Ki.Strict)return 0;return this.emitCodePoint(Hee(this.result),this.consumed),this.errors&&(t!==Fr.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let a=r[this.treeIndex],s=(a&Zo.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const o=t.charCodeAt(n);if(this.treeIndex=Yee(r,a,this.treeIndex+Math.max(1,s),o),this.treeIndex<0)return this.result===0||this.decodeMode===Ki.Attribute&&(s===0||Vee(o))?0:this.emitNotTerminatedNamedEntity();if(a=r[this.treeIndex],s=(a&Zo.VALUE_LENGTH)>>14,s!==0){if(o===Fr.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Ki.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,a=(r[n]&Zo.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,a,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:a}=this;return this.emitCodePoint(n===1?a[t]&~Zo.VALUE_LENGTH:a[t+1],r),n===3&&this.emitCodePoint(a[t+2],r),r}end(){var t;switch(this.state){case zr.NamedEntity:return this.result!==0&&(this.decodeMode!==Ki.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case zr.NumericDecimal:return this.emitNumericEntity(0,2);case zr.NumericHex:return this.emitNumericEntity(0,3);case zr.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case zr.EntityStart:return 0}}}function Yee(e,t,n,r){const a=(t&Zo.BRANCH_LENGTH)>>7,s=t&Zo.JUMP_TABLE;if(a===0)return s!==0&&r===s?n:-1;if(s){const c=r-s;return c<0||c>=a?-1:e[n+c]-1}let o=n,u=o+a-1;for(;o<=u;){const c=o+u>>>1,d=e[c];if(d<r)o=c+1;else if(d>r)u=c-1;else return e[c+a]}return-1}var He;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(He||(He={}));var Zl;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Zl||(Zl={}));var ws;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(ws||(ws={}));var pe;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(pe||(pe={}));var C;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(C||(C={}));const Wee=new Map([[pe.A,C.A],[pe.ADDRESS,C.ADDRESS],[pe.ANNOTATION_XML,C.ANNOTATION_XML],[pe.APPLET,C.APPLET],[pe.AREA,C.AREA],[pe.ARTICLE,C.ARTICLE],[pe.ASIDE,C.ASIDE],[pe.B,C.B],[pe.BASE,C.BASE],[pe.BASEFONT,C.BASEFONT],[pe.BGSOUND,C.BGSOUND],[pe.BIG,C.BIG],[pe.BLOCKQUOTE,C.BLOCKQUOTE],[pe.BODY,C.BODY],[pe.BR,C.BR],[pe.BUTTON,C.BUTTON],[pe.CAPTION,C.CAPTION],[pe.CENTER,C.CENTER],[pe.CODE,C.CODE],[pe.COL,C.COL],[pe.COLGROUP,C.COLGROUP],[pe.DD,C.DD],[pe.DESC,C.DESC],[pe.DETAILS,C.DETAILS],[pe.DIALOG,C.DIALOG],[pe.DIR,C.DIR],[pe.DIV,C.DIV],[pe.DL,C.DL],[pe.DT,C.DT],[pe.EM,C.EM],[pe.EMBED,C.EMBED],[pe.FIELDSET,C.FIELDSET],[pe.FIGCAPTION,C.FIGCAPTION],[pe.FIGURE,C.FIGURE],[pe.FONT,C.FONT],[pe.FOOTER,C.FOOTER],[pe.FOREIGN_OBJECT,C.FOREIGN_OBJECT],[pe.FORM,C.FORM],[pe.FRAME,C.FRAME],[pe.FRAMESET,C.FRAMESET],[pe.H1,C.H1],[pe.H2,C.H2],[pe.H3,C.H3],[pe.H4,C.H4],[pe.H5,C.H5],[pe.H6,C.H6],[pe.HEAD,C.HEAD],[pe.HEADER,C.HEADER],[pe.HGROUP,C.HGROUP],[pe.HR,C.HR],[pe.HTML,C.HTML],[pe.I,C.I],[pe.IMG,C.IMG],[pe.IMAGE,C.IMAGE],[pe.INPUT,C.INPUT],[pe.IFRAME,C.IFRAME],[pe.KEYGEN,C.KEYGEN],[pe.LABEL,C.LABEL],[pe.LI,C.LI],[pe.LINK,C.LINK],[pe.LISTING,C.LISTING],[pe.MAIN,C.MAIN],[pe.MALIGNMARK,C.MALIGNMARK],[pe.MARQUEE,C.MARQUEE],[pe.MATH,C.MATH],[pe.MENU,C.MENU],[pe.META,C.META],[pe.MGLYPH,C.MGLYPH],[pe.MI,C.MI],[pe.MO,C.MO],[pe.MN,C.MN],[pe.MS,C.MS],[pe.MTEXT,C.MTEXT],[pe.NAV,C.NAV],[pe.NOBR,C.NOBR],[pe.NOFRAMES,C.NOFRAMES],[pe.NOEMBED,C.NOEMBED],[pe.NOSCRIPT,C.NOSCRIPT],[pe.OBJECT,C.OBJECT],[pe.OL,C.OL],[pe.OPTGROUP,C.OPTGROUP],[pe.OPTION,C.OPTION],[pe.P,C.P],[pe.PARAM,C.PARAM],[pe.PLAINTEXT,C.PLAINTEXT],[pe.PRE,C.PRE],[pe.RB,C.RB],[pe.RP,C.RP],[pe.RT,C.RT],[pe.RTC,C.RTC],[pe.RUBY,C.RUBY],[pe.S,C.S],[pe.SCRIPT,C.SCRIPT],[pe.SEARCH,C.SEARCH],[pe.SECTION,C.SECTION],[pe.SELECT,C.SELECT],[pe.SOURCE,C.SOURCE],[pe.SMALL,C.SMALL],[pe.SPAN,C.SPAN],[pe.STRIKE,C.STRIKE],[pe.STRONG,C.STRONG],[pe.STYLE,C.STYLE],[pe.SUB,C.SUB],[pe.SUMMARY,C.SUMMARY],[pe.SUP,C.SUP],[pe.TABLE,C.TABLE],[pe.TBODY,C.TBODY],[pe.TEMPLATE,C.TEMPLATE],[pe.TEXTAREA,C.TEXTAREA],[pe.TFOOT,C.TFOOT],[pe.TD,C.TD],[pe.TH,C.TH],[pe.THEAD,C.THEAD],[pe.TITLE,C.TITLE],[pe.TR,C.TR],[pe.TRACK,C.TRACK],[pe.TT,C.TT],[pe.U,C.U],[pe.UL,C.UL],[pe.SVG,C.SVG],[pe.VAR,C.VAR],[pe.WBR,C.WBR],[pe.XMP,C.XMP]]);function o0(e){var t;return(t=Wee.get(e))!==null&&t!==void 0?t:C.UNKNOWN}const qe=C,Xee={[He.HTML]:new Set([qe.ADDRESS,qe.APPLET,qe.AREA,qe.ARTICLE,qe.ASIDE,qe.BASE,qe.BASEFONT,qe.BGSOUND,qe.BLOCKQUOTE,qe.BODY,qe.BR,qe.BUTTON,qe.CAPTION,qe.CENTER,qe.COL,qe.COLGROUP,qe.DD,qe.DETAILS,qe.DIR,qe.DIV,qe.DL,qe.DT,qe.EMBED,qe.FIELDSET,qe.FIGCAPTION,qe.FIGURE,qe.FOOTER,qe.FORM,qe.FRAME,qe.FRAMESET,qe.H1,qe.H2,qe.H3,qe.H4,qe.H5,qe.H6,qe.HEAD,qe.HEADER,qe.HGROUP,qe.HR,qe.HTML,qe.IFRAME,qe.IMG,qe.INPUT,qe.LI,qe.LINK,qe.LISTING,qe.MAIN,qe.MARQUEE,qe.MENU,qe.META,qe.NAV,qe.NOEMBED,qe.NOFRAMES,qe.NOSCRIPT,qe.OBJECT,qe.OL,qe.P,qe.PARAM,qe.PLAINTEXT,qe.PRE,qe.SCRIPT,qe.SECTION,qe.SELECT,qe.SOURCE,qe.STYLE,qe.SUMMARY,qe.TABLE,qe.TBODY,qe.TD,qe.TEMPLATE,qe.TEXTAREA,qe.TFOOT,qe.TH,qe.THEAD,qe.TITLE,qe.TR,qe.TRACK,qe.UL,qe.WBR,qe.XMP]),[He.MATHML]:new Set([qe.MI,qe.MO,qe.MN,qe.MS,qe.MTEXT,qe.ANNOTATION_XML]),[He.SVG]:new Set([qe.TITLE,qe.FOREIGN_OBJECT,qe.DESC]),[He.XLINK]:new Set,[He.XML]:new Set,[He.XMLNS]:new Set},Uy=new Set([qe.H1,qe.H2,qe.H3,qe.H4,qe.H5,qe.H6]);pe.STYLE,pe.SCRIPT,pe.XMP,pe.IFRAME,pe.NOEMBED,pe.NOFRAMES,pe.PLAINTEXT;var Q;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(Q||(Q={}));const br={DATA:Q.DATA,RCDATA:Q.RCDATA,RAWTEXT:Q.RAWTEXT,SCRIPT_DATA:Q.SCRIPT_DATA,PLAINTEXT:Q.PLAINTEXT,CDATA_SECTION:Q.CDATA_SECTION};function Kee(e){return e>=Y.DIGIT_0&&e<=Y.DIGIT_9}function kd(e){return e>=Y.LATIN_CAPITAL_A&&e<=Y.LATIN_CAPITAL_Z}function Qee(e){return e>=Y.LATIN_SMALL_A&&e<=Y.LATIN_SMALL_Z}function Yo(e){return Qee(e)||kd(e)}function IS(e){return Yo(e)||Kee(e)}function zm(e){return e+32}function SD(e){return e===Y.SPACE||e===Y.LINE_FEED||e===Y.TABULATION||e===Y.FORM_FEED}function OS(e){return SD(e)||e===Y.SOLIDUS||e===Y.GREATER_THAN_SIGN}function Zee(e){return e===Y.NULL?_e.nullCharacterReference:e>1114111?_e.characterReferenceOutsideUnicodeRange:vD(e)?_e.surrogateCharacterReference:TD(e)?_e.noncharacterCharacterReference:wD(e)||e===Y.CARRIAGE_RETURN?_e.controlCharacterReference:null}class Jee{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=Q.DATA,this.returnState=Q.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new zee(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Gee(Bee,(r,a)=>{this.preprocessor.pos=this.entityStartPos+a-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(_e.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(_e.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const a=Zee(r);a&&this._err(a,1)}}:void 0)}_err(t,n=0){var r,a;(a=(r=this.handler).onParseError)===null||a===void 0||a.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:on.START_TAG,tagName:"",tagID:C.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:on.END_TAG,tagName:"",tagID:C.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:on.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:on.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(ED(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const a=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);a[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(_e.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=o0(t.tagName),t.type===on.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(_e.endTagWithAttributes),t.selfClosing&&this._err(_e.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case on.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case on.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case on.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:on.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=SD(t)?on.WHITESPACE_CHARACTER:t===Y.NULL?on.NULL_CHARACTER:on.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(on.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=Q.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ki.Attribute:Ki.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case Q.DATA:{this._stateData(t);break}case Q.RCDATA:{this._stateRcdata(t);break}case Q.RAWTEXT:{this._stateRawtext(t);break}case Q.SCRIPT_DATA:{this._stateScriptData(t);break}case Q.PLAINTEXT:{this._statePlaintext(t);break}case Q.TAG_OPEN:{this._stateTagOpen(t);break}case Q.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case Q.TAG_NAME:{this._stateTagName(t);break}case Q.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case Q.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case Q.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case Q.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case Q.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case Q.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case Q.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case Q.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case Q.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case Q.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case Q.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case Q.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case Q.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case Q.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case Q.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case Q.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case Q.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case Q.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case Q.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case Q.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case Q.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case Q.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case Q.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case Q.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case Q.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case Q.BOGUS_COMMENT:{this._stateBogusComment(t);break}case Q.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case Q.COMMENT_START:{this._stateCommentStart(t);break}case Q.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case Q.COMMENT:{this._stateComment(t);break}case Q.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case Q.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case Q.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case Q.COMMENT_END:{this._stateCommentEnd(t);break}case Q.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case Q.DOCTYPE:{this._stateDoctype(t);break}case Q.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case Q.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case Q.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case Q.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case Q.CDATA_SECTION:{this._stateCdataSection(t);break}case Q.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case Q.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case Q.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case Q.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case Y.LESS_THAN_SIGN:{this.state=Q.TAG_OPEN;break}case Y.AMPERSAND:{this._startCharacterReference();break}case Y.NULL:{this._err(_e.unexpectedNullCharacter),this._emitCodePoint(t);break}case Y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case Y.AMPERSAND:{this._startCharacterReference();break}case Y.LESS_THAN_SIGN:{this.state=Q.RCDATA_LESS_THAN_SIGN;break}case Y.NULL:{this._err(_e.unexpectedNullCharacter),this._emitChars(tr);break}case Y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case Y.LESS_THAN_SIGN:{this.state=Q.RAWTEXT_LESS_THAN_SIGN;break}case Y.NULL:{this._err(_e.unexpectedNullCharacter),this._emitChars(tr);break}case Y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case Y.LESS_THAN_SIGN:{this.state=Q.SCRIPT_DATA_LESS_THAN_SIGN;break}case Y.NULL:{this._err(_e.unexpectedNullCharacter),this._emitChars(tr);break}case Y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case Y.NULL:{this._err(_e.unexpectedNullCharacter),this._emitChars(tr);break}case Y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Yo(t))this._createStartTagToken(),this.state=Q.TAG_NAME,this._stateTagName(t);else switch(t){case Y.EXCLAMATION_MARK:{this.state=Q.MARKUP_DECLARATION_OPEN;break}case Y.SOLIDUS:{this.state=Q.END_TAG_OPEN;break}case Y.QUESTION_MARK:{this._err(_e.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(t);break}case Y.EOF:{this._err(_e.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(_e.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=Q.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Yo(t))this._createEndTagToken(),this.state=Q.TAG_NAME,this._stateTagName(t);else switch(t){case Y.GREATER_THAN_SIGN:{this._err(_e.missingEndTagName),this.state=Q.DATA;break}case Y.EOF:{this._err(_e.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(_e.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=Q.BEFORE_ATTRIBUTE_NAME;break}case Y.SOLIDUS:{this.state=Q.SELF_CLOSING_START_TAG;break}case Y.GREATER_THAN_SIGN:{this.state=Q.DATA,this.emitCurrentTagToken();break}case Y.NULL:{this._err(_e.unexpectedNullCharacter),n.tagName+=tr;break}case Y.EOF:{this._err(_e.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(kd(t)?zm(t):t)}}_stateRcdataLessThanSign(t){t===Y.SOLIDUS?this.state=Q.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=Q.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Yo(t)?(this.state=Q.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=Q.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Q.BEFORE_ATTRIBUTE_NAME,!1;case Y.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Q.SELF_CLOSING_START_TAG,!1;case Y.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Q.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=Q.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===Y.SOLIDUS?this.state=Q.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=Q.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Yo(t)?(this.state=Q.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=Q.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=Q.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case Y.SOLIDUS:{this.state=Q.SCRIPT_DATA_END_TAG_OPEN;break}case Y.EXCLAMATION_MARK:{this.state=Q.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=Q.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Yo(t)?(this.state=Q.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=Q.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=Q.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===Y.HYPHEN_MINUS?(this.state=Q.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=Q.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===Y.HYPHEN_MINUS?(this.state=Q.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=Q.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case Y.HYPHEN_MINUS:{this.state=Q.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case Y.NULL:{this._err(_e.unexpectedNullCharacter),this._emitChars(tr);break}case Y.EOF:{this._err(_e.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case Y.HYPHEN_MINUS:{this.state=Q.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case Y.NULL:{this._err(_e.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_ESCAPED,this._emitChars(tr);break}case Y.EOF:{this._err(_e.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=Q.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case Y.HYPHEN_MINUS:{this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case Y.GREATER_THAN_SIGN:{this.state=Q.SCRIPT_DATA,this._emitChars(">");break}case Y.NULL:{this._err(_e.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_ESCAPED,this._emitChars(tr);break}case Y.EOF:{this._err(_e.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=Q.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===Y.SOLIDUS?this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Yo(t)?(this._emitChars("<"),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Yo(t)?(this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Ra.SCRIPT,!1)&&OS(this.preprocessor.peek(Ra.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ra.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case Y.HYPHEN_MINUS:{this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case Y.NULL:{this._err(_e.unexpectedNullCharacter),this._emitChars(tr);break}case Y.EOF:{this._err(_e.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case Y.HYPHEN_MINUS:{this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case Y.NULL:{this._err(_e.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(tr);break}case Y.EOF:{this._err(_e.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case Y.HYPHEN_MINUS:{this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case Y.GREATER_THAN_SIGN:{this.state=Q.SCRIPT_DATA,this._emitChars(">");break}case Y.NULL:{this._err(_e.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(tr);break}case Y.EOF:{this._err(_e.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===Y.SOLIDUS?(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Ra.SCRIPT,!1)&&OS(this.preprocessor.peek(Ra.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ra.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=Q.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.SOLIDUS:case Y.GREATER_THAN_SIGN:case Y.EOF:{this.state=Q.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case Y.EQUALS_SIGN:{this._err(_e.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=Q.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=Q.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:case Y.SOLIDUS:case Y.GREATER_THAN_SIGN:case Y.EOF:{this._leaveAttrName(),this.state=Q.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case Y.EQUALS_SIGN:{this._leaveAttrName(),this.state=Q.BEFORE_ATTRIBUTE_VALUE;break}case Y.QUOTATION_MARK:case Y.APOSTROPHE:case Y.LESS_THAN_SIGN:{this._err(_e.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case Y.NULL:{this._err(_e.unexpectedNullCharacter),this.currentAttr.name+=tr;break}default:this.currentAttr.name+=String.fromCodePoint(kd(t)?zm(t):t)}}_stateAfterAttributeName(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.SOLIDUS:{this.state=Q.SELF_CLOSING_START_TAG;break}case Y.EQUALS_SIGN:{this.state=Q.BEFORE_ATTRIBUTE_VALUE;break}case Y.GREATER_THAN_SIGN:{this.state=Q.DATA,this.emitCurrentTagToken();break}case Y.EOF:{this._err(_e.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=Q.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.QUOTATION_MARK:{this.state=Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{this.state=Q.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case Y.GREATER_THAN_SIGN:{this._err(_e.missingAttributeValue),this.state=Q.DATA,this.emitCurrentTagToken();break}default:this.state=Q.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case Y.QUOTATION_MARK:{this.state=Q.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case Y.AMPERSAND:{this._startCharacterReference();break}case Y.NULL:{this._err(_e.unexpectedNullCharacter),this.currentAttr.value+=tr;break}case Y.EOF:{this._err(_e.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case Y.APOSTROPHE:{this.state=Q.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case Y.AMPERSAND:{this._startCharacterReference();break}case Y.NULL:{this._err(_e.unexpectedNullCharacter),this.currentAttr.value+=tr;break}case Y.EOF:{this._err(_e.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this._leaveAttrValue(),this.state=Q.BEFORE_ATTRIBUTE_NAME;break}case Y.AMPERSAND:{this._startCharacterReference();break}case Y.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=Q.DATA,this.emitCurrentTagToken();break}case Y.NULL:{this._err(_e.unexpectedNullCharacter),this.currentAttr.value+=tr;break}case Y.QUOTATION_MARK:case Y.APOSTROPHE:case Y.LESS_THAN_SIGN:case Y.EQUALS_SIGN:case Y.GRAVE_ACCENT:{this._err(_e.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case Y.EOF:{this._err(_e.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this._leaveAttrValue(),this.state=Q.BEFORE_ATTRIBUTE_NAME;break}case Y.SOLIDUS:{this._leaveAttrValue(),this.state=Q.SELF_CLOSING_START_TAG;break}case Y.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=Q.DATA,this.emitCurrentTagToken();break}case Y.EOF:{this._err(_e.eofInTag),this._emitEOFToken();break}default:this._err(_e.missingWhitespaceBetweenAttributes),this.state=Q.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case Y.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=Q.DATA,this.emitCurrentTagToken();break}case Y.EOF:{this._err(_e.eofInTag),this._emitEOFToken();break}default:this._err(_e.unexpectedSolidusInTag),this.state=Q.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case Y.GREATER_THAN_SIGN:{this.state=Q.DATA,this.emitCurrentComment(n);break}case Y.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case Y.NULL:{this._err(_e.unexpectedNullCharacter),n.data+=tr;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Ra.DASH_DASH,!0)?(this._createCommentToken(Ra.DASH_DASH.length+1),this.state=Q.COMMENT_START):this._consumeSequenceIfMatch(Ra.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ra.DOCTYPE.length+1),this.state=Q.DOCTYPE):this._consumeSequenceIfMatch(Ra.CDATA_START,!0)?this.inForeignNode?this.state=Q.CDATA_SECTION:(this._err(_e.cdataInHtmlContent),this._createCommentToken(Ra.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=Q.BOGUS_COMMENT):this._ensureHibernation()||(this._err(_e.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case Y.HYPHEN_MINUS:{this.state=Q.COMMENT_START_DASH;break}case Y.GREATER_THAN_SIGN:{this._err(_e.abruptClosingOfEmptyComment),this.state=Q.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=Q.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case Y.HYPHEN_MINUS:{this.state=Q.COMMENT_END;break}case Y.GREATER_THAN_SIGN:{this._err(_e.abruptClosingOfEmptyComment),this.state=Q.DATA,this.emitCurrentComment(n);break}case Y.EOF:{this._err(_e.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=Q.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case Y.HYPHEN_MINUS:{this.state=Q.COMMENT_END_DASH;break}case Y.LESS_THAN_SIGN:{n.data+="<",this.state=Q.COMMENT_LESS_THAN_SIGN;break}case Y.NULL:{this._err(_e.unexpectedNullCharacter),n.data+=tr;break}case Y.EOF:{this._err(_e.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case Y.EXCLAMATION_MARK:{n.data+="!",this.state=Q.COMMENT_LESS_THAN_SIGN_BANG;break}case Y.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=Q.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===Y.HYPHEN_MINUS?this.state=Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Q.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===Y.HYPHEN_MINUS?this.state=Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Q.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==Y.GREATER_THAN_SIGN&&t!==Y.EOF&&this._err(_e.nestedComment),this.state=Q.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case Y.HYPHEN_MINUS:{this.state=Q.COMMENT_END;break}case Y.EOF:{this._err(_e.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=Q.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case Y.GREATER_THAN_SIGN:{this.state=Q.DATA,this.emitCurrentComment(n);break}case Y.EXCLAMATION_MARK:{this.state=Q.COMMENT_END_BANG;break}case Y.HYPHEN_MINUS:{n.data+="-";break}case Y.EOF:{this._err(_e.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=Q.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case Y.HYPHEN_MINUS:{n.data+="--!",this.state=Q.COMMENT_END_DASH;break}case Y.GREATER_THAN_SIGN:{this._err(_e.incorrectlyClosedComment),this.state=Q.DATA,this.emitCurrentComment(n);break}case Y.EOF:{this._err(_e.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=Q.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=Q.BEFORE_DOCTYPE_NAME;break}case Y.GREATER_THAN_SIGN:{this.state=Q.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case Y.EOF:{this._err(_e.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(_e.missingWhitespaceBeforeDoctypeName),this.state=Q.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(kd(t))this._createDoctypeToken(String.fromCharCode(zm(t))),this.state=Q.DOCTYPE_NAME;else switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.NULL:{this._err(_e.unexpectedNullCharacter),this._createDoctypeToken(tr),this.state=Q.DOCTYPE_NAME;break}case Y.GREATER_THAN_SIGN:{this._err(_e.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=Q.DATA;break}case Y.EOF:{this._err(_e.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=Q.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=Q.AFTER_DOCTYPE_NAME;break}case Y.GREATER_THAN_SIGN:{this.state=Q.DATA,this.emitCurrentDoctype(n);break}case Y.NULL:{this._err(_e.unexpectedNullCharacter),n.name+=tr;break}case Y.EOF:{this._err(_e.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(kd(t)?zm(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.GREATER_THAN_SIGN:{this.state=Q.DATA,this.emitCurrentDoctype(n);break}case Y.EOF:{this._err(_e.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Ra.PUBLIC,!1)?this.state=Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ra.SYSTEM,!1)?this.state=Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(_e.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case Y.QUOTATION_MARK:{this._err(_e.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{this._err(_e.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case Y.GREATER_THAN_SIGN:{this._err(_e.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(n);break}case Y.EOF:{this._err(_e.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(_e.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.QUOTATION_MARK:{n.publicId="",this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{n.publicId="",this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case Y.GREATER_THAN_SIGN:{this._err(_e.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(n);break}case Y.EOF:{this._err(_e.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(_e.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case Y.QUOTATION_MARK:{this.state=Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case Y.NULL:{this._err(_e.unexpectedNullCharacter),n.publicId+=tr;break}case Y.GREATER_THAN_SIGN:{this._err(_e.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=Q.DATA;break}case Y.EOF:{this._err(_e.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case Y.APOSTROPHE:{this.state=Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case Y.NULL:{this._err(_e.unexpectedNullCharacter),n.publicId+=tr;break}case Y.GREATER_THAN_SIGN:{this._err(_e.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=Q.DATA;break}case Y.EOF:{this._err(_e.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case Y.GREATER_THAN_SIGN:{this.state=Q.DATA,this.emitCurrentDoctype(n);break}case Y.QUOTATION_MARK:{this._err(_e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{this._err(_e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Y.EOF:{this._err(_e.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(_e.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=Q.DATA;break}case Y.QUOTATION_MARK:{n.systemId="",this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{n.systemId="",this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Y.EOF:{this._err(_e.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(_e.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case Y.QUOTATION_MARK:{this._err(_e.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{this._err(_e.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Y.GREATER_THAN_SIGN:{this._err(_e.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(n);break}case Y.EOF:{this._err(_e.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(_e.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.QUOTATION_MARK:{n.systemId="",this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{n.systemId="",this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Y.GREATER_THAN_SIGN:{this._err(_e.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(n);break}case Y.EOF:{this._err(_e.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(_e.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case Y.QUOTATION_MARK:{this.state=Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case Y.NULL:{this._err(_e.unexpectedNullCharacter),n.systemId+=tr;break}case Y.GREATER_THAN_SIGN:{this._err(_e.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=Q.DATA;break}case Y.EOF:{this._err(_e.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case Y.APOSTROPHE:{this.state=Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case Y.NULL:{this._err(_e.unexpectedNullCharacter),n.systemId+=tr;break}case Y.GREATER_THAN_SIGN:{this._err(_e.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=Q.DATA;break}case Y.EOF:{this._err(_e.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=Q.DATA;break}case Y.EOF:{this._err(_e.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(_e.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case Y.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=Q.DATA;break}case Y.NULL:{this._err(_e.unexpectedNullCharacter);break}case Y.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case Y.RIGHT_SQUARE_BRACKET:{this.state=Q.CDATA_SECTION_BRACKET;break}case Y.EOF:{this._err(_e.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===Y.RIGHT_SQUARE_BRACKET?this.state=Q.CDATA_SECTION_END:(this._emitChars("]"),this.state=Q.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case Y.GREATER_THAN_SIGN:{this.state=Q.DATA;break}case Y.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=Q.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(Y.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&IS(this.preprocessor.peek(1))?Q.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){IS(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===Y.SEMICOLON&&this._err(_e.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const CD=new Set([C.DD,C.DT,C.LI,C.OPTGROUP,C.OPTION,C.P,C.RB,C.RP,C.RT,C.RTC]),LS=new Set([...CD,C.CAPTION,C.COLGROUP,C.TBODY,C.TD,C.TFOOT,C.TH,C.THEAD,C.TR]),Up=new Set([C.APPLET,C.CAPTION,C.HTML,C.MARQUEE,C.OBJECT,C.TABLE,C.TD,C.TEMPLATE,C.TH]),ete=new Set([...Up,C.OL,C.UL]),tte=new Set([...Up,C.BUTTON]),PS=new Set([C.ANNOTATION_XML,C.MI,C.MN,C.MO,C.MS,C.MTEXT]),jS=new Set([C.DESC,C.FOREIGN_OBJECT,C.TITLE]),nte=new Set([C.TR,C.TEMPLATE,C.HTML]),rte=new Set([C.TBODY,C.TFOOT,C.THEAD,C.TEMPLATE,C.HTML]),ate=new Set([C.TABLE,C.TEMPLATE,C.HTML]),ste=new Set([C.TD,C.TH]);class ite{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=C.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===C.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===He.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const a=this._indexOf(t)+1;this.items.splice(a,0,n),this.tagIDs.splice(a,0,r),this.stackTop++,a===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,a===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==He.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Uy,He.HTML)}popUntilTableCellPopped(){this.popUntilPopped(ste,He.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(ate,He.HTML)}clearBackToTableBodyContext(){this.clearBackTo(rte,He.HTML)}clearBackToTableRowContext(){this.clearBackTo(nte,He.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===C.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===C.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const a=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case He.HTML:{if(a===t)return!0;if(n.has(a))return!1;break}case He.SVG:{if(jS.has(a))return!1;break}case He.MATHML:{if(PS.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Up)}hasInListItemScope(t){return this.hasInDynamicScope(t,ete)}hasInButtonScope(t){return this.hasInDynamicScope(t,tte)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case He.HTML:{if(Uy.has(n))return!0;if(Up.has(n))return!1;break}case He.SVG:{if(jS.has(n))return!1;break}case He.MATHML:{if(PS.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===He.HTML)switch(this.tagIDs[n]){case t:return!0;case C.TABLE:case C.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===He.HTML)switch(this.tagIDs[t]){case C.TBODY:case C.THEAD:case C.TFOOT:return!0;case C.TABLE:case C.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===He.HTML)switch(this.tagIDs[n]){case t:return!0;case C.OPTION:case C.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&CD.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&LS.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&LS.has(this.currentTagId);)this.pop()}}const cx=3;var li;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(li||(li={}));const zS={type:li.Marker};class ote{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],a=n.length,s=this.treeAdapter.getTagName(t),o=this.treeAdapter.getNamespaceURI(t);for(let u=0;u<this.entries.length;u++){const c=this.entries[u];if(c.type===li.Marker)break;const{element:d}=c;if(this.treeAdapter.getTagName(d)===s&&this.treeAdapter.getNamespaceURI(d)===o){const m=this.treeAdapter.getAttrList(d);m.length===a&&r.push({idx:u,attrs:m})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<cx)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<cx)return;const a=new Map(n.map(o=>[o.name,o.value]));let s=0;for(let o=0;o<r.length;o++){const u=r[o];u.attrs.every(c=>a.get(c.name)===c.value)&&(s+=1,s>=cx&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(zS)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:li.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:li.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(zS);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===li.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===li.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===li.Element&&n.element===t)}}const Wo={createDocument(){return{nodeName:"#document",mode:ws.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const a=e.childNodes.find(s=>s.nodeName==="#documentType");if(a)a.name=t,a.publicId=n,a.systemId=r;else{const s={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Wo.appendChild(e,s)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Wo.isTextNode(n)){n.value+=t;return}}Wo.appendChild(e,Wo.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Wo.isTextNode(r)?r.value+=t:Wo.insertBefore(e,Wo.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},kD="html",lte="about:legacy-compat",ute="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",AD=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],cte=[...AD,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],dte=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),ND=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],fte=[...ND,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function BS(e,t){return t.some(n=>e.startsWith(n))}function hte(e){return e.name===kD&&e.publicId===null&&(e.systemId===null||e.systemId===lte)}function mte(e){if(e.name!==kD)return ws.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===ute)return ws.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),dte.has(n))return ws.QUIRKS;let r=t===null?cte:AD;if(BS(n,r))return ws.QUIRKS;if(r=t===null?ND:fte,BS(n,r))return ws.LIMITED_QUIRKS}return ws.NO_QUIRKS}const FS={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},pte="definitionurl",gte="definitionURL",bte=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),xte=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:He.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:He.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:He.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:He.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:He.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:He.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:He.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:He.XML}],["xml:space",{prefix:"xml",name:"space",namespace:He.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:He.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:He.XMLNS}]]),yte=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),vte=new Set([C.B,C.BIG,C.BLOCKQUOTE,C.BODY,C.BR,C.CENTER,C.CODE,C.DD,C.DIV,C.DL,C.DT,C.EM,C.EMBED,C.H1,C.H2,C.H3,C.H4,C.H5,C.H6,C.HEAD,C.HR,C.I,C.IMG,C.LI,C.LISTING,C.MENU,C.META,C.NOBR,C.OL,C.P,C.PRE,C.RUBY,C.S,C.SMALL,C.SPAN,C.STRONG,C.STRIKE,C.SUB,C.SUP,C.TABLE,C.TT,C.U,C.UL,C.VAR]);function wte(e){const t=e.tagID;return t===C.FONT&&e.attrs.some(({name:r})=>r===Zl.COLOR||r===Zl.SIZE||r===Zl.FACE)||vte.has(t)}function _D(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===pte){e.attrs[t].name=gte;break}}function RD(e){for(let t=0;t<e.attrs.length;t++){const n=bte.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function y3(e){for(let t=0;t<e.attrs.length;t++){const n=xte.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Tte(e){const t=yte.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=o0(e.tagName))}function Ete(e,t){return t===He.MATHML&&(e===C.MI||e===C.MO||e===C.MN||e===C.MS||e===C.MTEXT)}function Ste(e,t,n){if(t===He.MATHML&&e===C.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Zl.ENCODING){const a=n[r].value.toLowerCase();return a===FS.TEXT_HTML||a===FS.APPLICATION_XML}}return t===He.SVG&&(e===C.FOREIGN_OBJECT||e===C.DESC||e===C.TITLE)}function Cte(e,t,n,r){return(!r||r===He.HTML)&&Ste(e,t,n)||(!r||r===He.MATHML)&&Ete(e,t)}const kte="hidden",Ate=8,Nte=3;var te;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(te||(te={}));const _te={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},MD=new Set([C.TABLE,C.TBODY,C.TFOOT,C.THEAD,C.TR]),HS={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Wo,onParseError:null};class US{constructor(t,n,r=null,a=null){this.fragmentContext=r,this.scriptHandler=a,this.currentToken=null,this.stopped=!1,this.insertionMode=te.INITIAL,this.originalInsertionMode=te.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...HS,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new Jee(this.options,this),this.activeFormattingElements=new ote(this.treeAdapter),this.fragmentContextID=r?o0(this.treeAdapter.getTagName(r)):C.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new ite(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...HS,...n};t??(t=r.treeAdapter.createElement(pe.TEMPLATE,He.HTML,[]));const a=r.treeAdapter.createElement("documentmock",He.HTML,[]),s=new this(r,a,t);return s.fragmentContextID===C.TEMPLATE&&s.tmplInsertionModeStack.unshift(te.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var a;if(!this.onParseError)return;const s=(a=t.location)!==null&&a!==void 0?a:_te,o={code:n,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:r?s.startLine:s.endLine,endCol:r?s.startCol:s.endCol,endOffset:r?s.startOffset:s.endOffset};this.onParseError(o)}onItemPush(t,n,r){var a,s;(s=(a=this.treeAdapter).onItemPush)===null||s===void 0||s.call(a,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(a=(r=this.treeAdapter).onItemPop)===null||a===void 0||a.call(r,t,this.openElements.current),n){let s,o;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,o=this.fragmentContextID):{current:s,currentTagId:o}=this.openElements,this._setContextModes(s,o)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===He.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,He.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=te.TEXT}switchToPlaintextParsing(){this.insertionMode=te.TEXT,this.originalInsertionMode=te.IN_BODY,this.tokenizer.state=br.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===pe.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==He.HTML))switch(this.fragmentContextID){case C.TITLE:case C.TEXTAREA:{this.tokenizer.state=br.RCDATA;break}case C.STYLE:case C.XMP:case C.IFRAME:case C.NOEMBED:case C.NOFRAMES:case C.NOSCRIPT:{this.tokenizer.state=br.RAWTEXT;break}case C.SCRIPT:{this.tokenizer.state=br.SCRIPT_DATA;break}case C.PLAINTEXT:{this.tokenizer.state=br.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",a=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,a),t.location){const o=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));o&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,He.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,He.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(pe.HTML,He.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,C.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const a=this.treeAdapter.getChildNodes(n),s=r?a.lastIndexOf(r):a.length,o=a[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:c,endCol:d,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:c,endCol:d,endOffset:m})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,a=this.treeAdapter.getTagName(t),s=n.type===on.END_TAG&&a===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,s)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===C.SVG&&this.treeAdapter.getTagName(n)===pe.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===He.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===C.MGLYPH||t.tagID===C.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,He.HTML)}_processToken(t){switch(t.type){case on.CHARACTER:{this.onCharacter(t);break}case on.NULL_CHARACTER:{this.onNullCharacter(t);break}case on.COMMENT:{this.onComment(t);break}case on.DOCTYPE:{this.onDoctype(t);break}case on.START_TAG:{this._processStartTag(t);break}case on.END_TAG:{this.onEndTag(t);break}case on.EOF:{this.onEof(t);break}case on.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const a=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return Cte(t,a,s,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(a=>a.type===li.Marker||this.openElements.contains(a.element)),r=n===-1?t-1:n-1;for(let a=r;a>=0;a--){const s=this.activeFormattingElements.entries[a];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=te.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(C.P),this.openElements.popUntilTagNamePopped(C.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case C.TR:{this.insertionMode=te.IN_ROW;return}case C.TBODY:case C.THEAD:case C.TFOOT:{this.insertionMode=te.IN_TABLE_BODY;return}case C.CAPTION:{this.insertionMode=te.IN_CAPTION;return}case C.COLGROUP:{this.insertionMode=te.IN_COLUMN_GROUP;return}case C.TABLE:{this.insertionMode=te.IN_TABLE;return}case C.BODY:{this.insertionMode=te.IN_BODY;return}case C.FRAMESET:{this.insertionMode=te.IN_FRAMESET;return}case C.SELECT:{this._resetInsertionModeForSelect(t);return}case C.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case C.HTML:{this.insertionMode=this.headElement?te.AFTER_HEAD:te.BEFORE_HEAD;return}case C.TD:case C.TH:{if(t>0){this.insertionMode=te.IN_CELL;return}break}case C.HEAD:{if(t>0){this.insertionMode=te.IN_HEAD;return}break}}this.insertionMode=te.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===C.TEMPLATE)break;if(r===C.TABLE){this.insertionMode=te.IN_SELECT_IN_TABLE;return}}this.insertionMode=te.IN_SELECT}_isElementCausesFosterParenting(t){return MD.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case C.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===He.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case C.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return Xee[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){sre(this,t);return}switch(this.insertionMode){case te.INITIAL:{hd(this,t);break}case te.BEFORE_HTML:{Od(this,t);break}case te.BEFORE_HEAD:{Ld(this,t);break}case te.IN_HEAD:{Pd(this,t);break}case te.IN_HEAD_NO_SCRIPT:{jd(this,t);break}case te.AFTER_HEAD:{zd(this,t);break}case te.IN_BODY:case te.IN_CAPTION:case te.IN_CELL:case te.IN_TEMPLATE:{ID(this,t);break}case te.TEXT:case te.IN_SELECT:case te.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case te.IN_TABLE:case te.IN_TABLE_BODY:case te.IN_ROW:{dx(this,t);break}case te.IN_TABLE_TEXT:{BD(this,t);break}case te.IN_COLUMN_GROUP:{$p(this,t);break}case te.AFTER_BODY:{qp(this,t);break}case te.AFTER_AFTER_BODY:{up(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){are(this,t);return}switch(this.insertionMode){case te.INITIAL:{hd(this,t);break}case te.BEFORE_HTML:{Od(this,t);break}case te.BEFORE_HEAD:{Ld(this,t);break}case te.IN_HEAD:{Pd(this,t);break}case te.IN_HEAD_NO_SCRIPT:{jd(this,t);break}case te.AFTER_HEAD:{zd(this,t);break}case te.TEXT:{this._insertCharacters(t);break}case te.IN_TABLE:case te.IN_TABLE_BODY:case te.IN_ROW:{dx(this,t);break}case te.IN_COLUMN_GROUP:{$p(this,t);break}case te.AFTER_BODY:{qp(this,t);break}case te.AFTER_AFTER_BODY:{up(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){$y(this,t);return}switch(this.insertionMode){case te.INITIAL:case te.BEFORE_HTML:case te.BEFORE_HEAD:case te.IN_HEAD:case te.IN_HEAD_NO_SCRIPT:case te.AFTER_HEAD:case te.IN_BODY:case te.IN_TABLE:case te.IN_CAPTION:case te.IN_COLUMN_GROUP:case te.IN_TABLE_BODY:case te.IN_ROW:case te.IN_CELL:case te.IN_SELECT:case te.IN_SELECT_IN_TABLE:case te.IN_TEMPLATE:case te.IN_FRAMESET:case te.AFTER_FRAMESET:{$y(this,t);break}case te.IN_TABLE_TEXT:{md(this,t);break}case te.AFTER_BODY:{Pte(this,t);break}case te.AFTER_AFTER_BODY:case te.AFTER_AFTER_FRAMESET:{jte(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case te.INITIAL:{zte(this,t);break}case te.BEFORE_HEAD:case te.IN_HEAD:case te.IN_HEAD_NO_SCRIPT:case te.AFTER_HEAD:{this._err(t,_e.misplacedDoctype);break}case te.IN_TABLE_TEXT:{md(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,_e.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?ire(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case te.INITIAL:{hd(this,t);break}case te.BEFORE_HTML:{Bte(this,t);break}case te.BEFORE_HEAD:{Hte(this,t);break}case te.IN_HEAD:{Ws(this,t);break}case te.IN_HEAD_NO_SCRIPT:{qte(this,t);break}case te.AFTER_HEAD:{Gte(this,t);break}case te.IN_BODY:{la(this,t);break}case te.IN_TABLE:{$c(this,t);break}case te.IN_TABLE_TEXT:{md(this,t);break}case te.IN_CAPTION:{Une(this,t);break}case te.IN_COLUMN_GROUP:{T3(this,t);break}case te.IN_TABLE_BODY:{Z1(this,t);break}case te.IN_ROW:{J1(this,t);break}case te.IN_CELL:{Vne(this,t);break}case te.IN_SELECT:{UD(this,t);break}case te.IN_SELECT_IN_TABLE:{Yne(this,t);break}case te.IN_TEMPLATE:{Xne(this,t);break}case te.AFTER_BODY:{Qne(this,t);break}case te.IN_FRAMESET:{Zne(this,t);break}case te.AFTER_FRAMESET:{ere(this,t);break}case te.AFTER_AFTER_BODY:{nre(this,t);break}case te.AFTER_AFTER_FRAMESET:{rre(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?ore(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case te.INITIAL:{hd(this,t);break}case te.BEFORE_HTML:{Fte(this,t);break}case te.BEFORE_HEAD:{Ute(this,t);break}case te.IN_HEAD:{$te(this,t);break}case te.IN_HEAD_NO_SCRIPT:{Vte(this,t);break}case te.AFTER_HEAD:{Yte(this,t);break}case te.IN_BODY:{Q1(this,t);break}case te.TEXT:{Dne(this,t);break}case te.IN_TABLE:{lf(this,t);break}case te.IN_TABLE_TEXT:{md(this,t);break}case te.IN_CAPTION:{$ne(this,t);break}case te.IN_COLUMN_GROUP:{qne(this,t);break}case te.IN_TABLE_BODY:{qy(this,t);break}case te.IN_ROW:{HD(this,t);break}case te.IN_CELL:{Gne(this,t);break}case te.IN_SELECT:{$D(this,t);break}case te.IN_SELECT_IN_TABLE:{Wne(this,t);break}case te.IN_TEMPLATE:{Kne(this,t);break}case te.AFTER_BODY:{VD(this,t);break}case te.IN_FRAMESET:{Jne(this,t);break}case te.AFTER_FRAMESET:{tre(this,t);break}case te.AFTER_AFTER_BODY:{up(this,t);break}}}onEof(t){switch(this.insertionMode){case te.INITIAL:{hd(this,t);break}case te.BEFORE_HTML:{Od(this,t);break}case te.BEFORE_HEAD:{Ld(this,t);break}case te.IN_HEAD:{Pd(this,t);break}case te.IN_HEAD_NO_SCRIPT:{jd(this,t);break}case te.AFTER_HEAD:{zd(this,t);break}case te.IN_BODY:case te.IN_TABLE:case te.IN_CAPTION:case te.IN_COLUMN_GROUP:case te.IN_TABLE_BODY:case te.IN_ROW:case te.IN_CELL:case te.IN_SELECT:case te.IN_SELECT_IN_TABLE:{jD(this,t);break}case te.TEXT:{Ine(this,t);break}case te.IN_TABLE_TEXT:{md(this,t);break}case te.IN_TEMPLATE:{qD(this,t);break}case te.AFTER_BODY:case te.IN_FRAMESET:case te.AFTER_FRAMESET:case te.AFTER_AFTER_BODY:case te.AFTER_AFTER_FRAMESET:{w3(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===Y.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case te.IN_HEAD:case te.IN_HEAD_NO_SCRIPT:case te.AFTER_HEAD:case te.TEXT:case te.IN_COLUMN_GROUP:case te.IN_SELECT:case te.IN_SELECT_IN_TABLE:case te.IN_FRAMESET:case te.AFTER_FRAMESET:{this._insertCharacters(t);break}case te.IN_BODY:case te.IN_CAPTION:case te.IN_CELL:case te.IN_TEMPLATE:case te.AFTER_BODY:case te.AFTER_AFTER_BODY:case te.AFTER_AFTER_FRAMESET:{DD(this,t);break}case te.IN_TABLE:case te.IN_TABLE_BODY:case te.IN_ROW:{dx(this,t);break}case te.IN_TABLE_TEXT:{zD(this,t);break}}}}function Rte(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):PD(e,t),n}function Mte(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const a=e.openElements.items[r];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[r])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Dte(e,t,n){let r=t,a=e.openElements.getCommonAncestor(t);for(let s=0,o=a;o!==n;s++,o=a){a=e.openElements.getCommonAncestor(o);const u=e.activeFormattingElements.getElementEntry(o),c=u&&s>=Nte;!u||c?(c&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(o)):(o=Ite(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function Ite(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Ote(e,t,n){const r=e.treeAdapter.getTagName(t),a=o0(r);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);a===C.TEMPLATE&&s===He.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Lte(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,s=e.treeAdapter.createElement(a.tagName,r,a.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s,a.tagID)}function v3(e,t){for(let n=0;n<Ate;n++){const r=Rte(e,t);if(!r)break;const a=Mte(e,r);if(!a)break;e.activeFormattingElements.bookmark=r;const s=Dte(e,a,r.element),o=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),o&&Ote(e,o,s),Lte(e,a,r)}}function $y(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Pte(e,t){e._appendCommentNode(t,e.openElements.items[0])}function jte(e,t){e._appendCommentNode(t,e.document)}function w3(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(r);if(a&&!a.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const s=e.openElements.items[1],o=e.treeAdapter.getNodeSourceCodeLocation(s);o&&!o.endTag&&e._setEndLocation(s,t)}}}}function zte(e,t){e._setDocumentType(t);const n=t.forceQuirks?ws.QUIRKS:mte(t);hte(t)||e._err(t,_e.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=te.BEFORE_HTML}function hd(e,t){e._err(t,_e.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ws.QUIRKS),e.insertionMode=te.BEFORE_HTML,e._processToken(t)}function Bte(e,t){t.tagID===C.HTML?(e._insertElement(t,He.HTML),e.insertionMode=te.BEFORE_HEAD):Od(e,t)}function Fte(e,t){const n=t.tagID;(n===C.HTML||n===C.HEAD||n===C.BODY||n===C.BR)&&Od(e,t)}function Od(e,t){e._insertFakeRootElement(),e.insertionMode=te.BEFORE_HEAD,e._processToken(t)}function Hte(e,t){switch(t.tagID){case C.HTML:{la(e,t);break}case C.HEAD:{e._insertElement(t,He.HTML),e.headElement=e.openElements.current,e.insertionMode=te.IN_HEAD;break}default:Ld(e,t)}}function Ute(e,t){const n=t.tagID;n===C.HEAD||n===C.BODY||n===C.HTML||n===C.BR?Ld(e,t):e._err(t,_e.endTagWithoutMatchingOpenElement)}function Ld(e,t){e._insertFakeElement(pe.HEAD,C.HEAD),e.headElement=e.openElements.current,e.insertionMode=te.IN_HEAD,e._processToken(t)}function Ws(e,t){switch(t.tagID){case C.HTML:{la(e,t);break}case C.BASE:case C.BASEFONT:case C.BGSOUND:case C.LINK:case C.META:{e._appendElement(t,He.HTML),t.ackSelfClosing=!0;break}case C.TITLE:{e._switchToTextParsing(t,br.RCDATA);break}case C.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,br.RAWTEXT):(e._insertElement(t,He.HTML),e.insertionMode=te.IN_HEAD_NO_SCRIPT);break}case C.NOFRAMES:case C.STYLE:{e._switchToTextParsing(t,br.RAWTEXT);break}case C.SCRIPT:{e._switchToTextParsing(t,br.SCRIPT_DATA);break}case C.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=te.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(te.IN_TEMPLATE);break}case C.HEAD:{e._err(t,_e.misplacedStartTagForHeadElement);break}default:Pd(e,t)}}function $te(e,t){switch(t.tagID){case C.HEAD:{e.openElements.pop(),e.insertionMode=te.AFTER_HEAD;break}case C.BODY:case C.BR:case C.HTML:{Pd(e,t);break}case C.TEMPLATE:{xu(e,t);break}default:e._err(t,_e.endTagWithoutMatchingOpenElement)}}function xu(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==C.TEMPLATE&&e._err(t,_e.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(C.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,_e.endTagWithoutMatchingOpenElement)}function Pd(e,t){e.openElements.pop(),e.insertionMode=te.AFTER_HEAD,e._processToken(t)}function qte(e,t){switch(t.tagID){case C.HTML:{la(e,t);break}case C.BASEFONT:case C.BGSOUND:case C.HEAD:case C.LINK:case C.META:case C.NOFRAMES:case C.STYLE:{Ws(e,t);break}case C.NOSCRIPT:{e._err(t,_e.nestedNoscriptInHead);break}default:jd(e,t)}}function Vte(e,t){switch(t.tagID){case C.NOSCRIPT:{e.openElements.pop(),e.insertionMode=te.IN_HEAD;break}case C.BR:{jd(e,t);break}default:e._err(t,_e.endTagWithoutMatchingOpenElement)}}function jd(e,t){const n=t.type===on.EOF?_e.openElementsLeftAfterEof:_e.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=te.IN_HEAD,e._processToken(t)}function Gte(e,t){switch(t.tagID){case C.HTML:{la(e,t);break}case C.BODY:{e._insertElement(t,He.HTML),e.framesetOk=!1,e.insertionMode=te.IN_BODY;break}case C.FRAMESET:{e._insertElement(t,He.HTML),e.insertionMode=te.IN_FRAMESET;break}case C.BASE:case C.BASEFONT:case C.BGSOUND:case C.LINK:case C.META:case C.NOFRAMES:case C.SCRIPT:case C.STYLE:case C.TEMPLATE:case C.TITLE:{e._err(t,_e.abandonedHeadElementChild),e.openElements.push(e.headElement,C.HEAD),Ws(e,t),e.openElements.remove(e.headElement);break}case C.HEAD:{e._err(t,_e.misplacedStartTagForHeadElement);break}default:zd(e,t)}}function Yte(e,t){switch(t.tagID){case C.BODY:case C.HTML:case C.BR:{zd(e,t);break}case C.TEMPLATE:{xu(e,t);break}default:e._err(t,_e.endTagWithoutMatchingOpenElement)}}function zd(e,t){e._insertFakeElement(pe.BODY,C.BODY),e.insertionMode=te.IN_BODY,K1(e,t)}function K1(e,t){switch(t.type){case on.CHARACTER:{ID(e,t);break}case on.WHITESPACE_CHARACTER:{DD(e,t);break}case on.COMMENT:{$y(e,t);break}case on.START_TAG:{la(e,t);break}case on.END_TAG:{Q1(e,t);break}case on.EOF:{jD(e,t);break}}}function DD(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function ID(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Wte(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Xte(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Kte(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,He.HTML),e.insertionMode=te.IN_FRAMESET)}function Qte(e,t){e.openElements.hasInButtonScope(C.P)&&e._closePElement(),e._insertElement(t,He.HTML)}function Zte(e,t){e.openElements.hasInButtonScope(C.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Uy.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,He.HTML)}function Jte(e,t){e.openElements.hasInButtonScope(C.P)&&e._closePElement(),e._insertElement(t,He.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function ene(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(C.P)&&e._closePElement(),e._insertElement(t,He.HTML),n||(e.formElement=e.openElements.current))}function tne(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const a=e.openElements.tagIDs[r];if(n===C.LI&&a===C.LI||(n===C.DD||n===C.DT)&&(a===C.DD||a===C.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==C.ADDRESS&&a!==C.DIV&&a!==C.P&&e._isSpecialElement(e.openElements.items[r],a))break}e.openElements.hasInButtonScope(C.P)&&e._closePElement(),e._insertElement(t,He.HTML)}function nne(e,t){e.openElements.hasInButtonScope(C.P)&&e._closePElement(),e._insertElement(t,He.HTML),e.tokenizer.state=br.PLAINTEXT}function rne(e,t){e.openElements.hasInScope(C.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(C.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,He.HTML),e.framesetOk=!1}function ane(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(pe.A);n&&(v3(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,He.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function sne(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,He.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ine(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(C.NOBR)&&(v3(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,He.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function one(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,He.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function lne(e,t){e.treeAdapter.getDocumentMode(e.document)!==ws.QUIRKS&&e.openElements.hasInButtonScope(C.P)&&e._closePElement(),e._insertElement(t,He.HTML),e.framesetOk=!1,e.insertionMode=te.IN_TABLE}function OD(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,He.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function LD(e){const t=ED(e,Zl.TYPE);return t!=null&&t.toLowerCase()===kte}function une(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,He.HTML),LD(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function cne(e,t){e._appendElement(t,He.HTML),t.ackSelfClosing=!0}function dne(e,t){e.openElements.hasInButtonScope(C.P)&&e._closePElement(),e._appendElement(t,He.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function fne(e,t){t.tagName=pe.IMG,t.tagID=C.IMG,OD(e,t)}function hne(e,t){e._insertElement(t,He.HTML),e.skipNextNewLine=!0,e.tokenizer.state=br.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=te.TEXT}function mne(e,t){e.openElements.hasInButtonScope(C.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,br.RAWTEXT)}function pne(e,t){e.framesetOk=!1,e._switchToTextParsing(t,br.RAWTEXT)}function $S(e,t){e._switchToTextParsing(t,br.RAWTEXT)}function gne(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,He.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===te.IN_TABLE||e.insertionMode===te.IN_CAPTION||e.insertionMode===te.IN_TABLE_BODY||e.insertionMode===te.IN_ROW||e.insertionMode===te.IN_CELL?te.IN_SELECT_IN_TABLE:te.IN_SELECT}function bne(e,t){e.openElements.currentTagId===C.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,He.HTML)}function xne(e,t){e.openElements.hasInScope(C.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,He.HTML)}function yne(e,t){e.openElements.hasInScope(C.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(C.RTC),e._insertElement(t,He.HTML)}function vne(e,t){e._reconstructActiveFormattingElements(),_D(t),y3(t),t.selfClosing?e._appendElement(t,He.MATHML):e._insertElement(t,He.MATHML),t.ackSelfClosing=!0}function wne(e,t){e._reconstructActiveFormattingElements(),RD(t),y3(t),t.selfClosing?e._appendElement(t,He.SVG):e._insertElement(t,He.SVG),t.ackSelfClosing=!0}function qS(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,He.HTML)}function la(e,t){switch(t.tagID){case C.I:case C.S:case C.B:case C.U:case C.EM:case C.TT:case C.BIG:case C.CODE:case C.FONT:case C.SMALL:case C.STRIKE:case C.STRONG:{sne(e,t);break}case C.A:{ane(e,t);break}case C.H1:case C.H2:case C.H3:case C.H4:case C.H5:case C.H6:{Zte(e,t);break}case C.P:case C.DL:case C.OL:case C.UL:case C.DIV:case C.DIR:case C.NAV:case C.MAIN:case C.MENU:case C.ASIDE:case C.CENTER:case C.FIGURE:case C.FOOTER:case C.HEADER:case C.HGROUP:case C.DIALOG:case C.DETAILS:case C.ADDRESS:case C.ARTICLE:case C.SEARCH:case C.SECTION:case C.SUMMARY:case C.FIELDSET:case C.BLOCKQUOTE:case C.FIGCAPTION:{Qte(e,t);break}case C.LI:case C.DD:case C.DT:{tne(e,t);break}case C.BR:case C.IMG:case C.WBR:case C.AREA:case C.EMBED:case C.KEYGEN:{OD(e,t);break}case C.HR:{dne(e,t);break}case C.RB:case C.RTC:{xne(e,t);break}case C.RT:case C.RP:{yne(e,t);break}case C.PRE:case C.LISTING:{Jte(e,t);break}case C.XMP:{mne(e,t);break}case C.SVG:{wne(e,t);break}case C.HTML:{Wte(e,t);break}case C.BASE:case C.LINK:case C.META:case C.STYLE:case C.TITLE:case C.SCRIPT:case C.BGSOUND:case C.BASEFONT:case C.TEMPLATE:{Ws(e,t);break}case C.BODY:{Xte(e,t);break}case C.FORM:{ene(e,t);break}case C.NOBR:{ine(e,t);break}case C.MATH:{vne(e,t);break}case C.TABLE:{lne(e,t);break}case C.INPUT:{une(e,t);break}case C.PARAM:case C.TRACK:case C.SOURCE:{cne(e,t);break}case C.IMAGE:{fne(e,t);break}case C.BUTTON:{rne(e,t);break}case C.APPLET:case C.OBJECT:case C.MARQUEE:{one(e,t);break}case C.IFRAME:{pne(e,t);break}case C.SELECT:{gne(e,t);break}case C.OPTION:case C.OPTGROUP:{bne(e,t);break}case C.NOEMBED:case C.NOFRAMES:{$S(e,t);break}case C.FRAMESET:{Kte(e,t);break}case C.TEXTAREA:{hne(e,t);break}case C.NOSCRIPT:{e.options.scriptingEnabled?$S(e,t):qS(e,t);break}case C.PLAINTEXT:{nne(e,t);break}case C.COL:case C.TH:case C.TD:case C.TR:case C.HEAD:case C.FRAME:case C.TBODY:case C.TFOOT:case C.THEAD:case C.CAPTION:case C.COLGROUP:break;default:qS(e,t)}}function Tne(e,t){if(e.openElements.hasInScope(C.BODY)&&(e.insertionMode=te.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Ene(e,t){e.openElements.hasInScope(C.BODY)&&(e.insertionMode=te.AFTER_BODY,VD(e,t))}function Sne(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Cne(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(C.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(C.FORM):n&&e.openElements.remove(n))}function kne(e){e.openElements.hasInButtonScope(C.P)||e._insertFakeElement(pe.P,C.P),e._closePElement()}function Ane(e){e.openElements.hasInListItemScope(C.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(C.LI),e.openElements.popUntilTagNamePopped(C.LI))}function Nne(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function _ne(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Rne(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Mne(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(pe.BR,C.BR),e.openElements.pop(),e.framesetOk=!1}function PD(e,t){const n=t.tagName,r=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const s=e.openElements.items[a],o=e.openElements.tagIDs[a];if(r===o&&(r!==C.UNKNOWN||e.treeAdapter.getTagName(s)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(s,o))break}}function Q1(e,t){switch(t.tagID){case C.A:case C.B:case C.I:case C.S:case C.U:case C.EM:case C.TT:case C.BIG:case C.CODE:case C.FONT:case C.NOBR:case C.SMALL:case C.STRIKE:case C.STRONG:{v3(e,t);break}case C.P:{kne(e);break}case C.DL:case C.UL:case C.OL:case C.DIR:case C.DIV:case C.NAV:case C.PRE:case C.MAIN:case C.MENU:case C.ASIDE:case C.BUTTON:case C.CENTER:case C.FIGURE:case C.FOOTER:case C.HEADER:case C.HGROUP:case C.DIALOG:case C.ADDRESS:case C.ARTICLE:case C.DETAILS:case C.SEARCH:case C.SECTION:case C.SUMMARY:case C.LISTING:case C.FIELDSET:case C.BLOCKQUOTE:case C.FIGCAPTION:{Sne(e,t);break}case C.LI:{Ane(e);break}case C.DD:case C.DT:{Nne(e,t);break}case C.H1:case C.H2:case C.H3:case C.H4:case C.H5:case C.H6:{_ne(e);break}case C.BR:{Mne(e);break}case C.BODY:{Tne(e,t);break}case C.HTML:{Ene(e,t);break}case C.FORM:{Cne(e);break}case C.APPLET:case C.OBJECT:case C.MARQUEE:{Rne(e,t);break}case C.TEMPLATE:{xu(e,t);break}default:PD(e,t)}}function jD(e,t){e.tmplInsertionModeStack.length>0?qD(e,t):w3(e,t)}function Dne(e,t){var n;t.tagID===C.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Ine(e,t){e._err(t,_e.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function dx(e,t){if(e.openElements.currentTagId!==void 0&&MD.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=te.IN_TABLE_TEXT,t.type){case on.CHARACTER:{BD(e,t);break}case on.WHITESPACE_CHARACTER:{zD(e,t);break}}else $f(e,t)}function One(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,He.HTML),e.insertionMode=te.IN_CAPTION}function Lne(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,He.HTML),e.insertionMode=te.IN_COLUMN_GROUP}function Pne(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(pe.COLGROUP,C.COLGROUP),e.insertionMode=te.IN_COLUMN_GROUP,T3(e,t)}function jne(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,He.HTML),e.insertionMode=te.IN_TABLE_BODY}function zne(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(pe.TBODY,C.TBODY),e.insertionMode=te.IN_TABLE_BODY,Z1(e,t)}function Bne(e,t){e.openElements.hasInTableScope(C.TABLE)&&(e.openElements.popUntilTagNamePopped(C.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Fne(e,t){LD(t)?e._appendElement(t,He.HTML):$f(e,t),t.ackSelfClosing=!0}function Hne(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,He.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function $c(e,t){switch(t.tagID){case C.TD:case C.TH:case C.TR:{zne(e,t);break}case C.STYLE:case C.SCRIPT:case C.TEMPLATE:{Ws(e,t);break}case C.COL:{Pne(e,t);break}case C.FORM:{Hne(e,t);break}case C.TABLE:{Bne(e,t);break}case C.TBODY:case C.TFOOT:case C.THEAD:{jne(e,t);break}case C.INPUT:{Fne(e,t);break}case C.CAPTION:{One(e,t);break}case C.COLGROUP:{Lne(e,t);break}default:$f(e,t)}}function lf(e,t){switch(t.tagID){case C.TABLE:{e.openElements.hasInTableScope(C.TABLE)&&(e.openElements.popUntilTagNamePopped(C.TABLE),e._resetInsertionMode());break}case C.TEMPLATE:{xu(e,t);break}case C.BODY:case C.CAPTION:case C.COL:case C.COLGROUP:case C.HTML:case C.TBODY:case C.TD:case C.TFOOT:case C.TH:case C.THEAD:case C.TR:break;default:$f(e,t)}}function $f(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,K1(e,t),e.fosterParentingEnabled=n}function zD(e,t){e.pendingCharacterTokens.push(t)}function BD(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function md(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)$f(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const FD=new Set([C.CAPTION,C.COL,C.COLGROUP,C.TBODY,C.TD,C.TFOOT,C.TH,C.THEAD,C.TR]);function Une(e,t){const n=t.tagID;FD.has(n)?e.openElements.hasInTableScope(C.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(C.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=te.IN_TABLE,$c(e,t)):la(e,t)}function $ne(e,t){const n=t.tagID;switch(n){case C.CAPTION:case C.TABLE:{e.openElements.hasInTableScope(C.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(C.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=te.IN_TABLE,n===C.TABLE&&lf(e,t));break}case C.BODY:case C.COL:case C.COLGROUP:case C.HTML:case C.TBODY:case C.TD:case C.TFOOT:case C.TH:case C.THEAD:case C.TR:break;default:Q1(e,t)}}function T3(e,t){switch(t.tagID){case C.HTML:{la(e,t);break}case C.COL:{e._appendElement(t,He.HTML),t.ackSelfClosing=!0;break}case C.TEMPLATE:{Ws(e,t);break}default:$p(e,t)}}function qne(e,t){switch(t.tagID){case C.COLGROUP:{e.openElements.currentTagId===C.COLGROUP&&(e.openElements.pop(),e.insertionMode=te.IN_TABLE);break}case C.TEMPLATE:{xu(e,t);break}case C.COL:break;default:$p(e,t)}}function $p(e,t){e.openElements.currentTagId===C.COLGROUP&&(e.openElements.pop(),e.insertionMode=te.IN_TABLE,e._processToken(t))}function Z1(e,t){switch(t.tagID){case C.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,He.HTML),e.insertionMode=te.IN_ROW;break}case C.TH:case C.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(pe.TR,C.TR),e.insertionMode=te.IN_ROW,J1(e,t);break}case C.CAPTION:case C.COL:case C.COLGROUP:case C.TBODY:case C.TFOOT:case C.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=te.IN_TABLE,$c(e,t));break}default:$c(e,t)}}function qy(e,t){const n=t.tagID;switch(t.tagID){case C.TBODY:case C.TFOOT:case C.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=te.IN_TABLE);break}case C.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=te.IN_TABLE,lf(e,t));break}case C.BODY:case C.CAPTION:case C.COL:case C.COLGROUP:case C.HTML:case C.TD:case C.TH:case C.TR:break;default:lf(e,t)}}function J1(e,t){switch(t.tagID){case C.TH:case C.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,He.HTML),e.insertionMode=te.IN_CELL,e.activeFormattingElements.insertMarker();break}case C.CAPTION:case C.COL:case C.COLGROUP:case C.TBODY:case C.TFOOT:case C.THEAD:case C.TR:{e.openElements.hasInTableScope(C.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=te.IN_TABLE_BODY,Z1(e,t));break}default:$c(e,t)}}function HD(e,t){switch(t.tagID){case C.TR:{e.openElements.hasInTableScope(C.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=te.IN_TABLE_BODY);break}case C.TABLE:{e.openElements.hasInTableScope(C.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=te.IN_TABLE_BODY,qy(e,t));break}case C.TBODY:case C.TFOOT:case C.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(C.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=te.IN_TABLE_BODY,qy(e,t));break}case C.BODY:case C.CAPTION:case C.COL:case C.COLGROUP:case C.HTML:case C.TD:case C.TH:break;default:lf(e,t)}}function Vne(e,t){const n=t.tagID;FD.has(n)?(e.openElements.hasInTableScope(C.TD)||e.openElements.hasInTableScope(C.TH))&&(e._closeTableCell(),J1(e,t)):la(e,t)}function Gne(e,t){const n=t.tagID;switch(n){case C.TD:case C.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=te.IN_ROW);break}case C.TABLE:case C.TBODY:case C.TFOOT:case C.THEAD:case C.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),HD(e,t));break}case C.BODY:case C.CAPTION:case C.COL:case C.COLGROUP:case C.HTML:break;default:Q1(e,t)}}function UD(e,t){switch(t.tagID){case C.HTML:{la(e,t);break}case C.OPTION:{e.openElements.currentTagId===C.OPTION&&e.openElements.pop(),e._insertElement(t,He.HTML);break}case C.OPTGROUP:{e.openElements.currentTagId===C.OPTION&&e.openElements.pop(),e.openElements.currentTagId===C.OPTGROUP&&e.openElements.pop(),e._insertElement(t,He.HTML);break}case C.HR:{e.openElements.currentTagId===C.OPTION&&e.openElements.pop(),e.openElements.currentTagId===C.OPTGROUP&&e.openElements.pop(),e._appendElement(t,He.HTML),t.ackSelfClosing=!0;break}case C.INPUT:case C.KEYGEN:case C.TEXTAREA:case C.SELECT:{e.openElements.hasInSelectScope(C.SELECT)&&(e.openElements.popUntilTagNamePopped(C.SELECT),e._resetInsertionMode(),t.tagID!==C.SELECT&&e._processStartTag(t));break}case C.SCRIPT:case C.TEMPLATE:{Ws(e,t);break}}}function $D(e,t){switch(t.tagID){case C.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===C.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===C.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===C.OPTGROUP&&e.openElements.pop();break}case C.OPTION:{e.openElements.currentTagId===C.OPTION&&e.openElements.pop();break}case C.SELECT:{e.openElements.hasInSelectScope(C.SELECT)&&(e.openElements.popUntilTagNamePopped(C.SELECT),e._resetInsertionMode());break}case C.TEMPLATE:{xu(e,t);break}}}function Yne(e,t){const n=t.tagID;n===C.CAPTION||n===C.TABLE||n===C.TBODY||n===C.TFOOT||n===C.THEAD||n===C.TR||n===C.TD||n===C.TH?(e.openElements.popUntilTagNamePopped(C.SELECT),e._resetInsertionMode(),e._processStartTag(t)):UD(e,t)}function Wne(e,t){const n=t.tagID;n===C.CAPTION||n===C.TABLE||n===C.TBODY||n===C.TFOOT||n===C.THEAD||n===C.TR||n===C.TD||n===C.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(C.SELECT),e._resetInsertionMode(),e.onEndTag(t)):$D(e,t)}function Xne(e,t){switch(t.tagID){case C.BASE:case C.BASEFONT:case C.BGSOUND:case C.LINK:case C.META:case C.NOFRAMES:case C.SCRIPT:case C.STYLE:case C.TEMPLATE:case C.TITLE:{Ws(e,t);break}case C.CAPTION:case C.COLGROUP:case C.TBODY:case C.TFOOT:case C.THEAD:{e.tmplInsertionModeStack[0]=te.IN_TABLE,e.insertionMode=te.IN_TABLE,$c(e,t);break}case C.COL:{e.tmplInsertionModeStack[0]=te.IN_COLUMN_GROUP,e.insertionMode=te.IN_COLUMN_GROUP,T3(e,t);break}case C.TR:{e.tmplInsertionModeStack[0]=te.IN_TABLE_BODY,e.insertionMode=te.IN_TABLE_BODY,Z1(e,t);break}case C.TD:case C.TH:{e.tmplInsertionModeStack[0]=te.IN_ROW,e.insertionMode=te.IN_ROW,J1(e,t);break}default:e.tmplInsertionModeStack[0]=te.IN_BODY,e.insertionMode=te.IN_BODY,la(e,t)}}function Kne(e,t){t.tagID===C.TEMPLATE&&xu(e,t)}function qD(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(C.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):w3(e,t)}function Qne(e,t){t.tagID===C.HTML?la(e,t):qp(e,t)}function VD(e,t){var n;if(t.tagID===C.HTML){if(e.fragmentContext||(e.insertionMode=te.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===C.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else qp(e,t)}function qp(e,t){e.insertionMode=te.IN_BODY,K1(e,t)}function Zne(e,t){switch(t.tagID){case C.HTML:{la(e,t);break}case C.FRAMESET:{e._insertElement(t,He.HTML);break}case C.FRAME:{e._appendElement(t,He.HTML),t.ackSelfClosing=!0;break}case C.NOFRAMES:{Ws(e,t);break}}}function Jne(e,t){t.tagID===C.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==C.FRAMESET&&(e.insertionMode=te.AFTER_FRAMESET))}function ere(e,t){switch(t.tagID){case C.HTML:{la(e,t);break}case C.NOFRAMES:{Ws(e,t);break}}}function tre(e,t){t.tagID===C.HTML&&(e.insertionMode=te.AFTER_AFTER_FRAMESET)}function nre(e,t){t.tagID===C.HTML?la(e,t):up(e,t)}function up(e,t){e.insertionMode=te.IN_BODY,K1(e,t)}function rre(e,t){switch(t.tagID){case C.HTML:{la(e,t);break}case C.NOFRAMES:{Ws(e,t);break}}}function are(e,t){t.chars=tr,e._insertCharacters(t)}function sre(e,t){e._insertCharacters(t),e.framesetOk=!1}function GD(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==He.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function ire(e,t){if(wte(t))GD(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===He.MATHML?_D(t):r===He.SVG&&(Tte(t),RD(t)),y3(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function ore(e,t){if(t.tagID===C.P||t.tagID===C.BR){GD(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===He.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(r);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}pe.AREA,pe.BASE,pe.BASEFONT,pe.BGSOUND,pe.BR,pe.COL,pe.EMBED,pe.FRAME,pe.HR,pe.IMG,pe.INPUT,pe.KEYGEN,pe.LINK,pe.META,pe.PARAM,pe.SOURCE,pe.TRACK,pe.WBR;const eg=YD("end"),ki=YD("start");function YD(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function WD(e){const t=ki(e),n=eg(e);if(t&&n)return{start:t,end:n}}const lre=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,ure=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),VS={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function XD(e,t){const n=yre(e),r=xD("type",{handlers:{root:cre,element:dre,text:fre,comment:QD,doctype:hre,raw:pre},unknown:gre}),a={parser:n?new US(VS):US.getFragmentParser(void 0,VS),handle(u){r(u,a)},stitches:!1,options:t||{}};r(e,a),l0(a,ki());const s=n?a.parser.document:a.parser.getFragment(),o=vee(s,{file:a.options.file});return a.stitches&&Hc(o,"comment",function(u,c,d){const m=u;if(m.value.stitch&&d&&c!==void 0){const p=d.children;return p[c]=m.value.stitch,c}}),o.type==="root"&&o.children.length===1&&o.children[0].type===e.type?o.children[0]:o}function KD(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function cre(e,t){KD(e.children,t)}function dre(e,t){bre(e,t),KD(e.children,t),xre(e,t)}function fre(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:on.CHARACTER,chars:e.value,location:qf(e)};l0(t,ki(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function hre(e,t){const n={type:on.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:qf(e)};l0(t,ki(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function mre(e,t){t.stitches=!0;const n=vre(e);if("children"in e&&"children"in n){const r=XD({type:"root",children:e.children},t.options);n.children=r.children}QD({type:"comment",value:{stitch:n}},t)}function QD(e,t){const n=e.value,r={type:on.COMMENT,data:n,location:qf(e)};l0(t,ki(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function pre(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,ZD(t,ki(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(lre,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function gre(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))mre(n,t);else{let r="";throw ure.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function l0(e,t){ZD(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=br.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function ZD(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function bre(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===br.PLAINTEXT)return;l0(t,ki(e));const r=t.parser.openElements.current;let a="namespaceURI"in r?r.namespaceURI:fi.html;a===fi.html&&n==="svg"&&(a=fi.svg);const s=Cee({...e,children:[]},{space:a===fi.svg?"svg":"html"}),o={type:on.START_TAG,tagName:n,tagID:o0(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:qf(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function xre(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Iee.includes(n)||t.parser.tokenizer.state===br.PLAINTEXT)return;l0(t,eg(e));const r={type:on.END_TAG,tagName:n,tagID:o0(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:qf(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===br.RCDATA||t.parser.tokenizer.state===br.RAWTEXT||t.parser.tokenizer.state===br.SCRIPT_DATA)&&(t.parser.tokenizer.state=br.DATA)}function yre(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function qf(e){const t=ki(e)||{line:void 0,column:void 0,offset:void 0},n=eg(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function vre(e){return"children"in e?au({...e,children:[]}):au(e)}function wre(e){return function(t,n){return XD(t,{...e,file:n})}}const Ul=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],GS={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Ul,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Ul],h2:[["className","sr-only"]],img:[...Ul,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Ul,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Ul],table:[...Ul],ul:[...Ul,["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"]},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"]},Ko={}.hasOwnProperty;function Tre(e,t){let n={type:"root",children:[]};const r={schema:t?{...GS,...t}:GS,stack:[]},a=JD(r,e);return a&&(Array.isArray(a)?a.length===1?n=a[0]:n.children=a:n=a),n}function JD(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return Ere(e,n);case"doctype":return Sre(e,n);case"element":return Cre(e,n);case"root":return kre(e,n);case"text":return Are(e,n)}}}function Ere(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),s={type:"comment",value:r<0?n:n.slice(0,r)};return Vf(s,t),s}}function Sre(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Vf(n,t),n}}function Cre(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=eI(e,t.children),a=Nre(e,t.properties);e.stack.pop();let s=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(s=!0,e.schema.ancestors&&Ko.call(e.schema.ancestors,n))){const u=e.schema.ancestors[n];let c=-1;for(s=!1;++c<u.length;)e.stack.includes(u[c])&&(s=!0)}if(!s)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const o={type:"element",tagName:n,properties:a,children:r};return Vf(o,t),o}function kre(e,t){const r={type:"root",children:eI(e,t.children)};return Vf(r,t),r}function Are(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Vf(r,t),r}function eI(e,t){const n=[];if(Array.isArray(t)){const r=t;let a=-1;for(;++a<r.length;){const s=JD(e,r[a]);s&&(Array.isArray(s)?n.push(...s):n.push(s))}}return n}function Nre(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,a=e.schema.required,s=r&&Ko.call(r,n)?r[n]:void 0,o=r&&Ko.call(r,"*")?r["*"]:void 0,u=t&&typeof t=="object"?t:{},c={};let d;for(d in u)if(Ko.call(u,d)){const m=u[d];let p=YS(e,WS(s,d),d,m);p==null&&(p=YS(e,WS(o,d),d,m)),p!=null&&(c[d]=p)}if(a&&Ko.call(a,n)){const m=a[n];for(d in m)Ko.call(m,d)&&!Ko.call(c,d)&&(c[d]=m[d])}return c}function YS(e,t,n,r){return t?Array.isArray(r)?_re(e,t,n,r):tI(e,t,n,r):void 0}function _re(e,t,n,r){let a=-1;const s=[];for(;++a<r.length;){const o=tI(e,t,n,r[a]);(typeof o=="number"||typeof o=="string")&&s.push(o)}return s}function tI(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&Rre(e,n,r)){if(typeof t=="object"&&t.length>1){let a=!1,s=0;for(;++s<t.length;){const o=t[s];if(o&&typeof o=="object"&&"flags"in o){if(o.test(String(r))){a=!0;break}}else if(o===r){a=!0;break}}if(!a)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function Rre(e,t,n){const r=e.schema.protocols&&Ko.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const a=String(n),s=a.indexOf(":"),o=a.indexOf("?"),u=a.indexOf("#"),c=a.indexOf("/");if(s<0||c>-1&&s>c||o>-1&&s>o||u>-1&&s>u)return!0;let d=-1;for(;++d<r.length;){const m=r[d];if(s===m.length&&a.slice(0,m.length)===m)return!0}return!1}function Vf(e,t){const n=WD(t);t.data&&(e.data=au(t.data)),n&&(e.position=n)}function WS(e,t){let n,r=-1;if(e)for(;++r<e.length;){const a=e[r],s=typeof a=="string"?a:a[0];if(s===t)return a;s==="data*"&&(n=a)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function Mre(e){return function(t){return Tre(t,e)}}const Zi={eof:null,asterisk:42,underscore:95,tilde:126},qc={attentionSideAfter:2,characterGroupPunctuation:2,characterGroupWhitespace:1},ri={data:"data",characterEscape:"characterEscape",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",strong:"strong",strongSequence:"strongSequence",strongText:"strongText"},pa=bl(/[A-Za-z]/),sa=bl(/[\dA-Za-z]/),Dre=bl(/[#-'*+\--9=?A-Z^-~]/);function Vp(e){return e!==null&&(e<32||e===127)}const Vy=bl(/\d/),Ire=bl(/[\dA-Fa-f]/),Ore=bl(/[!-/:-@[-`{-~]/);function wt(e){return e!==null&&e<-2}function Hn(e){return e!==null&&(e<0||e===32)}function dn(e){return e===-2||e===-1||e===32}const tg=bl(new RegExp("\\p{P}|\\p{S}","u")),su=bl(/\s/);function bl(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Lre(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function Pre(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function jre(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function zre(e){return Lre(e)?"ambiguous":Pre(e)?"fullwidth":e===8361||e>=65377&&e<=65470||e>=65474&&e<=65479||e>=65482&&e<=65487||e>=65490&&e<=65495||e>=65498&&e<=65500||e>=65512&&e<=65518?"halfwidth":e>=32&&e<=126||e===162||e===163||e===165||e===166||e===172||e===175||e>=10214&&e<=10221||e===10629||e===10630?"narrow":jre(e)?"wide":"neutral"}function Bre(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function Fre(e){return Bre(e),zre(e)}var Hre=Object.defineProperty,Ure=(e,t,n)=>t in e?Hre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$re=(e,t,n)=>Ure(e,t+"",n);function qre(e){return new RegExp("^\\p{Emoji_Presentation}","u").test(String.fromCodePoint(e))}function Vre(e){if(!e||e<4352)return!1;switch(Fre(e)){case"fullwidth":case"halfwidth":return!0;case"wide":return!qre(e);case"narrow":return!1;case"ambiguous":return 917760<=e&&e<=917999?null:!1;case"neutral":return new RegExp("^\\p{sc=Hangul}","u").test(String.fromCodePoint(e))}}function Gre(e,t){return t!==65025||!e||e<8216?!1:e===8216||e===8217||e===8220||e===8221}function Yre(e){return e!==null&&e>=65024&&e<=65038}var Wre=nI(new RegExp("\\p{P}|\\p{S}","u")),Xre=nI(/\s/);function nI(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCodePoint(n))}}var is;(e=>{e.spaceOrPunctuation=3,e.cjk=4096,e.cjkPunctuation=4098,e.ivs=8192,e.cjkOrIvs=12288,e.nonEmojiGeneralUseVS=16384,e.variationSelector=24576,e.ivsToCjkRightShift=1})(is||(is={}));function Mc(e){if(e===Zi.eof||Hn(e)||Xre(e))return qc.characterGroupWhitespace;let t=0;if(e>=4352){if(Yre(e))return is.nonEmojiGeneralUseVS;switch(Vre(e)){case null:return is.ivs;case!0:t|=is.cjk;break}}return Wre(e)&&(t|=qc.characterGroupPunctuation),t}function rI(e,t,n){if(!Jre(e))return e;const r=t(),a=Mc(r);return!r||uf(a)?e:Gre(r,n)?is.cjkPunctuation:Kre(a)}function Kre(e){return e&~is.ivs}function uf(e){return!!(e&qc.characterGroupWhitespace)}function Gp(e){return(e&is.cjkPunctuation)===qc.characterGroupPunctuation}function Gy(e){return!!(e&is.cjk)}function Qre(e){return e===is.ivs}function Zre(e){return!!(e&is.cjkOrIvs)}function Jre(e){return e===is.nonEmojiGeneralUseVS}function XS(e){return!!(e&is.spaceOrPunctuation)}function aI(e){return!!(e&&e>=55296&&e<=56319)}function sI(e){return!!(e&&e>=56320&&e<=57343)}function iI(e,t,n){if(t._bufferIndex<2)return e;const a=n({start:{...t,_bufferIndex:t._bufferIndex-2},end:t}).codePointAt(0);return a&&a>=65536?a:e}function eae(e,t,n){const r=e>=65536?2:1;if(t._bufferIndex<1+r)return null;const a=t._bufferIndex-r-2,s=n({start:{...t,_bufferIndex:a>=0?a:0},end:{...t,_bufferIndex:t._bufferIndex-r}}),o=s.charCodeAt(s.length-1);if(Number.isNaN(o))return null;if(s.length<2||o<56320||57343<o)return o;const u=s.codePointAt(0);return u&&u>=65536?u:o}var oI=class{constructor(e,t,n){this.previousCode=e,this.nowPoint=t,this.sliceSerialize=n,$re(this,"cachedValue")}value(){return this.cachedValue===void 0&&(this.cachedValue=eae(this.previousCode,this.nowPoint,this.sliceSerialize)),this.cachedValue}};function lI(e,t,n){const r=n({start:t,end:{...t,_bufferIndex:t._bufferIndex+2}}).codePointAt(0);return r&&r>=65536?r:e}function Kr(e,t,n,r){const a=e.length;let s=0,o;if(t<0?t=-t>a?0:a+t:t=t>a?a: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);s<r.length;)o=r.slice(s,s+1e4),o.unshift(t,0),e.splice(...o),s+=1e4,t+=1e4}function Xr(e,t){return e.length>0?(Kr(e,e.length,0,t),e):t}function u0(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const s=e[a].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}var fx={name:"attention",resolveAll:tae,tokenize:nae};function tae(e,t){let n=-1,r,a,s,o,u,c,d,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[r][1].end},b={...e[n][1].start};KS(p,-c),KS(b,c),o={type:c>1?ri.strongSequence:ri.emphasisSequence,start:p,end:{...e[r][1].end}},u={type:c>1?ri.strongSequence:ri.emphasisSequence,start:{...e[n][1].start},end:b},s={type:c>1?ri.strongText:ri.emphasisText,start:{...e[r][1].end},end:{...e[n][1].start}},a={type:c>1?ri.strong:ri.emphasis,start:{...o.start},end:{...u.end}},e[r][1].end={...o.start},e[n][1].start={...u.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=Xr(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=Xr(d,[["enter",a,t],["enter",o,t],["exit",o,t],["enter",s,t]]),t.parser.constructs.insideSpan.null,d=Xr(d,u0(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=Xr(d,[["exit",s,t],["enter",u,t],["exit",u,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,d=Xr(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Kr(e,r-1,n-r+3,d),n=r+d.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function nae(e,t){const n=this.parser.constructs.attentionMarkers.null,{now:r,sliceSerialize:a,previous:s}=this,o=sI(s)?iI(s,r(),a):s,u=Mc(o),c=new oI(o,r(),a),d=rI(u,c.value.bind(c),o);let m;return p;function p(y){return m=y,e.enter("attentionSequence"),b(y)}function b(y){if(y===m)return e.consume(y),b;const w=e.exit("attentionSequence"),S=aI(y)?lI(y,r(),a):y,k=Mc(S),E=Gp(d),A=E||uf(d),_=Gp(k),I=_||uf(k),P=Zre(d),O=!I||_&&(A||P)||n.includes(y),R=!A||E&&(I||Gy(k))||n.includes(o);return w._open=!!(m===Zi.asterisk?O:O&&(XS(d)||!R)),w._close=!!(m===Zi.asterisk?R:R&&(XS(k)||!O)),t(y)}}function KS(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}function rae(){return{text:{[Zi.asterisk]:fx,[Zi.underscore]:fx},insideSpan:{null:[fx]}}}function aae(){const e=this.data();(e.micromarkExtensions||(e.micromarkExtensions=[])).push(rae())}function sae(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:a};return n==null&&(n=!0),{text:{[Zi.tilde]:r},insideSpan:{null:[r]},attentionMarkers:{null:[Zi.tilde]}};function a(o,u){let c=-1;for(;++c<o.length;)if(o[c][0]==="enter"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._close){let d=c;for(;d--;)if(o[d][0]==="exit"&&o[d][1].type==="strikethroughSequenceTemporary"&&o[d][1]._open&&o[c][1].end.offset-o[c][1].start.offset===o[d][1].end.offset-o[d][1].start.offset){o[c][1].type="strikethroughSequence",o[d][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},o[d][1].start),end:Object.assign({},o[c][1].end)},p={type:"strikethroughText",start:Object.assign({},o[d][1].end),end:Object.assign({},o[c][1].start)},b=[["enter",m,u],["enter",o[d][1],u],["exit",o[d][1],u],["enter",p,u]],y=u.parser.constructs.insideSpan.null;y&&Kr(b,b.length,0,u0(y,o.slice(d+1,c),u)),Kr(b,b.length,0,[["exit",p,u],["enter",o[c][1],u],["exit",o[c][1],u],["exit",m,u]]),Kr(o,d-1,c-d+3,b),c=d+b.length-2;break}}for(c=-1;++c<o.length;)o[c][1].type==="strikethroughSequenceTemporary"&&(o[c][1].type=ri.data);return o}function s(o,u,c){const{now:d,sliceSerialize:m,previous:p}=this,b=sI(p)?iI(p,d(),m):p,y=Mc(b),w=new oI(b,d(),m),S=rI(y,w.value.bind(w),b),k=this.events;let E=0;return A;function A(I){return b===Zi.tilde&&k[k.length-1][1].type!==ri.characterEscape?c(I):(o.enter("strikethroughSequenceTemporary"),_(I))}function _(I){const P=Mc(b);if(I===Zi.tilde)return E>1?c(I):(o.consume(I),E++,_);if(E<2&&!n)return c(I);const O=o.exit("strikethroughSequenceTemporary"),R=aI(I)?lI(I,d(),m):I,z=Mc(R),U=Gp(S)||uf(S),W=Gp(z)||uf(z),le=Gy(S)||Qre(P);return O._open=!W||z===qc.attentionSideAfter&&(U||le),O._close=!U||P===qc.attentionSideAfter&&(W||Gy(z)),u(I)}}}function iae(e){const t=this.data();(t.micromarkExtensions||(t.micromarkExtensions=[])).push(sae(e))}function QS(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}function oae(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function lae(e,t,n){const a=jf((n||{}).ignore||[]),s=uae(t);let o=-1;for(;++o<s.length;)q4(e,"text",u);function u(d,m){let p=-1,b;for(;++p<m.length;){const y=m[p],w=b?b.children:void 0;if(a(y,w?w.indexOf(y):void 0,b))return;b=y}if(b)return c(d,m)}function c(d,m){const p=m[m.length-1],b=s[o][0],y=s[o][1];let w=0;const k=p.children.indexOf(d);let E=!1,A=[];b.lastIndex=0;let _=b.exec(d.value);for(;_;){const I=_.index,P={index:_.index,input:_.input,stack:[...m,d]};let O=y(..._,P);if(typeof O=="string"&&(O=O.length>0?{type:"text",value:O}:void 0),O===!1?b.lastIndex=I+1:(w!==I&&A.push({type:"text",value:d.value.slice(w,I)}),Array.isArray(O)?A.push(...O):O&&A.push(O),w=I+_[0].length,E=!0),!b.global)break;_=b.exec(d.value)}return E?(w<d.value.length&&A.push({type:"text",value:d.value.slice(w)}),p.children.splice(k,1,...A)):A=[d],k+A.length}}function uae(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const a=n[r];t.push([cae(a[0]),dae(a[1])])}return t}function cae(e){return typeof e=="string"?new RegExp(oae(e),"g"):e}function dae(e){return typeof e=="function"?e:function(){return e}}const hx="phrasing",mx=["autolink","link","image","label"];function fae(){return{transforms:[yae],enter:{literalAutolink:mae,literalAutolinkEmail:px,literalAutolinkHttp:px,literalAutolinkWww:px},exit:{literalAutolink:xae,literalAutolinkEmail:bae,literalAutolinkHttp:pae,literalAutolinkWww:gae}}}function hae(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:hx,notInConstruct:mx},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:hx,notInConstruct:mx},{character:":",before:"[ps]",after:"\\/",inConstruct:hx,notInConstruct:mx}]}}function mae(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function px(e){this.config.enter.autolinkProtocol.call(this,e)}function pae(e){this.config.exit.autolinkProtocol.call(this,e)}function gae(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function bae(e){this.config.exit.autolinkEmail.call(this,e)}function xae(e){this.exit(e)}function yae(e){lae(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,vae],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),wae]],{ignore:["link","linkReference"]})}function vae(e,t,n,r,a){let s="";if(!uI(a)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!Tae(n)))return!1;const o=Eae(n+r);if(!o[0])return!1;const u={type:"link",title:null,url:s+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[u,{type:"text",value:o[1]}]:u}function wae(e,t,n,r){return!uI(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Tae(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Eae(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const a=QS(e,"(");let s=QS(e,")");for(;r!==-1&&a>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function uI(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||su(n)||tg(n))&&(!t||n!==47)}function Hs(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}cI.peek=Dae;function Sae(){this.buffer()}function Cae(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function kae(){this.buffer()}function Aae(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Nae(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Hs(this.sliceSerialize(e)).toLowerCase(),n.label=t}function _ae(e){this.exit(e)}function Rae(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Hs(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Mae(e){this.exit(e)}function Dae(){return"["}function cI(e,t,n,r){const a=n.createTracker(r);let s=a.move("[^");const o=n.enter("footnoteReference"),u=n.enter("reference");return s+=a.move(n.safe(n.associationId(e),{after:"]",before:s})),u(),o(),s+=a.move("]"),s}function Iae(){return{enter:{gfmFootnoteCallString:Sae,gfmFootnoteCall:Cae,gfmFootnoteDefinitionLabelString:kae,gfmFootnoteDefinition:Aae},exit:{gfmFootnoteCallString:Nae,gfmFootnoteCall:_ae,gfmFootnoteDefinitionLabelString:Rae,gfmFootnoteDefinition:Mae}}}function Oae(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:cI},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,a,s,o){const u=s.createTracker(o);let c=u.move("[^");const d=s.enter("footnoteDefinition"),m=s.enter("label");return c+=u.move(s.safe(s.associationId(r),{before:c,after:"]"})),m(),c+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),c+=u.move((t?`
|
|
332
|
+
`:" ")+s.indentLines(s.containerFlow(r,u.current()),t?dI:Lae))),d(),c}}function Lae(e,t,n){return t===0?e:dI(e,t,n)}function dI(e,t,n){return(n?"":" ")+e}const Pae=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];fI.peek=Hae;function jae(){return{canContainEols:["delete"],enter:{strikethrough:Bae},exit:{strikethrough:Fae}}}function zae(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Pae}],handlers:{delete:fI}}}function Bae(e){this.enter({type:"delete",children:[]},e)}function Fae(e){this.exit(e)}function fI(e,t,n,r){const a=n.createTracker(r),s=n.enter("strikethrough");let o=a.move("~~");return o+=n.containerPhrasing(e,{...a.current(),before:o,after:"~"}),o+=a.move("~~"),s(),o}function Hae(){return"~"}function Uae(e){return e.length}function $ae(e,t){const n=t||{},r=(n.align||[]).concat(),a=n.stringLength||Uae,s=[],o=[],u=[],c=[];let d=0,m=-1;for(;++m<e.length;){const S=[],k=[];let E=-1;for(e[m].length>d&&(d=e[m].length);++E<e[m].length;){const A=qae(e[m][E]);if(n.alignDelimiters!==!1){const _=a(A);k[E]=_,(c[E]===void 0||_>c[E])&&(c[E]=_)}S.push(A)}o[m]=S,u[m]=k}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<d;)s[p]=ZS(r[p]);else{const S=ZS(r);for(;++p<d;)s[p]=S}p=-1;const b=[],y=[];for(;++p<d;){const S=s[p];let k="",E="";S===99?(k=":",E=":"):S===108?k=":":S===114&&(E=":");let A=n.alignDelimiters===!1?1:Math.max(1,c[p]-k.length-E.length);const _=k+"-".repeat(A)+E;n.alignDelimiters!==!1&&(A=k.length+A+E.length,A>c[p]&&(c[p]=A),y[p]=A),b[p]=_}o.splice(1,0,b),u.splice(1,0,y),m=-1;const w=[];for(;++m<o.length;){const S=o[m],k=u[m];p=-1;const E=[];for(;++p<d;){const A=S[p]||"";let _="",I="";if(n.alignDelimiters!==!1){const P=c[p]-(k[p]||0),O=s[p];O===114?_=" ".repeat(P):O===99?P%2?(_=" ".repeat(P/2+.5),I=" ".repeat(P/2-.5)):(_=" ".repeat(P/2),I=_):I=" ".repeat(P)}n.delimiterStart!==!1&&!p&&E.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&A==="")&&(n.delimiterStart!==!1||p)&&E.push(" "),n.alignDelimiters!==!1&&E.push(_),E.push(A),n.alignDelimiters!==!1&&E.push(I),n.padding!==!1&&E.push(" "),(n.delimiterEnd!==!1||p!==d-1)&&E.push("|")}w.push(n.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return w.join(`
|
|
333
|
+
`)}function qae(e){return e==null?"":String(e)}function ZS(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Vae(e,t,n,r){const a=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const o=n.indentLines(n.containerFlow(e,s.current()),Gae);return a(),o}function Gae(e,t,n){return">"+(n?"":" ")+e}function Yae(e,t){return JS(e,t.inConstruct,!0)&&!JS(e,t.notInConstruct,!1)}function JS(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function e7(e,t,n,r){let a=-1;for(;++a<n.unsafe.length;)if(n.unsafe[a].character===`
|
|
334
|
+
`&&Yae(n.stack,n.unsafe[a]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
335
|
+
`}function hI(e,t){const n=String(e);let r=n.indexOf(t),a=r,s=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===a?++s>o&&(o=s):s=1,a=r+t.length,r=n.indexOf(t,a);return o}function Wae(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 Xae(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Kae(e,t,n,r){const a=Xae(n),s=e.value||"",o=a==="`"?"GraveAccent":"Tilde";if(Wae(e,n)){const p=n.enter("codeIndented"),b=n.indentLines(s,Qae);return p(),b}const u=n.createTracker(r),c=a.repeat(Math.max(hI(s,a)+1,3)),d=n.enter("codeFenced");let m=u.move(c);if(e.lang){const p=n.enter(`codeFencedLang${o}`);m+=u.move(n.safe(e.lang,{before:m,after:" ",encode:["`"],...u.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${o}`);m+=u.move(" "),m+=u.move(n.safe(e.meta,{before:m,after:`
|
|
336
|
+
`,encode:["`"],...u.current()})),p()}return m+=u.move(`
|
|
337
|
+
`),s&&(m+=u.move(s+`
|
|
338
|
+
`)),m+=u.move(c),d(),m}function Qae(e,t,n){return(n?"":" ")+e}function E3(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Zae(e,t,n,r){const a=E3(n),s=a==='"'?"Quote":"Apostrophe",o=n.enter("definition");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("[");return d+=c.move(n.safe(n.associationId(e),{before:d,after:"]",...c.current()})),d+=c.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(n.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(u=n.enter("destinationRaw"),d+=c.move(n.safe(e.url,{before:d,after:e.title?" ":`
|
|
339
|
+
`,...c.current()}))),u(),e.title&&(u=n.enter(`title${s}`),d+=c.move(" "+a),d+=c.move(n.safe(e.title,{before:d,after:a,...c.current()})),d+=c.move(a),u()),o(),d}function Jae(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function cf(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Vc(e){if(e===null||Hn(e)||su(e))return 1;if(tg(e))return 2}function Yp(e,t,n){const r=Vc(e),a=Vc(t);return r===void 0?a===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}mI.peek=ese;function mI(e,t,n,r){const a=Jae(n),s=n.enter("emphasis"),o=n.createTracker(r),u=o.move(a);let c=o.move(n.containerPhrasing(e,{after:a,before:u,...o.current()}));const d=c.charCodeAt(0),m=Yp(r.before.charCodeAt(r.before.length-1),d,a);m.inside&&(c=cf(d)+c.slice(1));const p=c.charCodeAt(c.length-1),b=Yp(r.after.charCodeAt(0),p,a);b.inside&&(c=c.slice(0,-1)+cf(p));const y=o.move(a);return s(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},u+c+y}function ese(e,t,n){return n.options.emphasis||"*"}const tse={};function S3(e,t){const n=tse,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return pI(e,r,a)}function pI(e,t,n){if(nse(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return t7(e.children,t,n)}return Array.isArray(e)?t7(e,t,n):""}function t7(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=pI(e[a],t,n);return r.join("")}function nse(e){return!!(e&&typeof e=="object")}function rse(e,t){let n=!1;return Hc(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Cy}),!!((!e.depth||e.depth<3)&&S3(e)&&(t.options.setext||n))}function ase(e,t,n,r){const a=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(rse(e,n)){const m=n.enter("headingSetext"),p=n.enter("phrasing"),b=n.containerPhrasing(e,{...s.current(),before:`
|
|
340
|
+
`,after:`
|
|
341
|
+
`});return p(),m(),b+`
|
|
342
|
+
`+(a===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
343
|
+
`))+1))}const o="#".repeat(a),u=n.enter("headingAtx"),c=n.enter("phrasing");s.move(o+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
|
|
344
|
+
`,...s.current()});return/^[\t ]/.test(d)&&(d=cf(d.charCodeAt(0))+d.slice(1)),d=d?o+" "+d:o,n.options.closeAtx&&(d+=" "+o),c(),u(),d}gI.peek=sse;function gI(e){return e.value||""}function sse(){return"<"}bI.peek=ise;function bI(e,t,n,r){const a=E3(n),s=a==='"'?"Quote":"Apostrophe",o=n.enter("image");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("![");return d+=c.move(n.safe(e.alt,{before:d,after:"]",...c.current()})),d+=c.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(n.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(u=n.enter("destinationRaw"),d+=c.move(n.safe(e.url,{before:d,after:e.title?" ":")",...c.current()}))),u(),e.title&&(u=n.enter(`title${s}`),d+=c.move(" "+a),d+=c.move(n.safe(e.title,{before:d,after:a,...c.current()})),d+=c.move(a),u()),d+=c.move(")"),o(),d}function ise(){return"!"}xI.peek=ose;function xI(e,t,n,r){const a=e.referenceType,s=n.enter("imageReference");let o=n.enter("label");const u=n.createTracker(r);let c=u.move("![");const d=n.safe(e.alt,{before:c,after:"]",...u.current()});c+=u.move(d+"]["),o();const m=n.stack;n.stack=[],o=n.enter("reference");const p=n.safe(n.associationId(e),{before:c,after:"]",...u.current()});return o(),n.stack=m,s(),a==="full"||!d||d!==p?c+=u.move(p+"]"):a==="shortcut"?c=c.slice(0,-1):c+=u.move("]"),c}function ose(){return"!"}yI.peek=lse;function yI(e,t,n){let r=e.value||"",a="`",s=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const o=n.unsafe[s],u=n.compilePattern(o);let c;if(o.atBreak)for(;c=u.exec(r);){let d=c.index;r.charCodeAt(d)===10&&r.charCodeAt(d-1)===13&&d--,r=r.slice(0,d)+" "+r.slice(c.index+1)}}return a+r+a}function lse(){return"`"}function vI(e,t){const n=S3(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}wI.peek=use;function wI(e,t,n,r){const a=E3(n),s=a==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let u,c;if(vI(e,n)){const m=n.stack;n.stack=[],u=n.enter("autolink");let p=o.move("<");return p+=o.move(n.containerPhrasing(e,{before:p,after:">",...o.current()})),p+=o.move(">"),u(),n.stack=m,p}u=n.enter("link"),c=n.enter("label");let d=o.move("[");return d+=o.move(n.containerPhrasing(e,{before:d,after:"](",...o.current()})),d+=o.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=o.move("<"),d+=o.move(n.safe(e.url,{before:d,after:">",...o.current()})),d+=o.move(">")):(c=n.enter("destinationRaw"),d+=o.move(n.safe(e.url,{before:d,after:e.title?" ":")",...o.current()}))),c(),e.title&&(c=n.enter(`title${s}`),d+=o.move(" "+a),d+=o.move(n.safe(e.title,{before:d,after:a,...o.current()})),d+=o.move(a),c()),d+=o.move(")"),u(),d}function use(e,t,n){return vI(e,n)?"<":"["}TI.peek=cse;function TI(e,t,n,r){const a=e.referenceType,s=n.enter("linkReference");let o=n.enter("label");const u=n.createTracker(r);let c=u.move("[");const d=n.containerPhrasing(e,{before:c,after:"]",...u.current()});c+=u.move(d+"]["),o();const m=n.stack;n.stack=[],o=n.enter("reference");const p=n.safe(n.associationId(e),{before:c,after:"]",...u.current()});return o(),n.stack=m,s(),a==="full"||!d||d!==p?c+=u.move(p+"]"):a==="shortcut"?c=c.slice(0,-1):c+=u.move("]"),c}function cse(){return"["}function C3(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function dse(e){const t=C3(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function fse(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function EI(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function hse(e,t,n,r){const a=n.enter("list"),s=n.bulletCurrent;let o=e.ordered?fse(n):C3(n);const u=e.ordered?o==="."?")":".":dse(n);let c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&m&&(!m.children||!m.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),EI(n)===o&&m){let p=-1;for(;++p<e.children.length;){const b=e.children[p];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(o=u),n.bulletCurrent=o;const d=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=s,a(),d}function mse(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function pse(e,t,n,r){const a=mse(n);let s=n.bulletCurrent||C3(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let o=s.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const u=n.createTracker(r);u.move(s+" ".repeat(o-s.length)),u.shift(o);const c=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,u.current()),m);return c(),d;function m(p,b,y){return b?(y?"":" ".repeat(o))+p:(y?s:s+" ".repeat(o-s.length))+p}}function gse(e,t,n,r){const a=n.enter("paragraph"),s=n.enter("phrasing"),o=n.containerPhrasing(e,r);return s(),a(),o}const bse=jf(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function xse(e,t,n,r){return(e.children.some(function(o){return bse(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function yse(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}SI.peek=vse;function SI(e,t,n,r){const a=yse(n),s=n.enter("strong"),o=n.createTracker(r),u=o.move(a+a);let c=o.move(n.containerPhrasing(e,{after:a,before:u,...o.current()}));const d=c.charCodeAt(0),m=Yp(r.before.charCodeAt(r.before.length-1),d,a);m.inside&&(c=cf(d)+c.slice(1));const p=c.charCodeAt(c.length-1),b=Yp(r.after.charCodeAt(0),p,a);b.inside&&(c=c.slice(0,-1)+cf(p));const y=o.move(a+a);return s(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},u+c+y}function vse(e,t,n){return n.options.strong||"*"}function wse(e,t,n,r){return n.safe(e.value,r)}function Tse(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Ese(e,t,n){const r=(EI(n)+(n.options.ruleSpaces?" ":"")).repeat(Tse(n));return n.options.ruleSpaces?r.slice(0,-1):r}const CI={blockquote:Vae,break:e7,code:Kae,definition:Zae,emphasis:mI,hardBreak:e7,heading:ase,html:gI,image:bI,imageReference:xI,inlineCode:yI,link:wI,linkReference:TI,list:hse,listItem:pse,paragraph:gse,root:xse,strong:SI,text:wse,thematicBreak:Ese},n7=document.createElement("i");function k3(e){const t="&"+e+";";n7.innerHTML=t;const n=n7.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function kI(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&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)}const Sse=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Cse(e){return e.replace(Sse,kse)}function kse(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),s=a===120||a===88;return kI(n.slice(s?2:1),s?16:10)}return k3(n)||e}function Ase(){return{enter:{table:Nse,tableData:r7,tableHeader:r7,tableRow:Rse},exit:{codeText:Mse,table:_se,tableData:gx,tableHeader:gx,tableRow:gx}}}function Nse(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function _se(e){this.exit(e),this.data.inTable=void 0}function Rse(e){this.enter({type:"tableRow",children:[]},e)}function gx(e){this.exit(e)}function r7(e){this.enter({type:"tableCell",children:[]},e)}function Mse(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Dse));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Dse(e,t){return t==="|"?t:e}function Ise(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,a=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
345
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:o,tableCell:c,tableRow:u}};function o(y,w,S,k){return d(m(y,S,k),y.align)}function u(y,w,S,k){const E=p(y,S,k),A=d([E]);return A.slice(0,A.indexOf(`
|
|
346
|
+
`))}function c(y,w,S,k){const E=S.enter("tableCell"),A=S.enter("phrasing"),_=S.containerPhrasing(y,{...k,before:s,after:s});return A(),E(),_}function d(y,w){return $ae(y,{align:w,alignDelimiters:r,padding:n,stringLength:a})}function m(y,w,S){const k=y.children;let E=-1;const A=[],_=w.enter("table");for(;++E<k.length;)A[E]=p(k[E],w,S);return _(),A}function p(y,w,S){const k=y.children;let E=-1;const A=[],_=w.enter("tableRow");for(;++E<k.length;)A[E]=c(k[E],y,w,S);return _(),A}function b(y,w,S){let k=CI.inlineCode(y,w,S);return S.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function Ose(){return{exit:{taskListCheckValueChecked:a7,taskListCheckValueUnchecked:a7,paragraph:Pse}}}function Lse(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:jse}}}function a7(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Pse(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const a=t.children;let s=-1,o;for(;++s<a.length;){const u=a[s];if(u.type==="paragraph"){o=u;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function jse(e,t,n,r){const a=e.children[0],s=typeof e.checked=="boolean"&&a&&a.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);s&&u.move(o);let c=CI.listItem(e,t,n,{...r,...u.current()});return s&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),c;function d(m){return m+o}}function zse(){return[fae(),Iae(),jae(),Ase(),Ose()]}function Bse(e){return{extensions:[hae(),Oae(e),zae(),Ise(e),Lse()]}}const s7={}.hasOwnProperty;function AI(e){const t={};let n=-1;for(;++n<e.length;)Fse(t,e[n]);return t}function Fse(e,t){let n;for(n in t){const a=(s7.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){s7.call(a,o)||(a[o]=[]);const u=s[o];Hse(a[o],Array.isArray(u)?u:u?[u]:[])}}}function Hse(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Kr(e,0,0,r)}const Use={tokenize:Wse,partial:!0},NI={tokenize:Xse,partial:!0},_I={tokenize:Kse,partial:!0},RI={tokenize:Qse,partial:!0},$se={tokenize:Zse,partial:!0},MI={name:"wwwAutolink",tokenize:Gse,previous:II},DI={name:"protocolAutolink",tokenize:Yse,previous:OI},po={name:"emailAutolink",tokenize:Vse,previous:LI},Ai={};function qse(){return{text:Ai}}let $l=48;for(;$l<123;)Ai[$l]=po,$l++,$l===58?$l=65:$l===91&&($l=97);Ai[43]=po;Ai[45]=po;Ai[46]=po;Ai[95]=po;Ai[72]=[po,DI];Ai[104]=[po,DI];Ai[87]=[po,MI];Ai[119]=[po,MI];function Vse(e,t,n){const r=this;let a,s;return o;function o(p){return!Yy(p)||!LI.call(r,r.previous)||A3(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(p))}function u(p){return Yy(p)?(e.consume(p),u):p===64?(e.consume(p),c):n(p)}function c(p){return p===46?e.check($se,m,d)(p):p===45||p===95||sa(p)?(s=!0,e.consume(p),c):m(p)}function d(p){return e.consume(p),a=!0,c}function m(p){return s&&a&&pa(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function Gse(e,t,n){const r=this;return a;function a(o){return o!==87&&o!==119||!II.call(r,r.previous)||A3(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Use,e.attempt(NI,e.attempt(_I,s),n),n)(o))}function s(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function Yse(e,t,n){const r=this;let a="",s=!1;return o;function o(p){return(p===72||p===104)&&OI.call(r,r.previous)&&!A3(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(p),e.consume(p),u):n(p)}function u(p){if(pa(p)&&a.length<5)return a+=String.fromCodePoint(p),e.consume(p),u;if(p===58){const b=a.toLowerCase();if(b==="http"||b==="https")return e.consume(p),c}return n(p)}function c(p){return p===47?(e.consume(p),s?d:(s=!0,c)):n(p)}function d(p){return p===null||Vp(p)||Hn(p)||su(p)||tg(p)?n(p):e.attempt(NI,e.attempt(_I,m),n)(p)}function m(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function Wse(e,t,n){let r=0;return a;function a(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),a):o===46&&r===3?(e.consume(o),s):n(o)}function s(o){return o===null?n(o):t(o)}}function Xse(e,t,n){let r,a,s;return o;function o(d){return d===46||d===95?e.check(RI,c,u)(d):d===null||Hn(d)||su(d)||d!==45&&tg(d)?c(d):(s=!0,e.consume(d),o)}function u(d){return d===95?r=!0:(a=r,r=void 0),e.consume(d),o}function c(d){return a||r||!s?n(d):t(d)}}function Kse(e,t){let n=0,r=0;return a;function a(o){return o===40?(n++,e.consume(o),a):o===41&&r<n?s(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(RI,t,s)(o):o===null||Hn(o)||su(o)?t(o):(e.consume(o),a)}function s(o){return o===41&&r++,e.consume(o),a}}function Qse(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),s):u===93?(e.consume(u),a):u===60||u===null||Hn(u)||su(u)?t(u):n(u)}function a(u){return u===null||u===40||u===91||Hn(u)||su(u)?t(u):r(u)}function s(u){return pa(u)?o(u):n(u)}function o(u){return u===59?(e.consume(u),r):pa(u)?(e.consume(u),o):n(u)}}function Zse(e,t,n){return r;function r(s){return e.consume(s),a}function a(s){return sa(s)?n(s):t(s)}}function II(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Hn(e)}function OI(e){return!pa(e)}function LI(e){return!(e===47||Yy(e))}function Yy(e){return e===43||e===45||e===46||e===95||sa(e)}function A3(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function c0(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const s=e.charCodeAt(n);let o="";if(s===37&&sa(e.charCodeAt(n+1))&&sa(e.charCodeAt(n+2)))a=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const u=e.charCodeAt(n+1);s<56320&&u>56319&&u<57344?(o=String.fromCharCode(s,u),a=1):o="�"}else o=String.fromCharCode(s);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+a+1,o=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}const Wy={name:"attention",resolveAll:Jse,tokenize:eie};function Jse(e,t){let n=-1,r,a,s,o,u,c,d,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[r][1].end},b={...e[n][1].start};i7(p,-c),i7(b,c),o={type:c>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},u={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},s={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:c>1?"strong":"emphasis",start:{...o.start},end:{...u.end}},e[r][1].end={...o.start},e[n][1].start={...u.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=Xr(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=Xr(d,[["enter",a,t],["enter",o,t],["exit",o,t],["enter",s,t]]),d=Xr(d,u0(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=Xr(d,[["exit",s,t],["enter",u,t],["exit",u,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,d=Xr(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Kr(e,r-1,n-r+3,d),n=r+d.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function eie(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=Vc(r);let s;return o;function o(c){return s=c,e.enter("attentionSequence"),u(c)}function u(c){if(c===s)return e.consume(c),u;const d=e.exit("attentionSequence"),m=Vc(c),p=!m||m===2&&a||n.includes(c),b=!a||a===2&&m||n.includes(r);return d._open=!!(s===42?p:p&&(a||!b)),d._close=!!(s===42?b:b&&(m||!p)),t(c)}}function i7(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const tie={name:"autolink",tokenize:nie};function nie(e,t,n){let r=0;return a;function a(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(y){return pa(y)?(e.consume(y),o):y===64?n(y):d(y)}function o(y){return y===43||y===45||y===46||sa(y)?(r=1,u(y)):d(y)}function u(y){return y===58?(e.consume(y),r=0,c):(y===43||y===45||y===46||sa(y))&&r++<32?(e.consume(y),u):(r=0,d(y))}function c(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||Vp(y)?n(y):(e.consume(y),c)}function d(y){return y===64?(e.consume(y),m):Dre(y)?(e.consume(y),d):n(y)}function m(y){return sa(y)?p(y):n(y)}function p(y){return y===46?(e.consume(y),r=0,m):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):b(y)}function b(y){if((y===45||sa(y))&&r++<63){const w=y===45?b:p;return e.consume(y),w}return n(y)}}function ln(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(c){return dn(c)?(e.enter(n),u(c)):t(c)}function u(c){return dn(c)&&s++<a?(e.consume(c),u):(e.exit(n),t(c))}}const Gf={partial:!0,tokenize:rie};function rie(e,t,n){return r;function r(s){return dn(s)?ln(e,a,"linePrefix")(s):a(s)}function a(s){return s===null||wt(s)?t(s):n(s)}}const PI={continuation:{tokenize:sie},exit:iie,name:"blockQuote",tokenize:aie};function aie(e,t,n){const r=this;return a;function a(o){if(o===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),s}return n(o)}function s(o){return dn(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function sie(e,t,n){const r=this;return a;function a(o){return dn(o)?ln(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return e.attempt(PI,t,n)(o)}}function iie(e){e.exit("blockQuote")}const jI={name:"characterEscape",tokenize:oie};function oie(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),a}function a(s){return Ore(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const zI={name:"characterReference",tokenize:lie};function lie(e,t,n){const r=this;let a=0,s,o;return u;function u(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),c}function c(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),s=31,o=sa,m(p))}function d(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,o=Ire,m):(e.enter("characterReferenceValue"),s=7,o=Vy,m(p))}function m(p){if(p===59&&a){const b=e.exit("characterReferenceValue");return o===sa&&!k3(r.sliceSerialize(b))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(p)&&a++<s?(e.consume(p),m):n(p)}}const o7={partial:!0,tokenize:cie},l7={concrete:!0,name:"codeFenced",tokenize:uie};function uie(e,t,n){const r=this,a={partial:!0,tokenize:P};let s=0,o=0,u;return c;function c(O){return d(O)}function d(O){const R=r.events[r.events.length-1];return s=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,u=O,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(O)}function m(O){return O===u?(o++,e.consume(O),m):o<3?n(O):(e.exit("codeFencedFenceSequence"),dn(O)?ln(e,p,"whitespace")(O):p(O))}function p(O){return O===null||wt(O)?(e.exit("codeFencedFence"),r.interrupt?t(O):e.check(o7,S,I)(O)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(O))}function b(O){return O===null||wt(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(O)):dn(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ln(e,y,"whitespace")(O)):O===96&&O===u?n(O):(e.consume(O),b)}function y(O){return O===null||wt(O)?p(O):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(O))}function w(O){return O===null||wt(O)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(O)):O===96&&O===u?n(O):(e.consume(O),w)}function S(O){return e.attempt(a,I,k)(O)}function k(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),E}function E(O){return s>0&&dn(O)?ln(e,A,"linePrefix",s+1)(O):A(O)}function A(O){return O===null||wt(O)?e.check(o7,S,I)(O):(e.enter("codeFlowValue"),_(O))}function _(O){return O===null||wt(O)?(e.exit("codeFlowValue"),A(O)):(e.consume(O),_)}function I(O){return e.exit("codeFenced"),t(O)}function P(O,R,z){let F=0;return U;function U(ie){return O.enter("lineEnding"),O.consume(ie),O.exit("lineEnding"),X}function X(ie){return O.enter("codeFencedFence"),dn(ie)?ln(O,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ie):W(ie)}function W(ie){return ie===u?(O.enter("codeFencedFenceSequence"),le(ie)):z(ie)}function le(ie){return ie===u?(F++,O.consume(ie),le):F>=o?(O.exit("codeFencedFenceSequence"),dn(ie)?ln(O,se,"whitespace")(ie):se(ie)):z(ie)}function se(ie){return ie===null||wt(ie)?(O.exit("codeFencedFence"),R(ie)):z(ie)}}}function cie(e,t,n){const r=this;return a;function a(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const bx={name:"codeIndented",tokenize:fie},die={partial:!0,tokenize:hie};function fie(e,t,n){const r=this;return a;function a(d){return e.enter("codeIndented"),ln(e,s,"linePrefix",5)(d)}function s(d){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?o(d):n(d)}function o(d){return d===null?c(d):wt(d)?e.attempt(die,o,c)(d):(e.enter("codeFlowValue"),u(d))}function u(d){return d===null||wt(d)?(e.exit("codeFlowValue"),o(d)):(e.consume(d),u)}function c(d){return e.exit("codeIndented"),t(d)}}function hie(e,t,n){const r=this;return a;function a(o){return r.parser.lazy[r.now().line]?n(o):wt(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):ln(e,s,"linePrefix",5)(o)}function s(o){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(o):wt(o)?a(o):n(o)}}const mie={name:"codeText",previous:gie,resolve:pie,tokenize:bie};function pie(e){let t=e.length-4,n=3,r,a;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<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function gie(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function bie(e,t,n){let r=0,a,s;return o;function o(p){return e.enter("codeText"),e.enter("codeTextSequence"),u(p)}function u(p){return p===96?(e.consume(p),r++,u):(e.exit("codeTextSequence"),c(p))}function c(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),c):p===96?(s=e.enter("codeTextSequence"),a=0,m(p)):wt(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("codeTextData"),d(p))}function d(p){return p===null||p===32||p===96||wt(p)?(e.exit("codeTextData"),c(p)):(e.consume(p),d)}function m(p){return p===96?(e.consume(p),a++,m):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(s.type="codeTextData",d(p))}}class xie{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const a=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&pd(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),pd(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),pd(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);pd(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);pd(this.left,n.reverse())}}}function pd(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function BI(e){const t={};let n=-1,r,a,s,o,u,c,d;const m=new xie(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,s=0,s<c.length&&c[s][1].type==="lineEndingBlank"&&(s+=2),s<c.length&&c[s][1].type==="content"))for(;++s<c.length&&c[s][1].type!=="content";)c[s][1].type==="chunkText"&&(c[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,yie(m,n)),n=t[n],d=!0);else if(r[1]._container){for(s=n,a=void 0;s--;)if(o=m.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(a&&(m.get(a)[1].type="lineEndingBlank"),o[1].type="lineEnding",a=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;a&&(r[1].end={...m.get(a)[1].start},u=m.slice(a,n),u.unshift(r),m.splice(a,n-a+1,u))}}return Kr(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!d}function yie(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const s=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const u=o.events,c=[],d={};let m,p,b=-1,y=n,w=0,S=0;const k=[S];for(;y;){for(;e.get(++a)[1]!==y;);s.push(a),y._tokenizer||(m=r.sliceStream(y),y.next||m.push(null),p&&o.defineSkip(y.start),y._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(m),y._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),p=y,y=y.next}for(y=n;++b<u.length;)u[b][0]==="exit"&&u[b-1][0]==="enter"&&u[b][1].type===u[b-1][1].type&&u[b][1].start.line!==u[b][1].end.line&&(S=b+1,k.push(S),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(o.events=[],y?(y._tokenizer=void 0,y.previous=void 0):k.pop(),b=k.length;b--;){const E=u.slice(k[b],k[b+1]),A=s.pop();c.push([A,A+E.length-1]),e.splice(A,2,E)}for(c.reverse(),b=-1;++b<c.length;)d[w+c[b][0]]=w+c[b][1],w+=c[b][1]-c[b][0]-1;return d}const vie={resolve:Tie,tokenize:Eie},wie={partial:!0,tokenize:Sie};function Tie(e){return BI(e),e}function Eie(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(u)}function a(u){return u===null?s(u):wt(u)?e.check(wie,o,s)(u):(e.consume(u),a)}function s(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function o(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function Sie(e,t,n){const r=this;return a;function a(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),ln(e,s,"linePrefix")}function s(o){if(o===null||wt(o))return n(o);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function FI(e,t,n,r,a,s,o,u,c){const d=c||Number.POSITIVE_INFINITY;let m=0;return p;function p(E){return E===60?(e.enter(r),e.enter(a),e.enter(s),e.consume(E),e.exit(s),b):E===null||E===32||E===41||Vp(E)?n(E):(e.enter(r),e.enter(o),e.enter(u),e.enter("chunkString",{contentType:"string"}),S(E))}function b(E){return E===62?(e.enter(s),e.consume(E),e.exit(s),e.exit(a),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),y(E))}function y(E){return E===62?(e.exit("chunkString"),e.exit(u),b(E)):E===null||E===60||wt(E)?n(E):(e.consume(E),E===92?w:y)}function w(E){return E===60||E===62||E===92?(e.consume(E),y):y(E)}function S(E){return!m&&(E===null||E===41||Hn(E))?(e.exit("chunkString"),e.exit(u),e.exit(o),e.exit(r),t(E)):m<d&&E===40?(e.consume(E),m++,S):E===41?(e.consume(E),m--,S):E===null||E===32||E===40||Vp(E)?n(E):(e.consume(E),E===92?k:S)}function k(E){return E===40||E===41||E===92?(e.consume(E),S):S(E)}}function HI(e,t,n,r,a,s){const o=this;let u=0,c;return d;function d(y){return e.enter(r),e.enter(a),e.consume(y),e.exit(a),e.enter(s),m}function m(y){return u>999||y===null||y===91||y===93&&!c||y===94&&!u&&"_hiddenFootnoteSupport"in o.parser.constructs?n(y):y===93?(e.exit(s),e.enter(a),e.consume(y),e.exit(a),e.exit(r),t):wt(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===null||y===91||y===93||wt(y)||u++>999?(e.exit("chunkString"),m(y)):(e.consume(y),c||(c=!dn(y)),y===92?b:p)}function b(y){return y===91||y===92||y===93?(e.consume(y),u++,p):p(y)}}function UI(e,t,n,r,a,s){let o;return u;function u(b){return b===34||b===39||b===40?(e.enter(r),e.enter(a),e.consume(b),e.exit(a),o=b===40?41:b,c):n(b)}function c(b){return b===o?(e.enter(a),e.consume(b),e.exit(a),e.exit(r),t):(e.enter(s),d(b))}function d(b){return b===o?(e.exit(s),c(o)):b===null?n(b):wt(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),ln(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===o||b===null||wt(b)?(e.exit("chunkString"),d(b)):(e.consume(b),b===92?p:m)}function p(b){return b===o||b===92?(e.consume(b),m):m(b)}}function Bd(e,t){let n;return r;function r(a){return wt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):dn(a)?ln(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const Cie={name:"definition",tokenize:Aie},kie={partial:!0,tokenize:Nie};function Aie(e,t,n){const r=this;let a;return s;function s(y){return e.enter("definition"),o(y)}function o(y){return HI.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function u(y){return a=Hs(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),c):n(y)}function c(y){return Hn(y)?Bd(e,d)(y):d(y)}function d(y){return FI(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function m(y){return e.attempt(kie,p,p)(y)}function p(y){return dn(y)?ln(e,b,"whitespace")(y):b(y)}function b(y){return y===null||wt(y)?(e.exit("definition"),r.parser.defined.push(a),t(y)):n(y)}}function Nie(e,t,n){return r;function r(u){return Hn(u)?Bd(e,a)(u):n(u)}function a(u){return UI(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function s(u){return dn(u)?ln(e,o,"whitespace")(u):o(u)}function o(u){return u===null||wt(u)?t(u):n(u)}}const _ie={name:"hardBreakEscape",tokenize:Rie};function Rie(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),a}function a(s){return wt(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const Mie={name:"headingAtx",resolve:Die,tokenize:Iie};function Die(e,t){let n=e.length-2,r=3,a,s;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&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Kr(e,r,n-r+1,[["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t]])),e}function Iie(e,t,n){let r=0;return a;function a(m){return e.enter("atxHeading"),s(m)}function s(m){return e.enter("atxHeadingSequence"),o(m)}function o(m){return m===35&&r++<6?(e.consume(m),o):m===null||Hn(m)?(e.exit("atxHeadingSequence"),u(m)):n(m)}function u(m){return m===35?(e.enter("atxHeadingSequence"),c(m)):m===null||wt(m)?(e.exit("atxHeading"),t(m)):dn(m)?ln(e,u,"whitespace")(m):(e.enter("atxHeadingText"),d(m))}function c(m){return m===35?(e.consume(m),c):(e.exit("atxHeadingSequence"),u(m))}function d(m){return m===null||m===35||Hn(m)?(e.exit("atxHeadingText"),u(m)):(e.consume(m),d)}}const Oie=["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"],u7=["pre","script","style","textarea"],Lie={concrete:!0,name:"htmlFlow",resolveTo:zie,tokenize:Bie},Pie={partial:!0,tokenize:Hie},jie={partial:!0,tokenize:Fie};function zie(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 Bie(e,t,n){const r=this;let a,s,o,u,c;return d;function d(L){return m(L)}function m(L){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(L),p}function p(L){return L===33?(e.consume(L),b):L===47?(e.consume(L),s=!0,S):L===63?(e.consume(L),a=3,r.interrupt?t:j):pa(L)?(e.consume(L),o=String.fromCharCode(L),k):n(L)}function b(L){return L===45?(e.consume(L),a=2,y):L===91?(e.consume(L),a=5,u=0,w):pa(L)?(e.consume(L),a=4,r.interrupt?t:j):n(L)}function y(L){return L===45?(e.consume(L),r.interrupt?t:j):n(L)}function w(L){const ae="CDATA[";return L===ae.charCodeAt(u++)?(e.consume(L),u===ae.length?r.interrupt?t:W:w):n(L)}function S(L){return pa(L)?(e.consume(L),o=String.fromCharCode(L),k):n(L)}function k(L){if(L===null||L===47||L===62||Hn(L)){const ae=L===47,oe=o.toLowerCase();return!ae&&!s&&u7.includes(oe)?(a=1,r.interrupt?t(L):W(L)):Oie.includes(o.toLowerCase())?(a=6,ae?(e.consume(L),E):r.interrupt?t(L):W(L)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(L):s?A(L):_(L))}return L===45||sa(L)?(e.consume(L),o+=String.fromCharCode(L),k):n(L)}function E(L){return L===62?(e.consume(L),r.interrupt?t:W):n(L)}function A(L){return dn(L)?(e.consume(L),A):U(L)}function _(L){return L===47?(e.consume(L),U):L===58||L===95||pa(L)?(e.consume(L),I):dn(L)?(e.consume(L),_):U(L)}function I(L){return L===45||L===46||L===58||L===95||sa(L)?(e.consume(L),I):P(L)}function P(L){return L===61?(e.consume(L),O):dn(L)?(e.consume(L),P):_(L)}function O(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),c=L,R):dn(L)?(e.consume(L),O):z(L)}function R(L){return L===c?(e.consume(L),c=null,F):L===null||wt(L)?n(L):(e.consume(L),R)}function z(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||Hn(L)?P(L):(e.consume(L),z)}function F(L){return L===47||L===62||dn(L)?_(L):n(L)}function U(L){return L===62?(e.consume(L),X):n(L)}function X(L){return L===null||wt(L)?W(L):dn(L)?(e.consume(L),X):n(L)}function W(L){return L===45&&a===2?(e.consume(L),$):L===60&&a===1?(e.consume(L),K):L===62&&a===4?(e.consume(L),H):L===63&&a===3?(e.consume(L),j):L===93&&a===5?(e.consume(L),re):wt(L)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(Pie,G,le)(L)):L===null||wt(L)?(e.exit("htmlFlowData"),le(L)):(e.consume(L),W)}function le(L){return e.check(jie,se,G)(L)}function se(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),ie}function ie(L){return L===null||wt(L)?le(L):(e.enter("htmlFlowData"),W(L))}function $(L){return L===45?(e.consume(L),j):W(L)}function K(L){return L===47?(e.consume(L),o="",Z):W(L)}function Z(L){if(L===62){const ae=o.toLowerCase();return u7.includes(ae)?(e.consume(L),H):W(L)}return pa(L)&&o.length<8?(e.consume(L),o+=String.fromCharCode(L),Z):W(L)}function re(L){return L===93?(e.consume(L),j):W(L)}function j(L){return L===62?(e.consume(L),H):L===45&&a===2?(e.consume(L),j):W(L)}function H(L){return L===null||wt(L)?(e.exit("htmlFlowData"),G(L)):(e.consume(L),H)}function G(L){return e.exit("htmlFlow"),t(L)}}function Fie(e,t,n){const r=this;return a;function a(o){return wt(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):n(o)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function Hie(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(Gf,t,n)}}const Uie={name:"htmlText",tokenize:$ie};function $ie(e,t,n){const r=this;let a,s,o;return u;function u(j){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(j),c}function c(j){return j===33?(e.consume(j),d):j===47?(e.consume(j),P):j===63?(e.consume(j),_):pa(j)?(e.consume(j),z):n(j)}function d(j){return j===45?(e.consume(j),m):j===91?(e.consume(j),s=0,w):pa(j)?(e.consume(j),A):n(j)}function m(j){return j===45?(e.consume(j),y):n(j)}function p(j){return j===null?n(j):j===45?(e.consume(j),b):wt(j)?(o=p,K(j)):(e.consume(j),p)}function b(j){return j===45?(e.consume(j),y):p(j)}function y(j){return j===62?$(j):j===45?b(j):p(j)}function w(j){const H="CDATA[";return j===H.charCodeAt(s++)?(e.consume(j),s===H.length?S:w):n(j)}function S(j){return j===null?n(j):j===93?(e.consume(j),k):wt(j)?(o=S,K(j)):(e.consume(j),S)}function k(j){return j===93?(e.consume(j),E):S(j)}function E(j){return j===62?$(j):j===93?(e.consume(j),E):S(j)}function A(j){return j===null||j===62?$(j):wt(j)?(o=A,K(j)):(e.consume(j),A)}function _(j){return j===null?n(j):j===63?(e.consume(j),I):wt(j)?(o=_,K(j)):(e.consume(j),_)}function I(j){return j===62?$(j):_(j)}function P(j){return pa(j)?(e.consume(j),O):n(j)}function O(j){return j===45||sa(j)?(e.consume(j),O):R(j)}function R(j){return wt(j)?(o=R,K(j)):dn(j)?(e.consume(j),R):$(j)}function z(j){return j===45||sa(j)?(e.consume(j),z):j===47||j===62||Hn(j)?F(j):n(j)}function F(j){return j===47?(e.consume(j),$):j===58||j===95||pa(j)?(e.consume(j),U):wt(j)?(o=F,K(j)):dn(j)?(e.consume(j),F):$(j)}function U(j){return j===45||j===46||j===58||j===95||sa(j)?(e.consume(j),U):X(j)}function X(j){return j===61?(e.consume(j),W):wt(j)?(o=X,K(j)):dn(j)?(e.consume(j),X):F(j)}function W(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),a=j,le):wt(j)?(o=W,K(j)):dn(j)?(e.consume(j),W):(e.consume(j),se)}function le(j){return j===a?(e.consume(j),a=void 0,ie):j===null?n(j):wt(j)?(o=le,K(j)):(e.consume(j),le)}function se(j){return j===null||j===34||j===39||j===60||j===61||j===96?n(j):j===47||j===62||Hn(j)?F(j):(e.consume(j),se)}function ie(j){return j===47||j===62||Hn(j)?F(j):n(j)}function $(j){return j===62?(e.consume(j),e.exit("htmlTextData"),e.exit("htmlText"),t):n(j)}function K(j){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),Z}function Z(j){return dn(j)?ln(e,re,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):re(j)}function re(j){return e.enter("htmlTextData"),o(j)}}const N3={name:"labelEnd",resolveAll:Yie,resolveTo:Wie,tokenize:Xie},qie={tokenize:Kie},Vie={tokenize:Qie},Gie={tokenize:Zie};function Yie(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&Kr(e,0,e.length,n),e}function Wie(e,t){let n=e.length,r=0,a,s,o,u;for(;n--;)if(a=e[n][1],s){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(s=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(o=n);const c={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[s][1].start},end:{...e[o][1].end}},m={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[o-2][1].start}};return u=[["enter",c,t],["enter",d,t]],u=Xr(u,e.slice(s+1,s+r+3)),u=Xr(u,[["enter",m,t]]),u=Xr(u,u0(t.parser.constructs.insideSpan.null,e.slice(s+r+4,o-3),t)),u=Xr(u,[["exit",m,t],e[o-2],e[o-1],["exit",d,t]]),u=Xr(u,e.slice(o+1)),u=Xr(u,[["exit",c,t]]),Kr(e,s,e.length,u),e}function Xie(e,t,n){const r=this;let a=r.events.length,s,o;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){s=r.events[a][1];break}return u;function u(b){return s?s._inactive?p(b):(o=r.parser.defined.includes(Hs(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),c):n(b)}function c(b){return b===40?e.attempt(qie,m,o?m:p)(b):b===91?e.attempt(Vie,m,o?d:p)(b):o?m(b):p(b)}function d(b){return e.attempt(Gie,m,p)(b)}function m(b){return t(b)}function p(b){return s._balanced=!0,n(b)}}function Kie(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),a}function a(p){return Hn(p)?Bd(e,s)(p):s(p)}function s(p){return p===41?m(p):FI(e,o,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function o(p){return Hn(p)?Bd(e,c)(p):m(p)}function u(p){return n(p)}function c(p){return p===34||p===39||p===40?UI(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):m(p)}function d(p){return Hn(p)?Bd(e,m)(p):m(p)}function m(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function Qie(e,t,n){const r=this;return a;function a(u){return HI.call(r,e,s,o,"reference","referenceMarker","referenceString")(u)}function s(u){return r.parser.defined.includes(Hs(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function o(u){return n(u)}}function Zie(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),a}function a(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const Jie={name:"labelStartImage",resolveAll:N3.resolveAll,tokenize:eoe};function eoe(e,t,n){const r=this;return a;function a(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),s}function s(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),o):n(u)}function o(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const toe={name:"labelStartLink",resolveAll:N3.resolveAll,tokenize:noe};function noe(e,t,n){const r=this;return a;function a(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const xx={name:"lineEnding",tokenize:roe};function roe(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ln(e,t,"linePrefix")}}const cp={name:"thematicBreak",tokenize:aoe};function aoe(e,t,n){let r=0,a;return s;function s(d){return e.enter("thematicBreak"),o(d)}function o(d){return a=d,u(d)}function u(d){return d===a?(e.enter("thematicBreakSequence"),c(d)):r>=3&&(d===null||wt(d))?(e.exit("thematicBreak"),t(d)):n(d)}function c(d){return d===a?(e.consume(d),r++,c):(e.exit("thematicBreakSequence"),dn(d)?ln(e,u,"whitespace")(d):u(d))}}const Ma={continuation:{tokenize:loe},exit:coe,name:"list",tokenize:ooe},soe={partial:!0,tokenize:doe},ioe={partial:!0,tokenize:uoe};function ooe(e,t,n){const r=this,a=r.events[r.events.length-1];let s=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,o=0;return u;function u(y){const w=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Vy(y)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(cp,n,d)(y):d(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(y)}return n(y)}function c(y){return Vy(y)&&++o<10?(e.consume(y),c):(!r.interrupt||o<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),d(y)):n(y)}function d(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(Gf,r.interrupt?n:m,e.attempt(soe,b,p))}function m(y){return r.containerState.initialBlankLine=!0,s++,b(y)}function p(y){return dn(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),b):n(y)}function b(y){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function loe(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Gf,a,s);function a(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ln(e,t,"listItemIndent",r.containerState.size+1)(u)}function s(u){return r.containerState.furtherBlankLines||!dn(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ioe,t,o)(u))}function o(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,ln(e,e.attempt(Ma,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function uoe(e,t,n){const r=this;return ln(e,a,"listItemIndent",r.containerState.size+1);function a(s){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(s):n(s)}}function coe(e){e.exit(this.containerState.type)}function doe(e,t,n){const r=this;return ln(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(s){const o=r.events[r.events.length-1];return!dn(s)&&o&&o[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const c7={name:"setextUnderline",resolveTo:foe,tokenize:hoe};function foe(e,t){let n=e.length,r,a,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",s?(e.splice(a,0,["enter",o,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function hoe(e,t,n){const r=this;let a;return s;function s(d){let m=r.events.length,p;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){p=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),a=d,o(d)):n(d)}function o(d){return e.enter("setextHeadingLineSequence"),u(d)}function u(d){return d===a?(e.consume(d),u):(e.exit("setextHeadingLineSequence"),dn(d)?ln(e,c,"lineSuffix")(d):c(d))}function c(d){return d===null||wt(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const moe={tokenize:Toe,partial:!0};function poe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:yoe,continuation:{tokenize:voe},exit:woe}},text:{91:{name:"gfmFootnoteCall",tokenize:xoe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:goe,resolveTo:boe}}}}function goe(e,t,n){const r=this;let a=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;a--;){const c=r.events[a][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return u;function u(c){if(!o||!o._balanced)return n(c);const d=Hs(r.sliceSerialize({start:o.end,end:r.now()}));return d.codePointAt(0)!==94||!s.includes(d.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function boe(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";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function xoe(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,o;return u;function u(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),c}function c(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(p){if(s>999||p===93&&!o||p===null||p===91||Hn(p))return n(p);if(p===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return a.includes(Hs(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return Hn(p)||(o=!0),s++,e.consume(p),p===92?m:d}function m(p){return p===91||p===92||p===93?(e.consume(p),s++,d):d(p)}}function yoe(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,o=0,u;return c;function c(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(w)}function m(w){if(o>999||w===93&&!u||w===null||w===91||Hn(w))return n(w);if(w===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return s=Hs(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return Hn(w)||(u=!0),o++,e.consume(w),w===92?p:m}function p(w){return w===91||w===92||w===93?(e.consume(w),o++,m):m(w)}function b(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),a.includes(s)||a.push(s),ln(e,y,"gfmFootnoteDefinitionWhitespace")):n(w)}function y(w){return t(w)}}function voe(e,t,n){return e.check(Gf,t,e.attempt(moe,t,n))}function woe(e){e.exit("gfmFootnoteDefinition")}function Toe(e,t,n){const r=this;return ln(e,a,"gfmFootnoteDefinitionIndent",5);function a(s){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(s):n(s)}}function Eoe(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:a};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function a(o,u){let c=-1;for(;++c<o.length;)if(o[c][0]==="enter"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._close){let d=c;for(;d--;)if(o[d][0]==="exit"&&o[d][1].type==="strikethroughSequenceTemporary"&&o[d][1]._open&&o[c][1].end.offset-o[c][1].start.offset===o[d][1].end.offset-o[d][1].start.offset){o[c][1].type="strikethroughSequence",o[d][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},o[d][1].start),end:Object.assign({},o[c][1].end)},p={type:"strikethroughText",start:Object.assign({},o[d][1].end),end:Object.assign({},o[c][1].start)},b=[["enter",m,u],["enter",o[d][1],u],["exit",o[d][1],u],["enter",p,u]],y=u.parser.constructs.insideSpan.null;y&&Kr(b,b.length,0,u0(y,o.slice(d+1,c),u)),Kr(b,b.length,0,[["exit",p,u],["enter",o[c][1],u],["exit",o[c][1],u],["exit",m,u]]),Kr(o,d-1,c-d+3,b),c=d+b.length-2;break}}for(c=-1;++c<o.length;)o[c][1].type==="strikethroughSequenceTemporary"&&(o[c][1].type="data");return o}function s(o,u,c){const d=this.previous,m=this.events;let p=0;return b;function b(w){return d===126&&m[m.length-1][1].type!=="characterEscape"?c(w):(o.enter("strikethroughSequenceTemporary"),y(w))}function y(w){const S=Vc(d);if(w===126)return p>1?c(w):(o.consume(w),p++,y);if(p<2&&!n)return c(w);const k=o.exit("strikethroughSequenceTemporary"),E=Vc(w);return k._open=!E||E===2&&!!S,k._close=!S||S===2&&!!E,u(w)}}}class Soe{constructor(){this.map=[]}add(t,n,r){Coe(this,t,n,r)}consume(t){if(this.map.sort(function(s,o){return s[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let a=r.pop();for(;a;){for(const s of a)t.push(s);a=r.pop()}this.map.length=0}}function Coe(e,t,n,r){let a=0;if(!(n===0&&r.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...r);return}a+=1}e.map.push([t,n,r])}}function koe(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Aoe(){return{flow:{null:{name:"table",tokenize:Noe,resolveAll:_oe}}}}function Noe(e,t,n){const r=this;let a=0,s=0,o;return u;function u(U){let X=r.events.length-1;for(;X>-1;){const se=r.events[X][1].type;if(se==="lineEnding"||se==="linePrefix")X--;else break}const W=X>-1?r.events[X][1].type:null,le=W==="tableHead"||W==="tableRow"?O:c;return le===O&&r.parser.lazy[r.now().line]?n(U):le(U)}function c(U){return e.enter("tableHead"),e.enter("tableRow"),d(U)}function d(U){return U===124||(o=!0,s+=1),m(U)}function m(U){return U===null?n(U):wt(U)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),y):n(U):dn(U)?ln(e,m,"whitespace")(U):(s+=1,o&&(o=!1,a+=1),U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),o=!0,m):(e.enter("data"),p(U)))}function p(U){return U===null||U===124||Hn(U)?(e.exit("data"),m(U)):(e.consume(U),U===92?b:p)}function b(U){return U===92||U===124?(e.consume(U),p):p(U)}function y(U){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(U):(e.enter("tableDelimiterRow"),o=!1,dn(U)?ln(e,w,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):w(U))}function w(U){return U===45||U===58?k(U):U===124?(o=!0,e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),S):P(U)}function S(U){return dn(U)?ln(e,k,"whitespace")(U):k(U)}function k(U){return U===58?(s+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),E):U===45?(s+=1,E(U)):U===null||wt(U)?I(U):P(U)}function E(U){return U===45?(e.enter("tableDelimiterFiller"),A(U)):P(U)}function A(U){return U===45?(e.consume(U),A):U===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),_):(e.exit("tableDelimiterFiller"),_(U))}function _(U){return dn(U)?ln(e,I,"whitespace")(U):I(U)}function I(U){return U===124?w(U):U===null||wt(U)?!o||a!==s?P(U):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(U)):P(U)}function P(U){return n(U)}function O(U){return e.enter("tableRow"),R(U)}function R(U){return U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),R):U===null||wt(U)?(e.exit("tableRow"),t(U)):dn(U)?ln(e,R,"whitespace")(U):(e.enter("data"),z(U))}function z(U){return U===null||U===124||Hn(U)?(e.exit("data"),R(U)):(e.consume(U),U===92?F:z)}function F(U){return U===92||U===124?(e.consume(U),z):z(U)}}function _oe(e,t){let n=-1,r=!0,a=0,s=[0,0,0,0],o=[0,0,0,0],u=!1,c=0,d,m,p;const b=new Soe;for(;++n<e.length;){const y=e[n],w=y[1];y[0]==="enter"?w.type==="tableHead"?(u=!1,c!==0&&(d7(b,t,c,d,m),m=void 0,c=0),d={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},b.add(n,0,[["enter",d,t]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(r=!0,p=void 0,s=[0,0,0,0],o=[0,n+1,0,0],u&&(u=!1,m={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},b.add(n,0,[["enter",m,t]])),a=w.type==="tableDelimiterRow"?2:m?3:1):a&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(s[1]!==0&&(o[0]=o[1],p=Bm(b,t,s,a,void 0,p),s=[0,0,0,0]),o[2]=n)):w.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(o[0]=o[1],p=Bm(b,t,s,a,void 0,p)),s=o,o=[s[1],n,0,0])):w.type==="tableHead"?(u=!0,c=n):w.type==="tableRow"||w.type==="tableDelimiterRow"?(c=n,s[1]!==0?(o[0]=o[1],p=Bm(b,t,s,a,n,p)):o[1]!==0&&(p=Bm(b,t,o,a,n,p)),a=0):a&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(o[3]=n)}for(c!==0&&d7(b,t,c,d,m),b.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=koe(t.events,n))}return e}function Bm(e,t,n,r,a,s){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(s.end=Object.assign({},hc(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const c=hc(t.events,n[1]);if(s={type:o,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const d=hc(t.events,n[2]),m=hc(t.events,n[3]),p={type:u,start:Object.assign({},d),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const b=t.events[n[2]],y=t.events[n[3]];if(b[1].end=Object.assign({},y[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const w=n[2]+1,S=n[3]-n[2]-1;e.add(w,S,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return a!==void 0&&(s.end=Object.assign({},hc(t.events,a)),e.add(a,0,[["exit",s,t]]),s=void 0),s}function d7(e,t,n,r,a){const s=[],o=hc(t.events,n);a&&(a.end=Object.assign({},o),s.push(["exit",a,t])),r.end=Object.assign({},o),s.push(["exit",r,t]),e.add(n+1,0,s)}function hc(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Roe={name:"tasklistCheck",tokenize:Doe};function Moe(){return{text:{91:Roe}}}function Doe(e,t,n){const r=this;return a;function a(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),s)}function s(c){return Hn(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),o):n(c)}function o(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(c)}function u(c){return wt(c)?t(c):dn(c)?e.check({tokenize:Ioe},t,n)(c):n(c)}}function Ioe(e,t,n){return ln(e,r,"whitespace");function r(a){return a===null?n(a):t(a)}}function Ooe(e){return AI([qse(),poe(),Eoe(e),Aoe(),Moe()])}const Loe={};function Poe(e){const t=this,n=e||Loe,r=t.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(Ooe(n)),s.push(zse()),o.push(Bse(n))}function joe(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:s},exit:{mathFlow:a,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:u,mathText:o,mathTextData:u}};function e(c){const d={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[d]}},c)}function t(){this.buffer()}function n(){const c=this.resume(),d=this.stack[this.stack.length-1];d.type,d.meta=c}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function a(c){const d=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),m=this.stack[this.stack.length-1];m.type,this.exit(c),m.value=d;const p=m.data.hChildren[0];p.type,p.tagName,p.children.push({type:"text",value:d}),this.data.mathFlowInside=void 0}function s(c){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},c),this.buffer()}function o(c){const d=this.resume(),m=this.stack[this.stack.length-1];m.type,this.exit(c),m.value=d,m.data.hChildren.push({type:"text",value:d})}function u(c){this.config.enter.data.call(this,c),this.config.exit.data.call(this,c)}}function zoe(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),r.peek=a,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
|
|
347
|
+
`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:r}};function n(s,o,u,c){const d=s.value||"",m=u.createTracker(c),p="$".repeat(Math.max(hI(d,"$")+1,2)),b=u.enter("mathFlow");let y=m.move(p);if(s.meta){const w=u.enter("mathFlowMeta");y+=m.move(u.safe(s.meta,{after:`
|
|
348
|
+
`,before:y,encode:["$"],...m.current()})),w()}return y+=m.move(`
|
|
349
|
+
`),d&&(y+=m.move(d+`
|
|
350
|
+
`)),y+=m.move(p),b(),y}function r(s,o,u){let c=s.value||"",d=1;for(t||d++;new RegExp("(^|[^$])"+"\\$".repeat(d)+"([^$]|$)").test(c);)d++;const m="$".repeat(d);/[^ \r\n]/.test(c)&&(/^[ \r\n]/.test(c)&&/[ \r\n]$/.test(c)||/^\$|\$$/.test(c))&&(c=" "+c+" ");let p=-1;for(;++p<u.unsafe.length;){const b=u.unsafe[p];if(!b.atBreak)continue;const y=u.compilePattern(b);let w;for(;w=y.exec(c);){let S=w.index;c.codePointAt(S)===10&&c.codePointAt(S-1)===13&&S--,c=c.slice(0,S)+" "+c.slice(w.index+1)}}return m+c+m}function a(){return"$"}}const Boe={tokenize:Foe,concrete:!0,name:"mathFlow"},f7={tokenize:Hoe,partial:!0};function Foe(e,t,n){const r=this,a=r.events[r.events.length-1],s=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0;let o=0;return u;function u(A){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),c(A)}function c(A){return A===36?(e.consume(A),o++,c):o<2?n(A):(e.exit("mathFlowFenceSequence"),ln(e,d,"whitespace")(A))}function d(A){return A===null||wt(A)?p(A):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(A))}function m(A){return A===null||wt(A)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),p(A)):A===36?n(A):(e.consume(A),m)}function p(A){return e.exit("mathFlowFence"),r.interrupt?t(A):e.attempt(f7,b,k)(A)}function b(A){return e.attempt({tokenize:E,partial:!0},k,y)(A)}function y(A){return(s?ln(e,w,"linePrefix",s+1):w)(A)}function w(A){return A===null?k(A):wt(A)?e.attempt(f7,b,k)(A):(e.enter("mathFlowValue"),S(A))}function S(A){return A===null||wt(A)?(e.exit("mathFlowValue"),w(A)):(e.consume(A),S)}function k(A){return e.exit("mathFlow"),t(A)}function E(A,_,I){let P=0;return ln(A,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function O(F){return A.enter("mathFlowFence"),A.enter("mathFlowFenceSequence"),R(F)}function R(F){return F===36?(P++,A.consume(F),R):P<o?I(F):(A.exit("mathFlowFenceSequence"),ln(A,z,"whitespace")(F))}function z(F){return F===null||wt(F)?(A.exit("mathFlowFence"),_(F)):I(F)}}}function Hoe(e,t,n){const r=this;return a;function a(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function Uoe(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),{tokenize:r,resolve:$oe,previous:qoe,name:"mathText"};function r(a,s,o){let u=0,c,d;return m;function m(S){return a.enter("mathText"),a.enter("mathTextSequence"),p(S)}function p(S){return S===36?(a.consume(S),u++,p):u<2&&!n?o(S):(a.exit("mathTextSequence"),b(S))}function b(S){return S===null?o(S):S===36?(d=a.enter("mathTextSequence"),c=0,w(S)):S===32?(a.enter("space"),a.consume(S),a.exit("space"),b):wt(S)?(a.enter("lineEnding"),a.consume(S),a.exit("lineEnding"),b):(a.enter("mathTextData"),y(S))}function y(S){return S===null||S===32||S===36||wt(S)?(a.exit("mathTextData"),b(S)):(a.consume(S),y)}function w(S){return S===36?(a.consume(S),c++,w):c===u?(a.exit("mathTextSequence"),a.exit("mathText"),s(S)):(d.type="mathTextData",y(S))}}}function $oe(e){let t=e.length-4,n=3,r,a;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<t;)if(e[r][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[n][1].type="mathTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="mathTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function qoe(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function Voe(e){return{flow:{36:Boe},text:{36:Uoe(e)}}}const Goe={};function Xy(e){const t=this,n=e||Goe,r=t.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(Voe(n)),s.push(joe()),o.push(zoe(n))}var Yoe=/(\*\*)([^*]*?)$/,Woe=/(__)([^_]*?)$/,Xoe=/(\*\*\*)([^*]*?)$/,Koe=/(\*)([^*]*?)$/,Qoe=/(_)([^_]*?)$/,Zoe=/(`)([^`]*?)$/,Joe=/(~~)([^~]*?)$/,yu=/^[\s_~*`]*$/,$I=/^[\s]*[-*+][\s]+$/,ele=/[\p{L}\p{N}_]/u,tle=/^```[^`\n]*```?$/,nle=/^\*{4,}$/,ul=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:ele.test(e)},ng=e=>{let t=(e.match(/```/g)||[]).length;return t>0&&t%2===0&&e.includes(`
|
|
351
|
+
`)},rle=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},ale=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},qI=(e,t)=>{let n=!1,r=!1;for(let a=0;a<e.length&&a<t;a+=1){if(e[a]==="\\"&&e[a+1]==="$"){a+=1;continue}e[a]==="$"&&(e[a+1]==="$"?(r=!r,a+=1,n=!1):r||(n=!n))}return n||r},sle=(e,t,n)=>{if(n!==" "&&n!==" ")return!1;let r=0;for(let a=t-1;a>=0;a-=1)if(e[a]===`
|
|
352
|
+
`){r=a+1;break}for(let a=r;a<t;a+=1)if(e[a]!==" "&&e[a]!==" ")return!1;return!0},ile=(e,t,n,r)=>!!(n==="\\"||n==="*"||r==="*"||n&&r&&ul(n)&&ul(r)||sle(e,t,r)),ole=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!=="*")continue;let a=r>0?e[r-1]:"",s=r<n-1?e[r+1]:"";ile(e,r,a,s)||(t+=1)}return t},lle=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&qI(e,t)||n==="_"||r==="_"||n&&r&&ul(n)&&ul(r)),ule=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!=="_")continue;let a=r>0?e[r-1]:"",s=r<n-1?e[r+1]:"";lle(e,r,a,s)||(t+=1)}return t},cle=e=>{let t=0,n=0;for(let r=0;r<e.length;r+=1)e[r]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0);return n>=3&&(t+=Math.floor(n/3)),t},dle=e=>{if(ng(e))return e;let t=e.match(Yoe);if(t){let n=t[2];if(!n||yu.test(n))return e;let r=e.lastIndexOf(t[1]),a=e.substring(0,r).lastIndexOf(`
|
|
353
|
+
`),s=a===-1?0:a+1,o=e.substring(s,r);if($I.test(o)&&n.includes(`
|
|
354
|
+
`))return e;if((e.match(/\*\*/g)||[]).length%2===1)return`${e}**`}return e},fle=e=>{let t=e.match(Woe);if(t){let n=t[2];if(!n||yu.test(n))return e;let r=e.lastIndexOf(t[1]),a=e.substring(0,r).lastIndexOf(`
|
|
355
|
+
`),s=a===-1?0:a+1,o=e.substring(s,r);if($I.test(o)&&n.includes(`
|
|
356
|
+
`))return e;if((e.match(/__/g)||[]).length%2===1)return`${e}__`}return e},hle=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="*"&&e[t-1]!=="*"&&e[t+1]!=="*"&&e[t-1]!=="\\"){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if(n&&r&&ul(n)&&ul(r))continue;return t}return-1},mle=e=>{if(ng(e)||!e.match(Koe))return e;let t=hle(e);if(t===-1)return e;let n=e.substring(t+1);return!n||yu.test(n)?e:ole(e)%2===1?`${e}*`:e},ple=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="_"&&e[t-1]!=="_"&&e[t+1]!=="_"&&e[t-1]!=="\\"&&!qI(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if(n&&r&&ul(n)&&ul(r))continue;return t}return-1},gle=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
357
|
+
`;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},ble=e=>{if(ng(e)||!e.match(Qoe))return e;let t=ple(e);if(t===-1)return e;let n=e.substring(t+1);return!n||yu.test(n)?e:ule(e)%2===1?gle(e):e},xle=e=>{if(ng(e)||nle.test(e))return e;let t=e.match(Xoe);if(t){let n=t[2];if(!n||yu.test(n))return e;if(cle(e)%2===1)return`${e}***`}return e},Ky=(e,t)=>{let n=!1,r=!1;for(let a=0;a<t;a+=1){if(e.substring(a,a+3)==="```"){r=!r,a+=2;continue}!r&&e[a]==="`"&&(n=!n)}return n||r},yle=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",a=t>1&&e.substring(t-2,t+1)==="```";return n||r||a},vle=e=>{let t=0;for(let n=0;n<e.length;n+=1)e[n]==="`"&&!yle(e,n)&&(t+=1);return t},wle=e=>!e.match(tle)||e.includes(`
|
|
358
|
+
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,Tle=e=>{let t=(e.match(/```/g)||[]).length;return!!(t>0&&t%2===0&&e.includes(`
|
|
359
|
+
`)||(e.endsWith("```\n")||e.endsWith("```"))&&t%2===0)},Ele=e=>(e.match(/```/g)||[]).length%2===1,Sle=e=>{let t=wle(e);if(t!==null)return t;if(Tle(e))return e;let n=e.match(Zoe);if(n&&!Ele(e)){let r=n[2];if(!r||yu.test(r))return e;if(vle(e)%2===1)return`${e}\``}return e},Cle=e=>{if((e.match(/\$\$/g)||[]).length%2===0)return e;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
360
|
+
`,t)!==-1&&!e.endsWith(`
|
|
361
|
+
`)?`${e}
|
|
362
|
+
$$`:`${e}$$`},kle=(e,t)=>{if(e.substring(t+2).includes(")"))return null;let n=rle(e,t);if(n===-1||Ky(e,n))return null;let r=n>0&&e[n-1]==="!",a=r?n-1:n,s=e.substring(0,a);if(r)return s;let o=e.substring(n+1,t);return`${s}[${o}](streamdown:incomplete-link)`},Ale=(e,t)=>{let n=t>0&&e[t-1]==="!",r=n?t-1:t;if(!e.substring(t+1).includes("]")){let a=e.substring(0,r);return n?a:`${e}](streamdown:incomplete-link)`}if(ale(e,t)===-1){let a=e.substring(0,r);return n?a:`${e}](streamdown:incomplete-link)`}return null},Nle=e=>{let t=e.lastIndexOf("](");if(t!==-1&&!Ky(e,t)){let n=kle(e,t);if(n!==null)return n}for(let n=e.length-1;n>=0;n-=1)if(e[n]==="["&&!Ky(e,n)){let r=Ale(e,n);if(r!==null)return r}return e},_le=e=>{let t=e.match(Joe);if(t){let n=t[2];if(!n||yu.test(n))return e;if((e.match(/~~/g)||[]).length%2===1)return`${e}~~`}return e},Rle=e=>{if(!e||typeof e!="string")return e;let t=e,n=Nle(t);return n.endsWith("](streamdown:incomplete-link)")?n:(t=n,t=xle(t),t=dle(t),t=fle(t),t=mle(t),t=ble(t),t=Sle(t),t=_le(t),t=Cle(t),t)},Mle=Rle;const Dle=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ile=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),h7=e=>{const t=Ile(e);return t.charAt(0).toUpperCase()+t.slice(1)},VI=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Ole=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Lle={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"};const Ple=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:s,iconNode:o,...u},c)=>x.createElement("svg",{ref:c,...Lle,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:VI("lucide",a),...!s&&!Ole(u)&&{"aria-hidden":"true"},...u},[...o.map(([d,m])=>x.createElement(d,m)),...Array.isArray(s)?s:[s]]));const go=(e,t)=>{const n=x.forwardRef(({className:r,...a},s)=>x.createElement(Ple,{ref:s,iconNode:t,className:VI(`lucide-${Dle(h7(e))}`,`lucide-${e}`,r),...a}));return n.displayName=h7(e),n};const jle=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],GI=go("check",jle);const zle=[["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"}]],YI=go("copy",zle);const Ble=[["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"}]],rg=go("download",Ble);const Fle=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Hle=go("loader-circle",Fle);const Ule=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],$le=go("maximize-2",Ule);const qle=[["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"}]],Vle=go("rotate-ccw",qle);const Gle=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Yle=go("x",Gle);const Wle=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],Xle=go("zoom-in",Wle);const Kle=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],Qle=go("zoom-out",Kle),Zle=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Jle=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eue={};function m7(e,t){return(eue.jsx?Jle:Zle).test(e)}const tue=/[ \t\n\f\r]/g;function nue(e){return typeof e=="object"?e.type==="text"?p7(e.value):!1:p7(e)}function p7(e){return e.replace(tue,"")===""}var cc={},yx,g7;function rue(){if(g7)return yx;g7=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,u=/^\s+|\s+$/g,c=`
|
|
363
|
+
`,d="/",m="*",p="",b="comment",y="declaration";function w(k,E){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];E=E||{};var A=1,_=1;function I(se){var ie=se.match(t);ie&&(A+=ie.length);var $=se.lastIndexOf(c);_=~$?se.length-$:_+se.length}function P(){var se={line:A,column:_};return function(ie){return ie.position=new O(se),F(),ie}}function O(se){this.start=se,this.end={line:A,column:_},this.source=E.source}O.prototype.content=k;function R(se){var ie=new Error(E.source+":"+A+":"+_+": "+se);if(ie.reason=se,ie.filename=E.source,ie.line=A,ie.column=_,ie.source=k,!E.silent)throw ie}function z(se){var ie=se.exec(k);if(ie){var $=ie[0];return I($),k=k.slice($.length),ie}}function F(){z(n)}function U(se){var ie;for(se=se||[];ie=X();)ie!==!1&&se.push(ie);return se}function X(){var se=P();if(!(d!=k.charAt(0)||m!=k.charAt(1))){for(var ie=2;p!=k.charAt(ie)&&(m!=k.charAt(ie)||d!=k.charAt(ie+1));)++ie;if(ie+=2,p===k.charAt(ie-1))return R("End of comment missing");var $=k.slice(2,ie-2);return _+=2,I($),k=k.slice(ie),_+=2,se({type:b,comment:$})}}function W(){var se=P(),ie=z(r);if(ie){if(X(),!z(a))return R("property missing ':'");var $=z(s),K=se({type:y,property:S(ie[0].replace(e,p)),value:$?S($[0].replace(e,p)):p});return z(o),K}}function le(){var se=[];U(se);for(var ie;ie=W();)ie!==!1&&(se.push(ie),U(se));return se}return F(),le()}function S(k){return k?k.replace(u,p):p}return yx=w,yx}var b7;function aue(){if(b7)return cc;b7=1;var e=cc&&cc.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(cc,"__esModule",{value:!0}),cc.default=n;const t=e(rue());function n(r,a){let s=null;if(!r||typeof r!="string")return s;const o=(0,t.default)(r),u=typeof a=="function";return o.forEach(c=>{if(c.type!=="declaration")return;const{property:d,value:m}=c;u?a(d,m,c):m&&(s=s||{},s[d]=m)}),s}return cc}var gd={},x7;function sue(){if(x7)return gd;x7=1,Object.defineProperty(gd,"__esModule",{value:!0}),gd.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(d){return!d||n.test(d)||e.test(d)},o=function(d,m){return m.toUpperCase()},u=function(d,m){return"".concat(m,"-")},c=function(d,m){return m===void 0&&(m={}),s(d)?d:(d=d.toLowerCase(),m.reactCompat?d=d.replace(a,u):d=d.replace(r,u),d.replace(t,o))};return gd.camelCase=c,gd}var bd,y7;function iue(){if(y7)return bd;y7=1;var e=bd&&bd.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(aue()),n=sue();function r(a,s){var o={};return!a||typeof a!="string"||(0,t.default)(a,function(u,c){u&&c&&(o[(0,n.camelCase)(u,s)]=c)}),o}return r.default=r,bd=r,bd}var oue=iue();const lue=f1(oue);function Fd(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?v7(e.position):"start"in e||"end"in e?v7(e):"line"in e||"column"in e?Qy(e):""}function Qy(e){return w7(e&&e.line)+":"+w7(e&&e.column)}function v7(e){return Qy(e&&e.start)+"-"+Qy(e&&e.end)}function w7(e){return e&&typeof e=="number"?e:1}class ua extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",s={},o=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?a=t:!s.cause&&t&&(o=!0,a=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?s.ruleId=r:(s.source=r.slice(0,c),s.ruleId=r.slice(c+1))}if(!s.place&&s.ancestors&&s.ancestors){const c=s.ancestors[s.ancestors.length-1];c&&(s.place=c.position)}const u=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=u?u.line:void 0,this.name=Fd(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ua.prototype.file="";ua.prototype.name="";ua.prototype.reason="";ua.prototype.message="";ua.prototype.stack="";ua.prototype.column=void 0;ua.prototype.line=void 0;ua.prototype.ancestors=void 0;ua.prototype.cause=void 0;ua.prototype.fatal=void 0;ua.prototype.place=void 0;ua.prototype.ruleId=void 0;ua.prototype.source=void 0;const _3={}.hasOwnProperty,uue=new Map,cue=/[A-Z]/g,due=new Set(["table","tbody","thead","tfoot","tr"]),fue=new Set(["td","th"]),WI="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function hue(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=wue(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=vue(n,t.jsx,t.jsxs)}const a={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"?pl:Bf,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=XI(a,e,void 0);return s&&typeof s!="string"?s:a.create(e,a.Fragment,{children:s||void 0},void 0)}function XI(e,t,n){if(t.type==="element")return mue(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return pue(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return bue(e,t,n);if(t.type==="mdxjsEsm")return gue(e,t);if(t.type==="root")return xue(e,t,n);if(t.type==="text")return yue(e,t)}function mue(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=pl,e.schema=a),e.ancestors.push(t);const s=QI(e,t.tagName,!1),o=Tue(e,t);let u=M3(e,t);return due.has(t.tagName)&&(u=u.filter(function(c){return typeof c=="string"?!nue(c):!0})),KI(e,o,s,t),R3(o,u),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function pue(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}df(e,t.position)}function gue(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);df(e,t.position)}function bue(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=pl,e.schema=a),e.ancestors.push(t);const s=t.name===null?e.Fragment:QI(e,t.name,!0),o=Eue(e,t),u=M3(e,t);return KI(e,o,s,t),R3(o,u),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function xue(e,t,n){const r={};return R3(r,M3(e,t)),e.create(t,e.Fragment,r,n)}function yue(e,t){return t.value}function KI(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function R3(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function vue(e,t,n){return r;function r(a,s,o,u){const d=Array.isArray(o.children)?n:t;return u?d(s,o,u):d(s,o)}}function wue(e,t){return n;function n(r,a,s,o){const u=Array.isArray(s.children),c=ki(r);return t(a,s,o,u,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function Tue(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&_3.call(t.properties,a)){const s=Sue(e,a,t.properties[a]);if(s){const[o,u]=s;e.tableCellAlignToStyle&&o==="align"&&typeof u=="string"&&fue.has(t.tagName)?r=u:n[o]=u}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Eue(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const o=s.expression;o.type;const u=o.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else df(e,t.position);else{const a=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,s=e.evaluater.evaluateExpression(u.expression)}else df(e,t.position);else s=r.value===null?!0:r.value;n[a]=s}return n}function M3(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:uue;for(;++r<t.children.length;){const s=t.children[r];let o;if(e.passKeys){const c=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(c){const d=a.get(c)||0;o=c+"-"+d,a.set(c,d+1)}}const u=XI(e,s,o);u!==void 0&&n.push(u)}return n}function Sue(e,t,n){const r=H1(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?eM(n):tM(n)),r.property==="style"){let a=typeof n=="object"?n:Cue(e,String(n));return e.stylePropertyNameCase==="css"&&(a=kue(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?HQ[r.property]||r.property:r.attribute,n]}}function Cue(e,t){try{return lue(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new ua("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=WI+"#cannot-parse-style-attribute",a}}function QI(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let s=-1,o;for(;++s<a.length;){const u=m7(a[s])?{type:"Identifier",name:a[s]}:{type:"Literal",value:a[s]};o=o?{type:"MemberExpression",object:o,property:u,computed:!!(s&&u.type==="Literal"),optional:!1}:u}r=o}else r=m7(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return _3.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);df(e)}function df(e,t){const n=new ua("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=WI+"#cannot-handle-mdx-estrees-without-createevaluater",n}function kue(e){const t={};let n;for(n in e)_3.call(e,n)&&(t[Aue(n)]=e[n]);return t}function Aue(e){let t=e.replace(cue,Nue);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Nue(e){return"-"+e.toLowerCase()}const _ue={tokenize:Rue};function Rue(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),ln(e,t,"linePrefix")}function a(u){return e.enter("paragraph"),s(u)}function s(u){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,o(u)}function o(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return wt(u)?(e.consume(u),e.exit("chunkText"),s):(e.consume(u),o)}}const Mue={tokenize:Due},T7={tokenize:Iue};function Due(e){const t=this,n=[];let r=0,a,s,o;return u;function u(_){if(r<n.length){const I=n[r];return t.containerState=I[1],e.attempt(I[0].continuation,c,d)(_)}return d(_)}function c(_){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&A();const I=t.events.length;let P=I,O;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){O=t.events[P][1].end;break}E(r);let R=I;for(;R<t.events.length;)t.events[R][1].end={...O},R++;return Kr(t.events,P+1,0,t.events.slice(I)),t.events.length=R,d(_)}return u(_)}function d(_){if(r===n.length){if(!a)return b(_);if(a.currentConstruct&&a.currentConstruct.concrete)return w(_);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(T7,m,p)(_)}function m(_){return a&&A(),E(r),b(_)}function p(_){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,w(_)}function b(_){return t.containerState={},e.attempt(T7,y,w)(_)}function y(_){return r++,n.push([t.currentConstruct,t.containerState]),b(_)}function w(_){if(_===null){a&&A(),E(0),e.consume(_);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:s}),S(_)}function S(_){if(_===null){k(e.exit("chunkFlow"),!0),E(0),e.consume(_);return}return wt(_)?(e.consume(_),k(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(_),S)}function k(_,I){const P=t.sliceStream(_);if(I&&P.push(null),_.previous=s,s&&(s.next=_),s=_,a.defineSkip(_.start),a.write(P),t.parser.lazy[_.start.line]){let O=a.events.length;for(;O--;)if(a.events[O][1].start.offset<o&&(!a.events[O][1].end||a.events[O][1].end.offset>o))return;const R=t.events.length;let z=R,F,U;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){if(F){U=t.events[z][1].end;break}F=!0}for(E(r),O=R;O<t.events.length;)t.events[O][1].end={...U},O++;Kr(t.events,z+1,0,t.events.slice(R)),t.events.length=O}}function E(_){let I=n.length;for(;I-- >_;){const P=n[I];t.containerState=P[1],P[0].exit.call(t,e)}n.length=_}function A(){a.write([null]),s=void 0,a=void 0,t.containerState._closeFlow=void 0}}function Iue(e,t,n){return ln(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const Oue={tokenize:Lue};function Lue(e){const t=this,n=e.attempt(Gf,r,e.attempt(this.parser.constructs.flowInitial,a,ln(e,e.attempt(this.parser.constructs.flow,a,e.attempt(vie,a)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Pue={resolveAll:JI()},jue=ZI("string"),zue=ZI("text");function ZI(e){return{resolveAll:JI(e==="text"?Bue:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],s=n.attempt(a,o,u);return o;function o(m){return d(m)?s(m):u(m)}function u(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),c}function c(m){return d(m)?(n.exit("data"),s(m)):(n.consume(m),c)}function d(m){if(m===null)return!0;const p=a[m];let b=-1;if(p)for(;++b<p.length;){const y=p[b];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function JI(e){return t;function t(n,r){let a=-1,s;for(;++a<=n.length;)s===void 0?n[a]&&n[a][1].type==="data"&&(s=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==s+2&&(n[s][1].end=n[a-1][1].end,n.splice(s+2,a-s-2),a=s+2),s=void 0);return e?e(n,r):n}}function Bue(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],a=t.sliceStream(r);let s=a.length,o=-1,u=0,c;for(;s--;){const d=a[s];if(typeof d=="string"){for(o=d.length;d.charCodeAt(o-1)===32;)u++,o--;if(o)break;o=-1}else if(d===-2)c=!0,u++;else if(d!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const d={type:n===e.length||c||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}const Fue={42:Ma,43:Ma,45:Ma,48:Ma,49:Ma,50:Ma,51:Ma,52:Ma,53:Ma,54:Ma,55:Ma,56:Ma,57:Ma,62:PI},Hue={91:Cie},Uue={[-2]:bx,[-1]:bx,32:bx},$ue={35:Mie,42:cp,45:[c7,cp],60:Lie,61:c7,95:cp,96:l7,126:l7},que={38:zI,92:jI},Vue={[-5]:xx,[-4]:xx,[-3]:xx,33:Jie,38:zI,42:Wy,60:[tie,Uie],91:toe,92:[_ie,jI],93:N3,95:Wy,96:mie},Gue={null:[Wy,Pue]},Yue={null:[42,95]},Wue={null:[]},Xue=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Yue,contentInitial:Hue,disable:Wue,document:Fue,flow:$ue,flowInitial:Uue,insideSpan:Gue,string:que,text:Vue},Symbol.toStringTag,{value:"Module"}));function Kue(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},s=[];let o=[],u=[];const c={attempt:R(P),check:R(O),consume:A,enter:_,exit:I,interrupt:R(O,{interrupt:!0})},d={code:null,containerState:{},defineSkip:S,events:[],now:w,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:p};let m=t.tokenize.call(d,c);return t.resolveAll&&s.push(t),d;function p(X){return o=Xr(o,X),k(),o[o.length-1]!==null?[]:(z(t,0),d.events=u0(s,d.events,d),d.events)}function b(X,W){return Zue(y(X),W)}function y(X){return Que(o,X)}function w(){const{_bufferIndex:X,_index:W,line:le,column:se,offset:ie}=r;return{_bufferIndex:X,_index:W,line:le,column:se,offset:ie}}function S(X){a[X.line]=X.column,U()}function k(){let X;for(;r._index<o.length;){const W=o[r._index];if(typeof W=="string")for(X=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===X&&r._bufferIndex<W.length;)E(W.charCodeAt(r._bufferIndex));else E(W)}}function E(X){m=m(X)}function A(X){wt(X)?(r.line++,r.column=1,r.offset+=X===-3?2:1,U()):X!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=X}function _(X,W){const le=W||{};return le.type=X,le.start=w(),d.events.push(["enter",le,d]),u.push(le),le}function I(X){const W=u.pop();return W.end=w(),d.events.push(["exit",W,d]),W}function P(X,W){z(X,W.from)}function O(X,W){W.restore()}function R(X,W){return le;function le(se,ie,$){let K,Z,re,j;return Array.isArray(se)?G(se):"tokenize"in se?G([se]):H(se);function H(Se){return be;function be(fe){const Ne=fe!==null&&Se[fe],at=fe!==null&&Se.null,Ce=[...Array.isArray(Ne)?Ne:Ne?[Ne]:[],...Array.isArray(at)?at:at?[at]:[]];return G(Ce)(fe)}}function G(Se){return K=Se,Z=0,Se.length===0?$:L(Se[Z])}function L(Se){return be;function be(fe){return j=F(),re=Se,Se.partial||(d.currentConstruct=Se),Se.name&&d.parser.constructs.disable.null.includes(Se.name)?oe():Se.tokenize.call(W?Object.assign(Object.create(d),W):d,c,ae,oe)(fe)}}function ae(Se){return X(re,j),ie}function oe(Se){return j.restore(),++Z<K.length?L(K[Z]):$}}}function z(X,W){X.resolveAll&&!s.includes(X)&&s.push(X),X.resolve&&Kr(d.events,W,d.events.length-W,X.resolve(d.events.slice(W),d)),X.resolveTo&&(d.events=X.resolveTo(d.events,d))}function F(){const X=w(),W=d.previous,le=d.currentConstruct,se=d.events.length,ie=Array.from(u);return{from:se,restore:$};function $(){r=X,d.previous=W,d.currentConstruct=le,d.events.length=se,u=ie,U()}}function U(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function Que(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,s=t.end._bufferIndex;let o;if(n===a)o=[e[n].slice(r,s)];else{if(o=e.slice(n,a),r>-1){const u=o[0];typeof u=="string"?o[0]=u.slice(r):o.shift()}s>0&&o.push(e[a].slice(0,s))}return o}function Zue(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const s=e[n];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=`
|
|
364
|
+
`;break}case-3:{o=`\r
|
|
365
|
+
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&a)continue;o=" ";break}default:o=String.fromCharCode(s)}a=s===-2,r.push(o)}return r.join("")}function Jue(e){const r={constructs:AI([Xue,...(e||{}).extensions||[]]),content:a(_ue),defined:[],document:a(Mue),flow:a(Oue),lazy:{},string:a(jue),text:a(zue)};return r;function a(s){return o;function o(u){return Kue(r,s,u)}}}function ece(e){for(;!BI(e););return e}const E7=/[\0\t\n\r]/g;function tce(){let e=1,t="",n=!0,r;return a;function a(s,o,u){const c=[];let d,m,p,b,y;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),p=0,t="",n&&(s.charCodeAt(0)===65279&&p++,n=void 0);p<s.length;){if(E7.lastIndex=p,d=E7.exec(s),b=d&&d.index!==void 0?d.index:s.length,y=s.charCodeAt(b),!d){t=s.slice(p);break}if(y===10&&p===b&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),p<b&&(c.push(s.slice(p,b)),e+=b-p),y){case 0:{c.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,c.push(-2);e++<m;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}p=b+1}return u&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const eO={}.hasOwnProperty;function nce(e,t,n){return typeof t!="string"&&(n=t,t=void 0),rce(n)(ece(Jue(n).document().write(tce()(e,t,!0))))}function rce(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(At),autolinkProtocol:F,autolinkEmail:F,atxHeading:s(Oe),blockQuote:s(at),characterEscape:F,characterReference:F,codeFenced:s(Ce),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(Ce,o),codeText:s(Re,o),codeTextData:F,data:F,codeFlowValue:F,definition:s(Ee),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(we),hardBreakEscape:s(ze),hardBreakTrailing:s(ze),htmlFlow:s(Ge,o),htmlFlowData:F,htmlText:s(Ge,o),htmlTextData:F,image:s(it),label:o,link:s(At),listItem:s(Ft),listItemValue:b,listOrdered:s(st,p),listUnordered:s(st),paragraph:s(Nt),reference:L,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(Oe),strong:s(qt),thematicBreak:s(Mn)},exit:{atxHeading:c(),atxHeadingSequence:P,autolink:c(),autolinkEmail:Ne,autolinkProtocol:fe,blockQuote:c(),characterEscapeValue:U,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:Se,characterReference:be,codeFenced:c(k),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:w,codeFlowValue:U,codeIndented:c(E),codeText:c(ie),codeTextData:U,data:U,definition:c(),definitionDestinationString:I,definitionLabelString:A,definitionTitleString:_,emphasis:c(),hardBreakEscape:c(W),hardBreakTrailing:c(W),htmlFlow:c(le),htmlFlowData:U,htmlText:c(se),htmlTextData:U,image:c(K),label:re,labelText:Z,lineEnding:X,link:c($),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ae,resourceDestinationString:j,resourceTitleString:H,resource:G,setextHeading:c(z),setextHeadingLineSequence:R,setextHeadingText:O,strong:c(),thematicBreak:c()}};tO(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ke){let Be={type:"root",children:[]};const xt={stack:[Be],tokenStack:[],config:t,enter:u,exit:d,buffer:o,resume:m,data:n},Et=[];let Ze=-1;for(;++Ze<ke.length;)if(ke[Ze][1].type==="listOrdered"||ke[Ze][1].type==="listUnordered")if(ke[Ze][0]==="enter")Et.push(Ze);else{const Rt=Et.pop();Ze=a(ke,Rt,Ze)}for(Ze=-1;++Ze<ke.length;){const Rt=t[ke[Ze][0]];eO.call(Rt,ke[Ze][1].type)&&Rt[ke[Ze][1].type].call(Object.assign({sliceSerialize:ke[Ze][2].sliceSerialize},xt),ke[Ze][1])}if(xt.tokenStack.length>0){const Rt=xt.tokenStack[xt.tokenStack.length-1];(Rt[1]||S7).call(xt,void 0,Rt[0])}for(Be.position={start:qo(ke.length>0?ke[0][1].start:{line:1,column:1,offset:0}),end:qo(ke.length>0?ke[ke.length-2][1].end:{line:1,column:1,offset:0})},Ze=-1;++Ze<t.transforms.length;)Be=t.transforms[Ze](Be)||Be;return Be}function a(ke,Be,xt){let Et=Be-1,Ze=-1,Rt=!1,mn,Qe,_t,vn;for(;++Et<=xt;){const an=ke[Et];switch(an[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{an[0]==="enter"?Ze++:Ze--,vn=void 0;break}case"lineEndingBlank":{an[0]==="enter"&&(mn&&!vn&&!Ze&&!_t&&(_t=Et),vn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:vn=void 0}if(!Ze&&an[0]==="enter"&&an[1].type==="listItemPrefix"||Ze===-1&&an[0]==="exit"&&(an[1].type==="listUnordered"||an[1].type==="listOrdered")){if(mn){let lr=Et;for(Qe=void 0;lr--;){const mr=ke[lr];if(mr[1].type==="lineEnding"||mr[1].type==="lineEndingBlank"){if(mr[0]==="exit")continue;Qe&&(ke[Qe][1].type="lineEndingBlank",Rt=!0),mr[1].type="lineEnding",Qe=lr}else if(!(mr[1].type==="linePrefix"||mr[1].type==="blockQuotePrefix"||mr[1].type==="blockQuotePrefixWhitespace"||mr[1].type==="blockQuoteMarker"||mr[1].type==="listItemIndent"))break}_t&&(!Qe||_t<Qe)&&(mn._spread=!0),mn.end=Object.assign({},Qe?ke[Qe][1].start:an[1].end),ke.splice(Qe||Et,0,["exit",mn,an[2]]),Et++,xt++}if(an[1].type==="listItemPrefix"){const lr={type:"listItem",_spread:!1,start:Object.assign({},an[1].start),end:void 0};mn=lr,ke.splice(Et,0,["enter",lr,an[2]]),Et++,xt++,_t=void 0,vn=!0}}}return ke[Be][1]._spread=Rt,xt}function s(ke,Be){return xt;function xt(Et){u.call(this,ke(Et),Et),Be&&Be.call(this,Et)}}function o(){this.stack.push({type:"fragment",children:[]})}function u(ke,Be,xt){this.stack[this.stack.length-1].children.push(ke),this.stack.push(ke),this.tokenStack.push([Be,xt||void 0]),ke.position={start:qo(Be.start),end:void 0}}function c(ke){return Be;function Be(xt){ke&&ke.call(this,xt),d.call(this,xt)}}function d(ke,Be){const xt=this.stack.pop(),Et=this.tokenStack.pop();if(Et)Et[0].type!==ke.type&&(Be?Be.call(this,ke,Et[0]):(Et[1]||S7).call(this,ke,Et[0]));else throw new Error("Cannot close `"+ke.type+"` ("+Fd({start:ke.start,end:ke.end})+"): it’s not open");xt.position.end=qo(ke.end)}function m(){return S3(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function b(ke){if(this.data.expectingFirstListItemValue){const Be=this.stack[this.stack.length-2];Be.start=Number.parseInt(this.sliceSerialize(ke),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ke=this.resume(),Be=this.stack[this.stack.length-1];Be.lang=ke}function w(){const ke=this.resume(),Be=this.stack[this.stack.length-1];Be.meta=ke}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const ke=this.resume(),Be=this.stack[this.stack.length-1];Be.value=ke.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const ke=this.resume(),Be=this.stack[this.stack.length-1];Be.value=ke.replace(/(\r?\n|\r)$/g,"")}function A(ke){const Be=this.resume(),xt=this.stack[this.stack.length-1];xt.label=Be,xt.identifier=Hs(this.sliceSerialize(ke)).toLowerCase()}function _(){const ke=this.resume(),Be=this.stack[this.stack.length-1];Be.title=ke}function I(){const ke=this.resume(),Be=this.stack[this.stack.length-1];Be.url=ke}function P(ke){const Be=this.stack[this.stack.length-1];if(!Be.depth){const xt=this.sliceSerialize(ke).length;Be.depth=xt}}function O(){this.data.setextHeadingSlurpLineEnding=!0}function R(ke){const Be=this.stack[this.stack.length-1];Be.depth=this.sliceSerialize(ke).codePointAt(0)===61?1:2}function z(){this.data.setextHeadingSlurpLineEnding=void 0}function F(ke){const xt=this.stack[this.stack.length-1].children;let Et=xt[xt.length-1];(!Et||Et.type!=="text")&&(Et=Ht(),Et.position={start:qo(ke.start),end:void 0},xt.push(Et)),this.stack.push(Et)}function U(ke){const Be=this.stack.pop();Be.value+=this.sliceSerialize(ke),Be.position.end=qo(ke.end)}function X(ke){const Be=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xt=Be.children[Be.children.length-1];xt.position.end=qo(ke.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Be.type)&&(F.call(this,ke),U.call(this,ke))}function W(){this.data.atHardBreak=!0}function le(){const ke=this.resume(),Be=this.stack[this.stack.length-1];Be.value=ke}function se(){const ke=this.resume(),Be=this.stack[this.stack.length-1];Be.value=ke}function ie(){const ke=this.resume(),Be=this.stack[this.stack.length-1];Be.value=ke}function $(){const ke=this.stack[this.stack.length-1];if(this.data.inReference){const Be=this.data.referenceType||"shortcut";ke.type+="Reference",ke.referenceType=Be,delete ke.url,delete ke.title}else delete ke.identifier,delete ke.label;this.data.referenceType=void 0}function K(){const ke=this.stack[this.stack.length-1];if(this.data.inReference){const Be=this.data.referenceType||"shortcut";ke.type+="Reference",ke.referenceType=Be,delete ke.url,delete ke.title}else delete ke.identifier,delete ke.label;this.data.referenceType=void 0}function Z(ke){const Be=this.sliceSerialize(ke),xt=this.stack[this.stack.length-2];xt.label=Cse(Be),xt.identifier=Hs(Be).toLowerCase()}function re(){const ke=this.stack[this.stack.length-1],Be=this.resume(),xt=this.stack[this.stack.length-1];if(this.data.inReference=!0,xt.type==="link"){const Et=ke.children;xt.children=Et}else xt.alt=Be}function j(){const ke=this.resume(),Be=this.stack[this.stack.length-1];Be.url=ke}function H(){const ke=this.resume(),Be=this.stack[this.stack.length-1];Be.title=ke}function G(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function ae(ke){const Be=this.resume(),xt=this.stack[this.stack.length-1];xt.label=Be,xt.identifier=Hs(this.sliceSerialize(ke)).toLowerCase(),this.data.referenceType="full"}function oe(ke){this.data.characterReferenceType=ke.type}function Se(ke){const Be=this.sliceSerialize(ke),xt=this.data.characterReferenceType;let Et;xt?(Et=kI(Be,xt==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Et=k3(Be);const Ze=this.stack[this.stack.length-1];Ze.value+=Et}function be(ke){const Be=this.stack.pop();Be.position.end=qo(ke.end)}function fe(ke){U.call(this,ke);const Be=this.stack[this.stack.length-1];Be.url=this.sliceSerialize(ke)}function Ne(ke){U.call(this,ke);const Be=this.stack[this.stack.length-1];Be.url="mailto:"+this.sliceSerialize(ke)}function at(){return{type:"blockquote",children:[]}}function Ce(){return{type:"code",lang:null,meta:null,value:""}}function Re(){return{type:"inlineCode",value:""}}function Ee(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function we(){return{type:"emphasis",children:[]}}function Oe(){return{type:"heading",depth:0,children:[]}}function ze(){return{type:"break"}}function Ge(){return{type:"html",value:""}}function it(){return{type:"image",title:null,url:"",alt:null}}function At(){return{type:"link",title:null,url:"",children:[]}}function st(ke){return{type:"list",ordered:ke.type==="listOrdered",start:null,spread:ke._spread,children:[]}}function Ft(ke){return{type:"listItem",spread:ke._spread,checked:null,children:[]}}function Nt(){return{type:"paragraph",children:[]}}function qt(){return{type:"strong",children:[]}}function Ht(){return{type:"text",value:""}}function Mn(){return{type:"thematicBreak"}}}function qo(e){return{line:e.line,column:e.column,offset:e.offset}}function tO(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?tO(e,r):ace(e,r)}}function ace(e,t){let n;for(n in t)if(eO.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function S7(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Fd({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Fd({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Fd({start:t.start,end:t.end})+") is still open")}function sce(e){const t=this;t.parser=n;function n(r){return nce(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ice(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function oce(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
366
|
+
`}]}function lce(e,t){const n=t.value?t.value+`
|
|
367
|
+
`:"",r={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function uce(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cce(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dce(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=c0(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let o,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=s+1,u+=1,e.footnoteCounts.set(r,u);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,c);const d={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,d),e.applyData(t,d)}function fce(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hce(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function nO(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),s=a[0];s&&s.type==="text"?s.value="["+s.value:a.unshift({type:"text",value:"["});const o=a[a.length-1];return o&&o.type==="text"?o.value+=r:a.push({type:"text",value:r}),a}function mce(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return nO(e,t);const a={src:c0(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(a.title=r.title);const s={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,s),e.applyData(t,s)}function pce(e,t){const n={src:c0(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function gce(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function bce(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return nO(e,t);const a={href:c0(r.url||"")};r.title!==null&&r.title!==void 0&&(a.title=r.title);const s={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function xce(e,t){const n={href:c0(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function yce(e,t,n){const r=e.all(t),a=n?vce(n):rO(t),s={},o=[];if(typeof t.checked=="boolean"){const m=r[0];let p;m&&m.type==="element"&&m.tagName==="p"?p=m:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const m=r[u];(a||u!==0||m.type!=="element"||m.tagName!=="p")&&o.push({type:"text",value:`
|
|
368
|
+
`}),m.type==="element"&&m.tagName==="p"&&!a?o.push(...m.children):o.push(m)}const c=r[r.length-1];c&&(a||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
|
|
369
|
+
`});const d={type:"element",tagName:"li",properties:s,children:o};return e.patch(t,d),e.applyData(t,d)}function vce(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=rO(n[r])}return t}function rO(e){const t=e.spread;return t??e.children.length>1}function wce(e,t){const n={},r=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<r.length;){const o=r[a];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function Tce(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ece(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Sce(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Cce(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),a.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=ki(t.children[1]),c=eg(t.children[t.children.length-1]);u&&c&&(o.position={start:u,end:c}),a.push(o)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,s),e.applyData(t,s)}function kce(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,u=o?o.length:t.children.length;let c=-1;const d=[];for(;++c<u;){const p=t.children[c],b={},y=o?o[c]:void 0;y&&(b.align=y);let w={type:"element",tagName:s,properties:b,children:[]};p&&(w.children=e.all(p),e.patch(p,w),w=e.applyData(p,w)),d.push(w)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,m),e.applyData(t,m)}function Ace(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const C7=9,k7=32;function Nce(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const s=[];for(;r;)s.push(A7(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return s.push(A7(t.slice(a),a>0,!1)),s.join("")}function A7(e,t,n){let r=0,a=e.length;if(t){let s=e.codePointAt(r);for(;s===C7||s===k7;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(a-1);for(;s===C7||s===k7;)a--,s=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function _ce(e,t){const n={type:"text",value:Nce(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Rce(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Mce={blockquote:ice,break:oce,code:lce,delete:uce,emphasis:cce,footnoteReference:dce,heading:fce,html:hce,imageReference:mce,image:pce,inlineCode:gce,linkReference:bce,link:xce,listItem:yce,list:wce,paragraph:Tce,root:Ece,strong:Sce,table:Cce,tableCell:Ace,tableRow:kce,text:_ce,thematicBreak:Rce,toml:Fm,yaml:Fm,definition:Fm,footnoteDefinition:Fm};function Fm(){}function Dce(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Ice(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Oce(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Dce,r=e.options.footnoteBackLabel||Ice,a=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let c=-1;for(;++c<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[c]);if(!d)continue;const m=e.all(d),p=String(d.identifier).toUpperCase(),b=c0(p.toLowerCase());let y=0;const w=[],S=e.footnoteCounts.get(p);for(;S!==void 0&&++y<=S;){w.length>0&&w.push({type:"text",value:" "});let A=typeof n=="string"?n:n(c,y);typeof A=="string"&&(A={type:"text",value:A}),w.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,y),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const k=m[m.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const A=k.children[k.children.length-1];A&&A.type==="text"?A.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...w)}else m.push(...w);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(m,!0)};e.patch(d,E),u.push(E)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...au(o),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
|
370
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
371
|
+
`}]}}const Zy={}.hasOwnProperty,Lce={};function Pce(e,t){const n=t||Lce,r=new Map,a=new Map,s=new Map,o={...Mce,...n.handlers},u={all:d,applyData:zce,definitionById:r,footnoteById:a,footnoteCounts:s,footnoteOrder:[],handlers:o,one:c,options:n,patch:jce,wrap:Fce};return Hc(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const p=m.type==="definition"?r:a,b=String(m.identifier).toUpperCase();p.has(b)||p.set(b,m)}}),u;function c(m,p){const b=m.type,y=u.handlers[b];if(Zy.call(u.handlers,b)&&y)return y(u,m,p);if(u.options.passThrough&&u.options.passThrough.includes(b)){if("children"in m){const{children:S,...k}=m,E=au(k);return E.children=u.all(m),E}return au(m)}return(u.options.unknownHandler||Bce)(u,m,p)}function d(m){const p=[];if("children"in m){const b=m.children;let y=-1;for(;++y<b.length;){const w=u.one(b[y],m);if(w){if(y&&b[y-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=N7(w.value)),!Array.isArray(w)&&w.type==="element")){const S=w.children[0];S&&S.type==="text"&&(S.value=N7(S.value))}Array.isArray(w)?p.push(...w):p.push(w)}}}return p}}function jce(e,t){e.position&&(t.position=WD(e))}function zce(e,t){let n=t;if(e&&e.data){const r=e.data.hName,a=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&s&&Object.assign(n.properties,au(s)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function Bce(e,t){const n=t.data||{},r="value"in t&&!(Zy.call(n,"hProperties")||Zy.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Fce(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
372
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
373
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
374
|
+
`}),n}function N7(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function _7(e,t){const n=Pce(e,t),r=n.one(e,void 0),a=Oce(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&s.children.push({type:"text",value:`
|
|
375
|
+
`},a),s}function Hce(e,t){return e&&"run"in e?async function(n,r){const a=_7(n,{file:r,...t});await e.run(a,r)}:function(n,r){return _7(n,{file:r,...e||t})}}function R7(e){if(e)throw e}var vx,M7;function Uce(){if(M7)return vx;M7=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(d){return typeof Array.isArray=="function"?Array.isArray(d):t.call(d)==="[object Array]"},s=function(d){if(!d||t.call(d)!=="[object Object]")return!1;var m=e.call(d,"constructor"),p=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!m&&!p)return!1;var b;for(b in d);return typeof b>"u"||e.call(d,b)},o=function(d,m){n&&m.name==="__proto__"?n(d,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):d[m.name]=m.newValue},u=function(d,m){if(m==="__proto__")if(e.call(d,m)){if(r)return r(d,m).value}else return;return d[m]};return vx=function c(){var d,m,p,b,y,w,S=arguments[0],k=1,E=arguments.length,A=!1;for(typeof S=="boolean"&&(A=S,S=arguments[1]||{},k=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});k<E;++k)if(d=arguments[k],d!=null)for(m in d)p=u(S,m),b=u(d,m),S!==b&&(A&&b&&(s(b)||(y=a(b)))?(y?(y=!1,w=p&&a(p)?p:[]):w=p&&s(p)?p:{},o(S,{name:m,newValue:c(A,w,b)})):typeof b<"u"&&o(S,{name:m,newValue:b}));return S},vx}var $ce=Uce();const wx=f1($ce);function Jy(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function qce(){const e=[],t={run:n,use:r};return t;function n(...a){let s=-1;const o=a.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);u(null,...a);function u(c,...d){const m=e[++s];let p=-1;if(c){o(c);return}for(;++p<a.length;)(d[p]===null||d[p]===void 0)&&(d[p]=a[p]);a=d,m?Vce(m,u)(...d):o(null,...d)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function Vce(e,t){let n;return r;function r(...o){const u=e.length>o.length;let c;u&&o.push(a);try{c=e.apply(this,o)}catch(d){const m=d;if(u&&n)throw m;return a(m)}u||(c&&c.then&&typeof c.then=="function"?c.then(s,a):c instanceof Error?a(c):s(c))}function a(o,...u){n||(n=!0,t(o,...u))}function s(o){a(null,o)}}const ai={basename:Gce,dirname:Yce,extname:Wce,join:Xce,sep:"/"};function Gce(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Yf(e);let n=0,r=-1,a=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(s){n=a+1;break}}else r<0&&(s=!0,r=a+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,u=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(s){n=a+1;break}}else o<0&&(s=!0,o=a+1),u>-1&&(e.codePointAt(a)===t.codePointAt(u--)?u<0&&(r=a):(u=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Yce(e){if(Yf(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||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Wce(e){Yf(e);let t=e.length,n=-1,r=0,a=-1,s=0,o;for(;t--;){const u=e.codePointAt(t);if(u===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),u===46?a<0?a=t:s!==1&&(s=1):a>-1&&(s=-1)}return a<0||n<0||s===0||s===1&&a===n-1&&a===r+1?"":e.slice(a,n)}function Xce(...e){let t=-1,n;for(;++t<e.length;)Yf(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Kce(n)}function Kce(e){Yf(e);const t=e.codePointAt(0)===47;let n=Qce(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Qce(e,t){let n="",r=0,a=-1,s=0,o=-1,u,c;for(;++o<=e.length;){if(o<e.length)u=e.codePointAt(o);else{if(u===47)break;u=47}if(u===47){if(!(a===o-1||s===1))if(a!==o-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),a=o,s=0;continue}}else if(n.length>0){n="",r=0,a=o,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(a+1,o):n=e.slice(a+1,o),r=o-a-1;a=o,s=0}else u===46&&s>-1?s++:s=-1}return n}function Yf(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Zce={cwd:Jce};function Jce(){return"/"}function ev(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function e0e(e){if(typeof e=="string")e=new URL(e);else if(!ev(e)){const t=new 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:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return t0e(e)}function t0e(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const Tx=["history","path","basename","stem","extname","dirname"];class n0e{constructor(t){let n;t?ev(t)?n={path:t}:typeof t=="string"||r0e(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Zce.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Tx.length;){const s=Tx[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let a;for(a in n)Tx.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?ai.basename(this.path):void 0}set basename(t){Sx(t,"basename"),Ex(t,"basename"),this.path=ai.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ai.dirname(this.path):void 0}set dirname(t){D7(this.basename,"dirname"),this.path=ai.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ai.extname(this.path):void 0}set extname(t){if(Ex(t,"extname"),D7(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ai.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ev(t)&&(t=e0e(t)),Sx(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ai.basename(this.path,this.extname):void 0}set stem(t){Sx(t,"stem"),Ex(t,"stem"),this.path=ai.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const a=this.message(t,n,r);throw a.fatal=!0,a}info(t,n,r){const a=this.message(t,n,r);return a.fatal=void 0,a}message(t,n,r){const a=new ua(t,n,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Ex(e,t){if(e&&e.includes(ai.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ai.sep+"`")}function Sx(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function D7(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function r0e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const a0e=(function(e){const r=this.constructor.prototype,a=r[e],s=function(){return a.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),s0e={}.hasOwnProperty;class D3 extends a0e{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=qce()}copy(){const t=new D3;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(wx(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ax("data",this.frozen),this.namespace[t]=n,this):s0e.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ax("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=n.call(t,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Hm(t),r=this.parser||this.Parser;return Cx("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Cx("process",this.parser||this.Parser),kx("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(s,o){const u=Hm(t),c=r.parse(u);r.run(c,u,function(m,p,b){if(m||!p||!b)return d(m);const y=p,w=r.stringify(y,b);l0e(w)?b.value=w:b.result=w,d(m,b)});function d(m,p){m||!p?o(m):s?s(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),Cx("processSync",this.parser||this.Parser),kx("processSync",this.compiler||this.Compiler),this.process(t,a),O7("processSync","process",n),r;function a(s,o){n=!0,R7(s),r=o}}run(t,n,r){I7(t),this.freeze();const a=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(o,u){const c=Hm(n);a.run(t,c,d);function d(m,p,b){const y=p||t;m?u(m):o?o(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,a;return this.run(t,n,s),O7("runSync","run",r),a;function s(o,u){R7(o),a=u,r=!0}}stringify(t,n){this.freeze();const r=Hm(n),a=this.compiler||this.Compiler;return kx("stringify",a),I7(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if(Ax("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(d){if(typeof d=="function")c(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[m,...p]=d;c(m,p)}else o(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function o(d){if(!("plugins"in d)&&!("settings"in d))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(d.plugins),d.settings&&(a.settings=wx(!0,a.settings,d.settings))}function u(d){let m=-1;if(d!=null)if(Array.isArray(d))for(;++m<d.length;){const p=d[m];s(p)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function c(d,m){let p=-1,b=-1;for(;++p<r.length;)if(r[p][0]===d){b=p;break}if(b===-1)r.push([d,...m]);else if(m.length>0){let[y,...w]=m;const S=r[b][1];Jy(S)&&Jy(y)&&(y=wx(!0,S,y)),r[b]=[d,y,...w]}}}}const i0e=new D3().freeze();function Cx(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function kx(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ax(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function I7(e){if(!Jy(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function O7(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Hm(e){return o0e(e)?e:new n0e(e)}function o0e(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function l0e(e){return typeof e=="string"||u0e(e)}function u0e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function I3(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var vu=I3();function aO(e){vu=e}var Hd={exec:()=>null};function An(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(a,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(ba.caret,"$1"),n=n.replace(a,o),r},getRegex:()=>new RegExp(n,t)};return r}var c0e=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ba={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},d0e=/^(?:[ \t]*(?:\n|$))+/,f0e=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,h0e=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Wf=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,m0e=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,O3=/(?:[*+-]|\d{1,9}[.)])/,sO=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,iO=An(sO).replace(/bull/g,O3).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),p0e=An(sO).replace(/bull/g,O3).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),L3=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,g0e=/^[^\n]+/,P3=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,b0e=An(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",P3).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),x0e=An(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,O3).getRegex(),ag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",j3=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,y0e=An("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",j3).replace("tag",ag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),oO=An(L3).replace("hr",Wf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ag).getRegex(),v0e=An(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",oO).getRegex(),z3={blockquote:v0e,code:f0e,def:b0e,fences:h0e,heading:m0e,hr:Wf,html:y0e,lheading:iO,list:x0e,newline:d0e,paragraph:oO,table:Hd,text:g0e},L7=An("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Wf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ag).getRegex(),w0e={...z3,lheading:p0e,table:L7,paragraph:An(L3).replace("hr",Wf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",L7).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ag).getRegex()},T0e={...z3,html:An(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",j3).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Hd,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:An(L3).replace("hr",Wf).replace("heading",` *#{1,6} *[^
|
|
376
|
+
]`).replace("lheading",iO).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},E0e=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,S0e=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,lO=/^( {2,}|\\)\n(?!\s*$)/,C0e=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,sg=/[\p{P}\p{S}]/u,B3=/[\s\p{P}\p{S}]/u,uO=/[^\s\p{P}\p{S}]/u,k0e=An(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,B3).getRegex(),cO=/(?!~)[\p{P}\p{S}]/u,A0e=/(?!~)[\s\p{P}\p{S}]/u,N0e=/(?:[^\s\p{P}\p{S}]|~)/u,_0e=An(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",c0e?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),dO=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,R0e=An(dO,"u").replace(/punct/g,sg).getRegex(),M0e=An(dO,"u").replace(/punct/g,cO).getRegex(),fO="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",D0e=An(fO,"gu").replace(/notPunctSpace/g,uO).replace(/punctSpace/g,B3).replace(/punct/g,sg).getRegex(),I0e=An(fO,"gu").replace(/notPunctSpace/g,N0e).replace(/punctSpace/g,A0e).replace(/punct/g,cO).getRegex(),O0e=An("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,uO).replace(/punctSpace/g,B3).replace(/punct/g,sg).getRegex(),L0e=An(/\\(punct)/,"gu").replace(/punct/g,sg).getRegex(),P0e=An(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),j0e=An(j3).replace("(?:-->|$)","-->").getRegex(),z0e=An("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",j0e).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Wp=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,B0e=An(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Wp).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),hO=An(/^!?\[(label)\]\[(ref)\]/).replace("label",Wp).replace("ref",P3).getRegex(),mO=An(/^!?\[(ref)\](?:\[\])?/).replace("ref",P3).getRegex(),F0e=An("reflink|nolink(?!\\()","g").replace("reflink",hO).replace("nolink",mO).getRegex(),P7=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,F3={_backpedal:Hd,anyPunctuation:L0e,autolink:P0e,blockSkip:_0e,br:lO,code:S0e,del:Hd,emStrongLDelim:R0e,emStrongRDelimAst:D0e,emStrongRDelimUnd:O0e,escape:E0e,link:B0e,nolink:mO,punctuation:k0e,reflink:hO,reflinkSearch:F0e,tag:z0e,text:C0e,url:Hd},H0e={...F3,link:An(/^!?\[(label)\]\((.*?)\)/).replace("label",Wp).getRegex(),reflink:An(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Wp).getRegex()},tv={...F3,emStrongRDelimAst:I0e,emStrongLDelim:M0e,url:An(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",P7).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:An(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",P7).getRegex()},U0e={...tv,br:An(lO).replace("{2,}","*").getRegex(),text:An(tv.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Um={normal:z3,gfm:w0e,pedantic:T0e},xd={normal:F3,gfm:tv,breaks:U0e,pedantic:H0e},$0e={"&":"&","<":"<",">":">",'"':""","'":"'"},j7=e=>$0e[e];function ni(e,t){if(t){if(ba.escapeTest.test(e))return e.replace(ba.escapeReplace,j7)}else if(ba.escapeTestNoEncode.test(e))return e.replace(ba.escapeReplaceNoEncode,j7);return e}function z7(e){try{e=encodeURI(e).replace(ba.percentDecode,"%")}catch{return null}return e}function B7(e,t){let n=e.replace(ba.findPipe,(s,o,u)=>{let c=!1,d=o;for(;--d>=0&&u[d]==="\\";)c=!c;return c?"|":" |"}),r=n.split(ba.splitPipe),a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(ba.slashPipe,"|");return r}function yd(e,t,n){let r=e.length;if(r===0)return"";let a=0;for(;a<r&&e.charAt(r-a-1)===t;)a++;return e.slice(0,r-a)}function q0e(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function F7(e,t,n,r,a){let s=t.href,o=t.title||null,u=e[1].replace(a.other.outputLinkReplace,"$1");r.state.inLink=!0;let c={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:s,title:o,text:u,tokens:r.inlineTokens(u)};return r.state.inLink=!1,c}function V0e(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let a=r[1];return t.split(`
|
|
377
|
+
`).map(s=>{let o=s.match(n.other.beginningSpace);if(o===null)return s;let[u]=o;return u.length>=a.length?s.slice(a.length):s}).join(`
|
|
378
|
+
`)}var Xp=class{options;rules;lexer;constructor(e){this.options=e||vu}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:yd(n,`
|
|
379
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=V0e(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=yd(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:yd(t[0],`
|
|
380
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=yd(t[0],`
|
|
381
|
+
`).split(`
|
|
382
|
+
`),r="",a="",s=[];for(;n.length>0;){let o=!1,u=[],c;for(c=0;c<n.length;c++)if(this.rules.other.blockquoteStart.test(n[c]))u.push(n[c]),o=!0;else if(!o)u.push(n[c]);else break;n=n.slice(c);let d=u.join(`
|
|
383
|
+
`),m=d.replace(this.rules.other.blockquoteSetextReplace,`
|
|
384
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
385
|
+
${d}`:d,a=a?`${a}
|
|
386
|
+
${m}`:m;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(m,s,!0),this.lexer.state.top=p,n.length===0)break;let b=s.at(-1);if(b?.type==="code")break;if(b?.type==="blockquote"){let y=b,w=y.raw+`
|
|
387
|
+
`+n.join(`
|
|
388
|
+
`),S=this.blockquote(w);s[s.length-1]=S,r=r.substring(0,r.length-y.raw.length)+S.raw,a=a.substring(0,a.length-y.text.length)+S.text;break}else if(b?.type==="list"){let y=b,w=y.raw+`
|
|
389
|
+
`+n.join(`
|
|
390
|
+
`),S=this.list(w);s[s.length-1]=S,r=r.substring(0,r.length-b.raw.length)+S.raw,a=a.substring(0,a.length-y.raw.length)+S.raw,n=w.substring(s.at(-1).raw.length).split(`
|
|
391
|
+
`);continue}}return{type:"blockquote",raw:r,tokens:s,text:a}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,a={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let s=this.rules.other.listItemRegex(n),o=!1;for(;e;){let c=!1,d="",m="";if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;d=t[0],e=e.substring(d.length);let p=t[2].split(`
|
|
392
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,E=>" ".repeat(3*E.length)),b=e.split(`
|
|
393
|
+
`,1)[0],y=!p.trim(),w=0;if(this.options.pedantic?(w=2,m=p.trimStart()):y?w=t[1].length+1:(w=t[2].search(this.rules.other.nonSpaceChar),w=w>4?1:w,m=p.slice(w),w+=t[1].length),y&&this.rules.other.blankLine.test(b)&&(d+=b+`
|
|
394
|
+
`,e=e.substring(b.length+1),c=!0),!c){let E=this.rules.other.nextBulletRegex(w),A=this.rules.other.hrRegex(w),_=this.rules.other.fencesBeginRegex(w),I=this.rules.other.headingBeginRegex(w),P=this.rules.other.htmlBeginRegex(w);for(;e;){let O=e.split(`
|
|
395
|
+
`,1)[0],R;if(b=O,this.options.pedantic?(b=b.replace(this.rules.other.listReplaceNesting," "),R=b):R=b.replace(this.rules.other.tabCharGlobal," "),_.test(b)||I.test(b)||P.test(b)||E.test(b)||A.test(b))break;if(R.search(this.rules.other.nonSpaceChar)>=w||!b.trim())m+=`
|
|
396
|
+
`+R.slice(w);else{if(y||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(p)||I.test(p)||A.test(p))break;m+=`
|
|
397
|
+
`+b}!y&&!b.trim()&&(y=!0),d+=O+`
|
|
398
|
+
`,e=e.substring(O.length+1),p=R.slice(w)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(o=!0));let S=null,k;this.options.gfm&&(S=this.rules.other.listIsTask.exec(m),S&&(k=S[0]!=="[ ] ",m=m.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:d,task:!!S,checked:k,loose:!1,text:m,tokens:[]}),a.raw+=d}let u=a.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c=0;c<a.items.length;c++)if(this.lexer.state.top=!1,a.items[c].tokens=this.lexer.blockTokens(a.items[c].text,[]),!a.loose){let d=a.items[c].tokens.filter(p=>p.type==="space"),m=d.length>0&&d.some(p=>this.rules.other.anyLine.test(p.raw));a.loose=m}if(a.loose)for(let c=0;c<a.items.length;c++)a.items[c].loose=!0;return a}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:a}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=B7(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
399
|
+
`):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let o of r)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<n.length;o++)s.header.push({text:n[o],tokens:this.lexer.inline(n[o]),header:!0,align:s.align[o]});for(let o of a)s.rows.push(B7(o,s.header.length).map((u,c)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:s.align[c]})));return s}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
|
|
400
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let s=yd(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=q0e(t[2],"()");if(s===-2)return;if(s>-1){let o=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,o).trim(),t[3]=""}}let r=t[2],a="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(r);s&&(r=s[1],a=s[3])}else a=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),F7(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=t[r.toLowerCase()];if(!a){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return F7(n,a,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let a=[...r[0]].length-1,s,o,u=a,c=0,d=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+a);(r=d.exec(t))!=null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(o=[...s].length,r[3]||r[4]){u+=o;continue}else if((r[5]||r[6])&&a%3&&!((a+o)%3)){c+=o;continue}if(u-=o,u>0)continue;o=Math.min(o,o+u+c);let m=[...r[0]][0].length,p=e.slice(0,a+r.index+m+o);if(Math.min(a,o)%2){let y=p.slice(1,-1);return{type:"em",raw:p,text:y,tokens:this.lexer.inlineTokens(y)}}let b=p.slice(2,-2);return{type:"strong",raw:p,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),a=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&a&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,r;if(t[2]==="@")n=t[0],r="mailto:"+n;else{let a;do a=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(a!==t[0]);n=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},Ts=class nv{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||vu,this.options.tokenizer=this.options.tokenizer||new Xp,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:ba,block:Um.normal,inline:xd.normal};this.options.pedantic?(n.block=Um.pedantic,n.inline=xd.pedantic):this.options.gfm&&(n.block=Um.gfm,this.options.breaks?n.inline=xd.breaks:n.inline=xd.gfm),this.tokenizer.rules=n}static get rules(){return{block:Um,inline:xd}}static lex(t,n){return new nv(n).lex(t)}static lexInline(t,n){return new nv(n).inlineTokens(t)}lex(t){t=t.replace(ba.carriageReturn,`
|
|
401
|
+
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){for(this.options.pedantic&&(t=t.replace(ba.tabCharGlobal," ").replace(ba.spaceLine,""));t;){let a;if(this.options.extensions?.block?.some(o=>(a=o.call({lexer:this},t,n))?(t=t.substring(a.raw.length),n.push(a),!0):!1))continue;if(a=this.tokenizer.space(t)){t=t.substring(a.raw.length);let o=n.at(-1);a.raw.length===1&&o!==void 0?o.raw+=`
|
|
402
|
+
`:n.push(a);continue}if(a=this.tokenizer.code(t)){t=t.substring(a.raw.length);let o=n.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
|
|
403
|
+
`)?"":`
|
|
404
|
+
`)+a.raw,o.text+=`
|
|
405
|
+
`+a.text,this.inlineQueue.at(-1).src=o.text):n.push(a);continue}if(a=this.tokenizer.fences(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.heading(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.hr(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.blockquote(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.list(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.html(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.def(t)){t=t.substring(a.raw.length);let o=n.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
|
|
406
|
+
`)?"":`
|
|
407
|
+
`)+a.raw,o.text+=`
|
|
408
|
+
`+a.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},n.push(a));continue}if(a=this.tokenizer.table(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.lheading(t)){t=t.substring(a.raw.length),n.push(a);continue}let s=t;if(this.options.extensions?.startBlock){let o=1/0,u=t.slice(1),c;this.options.extensions.startBlock.forEach(d=>{c=d.call({lexer:this},u),typeof c=="number"&&c>=0&&(o=Math.min(o,c))}),o<1/0&&o>=0&&(s=t.substring(0,o+1))}if(this.state.top&&(a=this.tokenizer.paragraph(s))){let o=n.at(-1);r&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(`
|
|
409
|
+
`)?"":`
|
|
410
|
+
`)+a.raw,o.text+=`
|
|
411
|
+
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(a),r=s.length!==t.length,t=t.substring(a.raw.length);continue}if(a=this.tokenizer.text(t)){t=t.substring(a.raw.length);let o=n.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(`
|
|
412
|
+
`)?"":`
|
|
413
|
+
`)+a.raw,o.text+=`
|
|
414
|
+
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(a);continue}if(t){let o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r=t,a=null;if(this.tokens.links){let c=Object.keys(this.tokens.links);if(c.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)c.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,a.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)s=a[2]?a[2].length:0,r=r.slice(0,a.index+s)+"["+"a".repeat(a[0].length-s-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let o=!1,u="";for(;t;){o||(u=""),o=!1;let c;if(this.options.extensions?.inline?.some(m=>(c=m.call({lexer:this},t,n))?(t=t.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.escape(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.tag(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.link(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(c.raw.length);let m=n.at(-1);c.type==="text"&&m?.type==="text"?(m.raw+=c.raw,m.text+=c.text):n.push(c);continue}if(c=this.tokenizer.emStrong(t,r,u)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.codespan(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.br(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.del(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.autolink(t)){t=t.substring(c.raw.length),n.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(t))){t=t.substring(c.raw.length),n.push(c);continue}let d=t;if(this.options.extensions?.startInline){let m=1/0,p=t.slice(1),b;this.options.extensions.startInline.forEach(y=>{b=y.call({lexer:this},p),typeof b=="number"&&b>=0&&(m=Math.min(m,b))}),m<1/0&&m>=0&&(d=t.substring(0,m+1))}if(c=this.tokenizer.inlineText(d)){t=t.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(u=c.raw.slice(-1)),o=!0;let m=n.at(-1);m?.type==="text"?(m.raw+=c.raw,m.text+=c.text):n.push(c);continue}if(t){let m="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return n}},Kp=class{options;parser;constructor(t){this.options=t||vu}space(t){return""}code({text:t,lang:n,escaped:r}){let a=(n||"").match(ba.notSpaceStart)?.[0],s=t.replace(ba.endingNewline,"")+`
|
|
415
|
+
`;return a?'<pre><code class="language-'+ni(a)+'">'+(r?s:ni(s,!0))+`</code></pre>
|
|
416
|
+
`:"<pre><code>"+(r?s:ni(s,!0))+`</code></pre>
|
|
417
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
418
|
+
${this.parser.parse(t)}</blockquote>
|
|
419
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
|
|
420
|
+
`}hr(t){return`<hr>
|
|
421
|
+
`}list(t){let n=t.ordered,r=t.start,a="";for(let u=0;u<t.items.length;u++){let c=t.items[u];a+=this.listitem(c)}let s=n?"ol":"ul",o=n&&r!==1?' start="'+r+'"':"";return"<"+s+o+`>
|
|
422
|
+
`+a+"</"+s+`>
|
|
423
|
+
`}listitem(t){let n="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=r+" "+ni(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):n+=r+" "}return n+=this.parser.parse(t.tokens,!!t.loose),`<li>${n}</li>
|
|
424
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
425
|
+
`}table(t){let n="",r="";for(let s=0;s<t.header.length;s++)r+=this.tablecell(t.header[s]);n+=this.tablerow({text:r});let a="";for(let s=0;s<t.rows.length;s++){let o=t.rows[s];r="";for(let u=0;u<o.length;u++)r+=this.tablecell(o[u]);a+=this.tablerow({text:r})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
|
|
426
|
+
<thead>
|
|
427
|
+
`+n+`</thead>
|
|
428
|
+
`+a+`</table>
|
|
429
|
+
`}tablerow({text:t}){return`<tr>
|
|
430
|
+
${t}</tr>
|
|
431
|
+
`}tablecell(t){let n=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+n+`</${r}>
|
|
432
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${ni(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:r}){let a=this.parser.parseInline(r),s=z7(t);if(s===null)return a;t=s;let o='<a href="'+t+'"';return n&&(o+=' title="'+ni(n)+'"'),o+=">"+a+"</a>",o}image({href:t,title:n,text:r,tokens:a}){a&&(r=this.parser.parseInline(a,this.parser.textRenderer));let s=z7(t);if(s===null)return ni(r);t=s;let o=`<img src="${t}" alt="${r}"`;return n&&(o+=` title="${ni(n)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ni(t.text)}},H3=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Bs=class rv{options;renderer;textRenderer;constructor(t){this.options=t||vu,this.options.renderer=this.options.renderer||new Kp,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new H3}static parse(t,n){return new rv(n).parse(t)}static parseInline(t,n){return new rv(n).parseInline(t)}parse(t,n=!0){let r="";for(let a=0;a<t.length;a++){let s=t[a];if(this.options.extensions?.renderers?.[s.type]){let u=s,c=this.options.extensions.renderers[u.type].call({parser:this},u);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(u.type)){r+=c||"";continue}}let o=s;switch(o.type){case"space":{r+=this.renderer.space(o);continue}case"hr":{r+=this.renderer.hr(o);continue}case"heading":{r+=this.renderer.heading(o);continue}case"code":{r+=this.renderer.code(o);continue}case"table":{r+=this.renderer.table(o);continue}case"blockquote":{r+=this.renderer.blockquote(o);continue}case"list":{r+=this.renderer.list(o);continue}case"html":{r+=this.renderer.html(o);continue}case"def":{r+=this.renderer.def(o);continue}case"paragraph":{r+=this.renderer.paragraph(o);continue}case"text":{let u=o,c=this.renderer.text(u);for(;a+1<t.length&&t[a+1].type==="text";)u=t[++a],c+=`
|
|
433
|
+
`+this.renderer.text(u);n?r+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):r+=c;continue}default:{let u='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}parseInline(t,n=this.renderer){let r="";for(let a=0;a<t.length;a++){let s=t[a];if(this.options.extensions?.renderers?.[s.type]){let u=this.options.extensions.renderers[s.type].call({parser:this},s);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){r+=u||"";continue}}let o=s;switch(o.type){case"escape":{r+=n.text(o);break}case"html":{r+=n.html(o);break}case"link":{r+=n.link(o);break}case"image":{r+=n.image(o);break}case"strong":{r+=n.strong(o);break}case"em":{r+=n.em(o);break}case"codespan":{r+=n.codespan(o);break}case"br":{r+=n.br(o);break}case"del":{r+=n.del(o);break}case"text":{r+=n.text(o);break}default:{let u='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}},Ad=class{options;block;constructor(e){this.options=e||vu}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Ts.lex:Ts.lexInline}provideParser(){return this.block?Bs.parse:Bs.parseInline}},G0e=class{defaults=I3();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Bs;Renderer=Kp;TextRenderer=H3;Lexer=Ts;Tokenizer=Xp;Hooks=Ad;constructor(...t){this.use(...t)}walkTokens(t,n){let r=[];for(let a of t)switch(r=r.concat(n.call(this,a)),a.type){case"table":{let s=a;for(let o of s.header)r=r.concat(this.walkTokens(o.tokens,n));for(let o of s.rows)for(let u of o)r=r.concat(this.walkTokens(u.tokens,n));break}case"list":{let s=a;r=r.concat(this.walkTokens(s.items,n));break}default:{let s=a;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(o=>{let u=s[o].flat(1/0);r=r.concat(this.walkTokens(u,n))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let a={...r};if(a.async=this.defaults.async||a.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let o=n.renderers[s.name];o?n.renderers[s.name]=function(...u){let c=s.renderer.apply(this,u);return c===!1&&(c=o.apply(this,u)),c}:n.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=n[s.level];o?o.unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level==="block"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level==="inline"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(n.childTokens[s.name]=s.childTokens)}),a.extensions=n),r.renderer){let s=this.defaults.renderer||new Kp(this.defaults);for(let o in r.renderer){if(!(o in s))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let u=o,c=r.renderer[u],d=s[u];s[u]=(...m)=>{let p=c.apply(s,m);return p===!1&&(p=d.apply(s,m)),p||""}}a.renderer=s}if(r.tokenizer){let s=this.defaults.tokenizer||new Xp(this.defaults);for(let o in r.tokenizer){if(!(o in s))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let u=o,c=r.tokenizer[u],d=s[u];s[u]=(...m)=>{let p=c.apply(s,m);return p===!1&&(p=d.apply(s,m)),p}}a.tokenizer=s}if(r.hooks){let s=this.defaults.hooks||new Ad;for(let o in r.hooks){if(!(o in s))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let u=o,c=r.hooks[u],d=s[u];Ad.passThroughHooks.has(o)?s[u]=m=>{if(this.defaults.async&&Ad.passThroughHooksRespectAsync.has(o))return(async()=>{let b=await c.call(s,m);return d.call(s,b)})();let p=c.call(s,m);return d.call(s,p)}:s[u]=(...m)=>{if(this.defaults.async)return(async()=>{let b=await c.apply(s,m);return b===!1&&(b=await d.apply(s,m)),b})();let p=c.apply(s,m);return p===!1&&(p=d.apply(s,m)),p}}a.hooks=s}if(r.walkTokens){let s=this.defaults.walkTokens,o=r.walkTokens;a.walkTokens=function(u){let c=[];return c.push(o.call(this,u)),s&&(c=c.concat(s.call(this,u))),c}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return Ts.lex(t,n??this.defaults)}parser(t,n){return Bs.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let a={...r},s={...this.defaults,...a},o=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&a.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let u=s.hooks?await s.hooks.preprocess(n):n,c=await(s.hooks?await s.hooks.provideLexer():t?Ts.lex:Ts.lexInline)(u,s),d=s.hooks?await s.hooks.processAllTokens(c):c;s.walkTokens&&await Promise.all(this.walkTokens(d,s.walkTokens));let m=await(s.hooks?await s.hooks.provideParser():t?Bs.parse:Bs.parseInline)(d,s);return s.hooks?await s.hooks.postprocess(m):m})().catch(o);try{s.hooks&&(n=s.hooks.preprocess(n));let u=(s.hooks?s.hooks.provideLexer():t?Ts.lex:Ts.lexInline)(n,s);s.hooks&&(u=s.hooks.processAllTokens(u)),s.walkTokens&&this.walkTokens(u,s.walkTokens);let c=(s.hooks?s.hooks.provideParser():t?Bs.parse:Bs.parseInline)(u,s);return s.hooks&&(c=s.hooks.postprocess(c)),c}catch(u){return o(u)}}}onError(t,n){return r=>{if(r.message+=`
|
|
434
|
+
Please report this to https://github.com/markedjs/marked.`,t){let a="<p>An error occurred:</p><pre>"+ni(r.message+"",!0)+"</pre>";return n?Promise.resolve(a):a}if(n)return Promise.reject(r);throw r}}},iu=new G0e;function Bn(e,t){return iu.parse(e,t)}Bn.options=Bn.setOptions=function(e){return iu.setOptions(e),Bn.defaults=iu.defaults,aO(Bn.defaults),Bn};Bn.getDefaults=I3;Bn.defaults=vu;Bn.use=function(...e){return iu.use(...e),Bn.defaults=iu.defaults,aO(Bn.defaults),Bn};Bn.walkTokens=function(e,t){return iu.walkTokens(e,t)};Bn.parseInline=iu.parseInline;Bn.Parser=Bs;Bn.parser=Bs.parse;Bn.Renderer=Kp;Bn.TextRenderer=H3;Bn.Lexer=Ts;Bn.lexer=Ts.lex;Bn.Tokenizer=Xp;Bn.Hooks=Ad;Bn.parse=Bn;Bn.options;Bn.setOptions;Bn.use;Bn.walkTokens;Bn.parseInline;Bs.parse;Ts.lex;var Jt=(...e)=>K9(Wv(e)),Dc=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,a=URL.createObjectURL(r),s=document.createElement("a");s.href=a,s.download=e,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(a)},Y0e=x.createContext({code:""}),pO=()=>x.useContext(Y0e),H7=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:a,code:s,...o})=>{let[u,c]=x.useState(!1),d=x.useRef(0),{code:m}=pO(),{isAnimating:p}=x.useContext(Vs),b=s??m,y=async()=>{var S;if(typeof window>"u"||!((S=navigator?.clipboard)!=null&&S.writeText)){t?.(new Error("Clipboard API not available"));return}try{u||(await navigator.clipboard.writeText(b),c(!0),e?.(),d.current=window.setTimeout(()=>c(!1),n))}catch(k){t?.(k)}};x.useEffect(()=>()=>{window.clearTimeout(d.current)},[]);let w=u?GI:YI;return h.jsx("button",{className:Jt("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",a),"data-streamdown":"code-block-copy-button",disabled:p,onClick:y,title:"Copy Code",type:"button",...o,children:r??h.jsx(w,{size:14})})},U7={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},W0e=({onDownload:e,onError:t,language:n,children:r,className:a,code:s,...o})=>{let{code:u}=pO(),{isAnimating:c}=x.useContext(Vs),d=s??u,m=`file.${n&&n in U7?U7[n]:"txt"}`,p="text/plain",b=()=>{try{Dc(m,d,p),e?.()}catch(y){t?.(y)}};return h.jsx("button",{className:Jt("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",a),"data-streamdown":"code-block-download-button",disabled:c,onClick:b,title:"Download file",type:"button",...o,children:r??h.jsx(rg,{size:14})})},$7=()=>h.jsxs("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[h.jsx("div",{className:"h-[46px] w-full bg-muted/80"}),h.jsx("div",{className:"flex w-full items-center justify-center p-4",children:h.jsx(Hle,{className:"size-4 animate-spin"})})]}),X0e=/\.[^/.]+$/,K0e=({node:e,className:t,src:n,alt:r,...a})=>{let s=async()=>{if(n)try{let o=await(await fetch(n)).blob(),u=new URL(n,window.location.origin).pathname.split("/").pop()||"",c=u.split(".").pop(),d=u.includes(".")&&c!==void 0&&c.length<=4,m="";if(d)m=u;else{let p=o.type,b="png";p.includes("jpeg")||p.includes("jpg")?b="jpg":p.includes("png")?b="png":p.includes("svg")?b="svg":p.includes("gif")?b="gif":p.includes("webp")&&(b="webp"),m=`${(r||u||"image").replace(X0e,"")}.${b}`}Dc(m,o,o.type)}catch(o){console.error("Failed to download image:",o)}};return n?h.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[h.jsx("img",{alt:r,className:Jt("max-w-full rounded-lg",t),"data-streamdown":"image",src:n,...a}),h.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),h.jsx("button",{className:Jt("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:s,title:"Download image",type:"button",children:h.jsx(rg,{size:14})})]}):null},gO=async e=>{let t={startOnLoad:!1,theme:"default",securityLevel:"strict",fontFamily:"monospace",suppressErrorRendering:!0,...e},n=(await cu(async()=>{const{default:r}=await import("./mermaid.core-CnT4VrPC.js").then(a=>a.bB);return{default:r}},__vite__mapDeps([3,1]),import.meta.url)).default;return n.initialize(t),n},Q0e=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((a,s)=>{let o="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),u=new Image;u.crossOrigin="anonymous",u.onload=()=>{let c=document.createElement("canvas"),d=u.width*r,m=u.height*r;c.width=d,c.height=m;let p=c.getContext("2d");if(!p){s(new Error("Failed to create 2D canvas context for PNG export"));return}p.drawImage(u,0,0,d,m),c.toBlob(b=>{if(!b){s(new Error("Failed to create PNG blob"));return}a(b)},"image/png")},u.onerror=()=>s(new Error("Failed to load SVG image")),u.src=o})},Z0e=({chart:e,children:t,className:n,onDownload:r,config:a,onError:s})=>{let[o,u]=x.useState(!1),c=x.useRef(null),{isAnimating:d}=x.useContext(Vs),m=async p=>{try{if(p==="mmd"){Dc("diagram.mmd",e,"text/plain"),u(!1),r?.(p);return}let b=await gO(a),y=e.split("").reduce((k,E)=>(k<<5)-k+E.charCodeAt(0)|0,0),w=`mermaid-${Math.abs(y)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:S}=await b.render(w,e);if(!S){s?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(p==="svg"){Dc("diagram.svg",S,"image/svg+xml"),u(!1),r?.(p);return}if(p==="png"){let k=await Q0e(S);Dc("diagram.png",k,"image/png"),r?.(p),u(!1);return}}catch(b){s?.(b)}};return x.useEffect(()=>{let p=b=>{c.current&&!c.current.contains(b.target)&&u(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[]),h.jsxs("div",{className:"relative",ref:c,children:[h.jsx("button",{className:Jt("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:d,onClick:()=>u(!o),title:"Download diagram",type:"button",children:t??h.jsx(rg,{size:14})}),o&&h.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[h.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>m("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),h.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>m("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),h.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>m("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]})]})},Ud=0,J0e=()=>{Ud+=1,Ud===1&&(document.body.style.overflow="hidden")},ede=()=>{Ud=Math.max(0,Ud-1),Ud===0&&(document.body.style.overflow="")},tde=({chart:e,config:t,onFullscreen:n,onExit:r,className:a,...s})=>{let[o,u]=x.useState(!1),{isAnimating:c,controls:d}=x.useContext(Vs),m=(()=>{if(typeof d=="boolean")return d;let b=d.mermaid;return b===!1?!1:b===!0||b===void 0?!0:b.panZoom!==!1})(),p=()=>{u(!o)};return x.useEffect(()=>{if(o){J0e();let b=y=>{y.key==="Escape"&&u(!1)};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b),ede()}}},[o]),x.useEffect(()=>{o?n?.():r&&r()},[o,n,r]),h.jsxs(h.Fragment,{children:[h.jsx("button",{className:Jt("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",a),disabled:c,onClick:p,title:"View fullscreen",type:"button",...s,children:h.jsx($le,{size:14})}),o&&h.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:p,onKeyDown:b=>{b.key==="Escape"&&p()},role:"button",tabIndex:0,children:[h.jsx("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:p,title:"Exit fullscreen",type:"button",children:h.jsx(Yle,{size:20})}),h.jsx("div",{className:"flex h-full w-full items-center justify-center p-4",onClick:b=>b.stopPropagation(),onKeyDown:b=>b.stopPropagation(),role:"presentation",children:h.jsx(GO,{chart:e,className:"h-full w-full [&>div]:h-full [&>div]:overflow-hidden [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:m})})]})]})},bO=e=>{var t,n;let r=[],a=[],s=e.querySelectorAll("thead th");for(let u of s)r.push(((t=u.textContent)==null?void 0:t.trim())||"");let o=e.querySelectorAll("tbody tr");for(let u of o){let c=[],d=u.querySelectorAll("td");for(let m of d)c.push(((n=m.textContent)==null?void 0:n.trim())||"");a.push(c)}return{headers:r,rows:a}},xO=e=>{let{headers:t,rows:n}=e,r=u=>{let c=!1,d=!1;for(let m=0;m<u.length;m+=1){let p=u[m];if(p==='"'){c=!0,d=!0;break}(p===","||p===`
|
|
435
|
+
`)&&(c=!0)}return c?d?`"${u.replace(/"/g,'""')}"`:`"${u}"`:u},a=t.length>0?n.length+1:n.length,s=new Array(a),o=0;t.length>0&&(s[o]=t.map(r).join(","),o+=1);for(let u of n)s[o]=u.map(r).join(","),o+=1;return s.join(`
|
|
436
|
+
`)},nde=e=>{let{headers:t,rows:n}=e,r=u=>{let c=!1;for(let m=0;m<u.length;m+=1){let p=u[m];if(p===" "||p===`
|
|
437
|
+
`||p==="\r"){c=!0;break}}if(!c)return u;let d=[];for(let m=0;m<u.length;m+=1){let p=u[m];p===" "?d.push("\\t"):p===`
|
|
438
|
+
`?d.push("\\n"):p==="\r"?d.push("\\r"):d.push(p)}return d.join("")},a=t.length>0?n.length+1:n.length,s=new Array(a),o=0;t.length>0&&(s[o]=t.map(r).join(" "),o+=1);for(let u of n)s[o]=u.map(r).join(" "),o+=1;return s.join(`
|
|
439
|
+
`)},Nx=e=>{let t=!1;for(let r=0;r<e.length;r+=1){let a=e[r];if(a==="\\"||a==="|"){t=!0;break}}if(!t)return e;let n=[];for(let r=0;r<e.length;r+=1){let a=e[r];a==="\\"?n.push("\\\\"):a==="|"?n.push("\\|"):n.push(a)}return n.join("")},rde=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),a=0,s=t.map(u=>Nx(u));r[a]=`| ${s.join(" | ")} |`,a+=1;let o=new Array(t.length);for(let u=0;u<t.length;u+=1)o[u]="---";r[a]=`| ${o.join(" | ")} |`,a+=1;for(let u of n)if(u.length<t.length){let c=new Array(t.length);for(let d=0;d<t.length;d+=1)c[d]=d<u.length?Nx(u[d]):"";r[a]=`| ${c.join(" | ")} |`,a+=1}else{let c=u.map(d=>Nx(d));r[a]=`| ${c.join(" | ")} |`,a+=1}return r.join(`
|
|
440
|
+
`)},ade=({children:e,className:t,onCopy:n,onError:r,timeout:a=2e3})=>{let[s,o]=x.useState(!1),[u,c]=x.useState(!1),d=x.useRef(null),m=x.useRef(0),{isAnimating:p}=x.useContext(Vs),b=async w=>{var S,k;if(typeof window>"u"||!((S=navigator?.clipboard)!=null&&S.write)){r?.(new Error("Clipboard API not available"));return}try{let E=(k=d.current)==null?void 0:k.closest('[data-streamdown="table-wrapper"]'),A=E?.querySelector("table");if(!A){r?.(new Error("Table not found"));return}let _=bO(A),I=w==="csv"?xO(_):nde(_),P=new ClipboardItem({"text/plain":new Blob([I],{type:"text/plain"}),"text/html":new Blob([A.outerHTML],{type:"text/html"})});await navigator.clipboard.write([P]),c(!0),o(!1),n?.(w),m.current=window.setTimeout(()=>c(!1),a)}catch(E){r?.(E)}};x.useEffect(()=>{let w=S=>{d.current&&!d.current.contains(S.target)&&o(!1)};return document.addEventListener("mousedown",w),()=>{document.removeEventListener("mousedown",w),window.clearTimeout(m.current)}},[]);let y=u?GI:YI;return h.jsxs("div",{className:"relative",ref:d,children:[h.jsx("button",{className:Jt("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:p,onClick:()=>o(!s),title:"Copy table",type:"button",children:e??h.jsx(y,{size:14})}),s&&h.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[h.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>b("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),h.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>b("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]})]})},sde=({children:e,className:t,onDownload:n,onError:r})=>{let[a,s]=x.useState(!1),o=x.useRef(null),{isAnimating:u}=x.useContext(Vs),c=d=>{var m;try{let p=(m=o.current)==null?void 0:m.closest('[data-streamdown="table-wrapper"]'),b=p?.querySelector("table");if(!b){r?.(new Error("Table not found"));return}let y=bO(b),w=d==="csv"?xO(y):rde(y);Dc(`table.${d==="csv"?"csv":"md"}`,w,d==="csv"?"text/csv":"text/markdown"),s(!1),n?.(d)}catch(p){r?.(p)}};return x.useEffect(()=>{let d=m=>{o.current&&!o.current.contains(m.target)&&s(!1)};return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[]),h.jsxs("div",{className:"relative",ref:o,children:[h.jsx("button",{className:Jt("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:()=>s(!a),title:"Download table",type:"button",children:e??h.jsx(rg,{size:14})}),a&&h.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[h.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>c("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),h.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>c("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]})]})},ide=({children:e,className:t,showControls:n,...r})=>h.jsxs("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[n&&h.jsxs("div",{className:"flex items-center justify-end gap-1",children:[h.jsx(ade,{}),h.jsx(sde,{})]}),h.jsx("div",{className:"overflow-x-auto",children:h.jsx("table",{className:Jt("w-full border-collapse border border-border",t),"data-streamdown":"table",...r,children:e})})]}),ode=x.lazy(()=>cu(()=>import("./code-block-IT6T5CEO-NtKViZGl.js"),__vite__mapDeps([4,0,1,2]),import.meta.url).then(e=>({default:e.CodeBlock}))),lde=x.lazy(()=>cu(()=>Promise.resolve().then(()=>k3e),void 0,import.meta.url).then(e=>({default:e.Mermaid}))),ude=/language-([^\s]+)/;function ig(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,a=e.position.end,s=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&a?.line===s?.line&&a?.column===s?.column}function hr(e,t){return e.className===t.className&&ig(e.node,t.node)}var av=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,$m=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},U3=x.memo(({children:e,className:t,node:n,...r})=>h.jsx("ol",{className:Jt("list-inside list-decimal whitespace-normal",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>hr(e,t));U3.displayName="MarkdownOl";var yO=x.memo(({children:e,className:t,node:n,...r})=>h.jsx("li",{className:Jt("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&ig(e.node,t.node));yO.displayName="MarkdownLi";var vO=x.memo(({children:e,className:t,node:n,...r})=>h.jsx("ul",{className:Jt("list-inside list-disc whitespace-normal",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>hr(e,t));vO.displayName="MarkdownUl";var wO=x.memo(({className:e,node:t,...n})=>h.jsx("hr",{className:Jt("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>hr(e,t));wO.displayName="MarkdownHr";var TO=x.memo(({children:e,className:t,node:n,...r})=>h.jsx("span",{className:Jt("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>hr(e,t));TO.displayName="MarkdownStrong";var EO=x.memo(({children:e,className:t,href:n,node:r,...a})=>{let s=n==="streamdown:incomplete-link";return h.jsx("a",{className:Jt("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":s,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...a,children:e})},(e,t)=>hr(e,t)&&e.href===t.href);EO.displayName="MarkdownA";var SO=x.memo(({children:e,className:t,node:n,...r})=>h.jsx("h1",{className:Jt("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>hr(e,t));SO.displayName="MarkdownH1";var CO=x.memo(({children:e,className:t,node:n,...r})=>h.jsx("h2",{className:Jt("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>hr(e,t));CO.displayName="MarkdownH2";var kO=x.memo(({children:e,className:t,node:n,...r})=>h.jsx("h3",{className:Jt("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>hr(e,t));kO.displayName="MarkdownH3";var AO=x.memo(({children:e,className:t,node:n,...r})=>h.jsx("h4",{className:Jt("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>hr(e,t));AO.displayName="MarkdownH4";var NO=x.memo(({children:e,className:t,node:n,...r})=>h.jsx("h5",{className:Jt("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>hr(e,t));NO.displayName="MarkdownH5";var _O=x.memo(({children:e,className:t,node:n,...r})=>h.jsx("h6",{className:Jt("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>hr(e,t));_O.displayName="MarkdownH6";var RO=x.memo(({children:e,className:t,node:n,...r})=>{let{controls:a}=x.useContext(Vs),s=av(a,"table");return h.jsx(ide,{className:t,"data-streamdown":"table-wrapper",showControls:s,...r,children:e})},(e,t)=>hr(e,t));RO.displayName="MarkdownTable";var MO=x.memo(({children:e,className:t,node:n,...r})=>h.jsx("thead",{className:Jt("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>hr(e,t));MO.displayName="MarkdownThead";var DO=x.memo(({children:e,className:t,node:n,...r})=>h.jsx("tbody",{className:Jt("divide-y divide-border bg-muted/40",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>hr(e,t));DO.displayName="MarkdownTbody";var IO=x.memo(({children:e,className:t,node:n,...r})=>h.jsx("tr",{className:Jt("border-border border-b",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>hr(e,t));IO.displayName="MarkdownTr";var OO=x.memo(({children:e,className:t,node:n,...r})=>h.jsx("th",{className:Jt("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>hr(e,t));OO.displayName="MarkdownTh";var LO=x.memo(({children:e,className:t,node:n,...r})=>h.jsx("td",{className:Jt("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>hr(e,t));LO.displayName="MarkdownTd";var PO=x.memo(({children:e,className:t,node:n,...r})=>h.jsx("blockquote",{className:Jt("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>hr(e,t));PO.displayName="MarkdownBlockquote";var jO=x.memo(({children:e,className:t,node:n,...r})=>h.jsx("sup",{className:Jt("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>hr(e,t));jO.displayName="MarkdownSup";var zO=x.memo(({children:e,className:t,node:n,...r})=>h.jsx("sub",{className:Jt("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>hr(e,t));zO.displayName="MarkdownSub";var BO=x.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let a=o=>{var u,c;if(!x.isValidElement(o))return!1;let d=Array.isArray(o.props.children)?o.props.children:[o.props.children],m=!1,p=!1;for(let b of d)if(b){if(typeof b=="string")b.trim()!==""&&(m=!0);else if(x.isValidElement(b))if(((u=b.props)==null?void 0:u["data-footnote-backref"])!==void 0)p=!0;else{let y=Array.isArray(b.props.children)?b.props.children:[b.props.children];for(let w of y){if(typeof w=="string"&&w.trim()!==""){m=!0;break}if(x.isValidElement(w)&&((c=w.props)==null?void 0:c["data-footnote-backref"])===void 0){m=!0;break}}}}return p&&!m},s=Array.isArray(e)?e.map(o=>{if(!x.isValidElement(o))return o;if(o.type===U3){let u=(Array.isArray(o.props.children)?o.props.children:[o.props.children]).filter(c=>!a(c));return u.length===0?null:{...o,props:{...o.props,children:u}}}return o}):e;return(Array.isArray(s)?s.some(o=>o!==null):s!==null)?h.jsx("section",{className:t,...r,children:s}):null}return h.jsx("section",{className:t,...r,children:e})},(e,t)=>hr(e,t));BO.displayName="MarkdownSection";var cde=({node:e,className:t,children:n,...r})=>{var a,s,o;let u=((a=e?.position)==null?void 0:a.start.line)===((s=e?.position)==null?void 0:s.end.line),{mermaid:c,controls:d}=x.useContext(Vs);if(u)return h.jsx("code",{className:Jt("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let m=t?.match(ude),p=(o=m?.at(1))!=null?o:"",b="";if(x.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?b=n.props.children:typeof n=="string"&&(b=n),p==="mermaid"){let w=av(d,"mermaid"),S=$m(d,"download"),k=$m(d,"copy"),E=$m(d,"fullscreen"),A=$m(d,"panZoom");return h.jsx(x.Suspense,{fallback:h.jsx($7,{}),children:h.jsxs("div",{className:Jt("group relative my-4 h-auto rounded-xl border p-4",t),"data-streamdown":"mermaid-block",children:[w&&(S||k||E)&&h.jsxs("div",{className:"flex items-center justify-end gap-2",children:[S&&h.jsx(Z0e,{chart:b,config:c?.config}),k&&h.jsx(H7,{code:b}),E&&h.jsx(tde,{chart:b,config:c?.config})]}),h.jsx(lde,{chart:b,config:c?.config,showControls:A})]})})}let y=av(d,"code");return h.jsx(x.Suspense,{fallback:h.jsx($7,{}),children:h.jsx(ode,{className:Jt("overflow-x-auto border-border border-t",t),code:b,language:p,children:y&&h.jsxs(h.Fragment,{children:[h.jsx(W0e,{code:b,language:p}),h.jsx(H7,{})]})})})},FO=x.memo(cde,(e,t)=>e.className===t.className&&ig(e.node,t.node));FO.displayName="MarkdownCode";var HO=x.memo(K0e,(e,t)=>e.className===t.className&&ig(e.node,t.node));HO.displayName="MarkdownImg";var UO=x.memo(({children:e,className:t,node:n,...r})=>{var a;let s=(Array.isArray(e)?e:[e]).filter(o=>o!=null&&o!=="");return s.length===1&&x.isValidElement(s[0])&&((a=s[0].props.node)==null?void 0:a.tagName)==="img"?h.jsx(h.Fragment,{children:e}):h.jsx("p",{className:t,...r,children:e})},(e,t)=>hr(e,t));UO.displayName="MarkdownParagraph";var dde={ol:U3,li:yO,ul:vO,hr:wO,strong:TO,a:EO,h1:SO,h2:CO,h3:kO,h4:AO,h5:NO,h6:_O,table:RO,thead:MO,tbody:DO,tr:IO,th:OO,td:LO,blockquote:PO,code:FO,img:HO,pre:({children:e})=>e,sup:jO,sub:zO,p:UO,section:BO},q7=[],V7={allowDangerousHtml:!0},qm=new WeakMap,fde=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(t){let n=this.keyCache.get(t);if(n)return n;let r=t.rehypePlugins,a=t.remarkPlugins,s=t.remarkRehypeOptions;if(!(r||a||s)){let p="default";return this.keyCache.set(t,p),p}let o=p=>{if(!p||p.length===0)return"";let b="";for(let y=0;y<p.length;y+=1){let w=p[y];if(y>0&&(b+=","),Array.isArray(w)){let[S,k]=w;if(typeof S=="function"){let E=qm.get(S);E||(E=S.name,qm.set(S,E)),b+=E}else b+=String(S);b+=":",b+=JSON.stringify(k)}else if(typeof w=="function"){let S=qm.get(w);S||(S=w.name,qm.set(w,S)),b+=S}else b+=String(w)}return b},u=o(r),c=o(a),d=s?JSON.stringify(s):"",m=`${c}::${u}::${d}`;return this.keyCache.set(t,m),m}get(t){let n=this.generateCacheKey(t),r=this.cache.get(n);return r&&(this.cache.delete(n),this.cache.set(n,r)),r}set(t,n){let r=this.generateCacheKey(t);if(this.cache.size>=this.maxSize){let a=this.cache.keys().next().value;a&&this.cache.delete(a)}this.cache.set(r,n)}clear(){this.cache.clear()}},G7=new fde,$O=e=>{let t=hde(e),n=e.children||"";return pde(t.runSync(t.parse(n),n),e)},hde=e=>{let t=G7.get(e);if(t)return t;let n=mde(e);return G7.set(e,n),n},mde=e=>{let t=e.rehypePlugins||q7,n=e.remarkPlugins||q7,r=e.remarkRehypeOptions?{...V7,...e.remarkRehypeOptions}:V7;return i0e().use(sce).use(n).use(Hce,r).use(t)},pde=(e,t)=>hue(e,{Fragment:h.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0}),gde=/\[\^[^\]\s]{1,200}\](?!:)/,bde=/\[\^[^\]\s]{1,200}\]:/,xde=/<\/(\w+)>/,yde=/<(\w+)[\s>]/,_x=e=>{let t=0;for(;t<e.length&&(e[t]===" "||e[t]===" "||e[t]===`
|
|
441
|
+
`||e[t]==="\r");)t+=1;return t+1<e.length&&e[t]==="$"&&e[t+1]==="$"},vde=e=>{let t=e.length-1;for(;t>=0&&(e[t]===" "||e[t]===" "||e[t]===`
|
|
442
|
+
`||e[t]==="\r");)t-=1;return t>=1&&e[t]==="$"&&e[t-1]==="$"},Rx=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},wde=e=>{let t=gde.test(e),n=bde.test(e);if(t||n)return[e];let r=Ts.lex(e,{gfm:!0}),a=[],s=[];for(let o of r){let u=o.raw,c=a.length;if(s.length>0){if(a[c-1]+=u,o.type==="html"){let d=u.match(xde);if(d){let m=d[1];s.at(-1)===m&&s.pop()}}continue}if(o.type==="html"&&o.block){let d=u.match(yde);if(d){let m=d[1];u.includes(`</${m}>`)||s.push(m)}}if(u.trim()==="$$"&&c>0){let d=a[c-1],m=_x(d),p=Rx(d);if(m&&p%2===1){a[c-1]=d+u;continue}}if(c>0&&vde(u)){let d=a[c-1],m=_x(d),p=Rx(d),b=Rx(u);if(m&&p%2===1&&!_x(u)&&b===1){a[c-1]=d+u;continue}}a.push(u)}return a},qO={raw:wre,katex:[Fy,{errorColor:"var(--color-muted-foreground)"}],sanitize:[Mre,{}],harden:[IQ,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},$d={gfm:[Poe,{}],math:[Xy,{singleDollarTextMath:!1}],cjkFriendly:[aae,{}],cjkFriendlyGfmStrikethrough:[iae,{}]},Tde=Object.values(qO),Ede=Object.values($d),Sde={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0},Vs=x.createContext(Sde),VO=x.memo(({content:e,shouldParseIncompleteMarkdown:t,...n})=>{let r=x.useMemo(()=>typeof e=="string"&&t?Mle(e.trim()):e,[e,t]);return h.jsx($O,{...n,children:r})},(e,t)=>{if(e.content!==t.content||e.shouldParseIncompleteMarkdown!==t.shouldParseIncompleteMarkdown||e.index!==t.index)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(a=>{var s,o;return((s=e.components)==null?void 0:s[a])!==((o=t.components)==null?void 0:o[a])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});VO.displayName="Block";var Cde=["github-light","github-dark"],$3=x.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:a=Tde,remarkPlugins:s=Ede,className:o,shikiTheme:u=Cde,mermaid:c,controls:d=!0,isAnimating:m=!1,BlockComponent:p=VO,parseMarkdownIntoBlocksFn:b=wde,...y})=>{let w=x.useId(),[S,k]=x.useTransition(),[E,A]=x.useState([]),_=x.useMemo(()=>b(typeof e=="string"?e:""),[e,b]);x.useEffect(()=>{t==="streaming"?k(()=>{A(_)}):A(_)},[_,t]);let I=t==="streaming"?E:_,P=x.useMemo(()=>I.map((z,F)=>`${w}-${F}`),[I.length,w]),O=x.useMemo(()=>({shikiTheme:u,controls:d,isAnimating:m,mode:t,mermaid:c}),[u,d,m,t,c]),R=x.useMemo(()=>({...dde,...r}),[r]);return x.useEffect(()=>{if(!(Array.isArray(a)&&a.some(W=>Array.isArray(W)?W[0]===Fy:W===Fy)))return;let z=!1;if(Array.isArray(s)){let W=s.find(le=>Array.isArray(le)?le[0]===Xy:le===Xy);W&&Array.isArray(W)&&W[1]&&(z=W[1].singleDollarTextMath===!0)}let F=typeof e=="string"?e:"",U=F.includes("$$"),X=z&&(/[^$]\$[^$]/.test(F)||/^\$[^$]/.test(F)||/[^$]\$$/.test(F));(U||X)&&cu(()=>Promise.resolve({}),__vite__mapDeps([5]),import.meta.url)},[a,s,e]),t==="static"?h.jsx(Vs.Provider,{value:O,children:h.jsx("div",{className:Jt("space-y-4 whitespace-normal",o),children:h.jsx($O,{components:R,rehypePlugins:a,remarkPlugins:s,...y,children:e})})}):h.jsx(Vs.Provider,{value:O,children:h.jsx("div",{className:Jt("space-y-4 whitespace-normal",o),children:I.map((z,F)=>h.jsx(p,{components:R,content:z,index:F,rehypePlugins:a,remarkPlugins:s,shouldParseIncompleteMarkdown:n,...y},P[F]))})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.mode===t.mode);$3.displayName="Streamdown";var kde=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:a=.1,showControls:s=!0,initialZoom:o=1,fullscreen:u=!1})=>{let c=x.useRef(null),d=x.useRef(null),[m,p]=x.useState(o),[b,y]=x.useState({x:0,y:0}),[w,S]=x.useState(!1),[k,E]=x.useState({x:0,y:0}),[A,_]=x.useState({x:0,y:0}),I=x.useCallback(W=>{p(le=>Math.max(n,Math.min(r,le+W)))},[n,r]),P=x.useCallback(()=>{I(a)},[I,a]),O=x.useCallback(()=>{I(-a)},[I,a]),R=x.useCallback(()=>{p(o),y({x:0,y:0})},[o]),z=x.useCallback(W=>{W.preventDefault();let le=W.deltaY>0?-a:a;I(le)},[I,a]),F=x.useCallback(W=>{if(W.button!==0||W.isPrimary===!1)return;S(!0),E({x:W.clientX,y:W.clientY}),_(b);let le=W.currentTarget;le instanceof HTMLElement&&le.setPointerCapture(W.pointerId)},[b]),U=x.useCallback(W=>{if(!w)return;W.preventDefault();let le=W.clientX-k.x,se=W.clientY-k.y;y({x:A.x+le,y:A.y+se})},[w,k,A]),X=x.useCallback(W=>{S(!1);let le=W.currentTarget;le instanceof HTMLElement&&le.releasePointerCapture(W.pointerId)},[]);return x.useEffect(()=>{let W=c.current;if(W)return W.addEventListener("wheel",z,{passive:!1}),()=>{W.removeEventListener("wheel",z)}},[z]),x.useEffect(()=>{let W=d.current;if(W&&w)return document.body.style.userSelect="none",W.addEventListener("pointermove",U,{passive:!1}),W.addEventListener("pointerup",X),W.addEventListener("pointercancel",X),()=>{document.body.style.userSelect="",W.removeEventListener("pointermove",U),W.removeEventListener("pointerup",X),W.removeEventListener("pointercancel",X)}},[w,U,X]),h.jsxs("div",{className:Jt("relative",u?"h-full w-full":"w-full",t),ref:c,style:{cursor:w?"grabbing":"grab"},children:[s&&h.jsxs("div",{className:Jt("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm",u?"bottom-4 left-4":"bottom-2 left-2"),children:[h.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:m>=r,onClick:P,title:"Zoom in",type:"button",children:h.jsx(Xle,{size:16})}),h.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:m<=n,onClick:O,title:"Zoom out",type:"button",children:h.jsx(Qle,{size:16})}),h.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:R,title:"Reset zoom and pan",type:"button",children:h.jsx(Vle,{size:16})})]}),h.jsx("div",{className:Jt("origin-center transition-transform duration-150 ease-out",u&&"flex w-full items-center justify-center"),onPointerDown:F,ref:d,role:"application",style:{transform:`translate(${b.x}px, ${b.y}px) scale(${m})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},GO=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:a=!0})=>{let[s,o]=x.useState(null),[u,c]=x.useState(!0),[d,m]=x.useState(""),[p,b]=x.useState(""),[y,w]=x.useState(0),{mermaid:S}=x.useContext(Vs),k=S?.errorComponent;if(x.useEffect(()=>{(async()=>{try{o(null),c(!0);let A=await gO(n),_=e.split("").reduce((O,R)=>(O<<5)-O+R.charCodeAt(0)|0,0),I=`mermaid-${Math.abs(_)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:P}=await A.render(I,e);m(P),b(P)}catch(A){if(!(p||d)){let _=A instanceof Error?A.message:"Failed to render Mermaid chart";o(_)}}finally{c(!1)}})()},[e,n,y]),u&&!d&&!p)return h.jsx("div",{className:Jt("my-4 flex justify-center p-4",t),children:h.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[h.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),h.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(s&&!d&&!p){let A=()=>w(_=>_+1);return k?h.jsx(k,{chart:e,error:s,retry:A}):h.jsxs("div",{className:Jt("rounded-lg border border-red-200 bg-red-50 p-4",t),children:[h.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",s]}),h.jsxs("details",{className:"mt-2",children:[h.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),h.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]})}let E=d||p;return h.jsx(kde,{className:Jt(r?"h-full w-full overflow-hidden":"my-4 overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:a,zoomStep:.1,children:h.jsx("div",{"aria-label":"Mermaid chart",className:Jt("flex justify-center",r&&"h-full w-full items-center"),dangerouslySetInnerHTML:{__html:E},role:"img"})})};const YO=[qO.katex],Vm=$d.math,Ade=Array.isArray(Vm)?[Vm[0],{...Vm[1],singleDollarTextMath:!0}]:[Vm,{singleDollarTextMath:!0}],WO=[$d.gfm,Ade,$d.cjkFriendly,$d.cjkFriendlyGfmStrikethrough],XO=e=>{const t=new RegExp("(^|\\n)```[a-z]*\\n[\\s\\S]*?\\n```|`[^`\\n]+`|\\$\\$[\\s\\S]*?\\$\\$|\\$(?!\\s)[^$\\n]+(?<!\\s)\\$","g"),n=[];let r;for(;(r=t.exec(e))!==null;){const d=r[0].startsWith(`
|
|
443
|
+
`)?r.index+1:r.index;n.push({start:d,end:r.index+r[0].length})}const a=c=>{let d=c.replace(/<(?=[a-zA-Z/!?])/g,"<");return d=d.replace(new RegExp("(?<!^)(?<![-=])>","gm"),">"),d=d.replace(/\n([ ]{4,})/g,`
|
|
444
|
+
$1`),d},s=[];let o=0;for(const c of n){const d=e.slice(o,c.start);s.push(a(d)),s.push(e.slice(c.start,c.end)),o=c.end}const u=e.slice(o);return s.push(a(u)),s.join("")},KO=["flow-root","[&_p]:my-0","[&_ul]:my-0","[&_ol]:my-0","[&_li]:my-0","[&_blockquote]:my-0","[&_pre]:my-0","[&_*+p]:mt-3","[&_*+ul]:mt-3","[&_*+ol]:mt-3","[&_*+blockquote]:mt-3","[&_*+pre]:mt-3","[&_pre+*]:mt-3","[&_li+li]:mt-1","[&_hr]:my-4","[&_h1]:mt-6 [&_h1]:mb-2","[&_h2]:mt-5 [&_h2]:mb-2","[&_h3]:mt-4 [&_h3]:mb-1.5","[&_h4]:mt-3 [&_h4]:mb-1","[&_h5]:mt-3 [&_h5]:mb-1","[&_h6]:mt-3 [&_h6]:mb-1"].join(" "),Nde=/language-([^\s]+)/,_de=e=>e?.match(Nde)?.[1],sv=e=>typeof e=="string"?e:Array.isArray(e)?e.map(sv).join(""):x.isValidElement(e)?sv(e.props.children):"",Rde=({className:e,children:t,node:n,...r})=>n?.position?.start?.line===n?.position?.end?.line?h.jsx("code",{className:me("rounded bg-secondary px-1 py-0.5 font-mono text-xs",e),"data-streamdown":"inline-code",...r,children:t}):h.jsx(Fc,{className:me("my-2",e),code:sv(t),language:_de(e),...r}),Mde=({children:e})=>e,QO={code:Rde,pre:Mde},Y7=({className:e,from:t,...n})=>h.jsx("div",{className:me("group flex w-full flex-col gap-1",t==="user"?"is-user":"is-assistant",e),...n}),d0=({children:e,className:t,...n})=>h.jsx("div",{className:me("flex w-full flex-col gap-1 overflow-hidden text-sm",t),...n,children:e}),Dde=({children:e,className:t,...n})=>h.jsx("div",{className:me("w-full rounded-2xl bg-secondary/50 px-4 py-3 text-sm","dark:bg-secondary/30",t),...n,children:h.jsx("div",{className:"whitespace-pre-wrap break-words",children:e})}),Ide=({className:e,children:t,...n})=>h.jsx("div",{className:me("flex items-center gap-1 ml-4",e),...n,children:t}),Ode=({tooltip:e,children:t,label:n,variant:r="ghost",size:a="icon-sm",className:s,...o})=>{const u=h.jsxs(Bt,{size:a,type:"button",variant:r,className:me("size-6",s),...o,children:[t,h.jsx("span",{className:"sr-only",children:n||e})]});return e?h.jsx(H4,{children:h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:u}),h.jsx(xn,{className:"px-1.5 py-0.5",children:h.jsx("p",{className:"text-[12px]",children:e})})]})}):u},Lde=({content:e,timeout:t=2e3})=>{const[n,r]=x.useState(!1),a=async()=>{try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),t)}catch{}};return h.jsx(Ode,{tooltip:n?"Copied!":"Copy",onClick:a,children:n?h.jsx(fo,{className:"size-3"}):h.jsx(Kc,{className:"size-3"})})},Pde=({onFork:e})=>h.jsxs(jR,{children:[h.jsx(H4,{children:h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx(bQ,{asChild:!0,children:h.jsxs(Bt,{size:"icon-sm",type:"button",variant:"ghost",className:"size-6",children:[h.jsx(hA,{className:"size-3"}),h.jsx("span",{className:"sr-only",children:"Fork session"})]})})}),h.jsx(xn,{className:"px-1.5 py-0.5",children:h.jsx("p",{className:"text-[12px]",children:"Fork session from this point"})})]})}),h.jsxs(zR,{size:"sm",children:[h.jsxs(BR,{children:[h.jsx(HR,{children:"Fork Session"}),h.jsx(UR,{children:"A new session will be created with the conversation history up to and including this response. The current session will not be affected."})]}),h.jsxs(FR,{children:[h.jsx(qR,{children:"Cancel"}),h.jsx($R,{onClick:e,children:"Fork"})]})]})]});x.createContext(null);const og=x.memo(({className:e,children:t,...n})=>h.jsx($3,{className:me("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",KO,e),components:QO,rehypePlugins:YO,remarkPlugins:WO,...n,children:typeof t=="string"?XO(t):t}),(e,t)=>e.children===t.children);og.displayName="MessageResponse";function jde({data:e,className:t,onRemove:n,...r}){const[a,s]=x.useState(!1),[o,u]=x.useState(null),c=R=>"kind"in R&&R.kind==="nopreview",d=R=>"kind"in R&&R.kind==="video-nopreview",m=c(e),p=d(e),b=e.filename||"";let y,w;!m&&!p?(y=e.mediaType,w=e.url):p&&(y=e.mediaType);const S=y?.startsWith("image/")&&w,k=y?.startsWith("video/")&&w,E=y?.startsWith("text/")&&w,A=(S||k||E)&&!!w,_=b||(S?"Image":k||p?"Video":"Attachment"),I=S?"Image":k?"Video":void 0,P=B1(k?w:void 0),O=()=>{if(E&&w?.startsWith("data:"))try{const R=w.split(",")[1],z=atob(R),F=Uint8Array.from(z,U=>U.charCodeAt(0));u(new TextDecoder().decode(F))}catch{u("Failed to decode file content")}s(!0)};return h.jsxs(h.Fragment,{children:[h.jsx("div",{className:me("group relative size-24 overflow-hidden rounded-lg",(S||k)&&"border border-border",A?"cursor-zoom-in":void 0,t),onClick:()=>{A&&O()},onKeyDown:R=>{A&&(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),O())},role:A?"button":void 0,tabIndex:A?0:void 0,...r,children:S?h.jsxs(h.Fragment,{children:[h.jsx("img",{alt:b||"attachment",className:"size-full object-cover",height:160,src:w,width:160}),I&&h.jsx("span",{className:"pointer-events-none absolute bottom-2 right-2 rounded bg-black/70 px-1.5 py-0.5 text-[10px] font-semibold leading-none text-white shadow-sm",children:I}),n&&h.jsxs(Bt,{"aria-label":"Remove attachment",className:"hover-reveal absolute top-2 right-2 size-6 rounded-full bg-background/80 p-0 opacity-0 backdrop-blur-sm transition-opacity hover:bg-background group-hover:opacity-100 [&>svg]:size-3",onClick:R=>{R.stopPropagation(),n()},type:"button",variant:"ghost",children:[h.jsx(rs,{}),h.jsx("span",{className:"sr-only",children:"Remove"})]})]}):k?h.jsxs(h.Fragment,{children:[h.jsx("video",{className:"size-full object-cover",height:160,poster:P??void 0,preload:"metadata",src:w,width:160,muted:!0,playsInline:!0}),I&&h.jsx("span",{className:"pointer-events-none absolute bottom-2 right-2 rounded bg-black/70 px-1.5 py-0.5 text-[10px] font-semibold leading-none text-white shadow-sm",children:I}),n&&h.jsxs(Bt,{"aria-label":"Remove attachment",className:"hover-reveal absolute top-2 right-2 size-6 rounded-full bg-background/80 p-0 opacity-0 backdrop-blur-sm transition-opacity hover:bg-background group-hover:opacity-100 [&>svg]:size-3",onClick:R=>{R.stopPropagation(),n()},type:"button",variant:"ghost",children:[h.jsx(rs,{}),h.jsx("span",{className:"sr-only",children:"Remove"})]})]}):h.jsxs(h.Fragment,{children:[h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx("div",{className:"flex size-full shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground",children:p?h.jsx(gq,{className:"size-4"}):h.jsx(m1,{className:"size-4"})})}),h.jsx(xn,{children:h.jsx("p",{children:_})})]}),n&&h.jsxs(Bt,{"aria-label":"Remove attachment",className:"hover-reveal size-6 shrink-0 rounded-full p-0 opacity-0 transition-opacity hover:bg-accent group-hover:opacity-100 [&>svg]:size-3",onClick:R=>{R.stopPropagation(),n()},type:"button",variant:"ghost",children:[h.jsx(rs,{}),h.jsx("span",{className:"sr-only",children:"Remove"})]})]})}),A?h.jsx(e0,{open:a,onOpenChange:s,children:h.jsxs(t0,{className:"max-w-[min(95vw,1100px)] overflow-hidden p-0 sm:max-w-[min(95vw,1100px)]",showCloseButton:!0,children:[h.jsx(Pf,{className:E?"p-4 pb-0":"sr-only",children:h.jsx(n0,{children:E?b:"Attachment preview"})}),h.jsx("div",{className:"bg-background",children:S?h.jsx("img",{alt:b||"attachment",className:"block max-h-[88vh] w-full object-contain",src:w}):k?h.jsx("video",{className:"block max-h-[88vh] w-full object-contain",src:w,controls:!0,poster:P??void 0,autoPlay:!0,playsInline:!0}):E&&o!==null?h.jsx("pre",{className:"max-h-[80vh] overflow-auto p-4 pt-2 text-sm whitespace-pre-wrap wrap-break-word font-mono",children:o}):null})]})}):null]})}function zde({children:e,className:t,...n}){return e?h.jsx("div",{className:me("ml-auto flex w-fit flex-wrap items-start gap-2",t),...n,children:e}):null}var W7=1,Bde=.9,Fde=.8,Hde=.17,Mx=.1,Dx=.999,Ude=.9999,$de=.99,qde=/[\\\/_+.#"@\[\(\{&]/,Vde=/[\\\/_+.#"@\[\(\{&]/g,Gde=/[\s-]/,ZO=/[\s-]/g;function iv(e,t,n,r,a,s,o){if(s===t.length)return a===e.length?W7:$de;var u=`${a},${s}`;if(o[u]!==void 0)return o[u];for(var c=r.charAt(s),d=n.indexOf(c,a),m=0,p,b,y,w;d>=0;)p=iv(e,t,n,r,d+1,s+1,o),p>m&&(d===a?p*=W7:qde.test(e.charAt(d-1))?(p*=Fde,y=e.slice(a,d-1).match(Vde),y&&a>0&&(p*=Math.pow(Dx,y.length))):Gde.test(e.charAt(d-1))?(p*=Bde,w=e.slice(a,d-1).match(ZO),w&&a>0&&(p*=Math.pow(Dx,w.length))):(p*=Hde,a>0&&(p*=Math.pow(Dx,d-a))),e.charAt(d)!==t.charAt(s)&&(p*=Ude)),(p<Mx&&n.charAt(d-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(d-1)!==r.charAt(s))&&(b=iv(e,t,n,r,d+1,s+2,o),b*Mx>p&&(p=b*Mx)),p>m&&(m=p),d=n.indexOf(c,d+1);return o[u]=m,m}function X7(e){return e.toLowerCase().replace(ZO," ")}function Yde(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,iv(e,t,X7(e),X7(t),0,0,{})}var vd='[cmdk-group=""]',Ix='[cmdk-group-items=""]',Wde='[cmdk-group-heading=""]',JO='[cmdk-item=""]',K7=`${JO}:not([aria-disabled="true"])`,ov="cmdk-item-select",mc="data-value",Xde=(e,t,n)=>Yde(e,t,n),eL=x.createContext(void 0),Xf=()=>x.useContext(eL),tL=x.createContext(void 0),q3=()=>x.useContext(tL),nL=x.createContext(void 0),rL=x.forwardRef((e,t)=>{let n=pc(()=>{var G,L;return{search:"",value:(L=(G=e.value)!=null?G:e.defaultValue)!=null?L:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=pc(()=>new Set),a=pc(()=>new Map),s=pc(()=>new Map),o=pc(()=>new Set),u=aL(e),{label:c,children:d,value:m,onValueChange:p,filter:b,shouldFilter:y,loop:w,disablePointerSelection:S=!1,vimBindings:k=!0,...E}=e,A=za(),_=za(),I=za(),P=x.useRef(null),O=ife();ou(()=>{if(m!==void 0){let G=m.trim();n.current.value=G,R.emit()}},[m]),ou(()=>{O(6,le)},[]);let R=x.useMemo(()=>({subscribe:G=>(o.current.add(G),()=>o.current.delete(G)),snapshot:()=>n.current,setState:(G,L,ae)=>{var oe,Se,be,fe;if(!Object.is(n.current[G],L)){if(n.current[G]=L,G==="search")W(),U(),O(1,X);else if(G==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Ne=document.getElementById(I);Ne?Ne.focus():(oe=document.getElementById(A))==null||oe.focus()}if(O(7,()=>{var Ne;n.current.selectedItemId=(Ne=se())==null?void 0:Ne.id,R.emit()}),ae||O(5,le),((Se=u.current)==null?void 0:Se.value)!==void 0){let Ne=L??"";(fe=(be=u.current).onValueChange)==null||fe.call(be,Ne);return}}R.emit()}},emit:()=>{o.current.forEach(G=>G())}}),[]),z=x.useMemo(()=>({value:(G,L,ae)=>{var oe;L!==((oe=s.current.get(G))==null?void 0:oe.value)&&(s.current.set(G,{value:L,keywords:ae}),n.current.filtered.items.set(G,F(L,ae)),O(2,()=>{U(),R.emit()}))},item:(G,L)=>(r.current.add(G),L&&(a.current.has(L)?a.current.get(L).add(G):a.current.set(L,new Set([G]))),O(3,()=>{W(),U(),n.current.value||X(),R.emit()}),()=>{s.current.delete(G),r.current.delete(G),n.current.filtered.items.delete(G);let ae=se();O(4,()=>{W(),ae?.getAttribute("id")===G&&X(),R.emit()})}),group:G=>(a.current.has(G)||a.current.set(G,new Set),()=>{s.current.delete(G),a.current.delete(G)}),filter:()=>u.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>u.current.disablePointerSelection,listId:A,inputId:I,labelId:_,listInnerRef:P}),[]);function F(G,L){var ae,oe;let Se=(oe=(ae=u.current)==null?void 0:ae.filter)!=null?oe:Xde;return G?Se(G,n.current.search,L):0}function U(){if(!n.current.search||u.current.shouldFilter===!1)return;let G=n.current.filtered.items,L=[];n.current.filtered.groups.forEach(oe=>{let Se=a.current.get(oe),be=0;Se.forEach(fe=>{let Ne=G.get(fe);be=Math.max(Ne,be)}),L.push([oe,be])});let ae=P.current;ie().sort((oe,Se)=>{var be,fe;let Ne=oe.getAttribute("id"),at=Se.getAttribute("id");return((be=G.get(at))!=null?be:0)-((fe=G.get(Ne))!=null?fe:0)}).forEach(oe=>{let Se=oe.closest(Ix);Se?Se.appendChild(oe.parentElement===Se?oe:oe.closest(`${Ix} > *`)):ae.appendChild(oe.parentElement===ae?oe:oe.closest(`${Ix} > *`))}),L.sort((oe,Se)=>Se[1]-oe[1]).forEach(oe=>{var Se;let be=(Se=P.current)==null?void 0:Se.querySelector(`${vd}[${mc}="${encodeURIComponent(oe[0])}"]`);be?.parentElement.appendChild(be)})}function X(){let G=ie().find(ae=>ae.getAttribute("aria-disabled")!=="true"),L=G?.getAttribute(mc);R.setState("value",L||void 0)}function W(){var G,L,ae,oe;if(!n.current.search||u.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let Se=0;for(let be of r.current){let fe=(L=(G=s.current.get(be))==null?void 0:G.value)!=null?L:"",Ne=(oe=(ae=s.current.get(be))==null?void 0:ae.keywords)!=null?oe:[],at=F(fe,Ne);n.current.filtered.items.set(be,at),at>0&&Se++}for(let[be,fe]of a.current)for(let Ne of fe)if(n.current.filtered.items.get(Ne)>0){n.current.filtered.groups.add(be);break}n.current.filtered.count=Se}function le(){var G,L,ae;let oe=se();oe&&(((G=oe.parentElement)==null?void 0:G.firstChild)===oe&&((ae=(L=oe.closest(vd))==null?void 0:L.querySelector(Wde))==null||ae.scrollIntoView({block:"nearest"})),oe.scrollIntoView({block:"nearest"}))}function se(){var G;return(G=P.current)==null?void 0:G.querySelector(`${JO}[aria-selected="true"]`)}function ie(){var G;return Array.from(((G=P.current)==null?void 0:G.querySelectorAll(K7))||[])}function $(G){let L=ie()[G];L&&R.setState("value",L.getAttribute(mc))}function K(G){var L;let ae=se(),oe=ie(),Se=oe.findIndex(fe=>fe===ae),be=oe[Se+G];(L=u.current)!=null&&L.loop&&(be=Se+G<0?oe[oe.length-1]:Se+G===oe.length?oe[0]:oe[Se+G]),be&&R.setState("value",be.getAttribute(mc))}function Z(G){let L=se(),ae=L?.closest(vd),oe;for(;ae&&!oe;)ae=G>0?afe(ae,vd):sfe(ae,vd),oe=ae?.querySelector(K7);oe?R.setState("value",oe.getAttribute(mc)):K(G)}let re=()=>$(ie().length-1),j=G=>{G.preventDefault(),G.metaKey?re():G.altKey?Z(1):K(1)},H=G=>{G.preventDefault(),G.metaKey?$(0):G.altKey?Z(-1):K(-1)};return x.createElement($t.div,{ref:t,tabIndex:-1,...E,"cmdk-root":"",onKeyDown:G=>{var L;(L=E.onKeyDown)==null||L.call(E,G);let ae=G.nativeEvent.isComposing||G.keyCode===229;if(!(G.defaultPrevented||ae))switch(G.key){case"n":case"j":{k&&G.ctrlKey&&j(G);break}case"ArrowDown":{j(G);break}case"p":case"k":{k&&G.ctrlKey&&H(G);break}case"ArrowUp":{H(G);break}case"Home":{G.preventDefault(),$(0);break}case"End":{G.preventDefault(),re();break}case"Enter":{G.preventDefault();let oe=se();if(oe){let Se=new Event(ov);oe.dispatchEvent(Se)}}}}},x.createElement("label",{"cmdk-label":"",htmlFor:z.inputId,id:z.labelId,style:lfe},c),lg(e,G=>x.createElement(tL.Provider,{value:R},x.createElement(eL.Provider,{value:z},G))))}),Kde=x.forwardRef((e,t)=>{var n,r;let a=za(),s=x.useRef(null),o=x.useContext(nL),u=Xf(),c=aL(e),d=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:o?.forceMount;ou(()=>{if(!d)return u.item(a,o?.id)},[d]);let m=sL(a,s,[e.value,e.children,s],e.keywords),p=q3(),b=cl(O=>O.value&&O.value===m.current),y=cl(O=>d||u.filter()===!1?!0:O.search?O.filtered.items.get(a)>0:!0);x.useEffect(()=>{let O=s.current;if(!(!O||e.disabled))return O.addEventListener(ov,w),()=>O.removeEventListener(ov,w)},[y,e.onSelect,e.disabled]);function w(){var O,R;S(),(R=(O=c.current).onSelect)==null||R.call(O,m.current)}function S(){p.setState("value",m.current,!0)}if(!y)return null;let{disabled:k,value:E,onSelect:A,forceMount:_,keywords:I,...P}=e;return x.createElement($t.div,{ref:Ha(s,t),...P,id:a,"cmdk-item":"",role:"option","aria-disabled":!!k,"aria-selected":!!b,"data-disabled":!!k,"data-selected":!!b,onPointerMove:k||u.getDisablePointerSelection()?void 0:S,onClick:k?void 0:w},e.children)}),Qde=x.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:a,...s}=e,o=za(),u=x.useRef(null),c=x.useRef(null),d=za(),m=Xf(),p=cl(y=>a||m.filter()===!1?!0:y.search?y.filtered.groups.has(o):!0);ou(()=>m.group(o),[]),sL(o,u,[e.value,e.heading,c]);let b=x.useMemo(()=>({id:o,forceMount:a}),[a]);return x.createElement($t.div,{ref:Ha(u,t),...s,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},n&&x.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:d},n),lg(e,y=>x.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?d:void 0},x.createElement(nL.Provider,{value:b},y))))}),Zde=x.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,a=x.useRef(null),s=cl(o=>!o.search);return!n&&!s?null:x.createElement($t.div,{ref:Ha(a,t),...r,"cmdk-separator":"",role:"separator"})}),Jde=x.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,a=e.value!=null,s=q3(),o=cl(d=>d.search),u=cl(d=>d.selectedItemId),c=Xf();return x.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),x.createElement($t.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":u,id:c.inputId,type:"text",value:a?e.value:o,onChange:d=>{a||s.setState("search",d.target.value),n?.(d.target.value)}})}),efe=x.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...a}=e,s=x.useRef(null),o=x.useRef(null),u=cl(d=>d.selectedItemId),c=Xf();return x.useEffect(()=>{if(o.current&&s.current){let d=o.current,m=s.current,p,b=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let y=d.offsetHeight;m.style.setProperty("--cmdk-list-height",y.toFixed(1)+"px")})});return b.observe(d),()=>{cancelAnimationFrame(p),b.unobserve(d)}}},[]),x.createElement($t.div,{ref:Ha(s,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":u,"aria-label":r,id:c.listId},lg(e,d=>x.createElement("div",{ref:Ha(o,c.listInnerRef),"cmdk-list-sizer":""},d)))}),tfe=x.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:s,container:o,...u}=e;return x.createElement(u4,{open:n,onOpenChange:r},x.createElement(c4,{container:o},x.createElement(d4,{"cmdk-overlay":"",className:a}),x.createElement(f4,{"aria-label":e.label,"cmdk-dialog":"",className:s},x.createElement(rL,{ref:t,...u}))))}),nfe=x.forwardRef((e,t)=>cl(n=>n.filtered.count===0)?x.createElement($t.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),rfe=x.forwardRef((e,t)=>{let{progress:n,children:r,label:a="Loading...",...s}=e;return x.createElement($t.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},lg(e,o=>x.createElement("div",{"aria-hidden":!0},o)))}),wu=Object.assign(rL,{List:efe,Item:Kde,Input:Jde,Group:Qde,Separator:Zde,Dialog:tfe,Empty:nfe,Loading:rfe});function afe(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function sfe(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function aL(e){let t=x.useRef(e);return ou(()=>{t.current=e}),t}var ou=typeof window>"u"?x.useEffect:x.useLayoutEffect;function pc(e){let t=x.useRef();return t.current===void 0&&(t.current=e()),t}function cl(e){let t=q3(),n=()=>e(t.snapshot());return x.useSyncExternalStore(t.subscribe,n,n)}function sL(e,t,n,r=[]){let a=x.useRef(),s=Xf();return ou(()=>{var o;let u=(()=>{var d;for(let m of n){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(d=m.current.textContent)==null?void 0:d.trim():a.current}})(),c=r.map(d=>d.trim());s.value(e,u,c),(o=t.current)==null||o.setAttribute(mc,u),a.current=u}),a}var ife=()=>{let[e,t]=x.useState(),n=pc(()=>new Map);return ou(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,a)=>{n.current.set(r,a),t({})}};function ofe(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function lg({asChild:e,children:t},n){return e&&x.isValidElement(t)?x.cloneElement(ofe(t),{ref:t.ref},n(t.props.children)):n(t)}var lfe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function V3({className:e,...t}){return h.jsx(wu,{"data-slot":"command",className:me("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function ufe({title:e="Command Palette",description:t="Search for a command to run...",children:n,className:r,showCloseButton:a=!0,...s}){return h.jsxs(e0,{...s,children:[h.jsxs(Pf,{className:"sr-only",children:[h.jsx(n0,{children:e}),h.jsx(VR,{children:t})]}),h.jsx(t0,{className:me("overflow-hidden p-0",r),showCloseButton:a,children:h.jsx(V3,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:n})})]})}function iL({className:e,...t}){return h.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[h.jsx(Nf,{className:"size-4 shrink-0 opacity-50"}),h.jsx(wu.Input,{"data-slot":"command-input",className:me("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function oL({className:e,...t}){return h.jsx(wu.List,{"data-slot":"command-list",className:me("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function lL({...e}){return h.jsx(wu.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function dp({className:e,...t}){return h.jsx(wu.Group,{"data-slot":"command-group",className:me("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function Q7({className:e,...t}){return h.jsx(wu.Separator,{"data-slot":"command-separator",className:me("bg-border -mx-1 h-px",e),...t})}function fp({className:e,...t}){return h.jsx(wu.Item,{"data-slot":"command-item",className:me("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}const cfe=e=>h.jsx(e0,{...e}),dfe=e=>h.jsx(EQ,{...e}),ffe=({className:e,children:t,title:n="Model Selector",...r})=>h.jsxs(t0,{className:me("p-0",e),...r,children:[h.jsx(n0,{className:"sr-only",children:n}),h.jsx(V3,{className:"**:data-[slot=command-input-wrapper]:h-auto",children:t})]}),hfe=({className:e,...t})=>h.jsx(iL,{className:me("h-auto py-3.5",e),...t}),mfe=e=>h.jsx(oL,{...e}),pfe=e=>h.jsx(lL,{...e}),gfe=e=>h.jsx(dp,{...e}),bfe=e=>h.jsx(fp,{...e}),xfe=({className:e,...t})=>h.jsx("span",{className:me("flex-1 truncate text-left",e),...t});function G3({...e}){return h.jsx(dX,{"data-slot":"dropdown-menu",...e})}function Y3({...e}){return h.jsx(fX,{"data-slot":"dropdown-menu-trigger",...e})}function W3({className:e,sideOffset:t=4,...n}){return h.jsx(hX,{children:h.jsx(mX,{"data-slot":"dropdown-menu-content",sideOffset:t,className:me("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function Qp({className:e,inset:t,variant:n="default",...r}){return h.jsx(pX,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:me("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function uL({className:e,...t}){return h.jsx(gX,{"data-slot":"dropdown-menu-separator",className:me("bg-border -mx-1 my-1 h-px",e),...t})}function cL({className:e,type:t,...n}){return h.jsx("input",{type:t,"data-slot":"input",className:me("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function yfe({className:e,...t}){return h.jsx("textarea",{"data-slot":"textarea",className:me("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}function vfe({className:e,...t}){return h.jsx("div",{"data-slot":"input-group",role:"group",className:me("group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-2","has-[>[data-align=inline-end]]:[&>input]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] max-sm:has-[[data-slot=input-group-control]:focus-visible]:ring-0 max-sm:has-[[data-slot=input-group-control]:focus-visible]:border-input","has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",e),...t})}const wfe=du("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5","block-end":"order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"}},defaultVariants:{align:"inline-start"}});function Tfe({className:e,align:t="inline-start",...n}){return h.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:me(wfe({align:t}),e),onClick:r=>{r.target.closest("button")||r.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}const Efe=du("text-sm shadow-none flex gap-2 items-center",{variants:{size:{xs:"h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",sm:"h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function dL({className:e,type:t="button",variant:n="ghost",size:r="xs",...a}){return h.jsx(Bt,{type:t,"data-size":r,variant:n,className:me(Efe({size:r}),e),...a})}function Sfe({className:e,...t}){return h.jsx(yfe,{"data-slot":"input-group-control",className:me("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",e),...t})}const Ox={maxSizeBytes:5*1024*1024,allowedTypes:["image/png","image/jpeg","image/gif","image/webp","image/heic","image/heif"]},Lx={maxSizeBytes:40*1024*1024,allowedTypes:["video/mp4","video/webm","video/quicktime"]},lv={maxCount:9},Cfe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let fL=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=Cfe[n[e]&63];return t};const X3=x.createContext(null),hL=x.createContext(null),kfe=()=>{const e=x.useContext(X3);if(!e)throw new Error("Wrap your component inside <PromptInputProvider> to use usePromptInputController().");return e},mL=()=>x.useContext(X3),Afe=()=>x.useContext(hL);function Nfe({initialInput:e="",children:t}){const[n,r]=x.useState(e),a=x.useCallback(()=>r(""),[]),[s,o]=x.useState([]),u=x.useRef(null),c=x.useRef(()=>{}),d=x.useCallback(k=>{const E=Array.from(k);E.length!==0&&o(A=>A.concat(E.map(_=>({id:fL(),type:"file",url:URL.createObjectURL(_),mediaType:_.type,filename:_.name}))))},[]),m=x.useCallback(k=>{o(E=>{const A=E.find(_=>_.id===k);return A?.url&&URL.revokeObjectURL(A.url),E.filter(_=>_.id!==k)})},[]),p=x.useCallback(()=>{o(k=>{for(const E of k)E.url&&URL.revokeObjectURL(E.url);return[]})},[]),b=x.useCallback(()=>{c.current?.()},[]),y=x.useMemo(()=>({files:s,add:d,remove:m,clear:p,openFileDialog:b,fileInputRef:u}),[s,d,m,p,b]),w=x.useCallback((k,E)=>{u.current=k.current,c.current=E},[]),S=x.useMemo(()=>({textInput:{value:n,setInput:r,clear:a},attachments:y,__registerFileInput:w}),[n,a,y,w]);return h.jsx(X3.Provider,{value:S,children:h.jsx(hL.Provider,{value:y,children:t})})}const pL=x.createContext(null),Kf=()=>{const e=Afe(),t=x.useContext(pL),n=e??t;if(!n)throw new Error("usePromptInputAttachments must be used within a PromptInput or PromptInputProvider");return n};function _fe({data:e,className:t,...n}){const r=Kf(),a=e.filename||"",s=e.mediaType?.startsWith("image/")&&e.url,o=e.mediaType?.startsWith("video/")&&e.url,u=a||(s?"Image":o?"Video":"Attachment"),c=s?"Image":o?"Video":void 0,d=B1(o?e.url:void 0);return s?h.jsxs("div",{className:me("group relative",t),...n,children:[h.jsx("img",{alt:a||"uploaded image",className:"h-14 w-14 rounded-lg border border-border/50 object-cover",src:e.url}),c&&h.jsx("span",{className:"pointer-events-none absolute bottom-1 right-1 rounded bg-black/70 px-1.5 py-0.5 text-[9px] font-semibold leading-none text-white shadow-sm",children:c}),h.jsxs(Bt,{"aria-label":"Remove attachment",className:"hover-reveal absolute -right-1.5 -top-1.5 size-5 cursor-pointer rounded-full bg-background p-0 opacity-0 shadow-sm transition-opacity group-hover:opacity-100 [&>svg]:size-3",onClick:m=>{m.stopPropagation(),r.remove(e.id)},type:"button",variant:"outline",children:[h.jsx(rs,{}),h.jsx("span",{className:"sr-only",children:"Remove"})]})]},e.id):o?h.jsxs("div",{className:me("group relative",t),...n,children:[h.jsx("video",{className:"h-14 w-14 rounded-lg border border-border/50 object-cover",poster:d??void 0,preload:"metadata",src:e.url,muted:!0,playsInline:!0}),c&&h.jsx("span",{className:"pointer-events-none absolute bottom-1 right-1 rounded bg-black/70 px-1.5 py-0.5 text-[9px] font-semibold leading-none text-white shadow-sm",children:c}),h.jsxs(Bt,{"aria-label":"Remove attachment",className:"hover-reveal absolute -right-1.5 -top-1.5 size-5 cursor-pointer rounded-full bg-background p-0 opacity-0 shadow-sm transition-opacity group-hover:opacity-100 [&>svg]:size-3",onClick:m=>{m.stopPropagation(),r.remove(e.id)},type:"button",variant:"outline",children:[h.jsx(rs,{}),h.jsx("span",{className:"sr-only",children:"Remove"})]})]},e.id):h.jsxs(jfe,{children:[h.jsx(_R,{asChild:!0,children:h.jsxs("div",{className:me("group relative flex h-8 cursor-default select-none items-center gap-1.5 rounded-md border border-border px-1.5 font-medium text-sm transition-all hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",t),...n,children:[h.jsxs("div",{className:"relative size-5 shrink-0",children:[h.jsx("div",{className:"absolute inset-0 flex size-5 items-center justify-center overflow-hidden rounded bg-background transition-opacity group-hover:opacity-0",children:h.jsx("div",{className:"flex size-5 items-center justify-center text-muted-foreground",children:h.jsx(m1,{className:"size-3"})})}),h.jsxs(Bt,{"aria-label":"Remove attachment",className:"hover-reveal absolute inset-0 size-5 cursor-pointer rounded p-0 opacity-0 transition-opacity group-hover:pointer-events-auto group-hover:opacity-100 [&>svg]:size-2.5",onClick:m=>{m.stopPropagation(),r.remove(e.id)},type:"button",variant:"ghost",children:[h.jsx(rs,{}),h.jsx("span",{className:"sr-only",children:"Remove"})]})]}),h.jsx("span",{className:"flex-1 truncate",children:u})]},e.id)}),h.jsx(zfe,{className:"w-auto p-2",children:h.jsx("div",{className:"w-auto space-y-3",children:h.jsx("div",{className:"flex items-center gap-2.5",children:h.jsxs("div",{className:"min-w-0 flex-1 space-y-1 px-0.5",children:[h.jsx("h4",{className:"truncate font-semibold text-sm leading-none",children:u}),e.mediaType&&h.jsx("p",{className:"truncate font-mono text-muted-foreground text-xs",children:e.mediaType})]})})})})]})}function Rfe({children:e,className:t,...n}){const r=Kf();return r.files.length?h.jsx("div",{className:me("flex flex-wrap items-start gap-2 p-3 w-full",t),...n,children:r.files.map(a=>h.jsx(x.Fragment,{children:e(a)},a.id))}):null}const Mfe=({className:e,accept:t,multiple:n,globalDrop:r,syncHiddenInput:a,maxFiles:s,maxFileSize:o,onError:u,onSubmit:c,children:d,...m})=>{const p=mL(),b=!!p,y=x.useRef(null),w=x.useRef(null),[S,k]=x.useState([]),E=b?p.attachments.files:S,A=x.useCallback(()=>{y.current?.click()},[]),_=x.useCallback(K=>!t||t.trim()===""?!0:t.includes("image/*")?K.type.startsWith("image/"):!0,[t]),I=x.useCallback(K=>{const Z=K.type.startsWith("image/"),re=K.type.startsWith("video/");if(Z){if(!Ox.allowedTypes.includes(K.type))return{valid:!1,error:`Unsupported image type: ${K.type}`};if(K.size>Ox.maxSizeBytes)return{valid:!1,error:`Image too large: ${(K.size/1024/1024).toFixed(1)}MB (max ${Ox.maxSizeBytes/1024/1024}MB)`}}else if(re){if(!Lx.allowedTypes.includes(K.type))return{valid:!1,error:`Unsupported video type: ${K.type}`};if(K.size>Lx.maxSizeBytes)return{valid:!1,error:`Video too large: ${(K.size/1024/1024).toFixed(1)}MB (max ${Lx.maxSizeBytes/1024/1024}MB)`}}return{valid:!0}},[]),P=x.useCallback(K=>{const Z=Array.from(K),re=Z.filter(G=>_(G));if(Z.length&&re.length===0)return u?.({code:"accept",message:"No files match the accepted types."}),[];const j=[];let H=null;for(const G of re){const L=I(G);L.valid?j.push(G):H||(H=L.error??"File validation failed")}if(H&&j.length<re.length){const G=re.length-j.length,L=G>1?`${G} files failed validation. First error: ${H}`:H;u?.({code:"max_file_size",message:L})}if(j.length===0)return[];if(o){const G=j.filter(L=>L.size<=o);return G.length===0?(u?.({code:"max_file_size",message:"All files exceed the maximum size."}),[]):G}return j},[_,I,o,u]),O=x.useCallback(K=>{const Z=P(K);Z.length!==0&&k(re=>{const j=s??lv.maxCount,H=Math.max(0,j-re.length),G=Z.slice(0,H);Z.length>H&&u?.({code:"max_files",message:`Too many files. Maximum ${j} files allowed.`});const L=[];for(const ae of G)L.push({id:fL(),type:"file",url:URL.createObjectURL(ae),mediaType:ae.type,filename:ae.name});return re.concat(L)})},[P,s,u]),R=x.useCallback(K=>{const Z=P(K);if(Z.length===0)return;const re=p?.attachments.files.length??0,j=s??lv.maxCount,H=Math.max(0,j-re),G=Z.slice(0,H);Z.length>H&&u?.({code:"max_files",message:`Too many files. Maximum ${j} files allowed.`}),G.length>0&&p?.attachments.add(G)},[p,s,u,P]),z=b?R:O,F=b?K=>p.attachments.remove(K):K=>k(Z=>{const re=Z.find(j=>j.id===K);return re?.url&&URL.revokeObjectURL(re.url),Z.filter(j=>j.id!==K)}),U=b?()=>p.attachments.clear():()=>k(K=>{for(const Z of K)Z.url&&URL.revokeObjectURL(Z.url);return[]}),X=b?()=>p.attachments.openFileDialog():A;x.useEffect(()=>{b&&p.__registerFileInput(y,()=>y.current?.click())},[b,p]),x.useEffect(()=>{a&&y.current&&E.length===0&&(y.current.value="")},[E,a]),x.useEffect(()=>{const K=w.current;if(!K)return;const Z=j=>{j.dataTransfer?.types?.includes("Files")&&j.preventDefault()},re=j=>{j.dataTransfer?.types?.includes("Files")&&j.preventDefault(),j.dataTransfer?.files&&j.dataTransfer.files.length>0&&z(j.dataTransfer.files)};return K.addEventListener("dragover",Z),K.addEventListener("drop",re),()=>{K.removeEventListener("dragover",Z),K.removeEventListener("drop",re)}},[z]),x.useEffect(()=>{if(!r)return;const K=re=>{re.dataTransfer?.types?.includes("Files")&&re.preventDefault()},Z=re=>{re.dataTransfer?.types?.includes("Files")&&re.preventDefault(),re.dataTransfer?.files&&re.dataTransfer.files.length>0&&z(re.dataTransfer.files)};return document.addEventListener("dragover",K),document.addEventListener("drop",Z),()=>{document.removeEventListener("dragover",K),document.removeEventListener("drop",Z)}},[z,r]),x.useEffect(()=>()=>{if(!b)for(const K of E)K.url&&URL.revokeObjectURL(K.url)},[b,E]);const W=K=>{K.currentTarget.files&&z(K.currentTarget.files)},le=async K=>{const re=await(await fetch(K)).blob();return new Promise((j,H)=>{const G=new FileReader;G.onloadend=()=>j(G.result),G.onerror=H,G.readAsDataURL(re)})},se=x.useMemo(()=>({files:E.map(K=>({...K,id:K.id})),add:z,remove:F,clear:U,openFileDialog:X,fileInputRef:y}),[E,z,F,U,X]),ie=K=>{K.preventDefault();const Z=K.currentTarget,re=b?p.textInput.value:new FormData(Z).get("message")||"";b||Z.reset(),Promise.all(E.map(async({id:j,...H})=>H.url&&H.url.startsWith("blob:")?{...H,url:await le(H.url)}:H)).then(j=>{try{const H=c({text:re,files:j},K);H instanceof Promise?H.then(()=>{U(),b&&p.textInput.clear()}).catch(()=>{}):(U(),b&&p.textInput.clear())}catch{}}).catch(j=>{console.error("[PromptInput] Failed to convert files:",j),u?.({code:"max_file_size",message:"Failed to process file. Please try a smaller file."})})},$=h.jsxs(h.Fragment,{children:[h.jsx("input",{accept:t,"aria-label":"Upload files",className:"hidden",multiple:n,onChange:W,ref:y,title:"Upload files",type:"file"}),h.jsx("form",{className:me("w-full",e),autoComplete:"off",onSubmit:ie,ref:w,...m,children:h.jsx(vfe,{className:"overflow-visible",children:d})})]});return b?$:h.jsx(pL.Provider,{value:se,children:$})},Dfe=({className:e,...t})=>h.jsx("div",{className:me("contents",e),...t}),Ife=x.forwardRef(({onChange:e,onKeyDown:t,onPaste:n,className:r,placeholder:a="What would you like to know?",...s},o)=>{const u=mL(),c=Kf(),[d,m]=x.useState(!1),p=w=>{if(t?.(w),!w.defaultPrevented){if(w.key==="Enter"){if(d||w.nativeEvent.isComposing||w.shiftKey)return;w.preventDefault();const S=w.currentTarget.form;if(S?.querySelector('button[type="submit"]')?.disabled)return;S?.requestSubmit()}if(w.key==="Backspace"&&w.currentTarget.value===""&&c.files.length>0){w.preventDefault();const S=c.files.at(-1);S&&c.remove(S.id)}}},b=w=>{if(n?.(w),w.defaultPrevented)return;const S=w.clipboardData?.items;if(!S)return;const k=[];for(const E of S)if(E.kind==="file"){const A=E.getAsFile();A&&k.push(A)}k.length>0&&(w.preventDefault(),c.add(k))},y=u?{value:u.textInput.value,onChange:w=>{u.textInput.setInput(w.currentTarget.value),e?.(w)}}:{onChange:e};return h.jsx(Sfe,{ref:o,className:me("field-sizing-content max-h-48 min-h-16",r),autoComplete:"off",name:"message",onBlur:()=>m(!1),onCompositionEnd:()=>m(!1),onCompositionStart:()=>m(!0),onKeyDown:p,onPaste:b,placeholder:a,...s,...y})}),Ofe=({className:e,...t})=>h.jsx(Tfe,{align:"block-end",className:me("justify-between gap-1",e),...t}),Lfe=({className:e,...t})=>h.jsx("div",{className:me("flex items-center gap-1",e),...t}),Pfe=({variant:e="ghost",className:t,size:n,...r})=>{const a=n??(x.Children.count(r.children)>1?"sm":"icon-sm");return h.jsx(dL,{className:me(t),size:a,type:"button",variant:e,...r})},Z7=({className:e,variant:t="default",size:n="icon-sm",status:r,children:a,...s})=>{let o=h.jsx(n$,{className:"size-4"});return r==="submitted"?o=h.jsx(ma,{className:"size-4 animate-spin"}):r==="streaming"?o=h.jsx(Rd,{className:"size-4"}):r==="error"&&(o=h.jsx(rs,{className:"size-4"})),h.jsx(dL,{"aria-label":"Submit",className:me(e),size:n,type:"submit",variant:t,...s,children:a??o})},jfe=({openDelay:e=0,closeDelay:t=0,...n})=>h.jsx(NR,{closeDelay:t,openDelay:e,...n}),zfe=({align:e="start",...t})=>h.jsx(RR,{align:e,...t}),K3=x.createContext({});function Q3(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const gL=typeof window<"u",bL=gL?x.useLayoutEffect:x.useEffect,ug=x.createContext(null);function Z3(e,t){e.indexOf(t)===-1&&e.push(t)}function J3(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const vi=(e,t,n)=>n>t?t:n<e?e:n;let e6=()=>{};const uo={},xL=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function yL(e){return typeof e=="object"&&e!==null}const vL=e=>/^0[^.\s]+$/u.test(e);function t6(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ns=e=>e,Bfe=(e,t)=>n=>t(e(n)),Qf=(...e)=>e.reduce(Bfe),ff=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class n6{constructor(){this.subscriptions=[]}add(t){return Z3(this.subscriptions,t),()=>J3(this.subscriptions,t)}notify(t,n,r){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,n,r);else for(let s=0;s<a;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const no=e=>e*1e3,Ss=e=>e/1e3;function wL(e,t){return t?e*(1e3/t):0}const TL=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ffe=1e-7,Hfe=12;function Ufe(e,t,n,r,a){let s,o,u=0;do o=t+(n-t)/2,s=TL(o,r,a)-e,s>0?n=o:t=o;while(Math.abs(s)>Ffe&&++u<Hfe);return o}function Zf(e,t,n,r){if(e===t&&n===r)return Ns;const a=s=>Ufe(s,0,1,e,n);return s=>s===0||s===1?s:TL(a(s),t,r)}const EL=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,SL=e=>t=>1-e(1-t),CL=Zf(.33,1.53,.69,.99),r6=SL(CL),kL=EL(r6),AL=e=>(e*=2)<1?.5*r6(e):.5*(2-Math.pow(2,-10*(e-1))),a6=e=>1-Math.sin(Math.acos(e)),NL=SL(a6),_L=EL(a6),$fe=Zf(.42,0,1,1),qfe=Zf(0,0,.58,1),RL=Zf(.42,0,.58,1),Vfe=e=>Array.isArray(e)&&typeof e[0]!="number",ML=e=>Array.isArray(e)&&typeof e[0]=="number",Gfe={linear:Ns,easeIn:$fe,easeInOut:RL,easeOut:qfe,circIn:a6,circInOut:_L,circOut:NL,backIn:r6,backInOut:kL,backOut:CL,anticipate:AL},Yfe=e=>typeof e=="string",J7=e=>{if(ML(e)){e6(e.length===4);const[t,n,r,a]=e;return Zf(t,n,r,a)}else if(Yfe(e))return Gfe[e];return e},Gm=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Wfe(e,t){let n=new Set,r=new Set,a=!1,s=!1;const o=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function c(m){o.has(m)&&(d.schedule(m),e()),m(u)}const d={schedule:(m,p=!1,b=!1)=>{const w=b&&a?n:r;return p&&o.add(m),w.has(m)||w.add(m),m},cancel:m=>{r.delete(m),o.delete(m)},process:m=>{if(u=m,a){s=!0;return}a=!0,[n,r]=[r,n],n.forEach(c),n.clear(),a=!1,s&&(s=!1,d.process(m))}};return d}const Xfe=40;function DL(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Gm.reduce((_,I)=>(_[I]=Wfe(s),_),{}),{setup:u,read:c,resolveKeyframes:d,preUpdate:m,update:p,preRender:b,render:y,postRender:w}=o,S=()=>{const _=uo.useManualTiming?a.timestamp:performance.now();n=!1,uo.useManualTiming||(a.delta=r?1e3/60:Math.max(Math.min(_-a.timestamp,Xfe),1)),a.timestamp=_,a.isProcessing=!0,u.process(a),c.process(a),d.process(a),m.process(a),p.process(a),b.process(a),y.process(a),w.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(S))},k=()=>{n=!0,r=!0,a.isProcessing||e(S)};return{schedule:Gm.reduce((_,I)=>{const P=o[I];return _[I]=(O,R=!1,z=!1)=>(n||k(),P.schedule(O,R,z)),_},{}),cancel:_=>{for(let I=0;I<Gm.length;I++)o[Gm[I]].cancel(_)},state:a,steps:o}}const{schedule:Kn,cancel:dl,state:Wr,steps:Px}=DL(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ns,!0);let hp;function Kfe(){hp=void 0}const xa={now:()=>(hp===void 0&&xa.set(Wr.isProcessing||uo.useManualTiming?Wr.timestamp:performance.now()),hp),set:e=>{hp=e,queueMicrotask(Kfe)}},IL=e=>t=>typeof t=="string"&&t.startsWith(e),OL=IL("--"),Qfe=IL("var(--"),s6=e=>Qfe(e)?Zfe.test(e.split("/*")[0].trim()):!1,Zfe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function eC(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const f0={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},hf={...f0,transform:e=>vi(0,1,e)},Ym={...f0,default:1},qd=e=>Math.round(e*1e5)/1e5,i6=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Jfe(e){return e==null}const ehe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,o6=(e,t)=>n=>!!(typeof n=="string"&&ehe.test(n)&&n.startsWith(e)||t&&!Jfe(n)&&Object.prototype.hasOwnProperty.call(n,t)),LL=(e,t,n)=>r=>{if(typeof r!="string")return r;const[a,s,o,u]=r.match(i6);return{[e]:parseFloat(a),[t]:parseFloat(s),[n]:parseFloat(o),alpha:u!==void 0?parseFloat(u):1}},the=e=>vi(0,255,e),jx={...f0,transform:e=>Math.round(the(e))},Xl={test:o6("rgb","red"),parse:LL("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+jx.transform(e)+", "+jx.transform(t)+", "+jx.transform(n)+", "+qd(hf.transform(r))+")"};function nhe(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}}const uv={test:o6("#"),parse:nhe,transform:Xl.transform},Jf=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Xo=Jf("deg"),bi=Jf("%"),bt=Jf("px"),rhe=Jf("vh"),ahe=Jf("vw"),tC={...bi,parse:e=>bi.parse(e)/100,transform:e=>bi.transform(e*100)},xc={test:o6("hsl","hue"),parse:LL("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+bi.transform(qd(t))+", "+bi.transform(qd(n))+", "+qd(hf.transform(r))+")"},Cr={test:e=>Xl.test(e)||uv.test(e)||xc.test(e),parse:e=>Xl.test(e)?Xl.parse(e):xc.test(e)?xc.parse(e):uv.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Xl.transform(e):xc.transform(e),getAnimatableNone:e=>{const t=Cr.parse(e);return t.alpha=0,Cr.transform(t)}},she=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ihe(e){return isNaN(e)&&typeof e=="string"&&(e.match(i6)?.length||0)+(e.match(she)?.length||0)>0}const PL="number",jL="color",ohe="var",lhe="var(",nC="${}",uhe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function mf(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let s=0;const u=t.replace(uhe,c=>(Cr.test(c)?(r.color.push(s),a.push(jL),n.push(Cr.parse(c))):c.startsWith(lhe)?(r.var.push(s),a.push(ohe),n.push(c)):(r.number.push(s),a.push(PL),n.push(parseFloat(c))),++s,nC)).split(nC);return{values:n,split:u,indexes:r,types:a}}function zL(e){return mf(e).values}function BL(e){const{split:t,types:n}=mf(e),r=t.length;return a=>{let s="";for(let o=0;o<r;o++)if(s+=t[o],a[o]!==void 0){const u=n[o];u===PL?s+=qd(a[o]):u===jL?s+=Cr.transform(a[o]):s+=a[o]}return s}}const che=e=>typeof e=="number"?0:Cr.test(e)?Cr.getAnimatableNone(e):e;function dhe(e){const t=zL(e);return BL(e)(t.map(che))}const fl={test:ihe,parse:zL,createTransformer:BL,getAnimatableNone:dhe};function zx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function fhe({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let a=0,s=0,o=0;if(!t)a=s=o=n;else{const u=n<.5?n*(1+t):n+t-n*t,c=2*n-u;a=zx(c,u,e+1/3),s=zx(c,u,e),o=zx(c,u,e-1/3)}return{red:Math.round(a*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Zp(e,t){return n=>n>0?t:e}const or=(e,t,n)=>e+(t-e)*n,Bx=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},hhe=[uv,Xl,xc],mhe=e=>hhe.find(t=>t.test(e));function rC(e){const t=mhe(e);if(!t)return!1;let n=t.parse(e);return t===xc&&(n=fhe(n)),n}const aC=(e,t)=>{const n=rC(e),r=rC(t);if(!n||!r)return Zp(e,t);const a={...n};return s=>(a.red=Bx(n.red,r.red,s),a.green=Bx(n.green,r.green,s),a.blue=Bx(n.blue,r.blue,s),a.alpha=or(n.alpha,r.alpha,s),Xl.transform(a))},cv=new Set(["none","hidden"]);function phe(e,t){return cv.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ghe(e,t){return n=>or(e,t,n)}function l6(e){return typeof e=="number"?ghe:typeof e=="string"?s6(e)?Zp:Cr.test(e)?aC:yhe:Array.isArray(e)?FL:typeof e=="object"?Cr.test(e)?aC:bhe:Zp}function FL(e,t){const n=[...e],r=n.length,a=e.map((s,o)=>l6(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=a[o](s);return n}}function bhe(e,t){const n={...e,...t},r={};for(const a in n)e[a]!==void 0&&t[a]!==void 0&&(r[a]=l6(e[a])(e[a],t[a]));return a=>{for(const s in r)n[s]=r[s](a);return n}}function xhe(e,t){const n=[],r={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const s=t.types[a],o=e.indexes[s][r[s]],u=e.values[o]??0;n[a]=u,r[s]++}return n}const yhe=(e,t)=>{const n=fl.createTransformer(t),r=mf(e),a=mf(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?cv.has(e)&&!a.values.length||cv.has(t)&&!r.values.length?phe(e,t):Qf(FL(xhe(r,a),a.values),n):Zp(e,t)};function HL(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?or(e,t,n):l6(e)(e,t)}const vhe=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Kn.update(t,n),stop:()=>dl(t),now:()=>Wr.isProcessing?Wr.timestamp:xa.now()}},UL=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let s=0;s<a;s++)r+=Math.round(e(s/(a-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Jp=2e4;function u6(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Jp;)t+=n,r=e.next(t);return t>=Jp?1/0:t}function whe(e,t=100,n){const r=n({...e,keyframes:[0,t]}),a=Math.min(u6(r),Jp);return{type:"keyframes",ease:s=>r.next(a*s).value/t,duration:Ss(a)}}const The=5;function $L(e,t,n){const r=Math.max(t-The,0);return wL(n-e(r),t-r)}const fr={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Fx=.001;function Ehe({duration:e=fr.duration,bounce:t=fr.bounce,velocity:n=fr.velocity,mass:r=fr.mass}){let a,s,o=1-t;o=vi(fr.minDamping,fr.maxDamping,o),e=vi(fr.minDuration,fr.maxDuration,Ss(e)),o<1?(a=d=>{const m=d*o,p=m*e,b=m-n,y=dv(d,o),w=Math.exp(-p);return Fx-b/y*w},s=d=>{const p=d*o*e,b=p*n+n,y=Math.pow(o,2)*Math.pow(d,2)*e,w=Math.exp(-p),S=dv(Math.pow(d,2),o);return(-a(d)+Fx>0?-1:1)*((b-y)*w)/S}):(a=d=>{const m=Math.exp(-d*e),p=(d-n)*e+1;return-Fx+m*p},s=d=>{const m=Math.exp(-d*e),p=(n-d)*(e*e);return m*p});const u=5/e,c=Che(a,s,u);if(e=no(e),isNaN(c))return{stiffness:fr.stiffness,damping:fr.damping,duration:e};{const d=Math.pow(c,2)*r;return{stiffness:d,damping:o*2*Math.sqrt(r*d),duration:e}}}const She=12;function Che(e,t,n){let r=n;for(let a=1;a<She;a++)r=r-e(r)/t(r);return r}function dv(e,t){return e*Math.sqrt(1-t*t)}const khe=["duration","bounce"],Ahe=["stiffness","damping","mass"];function sC(e,t){return t.some(n=>e[n]!==void 0)}function Nhe(e){let t={velocity:fr.velocity,stiffness:fr.stiffness,damping:fr.damping,mass:fr.mass,isResolvedFromDuration:!1,...e};if(!sC(e,Ahe)&&sC(e,khe))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),a=r*r,s=2*vi(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:fr.mass,stiffness:a,damping:s}}else{const n=Ehe(e);t={...t,...n,mass:fr.mass},t.isResolvedFromDuration=!0}return t}function e1(e=fr.visualDuration,t=fr.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],u={done:!1,value:s},{stiffness:c,damping:d,mass:m,duration:p,velocity:b,isResolvedFromDuration:y}=Nhe({...n,velocity:-Ss(n.velocity||0)}),w=b||0,S=d/(2*Math.sqrt(c*m)),k=o-s,E=Ss(Math.sqrt(c/m)),A=Math.abs(k)<5;r||(r=A?fr.restSpeed.granular:fr.restSpeed.default),a||(a=A?fr.restDelta.granular:fr.restDelta.default);let _;if(S<1){const P=dv(E,S);_=O=>{const R=Math.exp(-S*E*O);return o-R*((w+S*E*k)/P*Math.sin(P*O)+k*Math.cos(P*O))}}else if(S===1)_=P=>o-Math.exp(-E*P)*(k+(w+E*k)*P);else{const P=E*Math.sqrt(S*S-1);_=O=>{const R=Math.exp(-S*E*O),z=Math.min(P*O,300);return o-R*((w+S*E*k)*Math.sinh(z)+P*k*Math.cosh(z))/P}}const I={calculatedDuration:y&&p||null,next:P=>{const O=_(P);if(y)u.done=P>=p;else{let R=P===0?w:0;S<1&&(R=P===0?no(w):$L(_,P,O));const z=Math.abs(R)<=r,F=Math.abs(o-O)<=a;u.done=z&&F}return u.value=u.done?o:O,u},toString:()=>{const P=Math.min(u6(I),Jp),O=UL(R=>I.next(P*R).value,P,30);return P+"ms "+O},toTransition:()=>{}};return I}e1.applyToOptions=e=>{const t=whe(e,100,e1);return e.ease=t.ease,e.duration=no(t.duration),e.type="keyframes",e};function fv({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:s=500,modifyTarget:o,min:u,max:c,restDelta:d=.5,restSpeed:m}){const p=e[0],b={done:!1,value:p},y=z=>u!==void 0&&z<u||c!==void 0&&z>c,w=z=>u===void 0?c:c===void 0||Math.abs(u-z)<Math.abs(c-z)?u:c;let S=n*t;const k=p+S,E=o===void 0?k:o(k);E!==k&&(S=E-p);const A=z=>-S*Math.exp(-z/r),_=z=>E+A(z),I=z=>{const F=A(z),U=_(z);b.done=Math.abs(F)<=d,b.value=b.done?E:U};let P,O;const R=z=>{y(b.value)&&(P=z,O=e1({keyframes:[b.value,w(b.value)],velocity:$L(_,z,b.value),damping:a,stiffness:s,restDelta:d,restSpeed:m}))};return R(0),{calculatedDuration:null,next:z=>{let F=!1;return!O&&P===void 0&&(F=!0,I(z),R(z)),P!==void 0&&z>=P?O.next(z-P):(!F&&I(z),b)}}}function _he(e,t,n){const r=[],a=n||uo.mix||HL,s=e.length-1;for(let o=0;o<s;o++){let u=a(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||Ns:t;u=Qf(c,u)}r.push(u)}return r}function Rhe(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const s=e.length;if(e6(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=_he(t,r,a),c=u.length,d=m=>{if(o&&m<e[0])return t[0];let p=0;if(c>1)for(;p<e.length-2&&!(m<e[p+1]);p++);const b=ff(e[p],e[p+1],m);return u[p](b)};return n?m=>d(vi(e[0],e[s-1],m)):d}function Mhe(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=ff(0,t,r);e.push(or(n,1,a))}}function Dhe(e){const t=[0];return Mhe(t,e.length-1),t}function Ihe(e,t){return e.map(n=>n*t)}function Ohe(e,t){return e.map(()=>t||RL).splice(0,e.length-1)}function Vd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=Vfe(r)?r.map(J7):J7(r),s={done:!1,value:t[0]},o=Ihe(n&&n.length===t.length?n:Dhe(t),e),u=Rhe(o,t,{ease:Array.isArray(a)?a:Ohe(t,a)});return{calculatedDuration:e,next:c=>(s.value=u(c),s.done=c>=e,s)}}const Lhe=e=>e!==null;function c6(e,{repeat:t,repeatType:n="loop"},r,a=1){const s=e.filter(Lhe),u=a<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!u||r===void 0?s[u]:r}const Phe={decay:fv,inertia:fv,tween:Vd,keyframes:Vd,spring:e1};function qL(e){typeof e.type=="string"&&(e.type=Phe[e.type])}class d6{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const jhe=e=>e/100;class f6 extends d6{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==xa.now()&&this.tick(xa.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;qL(t);const{type:n=Vd,repeat:r=0,repeatDelay:a=0,repeatType:s,velocity:o=0}=t;let{keyframes:u}=t;const c=n||Vd;c!==Vd&&typeof u[0]!="number"&&(this.mixKeyframes=Qf(jhe,HL(u[0],u[1])),u=[0,100]);const d=c({...t,keyframes:u});s==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...u].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=u6(d));const{calculatedDuration:m}=d;this.calculatedDuration=m,this.resolvedDuration=m+a,this.totalDuration=this.resolvedDuration*(r+1)-a,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:a,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:u,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:d=0,keyframes:m,repeat:p,repeatType:b,repeatDelay:y,type:w,onUpdate:S,finalKeyframe:k}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const E=this.currentTime-d*(this.playbackSpeed>=0?1:-1),A=this.playbackSpeed>=0?E<0:E>a;this.currentTime=Math.max(E,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let _=this.currentTime,I=r;if(p){const z=Math.min(this.currentTime,a)/u;let F=Math.floor(z),U=z%1;!U&&z>=1&&(U=1),U===1&&F--,F=Math.min(F,p+1),F%2&&(b==="reverse"?(U=1-U,y&&(U-=y/u)):b==="mirror"&&(I=o)),_=vi(0,1,U)*u}const P=A?{done:!1,value:m[0]}:I.next(_);s&&(P.value=s(P.value));let{done:O}=P;!A&&c!==null&&(O=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&O);return R&&w!==fv&&(P.value=c6(m,this.options,k,this.speed)),S&&S(P.value),R&&this.finish(),P}then(t,n){return this.finished.then(t,n)}get duration(){return Ss(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ss(t)}get time(){return Ss(this.currentTime)}set time(t){t=no(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(xa.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ss(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=vhe,startTime:n}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(xa.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function zhe(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Kl=e=>e*180/Math.PI,hv=e=>{const t=Kl(Math.atan2(e[1],e[0]));return mv(t)},Bhe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:hv,rotateZ:hv,skewX:e=>Kl(Math.atan(e[1])),skewY:e=>Kl(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},mv=e=>(e=e%360,e<0&&(e+=360),e),iC=hv,oC=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),lC=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Fhe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:oC,scaleY:lC,scale:e=>(oC(e)+lC(e))/2,rotateX:e=>mv(Kl(Math.atan2(e[6],e[5]))),rotateY:e=>mv(Kl(Math.atan2(-e[2],e[0]))),rotateZ:iC,rotate:iC,skewX:e=>Kl(Math.atan(e[4])),skewY:e=>Kl(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function pv(e){return e.includes("scale")?1:0}function gv(e,t){if(!e||e==="none")return pv(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,a;if(n)r=Fhe,a=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Bhe,a=u}if(!a)return pv(t);const s=r[t],o=a[1].split(",").map(Uhe);return typeof s=="function"?s(o):o[s]}const Hhe=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return gv(n,t)};function Uhe(e){return parseFloat(e.trim())}const h0=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],m0=new Set(h0),uC=e=>e===f0||e===bt,$he=new Set(["x","y","z"]),qhe=h0.filter(e=>!$he.has(e));function Vhe(e){const t=[];return qhe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Jo={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>gv(t,"x"),y:(e,{transform:t})=>gv(t,"y")};Jo.translateX=Jo.x;Jo.translateY=Jo.y;const Jl=new Set;let bv=!1,xv=!1,yv=!1;function VL(){if(xv){const e=Array.from(Jl).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const a=Vhe(r);a.length&&(n.set(r,a),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const a=n.get(r);a&&a.forEach(([s,o])=>{r.getValue(s)?.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}xv=!1,bv=!1,Jl.forEach(e=>e.complete(yv)),Jl.clear()}function GL(){Jl.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(xv=!0)})}function Ghe(){yv=!0,GL(),VL(),yv=!1}class h6{constructor(t,n,r,a,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=a,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Jl.add(this),bv||(bv=!0,Kn.read(GL),Kn.resolveKeyframes(VL))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:a}=this;if(t[0]===null){const s=a?.get(),o=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const u=r.readValue(n,o);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=o),a&&s===void 0&&a.set(t[0])}zhe(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Jl.delete(this)}cancel(){this.state==="scheduled"&&(Jl.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Yhe=e=>e.startsWith("--");function Whe(e,t,n){Yhe(t)?e.style.setProperty(t,n):e.style[t]=n}const Xhe=t6(()=>window.ScrollTimeline!==void 0),Khe={};function Qhe(e,t){const n=t6(e);return()=>Khe[t]??n()}const YL=Qhe(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Nd=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,cC={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Nd([0,.65,.55,1]),circOut:Nd([.55,0,1,.45]),backIn:Nd([.31,.01,.66,-.59]),backOut:Nd([.33,1.53,.69,.99])};function WL(e,t){if(e)return typeof e=="function"?YL()?UL(e,t):"ease-out":ML(e)?Nd(e):Array.isArray(e)?e.map(n=>WL(n,t)||cC.easeOut):cC[e]}function Zhe(e,t,n,{delay:r=0,duration:a=300,repeat:s=0,repeatType:o="loop",ease:u="easeOut",times:c}={},d=void 0){const m={[t]:n};c&&(m.offset=c);const p=WL(u,a);Array.isArray(p)&&(m.easing=p);const b={delay:r,duration:a,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return d&&(b.pseudoElement=d),e.animate(m,b)}function XL(e){return typeof e=="function"&&"applyToOptions"in e}function Jhe({type:e,...t}){return XL(e)&&YL()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class eme extends d6{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:a,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:u,onComplete:c}=t;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=t,e6(typeof t.type!="string");const d=Jhe(t);this.animation=Zhe(n,r,a,d,s),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const m=c6(a,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(m):Whe(n,r,m),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Ss(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ss(t)}get time(){return Ss(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=no(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Xhe()?(this.animation.timeline=t,Ns):n(this)}}const KL={anticipate:AL,backInOut:kL,circInOut:_L};function tme(e){return e in KL}function nme(e){typeof e.ease=="string"&&tme(e.ease)&&(e.ease=KL[e.ease])}const Hx=10;class rme extends eme{constructor(t){nme(t),qL(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:a,element:s,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new f6({...o,autoplay:!1}),c=Math.max(Hx,xa.now()-this.startTime),d=vi(0,Hx,c-Hx);n.setWithVelocity(u.sample(Math.max(0,c-d)).value,u.sample(c).value,d),u.stop()}}const dC=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(fl.test(e)||e==="0")&&!e.startsWith("url("));function ame(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function sme(e,t,n,r){const a=e[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],o=dC(a,t),u=dC(s,t);return!o||!u?!1:ame(e)||(n==="spring"||XL(n))&&r}function vv(e){e.duration=0,e.type="keyframes"}const ime=new Set(["opacity","clipPath","filter","transform"]),ome=t6(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function lme(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:a,damping:s,type:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:d}=t.owner.getProps();return ome()&&n&&ime.has(n)&&(n!=="transform"||!d)&&!c&&!r&&a!=="mirror"&&s!==0&&o!=="inertia"}const ume=40;class cme extends d6{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:a=0,repeatDelay:s=0,repeatType:o="loop",keyframes:u,name:c,motionValue:d,element:m,...p}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=xa.now();const b={autoplay:t,delay:n,type:r,repeat:a,repeatDelay:s,repeatType:o,name:c,motionValue:d,element:m,...p},y=m?.KeyframeResolver||h6;this.keyframeResolver=new y(u,(w,S,k)=>this.onKeyframesResolved(w,S,b,!k),c,d,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,a){this.keyframeResolver=void 0;const{name:s,type:o,velocity:u,delay:c,isHandoff:d,onUpdate:m}=r;this.resolvedAt=xa.now(),sme(t,s,o,u)||((uo.instantAnimations||!c)&&m?.(c6(t,r,n)),t[0]=t[t.length-1],vv(r),r.repeat=0);const b={startTime:a?this.resolvedAt?this.resolvedAt-this.createdAt>ume?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},y=!d&&lme(b),w=b.motionValue?.owner?.current,S=y?new rme({...b,element:w}):new f6(b);S.finished.then(()=>{this.notifyFinished()}).catch(Ns),this.pendingTimeline&&(this.stopTimeline=S.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=S}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ghe()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function QL(e,t,n,r=0,a=1){const s=Array.from(e).sort((d,m)=>d.sortNodePosition(m)).indexOf(t),o=e.size,u=(o-1)*r;return typeof n=="function"?n(s,o):a===1?s*r:u-s*r}const dme=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function fme(e){const t=dme.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}function ZL(e,t,n=1){const[r,a]=fme(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return xL(o)?parseFloat(o):o}return s6(a)?ZL(a,t,n+1):a}const hme={type:"spring",stiffness:500,damping:25,restSpeed:10},mme=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),pme={type:"keyframes",duration:.8},gme={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},bme=(e,{keyframes:t})=>t.length>2?pme:m0.has(e)?e.startsWith("scale")?mme(t[1]):hme:gme,xme=e=>e!==null;function yme(e,{repeat:t,repeatType:n="loop"},r){const a=e.filter(xme),s=t&&n!=="loop"&&t%2===1?0:a.length-1;return a[s]}function m6(e,t){return e?.[t]??e?.default??e}function vme({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:a,repeat:s,repeatType:o,repeatDelay:u,from:c,elapsed:d,...m}){return!!Object.keys(m).length}const p6=(e,t,n,r={},a,s)=>o=>{const u=m6(r,e)||{},c=u.delay||r.delay||0;let{elapsed:d=0}=r;d=d-no(c);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-d,onUpdate:b=>{t.set(b),u.onUpdate&&u.onUpdate(b)},onComplete:()=>{o(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:s?void 0:a};vme(u)||Object.assign(m,bme(e,m)),m.duration&&(m.duration=no(m.duration)),m.repeatDelay&&(m.repeatDelay=no(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let p=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(vv(m),m.delay===0&&(p=!0)),(uo.instantAnimations||uo.skipAnimations)&&(p=!0,vv(m),m.delay=0),m.allowFlatten=!u.type&&!u.ease,p&&!s&&t.get()!==void 0){const b=yme(m.keyframes,u);if(b!==void 0){Kn.update(()=>{m.onUpdate(b),m.onComplete()});return}}return u.isSync?new f6(m):new cme(m)};function fC(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function g6(e,t,n,r){if(typeof t=="function"){const[a,s]=fC(r);t=t(n!==void 0?n:e.custom,a,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[a,s]=fC(r);t=t(n!==void 0?n:e.custom,a,s)}return t}function Ic(e,t,n){const r=e.getProps();return g6(r,t,n!==void 0?n:r.custom,e)}const JL=new Set(["width","height","top","left","right","bottom",...h0]),hC=30,wme=e=>!isNaN(parseFloat(e));class Tme{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const a=xa.now();if(this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=xa.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=wme(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new n6);const r=this.events[t].add(n);return t==="change"?()=>{r(),Kn.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=xa.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>hC)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,hC);return wL(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Gc(e,t){return new Tme(e,t)}const wv=e=>Array.isArray(e);function Eme(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Gc(n))}function Sme(e){return wv(e)?e[e.length-1]||0:e}function Cme(e,t){const n=Ic(e,t);let{transitionEnd:r={},transition:a={},...s}=n||{};s={...s,...r};for(const o in s){const u=Sme(s[o]);Eme(e,o,u)}}const ia=e=>!!(e&&e.getVelocity);function kme(e){return!!(ia(e)&&e.add)}function Tv(e,t){const n=e.getValue("willChange");if(kme(n))return n.add(t);if(!n&&uo.WillChange){const r=new uo.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function b6(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Ame="framerAppearId",eP="data-"+b6(Ame);function tP(e){return e.props[eP]}function Nme({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function nP(e,t,{delay:n=0,transitionOverride:r,type:a}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...u}=t;const c=s?.reduceMotion;r&&(s=r);const d=[],m=a&&e.animationState&&e.animationState.getState()[a];for(const p in u){const b=e.getValue(p,e.latestValues[p]??null),y=u[p];if(y===void 0||m&&Nme(m,p))continue;const w={delay:n,...m6(s||{},p)},S=b.get();if(S!==void 0&&!b.isAnimating&&!Array.isArray(y)&&y===S&&!w.velocity)continue;let k=!1;if(window.MotionHandoffAnimation){const _=tP(e);if(_){const I=window.MotionHandoffAnimation(_,p,Kn);I!==null&&(w.startTime=I,k=!0)}}Tv(e,p);const E=c??e.shouldReduceMotion;b.start(p6(p,b,y,E&&JL.has(p)?{type:!1}:w,e,k));const A=b.animation;A&&d.push(A)}return o&&Promise.all(d).then(()=>{Kn.update(()=>{o&&Cme(e,o)})}),d}function Ev(e,t,n={}){const r=Ic(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(a=n.transitionOverride);const s=r?()=>Promise.all(nP(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:m,staggerDirection:p}=a;return _me(e,t,c,d,m,p,n)}:()=>Promise.resolve(),{when:u}=a;if(u){const[c,d]=u==="beforeChildren"?[s,o]:[o,s];return c().then(()=>d())}else return Promise.all([s(),o(n.delay)])}function _me(e,t,n=0,r=0,a=0,s=1,o){const u=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),u.push(Ev(c,t,{...o,delay:n+(typeof r=="function"?0:r)+QL(e.variantChildren,c,r,a,s)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(u)}function Rme(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const a=t.map(s=>Ev(e,s,n));r=Promise.all(a)}else if(typeof t=="string")r=Ev(e,t,n);else{const a=typeof t=="function"?Ic(e,t,n.custom):t;r=Promise.all(nP(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Mme={test:e=>e==="auto",parse:e=>e},rP=e=>t=>t.test(e),aP=[f0,bt,bi,Xo,ahe,rhe,Mme],mC=e=>aP.find(rP(e));function Dme(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||vL(e):!0}const Ime=new Set(["brightness","contrast","saturate","opacity"]);function Ome(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(i6)||[];if(!r)return e;const a=n.replace(r,"");let s=Ime.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+a+")"}const Lme=/\b([a-z-]*)\(.*?\)/gu,Sv={...fl,getAnimatableNone:e=>{const t=e.match(Lme);return t?t.map(Ome).join(" "):e}},pC={...f0,transform:Math.round},Pme={rotate:Xo,rotateX:Xo,rotateY:Xo,rotateZ:Xo,scale:Ym,scaleX:Ym,scaleY:Ym,scaleZ:Ym,skew:Xo,skewX:Xo,skewY:Xo,distance:bt,translateX:bt,translateY:bt,translateZ:bt,x:bt,y:bt,z:bt,perspective:bt,transformPerspective:bt,opacity:hf,originX:tC,originY:tC,originZ:bt},x6={borderWidth:bt,borderTopWidth:bt,borderRightWidth:bt,borderBottomWidth:bt,borderLeftWidth:bt,borderRadius:bt,borderTopLeftRadius:bt,borderTopRightRadius:bt,borderBottomRightRadius:bt,borderBottomLeftRadius:bt,width:bt,maxWidth:bt,height:bt,maxHeight:bt,top:bt,right:bt,bottom:bt,left:bt,inset:bt,insetBlock:bt,insetBlockStart:bt,insetBlockEnd:bt,insetInline:bt,insetInlineStart:bt,insetInlineEnd:bt,padding:bt,paddingTop:bt,paddingRight:bt,paddingBottom:bt,paddingLeft:bt,paddingBlock:bt,paddingBlockStart:bt,paddingBlockEnd:bt,paddingInline:bt,paddingInlineStart:bt,paddingInlineEnd:bt,margin:bt,marginTop:bt,marginRight:bt,marginBottom:bt,marginLeft:bt,marginBlock:bt,marginBlockStart:bt,marginBlockEnd:bt,marginInline:bt,marginInlineStart:bt,marginInlineEnd:bt,fontSize:bt,backgroundPositionX:bt,backgroundPositionY:bt,...Pme,zIndex:pC,fillOpacity:hf,strokeOpacity:hf,numOctaves:pC},jme={...x6,color:Cr,backgroundColor:Cr,outlineColor:Cr,fill:Cr,stroke:Cr,borderColor:Cr,borderTopColor:Cr,borderRightColor:Cr,borderBottomColor:Cr,borderLeftColor:Cr,filter:Sv,WebkitFilter:Sv},sP=e=>jme[e];function iP(e,t){let n=sP(e);return n!==Sv&&(n=fl),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const zme=new Set(["auto","none","0"]);function Bme(e,t,n){let r=0,a;for(;r<e.length&&!a;){const s=e[r];typeof s=="string"&&!zme.has(s)&&mf(s).values.length&&(a=e[r]),r++}if(a&&n)for(const s of t)e[s]=iP(n,a)}class Fme extends h6{constructor(t,n,r,a,s){super(t,n,r,a,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let m=0;m<t.length;m++){let p=t[m];if(typeof p=="string"&&(p=p.trim(),s6(p))){const b=ZL(p,n.current);b!==void 0&&(t[m]=b),m===t.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!JL.has(r)||t.length!==2)return;const[a,s]=t,o=mC(a),u=mC(s),c=eC(a),d=eC(s);if(c!==d&&Jo[r]){this.needsMeasurement=!0;return}if(o!==u)if(uC(o)&&uC(u))for(let m=0;m<t.length;m++){const p=t[m];typeof p=="string"&&(t[m]=parseFloat(p))}else Jo[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let a=0;a<t.length;a++)(t[a]===null||Dme(t[a]))&&r.push(a);r.length&&Bme(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Jo[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const a=n[n.length-1];a!==void 0&&t.getValue(r,a).jump(a,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const a=t.getValue(n);a&&a.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=Jo[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([u,c])=>{t.getValue(u).set(c)}),this.resolveNoneKeyframes()}}function Hme(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const a=n?.[e]??r.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e).filter(r=>r!=null)}const oP=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Cv(e){return yL(e)&&"offsetHeight"in e}const{schedule:y6}=DL(queueMicrotask,!1),js={x:!1,y:!1};function lP(){return js.x||js.y}function Ume(e){return e==="x"||e==="y"?js[e]?null:(js[e]=!0,()=>{js[e]=!1}):js.x||js.y?null:(js.x=js.y=!0,()=>{js.x=js.y=!1})}function uP(e,t){const n=Hme(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[n,a,()=>r.abort()]}function gC(e){return!(e.pointerType==="touch"||lP())}function $me(e,t,n={}){const[r,a,s]=uP(e,n),o=u=>{if(!gC(u))return;const{target:c}=u,d=t(c,u);if(typeof d!="function"||!c)return;const m=p=>{gC(p)&&(d(p),c.removeEventListener("pointerleave",m))};c.addEventListener("pointerleave",m,a)};return r.forEach(u=>{u.addEventListener("pointerenter",o,a)}),s}const cP=(e,t)=>t?e===t?!0:cP(e,t.parentElement):!1,v6=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,qme=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function dP(e){return qme.has(e.tagName)||e.isContentEditable===!0}const mp=new WeakSet;function bC(e){return t=>{t.key==="Enter"&&e(t)}}function Ux(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Vme=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=bC(()=>{if(mp.has(n))return;Ux(n,"down");const a=bC(()=>{Ux(n,"up")}),s=()=>Ux(n,"cancel");n.addEventListener("keyup",a,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function xC(e){return v6(e)&&!lP()}function Gme(e,t,n={}){const[r,a,s]=uP(e,n),o=u=>{const c=u.currentTarget;if(!xC(u))return;mp.add(c);const d=t(c,u),m=(y,w)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",b),mp.has(c)&&mp.delete(c),xC(y)&&typeof d=="function"&&d(y,{success:w})},p=y=>{m(y,c===window||c===document||n.useGlobalTarget||cP(c,y.target))},b=y=>{m(y,!1)};window.addEventListener("pointerup",p,a),window.addEventListener("pointercancel",b,a)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",o,a),Cv(u)&&(u.addEventListener("focus",d=>Vme(d,a)),!dP(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),s}function fP(e){return yL(e)&&"ownerSVGElement"in e}function Yme(e){return fP(e)&&e.tagName==="svg"}const Wme=[...aP,Cr,fl],Xme=e=>Wme.find(rP(e)),yC=()=>({translate:0,scale:1,origin:0,originPoint:0}),yc=()=>({x:yC(),y:yC()}),vC=()=>({min:0,max:0}),Mr=()=>({x:vC(),y:vC()}),kv={current:null},hP={current:!1},Kme=typeof window<"u";function Qme(){if(hP.current=!0,!!Kme)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>kv.current=e.matches;e.addEventListener("change",t),t()}else kv.current=!1}const Zme=new WeakMap;function cg(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function pf(e){return typeof e=="string"||Array.isArray(e)}const w6=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],T6=["initial",...w6];function dg(e){return cg(e.animate)||T6.some(t=>pf(e[t]))}function mP(e){return!!(dg(e)||e.variants)}function Jme(e,t,n){for(const r in t){const a=t[r],s=n[r];if(ia(a))e.addValue(r,a);else if(ia(s))e.addValue(r,Gc(a,{owner:e}));else if(s!==a)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(a):o.hasAnimated||o.set(a)}else{const o=e.getStaticValue(r);e.addValue(r,Gc(o!==void 0?o:a,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const wC=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let t1={};function pP(e){t1=e}function epe(){return t1}class tpe{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:a,blockInitialAnimation:s,visualState:o},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=h6,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const b=xa.now();this.renderScheduledAt<b&&(this.renderScheduledAt=b,Kn.render(this.render,!1,!0))};const{latestValues:c,renderState:d}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=u,this.blockInitialAnimation=!!s,this.isControllingVariants=dg(n),this.isVariantNode=mP(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:m,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const b in p){const y=p[b];c[b]!==void 0&&ia(y)&&y.set(c[b])}}mount(t){this.current=t,Zme.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(hP.current||Qme(),this.shouldReduceMotion=kv.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),dl(this.notifyUpdate),dl(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=m0.has(t);r&&this.onBindTransform&&this.onBindTransform();const a=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Kn.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{a(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in t1){const n=t1[t];if(!n)continue;const{isEnabled:r,Feature:a}=n;if(!this.features[t]&&a&&r(this.props)&&(this.features[t]=new a(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Mr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<wC.length;r++){const a=wC[r];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const s="on"+a,o=t[s];o&&(this.propEventSubscriptions[a]=this.on(a,o))}this.prevMotionValues=Jme(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Gc(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(xL(r)||vL(r))?r=parseFloat(r):!Xme(r)&&fl.test(n)&&(r=iP(t,n)),this.setBaseTarget(t,ia(r)?r.get():r)),ia(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=g6(this.props,n,this.presenceContext?.custom);s&&(r=s[t])}if(n&&r!==void 0)return r;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!ia(a)?a:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new n6),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){y6.render(this.render)}}class gP extends tpe{constructor(){super(...arguments),this.KeyframeResolver=Fme}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ia(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class xl{constructor(t){this.isMounted=!1,this.node=t}update(){}}function bP({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function npe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function rpe(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function $x(e){return e===void 0||e===1}function Av({scale:e,scaleX:t,scaleY:n}){return!$x(e)||!$x(t)||!$x(n)}function Gl(e){return Av(e)||xP(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function xP(e){return TC(e.x)||TC(e.y)}function TC(e){return e&&e!=="0%"}function n1(e,t,n){const r=e-n,a=t*r;return n+a}function EC(e,t,n,r,a){return a!==void 0&&(e=n1(e,a,r)),n1(e,n,r)+t}function Nv(e,t=0,n=1,r,a){e.min=EC(e.min,t,n,r,a),e.max=EC(e.max,t,n,r,a)}function yP(e,{x:t,y:n}){Nv(e.x,t.translate,t.scale,t.originPoint),Nv(e.y,n.translate,n.scale,n.originPoint)}const SC=.999999999999,CC=1.0000000000001;function ape(e,t,n,r=!1){const a=n.length;if(!a)return;t.x=t.y=1;let s,o;for(let u=0;u<a;u++){s=n[u],o=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&wc(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,yP(e,o)),r&&Gl(s.latestValues)&&wc(e,s.latestValues))}t.x<CC&&t.x>SC&&(t.x=1),t.y<CC&&t.y>SC&&(t.y=1)}function vc(e,t){e.min=e.min+t,e.max=e.max+t}function kC(e,t,n,r,a=.5){const s=or(e.min,e.max,a);Nv(e,t,n,s,r)}function wc(e,t){kC(e.x,t.x,t.scaleX,t.scale,t.originX),kC(e.y,t.y,t.scaleY,t.scale,t.originY)}function vP(e,t){return bP(rpe(e.getBoundingClientRect(),t))}function spe(e,t,n){const r=vP(e,n),{scroll:a}=t;return a&&(vc(r.x,a.offset.x),vc(r.y,a.offset.y)),r}const ipe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ope=h0.length;function lpe(e,t,n){let r="",a=!0;for(let s=0;s<ope;s++){const o=h0[s],u=e[o];if(u===void 0)continue;let c=!0;if(typeof u=="number")c=u===(o.startsWith("scale")?1:0);else{const d=parseFloat(u);c=o.startsWith("scale")?d===1:d===0}if(!c||n){const d=oP(u,x6[o]);if(!c){a=!1;const m=ipe[o]||o;r+=`${m}(${d}) `}n&&(t[o]=d)}}return r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}function E6(e,t,n){const{style:r,vars:a,transformOrigin:s}=e;let o=!1,u=!1;for(const c in t){const d=t[c];if(m0.has(c)){o=!0;continue}else if(OL(c)){a[c]=d;continue}else{const m=oP(d,x6[c]);c.startsWith("origin")?(u=!0,s[c]=m):r[c]=m}}if(t.transform||(o||n?r.transform=lpe(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:c="50%",originY:d="50%",originZ:m=0}=s;r.transformOrigin=`${c} ${d} ${m}`}}function wP(e,{style:t,vars:n},r,a){const s=e.style;let o;for(o in t)s[o]=t[o];a?.applyProjectionStyles(s,r);for(o in n)s.setProperty(o,n[o])}function AC(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const wd={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(bt.test(e))e=parseFloat(e);else return e;const n=AC(e,t.target.x),r=AC(e,t.target.y);return`${n}% ${r}%`}},upe={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=fl.parse(e);if(a.length>5)return r;const s=fl.createTransformer(e),o=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,c=n.y.scale*t.y;a[0+o]/=u,a[1+o]/=c;const d=or(u,c,.5);return typeof a[2+o]=="number"&&(a[2+o]/=d),typeof a[3+o]=="number"&&(a[3+o]/=d),s(a)}},_v={borderRadius:{...wd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:wd,borderTopRightRadius:wd,borderBottomLeftRadius:wd,borderBottomRightRadius:wd,boxShadow:upe};function TP(e,{layout:t,layoutId:n}){return m0.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!_v[e]||e==="opacity")}function S6(e,t,n){const r=e.style,a=t?.style,s={};if(!r)return s;for(const o in r)(ia(r[o])||a&&ia(a[o])||TP(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(s[o]=r[o]);return s}function cpe(e){return window.getComputedStyle(e)}class dpe extends gP{constructor(){super(...arguments),this.type="html",this.renderInstance=wP}readValueFromInstance(t,n){if(m0.has(n))return this.projection?.isProjecting?pv(n):Hhe(t,n);{const r=cpe(t),a=(OL(n)?r.getPropertyValue(n):r[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return vP(t,n)}build(t,n,r){E6(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return S6(t,n,r)}}const fpe={offset:"stroke-dashoffset",array:"stroke-dasharray"},hpe={offset:"strokeDashoffset",array:"strokeDasharray"};function mpe(e,t,n=1,r=0,a=!0){e.pathLength=1;const s=a?fpe:hpe;e[s.offset]=`${-r}`,e[s.array]=`${t} ${n}`}const ppe=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function EP(e,{attrX:t,attrY:n,attrScale:r,pathLength:a,pathSpacing:s=1,pathOffset:o=0,...u},c,d,m){if(E6(e,u,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:b}=e;p.transform&&(b.transform=p.transform,delete p.transform),(b.transform||p.transformOrigin)&&(b.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),b.transform&&(b.transformBox=m?.transformBox??"fill-box",delete p.transformBox);for(const y of ppe)p[y]!==void 0&&(b[y]=p[y],delete p[y]);t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),a!==void 0&&mpe(p,a,s,o,!1)}const SP=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),CP=e=>typeof e=="string"&&e.toLowerCase()==="svg";function gpe(e,t,n,r){wP(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(SP.has(a)?a:b6(a),t.attrs[a])}function kP(e,t,n){const r=S6(e,t,n);for(const a in e)if(ia(e[a])||ia(t[a])){const s=h0.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[s]=e[a]}return r}class bpe extends gP{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Mr}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(m0.has(n)){const r=sP(n);return r&&r.default||0}return n=SP.has(n)?n:b6(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return kP(t,n,r)}build(t,n,r){EP(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,a){gpe(t,n,r,a)}mount(t){this.isSVGTag=CP(t.tagName),super.mount(t)}}const xpe=T6.length;function AP(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?AP(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<xpe;n++){const r=T6[n],a=e.props[r];(pf(a)||a===!1)&&(t[r]=a)}return t}function NP(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const ype=[...w6].reverse(),vpe=w6.length;function wpe(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Rme(e,n,r)))}function Tpe(e){let t=wpe(e),n=NC(),r=!0;const a=c=>(d,m)=>{const p=Ic(e,m,c==="exit"?e.presenceContext?.custom:void 0);if(p){const{transition:b,transitionEnd:y,...w}=p;d={...d,...w,...y}}return d};function s(c){t=c(e)}function o(c){const{props:d}=e,m=AP(e.parent)||{},p=[],b=new Set;let y={},w=1/0;for(let k=0;k<vpe;k++){const E=ype[k],A=n[E],_=d[E]!==void 0?d[E]:m[E],I=pf(_),P=E===c?A.isActive:null;P===!1&&(w=k);let O=_===m[E]&&_!==d[E]&&I;if(O&&r&&e.manuallyAnimateOnMount&&(O=!1),A.protectedKeys={...y},!A.isActive&&P===null||!_&&!A.prevProp||cg(_)||typeof _=="boolean")continue;const R=Epe(A.prevProp,_);let z=R||E===c&&A.isActive&&!O&&I||k>w&&I,F=!1;const U=Array.isArray(_)?_:[_];let X=U.reduce(a(E),{});P===!1&&(X={});const{prevResolvedValues:W={}}=A,le={...W,...X},se=K=>{z=!0,b.has(K)&&(F=!0,b.delete(K)),A.needsAnimating[K]=!0;const Z=e.getValue(K);Z&&(Z.liveStyle=!1)};for(const K in le){const Z=X[K],re=W[K];if(y.hasOwnProperty(K))continue;let j=!1;wv(Z)&&wv(re)?j=!NP(Z,re):j=Z!==re,j?Z!=null?se(K):b.add(K):Z!==void 0&&b.has(K)?se(K):A.protectedKeys[K]=!0}A.prevProp=_,A.prevResolvedValues=X,A.isActive&&(y={...y,...X}),r&&e.blockInitialAnimation&&(z=!1);const ie=O&&R;z&&(!ie||F)&&p.push(...U.map(K=>{const Z={type:E};if(typeof K=="string"&&r&&!ie&&e.manuallyAnimateOnMount&&e.parent){const{parent:re}=e,j=Ic(re,K);if(re.enteringChildren&&j){const{delayChildren:H}=j.transition||{};Z.delay=QL(re.enteringChildren,e,H)}}return{animation:K,options:Z}}))}if(b.size){const k={};if(typeof d.initial!="boolean"){const E=Ic(e,Array.isArray(d.initial)?d.initial[0]:d.initial);E&&E.transition&&(k.transition=E.transition)}b.forEach(E=>{const A=e.getBaseTarget(E),_=e.getValue(E);_&&(_.liveStyle=!0),k[E]=A??null}),p.push({animation:k})}let S=!!p.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(S=!1),r=!1,S?t(p):Promise.resolve()}function u(c,d){if(n[c].isActive===d)return Promise.resolve();e.variantChildren?.forEach(p=>p.animationState?.setActive(c,d)),n[c].isActive=d;const m=o(c);for(const p in n)n[p].protectedKeys={};return m}return{animateChanges:o,setActive:u,setAnimateFunction:s,getState:()=>n,reset:()=>{n=NC()}}}function Epe(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!NP(t,e):!1}function ql(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function NC(){return{animate:ql(!0),whileInView:ql(),whileHover:ql(),whileTap:ql(),whileDrag:ql(),whileFocus:ql(),exit:ql()}}function _C(e,t){e.min=t.min,e.max=t.max}function Ps(e,t){_C(e.x,t.x),_C(e.y,t.y)}function RC(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const _P=1e-4,Spe=1-_P,Cpe=1+_P,RP=.01,kpe=0-RP,Ape=0+RP;function ya(e){return e.max-e.min}function Npe(e,t,n){return Math.abs(e-t)<=n}function MC(e,t,n,r=.5){e.origin=r,e.originPoint=or(t.min,t.max,e.origin),e.scale=ya(n)/ya(t),e.translate=or(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Spe&&e.scale<=Cpe||isNaN(e.scale))&&(e.scale=1),(e.translate>=kpe&&e.translate<=Ape||isNaN(e.translate))&&(e.translate=0)}function Gd(e,t,n,r){MC(e.x,t.x,n.x,r?r.originX:void 0),MC(e.y,t.y,n.y,r?r.originY:void 0)}function DC(e,t,n){e.min=n.min+t.min,e.max=e.min+ya(t)}function _pe(e,t,n){DC(e.x,t.x,n.x),DC(e.y,t.y,n.y)}function IC(e,t,n){e.min=t.min-n.min,e.max=e.min+ya(t)}function r1(e,t,n){IC(e.x,t.x,n.x),IC(e.y,t.y,n.y)}function OC(e,t,n,r,a){return e-=t,e=n1(e,1/n,r),a!==void 0&&(e=n1(e,1/a,r)),e}function Rpe(e,t=0,n=1,r=.5,a,s=e,o=e){if(bi.test(t)&&(t=parseFloat(t),t=or(o.min,o.max,t/100)-o.min),typeof t!="number")return;let u=or(s.min,s.max,r);e===s&&(u-=t),e.min=OC(e.min,t,n,u,a),e.max=OC(e.max,t,n,u,a)}function LC(e,t,[n,r,a],s,o){Rpe(e,t[n],t[r],t[a],t.scale,s,o)}const Mpe=["x","scaleX","originX"],Dpe=["y","scaleY","originY"];function PC(e,t,n,r){LC(e.x,t,Mpe,n?n.x:void 0,r?r.x:void 0),LC(e.y,t,Dpe,n?n.y:void 0,r?r.y:void 0)}function jC(e){return e.translate===0&&e.scale===1}function MP(e){return jC(e.x)&&jC(e.y)}function zC(e,t){return e.min===t.min&&e.max===t.max}function Ipe(e,t){return zC(e.x,t.x)&&zC(e.y,t.y)}function BC(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function DP(e,t){return BC(e.x,t.x)&&BC(e.y,t.y)}function FC(e){return ya(e.x)/ya(e.y)}function HC(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function vs(e){return[e("x"),e("y")]}function Ope(e,t,n){let r="";const a=e.x.translate/t.x,s=e.y.translate/t.y,o=n?.z||0;if((a||s||o)&&(r=`translate3d(${a}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:m,rotateX:p,rotateY:b,skewX:y,skewY:w}=n;d&&(r=`perspective(${d}px) ${r}`),m&&(r+=`rotate(${m}deg) `),p&&(r+=`rotateX(${p}deg) `),b&&(r+=`rotateY(${b}deg) `),y&&(r+=`skewX(${y}deg) `),w&&(r+=`skewY(${w}deg) `)}const u=e.x.scale*t.x,c=e.y.scale*t.y;return(u!==1||c!==1)&&(r+=`scale(${u}, ${c})`),r||"none"}const IP=["TopLeft","TopRight","BottomLeft","BottomRight"],Lpe=IP.length,UC=e=>typeof e=="string"?parseFloat(e):e,$C=e=>typeof e=="number"||bt.test(e);function Ppe(e,t,n,r,a,s){a?(e.opacity=or(0,n.opacity??1,jpe(r)),e.opacityExit=or(t.opacity??1,0,zpe(r))):s&&(e.opacity=or(t.opacity??1,n.opacity??1,r));for(let o=0;o<Lpe;o++){const u=`border${IP[o]}Radius`;let c=qC(t,u),d=qC(n,u);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||$C(c)===$C(d)?(e[u]=Math.max(or(UC(c),UC(d),r),0),(bi.test(d)||bi.test(c))&&(e[u]+="%")):e[u]=d}(t.rotate||n.rotate)&&(e.rotate=or(t.rotate||0,n.rotate||0,r))}function qC(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const jpe=OP(0,.5,NL),zpe=OP(.5,.95,Ns);function OP(e,t,n){return r=>r<e?0:r>t?1:n(ff(e,t,r))}function Bpe(e,t,n){const r=ia(e)?e:Gc(e);return r.start(p6("",r,t,n)),r.animation}function gf(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Fpe=(e,t)=>e.depth-t.depth;class Hpe{constructor(){this.children=[],this.isDirty=!1}add(t){Z3(this.children,t),this.isDirty=!0}remove(t){J3(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Fpe),this.isDirty=!1,this.children.forEach(t)}}function Upe(e,t){const n=xa.now(),r=({timestamp:a})=>{const s=a-n;s>=t&&(dl(r),e(s-t))};return Kn.setup(r,!0),()=>dl(r)}function pp(e){return ia(e)?e.get():e}class $pe{constructor(){this.members=[]}add(t){Z3(this.members,t),t.scheduleRender()}remove(t){if(J3(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(a=>t===a);if(n===0)return!1;let r;for(let a=n;a>=0;a--){const s=this.members[a];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const a=r.options.layoutDependency,s=t.options.layoutDependency;a!==void 0&&s!==void 0&&a===s||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0));const{crossfade:u}=t.options;u===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const gp={hasAnimatedSinceResize:!0,hasEverUpdated:!1},qx=["","X","Y","Z"],qpe=1e3;let Vpe=0;function Vx(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function LP(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=tP(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:a,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Kn,!(a||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&LP(r)}function PP({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(o={},u=t?.()){this.id=Vpe++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Wpe),this.nodes.forEach(Zpe),this.nodes.forEach(Jpe),this.nodes.forEach(Xpe)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Hpe)}addEventListener(o,u){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new n6),this.eventHandlers.get(o).add(u)}notifyListeners(o,...u){const c=this.eventHandlers.get(o);c&&c.notify(...u)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=fP(o)&&!Yme(o),this.instance=o;const{layoutId:u,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||u)&&(this.isLayoutDirty=!0),e){let m,p=0;const b=()=>this.root.updateBlockedByResize=!1;Kn.read(()=>{p=window.innerWidth}),e(o,()=>{const y=window.innerWidth;y!==p&&(p=y,this.root.updateBlockedByResize=!0,m&&m(),m=Upe(b,250),gp.hasAnimatedSinceResize&&(gp.hasAnimatedSinceResize=!1,this.nodes.forEach(YC)))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&d&&(u||c)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:p,hasRelativeLayoutChanged:b,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||d.getDefaultTransition()||a1e,{onLayoutAnimationStart:S,onLayoutAnimationComplete:k}=d.getProps(),E=!this.targetLayout||!DP(this.targetLayout,y),A=!p&&b;if(this.options.layoutRoot||this.resumeFrom||A||p&&(E||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const _={...m6(w,"layout"),onPlay:S,onComplete:k};(d.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_),this.setAnimationOrigin(m,A)}else p||YC(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),dl(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(e1e),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&LP(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const p=this.path[m];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:u,layout:c}=this.options;if(u===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(VC);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(GC);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Qpe),this.nodes.forEach(Gpe),this.nodes.forEach(Ype)):this.nodes.forEach(GC),this.clearAllSnapshots();const u=xa.now();Wr.delta=vi(0,1e3/60,u-Wr.timestamp),Wr.timestamp=u,Wr.isProcessing=!0,Px.update.process(Wr),Px.preRender.process(Wr),Px.render.process(Wr),Wr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,y6.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Kpe),this.sharedNodes.forEach(t1e)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Kn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Kn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ya(this.snapshot.measuredBox.x)&&!ya(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Mr(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let u=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(u=!1),u&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!a)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!MP(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,m=d!==this.prevTransformTemplateValue;o&&this.instance&&(u||Gl(this.latestValues)||m)&&(a(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const u=this.measurePageBox();let c=this.removeElementScroll(u);return o&&(c=this.removeTransform(c)),s1e(c),{animationId:this.root.animationId,measuredBox:u,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return Mr();const u=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(i1e))){const{scroll:d}=this.root;d&&(vc(u.x,d.offset.x),vc(u.y,d.offset.y))}return u}removeElementScroll(o){const u=Mr();if(Ps(u,o),this.scroll?.wasRoot)return u;for(let c=0;c<this.path.length;c++){const d=this.path[c],{scroll:m,options:p}=d;d!==this.root&&m&&p.layoutScroll&&(m.wasRoot&&Ps(u,o),vc(u.x,m.offset.x),vc(u.y,m.offset.y))}return u}applyTransform(o,u=!1){const c=Mr();Ps(c,o);for(let d=0;d<this.path.length;d++){const m=this.path[d];!u&&m.options.layoutScroll&&m.scroll&&m!==m.root&&wc(c,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),Gl(m.latestValues)&&wc(c,m.latestValues)}return Gl(this.latestValues)&&wc(c,this.latestValues),c}removeTransform(o){const u=Mr();Ps(u,o);for(let c=0;c<this.path.length;c++){const d=this.path[c];if(!d.instance||!Gl(d.latestValues))continue;Av(d.latestValues)&&d.updateSnapshot();const m=Mr(),p=d.measurePageBox();Ps(m,p),PC(u,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,m)}return Gl(this.latestValues)&&PC(u,this.latestValues),u}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Wr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==u;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:p}=this.options;if(!this.layout||!(m||p))return;this.resolvedRelativeTargetAt=Wr.timestamp;const b=this.getClosestProjectingParent();b&&this.linkedParentVersion!==b.layoutVersion&&!b.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(b&&b.layout?this.createRelativeTarget(b,this.layout.layoutBox,b.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Mr(),this.targetWithTransforms=Mr()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),_pe(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ps(this.target,this.layout.layoutBox),yP(this.target,this.targetDelta)):Ps(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,b&&!!b.resumingFrom==!!this.resumingFrom&&!b.options.layoutScroll&&b.target&&this.animationProgress!==1?this.createRelativeTarget(b,this.target,b.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Av(this.parent.latestValues)||xP(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,u,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Mr(),this.relativeTargetOrigin=Mr(),r1(this.relativeTargetOrigin,u,c),Ps(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),u=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Wr.timestamp&&(c=!1),c)return;const{layout:d,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||m))return;Ps(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,b=this.treeScale.y;ape(this.layoutCorrected,this.treeScale,this.path,u),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Mr());const{target:y}=o;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(RC(this.prevProjectionDelta.x,this.projectionDelta.x),RC(this.prevProjectionDelta.y,this.projectionDelta.y)),Gd(this.projectionDelta,this.layoutCorrected,y,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==b||!HC(this.projectionDelta.x,this.prevProjectionDelta.x)||!HC(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",y))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=yc(),this.projectionDelta=yc(),this.projectionDeltaWithTransform=yc()}setAnimationOrigin(o,u=!1){const c=this.snapshot,d=c?c.latestValues:{},m={...this.latestValues},p=yc();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const b=Mr(),y=c?c.source:void 0,w=this.layout?this.layout.source:void 0,S=y!==w,k=this.getStack(),E=!k||k.members.length<=1,A=!!(S&&!E&&this.options.crossfade===!0&&!this.path.some(r1e));this.animationProgress=0;let _;this.mixTargetDelta=I=>{const P=I/1e3;WC(p.x,o.x,P),WC(p.y,o.y,P),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(r1(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),n1e(this.relativeTarget,this.relativeTargetOrigin,b,P),_&&Ipe(this.relativeTarget,_)&&(this.isProjectionDirty=!1),_||(_=Mr()),Ps(_,this.relativeTarget)),S&&(this.animationValues=m,Ppe(m,d,this.latestValues,P,A,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(dl(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Kn.update(()=>{gp.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Gc(0)),this.currentAnimation=Bpe(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(qpe),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:u,target:c,layout:d,latestValues:m}=o;if(!(!u||!c||!d)){if(this!==o&&this.layout&&d&&jP(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||Mr();const p=ya(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+p;const b=ya(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+b}Ps(u,c),wc(u,m),Gd(this.projectionDeltaWithTransform,this.layoutCorrected,u,m)}}registerSharedNode(o,u){this.sharedNodes.has(o)||this.sharedNodes.set(o,new $pe),this.sharedNodes.get(o).add(u);const d=u.options.initialPromotionConfig;u.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(u):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:u,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let u=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(u=!0),!u)return;const d={};c.z&&Vx("z",o,d,this.animationValues);for(let m=0;m<qx.length;m++)Vx(`rotate${qx[m]}`,o,d,this.animationValues),Vx(`skew${qx[m]}`,o,d,this.animationValues);o.render();for(const m in d)o.setStaticValue(m,d[m]),this.animationValues&&(this.animationValues[m]=d[m]);o.scheduleRender()}applyProjectionStyles(o,u){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=pp(u?.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=pp(u?.pointerEvents)||""),this.hasProjected&&!Gl(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const m=d.animationValues||d.latestValues;this.applyTransformsToTarget();let p=Ope(this.projectionDeltaWithTransform,this.treeScale,m);c&&(p=c(m,p)),o.transform=p;const{x:b,y}=this.projectionDelta;o.transformOrigin=`${b.origin*100}% ${y.origin*100}% 0`,d.animationValues?o.opacity=d===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:o.opacity=d===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const w in _v){if(m[w]===void 0)continue;const{correct:S,applyTo:k,isCSSVariable:E}=_v[w],A=p==="none"?m[w]:S(m[w],d);if(k){const _=k.length;for(let I=0;I<_;I++)o[k[I]]=A}else E?this.options.visualElement.renderState.vars[w]=A:o[w]=A}this.options.layoutId&&(o.pointerEvents=d===this?pp(u?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(VC),this.root.sharedNodes.clear()}}}function Gpe(e){e.updateLayout()}function Ype(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:a}=e.options,s=t.source!==e.layout.source;a==="size"?vs(m=>{const p=s?t.measuredBox[m]:t.layoutBox[m],b=ya(p);p.min=n[m].min,p.max=p.min+b}):jP(a,t.layoutBox,n)&&vs(m=>{const p=s?t.measuredBox[m]:t.layoutBox[m],b=ya(n[m]);p.max=p.min+b,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+b)});const o=yc();Gd(o,n,t.layoutBox);const u=yc();s?Gd(u,e.applyTransform(r,!0),t.measuredBox):Gd(u,n,t.layoutBox);const c=!MP(o);let d=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:p,layout:b}=m;if(p&&b){const y=Mr();r1(y,t.layoutBox,p.layoutBox);const w=Mr();r1(w,n,b.layoutBox),DP(y,w)||(d=!0),m.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=y,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:u,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Wpe(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Xpe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Kpe(e){e.clearSnapshot()}function VC(e){e.clearMeasurements()}function GC(e){e.isLayoutDirty=!1}function Qpe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function YC(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Zpe(e){e.resolveTargetDelta()}function Jpe(e){e.calcProjection()}function e1e(e){e.resetSkewAndRotation()}function t1e(e){e.removeLeadSnapshot()}function WC(e,t,n){e.translate=or(t.translate,0,n),e.scale=or(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function XC(e,t,n,r){e.min=or(t.min,n.min,r),e.max=or(t.max,n.max,r)}function n1e(e,t,n,r){XC(e.x,t.x,n.x,r),XC(e.y,t.y,n.y,r)}function r1e(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const a1e={duration:.45,ease:[.4,0,.1,1]},KC=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),QC=KC("applewebkit/")&&!KC("chrome/")?Math.round:Ns;function ZC(e){e.min=QC(e.min),e.max=QC(e.max)}function s1e(e){ZC(e.x),ZC(e.y)}function jP(e,t,n){return e==="position"||e==="preserve-aspect"&&!Npe(FC(t),FC(n),.2)}function i1e(e){return e!==e.root&&e.scroll?.wasRoot}const o1e=PP({attachResizeListener:(e,t)=>gf(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Gx={current:void 0},zP=PP({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Gx.current){const e=new o1e({});e.mount(window),e.setOptions({layoutScroll:!0}),Gx.current=e}return Gx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),C6=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function JC(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function l1e(...e){return t=>{let n=!1;const r=e.map(a=>{const s=JC(a,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let a=0;a<r.length;a++){const s=r[a];typeof s=="function"?s():JC(e[a],null)}}}}function u1e(...e){return x.useCallback(l1e(...e),e)}class c1e extends x.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,a=Cv(r)&&r.offsetWidth||0,s=Cv(r)&&r.offsetHeight||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=a-o.width-o.left,o.bottom=s-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function d1e({children:e,isPresent:t,anchorX:n,anchorY:r,root:a}){const s=x.useId(),o=x.useRef(null),u=x.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=x.useContext(C6),d=e.props?.ref??e?.ref,m=u1e(o,d);return x.useInsertionEffect(()=>{const{width:p,height:b,top:y,left:w,right:S,bottom:k}=u.current;if(t||!o.current||!p||!b)return;const E=n==="left"?`left: ${w}`:`right: ${S}`,A=r==="bottom"?`bottom: ${k}`:`top: ${y}`;o.current.dataset.motionPopId=s;const _=document.createElement("style");c&&(_.nonce=c);const I=a??document.head;return I.appendChild(_),_.sheet&&_.sheet.insertRule(`
|
|
445
|
+
[data-motion-pop-id="${s}"] {
|
|
446
|
+
position: absolute !important;
|
|
447
|
+
width: ${p}px !important;
|
|
448
|
+
height: ${b}px !important;
|
|
449
|
+
${E}px !important;
|
|
450
|
+
${A}px !important;
|
|
451
|
+
}
|
|
452
|
+
`),()=>{I.contains(_)&&I.removeChild(_)}},[t]),h.jsx(c1e,{isPresent:t,childRef:o,sizeRef:u,children:x.cloneElement(e,{ref:m})})}const f1e=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:a,presenceAffectsLayout:s,mode:o,anchorX:u,anchorY:c,root:d})=>{const m=Q3(h1e),p=x.useId();let b=!0,y=x.useMemo(()=>(b=!1,{id:p,initial:t,isPresent:n,custom:a,onExitComplete:w=>{m.set(w,!0);for(const S of m.values())if(!S)return;r&&r()},register:w=>(m.set(w,!1),()=>m.delete(w))}),[n,m,r]);return s&&b&&(y={...y}),x.useMemo(()=>{m.forEach((w,S)=>m.set(S,!1))},[n]),x.useEffect(()=>{!n&&!m.size&&r&&r()},[n]),o==="popLayout"&&(e=h.jsx(d1e,{isPresent:n,anchorX:u,anchorY:c,root:d,children:e})),h.jsx(ug.Provider,{value:y,children:e})};function h1e(){return new Map}function BP(e=!0){const t=x.useContext(ug);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=t,s=x.useId();x.useEffect(()=>{if(e)return a(s)},[e]);const o=x.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const Wm=e=>e.key||"";function ek(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const FP=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:s="sync",propagate:o=!1,anchorX:u="left",anchorY:c="top",root:d})=>{const[m,p]=BP(o),b=x.useMemo(()=>ek(e),[e]),y=o&&!m?[]:b.map(Wm),w=x.useRef(!0),S=x.useRef(b),k=Q3(()=>new Map),E=x.useRef(new Set),[A,_]=x.useState(b),[I,P]=x.useState(b);bL(()=>{w.current=!1,S.current=b;for(let z=0;z<I.length;z++){const F=Wm(I[z]);y.includes(F)?(k.delete(F),E.current.delete(F)):k.get(F)!==!0&&k.set(F,!1)}},[I,y.length,y.join("-")]);const O=[];if(b!==A){let z=[...b];for(let F=0;F<I.length;F++){const U=I[F],X=Wm(U);y.includes(X)||(z.splice(F,0,U),O.push(U))}return s==="wait"&&O.length&&(z=O),P(ek(z)),_(b),null}const{forceRender:R}=x.useContext(K3);return h.jsx(h.Fragment,{children:I.map(z=>{const F=Wm(z),U=o&&!m?!1:b===I||y.includes(F),X=()=>{if(E.current.has(F))return;if(E.current.add(F),k.has(F))k.set(F,!0);else return;let W=!0;k.forEach(le=>{le||(W=!1)}),W&&(R?.(),P(S.current),o&&p?.(),r&&r())};return h.jsx(f1e,{isPresent:U,initial:!w.current||n?void 0:!1,custom:t,presenceAffectsLayout:a,mode:s,root:d,onExitComplete:U?void 0:X,anchorX:u,anchorY:c,children:z},F)})})},HP=x.createContext({strict:!1}),tk={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let nk=!1;function m1e(){if(nk)return;const e={};for(const t in tk)e[t]={isEnabled:n=>tk[t].some(r=>!!n[r])};pP(e),nk=!0}function UP(){return m1e(),epe()}function p1e(e){const t=UP();for(const n in e)t[n]={...t[n],...e[n]};pP(t)}const g1e=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function a1(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||g1e.has(e)}let $P=e=>!a1(e);function b1e(e){typeof e=="function"&&($P=t=>t.startsWith("on")?!a1(t):e(t))}try{b1e(require("@emotion/is-prop-valid").default)}catch{}function x1e(e,t,n){const r={};for(const a in e)a==="values"&&typeof e.values=="object"||($P(a)||n===!0&&a1(a)||!t&&!a1(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}const fg=x.createContext({});function y1e(e,t){if(dg(e)){const{initial:n,animate:r}=e;return{initial:n===!1||pf(n)?n:void 0,animate:pf(r)?r:void 0}}return e.inherit!==!1?t:{}}function v1e(e){const{initial:t,animate:n}=y1e(e,x.useContext(fg));return x.useMemo(()=>({initial:t,animate:n}),[rk(t),rk(n)])}function rk(e){return Array.isArray(e)?e.join(" "):e}const k6=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function qP(e,t,n){for(const r in t)!ia(t[r])&&!TP(r,n)&&(e[r]=t[r])}function w1e({transformTemplate:e},t){return x.useMemo(()=>{const n=k6();return E6(n,t,e),Object.assign({},n.vars,n.style)},[t])}function T1e(e,t){const n=e.style||{},r={};return qP(r,n,e),Object.assign(r,w1e(e,t)),r}function E1e(e,t){const n={},r=T1e(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const VP=()=>({...k6(),attrs:{}});function S1e(e,t,n,r){const a=x.useMemo(()=>{const s=VP();return EP(s,t,CP(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};qP(s,e.style,e),a.style={...s,...a.style}}return a}const C1e=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function A6(e){return typeof e!="string"||e.includes("-")?!1:!!(C1e.indexOf(e)>-1||/[A-Z]/u.test(e))}function k1e(e,t,n,{latestValues:r},a,s=!1,o){const c=(o??A6(e)?S1e:E1e)(t,r,a,e),d=x1e(t,typeof e=="string",s),m=e!==x.Fragment?{...d,...c,ref:n}:{},{children:p}=t,b=x.useMemo(()=>ia(p)?p.get():p,[p]);return x.createElement(e,{...m,children:b})}function A1e({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,a){return{latestValues:N1e(n,r,a,e),renderState:t()}}function N1e(e,t,n,r){const a={},s=r(e,{});for(const b in s)a[b]=pp(s[b]);let{initial:o,animate:u}=e;const c=dg(e),d=mP(e);t&&d&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),u===void 0&&(u=t.animate));let m=n?n.initial===!1:!1;m=m||o===!1;const p=m?u:o;if(p&&typeof p!="boolean"&&!cg(p)){const b=Array.isArray(p)?p:[p];for(let y=0;y<b.length;y++){const w=g6(e,b[y]);if(w){const{transitionEnd:S,transition:k,...E}=w;for(const A in E){let _=E[A];if(Array.isArray(_)){const I=m?_.length-1:0;_=_[I]}_!==null&&(a[A]=_)}for(const A in S)a[A]=S[A]}}}return a}const GP=e=>(t,n)=>{const r=x.useContext(fg),a=x.useContext(ug),s=()=>A1e(e,t,r,a);return n?s():Q3(s)},_1e=GP({scrapeMotionValuesFromProps:S6,createRenderState:k6}),R1e=GP({scrapeMotionValuesFromProps:kP,createRenderState:VP}),M1e=Symbol.for("motionComponentSymbol");function D1e(e,t,n){const r=x.useRef(n);x.useInsertionEffect(()=>{r.current=n});const a=x.useRef(null);return x.useCallback(s=>{s&&e.onMount?.(s),t&&(s?t.mount(s):t.unmount());const o=r.current;if(typeof o=="function")if(s){const u=o(s);typeof u=="function"&&(a.current=u)}else a.current?(a.current(),a.current=null):o(s);else o&&(o.current=s)},[t])}const YP=x.createContext({});function _d(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function I1e(e,t,n,r,a,s){const{visualElement:o}=x.useContext(fg),u=x.useContext(HP),c=x.useContext(ug),d=x.useContext(C6).reducedMotion,m=x.useRef(null),p=x.useRef(!1);r=r||u.renderer,!m.current&&r&&(m.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,isSVG:s}),p.current&&m.current&&(m.current.manuallyAnimateOnMount=!0));const b=m.current,y=x.useContext(YP);b&&!b.projection&&a&&(b.type==="html"||b.type==="svg")&&O1e(m.current,n,a,y);const w=x.useRef(!1);x.useInsertionEffect(()=>{b&&w.current&&b.update(n,c)});const S=n[eP],k=x.useRef(!!S&&!window.MotionHandoffIsComplete?.(S)&&window.MotionHasOptimisedAnimation?.(S));return bL(()=>{p.current=!0,b&&(w.current=!0,window.MotionIsMounted=!0,b.updateFeatures(),b.scheduleRenderMicrotask(),k.current&&b.animationState&&b.animationState.animateChanges())}),x.useEffect(()=>{b&&(!k.current&&b.animationState&&b.animationState.animateChanges(),k.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(S)}),k.current=!1),b.enteringChildren=void 0)}),b}function O1e(e,t,n,r){const{layoutId:a,layout:s,drag:o,dragConstraints:u,layoutScroll:c,layoutRoot:d,layoutCrossfade:m}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:WP(e.parent)),e.projection.setOptions({layoutId:a,layout:s,alwaysMeasureLayout:!!o||u&&_d(u),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:m,layoutScroll:c,layoutRoot:d})}function WP(e){if(e)return e.options.allowProjection!==!1?e.projection:WP(e.parent)}function Yx(e,{forwardMotionProps:t=!1,type:n}={},r,a){r&&p1e(r);const s=n?n==="svg":A6(e),o=s?R1e:_1e;function u(d,m){let p;const b={...x.useContext(C6),...d,layoutId:L1e(d)},{isStatic:y}=b,w=v1e(d),S=o(d,y);if(!y&&gL){P1e();const k=j1e(b);p=k.MeasureLayout,w.visualElement=I1e(e,S,b,a,k.ProjectionNode,s)}return h.jsxs(fg.Provider,{value:w,children:[p&&w.visualElement?h.jsx(p,{visualElement:w.visualElement,...b}):null,k1e(e,d,D1e(S,w.visualElement,m),S,y,t,s)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=x.forwardRef(u);return c[M1e]=e,c}function L1e({layoutId:e}){const t=x.useContext(K3).id;return t&&e!==void 0?t+"-"+e:e}function P1e(e,t){x.useContext(HP).strict}function j1e(e){const t=UP(),{drag:n,layout:r}=t;if(!n&&!r)return{};const a={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?a.MeasureLayout:void 0,ProjectionNode:a.ProjectionNode}}function z1e(e,t){if(typeof Proxy>"u")return Yx;const n=new Map,r=(s,o)=>Yx(s,o,e,t),a=(s,o)=>r(s,o);return new Proxy(a,{get:(s,o)=>o==="create"?r:(n.has(o)||n.set(o,Yx(o,void 0,e,t)),n.get(o))})}const B1e=(e,t)=>t.isSVG??A6(e)?new bpe(t):new dpe(t,{allowProjection:e!==x.Fragment});class F1e extends xl{constructor(t){super(t),t.animationState||(t.animationState=Tpe(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();cg(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let H1e=0;class U1e extends xl{constructor(){super(...arguments),this.id=H1e++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const a=this.node.animationState.setActive("exit",!t);n&&!t&&a.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const $1e={animation:{Feature:F1e},exit:{Feature:U1e}};function eh(e){return{point:{x:e.pageX,y:e.pageY}}}const q1e=e=>t=>v6(t)&&e(t,eh(t));function Yd(e,t,n,r){return gf(e,t,q1e(n),r)}const XP=({current:e})=>e?e.ownerDocument.defaultView:null,ak=(e,t)=>Math.abs(e-t);function V1e(e,t){const n=ak(e.x,t.x),r=ak(e.y,t.y);return Math.sqrt(n**2+r**2)}const sk=new Set(["auto","scroll"]);class KP{constructor(t,n,{transformPagePoint:r,contextWindow:a=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3,element:u}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=y=>{this.handleScroll(y.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Xx(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,S=V1e(y.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!S)return;const{point:k}=y,{timestamp:E}=Wr;this.history.push({...k,timestamp:E});const{onStart:A,onMove:_}=this.handlers;w||(A&&A(this.lastMoveEvent,y),this.startEvent=this.lastMoveEvent),_&&_(this.lastMoveEvent,y)},this.handlePointerMove=(y,w)=>{this.lastMoveEvent=y,this.lastMoveEventInfo=Wx(w,this.transformPagePoint),Kn.update(this.updatePoint,!0)},this.handlePointerUp=(y,w)=>{this.end();const{onEnd:S,onSessionEnd:k,resumeAnimation:E}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&E&&E(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const A=Xx(y.type==="pointercancel"?this.lastMoveEventInfo:Wx(w,this.transformPagePoint),this.history);this.startEvent&&S&&S(y,A),k&&k(y,A)},!v6(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=a||window;const c=eh(t),d=Wx(c,this.transformPagePoint),{point:m}=d,{timestamp:p}=Wr;this.history=[{...m,timestamp:p}];const{onSessionStart:b}=n;b&&b(t,Xx(d,this.history)),this.removeListeners=Qf(Yd(this.contextWindow,"pointermove",this.handlePointerMove),Yd(this.contextWindow,"pointerup",this.handlePointerUp),Yd(this.contextWindow,"pointercancel",this.handlePointerUp)),u&&this.startScrollTracking(u)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(sk.has(r.overflowX)||sk.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,a=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:a.x-n.x,y:a.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,a),Kn.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),dl(this.updatePoint)}}function Wx(e,t){return t?{point:t(e.point)}:e}function ik(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Xx({point:e},t){return{point:e,delta:ik(e,QP(t)),offset:ik(e,G1e(t)),velocity:Y1e(t,.1)}}function G1e(e){return e[0]}function QP(e){return e[e.length-1]}function Y1e(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=QP(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>no(t)));)n--;if(!r)return{x:0,y:0};const s=Ss(a.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(a.x-r.x)/s,y:(a.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function W1e(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?or(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?or(n,e,r.max):Math.min(e,n)),e}function ok(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function X1e(e,{top:t,left:n,bottom:r,right:a}){return{x:ok(e.x,n,a),y:ok(e.y,t,r)}}function lk(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function K1e(e,t){return{x:lk(e.x,t.x),y:lk(e.y,t.y)}}function Q1e(e,t){let n=.5;const r=ya(e),a=ya(t);return a>r?n=ff(t.min,t.max-r,e.min):r>a&&(n=ff(e.min,e.max-a,t.min)),vi(0,1,n)}function Z1e(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Rv=.35;function J1e(e=Rv){return e===!1?e=0:e===!0&&(e=Rv),{x:uk(e,"left","right"),y:uk(e,"top","bottom")}}function uk(e,t,n){return{min:ck(e,t),max:ck(e,n)}}function ck(e,t){return typeof e=="number"?e:e[t]||0}const ege=new WeakMap;class tge{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Mr(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:a}=this.visualElement;if(a&&a.isPresent===!1)return;const s=p=>{n?(this.stopAnimation(),this.snapToCursor(eh(p).point)):this.pauseAnimation()},o=(p,b)=>{this.stopAnimation();const{drag:y,dragPropagation:w,onDragStart:S}=this.getProps();if(y&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ume(y),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=b,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),vs(E=>{let A=this.getAxisMotionValue(E).get()||0;if(bi.test(A)){const{projection:_}=this.visualElement;if(_&&_.layout){const I=_.layout.layoutBox[E];I&&(A=ya(I)*(parseFloat(A)/100))}}this.originPoint[E]=A}),S&&Kn.postRender(()=>S(p,b)),Tv(this.visualElement,"transform");const{animationState:k}=this.visualElement;k&&k.setActive("whileDrag",!0)},u=(p,b)=>{this.latestPointerEvent=p,this.latestPanInfo=b;const{dragPropagation:y,dragDirectionLock:w,onDirectionLock:S,onDrag:k}=this.getProps();if(!y&&!this.openDragLock)return;const{offset:E}=b;if(w&&this.currentDirection===null){this.currentDirection=nge(E),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",b.point,E),this.updateAxis("y",b.point,E),this.visualElement.render(),k&&k(p,b)},c=(p,b)=>{this.latestPointerEvent=p,this.latestPanInfo=b,this.stop(p,b),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>vs(p=>this.getAnimationState(p)==="paused"&&this.getAxisMotionValue(p).animation?.play()),{dragSnapToOrigin:m}=this.getProps();this.panSession=new KP(t,{onSessionStart:s,onStart:o,onMove:u,onSessionEnd:c,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:r,contextWindow:XP(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,a=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!a||!r)return;const{velocity:o}=a;this.startAnimation(o);const{onDragEnd:u}=this.getProps();u&&Kn.postRender(()=>u(r,a))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:a}=this.getProps();if(!r||!Xm(t,a,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=W1e(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,a=this.constraints;t&&_d(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=X1e(r.layoutBox,t):this.constraints=!1,this.elastic=J1e(n),a!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&vs(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=Z1e(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!_d(t))return!1;const r=t.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const s=spe(r,a.root,this.visualElement.getTransformPagePoint());let o=K1e(a.layout.layoutBox,s);if(n){const u=n(npe(o));this.hasMutatedConstraints=!!u,u&&(o=bP(u))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:a,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:u}=this.getProps(),c=this.constraints||{},d=vs(m=>{if(!Xm(m,n,this.currentDirection))return;let p=c&&c[m]||{};o&&(p={min:0,max:0});const b=a?200:1e6,y=a?40:1e7,w={type:"inertia",velocity:r?t[m]:0,bounceStiffness:b,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...s,...p};return this.startAxisValueAnimation(m,w)});return Promise.all(d).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Tv(this.visualElement,t),r.start(p6(t,r,0,n,this.visualElement,!1))}stopAnimation(){vs(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){vs(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),a=r[n];return a||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){vs(n=>{const{drag:r}=this.getProps();if(!Xm(n,r,this.currentDirection))return;const{projection:a}=this.visualElement,s=this.getAxisMotionValue(n);if(a&&a.layout){const{min:o,max:u}=a.layout.layoutBox[n],c=s.get()||0;s.set(t[n]-or(o,u,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!_d(n)||!r||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};vs(o=>{const u=this.getAxisMotionValue(o);if(u&&this.constraints!==!1){const c=u.get();a[o]=Q1e({min:c,max:c},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),vs(o=>{if(!Xm(o,t,null))return;const u=this.getAxisMotionValue(o),{min:c,max:d}=this.constraints[o];u.set(or(c,d,a[o]))})}addListeners(){if(!this.visualElement.current)return;ege.set(this.visualElement,this);const t=this.visualElement.current,n=Yd(t,"pointerdown",c=>{const{drag:d,dragListener:m=!0}=this.getProps(),p=c.target,b=p!==t&&dP(p);d&&m&&!b&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();_d(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,s=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Kn.read(r);const o=gf(window,"resize",()=>this.scalePositionWithinConstraints()),u=a.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(vs(m=>{const p=this.getAxisMotionValue(m);p&&(this.originPoint[m]+=c[m].translate,p.set(p.get()+c[m].translate))}),this.visualElement.render())}));return()=>{o(),n(),s(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:s=!1,dragElastic:o=Rv,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:a,dragConstraints:s,dragElastic:o,dragMomentum:u}}}function Xm(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function nge(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class rge extends xl{constructor(t){super(t),this.removeGroupControls=Ns,this.removeListeners=Ns,this.controls=new tge(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ns}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const dk=e=>(t,n)=>{e&&Kn.postRender(()=>e(t,n))};class age extends xl{constructor(){super(...arguments),this.removePointerDownListener=Ns}onPointerDown(t){this.session=new KP(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:XP(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:dk(t),onStart:dk(n),onMove:r,onEnd:(s,o)=>{delete this.session,a&&Kn.postRender(()=>a(s,o))}}}mount(){this.removePointerDownListener=Yd(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Kx=!1;class sge extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:a}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&a&&r.register(s),Kx&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),gp.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:a,isPresent:s}=this.props,{projection:o}=r;return o&&(o.isPresent=s,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Kx=!0,a||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||Kn.postRender(()=>{const u=o.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),y6.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:a}=t;Kx=!0,a&&(a.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(a),r&&r.deregister&&r.deregister(a))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ZP(e){const[t,n]=BP(),r=x.useContext(K3);return h.jsx(sge,{...e,layoutGroup:r,switchLayoutGroup:x.useContext(YP),isPresent:t,safeToRemove:n})}const ige={pan:{Feature:age},drag:{Feature:rge,ProjectionNode:zP,MeasureLayout:ZP}};function fk(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const a="onHover"+n,s=r[a];s&&Kn.postRender(()=>s(t,eh(t)))}class oge extends xl{mount(){const{current:t}=this.node;t&&(this.unmount=$me(t,(n,r)=>(fk(this.node,r,"Start"),a=>fk(this.node,a,"End"))))}unmount(){}}class lge extends xl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Qf(gf(this.node.current,"focus",()=>this.onFocus()),gf(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function hk(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const a="onTap"+(n==="End"?"":n),s=r[a];s&&Kn.postRender(()=>s(t,eh(t)))}class uge extends xl{mount(){const{current:t}=this.node;t&&(this.unmount=Gme(t,(n,r)=>(hk(this.node,r,"Start"),(a,{success:s})=>hk(this.node,a,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Mv=new WeakMap,Qx=new WeakMap,cge=e=>{const t=Mv.get(e.target);t&&t(e)},dge=e=>{e.forEach(cge)};function fge({root:e,...t}){const n=e||document;Qx.has(n)||Qx.set(n,{});const r=Qx.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(dge,{root:e,...t})),r[a]}function hge(e,t,n){const r=fge(t);return Mv.set(e,n),r.observe(e),()=>{Mv.delete(e),r.unobserve(e)}}const mge={some:0,all:1};class pge extends xl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:a="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:mge[a]},u=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,s&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:m,onViewportLeave:p}=this.node.getProps(),b=d?m:p;b&&b(c)};return hge(this.node.current,o,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(gge(t,n))&&this.startObserver()}unmount(){}}function gge({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const bge={inView:{Feature:pge},tap:{Feature:uge},focus:{Feature:lge},hover:{Feature:oge}},xge={layout:{ProjectionNode:zP,MeasureLayout:ZP}},yge={...$1e,...bge,...ige,...xge},bf=z1e(yge,B1e),vge=({children:e,as:t="p",className:n,duration:r=2,spread:a=2})=>{const s=bf.create(t),o=x.useMemo(()=>(e?.length??0)*a,[e,a]);return h.jsx(s,{animate:{backgroundPosition:"0% center"},className:me("relative inline-block bg-[length:250%_100%,auto] bg-clip-text text-transparent","[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--color-background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]",n),initial:{backgroundPosition:"100% center"},style:{"--spread":`${o}px`,backgroundImage:"var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))"},transition:{repeat:Number.POSITIVE_INFINITY,duration:r,ease:"linear"},children:e})},JP=x.memo(vge),ej=x.createContext(null),wge=()=>{const e=x.useContext(ej);if(!e)throw new Error("Reasoning components must be used within Reasoning");return e},Tge=1e3,Ege=1e3,tj=x.memo(({className:e,isStreaming:t=!1,open:n,defaultOpen:r=!0,onOpenChange:a,duration:s,disableAutoClose:o=!1,children:u,...c})=>{const[d,m]=Fa({prop:n,defaultProp:r,onChange:a}),[p,b]=Fa({prop:s,defaultProp:void 0}),[y,w]=x.useState(!1),[S,k]=x.useState(null);x.useEffect(()=>{t?S===null&&k(Date.now()):S!==null&&(b(Math.ceil((Date.now()-S)/Ege)),k(null))},[t,S,b]),x.useEffect(()=>{if(!o&&r&&!t&&d&&!y){const A=setTimeout(()=>{m(!1),w(!0)},Tge);return()=>clearTimeout(A)}},[t,d,r,m,y,o]);const E=A=>{m(A)};return h.jsx(ej.Provider,{value:{isStreaming:t,isOpen:d,setIsOpen:m,duration:p},children:h.jsx(rl,{className:me("not-prose mb-2",e),onOpenChange:E,open:d,...c,children:u})})}),Sge=(e,t)=>e||t===0?h.jsxs(h.Fragment,{children:["Thinking",h.jsx(JP,{as:"span",duration:1,className:"text-muted-foreground ml-0.5",children:"..."})]}):t===void 0?"Thought":`Thought for ${t}s`,nj=x.memo(({className:e,children:t,...n})=>{const{isStreaming:r,isOpen:a,duration:s}=wge();return h.jsx(eu,{className:me("flex items-center gap-1.5 text-sm text-muted-foreground cursor-pointer",e),...n,children:t??h.jsxs(h.Fragment,{children:[h.jsx(wA,{className:me("size-3.5 shrink-0 transition-colors",r?"text-amber-500 dark:text-amber-400 animate-pulse":"text-muted-foreground/60")}),h.jsx("span",{className:me("italic",r&&"text-foreground/70"),children:Sge(r,s)}),h.jsx(fu,{className:me("size-3 text-muted-foreground/50 transition-transform duration-200",a&&"rotate-90")})]})})}),rj=x.memo(({className:e,children:t,...n})=>{const r=XO(t);return h.jsx(tu,{className:me("pl-4 mt-1.5 text-sm text-muted-foreground border-l-2 border-border","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-1 data-[state=open]:slide-in-from-top-1 outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...n,children:h.jsx($3,{className:KO,components:QO,rehypePlugins:YO,remarkPlugins:WO,children:r})})});tj.displayName="Reasoning";nj.displayName="ReasoningTrigger";rj.displayName="ReasoningContent";const aj=x.memo(({className:e,steps:t,isRunning:n=!1,defaultOpen:r=!1,subagentType:a,...s})=>{const o=a?`${a.charAt(0).toUpperCase()+a.slice(1)} agent`:"Agent",[u,c]=x.useState(r),d=t.filter(p=>p.kind==="tool-call").length,m=t.some(p=>p.kind==="tool-call"&&p.status==="error");return h.jsxs(rl,{className:me("mt-2",e),open:u,onOpenChange:c,...s,children:[h.jsxs(eu,{className:"flex items-center gap-1.5 text-xs text-muted-foreground group cursor-pointer",children:[h.jsx("span",{className:me("size-1.5 rounded-full shrink-0",n?"bg-blue-500 animate-pulse":m?"bg-destructive":"bg-success")}),h.jsx("span",{children:n?h.jsxs(h.Fragment,{children:[o," working",h.jsx(JP,{as:"span",duration:1,className:"text-muted-foreground ml-0.5",children:"..."})]}):d>0?`${o} completed · ${d} tool call${d!==1?"s":""}`:`${o} completed`}),h.jsx(fu,{className:me("size-3 text-muted-foreground transition-transform duration-200",u&&"rotate-90")})]}),h.jsx(tu,{className:me("mt-1.5 space-y-0.5 border-l-2 border-border pl-3","data-[state=closed]:fade-out-0 data-[state=open]:slide-in-from-top-1 outline-none data-[state=closed]:animate-out data-[state=open]:animate-in"),children:t.map((p,b)=>h.jsx(Cge,{step:p},`sa-step-${b}`))})]})});aj.displayName="SubagentActivity";const Cge=({step:e})=>{switch(e.kind){case"thinking":return h.jsx("div",{className:"text-muted-foreground/60 italic text-xs line-clamp-2",children:e.text});case"text":return h.jsx("div",{className:"text-foreground/70 text-xs line-clamp-2",children:e.text});case"tool-call":return h.jsx(Nge,{step:e});default:return null}},kge=e=>{if(!e||typeof e!="object")return null;const t=["path","command","pattern","url","query","file_path"];for(const n of t){const r=e[n];if(typeof r=="string"&&r.length>0)return r.length>50?`${r.slice(0,50)}…`:r}return null},Age=e=>{switch(e){case"success":return h.jsx(fo,{className:"size-2.5 text-success shrink-0"});case"error":return h.jsx(rs,{className:"size-2.5 text-destructive shrink-0"});default:return h.jsx(ma,{className:"size-2.5 text-muted-foreground animate-spin shrink-0"})}},Nge=({step:e})=>{const[t,n]=x.useState(!1),r=kge(e.input),a=!!(e.output||e.errorText);return h.jsxs("div",{children:[h.jsxs("div",{className:me("flex items-center gap-1 text-xs",a&&"cursor-pointer"),onClick:()=>a&&n(!t),onKeyDown:s=>{a&&(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),n(!t))},role:a?"button":void 0,tabIndex:a?0:void 0,children:[Age(e.status),h.jsx("span",{className:"text-primary/80 font-medium",children:e.toolName}),r&&!t&&h.jsxs("span",{className:"text-muted-foreground truncate",children:["(",r,")"]}),a&&h.jsx(fu,{className:me("size-2.5 text-muted-foreground/50 transition-transform duration-200",t&&"rotate-90")})]}),t&&h.jsxs("div",{className:"ml-4 mt-0.5",children:[e.errorText&&h.jsx("pre",{className:"text-xs text-destructive whitespace-pre-wrap max-h-24 overflow-y-auto",children:e.errorText}),e.output&&!e.errorText&&h.jsx("pre",{className:"text-xs text-foreground/60 whitespace-pre-wrap max-h-24 overflow-y-auto",children:e.output.length>500?`${e.output.slice(0,500)}…`:e.output})]})]})},Yr=[];for(let e=0;e<256;++e)Yr.push((e+256).toString(16).slice(1));function _ge(e,t=0){return(Yr[e[t+0]]+Yr[e[t+1]]+Yr[e[t+2]]+Yr[e[t+3]]+"-"+Yr[e[t+4]]+Yr[e[t+5]]+"-"+Yr[e[t+6]]+Yr[e[t+7]]+"-"+Yr[e[t+8]]+Yr[e[t+9]]+"-"+Yr[e[t+10]]+Yr[e[t+11]]+Yr[e[t+12]]+Yr[e[t+13]]+Yr[e[t+14]]+Yr[e[t+15]]).toLowerCase()}let Zx;const Rge=new Uint8Array(16);function Mge(){if(!Zx){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Zx=crypto.getRandomValues.bind(crypto)}return Zx(Rge)}const Dge=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),mk={randomUUID:Dge};function Ige(e,t,n){e=e||{};const r=e.random??e.rng?.()??Mge();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,_ge(r)}function gc(e,t,n){return mk.randomUUID&&!e?mk.randomUUID():Ige(e)}function Tu(){return typeof navigator>"u"?!1:navigator.platform.toLowerCase().includes("mac")}const Oge=typeof navigator<"u"&&navigator.platform.toLowerCase().includes("mac");function s1(e){return Oge?e.metaKey:e.ctrlKey}function Br(){return""}const Lge=e=>`${e}-${gc()}`,Dv=e=>{const n=new Date().getTime()-e.getTime(),r=Math.floor(n/6e4);if(r<1)return"Just now";if(r<60)return`${r}m ago`;{const a=Math.floor(r/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}};let Jx=null;const sj=async()=>(Jx||(Jx=cu(()=>import("./index-DdIkp80K.js"),__vite__mapDeps([6,2,1,7]),import.meta.url)),Jx),Pge=x.lazy(async()=>({default:(await sj()).Diff})),jge=x.lazy(async()=>({default:(await sj()).Hunk})),zge=({result:e})=>h.jsx("div",{className:"my-2",children:h.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:e.images.map((t,n)=>h.jsxs("a",{href:t.original,target:"_blank",rel:"noopener noreferrer",className:"group relative overflow-hidden rounded-md border border-border/40 bg-card/20 transition-all hover:border-border hover:bg-card/40",children:[h.jsx("img",{src:t.clipThumbnail||t.thumbnail||t.original,alt:t.meta?.title||`Image ${n+1}`,className:"aspect-square w-full object-cover",onError:r=>{r.currentTarget.parentElement.style.display="none"}}),t.meta&&h.jsxs("div",{className:"absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/80 to-transparent p-2 opacity-0 transition-opacity group-hover:opacity-100",children:[t.meta.title&&h.jsx("div",{className:"text-xs font-medium text-white line-clamp-2",children:t.meta.title}),t.meta.source&&h.jsx("div",{className:"mt-0.5 text-xs text-white/80",children:t.meta.source})]})]},`${e.requestId}-${n}`))})}),Bge=({items:e})=>h.jsx("div",{className:"my-2 space-y-3",children:e.map(t=>h.jsxs("div",{className:"flex flex-col gap-3 rounded-md border border-border/40 bg-card/20 p-3 hover:bg-card/40 sm:flex-row",children:[t.thumbnailUrl&&h.jsx("a",{href:t.link,target:"_blank",rel:"noopener noreferrer",className:"flex-shrink-0",children:h.jsx("img",{src:t.thumbnailUrl,alt:t.title,width:80,height:80,className:"h-32 w-full rounded object-cover sm:h-20 sm:w-20",onError:n=>{n.currentTarget.parentElement.style.display="none"}})}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("a",{href:t.link,target:"_blank",rel:"noopener noreferrer",className:"font-medium text-foreground hover:text-primary text-sm line-clamp-2",children:t.title}),t.source&&h.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:t.source})]})]},t.link||t.title))}),Fge=({result:e})=>h.jsx("div",{className:"my-2 space-y-2",children:e.chunk.chunks.map((t,n)=>h.jsxs("div",{className:"rounded-md border border-border/40 bg-card/20 px-3 py-2 hover:bg-card/40",children:[h.jsxs("div",{className:"flex flex-col gap-1 sm:flex-row sm:items-baseline sm:justify-between sm:gap-2",children:[h.jsx("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"flex-1 font-medium text-foreground hover:text-primary text-sm line-clamp-1",children:t.title}),t.date&&h.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:t.date})]}),(t.siteName||t.labels&&t.labels.length>0)&&h.jsxs("div",{className:"mt-0.5 flex items-center gap-1.5",children:[t.siteName&&h.jsx("span",{className:"text-xs text-muted-foreground",children:t.siteName}),t.labels?.map(r=>h.jsxs("span",{className:"inline-flex items-center gap-0.5 rounded bg-muted/60 px-1 py-0.5 text-[10px]",title:r.hover,children:[r.icon&&h.jsx("img",{src:r.icon,alt:"",className:"h-2.5 w-2.5"}),r.text]},`${e.requestId}-${n}-${r.type}-${r.text}`))]}),h.jsx("p",{className:"mt-1 text-xs text-muted-foreground line-clamp-2",children:t.text})]},`${e.requestId}-${n}`))}),Hge=({result:e})=>h.jsx("div",{className:"my-2 space-y-2",children:e.chunkResult.chunks.map(t=>h.jsxs("div",{className:"rounded-md border border-border/40 bg-card/20 px-3 py-2 hover:bg-card/40",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[t.page.siteIcon&&h.jsx("img",{src:t.page.siteIcon,alt:"",className:"h-4 w-4 shrink-0 rounded-sm"}),h.jsx("a",{href:t.page.url,target:"_blank",rel:"noopener noreferrer",className:"flex-1 font-medium text-foreground hover:text-primary text-sm line-clamp-1",children:t.page.title})]}),t.page.siteName&&h.jsx("div",{className:"mt-0.5 text-xs text-muted-foreground",children:t.page.siteName}),h.jsx("p",{className:"mt-1 text-xs text-muted-foreground line-clamp-3",children:t.text})]},t.id))});function ij(e){if(typeof e!="object"||e===null)return!1;const t=e;return"old_text"in t&&"new_text"in t&&typeof t.old_text=="string"&&typeof t.new_text=="string"}let ey=null;const Uge=async()=>(ey||(ey=cu(()=>import("./index-DI2oedCt.js"),[],import.meta.url)),ey);function $ge(e,t,n){const r=e("file","file",t,n,"","");return r.hunks.length===0?null:{hunks:r.hunks.map(s=>{const o=[];let u=s.oldStart,c=s.newStart;for(const d of s.lines){if(d.startsWith("\\"))continue;const m=d[0],p=d.slice(1);m===" "?(o.push({type:"normal",isNormal:!0,oldLineNumber:u,newLineNumber:c,content:[{value:p,type:"normal"}]}),u+=1,c+=1):m==="-"?(o.push({type:"delete",isDelete:!0,lineNumber:u,content:[{value:p,type:"delete"}]}),u+=1):m==="+"&&(o.push({type:"insert",isInsert:!0,lineNumber:c,content:[{value:p,type:"insert"}]}),c+=1)}return{type:"hunk",content:`@@ -${s.oldStart},${s.oldLines} +${s.newStart},${s.newLines} @@`,oldStart:s.oldStart,oldLines:s.oldLines,newStart:s.newStart,newLines:s.newLines,lines:o}}),oldPath:"file",newPath:"file",type:"modify",oldEndingNewLine:!0,newEndingNewLine:!0,oldMode:"",newMode:"",oldRevision:"",newRevision:""}}const oj=({data:e})=>{const{old_text:t,new_text:n,path:r}=e;return h.jsxs("div",{className:"my-2 rounded-md border border-border/40 bg-card/20 px-3 py-2",children:[h.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono text-muted-foreground",children:[h.jsx("span",{className:"truncate flex-1",children:r||"diff"}),h.jsx("span",{className:"shrink-0 text-yellow-600 dark:text-yellow-400",children:"File too large for inline diff"})]}),h.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:[t," → ",n]})]})},lj=({data:e})=>{const[t,n]=x.useState(null),[r,a]=x.useState(!0),[s,o]=x.useState(!1),{old_text:u,new_text:c,path:d}=e;x.useEffect(()=>{let E=!1;return a(!0),n(null),(async()=>{const{structuredPatch:_}=await Uge(),I=$ge(_,u,c);E||(n(I),a(!1))})().catch(_=>{console.error("[DiffContent] Failed to load diff:",_),E||a(!1)}),()=>{E=!0}},[c,u]);const{addedLines:m,removedLines:p,totalLines:b,truncatedHunks:y}=x.useMemo(()=>{if(!t)return{addedLines:0,removedLines:0,totalLines:0,truncatedHunks:[]};let E=0,A=0,_=0;const I=5;for(const R of t.hunks)if(R.type==="hunk")for(const z of R.lines)_+=1,z.type==="insert"?E+=1:z.type==="delete"&&(A+=1);const P=[];let O=0;for(const R of t.hunks){if(R.type!=="hunk")continue;if(O>=I)break;const z=I-O,F=Math.min(R.lines.length,z);F>0&&(P.push({...R,lines:R.lines.slice(0,F)}),O+=F)}return{addedLines:E,removedLines:A,totalLines:_,truncatedHunks:P}},[t]),w=5,S=b>w,k=s?t?.hunks??[]:y;return r?h.jsx("div",{className:"my-2 rounded-md border border-border/40 bg-card/20 px-4 py-6 text-center text-sm text-muted-foreground",children:"Loading diff..."}):!t||b===0?h.jsx("div",{className:"my-2 rounded-md border border-border/40 bg-card/20 px-3 py-1.5 text-xs font-mono text-muted-foreground",children:d||"No changes"}):h.jsxs("div",{className:me("my-2 overflow-hidden rounded-md border border-border/40 bg-card/20","[&_td:nth-child(2)]:hidden"),children:[S?h.jsxs("button",{type:"button",className:me("flex w-full items-center justify-between gap-2 border-b border-border/40 bg-muted/30 px-3 py-1.5 text-left","cursor-pointer hover:bg-muted/50"),onClick:()=>o(!s),"aria-expanded":s,children:[h.jsx("span",{className:"text-xs font-mono text-muted-foreground truncate flex-1",children:d||"diff"}),h.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[m>0&&h.jsxs("span",{className:"text-xs text-green-600 dark:text-green-400",children:["+",m]}),p>0&&h.jsxs("span",{className:"text-xs text-orange-600 dark:text-orange-400",children:["-",p]}),h.jsx(ro,{className:me("size-3 text-muted-foreground transition-transform duration-200",s&&"rotate-180")})]})]}):h.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-border/40 bg-muted/30 px-3 py-1.5",children:[h.jsx("span",{className:"text-xs font-mono text-muted-foreground truncate flex-1",children:d||"diff"}),h.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[m>0&&h.jsxs("span",{className:"text-xs text-green-600 dark:text-green-400",children:["+",m]}),p>0&&h.jsxs("span",{className:"text-xs text-orange-600 dark:text-orange-400",children:["-",p]})]})]}),h.jsx(x.Suspense,{fallback:h.jsx("div",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:"Loading diff..."}),children:h.jsx(Pge,{hunks:k,type:t.type,children:k.map(E=>h.jsx(jge,{hunk:E},E.content))})}),!s&&S&&h.jsxs("button",{type:"button",className:"w-full border-t border-border/40 bg-muted/20 px-3 py-1.5 text-center text-xs text-muted-foreground cursor-pointer hover:bg-muted/40",onClick:()=>o(!0),children:["Show ",b-w," more lines..."]})]})},Iv=({data:e})=>h.jsx("div",{className:"my-2 rounded-md bg-muted/40 p-3 text-xs",children:h.jsx("pre",{className:"whitespace-pre-wrap font-mono",children:JSON.stringify(e,null,2)})}),uj=({text:e})=>h.jsx("div",{className:"my-2 rounded-md bg-muted/40 p-3 text-sm",children:h.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs",children:e})}),qge=({blob:e,mimeType:t,filename:n,uri:r})=>{const[a,s]=x.useState(!1);return h.jsxs("div",{className:"my-2",children:[r&&h.jsxs("div",{className:"mb-1 text-xs text-muted-foreground",children:["Generated: ",n]}),a?h.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border/40 bg-muted px-3 py-2 text-xs text-muted-foreground",children:["Failed to load image: ",n]}):h.jsx("img",{src:`data:${t};base64,${e}`,alt:n,className:"h-auto max-w-full overflow-hidden rounded-md border border-border/40",onError:()=>s(!0)})]})},Vge=({uri:e,filename:t})=>h.jsxs("div",{className:"my-2 rounded-md bg-muted/40 p-3 text-sm",children:[h.jsx("div",{className:"font-medium text-foreground",children:"Generated image"}),h.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:["File: ",t]}),h.jsx("div",{className:"mt-1 break-all font-mono text-xs opacity-70",children:e})]}),Gge=({uri:e,mimeType:t})=>h.jsxs("div",{className:"my-2 rounded-md bg-muted/40 p-3 text-sm text-muted-foreground",children:[h.jsx("div",{className:"font-medium",children:"Resource:"}),h.jsx("div",{className:"mt-1 break-all font-mono text-xs",children:e}),t&&h.jsxs("div",{className:"mt-1 text-xs opacity-70",children:["Type: ",t]})]});function Yge(e){if(typeof e!="object"||e===null)return!1;const t=e;if(!("requestId"in t&&"chunk"in t))return!1;const{chunk:n}=t;if(typeof n!="object"||n===null)return!1;const r=n;return"chunks"in r&&Array.isArray(r.chunks)}function Wge(e){if(typeof e!="object"||e===null)return!1;const t=e;return"requestId"in t&&"images"in t&&Array.isArray(t.images)}function Xge(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return typeof t=="object"&&t!==null&&"imageUrl"in t}function Kge(e){if(typeof e!="object"||e===null)return!1;const t=e,n="data"in t&&typeof t.data=="object"&&t.data!==null?t.data:t;if(!("requestId"in n&&"chunkResult"in n))return!1;const{chunkResult:r}=n;if(typeof r!="object"||r===null)return!1;const a=r;return"chunks"in a&&Array.isArray(a.chunks)}function Qge(e){const t=e;return"data"in t&&typeof t.data=="object"&&t.data!==null&&"chunkResult"in t.data?t.data:e}const Zge=({content:e})=>{try{const t=JSON.parse(e.text);return Yge(t)?h.jsx(Fge,{result:t}):Wge(t)?h.jsx(zge,{result:t}):Xge(t)?h.jsx(Bge,{items:t}):ij(t)?t.is_summary?h.jsx(oj,{data:t}):h.jsx(lj,{data:t}):h.jsx(Iv,{data:t})}catch{return h.jsx(uj,{text:e.text})}},Jge=({content:e})=>{const{uri:t,mimeType:n,blob:r,text:a}=e.resource;if(n?.startsWith("image/")){if(r){const s=t?.split("/").pop()||"Generated image";return h.jsx(qge,{blob:r,mimeType:n,filename:s,uri:t})}if(t){const s=t.split("/").pop()||"image";return h.jsx(Vge,{uri:t,filename:s})}}return n?.startsWith("text/")&&a?h.jsx(uj,{text:a}):t?h.jsx(Gge,{uri:t,mimeType:n}):null},e2e=({content:e})=>{const[t,n]=x.useState(!1),r=e.mimeType||"image/png";return h.jsx("div",{className:"my-2",children:t?h.jsx("div",{className:"flex items-center gap-2 rounded-md border border-border/40 bg-muted px-3 py-2 text-xs text-muted-foreground",children:"Failed to load image"}):h.jsx("img",{src:`data:${r};base64,${e.data}`,alt:"Generated output",className:"h-auto max-w-full overflow-hidden rounded-md border border-border/40",onError:()=>n(!0)})})};function t2e(e){if(typeof e!="object"||e===null)return!1;const t=e;return"data"in t&&typeof t.data=="object"&&t.data!==null}function n2e(e){if(typeof e!="object"||e===null)return!1;const t=e;return t.type==="image"&&typeof t.data=="string"}const cj=({data:e})=>{if(t2e(e))return h.jsx(cj,{data:e.data});if(n2e(e))return h.jsx(e2e,{content:e});const t=e;return t.type==="text"?h.jsx(Zge,{content:t}):t.type==="resource"?h.jsx(Jge,{content:t}):null},r2e=({data:e})=>h.jsx(Fc,{code:e.command,language:e.language||"bash"}),a2e=e=>e==="completed"||e==="done",s2e=({data:e})=>h.jsx("div",{className:"my-2 divide-y divide-border/40 rounded-md border border-border/50 text-sm",children:e.items.map((t,n)=>{const r=t.content||t.title||"",a=a2e(t.status),s=t.status==="in_progress";return h.jsxs("div",{className:"flex items-start gap-2.5 px-3 py-2",children:[h.jsx("span",{className:"mt-0.5 shrink-0",children:a?h.jsx(iA,{className:"size-3.5 text-muted-foreground"}):s?h.jsx(XU,{className:"size-3.5 text-muted-foreground/60"}):h.jsx(oA,{className:"size-3.5 text-muted-foreground/30"})}),h.jsx("span",{className:me(a&&"text-muted-foreground line-through decoration-muted-foreground/40",!(a||s)&&"text-muted-foreground/70"),children:r})]},`${n}-${r}`)})}),i2e=({src:e})=>{const[t,n]=x.useState(!1);return h.jsx("div",{className:"my-2",children:t?h.jsx("div",{className:"flex items-center gap-2 rounded-md border border-border/40 bg-muted px-3 py-2 text-xs text-muted-foreground",children:"Failed to load image"}):h.jsx("img",{src:e,alt:"Generated content",className:"h-auto max-w-full overflow-hidden rounded-md border border-border/40",onError:()=>n(!0)})})},o2e=({item:e})=>{switch(e.type){case"mcp_content":return h.jsx(cj,{data:e.data});case"image":return h.jsx(i2e,{src:String(e.data)});case"search_response":return Kge(e.data)?h.jsx(Hge,{result:Qge(e.data)}):h.jsxs("div",{className:"my-2 rounded-md bg-muted/40 p-3 text-xs",children:[h.jsxs("div",{className:"mb-1 font-medium text-muted-foreground",children:["Display type: ",e.type]}),h.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs opacity-70",children:JSON.stringify(e.data,null,2)})]});case"diff":return ij(e)?e.is_summary?h.jsx(oj,{data:e}):h.jsx(lj,{data:e}):h.jsxs("div",{className:"my-2 rounded-md bg-muted/40 p-3 text-xs",children:[h.jsxs("div",{className:"mb-1 font-medium text-muted-foreground",children:["Display type: ",e.type]}),h.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs opacity-70",children:JSON.stringify(e.data,null,2)})]});case"shell":{const t=e.data??e;return t.command?h.jsx(r2e,{data:t}):h.jsx(Iv,{data:e.data})}case"todo":{const t=e.data??e;return t.items&&Array.isArray(t.items)?h.jsx(s2e,{data:t}):h.jsx(Iv,{data:e.data})}case"brief":{const t=e,n=t.text??String(t.data??"");return h.jsx("pre",{className:"whitespace-pre-wrap text-xs",children:n})}default:return h.jsxs("div",{className:"my-2 rounded-md bg-muted/40 p-3 text-xs",children:[h.jsxs("div",{className:"mb-1 font-medium text-muted-foreground",children:["Display type: ",e.type]}),h.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs opacity-70",children:JSON.stringify(e.data,null,2)})]})}},l2e=({className:e,display:t,...n})=>!t||t.length===0?null:h.jsx("div",{className:me("space-y-2",e),...n,children:t.map((r,a)=>h.jsx(o2e,{item:r},`${r.type}-${a}`))}),u2e=x.createContext({isOpen:!1}),c2e=({className:e,defaultOpen:t,...n})=>h.jsx(u2e.Provider,{value:{isOpen:t??!1},children:h.jsx(rl,{className:me("not-prose mb-1 w-full text-sm",e),defaultOpen:t,...n})}),d2e=e=>{switch(e){case"input-streaming":case"input-available":return h.jsx(ma,{className:"size-3 text-muted-foreground animate-spin"});case"approval-requested":case"question-requested":return h.jsx(ma,{className:"size-3 text-warning animate-spin"});case"approval-responded":case"question-responded":case"output-available":return h.jsx(fo,{className:"size-3 text-success"});case"output-error":return h.jsx(rs,{className:"size-3 text-destructive"});case"output-denied":return h.jsx(U$,{className:"size-3 text-warning"});default:return null}},f2e=e=>{if(!e||typeof e!="object")return null;const t=Object.entries(e);if(t.length===0)return null;const n=["path","command","pattern","url","query"];for(const a of n){const s=e[a];if(typeof s=="string"&&s.length>0)return s.length>50?`${s.slice(0,50)}…`:s}const r=t.find(([,a])=>typeof a=="string");if(r){const a=r[1];return a.length>50?`${a.slice(0,50)}…`:a}return null},h2e={ReadFile:h.jsx(fA,{className:"size-3.5"}),ReadMediaFile:h.jsx(C$,{className:"size-3.5"}),WriteFile:h.jsx(KE,{className:"size-3.5"}),StrReplaceFile:h.jsx(KE,{className:"size-3.5"}),Glob:h.jsx(m$,{className:"size-3.5"}),Grep:h.jsx(Nf,{className:"size-3.5"}),Shell:h.jsx(n4,{className:"size-3.5"}),SearchWeb:h.jsx(v$,{className:"size-3.5"}),FetchURL:h.jsx(_$,{className:"size-3.5"}),Task:h.jsx(xq,{className:"size-3.5"}),CreateSubagent:h.jsx(sA,{className:"size-3.5"}),Think:h.jsx(t4,{className:"size-3.5"}),SetTodoList:h.jsx(M$,{className:"size-3.5"}),SendDMail:h.jsx(z$,{className:"size-3.5"})},m2e={ReadFile:"Read",ReadMediaFile:"Read Media",WriteFile:"Write",StrReplaceFile:"Edit",Glob:"Find Files",Grep:"Search",Shell:"Shell",SearchWeb:"Web Search",FetchURL:"Fetch URL",Task:"Agent Task",CreateSubagent:"Create Agent",Think:"Think",SetTodoList:"Todo List",SendDMail:"Send Mail"},p2e=({className:e,title:t,type:n,state:r,input:a,...s})=>{const o=t??n.split("-").slice(1).join("-"),u=m2e[o]??o,c=h2e[o],d=f2e(a),m=o==="FetchURL"&&a&&typeof a=="object"&&typeof a.url=="string"?a.url:null,p=x.useCallback(b=>{m&&(b.metaKey||b.ctrlKey)&&(b.stopPropagation(),b.preventDefault(),window.open(m,"_blank","noopener,noreferrer"))},[m]);return h.jsxs(eu,{className:me("flex items-center gap-1.5 text-sm group",e),...s,children:[c?h.jsx("span",{className:"text-muted-foreground shrink-0",children:c}):h.jsx("span",{className:"size-2 rounded-full bg-muted-foreground/60 shrink-0"}),h.jsx("span",{className:"text-primary font-medium",children:u}),d&&h.jsxs("span",{className:me("text-muted-foreground group-data-[state=open]:hidden",m&&"cursor-pointer hover:underline"),title:m?Tu()?"⌘+Click to open URL":"Ctrl+Click to open URL":void 0,onClick:m?p:void 0,children:["(",d,")"]}),h.jsx("span",{className:"ml-0.5",children:d2e(r)})]})},g2e=({className:e,display:t,isError:n,...r})=>!t||t.length===0?null:h.jsx("div",{className:me("mt-1 pl-4",n&&"text-destructive",e),...r,children:h.jsx(l2e,{display:t})}),b2e=({className:e,...t})=>h.jsx(tu,{className:me("pl-4 mt-1 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-1 data-[state=open]:slide-in-from-top-1 outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),x2e=/[\x1b\x9b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nq-uy=><~]/g,N6=e=>e.replace(x2e,""),y2e=e=>({command:"bash",content:"text",code:"text",old_string:"text",new_string:"text"})[e]??"text",pk=e=>{if(e.valueType==="boolean"||e.valueType==="number")return!0;if(e.valueType==="object")return!1;const t=N6(e.fullValue);return t.length<=120&&!t.includes(`
|
|
453
|
+
`)},v2e=e=>{if(!e||typeof e!="object")return[];const t=Object.entries(e);return t.map(([n,r],a)=>{let s,o,u=!1,c="string";if(typeof r=="string"){const d=N6(r);o=d,s=d,(d.length>120||d.includes(`
|
|
454
|
+
`))&&(u=!0)}else typeof r=="boolean"?(c="boolean",s=String(r),o=s):typeof r=="number"?(c="number",s=String(r),o=s):typeof r=="object"&&r!==null?(c="object",o=JSON.stringify(r,null,2),s=JSON.stringify(r),u=!0):(s=String(r),o=s);return{key:n,value:s,fullValue:o,isTruncated:u,valueType:c,isLast:a===t.length-1}})},w2e=e=>{switch(e){case"boolean":return"text-blue-500 dark:text-blue-400";case"number":return"text-amber-600 dark:text-amber-400";default:return"text-foreground/80"}},T2e=({param:e})=>h.jsxs("div",{className:"flex items-baseline gap-2",children:[h.jsx("span",{className:"text-muted-foreground shrink-0 select-none",children:e.key}),h.jsx("span",{className:w2e(e.valueType),children:e.valueType==="string"?h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-muted-foreground/50",children:'"'}),e.value,h.jsx("span",{className:"text-muted-foreground/50",children:'"'})]}):e.value})]}),E2e=({param:e})=>{const[t,n]=x.useState(!1),r=e.valueType==="object"?"json":y2e(e.key),a=e.valueType==="object"?e.fullValue:N6(e.fullValue),s=a.split(`
|
|
455
|
+
`)[0].slice(0,80);return h.jsxs("div",{className:"space-y-1",children:[h.jsxs("div",{className:"flex items-baseline gap-2 cursor-pointer group",onClick:()=>n(!t),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),n(!t))},role:"button",tabIndex:0,children:[h.jsx("span",{className:"text-muted-foreground shrink-0 select-none",children:e.key}),h.jsx(fu,{className:me("size-3 shrink-0 text-muted-foreground transition-transform duration-200",t&&"rotate-90")}),!t&&h.jsxs("span",{className:"text-foreground/40 truncate group-hover:text-foreground/60",children:[s,a.length>80?"...":""]})]}),t&&h.jsx("div",{className:"ml-4",children:h.jsx(Fc,{code:a,language:r})})]})},S2e=({className:e,input:t,...n})=>{const r=x.useMemo(()=>v2e(t),[t]);if(r.length===0)return null;const a=r.filter(pk),s=r.filter(o=>!pk(o));return h.jsxs("div",{className:me("space-y-1 text-xs font-mono",e),...n,children:[a.length>0&&h.jsx("div",{className:"space-y-0.5",children:a.map(o=>h.jsx(T2e,{param:o},o.key))}),s.map(o=>h.jsx(E2e,{param:o},o.key))]})},C2e=new Set(["http:","https:","data:","blob:"]),k2e=e=>{if(e.startsWith("/"))return!0;try{const t=new URL(e);return C2e.has(t.protocol)}catch{return!1}},A2e=({part:e,onPreview:t})=>{const[n,r]=x.useState(!1),a=e.type==="video_url",s=B1(a?e.url:void 0),o=a?"Video":"Image";return h.jsxs("div",{className:"group relative size-24 overflow-hidden rounded-lg border border-border cursor-zoom-in",onClick:()=>t(e),onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),t(e))},role:"button",tabIndex:0,children:[n?h.jsx("div",{className:"size-full flex items-center justify-center bg-muted",children:h.jsx(mA,{className:"size-5 text-muted-foreground"})}):a?h.jsx("video",{className:"size-full object-cover",height:160,poster:s??void 0,preload:"metadata",src:e.url,width:160,muted:!0,playsInline:!0,onError:()=>r(!0)}):h.jsx("img",{alt:"Tool output",className:"size-full object-cover",height:160,src:e.url,width:160,onError:()=>r(!0)}),h.jsx("span",{className:"pointer-events-none absolute bottom-2 right-2 rounded bg-black/70 px-1.5 py-0.5 text-[10px] font-semibold leading-none text-white shadow-sm",children:o})]})},N2e=({className:e,mediaParts:t,...n})=>{const[r,a]=x.useState(null),[s,o]=x.useState(!1),u=B1(r?.type==="video_url"?r.url:void 0),c=x.useMemo(()=>t?.filter(p=>k2e(p.url))??[],[t]),d=x.useCallback(p=>{o(!1),a(p)},[]),m=x.useCallback(p=>{p||a(null)},[]);return c.length===0?null:h.jsxs("div",{className:me("mt-1 ml-4 flex flex-wrap gap-2",e),...n,children:[c.map((p,b)=>h.jsx(A2e,{part:p,onPreview:d},`media-${b}`)),h.jsx(e0,{open:r!==null,onOpenChange:m,children:h.jsxs(t0,{className:"max-w-[min(95vw,1100px)] overflow-hidden p-0 sm:max-w-[min(95vw,1100px)]",showCloseButton:!0,children:[h.jsx(Pf,{className:"sr-only",children:h.jsx(n0,{children:"Media preview"})}),h.jsx("div",{className:"bg-background",children:s?h.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-muted-foreground",children:[h.jsx(mA,{className:"size-8"}),h.jsx("span",{className:"text-sm",children:"Failed to load media"})]}):r?.type==="image_url"?h.jsx("img",{alt:"Full size preview",className:"block max-h-[88vh] w-full object-contain",src:r.url,onError:()=>o(!0)}):r?.type==="video_url"?h.jsx("video",{className:"block max-h-[88vh] w-full object-contain",src:r.url,controls:!0,poster:u??void 0,autoPlay:!0,playsInline:!0,onError:()=>o(!0)}):null})]})})]})},_2e=({className:e,output:t,errorText:n,message:r,...a})=>{const s=!!(t||n),o=!!r;if(!s&&!o)return null;const u=!!n;let c=null;if(s){let d=h.jsx("div",{className:"text-sm",children:t});typeof t=="object"&&!x.isValidElement(t)?d=h.jsx(Fc,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(t.length>200?d=h.jsx(Fc,{code:t,language:"text"}):d=h.jsx("pre",{className:"whitespace-pre-wrap text-xs text-foreground/80",children:t})),c=h.jsxs("div",{className:"text-xs font-mono",children:[h.jsx("span",{className:u?"text-destructive":"text-muted-foreground",children:u?"error:":"result:"}),h.jsxs("div",{className:me("ml-4 mt-0.5 rounded text-xs",u?"text-destructive":""),children:[n&&h.jsx("div",{className:"text-destructive",children:n}),d]})]})}return h.jsxs("div",{className:me("mt-1 space-y-1",e),...a,children:[c,o&&h.jsxs("div",{className:"text-xs font-mono",children:[h.jsx("span",{className:"text-muted-foreground",children:"message:"}),h.jsx("div",{className:"ml-4 mt-0.5 text-xs text-foreground/80",children:r})]})]})};function R2e(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const M2e=e=>{switch(e){case"success":return O2e;case"info":return P2e;case"warning":return L2e;case"error":return j2e;default:return null}},D2e=Array(12).fill(0),I2e=({visible:e,className:t})=>ge.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ge.createElement("div",{className:"sonner-spinner"},D2e.map((n,r)=>ge.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),O2e=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ge.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),L2e=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ge.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),P2e=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ge.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),j2e=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ge.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),z2e=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ge.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ge.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),B2e=()=>{const[e,t]=ge.useState(document.hidden);return ge.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Ov=1;class F2e{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...a}=t,s=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Ov++,o=this.toasts.find(c=>c.id===s),u=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(c=>c.id===s?(this.publish({...c,...t,id:s,title:r}),{...c,...t,id:s,dismissible:u,title:r}):c):this.addToast({title:r,...a,dismissible:u,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const a=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,o;const u=a.then(async d=>{if(o=["resolve",d],ge.isValidElement(d))s=!1,this.create({id:r,type:"default",message:d});else if(U2e(d)&&!d.ok){s=!1;const p=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,b=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,w=typeof p=="object"&&!ge.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:b,...w})}else if(d instanceof Error){s=!1;const p=typeof n.error=="function"?await n.error(d):n.error,b=typeof n.description=="function"?await n.description(d):n.description,w=typeof p=="object"&&!ge.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:b,...w})}else if(n.success!==void 0){s=!1;const p=typeof n.success=="function"?await n.success(d):n.success,b=typeof n.description=="function"?await n.description(d):n.description,w=typeof p=="object"&&!ge.isValidElement(p)?p:{message:p};this.create({id:r,type:"success",description:b,...w})}}).catch(async d=>{if(o=["reject",d],n.error!==void 0){s=!1;const m=typeof n.error=="function"?await n.error(d):n.error,p=typeof n.description=="function"?await n.description(d):n.description,y=typeof m=="object"&&!ge.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:p,...y})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((d,m)=>u.then(()=>o[0]==="reject"?m(o[1]):d(o[1])).catch(m));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=n?.id||Ov++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const La=new F2e,H2e=(e,t)=>{const n=t?.id||Ov++;return La.addToast({title:e,...t,id:n}),n},U2e=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",$2e=H2e,q2e=()=>La.toasts,V2e=()=>La.getActiveToasts(),Cn=Object.assign($2e,{success:La.success,info:La.info,warning:La.warning,error:La.error,custom:La.custom,message:La.message,promise:La.promise,dismiss:La.dismiss,loading:La.loading},{getHistory:q2e,getToasts:V2e});R2e("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Km(e){return e.label!==void 0}const G2e=3,Y2e="24px",W2e="16px",gk=4e3,X2e=356,K2e=14,Q2e=45,Z2e=200;function ti(...e){return e.filter(Boolean).join(" ")}function J2e(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const ebe=e=>{var t,n,r,a,s,o,u,c,d;const{invert:m,toast:p,unstyled:b,interacting:y,setHeights:w,visibleToasts:S,heights:k,index:E,toasts:A,expanded:_,removeToast:I,defaultRichColors:P,closeButton:O,style:R,cancelButtonStyle:z,actionButtonStyle:F,className:U="",descriptionClassName:X="",duration:W,position:le,gap:se,expandByDefault:ie,classNames:$,icons:K,closeButtonAriaLabel:Z="Close toast"}=e,[re,j]=ge.useState(null),[H,G]=ge.useState(null),[L,ae]=ge.useState(!1),[oe,Se]=ge.useState(!1),[be,fe]=ge.useState(!1),[Ne,at]=ge.useState(!1),[Ce,Re]=ge.useState(!1),[Ee,we]=ge.useState(0),[Oe,ze]=ge.useState(0),Ge=ge.useRef(p.duration||W||gk),it=ge.useRef(null),At=ge.useRef(null),st=E===0,Ft=E+1<=S,Nt=p.type,qt=p.dismissible!==!1,Ht=p.className||"",Mn=p.descriptionClassName||"",ke=ge.useMemo(()=>k.findIndex(Je=>Je.toastId===p.id)||0,[k,p.id]),Be=ge.useMemo(()=>{var Je;return(Je=p.closeButton)!=null?Je:O},[p.closeButton,O]),xt=ge.useMemo(()=>p.duration||W||gk,[p.duration,W]),Et=ge.useRef(0),Ze=ge.useRef(0),Rt=ge.useRef(0),mn=ge.useRef(null),[Qe,_t]=le.split("-"),vn=ge.useMemo(()=>k.reduce((Je,Vt,nn)=>nn>=ke?Je:Je+Vt.height,0),[k,ke]),an=B2e(),lr=p.invert||m,mr=Nt==="loading";Ze.current=ge.useMemo(()=>ke*se+vn,[ke,vn]),ge.useEffect(()=>{Ge.current=xt},[xt]),ge.useEffect(()=>{ae(!0)},[]),ge.useEffect(()=>{const Je=At.current;if(Je){const Vt=Je.getBoundingClientRect().height;return ze(Vt),w(nn=>[{toastId:p.id,height:Vt,position:p.position},...nn]),()=>w(nn=>nn.filter(Zn=>Zn.toastId!==p.id))}},[w,p.id]),ge.useLayoutEffect(()=>{if(!L)return;const Je=At.current,Vt=Je.style.height;Je.style.height="auto";const nn=Je.getBoundingClientRect().height;Je.style.height=Vt,ze(nn),w(Zn=>Zn.find(Ln=>Ln.toastId===p.id)?Zn.map(Ln=>Ln.toastId===p.id?{...Ln,height:nn}:Ln):[{toastId:p.id,height:nn,position:p.position},...Zn])},[L,p.title,p.description,w,p.id,p.jsx,p.action,p.cancel]);const Qr=ge.useCallback(()=>{Se(!0),we(Ze.current),w(Je=>Je.filter(Vt=>Vt.toastId!==p.id)),setTimeout(()=>{I(p)},Z2e)},[p,I,w,Ze]);ge.useEffect(()=>{if(p.promise&&Nt==="loading"||p.duration===1/0||p.type==="loading")return;let Je;return _||y||an?(()=>{if(Rt.current<Et.current){const Zn=new Date().getTime()-Et.current;Ge.current=Ge.current-Zn}Rt.current=new Date().getTime()})():Ge.current!==1/0&&(Et.current=new Date().getTime(),Je=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Qr()},Ge.current)),()=>clearTimeout(Je)},[_,y,p,Nt,an,Qr]),ge.useEffect(()=>{p.delete&&(Qr(),p.onDismiss==null||p.onDismiss.call(p,p))},[Qr,p.delete]);function $e(){var Je;if(K?.loading){var Vt;return ge.createElement("div",{className:ti($?.loader,p==null||(Vt=p.classNames)==null?void 0:Vt.loader,"sonner-loader"),"data-visible":Nt==="loading"},K.loading)}return ge.createElement(I2e,{className:ti($?.loader,p==null||(Je=p.classNames)==null?void 0:Je.loader),visible:Nt==="loading"})}const tt=p.icon||K?.[Nt]||M2e(Nt);var Tt,Mt;return ge.createElement("li",{tabIndex:0,ref:At,className:ti(U,Ht,$?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,$?.default,$?.[Nt],p==null||(n=p.classNames)==null?void 0:n[Nt]),"data-sonner-toast":"","data-rich-colors":(Tt=p.richColors)!=null?Tt:P,"data-styled":!(p.jsx||p.unstyled||b),"data-mounted":L,"data-promise":!!p.promise,"data-swiped":Ce,"data-removed":oe,"data-visible":Ft,"data-y-position":Qe,"data-x-position":_t,"data-index":E,"data-front":st,"data-swiping":be,"data-dismissible":qt,"data-type":Nt,"data-invert":lr,"data-swipe-out":Ne,"data-swipe-direction":H,"data-expanded":!!(_||ie&&L),"data-testid":p.testId,style:{"--index":E,"--toasts-before":E,"--z-index":A.length-E,"--offset":`${oe?Ee:Ze.current}px`,"--initial-height":ie?"auto":`${Oe}px`,...R,...p.style},onDragEnd:()=>{fe(!1),j(null),mn.current=null},onPointerDown:Je=>{Je.button!==2&&(mr||!qt||(it.current=new Date,we(Ze.current),Je.target.setPointerCapture(Je.pointerId),Je.target.tagName!=="BUTTON"&&(fe(!0),mn.current={x:Je.clientX,y:Je.clientY})))},onPointerUp:()=>{var Je,Vt,nn;if(Ne||!qt)return;mn.current=null;const Zn=Number(((Je=At.current)==null?void 0:Je.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ca=Number(((Vt=At.current)==null?void 0:Vt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ln=new Date().getTime()-((nn=it.current)==null?void 0:nn.getTime()),Ur=re==="x"?Zn:ca,Xs=Math.abs(Ur)/Ln;if(Math.abs(Ur)>=Q2e||Xs>.11){we(Ze.current),p.onDismiss==null||p.onDismiss.call(p,p),G(re==="x"?Zn>0?"right":"left":ca>0?"down":"up"),Qr(),at(!0);return}else{var Zr,Jr;(Zr=At.current)==null||Zr.style.setProperty("--swipe-amount-x","0px"),(Jr=At.current)==null||Jr.style.setProperty("--swipe-amount-y","0px")}Re(!1),fe(!1),j(null)},onPointerMove:Je=>{var Vt,nn,Zn;if(!mn.current||!qt||((Vt=window.getSelection())==null?void 0:Vt.toString().length)>0)return;const Ln=Je.clientY-mn.current.y,Ur=Je.clientX-mn.current.x;var Xs;const Zr=(Xs=e.swipeDirections)!=null?Xs:J2e(le);!re&&(Math.abs(Ur)>1||Math.abs(Ln)>1)&&j(Math.abs(Ur)>Math.abs(Ln)?"x":"y");let Jr={x:0,y:0};const Va=Lr=>1/(1.5+Math.abs(Lr)/20);if(re==="y"){if(Zr.includes("top")||Zr.includes("bottom"))if(Zr.includes("top")&&Ln<0||Zr.includes("bottom")&&Ln>0)Jr.y=Ln;else{const Lr=Ln*Va(Ln);Jr.y=Math.abs(Lr)<Math.abs(Ln)?Lr:Ln}}else if(re==="x"&&(Zr.includes("left")||Zr.includes("right")))if(Zr.includes("left")&&Ur<0||Zr.includes("right")&&Ur>0)Jr.x=Ur;else{const Lr=Ur*Va(Ur);Jr.x=Math.abs(Lr)<Math.abs(Ur)?Lr:Ur}(Math.abs(Jr.x)>0||Math.abs(Jr.y)>0)&&Re(!0),(nn=At.current)==null||nn.style.setProperty("--swipe-amount-x",`${Jr.x}px`),(Zn=At.current)==null||Zn.style.setProperty("--swipe-amount-y",`${Jr.y}px`)}},Be&&!p.jsx&&Nt!=="loading"?ge.createElement("button",{"aria-label":Z,"data-disabled":mr,"data-close-button":!0,onClick:mr||!qt?()=>{}:()=>{Qr(),p.onDismiss==null||p.onDismiss.call(p,p)},className:ti($?.closeButton,p==null||(r=p.classNames)==null?void 0:r.closeButton)},(Mt=K?.close)!=null?Mt:z2e):null,(Nt||p.icon||p.promise)&&p.icon!==null&&(K?.[Nt]!==null||p.icon)?ge.createElement("div",{"data-icon":"",className:ti($?.icon,p==null||(a=p.classNames)==null?void 0:a.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||$e():null,p.type!=="loading"?tt:null):null,ge.createElement("div",{"data-content":"",className:ti($?.content,p==null||(s=p.classNames)==null?void 0:s.content)},ge.createElement("div",{"data-title":"",className:ti($?.title,p==null||(o=p.classNames)==null?void 0:o.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?ge.createElement("div",{"data-description":"",className:ti(X,Mn,$?.description,p==null||(u=p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),ge.isValidElement(p.cancel)?p.cancel:p.cancel&&Km(p.cancel)?ge.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||z,onClick:Je=>{Km(p.cancel)&&qt&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Je),Qr())},className:ti($?.cancelButton,p==null||(c=p.classNames)==null?void 0:c.cancelButton)},p.cancel.label):null,ge.isValidElement(p.action)?p.action:p.action&&Km(p.action)?ge.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||F,onClick:Je=>{Km(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Je),!Je.defaultPrevented&&Qr())},className:ti($?.actionButton,p==null||(d=p.classNames)==null?void 0:d.actionButton)},p.action.label):null)};function bk(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function tbe(e,t){const n={};return[e,t].forEach((r,a)=>{const s=a===1,o=s?"--mobile-offset":"--offset",u=s?W2e:Y2e;function c(d){["top","right","bottom","left"].forEach(m=>{n[`${o}-${m}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${o}-${d}`]=u:n[`${o}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):c(u)}),n}const nbe=ge.forwardRef(function(t,n){const{id:r,invert:a,position:s="bottom-right",hotkey:o=["altKey","KeyT"],expand:u,closeButton:c,className:d,offset:m,mobileOffset:p,theme:b="light",richColors:y,duration:w,style:S,visibleToasts:k=G2e,toastOptions:E,dir:A=bk(),gap:_=K2e,icons:I,containerAriaLabel:P="Notifications"}=t,[O,R]=ge.useState([]),z=ge.useMemo(()=>r?O.filter(L=>L.toasterId===r):O.filter(L=>!L.toasterId),[O,r]),F=ge.useMemo(()=>Array.from(new Set([s].concat(z.filter(L=>L.position).map(L=>L.position)))),[z,s]),[U,X]=ge.useState([]),[W,le]=ge.useState(!1),[se,ie]=ge.useState(!1),[$,K]=ge.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Z=ge.useRef(null),re=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),j=ge.useRef(null),H=ge.useRef(!1),G=ge.useCallback(L=>{R(ae=>{var oe;return(oe=ae.find(Se=>Se.id===L.id))!=null&&oe.delete||La.dismiss(L.id),ae.filter(({id:Se})=>Se!==L.id)})},[]);return ge.useEffect(()=>La.subscribe(L=>{if(L.dismiss){requestAnimationFrame(()=>{R(ae=>ae.map(oe=>oe.id===L.id?{...oe,delete:!0}:oe))});return}setTimeout(()=>{Qv.flushSync(()=>{R(ae=>{const oe=ae.findIndex(Se=>Se.id===L.id);return oe!==-1?[...ae.slice(0,oe),{...ae[oe],...L},...ae.slice(oe+1)]:[L,...ae]})})})}),[O]),ge.useEffect(()=>{if(b!=="system"){K(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window>"u")return;const L=window.matchMedia("(prefers-color-scheme: dark)");try{L.addEventListener("change",({matches:ae})=>{K(ae?"dark":"light")})}catch{L.addListener(({matches:oe})=>{try{K(oe?"dark":"light")}catch(Se){console.error(Se)}})}},[b]),ge.useEffect(()=>{O.length<=1&&le(!1)},[O]),ge.useEffect(()=>{const L=ae=>{var oe;if(o.every(fe=>ae[fe]||ae.code===fe)){var be;le(!0),(be=Z.current)==null||be.focus()}ae.code==="Escape"&&(document.activeElement===Z.current||(oe=Z.current)!=null&&oe.contains(document.activeElement))&&le(!1)};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},[o]),ge.useEffect(()=>{if(Z.current)return()=>{j.current&&(j.current.focus({preventScroll:!0}),j.current=null,H.current=!1)}},[Z.current]),ge.createElement("section",{ref:n,"aria-label":`${P} ${re}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},F.map((L,ae)=>{var oe;const[Se,be]=L.split("-");return z.length?ge.createElement("ol",{key:L,dir:A==="auto"?bk():A,tabIndex:-1,ref:Z,className:d,"data-sonner-toaster":!0,"data-sonner-theme":$,"data-y-position":Se,"data-x-position":be,style:{"--front-toast-height":`${((oe=U[0])==null?void 0:oe.height)||0}px`,"--width":`${X2e}px`,"--gap":`${_}px`,...S,...tbe(m,p)},onBlur:fe=>{H.current&&!fe.currentTarget.contains(fe.relatedTarget)&&(H.current=!1,j.current&&(j.current.focus({preventScroll:!0}),j.current=null))},onFocus:fe=>{fe.target instanceof HTMLElement&&fe.target.dataset.dismissible==="false"||H.current||(H.current=!0,j.current=fe.relatedTarget)},onMouseEnter:()=>le(!0),onMouseMove:()=>le(!0),onMouseLeave:()=>{se||le(!1)},onDragEnd:()=>le(!1),onPointerDown:fe=>{fe.target instanceof HTMLElement&&fe.target.dataset.dismissible==="false"||ie(!0)},onPointerUp:()=>ie(!1)},z.filter(fe=>!fe.position&&ae===0||fe.position===L).map((fe,Ne)=>{var at,Ce;return ge.createElement(ebe,{key:fe.id,icons:I,index:Ne,toast:fe,defaultRichColors:y,duration:(at=E?.duration)!=null?at:w,className:E?.className,descriptionClassName:E?.descriptionClassName,invert:a,visibleToasts:k,closeButton:(Ce=E?.closeButton)!=null?Ce:c,interacting:se,position:L,style:E?.style,unstyled:E?.unstyled,classNames:E?.classNames,cancelButtonStyle:E?.cancelButtonStyle,actionButtonStyle:E?.actionButtonStyle,closeButtonAriaLabel:E?.closeButtonAriaLabel,removeToast:G,toasts:z.filter(Re=>Re.position==fe.position),heights:U.filter(Re=>Re.position==fe.position),setHeights:X,expandByDefault:u,gap:_,expanded:W,swipeDirections:t.swipeDirections})})):null}))});function $n(e,t="Assertion error"){if(!e)throw Error(t)}function Yc({group:e}){const{orientation:t,panels:n}=e;return n.reduce((r,a)=>(r+=t==="horizontal"?a.element.offsetWidth:a.element.offsetHeight,r),0)}function Lv(e,t){return t.sort(e==="horizontal"?rbe:abe)}function rbe(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return n!==0?n:e.element.offsetWidth-t.element.offsetWidth}function abe(e,t){const n=e.element.offsetTop-t.element.offsetTop;return n!==0?n:e.element.offsetHeight-t.element.offsetHeight}function dj(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function fj(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function sbe({orientation:e,rects:t,targetRect:n}){const r={x:n.x+n.width/2,y:n.y+n.height/2};let a,s=Number.MAX_VALUE;for(const o of t){const{x:u,y:c}=fj(r,o),d=e==="horizontal"?u:c;d<s&&(s=d,a=o)}return $n(a,"No rect found"),a}let Qm;function ibe(){return Qm===void 0&&(typeof matchMedia=="function"?Qm=!!matchMedia("(pointer:coarse)").matches:Qm=!1),Qm}function hj(e){const{element:t,orientation:n,panels:r,separators:a}=e,s=Lv(n,Array.from(t.children).filter(dj).map(m=>({element:m}))).map(({element:m})=>m),o=[];let u=!1,c,d=[];for(const m of s)if(m.hasAttribute("data-panel")){const p=r.find(b=>b.element===m);if(p){if(c){const b=c.element.getBoundingClientRect(),y=m.getBoundingClientRect();let w;if(u){const S=n==="horizontal"?new DOMRect(b.right,b.top,0,b.height):new DOMRect(b.left,b.bottom,b.width,0),k=n==="horizontal"?new DOMRect(y.left,y.top,0,y.height):new DOMRect(y.left,y.top,y.width,0);switch(d.length){case 0:{w=[S,k];break}case 1:{const E=d[0],A=sbe({orientation:n,rects:[b,y],targetRect:E.element.getBoundingClientRect()});w=[E,A===b?k:S];break}default:{w=d;break}}}else d.length?w=d:w=[n==="horizontal"?new DOMRect(b.right,y.top,y.left-b.right,y.height):new DOMRect(y.left,b.bottom,y.width,y.top-b.bottom)];for(const S of w){let k="width"in S?S:S.element.getBoundingClientRect();const E=ibe()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(k.width<E){const A=E-k.width;k=new DOMRect(k.x-A/2,k.y,k.width+A,k.height)}if(k.height<E){const A=E-k.height;k=new DOMRect(k.x,k.y-A/2,k.width,k.height+A)}o.push({group:e,groupSize:Yc({group:e}),panels:[c,p],separator:"width"in S?void 0:S,rect:k})}}u=!1,c=p,d=[]}}else if(m.hasAttribute("data-separator")){const p=a.find(b=>b.element===m);p?d.push(p):(c=void 0,d=[])}else u=!0;return o}function obe(e,t){const n=getComputedStyle(e),r=parseFloat(n.fontSize);return t*r}function lbe(e,t){const n=getComputedStyle(e.ownerDocument.body),r=parseFloat(n.fontSize);return t*r}function ube(e){return e/100*window.innerHeight}function cbe(e){return e/100*window.innerWidth}function dbe(e){switch(typeof e){case"number":return[e,"px"];case"string":{const t=parseFloat(e);return e.endsWith("%")?[t,"%"]:e.endsWith("px")?[t,"px"]:e.endsWith("rem")?[t,"rem"]:e.endsWith("em")?[t,"em"]:e.endsWith("vh")?[t,"vh"]:e.endsWith("vw")?[t,"vw"]:[t,"%"]}}}function Zm({groupSize:e,panelElement:t,styleProp:n}){let r;const[a,s]=dbe(n);switch(s){case"%":{r=a/100*e;break}case"px":{r=a;break}case"rem":{r=lbe(t,a);break}case"em":{r=obe(t,a);break}case"vh":{r=ube(a);break}case"vw":{r=cbe(a);break}}return r}function Fs(e){return parseFloat(e.toFixed(3))}function xk(e){const{panels:t}=e,n=Yc({group:e});return n===0?t.map(r=>({collapsedSize:0,collapsible:r.panelConstraints.collapsible===!0,defaultSize:void 0,minSize:0,maxSize:100,panelId:r.id})):t.map(r=>{const{element:a,panelConstraints:s}=r;let o=0;if(s.collapsedSize!==void 0){const m=Zm({groupSize:n,panelElement:a,styleProp:s.collapsedSize});o=Fs(m/n*100)}let u;if(s.defaultSize!==void 0){const m=Zm({groupSize:n,panelElement:a,styleProp:s.defaultSize});u=Fs(m/n*100)}let c=0;if(s.minSize!==void 0){const m=Zm({groupSize:n,panelElement:a,styleProp:s.minSize});c=Fs(m/n*100)}let d=100;if(s.maxSize!==void 0){const m=Zm({groupSize:n,panelElement:a,styleProp:s.maxSize});d=Fs(m/n*100)}return{collapsedSize:o,collapsible:s.collapsible===!0,defaultSize:u,minSize:c,maxSize:d,panelId:r.id}})}let fbe=class{#e={};addListener(t,n){const r=this.#e[t];return r===void 0?this.#e[t]=[n]:r.includes(n)||r.push(n),()=>{this.removeListener(t,n)}}emit(t,n){const r=this.#e[t];if(r!==void 0)if(r.length===1)r[0].call(null,n);else{let a=!1,s=null;const o=Array.from(r);for(let u=0;u<o.length;u++){const c=o[u];try{c.call(null,n)}catch(d){s===null&&(a=!0,s=d)}}if(a)throw s}}removeAllListeners(){this.#e={}}removeListener(t,n){const r=this.#e[t];if(r!==void 0){const a=r.indexOf(n);a>=0&&r.splice(a,1)}}};function ha(e,t,n=0){return Math.abs(Fs(e)-Fs(t))<=n}let ys={cursorFlags:0,interactionState:{state:"inactive"},mountedGroups:new Map};const Wd=new fbe;function os(){return ys}function ja(e){const t=typeof e=="function"?e(ys):e;if(ys===t)return ys;const n=ys;return ys={...ys,...t},t.cursorFlags!==void 0&&Wd.emit("cursorFlagsChange",ys.cursorFlags),t.interactionState!==void 0&&Wd.emit("interactionStateChange",ys.interactionState),t.mountedGroups!==void 0&&(ys.mountedGroups.forEach((r,a)=>{r.derivedPanelConstraints.forEach(s=>{if(s.collapsible){const{layout:o}=n.mountedGroups.get(a)??{};if(o){const u=ha(s.collapsedSize,r.layout[s.panelId]),c=ha(s.collapsedSize,o[s.panelId]);u&&!c&&(a.inMemoryLastExpandedPanelSizes[s.panelId]=o[s.panelId])}}})}),Wd.emit("mountedGroupsChange",ys.mountedGroups)),ys}function hbe(e,t,n){let r,a={x:1/0,y:1/0};for(const s of t){const o=fj(n,s.rect);switch(e){case"horizontal":{o.x<=a.x&&(r=s,a=o);break}case"vertical":{o.y<=a.y&&(r=s,a=o);break}}}return r?{distance:a,hitRegion:r}:void 0}function mbe(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function pbe(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:wk(e),b:wk(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;$n(r,"Stacking order can only be calculated for elements with a common ancestor");const a={a:vk(yk(n.a)),b:vk(yk(n.b))};if(a.a===a.b){const s=r.childNodes,o={a:n.a.at(-1),b:n.b.at(-1)};let u=s.length;for(;u--;){const c=s[u];if(c===o.a)return 1;if(c===o.b)return-1}}return Math.sign(a.a-a.b)}const gbe=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function bbe(e){const t=getComputedStyle(mj(e)??e).display;return t==="flex"||t==="inline-flex"}function xbe(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||bbe(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||gbe.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function yk(e){let t=e.length;for(;t--;){const n=e[t];if($n(n,"Missing node"),xbe(n))return n}return null}function vk(e){return e&&Number(getComputedStyle(e).zIndex)||0}function wk(e){const t=[];for(;e;)t.push(e),e=mj(e);return t}function mj(e){const{parentNode:t}=e;return mbe(t)?t.host:t}function ybe(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function vbe({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!dj(n)||n.contains(e)||e.contains(n))return!0;if(pbe(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(ybe(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function _6(e,t){const n=[];return t.forEach((r,a)=>{if(a.disabled)return;const s=hj(a),o=hbe(a.orientation,s,{x:e.clientX,y:e.clientY});o&&o.distance.x<=0&&o.distance.y<=0&&vbe({groupElement:a.element,hitRegion:o.hitRegion.rect,pointerEventTarget:e.target})&&n.push(o.hitRegion)}),n}function wbe(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function xf(e,t){return ha(e,t)?0:e>t?1:-1}function Tc({panelConstraints:e,size:t}){const{collapsedSize:n=0,collapsible:r,maxSize:a=100,minSize:s=0}=e;if(xf(t,s)<0)if(r){const o=(n+s)/2;xf(t,o)<0?t=n:t=s}else t=s;return t=Math.min(a,t),t=Fs(t),t}function R6({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:a,trigger:s}){if(ha(e,0))return t;const o=Object.values(t),u=Object.values(a),c=[...o],[d,m]=r;$n(d!=null,"Invalid first pivot index"),$n(m!=null,"Invalid second pivot index");let p=0;if(s==="keyboard"){{const w=e<0?m:d,S=n[w];$n(S,`Panel constraints not found for index ${w}`);const{collapsedSize:k=0,collapsible:E,minSize:A=0}=S;if(E){const _=o[w];if($n(_!=null,`Previous layout not found for panel index ${w}`),ha(_,k)){const I=A-_;xf(I,Math.abs(e))>0&&(e=e<0?0-I:I)}}}{const w=e<0?d:m,S=n[w];$n(S,`No panel constraints found for index ${w}`);const{collapsedSize:k=0,collapsible:E,minSize:A=0}=S;if(E){const _=o[w];if($n(_!=null,`Previous layout not found for panel index ${w}`),ha(_,A)){const I=_-k;xf(I,Math.abs(e))>0&&(e=e<0?0-I:I)}}}}{const w=e<0?1:-1;let S=e<0?m:d,k=0;for(;;){const A=o[S];$n(A!=null,`Previous layout not found for panel index ${S}`);const _=Tc({panelConstraints:n[S],size:100})-A;if(k+=_,S+=w,S<0||S>=n.length)break}const E=Math.min(Math.abs(e),Math.abs(k));e=e<0?0-E:E}{let w=e<0?d:m;for(;w>=0&&w<n.length;){const S=Math.abs(e)-Math.abs(p),k=o[w];$n(k!=null,`Previous layout not found for panel index ${w}`);const E=k-S,A=Tc({panelConstraints:n[w],size:E});if(!ha(k,A)&&(p+=k-A,c[w]=A,p.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?w--:w++}}if(wbe(u,c))return a;{const w=e<0?m:d,S=o[w];$n(S!=null,`Previous layout not found for panel index ${w}`);const k=S+p,E=Tc({panelConstraints:n[w],size:k});if(c[w]=E,!ha(E,k)){let A=k-E,_=e<0?m:d;for(;_>=0&&_<n.length;){const I=c[_];$n(I!=null,`Previous layout not found for panel index ${_}`);const P=I+A,O=Tc({panelConstraints:n[_],size:P});if(ha(I,O)||(A-=O-I,c[_]=O),ha(A,0))break;e>0?_--:_++}}}const b=Object.values(c).reduce((w,S)=>S+w,0);if(!ha(b,100,.1))return a;const y=Object.keys(a);return c.reduce((w,S,k)=>(w[y[k]]=S,w),{})}function lu(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(t[n]===void 0||xf(e[n],t[n])!==0)return!1;return!0}function yf({layout:e,panelConstraints:t}){const n=[...Object.values(e)],r=n.reduce((o,u)=>o+u,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(o=>`${o}%`).join(", ")}`);if(!ha(r,100)&&n.length>0)for(let o=0;o<t.length;o++){const u=n[o];$n(u!=null,`No layout data found for index ${o}`);const c=100/r*u;n[o]=c}let a=0;for(let o=0;o<t.length;o++){const u=n[o];$n(u!=null,`No layout data found for index ${o}`);const c=Tc({panelConstraints:t[o],size:u});u!=c&&(a+=u-c,n[o]=c)}if(!ha(a,0))for(let o=0;o<t.length;o++){const u=n[o];$n(u!=null,`No layout data found for index ${o}`);const c=u+a,d=Tc({panelConstraints:t[o],size:c});if(u!==d&&(a-=d-u,n[o]=d,ha(a,0)))break}const s=Object.keys(e);return n.reduce((o,u,c)=>(o[s[c]]=u,o),{})}function pj({groupId:e,panelId:t}){const n=()=>{const{mountedGroups:u}=os();for(const[c,{defaultLayoutDeferred:d,derivedPanelConstraints:m,layout:p,separatorToPanels:b}]of u)if(c.id===e)return{defaultLayoutDeferred:d,derivedPanelConstraints:m,group:c,layout:p,separatorToPanels:b};throw Error(`Group ${e} not found`)},r=()=>{const u=n().derivedPanelConstraints.find(c=>c.panelId===t);if(u!==void 0)return u;throw Error(`Panel constraints not found for Panel ${t}`)},a=()=>{const u=n().group.panels.find(c=>c.id===t);if(u!==void 0)return u;throw Error(`Layout not found for Panel ${t}`)},s=()=>{const u=n().layout[t];if(u!==void 0)return u;throw Error(`Layout not found for Panel ${t}`)},o=u=>{const c=s();if(u===c)return;const{defaultLayoutDeferred:d,derivedPanelConstraints:m,group:p,layout:b,separatorToPanels:y}=n(),w=p.panels.findIndex(A=>A.id===t),S=w===p.panels.length-1,k=R6({delta:S?c-u:u-c,initialLayout:b,panelConstraints:m,pivotIndices:S?[w-1,w]:[w,w+1],prevLayout:b,trigger:"imperative-api"}),E=yf({layout:k,panelConstraints:m});lu(b,E)||ja(A=>({mountedGroups:new Map(A.mountedGroups).set(p,{defaultLayoutDeferred:d,derivedPanelConstraints:m,layout:E,separatorToPanels:y})}))};return{collapse:()=>{const{collapsible:u,collapsedSize:c}=r(),{mutableValues:d}=a(),m=s();u&&m!==c&&(d.expandToSize=m,o(c))},expand:()=>{const{collapsible:u,collapsedSize:c,minSize:d}=r(),{mutableValues:m}=a(),p=s();if(u&&p===c){let b=m.expandToSize??d;b===0&&(b=1),o(b)}},getSize:()=>{const{group:u}=n(),c=s(),{element:d}=a(),m=u.orientation==="horizontal"?d.offsetWidth:d.offsetHeight;return{asPercentage:c,inPixels:m}},isCollapsed:()=>{const{collapsible:u,collapsedSize:c}=r(),d=s();return u&&ha(c,d)},resize:u=>{if(s()!==u){let c;switch(typeof u){case"number":{const{group:d}=n(),m=Yc({group:d});c=Fs(u/m*100);break}case"string":{c=parseFloat(u);break}}o(c)}}}}function Tk(e){if(e.defaultPrevented)return;const{mountedGroups:t}=os();_6(e,t).forEach(n=>{if(n.separator){const r=n.panels.find(a=>a.panelConstraints.defaultSize!==void 0);if(r){const a=r.panelConstraints.defaultSize,s=pj({groupId:n.group.id,panelId:r.id});s&&a!==void 0&&(s.resize(a),e.preventDefault())}}})}function bp(e){const{mountedGroups:t}=os();for(const[n]of t)if(n.separators.some(r=>r.element===e))return n;throw Error("Could not find parent Group for separator element")}function gj({groupId:e}){const t=()=>{const{mountedGroups:n}=os();for(const[r,a]of n)if(r.id===e)return{group:r,...a};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){const{defaultLayoutDeferred:n,layout:r}=t();return n?{}:r},setLayout(n){const{defaultLayoutDeferred:r,derivedPanelConstraints:a,group:s,layout:o,separatorToPanels:u}=t(),c=yf({layout:n,panelConstraints:a});return r?o:(lu(o,c)||ja(d=>({mountedGroups:new Map(d.mountedGroups).set(s,{defaultLayoutDeferred:r,derivedPanelConstraints:a,layout:c,separatorToPanels:u})})),c)}}}function bj(e){const{mountedGroups:t}=os(),n=t.get(e);return $n(n,`Mounted Group ${e.id} not found`),n}function Vl(e,t){const n=bp(e),r=bj(n),a=n.separators.find(m=>m.element===e);$n(a,"Matching separator not found");const s=r.separatorToPanels.get(a);$n(s,"Matching panels not found");const o=s.map(m=>n.panels.indexOf(m)),u=gj({groupId:n.id}).getLayout(),c=R6({delta:t,initialLayout:u,panelConstraints:r.derivedPanelConstraints,pivotIndices:o,prevLayout:u,trigger:"keyboard"}),d=yf({layout:c,panelConstraints:r.derivedPanelConstraints});lu(u,d)||ja(m=>({mountedGroups:new Map(m.mountedGroups).set(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,layout:d,separatorToPanels:r.separatorToPanels})}))}function Ek(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=bp(t);if(!n.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),n.orientation==="vertical"&&Vl(t,5);break}case"ArrowLeft":{e.preventDefault(),n.orientation==="horizontal"&&Vl(t,-5);break}case"ArrowRight":{e.preventDefault(),n.orientation==="horizontal"&&Vl(t,5);break}case"ArrowUp":{e.preventDefault(),n.orientation==="vertical"&&Vl(t,-5);break}case"End":{e.preventDefault(),Vl(t,100);break}case"Enter":{e.preventDefault();const r=bp(t),{derivedPanelConstraints:a,layout:s,separatorToPanels:o}=bj(r),u=r.separators.find(p=>p.element===t);$n(u,"Matching separator not found");const c=o.get(u);$n(c,"Matching panels not found");const d=c[0],m=a.find(p=>p.panelId===d.id);if($n(m,"Panel metadata not found"),m.collapsible){const p=s[d.id],b=m.collapsedSize===p?r.inMemoryLastExpandedPanelSizes[d.id]??m.minSize:m.collapsedSize;Vl(t,b-p)}break}case"F6":{e.preventDefault();const r=bp(t).separators.map(o=>o.element),a=Array.from(r).findIndex(o=>o===e.currentTarget);$n(a!==null,"Index not found");const s=e.shiftKey?a>0?a-1:r.length-1:a+1<r.length?a+1:0;r[s].focus();break}case"Home":{e.preventDefault(),Vl(t,-100);break}}}function Sk(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{mountedGroups:t}=os(),n=_6(e,t),r=new Set,a=new Set,s=new Set,o=new Map;let u=!1;n.forEach(c=>{r.add(c.group),c.panels.forEach(m=>{a.add(m)}),c.separator&&(s.add(c.separator),u||(u=!0,c.separator.element.focus()));const d=t.get(c.group);d&&o.set(c.group,d.layout)}),ja({interactionState:{hitRegions:n,initialLayoutMap:o,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}}),n.length&&e.preventDefault()}const Tbe=e=>e,ty=()=>{},xj=1,yj=2,vj=4,wj=8,Ck=3,kk=12;let Jm;function Ak(){return Jm===void 0&&(Jm=!1,typeof window<"u"&&(window.navigator.userAgent.includes("Chrome")||window.navigator.userAgent.includes("Firefox"))&&(Jm=!0)),Jm}function Ebe({cursorFlags:e,groups:t,state:n}){let r=0,a=0;switch(n){case"active":case"hover":t.forEach(s=>{if(!s.disableCursor)switch(s.orientation){case"horizontal":{r++;break}case"vertical":{a++;break}}})}if(r===0&&a===0)return null;switch(n){case"active":{if(e&&Ak()){const s=(e&xj)!==0,o=(e&yj)!==0,u=(e&vj)!==0,c=(e&wj)!==0;if(s)return u?"se-resize":c?"ne-resize":"e-resize";if(o)return u?"sw-resize":c?"nw-resize":"w-resize";if(u)return"s-resize";if(c)return"n-resize"}break}}return Ak()?r>0&&a>0?"move":r>0?"ew-resize":"ns-resize":r>0&&a>0?"grab":r>0?"col-resize":"row-resize"}const Nk=new WeakMap;function M6(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=Nk.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets.push(n));const{cursorFlags:r,interactionState:a}=os();switch(a.state){case"active":case"hover":{const s=Ebe({cursorFlags:r,groups:a.hitRegions.map(u=>u.group),state:a.state}),o=`*, *:hover {cursor: ${s} !important; ${a.state==="active"?"touch-action: none;":""} }`;if(t===o)return;t=o,s?n.cssRules.length===0?n.insertRule(o):n.replaceSync(o):n.cssRules.length===1&&n.deleteRule(0);break}case"inactive":{t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}}Nk.set(e,{prevStyle:t,styleSheet:n})}function Tj({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:a,pointerDownAtPoint:s,prevCursorFlags:o}){let u=0;const c=new Map(a);n.forEach(m=>{const{group:p,groupSize:b}=m,{disableCursor:y,orientation:w,panels:S}=p;let k=0;s?w==="horizontal"?k=(t.clientX-s.x)/b*100:k=(t.clientY-s.y)/b*100:w==="horizontal"?k=t.clientX<0?-100:100:k=t.clientY<0?-100:100;const E=r.get(p),{defaultLayoutDeferred:A,derivedPanelConstraints:_,layout:I,separatorToPanels:P}=a.get(p)??{defaultLayoutDeferred:!1};if(_&&E&&I&&P){const O=R6({delta:k,initialLayout:E,panelConstraints:_,pivotIndices:m.panels.map(R=>S.indexOf(R)),prevLayout:I,trigger:"mouse-or-touch"});if(lu(O,I)){if(k!==0&&!y)switch(w){case"horizontal":{u|=k<0?xj:yj;break}case"vertical":{u|=k<0?vj:wj;break}}}else{c.set(m.group,{defaultLayoutDeferred:A,derivedPanelConstraints:_,layout:O,separatorToPanels:P});const R=m.group.panels.map(({id:z})=>z).join(",");m.group.inMemoryLayouts[R]=O}}});let d=0;t.movementX===0?d|=o&Ck:d|=u&Ck,t.movementY===0?d|=o&kk:d|=u&kk,ja({cursorFlags:d,mountedGroups:c}),M6(e)}function _k(e){const{cursorFlags:t,interactionState:n,mountedGroups:r}=os();n.state==="active"&&Tj({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:r,prevCursorFlags:t})}function Rk(e){if(e.defaultPrevented)return;const{cursorFlags:t,interactionState:n,mountedGroups:r}=os();switch(n.state){case"active":{if(e.buttons===0){ja(a=>a.interactionState.state==="inactive"?a:{cursorFlags:0,interactionState:{state:"inactive"}}),ja(a=>({mountedGroups:new Map(a.mountedGroups)}));return}Tj({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:r,pointerDownAtPoint:n.pointerDownAtPoint,prevCursorFlags:t});break}default:{const a=_6(e,r);a.length===0?n.state!=="inactive"&&ja({interactionState:{state:"inactive"}}):ja({interactionState:{hitRegions:a,state:"hover"}}),M6(e.currentTarget);break}}}function Mk(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{interactionState:t}=os();t.state==="active"&&(ja({cursorFlags:0,interactionState:{state:"inactive"}}),t.hitRegions.length>0&&(M6(e.currentTarget),ja(n=>({mountedGroups:new Map(n.mountedGroups)})),e.preventDefault()))}function Dk(e){let t=0,n=0;const r={};for(const s of e)if(s.defaultSize!==void 0){t++;const o=Fs(s.defaultSize);n+=o,r[s.panelId]=o}else r[s.panelId]=void 0;const a=e.length-t;if(a!==0){const s=Fs((100-n)/a);for(const o of e)o.defaultSize===void 0&&(r[o.panelId]=s)}return r}function Sbe(e,t,n){if(!n[0])return;const r=e.panels.find(c=>c.element===t);if(!r||!r.onResize)return;const a=Yc({group:e}),s=e.orientation==="horizontal"?r.element.offsetWidth:r.element.offsetHeight,o=r.mutableValues.prevSize,u={asPercentage:Fs(s/a*100),inPixels:s};r.mutableValues.prevSize=u,r.onResize(u,r.id,o)}function Cbe(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function kbe(e,t){const n=e.map(a=>a.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(const a of n)if(!r.includes(a))return!1;return!0}const dc=new Map;function Abe(e){let t=!0;$n(e.element.ownerDocument.defaultView,"Cannot register an unmounted Group");const n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,a=new Set,s=new n(w=>{for(const S of w){const{borderBoxSize:k,target:E}=S;if(E===e.element){if(t){if(Yc({group:e})===0)return;ja(A=>{const _=A.mountedGroups.get(e);if(_){const I=xk(e),P=_.defaultLayoutDeferred?Dk(I):_.layout,O=yf({layout:P,panelConstraints:I});return!_.defaultLayoutDeferred&&lu(P,O)&&Cbe(_.derivedPanelConstraints,I)?A:{mountedGroups:new Map(A.mountedGroups).set(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:I,layout:O,separatorToPanels:_.separatorToPanels})}}return A})}}else Sbe(e,E,k)}});s.observe(e.element),e.panels.forEach(w=>{$n(!r.has(w.id),`Panel ids must be unique; id "${w.id}" was used more than once`),r.add(w.id),w.onResize&&s.observe(w.element)});const o=Yc({group:e}),u=xk(e),c=e.panels.map(({id:w})=>w).join(",");let d=e.defaultLayout;d&&(kbe(e.panels,d)||(d=void 0));const m=e.inMemoryLayouts[c]??d??Dk(u),p=yf({layout:m,panelConstraints:u}),b=hj(e),y=e.element.ownerDocument;return ja(w=>{const S=new Map;return dc.set(y,(dc.get(y)??0)+1),b.forEach(k=>{k.separator&&S.set(k.separator,k.panels)}),{mountedGroups:new Map(w.mountedGroups).set(e,{defaultLayoutDeferred:o===0,derivedPanelConstraints:u,layout:p,separatorToPanels:S})}}),e.separators.forEach(w=>{$n(!a.has(w.id),`Separator ids must be unique; id "${w.id}" was used more than once`),a.add(w.id),w.element.addEventListener("keydown",Ek)}),dc.get(y)===1&&(y.addEventListener("dblclick",Tk,!0),y.addEventListener("pointerdown",Sk,!0),y.addEventListener("pointerleave",_k),y.addEventListener("pointermove",Rk),y.addEventListener("pointerup",Mk,!0)),function(){t=!1,dc.set(y,Math.max(0,(dc.get(y)??0)-1)),ja(w=>{const S=new Map(w.mountedGroups);return S.delete(e),{mountedGroups:S}}),e.separators.forEach(w=>{w.element.removeEventListener("keydown",Ek)}),dc.get(y)||(y.removeEventListener("dblclick",Tk,!0),y.removeEventListener("pointerdown",Sk,!0),y.removeEventListener("pointerleave",_k),y.removeEventListener("pointermove",Rk),y.removeEventListener("pointerup",Mk,!0)),s.disconnect()}}function Ej(){const[e,t]=x.useState({}),n=x.useCallback(()=>t({}),[]);return[e,n]}function Sj(e){const t=x.useId();return`${e??t}`}const p0=typeof window<"u"?x.useLayoutEffect:x.useEffect;function Xd(e){const t=x.useRef(e);return p0(()=>{t.current=e},[e]),x.useCallback((...n)=>t.current?.(...n),[t])}function Cj(...e){return Xd(t=>{e.forEach(n=>{if(n)switch(typeof n){case"function":{n(t);break}case"object":{n.current=t;break}}})})}function Nbe(e){const t=x.useRef({...e});return p0(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const kj=x.createContext(null);function _be(e,t){const n=x.useRef({getLayout:()=>({}),setLayout:Tbe});x.useImperativeHandle(t,()=>n.current,[]),p0(()=>{Object.assign(n.current,gj({groupId:e}))})}function Aj({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:a,elementRef:s,groupRef:o,id:u,onLayoutChange:c,onLayoutChanged:d,orientation:m="horizontal",resizeTargetMinimumSize:p={coarse:20,fine:10},style:b,...y}){const w=x.useRef({onLayoutChange:{},onLayoutChanged:{}}),S=Xd(X=>{lu(w.current.onLayoutChange,X)||(w.current.onLayoutChange=X,c?.(X))}),k=Xd(X=>{lu(w.current.onLayoutChanged,X)||(w.current.onLayoutChanged=X,d?.(X))}),E=Sj(u),A=x.useRef(null),[_,I]=Ej(),P=x.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:p,separators:[]}),O=Cj(A,s);_be(E,o);const R=Xd((X,W)=>{const{interactionState:le,mountedGroups:se}=os();for(const ie of se.keys())if(ie.id===X){const $=se.get(ie);if($){let K=!1;return le.state==="active"&&(K=le.hitRegions.some(Z=>Z.group===ie)),{flexGrow:$.layout[W]??1,pointerEvents:K?"none":void 0}}}return{flexGrow:n?.[W]??1}}),z=x.useMemo(()=>({getPanelStyles:R,id:E,orientation:m,registerPanel:X=>{const W=P.current;return W.panels=Lv(m,[...W.panels,X]),I(),()=>{W.panels=W.panels.filter(le=>le!==X),I()}},registerSeparator:X=>{const W=P.current;return W.separators=Lv(m,[...W.separators,X]),I(),()=>{W.separators=W.separators.filter(le=>le!==X),I()}}}),[R,E,I,m]),F=Nbe({defaultLayout:n,disableCursor:r}),U=x.useRef(null);return p0(()=>{const X=A.current;if(X===null)return;const W=P.current,le={defaultLayout:F.defaultLayout,disableCursor:!!F.disableCursor,disabled:!!a,element:X,id:E,inMemoryLastExpandedPanelSizes:P.current.lastExpandedPanelSizes,inMemoryLayouts:P.current.layouts,orientation:m,panels:W.panels,resizeTargetMinimumSize:W.resizeTargetMinimumSize,separators:W.separators};U.current=le;const se=Abe(le),ie=os().mountedGroups.get(le);if(ie){const{defaultLayoutDeferred:Z,derivedPanelConstraints:re,layout:j}=ie;!Z&&re.length>0&&(S(j),k(j),W.panels.forEach(H=>{H.scheduleUpdate()}))}const $=Wd.addListener("interactionStateChange",()=>{W.panels.forEach(Z=>{Z.scheduleUpdate()})}),K=Wd.addListener("mountedGroupsChange",Z=>{const re=Z.get(le);if(re){const{defaultLayoutDeferred:j,derivedPanelConstraints:H,layout:G}=re;if(j||H.length===0)return;const{interactionState:L}=os(),ae=L.state!=="active";S(G),ae&&k(G),W.panels.forEach(oe=>{oe.scheduleUpdate()})}});return()=>{U.current=null,se(),$(),K()}},[a,E,k,S,m,_,F]),x.useEffect(()=>{const X=U.current;X&&(X.defaultLayout=n,X.disableCursor=!!r)}),h.jsx(kj.Provider,{value:z,children:h.jsx("div",{...y,"aria-orientation":m,className:t,"data-group":!0,"data-testid":E,id:E,ref:O,style:{height:"100%",width:"100%",overflow:"hidden",...b,display:"flex",flexDirection:m==="horizontal"?"row":"column",flexWrap:"nowrap"},children:e})})}Aj.displayName="Group";function Nj(){const e=x.useContext(kj);return $n(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function Rbe(e,t){const{id:n}=Nj(),r=x.useRef({collapse:ty,expand:ty,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:ty});x.useImperativeHandle(t,()=>r.current,[]),p0(()=>{Object.assign(r.current,pj({groupId:n,panelId:e}))})}function _j({children:e,className:t,collapsedSize:n="0%",collapsible:r=!1,defaultSize:a,elementRef:s,id:o,maxSize:u="100%",minSize:c="0%",onResize:d,panelRef:m,style:p,...b}){const y=!!o,w=Sj(o),S=x.useRef(null),k=Cj(S,s),[,E]=Ej(),{getPanelStyles:A,id:_,registerPanel:I}=Nj(),P=d!==null,O=Xd((z,F,U)=>{d?.(z,o,U)});p0(()=>{const z=S.current;if(z!==null)return I({element:z,id:w,idIsStable:y,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:P?O:void 0,panelConstraints:{collapsedSize:n,collapsible:r,defaultSize:a,maxSize:u,minSize:c},scheduleUpdate:E})},[n,r,a,E,P,w,y,u,c,O,I]),Rbe(w,m);const R=A(_,w);return h.jsx("div",{...b,"data-panel":!0,"data-testid":w,id:w,ref:k,style:{...Mbe,display:"flex",flexBasis:0,flexShrink:1,overflow:"hidden",...R},children:h.jsx("div",{className:t,style:{flexGrow:1,...p},children:e})})}_j.displayName="Panel";const Mbe={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function Dbe({className:e,...t}){return h.jsx(Aj,{"data-slot":"resizable-panel-group",className:me("flex h-full w-full data-[orientation=vertical]:flex-col",e),...t})}function Ik({...e}){return h.jsx(_j,{"data-slot":"resizable-panel",...e})}const Ibe="http://localhost".replace(/\/+$/,"");class Rj{constructor(t={}){this.configuration=t}set config(t){this.configuration=t}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:Ibe}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||Mj}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const t=this.configuration.apiKey;if(t)return typeof t=="function"?t:()=>t}get accessToken(){const t=this.configuration.accessToken;if(t)return typeof t=="function"?t:async()=>t}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const Obe=new Rj,d1=class d1{constructor(t=Obe){this.configuration=t,this.fetchApi=async(n,r)=>{let a={url:n,init:r};for(const o of this.middleware)o.pre&&(a=await o.pre({fetch:this.fetchApi,...a})||a);let s;try{s=await(this.configuration.fetchApi||fetch)(a.url,a.init)}catch(o){for(const u of this.middleware)u.onError&&(s=await u.onError({fetch:this.fetchApi,url:a.url,init:a.init,error:o,response:s?s.clone():void 0})||s);if(s===void 0)throw o instanceof Error?new zbe(o,"The request failed and the interceptors did not return an alternative response"):o}for(const o of this.middleware)o.post&&(s=await o.post({fetch:this.fetchApi,url:a.url,init:a.init,response:s.clone()})||s);return s},this.middleware=t.middleware}withMiddleware(...t){const n=this.clone();return n.middleware=n.middleware.concat(...t),n}withPreMiddleware(...t){const n=t.map(r=>({pre:r}));return this.withMiddleware(...n)}withPostMiddleware(...t){const n=t.map(r=>({post:r}));return this.withMiddleware(...n)}isJsonMime(t){return t?d1.jsonRegex.test(t):!1}async request(t,n){const{url:r,init:a}=await this.createFetchParams(t,n),s=await this.fetchApi(r,a);if(s&&s.status>=200&&s.status<300)return s;throw new jbe(s,"Response returned an error code")}async createFetchParams(t,n){let r=this.configuration.basePath+t.path;t.query!==void 0&&Object.keys(t.query).length!==0&&(r+="?"+this.configuration.queryParamsStringify(t.query));const a=Object.assign({},this.configuration.headers,t.headers);Object.keys(a).forEach(m=>a[m]===void 0?delete a[m]:{});const s=typeof n=="function"?n:async()=>n,o={method:t.method,headers:a,body:t.body,credentials:this.configuration.credentials},u={...o,...await s({init:o,context:t})};let c;Pbe(u.body)||u.body instanceof URLSearchParams||Lbe(u.body)?c=u.body:this.isJsonMime(a["Content-Type"])?c=JSON.stringify(u.body):c=u.body;const d={...u,body:c};return{url:r,init:d}}clone(){const t=this.constructor,n=new t(this.configuration);return n.middleware=this.middleware.slice(),n}};d1.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");let i1=d1;function Lbe(e){return typeof Blob<"u"&&e instanceof Blob}function Pbe(e){return typeof FormData<"u"&&e instanceof FormData}class jbe extends Error{constructor(t,n){super(n),this.response=t,this.name="ResponseError"}}class zbe extends Error{constructor(t,n){super(n),this.cause=t,this.name="FetchError"}}class Da extends Error{constructor(t,n){super(n),this.field=t,this.name="RequiredError"}}function Mj(e,t=""){return Object.keys(e).map(n=>Dj(n,e[n],t)).filter(n=>n.length>0).join("&")}function Dj(e,t,n=""){const r=n+(n.length?`[${e}]`:e);if(t instanceof Array){const a=t.map(s=>encodeURIComponent(String(s))).join(`&${encodeURIComponent(r)}=`);return`${encodeURIComponent(r)}=${a}`}if(t instanceof Set){const a=Array.from(t);return Dj(e,a,n)}return t instanceof Date?`${encodeURIComponent(r)}=${encodeURIComponent(t.toISOString())}`:t instanceof Object?Mj(t,r):`${encodeURIComponent(r)}=${encodeURIComponent(String(t))}`}function Bbe(e){for(const t of e)if(t.contentType==="multipart/form-data")return!0;return!1}class Oa{constructor(t,n=r=>r){this.raw=t,this.transformer=n}async value(){return this.transformer(await this.raw.json())}}class ny{constructor(t){this.raw=t}async value(){return await this.raw.text()}}const Ok={Thinking:"thinking",AlwaysThinking:"always_thinking"};function Fbe(e){return Hbe(e)}function Hbe(e,t){return e}function Ube(e){return $be(e)}function $be(e,t){return e}function qbe(e){return Vbe(e)}function Vbe(e,t){return e==null?e:{provider:e.provider,model:e.model,maxContextSize:e.max_context_size,capabilities:e.capabilities==null?void 0:new Set(e.capabilities.map(Fbe)),name:e.name,providerType:Ube(e.provider_type)}}function Gbe(e){return Ybe(e)}function Ybe(e,t){return e==null?e:{content:e.content,path:e.path}}function Wbe(e){return Xbe(e,!1)}function Xbe(e,t=!1){return e==null?e:{work_dir:e.workDir,create_dir:e.createDir}}function Kbe(e){return Qbe(e,!1)}function Qbe(e,t=!1){return e==null?e:{user_message:e.userMessage,assistant_response:e.assistantResponse}}function Zbe(e){return Jbe(e)}function Jbe(e,t){return e==null?e:{title:e.title}}function exe(e){return txe(e)}function txe(e,t){return e==null?e:{path:e.path,additions:e.additions,deletions:e.deletions,status:e.status}}function nxe(e){return rxe(e)}function rxe(e,t){return e==null?e:{isGitRepo:e.is_git_repo,hasChanges:e.has_changes==null?void 0:e.has_changes,totalAdditions:e.total_additions==null?void 0:e.total_additions,totalDeletions:e.total_deletions==null?void 0:e.total_deletions,files:e.files==null?void 0:e.files.map(exe),error:e.error==null?void 0:e.error}}function Ij(e){return axe(e)}function axe(e,t){return e==null?e:{defaultModel:e.default_model,defaultThinking:e.default_thinking,models:e.models.map(qbe)}}function sxe(e){return ixe(e)}function ixe(e,t){return e==null?e:{sessionId:e.session_id,state:e.state,seq:e.seq,workerId:e.worker_id==null?void 0:e.worker_id,reason:e.reason==null?void 0:e.reason,detail:e.detail==null?void 0:e.detail,updatedAt:new Date(e.updated_at)}}function Ec(e){return oxe(e)}function oxe(e,t){return e==null?e:{sessionId:e.session_id,title:e.title,lastUpdated:new Date(e.last_updated),isRunning:e.is_running==null?void 0:e.is_running,status:e.status==null?void 0:sxe(e.status),workDir:e.work_dir==null?void 0:e.work_dir,sessionDir:e.session_dir==null?void 0:e.session_dir,archived:e.archived==null?void 0:e.archived}}function lxe(e){return uxe(e,!1)}function uxe(e,t=!1){return e==null?e:{content:e.content}}function cxe(e){return dxe(e)}function dxe(e,t){return e==null?e:{success:e.success,error:e.error==null?void 0:e.error}}function fxe(e){return hxe(e,!1)}function hxe(e,t=!1){return e==null?e:{default_model:e.defaultModel,default_thinking:e.defaultThinking,restart_running_sessions:e.restartRunningSessions,force_restart_busy_sessions:e.forceRestartBusySessions}}function mxe(e){return pxe(e)}function pxe(e,t){return e==null?e:{config:Ij(e.config),restartedSessionIds:e.restarted_session_ids==null?void 0:e.restarted_session_ids,skippedBusySessionIds:e.skipped_busy_session_ids==null?void 0:e.skipped_busy_session_ids}}function gxe(e){return bxe(e,!1)}function bxe(e,t=!1){return e==null?e:{title:e.title,archived:e.archived}}function xxe(e){return yxe(e)}function yxe(e,t){return e==null?e:{path:e.path,filename:e.filename,size:e.size}}class vxe extends i1{async getConfigTomlApiConfigTomlGetRaw(t){const n={},r={},s=await this.request({path:"/api/config/toml",method:"GET",headers:r,query:n},t);return new Oa(s,o=>Gbe(o))}async getConfigTomlApiConfigTomlGet(t){return await(await this.getConfigTomlApiConfigTomlGetRaw(t)).value()}async getGlobalConfigApiConfigGetRaw(t){const n={},r={},s=await this.request({path:"/api/config/",method:"GET",headers:r,query:n},t);return new Oa(s,o=>Ij(o))}async getGlobalConfigApiConfigGet(t){return await(await this.getGlobalConfigApiConfigGetRaw(t)).value()}async updateConfigTomlApiConfigTomlPutRaw(t,n){if(t.updateConfigTomlRequest==null)throw new Da("updateConfigTomlRequest",'Required parameter "updateConfigTomlRequest" was null or undefined when calling updateConfigTomlApiConfigTomlPut().');const r={},a={};a["Content-Type"]="application/json";const o=await this.request({path:"/api/config/toml",method:"PUT",headers:a,query:r,body:lxe(t.updateConfigTomlRequest)},n);return new Oa(o,u=>cxe(u))}async updateConfigTomlApiConfigTomlPut(t,n){return await(await this.updateConfigTomlApiConfigTomlPutRaw(t,n)).value()}async updateGlobalConfigApiConfigPatchRaw(t,n){if(t.updateGlobalConfigRequest==null)throw new Da("updateGlobalConfigRequest",'Required parameter "updateGlobalConfigRequest" was null or undefined when calling updateGlobalConfigApiConfigPatch().');const r={},a={};a["Content-Type"]="application/json";const o=await this.request({path:"/api/config/",method:"PATCH",headers:a,query:r,body:fxe(t.updateGlobalConfigRequest)},n);return new Oa(o,u=>mxe(u))}async updateGlobalConfigApiConfigPatch(t,n){return await(await this.updateGlobalConfigApiConfigPatchRaw(t,n)).value()}}class wxe extends i1{async createSessionApiSessionsPostRaw(t,n){const r={},a={};a["Content-Type"]="application/json";const o=await this.request({path:"/api/sessions/",method:"POST",headers:a,query:r,body:Wbe(t.createSessionRequest)},n);return new Oa(o,u=>Ec(u))}async createSessionApiSessionsPost(t={},n){return await(await this.createSessionApiSessionsPostRaw(t,n)).value()}async deleteSessionApiSessionsSessionIdDeleteRaw(t,n){if(t.sessionId==null)throw new Da("sessionId",'Required parameter "sessionId" was null or undefined when calling deleteSessionApiSessionsSessionIdDelete().');const r={},a={};let s="/api/sessions/{session_id}";s=s.replace("{session_id}",encodeURIComponent(String(t.sessionId)));const o=await this.request({path:s,method:"DELETE",headers:a,query:r},n);return this.isJsonMime(o.headers.get("content-type"))?new Oa(o):new ny(o)}async deleteSessionApiSessionsSessionIdDelete(t,n){return await(await this.deleteSessionApiSessionsSessionIdDeleteRaw(t,n)).value()}async generateSessionTitleApiSessionsSessionIdGenerateTitlePostRaw(t,n){if(t.sessionId==null)throw new Da("sessionId",'Required parameter "sessionId" was null or undefined when calling generateSessionTitleApiSessionsSessionIdGenerateTitlePost().');const r={},a={};a["Content-Type"]="application/json";let s="/api/sessions/{session_id}/generate-title";s=s.replace("{session_id}",encodeURIComponent(String(t.sessionId)));const o=await this.request({path:s,method:"POST",headers:a,query:r,body:Kbe(t.generateTitleRequest)},n);return new Oa(o,u=>Zbe(u))}async generateSessionTitleApiSessionsSessionIdGenerateTitlePost(t,n){return await(await this.generateSessionTitleApiSessionsSessionIdGenerateTitlePostRaw(t,n)).value()}async getSessionApiSessionsSessionIdGetRaw(t,n){if(t.sessionId==null)throw new Da("sessionId",'Required parameter "sessionId" was null or undefined when calling getSessionApiSessionsSessionIdGet().');const r={},a={};let s="/api/sessions/{session_id}";s=s.replace("{session_id}",encodeURIComponent(String(t.sessionId)));const o=await this.request({path:s,method:"GET",headers:a,query:r},n);return new Oa(o,u=>Ec(u))}async getSessionApiSessionsSessionIdGet(t,n){return await(await this.getSessionApiSessionsSessionIdGetRaw(t,n)).value()}async getSessionFileApiSessionsSessionIdFilesPathGetRaw(t,n){if(t.sessionId==null)throw new Da("sessionId",'Required parameter "sessionId" was null or undefined when calling getSessionFileApiSessionsSessionIdFilesPathGet().');if(t.path==null)throw new Da("path",'Required parameter "path" was null or undefined when calling getSessionFileApiSessionsSessionIdFilesPathGet().');const r={},a={};let s="/api/sessions/{session_id}/files/{path}";s=s.replace("{session_id}",encodeURIComponent(String(t.sessionId))),s=s.replace("{path}",encodeURIComponent(String(t.path)));const o=await this.request({path:s,method:"GET",headers:a,query:r},n);return this.isJsonMime(o.headers.get("content-type"))?new Oa(o):new ny(o)}async getSessionFileApiSessionsSessionIdFilesPathGet(t,n){return await(await this.getSessionFileApiSessionsSessionIdFilesPathGetRaw(t,n)).value()}async getSessionGitDiffApiSessionsSessionIdGitDiffGetRaw(t,n){if(t.sessionId==null)throw new Da("sessionId",'Required parameter "sessionId" was null or undefined when calling getSessionGitDiffApiSessionsSessionIdGitDiffGet().');const r={},a={};let s="/api/sessions/{session_id}/git-diff";s=s.replace("{session_id}",encodeURIComponent(String(t.sessionId)));const o=await this.request({path:s,method:"GET",headers:a,query:r},n);return new Oa(o,u=>nxe(u))}async getSessionGitDiffApiSessionsSessionIdGitDiffGet(t,n){return await(await this.getSessionGitDiffApiSessionsSessionIdGitDiffGetRaw(t,n)).value()}async getSessionUploadFileApiSessionsSessionIdUploadsPathGetRaw(t,n){if(t.sessionId==null)throw new Da("sessionId",'Required parameter "sessionId" was null or undefined when calling getSessionUploadFileApiSessionsSessionIdUploadsPathGet().');if(t.path==null)throw new Da("path",'Required parameter "path" was null or undefined when calling getSessionUploadFileApiSessionsSessionIdUploadsPathGet().');const r={},a={};let s="/api/sessions/{session_id}/uploads/{path}";s=s.replace("{session_id}",encodeURIComponent(String(t.sessionId))),s=s.replace("{path}",encodeURIComponent(String(t.path)));const o=await this.request({path:s,method:"GET",headers:a,query:r},n);return this.isJsonMime(o.headers.get("content-type"))?new Oa(o):new ny(o)}async getSessionUploadFileApiSessionsSessionIdUploadsPathGet(t,n){return await(await this.getSessionUploadFileApiSessionsSessionIdUploadsPathGetRaw(t,n)).value()}async listSessionsApiSessionsGetRaw(t,n){const r={};t.limit!=null&&(r.limit=t.limit),t.offset!=null&&(r.offset=t.offset),t.q!=null&&(r.q=t.q),t.archived!=null&&(r.archived=t.archived);const a={},o=await this.request({path:"/api/sessions/",method:"GET",headers:a,query:r},n);return new Oa(o,u=>u.map(Ec))}async listSessionsApiSessionsGet(t={},n){return await(await this.listSessionsApiSessionsGetRaw(t,n)).value()}async updateSessionApiSessionsSessionIdPatchRaw(t,n){if(t.sessionId==null)throw new Da("sessionId",'Required parameter "sessionId" was null or undefined when calling updateSessionApiSessionsSessionIdPatch().');if(t.updateSessionRequest==null)throw new Da("updateSessionRequest",'Required parameter "updateSessionRequest" was null or undefined when calling updateSessionApiSessionsSessionIdPatch().');const r={},a={};a["Content-Type"]="application/json";let s="/api/sessions/{session_id}";s=s.replace("{session_id}",encodeURIComponent(String(t.sessionId)));const o=await this.request({path:s,method:"PATCH",headers:a,query:r,body:gxe(t.updateSessionRequest)},n);return new Oa(o,u=>Ec(u))}async updateSessionApiSessionsSessionIdPatch(t,n){return await(await this.updateSessionApiSessionsSessionIdPatchRaw(t,n)).value()}async uploadSessionFileApiSessionsSessionIdFilesPostRaw(t,n){if(t.sessionId==null)throw new Da("sessionId",'Required parameter "sessionId" was null or undefined when calling uploadSessionFileApiSessionsSessionIdFilesPost().');if(t.file==null)throw new Da("file",'Required parameter "file" was null or undefined when calling uploadSessionFileApiSessionsSessionIdFilesPost().');const r={},a={},o=Bbe([{contentType:"multipart/form-data"}]);let u,c=!1;c=o,c?u=new FormData:u=new URLSearchParams,t.file!=null&&u.append("file",t.file);let d="/api/sessions/{session_id}/files";d=d.replace("{session_id}",encodeURIComponent(String(t.sessionId)));const m=await this.request({path:d,method:"POST",headers:a,query:r,body:u},n);return new Oa(m,p=>xxe(p))}async uploadSessionFileApiSessionsSessionIdFilesPost(t,n){return await(await this.uploadSessionFileApiSessionsSessionIdFilesPostRaw(t,n)).value()}}const D6="pythinker_auth_token",I6="pythinker_auth_token_ts",Pv="token",Txe=1440*60*1e3;function o1(){const e=localStorage.getItem(D6);if(!e)return null;const t=localStorage.getItem(I6);if(t){const n=parseInt(t,10);if(Number.isNaN(n)||Date.now()-n>Txe)return Lk(),null}return e}function Exe(e){localStorage.setItem(D6,e),localStorage.setItem(I6,Date.now().toString())}function Lk(){localStorage.removeItem(D6),localStorage.removeItem(I6)}function Sxe(){const e=new URL(window.location.href),t=e.searchParams.get(Pv);return t?(e.searchParams.delete(Pv),window.history.replaceState({},"",e.toString()),t):null}function na(){let e=o1();return e||(e=new URL(window.location.href).searchParams.get(Pv)),e?{Authorization:`Bearer ${e}`}:{}}function Cxe(e){return Array.isArray(e)?e.map(t=>{if(t&&typeof t=="object"&&"msg"in t){const n=Array.isArray(t.loc)?t.loc.slice(1).join("."):"";return n?`${n}: ${t.msg}`:t.msg}return String(t)}).join("; "):typeof e=="string"?e:"Validation failed"}function Pk(){return new Rj({basePath:Br(),middleware:[{pre:async e=>(e.init.headers={...e.init.headers,...na()},e),post:async e=>{if(!e.response.ok){const t=await e.response.json();let n;switch(e.response.status===422&&t.detail?n=Cxe(t.detail):typeof t.detail=="string"?n=t.detail:typeof t.msg=="string"?n=t.msg:n="Request failed",e.response.status){case 401:console.error("Authentication failed. Please login again.");break;case 403:console.error(n);break;case 404:console.error("The requested resource was not found.");break;default:console.error(n)}throw new Error(n)}return e.response}}]})}const Wi={get config(){return new vxe(Pk())},get sessions(){return new wxe(Pk())}};function Oj(){const[e,t]=x.useState(null),[n,r]=x.useState(!1),[a,s]=x.useState(!1),[o,u]=x.useState(null),c=x.useRef(!1),d=x.useCallback(async()=>{r(!0),u(null);try{const p=await Wi.config.getGlobalConfigApiConfigGet();t(p)}catch(p){const b=p instanceof Error?p.message:"Failed to load global config";u(b),console.error("[useGlobalConfig] Failed to load global config:",p)}finally{r(!1)}},[]),m=x.useCallback(async p=>{s(!0),u(null);try{const b={defaultModel:p.defaultModel??void 0,defaultThinking:p.defaultThinking??void 0,restartRunningSessions:p.restartRunningSessions??void 0,forceRestartBusySessions:p.forceRestartBusySessions??void 0},y=await Wi.config.updateGlobalConfigApiConfigPatch({updateGlobalConfigRequest:b});return t(y.config),y}catch(b){const y=b instanceof Error?b.message:"Failed to update global config";throw u(y),console.error("[useGlobalConfig] Failed to update global config:",b),b}finally{s(!1)}},[]);return x.useEffect(()=>{c.current||(c.current=!0,d())},[d]),x.useEffect(()=>{const p=()=>{d()};return window.addEventListener("pythinker:config-update",p),()=>window.removeEventListener("pythinker:config-update",p)},[d]),{config:e,isLoading:n,isUpdating:a,error:o,refresh:d,update:m}}const kxe={ApprovalResponse:"ApprovalRequestResolved"};function Axe(e){if(e.method!=="event"||!e.params)return null;const t=e.params;return{type:kxe[t.type]??t.type,payload:t.payload}}const Lj="2.0.0",jk=e=>{let t;const n=new Set,r=(d,m)=>{const p=typeof d=="function"?d(t):d;if(!Object.is(p,t)){const b=t;t=m??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(y=>y(t,b))}},a=()=>t,u={setState:r,getState:a,getInitialState:()=>c,subscribe:d=>(n.add(d),()=>n.delete(d))},c=t=e(r,a,u);return u},Nxe=(e=>e?jk(e):jk),_xe=e=>e;function Rxe(e,t=_xe){const n=ge.useSyncExternalStore(e.subscribe,ge.useCallback(()=>t(e.getState()),[e,t]),ge.useCallback(()=>t(e.getInitialState()),[e,t]));return ge.useDebugValue(n),n}const zk=e=>{const t=Nxe(e),n=r=>Rxe(t,r);return Object.assign(n,t),n},Pj=(e=>e?zk(e):zk),vf=Pj(e=>({newFiles:[],addNewFile:t=>e(n=>({newFiles:[...n.newFiles,t]})),clearNewFiles:()=>e({newFiles:[]}),todoItems:[],setTodoItems:t=>e({todoItems:t}),clearTodoItems:()=>e({todoItems:[]})}));function Mxe(e,t,n,r){if(!(n||r))try{const a=JSON.parse(t),{addNewFile:s}=vf.getState(),o=e.toLowerCase();if(o.includes("writefile")||o.includes("write-file")||o.includes("write_file")){const u=a.path||a.file_path;u&&s(u)}a.output_file&&s(a.output_file),a.output_path&&s(a.output_path),a.download_dir&&s(a.download_dir)}catch{}}const Dxe=/^data:([^;,]+)[;,]/,Ixe=/^\d+\.\s+(.+)$/,Oxe=/<image\s+path="([^"]+)"\s+content_type="([^"]+)">/i,Lxe=/<video\s+path="([^"]+)"\s+content_type="([^"]+)">/i,Pxe=/<document\s+path="([^"]+)"\s+content_type="([^"]+)">/i,jxe=/`uploads\/([^`]+)`/,zxe=/^http/,Bxe=/\r?\n/,Fxe=/<(?:image|video)\s+[^>]*path="([^"]*\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\/uploads\/([^"]+))"/g,Hxe=new Set(["http:","https:","data:","blob:"]),Uxe=e=>{const t=e.image_url?.url,n=e.video_url?.url;return t??n??""},Bk=e=>{try{return Hxe.has(new URL(e).protocol)}catch{return!1}};function $xe(e){const{sessionId:t,baseUrl:n,onMessagesChange:r,onConnectionChange:a,onError:s,onSessionStatus:o,onFirstTurnComplete:u}=e,[c,d]=x.useState([]),[m,p]=x.useState("ready"),[b,y]=x.useState(null),[w,S]=x.useState(0),[k,E]=x.useState(null),[A,_]=x.useState(!1),[I,P]=x.useState(0),[O,R]=x.useState(!1),[z,F]=x.useState(null),[U,X]=x.useState(!1),[W,le]=x.useState(!0),[se,ie]=x.useState([]),$=x.useRef(null),K=x.useRef(null),Z=x.useRef(()=>{}),re=x.useRef(()=>{}),j=x.useRef(()=>{}),H=x.useRef(()=>{}),G=x.useRef(null),L=x.useRef(!0),ae=x.useRef(null),oe=x.useRef(!1),Se=x.useRef(!1),be=x.useRef(null),fe=x.useRef(0),Ne=x.useRef(null),at=x.useRef("ready"),Ce=x.useRef(!1),Re=x.useRef(!1),Ee=x.useRef(null),we=x.useRef(0),Oe=5,ze=x.useRef(!1),Ge=x.useRef(0),it=x.useRef(""),At=x.useRef(""),st=x.useRef(new Map),Ft=x.useRef(null),Nt=x.useRef(null),qt=x.useRef(null),Ht=x.useRef(new Map),Mn=x.useRef(new Map),ke=x.useRef(!1),Be=x.useRef(0),xt=x.useRef(null),Et=x.useRef(null),Ze=x.useCallback(Pe=>{d(Pe)},[]),Rt=x.useCallback(Pe=>{Se.current=Pe,X(Pe)},[]),mn=x.useCallback(()=>{Se.current&&Rt(!1)},[Rt]),Qe=x.useCallback(Pe=>({sessionId:Pe.session_id,state:Pe.state,seq:Pe.seq,workerId:Pe.worker_id??void 0,reason:Pe.reason??void 0,detail:Pe.detail??void 0,updatedAt:new Date(Pe.updated_at)}),[]),_t=x.useCallback(()=>{Ze(Pe=>Pe.map(Me=>{let We=Me;return Me.isStreaming&&(We={...We,isStreaming:!1}),Me.toolCall?.subagentRunning&&(We={...We,toolCall:{...We.toolCall,subagentRunning:!1}}),We}))},[Ze]),vn=x.useCallback(()=>{Ht.current.clear(),Mn.current.clear(),Ze(Pe=>Pe.map(Me=>{if(Me.variant!=="tool"||!Me.toolCall)return Me;const We=Me.toolCall.state;return We==="approval-requested"||We==="question-requested"||We==="input-streaming"||We==="input-available"?{...Me,isStreaming:!1,toolCall:{...Me.toolCall,state:"output-denied",...We==="approval-requested"&&Me.toolCall.approval?{approval:{...Me.toolCall.approval,submitted:!0,resolved:!0,approved:!1,response:"reject"}}:{},...We==="question-requested"&&Me.toolCall.question?{question:{...Me.toolCall.question,submitted:!0,resolved:!0}}:{}}}:Me}))},[Ze]),an=x.useCallback(Pe=>{const Me=Qe(Pe),We=be.current;if(!(We!==null&&Me.seq<=We))switch(be.current=Me.seq,y(Me),o?.(Me),L.current=!1,le(!1),Me.state){case"busy":{oe.current||p("streaming");break}case"restarting":{p("submitted");break}case"error":{p("error"),Rt(!1),oe.current=!1,_t(),vn();break}case"stopped":case"idle":{p("ready"),Rt(!1),oe.current=!1,_t(),vn(),Ce.current&&!Re.current&&(Re.current=!0,u?.());break}}},[_t,vn,Qe,o,Rt,u]),lr=x.useCallback((Pe,Me)=>{Ze(We=>We.map(ce=>ce.id===Pe?Me(ce):ce))},[Ze]),mr=x.useCallback(Pe=>{if(Pe==null)return"";if(typeof Pe=="string")return Pe;try{return JSON.stringify(Pe)}catch{return String(Pe)}},[]),Qr=x.useCallback(Pe=>Pe.startsWith("data:")?Dxe.exec(Pe)?.[1]??null:null,[]),$e=x.useCallback(Pe=>{if(!(t&&Pe))return;const Me=n??Br(),We=o1(),ce=We?`?token=${encodeURIComponent(We)}`:"";return`${Me}/api/sessions/${encodeURIComponent(t)}/uploads/${encodeURIComponent(Pe)}${ce}`},[n,t]),tt=x.useCallback(Pe=>{if(typeof Pe=="string")return{text:Pe,attachments:[]};const Me=[],We=[],ce=[];let De=!1;const ot=Lt=>{const sn=Ixe.exec(Lt.trim());if(!sn)return!1;const Xt=sn[1].trim();return Xt&&(Xt.startsWith("/")||Xt.startsWith("uploads/"))?(ce.push(Xt),!0):!1};let rt,nt,Ct=!1,Ut,ht,St=[];for(const Lt of Pe){if(Lt.type==="text"||Lt.type==="input_text"){const sn=Lt.text,Xt=Oxe.exec(sn);if(Xt){const Jn=Xt[1];rt=Jn.split("/").pop()??Jn,nt=Xt[2];continue}if(sn.trim()==="</image>")continue;const Pr=Lxe.exec(sn);if(Pr){const Jn=Pr[1];rt=Jn.split("/").pop()??Jn,nt=Pr[2];continue}if(sn.trim()==="</video>"){if(rt&&nt?.startsWith("video/")){const Jn=$e(rt);Jn?We.push({type:"file",mediaType:nt,filename:rt,url:Jn}):We.push({kind:"video-nopreview",mediaType:nt,filename:rt}),rt=void 0,nt=void 0}continue}const Dn=Pxe.exec(sn);if(Dn){Ct=!0;const Jn=Dn[1];Ut=Jn.split("/").pop()??Jn,ht=Dn[2],St=[];continue}if(sn.trim()==="</document>"){if(Ct&&Ut){const Jn=St.join(""),Ds=new TextEncoder().encode(Jn),Ea=btoa(String.fromCharCode(...Ds)),ih=`data:${ht??"text/plain"};base64,${Ea}`;We.push({type:"file",mediaType:ht??"text/plain",filename:Ut,url:ih})}Ct=!1,Ut=void 0,ht=void 0,St=[];continue}if(Ct){St.push(sn);continue}const bo=sn.split(Bxe),v0=[];for(const Jn of bo){if(Jn.includes("<uploaded_files>")){De=!0;continue}if(Jn.includes("</uploaded_files>")){De=!1;continue}if(De){ot(Jn);continue}ot(Jn)||v0.push(Jn)}const w0=v0.join(`
|
|
456
|
+
`),Tl=jxe.exec(w0);Tl&&(rt=Tl[1]),w0.trim()&&Me.push(w0);continue}if(Lt.type==="image_url"){const sn=Qr(Lt.image_url.url);We.push({type:"file",mediaType:nt??sn??"image/*",filename:rt,url:Lt.image_url.url}),rt=void 0,nt=void 0}if(Lt.type==="video_url"){const sn=Qr(Lt.video_url.url);We.push({type:"file",mediaType:nt??sn??"video/*",filename:rt,url:Lt.video_url.url}),rt=void 0,nt=void 0}}if(ce.length>0){const Lt=new Set(We.map(Xt=>Xt.filename).filter(Xt=>!!Xt)),sn=new Set;for(const Xt of ce){const Pr=Xt.split("/").pop()??Xt;Pr&&(Lt.has(Pr)||sn.has(Pr)||(We.push({kind:"nopreview",filename:Pr}),sn.add(Pr)))}}return{text:Me.join(`
|
|
457
|
+
|
|
458
|
+
`).trim(),attachments:We}},[$e,Qr]),Tt=x.useCallback(Pe=>{Ze(Me=>{const We=Me.findIndex(De=>De.id===Pe.id);if(We===-1)return[...Me,Pe];const ce=[...Me];return ce[We]={...ce[We],...Pe},ce})},[Ze]);x.useEffect(()=>{r?.(c)},[c,r]),x.useEffect(()=>{a?.(O)},[O,a]);const Mt=x.useCallback(Pe=>Lge(Pe),[]),Je=x.useCallback(()=>{it.current="",At.current="",Nt.current=null,qt.current=null},[]),Vt=x.useCallback((Pe=!1)=>{Je(),st.current?.clear(),Ft.current=null,Ht.current?.clear(),Mn.current?.clear(),ke.current=!1,P(0),S(0),E(null),_(!1),F(null),y(null),be.current=null,L.current=!0,le(!0),Rt(!1),Ce.current=!1,Re.current=!1,Be.current=0,G.current&&(window.clearTimeout(G.current),G.current=null),Pe?Ge.current>0&&(ze.current=!0):(ie([]),Ge.current=0,ze.current=!1)},[Je,Rt]),nn=x.useCallback((Pe,Me,We,ce,De)=>{Ze(ot=>{const rt=ot.findIndex(ht=>ht.toolCall?.toolCallId===Pe);if(rt===-1)return ot;const nt=ot[rt],Ct=[...nt.toolCall?.subagentSteps??[]];switch(Me){case"ContentPart":{const ht=We;if(ht.type==="think"&&ht.think){const St=Ct[Ct.length-1];St?.kind==="thinking"?Ct[Ct.length-1]={...St,text:St.text+ht.think}:Ct.push({kind:"thinking",text:ht.think})}else if(ht.type==="text"&&ht.text){const St=Ct[Ct.length-1];St?.kind==="text"?Ct[Ct.length-1]={...St,text:St.text+ht.text}:Ct.push({kind:"text",text:ht.text})}break}case"ToolCall":{const ht=We,St=ht.function.arguments||"";let Lt;try{Lt=JSON.parse(St||"{}")}catch{}Ct.push({kind:"tool-call",toolCallId:ht.id,toolName:ht.function.name,rawArgs:St,input:Lt,status:"running"});break}case"ToolCallPart":{const ht=We;for(let St=Ct.length-1;St>=0;St--){const Lt=Ct[St];if(Lt.kind==="tool-call"&&Lt.status==="running"){const sn=(Lt.rawArgs??"")+ht.arguments_part;let Xt;try{Xt=JSON.parse(sn)}catch{}Ct[St]={...Lt,rawArgs:sn,input:Xt??Lt.input};break}}break}case"ToolResult":{const ht=We;for(let St=Ct.length-1;St>=0;St--){const Lt=Ct[St];if(Lt.kind==="tool-call"&&Lt.toolCallId===ht.tool_call_id){const sn=Array.isArray(ht.return_value.output)?ht.return_value.output.map(Xt=>Xt.text??"").filter(Boolean).join(`
|
|
459
|
+
`):ht.return_value.output;Ct[St]={...Lt,status:ht.return_value.is_error?"error":"success",output:sn||void 0,errorText:ht.return_value.is_error&&ht.return_value.message||void 0};break}}break}}const Ut=[...ot];return Ut[rt]={...nt,toolCall:{...nt.toolCall,subagentSteps:Ct,subagentRunning:!0,subagentType:nt.toolCall?.subagentType??De,subagentAgentId:nt.toolCall?.subagentAgentId??ce}},Ut})},[Ze]),Zn=x.useCallback((Pe,Me=!1,We)=>{switch(Pe.type){case"TurnBegin":{Je();const ce=tt(Pe.payload.user_input),De=Be.current;Be.current+=1,Me||(Ce.current=!0);const ot=ce.text.trim();ke.current=ot==="/clear"||ot==="/reset";const nt={id:Mt("user"),role:"user",turnIndex:De,content:ce.text||(ce.attachments.length>0?"":mr(Pe.payload.user_input??"")),attachments:ce.attachments.length>0?ce.attachments:void 0};Tt(nt);break}case"StepBegin":{P(Pe.payload.n),Je(),Me||p("streaming");break}case"ContentPart":{if(Me||mn(),Pe.payload.type==="think"&&Pe.payload.think)if(it.current+=Pe.payload.think,Nt.current)Ze(ce=>ce.map(De=>De.id===Nt.current?{...De,thinking:it.current}:De));else{Nt.current=Mt("assistant");const ce={id:Nt.current,role:"assistant",variant:"thinking",thinking:it.current,isStreaming:!Me};qt.current?Ze(De=>{const ot=De.findIndex(rt=>rt.id===qt.current);if(ot!==-1){const rt=[...De];return rt.splice(ot,0,ce),rt}return[...De,ce]}):Tt(ce)}else Pe.payload.type==="text"&&Pe.payload.text&&(Nt.current&&Ze(ce=>ce.map(De=>De.id===Nt.current?{...De,isStreaming:!1}:De)),At.current+=Pe.payload.text,qt.current?Ze(ce=>ce.map(De=>De.id===qt.current?{...De,content:At.current}:De)):(qt.current=Mt("assistant"),Tt({id:qt.current,role:"assistant",variant:"text",turnIndex:Be.current>0?Be.current-1:void 0,content:At.current,isStreaming:!Me})));break}case"ToolCall":{Me||mn();const ce=Pe.payload;Ft.current=ce.id;const De=ce.function.arguments||"";st.current.set(ce.id,{id:ce.id,name:ce.function.name,arguments:De,argumentsComplete:!1,messageId:void 0});let ot;if(De)try{ot=JSON.parse(De)}catch{}const rt=Mt("assistant");Tt({id:rt,role:"assistant",variant:"tool",toolCall:{title:ce.function.name,type:"tool-call",state:"input-streaming",toolCallId:ce.id,input:ot},isStreaming:!Me});const nt=st.current.get(ce.id);nt&&(nt.messageId=rt);break}case"ToolCallPart":{if(Ft.current){const ce=st.current.get(Ft.current);if(ce){ce.arguments+=Pe.payload.arguments_part;const De=ce.messageId;if(De){let ot=ce.arguments;try{ot=JSON.parse(ce.arguments)}catch{}Ze(rt=>rt.map(nt=>nt.id===De&&nt.toolCall?{...nt,toolCall:{...nt.toolCall,state:"input-available",input:ot}}:nt))}}}break}case"ToolResult":{Me||mn();const{tool_call_id:ce,return_value:De}=Pe.payload,ot=st.current.get(ce),rt=Array.isArray(De.output)?De.output.map(Ut=>Ut.text??"").filter(Boolean).join(`
|
|
460
|
+
`):De.output;let nt=[];if(Array.isArray(De.output)&&(nt=De.output.filter(ht=>ht.type==="image_url"||ht.type==="video_url").map(ht=>({type:ht.type,url:Uxe(ht)})).filter(ht=>ht.url),nt.some(ht=>!Bk(ht.url)))){const ht=De.output.map(Lt=>Lt.text??"").filter(Boolean).join(""),St=[];for(const Lt of ht.matchAll(Fxe)){const[,,sn,Xt]=Lt;St.push(`/api/sessions/${sn}/uploads/${encodeURIComponent(Xt)}`)}if(St.length>0){let Lt=0;nt=nt.map(sn=>{if(Bk(sn.url))return sn;const Xt=St[Lt]??St[St.length-1];return Lt++,{...sn,url:Xt}})}}const Ct=De.message;if(ot&&(ot.argumentsComplete=!0,ot.result={isError:De.is_error,output:rt||void 0,message:Ct||void 0}),Ze(Ut=>Ut.map(ht=>ht.toolCall?.toolCallId!==ce?ht:{...ht,toolCall:{...ht.toolCall,state:De.is_error?"output-error":"output-available",output:rt||void 0,message:Ct||void 0,display:De.display,extras:De.extras,isError:De.is_error,errorText:De.is_error&&Ct||void 0,mediaParts:nt.length>0?nt:void 0,subagentRunning:ht.toolCall.subagentSteps?!1:ht.toolCall.subagentRunning},isStreaming:!1})),Ft.current===ce&&(Ft.current=null),ot&&Mxe(ot.name,ot.arguments,De.is_error,Me),!Me&&Array.isArray(De.display)){const Ut=De.display.find(ht=>ht.type==="todo");Ut&&vf.getState().setTodoItems(Ut.items)}break}case"ApprovalRequest":{Me||mn();const ce=Pe.payload,De=st.current.get(ce.tool_call_id),ot={id:ce.id,action:ce.action,description:ce.description,sender:ce.sender,toolCallId:ce.tool_call_id,rpcMessageId:We,submitted:!1,resolved:!1,sourceKind:ce.source_kind??null,sourceDescription:ce.source_description??null};if(De)De.approval=ot;else{const Ct={id:ce.tool_call_id,name:ce.action,arguments:"",argumentsComplete:!1,messageId:void 0,approval:ot};st.current.set(ce.tool_call_id,Ct)}let rt=De?.messageId;const nt=ce.display?.length?ce.display:void 0;if(rt)lr(rt,Ct=>Ct.toolCall?{...Ct,isStreaming:!1,toolCall:{...Ct.toolCall,state:"approval-requested",approval:ot,display:Ct.toolCall.display??nt}}:Ct);else{const Ct=!!ce.agent_id,Ut=Mt("assistant"),ht={id:Ut,role:"assistant",variant:"tool",isStreaming:!1,toolCall:{title:ce.action,type:"tool-call",state:"approval-requested",approval:ot,display:nt,...Ct&&{isSubagentOrigin:!0,subagentType:ce.subagent_type??void 0,subagentAgentId:ce.agent_id??void 0}}};st.current.set(ce.tool_call_id,{...st.current.get(ce.tool_call_id)??{id:ce.tool_call_id,name:ce.action,arguments:"",argumentsComplete:!1},messageId:Ut}),Ze(St=>[...St,ht]),rt=Ut}Ht.current.set(ce.id,{requestId:ce.id,toolCallId:ce.tool_call_id,messageId:rt,rpcId:We,submitted:!1});break}case"ApprovalRequestResolved":{const{request_id:ce,response:De,feedback:ot}=Pe.payload,rt=Ht.current.get(ce);let nt;if(rt&&(nt=st.current.get(rt.toolCallId)),!nt){for(const Dn of st.current.values())if(Dn.approval?.id===ce){nt=Dn;break}}const Ct=nt?.approval??{id:ce,action:"",description:"",sender:"",toolCallId:rt?.toolCallId??""};let Ut,ht;if(typeof De=="boolean")Ut=De;else if(De&&typeof De=="object"){const Dn=De;typeof Dn.approved=="boolean"&&(Ut=Dn.approved),typeof Dn.reason=="string"&&(ht=Dn.reason)}else if(typeof De=="string"){const Dn=De.toLowerCase();Dn==="approve"||Dn==="approve_for_session"||Dn==="approval"||Dn==="approved"?Ut=!0:Dn==="reject"?Ut=!1:ht=De}const St=ht??ot??Ct.reason,Lt={...Ct,response:De,resolved:!0,submitted:!0,approved:Ut,reason:St};nt&&(nt.approval=Lt);const sn=nt?.messageId??rt?.messageId,Xt=Ut===!1?"output-denied":"input-available",Pr=Ut!==!1;sn&&lr(sn,Dn=>{if(!Dn.toolCall)return Dn;const bo=Dn.toolCall.state;return bo==="output-denied"||bo==="output-available"||bo==="output-error"?{...Dn,toolCall:{...Dn.toolCall,approval:Lt}}:{...Dn,isStreaming:Pr,toolCall:{...Dn.toolCall,state:Xt,approval:Lt,errorText:Ut===!1?Lt.reason??Dn.toolCall.errorText:Dn.toolCall.errorText}}}),rt?Ht.current.delete(rt.requestId):Ht.current.delete(ce);break}case"QuestionRequest":{Me||mn();const ce=Pe.payload,De=st.current.get(ce.tool_call_id),ot={id:ce.id,toolCallId:ce.tool_call_id,questions:ce.questions,rpcMessageId:We,submitted:!1,resolved:!1};let rt=De?.messageId;if(rt)lr(rt,nt=>nt.toolCall?{...nt,isStreaming:!1,toolCall:{...nt.toolCall,state:"question-requested",question:ot}}:nt);else{const nt=Mt("assistant"),Ct={id:nt,role:"assistant",variant:"tool",isStreaming:!1,toolCall:{title:"AskUserQuestion",type:"tool-call",state:"question-requested",question:ot}};st.current.set(ce.tool_call_id,{...st.current.get(ce.tool_call_id)??{id:ce.tool_call_id,name:"AskUserQuestion",arguments:"",argumentsComplete:!1},messageId:nt}),Ze(Ut=>[...Ut,Ct]),rt=nt}Mn.current.set(ce.id,{requestId:ce.id,toolCallId:ce.tool_call_id,messageId:rt,rpcId:We,submitted:!1});break}case"SubagentEvent":{const ce=Pe.payload,De=ce.parent_tool_call_id??ce.task_tool_call_id;De&&nn(De,ce.event.type,ce.event.payload,ce.agent_id??void 0,ce.subagent_type??void 0);break}case"StatusUpdate":{const ce=Pe.payload.context_usage;typeof ce=="number"&&S(ce);const De=Pe.payload.token_usage;De&&E(De);const ot=Pe.payload.plan_mode;typeof ot=="boolean"&&_(ot);const rt=Pe.payload.message_id;if(rt){const nt=Mt("assistant");Tt({id:nt,role:"assistant",variant:"message-id",messageId:rt})}ke.current&&(ke.current=!1,Ze(nt=>{let Ct=-1;for(let Ut=nt.length-1;Ut>=0;Ut--)if(nt[Ut].role==="user"){Ct=Ut;break}return Ct>=0?nt.slice(Ct):[]}));break}case"SessionNotice":{Me||mn(),Pe.payload.text&&Ze(ce=>[...ce,{id:Mt("assistant"),role:"assistant",variant:"status",content:Pe.payload.text}]);break}case"StepInterrupted":{Ht.current.clear(),Mn.current.clear(),Ze(ce=>ce.map(De=>{let ot=De;return De.isStreaming&&(ot={...ot,isStreaming:!1}),De.toolCall?.subagentRunning&&(ot={...ot,toolCall:{...ot.toolCall,subagentRunning:!1}}),De.variant==="tool"&&De.toolCall?.state==="approval-requested"?{...ot,toolCall:{...De.toolCall,...ot.toolCall,state:"output-denied",approval:De.toolCall.approval?{...De.toolCall.approval,submitted:!0,resolved:!0,approved:!1,response:"reject"}:void 0}}:De.variant==="tool"&&De.toolCall?.state==="question-requested"?{...ot,toolCall:{...De.toolCall,...ot.toolCall,state:"question-responded",question:De.toolCall.question?{...De.toolCall.question,submitted:!0,resolved:!0}:void 0}}:De.variant==="tool"&&(ot.toolCall?.state==="input-streaming"||ot.toolCall?.state==="input-available")?{...ot,toolCall:{...ot.toolCall,state:"output-denied"}}:ot})),Rt(!1),oe.current?p("submitted"):p("ready");break}case"CompactionBegin":{const ce=Mt("assistant");xt.current=ce,Ze(De=>[...De,{id:ce,role:"assistant",variant:"status",content:"Compacting conversation history…",isStreaming:!0}]);break}case"CompactionEnd":{const ce=xt.current;xt.current=null,Ze(De=>{let ot=-1;for(let nt=De.length-1;nt>=0;nt--)if(De[nt].role==="user"){ot=nt;break}const rt=ot>=0?De.slice(ot):[];return ce?rt.filter(nt=>nt.id!==ce):rt});break}case"MCPLoadingBegin":{const ce=Mt("assistant");Et.current=ce,Ze(De=>[...De,{id:ce,role:"assistant",variant:"status",content:"Connecting to MCP servers…",isStreaming:!0}]);break}case"MCPLoadingEnd":{const ce=Et.current;Et.current=null,ce&&Ze(De=>De.filter(ot=>ot.id!==ce));break}case"PlanDisplay":{const ce=Pe.payload,De=Mt("assistant");Tt({id:De,role:"assistant",variant:"text",turnIndex:Be.current>0?Be.current-1:void 0,content:ce.content,isStreaming:!1});break}}},[Mt,Ze,Je,Tt,tt,mr,mn,lr,Rt,nn]),ca=x.useCallback(Pe=>{const Me=gc();Ee.current=Me;const We={jsonrpc:"2.0",method:"initialize",id:Me,params:{protocol_version:"1.9",client:{name:"kiwi",version:Lj},capabilities:{supports_question:!0,supports_plan_mode:!0}}};Pe.send(JSON.stringify(We)),console.log("[SessionStream] Sent initialize message")},[]),Ln=x.useCallback(Pe=>{try{const Me=JSON.parse(Pe);if(Me.error){if(Me.id===Ee.current){if(we.current+=1,we.current>Oe){Ee.current=null,we.current=0;return}Ee.current=null,setTimeout(()=>{$.current?.readyState===WebSocket.OPEN&&ca($.current)},2e3);return}console.error("[SessionStream] Received error:",Me.error);const ce=new Error(Me.error.message||"Unknown error");F(ce),s?.(ce),p("error"),Rt(!1),oe.current=!1,_t();return}if(Me.method==="session_status"){G.current&&(window.clearTimeout(G.current),G.current=null),an(Me.params);return}if(Me.result?.status==="finished"||Me.result?.status==="cancelled"){console.log(`[SessionStream] Stream ${Me.result.status}`),p("ready"),Rt(!1),oe.current=!1,L.current=!1,le(!1),_t();return}if(Me.method==="event"&&Me.params?.type==="ReplayComplete"){console.log("[SessionStream] Replay complete"),L.current=!1,le(!1),p("ready"),oe.current=!1;return}if(Me.method==="history_complete"){console.log("[SessionStream] History loaded, waiting for environment..."),L.current=!1,p(De=>De==="ready"?De:"submitted");const ce=$.current;G.current&&window.clearTimeout(G.current),G.current=window.setTimeout(()=>{$.current===ce&&(console.warn("[SessionStream] session_status timeout after history_complete, reconnecting..."),j.current())},15e3);return}if(Me.id&&Me.id===Ee.current&&Me.result){Ee.current=null,we.current=0;const{slash_commands:ce}=Me.result;ce&&ce.length>0&&(ie(ce),Ge.current=ce.length,ze.current=!1);return}if(Me.method==="request"){const ce=Me.params;if(ce?.type==="ApprovalRequest"){const De={type:"ApprovalRequest",payload:ce.payload};Zn(De,L.current,Me.id??De.payload.id);return}if(ce?.type==="QuestionRequest"){const De={type:"QuestionRequest",payload:ce.payload};Zn(De,L.current,Me.id??De.payload.id);return}}const We=Axe(Me);We&&Zn(We,L.current)}catch(Me){console.warn("[SessionStream] Failed to parse WebSocket message:",Pe,Me)}},[Zn,s,Rt,an,_t,ca]),Ur=x.useCallback(Pe=>{const Me=o1();if(n){const rt=`${n.replace(zxe,"ws")}/api/sessions/${Pe}/stream`;return Me?`${rt}?token=${encodeURIComponent(Me)}`:rt}const We=window.location.protocol==="https:"?"wss:":"ws:",ce=window.location.host,De=`${We}//${ce}/api/sessions/${Pe}/stream`;return Me?`${De}?token=${encodeURIComponent(Me)}`:De},[n]),Xs=x.useCallback(Pe=>{const Me=ae.current;if(Me){ae.current=null;const We={jsonrpc:"2.0",method:"prompt",id:gc(),params:{user_input:Me}};Pe.send(JSON.stringify(We)),Rt(!0),p("streaming"),console.log("[SessionStream] Sent pending message after connect:",Me)}},[Rt]),Zr=x.useCallback(async(Pe,Me,We)=>{const ce=$.current;if(!ce||ce.readyState!==WebSocket.OPEN)throw new Error("Not connected to session stream");const De=Ht.current.get(Pe);if(!De)throw new Error("Approval request not found");if(De.submitted)return;const ot=typeof We=="string"&&We.trim().length>0?We.trim():void 0,rt=Me!=="reject",nt=Me==="reject"?ot:void 0,Ct={jsonrpc:"2.0",id:De.rpcId??Pe,result:{request_id:De.requestId??Pe,response:Me,...Me==="reject"&&ot?{feedback:ot}:{}}};try{ce.send(JSON.stringify(Ct))}catch(Lt){throw Lt instanceof Error?Lt:new Error(String(Lt))}De.submitted=!0,Ht.current.set(Pe,De);const Ut=st.current.get(De.toolCallId),ht=rt?"input-available":"output-denied",St=rt;if(Ut){const Lt=Ut.approval??{id:Pe,action:"",description:"",sender:"",toolCallId:De.toolCallId},sn={...Lt,approved:rt,reason:rt?Lt.reason:nt??Lt.reason,submitted:!0,resolved:rt?Lt.resolved:!0,response:Me};Ut.approval=sn,Ut.messageId&&lr(Ut.messageId,Xt=>Xt.toolCall?{...Xt,isStreaming:St,toolCall:{...Xt.toolCall,state:ht,approval:sn,errorText:rt?Xt.toolCall.errorText:nt??Xt.toolCall.errorText}}:Xt)}},[lr]),Jr=x.useCallback(async(Pe,Me)=>{const We=$.current;if(!We||We.readyState!==WebSocket.OPEN)throw new Error("Not connected to session stream");const ce=Mn.current.get(Pe);if(!ce)throw new Error("Question request not found");if(ce.submitted)return;const De={jsonrpc:"2.0",id:ce.rpcId??Pe,result:{request_id:ce.requestId??Pe,answers:Me}};try{We.send(JSON.stringify(De))}catch(rt){throw rt instanceof Error?rt:new Error(String(rt))}ce.submitted=!0,Mn.current.set(Pe,ce);const ot=st.current.get(ce.toolCallId);ot?.messageId&&lr(ot.messageId,rt=>rt.toolCall?{...rt,isStreaming:!0,toolCall:{...rt.toolCall,state:"question-responded",question:rt.toolCall.question?{...rt.toolCall.question,submitted:!0,answers:Me}:void 0}}:rt)},[lr]),Va=x.useCallback(()=>{if(!t)return;we.current=0,$.current&&(console.log("[SessionStream] Closing existing WebSocket"),$.current.close(),$.current=null),Ne.current!==null&&(window.clearInterval(Ne.current),Ne.current=null),oe.current=!1,Vt(!0),Ze([]),p("submitted"),Rt(!!ae.current);const Pe=Ur(t);try{const Me=new WebSocket(Pe);$.current=Me,Me.onopen=()=>{if($.current!==Me){Me.close();return}console.log("[SessionStream] Connected to session:",t),R(!0),F(null),oe.current=!1,p("streaming"),fe.current=Date.now(),Ne.current!==null&&(window.clearInterval(Ne.current),Ne.current=null);const We=window.setInterval(()=>{if(!$.current||$.current!==Me){window.clearInterval(We),Ne.current===We&&(Ne.current=null);return}if($.current.readyState!==WebSocket.OPEN)return;const ce=Date.now()-fe.current,De=Array.from(Ht.current.values()).some(nt=>!nt.submitted),ot=Array.from(Mn.current.values()).some(nt=>!nt.submitted),rt=De||ot;ce>45e3&&at.current==="streaming"&&!rt&&(console.warn(`[SessionStream] Watchdog: no messages for ${Math.round(ce/1e3)}s while streaming, reconnecting...`),j.current())},1e4);Ne.current=We,ca(Me),Xs(Me)},Me.onmessage=We=>{$.current===Me&&(fe.current=Date.now(),Ln(We.data))},Me.onerror=We=>{if($.current!==Me)return;console.error("[SessionStream] WebSocket error:",We);const ce=new Error("WebSocket connection error");F(ce),s?.(ce),Rt(!1),oe.current=!1,ae.current=null},Me.onclose=We=>{if($.current===Me){if(console.log("[SessionStream] Disconnected:",We.code,We.reason),R(!1),$.current=null,ae.current=null,Ht.current.clear(),oe.current=!1,Rt(!1),y(null),be.current=null,Ne.current!==null&&(window.clearInterval(Ne.current),Ne.current=null),We.code===4004){const ce=new Error("Session not found");F(ce),s?.(ce)}else if(We.code===4029){const ce=new Error("Too many concurrent sessions");F(ce),s?.(ce)}_t(),p("ready")}}}catch(Me){console.error("[SessionStream] Failed to connect:",Me);const We=Me instanceof Error?Me:new Error(String(Me));F(We),s?.(We),oe.current=!1,Rt(!1),p("error"),ae.current=null}},[t,Vt,Ze,Ur,Ln,s,ca,Xs,Rt,_t]),Lr=x.useCallback(()=>{K.current!==null&&(window.clearTimeout(K.current),K.current=null),Ne.current!==null&&(window.clearInterval(Ne.current),Ne.current=null),$.current&&($.current.close(),$.current=null),oe.current=!1,Rt(!1),ae.current=null,R(!1),p("ready"),y(null),be.current=null,Ht.current.clear(),Mn.current.clear();const Pe=Et.current;Pe&&(Et.current=null,Ze(Me=>Me.filter(We=>We.id!==Pe))),_t()},[_t,Rt,Ze]),x0=x.useCallback(()=>{const Pe=$.current;if(!Pe||Pe.readyState!==WebSocket.OPEN){console.log("[SessionStream] Cancel requested before stream is ready, disconnecting instead"),oe.current=!1,ae.current=null,Ht.current.clear(),Mn.current.clear(),Ze(We=>We.map(ce=>ce.variant==="tool"&&ce.toolCall?.state==="approval-requested"?{...ce,isStreaming:!1,toolCall:{...ce.toolCall,state:"output-denied",approval:ce.toolCall.approval?{...ce.toolCall.approval,submitted:!0,resolved:!0,approved:!1,response:"reject"}:void 0}}:ce.variant==="tool"&&ce.toolCall?.state==="question-requested"?{...ce,isStreaming:!1,toolCall:{...ce.toolCall,state:"question-responded",question:ce.toolCall.question?{...ce.toolCall.question,submitted:!0,resolved:!0}:void 0}}:ce.variant==="tool"&&(ce.toolCall?.state==="input-streaming"||ce.toolCall?.state==="input-available")?{...ce,isStreaming:!1,toolCall:{...ce.toolCall,state:"output-denied"}}:ce)),Lr();return}Ht.current.clear(),Mn.current.clear(),Ze(We=>We.map(ce=>ce.variant==="tool"&&ce.toolCall?.state==="approval-requested"?{...ce,isStreaming:!1,toolCall:{...ce.toolCall,state:"output-denied",approval:ce.toolCall.approval?{...ce.toolCall.approval,submitted:!0,resolved:!0,approved:!1,response:"reject"}:void 0}}:ce.variant==="tool"&&ce.toolCall?.state==="question-requested"?{...ce,isStreaming:!1,toolCall:{...ce.toolCall,state:"question-responded",question:ce.toolCall.question?{...ce.toolCall.question,submitted:!0,resolved:!0}:void 0}}:ce.variant==="tool"&&(ce.toolCall?.state==="input-streaming"||ce.toolCall?.state==="input-available")?{...ce,isStreaming:!1,toolCall:{...ce.toolCall,state:"output-denied"}}:ce));const Me={jsonrpc:"2.0",method:"cancel",id:gc()};try{console.log("[SessionStream] Sending cancel request"),Pe.send(JSON.stringify(Me));const We=m==="streaming"||m==="submitted";oe.current=We,m==="streaming"&&p("submitted"),Rt(!1)}catch(We){console.error("[SessionStream] Failed to send cancel request:",We)}},[m,Lr,Rt,Ze]),y0=x.useCallback(()=>{Lr(),K.current=window.setTimeout(()=>{Va()},100)},[Lr,Va]);Z.current=Va,re.current=Lr,j.current=y0,H.current=Vt,at.current=m;const Ks=x.useCallback(async Pe=>{if(!Pe.trim())return;const Me=Pe.trim();if(Rt(!0),!$.current||$.current.readyState!==WebSocket.OPEN){if(!t)throw new Error("No session selected");ae.current=Me,Va();return}const We={jsonrpc:"2.0",method:"prompt",id:gc(),params:{user_input:Me}};$.current.send(JSON.stringify(We)),oe.current=!1,p("streaming")},[t,Va,Rt]),Nr=x.useCallback(()=>{Ze([]),H.current(!0)},[Ze]),ea=x.useCallback(Pe=>{if(!$.current||$.current.readyState!==WebSocket.OPEN)return;const Me={jsonrpc:"2.0",method:"set_plan_mode",id:gc(),params:{enabled:Pe}};$.current.send(JSON.stringify(Me))},[]);return x.useLayoutEffect(()=>{if($.current&&re.current(),H.current(!0),Ze([]),vf.getState().clearTodoItems(),t){const Pe=window.setTimeout(()=>{Z.current()},50);return()=>{window.clearTimeout(Pe),re.current()}}return le(!1),()=>{re.current()}},[t,Ze]),x.useEffect(()=>()=>{K.current!==null&&window.clearTimeout(K.current),Ne.current!==null&&window.clearInterval(Ne.current),$.current&&$.current.close()},[]),{messages:c,status:m,sessionStatus:b,isAwaitingFirstResponse:U,contextUsage:w,tokenUsage:k,currentStep:I,isConnected:O,isReplayingHistory:W,sendMessage:Ks,respondToApproval:Zr,respondToQuestion:Jr,cancel:x0,disconnect:Lr,reconnect:y0,connect:Va,setMessages:Ze,clearMessages:Nr,error:z,planMode:A,sendSetPlanMode:ea,slashCommands:se}}const el=Pj((e,t)=>({queue:[],enqueue:n=>e(r=>({queue:[...r.queue,{id:crypto.randomUUID(),text:n}]})),removeFromQueue:n=>e(r=>({queue:r.queue.filter(a=>a.id!==n)})),editQueueItem:(n,r)=>e(a=>({queue:a.queue.map(s=>s.id===n?{...s,text:r}:s)})),moveQueueItemUp:n=>e(r=>{const a=r.queue.findIndex(o=>o.id===n);if(a<=0)return r;const s=[...r.queue];return[s[a-1],s[a]]=[s[a],s[a-1]],{queue:s}}),dequeue:()=>{const{queue:n}=t();if(n.length===0)return;const[r,...a]=n;return e({queue:a}),r},clearQueue:()=>e({queue:[]})}));function Ir({className:e,...t}){return h.jsx("kbd",{"data-slot":"kbd",className:me("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none","[&_svg:not([class*='size-'])]:size-3","[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",e),...t})}function O6({className:e,...t}){return h.jsx("kbd",{"data-slot":"kbd-group",className:me("inline-flex items-center gap-1",e),...t})}function ry({label:e,value:t}){const[n,r]=x.useState(!1),a=x.useCallback(async()=>{try{await navigator.clipboard.writeText(t),r(!0),setTimeout(()=>r(!1),2e3)}catch(s){console.error("Failed to copy:",s)}},[t]);return h.jsxs("div",{className:"space-y-1",children:[h.jsx("p",{className:"text-xs text-muted-foreground",children:e}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx("code",{className:"flex-1 truncate rounded bg-muted px-2 py-1 font-mono text-xs",children:t})}),h.jsx(xn,{side:"top",className:"max-w-md break-all",children:t})]}),h.jsx("button",{type:"button",onClick:a,className:"shrink-0 rounded p-1 cursor-pointer text-muted-foreground transition-colors hover:bg-muted hover:text-foreground","aria-label":`Copy ${e}`,children:n?h.jsx(fo,{className:"size-3.5 text-green-500"}):h.jsx(Kc,{className:"size-3.5"})})]})]})}function qxe({sessionId:e,session:t}){return h.jsxs(G3,{children:[h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx(Y3,{asChild:!0,children:h.jsx("button",{type:"button","aria-label":"Session info",className:"inline-flex items-center justify-center rounded-md p-2 text-muted-foreground transition-colors hover:bg-secondary/60 hover:text-foreground",children:h.jsx(A$,{className:"size-4"})})})}),h.jsx(xn,{side:"bottom",children:"Session info"})]}),h.jsx(W3,{align:"end",className:"w-100 p-3",children:h.jsxs("div",{className:"space-y-3",children:[h.jsx("p",{className:"font-medium text-sm",children:"Session Info"}),h.jsx(ry,{label:"Session ID",value:e}),t?.workDir&&h.jsx(ry,{label:"Working Directory",value:t.workDir}),t?.sessionDir&&h.jsx(ry,{label:"Session Directory",value:t.sessionDir})]})})]})}const jj=[{id:"finder",label:"Finder",backendApp:"finder",macOnly:!0},{id:"cursor",label:"Cursor",backendApp:"cursor"},{id:"vscode",label:"VS Code",backendApp:"vscode"},{id:"antigravity",label:"Antigravity",backendApp:"antigravity"},{id:"iterm",label:"iTerm",backendApp:"iterm",macOnly:!0},{id:"terminal",label:"Terminal",backendApp:"terminal",macOnly:!0}],zj="pythinker-open-in-last-target",jv=new Set;function Vxe(){try{return localStorage.getItem(zj)}catch{return null}}function Gxe(e){return jv.add(e),()=>jv.delete(e)}function Bj(e){try{localStorage.setItem(zj,e)}catch{}for(const t of jv)t()}function Yxe(){return x.useSyncExternalStore(Gxe,Vxe,()=>null)}async function Fj(e,t){const n=await fetch("/api/open-in",{method:"POST",headers:{"Content-Type":"application/json",...na()},body:JSON.stringify({app:e,path:t})});if(n.ok)return;let r="Failed to open application.";try{const a=await n.json();a?.detail&&(r=String(a.detail))}catch{}throw new Error(r)}const Wxe=/\/+$/;function Xxe(e){const t=e.trim().replace(/\\/g,"/");if(t==="")return"/";const n=t.replace(Wxe,"");return n===""?"/":n}function Kxe(e,t=22){const n=Xxe(e);if(n.length<=t)return n;const r=n.split("/").filter(Boolean);if(r.length===0)return n.slice(0,t-1)+"…";const a=r.slice(-2).join("/");return a.length+2<=t?`…/${a}`:`…/${a.slice(-t+2)}`}const Qxe={finder:h.jsx(Zd,{className:"size-4"}),cursor:h.jsx(rA,{className:"size-4"}),vscode:h.jsx(lA,{className:"size-4"}),antigravity:h.jsx(FU,{className:"size-4"}),iterm:h.jsx(n4,{className:"size-4"}),terminal:h.jsx(TA,{className:"size-4"})};function Zxe({workDir:e,className:t}){const n=Tu(),r=!!(e&&e.trim().length>0),a=e?Kxe(e):"No directory",s=x.useMemo(()=>jj.filter(m=>!m.macOnly||n).map(m=>({...m,icon:Qxe[m.id]})),[n]),o=Yxe(),u=x.useMemo(()=>s.find(m=>m.id===o)??null,[s,o]),c=x.useCallback(async()=>{if(e)try{await navigator.clipboard.writeText(e),Cn.success("Path copied",{description:e})}catch(m){console.error("Failed to copy path:",m),Cn.error("Failed to copy path")}},[e]),d=x.useCallback(async m=>{if(!e){Cn.message("No working directory",{description:"Create a session with a working directory first."});return}try{await Fj(m.backendApp,e),Bj(m.id)}catch(p){console.error("Failed to open external URL:",p),Cn.error("Failed to open application",{description:p instanceof Error?p.message:"Unexpected error"})}},[e]);return n?h.jsxs(wQ,{className:me("h-8 items-center",t),"aria-label":"Open working directory",children:[h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsxs(TQ,{className:me("h-8 max-w-[220px] px-3 text-xs font-semibold","bg-secondary/40 text-foreground",!r&&"text-muted-foreground"),children:[h.jsx(n4,{className:"size-3.5"}),h.jsx("span",{className:"truncate",children:a})]})}),e?h.jsx(xn,{side:"bottom",className:"max-w-md break-all",children:e}):null]}),u?h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx(Bt,{type:"button",variant:"outline",size:"sm",disabled:!r,className:"h-8 px-2 text-xs","aria-label":`Open in ${u.label}`,onClick:()=>d(u),children:"Open"})}),h.jsxs(xn,{side:"bottom",children:["Open in ",u.label]})]}):null,h.jsxs(G3,{children:[h.jsx(Y3,{asChild:!0,children:h.jsxs(Bt,{type:"button",variant:"outline",size:"sm",disabled:!r,className:"h-8 px-2 text-xs","aria-label":"Choose app to open working directory",children:[!u&&"Open",h.jsx(ro,{className:"size-3"})]})}),h.jsxs(W3,{align:"end",className:"w-56",children:[s.map(m=>h.jsxs(Qp,{onSelect:()=>d(m),"aria-label":m.id===o?`${m.label} (last used)`:m.label,children:[m.icon,h.jsx("span",{children:m.label}),m.id===o&&h.jsx("span",{className:"ml-auto text-[10px] text-muted-foreground",children:"Last used"})]},m.id)),h.jsx(uL,{}),h.jsxs(Qp,{onSelect:c,children:[h.jsx(Kc,{className:"size-4"}),h.jsx("span",{children:"Copy path"})]})]})]})]}):null}function Jxe({currentStep:e,sessionDescription:t,currentSession:n,selectedSessionId:r,isFilesPanelOpen:a=!1,blocksExpanded:s,onToggleBlocks:o,onToggleFilesPanel:u,onOpenSearch:c,onOpenSidebar:d,onRenameSession:m}){const p=Tu()?"Cmd":"Ctrl",[b,y]=x.useState(!1),[w,S]=x.useState(""),k=x.useCallback(()=>{m&&r&&t&&(y(!0),S(t))},[m,r,t]),E=x.useCallback(()=>{y(!1),S("")},[]),A=x.useCallback(async()=>{if(!(r&&m)){E();return}const _=w.trim();if(!_){E();return}await m(r,_)&&E()},[r,w,m,E]);return h.jsxs("div",{className:"flex min-w-0 flex-col gap-2 px-3 py-2 sm:flex-row sm:items-center sm:justify-between sm:px-5 sm:py-3 lg:pl-8",children:[h.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[d?h.jsx("button",{type:"button","aria-label":"Open sessions sidebar",className:"inline-flex h-8 w-8 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-secondary/60 hover:text-foreground lg:hidden",onClick:d,children:h.jsx(xA,{className:"size-4"})}):null,h.jsx("div",{className:"min-w-0 flex-1",children:b?h.jsx(cL,{autoFocus:!0,value:w,onChange:_=>S(_.target.value),onBlur:A,onKeyDown:_=>{_.key==="Enter"&&(_.preventDefault(),A()),_.key==="Escape"&&(_.preventDefault(),E())},className:"h-7 text-xs font-bold"}):t?h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx("button",{type:"button",className:"truncate text-xs font-bold cursor-pointer hover:text-primary text-left bg-transparent border-none p-0",onDoubleClick:k,children:JH(t,60)})}),h.jsxs(xn,{side:"bottom",className:"max-w-md",children:[h.jsx("div",{children:t}),m&&h.jsx("div",{className:"text-muted-foreground text-[10px] mt-1",children:"Double-click to rename"})]})]}):null})]}),h.jsx("div",{className:"flex items-center justify-end gap-2",children:r&&h.jsxs(h.Fragment,{children:[n?.workDir?h.jsx("div",{className:"hidden lg:block",children:h.jsx(Zxe,{workDir:n.workDir})}):null,h.jsx(qxe,{sessionId:r,session:n}),u?h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx("button",{type:"button","aria-label":a?"Hide workspace files":"Show workspace files",className:"relative inline-flex items-center cursor-pointer justify-center rounded-md p-2 text-muted-foreground transition-colors hover:bg-secondary/60 hover:text-foreground",onClick:u,children:a?h.jsx(yA,{className:"size-4"}):h.jsx(X$,{className:"size-4"})})}),h.jsx(xn,{side:"bottom",children:a?"Hide workspace files":"Show workspace files"})]}):null,h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx("button",{type:"button","aria-label":"Search messages",className:"inline-flex items-center cursor-pointer justify-center rounded-md p-2 text-muted-foreground transition-colors hover:bg-secondary/60 hover:text-foreground",onClick:c,children:h.jsx(Nf,{className:"size-4"})})}),h.jsxs(xn,{className:"flex items-center gap-2",side:"bottom",children:[h.jsx("span",{children:"Search messages"}),h.jsxs(O6,{children:[h.jsx(Ir,{children:p}),h.jsx("span",{className:"text-muted-foreground",children:"+"}),h.jsx(Ir,{children:"F"})]})]})]}),h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx("button",{type:"button","aria-label":s?"Fold all blocks":"Unfold all blocks",className:"inline-flex items-center cursor-pointer justify-center rounded-md p-2 text-muted-foreground transition-colors hover:bg-secondary/60 hover:text-foreground",onClick:o,children:s?h.jsx(UU,{className:"size-4"}):h.jsx(qU,{className:"size-4"})})}),h.jsx(xn,{side:"bottom",children:s?"Fold all blocks":"Unfold all blocks"})]})]})})]})}const th="w-full max-w-full text-sm leading-relaxed overflow-visible",l1="text-xs text-muted-foreground";function eye({message:e,pendingApprovalMap:t,onApprovalAction:n,canRespondToApproval:r,blocksExpanded:a}){return x.useMemo(()=>{switch(e.variant){case"chain-of-thought":return tye(e);case"tool":return nye({message:e,pendingApprovalMap:t,onApprovalAction:n,canRespondToApproval:r,blocksExpanded:a});case"code":return sye(e);case"thinking":return iye(e,a);default:return nh(e)}},[e,t,n,r,a])}const nh=e=>h.jsx(d0,{className:th,children:h.jsxs("div",{className:"flex items-start gap-2",children:[h.jsx("div",{className:"relative mt-1.5 shrink-0 size-2",children:h.jsx("span",{className:me("absolute inset-0 rounded-full transition-all",e.isStreaming?"bg-green-500 shadow-[0_0_6px_rgba(34,197,94,0.4)] animate-[glow-pulse_1.5s_ease-in-out_infinite]":"bg-muted-foreground/40")})}),h.jsx("div",{className:"flex-1 min-w-0",children:h.jsx(og,{className:"wrap-break-word",mode:e.isStreaming?"streaming":"static",parseIncompleteMarkdown:!!e.isStreaming,children:e.content||"Thinking through the response..."})})]})}),tye=e=>{const t=e.chainOfThought;if(!t)return nh(e);const n=t.steps.slice(0,t.revealedSteps);return h.jsxs(d0,{className:th,children:[h.jsxs(CA,{className:"space-y-3",children:[h.jsx(kA,{children:t.title}),h.jsxs(RA,{children:[n.map((r,a)=>{const s=a===n.length-1,o=e.isStreaming&&s?"active":"complete";return h.jsx(AA,{description:r.description,label:r.label,status:o},`${e.id}-cot-${a}`)}),t.relatedSources&&t.relatedSources.length>0?h.jsx(NA,{className:"pt-1",children:t.relatedSources.map(r=>h.jsx(_A,{children:r},`${e.id}-${r}`))}):null]})]}),e.isStreaming?h.jsx("div",{className:`mt-2 ${l1}`,children:"Reasoning through the request…"}):null]})},nye=({message:e,pendingApprovalMap:t,onApprovalAction:n,canRespondToApproval:r,blocksExpanded:a})=>{const s=e.toolCall;if(!s)return nh(e);if(s.title==="Think")return aye(e,a);const o=!!(s.output??s.errorText??s.display),u=s.approval,c=u?.id,d=typeof u?.response=="string"?u.response:void 0,m=s.state==="approval-requested",p=s.state==="output-denied",b=c!==void 0?t[c]===!0:!1,y=!(r&&n&&!b&&!u?.submitted&&m),w=s.isSubagentOrigin?s.subagentType?`${s.subagentType} agent`:"sub-agent":null,S=h.jsxs("div",{className:"space-y-1",children:[h.jsxs(c2e,{defaultOpen:a,children:[h.jsx(p2e,{state:s.state,title:s.title,type:s.type,input:s.input}),h.jsxs(b2e,{children:[s.input?h.jsx(S2e,{input:s.input}):null,h.jsx(g2e,{display:s.display,isError:s.isError}),s.subagentSteps&&s.subagentSteps.length>0?h.jsx(aj,{steps:s.subagentSteps,isRunning:s.subagentRunning,defaultOpen:a,subagentType:s.subagentType}):null,o?h.jsx(_2e,{errorText:s.errorText,output:s.output,message:s.message}):null,u?h.jsxs(QK,{approval:u,state:s.state,className:"rounded-md bg-muted/30 px-3 py-2.5 text-sm",children:[h.jsxs(ZK,{children:["Manual approval required by ",u.sender]}),h.jsxs(JK,{children:[h.jsxs("div",{className:"text-sm text-muted-foreground",children:[h.jsxs("p",{children:[h.jsx("span",{className:"font-medium text-foreground",children:"Action:"})," ",u.action]}),u.description?h.jsx("p",{className:"mt-2 text-foreground",children:u.description}):null]}),h.jsxs(nQ,{className:"mt-2 gap-2",children:[h.jsx(Vb,{disabled:y,onClick:()=>u&&n?.(u,"reject"),variant:"outline",children:b?"Declining…":"Decline"}),h.jsx(Vb,{disabled:y,onClick:()=>u&&n?.(u,"approve"),children:b?"Confirming…":"Approve"}),h.jsx(Vb,{disabled:y,onClick:()=>u&&n?.(u,"approve_for_session"),variant:"secondary",className:"hover:bg-primary/30",children:b?"Approving session…":"Approve for session"})]})]}),h.jsx(eQ,{children:h.jsx("div",{className:"rounded-md bg-success/10 px-3 py-2 text-xs text-success",children:d==="approve_for_session"?"Session approved. Future matching requests auto-approve.":"Approval confirmed. Continuing execution…"})}),h.jsx(tQ,{children:h.jsxs("div",{className:"rounded-md bg-warning/10 px-3 py-2 text-xs text-warning",children:["Request denied",u.reason?`: ${u.reason}`:"."]})})]}):null]})]},`${e.id}-${a}`),s.mediaParts?h.jsx(N2e,{mediaParts:s.mediaParts}):null,m?h.jsx("div",{className:l1,children:"Waiting for your approval…"}):p?h.jsx("div",{className:l1,children:"Tool execution cancelled."}):null]});return w?h.jsxs("div",{className:"border-l-2 border-muted-foreground/20 pl-3 opacity-80",children:[h.jsx("div",{className:"text-[11px] text-muted-foreground/60 mb-0.5",children:w}),S]}):S},rye=({message:e,defaultOpen:t})=>{const n=e.toolCall,r=n?.input&&typeof n.input=="object"?n.input.thought:void 0,a=typeof r=="string"?r:"",[s,o]=x.useState(t),u=n?.state==="output-available"||n?.state==="output-error"||n?.state==="output-denied";return h.jsx(d0,{className:th,children:h.jsxs("div",{className:"not-prose",children:[h.jsxs("button",{type:"button",className:"flex items-center gap-1.5 text-sm text-muted-foreground cursor-pointer",onClick:()=>o(!s),children:[h.jsx(t4,{className:"size-3.5 text-muted-foreground/70 shrink-0"}),h.jsx("span",{className:"italic",children:u?"Thought through the problem":"Thinking through the problem…"}),h.jsx(fu,{className:me("size-3 text-muted-foreground/50 transition-transform duration-200",s&&"rotate-90")})]}),s&&a&&h.jsx("div",{className:"mt-1.5 pl-4 border-l-2 border-border text-sm text-muted-foreground italic whitespace-pre-wrap",children:a.length>500?`${a.slice(0,500)}…`:a})]})})},aye=(e,t)=>h.jsx(rye,{message:e,defaultOpen:t},`${e.id}-think-${t}`),sye=e=>{const t=e.codeSnippet;return t?h.jsxs(d0,{className:th,children:[h.jsx(og,{className:"wrap-break-word font-medium",mode:e.isStreaming?"streaming":"static",parseIncompleteMarkdown:!!e.isStreaming,children:e.content??t.title??"Generated code"}),t.code?h.jsx("div",{className:"mt-3",children:h.jsx(Fc,{code:t.code,language:t.language,showLineNumbers:!0})}):h.jsx("div",{className:`mt-3 ${l1}`,children:"Assembling snippet…"})]}):nh(e)},iye=(e,t)=>{const n=e.thinking;return n?h.jsx(d0,{className:th,children:h.jsxs(tj,{isStreaming:e.isStreaming,duration:e.thinkingDuration,defaultOpen:t,disableAutoClose:!0,children:[h.jsx(nj,{}),h.jsx(rj,{children:n})]},`${e.id}-${t}`)}):nh(e)},hg=0,yl=1,g0=2,Hj=4;function Fk(e){return()=>e}function oye(e){e()}function Uj(e,t){return n=>e(t(n))}function Hk(e,t){return()=>e(t)}function lye(e,t){return n=>e(t,n)}function L6(e){return e!==void 0}function uye(...e){return()=>{e.map(oye)}}function b0(){}function mg(e,t){return t(e),e}function cye(e,t){return t(e)}function Qn(...e){return e}function Rn(e,t){return e(yl,t)}function Zt(e,t){e(hg,t)}function P6(e){e(g0)}function rr(e){return e(Hj)}function vt(e,t){return Rn(e,lye(t,hg))}function Us(e,t){const n=e(yl,r=>{n(),t(r)});return n}function Uk(e){let t,n;return r=>a=>{t=a,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function $j(e,t){return e===t}function Xn(e=$j){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function jt(e){return t=>n=>{e(n)&&t(n)}}function ct(e){return t=>Uj(t,e)}function ui(e){return t=>()=>{t(e)}}function Ue(e,...t){const n=dye(...t);return(r,a)=>{switch(r){case g0:P6(e);return;case yl:return Rn(e,n(a))}}}function pi(e,t){return n=>r=>{n(t=e(t,r))}}function uu(e){return t=>n=>{e>0?e--:t(n)}}function Ji(e){let t=null,n;return r=>a=>{t=a,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function tn(...e){const t=new Array(e.length);let n=0,r=null;const a=Math.pow(2,e.length)-1;return e.forEach((s,o)=>{const u=Math.pow(2,o);Rn(s,c=>{const d=n;n=n|u,t[o]=c,d!==a&&n===a&&r&&(r(),r=null)})}),s=>o=>{const u=()=>{s([o].concat(t))};n===a?u():r=u}}function dye(...e){return t=>e.reduceRight(cye,t)}function fye(e){let t,n;const r=()=>t?.();return function(a,s){switch(a){case yl:return s?n===s?void 0:(r(),n=s,t=Rn(e,s),t):(r(),b0);case g0:r(),n=null;return}}}function Ke(e){let t=e;const n=yn();return(r,a)=>{switch(r){case hg:t=a;break;case yl:{a(t);break}case Hj:return t}return n(r,a)}}function oa(e,t){return mg(Ke(t),n=>vt(e,n))}function yn(){const e=[];return(t,n)=>{switch(t){case hg:e.slice().forEach(r=>{r(n)});return;case g0:e.splice(0,e.length);return;case yl:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function ls(e){return mg(yn(),t=>vt(e,t))}function Nn(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:hye(),singleton:n}}const hye=()=>Symbol();function mye(e){const t=new Map,n=({constructor:r,dependencies:a,id:s,singleton:o})=>{if(o&&t.has(s))return t.get(s);const u=r(a.map(c=>n(c)));return o&&t.set(s,u),u};return n(e)}function kr(...e){const t=yn(),n=new Array(e.length);let r=0;const a=Math.pow(2,e.length)-1;return e.forEach((s,o)=>{const u=Math.pow(2,o);Rn(s,c=>{n[o]=c,r=r|u,r===a&&Zt(t,n)})}),function(s,o){switch(s){case g0:{P6(t);return}case yl:return r===a&&o(n),Rn(t,o)}}}function Pt(e,t=$j){return Ue(e,Xn(t))}function zv(...e){return function(t,n){switch(t){case g0:return;case yl:return uye(...e.map(r=>Rn(r,n)))}}}var Ba=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Ba||{});const pye={0:"debug",3:"error",1:"log",2:"warn"},gye=()=>typeof globalThis>"u"?window:globalThis,vl=Nn(()=>{const e=Ke(3);return{log:Ke((t,n,r=1)=>{var a;const s=(a=gye().VIRTUOSO_LOG_LEVEL)!=null?a:rr(e);r>=s&&console[pye[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Eu(e,t,n){return j6(e,t,n).callbackRef}function j6(e,t,n){const r=ge.useRef(null);let a=o=>{};const s=ge.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(o=>{const u=()=>{const c=o[0].target;c.offsetParent!==null&&e(c)};n?u():requestAnimationFrame(u)}):null,[e,n]);return a=o=>{o&&t?(s?.observe(o),r.current=o):(r.current&&s?.unobserve(r.current),r.current=null)},{callbackRef:a,ref:r}}function bye(e,t,n,r,a,s,o,u,c){const d=ge.useCallback(m=>{const p=xye(m.children,t,u?"offsetWidth":"offsetHeight",a);let b=m.parentElement;for(;!b.dataset.virtuosoScroller;)b=b.parentElement;const y=b.lastElementChild.dataset.viewportType==="window";let w;y&&(w=b.ownerDocument.defaultView);const S=o?u?o.scrollLeft:o.scrollTop:y?u?w.scrollX||w.document.documentElement.scrollLeft:w.scrollY||w.document.documentElement.scrollTop:u?b.scrollLeft:b.scrollTop,k=o?u?o.scrollWidth:o.scrollHeight:y?u?w.document.documentElement.scrollWidth:w.document.documentElement.scrollHeight:u?b.scrollWidth:b.scrollHeight,E=o?u?o.offsetWidth:o.offsetHeight:y?u?w.innerWidth:w.innerHeight:u?b.offsetWidth:b.offsetHeight;r({scrollHeight:k,scrollTop:Math.max(S,0),viewportHeight:E}),s?.(u?$k("column-gap",getComputedStyle(m).columnGap,a):$k("row-gap",getComputedStyle(m).rowGap,a)),p!==null&&e(p)},[e,t,a,s,o,r,u]);return j6(d,n,c)}function xye(e,t,n,r){const a=e.length;if(a===0)return null;const s=[];for(let o=0;o<a;o++){const u=e.item(o);if(u.dataset.index===void 0)continue;const c=parseInt(u.dataset.index),d=parseFloat(u.dataset.knownSize),m=t(u,n);if(m===0&&r("Zero-sized element, this should not happen",{child:u},Ba.ERROR),m===d)continue;const p=s[s.length-1];s.length===0||p.size!==m||p.endIndex!==c-1?s.push({endIndex:c,size:m,startIndex:c}):s[s.length-1].endIndex++}return s}function $k(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Ba.WARN),t==="normal"?0:parseInt(t??"0",10)}function qj(e,t,n){const r=ge.useRef(null),a=ge.useCallback(c=>{if(!(c!=null&&c.offsetParent))return;const d=c.getBoundingClientRect(),m=d.width;let p,b;if(t){const y=t.getBoundingClientRect(),w=d.top-y.top;b=y.height-Math.max(0,w),p=w+t.scrollTop}else{const y=o.current.ownerDocument.defaultView;b=y.innerHeight-Math.max(0,d.top),p=d.top+y.scrollY}r.current={offsetTop:p,visibleHeight:b,visibleWidth:m},e(r.current)},[e,t]),{callbackRef:s,ref:o}=j6(a,!0,n),u=ge.useCallback(()=>{a(o.current)},[a,o]);return ge.useEffect(()=>{var c;if(t){t.addEventListener("scroll",u);const d=new ResizeObserver(()=>{requestAnimationFrame(u)});return d.observe(t),()=>{t.removeEventListener("scroll",u),d.unobserve(t)}}else{const d=(c=o.current)==null?void 0:c.ownerDocument.defaultView;return d?.addEventListener("scroll",u),d?.addEventListener("resize",u),()=>{d?.removeEventListener("scroll",u),d?.removeEventListener("resize",u)}}},[u,t,o]),s}const Ta=Nn(()=>{const e=yn(),t=yn(),n=Ke(0),r=yn(),a=Ke(0),s=yn(),o=yn(),u=Ke(0),c=Ke(0),d=Ke(0),m=Ke(0),p=yn(),b=yn(),y=Ke(!1),w=Ke(!1),S=Ke(!1);return vt(Ue(e,ct(({scrollTop:k})=>k)),t),vt(Ue(e,ct(({scrollHeight:k})=>k)),o),vt(t,a),{deviation:n,fixedFooterHeight:d,fixedHeaderHeight:c,footerHeight:m,headerHeight:u,horizontalDirection:w,scrollBy:b,scrollContainerState:e,scrollHeight:o,scrollingInProgress:y,scrollTo:p,scrollTop:t,skipAnimationFrameInResizeObserver:S,smoothScrollTargetReached:r,statefulScrollTop:a,viewportHeight:s}},[],{singleton:!0}),wf={lvl:0};function Vj(e,t){const n=e.length;if(n===0)return[];let{index:r,value:a}=t(e[0]);const s=[];for(let o=1;o<n;o++){const{index:u,value:c}=t(e[o]);s.push({end:u-1,start:r,value:a}),r=u,a=c}return s.push({end:1/0,start:r,value:a}),s}function Fn(e){return e===wf}function Tf(e,t){if(!Fn(e))return t===e.k?e.v:t<e.k?Tf(e.l,t):Tf(e.r,t)}function Gs(e,t,n="k"){if(Fn(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Gs(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Gs(e.l,t,n)}function ns(e,t,n){return Fn(e)?Wj(t,n,1):t===e.k?Dr(e,{k:t,v:n}):t<e.k?qk(Dr(e,{l:ns(e.l,t,n)})):qk(Dr(e,{r:ns(e.r,t,n)}))}function Oc(){return wf}function Lc(e,t,n){if(Fn(e))return[];const r=Gs(e,t)[0];return yye(Fv(e,r,n))}function Bv(e,t){if(Fn(e))return wf;const{k:n,l:r,r:a}=e;if(t===n){if(Fn(r))return a;if(Fn(a))return r;{const[s,o]=Yj(r);return xp(Dr(e,{k:s,l:Gj(r),v:o}))}}else return t<n?xp(Dr(e,{l:Bv(r,t)})):xp(Dr(e,{r:Bv(a,t)}))}function Ql(e){return Fn(e)?[]:[...Ql(e.l),{k:e.k,v:e.v},...Ql(e.r)]}function Fv(e,t,n){if(Fn(e))return[];const{k:r,l:a,r:s,v:o}=e;let u=[];return r>t&&(u=u.concat(Fv(a,t,n))),r>=t&&r<=n&&u.push({k:r,v:o}),r<=n&&(u=u.concat(Fv(s,t,n))),u}function xp(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(ay(t))return Xj(Dr(e,{lvl:n-1}));if(!Fn(t)&&!Fn(t.r))return Dr(t.r,{l:Dr(t,{r:t.r.l}),lvl:n,r:Dr(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(ay(e))return Hv(Dr(e,{lvl:n-1}));if(!Fn(r)&&!Fn(r.l)){const a=r.l,s=ay(a)?r.lvl-1:r.lvl;return Dr(a,{l:Dr(e,{lvl:n-1,r:a.l}),lvl:a.lvl+1,r:Hv(Dr(r,{l:a.r,lvl:s}))})}else throw new Error("Unexpected empty nodes")}}function Dr(e,t){return Wj(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function Gj(e){return Fn(e.r)?e.l:xp(Dr(e,{r:Gj(e.r)}))}function ay(e){return Fn(e)||e.lvl>e.r.lvl}function Yj(e){return Fn(e.r)?[e.k,e.v]:Yj(e.r)}function Wj(e,t,n,r=wf,a=wf){return{k:e,l:r,lvl:n,r:a,v:t}}function qk(e){return Hv(Xj(e))}function Xj(e){const{l:t}=e;return!Fn(t)&&t.lvl===e.lvl?Dr(t,{r:Dr(e,{l:t.r})}):e}function Hv(e){const{lvl:t,r:n}=e;return!Fn(n)&&!Fn(n.r)&&n.lvl===t&&n.r.lvl===t?Dr(n,{l:Dr(e,{r:n.l}),lvl:t+1}):e}function yye(e){return Vj(e,({k:t,v:n})=>({index:t,value:n}))}function Kj(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Ef(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const z6=Nn(()=>({recalcInProgress:Ke(!1)}),[],{singleton:!0});function Qj(e,t,n){return e[u1(e,t,n)]}function u1(e,t,n,r=0){let a=e.length-1;for(;r<=a;){const s=Math.floor((r+a)/2),o=e[s],u=n(o,t);if(u===0)return s;if(u===-1){if(a-r<2)return s-1;a=s-1}else{if(a===r)return s;r=s+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function vye(e,t,n,r){const a=u1(e,t,r),s=u1(e,n,r,a);return e.slice(a,s+1)}function hl(e,t){return Math.round(e.getBoundingClientRect()[t])}function pg(e){return!Fn(e.groupOffsetTree)}function B6({index:e},t){return t===e?0:t<e?-1:1}function wye(){return{groupIndices:[],groupOffsetTree:Oc(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Oc()}}function Tye(e,t){let n=Fn(e)?0:1/0;for(const r of t){const{endIndex:a,size:s,startIndex:o}=r;if(n=Math.min(n,o),Fn(e)){e=ns(e,0,s);continue}const u=Lc(e,o-1,a+1);if(u.some(_ye(r)))continue;let c=!1,d=!1;for(const{end:m,start:p,value:b}of u)c?(a>=p||s===b)&&(e=Bv(e,p)):(d=b!==s,c=!0),m>a&&a>=p&&b!==s&&(e=ns(e,a+1,b));d&&(e=ns(e,o,s))}return[e,n]}function Eye(e){return typeof e.groupIndex<"u"}function Sye({offset:e},t){return t===e?0:t<e?-1:1}function Sf(e,t,n){if(t.length===0)return 0;const{index:r,offset:a,size:s}=Qj(t,e,B6),o=e-r,u=s*o+(o-1)*n+a;return u>0?u+n:u}function Zj(e,t){if(!pg(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Jj(e,t,n){if(Eye(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let a=Zj(r,t);return a=Math.max(0,a,Math.min(n,a)),a}}function Cye(e,t,n,r=0){return r>0&&(t=Math.max(t,Qj(e,r,B6).offset)),Vj(vye(e,t,n,Sye),Nye)}function kye(e,[t,n,r,a]){t.length>0&&r("received item sizes",t,Ba.DEBUG);const s=e.sizeTree;let o=s,u=0;if(n.length>0&&Fn(s)&&t.length===2){const b=t[0].size,y=t[1].size;o=n.reduce((w,S)=>ns(ns(w,S,b),S+1,y),o)}else[o,u]=Tye(o,t);if(o===s)return e;const{lastIndex:c,lastOffset:d,lastSize:m,offsetTree:p}=Uv(e.offsetTree,u,o,a);return{groupIndices:n,groupOffsetTree:n.reduce((b,y)=>ns(b,y,Sf(y,p,a)),Oc()),lastIndex:c,lastOffset:d,lastSize:m,offsetTree:p,sizeTree:o}}function Aye(e){return Ql(e).map(({k:t,v:n},r,a)=>{const s=a[r+1];return{endIndex:s?s.k-1:1/0,size:n,startIndex:t}})}function Vk(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function Uv(e,t,n,r){let a=e,s=0,o=0,u=0,c=0;if(t!==0){c=u1(a,t-1,B6),u=a[c].offset;const d=Gs(n,t-1);s=d[0],o=d[1],a.length&&a[c].size===Gs(n,t)[1]&&(c-=1),a=a.slice(0,c+1)}else a=[];for(const{start:d,value:m}of Lc(n,t,1/0)){const p=d-s,b=p*o+u+p*r;a.push({index:d,offset:b,size:m}),s=d,u=b,o=m}return{lastIndex:s,lastOffset:u,lastSize:o,offsetTree:a}}function Nye(e){return{index:e.index,value:e}}function _ye(e){const{endIndex:t,size:n,startIndex:r}=e;return a=>a.start===r&&(a.end===t||a.end===1/0)&&a.value===n}const Rye={offsetHeight:"height",offsetWidth:"width"},Ni=Nn(([{log:e},{recalcInProgress:t}])=>{const n=yn(),r=yn(),a=oa(r,0),s=yn(),o=yn(),u=Ke(0),c=Ke([]),d=Ke(void 0),m=Ke(void 0),p=Ke(void 0),b=Ke(void 0),y=Ke((R,z)=>hl(R,Rye[z])),w=Ke(void 0),S=Ke(0),k=wye(),E=oa(Ue(n,tn(c,e,S),pi(kye,k),Xn()),k),A=oa(Ue(c,Xn(),pi((R,z)=>({current:z,prev:R.current}),{current:[],prev:[]}),ct(({prev:R})=>R)),[]);vt(Ue(c,jt(R=>R.length>0),tn(E,S),ct(([R,z,F])=>{const U=R.reduce((X,W,le)=>ns(X,W,Sf(W,z.offsetTree,F)||le),Oc());return{...z,groupIndices:R,groupOffsetTree:U}})),E),vt(Ue(r,tn(E),jt(([R,{lastIndex:z}])=>R<z),ct(([R,{lastIndex:z,lastSize:F}])=>[{endIndex:z,size:F,startIndex:R}])),n),vt(d,m);const _=oa(Ue(d,ct(R=>R===void 0)),!0);vt(Ue(m,jt(R=>R!==void 0&&Fn(rr(E).sizeTree)),ct(R=>{const z=rr(p),F=rr(c).length>0;return z?F?[{endIndex:0,size:z,startIndex:0},{endIndex:1,size:R,startIndex:1}]:[]:[{endIndex:0,size:R,startIndex:0}]})),n),vt(Ue(b,jt(R=>R!==void 0&&R.length>0&&Fn(rr(E).sizeTree)),ct(R=>{const z=[];let F=R[0],U=0;for(let X=1;X<R.length;X++){const W=R[X];W!==F&&(z.push({endIndex:X-1,size:F,startIndex:U}),F=W,U=X)}return z.push({endIndex:R.length-1,size:F,startIndex:U}),z})),n),vt(Ue(c,tn(p,m),jt(([,R,z])=>R!==void 0&&z!==void 0),ct(([R,z,F])=>{const U=[];for(let X=0;X<R.length;X++){const W=R[X],le=R[X+1];U.push({startIndex:W,endIndex:W,size:z}),le!==void 0&&U.push({startIndex:W+1,endIndex:le-1,size:F})}return U})),n);const I=ls(Ue(n,tn(E),pi(({sizes:R},[z,F])=>({changed:F!==R,sizes:F}),{changed:!1,sizes:k}),ct(R=>R.changed)));Rn(Ue(u,pi((R,z)=>({diff:R.prev-z,prev:z}),{diff:0,prev:0}),ct(R=>R.diff)),R=>{const{groupIndices:z}=rr(E);if(R>0)Zt(t,!0),Zt(s,R+Vk(R,z));else if(R<0){const F=rr(A);F.length>0&&(R-=Vk(-R,F)),Zt(o,R)}}),Rn(Ue(u,tn(e)),([R,z])=>{R<0&&z("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:u},Ba.ERROR)});const P=ls(s);vt(Ue(s,tn(E),ct(([R,z])=>{const F=z.groupIndices.length>0,U=[],X=z.lastSize;if(F){const W=Tf(z.sizeTree,0);let le=0,se=0;for(;le<R;){const $=z.groupIndices[se],K=z.groupIndices.length===se+1?1/0:z.groupIndices[se+1]-$-1;U.push({endIndex:$,size:W,startIndex:$}),U.push({endIndex:$+1+K-1,size:X,startIndex:$+1}),se++,le+=K+1}const ie=Ql(z.sizeTree);return le!==R&&ie.shift(),ie.reduce(($,{k:K,v:Z})=>{let re=$.ranges;return $.prevSize!==0&&(re=[...$.ranges,{endIndex:K+R-1,size:$.prevSize,startIndex:$.prevIndex}]),{prevIndex:K+R,prevSize:Z,ranges:re}},{prevIndex:R,prevSize:0,ranges:U}).ranges}return Ql(z.sizeTree).reduce((W,{k:le,v:se})=>({prevIndex:le+R,prevSize:se,ranges:[...W.ranges,{endIndex:le+R-1,size:W.prevSize,startIndex:W.prevIndex}]}),{prevIndex:0,prevSize:X,ranges:[]}).ranges})),n);const O=ls(Ue(o,tn(E,S),ct(([R,{offsetTree:z},F])=>{const U=-R;return Sf(U,z,F)})));return vt(Ue(o,tn(E,S),ct(([R,z,F])=>{if(z.groupIndices.length>0){if(Fn(z.sizeTree))return z;let U=Oc();const X=rr(A);let W=0,le=0,se=0;for(;W<-R;){se=X[le];const ie=X[le+1]-se-1;le++,W+=ie+1}if(U=Ql(z.sizeTree).reduce((ie,{k:$,v:K})=>ns(ie,Math.max(0,$+R),K),U),W!==-R){const ie=Tf(z.sizeTree,se);U=ns(U,0,ie);const $=Gs(z.sizeTree,-R+1)[1];U=ns(U,1,$)}return{...z,sizeTree:U,...Uv(z.offsetTree,0,U,F)}}else{const U=Ql(z.sizeTree).reduce((X,{k:W,v:le})=>ns(X,Math.max(0,W+R),le),Oc());return{...z,sizeTree:U,...Uv(z.offsetTree,0,U,F)}}})),E),{beforeUnshiftWith:P,data:w,defaultItemSize:m,firstItemIndex:u,fixedItemSize:d,fixedGroupSize:p,gap:S,groupIndices:c,heightEstimates:b,itemSize:y,listRefresh:I,shiftWith:o,shiftWithOffset:O,sizeRanges:n,sizes:E,statefulTotalCount:a,totalCount:r,trackItemSizes:_,unshiftWith:s}},Qn(vl,z6),{singleton:!0});function Mye(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const ez=Nn(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:a}])=>{const s=yn(),o=yn(),u=ls(Ue(s,ct(Mye)));return vt(Ue(u,ct(c=>c.totalCount)),n),vt(Ue(u,ct(c=>c.groupIndices)),e),vt(Ue(kr(a,t,r),jt(([c,d])=>pg(d)),ct(([c,d,m])=>Gs(d.groupOffsetTree,Math.max(c-m,0),"v")[0]),Xn(),ct(c=>[c])),o),{groupCounts:s,topItemsIndexes:o}},Qn(Ni,Ta)),wl=Nn(([{log:e}])=>{const t=Ke(!1),n=ls(Ue(t,jt(r=>r),Xn()));return Rn(t,r=>{r&&rr(e)("props updated",{},Ba.DEBUG)}),{didMount:n,propsReady:t}},Qn(vl),{singleton:!0}),Dye=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function tz(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!Dye)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const rh=Nn(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:a,fixedHeaderHeight:s,footerHeight:o,headerHeight:u,scrollingInProgress:c,scrollTo:d,smoothScrollTargetReached:m,viewportHeight:p},{log:b}])=>{const y=yn(),w=yn(),S=Ke(0);let k=null,E=null,A=null;function _(){k&&(k(),k=null),A&&(A(),A=null),E&&(clearTimeout(E),E=null),Zt(c,!1)}return vt(Ue(y,tn(n,p,r,S,u,o,b),tn(e,s,a),ct(([[I,P,O,R,z,F,U,X],W,le,se])=>{const ie=tz(I),{align:$,behavior:K,offset:Z}=ie,re=R-1,j=Jj(ie,P,re);let H=Sf(j,P.offsetTree,W)+F;$==="end"?(H+=le+Gs(P.sizeTree,j)[1]-O+se,j===re&&(H+=U)):$==="center"?H+=(le+Gs(P.sizeTree,j)[1]-O+se)/2:H-=z,Z&&(H+=Z);const G=L=>{_(),L?(X("retrying to scroll to",{location:I},Ba.DEBUG),Zt(y,I)):(Zt(w,!0),X("list did not change, scroll successful",{},Ba.DEBUG))};if(_(),K==="smooth"){let L=!1;A=Rn(t,ae=>{L=L||ae}),k=Us(m,()=>{G(L)})}else k=Us(Ue(t,Iye(150)),G);return E=setTimeout(()=>{_()},1200),Zt(c,!0),X("scrolling from index to",{behavior:K,index:j,top:H},Ba.DEBUG),{behavior:K,top:H}})),d),{scrollTargetReached:w,scrollToIndex:y,topListHeight:S}},Qn(Ni,Ta,vl),{singleton:!0});function Iye(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function F6(e,t){e==0?t():requestAnimationFrame(()=>{F6(e-1,t)})}function H6(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const ah=Nn(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:a,scrollToIndex:s},{didMount:o}])=>{const u=Ke(!0),c=Ke(0),d=Ke(!0);return vt(Ue(o,tn(c),jt(([m,p])=>!!p),ui(!1)),u),vt(Ue(o,tn(c),jt(([m,p])=>!!p),ui(!1)),d),Rn(Ue(kr(t,o),tn(u,n,e,d),jt(([[,m],p,{sizeTree:b},y,w])=>m&&(!Fn(b)||L6(y))&&!p&&!w),tn(c)),([,m])=>{Us(a,()=>{Zt(d,!0)}),F6(4,()=>{Us(r,()=>{Zt(u,!0)}),Zt(s,m)})}),{initialItemFinalLocationReached:d,initialTopMostItemIndex:c,scrolledToInitialItem:u}},Qn(Ni,Ta,rh,wl),{singleton:!0});function nz(e,t){return Math.abs(e-t)<1.01}const Cf="up",Kd="down",Oye="none",Lye={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},Pye=0,sh=Nn(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:a,viewportHeight:s}])=>{const o=Ke(!1),u=Ke(!0),c=yn(),d=yn(),m=Ke(4),p=Ke(Pye),b=oa(Ue(zv(Ue(Pt(a),uu(1),ui(!0)),Ue(Pt(a),uu(1),ui(!1),Uk(100))),Xn()),!1),y=oa(Ue(zv(Ue(n,ui(!0)),Ue(n,ui(!1),Uk(200))),Xn()),!1);vt(Ue(kr(Pt(a),Pt(p)),ct(([A,_])=>A<=_),Xn()),u),vt(Ue(u,Ji(50)),d);const w=ls(Ue(kr(r,Pt(s),Pt(t),Pt(e),Pt(m)),pi((A,[{scrollHeight:_,scrollTop:I},P,O,R,z])=>{const F=I+P-_>-z,U={scrollHeight:_,scrollTop:I,viewportHeight:P};if(F){let W,le;return I>A.state.scrollTop?(W="SCROLLED_DOWN",le=A.state.scrollTop-I):(W="SIZE_DECREASED",le=A.state.scrollTop-I||A.scrollTopDelta),{atBottom:!0,atBottomBecause:W,scrollTopDelta:le,state:U}}let X;return U.scrollHeight>A.state.scrollHeight?X="SIZE_INCREASED":P<A.state.viewportHeight?X="VIEWPORT_HEIGHT_DECREASING":I<A.state.scrollTop?X="SCROLLING_UPWARDS":X="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:X,state:U}},Lye),Xn((A,_)=>A&&A.atBottom===_.atBottom))),S=oa(Ue(r,pi((A,{scrollHeight:_,scrollTop:I,viewportHeight:P})=>{if(nz(A.scrollHeight,_))return{changed:!1,jump:0,scrollHeight:_,scrollTop:I};{const O=_-(I+P)<1;return A.scrollTop!==I&&O?{changed:!0,jump:A.scrollTop-I,scrollHeight:_,scrollTop:I}:{changed:!0,jump:0,scrollHeight:_,scrollTop:I}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),jt(A=>A.changed),ct(A=>A.jump)),0);vt(Ue(w,ct(A=>A.atBottom)),o),vt(Ue(o,Ji(50)),c);const k=Ke(Kd);vt(Ue(r,ct(({scrollTop:A})=>A),Xn(),pi((A,_)=>rr(y)?{direction:A.direction,prevScrollTop:_}:{direction:_<A.prevScrollTop?Cf:Kd,prevScrollTop:_},{direction:Kd,prevScrollTop:0}),ct(A=>A.direction)),k),vt(Ue(r,Ji(50),ui(Oye)),k);const E=Ke(0);return vt(Ue(b,jt(A=>!A),ui(0)),E),vt(Ue(a,Ji(100),tn(b),jt(([A,_])=>!!_),pi(([A,_],[I])=>[_,I],[0,0]),ct(([A,_])=>_-A)),E),{atBottomState:w,atBottomStateChange:c,atBottomThreshold:m,atTopStateChange:d,atTopThreshold:p,isAtBottom:o,isAtTop:u,isScrolling:b,lastJumpDueToItemResize:S,scrollDirection:k,scrollVelocity:E}},Qn(Ta)),kf="top",Af="bottom",Gk="none";function Yk(e,t,n){return typeof e=="number"?n===Cf&&t===kf||n===Kd&&t===Af?e:0:n===Cf?t===kf?e.main:e.reverse:t===Af?e.main:e.reverse}function Wk(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const U6=Nn(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:a}])=>{const s=yn(),o=Ke(0),u=Ke(0),c=Ke(0),d=oa(Ue(kr(Pt(r),Pt(a),Pt(n),Pt(s,Ef),Pt(c),Pt(o),Pt(t),Pt(e),Pt(u)),ct(([m,p,b,[y,w],S,k,E,A,_])=>{const I=m-A,P=k+E,O=Math.max(b-I,0);let R=Gk;const z=Wk(_,kf),F=Wk(_,Af);return y-=A,y+=b+E,w+=b+E,w-=A,y>m+P-z&&(R=Cf),w<m-O+p+F&&(R=Kd),R!==Gk?[Math.max(I-b-Yk(S,kf,R)-z,0),I-O-E+p+Yk(S,Af,R)+F]:null}),jt(m=>m!=null),Xn(Ef)),[0,0]);return{increaseViewportBy:u,listBoundary:s,overscan:c,topListHeight:o,visibleRange:d}},Qn(Ta),{singleton:!0});function jye(e,t,n){if(pg(t)){const r=Zj(e,t);return[{index:Gs(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}const sy={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function yp(e,t,n,r,a,s){const{lastIndex:o,lastOffset:u,lastSize:c}=a;let d=0,m=0;if(e.length>0){d=e[0].offset;const S=e[e.length-1];m=S.offset+S.size}const p=n-o,b=u+p*c+(p-1)*r,y=d,w=b-m;return{bottom:m,firstItemIndex:s,items:Xk(e,a,s),offsetBottom:w,offsetTop:d,top:y,topItems:Xk(t,a,s),topListHeight:t.reduce((S,k)=>k.size+S,0),totalCount:n}}function rz(e,t,n,r,a,s){let o=0;if(n.groupIndices.length>0)for(const m of n.groupIndices){if(m-o>=e)break;o++}const u=e+o,c=H6(t,u),d=Array.from({length:u}).map((m,p)=>({data:s[p+c],index:p+c,offset:0,size:0}));return yp(d,[],u,a,n,r)}function Xk(e,t,n){if(e.length===0)return[];if(!pg(t))return e.map(d=>({...d,index:d.index+n,originalIndex:d.index}));const r=e[0].index,a=e[e.length-1].index,s=[],o=Lc(t.groupOffsetTree,r,a);let u,c=0;for(const d of e){(!u||u.end<d.index)&&(u=o.shift(),c=t.groupIndices.indexOf(u.start));let m;d.index===u.start?m={index:c,type:"group"}:m={groupIndex:c,index:d.index-(c+1)+n},s.push({...m,data:d.data,offset:d.offset,originalIndex:d.index,size:d.size})}return s}function Kk(e,t){var n;return e===void 0?0:typeof e=="number"?e:(n=e[t])!=null?n:0}const Su=Nn(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:a},s,{listBoundary:o,topListHeight:u,visibleRange:c},{initialTopMostItemIndex:d,scrolledToInitialItem:m},{topListHeight:p},b,{didMount:y},{recalcInProgress:w}])=>{const S=Ke([]),k=Ke(0),E=yn(),A=Ke(0);vt(s.topItemsIndexes,S);const _=oa(Ue(kr(y,w,Pt(c,Ef),Pt(a),Pt(r),Pt(d),m,Pt(S),Pt(t),Pt(n),Pt(A),e),jt(([R,z,,F,,,,,,,,U])=>{const X=U&&U.length!==F;return R&&!z&&!X}),ct(([,,[R,z],F,U,X,W,le,se,ie,$,K])=>{var Z,re,j,H;const G=U,{offsetTree:L,sizeTree:ae}=G,oe=rr(k);if(F===0)return{...sy,totalCount:F};if(R===0&&z===0)return oe===0?{...sy,totalCount:F}:rz(oe,X,U,se,ie,K||[]);if(Fn(ae))return oe>0?null:yp(jye(H6(X,F),G,K),[],F,ie,G,se);const Se=[];if(le.length>0){const Ee=le[0],we=le[le.length-1];let Oe=0;for(const ze of Lc(ae,Ee,we)){const Ge=ze.value,it=Math.max(ze.start,Ee),At=Math.min(ze.end,we);for(let st=it;st<=At;st++)Se.push({data:K?.[st],index:st,offset:Oe,size:Ge}),Oe+=Ge}}if(!W)return yp([],Se,F,ie,G,se);const be=le.length>0?le[le.length-1]+1:0,fe=Cye(L,R,z,be);if(fe.length===0)return null;const Ne=F-1,at=mg([],Ee=>{for(const we of fe){const Oe=we.value;let ze=Oe.offset,Ge=we.start;const it=Oe.size;if(Oe.offset<R){Ge+=Math.floor((R-Oe.offset+ie)/(it+ie));const st=Ge-we.start;ze+=st*it+st*ie}Ge<be&&(ze+=(be-Ge)*it,Ge=be);const At=Math.min(we.end,Ne);for(let st=Ge;st<=At&&!(ze>=z);st++)Ee.push({data:K?.[st],index:st,offset:ze,size:it}),ze+=it+ie}}),Ce=Kk($,kf),Re=Kk($,Af);if(at.length>0&&(Ce>0||Re>0)){const Ee=at[0],we=at[at.length-1];if(Ce>0&&Ee.index>be){const Oe=Math.min(Ce,Ee.index-be),ze=[];let Ge=Ee.offset;for(let it=Ee.index-1;it>=Ee.index-Oe;it--){const At=(re=(Z=Lc(ae,it,it)[0])==null?void 0:Z.value)!=null?re:Ee.size;Ge-=At+ie,ze.unshift({data:K?.[it],index:it,offset:Ge,size:At})}at.unshift(...ze)}if(Re>0&&we.index<Ne){const Oe=Math.min(Re,Ne-we.index);let ze=we.offset+we.size+ie;for(let Ge=we.index+1;Ge<=we.index+Oe;Ge++){const it=(H=(j=Lc(ae,Ge,Ge)[0])==null?void 0:j.value)!=null?H:we.size;at.push({data:K?.[Ge],index:Ge,offset:ze,size:it}),ze+=it+ie}}}return yp(at,Se,F,ie,G,se)}),jt(R=>R!==null),Xn()),sy);vt(Ue(e,jt(L6),ct(R=>R?.length)),a),vt(Ue(_,ct(R=>R.topListHeight)),p),vt(p,u),vt(Ue(_,ct(R=>[R.top,R.bottom])),o),vt(Ue(_,ct(R=>R.items)),E);const I=ls(Ue(_,jt(({items:R})=>R.length>0),tn(a,e),jt(([{items:R},z])=>R[R.length-1].originalIndex===z-1),ct(([,R,z])=>[R-1,z]),Xn(Ef),ct(([R])=>R))),P=ls(Ue(_,Ji(200),jt(({items:R,topItems:z})=>R.length>0&&R[0].originalIndex===z.length),ct(({items:R})=>R[0].index),Xn())),O=ls(Ue(_,jt(({items:R})=>R.length>0),ct(({items:R})=>{let z=0,F=R.length-1;for(;R[z].type==="group"&&z<F;)z++;for(;R[F].type==="group"&&F>z;)F--;return{endIndex:R[F].index,startIndex:R[z].index}}),Xn(Kj)));return{endReached:I,initialItemCount:k,itemsRendered:E,listState:_,minOverscanItemCount:A,rangeChanged:O,startReached:P,topItemsIndexes:S,...b}},Qn(Ni,ez,U6,ah,rh,sh,wl,z6),{singleton:!0}),az=Nn(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:a}])=>{const s=yn(),o=oa(Ue(kr(n,e,r,t,a),ct(([u,c,d,m,p])=>u+c+d+m+p.offsetBottom+p.bottom)),0);return vt(Pt(o),s),{totalListHeight:o,totalListHeightChanged:s}},Qn(Ta,Su),{singleton:!0}),zye=Nn(([{viewportHeight:e},{totalListHeight:t}])=>{const n=Ke(!1),r=oa(Ue(kr(n,e,t),jt(([a])=>a),ct(([,a,s])=>Math.max(0,a-s)),Ji(0),Xn()),0);return{alignToBottom:n,paddingTopAddition:r}},Qn(Ta,az),{singleton:!0}),sz=Nn(()=>({context:Ke(null)})),Bye=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...a},viewportBottom:s,viewportTop:o})=>t<o?{...a,align:n??"start",behavior:r}:e>s?{...a,align:n??"end",behavior:r}:null,iz=Nn(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:a,headerHeight:s,scrollingInProgress:o,scrollTop:u,viewportHeight:c},{scrollToIndex:d}])=>{const m=yn();return vt(Ue(m,tn(t,c,n,s,a,r,u),tn(e),ct(([[p,b,y,w,S,k,E,A],_])=>{const{align:I,behavior:P,calculateViewLocation:O=Bye,done:R,...z}=p,F=Jj(p,b,w-1),U=Sf(F,b.offsetTree,_)+S+k,X=U+Gs(b.sizeTree,F)[1],W=A+k,le=A+y-E,se=O({itemBottom:X,itemTop:U,locationParams:{align:I,behavior:P,...z},viewportBottom:le,viewportTop:W});return se?R&&Us(Ue(o,jt(ie=>!ie),uu(rr(o)?1:2)),R):R&&R(),se}),jt(p=>p!==null)),d),{scrollIntoView:m}},Qn(Ni,Ta,rh,Su,vl),{singleton:!0});function Qk(e){return e?e==="smooth"?"smooth":"auto":!1}const Fye=(e,t)=>typeof e=="function"?Qk(e(t)):t&&Qk(e),Hye=Nn(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:a,isAtBottom:s},{scrollToIndex:o},{scrolledToInitialItem:u},{didMount:c,propsReady:d},{log:m},{scrollingInProgress:p},{context:b},{scrollIntoView:y}])=>{const w=Ke(!1),S=yn();let k=null;function E(P){Zt(o,{align:"end",behavior:P,index:"LAST"})}Rn(Ue(kr(Ue(Pt(t),uu(1)),c),tn(Pt(w),s,u,p),ct(([[P,O],R,z,F,U])=>{let X=O&&F,W="auto";return X&&(W=Fye(R,z||U),X=X&&!!W),{followOutputBehavior:W,shouldFollow:X,totalCount:P}}),jt(({shouldFollow:P})=>P)),({followOutputBehavior:P,totalCount:O})=>{k&&(k(),k=null),rr(n)?requestAnimationFrame(()=>{rr(m)("following output to ",{totalCount:O},Ba.DEBUG),E(P)}):k=Us(e,()=>{rr(m)("following output to ",{totalCount:O},Ba.DEBUG),E(P),k=null})});function A(P){const O=Us(a,R=>{P&&!R.atBottom&&R.notAtBottomBecause==="SIZE_INCREASED"&&!k&&(rr(m)("scrolling to bottom due to increased size",{},Ba.DEBUG),E("auto"))});setTimeout(O,100)}Rn(Ue(kr(Pt(w),t,d),jt(([P,,O])=>P&&O),pi(({value:P},[,O])=>({refreshed:P===O,value:O}),{refreshed:!1,value:0}),jt(({refreshed:P})=>P),tn(w,t)),([,P])=>{rr(u)&&A(P!==!1)}),Rn(S,()=>{A(rr(w)!==!1)}),Rn(kr(Pt(w),a),([P,O])=>{P&&!O.atBottom&&O.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&E("auto")});const _=Ke(null),I=yn();return vt(zv(Ue(Pt(r),ct(P=>{var O;return(O=P?.length)!=null?O:0})),Ue(Pt(t))),I),Rn(Ue(kr(Ue(I,uu(1)),c),tn(Pt(_),u,p,b),ct(([[P,O],R,z,F,U])=>O&&z&&R?.({context:U,totalCount:P,scrollingInProgress:F})),jt(P=>!!P),Ji(0)),P=>{k&&(k(),k=null),rr(n)?requestAnimationFrame(()=>{rr(m)("scrolling into view",{}),Zt(y,P)}):k=Us(e,()=>{rr(m)("scrolling into view",{}),Zt(y,P),k=null})}),{autoscrollToBottom:S,followOutput:w,scrollIntoViewOnChange:_}},Qn(Ni,sh,rh,ah,wl,vl,Ta,sz,iz)),Uye=Nn(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:a},{initialItemCount:s,listState:o},{didMount:u}])=>(vt(Ue(u,tn(s),jt(([,c])=>c!==0),tn(a,r,t,n,e),ct(([[,c],d,m,p,b,y=[]])=>rz(c,d,m,p,b,y))),o),{}),Qn(Ni,ah,Su,wl),{singleton:!0}),$ye=Nn(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=Ke(0);return Rn(Ue(e,tn(r),jt(([,a])=>a!==0),ct(([,a])=>({top:a}))),a=>{Us(Ue(n,uu(1),jt(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{Zt(t,a)})})}),{initialScrollTop:r}},Qn(wl,Ta,Su),{singleton:!0}),oz=Nn(([{scrollVelocity:e}])=>{const t=Ke(!1),n=yn(),r=Ke(!1);return vt(Ue(e,tn(r,t,n),jt(([a,s])=>!!s),ct(([a,s,o,u])=>{const{enter:c,exit:d}=s;if(o){if(d(a,u))return!1}else if(c(a,u))return!0;return o}),Xn()),t),Rn(Ue(kr(t,e,n),tn(r)),([[a,s,o],u])=>{a&&u&&u.change&&u.change(s,o)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},Qn(sh),{singleton:!0}),$6=Nn(([{scrollContainerState:e,scrollTo:t}])=>{const n=yn(),r=yn(),a=yn(),s=Ke(!1),o=Ke(void 0);return vt(Ue(kr(n,r),ct(([{scrollHeight:u,scrollTop:c,viewportHeight:d},{offsetTop:m}])=>({scrollHeight:u,scrollTop:Math.max(0,c-m),viewportHeight:d}))),e),vt(Ue(t,tn(r),ct(([u,{offsetTop:c}])=>({...u,top:u.top+c}))),a),{customScrollParent:o,useWindowScroll:s,windowScrollContainerState:n,windowScrollTo:a,windowViewportRect:r}},Qn(Ta)),qye=Nn(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:a},{didMount:s},{useWindowScroll:o,windowScrollContainerState:u,windowViewportRect:c}])=>{const d=yn(),m=Ke(void 0),p=Ke(null),b=Ke(null);return vt(u,p),vt(c,b),Rn(Ue(d,tn(t,r,o,p,b,n)),([y,w,S,k,E,A,_])=>{const I=Aye(w.sizeTree);k&&E!==null&&A!==null&&(S=E.scrollTop-A.offsetTop),S-=_,y({ranges:I,scrollTop:S})}),vt(Ue(m,jt(L6),ct(Vye)),a),vt(Ue(s,tn(m),jt(([,y])=>y!==void 0),Xn(),ct(([,y])=>y.ranges)),e),{getState:d,restoreStateFrom:m}},Qn(Ni,Ta,ah,wl,$6));function Vye(e){return{align:"start",index:0,offset:e.scrollTop}}const Gye=Nn(([{topItemsIndexes:e}])=>{const t=Ke(0);return vt(Ue(t,jt(n=>n>=0),ct(n=>Array.from({length:n}).map((r,a)=>a))),e),{topItemCount:t}},Qn(Su));function lz(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const Yye=lz(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),Wye=Nn(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:a,isScrolling:s,lastJumpDueToItemResize:o,scrollDirection:u},{listState:c},{beforeUnshiftWith:d,gap:m,shiftWithOffset:p,sizes:b},{log:y},{recalcInProgress:w}])=>{const S=ls(Ue(c,tn(o),pi(([,E,A,_],[{bottom:I,items:P,offsetBottom:O,totalCount:R},z])=>{const F=I+O;let U=0;return A===R&&E.length>0&&P.length>0&&(P[0].originalIndex===0&&E[0].originalIndex===0||(U=F-_,U!==0&&(U+=z))),[U,P,R,F]},[0,[],0,0]),jt(([E])=>E!==0),tn(r,u,n,a,y,w),jt(([,E,A,_,,,I])=>!I&&!_&&E!==0&&A===Cf),ct(([[E],,,,,A])=>(A("Upward scrolling compensation",{amount:E},Ba.DEBUG),E))));function k(E){E>0?(Zt(t,{behavior:"auto",top:-E}),Zt(e,0)):(Zt(e,0),Zt(t,{behavior:"auto",top:-E}))}return Rn(Ue(S,tn(e,s)),([E,A,_])=>{_&&Yye()?Zt(e,A-E):k(-E)}),Rn(Ue(kr(oa(s,!1),e,w),jt(([E,A,_])=>!E&&!_&&A!==0),ct(([E,A])=>A),Ji(1)),k),vt(Ue(p,ct(E=>({top:-E}))),t),Rn(Ue(d,tn(b,m),ct(([E,{groupIndices:A,lastSize:_,sizeTree:I},P])=>{function O(R){return R*(_+P)}if(A.length===0)return O(E);{let R=0;const z=Tf(I,0);let F=0,U=0;for(;F<E;){F++,R+=z;let X=A.length===U+1?1/0:A[U+1]-A[U]-1;F+X>E&&(R-=z,X=E-F+1),F+=X,R+=O(X),U++}return R}})),E=>{Zt(e,E),requestAnimationFrame(()=>{Zt(t,{top:E}),requestAnimationFrame(()=>{Zt(e,0),Zt(w,!1)})})}),{deviation:e}},Qn(Ta,sh,Su,Ni,vl,z6)),Xye=Nn(([e,t,n,r,a,s,o,u,c,d,m])=>({...e,...t,...n,...r,...a,...s,...o,...u,...c,...d,...m}),Qn(U6,Uye,wl,oz,az,$ye,zye,$6,iz,vl,sz)),uz=Nn(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:a,gap:s,groupIndices:o,heightEstimates:u,itemSize:c,sizeRanges:d,sizes:m,statefulTotalCount:p,totalCount:b,trackItemSizes:y},{initialItemFinalLocationReached:w,initialTopMostItemIndex:S,scrolledToInitialItem:k},E,A,_,I,{scrollToIndex:P},O,{topItemCount:R},{groupCounts:z},F])=>{const{listState:U,minOverscanItemCount:X,topItemsIndexes:W,rangeChanged:le,...se}=I;return vt(le,F.scrollSeekRangeChanged),vt(Ue(F.windowViewportRect,ct(ie=>ie.visibleHeight)),E.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:a,gap:s,groupCounts:z,heightEstimates:u,initialItemFinalLocationReached:w,initialTopMostItemIndex:S,scrolledToInitialItem:k,sizeRanges:d,topItemCount:R,topItemsIndexes:W,totalCount:b,..._,groupIndices:o,itemSize:c,listState:U,minOverscanItemCount:X,scrollToIndex:P,statefulTotalCount:p,trackItemSizes:y,rangeChanged:le,...se,...F,...E,sizes:m,...A}},Qn(Ni,ah,Ta,qye,Hye,Su,rh,Wye,Gye,ez,Xye));function Kye(e,t){const n={},r={};let a=0;const s=e.length;for(;a<s;)r[e[a]]=1,a+=1;for(const o in t)Object.hasOwn(r,o)||(n[o]=t[o]);return n}const ep=typeof document<"u"?ge.useLayoutEffect:ge.useEffect;function cz(e,t,n){const r=Object.keys(t.required||{}),a=Object.keys(t.optional||{}),s=Object.keys(t.methods||{}),o=Object.keys(t.events||{}),u=ge.createContext({});function c(k,E){k.propsReady&&Zt(k.propsReady,!1);for(const A of r){const _=k[t.required[A]];Zt(_,E[A])}for(const A of a)if(A in E){const _=k[t.optional[A]];Zt(_,E[A])}k.propsReady&&Zt(k.propsReady,!0)}function d(k){return s.reduce((E,A)=>(E[A]=_=>{const I=k[t.methods[A]];Zt(I,_)},E),{})}function m(k){return o.reduce((E,A)=>(E[A]=fye(k[t.events[A]]),E),{})}const p=ge.forwardRef((k,E)=>{const{children:A,..._}=k,[I]=ge.useState(()=>mg(mye(e),R=>{c(R,_)})),[P]=ge.useState(Hk(m,I));ep(()=>{for(const R of o)R in _&&Rn(P[R],_[R]);return()=>{Object.values(P).map(P6)}},[_,P,I]),ep(()=>{c(I,_)}),ge.useImperativeHandle(E,Fk(d(I)));const O=n;return h.jsx(u.Provider,{value:I,children:n?h.jsx(O,{...Kye([...r,...a,...o],_),children:A}):A})}),b=k=>{const E=ge.useContext(u);return ge.useCallback(A=>{Zt(E[k],A)},[E,k])},y=k=>{const E=ge.useContext(u)[k],A=ge.useCallback(_=>Rn(E,_),[E]);return ge.useSyncExternalStore(A,()=>rr(E),()=>rr(E))},w=k=>{const E=ge.useContext(u)[k],[A,_]=ge.useState(Hk(rr,E));return ep(()=>Rn(E,I=>{I!==A&&_(Fk(I))}),[E,A]),A},S=ge.version.startsWith("18")?y:w;return{Component:p,useEmitter:(k,E)=>{const A=ge.useContext(u)[k];ep(()=>Rn(A,E),[E,A])},useEmitterValue:S,usePublisher:b}}const dz=ge.createContext(void 0),fz=ge.createContext(void 0),hz=typeof document<"u"?ge.useLayoutEffect:ge.useEffect;function iy(e){return"self"in e}function Qye(e){return"body"in e}function mz(e,t,n,r=b0,a,s){const o=ge.useRef(null),u=ge.useRef(null),c=ge.useRef(null),d=ge.useCallback(b=>{let y,w,S;const k=b.target;if(Qye(k)||iy(k)){const A=iy(k)?k:k.defaultView;S=s?A.scrollX:A.scrollY,y=s?A.document.documentElement.scrollWidth:A.document.documentElement.scrollHeight,w=s?A.innerWidth:A.innerHeight}else S=s?k.scrollLeft:k.scrollTop,y=s?k.scrollWidth:k.scrollHeight,w=s?k.offsetWidth:k.offsetHeight;const E=()=>{e({scrollHeight:y,scrollTop:Math.max(S,0),viewportHeight:w})};b.suppressFlushSync?E():Qv.flushSync(E),u.current!==null&&(S===u.current||S<=0||S===y-w)&&(u.current=null,t(!0),c.current&&(clearTimeout(c.current),c.current=null))},[e,t,s]);ge.useEffect(()=>{const b=a||o.current;return r(a||o.current),d({suppressFlushSync:!0,target:b}),b.addEventListener("scroll",d,{passive:!0}),()=>{r(null),b.removeEventListener("scroll",d)}},[o,d,n,r,a]);function m(b){const y=o.current;if(!y||(s?"offsetWidth"in y&&y.offsetWidth===0:"offsetHeight"in y&&y.offsetHeight===0))return;const w=b.behavior==="smooth";let S,k,E;iy(y)?(k=Math.max(hl(y.document.documentElement,s?"width":"height"),s?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight),S=s?y.innerWidth:y.innerHeight,E=s?window.scrollX:window.scrollY):(k=y[s?"scrollWidth":"scrollHeight"],S=hl(y,s?"width":"height"),E=y[s?"scrollLeft":"scrollTop"]);const A=k-S;if(b.top=Math.ceil(Math.max(Math.min(A,b.top),0)),nz(S,k)||b.top===E){e({scrollHeight:k,scrollTop:E,viewportHeight:S}),w&&t(!0);return}w?(u.current=b.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,u.current=null,t(!0)},1e3)):u.current=null,s&&(b={behavior:b.behavior,left:b.top}),y.scrollTo(b)}function p(b){s&&(b={behavior:b.behavior,left:b.top}),o.current.scrollBy(b)}return{scrollByCallback:p,scrollerRef:o,scrollToCallback:m}}const oy="-webkit-sticky",Zk="sticky",q6=lz(()=>{if(typeof document>"u")return Zk;const e=document.createElement("div");return e.style.position=oy,e.style.position===oy?oy:Zk});function V6(e){return e}const Zye=Nn(()=>{const e=Ke(u=>`Item ${u}`),t=Ke(u=>`Group ${u}`),n=Ke({}),r=Ke(V6),a=Ke("div"),s=Ke(b0),o=(u,c=null)=>oa(Ue(n,ct(d=>d[u]),Xn()),c);return{components:n,computeItemKey:r,EmptyPlaceholder:o("EmptyPlaceholder"),FooterComponent:o("Footer"),GroupComponent:o("Group","div"),groupContent:t,HeaderComponent:o("Header"),HeaderFooterTag:a,ItemComponent:o("Item","div"),itemContent:e,ListComponent:o("List","div"),ScrollerComponent:o("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:o("ScrollSeekPlaceholder"),TopItemListComponent:o("TopItemList")}}),Jye=Nn(([e,t])=>({...e,...t}),Qn(uz,Zye)),eve=({height:e})=>h.jsx("div",{style:{height:e}}),tve={overflowAnchor:"none",position:q6(),zIndex:1},pz={overflowAnchor:"none"},nve={...pz,display:"inline-block",height:"100%"},Jk=ge.memo(function({showTopList:e=!1}){const t=Yt("listState"),n=Cs("sizeRanges"),r=Yt("useWindowScroll"),a=Yt("customScrollParent"),s=Cs("windowScrollContainerState"),o=Cs("scrollContainerState"),u=a||r?s:o,c=Yt("itemContent"),d=Yt("context"),m=Yt("groupContent"),p=Yt("trackItemSizes"),b=Yt("itemSize"),y=Yt("log"),w=Cs("gap"),S=Yt("horizontalDirection"),{callbackRef:k}=bye(n,b,p,e?b0:u,y,w,a,S,Yt("skipAnimationFrameInResizeObserver")),[E,A]=ge.useState(0);G6("deviation",se=>{E!==se&&A(se)});const _=Yt("EmptyPlaceholder"),I=Yt("ScrollSeekPlaceholder")||eve,P=Yt("ListComponent"),O=Yt("ItemComponent"),R=Yt("GroupComponent"),z=Yt("computeItemKey"),F=Yt("isSeeking"),U=Yt("groupIndices").length>0,X=Yt("alignToBottom"),W=Yt("initialItemFinalLocationReached"),le=e?{}:{boxSizing:"border-box",...S?{display:"inline-block",height:"100%",marginLeft:E!==0?E:X?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:E!==0?E:X?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...W?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&_?h.jsx(_,{...aa(_,d)}):h.jsx(P,{...aa(P,d),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:k,style:le,children:(e?t.topItems:t.items).map(se=>{const ie=se.originalIndex,$=z(ie+t.firstItemIndex,se.data,d);return F?x.createElement(I,{...aa(I,d),height:se.size,index:se.index,key:$,type:se.type||"item",...se.type==="group"?{}:{groupIndex:se.groupIndex}}):se.type==="group"?x.createElement(R,{...aa(R,d),"data-index":ie,"data-item-index":se.index,"data-known-size":se.size,key:$,style:tve},m(se.index,d)):x.createElement(O,{...aa(O,d),...ive(O,se.data),"data-index":ie,"data-item-group-index":se.groupIndex,"data-item-index":se.index,"data-known-size":se.size,key:$,style:S?nve:pz},U?c(se.index,se.groupIndex,se.data,d):c(se.index,se.data,d))})})}),rve={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},ave={outline:"none",overflowX:"auto",position:"relative"},gg=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),sve={position:q6(),top:0,width:"100%",zIndex:1};function aa(e,t){if(typeof e!="string")return{context:t}}function ive(e,t){return{item:typeof e=="string"?void 0:t}}const ove=ge.memo(function(){const e=Yt("HeaderComponent"),t=Cs("headerHeight"),n=Yt("HeaderFooterTag"),r=Eu(ge.useMemo(()=>s=>{t(hl(s,"height"))},[t]),!0,Yt("skipAnimationFrameInResizeObserver")),a=Yt("context");return e?h.jsx(n,{ref:r,children:h.jsx(e,{...aa(e,a)})}):null}),lve=ge.memo(function(){const e=Yt("FooterComponent"),t=Cs("footerHeight"),n=Yt("HeaderFooterTag"),r=Eu(ge.useMemo(()=>s=>{t(hl(s,"height"))},[t]),!0,Yt("skipAnimationFrameInResizeObserver")),a=Yt("context");return e?h.jsx(n,{ref:r,children:h.jsx(e,{...aa(e,a)})}):null});function gz({useEmitter:e,useEmitterValue:t,usePublisher:n}){return ge.memo(function({children:r,style:a,context:s,...o}){const u=n("scrollContainerState"),c=t("ScrollerComponent"),d=n("smoothScrollTargetReached"),m=t("scrollerRef"),p=t("horizontalDirection")||!1,{scrollByCallback:b,scrollerRef:y,scrollToCallback:w}=mz(u,d,c,m,void 0,p);return e("scrollTo",w),e("scrollBy",b),h.jsx(c,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:y,style:{...p?ave:rve,...a},tabIndex:0,...o,...aa(c,s),children:r})})}function bz({useEmitter:e,useEmitterValue:t,usePublisher:n}){return ge.memo(function({children:r,style:a,context:s,...o}){const u=n("windowScrollContainerState"),c=t("ScrollerComponent"),d=n("smoothScrollTargetReached"),m=t("totalListHeight"),p=t("deviation"),b=t("customScrollParent"),y=ge.useRef(null),w=t("scrollerRef"),{scrollByCallback:S,scrollerRef:k,scrollToCallback:E}=mz(u,d,c,w,b);return hz(()=>{var A;return k.current=b||((A=y.current)==null?void 0:A.ownerDocument.defaultView),()=>{k.current=null}},[k,b]),e("windowScrollTo",E),e("scrollBy",S),h.jsx(c,{ref:y,"data-virtuoso-scroller":!0,style:{position:"relative",...a,...m!==0?{height:m+p}:{}},...o,...aa(c,s),children:r})})}const uve=({children:e})=>{const t=ge.useContext(dz),n=Cs("viewportHeight"),r=Cs("fixedItemHeight"),a=Yt("alignToBottom"),s=Yt("horizontalDirection"),o=ge.useMemo(()=>Uj(n,c=>hl(c,s?"width":"height")),[n,s]),u=Eu(o,!0,Yt("skipAnimationFrameInResizeObserver"));return ge.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),h.jsx("div",{"data-viewport-type":"element",ref:u,style:gg(a),children:e})},cve=({children:e})=>{const t=ge.useContext(dz),n=Cs("windowViewportRect"),r=Cs("fixedItemHeight"),a=Yt("customScrollParent"),s=qj(n,a,Yt("skipAnimationFrameInResizeObserver")),o=Yt("alignToBottom");return ge.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),h.jsx("div",{"data-viewport-type":"window",ref:s,style:gg(o),children:e})},dve=({children:e})=>{const t=Yt("TopItemListComponent")||"div",n=Yt("headerHeight"),r={...sve,marginTop:`${n}px`},a=Yt("context");return h.jsx(t,{style:r,...aa(t,a),children:e})},fve=ge.memo(function(e){const t=Yt("useWindowScroll"),n=Yt("topItemsIndexes").length>0,r=Yt("customScrollParent"),a=Yt("context");return h.jsxs(r||t?pve:mve,{...e,context:a,children:[n&&h.jsx(dve,{children:h.jsx(Jk,{showTopList:!0})}),h.jsxs(r||t?cve:uve,{children:[h.jsx(ove,{}),h.jsx(Jk,{}),h.jsx(lve,{})]})]})}),{Component:hve,useEmitter:G6,useEmitterValue:Yt,usePublisher:Cs}=cz(Jye,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},fve),mve=gz({useEmitter:G6,useEmitterValue:Yt,usePublisher:Cs}),pve=bz({useEmitter:G6,useEmitterValue:Yt,usePublisher:Cs}),xz=hve,gve=Nn(()=>{const e=Ke(d=>h.jsxs("td",{children:["Item $",d]})),t=Ke(null),n=Ke(d=>h.jsxs("td",{colSpan:1e3,children:["Group ",d]})),r=Ke(null),a=Ke(null),s=Ke({}),o=Ke(V6),u=Ke(b0),c=(d,m=null)=>oa(Ue(s,ct(p=>p[d]),Xn()),m);return{components:s,computeItemKey:o,context:t,EmptyPlaceholder:c("EmptyPlaceholder"),FillerRow:c("FillerRow"),fixedFooterContent:a,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:c("Scroller","div"),scrollerRef:u,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder"),TableBodyComponent:c("TableBody","tbody"),TableComponent:c("Table","table"),TableFooterComponent:c("TableFoot","tfoot"),TableHeadComponent:c("TableHead","thead"),TableRowComponent:c("TableRow","tr"),GroupComponent:c("Group","tr")}});Qn(uz,gve);q6();const e9={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},bve={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:t9,floor:c1,max:Qd,min:ly,round:n9}=Math;function r9(e,t,n){return Array.from({length:t-e+1}).map((r,a)=>({data:n===null?null:n[a+e],index:a+e}))}function xve(e){return{...bve,items:e}}function tp(e,t){return e&&e.width===t.width&&e.height===t.height}function yve(e,t){return e&&e.column===t.column&&e.row===t.row}const vve=Nn(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:a,headerHeight:s,scrollBy:o,scrollContainerState:u,scrollTo:c,scrollTop:d,smoothScrollTargetReached:m,viewportHeight:p},b,y,{didMount:w,propsReady:S},{customScrollParent:k,useWindowScroll:E,windowScrollContainerState:A,windowScrollTo:_,windowViewportRect:I},P])=>{const O=Ke(0),R=Ke(0),z=Ke(e9),F=Ke({height:0,width:0}),U=Ke({height:0,width:0}),X=yn(),W=yn(),le=Ke(0),se=Ke(null),ie=Ke({column:0,row:0}),$=yn(),K=yn(),Z=Ke(!1),re=Ke(0),j=Ke(!0),H=Ke(!1),G=Ke(!1);Rn(Ue(w,tn(re),jt(([fe,Ne])=>!!Ne)),()=>{Zt(j,!1)}),Rn(Ue(kr(w,j,U,F,re,H),jt(([fe,Ne,at,Ce,,Re])=>fe&&!Ne&&at.height!==0&&Ce.height!==0&&!Re)),([,,,,fe])=>{Zt(H,!0),F6(1,()=>{Zt(X,fe)}),Us(Ue(d),()=>{Zt(t,[0,0]),Zt(j,!0)})}),vt(Ue(K,jt(fe=>fe!=null&&fe.scrollTop>0),ui(0)),R),Rn(Ue(w,tn(K),jt(([,fe])=>fe!=null)),([,fe])=>{fe&&(Zt(F,fe.viewport),Zt(U,fe.item),Zt(ie,fe.gap),fe.scrollTop>0&&(Zt(Z,!0),Us(Ue(d,uu(1)),Ne=>{Zt(Z,!1)}),Zt(c,{top:fe.scrollTop})))}),vt(Ue(F,ct(({height:fe})=>fe)),p),vt(Ue(kr(Pt(F,tp),Pt(U,tp),Pt(ie,(fe,Ne)=>fe&&fe.column===Ne.column&&fe.row===Ne.row),Pt(d)),ct(([fe,Ne,at,Ce])=>({gap:at,item:Ne,scrollTop:Ce,viewport:fe}))),$),vt(Ue(kr(Pt(O),r,Pt(ie,yve),Pt(U,tp),Pt(F,tp),Pt(se),Pt(R),Pt(Z),Pt(j),Pt(re)),jt(([,,,,,,,fe])=>!fe),ct(([fe,[Ne,at],Ce,Re,Ee,we,Oe,,ze,Ge])=>{const{column:it,row:At}=Ce,{height:st,width:Ft}=Re,{width:Nt}=Ee;if(Oe===0&&(fe===0||Nt===0))return e9;if(Ft===0){const Rt=H6(Ge,fe),mn=Rt+Math.max(Oe-1,0);return xve(r9(Rt,mn,we))}const qt=yz(Nt,Ft,it);let Ht,Mn;ze?Ne===0&&at===0&&Oe>0?(Ht=0,Mn=Oe-1):(Ht=qt*c1((Ne+At)/(st+At)),Mn=qt*t9((at+At)/(st+At))-1,Mn=ly(fe-1,Qd(Mn,qt-1)),Ht=ly(Mn,Qd(0,Ht))):(Ht=0,Mn=-1);const ke=r9(Ht,Mn,we),{bottom:Be,top:xt}=a9(Ee,Ce,Re,ke),Et=t9(fe/qt),Ze=Et*st+(Et-1)*At-Be;return{bottom:Be,itemHeight:st,items:ke,itemWidth:Ft,offsetBottom:Ze,offsetTop:xt,top:xt}})),z),vt(Ue(se,jt(fe=>fe!==null),ct(fe=>fe.length)),O),vt(Ue(kr(F,U,z,ie),jt(([fe,Ne,{items:at}])=>at.length>0&&Ne.height!==0&&fe.height!==0),ct(([fe,Ne,{items:at},Ce])=>{const{bottom:Re,top:Ee}=a9(fe,Ce,Ne,at);return[Ee,Re]}),Xn(Ef)),t);const L=Ke(!1);vt(Ue(d,tn(L),ct(([fe,Ne])=>Ne||fe!==0)),L);const ae=ls(Ue(kr(z,O),jt(([{items:fe}])=>fe.length>0),tn(L),jt(([[fe,Ne],at])=>{const Ce=fe.items[fe.items.length-1].index===Ne-1;return(at||fe.bottom>0&&fe.itemHeight>0&&fe.offsetBottom===0&&fe.items.length===Ne)&&Ce}),ct(([[,fe]])=>fe-1),Xn())),oe=ls(Ue(Pt(z),jt(({items:fe})=>fe.length>0&&fe[0].index===0),ui(0),Xn())),Se=ls(Ue(Pt(z),tn(Z),jt(([{items:fe},Ne])=>fe.length>0&&!Ne),ct(([{items:fe}])=>({endIndex:fe[fe.length-1].index,startIndex:fe[0].index})),Xn(Kj),Ji(0)));vt(Se,y.scrollSeekRangeChanged),vt(Ue(X,tn(F,U,O,ie),ct(([fe,Ne,at,Ce,Re])=>{const Ee=tz(fe),{align:we,behavior:Oe,offset:ze}=Ee;let Ge=Ee.index;Ge==="LAST"&&(Ge=Ce-1),Ge=Qd(0,Ge,ly(Ce-1,Ge));let it=$v(Ne,Re,at,Ge);return we==="end"?it=n9(it-Ne.height+at.height):we==="center"&&(it=n9(it-Ne.height/2+at.height/2)),ze&&(it+=ze),{behavior:Oe,top:it}})),c);const be=oa(Ue(z,ct(fe=>fe.offsetBottom+fe.bottom)),0);return vt(Ue(I,ct(fe=>({height:fe.visibleHeight,width:fe.visibleWidth}))),F),{customScrollParent:k,data:se,deviation:le,footerHeight:a,gap:ie,headerHeight:s,increaseViewportBy:e,initialItemCount:R,itemDimensions:U,overscan:n,restoreStateFrom:K,scrollBy:o,scrollContainerState:u,scrollHeight:W,scrollTo:c,scrollToIndex:X,scrollTop:d,smoothScrollTargetReached:m,totalCount:O,useWindowScroll:E,viewportDimensions:F,windowScrollContainerState:A,windowScrollTo:_,windowViewportRect:I,...y,gridState:z,horizontalDirection:G,initialTopMostItemIndex:re,totalListHeight:be,...b,endReached:ae,propsReady:S,rangeChanged:Se,startReached:oe,stateChanged:$,stateRestoreInProgress:Z,...P}},Qn(U6,Ta,sh,oz,wl,$6,vl));function yz(e,t,n){return Qd(1,c1((e+n)/(c1(t)+n)))}function a9(e,t,n,r){const{height:a}=n;if(a===void 0||r.length===0)return{bottom:0,top:0};const s=$v(e,t,n,r[0].index);return{bottom:$v(e,t,n,r[r.length-1].index)+a,top:s}}function $v(e,t,n,r){const a=yz(e.width,n.width,t.column),s=c1(r/a),o=s*n.height+Qd(0,s-1)*t.row;return o>0?o+t.row:o}const wve=Nn(()=>{const e=Ke(p=>`Item ${p}`),t=Ke({}),n=Ke(null),r=Ke("virtuoso-grid-item"),a=Ke("virtuoso-grid-list"),s=Ke(V6),o=Ke("div"),u=Ke(b0),c=(p,b=null)=>oa(Ue(t,ct(y=>y[p]),Xn()),b),d=Ke(!1),m=Ke(!1);return vt(Pt(m),d),{components:t,computeItemKey:s,context:n,FooterComponent:c("Footer"),HeaderComponent:c("Header"),headerFooterTag:o,itemClassName:r,ItemComponent:c("Item","div"),itemContent:e,listClassName:a,ListComponent:c("List","div"),readyStateChanged:d,reportReadyState:m,ScrollerComponent:c("Scroller","div"),scrollerRef:u,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),Tve=Nn(([e,t])=>({...e,...t}),Qn(vve,wve)),Eve=ge.memo(function(){const e=nr("gridState"),t=nr("listClassName"),n=nr("itemClassName"),r=nr("itemContent"),a=nr("computeItemKey"),s=nr("isSeeking"),o=ks("scrollHeight"),u=nr("ItemComponent"),c=nr("ListComponent"),d=nr("ScrollSeekPlaceholder"),m=nr("context"),p=ks("itemDimensions"),b=ks("gap"),y=nr("log"),w=nr("stateRestoreInProgress"),S=ks("reportReadyState"),k=Eu(ge.useMemo(()=>E=>{const A=E.parentElement.parentElement.scrollHeight;o(A);const _=E.firstChild;if(_){const{height:I,width:P}=_.getBoundingClientRect();p({height:I,width:P})}b({column:s9("column-gap",getComputedStyle(E).columnGap,y),row:s9("row-gap",getComputedStyle(E).rowGap,y)})},[o,p,b,y]),!0,!1);return hz(()=>{e.itemHeight>0&&e.itemWidth>0&&S(!0)},[e]),w?null:h.jsx(c,{className:t,ref:k,...aa(c,m),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(E=>{const A=a(E.index,E.data,m);return s?h.jsx(d,{...aa(d,m),height:e.itemHeight,index:E.index,width:e.itemWidth},A):x.createElement(u,{...aa(u,m),className:n,"data-index":E.index,key:A},r(E.index,E.data,m))})})}),Sve=ge.memo(function(){const e=nr("HeaderComponent"),t=ks("headerHeight"),n=nr("headerFooterTag"),r=Eu(ge.useMemo(()=>s=>{t(hl(s,"height"))},[t]),!0,!1),a=nr("context");return e?h.jsx(n,{ref:r,children:h.jsx(e,{...aa(e,a)})}):null}),Cve=ge.memo(function(){const e=nr("FooterComponent"),t=ks("footerHeight"),n=nr("headerFooterTag"),r=Eu(ge.useMemo(()=>s=>{t(hl(s,"height"))},[t]),!0,!1),a=nr("context");return e?h.jsx(n,{ref:r,children:h.jsx(e,{...aa(e,a)})}):null}),kve=({children:e})=>{const t=ge.useContext(fz),n=ks("itemDimensions"),r=ks("viewportDimensions"),a=Eu(ge.useMemo(()=>s=>{r(s.getBoundingClientRect())},[r]),!0,!1);return ge.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),h.jsx("div",{ref:a,style:gg(!1),children:e})},Ave=({children:e})=>{const t=ge.useContext(fz),n=ks("windowViewportRect"),r=ks("itemDimensions"),a=nr("customScrollParent"),s=qj(n,a,!1);return ge.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),h.jsx("div",{ref:s,style:gg(!1),children:e})},Nve=ge.memo(function({...e}){const t=nr("useWindowScroll"),n=nr("customScrollParent"),r=n||t?Rve:_ve,a=n||t?Ave:kve,s=nr("context");return h.jsx(r,{...e,...aa(r,s),children:h.jsxs(a,{children:[h.jsx(Sve,{}),h.jsx(Eve,{}),h.jsx(Cve,{})]})})}),{useEmitter:vz,useEmitterValue:nr,usePublisher:ks}=cz(Tve,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},Nve),_ve=gz({useEmitter:vz,useEmitterValue:nr,usePublisher:ks}),Rve=bz({useEmitter:vz,useEmitterValue:nr,usePublisher:ks});function s9(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Ba.WARN),t==="normal"?0:parseInt(t??"0",10)}function Mve(e,t){const{className:n,...r}=e;return h.jsx("div",{ref:t,className:me("flex-1 overflow-y-auto overflow-x-hidden pr-1 sm:pr-2",n),...r})}const wz=x.forwardRef(Mve);function Dve(e,t){const{className:n,...r}=e;return h.jsx("div",{ref:t,className:me("flex flex-col px-3 py-4 sm:px-6 lg:px-8",n),...r})}const Tz=x.forwardRef(Dve);wz.displayName="VirtuosoScroller";Tz.displayName="VirtuosoList";function Ive(e,t,n){const r=t>0?n[t-1]:void 0,a=t<n.length-1?n[t+1]:void 0,s=[],o=e.role==="user",u=e.role==="assistant",c=u&&e.variant==="tool",d=u&&e.variant==="thinking",m=r?.role==="user",p=r?.role==="assistant",b=p&&r?.variant==="tool";return t>0&&(o?s.push("mt-4"):u&&(c?s.push(m?"mt-2":"mt-1.5"):d?s.push(m?"mt-2":"mt-1"):b?s.push("mt-2"):p?s.push("mt-1"):s.push("mt-2"))),a||s.push("mb-30"),s.length>0?s.join(" "):void 0}function Ove({messages:e,conversationKey:t,pendingApprovalMap:n,onApprovalAction:r,canRespondToApproval:a,blocksExpanded:s,highlightedMessageIndex:o=-1,onAtBottomChange:u,onForkSession:c},d){const m=x.useRef(null),p=x.useRef(null),b=x.useMemo(()=>e.filter(E=>E.variant!=="message-id"),[e]),y=x.useMemo(()=>b.map((E,A)=>({message:E,index:A})),[b]),w=x.useCallback(E=>{u?.(E)},[u]),S=x.useCallback(E=>{p.current=E instanceof HTMLElement?E:null},[]),k=x.useCallback(E=>{if(E)return"auto";const A=p.current;return A&&A.scrollHeight-A.scrollTop-A.clientHeight<=1500?"auto":!1},[]);return x.useImperativeHandle(d,()=>({scrollToIndex:(E,A="smooth")=>{m.current?.scrollToIndex({index:E,align:"center",behavior:A})},scrollToBottom:()=>{y.length>0&&m.current?.scrollToIndex({index:y.length-1,align:"end",behavior:"auto"})}}),[y.length]),h.jsx(xz,{ref:m,data:y,className:"h-full",scrollerRef:S,followOutput:k,defaultItemHeight:160,increaseViewportBy:{top:400,bottom:400},overscan:200,minOverscanItemCount:4,atBottomStateChange:w,initialTopMostItemIndex:{index:Math.max(0,y.length-1),align:"end"},components:{Scroller:wz,List:Tz},computeItemKey:(E,A)=>A.message.id,itemContent:(E,A)=>{const _=A.message;if(_.variant==="status")return h.jsx(Y7,{className:e.length>0?"mt-2":void 0,from:"assistant",children:h.jsx(d0,{className:"text-xs text-muted-foreground",children:_.content})});const I=Ive(_,A.index,b),P=A.index===o;return h.jsxs(Y7,{className:me(I,P&&"rounded-lg ring-2 ring-primary/50"),from:_.role,children:[_.role==="user"?_.content?h.jsx(Dde,{children:_.content}):null:h.jsxs(h.Fragment,{children:[h.jsx(eye,{message:_,pendingApprovalMap:n,onApprovalAction:r,canRespondToApproval:a,blocksExpanded:s}),!_.isStreaming&&(!_.variant||_.variant==="text")&&(_.content||c&&_.turnIndex!==void 0)&&h.jsxs(Ide,{className:`
|
|
461
|
+
hover-reveal
|
|
462
|
+
opacity-0 group-hover:opacity-100 transition-opacity mt-1`,children:[_.content&&h.jsx(Lde,{content:_.content}),c&&_.turnIndex!==void 0&&h.jsx(Pde,{onFork:()=>c(_.turnIndex)})]})]}),_.attachments&&_.attachments.length>0?h.jsx(zde,{children:_.attachments.map((O,R)=>{const z="kind"in O?O.filename:O.filename??O.url??`${_.id}-${R}`;return h.jsx(jde,{className:"size-28 sm:size-32 lg:size-40",data:O},z)})}):null]})}},t)}const Ez=x.forwardRef(Ove);Ez.displayName="VirtualizedMessageList";function qv({className:e,children:t,...n}){return h.jsxs(FX,{"data-slot":"scroll-area",className:me("relative",e),...n,children:[h.jsx(HX,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),h.jsx(Lve,{}),h.jsx(UX,{})]})}function Lve({className:e,orientation:t="vertical",...n}){return h.jsx(K_,{"data-slot":"scroll-area-scrollbar",orientation:t,className:me("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:h.jsx(eR,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}function Pve(e){const t=[];return e.content&&t.push(e.content),e.thinking&&t.push(e.thinking),e.toolCall&&(e.toolCall.title&&t.push(e.toolCall.title),typeof e.toolCall.input=="string"?t.push(e.toolCall.input):e.toolCall.input&&t.push(JSON.stringify(e.toolCall.input)),e.toolCall.output&&t.push(e.toolCall.output),e.toolCall.message&&t.push(e.toolCall.message)),e.codeSnippet?.code&&t.push(e.codeSnippet.code),t.join(" ")}function jve(e,t,n=50){if(!t.trim())return[];const r=t.toLowerCase(),a=[];return e.forEach((s,o)=>{const u=Pve(s),d=u.toLowerCase().indexOf(r);if(d!==-1){const m=Math.max(0,d-n),p=Math.min(u.length,d+t.length+n);let b=u.slice(m,p);m>0&&(b="..."+b),p<u.length&&(b=b+"..."),a.push({messageIndex:o,message:s,snippet:b,matchStart:m>0?d-m+3:d,matchLength:t.length})}}),a}function Sz({text:e,query:t,className:n}){if(!t.trim())return h.jsx("span",{className:n,children:e});const r=e.toLowerCase(),a=t.toLowerCase(),s=[];let o=0,u=r.indexOf(a);for(;u!==-1;)u>o&&s.push({text:e.slice(o,u),isMatch:!1}),s.push({text:e.slice(u,u+t.length),isMatch:!0}),o=u+t.length,u=r.indexOf(a,o);return o<e.length&&s.push({text:e.slice(o),isMatch:!1}),h.jsx("span",{className:n,children:s.map((c,d)=>c.isMatch?h.jsx("mark",{className:"rounded-sm bg-yellow-300 px-0.5 text-yellow-900 dark:bg-yellow-500/40 dark:text-yellow-100",children:c.text},`match-${d}-${c.text}`):h.jsx("span",{children:c.text},`text-${d}-${c.text.slice(0,20)}`))})}function i9(e){return e.role==="user"?h.jsx(mq,{className:"size-3.5"}):e.variant==="tool"?h.jsx(vq,{className:"size-3.5"}):h.jsx(sA,{className:"size-3.5"})}function o9(e){return e.role==="user"?"User":e.variant==="tool"&&e.toolCall?.title?e.toolCall.title:e.variant==="thinking"?"Thinking":"Assistant"}function zve({messages:e,open:t,onOpenChange:n,onJumpToMessage:r}){const[a,s]=x.useState(""),[o,u]=x.useState(0),c=x.useRef(null),d=x.useRef(null),m=x.useMemo(()=>jve(e,a,80),[e,a]);x.useEffect(()=>{u(0)},[m.length]),x.useEffect(()=>{t?setTimeout(()=>c.current?.focus(),0):(s(""),u(0))},[t]),x.useEffect(()=>{d.current&&m.length>0&&d.current.querySelector(`[data-index="${o}"]`)?.scrollIntoView({block:"nearest"})},[o,m]);const p=x.useCallback(y=>{y.key==="ArrowDown"?(y.preventDefault(),u(w=>Math.min(w+1,m.length-1))):y.key==="ArrowUp"?(y.preventDefault(),u(w=>Math.max(w-1,0))):y.key==="Enter"&&m.length>0&&(y.preventDefault(),r(m[o].messageIndex),n(!1))},[m,o,r,n]),b=m[o];return h.jsx(e0,{open:t,onOpenChange:n,children:h.jsxs(t0,{className:"flex h-[80dvh] max-w-[min(100vw-1.5rem,72rem)] flex-col gap-0 p-0 sm:h-[70vh] sm:max-w-6xl",children:[h.jsxs(Pf,{className:"border-b px-4 py-3",children:[h.jsx(n0,{className:"sr-only",children:"Search Messages"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Nf,{className:"size-4 text-muted-foreground"}),h.jsx(cL,{ref:c,className:"h-8 flex-1 border-none bg-transparent shadow-none focus-visible:ring-0",placeholder:"Search in conversation...",value:a,onChange:y=>s(y.target.value),onKeyDown:p}),h.jsx("span",{className:"text-xs text-muted-foreground",children:a?m.length>0?`${m.length} result${m.length!==1?"s":""}`:"No results":""})]})]}),h.jsxs("div",{className:"flex min-h-0 flex-1 flex-col sm:flex-row",children:[h.jsx("div",{className:"w-full border-b sm:w-1/3 sm:border-b-0 sm:border-r",children:h.jsx(qv,{className:"h-[35vh] sm:h-full",children:h.jsx("div",{ref:d,className:"p-2",children:m.length===0&&a?h.jsx("p",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No messages found"}):m.map((y,w)=>h.jsxs("button",{type:"button","data-index":w,className:me("w-full rounded-md px-2 py-2 text-left transition-colors",w===o?"bg-primary/10":"hover:bg-muted/50"),onClick:()=>u(w),onDoubleClick:()=>{r(y.messageIndex),n(!1)},children:[h.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[i9(y.message),h.jsx("span",{className:"truncate",children:o9(y.message)})]}),h.jsx("p",{className:"mt-1 line-clamp-2 text-sm",children:h.jsx(Sz,{text:y.snippet,query:a})})]},y.message.id||`${y.messageIndex}-${w}`))})})}),h.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:b?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-2",children:[h.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[i9(b.message),h.jsx("span",{className:"font-medium",children:o9(b.message)})]}),h.jsxs(Bt,{size:"sm",variant:"ghost",className:"h-7 gap-1.5 text-xs",onClick:()=>{r(b.messageIndex),n(!1)},children:["Jump to message",h.jsx(RU,{className:"size-3"})]})]}),h.jsx(qv,{className:"flex-1 overflow-x-hidden",children:h.jsx("div",{className:"p-4",children:h.jsx(Bve,{match:b,query:a})})})]}):h.jsx("div",{className:"flex flex-1 items-center justify-center text-sm text-muted-foreground",children:a?"Select a result to preview":"Type to search"})})]}),h.jsxs("div",{className:"flex items-center gap-4 border-t bg-muted/30 px-4 py-2 text-xs text-muted-foreground",children:[h.jsxs("span",{children:[h.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono",children:"↑↓"})," ","Navigate"]}),h.jsxs("span",{children:[h.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono",children:"Enter"})," ","Jump to message"]}),h.jsxs("span",{children:[h.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono",children:"Esc"})," ","Close"]})]})]})})}function Bve({match:e,query:t}){const{message:n}=e,r=[];if(n.content&&r.push({label:"Content",content:n.content}),n.thinking&&r.push({label:"Thinking",content:n.thinking}),n.toolCall){if(n.toolCall.title&&r.push({label:"Tool",content:n.toolCall.title}),n.toolCall.input){const a=typeof n.toolCall.input=="string"?n.toolCall.input:JSON.stringify(n.toolCall.input,null,2);r.push({label:"Input",content:a})}n.toolCall.output&&r.push({label:"Output",content:n.toolCall.output}),n.toolCall.message&&r.push({label:"Message",content:n.toolCall.message})}return n.codeSnippet?.code&&r.push({label:"Code",content:n.codeSnippet.code}),h.jsx("div",{className:"space-y-4",children:r.map(a=>h.jsxs("div",{children:[h.jsx("h4",{className:"mb-1 text-xs font-medium text-muted-foreground",children:a.label}),h.jsx("div",{className:"whitespace-pre-wrap break-all rounded-md bg-muted/50 p-3 font-mono text-sm",children:h.jsx(Sz,{text:a.content,query:t})})]},a.label))})}function Fve({messages:e,status:t,selectedSessionId:n,isReplayingHistory:r,pendingApprovalMap:a,onApprovalAction:s,canRespondToApproval:o,blocksExpanded:u,onCreateSession:c,isSearchOpen:d,onSearchOpenChange:m,onForkSession:p}){const b=x.useRef(null),[y,w]=x.useState(!0),[S,k]=x.useState(-1);x.useEffect(()=>{const le=se=>{s1(se)&&se.key==="f"&&(se.preventDefault(),m(!0))};return window.addEventListener("keydown",le),()=>window.removeEventListener("keydown",le)},[m]);const E=x.useCallback(le=>{k(le),b.current?.scrollToIndex(le),setTimeout(()=>k(-1),2e3)},[]),A=x.useCallback(()=>{b.current?.scrollToBottom()},[]),_=e.length===0&&(t==="streaming"||t==="submitted"),I=_&&t==="submitted"&&!r,P=!!n,O=e.length===0&&!P,R=e.length===0&&P&&!_,F=e.length>0&&!y,U=_||O||R,X=P?`session:${n}`:"empty",W=Tu()?"Cmd":"Ctrl";return h.jsxs("div",{className:"relative flex h-full flex-col overflow-x-hidden px-2",role:"log",children:[U?_?h.jsx(D8,{description:"",icon:h.jsx(ma,{className:"size-6 animate-spin text-primary"}),title:I?"Starting environment...":"Connecting to session..."}):O?h.jsxs(D8,{children:[h.jsx("div",{className:"flex size-16 items-center justify-center rounded-2xl bg-secondary",children:h.jsx(wA,{className:"size-8 text-muted-foreground"})}),h.jsxs("div",{className:"text-center",children:[h.jsx("p",{className:"text-lg font-medium text-foreground",children:"Create a session to begin"}),h.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Click the + button in the sidebar to start a new session"})]}),c?h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsxs(Bt,{className:"mt-1",type:"button",onClick:le=>{if(s1(le)){const se=new URL(window.location.origin+window.location.pathname);se.searchParams.set("action","create"),window.open(se.toString(),"_blank")}else c()},children:[h.jsx(py,{className:"size-4"}),h.jsx("span",{children:"Create new session"})]})}),h.jsxs(xn,{className:"flex flex-col items-center gap-1",side:"top",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{children:"Create new session"}),h.jsxs(O6,{children:[h.jsx(Ir,{children:"Shift"}),h.jsx("span",{className:"text-muted-foreground",children:"+"}),h.jsx(Ir,{children:W}),h.jsx("span",{className:"text-muted-foreground",children:"+"}),h.jsx(Ir,{children:"O"})]})]}),h.jsx("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:h.jsxs("span",{children:[W,"+Click to open in new tab"]})})]})]}):null]}):R?h.jsx("div",{className:"flex h-full items-center justify-center",children:h.jsx("p",{className:"text-sm text-muted-foreground",children:"Start a conversation..."})}):null:h.jsx("div",{className:"flex-1",children:h.jsx(Ez,{ref:b,messages:e,conversationKey:X,pendingApprovalMap:a,onApprovalAction:s,canRespondToApproval:o,blocksExpanded:u,highlightedMessageIndex:S,onAtBottomChange:w,onForkSession:p})}),F?h.jsx(Bt,{className:"absolute bottom-[calc(1rem+var(--safe-bottom))] left-[50%] -translate-x-1/2 rounded-full",onClick:A,size:"icon",type:"button",variant:"outline",children:h.jsx(NU,{className:"size-4"})}):null,h.jsx(zve,{messages:e,open:d,onOpenChange:m,onJumpToMessage:E})]})}const Hve=e=>{if(e==null)return null;if(e===0)return"0 B";const t=["B","KB","MB","GB","TB"];let n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;const a=n>=10?0:1;return`${n.toFixed(a)} ${t[r]}`},Uve=500,l9={attachment:"Pending uploads",workspace:"Workspace files"},$ve={attachment:"Upload",workspace:"Workspace"},qve={attachment:m1,workspace:dA},u9=({label:e,options:t,activeIndex:n,activeItemRef:r,onHover:a,onSelect:s})=>t.length?h.jsxs("div",{className:"py-0.5 px-1",children:[h.jsx("div",{className:"px-2 pb-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:e}),h.jsx("div",{children:t.map(o=>{const u=qve[o.type],c=o.order===n,d=Hve(o.meta?.size);return h.jsxs("button",{ref:c?r:void 0,type:"button",className:me("flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm transition-colors",c?"bg-primary/10 text-foreground ring-1 ring-primary/30":"hover:bg-muted"),onMouseDown:m=>{m.preventDefault(),s(o)},onMouseEnter:()=>a(o.order),children:[h.jsx(u,{className:"size-3.5 shrink-0 text-muted-foreground"}),h.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[h.jsx("span",{className:"font-medium",children:o.label}),o.description&&o.description!==o.label?h.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:o.description}):null]}),h.jsxs("div",{className:"flex shrink-0 items-center gap-1.5 text-[10px] text-muted-foreground",children:[d?h.jsx("span",{children:d}):null,h.jsx("span",{className:"rounded border border-border/60 px-1 py-px font-medium uppercase",children:$ve[o.type]})]})]},o.id)})})]}):null,Vve=({open:e,query:t,sections:n,flatOptions:r,activeIndex:a,onSelect:s,onHover:o,workspaceStatus:u,workspaceError:c,onRetryWorkspace:d,isWorkspaceAvailable:m,workspaceFileCount:p=0})=>{const b=x.useRef(null);if(x.useEffect(()=>{e&&b.current&&b.current.scrollIntoView({block:"nearest",behavior:"smooth"})},[e,a]),!e)return null;const y=n.attachments.length>0||n.workspace.length>0,w=u!=="idle"||!m;return h.jsx("div",{className:"absolute left-0 right-0 bottom-[calc(100%+0.75rem)] z-30",children:h.jsxs("div",{className:"rounded-xl border border-border/80 bg-popover/95 p-2 shadow-xl backdrop-blur supports-backdrop-filter:bg-popover/80",children:[h.jsx("div",{className:"max-h-96 overflow-y-auto [-webkit-overflow-scrolling:touch]",children:y?h.jsxs(h.Fragment,{children:[u9({label:l9.attachment,options:n.attachments,activeIndex:a,activeItemRef:b,onHover:o,onSelect:s}),u9({label:l9.workspace,options:n.workspace,activeIndex:a,activeItemRef:b,onHover:o,onSelect:s})]}):h.jsx("div",{className:"px-3 py-2 text-sm text-muted-foreground",children:t?`No files match “@${t}”.`:"No files available to mention yet."})}),w?h.jsx("div",{className:"mt-2 rounded-md border border-border/80 bg-muted/40 px-3 py-2 text-xs text-muted-foreground",children:u==="loading"?h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(p1,{className:"size-3.5 animate-spin text-primary"}),"Indexing workspace files…"]}):u==="error"?h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsxs("span",{className:"inline-flex items-center gap-1 text-destructive",children:[h.jsx(GU,{className:"size-3.5"}),c??"Workspace files unavailable."]}),h.jsx("button",{type:"button",className:"text-xs font-semibold text-primary underline underline-offset-2",onClick:d,children:"Retry"})]}):m?h.jsx("div",{className:"flex items-center justify-between text-xs",children:h.jsxs("span",{children:[r.length?`${r.length} file${r.length===1?"":"s"} ready to mention.`:"Workspace files indexed.",p>=Uve?" Type a path to search deeper.":""]})}):h.jsx("span",{children:"Select an active session to enable workspace file mentions."})}):null]})})},Gve=/[\s,;:!?,()[\]{}<>"'`]/,Yve=/\s|[([{]/,Wve=/^\.\//,Xve=/^\S/,c9=500,Kve=200,Qve=3e4,Zve=300,uy=(e,t)=>{const n=Math.max(0,Math.min(e.length,t??e.length)),r=e.slice(0,n),a=r.lastIndexOf("@");if(a===-1)return null;if(a>0){const o=r[a-1];if(o&&!Yve.test(o))return null}const s=r.slice(a+1);return Gve.test(s)?null:{start:a,end:n,query:s}},Jve=(e,t)=>e?.start===t?.start&&e?.end===t?.end&&e?.query===t?.query,e4e=e=>e==="."||e==="./"||e===""?".":e.replace(Wve,""),t4e=async({sessionId:e,listDirectory:t})=>{if(!t)return[];const n=[],r=["."],a=new Set;for(;r.length>0&&n.length<c9&&a.size<Kve;){const s=r.shift();if(a.has(s))continue;a.add(s);const u=await t(e,s==="."?void 0:s);for(const c of u){const d=s==="."?c.name:`${e4e(s)}/${c.name}`;if(c.type==="directory"){r.push(d);continue}if(n.push({path:d,size:c.size}),n.length>=c9)break}}return n},n4e=e=>e.map((t,n)=>{const r=t.filename&&t.filename.trim().length>0?t.filename:`Attachment ${n+1}`;return{id:`upload-${t.id}`,type:"attachment",label:r,description:t.mediaType??"Pending upload",insertValue:r,meta:{mediaType:t.mediaType}}}),r4e=e=>e.map(t=>{const r=t.path.split("/").at(-1)??t.path;return{id:`workspace-${t.path}`,type:"workspace",label:r,description:t.path,insertValue:t.path,meta:{path:t.path,size:t.size}}}),d9=(e,t,n)=>{if(!e.length)return[];const r=t.trim().toLowerCase(),a=s=>r.length===0?!0:s?.toLowerCase().includes(r);return e.filter(s=>a(s.insertValue)||a(s.label)||a(s.description)).map((s,o)=>({...s,order:n+o}))},a4e=({text:e,setText:t,textareaRef:n,attachments:r,sessionId:a,listDirectory:s})=>{const[o,u]=x.useState(null),[c,d]=x.useState(0),[m,p]=x.useState([]),[b,y]=x.useState("idle"),[w,S]=x.useState(null),k=x.useRef(0),E=x.useRef(0),A=x.useRef(0),_=x.useRef(null),[I,P]=x.useState([]),O=x.useRef(a),R=x.useMemo(()=>n4e(r),[r]),z=x.useMemo(()=>{if(I.length===0)return m;const re=new Set(m.map(H=>H.path)),j=I.filter(H=>!re.has(H.path));return j.length===0?m:[...m,...j]},[m,I]),F=x.useMemo(()=>r4e(z),[z]),U=x.useMemo(()=>{const re=d9(R,o?.query??"",0),j=d9(F,o?.query??"",re.length);return{attachments:re,workspace:j}},[R,F,o?.query]),X=x.useMemo(()=>[...U.attachments,...U.workspace],[U.attachments,U.workspace]);x.useEffect(()=>{c<X.length||d(X.length===0?0:X.length-1)},[c,X.length]),x.useEffect(()=>{d(0)},[]),x.useEffect(()=>{p([]),P([]),y("idle"),S(null),k.current+=1,E.current+=1,A.current=0,O.current=a},[a]);const W=x.useCallback(async()=>{if(!(a&&s))return;y("loading"),S(null),k.current+=1;const re=k.current;try{const j=await t4e({sessionId:a,listDirectory:s});if(k.current!==re)return;p(j),y("ready"),A.current=Date.now()}catch(j){if(k.current!==re)return;y("error"),S(j instanceof Error?j.message:"Failed to load workspace files")}},[a,s]);x.useEffect(()=>{if(!o||!(a&&s)||b==="loading")return;const re=b==="ready"&&Date.now()-A.current>Qve;b!=="idle"&&!re||W()},[o,a,s,b,W]),x.useEffect(()=>{_.current&&(clearTimeout(_.current),_.current=null);const re=o?.query??"",j=re.lastIndexOf("/");if(j<0||!(a&&s)){E.current+=1,P([]);return}const H=re.slice(0,j),G=H===""?void 0:H,L=a;E.current+=1;const ae=E.current;return _.current=setTimeout(async()=>{if(E.current===ae&&O.current===L)try{const oe=await s(L,G);if(E.current!==ae||O.current!==L)return;const Se=[];for(const be of oe){if(be.type==="directory")continue;const fe=G?`${G}/${be.name}`:be.name;Se.push({path:fe,size:be.size})}P(Se)}catch{if(E.current!==ae)return}},Zve),()=>{_.current&&(clearTimeout(_.current),_.current=null)}},[o?.query,a,s]),x.useEffect(()=>{const re=n.current?.selectionStart??e.length,j=uy(e,re);u(H=>Jve(H,j)?H:j)},[e,n]);const le=x.useCallback((re,j)=>{u(uy(re,j))},[]),se=x.useCallback(re=>{u(uy(e,re))},[e]),ie=x.useCallback(()=>{u(null)},[]),$=x.useCallback(re=>{if(!o)return;const j=re??X[c];if(!j)return;const H=`@${j.insertValue}`,G=e.slice(0,o.start),L=e.slice(o.end),ae=L.length===0||Xve.test(L)?" ":"",oe=`${G}${H}${ae}${L}`,Se=G.length+H.length+ae.length;t(oe),u(null),d(0),requestAnimationFrame(()=>{const be=n.current;be&&(be.focus(),be.setSelectionRange(Se,Se))})},[o,X,c,e,t,n]),K=x.useCallback(re=>{if(o){if(re.key==="ArrowDown"){if(X.length===0)return;re.preventDefault(),d(j=>(j+1)%X.length);return}if(re.key==="ArrowUp"){if(X.length===0)return;re.preventDefault(),d(j=>j-1<0?X.length-1:(j-1)%X.length);return}if(re.key==="Enter"||re.key==="Tab"){if(X.length===0)return;re.preventDefault(),$();return}re.key==="Escape"&&(re.preventDefault(),ie())}},[o,X,$,ie]),Z=x.useCallback(()=>{W()},[W]);return{isOpen:!!o,query:o?.query??"",flatOptions:X,sections:U,activeIndex:c,setActiveIndex:d,handleTextChange:le,handleCaretChange:se,handleKeyDown:K,selectOption:$,closeMenu:ie,workspaceStatus:b,workspaceError:w,retryWorkspace:Z,workspaceFileCount:m.length}},s4e=({open:e,query:t,options:n,activeIndex:r,onSelect:a,onHover:s})=>{const o=x.useRef(null);return x.useEffect(()=>{e&&o.current&&o.current.scrollIntoView({block:"nearest",behavior:"smooth"})},[e,r]),e?h.jsx("div",{className:"absolute left-0 right-0 bottom-[calc(100%+0.75rem)] z-30",children:h.jsx("div",{className:"rounded-xl border border-border/80 bg-popover/95 p-2 px-1 shadow-xl backdrop-blur supports-backdrop-filter:bg-popover/80",children:n.length>0?h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"px-3 pb-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Slash Commands"}),h.jsx("div",{className:"max-h-80 overflow-y-auto px-1 [-webkit-overflow-scrolling:touch]",children:n.map((u,c)=>{const d=c===r;return h.jsxs("button",{ref:d?o:null,type:"button",className:me("flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm transition-colors my-0.5",d?"bg-primary/10 text-foreground ring-1 ring-primary/30":"hover:bg-muted"),onMouseDown:m=>{m.preventDefault(),a(u)},onMouseEnter:()=>s(c),children:[h.jsx(TA,{className:"size-3.5 shrink-0 text-muted-foreground"}),h.jsxs("span",{className:"truncate",children:[h.jsxs("span",{className:"font-medium text-primary",children:["/",u.name]}),u.aliases.length>0&&h.jsxs("span",{className:"ml-1.5 text-xs text-muted-foreground/70",children:["(",u.aliases.join(", "),")"]}),h.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:u.description})]})]},u.id)})})]}):h.jsx("div",{className:"px-3 py-2 text-sm text-muted-foreground",children:t?`No commands match "/${t}".`:"No commands available."})})}):null},i4e=/\s/,o4e=/^\S/,cy=(e,t)=>{const n=Math.max(0,Math.min(e.length,t??e.length)),r=e.slice(0,n),a=r.lastIndexOf("/");if(a===-1||a>0&&r[a-1]!==`
|
|
463
|
+
`)return null;const s=r.slice(a+1);return i4e.test(s)?null:{start:a,end:n,query:s}},l4e=(e,t)=>e?.start===t?.start&&e?.end===t?.end&&e?.query===t?.query,u4e=e=>e.map(t=>({id:`slash-${t.name}`,name:t.name,description:t.description,aliases:t.aliases,insertValue:`/${t.name}`})),c4e=(e,t)=>{if(!e.length)return[];const n=t.trim().toLowerCase();return n.length===0?e:e.filter(r=>{const a=r.name.toLowerCase().includes(n),s=r.aliases.some(o=>o.toLowerCase().includes(n));return a||s})},d4e=({text:e,setText:t,textareaRef:n,commands:r})=>{const[a,s]=x.useState(null),[o,u]=x.useState(0),c=x.useRef(!1),d=x.useMemo(()=>u4e(r),[r]),m=x.useMemo(()=>c4e(d,a?.query??""),[d,a?.query]);x.useEffect(()=>{o>=m.length&&u(m.length===0?0:m.length-1)},[o,m.length]);const p=a?.start;x.useEffect(()=>{p!==void 0&&u(0)},[p]),x.useEffect(()=>{if(c.current)return;const E=n.current?.selectionStart??e.length,A=cy(e,E);s(_=>l4e(_,A)?_:A)},[e,n]);const b=x.useCallback((E,A)=>{c.current||s(cy(E,A))},[]),y=x.useCallback(E=>{c.current||s(cy(e,E))},[e]),w=x.useCallback(()=>{s(null)},[]),S=x.useCallback(E=>{if(!a)return;const A=E??m[o];if(!A)return;const _=e.slice(0,a.start),I=e.slice(a.end),P=I.length===0||o4e.test(I)?" ":"",O=`${_}${A.insertValue}${P}${I}`,R=_.length+A.insertValue.length+P.length;c.current=!0;const z=n.current;z&&z.blur(),s(null),u(0),requestAnimationFrame(()=>{t(O),requestAnimationFrame(()=>{try{const F=n.current;F&&(F.focus(),F.setSelectionRange(R,R))}finally{setTimeout(()=>{c.current=!1},0)}})})},[a,m,o,e,t,n]),k=x.useCallback(E=>{if(a){if(E.key==="ArrowDown"){if(m.length===0)return;E.preventDefault(),u(A=>(A+1)%m.length);return}if(E.key==="ArrowUp"){if(m.length===0)return;E.preventDefault(),u(A=>A-1<0?m.length-1:(A-1)%m.length);return}if(E.key==="Enter"||E.key==="Tab"){if(m.length===0)return;E.preventDefault(),S();return}E.key==="Escape"&&(E.preventDefault(),w())}},[a,m,S,w]);return{isOpen:!!a,query:a?.query??"",options:m,activeIndex:o,setActiveIndex:u,handleTextChange:b,handleCaretChange:y,handleKeyDown:k,selectOption:S,closeMenu:w}},f4e={Read:"Reading files...",Write:"Writing files...",Edit:"Editing code...",Bash:"Running command...",Glob:"Searching files...",Grep:"Searching content...",WebFetch:"Fetching web content...",WebSearch:"Searching the web...",Task:"Running agent...",NotebookEdit:"Editing notebook..."};function h4e({chatStatus:e,isAwaitingFirstResponse:t,isReplayingHistory:n,isUploadingFiles:r,messages:a,errorMessage:s}){if(m4e(a))return{status:"waiting_input",description:"Waiting for approval..."};if(r)return{status:"processing",description:"Uploading files..."};if(e==="error")return{status:"error",description:s||"An error occurred"};if(e==="submitted"||t)return{status:"connecting",description:"Connecting..."};if(e==="streaming"){if(n)return{status:"processing",description:"Loading history..."};const o=p4e(a);if(o){const u=g4e(o);return{status:"processing",description:f4e[u]||`Running ${u}...`}}return{status:"processing",description:"Thinking..."}}return{status:"idle",description:"Awaiting input"}}function m4e(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.toolCall?.approval&&!n.toolCall.approval.resolved&&n.toolCall.state==="approval-requested")return n.toolCall}return null}function p4e(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.toolCall&&(n.toolCall.state==="input-streaming"||n.toolCall.state==="input-available")&&n.role==="assistant")return n.toolCall}return null}function g4e(e){const t=e.title||"",n=t.indexOf(":");return n>0?t.substring(0,n).trim():t||"Tool"}const Cz={idle:"bg-muted-foreground/50",connecting:"bg-blue-500",processing:"bg-green-500",waiting_input:"bg-yellow-500",error:"bg-red-500"},kz={idle:"",connecting:"bg-blue-500/50",processing:"bg-green-500/50",waiting_input:"bg-yellow-500/50",error:"bg-red-500/50"};x.memo(function({activity:t,showDescription:n=!0,className:r}){const{status:a,description:s}=t,o=a!=="idle",u=a==="processing";return h.jsxs("output",{"aria-live":"polite","aria-atomic":"true",className:me("flex items-center gap-1.5",r),children:[h.jsxs("div",{className:"relative flex items-center justify-center",children:[o&&h.jsx(bf.div,{className:me("absolute size-2.5 rounded-full",kz[a]),animate:{scale:[1,1.8,1],opacity:[.6,0,.6]},transition:{duration:1.5,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),h.jsx("div",{className:me("size-2 rounded-full transition-colors duration-200",Cz[a])})]}),u&&h.jsx(PR,{size:12,className:"text-muted-foreground"}),h.jsx(FP,{mode:"wait",children:n&&h.jsx(bf.span,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.15},className:"text-xs text-muted-foreground select-none",children:s},s)})]})});const b4e=x.memo(function({activity:t,className:n}){const{status:r,description:a}=t,s=r!=="idle"&&r!=="error",o=r==="error";return h.jsxs("output",{"aria-live":"polite","aria-atomic":"true",className:me("flex items-center gap-1.5 h-7 px-2.5 rounded-full text-xs font-medium border select-none transition-colors",!(s||o)&&"bg-transparent text-muted-foreground border-transparent",s&&"bg-transparent text-muted-foreground border-border/60",o&&"bg-transparent text-red-500 border-red-500/30",n),children:[h.jsxs("div",{className:"relative flex items-center justify-center",children:[(s||o)&&h.jsx(bf.div,{className:me("absolute size-2.5 rounded-full",kz[r]),animate:{scale:[1,1.8,1],opacity:[.6,0,.6]},transition:{duration:1.5,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),h.jsx("div",{className:me("size-1.5 rounded-full transition-colors duration-200",Cz[r])})]}),h.jsx(FP,{mode:"wait",children:h.jsx(bf.span,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.15},className:"whitespace-nowrap",children:a},a)})]})});function x4e({item:e,isFirst:t,onEdit:n}){const r=el(s=>s.removeFromQueue),a=el(s=>s.moveQueueItemUp);return h.jsxs("div",{className:"group flex items-center gap-1.5 px-3 py-1.5 hover:bg-muted/50 transition-colors",children:[h.jsx("p",{className:"min-w-0 text-xs text-foreground truncate leading-relaxed",children:e.text}),h.jsxs("div",{className:"flex items-center gap-0.5 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:[h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx(Bt,{variant:"ghost",size:"icon-sm",className:"size-5",onClick:()=>n(e.id),children:h.jsx(vA,{className:"size-3"})})}),h.jsx(xn,{children:"Edit"})]}),!t&&h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx(Bt,{variant:"ghost",size:"icon-sm",className:"size-5",onClick:()=>a(e.id),children:h.jsx(aA,{className:"size-3"})})}),h.jsx(xn,{children:"Move up"})]}),h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx(Bt,{variant:"ghost",size:"icon-sm",className:"size-5 text-muted-foreground hover:text-destructive",onClick:()=>r(e.id),children:h.jsx(fc,{className:"size-3"})})}),h.jsx(xn,{children:"Remove"})]})]})]})}function y4e({item:e,onDone:t}){const[n,r]=x.useState(e.text),a=el(u=>u.editQueueItem),s=x.useCallback(()=>{n.trim()&&a(e.id,n.trim()),t()},[n,e.id,a,t]),o=x.useCallback(u=>{u.key==="Enter"&&(u.preventDefault(),s()),u.key==="Escape"&&(u.preventDefault(),t())},[s,t]);return h.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1.5 bg-muted/30",children:[h.jsx("input",{autoFocus:!0,"aria-label":"Edit queued message",value:n,onChange:u=>r(u.target.value),onKeyDown:o,className:"flex-1 min-w-0 text-xs bg-transparent border-b border-border outline-none py-0.5"}),h.jsx(Bt,{variant:"ghost",size:"icon-sm",className:"size-5",onClick:s,children:h.jsx(fo,{className:"size-3"})}),h.jsx(Bt,{variant:"ghost",size:"icon-sm",className:"size-5",onClick:t,children:h.jsx(rs,{className:"size-3"})})]})}const v4e=x.memo(function({queue:t}){const[n,r]=x.useState(null),a=x.useCallback(()=>r(null),[]);return h.jsx(h.Fragment,{children:t.map((s,o)=>n===s.id?h.jsx(y4e,{item:s,onDone:a},s.id):h.jsx(x4e,{item:s,isFirst:o===0,onEdit:r},s.id))})}),w4e=x.memo(function({count:t,isActive:n,onToggle:r}){return h.jsxs("button",{type:"button",onClick:r,className:me("flex items-center gap-1.5 h-7 px-2.5 rounded-full text-xs font-medium transition-colors cursor-pointer border",n?"bg-secondary text-foreground border-border shadow-sm":"bg-transparent text-muted-foreground border-border/60 hover:text-foreground hover:border-border"),children:[h.jsx(I$,{className:"size-3"}),h.jsxs("span",{children:[t," Queued"]}),h.jsx(ro,{className:me("size-3 transition-transform duration-200",n&&"rotate-180")})]})}),T4e=new Set(["finder","cursor","vscode"]),E4e={finder:h.jsx(Zd,{className:"size-3.5"}),cursor:h.jsx(rA,{className:"size-3.5"}),vscode:h.jsx(lA,{className:"size-3.5"})};function f9({path:e,className:t}){const n=Tu(),r=x.useMemo(()=>jj.filter(o=>T4e.has(o.id)&&(!o.macOnly||n)).map(o=>({...o,icon:E4e[o.id]})),[n]),a=x.useCallback(async(o,u)=>{u.stopPropagation();try{await Fj(o.backendApp,e),Bj(o.id)}catch(c){Cn.error("Failed to open",{description:c instanceof Error?c.message:"Unexpected error"})}},[e]),s=x.useCallback(async o=>{o.stopPropagation();try{await navigator.clipboard.writeText(e),Cn.success("Path copied",{description:e})}catch{Cn.error("Failed to copy path")}},[e]);return h.jsxs(G3,{children:[h.jsx(Y3,{asChild:!0,children:h.jsxs("button",{type:"button",onClick:o=>o.stopPropagation(),className:me("inline-flex items-center gap-1 rounded px-1.5 py-0.5","text-[10px] font-medium text-muted-foreground","bg-background/80 hover:bg-background hover:text-foreground","border border-border/50 shadow-sm transition-all duration-150 cursor-pointer",t),children:[h.jsx(cA,{className:"size-2.5"}),h.jsx("span",{children:"Open"})]})}),h.jsxs(W3,{align:"end",className:"min-w-[120px]",onClick:o=>o.stopPropagation(),children:[r.map(o=>h.jsxs(Qp,{onSelect:u=>a(o,u),className:"text-xs",children:[o.icon,h.jsx("span",{children:o.label})]},o.id)),h.jsx(uL,{}),h.jsxs(Qp,{onSelect:s,className:"text-xs",children:[h.jsx(Kc,{className:"size-3.5"}),h.jsx("span",{children:"Copy path"})]})]})]})}const S4e=/\/+$/,C4e=x.memo(function({stats:t,workDir:n}){const r=x.useCallback(a=>n?`${n.replace(S4e,"")}/${a}`:a,[n]);return h.jsxs("div",{className:"flex flex-col max-h-32",children:[h.jsx("div",{className:"overflow-y-auto py-1 px-0.5 flex-1 min-h-0",children:t.files?.map(a=>h.jsxs("div",{className:"group/file flex items-center gap-2 px-3 py-1 text-xs hover:bg-muted/50 transition-colors",children:[h.jsx(fA,{className:"size-3 flex-shrink-0 text-muted-foreground"}),h.jsxs("span",{className:"flex items-center gap-1 flex-shrink-0 text-[11px]",children:[a.additions>0&&h.jsxs("span",{className:"text-emerald-600 dark:text-emerald-400",children:["+",a.additions]}),a.deletions>0&&h.jsxs("span",{className:"text-destructive",children:["-",a.deletions]})]}),h.jsx("span",{className:"truncate text-muted-foreground",title:a.path,children:a.path}),n&&h.jsx("div",{className:"flex-shrink-0 hidden lg:block opacity-0 group-hover/file:opacity-100 transition-opacity duration-150",children:h.jsx(f9,{path:r(a.path)})})]},a.path))}),n&&h.jsxs("div",{className:"group/folder flex items-center gap-1.5 px-3 py-1.5 text-[11px] border-t bg-muted/40 flex-shrink-0",children:[h.jsx(Zd,{className:"size-3 flex-shrink-0 text-muted-foreground/70"}),h.jsx("span",{className:"truncate text-muted-foreground/70",children:n}),h.jsx("div",{className:"flex-shrink-0 hidden lg:block opacity-0 group-hover/folder:opacity-100 transition-opacity duration-150",children:h.jsx(f9,{path:n})})]})]})}),k4e=x.memo(function({stats:t,isActive:n,onToggle:r}){const a=t.files?.length??0;return h.jsxs("button",{type:"button",onClick:r,className:me("flex items-center gap-1.5 h-7 px-2.5 rounded-full text-xs font-medium transition-colors cursor-pointer border",n?"bg-secondary text-foreground border-border shadow-sm":"bg-transparent text-muted-foreground border-border/60 hover:text-foreground hover:border-border"),children:[h.jsx(hA,{className:"size-3"}),h.jsxs("span",{className:"flex items-center gap-1",children:[h.jsxs("span",{className:"text-emerald-600 dark:text-emerald-400",children:["+",t.totalAdditions]}),h.jsxs("span",{className:"text-destructive",children:["-",t.totalDeletions]})]}),h.jsxs("span",{children:[a," file",a!==1?"s":""]}),h.jsx(ro,{className:me("size-3 transition-transform duration-200",n&&"rotate-180")})]})}),A4e=x.memo(function({items:t}){return h.jsx(h.Fragment,{children:t.map((n,r)=>h.jsxs("div",{className:"flex items-center gap-2 px-3 py-1 text-xs",children:[n.status==="done"&&h.jsx(iA,{className:"size-3 flex-shrink-0 text-emerald-500"}),n.status==="in_progress"&&h.jsx(QU,{className:"size-3 flex-shrink-0 text-blue-500"}),n.status==="pending"&&h.jsx(oA,{className:"size-3 flex-shrink-0 text-muted-foreground"}),h.jsx("span",{className:me("truncate",n.status==="done"?"line-through text-muted-foreground":n.status==="in_progress"?"text-foreground font-medium":"text-muted-foreground"),children:n.title})]},`${r}-${n.title}`))})}),N4e=x.memo(function({items:t,isActive:n,onToggle:r}){const a=t.filter(o=>o.status==="done").length,s=t.length;return h.jsxs("button",{type:"button",onClick:r,className:me("flex items-center gap-1.5 h-7 px-2.5 rounded-full text-xs font-medium transition-colors cursor-pointer border",n?"bg-secondary text-foreground border-border shadow-sm":"bg-transparent text-muted-foreground border-border/60 hover:text-foreground hover:border-border"),children:[h.jsx(sq,{className:"size-3"}),h.jsxs("span",{children:[a,"/",s," Tasks"]}),h.jsx(ro,{className:me("size-3 transition-transform duration-200",n&&"rotate-180")})]})}),_4e=x.memo(function({usagePercent:t,usedTokens:n,maxTokens:r,tokenUsage:a,className:s}){const o=r>0?n/r:0,u=new Intl.NumberFormat("en-US",{notation:"compact"}).format(n),c=new Intl.NumberFormat("en-US",{notation:"compact"}).format(r);return h.jsxs(NR,{openDelay:200,closeDelay:150,children:[h.jsx(_R,{asChild:!0,children:h.jsxs("button",{type:"button",className:me("flex items-center gap-1.5 h-7 px-2.5 rounded-full text-xs font-medium","transition-colors cursor-default border","bg-transparent text-muted-foreground border-border/60","hover:text-foreground hover:border-border",s),children:[h.jsx(pQ,{usedPercent:o,size:14}),h.jsxs("span",{children:[t.toFixed(1),"% context"]})]})}),h.jsxs(RR,{align:"end",side:"top",sideOffset:8,className:"w-64 p-0",children:[h.jsxs("div",{className:"w-full space-y-2 p-3",children:[h.jsxs("div",{className:"flex items-center justify-between gap-3 text-xs",children:[h.jsxs("p",{children:[t.toFixed(1),"%"]}),h.jsxs("p",{className:"font-mono text-muted-foreground",children:[u," / ",c]})]}),h.jsx(mQ,{className:"bg-muted",value:t})]}),a&&h.jsxs("div",{className:"border-t p-3 space-y-2.5 text-xs",children:[h.jsxs("div",{className:"space-y-1",children:[h.jsx("div",{className:"text-[11px] font-medium text-muted-foreground",children:"Input Tokens"}),h.jsx(np,{label:"Regular",value:a.input_other,description:"Tokens processed without cache"}),h.jsx(np,{label:"Cache Read",value:a.input_cache_read,description:"Tokens loaded from cache"}),h.jsx(np,{label:"Cache Write",value:a.input_cache_creation,description:"Tokens written to cache"}),h.jsxs("div",{className:"flex items-center justify-between text-xs font-medium border-t mt-1 pt-1",children:[h.jsx("span",{children:"Total Input"}),h.jsx("span",{children:new Intl.NumberFormat("en-US",{notation:"compact"}).format(a.input_other+a.input_cache_read+a.input_cache_creation)})]})]}),h.jsxs("div",{className:"space-y-1 border-t pt-2.5",children:[h.jsx("div",{className:"text-[11px] font-medium text-muted-foreground",children:"Output Tokens"}),h.jsx(np,{label:"Generated",value:a.output,description:"Tokens generated in response"})]})]})]})]})}),np=({label:e,value:t,description:n})=>{const r=h.jsxs("div",{className:"flex items-center justify-between text-xs",children:[h.jsx("span",{className:"text-muted-foreground",children:e}),h.jsx("span",{children:new Intl.NumberFormat("en-US",{notation:"compact"}).format(t)})]});return n?h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx("div",{className:"cursor-help",children:r})}),h.jsx(xn,{side:"left",children:h.jsx("p",{className:"text-xs",children:n})})]}):r},R4e=x.memo(function({gitDiffStats:t,isGitDiffLoading:n,workDir:r,planMode:a=!1,activityStatus:s,usagePercent:o,usedTokens:u,maxTokens:c,tokenUsage:d}){const m=el(O=>O.queue),p=vf(O=>O.todoItems),[b,y]=x.useState(null),w=x.useRef(0),S=t,k=!!(S?.isGitRepo&&S.hasChanges&&S.files&&!S.error),E=m.length>0,A=p.length>0,_=o!==void 0&&u!==void 0&&c!==void 0,I=E||k||A;x.useEffect(()=>{w.current===0&&m.length>0&&y("queue"),w.current=m.length},[m.length]),x.useEffect(()=>{b==="queue"&&!E&&y(null),b==="changes"&&!k&&y(null),b==="todo"&&!A&&y(null)},[b,E,k,A]);const P=x.useCallback(O=>{y(R=>R===O?null:O)},[]);return I||s||_||a?h.jsxs("div",{className:me("w-full px-1 sm:px-2 flex flex-col gap-1 mb-2",n&&"opacity-70"),children:[b&&h.jsxs("div",{className:me("rounded-md border border-border bg-background",b!=="changes"&&"max-h-32 overflow-y-auto py-1 px-0.5"),children:[b==="queue"&&h.jsx(v4e,{queue:m}),b==="changes"&&S&&h.jsx(C4e,{stats:S,workDir:r}),b==="todo"&&h.jsx(A4e,{items:p})]}),h.jsxs("div",{className:"flex items-center gap-1.5 px-1",children:[s&&h.jsx(b4e,{activity:s}),E&&h.jsx(w4e,{count:m.length,isActive:b==="queue",onToggle:()=>P("queue")}),k&&S?.files&&h.jsx(k4e,{stats:S,isActive:b==="changes",onToggle:()=>P("changes")}),A&&h.jsx(N4e,{items:p,isActive:b==="todo",onToggle:()=>P("todo")}),_&&h.jsx(_4e,{usagePercent:o,usedTokens:u,maxTokens:c,tokenUsage:d??null,className:"ml-auto"})]})]}):null});function h9({className:e,...t}){return h.jsx(eK,{"data-slot":"switch",className:me("peer inline-flex h-5 w-9 shrink-0 items-center rounded-full p-0.5 shadow-xs transition-all outline-none","data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80","focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:h.jsx(tK,{"data-slot":"switch-thumb",className:me("pointer-events-none block size-4 rounded-full ring-0","bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground","transition-[translate] duration-200 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"),style:{transform:"none"}})})}function M4e(e){const t=e?.capabilities;return t?t.has(Ok.AlwaysThinking)?"forced":t.has(Ok.Thinking)?"enabled":"disabled":"disabled"}function D4e({className:e,planMode:t=!1,onPlanModeChange:n}){const{config:r,isLoading:a,isUpdating:s,error:o,refresh:u,update:c}=Oj(),[d,m]=x.useState(!1),[p,b]=x.useState(null),y=x.useMemo(()=>r?r.models.find(R=>R.name===r.defaultModel)??null:null,[r]),w=x.useMemo(()=>M4e(y),[y]),S=r?.defaultThinking??!1,k=a||s||w!=="enabled",E=x.useCallback(async R=>{if(m(!1),!(!r||R===r.defaultModel))try{const z=await c({defaultModel:R}),F=z.restartedSessionIds??[],U=z.skippedBusySessionIds??[];F.length>0?Cn.success("Global model updated",{description:`Restarted ${F.length} running session(s).`}):Cn.success("Global model updated"),U.length>0?(b(U),Cn.message("Some sessions were skipped (busy)",{description:`Skipped ${U.length} busy session(s). You can retry when they are idle, or force restart.`})):b(null)}catch(z){const F=z instanceof Error?z.message:"Failed to update global model";Cn.error("Failed to update global model",{description:F})}},[r,c]),A=x.useCallback(async R=>{if(r)try{const F=(await c({defaultThinking:R})).skippedBusySessionIds??[];F.length>0?(b(F),Cn.message("Some sessions were skipped (busy)",{description:`Skipped ${F.length} busy session(s). You can retry when they are idle, or force restart.`})):b(null)}catch(z){const F=z instanceof Error?z.message:"Failed to update global thinking";Cn.error("Failed to update global thinking",{description:F})}},[r,c]),_=x.useCallback(async()=>{if(!(!p||p.length===0))try{const R=await c({forceRestartBusySessions:!0}),z=R.restartedSessionIds??[],F=R.skippedBusySessionIds??[];F.length===0?b(null):b(F),Cn.success("Restarted running sessions",{description:z.length>0?`Restarted ${z.length} session(s).`:"No running sessions to restart."})}catch(R){const z=R instanceof Error?R.message:"Failed to restart busy sessions";Cn.error("Failed to restart busy sessions",{description:z})}},[p,c]),I=x.useMemo(()=>w==="forced"?"Thinking is forced by the selected model.":w==="disabled"?"Thinking is not supported by the selected model.":null,[w]),P=h.jsxs("div",{className:"flex h-9 items-center gap-2 rounded-md px-2",children:[h.jsx("span",{className:"text-xs text-muted-foreground",children:"Thinking"}),h.jsx(h9,{"aria-label":"Toggle global thinking",checked:w==="forced"?!0:w==="disabled"?!1:S,disabled:k,onCheckedChange:A})]}),O=Kf();return h.jsxs("div",{className:me("flex items-center gap-1",e),children:[h.jsx(Bt,{variant:"ghost",size:"icon",className:"size-9 border-0","aria-label":"Attach files",type:"button",onClick:()=>O.openFileDialog(),children:h.jsx(m1,{className:"size-4"})}),h.jsx("div",{className:"mx-0 h-4 w-px bg-border/70"}),h.jsxs(cfe,{open:d,onOpenChange:m,children:[h.jsx(dfe,{asChild:!0,children:h.jsxs(Bt,{variant:"ghost",size:"sm",className:"h-9 max-w-[160px] justify-start gap-2 border-0","aria-label":"Change global model",type:"button",disabled:a||s||!r,children:[h.jsx(a$,{className:"size-4 shrink-0"}),h.jsx("span",{className:"truncate",children:r?r.defaultModel:"Model"}),(a||s)&&h.jsx(PR,{className:"ml-auto shrink-0",size:14})]})}),h.jsxs(ffe,{title:"Select global model",children:[h.jsx(hfe,{placeholder:"Search models..."}),h.jsxs(mfe,{children:[h.jsx(pfe,{children:"No models found."}),h.jsx(gfe,{heading:"Models",children:(r?.models??[]).map(R=>{const z=R.name===r?.defaultModel,F=`${R.name} (${R.provider})`;return h.jsxs(bfe,{value:`${R.name} ${R.model} ${R.provider}`,onSelect:U=>E(R.name),className:"flex items-center gap-2",children:[z?h.jsx(fo,{className:"size-4 text-foreground"}):h.jsx("span",{className:"size-4"}),h.jsx(xfe,{title:F,children:R.name}),h.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:R.provider})]},R.name)})})]})]})]}),h.jsx("div",{className:"mx-0 h-4 w-px bg-border/70"}),I?h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:P}),h.jsx(xn,{sideOffset:8,children:I})]}):P,n&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"mx-0 h-4 w-px bg-border/70"}),h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsxs("div",{className:"flex h-9 items-center gap-2 rounded-md px-2",children:[h.jsx("span",{className:"text-xs text-muted-foreground",children:"Plan"}),h.jsx(h9,{"aria-label":"Toggle plan mode",checked:t,onCheckedChange:n})]})}),h.jsx(xn,{sideOffset:8,children:t?"Plan mode is active. The model will only read and plan, not modify files.":"Enable plan mode for read-only research and planning."})]})]}),p&&p.length>0||o?h.jsx("div",{className:"mx-1.5 h-4 w-px bg-border/70"}):null,p&&p.length>0?h.jsx(Bt,{variant:"outline",size:"icon",className:"size-9","aria-label":"Force restart busy sessions",title:"Force restart busy sessions",type:"button",onClick:_,disabled:s,children:h.jsx(ZE,{className:"size-4"})}):null,o?h.jsx(Bt,{variant:"outline",size:"icon",className:"size-9","aria-label":"Reload global config",title:"Reload global config",type:"button",onClick:()=>{u()},children:h.jsx(ZE,{className:"size-4"})}):null]})}const I4e=x.memo(function({status:t,onSubmit:n,canSendMessage:r,currentSession:a,isUploading:s,isStreaming:o,isAwaitingIdle:u,isReplayingHistory:c,onCancel:d,onListSessionDirectory:m,gitDiffStats:p,isGitDiffLoading:b,slashCommands:y=[],planMode:w=!1,onPlanModeChange:S,activityStatus:k,usagePercent:E,usedTokens:A,maxTokens:_,tokenUsage:I}){const P=kfe(),O=Kf(),R=x.useRef(null),[z,F]=x.useState(!1),{isOpen:U,query:X,sections:W,flatOptions:le,activeIndex:se,setActiveIndex:ie,handleTextChange:$,handleCaretChange:K,handleKeyDown:Z,selectOption:re,closeMenu:j,workspaceStatus:H,workspaceError:G,retryWorkspace:L,workspaceFileCount:ae}=a4e({text:P.textInput.value,setText:P.textInput.setInput,textareaRef:R,attachments:O.files,sessionId:a?.sessionId,listDirectory:m}),{isOpen:oe,query:Se,options:be,activeIndex:fe,setActiveIndex:Ne,handleTextChange:at,handleCaretChange:Ce,handleKeyDown:Re,selectOption:Ee,closeMenu:we}=d4e({text:P.textInput.value,setText:P.textInput.setInput,textareaRef:R,commands:y}),Oe=x.useCallback(Ft=>{const Nt=Ft.currentTarget.value,qt=Ft.currentTarget.selectionStart;$(Nt,qt),at(Nt,qt)},[$,at]),ze=x.useCallback(Ft=>{const Nt=Ft.currentTarget.selectionStart;K(Nt),Ce(Nt)},[K,Ce]),Ge=x.useCallback(()=>{j(),we()},[j,we]),it=x.useCallback(Ft=>{if(oe){Re(Ft);return}if(U){Z(Ft);return}},[oe,U,Re,Z]),At=x.useCallback(Ft=>{Cn.error("File Error",{description:Ft.message})},[]),st=x.useCallback(()=>{F(Ft=>!Ft)},[]);return h.jsxs("div",{className:"w-full",children:[h.jsx(R4e,{gitDiffStats:p,isGitDiffLoading:b,workDir:a?.workDir,planMode:w,activityStatus:k,usagePercent:E,usedTokens:A,maxTokens:_,tokenUsage:I}),h.jsxs(Mfe,{accept:"*",className:me("w-full [&_[data-slot=input-group]]:border [&_[data-slot=input-group]]:border-border",w&&"[&_[data-slot=input-group]]:border-dashed [&_[data-slot=input-group]]:!border-blue-200 dark:[&_[data-slot=input-group]]:!border-blue-600"),multiple:!0,maxFiles:lv.maxCount,onSubmit:n,onError:At,children:[h.jsxs(Dfe,{className:"w-full relative",children:[h.jsx("button",{type:"button",onClick:st,disabled:!(r&&a),className:"absolute top-2 right-2 z-10 p-1 cursor-pointer rounded-md text-muted-foreground hover:text-foreground hover:bg-secondary/50 transition-colors disabled:opacity-50 disabled:pointer-events-none","aria-label":z?"Collapse input":"Expand input",children:z?h.jsx(gA,{className:"size-4"}):h.jsx(pA,{className:"size-4"})}),h.jsx(Rfe,{children:Ft=>h.jsx(_fe,{data:Ft})}),s?h.jsxs(Kv,{className:"mb-2 bg-secondary/70 text-muted-foreground",variant:"secondary",children:[h.jsx(ma,{className:"size-4 animate-spin text-primary"}),h.jsx("span",{children:"Uploading files…"})]}):null,h.jsx("div",{className:"relative w-full flex items-start",children:h.jsxs("div",{className:"flex-1 relative",children:[h.jsx(Ife,{ref:R,className:me("transition-all duration-200 pr-8",z?"min-h-[220px] max-h-[60vh] sm:min-h-[300px]":"min-h-10 max-h-36 sm:min-h-16 sm:max-h-48"),placeholder:a?u?c?"Connecting...":"Starting environment...":o?"Add a follow-up message...":"Ask anything, / for commands, @ to mention files":"Create a session to start...","aria-busy":s,disabled:!r||s||!a||u,onChange:Oe,onSelect:ze,onKeyUp:ze,onClick:ze,onBlur:Ge,onKeyDown:it}),h.jsx(s4e,{open:oe&&r&&!U,query:Se,options:be,activeIndex:fe,onSelect:Ee,onHover:Ne}),h.jsx(Vve,{open:U&&r&&!oe,query:X,sections:W,flatOptions:le,activeIndex:se,onSelect:re,onHover:ie,workspaceStatus:H,workspaceError:G,onRetryWorkspace:L,isWorkspaceAvailable:!!(a&&m),workspaceFileCount:ae})]})})]}),h.jsxs(Ofe,{className:"w-full gap-2 py-1 border-none bg-transparent shadow-none",children:[h.jsx(Lfe,{className:"flex-1 min-w-0 flex-wrap",children:h.jsx(D4e,{planMode:w,onPlanModeChange:S})}),o?h.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[h.jsx(Pfe,{"aria-label":"Stop generation",disabled:!d,onClick:Ft=>{Ft.preventDefault(),Ft.stopPropagation(),d?.()},size:"icon-sm",variant:"default",className:"shrink-0",children:h.jsx(Rd,{className:"size-4"})}),h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx(Z7,{"aria-label":"Queue message",size:"icon-sm",variant:"outline",className:"shrink-0",disabled:!(r&&a),children:h.jsx(aA,{className:"size-4"})})}),h.jsx(xn,{children:"Queue message"})]})]}):h.jsx(Z7,{status:s?"submitted":t,disabled:!r||u||s||!a,className:"shrink-0"})]})]})]})});function O4e({messages:e,onApprovalResponse:t,pendingApprovalMap:n,canRespondToApproval:r}){const[a,s]=x.useState(!1),[o,u]=x.useState(""),c=x.useRef(null),d=x.useMemo(()=>{for(const I of e)if(I.variant==="tool"&&I.toolCall?.approval&&I.toolCall.state==="approval-requested"&&!I.toolCall.approval.submitted)return{message:I,approval:I.toolCall.approval,toolCall:I.toolCall};return null},[e]),m=d?.approval?.id,p=x.useRef(m);p.current!==m&&(p.current=m,(a||o)&&(s(!1),u("")));const b=x.useCallback(async(I,P)=>{if(!(d&&t))return;const{approval:O}=d;if(O.id)try{await t(O.id,I,P)}catch(R){console.error("[ApprovalDialog] Failed to respond",R)}},[d,t]),y=x.useCallback(()=>{const I=o.trim();I&&(s(!1),u(""),b("reject",I))},[o,b]),w=d?.approval?.id,S=w?n[w]===!0:!1,k=!(r&&t)||S;if(x.useEffect(()=>{a&&requestAnimationFrame(()=>{c.current?.focus()})},[a]),x.useEffect(()=>{if(!d||k||a)return;const I=P=>{if(P.defaultPrevented||P.repeat||P.isComposing||P.metaKey||P.ctrlKey||P.altKey)return;const O=document.activeElement;if(O){const F=O.tagName;if(F==="INPUT"||F==="TEXTAREA"||F==="SELECT"||O.isContentEditable)return}if(P.key==="4"){P.preventDefault(),s(!0);return}const z={1:"approve",2:"approve_for_session",3:"reject"}[P.key];z&&(P.preventDefault(),b(z))};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[d,k,b,a]),!d)return null;const{approval:E,toolCall:A}=d,_=(()=>{if(E.sourceDescription)return E.sourceDescription;const I=A.subagentType,P=A.subagentAgentId,O=P?` (${P})`:"";return E.sourceKind==="background_agent"?I?`Background · ${I}${O}`:`Background agent${O}`:A.isSubagentOrigin?I?`${I}${O}`:`Sub-agent${O}`:null})();return h.jsx("div",{className:"px-3 pb-2 w-full",children:h.jsx("div",{role:"alert",className:me("relative w-full border border-border/60 shadow-xs","border-l border-l-blue-400/50","rounded-lg px-4 py-3","transition-all duration-200","max-h-[70vh]","overflow-hidden"),children:h.jsxs("div",{className:"flex flex-col gap-2.5",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"size-2 rounded-full bg-blue-400 animate-pulse flex-shrink-0"}),h.jsxs("div",{className:"font-semibold text-sm text-foreground",children:["Allow this ",E.action,"?"]}),E.sender&&h.jsxs("span",{className:"text-xs text-muted-foreground",children:["· ",E.sender]}),_&&h.jsx("span",{className:"text-xs text-muted-foreground/70 bg-muted/50 px-1.5 py-0.5 rounded",children:_})]}),E.description&&h.jsx("div",{className:"rounded-md bg-muted/50 px-3 py-2 w-full max-h-44 overflow-auto",children:h.jsx("pre",{className:"font-mono text-xs whitespace-pre-wrap text-foreground/90",children:E.description})}),A.display&&A.display.length>0&&h.jsx("div",{className:"rounded-md bg-muted/30 px-3 py-2 text-sm max-h-40 overflow-auto",children:A.display.map(I=>{const P=typeof I.data=="string"||typeof I.data=="number"||typeof I.data=="boolean"?`${I.type}:${I.data}`:I.data==null?`${I.type}:null`:(()=>{try{return`${I.type}:${JSON.stringify(I.data)}`}catch{return`${I.type}:unserializable`}})(),O=`${A.toolCallId??A.title}:${P}`;return h.jsx("div",{className:"font-mono text-xs",children:JSON.stringify(I,null,2)},O)})}),h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsxs(Bt,{size:"sm",variant:"outline",disabled:k,onClick:()=>b("approve"),className:"transition-all",children:[S?"Approving...":"Approve",!S&&h.jsx(Ir,{className:"ml-1.5",children:"1"})]}),h.jsxs(Bt,{size:"sm",variant:"outline",disabled:k,onClick:()=>b("approve_for_session"),className:"transition-all",children:[S?"Approving...":"Approve for session",!S&&h.jsx(Ir,{className:"ml-1.5",children:"2"})]}),h.jsxs(Bt,{size:"sm",variant:"ghost",disabled:k,onClick:()=>b("reject"),className:me("transition-all","text-muted-foreground hover:text-destructive hover:bg-destructive/10"),children:[S?"Declining...":"Decline",!S&&h.jsx(Ir,{className:"ml-1.5",children:"3"})]}),h.jsxs(Bt,{size:"sm",variant:"ghost",disabled:k,onClick:()=>s(!a),className:me("transition-all",a?"text-foreground bg-muted":"text-muted-foreground hover:text-foreground"),children:[a?"Cancel feedback":"Decline with feedback",!(a||S)&&h.jsx(Ir,{className:"ml-1.5",children:"4"})]})]}),a&&h.jsxs("div",{className:"flex flex-col gap-1.5",children:[h.jsx("textarea",{ref:c,value:o,onChange:I=>u(I.target.value),onKeyDown:I=>{I.nativeEvent.isComposing||(I.key==="Enter"&&!I.shiftKey&&(I.preventDefault(),y()),I.key==="Escape"&&(I.preventDefault(),s(!1),u("")))},placeholder:"Tell the model what to do instead...",className:me("w-full rounded-md border border-border/60 bg-muted/30","px-3 py-2 text-sm text-foreground","placeholder:text-muted-foreground/50","focus:outline-none focus:ring-1 focus:ring-ring","resize-none"),rows:2}),h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("span",{className:"text-xs text-muted-foreground",children:"Enter to submit · Shift+Enter for newline · Esc to cancel"}),h.jsx(Bt,{size:"sm",variant:"outline",disabled:!o.trim(),onClick:y,className:"text-xs",children:"Submit feedback"})]})]})]})})})}function m9({className:e,...t}){return h.jsx(NN,{"data-slot":"checkbox",className:me("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:h.jsx(RN,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:h.jsx(fo,{className:"size-3.5"})})})}function Az(e){return x.useMemo(()=>{for(const t of e)if(t.variant==="tool"&&t.toolCall?.question&&t.toolCall.state==="question-requested"&&!t.toolCall.question.submitted)return{message:t,question:t.toolCall.question,toolCall:t.toolCall};return null},[e])}function L4e({messages:e,onQuestionResponse:t,pendingQuestionMap:n}){const r=Az(e),a=r?.question.questions??[],s=a.length,[o,u]=x.useState(0),[c,d]=x.useState(0),[m,p]=x.useState(new Set),[b,y]=x.useState(""),[w,S]=x.useState({}),k=x.useRef(null),E=x.useRef(new Map),A=r?.question.id,_=x.useRef(void 0);x.useEffect(()=>{A!==_.current&&(_.current=A,u(0),d(0),p(new Set),y(""),S({}),E.current.clear())},[A]);const I=a[o],P=I?.options??[],O=I?.multi_select??!1,R=P.length;x.useEffect(()=>{c===R?(!O||m.has(R))&&k.current?.focus():document.activeElement===k.current&&k.current?.blur()},[c,R,O,m]);const z=A?n[A]===!0:!1,F=!t||z,U=x.useCallback(j=>{j?document.activeElement===k.current&&k.current?.blur():setTimeout(()=>k.current?.focus(),0)},[]),X=x.useCallback(()=>{if(O){const j=[];for(const H of Array.from(m).sort((G,L)=>G-L))H===R?b.trim()&&j.push(b.trim()):P[H]&&j.push(P[H].label);return j.length>0?j.join(", "):null}return c===R?b.trim()||null:P[c]?.label??null},[O,m,c,R,b,P]),W=x.useCallback(j=>{const H=E.current.get(j);if(H){d(H.selectedIndex),p(H.multiSelected),y(H.otherText);return}const G=a[j];if(G){const L=w[G.question];if(L){if(G.multi_select){const ae=L.split(", ").map(fe=>fe.trim()),oe=new Set(G.options.map(fe=>fe.label)),Se=new Set;G.options.forEach((fe,Ne)=>{ae.includes(fe.label)&&Se.add(Ne)});const be=ae.filter(fe=>!oe.has(fe));be.length>0?(Se.add(G.options.length),y(be.join(", "))):y(""),p(Se),d(Se.size>0?Math.min(...Se):0)}else{const ae=G.options.findIndex(oe=>oe.label===L);ae>=0?(d(ae),y("")):(d(G.options.length),y(L)),p(new Set)}return}}d(0),p(new Set),y("")},[a,w]),le=x.useCallback(async j=>{if(F||!I||!r)return;document.activeElement instanceof HTMLElement&&document.activeElement.blur();const H={...w,[I.question]:j};if(E.current.delete(o),S(H),a.every(L=>L.question in H))try{await t(r.question.id,H)}catch(L){console.error("[QuestionDialog] Failed to respond",L)}else for(let L=1;L<=s;L++){const ae=(o+L)%s;if(!(a[ae].question in H)){u(ae),W(ae);break}}},[F,I,r,w,a,o,s,t,W]),se=x.useCallback(async()=>{const j=X();j&&await le(j)},[X,le]),ie=x.useCallback(async()=>{if(!(F||!r))try{await t(r.question.id,{})}catch(j){console.error("[QuestionDialog] Failed to dismiss",j)}},[F,r,t]),$=x.useCallback(j=>{F||j===o||(E.current.set(o,{selectedIndex:c,multiSelected:m,otherText:b}),u(j),W(j))},[F,o,c,m,b,W]),K=x.useCallback(j=>{if(!F)if(O){const H=m.has(j);d(j),p(G=>{const L=new Set(G);return L.has(j)?L.delete(j):L.add(j),L}),j===R&&U(H)}else if(j===R)d(j),setTimeout(()=>k.current?.focus(),0);else{d(j);const H=P[j]?.label;H&&le(H)}},[F,O,R,P,le,U,m]);if(x.useEffect(()=>{if(!r||F)return;const j=H=>{if(H.defaultPrevented||H.repeat||H.isComposing||H.metaKey||H.ctrlKey||H.altKey)return;const G=document.activeElement;if(G){const oe=G.tagName;if(oe==="INPUT"||oe==="TEXTAREA"||oe==="SELECT"||G.isContentEditable)return}const L=P.length+1,ae=Number.parseInt(H.key,10);if(ae>=1&&ae<=L){H.preventDefault(),K(ae-1);return}if(H.key==="ArrowLeft"&&o>0)H.preventDefault(),$(o-1);else if(H.key==="ArrowRight"&&o<s-1)H.preventDefault(),$(o+1);else if(H.key==="ArrowDown"||H.key==="j")H.preventDefault(),d(oe=>Math.min(oe+1,L-1));else if(H.key==="ArrowUp"||H.key==="k")H.preventDefault(),d(oe=>Math.max(oe-1,0));else if(H.key===" ")if(H.preventDefault(),O){const oe=m.has(c);p(Se=>{const be=new Set(Se);return be.has(c)?be.delete(c):be.add(c),be}),c===R&&U(oe)}else se();else H.key==="Enter"?(H.preventDefault(),se()):H.key==="Escape"&&(H.preventDefault(),ie())};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[r,F,P.length,O,c,R,se,K,ie,$,o,s,m,U]),!(r&&I))return null;const Z=X()!==null,re=Z&&a.every(j=>j.question in w||j.question===I.question);return h.jsx("div",{className:"w-full px-0 pb-0 pt-0 sm:px-3 sm:pb-3",children:h.jsxs("div",{className:me("relative w-full","border border-border/60 rounded-xl","bg-background","shadow-sm","overflow-hidden"),children:[s>1&&h.jsx("div",{className:"flex items-center gap-1.5 px-4 pt-3 pb-1",children:a.map((j,H)=>{const G=j.header||`Q${H+1}`,L=j.question in w,ae=H===o;return h.jsxs("button",{type:"button",disabled:F,onClick:()=>$(H),className:me("inline-flex items-center gap-1 rounded-full px-2.5 py-1 text-xs font-medium transition-colors cursor-pointer",ae&&"bg-primary text-primary-foreground",L&&!ae&&"bg-secondary text-secondary-foreground",!(ae||L)&&"border border-border/60 text-muted-foreground hover:bg-muted/50",F&&"opacity-50 cursor-not-allowed"),children:[h.jsx("span",{className:"text-[10px]",children:ae?"●":L?"✓":"○"}),G]},`tab-${j.question}`)})}),h.jsxs("div",{className:"flex items-center gap-2.5 px-4 pt-2 pb-1 mb-1",children:[h.jsx("span",{className:"font-semibold text-sm text-foreground",children:I.question}),s===1&&I.header&&h.jsx("span",{className:"inline-flex items-center rounded-full bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground",children:I.header})]}),I.body&&h.jsxs(rl,{defaultOpen:!0,className:"mx-4 mb-2",children:[h.jsxs(eu,{className:"group flex items-center gap-2 w-full text-xs text-muted-foreground hover:text-foreground transition-colors py-1",children:[h.jsx(fu,{className:"size-3.5 transition-transform group-data-[state=open]:rotate-90"}),h.jsx("span",{children:"Plan Preview"})]}),h.jsx(tu,{children:h.jsx("div",{className:"border-l-2 border-blue-400/40 pl-3 mt-1 max-h-[360px] overflow-y-auto",children:h.jsx(og,{children:I.body})})})]}),h.jsxs("div",{className:"flex flex-col px-4 py-2 gap-0.5",children:[P.map((j,H)=>{const G=c===H,L=O&&m.has(H),ae=H+1;return h.jsxs("button",{type:"button",disabled:F,onClick:()=>K(H),className:me("flex items-start gap-2.5 rounded-md px-2 py-1.5 text-left text-sm transition-colors cursor-pointer","hover:bg-muted/50",L&&"bg-primary/[0.08]",G&&!L&&"bg-muted/70",G&&L&&"ring-1 ring-inset ring-primary/20",F&&"opacity-50 cursor-not-allowed"),children:[O?h.jsx(m9,{checked:L,className:"mt-0.5 pointer-events-none",tabIndex:-1}):h.jsxs("span",{className:"flex-shrink-0 w-5 text-right text-muted-foreground font-mono text-sm",children:[ae,"."]}),h.jsxs("div",{className:"flex flex-col min-w-0",children:[h.jsx("span",{className:"font-medium text-foreground",children:j.label}),j.description&&h.jsx("span",{className:"text-xs text-muted-foreground",children:j.description})]})]},`${I.question}-${j.label}`)}),h.jsxs("div",{className:me("flex items-start gap-2.5 rounded-md px-2 py-1.5 transition-colors",O&&m.has(R)&&"bg-primary/[0.08]",c===R&&!(O&&m.has(R))&&"bg-muted/70",c===R&&O&&m.has(R)&&"ring-1 ring-inset ring-primary/20"),children:[O?h.jsx(m9,{checked:m.has(R),onCheckedChange:()=>K(R),className:"mt-0.5 pointer-events-auto",tabIndex:-1}):h.jsxs("span",{className:"flex-shrink-0 w-5 text-right text-muted-foreground font-mono text-sm",children:[P.length+1,"."]}),h.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[I.other_label&&h.jsx("span",{className:"font-medium text-foreground text-sm",children:I.other_label}),I.other_description&&h.jsx("span",{className:"text-xs text-muted-foreground",children:I.other_description}),h.jsx("input",{ref:k,value:b,onChange:j=>{y(j.target.value),O?m.has(R)||p(H=>new Set(H).add(R)):d(R)},onFocus:()=>{d(R),O&&!m.has(R)&&p(j=>new Set(j).add(R))},onKeyDown:j=>{j.key==="Enter"&&!j.nativeEvent.isComposing?(j.preventDefault(),se()):j.key==="Escape"?(j.preventDefault(),j.target.blur()):j.key==="ArrowUp"?(j.preventDefault(),d(Math.max(R-1,0))):j.key==="ArrowDown"&&j.preventDefault()},placeholder:I.other_label||"Type your answer...",className:me("flex-1 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50","border-0 outline-none ring-0 focus:ring-0 focus:outline-none","py-0 h-auto",F&&"opacity-50 cursor-not-allowed"),disabled:F})]})]})]}),h.jsxs("div",{className:"flex items-center gap-4 px-4 py-2.5 mt-1",children:[h.jsxs("div",{className:"flex items-center gap-3 mr-auto text-muted-foreground/40 text-[11px]",children:[h.jsxs("span",{className:"inline-flex items-center gap-1",children:[h.jsx(Ir,{className:"text-[10px] opacity-60",children:"↑↓"}),"select"]}),s>1&&h.jsxs("span",{className:"inline-flex items-center gap-1",children:[h.jsx(Ir,{className:"text-[10px] opacity-60",children:"←→"}),"switch"]}),O?h.jsxs(h.Fragment,{children:[h.jsxs("span",{className:"inline-flex items-center gap-1",children:[h.jsx(Ir,{className:"text-[10px] opacity-60",children:"space"}),"toggle"]}),h.jsxs("span",{className:"inline-flex items-center gap-1",children:[h.jsx(Ir,{className:"text-[10px] opacity-60",children:"↵"}),"confirm"]})]}):h.jsxs("span",{className:"inline-flex items-center gap-1",children:[h.jsx(Ir,{className:"text-[10px] opacity-60",children:"space/↵"}),"confirm"]})]}),h.jsxs("button",{type:"button",disabled:F,onClick:ie,className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground/60 hover:text-muted-foreground transition-colors disabled:opacity-50 cursor-pointer",children:["Dismiss",h.jsx(Ir,{className:"text-[11px] opacity-70",children:"esc"})]}),h.jsxs("button",{type:"button",disabled:F||!Z,onClick:se,className:me("inline-flex items-center gap-1.5 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors","disabled:opacity-30 disabled:pointer-events-none cursor-pointer"),children:[z?"Submitting...":re?"Submit":"Next",!z&&h.jsx(Ir,{className:"text-[11px]",children:"↵"})]})]})]})})}const p9=["B","KB","MB","GB","TB"];function P4e(e){if(e==null)return null;if(e===0)return"0 B";let t=e,n=0;for(;t>=1024&&n<p9.length-1;)t/=1024,n+=1;const r=t>=10?0:1;return`${t.toFixed(r)} ${p9[n]}`}function j4e(e,t){return e==="."?t:`${e}/${t}`}function z4e(e){if(e===".")return".";const t=e.split("/").filter(Boolean);return t.pop(),t.length>0?t.join("/"):"."}function g9(e){return e==="."?".":`./${e}`}function B4e({className:e,sessionId:t,workDir:n,onClose:r,onListSessionDirectory:a,onGetSessionFileUrl:s}){const[o,u]=x.useState("."),[c,d]=x.useState([]),[m,p]=x.useState(!1),[b,y]=x.useState(!1),[w,S]=x.useState(null),k=x.useRef(0),E=x.useCallback(async(P,O=!1)=>{if(!a)return;const R=k.current+1;k.current=R,O?y(!0):p(!0),S(null);try{const z=await a(t,P);if(R!==k.current)return;d(z)}catch(z){if(R!==k.current)return;S(z instanceof Error?z.message:"Failed to load workspace files")}finally{R===k.current&&(p(!1),y(!1))}},[a,t]);x.useEffect(()=>{E(o).catch(()=>{})},[o,E]);const A=x.useCallback(()=>{E(o,!0).catch(()=>{})},[o,E]),_=x.useCallback(P=>{u(P)},[]),I=x.useCallback(()=>{u(P=>z4e(P))},[]);return h.jsxs("aside",{className:me("flex h-full min-h-0 flex-col bg-background/95 backdrop-blur supports-backdrop-filter:bg-background/85",e),children:[h.jsxs("div",{className:"border-b px-3 py-3",children:[h.jsxs("div",{className:"flex items-start justify-between gap-3",children:[h.jsxs("div",{className:"min-w-0",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("h2",{className:"text-sm font-semibold",children:"Workspace files"}),h.jsx(Kv,{variant:"secondary",children:c.length})]}),h.jsx("p",{className:"mt-1 truncate text-xs text-muted-foreground",title:n??void 0,children:n??"Current work directory"})]}),h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(Bt,{type:"button",variant:"ghost",size:"icon-xs",onClick:A,disabled:m||b,"aria-label":"Refresh workspace files",children:h.jsx(p1,{className:me("size-3.5",(m||b)&&"animate-spin")})}),h.jsx(Bt,{type:"button",variant:"ghost",size:"icon-xs",onClick:r,"aria-label":"Close workspace files panel",children:h.jsx(yA,{className:"size-3.5"})})]})]}),h.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[h.jsxs(Bt,{type:"button",variant:"secondary",size:"xs",onClick:I,disabled:o==="."||m,children:[h.jsx(jU,{className:"size-3.5"}),"Up"]}),o!=="."?h.jsx(Bt,{type:"button",variant:"ghost",size:"xs",onClick:()=>u("."),disabled:m,children:"Root"}):null]}),h.jsx("div",{className:"mt-2 truncate rounded-md border bg-muted/40 px-2.5 py-2 text-xs text-muted-foreground",title:g9(o),children:g9(o)})]}),h.jsx(qv,{className:"min-h-0 flex-1",children:h.jsxs("div",{className:"space-y-2 p-3",children:[m&&c.length===0?h.jsxs("div",{className:"flex min-h-40 flex-col items-center justify-center gap-2 text-sm text-muted-foreground",children:[h.jsx(ma,{className:"size-5 animate-spin"}),h.jsx("span",{children:"Loading files..."})]}):null,!m&&w?h.jsx("div",{className:"rounded-xl border border-destructive/20 bg-destructive/5 p-4 text-sm",children:h.jsxs("div",{className:"flex items-start gap-2",children:[h.jsx(r4,{className:"mt-0.5 size-4 text-destructive"}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("div",{className:"font-medium text-foreground",children:"Failed to load this directory"}),h.jsx("p",{className:"mt-1 break-words text-muted-foreground",children:w}),h.jsx(Bt,{type:"button",variant:"outline",size:"xs",className:"mt-3",onClick:A,children:"Try again"})]})]})}):null,!(m||w)&&c.length===0?h.jsxs("div",{className:"flex min-h-40 flex-col items-center justify-center gap-2 rounded-xl border border-dashed text-sm text-muted-foreground",children:[h.jsx(QE,{className:"size-5"}),h.jsx("span",{children:"No files in this directory."})]}):null,w?null:c.map(P=>{const O=j4e(o,P.name),R=P4e(P.size),z=P.type==="directory";return h.jsxs("div",{className:"flex items-center gap-2 rounded-xl border bg-card/60 px-2.5 py-2",children:[z?h.jsx(QE,{className:"size-4 shrink-0 text-muted-foreground"}):h.jsx(dA,{className:"size-4 shrink-0 text-muted-foreground"}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("div",{className:"truncate text-sm font-medium",title:P.name,children:P.name}),h.jsx("div",{className:"text-xs text-muted-foreground",children:z?"Directory":R??"File"})]}),z?h.jsx(Bt,{type:"button",variant:"ghost",size:"icon-xs",onClick:()=>_(O),"aria-label":`Open directory ${P.name}`,children:h.jsx(fu,{className:"size-3.5"})}):s?h.jsx(Bt,{asChild:!0,variant:"ghost",size:"icon-xs",children:h.jsx("a",{href:s(t,O),download:P.name,"aria-label":`Download ${P.name}`,children:h.jsx(uA,{className:"size-3.5"})})}):null]},`${P.type}:${O}`)})]})})]})}const F4e=1e4,H4e=3e4;function U4e(e){const[t,n]=x.useState(null),[r,a]=x.useState(!1),[s,o]=x.useState(null),u=x.useRef(null),c=x.useCallback(async(m=!1)=>{if(!e){n(null);return}const p=Date.now();if(!m&&u.current&&u.current.sessionId===e&&p-u.current.timestamp<F4e){n(u.current.stats);return}a(!0),o(null);try{const b=Br(),y=await fetch(`${b}/api/sessions/${encodeURIComponent(e)}/git-diff`,{headers:na()});if(!y.ok)throw new Error("Failed to fetch git diff stats");const w=await y.json(),S={isGitRepo:w.is_git_repo,hasChanges:w.has_changes??!1,totalAdditions:w.total_additions??0,totalDeletions:w.total_deletions??0,files:(w.files??[]).map(k=>({path:k.path,additions:k.additions,deletions:k.deletions,status:k.status})),error:w.error??null};u.current={sessionId:e,stats:S,timestamp:p},n(S)}catch(b){const y=b instanceof Error?b.message:"Failed to fetch git diff stats";o(y),n(null)}finally{a(!1)}},[e]);x.useEffect(()=>{c();const m=setInterval(()=>{c()},H4e);return()=>clearInterval(m)},[c]),x.useEffect(()=>{u.current&&u.current.sessionId!==e&&(u.current=null,n(null))},[e]);const d=x.useCallback(async()=>{await c(!0)},[c]);return{stats:t,isLoading:r,error:s,refresh:d}}const $4e=x.memo(function({status:t,onSubmit:n,messages:r,selectedSessionId:a,onApprovalResponse:s,onQuestionResponse:o,sessionDescription:u,contextUsage:c=0,tokenUsage:d=null,currentStep:m=0,currentSession:p,isReplayingHistory:b=!1,onListSessionDirectory:y,onGetSessionFileUrl:w,onGetSessionFile:S,onCancel:k,isUploadingFiles:E=!1,isAwaitingFirstResponse:A=!1,onCreateSession:_,onOpenSidebar:I,onRenameSession:P,maxContextSize:O,slashCommands:R=[],planMode:z=!1,onPlanModeChange:F,onForkSession:U,errorMessage:X}){const[W,le]=x.useState(!1),[se,ie]=x.useState(!1),[$,K]=x.useState(!1),[Z,re]=x.useState({}),[j,H]=x.useState({}),G=Az(r)!==null,{stats:L,isLoading:ae}=U4e(p?.sessionId??null),oe=x.useRef(null),Se=x.useMemo(()=>{const st=h4e({chatStatus:t,isAwaitingFirstResponse:A,isReplayingHistory:b,isUploadingFiles:E,messages:r,errorMessage:X});return oe.current&&oe.current.status===st.status&&oe.current.description===st.description?oe.current:(oe.current=st,st)},[t,A,b,E,r,X]),be=O??64e3,fe=Math.round(c*be),Ne=Math.round(c*1e3)/10,at=!0,Ce=t==="streaming",Re=t==="submitted",Ee=E,we=!!(a&&p?.workDir&&y&&w);x.useEffect(()=>{a&&p?.workDir||ie(!1)},[p?.workDir,a]);const Oe=x.useCallback(()=>{ie(st=>!st)},[]),ze=x.useCallback(()=>{ie(!1)},[]),Ge=x.useCallback(async(st,Ft,Nt)=>{if(st?.id&&s){re(qt=>({...qt,[st.id]:!0}));try{await s(st.id,Ft,Nt)}catch(qt){console.error("[ChatWorkspace] Failed to respond to approval",qt),Cn.error("Approval action failed",{description:qt instanceof Error?qt.message:String(qt)})}finally{re(qt=>{const Ht={...qt};return delete Ht[st.id],Ht})}}},[s]),it=x.useCallback(async(st,Ft,Nt)=>{for(const qt of r)if(qt.variant==="tool"&&qt.toolCall?.approval?.id===st){await Ge(qt.toolCall.approval,Ft,Nt);return}},[r,Ge]),At=x.useCallback(async(st,Ft)=>{if(o){H(Nt=>({...Nt,[st]:!0}));try{await o(st,Ft)}catch(Nt){console.error("[ChatWorkspace] Failed to respond to question",Nt),Cn.error("Question response failed",{description:Nt instanceof Error?Nt.message:String(Nt)})}finally{H(Nt=>{const qt={...Nt};return delete qt[st],qt})}}},[o]);return h.jsx("div",{className:"flex h-full min-h-0 w-full flex-col overflow-hidden lg:sticky lg:top-4 lg:min-h-[560px]",children:h.jsxs("div",{className:"relative flex h-full flex-col",children:[h.jsx(Jxe,{currentStep:m,sessionDescription:u,currentSession:p,selectedSessionId:a,isFilesPanelOpen:se,blocksExpanded:W,onToggleBlocks:()=>le(st=>!st),onToggleFilesPanel:we?Oe:void 0,onOpenSearch:()=>K(!0),onOpenSidebar:I,onRenameSession:P}),h.jsxs("div",{className:"relative flex min-h-0 flex-1 overflow-hidden",children:[h.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[h.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:h.jsx(Fve,{messages:r,status:t,selectedSessionId:a,currentSession:p,isReplayingHistory:b,pendingApprovalMap:Z,onApprovalAction:s?Ge:void 0,canRespondToApproval:!!s,blocksExpanded:W,onCreateSession:_,isSearchOpen:$,onSearchOpenChange:K,onForkSession:U})}),h.jsx(O4e,{messages:r,onApprovalResponse:it,pendingApprovalMap:Z,canRespondToApproval:!!s}),p&&h.jsx("div",{className:"mt-auto flex-shrink-0",children:G?h.jsx(L4e,{messages:r,onQuestionResponse:At,pendingQuestionMap:j}):h.jsx("div",{className:"px-0 pb-0 pt-0 sm:px-3 sm:pb-3",children:h.jsx(I4e,{status:t,onSubmit:n,canSendMessage:at,currentSession:p,isUploading:Ee,isStreaming:Ce,isAwaitingIdle:Re,isReplayingHistory:b,onCancel:k,onListSessionDirectory:y,gitDiffStats:L,isGitDiffLoading:ae,slashCommands:R,planMode:z,onPlanModeChange:F,activityStatus:Se,usagePercent:Ne,usedTokens:fe,maxTokens:be,tokenUsage:d})})})]}),we&&se?h.jsxs(h.Fragment,{children:[h.jsx("button",{type:"button","aria-label":"Close workspace files panel",className:"absolute inset-0 z-10 bg-background/40 backdrop-blur-[1px] lg:hidden",onClick:ze}),h.jsx("div",{className:"absolute inset-y-0 right-0 z-20 flex h-full min-h-0 w-[min(24rem,92vw)] lg:static lg:z-auto lg:w-[320px] lg:shrink-0 xl:w-[360px]",children:h.jsx(B4e,{className:"w-full border-l shadow-2xl lg:shadow-none",sessionId:a??"",workDir:p?.workDir,onClose:ze,onListSessionDirectory:y,onGetSessionFileUrl:w},`files:${a??"none"}`)})]}):null]})]})})});function q4e({selectedSessionId:e,currentSession:t,sessionDescription:n,onSessionStatus:r,onStreamStatusChange:a,uploadSessionFile:s,onListSessionDirectory:o,onGetSessionFileUrl:u,onGetSessionFile:c,onOpenCreateDialog:d,onOpenSidebar:m,generateTitle:p,onRenameSession:b,onForkSession:y}){const[w,S]=x.useState(!1),[k,E]=x.useState(null),A=e||null,{config:_}=Oj(),I=x.useMemo(()=>_?_.models.find(Oe=>Oe.name===_.defaultModel)?.maxContextSize:void 0,[_]),P=x.useCallback(we=>{Cn.error("Connection Error",{description:we.message})},[]),O=x.useCallback(async()=>{e&&p&&await p(e)},[e,p]),R=$xe({sessionId:A,baseUrl:Br(),onError:P,onSessionStatus:r,onFirstTurnComplete:O}),{messages:z,status:F,isAwaitingFirstResponse:U,sendMessage:X,respondToApproval:W,respondToQuestion:le,cancel:se,contextUsage:ie,tokenUsage:$,currentStep:K,isConnected:Z,isReplayingHistory:re,planMode:j,sendSetPlanMode:H,slashCommands:G,error:L}=R,ae=vf(we=>we.clearNewFiles),oe=el(we=>we.enqueue),Se=el(we=>we.queue.length),be=el(we=>we.dequeue),fe=el(we=>we.clearQueue);x.useEffect(()=>{F==="streaming"&&ae()},[F,ae]),x.useEffect(()=>{fe()},[e,fe]);const Ne=x.useRef(F);x.useEffect(()=>{const we=Ne.current==="streaming"||Ne.current==="submitted"||Ne.current==="error";if(Ne.current=F,F==="ready"&&we&&Se>0){const Oe=be();Oe&&X(Oe.text)}},[F,Se,be,X]),x.useEffect(()=>{a?.(F)},[F,a]),x.useEffect(()=>{!k||k.targetSessionId!==e||!Z||F!=="ready"&&F!=="streaming"||(E(null),X(k.text))},[Z,F,e,X,k]),x.useEffect(()=>{!k||k.targetSessionId===e||E(null)},[k,e]);const at=x.useCallback(async(we,Oe)=>{if(Oe.length===0)return 0;S(!0);try{const Ge=(await Promise.all(Oe.map(async it=>{if(!it.url)return!1;const st=await(await fetch(it.url)).blob(),Ft=new File([st],it.filename??"unnamed_file",{type:it.mediaType??st.type}),Nt=await s(we,Ft);return console.log("[ChatWorkspaceContainer] File uploaded:",Nt),!0}))).filter(Boolean).length;return Ge>0&&Cn.success("Files uploaded",{description:Ge===1?"1 file uploaded successfully.":`${Ge} files uploaded successfully.`}),Ge}catch(ze){return console.error("[ChatWorkspaceContainer] Failed to upload files:",ze),Cn.error("Failed to Upload Files",{description:ze instanceof Error?ze.message:"File upload failed"}),0}finally{S(!1)}},[s]),Ce=x.useCallback(async we=>{if(!(we.text.trim().length>0||we.files.length>0)){Cn.info("Empty Message",{description:"Please enter a message or attach a file."});return}if(w){Cn.info("Still uploading",{description:"Please wait until file uploads finish."});return}if(F==="streaming"||F==="submitted"){if(we.files.length>0){Cn.info("Still processing",{description:"File attachments cannot be queued. Please wait."});return}const it=we.text.trim();it&&(oe(it),Cn.info("Message queued",{description:"It will be sent when the current response finishes."}));return}if(!e)return;const ze=e;we.files.length>0&&ze&&await at(ze,we.files);const Ge=we.text.trim()||(we.files.length>0?"PYTHINKER_FILE_UPLOAD_WITHOUT_MESSAGE":"");await X(Ge)},[F,w,e,at,X,oe]),Re=x.useCallback(we=>{H(we)},[H]),Ee=x.useCallback(async we=>{if(e&&y)try{await y(e,we),Cn.success("Session forked successfully")}catch(Oe){Cn.error("Fork failed",{description:Oe instanceof Error?Oe.message:"Failed to fork session"})}},[e,y]);return x.useEffect(()=>{const we=Oe=>{Oe.defaultPrevented||Oe.key.toLowerCase()!=="o"||!((Tu()?Oe.metaKey:Oe.ctrlKey)&&Oe.shiftKey)||(Oe.preventDefault(),d?.())};return window.addEventListener("keydown",we),()=>{window.removeEventListener("keydown",we)}},[d]),h.jsx($4e,{selectedSessionId:e,messages:z,onSubmit:Ce,status:F,isUploadingFiles:w,onCreateSession:d,onCancel:se,onApprovalResponse:W,onQuestionResponse:le,sessionDescription:n,contextUsage:ie,maxContextSize:I,tokenUsage:$,currentStep:K,currentSession:t,isReplayingHistory:re,isAwaitingFirstResponse:U,onListSessionDirectory:o,onGetSessionFileUrl:u,onGetSessionFile:c,onOpenSidebar:m,onRenameSession:b,slashCommands:G,planMode:j,onPlanModeChange:Re,errorMessage:L?.message,onForkSession:y?Ee:void 0})}const tl={appTitle:"Pythinker Web UI",homepageUrl:"https://www.pythinker.com/code",logoAlt:"Pythinker",logoSrc:"/brand/icon-192.png",productName:"Pythinker"};function V4e({className:e,size:t="md",showVersion:n=!0}){const r=t==="sm"?"text-base":"text-lg",a=t==="sm"?"text-xs":"text-sm",s=t==="sm"?"size-6":"size-7",o=t==="sm"?24:28;return h.jsxs("div",{className:me("flex items-center gap-2",e),children:[h.jsxs("a",{href:tl.homepageUrl,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[h.jsx("img",{src:tl.logoSrc,alt:tl.logoAlt,width:o,height:o,className:s}),h.jsx("span",{className:me(r,"font-semibold text-foreground"),children:tl.productName})]}),n&&h.jsxs("span",{className:me("text-muted-foreground font-medium",a),children:["v",Lj]})]})}const G4e=du("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Nz=x.createContext({size:"default",variant:"default",spacing:0});function Y4e({className:e,variant:t,size:n,spacing:r=0,children:a,...s}){return h.jsx(iK,{"data-slot":"toggle-group","data-variant":t,"data-size":n,"data-spacing":r,style:{"--gap":r},className:me("group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs",e),...s,children:h.jsx(Nz.Provider,{value:{variant:t,size:n,spacing:r},children:a})})}function b9({className:e,children:t,variant:n,size:r,...a}){const s=x.useContext(Nz);return h.jsx(oK,{"data-slot":"toggle-group-item","data-variant":s.variant||n,"data-size":s.size||r,"data-spacing":s.spacing,className:me(G4e({variant:s.variant||n,size:s.size||r}),"w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10","data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l",e),...a,children:t})}const W4e=/\r\n|\r|\n/,X4e=/\s+/g,x9="pythinker-sessions-view-mode";function K4e(e,t=30){if(e.length<=t)return e;const n=e.split("/").filter(Boolean);return n.length<=2?e:".../"+n.slice(-2).join("/")}function Q4e(e,t){const{className:n,...r}=e;return h.jsx("div",{ref:t,className:me("flex-1 overflow-y-auto overflow-x-hidden [-webkit-overflow-scrolling:touch] pb-4 pr-1",n),...r})}function Z4e(e,t){const{className:n,...r}=e;return h.jsx("div",{ref:t,className:me("flex flex-col space-y-0.5 w-full px-2 mt-1",n),...r})}const _z=x.forwardRef(Q4e),Rz=x.forwardRef(Z4e);_z.displayName="SessionsScroller";Rz.displayName="SessionsList";const y9=x.memo(function({sessions:t,archivedSessions:n=[],selectedSessionId:r,onSelectSession:a,onDeleteSession:s,onRenameSession:o,onArchiveSession:u,onUnarchiveSession:c,onBulkArchiveSessions:d,onBulkUnarchiveSessions:m,onBulkDeleteSessions:p,onRefreshSessions:b,onRefreshArchivedSessions:y,onLoadMoreSessions:w,onLoadMoreArchivedSessions:S,hasMoreSessions:k=!1,hasMoreArchivedSessions:E=!1,isLoadingMore:A=!1,isLoadingMoreArchived:_=!1,isLoadingArchived:I=!1,searchQuery:P,onSearchQueryChange:O,onOpenCreateDialog:R,onCreateSessionInDir:z,onClose:F}){const X=x.useCallback($e=>String($e).split(W4e).join(" ").replace(X4e," ").trim(),[]),[W,le]=x.useState(null),[se,ie]=x.useState({open:!1,sessionId:"",sessionTitle:""}),[$,K]=x.useState(!1),[Z,re]=x.useState(null),[j,H]=x.useState(""),G=x.useRef(!1),[L,ae]=x.useState(P),[oe,Se]=x.useState(()=>localStorage.getItem(x9)==="grouped"?"grouped":"list"),[be,fe]=x.useState(!1),[Ne,at]=x.useState(!1),[Ce,Re]=x.useState(!1),[Ee,we]=x.useState(new Set),[Oe,ze]=x.useState(!1),[Ge,it]=x.useState(!1);x.useEffect(()=>{ae(P)},[P]),x.useEffect(()=>{be&&y&&y()},[be,y]);const At=x.useCallback(()=>{Re(!1),we(new Set)},[]),st=x.useCallback($e=>{we(tt=>{const Tt=new Set(tt);return Tt.has($e)?Tt.delete($e):Tt.add($e),Tt})},[]),Ft=x.useCallback($e=>{we(tt=>tt.size===$e.length&&$e.every(Tt=>tt.has(Tt.id))?new Set:new Set($e.map(Tt=>Tt.id)))},[]),Nt=x.useCallback(async()=>{if(!(!d||Ee.size===0)){it(!0);try{await d(Array.from(Ee)),At()}finally{it(!1)}}},[d,Ee,At]),qt=x.useCallback(async()=>{if(!(!m||Ee.size===0)){it(!0);try{await m(Array.from(Ee)),At()}finally{it(!1)}}},[m,Ee,At]),Ht=x.useCallback(async()=>{if(!(!p||Ee.size===0)){it(!0);try{await p(Array.from(Ee)),At()}finally{it(!1)}}},[p,Ee,At]);x.useEffect(()=>{const $e=window.setTimeout(()=>{O(L.trim())},300);return()=>window.clearTimeout($e)},[L,O]);const Mn=x.useCallback($e=>{Se($e),localStorage.setItem(x9,$e)},[]),ke=Tu()?"Cmd":"Ctrl",Be=x.useMemo(()=>{const $e=L.trim().toLowerCase();return $e?t.filter(tt=>tt.title.toLowerCase().includes($e)||tt.workDir?.toLowerCase().includes($e)):t},[t,L]),xt=x.useMemo(()=>{if(oe!=="grouped")return[];const $e=new Map;for(const tt of Be){const Tt=tt.workDir||"__other__",Mt=$e.get(Tt)||[];$e.set(Tt,[...Mt,tt])}return Array.from($e.entries()).map(([tt,Tt])=>({workDir:tt,displayName:tt==="__other__"?"Other":K4e(tt),sessions:Tt})).sort((tt,Tt)=>{if(tt.workDir==="__other__")return 1;if(Tt.workDir==="__other__")return-1;const Mt=Math.max(...tt.sessions.map(Vt=>Vt.lastUpdated.getTime()));return Math.max(...Tt.sessions.map(Vt=>Vt.lastUpdated.getTime()))-Mt})},[Be,oe]);x.useEffect(()=>{if(!W)return;const $e=()=>{le(null)},tt=Tt=>{Tt.key==="Escape"&&le(null)};return window.addEventListener("click",$e),window.addEventListener("contextmenu",$e),window.addEventListener("keydown",tt),()=>{window.removeEventListener("click",$e),window.removeEventListener("contextmenu",$e),window.removeEventListener("keydown",tt)}},[W]);const Et=($e,tt,Tt=!1)=>{$e.preventDefault(),$e.stopPropagation();const Mt=200,Je=32,Vt=8,nn=window.innerWidth,Zn=window.innerHeight,ca=$e.clientX+Mt+Vt>nn?nn-Mt-Vt:$e.clientX,Ln=$e.clientY+Je+Vt>Zn?Zn-Je-Vt:$e.clientY;le({sessionId:tt,x:Math.max(Vt,ca),y:Math.max(Vt,Ln)}),at(Tt)},Ze=async $e=>{if(!W)return;const tt=W.sessionId,Tt=Ne;if(le(null),$e==="delete"){const Mt=Tt?n.find(Je=>Je.id===tt):t.find(Je=>Je.id===tt);Qe(Mt)}else if($e==="rename"){const Mt=t.find(Je=>Je.id===tt);Mt&&(re(Mt.id),H(X(Mt.title)))}else $e==="archive"&&u?await u(tt):$e==="unarchive"&&c?await c(tt):$e==="select-multiple"&&(Re(!0),ze(Tt),we(new Set([tt])))},Rt=async()=>{if(G.current)return;if(!(Z&&o)){mn();return}const $e=j.trim();if(!$e){mn();return}G.current=!0;try{await o(Z,$e)&&mn()}finally{G.current=!1}},mn=()=>{re(null),H("")},Qe=x.useCallback($e=>{$e&&ie({open:!0,sessionId:$e.id,sessionTitle:X($e.title??"Unknown Session")})},[X]),_t=()=>{se.sessionId&&s(se.sessionId),ie({open:!1,sessionId:"",sessionTitle:""})},vn=()=>{ie({open:!1,sessionId:"",sessionTitle:""})},an=async()=>{if(!b||$)return;K(!0);const $e=Date.now();try{await Promise.resolve(b())}finally{const tt=Date.now()-$e;tt<600&&await new Promise(Tt=>setTimeout(Tt,600-tt)),K(!1)}},lr=async()=>{!w||A||!k||await Promise.resolve(w())},mr=()=>k||A?h.jsx("div",{className:"flex items-center justify-center py-2",children:A?h.jsx(ma,{className:"size-4 animate-spin text-muted-foreground"}):h.jsx("button",{type:"button",className:"text-xs text-muted-foreground hover:text-foreground",onClick:lr,children:"Load more"})}):null,Qr=()=>{if(!W)return null;const $e=d||m||p,tt=h.jsxs("div",{className:"fixed z-120 min-w-40 rounded-md border border-border bg-popover p-1 text-sm shadow-md",onClick:Tt=>Tt.stopPropagation(),onKeyDown:Tt=>{Tt.key==="Escape"&&Tt.stopPropagation()},role:"menu",style:{top:W.y,left:W.x},children:[o&&!Ne&&h.jsxs("button",{className:"flex w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs hover:bg-accent",onClick:()=>Ze("rename"),type:"button",children:[h.jsx(vA,{className:"size-3.5"}),"Rename"]}),u&&!Ne&&h.jsxs("button",{className:"flex w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs hover:bg-accent",onClick:()=>Ze("archive"),type:"button",children:[h.jsx(vm,{className:"size-3.5"}),"Archive"]}),c&&Ne&&h.jsxs("button",{className:"flex w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs hover:bg-accent",onClick:()=>Ze("unarchive"),type:"button",children:[h.jsx(Db,{className:"size-3.5"}),"Unarchive"]}),$e&&h.jsxs("button",{className:"flex w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs hover:bg-accent",onClick:()=>Ze("select-multiple"),type:"button",children:[h.jsx(wm,{className:"size-3.5"}),"Select Multiple"]}),h.jsxs("button",{className:"flex w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs text-destructive hover:bg-destructive/10",onClick:()=>Ze("delete"),type:"button",children:[h.jsx(fc,{className:"size-3.5"}),"Delete session"]})]});return typeof document>"u"?tt:Pc.createPortal(tt,document.body)};return h.jsxs(h.Fragment,{children:[h.jsx("aside",{className:"flex h-full min-h-0 flex-col",children:h.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2 overflow-hidden",children:[h.jsxs("div",{className:"flex items-center justify-between px-3 pt-2",children:[h.jsx(V4e,{size:"sm",showVersion:!0}),F&&h.jsx("button",{type:"button","aria-label":"Close sidebar",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-secondary/50 hover:text-foreground",onClick:F,children:h.jsx(bA,{className:"size-4"})})]}),h.jsxs("div",{className:"flex items-center justify-between px-3 pt-3",children:[h.jsx("h4",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Sessions"}),h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("button",{"aria-label":"Refresh sessions",className:"cursor-pointer rounded-md p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-60",onClick:an,disabled:$||!b,"aria-busy":$,title:"Refresh Sessions",type:"button",children:h.jsx(p1,{className:`size-4 ${$?"animate-spin":""}`})}),h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx("button",{"aria-label":"New Session",className:"cursor-pointer rounded-md p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",onClick:$e=>{if(s1($e)){const tt=new URL(window.location.origin+window.location.pathname);tt.searchParams.set("action","create"),window.open(tt.toString(),"_blank")}else R?.()},type:"button",children:h.jsx(py,{className:"size-4"})})}),h.jsxs(xn,{className:"flex flex-col items-center gap-1",side:"bottom",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{children:"New session"}),h.jsxs(O6,{children:[h.jsx(Ir,{children:"Shift"}),h.jsx("span",{className:"text-muted-foreground",children:"+"}),h.jsx(Ir,{children:ke}),h.jsx("span",{className:"text-muted-foreground",children:"+"}),h.jsx(Ir,{children:"O"})]})]}),h.jsx("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:h.jsxs("span",{children:[ke,"+Click to open in new tab"]})})]})]})]})]}),Ce&&h.jsxs("div",{className:"mx-2 flex items-center justify-between gap-2 rounded-md bg-secondary/80 px-2 py-1.5",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx("button",{type:"button",className:"text-muted-foreground hover:text-foreground transition-colors disabled:opacity-50",onClick:()=>Ft(Oe?n:Be),disabled:Ge,"aria-label":Ee.size===(Oe?n:Be).length?"Deselect all":"Select all",children:Ee.size===(Oe?n:Be).length&&Ee.size>0?h.jsx(wm,{className:"size-4"}):h.jsx(Rd,{className:"size-4"})}),h.jsxs("span",{className:"text-xs text-muted-foreground",children:[Ee.size," selected"]})]}),h.jsxs("div",{className:"flex items-center",children:[Oe?m&&h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx("button",{type:"button",className:"inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-background hover:text-foreground transition-colors disabled:opacity-50",onClick:qt,disabled:Ge||Ee.size===0,children:Ge?h.jsx(ma,{className:"size-4 animate-spin"}):h.jsx(Db,{className:"size-4"})})}),h.jsx(xn,{side:"bottom",children:"Unarchive"})]}):d&&h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx("button",{type:"button",className:"inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-background hover:text-foreground transition-colors disabled:opacity-50",onClick:Nt,disabled:Ge||Ee.size===0,children:Ge?h.jsx(ma,{className:"size-4 animate-spin"}):h.jsx(vm,{className:"size-4"})})}),h.jsx(xn,{side:"bottom",children:"Archive"})]}),p&&h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx("button",{type:"button",className:"inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors disabled:opacity-50",onClick:Ht,disabled:Ge||Ee.size===0,children:Ge?h.jsx(ma,{className:"size-4 animate-spin"}):h.jsx(fc,{className:"size-4"})})}),h.jsx(xn,{side:"bottom",children:"Delete"})]}),h.jsx("div",{className:"mx-1 h-4 w-px bg-border"}),h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx("button",{type:"button",className:"inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-background hover:text-foreground transition-colors",onClick:At,disabled:Ge,children:h.jsx(rs,{className:"size-4"})})}),h.jsx(xn,{side:"bottom",children:"Done"})]})]})]}),!Ce&&h.jsxs("div",{className:"px-2 flex items-center gap-2",children:[h.jsxs("div",{className:"relative flex-1 min-w-0",children:[h.jsx(Nf,{className:"absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground"}),h.jsx("input",{type:"text",placeholder:"Search sessions...",value:L,onChange:$e=>ae($e.target.value),className:"h-8 w-full rounded-md border border-input bg-background pl-8 pr-8 text-xs placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"}),L&&h.jsx("button",{type:"button",onClick:()=>ae(""),className:"absolute right-2 top-1/2 -translate-y-1/2 cursor-pointer rounded-sm p-0.5 text-muted-foreground hover:text-foreground","aria-label":"Clear search",children:h.jsx(rs,{className:"size-3.5"})})]}),h.jsxs(Y4e,{type:"single",variant:"outline",value:oe,onValueChange:$e=>$e&&Mn($e),className:"shrink-0",children:[h.jsx(b9,{value:"list","aria-label":"List view",title:"List view",className:"h-8 w-8 px-0",children:h.jsx(L$,{className:"size-3.5"})}),h.jsx(b9,{value:"grouped","aria-label":"Grouped view",title:"Grouped by folder",className:"h-8 w-8 px-0",children:h.jsx(g$,{className:"size-3.5"})})]})]}),h.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[h.jsx("div",{className:"flex-1 min-h-0",children:oe==="grouped"?h.jsx("div",{className:"flex h-full flex-col",children:h.jsxs("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [-webkit-overflow-scrolling:touch] px-3 pb-4 pr-1",children:[h.jsx("ul",{className:"space-y-1",children:xt.map($e=>h.jsx("li",{className:"group/dir",children:h.jsxs(rl,{defaultOpen:$e.sessions.some(tt=>tt.id===r),children:[h.jsxs("div",{className:"flex items-center",children:[h.jsxs(eu,{className:"flex flex-1 min-w-0 items-center gap-2 px-2 py-1.5 text-xs text-muted-foreground hover:text-foreground rounded-md hover:bg-secondary/50 group",children:[h.jsx(ro,{className:"size-3 transition-transform group-data-[state=closed]:-rotate-90"}),h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx("span",{className:"flex-1 truncate text-left font-medium",children:$e.displayName})}),$e.workDir!=="__other__"&&h.jsx(xn,{side:"right",children:$e.workDir})]}),h.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["(",$e.sessions.length,")"]})]}),$e.workDir!=="__other__"&&z&&h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx("button",{type:"button","aria-label":`New session in ${$e.displayName}`,className:"shrink-0 cursor-pointer rounded-md p-1 text-muted-foreground opacity-0 group-hover/dir:opacity-100 hover:bg-accent hover:text-foreground transition-all",onClick:tt=>{if(tt.stopPropagation(),s1(tt)){const Tt=new URL(window.location.origin+window.location.pathname);Tt.searchParams.set("action","create-in-dir"),Tt.searchParams.set("workDir",$e.workDir),window.open(Tt.toString(),"_blank")}else z($e.workDir)},children:h.jsx(py,{className:"size-3.5"})})}),h.jsxs(xn,{className:"flex flex-col items-center gap-1",side:"right",children:[h.jsx("span",{children:"New session here"}),h.jsxs("span",{className:"text-xs text-muted-foreground",children:[ke,"+Click to open in new tab"]})]})]})]}),h.jsx(tu,{children:h.jsx("ul",{className:"pl-3 space-y-1 mt-1",children:$e.sessions.map(tt=>{const Tt=tt.id===r,Mt=Z===tt.id;return h.jsx("li",{children:h.jsxs("div",{className:"flex w-full items-center gap-2",children:[h.jsxs("button",{className:`flex-1 min-w-0 cursor-pointer text-left rounded-lg px-3 py-2 transition-colors ${Tt?"bg-secondary":"hover:bg-secondary/60"}`,onClick:()=>!Mt&&a(tt.id),onContextMenu:Je=>!Mt&&Et(Je,tt.id),type:"button",children:[Mt?h.jsx("input",{autoFocus:!0,value:j,onChange:Je=>H(Je.target.value),onBlur:Rt,onKeyDown:Je=>{Je.key==="Enter"&&(Je.preventDefault(),Rt()),Je.key==="Escape"&&(Je.preventDefault(),mn())},onClick:Je=>Je.stopPropagation(),className:"w-full text-sm font-medium text-foreground bg-background border border-input rounded px-2 py-1 focus:outline-none focus:ring-1 focus:ring-ring"}):h.jsxs(gn,{delayDuration:500,children:[h.jsx(bn,{asChild:!0,children:h.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:X(tt.title)})}),h.jsx(xn,{side:"right",className:"max-w-md",children:X(tt.title)})]}),!Mt&&h.jsx("span",{className:"text-[10px] text-muted-foreground mt-1 block",children:tt.updatedAt})]}),h.jsx("button",{type:"button","aria-label":"Delete session",className:"md:hidden inline-flex h-8 w-8 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive",onClick:Je=>{Je.stopPropagation(),Qe(tt)},children:h.jsx(fc,{className:"size-3.5"})})]})},tt.id)})})})]})},$e.workDir))}),mr()]})}):h.jsx(xz,{data:Be,className:"h-full",computeItemKey:($e,tt)=>tt.id,components:{Scroller:_z,List:Rz,Footer:mr},endReached:()=>{k&&lr()},itemContent:($e,tt)=>{const Tt=tt.id===r,Mt=Z===tt.id,Je=Ce&&!Oe&&Ee.has(tt.id),Vt=Ce&&!Oe;return h.jsxs("div",{className:`flex w-full items-center gap-2 transition-colors rounded-lg ${Je?"bg-primary/10 ring-1 ring-primary/30":Tt?"bg-secondary":"hover:bg-secondary/60"}`,children:[Vt&&h.jsx("button",{type:"button",className:"ml-2 shrink-0 cursor-pointer",onClick:()=>st(tt.id),children:Je?h.jsx(wm,{className:"size-4 text-primary"}):h.jsx(Rd,{className:"size-4 text-muted-foreground"})}),h.jsx("button",{className:`flex-1 min-w-0 cursor-pointer text-left rounded-md px-2.5 py-1.5 transition-colors ${Vt?"":Tt?"bg-secondary":"hover:bg-secondary/60"}`,onClick:()=>{Vt?st(tt.id):Mt||a(tt.id)},onContextMenu:nn=>!(Mt||Vt)&&Et(nn,tt.id),type:"button",children:Mt?h.jsx("input",{autoFocus:!0,value:j,onChange:nn=>H(nn.target.value),onBlur:Rt,onKeyDown:nn=>{nn.key==="Enter"&&(nn.preventDefault(),Rt()),nn.key==="Escape"&&(nn.preventDefault(),mn())},onClick:nn=>nn.stopPropagation(),className:"w-full text-sm font-medium text-foreground bg-background border border-input rounded px-2 py-1 focus:outline-none focus:ring-1 focus:ring-ring"}):h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs(gn,{delayDuration:500,children:[h.jsx(bn,{asChild:!0,children:h.jsx("p",{className:"text-sm font-medium text-foreground truncate flex-1",children:X(tt.title)})}),h.jsx(xn,{side:"right",className:"max-w-md",children:X(tt.title)})]}),h.jsx("span",{className:"text-[10px] text-muted-foreground shrink-0",children:tt.updatedAt})]})}),!Vt&&u&&h.jsx("button",{type:"button","aria-label":"Archive session",className:"md:hidden inline-flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent",onClick:nn=>{nn.stopPropagation(),u(tt.id)},children:h.jsx(vm,{className:"size-3.5"})}),!Vt&&h.jsx("button",{type:"button","aria-label":"Delete session",className:"md:hidden inline-flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive",onClick:nn=>{nn.stopPropagation(),Qe(tt)},children:h.jsx(fc,{className:"size-3.5"})})]})}})}),(u||c)&&h.jsx("div",{className:"mx-2 mb-2 shrink-0 rounded-lg border border-border bg-muted/30",children:h.jsxs(rl,{open:be,onOpenChange:fe,children:[h.jsxs(eu,{className:"flex w-full items-center gap-2 px-3 py-2 text-xs text-muted-foreground hover:text-foreground rounded-lg hover:bg-muted/50 group",children:[h.jsx(ro,{className:"size-3 transition-transform group-data-[state=closed]:-rotate-90"}),h.jsx(vm,{className:"size-3.5"}),h.jsx("span",{className:"flex-1 text-left font-medium",children:"Archived"}),h.jsxs("span",{className:"text-[10px] text-muted-foreground/70 bg-muted px-1.5 py-0.5 rounded",children:[n.length,E?"+":""]})]}),h.jsx(tu,{children:I?h.jsx("div",{className:"flex items-center justify-center py-4",children:h.jsx(ma,{className:"size-4 animate-spin text-muted-foreground"})}):n.length===0?h.jsx("p",{className:"px-3 py-3 text-xs text-muted-foreground",children:"No archived sessions"}):h.jsxs("div",{className:"space-y-1 px-1 pb-2 max-h-[50vh] overflow-y-auto",children:[h.jsx("ul",{className:"space-y-1",children:n.map($e=>{const tt=$e.id===r,Tt=Ce&&Oe&&Ee.has($e.id),Mt=Ce&&Oe;return h.jsx("li",{children:h.jsxs("div",{className:`flex w-full items-center gap-2 rounded-lg transition-colors ${Tt?"bg-primary/10 ring-1 ring-primary/30":""}`,children:[Mt&&h.jsx("button",{type:"button",className:"ml-2 shrink-0 cursor-pointer",onClick:()=>st($e.id),children:Tt?h.jsx(wm,{className:"size-4 text-primary"}):h.jsx(Rd,{className:"size-4 text-muted-foreground"})}),h.jsx("button",{className:`flex-1 min-w-0 cursor-pointer text-left rounded-md px-2.5 py-1.5 transition-colors ${Mt?"":tt?"bg-secondary":"hover:bg-secondary/60"}`,onClick:()=>{Mt?st($e.id):a($e.id)},onContextMenu:Je=>!Mt&&Et(Je,$e.id,!0),type:"button",children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs(gn,{delayDuration:500,children:[h.jsx(bn,{asChild:!0,children:h.jsx("p",{className:"text-sm font-medium text-foreground truncate flex-1 opacity-70",children:X($e.title)})}),h.jsx(xn,{side:"right",className:"max-w-md",children:X($e.title)})]}),h.jsx("span",{className:"text-[10px] text-muted-foreground shrink-0",children:$e.updatedAt})]})}),!Mt&&c&&h.jsx("button",{type:"button","aria-label":"Unarchive session",className:"md:hidden inline-flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent",onClick:Je=>{Je.stopPropagation(),c($e.id)},children:h.jsx(Db,{className:"size-3.5"})}),!Mt&&h.jsx("button",{type:"button","aria-label":"Delete session",className:"md:hidden inline-flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive",onClick:Je=>{Je.stopPropagation(),Qe($e)},children:h.jsx(fc,{className:"size-3.5"})})]})},$e.id)})}),(E||_)&&h.jsx("div",{className:"flex items-center justify-center py-2",children:_?h.jsx(ma,{className:"size-4 animate-spin text-muted-foreground"}):h.jsx("button",{type:"button",className:"text-xs text-muted-foreground hover:text-foreground",onClick:()=>S?.(),children:"Load more"})})]})})]})})]})]})}),Qr(),h.jsx(e0,{open:se.open,onOpenChange:$e=>!$e&&vn(),children:h.jsxs(t0,{className:"sm:max-w-md",children:[h.jsxs(Pf,{children:[h.jsxs(n0,{className:"flex items-center gap-2 text-destructive",children:[h.jsx(r4,{className:"size-5"}),"Delete Session"]}),h.jsxs(VR,{children:["Are you sure you want to delete ",h.jsx("strong",{className:"text-foreground",children:se.sessionTitle}),"? This action cannot be undone."]})]}),h.jsxs(kQ,{className:"gap-2 w-full justify-end",children:[h.jsx(Bt,{variant:"outline",onClick:vn,children:"Cancel"}),h.jsx(Bt,{variant:"destructive",onClick:_t,children:"Delete"})]})]})})]})}),J4e=/^(\/Users\/[^/]+|\/home\/[^/]+)/,e3e=/\/$/;function v9(e,t=3){const n=e.match(J4e);let r=e;n&&(r=`~${e.slice(n[1].length)}`);const a=r.split("/").filter(Boolean);if(a.length<=t)return r.startsWith("~")?r:`/${a.join("/")}`;const s=r.startsWith("~")?"~":"",o=a.slice(-2).join("/");return`${s}/.../${o}`}let Td=null;function t3e({open:e,onOpenChange:t,onConfirm:n,fetchWorkDirs:r,fetchStartupDir:a}){const[s,o]=x.useState(()=>Td??[]),[u,c]=x.useState(""),[d,m]=x.useState(!1),[p,b]=x.useState(!1),[y,w]=x.useState(!1),[S,k]=x.useState(""),[E,A]=x.useState(""),[_,I]=x.useState(""),P=x.useRef(!1),O=x.useRef(null);x.useEffect(()=>{e&&(Td?o(Td):m(!0),a().then($=>{$&&(A($),I($))}).catch(()=>{}),r().then($=>{Td=$,o($)}).catch($=>{console.error("Failed to fetch directories:",$)}).finally(()=>{m(!1)}))},[e,r,a]),x.useEffect(()=>{e||(c(""),I(""),o(Td??[]),b(!1),w(!1),k(""),A(""),P.current=!1)},[e]);const R=x.useCallback(async $=>{if(!P.current){P.current=!0,b(!0);try{await n($),t(!1)}catch(K){K instanceof Error&&"isDirectoryNotFound"in K&&K.isDirectoryNotFound&&(k($),w(!0))}finally{b(!1),P.current=!1}}},[n,t]),z=x.useCallback(()=>{const $=u.trim();!$||P.current||R($)},[u,R]),F=x.useCallback(async()=>{if(S){w(!1),b(!0),P.current=!0;try{await n(S,!0),t(!1)}catch($){console.error("Failed to create directory:",$)}finally{b(!1),P.current=!1,k("")}}},[S,n,t]),U=x.useCallback(()=>{w(!1),k("")},[]),X=x.useCallback($=>{if($.key!=="Tab"||!O.current)return;const K=O.current.querySelector("[cmdk-item][data-selected=true]");if(!K)return;const Z=K.getAttribute("data-value");!Z||Z.startsWith("__custom__")||($.preventDefault(),c(Z))},[]),W=u.trim(),le=W!==""&&s.some($=>$===W||$===W.replace(e3e,"")),se=W!==""&&!le,ie=x.useMemo(()=>E?s.filter($=>$!==E):s,[s,E]);return h.jsxs(h.Fragment,{children:[h.jsx(ufe,{open:e,onOpenChange:t,title:"Create New Session",description:"Search directories or type a new path",showCloseButton:!1,children:h.jsxs(V3,{value:_,onValueChange:I,children:[h.jsx(iL,{placeholder:"Search directories or type a path...",value:u,onValueChange:c,onKeyDown:X}),h.jsxs(oL,{ref:O,children:[h.jsx(lL,{children:W?"No matching directories.":d?"Loading directories...":"Type a path to start a new session."}),se&&h.jsxs(h.Fragment,{children:[h.jsx(dp,{heading:"Custom Path",children:h.jsxs(fp,{className:"group",value:`__custom__${W}`,onSelect:z,disabled:p,children:[p?h.jsx(ma,{className:"animate-spin"}):h.jsx(Zd,{}),h.jsx("span",{className:"flex-1 truncate",children:W}),h.jsx("kbd",{className:"pointer-events-none ml-auto hidden select-none rounded border bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground group-data-[selected=true]:inline-flex",children:"↵"})]})}),(E||ie.length>0||d)&&h.jsx(Q7,{})]}),E&&h.jsxs(h.Fragment,{children:[h.jsx(dp,{heading:"Current Directory",children:h.jsxs(fp,{className:"group",value:E,onSelect:()=>R(E),disabled:p,children:[h.jsx(T$,{}),h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx("span",{className:"truncate",children:v9(E,3)})}),h.jsx(xn,{side:"right",children:E})]}),h.jsx("kbd",{className:"pointer-events-none ml-auto hidden select-none rounded border bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground group-data-[selected=true]:inline-flex",children:"↵"})]})}),(ie.length>0||d)&&h.jsx(Q7,{})]}),ie.length>0&&h.jsx(dp,{heading:"Recent Directories",children:ie.map($=>h.jsxs(fp,{className:"group",value:$,onSelect:()=>R($),disabled:p,children:[h.jsx(Zd,{}),h.jsxs(gn,{children:[h.jsx(bn,{asChild:!0,children:h.jsx("span",{className:"truncate",children:v9($,3)})}),h.jsx(xn,{side:"right",children:$})]}),h.jsx("kbd",{className:"pointer-events-none ml-auto hidden select-none rounded border bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground group-data-[selected=true]:inline-flex",children:"↵"})]},$))}),d&&h.jsx("div",{className:"flex items-center justify-center py-4",children:h.jsx(ma,{className:"size-4 animate-spin text-muted-foreground"})})]})]})}),h.jsx(jR,{open:y,onOpenChange:w,children:h.jsxs(zR,{children:[h.jsxs(BR,{children:[h.jsx(HR,{children:"Directory Not Found"}),h.jsxs(UR,{children:["The directory"," ",h.jsx("code",{className:"bg-muted px-1 py-0.5 rounded text-foreground break-all",children:S})," ","does not exist. Would you like to create it?"]})]}),h.jsxs(FR,{children:[h.jsx(qR,{onClick:U,children:"Cancel"}),h.jsx($R,{onClick:F,children:"Create Directory"})]})]})})]})}const n3e=({...e})=>h.jsx(nbe,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-card group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",error:"group-[.toaster]:bg-destructive group-[.toaster]:text-destructive-foreground group-[.toaster]:border-destructive/50",success:"group-[.toaster]:bg-success group-[.toaster]:text-success-foreground group-[.toaster]:border-success/50",warning:"group-[.toaster]:bg-warning group-[.toaster]:text-warning-foreground group-[.toaster]:border-warning/50",info:"group-[.toaster]:bg-info group-[.toaster]:text-info-foreground group-[.toaster]:border-info/50"}},...e}),r3e=/^\.\/+/,a3e=/^\/+/,s3e=/\s+$/,w9=e=>{if(!e)return".";const t=e.trim();if(t===""||t==="/"||t===".")return".";const n=t.replace(r3e,"").replace(a3e,"").replace(s3e,"");return n===""?".":n},Vo=100,i3e=3e4;class o3e extends Error{isDirectoryNotFound=!0;constructor(t){super(t),this.name="DirectoryNotFoundError"}}function l3e(){const[e,t]=x.useState([]),[n,r]=x.useState([]),[a,s]=x.useState(""),[o,u]=x.useState(!1),[c,d]=x.useState(!1),[m,p]=x.useState(!1),[b,y]=x.useState(!1),[w,S]=x.useState(null),[k,E]=x.useState(!0),[A,_]=x.useState(!0),[I,P]=x.useState(""),O=x.useRef(0),R=x.useCallback(async()=>{u(!0),S(null);try{const Ce=await Wi.sessions.listSessionsApiSessionsGet({limit:Vo,offset:0,q:I.trim()||void 0});t(Ce),E(Ce.length===Vo),O.current=Date.now()}catch(Ce){const Re=Ce instanceof Error?Ce.message:"Failed to load sessions";S(Re),console.error("Failed to refresh sessions:",Ce)}finally{u(!1)}},[I]),z=x.useCallback(async()=>{if(!(c||o||!k)){d(!0),S(null);try{const Ce=e.length,Re=await Wi.sessions.listSessionsApiSessionsGet({limit:Vo,offset:Ce,q:I.trim()||void 0});t(Ee=>[...Ee,...Re]),E(Re.length===Vo),O.current=Date.now()}catch(Ce){const Re=Ce instanceof Error?Ce.message:"Failed to load more sessions";S(Re),console.error("Failed to load more sessions:",Ce)}finally{d(!1)}}},[k,o,c,I,e.length]),F=x.useCallback(Ce=>{t(Re=>Re.map(Ee=>Ee.sessionId===Ce.sessionId?{...Ee,status:Ce}:Ee))},[]),U=x.useCallback(async()=>{p(!0);try{const Ce=Br(),Re=await fetch(`${Ce}/api/sessions/?archived=true&limit=${Vo}`,{headers:na()});if(!Re.ok)throw new Error("Failed to load archived sessions");const we=(await Re.json()).map(Oe=>({sessionId:Oe.session_id,title:Oe.title,lastUpdated:new Date(Oe.last_updated),isRunning:Oe.is_running,status:Oe.status,workDir:Oe.work_dir,sessionDir:Oe.session_dir,archived:Oe.archived}));r(we),_(we.length===Vo)}catch(Ce){console.error("Failed to refresh archived sessions:",Ce)}finally{p(!1)}},[]),X=x.useCallback(async()=>{if(!(b||m||!A)){y(!0);try{const Ce=Br(),Re=n.length,Ee=await fetch(`${Ce}/api/sessions/?archived=true&limit=${Vo}&offset=${Re}`,{headers:na()});if(!Ee.ok)throw new Error("Failed to load more archived sessions");const Oe=(await Ee.json()).map(ze=>({sessionId:ze.session_id,title:ze.title,lastUpdated:new Date(ze.last_updated),isRunning:ze.is_running,status:ze.status,workDir:ze.work_dir,sessionDir:ze.session_dir,archived:ze.archived}));r(ze=>[...ze,...Oe]),_(Oe.length===Vo)}catch(Ce){console.error("Failed to load more archived sessions:",Ce)}finally{y(!1)}}},[n.length,A,m,b]);x.useEffect(()=>{R()},[R]),x.useEffect(()=>{U()},[U]),x.useEffect(()=>{const Ce=()=>{document.visibilityState!=="visible"||Date.now()-O.current<6e4||R()};return document.addEventListener("visibilitychange",Ce),()=>document.removeEventListener("visibilitychange",Ce)},[R]),x.useEffect(()=>{if(I.trim())return;const Ce=window.setInterval(()=>{document.visibilityState==="visible"&&(o||c||R())},i3e);return()=>window.clearInterval(Ce)},[o,c,R,I]);const W=x.useCallback(async Ce=>{try{const Re=await Wi.sessions.getSessionApiSessionsSessionIdGet({sessionId:Ce});return!!Re.archived?(r(we=>we.some(ze=>ze.sessionId===Ce)?we.map(ze=>ze.sessionId===Ce?Re:ze):[Re,...we]),t(we=>we.filter(Oe=>Oe.sessionId!==Ce))):(t(we=>we.some(ze=>ze.sessionId===Ce)?we.map(ze=>ze.sessionId===Ce?Re:ze):[Re,...we]),r(we=>we.filter(Oe=>Oe.sessionId!==Ce))),Re}catch(Re){return console.error("Failed to refresh session:",Ce,Re),null}},[]),le=x.useCallback(async(Ce,Re)=>{u(!0),S(null);try{const Ee=Br(),we={};Ce&&(we.work_dir=Ce),Re&&(we.create_dir=Re);const Oe=await fetch(`${Ee}/api/sessions/`,{method:"POST",headers:{"Content-Type":"application/json",...na()},body:Object.keys(we).length>0?JSON.stringify(we):void 0});if(!Oe.ok){const it=await Oe.json();throw Oe.status===404&&typeof it.detail=="string"&&it.detail.includes("Directory does not exist")?new o3e(it.detail):new Error(it.detail||"Failed to create session")}const ze=await Oe.json(),Ge=Ec(ze);return t(it=>[Ge,...it]),s(Ge.sessionId),Ge}catch(Ee){if(Ee instanceof Error&&"isDirectoryNotFound"in Ee&&Ee.isDirectoryNotFound)throw Ee;const we=Ee instanceof Error?Ee.message:"Failed to create session";throw S(we),Ee}finally{u(!1)}},[]),se=x.useCallback(async Ce=>{u(!0),S(null);try{return await Wi.sessions.deleteSessionApiSessionsSessionIdDelete({sessionId:Ce}),t(Re=>{const Ee=Re.filter(we=>we.sessionId!==Ce);return Ce===a&&Ee.length>0?s(Ee[0].sessionId):Ee.length===0&&s(""),Ee}),!0}catch(Re){const Ee=Re instanceof Error?Re.message:"Failed to delete session";return S(Ee),!1}finally{u(!1)}},[a]),ie=x.useCallback(Ce=>{console.log("[useSessions] Selecting session:",Ce),s(Ce),Ce&&(e.some(Re=>Re.sessionId===Ce)||W(Ce))},[W,e]),$=x.useCallback(Ce=>Dv(Ce.lastUpdated),[]),K=x.useCallback(async(Ce,Re)=>{try{return await Wi.sessions.uploadSessionFileApiSessionsSessionIdFilesPost({sessionId:Ce,file:Re})}catch(Ee){const we=Ee instanceof Error?Ee.message:"Failed to upload file";throw S(we),Ee}},[]),Z=x.useCallback(async(Ce,Re)=>{const Ee=await Wi.sessions.getSessionFileApiSessionsSessionIdFilesPathGetRaw({sessionId:Ce,path:w9(Re)});if(!(Ee.raw.headers.get("content-type")??"application/octet-stream").includes("application/json"))throw new Error("Requested path is not a directory");return await Ee.value()},[]),re=x.useCallback(async(Ce,Re)=>{S(null);try{const Ee=await Wi.sessions.getSessionFileApiSessionsSessionIdFilesPathGetRaw({sessionId:Ce,path:w9(Re)});if((Ee.raw.headers.get("content-type")??"application/octet-stream").includes("application/json"))throw new Error("Requested path is a directory, not a file");return await Ee.raw.blob()}catch(Ee){const we=Ee instanceof Error?Ee.message:"Failed to get file";throw S(we),Ee}},[]),j=x.useCallback((Ce,Re)=>{const Ee=Br(),we=o1(),Oe=we?`?token=${encodeURIComponent(we)}`:"";return`${Ee}/api/sessions/${encodeURIComponent(Ce)}/files/${encodeURIComponent(Re)}${Oe}`},[]),H=x.useCallback(async()=>{const Ce=Br(),Re=await fetch(`${Ce}/api/work-dirs/`,{headers:na()});if(!Re.ok)throw new Error("Failed to fetch work directories");return Re.json()},[]),G=x.useCallback(async()=>{const Ce=Br(),Re=await fetch(`${Ce}/api/work-dirs/startup`,{headers:na()});if(!Re.ok)throw new Error("Failed to fetch startup directory");return Re.json()},[]),L=x.useCallback(async(Ce,Re)=>{try{const Ee=Br(),we=await fetch(`${Ee}/api/sessions/${encodeURIComponent(Ce)}`,{method:"PATCH",headers:{"Content-Type":"application/json",...na()},body:JSON.stringify({title:Re})});if(!we.ok){const Oe=await we.json();throw new Error(Oe.detail||"Failed to rename session")}return await W(Ce),!0}catch(Ee){const we=Ee instanceof Error?Ee.message:"Failed to rename session";return console.error("Failed to rename session:",Ee),Cn.error(we),!1}},[W]),ae=x.useCallback(async Ce=>{try{const Re=Br(),Ee=await fetch(`${Re}/api/sessions/${encodeURIComponent(Ce)}/generate-title`,{method:"POST",headers:{"Content-Type":"application/json",...na()},body:JSON.stringify({})});if(!Ee.ok){const Oe=await Ee.json();throw new Error(Oe.detail||"Failed to generate title")}const we=await Ee.json();return await W(Ce),we.title}catch(Re){const Ee=Re instanceof Error?Re.message:"Failed to generate title";return console.error("Failed to generate title:",Re),Cn.error(Ee),null}},[W]),oe=x.useCallback(async Ce=>{try{const Re=Br(),Ee=await fetch(`${Re}/api/sessions/${encodeURIComponent(Ce)}`,{method:"PATCH",headers:{"Content-Type":"application/json",...na()},body:JSON.stringify({archived:!0})});if(!Ee.ok){const we=await Ee.json();throw new Error(we.detail||"Failed to archive session")}return t(we=>{const Oe=we.filter(ze=>ze.sessionId!==Ce);return Ce===a&&(Oe.length>0?s(Oe[0].sessionId):s("")),Oe}),await U(),!0}catch(Re){const Ee=Re instanceof Error?Re.message:"Failed to archive session";return console.error("Failed to archive session:",Re),Cn.error(Ee),!1}},[U,a]),Se=x.useCallback(async Ce=>{try{const Re=Br(),Ee=await fetch(`${Re}/api/sessions/${encodeURIComponent(Ce)}`,{method:"PATCH",headers:{"Content-Type":"application/json",...na()},body:JSON.stringify({archived:!1})});if(!Ee.ok){const we=await Ee.json();throw new Error(we.detail||"Failed to unarchive session")}return r(we=>we.filter(Oe=>Oe.sessionId!==Ce)),await R(),!0}catch(Re){const Ee=Re instanceof Error?Re.message:"Failed to unarchive session";return console.error("Failed to unarchive session:",Re),Cn.error(Ee),!1}},[R]),be=x.useCallback(async Ce=>{const Re=Br();let Ee=0;const we=await Promise.allSettled(Ce.map(async ze=>{if(!(await fetch(`${Re}/api/sessions/${encodeURIComponent(ze)}`,{method:"PATCH",headers:{"Content-Type":"application/json",...na()},body:JSON.stringify({archived:!0})})).ok)throw new Error("Failed to archive");return ze})),Oe=[];for(const ze of we)ze.status==="fulfilled"&&(Ee++,Oe.push(ze.value));return Oe.length>0&&(t(ze=>{const Ge=ze.filter(it=>!Oe.includes(it.sessionId));return Oe.includes(a)&&(Ge.length>0?s(Ge[0].sessionId):s("")),Ge}),await U()),Ee},[U,a]),fe=x.useCallback(async Ce=>{const Re=Br();let Ee=0;const we=await Promise.allSettled(Ce.map(async ze=>{if(!(await fetch(`${Re}/api/sessions/${encodeURIComponent(ze)}`,{method:"PATCH",headers:{"Content-Type":"application/json",...na()},body:JSON.stringify({archived:!1})})).ok)throw new Error("Failed to unarchive");return ze})),Oe=[];for(const ze of we)ze.status==="fulfilled"&&(Ee++,Oe.push(ze.value));return Oe.length>0&&(r(ze=>ze.filter(Ge=>!Oe.includes(Ge.sessionId))),await R()),Ee},[R]),Ne=x.useCallback(async Ce=>{const Re=Br();let Ee=0;const we=await Promise.allSettled(Ce.map(async ze=>{if(!(await fetch(`${Re}/api/sessions/${encodeURIComponent(ze)}`,{method:"DELETE",headers:na()})).ok)throw new Error("Failed to delete");return ze})),Oe=[];for(const ze of we)ze.status==="fulfilled"&&(Ee++,Oe.push(ze.value));return Oe.length>0&&(t(ze=>{const Ge=ze.filter(it=>!Oe.includes(it.sessionId));return Oe.includes(a)&&(Ge.length>0?s(Ge[0].sessionId):s("")),Ge}),r(ze=>ze.filter(Ge=>!Oe.includes(Ge.sessionId)))),Ee},[a]),at=x.useCallback(async(Ce,Re)=>{try{const Ee=Br(),we=await fetch(`${Ee}/api/sessions/${encodeURIComponent(Ce)}/fork`,{method:"POST",headers:{"Content-Type":"application/json",...na()},body:JSON.stringify({turn_index:Re})});if(!we.ok){const Ge=await we.json();throw new Error(Ge.detail||"Failed to fork session")}const Oe=await we.json(),ze=Ec(Oe);return t(Ge=>[ze,...Ge]),s(ze.sessionId),ze}catch(Ee){const we=Ee instanceof Error?Ee.message:"Failed to fork session";throw S(we),Ee}},[]);return{sessions:e,archivedSessions:n,selectedSessionId:a,isLoading:o,isLoadingArchived:m,error:w,refreshSessions:R,refreshArchivedSessions:U,loadMoreSessions:z,loadMoreArchivedSessions:X,hasMoreSessions:k,hasMoreArchivedSessions:A,isLoadingMore:c,isLoadingMoreArchived:b,searchQuery:I,setSearchQuery:P,refreshSession:W,createSession:le,deleteSession:se,selectSession:ie,applySessionStatus:F,getRelativeTime:$,uploadSessionFile:K,listSessionDirectory:Z,getSessionFile:re,getSessionFileUrl:j,fetchWorkDirs:H,fetchStartupDir:G,renameSession:L,generateTitle:ae,archiveSession:oe,unarchiveSession:Se,bulkArchiveSessions:be,bulkUnarchiveSessions:fe,bulkDeleteSessions:Ne,forkSession:at}}const Vv="pythinker-theme",Mz="data-theme-switching",u3e=260;function c3e(){if(typeof window>"u")return{theme:"light",hasUserPreference:!1};const e=window.localStorage.getItem(Vv);return e==="light"||e==="dark"?{theme:e,hasUserPreference:!0}:{theme:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",hasUserPreference:!1}}function d3e(e){return{x:e?.clientX??window.innerWidth/2,y:e?.clientY??window.innerHeight/2}}function f3e(e){const t=Math.max(e.x,window.innerWidth-e.x),n=Math.max(e.y,window.innerHeight-e.y);return Math.hypot(t,n)}function T9(e){e.setAttribute(Mz,"true")}function Dz(e){e.removeAttribute(Mz)}function h3e(e){requestAnimationFrame(()=>{requestAnimationFrame(()=>{Dz(e)})})}function Iz(){const[e,t]=x.useState(()=>c3e()),{theme:n,hasUserPreference:r}=e;x.useEffect(()=>{if(typeof document>"u")return;const u=document.documentElement;u.classList.toggle("dark",n==="dark"),u.style.colorScheme=n,r?window.localStorage.setItem(Vv,n):window.localStorage.removeItem(Vv)},[n,r]),x.useEffect(()=>{if(typeof window>"u")return;const u=window.matchMedia("(prefers-color-scheme: dark)"),c=d=>{t(m=>m.hasUserPreference?m:{theme:d.matches?"dark":"light",hasUserPreference:!1})};return u.addEventListener("change",c),()=>u.removeEventListener("change",c)},[]);const a=x.useCallback(u=>{t({theme:u,hasUserPreference:!0})},[]),s=x.useCallback(()=>{t(u=>({theme:u.theme==="dark"?"light":"dark",hasUserPreference:!0}))},[]),o=x.useCallback(async u=>{if(!(typeof document<"u"&&typeof window<"u"&&typeof document.startViewTransition=="function"&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches)){if(typeof document<"u"){const A=document.documentElement;T9(A),Pc.flushSync(()=>{s()}),h3e(A)}else s();return}const d=document.documentElement;T9(d);const m=d3e(u?{clientX:u.clientX,clientY:u.clientY}:void 0),p=d.classList.contains("dark"),b=f3e(m),y=`circle(0px at ${m.x}px ${m.y}px)`,w=`circle(${b}px at ${m.x}px ${m.y}px)`,S=document.startViewTransition(()=>{Pc.flushSync(()=>{s()})});await S.ready;const k=p?"::view-transition-new(root)":"::view-transition-old(root)",E=p?{clipPath:[y,w]}:{clipPath:[w,y]};d.animate(E,{duration:u3e,easing:"cubic-bezier(0.22, 1, 0.36, 1)",fill:"both",pseudoElement:k}),S.finished.finally(()=>{Dz(d)})},[s]);return{theme:n,setTheme:a,toggleTheme:s,toggleThemeWithTransition:o}}function E9({className:e}){const{theme:t,toggleThemeWithTransition:n}=Iz(),r=t==="dark";return h.jsx(Bt,{"aria-label":r?"Switch to light mode":"Switch to dark mode",className:me("size-9 p-0 text-foreground hover:text-foreground dark:hover:text-foreground hover:bg-accent/20 dark:hover:bg-accent/20","cursor-pointer",e),onClick:a=>{n(a)},size:"icon",variant:"outline",children:r?h.jsx(uq,{className:"size-4"}):h.jsx(q$,{className:"size-4"})})}function m3e(){return new URLSearchParams(window.location.search).get("session")}function S9(e){const t=new URL(window.location.href);e?t.searchParams.set("session",e):t.searchParams.delete("session"),window.history.replaceState({},"",t.toString())}const C9=48,p3e=200,g3e=260,k9=250;function b3e(){Iz();const e=x.useRef(null),t=x.useRef(null),n=l3e(),[r,a]=x.useState(!1),[s,o]=x.useState(()=>typeof window>"u"?!0:window.matchMedia("(min-width: 1024px)").matches),{sessions:u,archivedSessions:c,selectedSessionId:d,createSession:m,deleteSession:p,selectSession:b,uploadSessionFile:y,getSessionFile:w,getSessionFileUrl:S,listSessionDirectory:k,refreshSession:E,refreshSessions:A,refreshArchivedSessions:_,loadMoreSessions:I,loadMoreArchivedSessions:P,hasMoreSessions:O,hasMoreArchivedSessions:R,isLoadingMore:z,isLoadingMoreArchived:F,isLoadingArchived:U,searchQuery:X,setSearchQuery:W,applySessionStatus:le,fetchWorkDirs:se,fetchStartupDir:ie,renameSession:$,generateTitle:K,archiveSession:Z,unarchiveSession:re,bulkArchiveSessions:j,bulkUnarchiveSessions:H,bulkDeleteSessions:G,forkSession:L,error:ae}=n,oe=x.useMemo(()=>u.find(Qe=>Qe.sessionId===d),[u,d]),[Se,be]=x.useState("ready");x.useEffect(()=>{const Qe=Sxe();Qe&&Exe(Qe)},[]);const[fe,Ne]=x.useState(!1);x.useEffect(()=>{const Qe=new URLSearchParams(window.location.search),_t=Qe.get("action");if(_t==="create")Ne(!0);else if(_t==="create-in-dir"){const an=Qe.get("workDir");if(!an)return;m(an).catch(()=>{})}else return;Qe.delete("action"),Qe.delete("workDir");const vn=new URL(window.location.href);vn.search=Qe.toString(),window.history.replaceState({},"",vn.toString())},[m]);const at=x.useCallback(()=>{Ne(!0),a(!1)},[]),Ce=x.useCallback(()=>{a(!0)},[]),Re=x.useCallback(()=>{a(!1)},[]),[Ee,we]=x.useState(!1),[Oe,ze]=x.useState(!1),Ge=x.useCallback(()=>{ze(!0),t.current?.collapse()},[]),it=x.useCallback(()=>{ze(!0),t.current?.expand()},[]),At=x.useCallback(Qe=>{const _t=Qe.inPixels<=C9+1;we(vn=>vn===_t?vn:_t)},[]);x.useEffect(()=>{if(!Oe)return;const Qe=window.setTimeout(()=>{ze(!1)},k9);return()=>window.clearTimeout(Qe)},[Oe]),x.useEffect(()=>{const Qe=t.current;Qe&&we(Qe.isCollapsed())},[]),x.useEffect(()=>{const Qe=e.current;if(Qe){if(Oe){Qe.style.transition=`flex-basis ${k9}ms ease-in-out`;return}Qe.style.transition=""}},[Oe]),x.useEffect(()=>{const Qe=window.matchMedia("(min-width: 1024px)"),_t=()=>{const vn=Qe.matches;o(vn),vn&&a(!1)};return _t(),Qe.addEventListener("change",_t),()=>Qe.removeEventListener("change",_t)},[]);const st=x.useRef(!1);x.useEffect(()=>{if(st.current)return;const Qe=m3e();Qe&&(console.log("[App] Eagerly restoring session from URL:",Qe),b(Qe)),st.current=!0},[b]),x.useEffect(()=>{if(u.length===0||!d||X.trim()||O)return;u.some(_t=>_t.sessionId===d)||(console.log("[App] Session from URL not found, clearing selection"),S9(null),b(""))},[u,d,b,O,X]),x.useEffect(()=>{st.current&&S9(d||null)},[d]),x.useEffect(()=>{ae&&Cn.error("Session Error",{description:ae})},[ae]);const Ft=x.useCallback(Qe=>{be(Qe)},[]),Nt=x.useCallback(Qe=>{if(le(Qe),Qe.state!=="idle")return;const _t=Qe.reason??"";_t==="config_update"&&(console.log("[App] Config update detected, refreshing global config"),window.dispatchEvent(new Event("pythinker:config-update"))),_t.startsWith("prompt_")&&(console.log("[App] Prompt complete, refreshing session info:",Qe.sessionId),E(Qe.sessionId))},[le,E]),qt=x.useCallback(async(Qe,_t)=>{await m(Qe,_t)},[m]),Ht=x.useCallback(async Qe=>{await m(Qe)},[m]),Mn=x.useCallback(async Qe=>{await p(Qe)},[p]),ke=x.useCallback(Qe=>{b(Qe),a(!1)},[b]),Be=x.useCallback(async()=>{await A()},[A]),xt=x.useCallback(Qe=>{W(Qe)},[W]),Et=x.useMemo(()=>u.map(Qe=>({id:Qe.sessionId,title:Qe.title??"Untitled",updatedAt:Dv(Qe.lastUpdated),workDir:Qe.workDir,lastUpdated:Qe.lastUpdated})),[u]),Ze=x.useMemo(()=>c.map(Qe=>({id:Qe.sessionId,title:Qe.title??"Untitled",updatedAt:Dv(Qe.lastUpdated),workDir:Qe.workDir,lastUpdated:Qe.lastUpdated})),[c]),Rt=x.useCallback(async(Qe,_t)=>{await L(Qe,_t)},[L]),mn=()=>h.jsx(q4e,{selectedSessionId:d,currentSession:oe,sessionDescription:oe?.title,onSessionStatus:Nt,onStreamStatusChange:Ft,uploadSessionFile:y,onListSessionDirectory:k,onGetSessionFileUrl:S,onGetSessionFile:w,onOpenCreateDialog:at,onOpenSidebar:Ce,generateTitle:K,onRenameSession:$,onForkSession:Rt});return h.jsxs(Nfe,{children:[h.jsx("div",{className:"box-border flex h-[100dvh] flex-col bg-background text-foreground px-[calc(0.75rem+var(--safe-left))] pr-[calc(0.75rem+var(--safe-right))] pt-[calc(0.75rem+var(--safe-top))] pb-1 lg:pb-[calc(0.75rem+var(--safe-bottom))] max-lg:h-[100svh] max-lg:overflow-hidden",children:h.jsx("div",{className:"mx-auto flex h-full min-h-0 w-full flex-1 flex-col gap-2 max-w-none",children:s?h.jsxs(Dbe,{orientation:"horizontal",className:"min-h-0 flex-1 overflow-hidden",children:[h.jsxs(Ik,{id:"sessions",collapsible:!0,collapsedSize:C9,defaultSize:g3e,minSize:p3e,elementRef:e,panelRef:t,onResize:At,className:me("relative min-h-0 border-r pl-0.5 pr-2 overflow-hidden"),children:[h.jsxs("div",{className:me("absolute inset-0 flex h-full flex-col items-center py-3 transition-all duration-200 ease-in-out",Ee?"opacity-100 translate-x-0":"opacity-0 -translate-x-2 pointer-events-none select-none"),children:[h.jsx("a",{href:tl.homepageUrl,target:"_blank",rel:"noopener noreferrer",className:"hover:opacity-80 transition-opacity",children:h.jsx("img",{src:tl.logoSrc,alt:tl.logoAlt,width:24,height:24,className:"size-6"})}),h.jsx("button",{type:"button","aria-label":"Expand sidebar",className:"mt-auto mb-1 inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-secondary/50 hover:text-foreground",onClick:it,children:h.jsx(xA,{className:"size-4"})})]}),h.jsxs("div",{className:me("absolute inset-0 flex h-full min-h-0 flex-col gap-3 transition-all duration-200 ease-in-out",Ee?"opacity-0 translate-x-2 pointer-events-none select-none":"opacity-100 translate-x-0"),children:[h.jsx(y9,{onDeleteSession:Mn,onSelectSession:ke,onRenameSession:$,onArchiveSession:Z,onUnarchiveSession:re,onBulkArchiveSessions:j,onBulkUnarchiveSessions:H,onBulkDeleteSessions:G,onRefreshSessions:Be,onRefreshArchivedSessions:_,onLoadMoreSessions:I,onLoadMoreArchivedSessions:P,onOpenCreateDialog:at,onCreateSessionInDir:Ht,streamStatus:Se,selectedSessionId:d,sessions:Et,archivedSessions:Ze,hasMoreSessions:O,hasMoreArchivedSessions:R,isLoadingMore:z,isLoadingMoreArchived:F,isLoadingArchived:U,searchQuery:X,onSearchQueryChange:xt}),h.jsxs("div",{className:"mt-auto flex items-center justify-between pl-2 pb-2 pr-2",children:[h.jsx("div",{className:"flex items-center gap-2",children:h.jsx(E9,{})}),h.jsx("button",{type:"button","aria-label":"Collapse sidebar",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-secondary/50 hover:text-foreground",onClick:Ge,children:h.jsx(bA,{className:"size-4"})})]})]})]}),h.jsx(Ik,{id:"chat",className:"relative min-h-0 flex justify-center flex-1",children:mn()})]}):h.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:mn()})})}),h.jsx(n3e,{position:"top-right",richColors:!0}),h.jsx(t3e,{open:fe,onOpenChange:Ne,onConfirm:qt,fetchWorkDirs:se,fetchStartupDir:ie}),r?h.jsxs("div",{className:"fixed inset-0 z-50 flex lg:hidden",role:"dialog","aria-modal":"true",children:[h.jsx("button",{type:"button",className:"absolute inset-0 bg-black/40","aria-label":"Close sessions sidebar",onClick:Re}),h.jsxs("div",{className:"relative flex h-full w-[min(86vw,360px)] flex-col border-r border-border bg-background pt-[var(--safe-top)] shadow-2xl",children:[h.jsx("div",{className:"min-h-0 flex-1",children:h.jsx(y9,{onDeleteSession:Mn,onSelectSession:ke,onRenameSession:$,onArchiveSession:Z,onUnarchiveSession:re,onBulkArchiveSessions:j,onBulkUnarchiveSessions:H,onBulkDeleteSessions:G,onRefreshSessions:Be,onRefreshArchivedSessions:_,onLoadMoreSessions:I,onLoadMoreArchivedSessions:P,onOpenCreateDialog:at,onCreateSessionInDir:Ht,onClose:Re,streamStatus:Se,selectedSessionId:d,sessions:Et,archivedSessions:Ze,hasMoreSessions:O,hasMoreArchivedSessions:R,isLoadingMore:z,isLoadingMoreArchived:F,isLoadingArchived:U,searchQuery:X,onSearchQueryChange:xt})}),h.jsx("div",{className:"flex items-center justify-between border-t px-3 py-2",children:h.jsx(E9,{})})]})]}):null]})}const x3e=x.createContext(null),dy={didCatch:!1,error:null};class y3e extends x.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=dy}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(...t){const{error:n}=this.state;n!==null&&(this.props.onReset?.({args:t,reason:"imperative-api"}),this.setState(dy))}componentDidCatch(t,n){this.props.onError?.(t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:a}=this.props;r&&n.error!==null&&v3e(t.resetKeys,a)&&(this.props.onReset?.({next:a,prev:t.resetKeys,reason:"keys"}),this.setState(dy))}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:a}=this.props,{didCatch:s,error:o}=this.state;let u=t;if(s){const c={error:o,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")u=n(c);else if(r)u=x.createElement(r,c);else if(a!==void 0)u=a;else throw o}return x.createElement(x3e.Provider,{value:{didCatch:s,error:o,resetErrorBoundary:this.resetErrorBoundary}},u)}}function v3e(e=[],t=[]){return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}function w3e({error:e,resetErrorBoundary:t}){const[n,r]=x.useState(!1),a=async()=>{const o=e instanceof Error?e:new Error(String(e)),u=`${o.name}: ${o.message}
|
|
464
|
+
|
|
465
|
+
${o.stack??""}`;await navigator.clipboard.writeText(u),r(!0),setTimeout(()=>r(!1),2e3)},s=e instanceof Error?e.message:String(e);return e instanceof Error&&e.stack,h.jsx("div",{className:"flex h-screen w-full items-center justify-center bg-background",children:h.jsxs("div",{className:"flex max-w-md flex-col items-center gap-4 rounded-lg border border-destructive/20 bg-destructive/5 p-8 text-center",children:[h.jsx(r4,{className:"h-12 w-12 text-destructive"}),h.jsx("h2",{className:"text-xl font-semibold text-foreground",children:"Something went wrong"}),h.jsx("p",{className:"text-sm text-muted-foreground",children:s||"An unexpected error occurred"}),!1,h.jsxs("div",{className:"flex gap-2",children:[h.jsxs(Bt,{onClick:a,variant:"outline",children:[n?h.jsx(fo,{className:"mr-2 h-4 w-4"}):h.jsx(Kc,{className:"mr-2 h-4 w-4"}),n?"Copied":"Copy error"]}),h.jsxs(Bt,{onClick:t,variant:"outline",children:[h.jsx(p1,{className:"mr-2 h-4 w-4"}),"Try again"]})]})]})})}function T3e({children:e}){return h.jsx(y3e,{FallbackComponent:w3e,onReset:()=>{window.location.reload()},onError:(t,n)=>{console.error("ErrorBoundary caught an error:",t,n)},children:e})}const E3e=["Failed to fetch dynamically imported module","Importing a module script failed","Failed to load module script","ChunkLoadError"],S3e=e=>E3e.some(t=>e.message.includes(t)),Oz="pythinker:dynamic-import-reload",A9=()=>sessionStorage.getItem(Oz)!=="1",N9=()=>{sessionStorage.setItem(Oz,"1")},C3e=()=>{window.addEventListener("vite:preloadError",()=>{A9()&&(N9(),window.location.reload())}),window.addEventListener("unhandledrejection",e=>{const{reason:t}=e;t instanceof Error&&S3e(t)&&(e.preventDefault(),A9()&&(N9(),window.location.reload()))})};C3e();document.title=tl.appTitle;tH.createRoot(document.getElementById("root")).render(h.jsx(x.StrictMode,{children:h.jsx(T3e,{children:h.jsx(b3e,{})})}));const P3e=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),k3e=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:GO},Symbol.toStringTag,{value:"Module"}));export{Vs as C,Y0e as D,ge as R,qU as a,eM as b,me as c,k3 as d,tM as e,H1 as f,f1 as g,rM as h,QS as i,h as j,Bn as k,Bf as l,Iee as m,_3e as n,P3e as o,Cc as p,x as r,pl as s,Jt as u,nue as w,xD as z};
|