@cursor/july 0.1.107 → 0.1.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +2 -6
- package/README.md +13 -11
- package/dist/bin/agent-serve.js +30 -8
- package/dist/channels/bitbucket/api.d.ts +41 -0
- package/dist/channels/bitbucket/api.d.ts.map +1 -1
- package/dist/channels/bitbucket/api.js +260 -0
- package/dist/channels/bitbucket/binding.d.ts +4 -0
- package/dist/channels/bitbucket/binding.d.ts.map +1 -1
- package/dist/channels/bitbucket/binding.js +16 -0
- package/dist/channels/bitbucket/index.d.ts +1 -1
- package/dist/channels/bitbucket/index.d.ts.map +1 -1
- package/dist/channels/bitbucket/index.js +1 -1
- package/dist/channels/github/github-channel.js +8 -5
- package/dist/channels/github/types.d.ts +5 -1
- package/dist/channels/github/types.d.ts.map +1 -1
- package/dist/channels/gitlab/api.d.ts +27 -0
- package/dist/channels/gitlab/api.d.ts.map +1 -1
- package/dist/channels/gitlab/api.js +88 -0
- package/dist/channels/gitlab/binding.d.ts +5 -0
- package/dist/channels/gitlab/binding.d.ts.map +1 -1
- package/dist/channels/gitlab/binding.js +10 -0
- package/dist/channels/gitlab/index.d.ts +1 -1
- package/dist/channels/gitlab/index.d.ts.map +1 -1
- package/dist/channels/gitlab/index.js +1 -1
- package/dist/channels/origin/origin-channel.d.ts.map +1 -1
- package/dist/channels/origin/origin-channel.js +27 -13
- package/dist/channels/origin/types.d.ts +5 -1
- package/dist/channels/origin/types.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.d.ts +10 -0
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +20 -3
- package/dist/channels/slack/slack-channel.d.ts +12 -5
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +59 -8
- package/dist/channels.d.ts +45 -0
- package/dist/channels.d.ts.map +1 -1
- package/dist/channels.js +106 -7
- package/dist/connections.d.ts +2 -1
- package/dist/connections.d.ts.map +1 -1
- package/dist/connections.js +2 -1
- package/dist/docs/404.html +2 -2
- package/dist/docs/assets/{app.CtuckIiL.js → app.Cr-wVbnB.js} +1 -1
- package/dist/docs/assets/{building-with-agents.md.CUSWxlP_.js → building-with-agents.md.D0KbSkJn.js} +2 -2
- package/dist/docs/assets/{building-with-agents.md.CUSWxlP_.lean.js → building-with-agents.md.D0KbSkJn.lean.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.CFVQ4S17.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.Bkkhnu8K.js → VPLocalSearchBox.CVQERt56.js} +1 -1
- package/dist/docs/assets/chunks/{theme.DhpIe0Pa.js → theme.Dnsd3XOn.js} +2 -2
- package/dist/docs/assets/concepts.md.B4o63Gul.js +1 -0
- package/dist/docs/assets/{deployment.md.MFPKqsqI.js → deployment.md.JenwuCCB.js} +4 -4
- package/dist/docs/assets/{deployment.md.MFPKqsqI.lean.js → deployment.md.JenwuCCB.lean.js} +1 -1
- package/dist/docs/assets/evals.md.C7JLjoEP.js +211 -0
- package/dist/docs/assets/evals.md.C7JLjoEP.lean.js +1 -0
- package/dist/docs/assets/guides_bitbucket.md.DZPzmUjU.js +10 -0
- package/dist/docs/assets/guides_bitbucket.md.DZPzmUjU.lean.js +1 -0
- package/dist/docs/assets/guides_cloud-agents.md.BsloyHdY.js +9 -0
- package/dist/docs/assets/{guides_cloud-agents.md.DS8RIjwx.lean.js → guides_cloud-agents.md.BsloyHdY.lean.js} +1 -1
- package/dist/docs/assets/{guides_github.md.c0gdGJ-D.js → guides_github.md.TZaTZlfz.js} +13 -3
- package/dist/docs/assets/{guides_github.md.c0gdGJ-D.lean.js → guides_github.md.TZaTZlfz.lean.js} +1 -1
- package/dist/docs/assets/guides_gitlab.md.BmqwQfdG.js +14 -0
- package/dist/docs/assets/guides_gitlab.md.BmqwQfdG.lean.js +1 -0
- package/dist/docs/assets/{guides_grokbot-agents.md.DVqdhBKb.js → guides_grokbot-agents.md.DyV-WArv.js} +1 -1
- package/dist/docs/assets/guides_improve.md.BGVk32bK.js +14 -0
- package/dist/docs/assets/guides_improve.md.BGVk32bK.lean.js +1 -0
- package/dist/docs/assets/{guides_slack.md.9oHPye9o.js → guides_slack.md.D4RVMM4G.js} +3 -3
- package/dist/docs/assets/{guides_slack.md.9oHPye9o.lean.js → guides_slack.md.D4RVMM4G.lean.js} +1 -1
- package/dist/docs/assets/{guides_webhooks.md.DKdA43Qm.js → guides_webhooks.md.CJK484ex.js} +2 -2
- package/dist/docs/assets/{hillclimbing.md.CpTGTCle.js → hillclimbing.md.BOiVo1tf.js} +1 -1
- package/dist/docs/assets/index.md.DD9Q2XuJ.js +5 -0
- package/dist/docs/assets/{index.md.BW_6tOgR.lean.js → index.md.DD9Q2XuJ.lean.js} +1 -1
- package/dist/docs/assets/{reference_agent-config.md.CHNpiyp4.js → reference_agent-config.md.CvoL6pof.js} +1 -1
- package/dist/docs/assets/{reference_channels.md.D-qTqwcq.js → reference_channels.md.CAo-iK4j.js} +2 -2
- package/dist/docs/assets/{reference_channels.md.D-qTqwcq.lean.js → reference_channels.md.CAo-iK4j.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.Dm67hd2D.js → reference_cli.md.Deg7849l.js} +7 -7
- package/dist/docs/assets/{reference_cli.md.Dm67hd2D.lean.js → reference_cli.md.Deg7849l.lean.js} +1 -1
- package/dist/docs/assets/{reference_connections.md.Di6jJAXF.js → reference_connections.md.BojkC6c5.js} +1 -1
- package/dist/docs/assets/{reference_extensions.md.CGmMLblt.js → reference_extensions.md.ZAVUyuEX.js} +3 -3
- package/dist/docs/assets/{reference_hooks.md.Ddt5DdgJ.js → reference_hooks.md.BlM_bOg6.js} +3 -3
- package/dist/docs/assets/{reference_hooks.md.Ddt5DdgJ.lean.js → reference_hooks.md.BlM_bOg6.lean.js} +1 -1
- package/dist/docs/assets/{reference_http-api.md.oySXBO8o.js → reference_http-api.md.BwaCo-VO.js} +1 -1
- package/dist/docs/assets/{reference_playground.md.4myJPxrf.js → reference_playground.md.DLnoaczX.js} +1 -1
- package/dist/docs/assets/{reference_playground.md.4myJPxrf.lean.js → reference_playground.md.DLnoaczX.lean.js} +1 -1
- package/dist/docs/assets/{reference_project-layout.md.DuBu9a96.js → reference_project-layout.md.BEU8MtQV.js} +3 -3
- package/dist/docs/assets/{reference_project-layout.md.DuBu9a96.lean.js → reference_project-layout.md.BEU8MtQV.lean.js} +1 -1
- package/dist/docs/assets/reference_sessions.md.CyXV1MUw.js +1 -0
- package/dist/docs/assets/{scaffolding-agents.md.em43xlY1.js → scaffolding-agents.md.Kctn3OVb.js} +1 -1
- package/dist/docs/assets/{skills_create-agent.md.BVoWPcan.js → skills_create-agent.md.Q3h6Je-e.js} +1 -1
- package/dist/docs/assets/{skills_debug.md.CDbPhHfg.js → skills_debug.md.CVjCXMFF.js} +1 -1
- package/dist/docs/assets/{skills_debug.md.CDbPhHfg.lean.js → skills_debug.md.CVjCXMFF.lean.js} +1 -1
- package/dist/docs/assets/skills_deploy.md.CWqi_ZxW.js +35 -0
- package/dist/docs/assets/skills_deploy.md.CWqi_ZxW.lean.js +1 -0
- package/dist/docs/assets/skills_evals.md.DFxYPErF.js +25 -0
- package/dist/docs/assets/skills_evals.md.DFxYPErF.lean.js +1 -0
- package/dist/docs/assets/skills_framework-map.md.BxLSOhSY.js +1 -0
- package/dist/docs/assets/{skills_framework-map.md.haibFyoB.lean.js → skills_framework-map.md.BxLSOhSY.lean.js} +1 -1
- package/dist/docs/assets/{skills_github.md.D0JahM8c.js → skills_github.md.hgFX_oKY.js} +1 -1
- package/dist/docs/assets/skills_index.md.DL7EHaQ-.js +1 -0
- package/dist/docs/assets/skills_index.md.DL7EHaQ-.lean.js +1 -0
- package/dist/docs/assets/{storage.md.BOHeqk2M.js → storage.md.BUrhJ-Zz.js} +4 -4
- package/dist/docs/assets/{storage.md.BOHeqk2M.lean.js → storage.md.BUrhJ-Zz.lean.js} +1 -1
- package/dist/docs/assets/troubleshooting.md.CYEAO9bM.js +1 -0
- package/dist/docs/building-with-agents.html +5 -5
- package/dist/docs/building-with-agents.md +3 -2
- package/dist/docs/concepts.html +5 -5
- package/dist/docs/concepts.md +2 -4
- package/dist/docs/deployment.html +7 -7
- package/dist/docs/deployment.md +7 -2
- package/dist/docs/evals.html +161 -35
- package/dist/docs/evals.md +612 -296
- package/dist/docs/guides/agent-to-agent.html +4 -4
- package/dist/docs/guides/bitbucket.html +36 -0
- package/dist/docs/guides/bitbucket.md +84 -0
- package/dist/docs/guides/cloud-agents.html +6 -6
- package/dist/docs/guides/cloud-agents.md +4 -3
- package/dist/docs/guides/convert-automation.html +4 -4
- package/dist/docs/guides/github.html +17 -7
- package/dist/docs/guides/github.md +33 -1
- package/dist/docs/guides/gitlab.html +40 -0
- package/dist/docs/guides/gitlab.md +92 -0
- package/dist/docs/guides/grokbot-agents.html +6 -6
- package/dist/docs/guides/grokbot-agents.md +2 -2
- package/dist/docs/guides/human-in-the-loop.html +4 -4
- package/dist/docs/guides/improve.html +40 -0
- package/dist/docs/guides/improve.md +91 -0
- package/dist/docs/guides/mcp-oauth.html +4 -4
- package/dist/docs/guides/opentelemetry.html +5 -5
- package/dist/docs/guides/slack.html +7 -7
- package/dist/docs/guides/slack.md +2 -1
- package/dist/docs/guides/webhooks.html +6 -6
- package/dist/docs/guides/webhooks.md +4 -2
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +6 -6
- package/dist/docs/hillclimbing.md +2 -2
- package/dist/docs/index.html +6 -6
- package/dist/docs/index.md +14 -6
- package/dist/docs/llms-full.txt +1274 -814
- package/dist/docs/llms.txt +7 -5
- package/dist/docs/quickstart.html +4 -4
- package/dist/docs/reference/agent-config.html +6 -6
- package/dist/docs/reference/agent-config.md +5 -2
- package/dist/docs/reference/artifacts.html +4 -4
- package/dist/docs/reference/channels.html +6 -6
- package/dist/docs/reference/channels.md +16 -3
- package/dist/docs/reference/cli.html +11 -11
- package/dist/docs/reference/cli.md +24 -15
- package/dist/docs/reference/connections.html +6 -6
- package/dist/docs/reference/connections.md +2 -1
- package/dist/docs/reference/extensions.html +8 -8
- package/dist/docs/reference/extensions.md +2 -3
- package/dist/docs/reference/hooks.html +7 -7
- package/dist/docs/reference/hooks.md +9 -12
- package/dist/docs/reference/http-api.html +6 -6
- package/dist/docs/reference/http-api.md +2 -3
- package/dist/docs/reference/instructions.html +4 -4
- package/dist/docs/reference/playground.html +5 -5
- package/dist/docs/reference/playground.md +0 -4
- package/dist/docs/reference/project-layout.html +7 -7
- package/dist/docs/reference/project-layout.md +1 -8
- package/dist/docs/reference/prompt.html +4 -4
- package/dist/docs/reference/result.html +4 -4
- package/dist/docs/reference/schedules.html +4 -4
- package/dist/docs/reference/sessions.html +5 -5
- package/dist/docs/reference/sessions.md +1 -2
- package/dist/docs/reference/skills.html +4 -4
- package/dist/docs/reference/subagents.html +4 -4
- package/dist/docs/reference/tools.html +4 -4
- package/dist/docs/scaffolding-agents.html +5 -5
- package/dist/docs/scaffolding-agents.md +2 -1
- package/dist/docs/skills/create-agent.html +6 -6
- package/dist/docs/skills/create-agent.md +1 -1
- package/dist/docs/skills/debug.html +5 -5
- package/dist/docs/skills/debug.md +1 -1
- package/dist/docs/skills/deploy.html +61 -0
- package/dist/docs/skills/deploy.md +161 -0
- package/dist/docs/skills/evals.html +8 -8
- package/dist/docs/skills/evals.md +44 -6
- package/dist/docs/skills/framework-map.html +5 -5
- package/dist/docs/skills/framework-map.md +5 -4
- package/dist/docs/skills/github.html +6 -6
- package/dist/docs/skills/github.md +1 -1
- package/dist/docs/skills/hillclimb.html +4 -4
- package/dist/docs/skills/index.html +6 -6
- package/dist/docs/skills/index.md +1 -1
- package/dist/docs/skills/mcp-auth.html +4 -4
- package/dist/docs/skills/otel.html +4 -4
- package/dist/docs/skills/setup-slack.html +4 -4
- package/dist/docs/storage.html +8 -8
- package/dist/docs/storage.md +15 -24
- package/dist/docs/templates/agentic-owners.html +4 -4
- package/dist/docs/templates/agents-md.html +4 -4
- package/dist/docs/templates/code-wiki.html +4 -4
- package/dist/docs/templates/demo.html +4 -4
- package/dist/docs/templates/grokbot-agents.html +4 -4
- package/dist/docs/templates/pr-autofixer.html +4 -4
- package/dist/docs/templates/security-help.html +4 -4
- package/dist/docs/templates/security-reviewer.html +4 -4
- package/dist/docs/templates/triage.html +4 -4
- package/dist/docs/troubleshooting.html +5 -5
- package/dist/docs/troubleshooting.md +1 -1
- package/dist/extensions/improve/extension.d.ts +46 -0
- package/dist/extensions/improve/extension.d.ts.map +1 -0
- package/dist/extensions/improve/extension.js +41 -0
- package/dist/extensions/improve/skills/yourself.d.ts +4 -0
- package/dist/extensions/improve/skills/yourself.d.ts.map +1 -0
- package/dist/extensions/improve/skills/yourself.js +43 -0
- package/dist/extensions.d.ts +2 -3
- package/dist/extensions.d.ts.map +1 -1
- package/dist/extensions.js +2 -5
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/internal/authored-alias-hooks.d.ts +5 -0
- package/dist/internal/authored-alias-hooks.d.ts.map +1 -1
- package/dist/internal/authored-alias-hooks.js +17 -0
- package/dist/internal/authored-loaders.d.ts +4 -0
- package/dist/internal/authored-loaders.d.ts.map +1 -1
- package/dist/internal/authored-loaders.js +21 -2
- package/dist/internal/builtin-tools/artifacts.d.ts.map +1 -1
- package/dist/internal/builtin-tools/artifacts.js +2 -3
- package/dist/internal/channel-route-dispatch.d.ts +13 -0
- package/dist/internal/channel-route-dispatch.d.ts.map +1 -0
- package/dist/internal/channel-route-dispatch.js +62 -0
- package/dist/internal/channel-state.d.ts +17 -0
- package/dist/internal/channel-state.d.ts.map +1 -0
- package/dist/internal/channel-state.js +78 -0
- package/dist/internal/cli-ax.d.ts +8 -2
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +100 -3
- package/dist/internal/cli-cursor.d.ts.map +1 -1
- package/dist/internal/cli-cursor.js +2 -0
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +38 -14
- package/dist/internal/cli-mcp-oauth.d.ts.map +1 -1
- package/dist/internal/cli-mcp-oauth.js +15 -0
- package/dist/internal/cli-mcp.d.ts.map +1 -1
- package/dist/internal/cli-mcp.js +12 -0
- package/dist/internal/cli-slack.d.ts.map +1 -1
- package/dist/internal/cli-slack.js +8 -2
- package/dist/internal/continuation-channel.d.ts.map +1 -1
- package/dist/internal/continuation-channel.js +2 -2
- package/dist/internal/continuation-identity.js +8 -3
- package/dist/internal/cursor/credentials.d.ts +8 -2
- package/dist/internal/cursor/credentials.d.ts.map +1 -1
- package/dist/internal/cursor/credentials.js +27 -5
- package/dist/internal/deploy-client.d.ts +27 -0
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +32 -0
- package/dist/internal/deploy-manifest.d.ts +23 -0
- package/dist/internal/deploy-manifest.d.ts.map +1 -1
- package/dist/internal/deploy-manifest.js +84 -1
- package/dist/internal/describe-error.d.ts +1 -0
- package/dist/internal/describe-error.d.ts.map +1 -1
- package/dist/internal/describe-error.js +25 -0
- package/dist/internal/discovery/agent.d.ts +1 -1
- package/dist/internal/discovery/agent.d.ts.map +1 -1
- package/dist/internal/discovery/agent.js +0 -5
- package/dist/internal/discovery/extension-overlay.d.ts +1 -2
- package/dist/internal/discovery/extension-overlay.d.ts.map +1 -1
- package/dist/internal/discovery/extension-overlay.js +0 -14
- package/dist/internal/discovery/extensions.d.ts +1 -2
- package/dist/internal/discovery/extensions.d.ts.map +1 -1
- package/dist/internal/discovery/extensions.js +4 -22
- package/dist/internal/discovery/info.d.ts.map +1 -1
- package/dist/internal/discovery/info.js +42 -24
- package/dist/internal/discovery/modules.js +0 -1
- package/dist/internal/discovery/project.d.ts.map +1 -1
- package/dist/internal/discovery/project.js +0 -16
- package/dist/internal/eval-runner.js +0 -1
- package/dist/internal/framework-file-storage.d.ts +4 -5
- package/dist/internal/framework-file-storage.d.ts.map +1 -1
- package/dist/internal/framework-file-storage.js +4 -5
- package/dist/internal/framework-storage-selection.d.ts +2 -2
- package/dist/internal/framework-storage-selection.js +2 -2
- package/dist/internal/guest-network.d.ts +4 -10
- package/dist/internal/guest-network.d.ts.map +1 -1
- package/dist/internal/guest-network.js +42 -26
- package/dist/internal/hosted-admission-adapter.d.ts +2 -0
- package/dist/internal/hosted-admission-adapter.d.ts.map +1 -1
- package/dist/internal/hosted-catch-protocol.d.ts +51 -0
- package/dist/internal/hosted-catch-protocol.d.ts.map +1 -0
- package/dist/internal/hosted-catch-protocol.js +103 -0
- package/dist/internal/hosted-catch.d.ts +40 -0
- package/dist/internal/hosted-catch.d.ts.map +1 -0
- package/dist/internal/hosted-catch.js +149 -0
- package/dist/internal/hosted-delivery-protocol.d.ts +41 -0
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +249 -0
- package/dist/internal/hosted-delivery.d.ts +10 -1
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +100 -22
- package/dist/internal/hosted-execution-diag.d.ts +4 -1
- package/dist/internal/hosted-execution-diag.d.ts.map +1 -1
- package/dist/internal/hosted-execution-diag.js +13 -4
- package/dist/internal/hosted-execution-flush.d.ts +3 -0
- package/dist/internal/hosted-execution-flush.d.ts.map +1 -1
- package/dist/internal/hosted-execution-flush.js +2 -4
- package/dist/internal/http-control-plane-session.d.ts +30 -0
- package/dist/internal/http-control-plane-session.d.ts.map +1 -0
- package/dist/internal/http-control-plane-session.js +83 -0
- package/dist/internal/init-scaffold.d.ts.map +1 -1
- package/dist/internal/init-scaffold.js +1 -2
- package/dist/internal/install-cursor-skills.d.ts +5 -2
- package/dist/internal/install-cursor-skills.d.ts.map +1 -1
- package/dist/internal/install-cursor-skills.js +25 -5
- package/dist/internal/legacy-command-guard.d.ts +22 -0
- package/dist/internal/legacy-command-guard.d.ts.map +1 -0
- package/dist/internal/legacy-command-guard.js +51 -0
- package/dist/internal/platform-timers.d.ts +7 -0
- package/dist/internal/platform-timers.d.ts.map +1 -1
- package/dist/internal/platform-timers.js +139 -0
- package/dist/internal/reminder-control-plane-protocol.d.ts +2 -0
- package/dist/internal/reminder-control-plane-protocol.d.ts.map +1 -1
- package/dist/internal/reminder-control-plane-protocol.js +9 -2
- package/dist/internal/reminder-runner.d.ts +8 -0
- package/dist/internal/reminder-runner.d.ts.map +1 -1
- package/dist/internal/reminder-runner.js +36 -9
- package/dist/internal/resolve-prod-target.d.ts +2 -0
- package/dist/internal/resolve-prod-target.d.ts.map +1 -1
- package/dist/internal/resolve-prod-target.js +13 -0
- package/dist/internal/run-client.d.ts +1 -1
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +5 -4
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +57 -70
- package/dist/internal/session-engine.d.ts +7 -41
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +110 -227
- package/dist/internal/storage-coordinator.d.ts +5 -19
- package/dist/internal/storage-coordinator.d.ts.map +1 -1
- package/dist/internal/storage-coordinator.js +3 -62
- package/dist/internal/storage-roles.d.ts +4 -9
- package/dist/internal/storage-roles.d.ts.map +1 -1
- package/dist/internal/storage-roles.js +2 -2
- package/dist/playground/assets/index-Bhxzrcf6.css +1 -0
- package/dist/playground/assets/index-CqLX5uF3.js +67 -0
- package/dist/playground/index.html +2 -2
- package/dist/storage-backends/cursor-hosted-v2.d.ts +4 -5
- package/dist/storage-backends/cursor-hosted-v2.d.ts.map +1 -1
- package/dist/storage-backends/cursor-hosted-v2.js +4 -5
- package/dist/storage-backends/cursor-hosted.d.ts +7 -2
- package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/storage-backends/cursor-hosted.js +29 -31
- package/dist/storage-backends/file-kv.d.ts +9 -12
- package/dist/storage-backends/file-kv.d.ts.map +1 -1
- package/dist/storage-backends/file-kv.js +11 -47
- package/dist/storage-protocol.d.ts +3 -11
- package/dist/storage-protocol.d.ts.map +1 -1
- package/dist/storage-protocol.js +3 -11
- package/dist/storage.d.ts +8 -36
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +8 -44
- package/dist/types.d.ts +53 -62
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +14 -6
- package/docs/building-with-agents.md +3 -2
- package/docs/concepts.md +2 -4
- package/docs/deployment.md +7 -2
- package/docs/evals.md +613 -297
- package/docs/guides/bitbucket.md +89 -0
- package/docs/guides/cloud-agents.md +4 -3
- package/docs/guides/github.md +33 -1
- package/docs/guides/gitlab.md +97 -0
- package/docs/guides/grokbot-agents.md +2 -2
- package/docs/guides/improve.md +96 -0
- package/docs/guides/slack.md +2 -1
- package/docs/guides/webhooks.md +4 -2
- package/docs/hillclimbing.md +2 -2
- package/docs/reference/agent-config.md +5 -2
- package/docs/reference/channels.md +16 -3
- package/docs/reference/cli.md +24 -15
- package/docs/reference/connections.md +2 -1
- package/docs/reference/extensions.md +2 -3
- package/docs/reference/hooks.md +9 -12
- package/docs/reference/http-api.md +2 -3
- package/docs/reference/playground.md +0 -4
- package/docs/reference/project-layout.md +1 -8
- package/docs/reference/sessions.md +1 -2
- package/docs/scaffolding-agents.md +2 -1
- package/docs/skills/index.md +2 -2
- package/docs/storage.md +15 -24
- package/docs/troubleshooting.md +1 -1
- package/package.json +8 -7
- package/skills/create-agent/SKILL.md +1 -1
- package/skills/debug/SKILL.md +1 -1
- package/skills/deploy/SKILL.md +169 -0
- package/skills/evals/SKILL.md +45 -8
- package/skills/framework-map/SKILL.md +5 -4
- package/skills/github/SKILL.md +1 -1
- package/src/bin/agent-serve.ts +27 -2
- package/src/channels/bitbucket/api.ts +341 -0
- package/src/channels/bitbucket/binding.ts +25 -0
- package/src/channels/bitbucket/index.ts +2 -0
- package/src/channels/github/github-channel.ts +8 -8
- package/src/channels/github/types.ts +5 -0
- package/src/channels/gitlab/api.ts +123 -0
- package/src/channels/gitlab/binding.ts +12 -0
- package/src/channels/gitlab/index.ts +1 -0
- package/src/channels/origin/origin-channel.ts +29 -13
- package/src/channels/origin/types.ts +5 -0
- package/src/channels/slack/dispatch.ts +30 -0
- package/src/channels/slack/slack-channel.ts +69 -7
- package/src/channels.ts +157 -10
- package/src/connections.ts +2 -1
- package/src/extensions/improve/extension.ts +70 -0
- package/src/extensions/improve/skills/yourself.ts +50 -0
- package/src/extensions.ts +2 -6
- package/src/index.ts +0 -3
- package/src/internal/authored-alias-hooks.ts +32 -0
- package/src/internal/authored-loaders.ts +26 -2
- package/src/internal/builtin-tools/artifacts.ts +2 -3
- package/src/internal/channel-route-dispatch.ts +66 -0
- package/src/internal/channel-state.ts +96 -0
- package/src/internal/cli-ax.ts +111 -3
- package/src/internal/cli-cursor.ts +4 -1
- package/src/internal/cli-deploy.ts +50 -10
- package/src/internal/cli-mcp-oauth.ts +18 -0
- package/src/internal/cli-mcp.ts +11 -0
- package/src/internal/cli-slack.ts +15 -2
- package/src/internal/continuation-channel.ts +2 -1
- package/src/internal/continuation-identity.ts +10 -2
- package/src/internal/cursor/credentials.ts +35 -7
- package/src/internal/deploy-client.ts +54 -0
- package/src/internal/deploy-manifest.ts +115 -1
- package/src/internal/describe-error.ts +28 -0
- package/src/internal/discovery/agent.ts +1 -7
- package/src/internal/discovery/extension-overlay.ts +0 -18
- package/src/internal/discovery/extensions.ts +2 -26
- package/src/internal/discovery/info.ts +3 -13
- package/src/internal/discovery/modules.ts +0 -1
- package/src/internal/discovery/project.ts +0 -16
- package/src/internal/eval-runner.ts +0 -1
- package/src/internal/framework-file-storage.ts +4 -5
- package/src/internal/framework-storage-selection.ts +2 -2
- package/src/internal/guest-network.ts +43 -29
- package/src/internal/hosted-admission-adapter.ts +2 -0
- package/src/internal/hosted-catch-protocol.ts +130 -0
- package/src/internal/hosted-catch.ts +192 -0
- package/src/internal/hosted-delivery-protocol.ts +387 -0
- package/src/internal/hosted-delivery.ts +155 -22
- package/src/internal/hosted-execution-diag.ts +21 -3
- package/src/internal/hosted-execution-flush.ts +6 -3
- package/src/internal/http-control-plane-session.ts +104 -0
- package/src/internal/init-scaffold.ts +1 -2
- package/src/internal/install-cursor-skills.ts +38 -5
- package/src/internal/legacy-command-guard.ts +59 -0
- package/src/internal/platform-timers.ts +191 -0
- package/src/internal/reminder-control-plane-protocol.ts +15 -2
- package/src/internal/reminder-runner.ts +60 -9
- package/src/internal/resolve-prod-target.ts +15 -0
- package/src/internal/run-client.ts +1 -1
- package/src/internal/sdk-runner.ts +3 -2
- package/src/internal/server.ts +89 -95
- package/src/internal/session-engine.ts +155 -285
- package/src/internal/storage-coordinator.ts +5 -76
- package/src/internal/storage-roles.ts +4 -9
- package/src/storage-backends/cursor-hosted-v2.ts +4 -7
- package/src/storage-backends/cursor-hosted.ts +40 -38
- package/src/storage-backends/file-kv.ts +10 -51
- package/src/storage-protocol.ts +3 -17
- package/src/storage.ts +10 -101
- package/src/types.ts +58 -62
- package/templates/demo/README.md +10 -6
- package/templates/demo/agent/channels/github.ts +2 -0
- package/templates/demo/agent/channels/queue.ts +6 -2
- package/templates/demo/agent/lib/repos.ts +5 -0
- package/templates/demo/init.json +25 -0
- package/dist/ab.d.ts +0 -209
- package/dist/ab.d.ts.map +0 -1
- package/dist/ab.js +0 -246
- package/dist/docs/ab.html +0 -80
- package/dist/docs/ab.md +0 -332
- package/dist/docs/assets/ab.md.mlVgqvSk.js +0 -54
- package/dist/docs/assets/ab.md.mlVgqvSk.lean.js +0 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.DXXZxiMv.js +0 -1
- package/dist/docs/assets/concepts.md.DgEcZOfT.js +0 -1
- package/dist/docs/assets/evals.md.CbMoebP1.js +0 -85
- package/dist/docs/assets/evals.md.CbMoebP1.lean.js +0 -1
- package/dist/docs/assets/guides_cloud-agents.md.DS8RIjwx.js +0 -9
- package/dist/docs/assets/index.md.BW_6tOgR.js +0 -5
- package/dist/docs/assets/reference_sessions.md.CueyOHSL.js +0 -1
- package/dist/docs/assets/skills_ab.md.CsFNatVx.js +0 -26
- package/dist/docs/assets/skills_ab.md.CsFNatVx.lean.js +0 -1
- package/dist/docs/assets/skills_evals.md.723kpUmA.js +0 -25
- package/dist/docs/assets/skills_evals.md.723kpUmA.lean.js +0 -1
- package/dist/docs/assets/skills_framework-map.md.haibFyoB.js +0 -1
- package/dist/docs/assets/skills_index.md.DKwIxzGg.js +0 -1
- package/dist/docs/assets/skills_index.md.DKwIxzGg.lean.js +0 -1
- package/dist/docs/assets/troubleshooting.md.Cus_YZga.js +0 -1
- package/dist/docs/skills/ab.html +0 -52
- package/dist/docs/skills/ab.md +0 -50
- package/dist/internal/ab-collector.d.ts +0 -44
- package/dist/internal/ab-collector.d.ts.map +0 -1
- package/dist/internal/ab-collector.js +0 -142
- package/dist/internal/ab-fold.d.ts +0 -36
- package/dist/internal/ab-fold.d.ts.map +0 -1
- package/dist/internal/ab-fold.js +0 -175
- package/dist/internal/ab-snapshot.d.ts +0 -68
- package/dist/internal/ab-snapshot.d.ts.map +0 -1
- package/dist/internal/ab-snapshot.js +0 -208
- package/dist/internal/discovery/ab.d.ts +0 -9
- package/dist/internal/discovery/ab.d.ts.map +0 -1
- package/dist/internal/discovery/ab.js +0 -113
- package/dist/playground/assets/index-Bq2HpEQB.js +0 -67
- package/dist/playground/assets/index-CZKKNlmb.css +0 -1
- package/docs/ab.md +0 -337
- package/skills/ab/SKILL.md +0 -58
- package/src/ab.ts +0 -430
- package/src/internal/ab-collector.ts +0 -200
- package/src/internal/ab-fold.ts +0 -232
- package/src/internal/ab-snapshot.ts +0 -331
- package/src/internal/discovery/ab.ts +0 -131
- /package/dist/docs/assets/{concepts.md.DgEcZOfT.lean.js → concepts.md.B4o63Gul.lean.js} +0 -0
- /package/dist/docs/assets/{guides_grokbot-agents.md.DVqdhBKb.lean.js → guides_grokbot-agents.md.DyV-WArv.lean.js} +0 -0
- /package/dist/docs/assets/{guides_webhooks.md.DKdA43Qm.lean.js → guides_webhooks.md.CJK484ex.lean.js} +0 -0
- /package/dist/docs/assets/{hillclimbing.md.CpTGTCle.lean.js → hillclimbing.md.BOiVo1tf.lean.js} +0 -0
- /package/dist/docs/assets/{reference_agent-config.md.CHNpiyp4.lean.js → reference_agent-config.md.CvoL6pof.lean.js} +0 -0
- /package/dist/docs/assets/{reference_connections.md.Di6jJAXF.lean.js → reference_connections.md.BojkC6c5.lean.js} +0 -0
- /package/dist/docs/assets/{reference_extensions.md.CGmMLblt.lean.js → reference_extensions.md.ZAVUyuEX.lean.js} +0 -0
- /package/dist/docs/assets/{reference_http-api.md.oySXBO8o.lean.js → reference_http-api.md.BwaCo-VO.lean.js} +0 -0
- /package/dist/docs/assets/{reference_sessions.md.CueyOHSL.lean.js → reference_sessions.md.CyXV1MUw.lean.js} +0 -0
- /package/dist/docs/assets/{scaffolding-agents.md.em43xlY1.lean.js → scaffolding-agents.md.Kctn3OVb.lean.js} +0 -0
- /package/dist/docs/assets/{skills_create-agent.md.BVoWPcan.lean.js → skills_create-agent.md.Q3h6Je-e.lean.js} +0 -0
- /package/dist/docs/assets/{skills_github.md.D0JahM8c.lean.js → skills_github.md.hgFX_oKY.lean.js} +0 -0
- /package/dist/docs/assets/{troubleshooting.md.Cus_YZga.lean.js → troubleshooting.md.CYEAO9bM.lean.js} +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
function iz(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const a=Object.getOwnPropertyDescriptor(r,s);a&&Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(s){if(s.ep)return;s.ep=!0;const a=n(s);fetch(s.href,a)}})();function zc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function sz(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var s=!1;try{s=this instanceof r}catch{}return s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var Zg={exports:{}},Ou={};var n1;function oz(){if(n1)return Ou;n1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,s,a){var l=null;if(a!==void 0&&(l=""+a),s.key!==void 0&&(l=""+s.key),"key"in s){a={};for(var c in s)c!=="key"&&(a[c]=s[c])}else a=s;return s=a.ref,{$$typeof:e,type:r,key:l,ref:s!==void 0?s:null,props:a}}return Ou.Fragment=t,Ou.jsx=n,Ou.jsxs=n,Ou}var r1;function az(){return r1||(r1=1,Zg.exports=oz()),Zg.exports}var g=az(),Qg={exports:{}},Et={};var i1;function lz(){if(i1)return Et;i1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),b=Symbol.iterator;function y(P){return P===null||typeof P!="object"?null:(P=b&&P[b]||P["@@iterator"],typeof P=="function"?P:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,R={};function T(P,V,j){this.props=P,this.context=V,this.refs=R,this.updater=j||k}T.prototype.isReactComponent={},T.prototype.setState=function(P,V){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,V,"setState")},T.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function E(){}E.prototype=T.prototype;function C(P,V,j){this.props=P,this.context=V,this.refs=R,this.updater=j||k}var _=C.prototype=new E;_.constructor=C,S(_,T.prototype),_.isPureReactComponent=!0;var D=Array.isArray;function N(){}var A={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function z(P,V,j){var Z=j.ref;return{$$typeof:e,type:P,key:V,ref:Z!==void 0?Z:null,props:j}}function I(P,V){return z(P.type,V,P.props)}function Y(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function H(P){var V={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(j){return V[j]})}var q=/\/+/g;function L(P,V){return typeof P=="object"&&P!==null&&P.key!=null?H(""+P.key):V.toString(36)}function F(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(N,N):(P.status="pending",P.then(function(V){P.status==="pending"&&(P.status="fulfilled",P.value=V)},function(V){P.status==="pending"&&(P.status="rejected",P.reason=V)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function U(P,V,j,Z,te){var se=typeof P;(se==="undefined"||se==="boolean")&&(P=null);var ue=!1;if(P===null)ue=!0;else switch(se){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(P.$$typeof){case e:case t:ue=!0;break;case h:return ue=P._init,U(ue(P._payload),V,j,Z,te)}}if(ue)return te=te(P),ue=Z===""?"."+L(P,0):Z,D(te)?(j="",ue!=null&&(j=ue.replace(q,"$&/")+"/"),U(te,V,j,"",function(ge){return ge})):te!=null&&(Y(te)&&(te=I(te,j+(te.key==null||P&&P.key===te.key?"":(""+te.key).replace(q,"$&/")+"/")+ue)),V.push(te)),1;ue=0;var le=Z===""?".":Z+":";if(D(P))for(var fe=0;fe<P.length;fe++)Z=P[fe],se=le+L(Z,fe),ue+=U(Z,V,j,se,te);else if(fe=y(P),typeof fe=="function")for(P=fe.call(P),fe=0;!(Z=P.next()).done;)Z=Z.value,se=le+L(Z,fe++),ue+=U(Z,V,j,se,te);else if(se==="object"){if(typeof P.then=="function")return U(F(P),V,j,Z,te);throw V=String(P),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return ue}function W(P,V,j){if(P==null)return P;var Z=[],te=0;return U(P,Z,"","",function(se){return V.call(j,se,te++)}),Z}function B(P){if(P._status===-1){var V=P._result;V=V(),V.then(function(j){(P._status===0||P._status===-1)&&(P._status=1,P._result=j)},function(j){(P._status===0||P._status===-1)&&(P._status=2,P._result=j)}),P._status===-1&&(P._status=0,P._result=V)}if(P._status===1)return P._result.default;throw P._result}var K=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},O={map:W,forEach:function(P,V,j){W(P,function(){V.apply(this,arguments)},j)},count:function(P){var V=0;return W(P,function(){V++}),V},toArray:function(P){return W(P,function(V){return V})||[]},only:function(P){if(!Y(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return Et.Activity=m,Et.Children=O,Et.Component=T,Et.Fragment=n,Et.Profiler=s,Et.PureComponent=C,Et.StrictMode=r,Et.Suspense=d,Et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,Et.__COMPILER_RUNTIME={__proto__:null,c:function(P){return A.H.useMemoCache(P)}},Et.cache=function(P){return function(){return P.apply(null,arguments)}},Et.cacheSignal=function(){return null},Et.cloneElement=function(P,V,j){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var Z=S({},P.props),te=P.key;if(V!=null)for(se in V.key!==void 0&&(te=""+V.key),V)!$.call(V,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&V.ref===void 0||(Z[se]=V[se]);var se=arguments.length-2;if(se===1)Z.children=j;else if(1<se){for(var ue=Array(se),le=0;le<se;le++)ue[le]=arguments[le+2];Z.children=ue}return z(P.type,te,Z)},Et.createContext=function(P){return P={$$typeof:l,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:a,_context:P},P},Et.createElement=function(P,V,j){var Z,te={},se=null;if(V!=null)for(Z in V.key!==void 0&&(se=""+V.key),V)$.call(V,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(te[Z]=V[Z]);var ue=arguments.length-2;if(ue===1)te.children=j;else if(1<ue){for(var le=Array(ue),fe=0;fe<ue;fe++)le[fe]=arguments[fe+2];te.children=le}if(P&&P.defaultProps)for(Z in ue=P.defaultProps,ue)te[Z]===void 0&&(te[Z]=ue[Z]);return z(P,se,te)},Et.createRef=function(){return{current:null}},Et.forwardRef=function(P){return{$$typeof:c,render:P}},Et.isValidElement=Y,Et.lazy=function(P){return{$$typeof:h,_payload:{_status:-1,_result:P},_init:B}},Et.memo=function(P,V){return{$$typeof:f,type:P,compare:V===void 0?null:V}},Et.startTransition=function(P){var V=A.T,j={};A.T=j;try{var Z=P(),te=A.S;te!==null&&te(j,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(N,K)}catch(se){K(se)}finally{V!==null&&j.types!==null&&(V.types=j.types),A.T=V}},Et.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},Et.use=function(P){return A.H.use(P)},Et.useActionState=function(P,V,j){return A.H.useActionState(P,V,j)},Et.useCallback=function(P,V){return A.H.useCallback(P,V)},Et.useContext=function(P){return A.H.useContext(P)},Et.useDebugValue=function(){},Et.useDeferredValue=function(P,V){return A.H.useDeferredValue(P,V)},Et.useEffect=function(P,V){return A.H.useEffect(P,V)},Et.useEffectEvent=function(P){return A.H.useEffectEvent(P)},Et.useId=function(){return A.H.useId()},Et.useImperativeHandle=function(P,V,j){return A.H.useImperativeHandle(P,V,j)},Et.useInsertionEffect=function(P,V){return A.H.useInsertionEffect(P,V)},Et.useLayoutEffect=function(P,V){return A.H.useLayoutEffect(P,V)},Et.useMemo=function(P,V){return A.H.useMemo(P,V)},Et.useOptimistic=function(P,V){return A.H.useOptimistic(P,V)},Et.useReducer=function(P,V,j){return A.H.useReducer(P,V,j)},Et.useRef=function(P){return A.H.useRef(P)},Et.useState=function(P){return A.H.useState(P)},Et.useSyncExternalStore=function(P,V,j){return A.H.useSyncExternalStore(P,V,j)},Et.useTransition=function(){return A.H.useTransition()},Et.version="19.2.6",Et}var s1;function Pc(){return s1||(s1=1,Qg.exports=lz()),Qg.exports}var v=Pc();const Xu=zc(v),Tv=iz({__proto__:null,default:Xu},[v]);var Jg={exports:{}},Mu={},eb={exports:{}},tb={};var o1;function uz(){return o1||(o1=1,(function(e){function t(U,W){var B=U.length;U.push(W);e:for(;0<B;){var K=B-1>>>1,O=U[K];if(0<s(O,W))U[K]=W,U[B]=O,B=K;else break e}}function n(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var W=U[0],B=U.pop();if(B!==W){U[0]=B;e:for(var K=0,O=U.length,P=O>>>1;K<P;){var V=2*(K+1)-1,j=U[V],Z=V+1,te=U[Z];if(0>s(j,B))Z<O&&0>s(te,j)?(U[K]=te,U[Z]=B,K=Z):(U[K]=j,U[V]=B,K=V);else if(Z<O&&0>s(te,B))U[K]=te,U[Z]=B,K=Z;else break e}}return W}function s(U,W){var B=U.sortIndex-W.sortIndex;return B!==0?B:U.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],f=[],h=1,m=null,b=3,y=!1,k=!1,S=!1,R=!1,T=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function _(U){for(var W=n(f);W!==null;){if(W.callback===null)r(f);else if(W.startTime<=U)r(f),W.sortIndex=W.expirationTime,t(d,W);else break;W=n(f)}}function D(U){if(S=!1,_(U),!k)if(n(d)!==null)k=!0,N||(N=!0,H());else{var W=n(f);W!==null&&F(D,W.startTime-U)}}var N=!1,A=-1,$=5,z=-1;function I(){return R?!0:!(e.unstable_now()-z<$)}function Y(){if(R=!1,N){var U=e.unstable_now();z=U;var W=!0;try{e:{k=!1,S&&(S=!1,E(A),A=-1),y=!0;var B=b;try{t:{for(_(U),m=n(d);m!==null&&!(m.expirationTime>U&&I());){var K=m.callback;if(typeof K=="function"){m.callback=null,b=m.priorityLevel;var O=K(m.expirationTime<=U);if(U=e.unstable_now(),typeof O=="function"){m.callback=O,_(U),W=!0;break t}m===n(d)&&r(d),_(U)}else r(d);m=n(d)}if(m!==null)W=!0;else{var P=n(f);P!==null&&F(D,P.startTime-U),W=!1}}break e}finally{m=null,b=B,y=!1}W=void 0}}finally{W?H():N=!1}}}var H;if(typeof C=="function")H=function(){C(Y)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,L=q.port2;q.port1.onmessage=Y,H=function(){L.postMessage(null)}}else H=function(){T(Y,0)};function F(U,W){A=T(function(){U(e.unstable_now())},W)}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(U){U.callback=null},e.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(U){switch(b){case 1:case 2:case 3:var W=3;break;default:W=b}var B=b;b=W;try{return U()}finally{b=B}},e.unstable_requestPaint=function(){R=!0},e.unstable_runWithPriority=function(U,W){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var B=b;b=U;try{return W()}finally{b=B}},e.unstable_scheduleCallback=function(U,W,B){var K=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?K+B:K):B=K,U){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=B+O,U={id:h++,callback:W,priorityLevel:U,startTime:B,expirationTime:O,sortIndex:-1},B>K?(U.sortIndex=B,t(f,U),n(d)===null&&U===n(f)&&(S?(E(A),A=-1):S=!0,F(D,B-K))):(U.sortIndex=O,t(d,U),k||y||(k=!0,N||(N=!0,H()))),U},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(U){var W=b;return function(){var B=b;b=W;try{return U.apply(this,arguments)}finally{b=B}}}})(tb)),tb}var a1;function cz(){return a1||(a1=1,eb.exports=uz()),eb.exports}var nb={exports:{}},ir={};var l1;function fz(){if(l1)return ir;l1=1;var e=Pc();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)f+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+d+"; visit "+f+" 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},s=Symbol.for("react.portal");function a(d,f,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:m==null?null:""+m,children:d,containerInfo:f,implementation:h}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return ir.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ir.createPortal=function(d,f){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return a(d,f,null,h)},ir.flushSync=function(d){var f=l.T,h=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=h,r.d.f()}},ir.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},ir.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},ir.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var h=f.as,m=c(h,f.crossOrigin),b=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;h==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:m,integrity:b,fetchPriority:y}):h==="script"&&r.d.X(d,{crossOrigin:m,integrity:b,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},ir.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=c(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},ir.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,m=c(h,f.crossOrigin);r.d.L(d,h,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},ir.preloadModule=function(d,f){if(typeof d=="string")if(f){var h=c(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},ir.requestFormReset=function(d){r.d.r(d)},ir.unstable_batchedUpdates=function(d,f){return d(f)},ir.useFormState=function(d,f,h){return l.H.useFormState(d,f,h)},ir.useFormStatus=function(){return l.H.useHostTransitionStatus()},ir.version="19.2.6",ir}var u1;function AC(){if(u1)return nb.exports;u1=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(),nb.exports=fz(),nb.exports}var c1;function dz(){if(c1)return Mu;c1=1;var e=cz(),t=Pc(),n=AC();function r(i){var o="https://react.dev/errors/"+i;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)o+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function a(i){var o=i,u=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(u=o.return),i=o.return;while(i)}return o.tag===3?u:null}function l(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function c(i){if(i.tag===31){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function d(i){if(a(i)!==i)throw Error(r(188))}function f(i){var o=i.alternate;if(!o){if(o=a(i),o===null)throw Error(r(188));return o!==i?null:i}for(var u=i,p=o;;){var x=u.return;if(x===null)break;var w=x.alternate;if(w===null){if(p=x.return,p!==null){u=p;continue}break}if(x.child===w.child){for(w=x.child;w;){if(w===u)return d(x),i;if(w===p)return d(x),o;w=w.sibling}throw Error(r(188))}if(u.return!==p.return)u=x,p=w;else{for(var M=!1,G=x.child;G;){if(G===u){M=!0,u=x,p=w;break}if(G===p){M=!0,p=x,u=w;break}G=G.sibling}if(!M){for(G=w.child;G;){if(G===u){M=!0,u=w,p=x;break}if(G===p){M=!0,p=w,u=x;break}G=G.sibling}if(!M)throw Error(r(189))}}if(u.alternate!==p)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?i:o}function h(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i;for(i=i.child;i!==null;){if(o=h(i),o!==null)return o;i=i.sibling}return null}var m=Object.assign,b=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),C=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),Y=Symbol.iterator;function H(i){return i===null||typeof i!="object"?null:(i=Y&&i[Y]||i["@@iterator"],typeof i=="function"?i:null)}var q=Symbol.for("react.client.reference");function L(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===q?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case S:return"Fragment";case T:return"Profiler";case R:return"StrictMode";case D:return"Suspense";case N:return"SuspenseList";case z:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case k:return"Portal";case C:return i.displayName||"Context";case E:return(i._context.displayName||"Context")+".Consumer";case _:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case A:return o=i.displayName||null,o!==null?o:L(i.type)||"Memo";case $:o=i._payload,i=i._init;try{return L(i(o))}catch{}}return null}var F=Array.isArray,U=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B={pending:!1,data:null,method:null,action:null},K=[],O=-1;function P(i){return{current:i}}function V(i){0>O||(i.current=K[O],K[O]=null,O--)}function j(i,o){O++,K[O]=i.current,i.current=o}var Z=P(null),te=P(null),se=P(null),ue=P(null);function le(i,o){switch(j(se,o),j(te,i),j(Z,null),o.nodeType){case 9:case 11:i=(i=o.documentElement)&&(i=i.namespaceURI)?Tw(i):0;break;default:if(i=o.tagName,o=o.namespaceURI)o=Tw(o),i=Rw(o,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}V(Z),j(Z,i)}function fe(){V(Z),V(te),V(se)}function ge(i){i.memoizedState!==null&&j(ue,i);var o=Z.current,u=Rw(o,i.type);o!==u&&(j(te,i),j(Z,u))}function _e(i){te.current===i&&(V(Z),V(te)),ue.current===i&&(V(ue),Cu._currentValue=B)}var oe,ye;function Se(i){if(oe===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);oe=o&&o[1]||"",ye=-1<u.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+oe+i+ye}var Oe=!1;function we(i,o){if(!i||Oe)return"";Oe=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(o){var Ae=function(){throw Error()};if(Object.defineProperty(Ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ae,[])}catch(ve){var me=ve}Reflect.construct(i,[],Ae)}else{try{Ae.call()}catch(ve){me=ve}i.call(Ae.prototype)}}else{try{throw Error()}catch(ve){me=ve}(Ae=i())&&typeof Ae.catch=="function"&&Ae.catch(function(){})}}catch(ve){if(ve&&me&&typeof ve.stack=="string")return[ve.stack,me.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var x=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");x&&x.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=p.DetermineComponentFrameRoot(),M=w[0],G=w[1];if(M&&G){var Q=M.split(`
|
|
4
|
+
`),pe=G.split(`
|
|
5
|
+
`);for(x=p=0;p<Q.length&&!Q[p].includes("DetermineComponentFrameRoot");)p++;for(;x<pe.length&&!pe[x].includes("DetermineComponentFrameRoot");)x++;if(p===Q.length||x===pe.length)for(p=Q.length-1,x=pe.length-1;1<=p&&0<=x&&Q[p]!==pe[x];)x--;for(;1<=p&&0<=x;p--,x--)if(Q[p]!==pe[x]){if(p!==1||x!==1)do if(p--,x--,0>x||Q[p]!==pe[x]){var Te=`
|
|
6
|
+
`+Q[p].replace(" at new "," at ");return i.displayName&&Te.includes("<anonymous>")&&(Te=Te.replace("<anonymous>",i.displayName)),Te}while(1<=p&&0<=x);break}}}finally{Oe=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?Se(u):""}function ke(i,o){switch(i.tag){case 26:case 27:case 5:return Se(i.type);case 16:return Se("Lazy");case 13:return i.child!==o&&o!==null?Se("Suspense Fallback"):Se("Suspense");case 19:return Se("SuspenseList");case 0:case 15:return we(i.type,!1);case 11:return we(i.type.render,!1);case 1:return we(i.type,!0);case 31:return Se("Activity");default:return""}}function De(i){try{var o="",u=null;do o+=ke(i,u),u=i,i=i.return;while(i);return o}catch(p){return`
|
|
7
|
+
Error generating stack: `+p.message+`
|
|
8
|
+
`+p.stack}}var Me=Object.prototype.hasOwnProperty,Le=e.unstable_scheduleCallback,He=e.unstable_cancelCallback,be=e.unstable_shouldYield,Re=e.unstable_requestPaint,ee=e.unstable_now,ce=e.unstable_getCurrentPriorityLevel,J=e.unstable_ImmediatePriority,re=e.unstable_UserBlockingPriority,xe=e.unstable_NormalPriority,$e=e.unstable_LowPriority,Xe=e.unstable_IdlePriority,Ye=e.log,ht=e.unstable_setDisableYieldValue,Qe=null,yt=null;function kt(i){if(typeof Ye=="function"&&ht(i),yt&&typeof yt.setStrictMode=="function")try{yt.setStrictMode(Qe,i)}catch{}}var tt=Math.clz32?Math.clz32:st,Tt=Math.log,_t=Math.LN2;function st(i){return i>>>=0,i===0?32:31-(Tt(i)/_t|0)|0}var vt=256,Dt=262144,Pt=4194304;function At(i){var o=i&42;if(o!==0)return o;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 X(i,o,u){var p=i.pendingLanes;if(p===0)return 0;var x=0,w=i.suspendedLanes,M=i.pingedLanes;i=i.warmLanes;var G=p&134217727;return G!==0?(p=G&~w,p!==0?x=At(p):(M&=G,M!==0?x=At(M):u||(u=G&~i,u!==0&&(x=At(u))))):(G=p&~w,G!==0?x=At(G):M!==0?x=At(M):u||(u=p&~i,u!==0&&(x=At(u)))),x===0?0:o!==0&&o!==x&&(o&w)===0&&(w=x&-x,u=o&-o,w>=u||w===32&&(u&4194048)!==0)?o:x}function he(i,o){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&o)===0}function je(i,o){switch(i){case 1:case 2:case 4:case 8:case 64:return o+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 o+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 Ze(){var i=Pt;return Pt<<=1,(Pt&62914560)===0&&(Pt=4194304),i}function St(i){for(var o=[],u=0;31>u;u++)o.push(i);return o}function at(i,o){i.pendingLanes|=o,o!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function qe(i,o,u,p,x,w){var M=i.pendingLanes;i.pendingLanes=u,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=u,i.entangledLanes&=u,i.errorRecoveryDisabledLanes&=u,i.shellSuspendCounter=0;var G=i.entanglements,Q=i.expirationTimes,pe=i.hiddenUpdates;for(u=M&~u;0<u;){var Te=31-tt(u),Ae=1<<Te;G[Te]=0,Q[Te]=-1;var me=pe[Te];if(me!==null)for(pe[Te]=null,Te=0;Te<me.length;Te++){var ve=me[Te];ve!==null&&(ve.lane&=-536870913)}u&=~Ae}p!==0&&Ee(i,p,0),w!==0&&x===0&&i.tag!==0&&(i.suspendedLanes|=w&~(M&~o))}function Ee(i,o,u){i.pendingLanes|=o,i.suspendedLanes&=~o;var p=31-tt(o);i.entangledLanes|=o,i.entanglements[p]=i.entanglements[p]|1073741824|u&261930}function Ue(i,o){var u=i.entangledLanes|=o;for(i=i.entanglements;u;){var p=31-tt(u),x=1<<p;x&o|i[p]&o&&(i[p]|=o),u&=~x}}function ze(i,o){var u=o&-o;return u=(u&42)!==0?1:Ne(u),(u&(i.suspendedLanes|o))!==0?0:u}function Ne(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 Ie(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function ut(){var i=W.p;return i!==0?i:(i=window.event,i===void 0?32:Yw(i.type))}function Be(i,o){var u=W.p;try{return W.p=i,o()}finally{W.p=u}}var Rt=Math.random().toString(36).slice(2),wt="__reactFiber$"+Rt,$t="__reactProps$"+Rt,Rn="__reactContainer$"+Rt,jr="__reactEvents$"+Rt,zr="__reactListeners$"+Rt,Sn="__reactHandles$"+Rt,ga="__reactResources$"+Rt,Wi="__reactMarker$"+Rt;function Eo(i){delete i[wt],delete i[$t],delete i[jr],delete i[zr],delete i[Sn]}function hr(i){var o=i[wt];if(o)return o;for(var u=i.parentNode;u;){if(o=u[Rn]||u[wt]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(i=Iw(i);i!==null;){if(u=i[wt])return u;i=Iw(i)}return o}i=u,u=i.parentNode}return null}function Ki(i){if(i=i[wt]||i[Rn]){var o=i.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return i}return null}function Ns(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i.stateNode;throw Error(r(33))}function As(i){var o=i[ga];return o||(o=i[ga]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function zn(i){i[Wi]=!0}var af=new Set,To={};function Yi(i,o){Pe(i,o),Pe(i+"Capture",o)}function Pe(i,o){for(To[i]=o,i=0;i<o.length;i++)af.add(o[i])}var ot=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]*$"),Lt={},rn={};function Mn(i){return Me.call(rn,i)?!0:Me.call(Lt,i)?!1:ot.test(i)?rn[i]=!0:(Lt[i]=!0,!1)}function rr(i,o,u){if(Mn(o))if(u===null)i.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":i.removeAttribute(o);return;case"boolean":var p=o.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){i.removeAttribute(o);return}}i.setAttribute(o,""+u)}}function Pr(i,o,u){if(u===null)i.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(o);return}i.setAttribute(o,""+u)}}function kr(i,o,u,p){if(p===null)i.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttributeNS(o,u,""+p)}}function yn(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function $r(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function lf(i,o,u){var p=Object.getOwnPropertyDescriptor(i.constructor.prototype,o);if(!i.hasOwnProperty(o)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var x=p.get,w=p.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return x.call(this)},set:function(M){u=""+M,w.call(this,M)}}),Object.defineProperty(i,o,{enumerable:p.enumerable}),{getValue:function(){return u},setValue:function(M){u=""+M},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function ba(i){if(!i._valueTracker){var o=$r(i)?"checked":"value";i._valueTracker=lf(i,o,""+i[o])}}function Bl(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var u=o.getValue(),p="";return i&&(p=$r(i)?i.checked?"true":"false":i.value),i=p,i!==u?(o.setValue(i),!0):!1}function ya(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 Xh=/[\n"\\]/g;function Sr(i){return i.replace(Xh,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Fl(i,o,u,p,x,w,M,G){i.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?i.type=M:i.removeAttribute("type"),o!=null?M==="number"?(o===0&&i.value===""||i.value!=o)&&(i.value=""+yn(o)):i.value!==""+yn(o)&&(i.value=""+yn(o)):M!=="submit"&&M!=="reset"||i.removeAttribute("value"),o!=null?va(i,M,yn(o)):u!=null?va(i,M,yn(u)):p!=null&&i.removeAttribute("value"),x==null&&w!=null&&(i.defaultChecked=!!w),x!=null&&(i.checked=x&&typeof x!="function"&&typeof x!="symbol"),G!=null&&typeof G!="function"&&typeof G!="symbol"&&typeof G!="boolean"?i.name=""+yn(G):i.removeAttribute("name")}function Ro(i,o,u,p,x,w,M,G){if(w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(i.type=w),o!=null||u!=null){if(!(w!=="submit"&&w!=="reset"||o!=null)){ba(i);return}u=u!=null?""+yn(u):"",o=o!=null?""+yn(o):u,G||o===i.value||(i.value=o),i.defaultValue=o}p=p??x,p=typeof p!="function"&&typeof p!="symbol"&&!!p,i.checked=G?i.checked:!!p,i.defaultChecked=!!p,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(i.name=M),ba(i)}function va(i,o,u){o==="number"&&ya(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function Xn(i,o,u,p){if(i=i.options,o){o={};for(var x=0;x<u.length;x++)o["$"+u[x]]=!0;for(u=0;u<i.length;u++)x=o.hasOwnProperty("$"+i[u].value),i[u].selected!==x&&(i[u].selected=x),x&&p&&(i[u].defaultSelected=!0)}else{for(u=""+yn(u),o=null,x=0;x<i.length;x++){if(i[x].value===u){i[x].selected=!0,p&&(i[x].defaultSelected=!0);return}o!==null||i[x].disabled||(o=i[x])}o!==null&&(o.selected=!0)}}function uf(i,o,u){if(o!=null&&(o=""+yn(o),o!==i.value&&(i.value=o),u==null)){i.defaultValue!==o&&(i.defaultValue=o);return}i.defaultValue=u!=null?""+yn(u):""}function xa(i,o,u,p){if(o==null){if(p!=null){if(u!=null)throw Error(r(92));if(F(p)){if(1<p.length)throw Error(r(93));p=p[0]}u=p}u==null&&(u=""),o=u}u=yn(o),i.defaultValue=u,p=i.textContent,p===u&&p!==""&&p!==null&&(i.value=p),ba(i)}function bt(i,o){if(o){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=o;return}}i.textContent=o}var cf=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 Pn(i,o,u){var p=o.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?p?i.setProperty(o,""):o==="float"?i.cssFloat="":i[o]="":p?i.setProperty(o,u):typeof u!="number"||u===0||cf.has(o)?o==="float"?i.cssFloat=u:i[o]=(""+u).trim():i[o]=u+"px"}function sn(i,o,u){if(o!=null&&typeof o!="object")throw Error(r(62));if(i=i.style,u!=null){for(var p in u)!u.hasOwnProperty(p)||o!=null&&o.hasOwnProperty(p)||(p.indexOf("--")===0?i.setProperty(p,""):p==="float"?i.cssFloat="":i[p]="");for(var x in o)p=o[x],o.hasOwnProperty(x)&&u[x]!==p&&Pn(i,x,p)}else for(var w in o)o.hasOwnProperty(w)&&Pn(i,w,o[w])}function Os(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 Xi=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"]]),Ul=/^[\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 Ms(i){return Ul.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Ve(){}var nt=null;function Ct(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var qt=null,Cn=null;function Qr(i){var o=Ki(i);if(o&&(i=o.stateNode)){var u=i[$t]||null;e:switch(i=o.stateNode,o.type){case"input":if(Fl(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),o=u.name,u.type==="radio"&&o!=null){for(u=i;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Sr(""+o)+'"][type="radio"]'),o=0;o<u.length;o++){var p=u[o];if(p!==i&&p.form===i.form){var x=p[$t]||null;if(!x)throw Error(r(90));Fl(p,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name)}}for(o=0;o<u.length;o++)p=u[o],p.form===i.form&&Bl(p)}break e;case"textarea":uf(i,u.value,u.defaultValue);break e;case"select":o=u.value,o!=null&&Xn(i,!!u.multiple,o,!1)}}}var ql=!1;function ff(i,o,u){if(ql)return i(o,u);ql=!0;try{var p=i(o);return p}finally{if(ql=!1,(qt!==null||Cn!==null)&&(Qf(),qt&&(o=qt,i=Cn,Cn=qt=null,Qr(o),i)))for(o=0;o<i.length;o++)Qr(i[o])}}function Hl(i,o){var u=i.stateNode;if(u===null)return null;var p=u[$t]||null;if(p===null)return null;u=p[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(i=i.type,p=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!p;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(r(231,o,typeof u));return u}var Zi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zh=!1;if(Zi)try{var Gl={};Object.defineProperty(Gl,"passive",{get:function(){Zh=!0}}),window.addEventListener("test",Gl,Gl),window.removeEventListener("test",Gl,Gl)}catch{Zh=!1}var Is=null,Qh=null,df=null;function Rk(){if(df)return df;var i,o=Qh,u=o.length,p,x="value"in Is?Is.value:Is.textContent,w=x.length;for(i=0;i<u&&o[i]===x[i];i++);var M=u-i;for(p=1;p<=M&&o[u-p]===x[w-p];p++);return df=x.slice(i,1<p?1-p:void 0)}function pf(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function hf(){return!0}function Ck(){return!1}function wr(i){function o(u,p,x,w,M){this._reactName=u,this._targetInst=x,this.type=p,this.nativeEvent=w,this.target=M,this.currentTarget=null;for(var G in i)i.hasOwnProperty(G)&&(u=i[G],this[G]=u?u(w):w[G]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?hf:Ck,this.isPropagationStopped=Ck,this}return m(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=hf)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=hf)},persist:function(){},isPersistent:hf}),o}var Co={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mf=wr(Co),Vl=m({},Co,{view:0,detail:0}),nL=wr(Vl),Jh,em,Wl,gf=m({},Vl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:nm,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!==Wl&&(Wl&&i.type==="mousemove"?(Jh=i.screenX-Wl.screenX,em=i.screenY-Wl.screenY):em=Jh=0,Wl=i),Jh)},movementY:function(i){return"movementY"in i?i.movementY:em}}),_k=wr(gf),rL=m({},gf,{dataTransfer:0}),iL=wr(rL),sL=m({},Vl,{relatedTarget:0}),tm=wr(sL),oL=m({},Co,{animationName:0,elapsedTime:0,pseudoElement:0}),aL=wr(oL),lL=m({},Co,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),uL=wr(lL),cL=m({},Co,{data:0}),Nk=wr(cL),fL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dL={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"},pL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hL(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=pL[i])?!!o[i]:!1}function nm(){return hL}var mL=m({},Vl,{key:function(i){if(i.key){var o=fL[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=pf(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?dL[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:nm,charCode:function(i){return i.type==="keypress"?pf(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?pf(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),gL=wr(mL),bL=m({},gf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ak=wr(bL),yL=m({},Vl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:nm}),vL=wr(yL),xL=m({},Co,{propertyName:0,elapsedTime:0,pseudoElement:0}),kL=wr(xL),SL=m({},gf,{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}),wL=wr(SL),EL=m({},Co,{newState:0,oldState:0}),TL=wr(EL),RL=[9,13,27,32],rm=Zi&&"CompositionEvent"in window,Kl=null;Zi&&"documentMode"in document&&(Kl=document.documentMode);var CL=Zi&&"TextEvent"in window&&!Kl,Ok=Zi&&(!rm||Kl&&8<Kl&&11>=Kl),Mk=" ",Ik=!1;function Dk(i,o){switch(i){case"keyup":return RL.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lk(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var ka=!1;function _L(i,o){switch(i){case"compositionend":return Lk(o);case"keypress":return o.which!==32?null:(Ik=!0,Mk);case"textInput":return i=o.data,i===Mk&&Ik?null:i;default:return null}}function NL(i,o){if(ka)return i==="compositionend"||!rm&&Dk(i,o)?(i=Rk(),df=Qh=Is=null,ka=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return Ok&&o.locale!=="ko"?null:o.data;default:return null}}var AL={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 jk(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!AL[i.type]:o==="textarea"}function zk(i,o,u,p){qt?Cn?Cn.push(p):Cn=[p]:qt=p,o=sd(o,"onChange"),0<o.length&&(u=new mf("onChange","change",null,u,p),i.push({event:u,listeners:o}))}var Yl=null,Xl=null;function OL(i){vw(i,0)}function bf(i){var o=Ns(i);if(Bl(o))return i}function Pk(i,o){if(i==="change")return o}var $k=!1;if(Zi){var im;if(Zi){var sm="oninput"in document;if(!sm){var Bk=document.createElement("div");Bk.setAttribute("oninput","return;"),sm=typeof Bk.oninput=="function"}im=sm}else im=!1;$k=im&&(!document.documentMode||9<document.documentMode)}function Fk(){Yl&&(Yl.detachEvent("onpropertychange",Uk),Xl=Yl=null)}function Uk(i){if(i.propertyName==="value"&&bf(Xl)){var o=[];zk(o,Xl,i,Ct(i)),ff(OL,o)}}function ML(i,o,u){i==="focusin"?(Fk(),Yl=o,Xl=u,Yl.attachEvent("onpropertychange",Uk)):i==="focusout"&&Fk()}function IL(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return bf(Xl)}function DL(i,o){if(i==="click")return bf(o)}function LL(i,o){if(i==="input"||i==="change")return bf(o)}function jL(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var Br=typeof Object.is=="function"?Object.is:jL;function Zl(i,o){if(Br(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var u=Object.keys(i),p=Object.keys(o);if(u.length!==p.length)return!1;for(p=0;p<u.length;p++){var x=u[p];if(!Me.call(o,x)||!Br(i[x],o[x]))return!1}return!0}function qk(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Hk(i,o){var u=qk(i);i=0;for(var p;u;){if(u.nodeType===3){if(p=i+u.textContent.length,i<=o&&p>=o)return{node:u,offset:o-i};i=p}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=qk(u)}}function Gk(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?Gk(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function Vk(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var o=ya(i.document);o instanceof i.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch{u=!1}if(u)i=o.contentWindow;else break;o=ya(i.document)}return o}function om(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}var zL=Zi&&"documentMode"in document&&11>=document.documentMode,Sa=null,am=null,Ql=null,lm=!1;function Wk(i,o,u){var p=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;lm||Sa==null||Sa!==ya(p)||(p=Sa,"selectionStart"in p&&om(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),Ql&&Zl(Ql,p)||(Ql=p,p=sd(am,"onSelect"),0<p.length&&(o=new mf("onSelect","select",null,o,u),i.push({event:o,listeners:p}),o.target=Sa)))}function _o(i,o){var u={};return u[i.toLowerCase()]=o.toLowerCase(),u["Webkit"+i]="webkit"+o,u["Moz"+i]="moz"+o,u}var wa={animationend:_o("Animation","AnimationEnd"),animationiteration:_o("Animation","AnimationIteration"),animationstart:_o("Animation","AnimationStart"),transitionrun:_o("Transition","TransitionRun"),transitionstart:_o("Transition","TransitionStart"),transitioncancel:_o("Transition","TransitionCancel"),transitionend:_o("Transition","TransitionEnd")},um={},Kk={};Zi&&(Kk=document.createElement("div").style,"AnimationEvent"in window||(delete wa.animationend.animation,delete wa.animationiteration.animation,delete wa.animationstart.animation),"TransitionEvent"in window||delete wa.transitionend.transition);function No(i){if(um[i])return um[i];if(!wa[i])return i;var o=wa[i],u;for(u in o)if(o.hasOwnProperty(u)&&u in Kk)return um[i]=o[u];return i}var Yk=No("animationend"),Xk=No("animationiteration"),Zk=No("animationstart"),PL=No("transitionrun"),$L=No("transitionstart"),BL=No("transitioncancel"),Qk=No("transitionend"),Jk=new Map,cm="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(" ");cm.push("scrollEnd");function mi(i,o){Jk.set(i,o),Yi(o,[i])}var yf=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=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(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Jr=[],Ea=0,fm=0;function vf(){for(var i=Ea,o=fm=Ea=0;o<i;){var u=Jr[o];Jr[o++]=null;var p=Jr[o];Jr[o++]=null;var x=Jr[o];Jr[o++]=null;var w=Jr[o];if(Jr[o++]=null,p!==null&&x!==null){var M=p.pending;M===null?x.next=x:(x.next=M.next,M.next=x),p.pending=x}w!==0&&e0(u,x,w)}}function xf(i,o,u,p){Jr[Ea++]=i,Jr[Ea++]=o,Jr[Ea++]=u,Jr[Ea++]=p,fm|=p,i.lanes|=p,i=i.alternate,i!==null&&(i.lanes|=p)}function dm(i,o,u,p){return xf(i,o,u,p),kf(i)}function Ao(i,o){return xf(i,null,null,o),kf(i)}function e0(i,o,u){i.lanes|=u;var p=i.alternate;p!==null&&(p.lanes|=u);for(var x=!1,w=i.return;w!==null;)w.childLanes|=u,p=w.alternate,p!==null&&(p.childLanes|=u),w.tag===22&&(i=w.stateNode,i===null||i._visibility&1||(x=!0)),i=w,w=w.return;return i.tag===3?(w=i.stateNode,x&&o!==null&&(x=31-tt(u),i=w.hiddenUpdates,p=i[x],p===null?i[x]=[o]:p.push(o),o.lane=u|536870912),w):null}function kf(i){if(50<xu)throw xu=0,kg=null,Error(r(185));for(var o=i.return;o!==null;)i=o,o=i.return;return i.tag===3?i.stateNode:null}var Ta={};function FL(i,o,u,p){this.tag=i,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fr(i,o,u,p){return new FL(i,o,u,p)}function pm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Qi(i,o){var u=i.alternate;return u===null?(u=Fr(i.tag,o,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=o,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&65011712,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,o=i.dependencies,u.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u.refCleanup=i.refCleanup,u}function t0(i,o){i.flags&=65011714;var u=i.alternate;return u===null?(i.childLanes=0,i.lanes=o,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type,o=u.dependencies,i.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),i}function Sf(i,o,u,p,x,w){var M=0;if(p=i,typeof i=="function")pm(i)&&(M=1);else if(typeof i=="string")M=Vj(i,u,Z.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case z:return i=Fr(31,u,o,x),i.elementType=z,i.lanes=w,i;case S:return Oo(u.children,x,w,o);case R:M=8,x|=24;break;case T:return i=Fr(12,u,o,x|2),i.elementType=T,i.lanes=w,i;case D:return i=Fr(13,u,o,x),i.elementType=D,i.lanes=w,i;case N:return i=Fr(19,u,o,x),i.elementType=N,i.lanes=w,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case C:M=10;break e;case E:M=9;break e;case _:M=11;break e;case A:M=14;break e;case $:M=16,p=null;break e}M=29,u=Error(r(130,i===null?"null":typeof i,"")),p=null}return o=Fr(M,u,o,x),o.elementType=i,o.type=p,o.lanes=w,o}function Oo(i,o,u,p){return i=Fr(7,i,p,o),i.lanes=u,i}function hm(i,o,u){return i=Fr(6,i,null,o),i.lanes=u,i}function n0(i){var o=Fr(18,null,null,0);return o.stateNode=i,o}function mm(i,o,u){return o=Fr(4,i.children!==null?i.children:[],i.key,o),o.lanes=u,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}var r0=new WeakMap;function ei(i,o){if(typeof i=="object"&&i!==null){var u=r0.get(i);return u!==void 0?u:(o={value:i,source:o,stack:De(o)},r0.set(i,o),o)}return{value:i,source:o,stack:De(o)}}var Ra=[],Ca=0,wf=null,Jl=0,ti=[],ni=0,Ds=null,Ci=1,_i="";function Ji(i,o){Ra[Ca++]=Jl,Ra[Ca++]=wf,wf=i,Jl=o}function i0(i,o,u){ti[ni++]=Ci,ti[ni++]=_i,ti[ni++]=Ds,Ds=i;var p=Ci;i=_i;var x=32-tt(p)-1;p&=~(1<<x),u+=1;var w=32-tt(o)+x;if(30<w){var M=x-x%5;w=(p&(1<<M)-1).toString(32),p>>=M,x-=M,Ci=1<<32-tt(o)+x|u<<x|p,_i=w+i}else Ci=1<<w|u<<x|p,_i=i}function gm(i){i.return!==null&&(Ji(i,1),i0(i,1,0))}function bm(i){for(;i===wf;)wf=Ra[--Ca],Ra[Ca]=null,Jl=Ra[--Ca],Ra[Ca]=null;for(;i===Ds;)Ds=ti[--ni],ti[ni]=null,_i=ti[--ni],ti[ni]=null,Ci=ti[--ni],ti[ni]=null}function s0(i,o){ti[ni++]=Ci,ti[ni++]=_i,ti[ni++]=Ds,Ci=o.id,_i=o.overflow,Ds=i}var Zn=null,wn=null,Wt=!1,Ls=null,ri=!1,ym=Error(r(519));function js(i){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw eu(ei(o,i)),ym}function o0(i){var o=i.stateNode,u=i.type,p=i.memoizedProps;switch(o[wt]=i,o[$t]=p,u){case"dialog":Ft("cancel",o),Ft("close",o);break;case"iframe":case"object":case"embed":Ft("load",o);break;case"video":case"audio":for(u=0;u<Su.length;u++)Ft(Su[u],o);break;case"source":Ft("error",o);break;case"img":case"image":case"link":Ft("error",o),Ft("load",o);break;case"details":Ft("toggle",o);break;case"input":Ft("invalid",o),Ro(o,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":Ft("invalid",o);break;case"textarea":Ft("invalid",o),xa(o,p.value,p.defaultValue,p.children)}u=p.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||o.textContent===""+u||p.suppressHydrationWarning===!0||ww(o.textContent,u)?(p.popover!=null&&(Ft("beforetoggle",o),Ft("toggle",o)),p.onScroll!=null&&Ft("scroll",o),p.onScrollEnd!=null&&Ft("scrollend",o),p.onClick!=null&&(o.onclick=Ve),o=!0):o=!1,o||js(i,!0)}function a0(i){for(Zn=i.return;Zn;)switch(Zn.tag){case 5:case 31:case 13:ri=!1;return;case 27:case 3:ri=!0;return;default:Zn=Zn.return}}function _a(i){if(i!==Zn)return!1;if(!Wt)return a0(i),Wt=!0,!1;var o=i.tag,u;if((u=o!==3&&o!==27)&&((u=o===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||jg(i.type,i.memoizedProps)),u=!u),u&&wn&&js(i),a0(i),o===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));wn=Mw(i)}else if(o===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));wn=Mw(i)}else o===27?(o=wn,Xs(i.type)?(i=Fg,Fg=null,wn=i):wn=o):wn=Zn?si(i.stateNode.nextSibling):null;return!0}function Mo(){wn=Zn=null,Wt=!1}function vm(){var i=Ls;return i!==null&&(Cr===null?Cr=i:Cr.push.apply(Cr,i),Ls=null),i}function eu(i){Ls===null?Ls=[i]:Ls.push(i)}var xm=P(null),Io=null,es=null;function zs(i,o,u){j(xm,o._currentValue),o._currentValue=u}function ts(i){i._currentValue=xm.current,V(xm)}function km(i,o,u){for(;i!==null;){var p=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,p!==null&&(p.childLanes|=o)):p!==null&&(p.childLanes&o)!==o&&(p.childLanes|=o),i===u)break;i=i.return}}function Sm(i,o,u,p){var x=i.child;for(x!==null&&(x.return=i);x!==null;){var w=x.dependencies;if(w!==null){var M=x.child;w=w.firstContext;e:for(;w!==null;){var G=w;w=x;for(var Q=0;Q<o.length;Q++)if(G.context===o[Q]){w.lanes|=u,G=w.alternate,G!==null&&(G.lanes|=u),km(w.return,u,i),p||(M=null);break e}w=G.next}}else if(x.tag===18){if(M=x.return,M===null)throw Error(r(341));M.lanes|=u,w=M.alternate,w!==null&&(w.lanes|=u),km(M,u,i),M=null}else M=x.child;if(M!==null)M.return=x;else for(M=x;M!==null;){if(M===i){M=null;break}if(x=M.sibling,x!==null){x.return=M.return,M=x;break}M=M.return}x=M}}function Na(i,o,u,p){i=null;for(var x=o,w=!1;x!==null;){if(!w){if((x.flags&524288)!==0)w=!0;else if((x.flags&262144)!==0)break}if(x.tag===10){var M=x.alternate;if(M===null)throw Error(r(387));if(M=M.memoizedProps,M!==null){var G=x.type;Br(x.pendingProps.value,M.value)||(i!==null?i.push(G):i=[G])}}else if(x===ue.current){if(M=x.alternate,M===null)throw Error(r(387));M.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(i!==null?i.push(Cu):i=[Cu])}x=x.return}i!==null&&Sm(o,i,u,p),o.flags|=262144}function Ef(i){for(i=i.firstContext;i!==null;){if(!Br(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Do(i){Io=i,es=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Qn(i){return l0(Io,i)}function Tf(i,o){return Io===null&&Do(i),l0(i,o)}function l0(i,o){var u=o._currentValue;if(o={context:o,memoizedValue:u,next:null},es===null){if(i===null)throw Error(r(308));es=o,i.dependencies={lanes:0,firstContext:o},i.flags|=524288}else es=es.next=o;return u}var UL=typeof AbortController<"u"?AbortController:function(){var i=[],o=this.signal={aborted:!1,addEventListener:function(u,p){i.push(p)}};this.abort=function(){o.aborted=!0,i.forEach(function(u){return u()})}},qL=e.unstable_scheduleCallback,HL=e.unstable_NormalPriority,$n={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function wm(){return{controller:new UL,data:new Map,refCount:0}}function tu(i){i.refCount--,i.refCount===0&&qL(HL,function(){i.controller.abort()})}var nu=null,Em=0,Aa=0,Oa=null;function GL(i,o){if(nu===null){var u=nu=[];Em=0,Aa=Cg(),Oa={status:"pending",value:void 0,then:function(p){u.push(p)}}}return Em++,o.then(u0,u0),o}function u0(){if(--Em===0&&nu!==null){Oa!==null&&(Oa.status="fulfilled");var i=nu;nu=null,Aa=0,Oa=null;for(var o=0;o<i.length;o++)(0,i[o])()}}function VL(i,o){var u=[],p={status:"pending",value:null,reason:null,then:function(x){u.push(x)}};return i.then(function(){p.status="fulfilled",p.value=o;for(var x=0;x<u.length;x++)(0,u[x])(o)},function(x){for(p.status="rejected",p.reason=x,x=0;x<u.length;x++)(0,u[x])(void 0)}),p}var c0=U.S;U.S=function(i,o){WS=ee(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&GL(i,o),c0!==null&&c0(i,o)};var Lo=P(null);function Tm(){var i=Lo.current;return i!==null?i:mn.pooledCache}function Rf(i,o){o===null?j(Lo,Lo.current):j(Lo,o.pool)}function f0(){var i=Tm();return i===null?null:{parent:$n._currentValue,pool:i}}var Ma=Error(r(460)),Rm=Error(r(474)),Cf=Error(r(542)),_f={then:function(){}};function d0(i){return i=i.status,i==="fulfilled"||i==="rejected"}function p0(i,o,u){switch(u=i[u],u===void 0?i.push(o):u!==o&&(o.then(Ve,Ve),o=u),o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,m0(i),i;default:if(typeof o.status=="string")o.then(Ve,Ve);else{if(i=mn,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=o,i.status="pending",i.then(function(p){if(o.status==="pending"){var x=o;x.status="fulfilled",x.value=p}},function(p){if(o.status==="pending"){var x=o;x.status="rejected",x.reason=p}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,m0(i),i}throw zo=o,Ma}}function jo(i){try{var o=i._init;return o(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(zo=u,Ma):u}}var zo=null;function h0(){if(zo===null)throw Error(r(459));var i=zo;return zo=null,i}function m0(i){if(i===Ma||i===Cf)throw Error(r(483))}var Ia=null,ru=0;function Nf(i){var o=ru;return ru+=1,Ia===null&&(Ia=[]),p0(Ia,i,o)}function iu(i,o){o=o.props.ref,i.ref=o!==void 0?o:null}function Af(i,o){throw o.$$typeof===b?Error(r(525)):(i=Object.prototype.toString.call(o),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i)))}function g0(i){function o(ae,ie){if(i){var de=ae.deletions;de===null?(ae.deletions=[ie],ae.flags|=16):de.push(ie)}}function u(ae,ie){if(!i)return null;for(;ie!==null;)o(ae,ie),ie=ie.sibling;return null}function p(ae){for(var ie=new Map;ae!==null;)ae.key!==null?ie.set(ae.key,ae):ie.set(ae.index,ae),ae=ae.sibling;return ie}function x(ae,ie){return ae=Qi(ae,ie),ae.index=0,ae.sibling=null,ae}function w(ae,ie,de){return ae.index=de,i?(de=ae.alternate,de!==null?(de=de.index,de<ie?(ae.flags|=67108866,ie):de):(ae.flags|=67108866,ie)):(ae.flags|=1048576,ie)}function M(ae){return i&&ae.alternate===null&&(ae.flags|=67108866),ae}function G(ae,ie,de,Ce){return ie===null||ie.tag!==6?(ie=hm(de,ae.mode,Ce),ie.return=ae,ie):(ie=x(ie,de),ie.return=ae,ie)}function Q(ae,ie,de,Ce){var lt=de.type;return lt===S?Te(ae,ie,de.props.children,Ce,de.key):ie!==null&&(ie.elementType===lt||typeof lt=="object"&<!==null&<.$$typeof===$&&jo(lt)===ie.type)?(ie=x(ie,de.props),iu(ie,de),ie.return=ae,ie):(ie=Sf(de.type,de.key,de.props,null,ae.mode,Ce),iu(ie,de),ie.return=ae,ie)}function pe(ae,ie,de,Ce){return ie===null||ie.tag!==4||ie.stateNode.containerInfo!==de.containerInfo||ie.stateNode.implementation!==de.implementation?(ie=mm(de,ae.mode,Ce),ie.return=ae,ie):(ie=x(ie,de.children||[]),ie.return=ae,ie)}function Te(ae,ie,de,Ce,lt){return ie===null||ie.tag!==7?(ie=Oo(de,ae.mode,Ce,lt),ie.return=ae,ie):(ie=x(ie,de),ie.return=ae,ie)}function Ae(ae,ie,de){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return ie=hm(""+ie,ae.mode,de),ie.return=ae,ie;if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case y:return de=Sf(ie.type,ie.key,ie.props,null,ae.mode,de),iu(de,ie),de.return=ae,de;case k:return ie=mm(ie,ae.mode,de),ie.return=ae,ie;case $:return ie=jo(ie),Ae(ae,ie,de)}if(F(ie)||H(ie))return ie=Oo(ie,ae.mode,de,null),ie.return=ae,ie;if(typeof ie.then=="function")return Ae(ae,Nf(ie),de);if(ie.$$typeof===C)return Ae(ae,Tf(ae,ie),de);Af(ae,ie)}return null}function me(ae,ie,de,Ce){var lt=ie!==null?ie.key:null;if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return lt!==null?null:G(ae,ie,""+de,Ce);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case y:return de.key===lt?Q(ae,ie,de,Ce):null;case k:return de.key===lt?pe(ae,ie,de,Ce):null;case $:return de=jo(de),me(ae,ie,de,Ce)}if(F(de)||H(de))return lt!==null?null:Te(ae,ie,de,Ce,null);if(typeof de.then=="function")return me(ae,ie,Nf(de),Ce);if(de.$$typeof===C)return me(ae,ie,Tf(ae,de),Ce);Af(ae,de)}return null}function ve(ae,ie,de,Ce,lt){if(typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint")return ae=ae.get(de)||null,G(ie,ae,""+Ce,lt);if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case y:return ae=ae.get(Ce.key===null?de:Ce.key)||null,Q(ie,ae,Ce,lt);case k:return ae=ae.get(Ce.key===null?de:Ce.key)||null,pe(ie,ae,Ce,lt);case $:return Ce=jo(Ce),ve(ae,ie,de,Ce,lt)}if(F(Ce)||H(Ce))return ae=ae.get(de)||null,Te(ie,ae,Ce,lt,null);if(typeof Ce.then=="function")return ve(ae,ie,de,Nf(Ce),lt);if(Ce.$$typeof===C)return ve(ae,ie,de,Tf(ie,Ce),lt);Af(ie,Ce)}return null}function Je(ae,ie,de,Ce){for(var lt=null,Qt=null,rt=ie,Ot=ie=0,Gt=null;rt!==null&&Ot<de.length;Ot++){rt.index>Ot?(Gt=rt,rt=null):Gt=rt.sibling;var Jt=me(ae,rt,de[Ot],Ce);if(Jt===null){rt===null&&(rt=Gt);break}i&&rt&&Jt.alternate===null&&o(ae,rt),ie=w(Jt,ie,Ot),Qt===null?lt=Jt:Qt.sibling=Jt,Qt=Jt,rt=Gt}if(Ot===de.length)return u(ae,rt),Wt&&Ji(ae,Ot),lt;if(rt===null){for(;Ot<de.length;Ot++)rt=Ae(ae,de[Ot],Ce),rt!==null&&(ie=w(rt,ie,Ot),Qt===null?lt=rt:Qt.sibling=rt,Qt=rt);return Wt&&Ji(ae,Ot),lt}for(rt=p(rt);Ot<de.length;Ot++)Gt=ve(rt,ae,Ot,de[Ot],Ce),Gt!==null&&(i&&Gt.alternate!==null&&rt.delete(Gt.key===null?Ot:Gt.key),ie=w(Gt,ie,Ot),Qt===null?lt=Gt:Qt.sibling=Gt,Qt=Gt);return i&&rt.forEach(function(to){return o(ae,to)}),Wt&&Ji(ae,Ot),lt}function gt(ae,ie,de,Ce){if(de==null)throw Error(r(151));for(var lt=null,Qt=null,rt=ie,Ot=ie=0,Gt=null,Jt=de.next();rt!==null&&!Jt.done;Ot++,Jt=de.next()){rt.index>Ot?(Gt=rt,rt=null):Gt=rt.sibling;var to=me(ae,rt,Jt.value,Ce);if(to===null){rt===null&&(rt=Gt);break}i&&rt&&to.alternate===null&&o(ae,rt),ie=w(to,ie,Ot),Qt===null?lt=to:Qt.sibling=to,Qt=to,rt=Gt}if(Jt.done)return u(ae,rt),Wt&&Ji(ae,Ot),lt;if(rt===null){for(;!Jt.done;Ot++,Jt=de.next())Jt=Ae(ae,Jt.value,Ce),Jt!==null&&(ie=w(Jt,ie,Ot),Qt===null?lt=Jt:Qt.sibling=Jt,Qt=Jt);return Wt&&Ji(ae,Ot),lt}for(rt=p(rt);!Jt.done;Ot++,Jt=de.next())Jt=ve(rt,ae,Ot,Jt.value,Ce),Jt!==null&&(i&&Jt.alternate!==null&&rt.delete(Jt.key===null?Ot:Jt.key),ie=w(Jt,ie,Ot),Qt===null?lt=Jt:Qt.sibling=Jt,Qt=Jt);return i&&rt.forEach(function(rz){return o(ae,rz)}),Wt&&Ji(ae,Ot),lt}function cn(ae,ie,de,Ce){if(typeof de=="object"&&de!==null&&de.type===S&&de.key===null&&(de=de.props.children),typeof de=="object"&&de!==null){switch(de.$$typeof){case y:e:{for(var lt=de.key;ie!==null;){if(ie.key===lt){if(lt=de.type,lt===S){if(ie.tag===7){u(ae,ie.sibling),Ce=x(ie,de.props.children),Ce.return=ae,ae=Ce;break e}}else if(ie.elementType===lt||typeof lt=="object"&<!==null&<.$$typeof===$&&jo(lt)===ie.type){u(ae,ie.sibling),Ce=x(ie,de.props),iu(Ce,de),Ce.return=ae,ae=Ce;break e}u(ae,ie);break}else o(ae,ie);ie=ie.sibling}de.type===S?(Ce=Oo(de.props.children,ae.mode,Ce,de.key),Ce.return=ae,ae=Ce):(Ce=Sf(de.type,de.key,de.props,null,ae.mode,Ce),iu(Ce,de),Ce.return=ae,ae=Ce)}return M(ae);case k:e:{for(lt=de.key;ie!==null;){if(ie.key===lt)if(ie.tag===4&&ie.stateNode.containerInfo===de.containerInfo&&ie.stateNode.implementation===de.implementation){u(ae,ie.sibling),Ce=x(ie,de.children||[]),Ce.return=ae,ae=Ce;break e}else{u(ae,ie);break}else o(ae,ie);ie=ie.sibling}Ce=mm(de,ae.mode,Ce),Ce.return=ae,ae=Ce}return M(ae);case $:return de=jo(de),cn(ae,ie,de,Ce)}if(F(de))return Je(ae,ie,de,Ce);if(H(de)){if(lt=H(de),typeof lt!="function")throw Error(r(150));return de=lt.call(de),gt(ae,ie,de,Ce)}if(typeof de.then=="function")return cn(ae,ie,Nf(de),Ce);if(de.$$typeof===C)return cn(ae,ie,Tf(ae,de),Ce);Af(ae,de)}return typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint"?(de=""+de,ie!==null&&ie.tag===6?(u(ae,ie.sibling),Ce=x(ie,de),Ce.return=ae,ae=Ce):(u(ae,ie),Ce=hm(de,ae.mode,Ce),Ce.return=ae,ae=Ce),M(ae)):u(ae,ie)}return function(ae,ie,de,Ce){try{ru=0;var lt=cn(ae,ie,de,Ce);return Ia=null,lt}catch(rt){if(rt===Ma||rt===Cf)throw rt;var Qt=Fr(29,rt,null,ae.mode);return Qt.lanes=Ce,Qt.return=ae,Qt}}}var Po=g0(!0),b0=g0(!1),Ps=!1;function Cm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _m(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function $s(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Bs(i,o,u){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(tn&2)!==0){var x=p.pending;return x===null?o.next=o:(o.next=x.next,x.next=o),p.pending=o,o=kf(i),e0(i,null,u),o}return xf(i,p,o,u),kf(i)}function su(i,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194048)!==0)){var p=o.lanes;p&=i.pendingLanes,u|=p,o.lanes=u,Ue(i,u)}}function Nm(i,o){var u=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,u===p)){var x=null,w=null;if(u=u.firstBaseUpdate,u!==null){do{var M={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};w===null?x=w=M:w=w.next=M,u=u.next}while(u!==null);w===null?x=w=o:w=w.next=o}else x=w=o;u={baseState:p.baseState,firstBaseUpdate:x,lastBaseUpdate:w,shared:p.shared,callbacks:p.callbacks},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=o:i.next=o,u.lastBaseUpdate=o}var Am=!1;function ou(){if(Am){var i=Oa;if(i!==null)throw i}}function au(i,o,u,p){Am=!1;var x=i.updateQueue;Ps=!1;var w=x.firstBaseUpdate,M=x.lastBaseUpdate,G=x.shared.pending;if(G!==null){x.shared.pending=null;var Q=G,pe=Q.next;Q.next=null,M===null?w=pe:M.next=pe,M=Q;var Te=i.alternate;Te!==null&&(Te=Te.updateQueue,G=Te.lastBaseUpdate,G!==M&&(G===null?Te.firstBaseUpdate=pe:G.next=pe,Te.lastBaseUpdate=Q))}if(w!==null){var Ae=x.baseState;M=0,Te=pe=Q=null,G=w;do{var me=G.lane&-536870913,ve=me!==G.lane;if(ve?(Ht&me)===me:(p&me)===me){me!==0&&me===Aa&&(Am=!0),Te!==null&&(Te=Te.next={lane:0,tag:G.tag,payload:G.payload,callback:null,next:null});e:{var Je=i,gt=G;me=o;var cn=u;switch(gt.tag){case 1:if(Je=gt.payload,typeof Je=="function"){Ae=Je.call(cn,Ae,me);break e}Ae=Je;break e;case 3:Je.flags=Je.flags&-65537|128;case 0:if(Je=gt.payload,me=typeof Je=="function"?Je.call(cn,Ae,me):Je,me==null)break e;Ae=m({},Ae,me);break e;case 2:Ps=!0}}me=G.callback,me!==null&&(i.flags|=64,ve&&(i.flags|=8192),ve=x.callbacks,ve===null?x.callbacks=[me]:ve.push(me))}else ve={lane:me,tag:G.tag,payload:G.payload,callback:G.callback,next:null},Te===null?(pe=Te=ve,Q=Ae):Te=Te.next=ve,M|=me;if(G=G.next,G===null){if(G=x.shared.pending,G===null)break;ve=G,G=ve.next,ve.next=null,x.lastBaseUpdate=ve,x.shared.pending=null}}while(!0);Te===null&&(Q=Ae),x.baseState=Q,x.firstBaseUpdate=pe,x.lastBaseUpdate=Te,w===null&&(x.shared.lanes=0),Gs|=M,i.lanes=M,i.memoizedState=Ae}}function y0(i,o){if(typeof i!="function")throw Error(r(191,i));i.call(o)}function v0(i,o){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)y0(u[i],o)}var Da=P(null),Of=P(0);function x0(i,o){i=cs,j(Of,i),j(Da,o),cs=i|o.baseLanes}function Om(){j(Of,cs),j(Da,Da.current)}function Mm(){cs=Of.current,V(Da),V(Of)}var Ur=P(null),ii=null;function Fs(i){var o=i.alternate;j(In,In.current&1),j(Ur,i),ii===null&&(o===null||Da.current!==null||o.memoizedState!==null)&&(ii=i)}function Im(i){j(In,In.current),j(Ur,i),ii===null&&(ii=i)}function k0(i){i.tag===22?(j(In,In.current),j(Ur,i),ii===null&&(ii=i)):Us()}function Us(){j(In,In.current),j(Ur,Ur.current)}function qr(i){V(Ur),ii===i&&(ii=null),V(In)}var In=P(0);function Mf(i){for(var o=i;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||$g(u)||Bg(u)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var ns=0,Nt=null,ln=null,Bn=null,If=!1,La=!1,$o=!1,Df=0,lu=0,ja=null,WL=0;function An(){throw Error(r(321))}function Dm(i,o){if(o===null)return!1;for(var u=0;u<o.length&&u<i.length;u++)if(!Br(i[u],o[u]))return!1;return!0}function Lm(i,o,u,p,x,w){return ns=w,Nt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,U.H=i===null||i.memoizedState===null?iS:Xm,$o=!1,w=u(p,x),$o=!1,La&&(w=w0(o,u,p,x)),S0(i),w}function S0(i){U.H=fu;var o=ln!==null&&ln.next!==null;if(ns=0,Bn=ln=Nt=null,If=!1,lu=0,ja=null,o)throw Error(r(300));i===null||Fn||(i=i.dependencies,i!==null&&Ef(i)&&(Fn=!0))}function w0(i,o,u,p){Nt=i;var x=0;do{if(La&&(ja=null),lu=0,La=!1,25<=x)throw Error(r(301));if(x+=1,Bn=ln=null,i.updateQueue!=null){var w=i.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}U.H=sS,w=o(u,p)}while(La);return w}function KL(){var i=U.H,o=i.useState()[0];return o=typeof o.then=="function"?uu(o):o,i=i.useState()[0],(ln!==null?ln.memoizedState:null)!==i&&(Nt.flags|=1024),o}function jm(){var i=Df!==0;return Df=0,i}function zm(i,o,u){o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~u}function Pm(i){if(If){for(i=i.memoizedState;i!==null;){var o=i.queue;o!==null&&(o.pending=null),i=i.next}If=!1}ns=0,Bn=ln=Nt=null,La=!1,lu=Df=0,ja=null}function mr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bn===null?Nt.memoizedState=Bn=i:Bn=Bn.next=i,Bn}function Dn(){if(ln===null){var i=Nt.alternate;i=i!==null?i.memoizedState:null}else i=ln.next;var o=Bn===null?Nt.memoizedState:Bn.next;if(o!==null)Bn=o,ln=i;else{if(i===null)throw Nt.alternate===null?Error(r(467)):Error(r(310));ln=i,i={memoizedState:ln.memoizedState,baseState:ln.baseState,baseQueue:ln.baseQueue,queue:ln.queue,next:null},Bn===null?Nt.memoizedState=Bn=i:Bn=Bn.next=i}return Bn}function Lf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function uu(i){var o=lu;return lu+=1,ja===null&&(ja=[]),i=p0(ja,i,o),o=Nt,(Bn===null?o.memoizedState:Bn.next)===null&&(o=o.alternate,U.H=o===null||o.memoizedState===null?iS:Xm),i}function jf(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return uu(i);if(i.$$typeof===C)return Qn(i)}throw Error(r(438,String(i)))}function $m(i){var o=null,u=Nt.updateQueue;if(u!==null&&(o=u.memoCache),o==null){var p=Nt.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(o={data:p.data.map(function(x){return x.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),u===null&&(u=Lf(),Nt.updateQueue=u),u.memoCache=o,u=o.data[o.index],u===void 0)for(u=o.data[o.index]=Array(i),p=0;p<i;p++)u[p]=I;return o.index++,u}function rs(i,o){return typeof o=="function"?o(i):o}function zf(i){var o=Dn();return Bm(o,ln,i)}function Bm(i,o,u){var p=i.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=u;var x=i.baseQueue,w=p.pending;if(w!==null){if(x!==null){var M=x.next;x.next=w.next,w.next=M}o.baseQueue=x=w,p.pending=null}if(w=i.baseState,x===null)i.memoizedState=w;else{o=x.next;var G=M=null,Q=null,pe=o,Te=!1;do{var Ae=pe.lane&-536870913;if(Ae!==pe.lane?(Ht&Ae)===Ae:(ns&Ae)===Ae){var me=pe.revertLane;if(me===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null}),Ae===Aa&&(Te=!0);else if((ns&me)===me){pe=pe.next,me===Aa&&(Te=!0);continue}else Ae={lane:0,revertLane:pe.revertLane,gesture:null,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null},Q===null?(G=Q=Ae,M=w):Q=Q.next=Ae,Nt.lanes|=me,Gs|=me;Ae=pe.action,$o&&u(w,Ae),w=pe.hasEagerState?pe.eagerState:u(w,Ae)}else me={lane:Ae,revertLane:pe.revertLane,gesture:pe.gesture,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null},Q===null?(G=Q=me,M=w):Q=Q.next=me,Nt.lanes|=Ae,Gs|=Ae;pe=pe.next}while(pe!==null&&pe!==o);if(Q===null?M=w:Q.next=G,!Br(w,i.memoizedState)&&(Fn=!0,Te&&(u=Oa,u!==null)))throw u;i.memoizedState=w,i.baseState=M,i.baseQueue=Q,p.lastRenderedState=w}return x===null&&(p.lanes=0),[i.memoizedState,p.dispatch]}function Fm(i){var o=Dn(),u=o.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var p=u.dispatch,x=u.pending,w=o.memoizedState;if(x!==null){u.pending=null;var M=x=x.next;do w=i(w,M.action),M=M.next;while(M!==x);Br(w,o.memoizedState)||(Fn=!0),o.memoizedState=w,o.baseQueue===null&&(o.baseState=w),u.lastRenderedState=w}return[w,p]}function E0(i,o,u){var p=Nt,x=Dn(),w=Wt;if(w){if(u===void 0)throw Error(r(407));u=u()}else u=o();var M=!Br((ln||x).memoizedState,u);if(M&&(x.memoizedState=u,Fn=!0),x=x.queue,Hm(C0.bind(null,p,x,i),[i]),x.getSnapshot!==o||M||Bn!==null&&Bn.memoizedState.tag&1){if(p.flags|=2048,za(9,{destroy:void 0},R0.bind(null,p,x,u,o),null),mn===null)throw Error(r(349));w||(ns&127)!==0||T0(p,o,u)}return u}function T0(i,o,u){i.flags|=16384,i={getSnapshot:o,value:u},o=Nt.updateQueue,o===null?(o=Lf(),Nt.updateQueue=o,o.stores=[i]):(u=o.stores,u===null?o.stores=[i]:u.push(i))}function R0(i,o,u,p){o.value=u,o.getSnapshot=p,_0(o)&&N0(i)}function C0(i,o,u){return u(function(){_0(o)&&N0(i)})}function _0(i){var o=i.getSnapshot;i=i.value;try{var u=o();return!Br(i,u)}catch{return!0}}function N0(i){var o=Ao(i,2);o!==null&&_r(o,i,2)}function Um(i){var o=mr();if(typeof i=="function"){var u=i;if(i=u(),$o){kt(!0);try{u()}finally{kt(!1)}}}return o.memoizedState=o.baseState=i,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:i},o}function A0(i,o,u,p){return i.baseState=u,Bm(i,ln,typeof p=="function"?p:rs)}function YL(i,o,u,p,x){if(Bf(i))throw Error(r(485));if(i=o.action,i!==null){var w={payload:x,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){w.listeners.push(M)}};U.T!==null?u(!0):w.isTransition=!1,p(w),u=o.pending,u===null?(w.next=o.pending=w,O0(o,w)):(w.next=u.next,o.pending=u.next=w)}}function O0(i,o){var u=o.action,p=o.payload,x=i.state;if(o.isTransition){var w=U.T,M={};U.T=M;try{var G=u(x,p),Q=U.S;Q!==null&&Q(M,G),M0(i,o,G)}catch(pe){qm(i,o,pe)}finally{w!==null&&M.types!==null&&(w.types=M.types),U.T=w}}else try{w=u(x,p),M0(i,o,w)}catch(pe){qm(i,o,pe)}}function M0(i,o,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(p){I0(i,o,p)},function(p){return qm(i,o,p)}):I0(i,o,u)}function I0(i,o,u){o.status="fulfilled",o.value=u,D0(o),i.state=u,o=i.pending,o!==null&&(u=o.next,u===o?i.pending=null:(u=u.next,o.next=u,O0(i,u)))}function qm(i,o,u){var p=i.pending;if(i.pending=null,p!==null){p=p.next;do o.status="rejected",o.reason=u,D0(o),o=o.next;while(o!==p)}i.action=null}function D0(i){i=i.listeners;for(var o=0;o<i.length;o++)(0,i[o])()}function L0(i,o){return o}function j0(i,o){if(Wt){var u=mn.formState;if(u!==null){e:{var p=Nt;if(Wt){if(wn){t:{for(var x=wn,w=ri;x.nodeType!==8;){if(!w){x=null;break t}if(x=si(x.nextSibling),x===null){x=null;break t}}w=x.data,x=w==="F!"||w==="F"?x:null}if(x){wn=si(x.nextSibling),p=x.data==="F!";break e}}js(p)}p=!1}p&&(o=u[0])}}return u=mr(),u.memoizedState=u.baseState=o,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:L0,lastRenderedState:o},u.queue=p,u=tS.bind(null,Nt,p),p.dispatch=u,p=Um(!1),w=Ym.bind(null,Nt,!1,p.queue),p=mr(),x={state:o,dispatch:null,action:i,pending:null},p.queue=x,u=YL.bind(null,Nt,x,w,u),x.dispatch=u,p.memoizedState=i,[o,u,!1]}function z0(i){var o=Dn();return P0(o,ln,i)}function P0(i,o,u){if(o=Bm(i,o,L0)[0],i=zf(rs)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var p=uu(o)}catch(M){throw M===Ma?Cf:M}else p=o;o=Dn();var x=o.queue,w=x.dispatch;return u!==o.memoizedState&&(Nt.flags|=2048,za(9,{destroy:void 0},XL.bind(null,x,u),null)),[p,w,i]}function XL(i,o){i.action=o}function $0(i){var o=Dn(),u=ln;if(u!==null)return P0(o,u,i);Dn(),o=o.memoizedState,u=Dn();var p=u.queue.dispatch;return u.memoizedState=i,[o,p,!1]}function za(i,o,u,p){return i={tag:i,create:u,deps:p,inst:o,next:null},o=Nt.updateQueue,o===null&&(o=Lf(),Nt.updateQueue=o),u=o.lastEffect,u===null?o.lastEffect=i.next=i:(p=u.next,u.next=i,i.next=p,o.lastEffect=i),i}function B0(){return Dn().memoizedState}function Pf(i,o,u,p){var x=mr();Nt.flags|=i,x.memoizedState=za(1|o,{destroy:void 0},u,p===void 0?null:p)}function $f(i,o,u,p){var x=Dn();p=p===void 0?null:p;var w=x.memoizedState.inst;ln!==null&&p!==null&&Dm(p,ln.memoizedState.deps)?x.memoizedState=za(o,w,u,p):(Nt.flags|=i,x.memoizedState=za(1|o,w,u,p))}function F0(i,o){Pf(8390656,8,i,o)}function Hm(i,o){$f(2048,8,i,o)}function ZL(i){Nt.flags|=4;var o=Nt.updateQueue;if(o===null)o=Lf(),Nt.updateQueue=o,o.events=[i];else{var u=o.events;u===null?o.events=[i]:u.push(i)}}function U0(i){var o=Dn().memoizedState;return ZL({ref:o,nextImpl:i}),function(){if((tn&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function q0(i,o){return $f(4,2,i,o)}function H0(i,o){return $f(4,4,i,o)}function G0(i,o){if(typeof o=="function"){i=i();var u=o(i);return function(){typeof u=="function"?u():o(null)}}if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function V0(i,o,u){u=u!=null?u.concat([i]):null,$f(4,4,G0.bind(null,o,i),u)}function Gm(){}function W0(i,o){var u=Dn();o=o===void 0?null:o;var p=u.memoizedState;return o!==null&&Dm(o,p[1])?p[0]:(u.memoizedState=[i,o],i)}function K0(i,o){var u=Dn();o=o===void 0?null:o;var p=u.memoizedState;if(o!==null&&Dm(o,p[1]))return p[0];if(p=i(),$o){kt(!0);try{i()}finally{kt(!1)}}return u.memoizedState=[p,o],p}function Vm(i,o,u){return u===void 0||(ns&1073741824)!==0&&(Ht&261930)===0?i.memoizedState=o:(i.memoizedState=u,i=YS(),Nt.lanes|=i,Gs|=i,u)}function Y0(i,o,u,p){return Br(u,o)?u:Da.current!==null?(i=Vm(i,u,p),Br(i,o)||(Fn=!0),i):(ns&42)===0||(ns&1073741824)!==0&&(Ht&261930)===0?(Fn=!0,i.memoizedState=u):(i=YS(),Nt.lanes|=i,Gs|=i,o)}function X0(i,o,u,p,x){var w=W.p;W.p=w!==0&&8>w?w:8;var M=U.T,G={};U.T=G,Ym(i,!1,o,u);try{var Q=x(),pe=U.S;if(pe!==null&&pe(G,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var Te=VL(Q,p);cu(i,o,Te,Vr(i))}else cu(i,o,p,Vr(i))}catch(Ae){cu(i,o,{then:function(){},status:"rejected",reason:Ae},Vr())}finally{W.p=w,M!==null&&G.types!==null&&(M.types=G.types),U.T=M}}function QL(){}function Wm(i,o,u,p){if(i.tag!==5)throw Error(r(476));var x=Z0(i).queue;X0(i,x,o,B,u===null?QL:function(){return Q0(i),u(p)})}function Z0(i){var o=i.memoizedState;if(o!==null)return o;o={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:B},next:null};var u={};return o.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:u},next:null},i.memoizedState=o,i=i.alternate,i!==null&&(i.memoizedState=o),o}function Q0(i){var o=Z0(i);o.next===null&&(o=i.alternate.memoizedState),cu(i,o.next.queue,{},Vr())}function Km(){return Qn(Cu)}function J0(){return Dn().memoizedState}function eS(){return Dn().memoizedState}function JL(i){for(var o=i.return;o!==null;){switch(o.tag){case 24:case 3:var u=Vr();i=$s(u);var p=Bs(o,i,u);p!==null&&(_r(p,o,u),su(p,o,u)),o={cache:wm()},i.payload=o;return}o=o.return}}function ej(i,o,u){var p=Vr();u={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Bf(i)?nS(o,u):(u=dm(i,o,u,p),u!==null&&(_r(u,i,p),rS(u,o,p)))}function tS(i,o,u){var p=Vr();cu(i,o,u,p)}function cu(i,o,u,p){var x={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Bf(i))nS(o,x);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=o.lastRenderedReducer,w!==null))try{var M=o.lastRenderedState,G=w(M,u);if(x.hasEagerState=!0,x.eagerState=G,Br(G,M))return xf(i,o,x,0),mn===null&&vf(),!1}catch{}if(u=dm(i,o,x,p),u!==null)return _r(u,i,p),rS(u,o,p),!0}return!1}function Ym(i,o,u,p){if(p={lane:2,revertLane:Cg(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Bf(i)){if(o)throw Error(r(479))}else o=dm(i,u,p,2),o!==null&&_r(o,i,2)}function Bf(i){var o=i.alternate;return i===Nt||o!==null&&o===Nt}function nS(i,o){La=If=!0;var u=i.pending;u===null?o.next=o:(o.next=u.next,u.next=o),i.pending=o}function rS(i,o,u){if((u&4194048)!==0){var p=o.lanes;p&=i.pendingLanes,u|=p,o.lanes=u,Ue(i,u)}}var fu={readContext:Qn,use:jf,useCallback:An,useContext:An,useEffect:An,useImperativeHandle:An,useLayoutEffect:An,useInsertionEffect:An,useMemo:An,useReducer:An,useRef:An,useState:An,useDebugValue:An,useDeferredValue:An,useTransition:An,useSyncExternalStore:An,useId:An,useHostTransitionStatus:An,useFormState:An,useActionState:An,useOptimistic:An,useMemoCache:An,useCacheRefresh:An};fu.useEffectEvent=An;var iS={readContext:Qn,use:jf,useCallback:function(i,o){return mr().memoizedState=[i,o===void 0?null:o],i},useContext:Qn,useEffect:F0,useImperativeHandle:function(i,o,u){u=u!=null?u.concat([i]):null,Pf(4194308,4,G0.bind(null,o,i),u)},useLayoutEffect:function(i,o){return Pf(4194308,4,i,o)},useInsertionEffect:function(i,o){Pf(4,2,i,o)},useMemo:function(i,o){var u=mr();o=o===void 0?null:o;var p=i();if($o){kt(!0);try{i()}finally{kt(!1)}}return u.memoizedState=[p,o],p},useReducer:function(i,o,u){var p=mr();if(u!==void 0){var x=u(o);if($o){kt(!0);try{u(o)}finally{kt(!1)}}}else x=o;return p.memoizedState=p.baseState=x,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:x},p.queue=i,i=i.dispatch=ej.bind(null,Nt,i),[p.memoizedState,i]},useRef:function(i){var o=mr();return i={current:i},o.memoizedState=i},useState:function(i){i=Um(i);var o=i.queue,u=tS.bind(null,Nt,o);return o.dispatch=u,[i.memoizedState,u]},useDebugValue:Gm,useDeferredValue:function(i,o){var u=mr();return Vm(u,i,o)},useTransition:function(){var i=Um(!1);return i=X0.bind(null,Nt,i.queue,!0,!1),mr().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,o,u){var p=Nt,x=mr();if(Wt){if(u===void 0)throw Error(r(407));u=u()}else{if(u=o(),mn===null)throw Error(r(349));(Ht&127)!==0||T0(p,o,u)}x.memoizedState=u;var w={value:u,getSnapshot:o};return x.queue=w,F0(C0.bind(null,p,w,i),[i]),p.flags|=2048,za(9,{destroy:void 0},R0.bind(null,p,w,u,o),null),u},useId:function(){var i=mr(),o=mn.identifierPrefix;if(Wt){var u=_i,p=Ci;u=(p&~(1<<32-tt(p)-1)).toString(32)+u,o="_"+o+"R_"+u,u=Df++,0<u&&(o+="H"+u.toString(32)),o+="_"}else u=WL++,o="_"+o+"r_"+u.toString(32)+"_";return i.memoizedState=o},useHostTransitionStatus:Km,useFormState:j0,useActionState:j0,useOptimistic:function(i){var o=mr();o.memoizedState=o.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=u,o=Ym.bind(null,Nt,!0,u),u.dispatch=o,[i,o]},useMemoCache:$m,useCacheRefresh:function(){return mr().memoizedState=JL.bind(null,Nt)},useEffectEvent:function(i){var o=mr(),u={impl:i};return o.memoizedState=u,function(){if((tn&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},Xm={readContext:Qn,use:jf,useCallback:W0,useContext:Qn,useEffect:Hm,useImperativeHandle:V0,useInsertionEffect:q0,useLayoutEffect:H0,useMemo:K0,useReducer:zf,useRef:B0,useState:function(){return zf(rs)},useDebugValue:Gm,useDeferredValue:function(i,o){var u=Dn();return Y0(u,ln.memoizedState,i,o)},useTransition:function(){var i=zf(rs)[0],o=Dn().memoizedState;return[typeof i=="boolean"?i:uu(i),o]},useSyncExternalStore:E0,useId:J0,useHostTransitionStatus:Km,useFormState:z0,useActionState:z0,useOptimistic:function(i,o){var u=Dn();return A0(u,ln,i,o)},useMemoCache:$m,useCacheRefresh:eS};Xm.useEffectEvent=U0;var sS={readContext:Qn,use:jf,useCallback:W0,useContext:Qn,useEffect:Hm,useImperativeHandle:V0,useInsertionEffect:q0,useLayoutEffect:H0,useMemo:K0,useReducer:Fm,useRef:B0,useState:function(){return Fm(rs)},useDebugValue:Gm,useDeferredValue:function(i,o){var u=Dn();return ln===null?Vm(u,i,o):Y0(u,ln.memoizedState,i,o)},useTransition:function(){var i=Fm(rs)[0],o=Dn().memoizedState;return[typeof i=="boolean"?i:uu(i),o]},useSyncExternalStore:E0,useId:J0,useHostTransitionStatus:Km,useFormState:$0,useActionState:$0,useOptimistic:function(i,o){var u=Dn();return ln!==null?A0(u,ln,i,o):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:$m,useCacheRefresh:eS};sS.useEffectEvent=U0;function Zm(i,o,u,p){o=i.memoizedState,u=u(p,o),u=u==null?o:m({},o,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var Qm={enqueueSetState:function(i,o,u){i=i._reactInternals;var p=Vr(),x=$s(p);x.payload=o,u!=null&&(x.callback=u),o=Bs(i,x,p),o!==null&&(_r(o,i,p),su(o,i,p))},enqueueReplaceState:function(i,o,u){i=i._reactInternals;var p=Vr(),x=$s(p);x.tag=1,x.payload=o,u!=null&&(x.callback=u),o=Bs(i,x,p),o!==null&&(_r(o,i,p),su(o,i,p))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var u=Vr(),p=$s(u);p.tag=2,o!=null&&(p.callback=o),o=Bs(i,p,u),o!==null&&(_r(o,i,u),su(o,i,u))}};function oS(i,o,u,p,x,w,M){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,w,M):o.prototype&&o.prototype.isPureReactComponent?!Zl(u,p)||!Zl(x,w):!0}function aS(i,o,u,p){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(u,p),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(u,p),o.state!==i&&Qm.enqueueReplaceState(o,o.state,null)}function Bo(i,o){var u=o;if("ref"in o){u={};for(var p in o)p!=="ref"&&(u[p]=o[p])}if(i=i.defaultProps){u===o&&(u=m({},u));for(var x in i)u[x]===void 0&&(u[x]=i[x])}return u}function lS(i){yf(i)}function uS(i){console.error(i)}function cS(i){yf(i)}function Ff(i,o){try{var u=i.onUncaughtError;u(o.value,{componentStack:o.stack})}catch(p){setTimeout(function(){throw p})}}function fS(i,o,u){try{var p=i.onCaughtError;p(u.value,{componentStack:u.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(x){setTimeout(function(){throw x})}}function Jm(i,o,u){return u=$s(u),u.tag=3,u.payload={element:null},u.callback=function(){Ff(i,o)},u}function dS(i){return i=$s(i),i.tag=3,i}function pS(i,o,u,p){var x=u.type.getDerivedStateFromError;if(typeof x=="function"){var w=p.value;i.payload=function(){return x(w)},i.callback=function(){fS(o,u,p)}}var M=u.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(i.callback=function(){fS(o,u,p),typeof x!="function"&&(Vs===null?Vs=new Set([this]):Vs.add(this));var G=p.stack;this.componentDidCatch(p.value,{componentStack:G!==null?G:""})})}function tj(i,o,u,p,x){if(u.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(o=u.alternate,o!==null&&Na(o,u,x,!0),u=Ur.current,u!==null){switch(u.tag){case 31:case 13:return ii===null?Jf():u.alternate===null&&On===0&&(On=3),u.flags&=-257,u.flags|=65536,u.lanes=x,p===_f?u.flags|=16384:(o=u.updateQueue,o===null?u.updateQueue=new Set([p]):o.add(p),Eg(i,p,x)),!1;case 22:return u.flags|=65536,p===_f?u.flags|=16384:(o=u.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([p])},u.updateQueue=o):(u=o.retryQueue,u===null?o.retryQueue=new Set([p]):u.add(p)),Eg(i,p,x)),!1}throw Error(r(435,u.tag))}return Eg(i,p,x),Jf(),!1}if(Wt)return o=Ur.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=x,p!==ym&&(i=Error(r(422),{cause:p}),eu(ei(i,u)))):(p!==ym&&(o=Error(r(423),{cause:p}),eu(ei(o,u))),i=i.current.alternate,i.flags|=65536,x&=-x,i.lanes|=x,p=ei(p,u),x=Jm(i.stateNode,p,x),Nm(i,x),On!==4&&(On=2)),!1;var w=Error(r(520),{cause:p});if(w=ei(w,u),vu===null?vu=[w]:vu.push(w),On!==4&&(On=2),o===null)return!0;p=ei(p,u),u=o;do{switch(u.tag){case 3:return u.flags|=65536,i=x&-x,u.lanes|=i,i=Jm(u.stateNode,p,i),Nm(u,i),!1;case 1:if(o=u.type,w=u.stateNode,(u.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Vs===null||!Vs.has(w))))return u.flags|=65536,x&=-x,u.lanes|=x,x=dS(x),pS(x,i,u,p),Nm(u,x),!1}u=u.return}while(u!==null);return!1}var eg=Error(r(461)),Fn=!1;function Jn(i,o,u,p){o.child=i===null?b0(o,null,u,p):Po(o,i.child,u,p)}function hS(i,o,u,p,x){u=u.render;var w=o.ref;if("ref"in p){var M={};for(var G in p)G!=="ref"&&(M[G]=p[G])}else M=p;return Do(o),p=Lm(i,o,u,M,w,x),G=jm(),i!==null&&!Fn?(zm(i,o,x),is(i,o,x)):(Wt&&G&&gm(o),o.flags|=1,Jn(i,o,p,x),o.child)}function mS(i,o,u,p,x){if(i===null){var w=u.type;return typeof w=="function"&&!pm(w)&&w.defaultProps===void 0&&u.compare===null?(o.tag=15,o.type=w,gS(i,o,w,p,x)):(i=Sf(u.type,null,p,o,o.mode,x),i.ref=o.ref,i.return=o,o.child=i)}if(w=i.child,!lg(i,x)){var M=w.memoizedProps;if(u=u.compare,u=u!==null?u:Zl,u(M,p)&&i.ref===o.ref)return is(i,o,x)}return o.flags|=1,i=Qi(w,p),i.ref=o.ref,i.return=o,o.child=i}function gS(i,o,u,p,x){if(i!==null){var w=i.memoizedProps;if(Zl(w,p)&&i.ref===o.ref)if(Fn=!1,o.pendingProps=p=w,lg(i,x))(i.flags&131072)!==0&&(Fn=!0);else return o.lanes=i.lanes,is(i,o,x)}return tg(i,o,u,p,x)}function bS(i,o,u,p){var x=p.children,w=i!==null?i.memoizedState:null;if(i===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((o.flags&128)!==0){if(w=w!==null?w.baseLanes|u:u,i!==null){for(p=o.child=i.child,x=0;p!==null;)x=x|p.lanes|p.childLanes,p=p.sibling;p=x&~w}else p=0,o.child=null;return yS(i,o,w,u,p)}if((u&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},i!==null&&Rf(o,w!==null?w.cachePool:null),w!==null?x0(o,w):Om(),k0(o);else return p=o.lanes=536870912,yS(i,o,w!==null?w.baseLanes|u:u,u,p)}else w!==null?(Rf(o,w.cachePool),x0(o,w),Us(),o.memoizedState=null):(i!==null&&Rf(o,null),Om(),Us());return Jn(i,o,x,u),o.child}function du(i,o){return i!==null&&i.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function yS(i,o,u,p,x){var w=Tm();return w=w===null?null:{parent:$n._currentValue,pool:w},o.memoizedState={baseLanes:u,cachePool:w},i!==null&&Rf(o,null),Om(),k0(o),i!==null&&Na(i,o,p,!0),o.childLanes=x,null}function Uf(i,o){return o=Hf({mode:o.mode,children:o.children},i.mode),o.ref=i.ref,i.child=o,o.return=i,o}function vS(i,o,u){return Po(o,i.child,null,u),i=Uf(o,o.pendingProps),i.flags|=2,qr(o),o.memoizedState=null,i}function nj(i,o,u){var p=o.pendingProps,x=(o.flags&128)!==0;if(o.flags&=-129,i===null){if(Wt){if(p.mode==="hidden")return i=Uf(o,p),o.lanes=536870912,du(null,i);if(Im(o),(i=wn)?(i=Ow(i,ri),i=i!==null&&i.data==="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:Ds!==null?{id:Ci,overflow:_i}:null,retryLane:536870912,hydrationErrors:null},u=n0(i),u.return=o,o.child=u,Zn=o,wn=null)):i=null,i===null)throw js(o);return o.lanes=536870912,null}return Uf(o,p)}var w=i.memoizedState;if(w!==null){var M=w.dehydrated;if(Im(o),x)if(o.flags&256)o.flags&=-257,o=vS(i,o,u);else if(o.memoizedState!==null)o.child=i.child,o.flags|=128,o=null;else throw Error(r(558));else if(Fn||Na(i,o,u,!1),x=(u&i.childLanes)!==0,Fn||x){if(p=mn,p!==null&&(M=ze(p,u),M!==0&&M!==w.retryLane))throw w.retryLane=M,Ao(i,M),_r(p,i,M),eg;Jf(),o=vS(i,o,u)}else i=w.treeContext,wn=si(M.nextSibling),Zn=o,Wt=!0,Ls=null,ri=!1,i!==null&&s0(o,i),o=Uf(o,p),o.flags|=4096;return o}return i=Qi(i.child,{mode:p.mode,children:p.children}),i.ref=o.ref,o.child=i,i.return=o,i}function qf(i,o){var u=o.ref;if(u===null)i!==null&&i.ref!==null&&(o.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(i===null||i.ref!==u)&&(o.flags|=4194816)}}function tg(i,o,u,p,x){return Do(o),u=Lm(i,o,u,p,void 0,x),p=jm(),i!==null&&!Fn?(zm(i,o,x),is(i,o,x)):(Wt&&p&&gm(o),o.flags|=1,Jn(i,o,u,x),o.child)}function xS(i,o,u,p,x,w){return Do(o),o.updateQueue=null,u=w0(o,p,u,x),S0(i),p=jm(),i!==null&&!Fn?(zm(i,o,w),is(i,o,w)):(Wt&&p&&gm(o),o.flags|=1,Jn(i,o,u,w),o.child)}function kS(i,o,u,p,x){if(Do(o),o.stateNode===null){var w=Ta,M=u.contextType;typeof M=="object"&&M!==null&&(w=Qn(M)),w=new u(p,w),o.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=Qm,o.stateNode=w,w._reactInternals=o,w=o.stateNode,w.props=p,w.state=o.memoizedState,w.refs={},Cm(o),M=u.contextType,w.context=typeof M=="object"&&M!==null?Qn(M):Ta,w.state=o.memoizedState,M=u.getDerivedStateFromProps,typeof M=="function"&&(Zm(o,u,M,p),w.state=o.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(M=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),M!==w.state&&Qm.enqueueReplaceState(w,w.state,null),au(o,p,w,x),ou(),w.state=o.memoizedState),typeof w.componentDidMount=="function"&&(o.flags|=4194308),p=!0}else if(i===null){w=o.stateNode;var G=o.memoizedProps,Q=Bo(u,G);w.props=Q;var pe=w.context,Te=u.contextType;M=Ta,typeof Te=="object"&&Te!==null&&(M=Qn(Te));var Ae=u.getDerivedStateFromProps;Te=typeof Ae=="function"||typeof w.getSnapshotBeforeUpdate=="function",G=o.pendingProps!==G,Te||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(G||pe!==M)&&aS(o,w,p,M),Ps=!1;var me=o.memoizedState;w.state=me,au(o,p,w,x),ou(),pe=o.memoizedState,G||me!==pe||Ps?(typeof Ae=="function"&&(Zm(o,u,Ae,p),pe=o.memoizedState),(Q=Ps||oS(o,u,Q,p,me,pe,M))?(Te||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(o.flags|=4194308)):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=p,o.memoizedState=pe),w.props=p,w.state=pe,w.context=M,p=Q):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),p=!1)}else{w=o.stateNode,_m(i,o),M=o.memoizedProps,Te=Bo(u,M),w.props=Te,Ae=o.pendingProps,me=w.context,pe=u.contextType,Q=Ta,typeof pe=="object"&&pe!==null&&(Q=Qn(pe)),G=u.getDerivedStateFromProps,(pe=typeof G=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(M!==Ae||me!==Q)&&aS(o,w,p,Q),Ps=!1,me=o.memoizedState,w.state=me,au(o,p,w,x),ou();var ve=o.memoizedState;M!==Ae||me!==ve||Ps||i!==null&&i.dependencies!==null&&Ef(i.dependencies)?(typeof G=="function"&&(Zm(o,u,G,p),ve=o.memoizedState),(Te=Ps||oS(o,u,Te,p,me,ve,Q)||i!==null&&i.dependencies!==null&&Ef(i.dependencies))?(pe||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(p,ve,Q),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(p,ve,Q)),typeof w.componentDidUpdate=="function"&&(o.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof w.componentDidUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=1024),o.memoizedProps=p,o.memoizedState=ve),w.props=p,w.state=ve,w.context=Q,p=Te):(typeof w.componentDidUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=1024),p=!1)}return w=p,qf(i,o),p=(o.flags&128)!==0,w||p?(w=o.stateNode,u=p&&typeof u.getDerivedStateFromError!="function"?null:w.render(),o.flags|=1,i!==null&&p?(o.child=Po(o,i.child,null,x),o.child=Po(o,null,u,x)):Jn(i,o,u,x),o.memoizedState=w.state,i=o.child):i=is(i,o,x),i}function SS(i,o,u,p){return Mo(),o.flags|=256,Jn(i,o,u,p),o.child}var ng={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function rg(i){return{baseLanes:i,cachePool:f0()}}function ig(i,o,u){return i=i!==null?i.childLanes&~u:0,o&&(i|=Gr),i}function wS(i,o,u){var p=o.pendingProps,x=!1,w=(o.flags&128)!==0,M;if((M=w)||(M=i!==null&&i.memoizedState===null?!1:(In.current&2)!==0),M&&(x=!0,o.flags&=-129),M=(o.flags&32)!==0,o.flags&=-33,i===null){if(Wt){if(x?Fs(o):Us(),(i=wn)?(i=Ow(i,ri),i=i!==null&&i.data!=="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:Ds!==null?{id:Ci,overflow:_i}:null,retryLane:536870912,hydrationErrors:null},u=n0(i),u.return=o,o.child=u,Zn=o,wn=null)):i=null,i===null)throw js(o);return Bg(i)?o.lanes=32:o.lanes=536870912,null}var G=p.children;return p=p.fallback,x?(Us(),x=o.mode,G=Hf({mode:"hidden",children:G},x),p=Oo(p,x,u,null),G.return=o,p.return=o,G.sibling=p,o.child=G,p=o.child,p.memoizedState=rg(u),p.childLanes=ig(i,M,u),o.memoizedState=ng,du(null,p)):(Fs(o),sg(o,G))}var Q=i.memoizedState;if(Q!==null&&(G=Q.dehydrated,G!==null)){if(w)o.flags&256?(Fs(o),o.flags&=-257,o=og(i,o,u)):o.memoizedState!==null?(Us(),o.child=i.child,o.flags|=128,o=null):(Us(),G=p.fallback,x=o.mode,p=Hf({mode:"visible",children:p.children},x),G=Oo(G,x,u,null),G.flags|=2,p.return=o,G.return=o,p.sibling=G,o.child=p,Po(o,i.child,null,u),p=o.child,p.memoizedState=rg(u),p.childLanes=ig(i,M,u),o.memoizedState=ng,o=du(null,p));else if(Fs(o),Bg(G)){if(M=G.nextSibling&&G.nextSibling.dataset,M)var pe=M.dgst;M=pe,p=Error(r(419)),p.stack="",p.digest=M,eu({value:p,source:null,stack:null}),o=og(i,o,u)}else if(Fn||Na(i,o,u,!1),M=(u&i.childLanes)!==0,Fn||M){if(M=mn,M!==null&&(p=ze(M,u),p!==0&&p!==Q.retryLane))throw Q.retryLane=p,Ao(i,p),_r(M,i,p),eg;$g(G)||Jf(),o=og(i,o,u)}else $g(G)?(o.flags|=192,o.child=i.child,o=null):(i=Q.treeContext,wn=si(G.nextSibling),Zn=o,Wt=!0,Ls=null,ri=!1,i!==null&&s0(o,i),o=sg(o,p.children),o.flags|=4096);return o}return x?(Us(),G=p.fallback,x=o.mode,Q=i.child,pe=Q.sibling,p=Qi(Q,{mode:"hidden",children:p.children}),p.subtreeFlags=Q.subtreeFlags&65011712,pe!==null?G=Qi(pe,G):(G=Oo(G,x,u,null),G.flags|=2),G.return=o,p.return=o,p.sibling=G,o.child=p,du(null,p),p=o.child,G=i.child.memoizedState,G===null?G=rg(u):(x=G.cachePool,x!==null?(Q=$n._currentValue,x=x.parent!==Q?{parent:Q,pool:Q}:x):x=f0(),G={baseLanes:G.baseLanes|u,cachePool:x}),p.memoizedState=G,p.childLanes=ig(i,M,u),o.memoizedState=ng,du(i.child,p)):(Fs(o),u=i.child,i=u.sibling,u=Qi(u,{mode:"visible",children:p.children}),u.return=o,u.sibling=null,i!==null&&(M=o.deletions,M===null?(o.deletions=[i],o.flags|=16):M.push(i)),o.child=u,o.memoizedState=null,u)}function sg(i,o){return o=Hf({mode:"visible",children:o},i.mode),o.return=i,i.child=o}function Hf(i,o){return i=Fr(22,i,null,o),i.lanes=0,i}function og(i,o,u){return Po(o,i.child,null,u),i=sg(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function ES(i,o,u){i.lanes|=o;var p=i.alternate;p!==null&&(p.lanes|=o),km(i.return,o,u)}function ag(i,o,u,p,x,w){var M=i.memoizedState;M===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:p,tail:u,tailMode:x,treeForkCount:w}:(M.isBackwards=o,M.rendering=null,M.renderingStartTime=0,M.last=p,M.tail=u,M.tailMode=x,M.treeForkCount=w)}function TS(i,o,u){var p=o.pendingProps,x=p.revealOrder,w=p.tail;p=p.children;var M=In.current,G=(M&2)!==0;if(G?(M=M&1|2,o.flags|=128):M&=1,j(In,M),Jn(i,o,p,u),p=Wt?Jl:0,!G&&i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&ES(i,u,o);else if(i.tag===19)ES(i,u,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(x){case"forwards":for(u=o.child,x=null;u!==null;)i=u.alternate,i!==null&&Mf(i)===null&&(x=u),u=u.sibling;u=x,u===null?(x=o.child,o.child=null):(x=u.sibling,u.sibling=null),ag(o,!1,x,u,w,p);break;case"backwards":case"unstable_legacy-backwards":for(u=null,x=o.child,o.child=null;x!==null;){if(i=x.alternate,i!==null&&Mf(i)===null){o.child=x;break}i=x.sibling,x.sibling=u,u=x,x=i}ag(o,!0,u,null,w,p);break;case"together":ag(o,!1,null,null,void 0,p);break;default:o.memoizedState=null}return o.child}function is(i,o,u){if(i!==null&&(o.dependencies=i.dependencies),Gs|=o.lanes,(u&o.childLanes)===0)if(i!==null){if(Na(i,o,u,!1),(u&o.childLanes)===0)return null}else return null;if(i!==null&&o.child!==i.child)throw Error(r(153));if(o.child!==null){for(i=o.child,u=Qi(i,i.pendingProps),o.child=u,u.return=o;i.sibling!==null;)i=i.sibling,u=u.sibling=Qi(i,i.pendingProps),u.return=o;u.sibling=null}return o.child}function lg(i,o){return(i.lanes&o)!==0?!0:(i=i.dependencies,!!(i!==null&&Ef(i)))}function rj(i,o,u){switch(o.tag){case 3:le(o,o.stateNode.containerInfo),zs(o,$n,i.memoizedState.cache),Mo();break;case 27:case 5:ge(o);break;case 4:le(o,o.stateNode.containerInfo);break;case 10:zs(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,Im(o),null;break;case 13:var p=o.memoizedState;if(p!==null)return p.dehydrated!==null?(Fs(o),o.flags|=128,null):(u&o.child.childLanes)!==0?wS(i,o,u):(Fs(o),i=is(i,o,u),i!==null?i.sibling:null);Fs(o);break;case 19:var x=(i.flags&128)!==0;if(p=(u&o.childLanes)!==0,p||(Na(i,o,u,!1),p=(u&o.childLanes)!==0),x){if(p)return TS(i,o,u);o.flags|=128}if(x=o.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),j(In,In.current),p)break;return null;case 22:return o.lanes=0,bS(i,o,u,o.pendingProps);case 24:zs(o,$n,i.memoizedState.cache)}return is(i,o,u)}function RS(i,o,u){if(i!==null)if(i.memoizedProps!==o.pendingProps)Fn=!0;else{if(!lg(i,u)&&(o.flags&128)===0)return Fn=!1,rj(i,o,u);Fn=(i.flags&131072)!==0}else Fn=!1,Wt&&(o.flags&1048576)!==0&&i0(o,Jl,o.index);switch(o.lanes=0,o.tag){case 16:e:{var p=o.pendingProps;if(i=jo(o.elementType),o.type=i,typeof i=="function")pm(i)?(p=Bo(i,p),o.tag=1,o=kS(null,o,i,p,u)):(o.tag=0,o=tg(null,o,i,p,u));else{if(i!=null){var x=i.$$typeof;if(x===_){o.tag=11,o=hS(null,o,i,p,u);break e}else if(x===A){o.tag=14,o=mS(null,o,i,p,u);break e}}throw o=L(i)||i,Error(r(306,o,""))}}return o;case 0:return tg(i,o,o.type,o.pendingProps,u);case 1:return p=o.type,x=Bo(p,o.pendingProps),kS(i,o,p,x,u);case 3:e:{if(le(o,o.stateNode.containerInfo),i===null)throw Error(r(387));p=o.pendingProps;var w=o.memoizedState;x=w.element,_m(i,o),au(o,p,null,u);var M=o.memoizedState;if(p=M.cache,zs(o,$n,p),p!==w.cache&&Sm(o,[$n],u,!0),ou(),p=M.element,w.isDehydrated)if(w={element:p,isDehydrated:!1,cache:M.cache},o.updateQueue.baseState=w,o.memoizedState=w,o.flags&256){o=SS(i,o,p,u);break e}else if(p!==x){x=ei(Error(r(424)),o),eu(x),o=SS(i,o,p,u);break e}else for(i=o.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,wn=si(i.firstChild),Zn=o,Wt=!0,Ls=null,ri=!0,u=b0(o,null,p,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Mo(),p===x){o=is(i,o,u);break e}Jn(i,o,p,u)}o=o.child}return o;case 26:return qf(i,o),i===null?(u=zw(o.type,null,o.pendingProps,null))?o.memoizedState=u:Wt||(u=o.type,i=o.pendingProps,p=od(se.current).createElement(u),p[wt]=o,p[$t]=i,er(p,u,i),zn(p),o.stateNode=p):o.memoizedState=zw(o.type,i.memoizedProps,o.pendingProps,i.memoizedState),null;case 27:return ge(o),i===null&&Wt&&(p=o.stateNode=Dw(o.type,o.pendingProps,se.current),Zn=o,ri=!0,x=wn,Xs(o.type)?(Fg=x,wn=si(p.firstChild)):wn=x),Jn(i,o,o.pendingProps.children,u),qf(i,o),i===null&&(o.flags|=4194304),o.child;case 5:return i===null&&Wt&&((x=p=wn)&&(p=Ij(p,o.type,o.pendingProps,ri),p!==null?(o.stateNode=p,Zn=o,wn=si(p.firstChild),ri=!1,x=!0):x=!1),x||js(o)),ge(o),x=o.type,w=o.pendingProps,M=i!==null?i.memoizedProps:null,p=w.children,jg(x,w)?p=null:M!==null&&jg(x,M)&&(o.flags|=32),o.memoizedState!==null&&(x=Lm(i,o,KL,null,null,u),Cu._currentValue=x),qf(i,o),Jn(i,o,p,u),o.child;case 6:return i===null&&Wt&&((i=u=wn)&&(u=Dj(u,o.pendingProps,ri),u!==null?(o.stateNode=u,Zn=o,wn=null,i=!0):i=!1),i||js(o)),null;case 13:return wS(i,o,u);case 4:return le(o,o.stateNode.containerInfo),p=o.pendingProps,i===null?o.child=Po(o,null,p,u):Jn(i,o,p,u),o.child;case 11:return hS(i,o,o.type,o.pendingProps,u);case 7:return Jn(i,o,o.pendingProps,u),o.child;case 8:return Jn(i,o,o.pendingProps.children,u),o.child;case 12:return Jn(i,o,o.pendingProps.children,u),o.child;case 10:return p=o.pendingProps,zs(o,o.type,p.value),Jn(i,o,p.children,u),o.child;case 9:return x=o.type._context,p=o.pendingProps.children,Do(o),x=Qn(x),p=p(x),o.flags|=1,Jn(i,o,p,u),o.child;case 14:return mS(i,o,o.type,o.pendingProps,u);case 15:return gS(i,o,o.type,o.pendingProps,u);case 19:return TS(i,o,u);case 31:return nj(i,o,u);case 22:return bS(i,o,u,o.pendingProps);case 24:return Do(o),p=Qn($n),i===null?(x=Tm(),x===null&&(x=mn,w=wm(),x.pooledCache=w,w.refCount++,w!==null&&(x.pooledCacheLanes|=u),x=w),o.memoizedState={parent:p,cache:x},Cm(o),zs(o,$n,x)):((i.lanes&u)!==0&&(_m(i,o),au(o,null,null,u),ou()),x=i.memoizedState,w=o.memoizedState,x.parent!==p?(x={parent:p,cache:p},o.memoizedState=x,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=x),zs(o,$n,p)):(p=w.cache,zs(o,$n,p),p!==x.cache&&Sm(o,[$n],u,!0))),Jn(i,o,o.pendingProps.children,u),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}function ss(i){i.flags|=4}function ug(i,o,u,p,x){if((o=(i.mode&32)!==0)&&(o=!1),o){if(i.flags|=16777216,(x&335544128)===x)if(i.stateNode.complete)i.flags|=8192;else if(JS())i.flags|=8192;else throw zo=_f,Rm}else i.flags&=-16777217}function CS(i,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!Uw(o))if(JS())i.flags|=8192;else throw zo=_f,Rm}function Gf(i,o){o!==null&&(i.flags|=4),i.flags&16384&&(o=i.tag!==22?Ze():536870912,i.lanes|=o,Fa|=o)}function pu(i,o){if(!Wt)switch(i.tailMode){case"hidden":o=i.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function En(i){var o=i.alternate!==null&&i.alternate.child===i.child,u=0,p=0;if(o)for(var x=i.child;x!==null;)u|=x.lanes|x.childLanes,p|=x.subtreeFlags&65011712,p|=x.flags&65011712,x.return=i,x=x.sibling;else for(x=i.child;x!==null;)u|=x.lanes|x.childLanes,p|=x.subtreeFlags,p|=x.flags,x.return=i,x=x.sibling;return i.subtreeFlags|=p,i.childLanes=u,o}function ij(i,o,u){var p=o.pendingProps;switch(bm(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return En(o),null;case 1:return En(o),null;case 3:return u=o.stateNode,p=null,i!==null&&(p=i.memoizedState.cache),o.memoizedState.cache!==p&&(o.flags|=2048),ts($n),fe(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(_a(o)?ss(o):i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,vm())),En(o),null;case 26:var x=o.type,w=o.memoizedState;return i===null?(ss(o),w!==null?(En(o),CS(o,w)):(En(o),ug(o,x,null,p,u))):w?w!==i.memoizedState?(ss(o),En(o),CS(o,w)):(En(o),o.flags&=-16777217):(i=i.memoizedProps,i!==p&&ss(o),En(o),ug(o,x,i,p,u)),null;case 27:if(_e(o),u=se.current,x=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==p&&ss(o);else{if(!p){if(o.stateNode===null)throw Error(r(166));return En(o),null}i=Z.current,_a(o)?o0(o):(i=Dw(x,p,u),o.stateNode=i,ss(o))}return En(o),null;case 5:if(_e(o),x=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==p&&ss(o);else{if(!p){if(o.stateNode===null)throw Error(r(166));return En(o),null}if(w=Z.current,_a(o))o0(o);else{var M=od(se.current);switch(w){case 1:w=M.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:w=M.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":w=M.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":w=M.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;case"script":w=M.createElement("div"),w.innerHTML="<script><\/script>",w=w.removeChild(w.firstChild);break;case"select":w=typeof p.is=="string"?M.createElement("select",{is:p.is}):M.createElement("select"),p.multiple?w.multiple=!0:p.size&&(w.size=p.size);break;default:w=typeof p.is=="string"?M.createElement(x,{is:p.is}):M.createElement(x)}}w[wt]=o,w[$t]=p;e:for(M=o.child;M!==null;){if(M.tag===5||M.tag===6)w.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===o)break e;for(;M.sibling===null;){if(M.return===null||M.return===o)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}o.stateNode=w;e:switch(er(w,x,p),x){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&ss(o)}}return En(o),ug(o,o.type,i===null?null:i.memoizedProps,o.pendingProps,u),null;case 6:if(i&&o.stateNode!=null)i.memoizedProps!==p&&ss(o);else{if(typeof p!="string"&&o.stateNode===null)throw Error(r(166));if(i=se.current,_a(o)){if(i=o.stateNode,u=o.memoizedProps,p=null,x=Zn,x!==null)switch(x.tag){case 27:case 5:p=x.memoizedProps}i[wt]=o,i=!!(i.nodeValue===u||p!==null&&p.suppressHydrationWarning===!0||ww(i.nodeValue,u)),i||js(o,!0)}else i=od(i).createTextNode(p),i[wt]=o,o.stateNode=i}return En(o),null;case 31:if(u=o.memoizedState,i===null||i.memoizedState!==null){if(p=_a(o),u!==null){if(i===null){if(!p)throw Error(r(318));if(i=o.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[wt]=o}else Mo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;En(o),i=!1}else u=vm(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return o.flags&256?(qr(o),o):(qr(o),null);if((o.flags&128)!==0)throw Error(r(558))}return En(o),null;case 13:if(p=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(x=_a(o),p!==null&&p.dehydrated!==null){if(i===null){if(!x)throw Error(r(318));if(x=o.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(r(317));x[wt]=o}else Mo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;En(o),x=!1}else x=vm(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=x),x=!0;if(!x)return o.flags&256?(qr(o),o):(qr(o),null)}return qr(o),(o.flags&128)!==0?(o.lanes=u,o):(u=p!==null,i=i!==null&&i.memoizedState!==null,u&&(p=o.child,x=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(x=p.alternate.memoizedState.cachePool.pool),w=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(w=p.memoizedState.cachePool.pool),w!==x&&(p.flags|=2048)),u!==i&&u&&(o.child.flags|=8192),Gf(o,o.updateQueue),En(o),null);case 4:return fe(),i===null&&Og(o.stateNode.containerInfo),En(o),null;case 10:return ts(o.type),En(o),null;case 19:if(V(In),p=o.memoizedState,p===null)return En(o),null;if(x=(o.flags&128)!==0,w=p.rendering,w===null)if(x)pu(p,!1);else{if(On!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(w=Mf(i),w!==null){for(o.flags|=128,pu(p,!1),i=w.updateQueue,o.updateQueue=i,Gf(o,i),o.subtreeFlags=0,i=u,u=o.child;u!==null;)t0(u,i),u=u.sibling;return j(In,In.current&1|2),Wt&&Ji(o,p.treeForkCount),o.child}i=i.sibling}p.tail!==null&&ee()>Xf&&(o.flags|=128,x=!0,pu(p,!1),o.lanes=4194304)}else{if(!x)if(i=Mf(w),i!==null){if(o.flags|=128,x=!0,i=i.updateQueue,o.updateQueue=i,Gf(o,i),pu(p,!0),p.tail===null&&p.tailMode==="hidden"&&!w.alternate&&!Wt)return En(o),null}else 2*ee()-p.renderingStartTime>Xf&&u!==536870912&&(o.flags|=128,x=!0,pu(p,!1),o.lanes=4194304);p.isBackwards?(w.sibling=o.child,o.child=w):(i=p.last,i!==null?i.sibling=w:o.child=w,p.last=w)}return p.tail!==null?(i=p.tail,p.rendering=i,p.tail=i.sibling,p.renderingStartTime=ee(),i.sibling=null,u=In.current,j(In,x?u&1|2:u&1),Wt&&Ji(o,p.treeForkCount),i):(En(o),null);case 22:case 23:return qr(o),Mm(),p=o.memoizedState!==null,i!==null?i.memoizedState!==null!==p&&(o.flags|=8192):p&&(o.flags|=8192),p?(u&536870912)!==0&&(o.flags&128)===0&&(En(o),o.subtreeFlags&6&&(o.flags|=8192)):En(o),u=o.updateQueue,u!==null&&Gf(o,u.retryQueue),u=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),p=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(p=o.memoizedState.cachePool.pool),p!==u&&(o.flags|=2048),i!==null&&V(Lo),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),o.memoizedState.cache!==u&&(o.flags|=2048),ts($n),En(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function sj(i,o){switch(bm(o),o.tag){case 1:return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return ts($n),fe(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 26:case 27:case 5:return _e(o),null;case 31:if(o.memoizedState!==null){if(qr(o),o.alternate===null)throw Error(r(340));Mo()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 13:if(qr(o),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(r(340));Mo()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return V(In),null;case 4:return fe(),null;case 10:return ts(o.type),null;case 22:case 23:return qr(o),Mm(),i!==null&&V(Lo),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 24:return ts($n),null;case 25:return null;default:return null}}function _S(i,o){switch(bm(o),o.tag){case 3:ts($n),fe();break;case 26:case 27:case 5:_e(o);break;case 4:fe();break;case 31:o.memoizedState!==null&&qr(o);break;case 13:qr(o);break;case 19:V(In);break;case 10:ts(o.type);break;case 22:case 23:qr(o),Mm(),i!==null&&V(Lo);break;case 24:ts($n)}}function hu(i,o){try{var u=o.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var x=p.next;u=x;do{if((u.tag&i)===i){p=void 0;var w=u.create,M=u.inst;p=w(),M.destroy=p}u=u.next}while(u!==x)}}catch(G){an(o,o.return,G)}}function qs(i,o,u){try{var p=o.updateQueue,x=p!==null?p.lastEffect:null;if(x!==null){var w=x.next;p=w;do{if((p.tag&i)===i){var M=p.inst,G=M.destroy;if(G!==void 0){M.destroy=void 0,x=o;var Q=u,pe=G;try{pe()}catch(Te){an(x,Q,Te)}}}p=p.next}while(p!==w)}}catch(Te){an(o,o.return,Te)}}function NS(i){var o=i.updateQueue;if(o!==null){var u=i.stateNode;try{v0(o,u)}catch(p){an(i,i.return,p)}}}function AS(i,o,u){u.props=Bo(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(p){an(i,o,p)}}function mu(i,o){try{var u=i.ref;if(u!==null){switch(i.tag){case 26:case 27:case 5:var p=i.stateNode;break;case 30:p=i.stateNode;break;default:p=i.stateNode}typeof u=="function"?i.refCleanup=u(p):u.current=p}}catch(x){an(i,o,x)}}function Ni(i,o){var u=i.ref,p=i.refCleanup;if(u!==null)if(typeof p=="function")try{p()}catch(x){an(i,o,x)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(x){an(i,o,x)}else u.current=null}function OS(i){var o=i.type,u=i.memoizedProps,p=i.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":u.autoFocus&&p.focus();break e;case"img":u.src?p.src=u.src:u.srcSet&&(p.srcset=u.srcSet)}}catch(x){an(i,i.return,x)}}function cg(i,o,u){try{var p=i.stateNode;Cj(p,i.type,u,o),p[$t]=o}catch(x){an(i,i.return,x)}}function MS(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Xs(i.type)||i.tag===4}function fg(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||MS(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&&Xs(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 dg(i,o,u){var p=i.tag;if(p===5||p===6)i=i.stateNode,o?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(i,o):(o=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,o.appendChild(i),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=Ve));else if(p!==4&&(p===27&&Xs(i.type)&&(u=i.stateNode,o=null),i=i.child,i!==null))for(dg(i,o,u),i=i.sibling;i!==null;)dg(i,o,u),i=i.sibling}function Vf(i,o,u){var p=i.tag;if(p===5||p===6)i=i.stateNode,o?u.insertBefore(i,o):u.appendChild(i);else if(p!==4&&(p===27&&Xs(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(Vf(i,o,u),i=i.sibling;i!==null;)Vf(i,o,u),i=i.sibling}function IS(i){var o=i.stateNode,u=i.memoizedProps;try{for(var p=i.type,x=o.attributes;x.length;)o.removeAttributeNode(x[0]);er(o,p,u),o[wt]=i,o[$t]=u}catch(w){an(i,i.return,w)}}var os=!1,Un=!1,pg=!1,DS=typeof WeakSet=="function"?WeakSet:Set,Kn=null;function oj(i,o){if(i=i.containerInfo,Dg=pd,i=Vk(i),om(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var p=u.getSelection&&u.getSelection();if(p&&p.rangeCount!==0){u=p.anchorNode;var x=p.anchorOffset,w=p.focusNode;p=p.focusOffset;try{u.nodeType,w.nodeType}catch{u=null;break e}var M=0,G=-1,Q=-1,pe=0,Te=0,Ae=i,me=null;t:for(;;){for(var ve;Ae!==u||x!==0&&Ae.nodeType!==3||(G=M+x),Ae!==w||p!==0&&Ae.nodeType!==3||(Q=M+p),Ae.nodeType===3&&(M+=Ae.nodeValue.length),(ve=Ae.firstChild)!==null;)me=Ae,Ae=ve;for(;;){if(Ae===i)break t;if(me===u&&++pe===x&&(G=M),me===w&&++Te===p&&(Q=M),(ve=Ae.nextSibling)!==null)break;Ae=me,me=Ae.parentNode}Ae=ve}u=G===-1||Q===-1?null:{start:G,end:Q}}else u=null}u=u||{start:0,end:0}}else u=null;for(Lg={focusedElem:i,selectionRange:u},pd=!1,Kn=o;Kn!==null;)if(o=Kn,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Kn=i;else for(;Kn!==null;){switch(o=Kn,w=o.alternate,i=o.flags,o.tag){case 0:if((i&4)!==0&&(i=o.updateQueue,i=i!==null?i.events:null,i!==null))for(u=0;u<i.length;u++)x=i[u],x.ref.impl=x.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&w!==null){i=void 0,u=o,x=w.memoizedProps,w=w.memoizedState,p=u.stateNode;try{var Je=Bo(u.type,x);i=p.getSnapshotBeforeUpdate(Je,w),p.__reactInternalSnapshotBeforeUpdate=i}catch(gt){an(u,u.return,gt)}}break;case 3:if((i&1024)!==0){if(i=o.stateNode.containerInfo,u=i.nodeType,u===9)Pg(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Pg(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=o.sibling,i!==null){i.return=o.return,Kn=i;break}Kn=o.return}}function LS(i,o,u){var p=u.flags;switch(u.tag){case 0:case 11:case 15:ls(i,u),p&4&&hu(5,u);break;case 1:if(ls(i,u),p&4)if(i=u.stateNode,o===null)try{i.componentDidMount()}catch(M){an(u,u.return,M)}else{var x=Bo(u.type,o.memoizedProps);o=o.memoizedState;try{i.componentDidUpdate(x,o,i.__reactInternalSnapshotBeforeUpdate)}catch(M){an(u,u.return,M)}}p&64&&NS(u),p&512&&mu(u,u.return);break;case 3:if(ls(i,u),p&64&&(i=u.updateQueue,i!==null)){if(o=null,u.child!==null)switch(u.child.tag){case 27:case 5:o=u.child.stateNode;break;case 1:o=u.child.stateNode}try{v0(i,o)}catch(M){an(u,u.return,M)}}break;case 27:o===null&&p&4&&IS(u);case 26:case 5:ls(i,u),o===null&&p&4&&OS(u),p&512&&mu(u,u.return);break;case 12:ls(i,u);break;case 31:ls(i,u),p&4&&PS(i,u);break;case 13:ls(i,u),p&4&&$S(i,u),p&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=mj.bind(null,u),Lj(i,u))));break;case 22:if(p=u.memoizedState!==null||os,!p){o=o!==null&&o.memoizedState!==null||Un,x=os;var w=Un;os=p,(Un=o)&&!w?us(i,u,(u.subtreeFlags&8772)!==0):ls(i,u),os=x,Un=w}break;case 30:break;default:ls(i,u)}}function jS(i){var o=i.alternate;o!==null&&(i.alternate=null,jS(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&Eo(o)),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 Tn=null,Er=!1;function as(i,o,u){for(u=u.child;u!==null;)zS(i,o,u),u=u.sibling}function zS(i,o,u){if(yt&&typeof yt.onCommitFiberUnmount=="function")try{yt.onCommitFiberUnmount(Qe,u)}catch{}switch(u.tag){case 26:Un||Ni(u,o),as(i,o,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Un||Ni(u,o);var p=Tn,x=Er;Xs(u.type)&&(Tn=u.stateNode,Er=!1),as(i,o,u),Eu(u.stateNode),Tn=p,Er=x;break;case 5:Un||Ni(u,o);case 6:if(p=Tn,x=Er,Tn=null,as(i,o,u),Tn=p,Er=x,Tn!==null)if(Er)try{(Tn.nodeType===9?Tn.body:Tn.nodeName==="HTML"?Tn.ownerDocument.body:Tn).removeChild(u.stateNode)}catch(w){an(u,o,w)}else try{Tn.removeChild(u.stateNode)}catch(w){an(u,o,w)}break;case 18:Tn!==null&&(Er?(i=Tn,Nw(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),Ya(i)):Nw(Tn,u.stateNode));break;case 4:p=Tn,x=Er,Tn=u.stateNode.containerInfo,Er=!0,as(i,o,u),Tn=p,Er=x;break;case 0:case 11:case 14:case 15:qs(2,u,o),Un||qs(4,u,o),as(i,o,u);break;case 1:Un||(Ni(u,o),p=u.stateNode,typeof p.componentWillUnmount=="function"&&AS(u,o,p)),as(i,o,u);break;case 21:as(i,o,u);break;case 22:Un=(p=Un)||u.memoizedState!==null,as(i,o,u),Un=p;break;default:as(i,o,u)}}function PS(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Ya(i)}catch(u){an(o,o.return,u)}}}function $S(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Ya(i)}catch(u){an(o,o.return,u)}}function aj(i){switch(i.tag){case 31:case 13:case 19:var o=i.stateNode;return o===null&&(o=i.stateNode=new DS),o;case 22:return i=i.stateNode,o=i._retryCache,o===null&&(o=i._retryCache=new DS),o;default:throw Error(r(435,i.tag))}}function Wf(i,o){var u=aj(i);o.forEach(function(p){if(!u.has(p)){u.add(p);var x=gj.bind(null,i,p);p.then(x,x)}})}function Tr(i,o){var u=o.deletions;if(u!==null)for(var p=0;p<u.length;p++){var x=u[p],w=i,M=o,G=M;e:for(;G!==null;){switch(G.tag){case 27:if(Xs(G.type)){Tn=G.stateNode,Er=!1;break e}break;case 5:Tn=G.stateNode,Er=!1;break e;case 3:case 4:Tn=G.stateNode.containerInfo,Er=!0;break e}G=G.return}if(Tn===null)throw Error(r(160));zS(w,M,x),Tn=null,Er=!1,w=x.alternate,w!==null&&(w.return=null),x.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)BS(o,i),o=o.sibling}var gi=null;function BS(i,o){var u=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Tr(o,i),Rr(i),p&4&&(qs(3,i,i.return),hu(3,i),qs(5,i,i.return));break;case 1:Tr(o,i),Rr(i),p&512&&(Un||u===null||Ni(u,u.return)),p&64&&os&&(i=i.updateQueue,i!==null&&(p=i.callbacks,p!==null&&(u=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=u===null?p:u.concat(p))));break;case 26:var x=gi;if(Tr(o,i),Rr(i),p&512&&(Un||u===null||Ni(u,u.return)),p&4){var w=u!==null?u.memoizedState:null;if(p=i.memoizedState,u===null)if(p===null)if(i.stateNode===null){e:{p=i.type,u=i.memoizedProps,x=x.ownerDocument||x;t:switch(p){case"title":w=x.getElementsByTagName("title")[0],(!w||w[Wi]||w[wt]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=x.createElement(p),x.head.insertBefore(w,x.querySelector("head > title"))),er(w,p,u),w[wt]=i,zn(w),p=w;break e;case"link":var M=Bw("link","href",x).get(p+(u.href||""));if(M){for(var G=0;G<M.length;G++)if(w=M[G],w.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&w.getAttribute("rel")===(u.rel==null?null:u.rel)&&w.getAttribute("title")===(u.title==null?null:u.title)&&w.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){M.splice(G,1);break t}}w=x.createElement(p),er(w,p,u),x.head.appendChild(w);break;case"meta":if(M=Bw("meta","content",x).get(p+(u.content||""))){for(G=0;G<M.length;G++)if(w=M[G],w.getAttribute("content")===(u.content==null?null:""+u.content)&&w.getAttribute("name")===(u.name==null?null:u.name)&&w.getAttribute("property")===(u.property==null?null:u.property)&&w.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&w.getAttribute("charset")===(u.charSet==null?null:u.charSet)){M.splice(G,1);break t}}w=x.createElement(p),er(w,p,u),x.head.appendChild(w);break;default:throw Error(r(468,p))}w[wt]=i,zn(w),p=w}i.stateNode=p}else Fw(x,i.type,i.stateNode);else i.stateNode=$w(x,p,i.memoizedProps);else w!==p?(w===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):w.count--,p===null?Fw(x,i.type,i.stateNode):$w(x,p,i.memoizedProps)):p===null&&i.stateNode!==null&&cg(i,i.memoizedProps,u.memoizedProps)}break;case 27:Tr(o,i),Rr(i),p&512&&(Un||u===null||Ni(u,u.return)),u!==null&&p&4&&cg(i,i.memoizedProps,u.memoizedProps);break;case 5:if(Tr(o,i),Rr(i),p&512&&(Un||u===null||Ni(u,u.return)),i.flags&32){x=i.stateNode;try{bt(x,"")}catch(Je){an(i,i.return,Je)}}p&4&&i.stateNode!=null&&(x=i.memoizedProps,cg(i,x,u!==null?u.memoizedProps:x)),p&1024&&(pg=!0);break;case 6:if(Tr(o,i),Rr(i),p&4){if(i.stateNode===null)throw Error(r(162));p=i.memoizedProps,u=i.stateNode;try{u.nodeValue=p}catch(Je){an(i,i.return,Je)}}break;case 3:if(ud=null,x=gi,gi=ad(o.containerInfo),Tr(o,i),gi=x,Rr(i),p&4&&u!==null&&u.memoizedState.isDehydrated)try{Ya(o.containerInfo)}catch(Je){an(i,i.return,Je)}pg&&(pg=!1,FS(i));break;case 4:p=gi,gi=ad(i.stateNode.containerInfo),Tr(o,i),Rr(i),gi=p;break;case 12:Tr(o,i),Rr(i);break;case 31:Tr(o,i),Rr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,Wf(i,p)));break;case 13:Tr(o,i),Rr(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Yf=ee()),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,Wf(i,p)));break;case 22:x=i.memoizedState!==null;var Q=u!==null&&u.memoizedState!==null,pe=os,Te=Un;if(os=pe||x,Un=Te||Q,Tr(o,i),Un=Te,os=pe,Rr(i),p&8192)e:for(o=i.stateNode,o._visibility=x?o._visibility&-2:o._visibility|1,x&&(u===null||Q||os||Un||Fo(i)),u=null,o=i;;){if(o.tag===5||o.tag===26){if(u===null){Q=u=o;try{if(w=Q.stateNode,x)M=w.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{G=Q.stateNode;var Ae=Q.memoizedProps.style,me=Ae!=null&&Ae.hasOwnProperty("display")?Ae.display:null;G.style.display=me==null||typeof me=="boolean"?"":(""+me).trim()}}catch(Je){an(Q,Q.return,Je)}}}else if(o.tag===6){if(u===null){Q=o;try{Q.stateNode.nodeValue=x?"":Q.memoizedProps}catch(Je){an(Q,Q.return,Je)}}}else if(o.tag===18){if(u===null){Q=o;try{var ve=Q.stateNode;x?Aw(ve,!0):Aw(Q.stateNode,!1)}catch(Je){an(Q,Q.return,Je)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===i)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break e;for(;o.sibling===null;){if(o.return===null||o.return===i)break e;u===o&&(u=null),o=o.return}u===o&&(u=null),o.sibling.return=o.return,o=o.sibling}p&4&&(p=i.updateQueue,p!==null&&(u=p.retryQueue,u!==null&&(p.retryQueue=null,Wf(i,u))));break;case 19:Tr(o,i),Rr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,Wf(i,p)));break;case 30:break;case 21:break;default:Tr(o,i),Rr(i)}}function Rr(i){var o=i.flags;if(o&2){try{for(var u,p=i.return;p!==null;){if(MS(p)){u=p;break}p=p.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var x=u.stateNode,w=fg(i);Vf(i,w,x);break;case 5:var M=u.stateNode;u.flags&32&&(bt(M,""),u.flags&=-33);var G=fg(i);Vf(i,G,M);break;case 3:case 4:var Q=u.stateNode.containerInfo,pe=fg(i);dg(i,pe,Q);break;default:throw Error(r(161))}}catch(Te){an(i,i.return,Te)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function FS(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var o=i;FS(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),i=i.sibling}}function ls(i,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)LS(i,o.alternate,o),o=o.sibling}function Fo(i){for(i=i.child;i!==null;){var o=i;switch(o.tag){case 0:case 11:case 14:case 15:qs(4,o,o.return),Fo(o);break;case 1:Ni(o,o.return);var u=o.stateNode;typeof u.componentWillUnmount=="function"&&AS(o,o.return,u),Fo(o);break;case 27:Eu(o.stateNode);case 26:case 5:Ni(o,o.return),Fo(o);break;case 22:o.memoizedState===null&&Fo(o);break;case 30:Fo(o);break;default:Fo(o)}i=i.sibling}}function us(i,o,u){for(u=u&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var p=o.alternate,x=i,w=o,M=w.flags;switch(w.tag){case 0:case 11:case 15:us(x,w,u),hu(4,w);break;case 1:if(us(x,w,u),p=w,x=p.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(pe){an(p,p.return,pe)}if(p=w,x=p.updateQueue,x!==null){var G=p.stateNode;try{var Q=x.shared.hiddenCallbacks;if(Q!==null)for(x.shared.hiddenCallbacks=null,x=0;x<Q.length;x++)y0(Q[x],G)}catch(pe){an(p,p.return,pe)}}u&&M&64&&NS(w),mu(w,w.return);break;case 27:IS(w);case 26:case 5:us(x,w,u),u&&p===null&&M&4&&OS(w),mu(w,w.return);break;case 12:us(x,w,u);break;case 31:us(x,w,u),u&&M&4&&PS(x,w);break;case 13:us(x,w,u),u&&M&4&&$S(x,w);break;case 22:w.memoizedState===null&&us(x,w,u),mu(w,w.return);break;case 30:break;default:us(x,w,u)}o=o.sibling}}function hg(i,o){var u=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),i=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(i=o.memoizedState.cachePool.pool),i!==u&&(i!=null&&i.refCount++,u!=null&&tu(u))}function mg(i,o){i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&tu(i))}function bi(i,o,u,p){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)US(i,o,u,p),o=o.sibling}function US(i,o,u,p){var x=o.flags;switch(o.tag){case 0:case 11:case 15:bi(i,o,u,p),x&2048&&hu(9,o);break;case 1:bi(i,o,u,p);break;case 3:bi(i,o,u,p),x&2048&&(i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&tu(i)));break;case 12:if(x&2048){bi(i,o,u,p),i=o.stateNode;try{var w=o.memoizedProps,M=w.id,G=w.onPostCommit;typeof G=="function"&&G(M,o.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(Q){an(o,o.return,Q)}}else bi(i,o,u,p);break;case 31:bi(i,o,u,p);break;case 13:bi(i,o,u,p);break;case 23:break;case 22:w=o.stateNode,M=o.alternate,o.memoizedState!==null?w._visibility&2?bi(i,o,u,p):gu(i,o):w._visibility&2?bi(i,o,u,p):(w._visibility|=2,Pa(i,o,u,p,(o.subtreeFlags&10256)!==0||!1)),x&2048&&hg(M,o);break;case 24:bi(i,o,u,p),x&2048&&mg(o.alternate,o);break;default:bi(i,o,u,p)}}function Pa(i,o,u,p,x){for(x=x&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var w=i,M=o,G=u,Q=p,pe=M.flags;switch(M.tag){case 0:case 11:case 15:Pa(w,M,G,Q,x),hu(8,M);break;case 23:break;case 22:var Te=M.stateNode;M.memoizedState!==null?Te._visibility&2?Pa(w,M,G,Q,x):gu(w,M):(Te._visibility|=2,Pa(w,M,G,Q,x)),x&&pe&2048&&hg(M.alternate,M);break;case 24:Pa(w,M,G,Q,x),x&&pe&2048&&mg(M.alternate,M);break;default:Pa(w,M,G,Q,x)}o=o.sibling}}function gu(i,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var u=i,p=o,x=p.flags;switch(p.tag){case 22:gu(u,p),x&2048&&hg(p.alternate,p);break;case 24:gu(u,p),x&2048&&mg(p.alternate,p);break;default:gu(u,p)}o=o.sibling}}var bu=8192;function $a(i,o,u){if(i.subtreeFlags&bu)for(i=i.child;i!==null;)qS(i,o,u),i=i.sibling}function qS(i,o,u){switch(i.tag){case 26:$a(i,o,u),i.flags&bu&&i.memoizedState!==null&&Wj(u,gi,i.memoizedState,i.memoizedProps);break;case 5:$a(i,o,u);break;case 3:case 4:var p=gi;gi=ad(i.stateNode.containerInfo),$a(i,o,u),gi=p;break;case 22:i.memoizedState===null&&(p=i.alternate,p!==null&&p.memoizedState!==null?(p=bu,bu=16777216,$a(i,o,u),bu=p):$a(i,o,u));break;default:$a(i,o,u)}}function HS(i){var o=i.alternate;if(o!==null&&(i=o.child,i!==null)){o.child=null;do o=i.sibling,i.sibling=null,i=o;while(i!==null)}}function yu(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var p=o[u];Kn=p,VS(p,i)}HS(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)GS(i),i=i.sibling}function GS(i){switch(i.tag){case 0:case 11:case 15:yu(i),i.flags&2048&&qs(9,i,i.return);break;case 3:yu(i);break;case 12:yu(i);break;case 22:var o=i.stateNode;i.memoizedState!==null&&o._visibility&2&&(i.return===null||i.return.tag!==13)?(o._visibility&=-3,Kf(i)):yu(i);break;default:yu(i)}}function Kf(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var p=o[u];Kn=p,VS(p,i)}HS(i)}for(i=i.child;i!==null;){switch(o=i,o.tag){case 0:case 11:case 15:qs(8,o,o.return),Kf(o);break;case 22:u=o.stateNode,u._visibility&2&&(u._visibility&=-3,Kf(o));break;default:Kf(o)}i=i.sibling}}function VS(i,o){for(;Kn!==null;){var u=Kn;switch(u.tag){case 0:case 11:case 15:qs(8,u,o);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var p=u.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:tu(u.memoizedState.cache)}if(p=u.child,p!==null)p.return=u,Kn=p;else e:for(u=i;Kn!==null;){p=Kn;var x=p.sibling,w=p.return;if(jS(p),p===u){Kn=null;break e}if(x!==null){x.return=w,Kn=x;break e}Kn=w}}}var lj={getCacheForType:function(i){var o=Qn($n),u=o.data.get(i);return u===void 0&&(u=i(),o.data.set(i,u)),u},cacheSignal:function(){return Qn($n).controller.signal}},uj=typeof WeakMap=="function"?WeakMap:Map,tn=0,mn=null,Bt=null,Ht=0,on=0,Hr=null,Hs=!1,Ba=!1,gg=!1,cs=0,On=0,Gs=0,Uo=0,bg=0,Gr=0,Fa=0,vu=null,Cr=null,yg=!1,Yf=0,WS=0,Xf=1/0,Zf=null,Vs=null,Gn=0,Ws=null,Ua=null,fs=0,vg=0,xg=null,KS=null,xu=0,kg=null;function Vr(){return(tn&2)!==0&&Ht!==0?Ht&-Ht:U.T!==null?Cg():ut()}function YS(){if(Gr===0)if((Ht&536870912)===0||Wt){var i=Dt;Dt<<=1,(Dt&3932160)===0&&(Dt=262144),Gr=i}else Gr=536870912;return i=Ur.current,i!==null&&(i.flags|=32),Gr}function _r(i,o,u){(i===mn&&(on===2||on===9)||i.cancelPendingCommit!==null)&&(qa(i,0),Ks(i,Ht,Gr,!1)),at(i,u),((tn&2)===0||i!==mn)&&(i===mn&&((tn&2)===0&&(Uo|=u),On===4&&Ks(i,Ht,Gr,!1)),Ai(i))}function XS(i,o,u){if((tn&6)!==0)throw Error(r(327));var p=!u&&(o&127)===0&&(o&i.expiredLanes)===0||he(i,o),x=p?dj(i,o):wg(i,o,!0),w=p;do{if(x===0){Ba&&!p&&Ks(i,o,0,!1);break}else{if(u=i.current.alternate,w&&!cj(u)){x=wg(i,o,!1),w=!1;continue}if(x===2){if(w=o,i.errorRecoveryDisabledLanes&w)var M=0;else M=i.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){o=M;e:{var G=i;x=vu;var Q=G.current.memoizedState.isDehydrated;if(Q&&(qa(G,M).flags|=256),M=wg(G,M,!1),M!==2){if(gg&&!Q){G.errorRecoveryDisabledLanes|=w,Uo|=w,x=4;break e}w=Cr,Cr=x,w!==null&&(Cr===null?Cr=w:Cr.push.apply(Cr,w))}x=M}if(w=!1,x!==2)continue}}if(x===1){qa(i,0),Ks(i,o,0,!0);break}e:{switch(p=i,w=x,w){case 0:case 1:throw Error(r(345));case 4:if((o&4194048)!==o)break;case 6:Ks(p,o,Gr,!Hs);break e;case 2:Cr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((o&62914560)===o&&(x=Yf+300-ee(),10<x)){if(Ks(p,o,Gr,!Hs),X(p,0,!0)!==0)break e;fs=o,p.timeoutHandle=Cw(ZS.bind(null,p,u,Cr,Zf,yg,o,Gr,Uo,Fa,Hs,w,"Throttled",-0,0),x);break e}ZS(p,u,Cr,Zf,yg,o,Gr,Uo,Fa,Hs,w,null,-0,0)}}break}while(!0);Ai(i)}function ZS(i,o,u,p,x,w,M,G,Q,pe,Te,Ae,me,ve){if(i.timeoutHandle=-1,Ae=o.subtreeFlags,Ae&8192||(Ae&16785408)===16785408){Ae={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ve},qS(o,w,Ae);var Je=(w&62914560)===w?Yf-ee():(w&4194048)===w?WS-ee():0;if(Je=Kj(Ae,Je),Je!==null){fs=w,i.cancelPendingCommit=Je(sw.bind(null,i,o,w,u,p,x,M,G,Q,Te,Ae,null,me,ve)),Ks(i,w,M,!pe);return}}sw(i,o,w,u,p,x,M,G,Q)}function cj(i){for(var o=i;;){var u=o.tag;if((u===0||u===11||u===15)&&o.flags&16384&&(u=o.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var p=0;p<u.length;p++){var x=u[p],w=x.getSnapshot;x=x.value;try{if(!Br(w(),x))return!1}catch{return!1}}if(u=o.child,o.subtreeFlags&16384&&u!==null)u.return=o,o=u;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Ks(i,o,u,p){o&=~bg,o&=~Uo,i.suspendedLanes|=o,i.pingedLanes&=~o,p&&(i.warmLanes|=o),p=i.expirationTimes;for(var x=o;0<x;){var w=31-tt(x),M=1<<w;p[w]=-1,x&=~M}u!==0&&Ee(i,u,o)}function Qf(){return(tn&6)===0?(ku(0),!1):!0}function Sg(){if(Bt!==null){if(on===0)var i=Bt.return;else i=Bt,es=Io=null,Pm(i),Ia=null,ru=0,i=Bt;for(;i!==null;)_S(i.alternate,i),i=i.return;Bt=null}}function qa(i,o){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,Aj(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),fs=0,Sg(),mn=i,Bt=u=Qi(i.current,null),Ht=o,on=0,Hr=null,Hs=!1,Ba=he(i,o),gg=!1,Fa=Gr=bg=Uo=Gs=On=0,Cr=vu=null,yg=!1,(o&8)!==0&&(o|=o&32);var p=i.entangledLanes;if(p!==0)for(i=i.entanglements,p&=o;0<p;){var x=31-tt(p),w=1<<x;o|=i[x],p&=~w}return cs=o,vf(),u}function QS(i,o){Nt=null,U.H=fu,o===Ma||o===Cf?(o=h0(),on=3):o===Rm?(o=h0(),on=4):on=o===eg?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Hr=o,Bt===null&&(On=1,Ff(i,ei(o,i.current)))}function JS(){var i=Ur.current;return i===null?!0:(Ht&4194048)===Ht?ii===null:(Ht&62914560)===Ht||(Ht&536870912)!==0?i===ii:!1}function ew(){var i=U.H;return U.H=fu,i===null?fu:i}function tw(){var i=U.A;return U.A=lj,i}function Jf(){On=4,Hs||(Ht&4194048)!==Ht&&Ur.current!==null||(Ba=!0),(Gs&134217727)===0&&(Uo&134217727)===0||mn===null||Ks(mn,Ht,Gr,!1)}function wg(i,o,u){var p=tn;tn|=2;var x=ew(),w=tw();(mn!==i||Ht!==o)&&(Zf=null,qa(i,o)),o=!1;var M=On;e:do try{if(on!==0&&Bt!==null){var G=Bt,Q=Hr;switch(on){case 8:Sg(),M=6;break e;case 3:case 2:case 9:case 6:Ur.current===null&&(o=!0);var pe=on;if(on=0,Hr=null,Ha(i,G,Q,pe),u&&Ba){M=0;break e}break;default:pe=on,on=0,Hr=null,Ha(i,G,Q,pe)}}fj(),M=On;break}catch(Te){QS(i,Te)}while(!0);return o&&i.shellSuspendCounter++,es=Io=null,tn=p,U.H=x,U.A=w,Bt===null&&(mn=null,Ht=0,vf()),M}function fj(){for(;Bt!==null;)nw(Bt)}function dj(i,o){var u=tn;tn|=2;var p=ew(),x=tw();mn!==i||Ht!==o?(Zf=null,Xf=ee()+500,qa(i,o)):Ba=he(i,o);e:do try{if(on!==0&&Bt!==null){o=Bt;var w=Hr;t:switch(on){case 1:on=0,Hr=null,Ha(i,o,w,1);break;case 2:case 9:if(d0(w)){on=0,Hr=null,rw(o);break}o=function(){on!==2&&on!==9||mn!==i||(on=7),Ai(i)},w.then(o,o);break e;case 3:on=7;break e;case 4:on=5;break e;case 7:d0(w)?(on=0,Hr=null,rw(o)):(on=0,Hr=null,Ha(i,o,w,7));break;case 5:var M=null;switch(Bt.tag){case 26:M=Bt.memoizedState;case 5:case 27:var G=Bt;if(M?Uw(M):G.stateNode.complete){on=0,Hr=null;var Q=G.sibling;if(Q!==null)Bt=Q;else{var pe=G.return;pe!==null?(Bt=pe,ed(pe)):Bt=null}break t}}on=0,Hr=null,Ha(i,o,w,5);break;case 6:on=0,Hr=null,Ha(i,o,w,6);break;case 8:Sg(),On=6;break e;default:throw Error(r(462))}}pj();break}catch(Te){QS(i,Te)}while(!0);return es=Io=null,U.H=p,U.A=x,tn=u,Bt!==null?0:(mn=null,Ht=0,vf(),On)}function pj(){for(;Bt!==null&&!be();)nw(Bt)}function nw(i){var o=RS(i.alternate,i,cs);i.memoizedProps=i.pendingProps,o===null?ed(i):Bt=o}function rw(i){var o=i,u=o.alternate;switch(o.tag){case 15:case 0:o=xS(u,o,o.pendingProps,o.type,void 0,Ht);break;case 11:o=xS(u,o,o.pendingProps,o.type.render,o.ref,Ht);break;case 5:Pm(o);default:_S(u,o),o=Bt=t0(o,cs),o=RS(u,o,cs)}i.memoizedProps=i.pendingProps,o===null?ed(i):Bt=o}function Ha(i,o,u,p){es=Io=null,Pm(o),Ia=null,ru=0;var x=o.return;try{if(tj(i,x,o,u,Ht)){On=1,Ff(i,ei(u,i.current)),Bt=null;return}}catch(w){if(x!==null)throw Bt=x,w;On=1,Ff(i,ei(u,i.current)),Bt=null;return}o.flags&32768?(Wt||p===1?i=!0:Ba||(Ht&536870912)!==0?i=!1:(Hs=i=!0,(p===2||p===9||p===3||p===6)&&(p=Ur.current,p!==null&&p.tag===13&&(p.flags|=16384))),iw(o,i)):ed(o)}function ed(i){var o=i;do{if((o.flags&32768)!==0){iw(o,Hs);return}i=o.return;var u=ij(o.alternate,o,cs);if(u!==null){Bt=u;return}if(o=o.sibling,o!==null){Bt=o;return}Bt=o=i}while(o!==null);On===0&&(On=5)}function iw(i,o){do{var u=sj(i.alternate,i);if(u!==null){u.flags&=32767,Bt=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!o&&(i=i.sibling,i!==null)){Bt=i;return}Bt=i=u}while(i!==null);On=6,Bt=null}function sw(i,o,u,p,x,w,M,G,Q){i.cancelPendingCommit=null;do td();while(Gn!==0);if((tn&6)!==0)throw Error(r(327));if(o!==null){if(o===i.current)throw Error(r(177));if(w=o.lanes|o.childLanes,w|=fm,qe(i,u,w,M,G,Q),i===mn&&(Bt=mn=null,Ht=0),Ua=o,Ws=i,fs=u,vg=w,xg=x,KS=p,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,bj(xe,function(){return cw(),null})):(i.callbackNode=null,i.callbackPriority=0),p=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||p){p=U.T,U.T=null,x=W.p,W.p=2,M=tn,tn|=4;try{oj(i,o,u)}finally{tn=M,W.p=x,U.T=p}}Gn=1,ow(),aw(),lw()}}function ow(){if(Gn===1){Gn=0;var i=Ws,o=Ua,u=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||u){u=U.T,U.T=null;var p=W.p;W.p=2;var x=tn;tn|=4;try{BS(o,i);var w=Lg,M=Vk(i.containerInfo),G=w.focusedElem,Q=w.selectionRange;if(M!==G&&G&&G.ownerDocument&&Gk(G.ownerDocument.documentElement,G)){if(Q!==null&&om(G)){var pe=Q.start,Te=Q.end;if(Te===void 0&&(Te=pe),"selectionStart"in G)G.selectionStart=pe,G.selectionEnd=Math.min(Te,G.value.length);else{var Ae=G.ownerDocument||document,me=Ae&&Ae.defaultView||window;if(me.getSelection){var ve=me.getSelection(),Je=G.textContent.length,gt=Math.min(Q.start,Je),cn=Q.end===void 0?gt:Math.min(Q.end,Je);!ve.extend&>>cn&&(M=cn,cn=gt,gt=M);var ae=Hk(G,gt),ie=Hk(G,cn);if(ae&&ie&&(ve.rangeCount!==1||ve.anchorNode!==ae.node||ve.anchorOffset!==ae.offset||ve.focusNode!==ie.node||ve.focusOffset!==ie.offset)){var de=Ae.createRange();de.setStart(ae.node,ae.offset),ve.removeAllRanges(),gt>cn?(ve.addRange(de),ve.extend(ie.node,ie.offset)):(de.setEnd(ie.node,ie.offset),ve.addRange(de))}}}}for(Ae=[],ve=G;ve=ve.parentNode;)ve.nodeType===1&&Ae.push({element:ve,left:ve.scrollLeft,top:ve.scrollTop});for(typeof G.focus=="function"&&G.focus(),G=0;G<Ae.length;G++){var Ce=Ae[G];Ce.element.scrollLeft=Ce.left,Ce.element.scrollTop=Ce.top}}pd=!!Dg,Lg=Dg=null}finally{tn=x,W.p=p,U.T=u}}i.current=o,Gn=2}}function aw(){if(Gn===2){Gn=0;var i=Ws,o=Ua,u=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||u){u=U.T,U.T=null;var p=W.p;W.p=2;var x=tn;tn|=4;try{LS(i,o.alternate,o)}finally{tn=x,W.p=p,U.T=u}}Gn=3}}function lw(){if(Gn===4||Gn===3){Gn=0,Re();var i=Ws,o=Ua,u=fs,p=KS;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Gn=5:(Gn=0,Ua=Ws=null,uw(i,i.pendingLanes));var x=i.pendingLanes;if(x===0&&(Vs=null),Ie(u),o=o.stateNode,yt&&typeof yt.onCommitFiberRoot=="function")try{yt.onCommitFiberRoot(Qe,o,void 0,(o.current.flags&128)===128)}catch{}if(p!==null){o=U.T,x=W.p,W.p=2,U.T=null;try{for(var w=i.onRecoverableError,M=0;M<p.length;M++){var G=p[M];w(G.value,{componentStack:G.stack})}}finally{U.T=o,W.p=x}}(fs&3)!==0&&td(),Ai(i),x=i.pendingLanes,(u&261930)!==0&&(x&42)!==0?i===kg?xu++:(xu=0,kg=i):xu=0,ku(0)}}function uw(i,o){(i.pooledCacheLanes&=o)===0&&(o=i.pooledCache,o!=null&&(i.pooledCache=null,tu(o)))}function td(){return ow(),aw(),lw(),cw()}function cw(){if(Gn!==5)return!1;var i=Ws,o=vg;vg=0;var u=Ie(fs),p=U.T,x=W.p;try{W.p=32>u?32:u,U.T=null,u=xg,xg=null;var w=Ws,M=fs;if(Gn=0,Ua=Ws=null,fs=0,(tn&6)!==0)throw Error(r(331));var G=tn;if(tn|=4,GS(w.current),US(w,w.current,M,u),tn=G,ku(0,!1),yt&&typeof yt.onPostCommitFiberRoot=="function")try{yt.onPostCommitFiberRoot(Qe,w)}catch{}return!0}finally{W.p=x,U.T=p,uw(i,o)}}function fw(i,o,u){o=ei(u,o),o=Jm(i.stateNode,o,2),i=Bs(i,o,2),i!==null&&(at(i,2),Ai(i))}function an(i,o,u){if(i.tag===3)fw(i,i,u);else for(;o!==null;){if(o.tag===3){fw(o,i,u);break}else if(o.tag===1){var p=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Vs===null||!Vs.has(p))){i=ei(u,i),u=dS(2),p=Bs(o,u,2),p!==null&&(pS(u,p,o,i),at(p,2),Ai(p));break}}o=o.return}}function Eg(i,o,u){var p=i.pingCache;if(p===null){p=i.pingCache=new uj;var x=new Set;p.set(o,x)}else x=p.get(o),x===void 0&&(x=new Set,p.set(o,x));x.has(u)||(gg=!0,x.add(u),i=hj.bind(null,i,o,u),o.then(i,i))}function hj(i,o,u){var p=i.pingCache;p!==null&&p.delete(o),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,mn===i&&(Ht&u)===u&&(On===4||On===3&&(Ht&62914560)===Ht&&300>ee()-Yf?(tn&2)===0&&qa(i,0):bg|=u,Fa===Ht&&(Fa=0)),Ai(i)}function dw(i,o){o===0&&(o=Ze()),i=Ao(i,o),i!==null&&(at(i,o),Ai(i))}function mj(i){var o=i.memoizedState,u=0;o!==null&&(u=o.retryLane),dw(i,u)}function gj(i,o){var u=0;switch(i.tag){case 31:case 13:var p=i.stateNode,x=i.memoizedState;x!==null&&(u=x.retryLane);break;case 19:p=i.stateNode;break;case 22:p=i.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(o),dw(i,u)}function bj(i,o){return Le(i,o)}var nd=null,Ga=null,Tg=!1,rd=!1,Rg=!1,Ys=0;function Ai(i){i!==Ga&&i.next===null&&(Ga===null?nd=Ga=i:Ga=Ga.next=i),rd=!0,Tg||(Tg=!0,vj())}function ku(i,o){if(!Rg&&rd){Rg=!0;do for(var u=!1,p=nd;p!==null;){if(i!==0){var x=p.pendingLanes;if(x===0)var w=0;else{var M=p.suspendedLanes,G=p.pingedLanes;w=(1<<31-tt(42|i)+1)-1,w&=x&~(M&~G),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(u=!0,gw(p,w))}else w=Ht,w=X(p,p===mn?w:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(w&3)===0||he(p,w)||(u=!0,gw(p,w));p=p.next}while(u);Rg=!1}}function yj(){pw()}function pw(){rd=Tg=!1;var i=0;Ys!==0&&Nj()&&(i=Ys);for(var o=ee(),u=null,p=nd;p!==null;){var x=p.next,w=hw(p,o);w===0?(p.next=null,u===null?nd=x:u.next=x,x===null&&(Ga=u)):(u=p,(i!==0||(w&3)!==0)&&(rd=!0)),p=x}Gn!==0&&Gn!==5||ku(i),Ys!==0&&(Ys=0)}function hw(i,o){for(var u=i.suspendedLanes,p=i.pingedLanes,x=i.expirationTimes,w=i.pendingLanes&-62914561;0<w;){var M=31-tt(w),G=1<<M,Q=x[M];Q===-1?((G&u)===0||(G&p)!==0)&&(x[M]=je(G,o)):Q<=o&&(i.expiredLanes|=G),w&=~G}if(o=mn,u=Ht,u=X(i,i===o?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p=i.callbackNode,u===0||i===o&&(on===2||on===9)||i.cancelPendingCommit!==null)return p!==null&&p!==null&&He(p),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||he(i,u)){if(o=u&-u,o===i.callbackPriority)return o;switch(p!==null&&He(p),Ie(u)){case 2:case 8:u=re;break;case 32:u=xe;break;case 268435456:u=Xe;break;default:u=xe}return p=mw.bind(null,i),u=Le(u,p),i.callbackPriority=o,i.callbackNode=u,o}return p!==null&&p!==null&&He(p),i.callbackPriority=2,i.callbackNode=null,2}function mw(i,o){if(Gn!==0&&Gn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(td()&&i.callbackNode!==u)return null;var p=Ht;return p=X(i,i===mn?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p===0?null:(XS(i,p,o),hw(i,ee()),i.callbackNode!=null&&i.callbackNode===u?mw.bind(null,i):null)}function gw(i,o){if(td())return null;XS(i,o,!0)}function vj(){Oj(function(){(tn&6)!==0?Le(J,yj):pw()})}function Cg(){if(Ys===0){var i=Aa;i===0&&(i=vt,vt<<=1,(vt&261888)===0&&(vt=256)),Ys=i}return Ys}function bw(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Ms(""+i)}function yw(i,o){var u=o.ownerDocument.createElement("input");return u.name=o.name,u.value=o.value,i.id&&u.setAttribute("form",i.id),o.parentNode.insertBefore(u,o),i=new FormData(i),u.parentNode.removeChild(u),i}function xj(i,o,u,p,x){if(o==="submit"&&u&&u.stateNode===x){var w=bw((x[$t]||null).action),M=p.submitter;M&&(o=(o=M[$t]||null)?bw(o.formAction):M.getAttribute("formAction"),o!==null&&(w=o,M=null));var G=new mf("action","action",null,p,x);i.push({event:G,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(Ys!==0){var Q=M?yw(x,M):new FormData(x);Wm(u,{pending:!0,data:Q,method:x.method,action:w},null,Q)}}else typeof w=="function"&&(G.preventDefault(),Q=M?yw(x,M):new FormData(x),Wm(u,{pending:!0,data:Q,method:x.method,action:w},w,Q))},currentTarget:x}]})}}for(var _g=0;_g<cm.length;_g++){var Ng=cm[_g],kj=Ng.toLowerCase(),Sj=Ng[0].toUpperCase()+Ng.slice(1);mi(kj,"on"+Sj)}mi(Yk,"onAnimationEnd"),mi(Xk,"onAnimationIteration"),mi(Zk,"onAnimationStart"),mi("dblclick","onDoubleClick"),mi("focusin","onFocus"),mi("focusout","onBlur"),mi(PL,"onTransitionRun"),mi($L,"onTransitionStart"),mi(BL,"onTransitionCancel"),mi(Qk,"onTransitionEnd"),Pe("onMouseEnter",["mouseout","mouseover"]),Pe("onMouseLeave",["mouseout","mouseover"]),Pe("onPointerEnter",["pointerout","pointerover"]),Pe("onPointerLeave",["pointerout","pointerover"]),Yi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Yi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Yi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Yi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Yi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Yi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Su="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(" "),wj=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Su));function vw(i,o){o=(o&4)!==0;for(var u=0;u<i.length;u++){var p=i[u],x=p.event;p=p.listeners;e:{var w=void 0;if(o)for(var M=p.length-1;0<=M;M--){var G=p[M],Q=G.instance,pe=G.currentTarget;if(G=G.listener,Q!==w&&x.isPropagationStopped())break e;w=G,x.currentTarget=pe;try{w(x)}catch(Te){yf(Te)}x.currentTarget=null,w=Q}else for(M=0;M<p.length;M++){if(G=p[M],Q=G.instance,pe=G.currentTarget,G=G.listener,Q!==w&&x.isPropagationStopped())break e;w=G,x.currentTarget=pe;try{w(x)}catch(Te){yf(Te)}x.currentTarget=null,w=Q}}}}function Ft(i,o){var u=o[jr];u===void 0&&(u=o[jr]=new Set);var p=i+"__bubble";u.has(p)||(xw(o,i,2,!1),u.add(p))}function Ag(i,o,u){var p=0;o&&(p|=4),xw(u,i,p,o)}var id="_reactListening"+Math.random().toString(36).slice(2);function Og(i){if(!i[id]){i[id]=!0,af.forEach(function(u){u!=="selectionchange"&&(wj.has(u)||Ag(u,!1,i),Ag(u,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[id]||(o[id]=!0,Ag("selectionchange",!1,o))}}function xw(i,o,u,p){switch(Yw(o)){case 2:var x=Zj;break;case 8:x=Qj;break;default:x=Vg}u=x.bind(null,o,u,i),x=void 0,!Zh||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(x=!0),p?x!==void 0?i.addEventListener(o,u,{capture:!0,passive:x}):i.addEventListener(o,u,!0):x!==void 0?i.addEventListener(o,u,{passive:x}):i.addEventListener(o,u,!1)}function Mg(i,o,u,p,x){var w=p;if((o&1)===0&&(o&2)===0&&p!==null)e:for(;;){if(p===null)return;var M=p.tag;if(M===3||M===4){var G=p.stateNode.containerInfo;if(G===x)break;if(M===4)for(M=p.return;M!==null;){var Q=M.tag;if((Q===3||Q===4)&&M.stateNode.containerInfo===x)return;M=M.return}for(;G!==null;){if(M=hr(G),M===null)return;if(Q=M.tag,Q===5||Q===6||Q===26||Q===27){p=w=M;continue e}G=G.parentNode}}p=p.return}ff(function(){var pe=w,Te=Ct(u),Ae=[];e:{var me=Jk.get(i);if(me!==void 0){var ve=mf,Je=i;switch(i){case"keypress":if(pf(u)===0)break e;case"keydown":case"keyup":ve=gL;break;case"focusin":Je="focus",ve=tm;break;case"focusout":Je="blur",ve=tm;break;case"beforeblur":case"afterblur":ve=tm;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ve=_k;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ve=iL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ve=vL;break;case Yk:case Xk:case Zk:ve=aL;break;case Qk:ve=kL;break;case"scroll":case"scrollend":ve=nL;break;case"wheel":ve=wL;break;case"copy":case"cut":case"paste":ve=uL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ve=Ak;break;case"toggle":case"beforetoggle":ve=TL}var gt=(o&4)!==0,cn=!gt&&(i==="scroll"||i==="scrollend"),ae=gt?me!==null?me+"Capture":null:me;gt=[];for(var ie=pe,de;ie!==null;){var Ce=ie;if(de=Ce.stateNode,Ce=Ce.tag,Ce!==5&&Ce!==26&&Ce!==27||de===null||ae===null||(Ce=Hl(ie,ae),Ce!=null&>.push(wu(ie,Ce,de))),cn)break;ie=ie.return}0<gt.length&&(me=new ve(me,Je,null,u,Te),Ae.push({event:me,listeners:gt}))}}if((o&7)===0){e:{if(me=i==="mouseover"||i==="pointerover",ve=i==="mouseout"||i==="pointerout",me&&u!==nt&&(Je=u.relatedTarget||u.fromElement)&&(hr(Je)||Je[Rn]))break e;if((ve||me)&&(me=Te.window===Te?Te:(me=Te.ownerDocument)?me.defaultView||me.parentWindow:window,ve?(Je=u.relatedTarget||u.toElement,ve=pe,Je=Je?hr(Je):null,Je!==null&&(cn=a(Je),gt=Je.tag,Je!==cn||gt!==5&>!==27&>!==6)&&(Je=null)):(ve=null,Je=pe),ve!==Je)){if(gt=_k,Ce="onMouseLeave",ae="onMouseEnter",ie="mouse",(i==="pointerout"||i==="pointerover")&&(gt=Ak,Ce="onPointerLeave",ae="onPointerEnter",ie="pointer"),cn=ve==null?me:Ns(ve),de=Je==null?me:Ns(Je),me=new gt(Ce,ie+"leave",ve,u,Te),me.target=cn,me.relatedTarget=de,Ce=null,hr(Te)===pe&&(gt=new gt(ae,ie+"enter",Je,u,Te),gt.target=de,gt.relatedTarget=cn,Ce=gt),cn=Ce,ve&&Je)t:{for(gt=Ej,ae=ve,ie=Je,de=0,Ce=ae;Ce;Ce=gt(Ce))de++;Ce=0;for(var lt=ie;lt;lt=gt(lt))Ce++;for(;0<de-Ce;)ae=gt(ae),de--;for(;0<Ce-de;)ie=gt(ie),Ce--;for(;de--;){if(ae===ie||ie!==null&&ae===ie.alternate){gt=ae;break t}ae=gt(ae),ie=gt(ie)}gt=null}else gt=null;ve!==null&&kw(Ae,me,ve,gt,!1),Je!==null&&cn!==null&&kw(Ae,cn,Je,gt,!0)}}e:{if(me=pe?Ns(pe):window,ve=me.nodeName&&me.nodeName.toLowerCase(),ve==="select"||ve==="input"&&me.type==="file")var Qt=Pk;else if(jk(me))if($k)Qt=LL;else{Qt=IL;var rt=ML}else ve=me.nodeName,!ve||ve.toLowerCase()!=="input"||me.type!=="checkbox"&&me.type!=="radio"?pe&&Os(pe.elementType)&&(Qt=Pk):Qt=DL;if(Qt&&(Qt=Qt(i,pe))){zk(Ae,Qt,u,Te);break e}rt&&rt(i,me,pe),i==="focusout"&&pe&&me.type==="number"&&pe.memoizedProps.value!=null&&va(me,"number",me.value)}switch(rt=pe?Ns(pe):window,i){case"focusin":(jk(rt)||rt.contentEditable==="true")&&(Sa=rt,am=pe,Ql=null);break;case"focusout":Ql=am=Sa=null;break;case"mousedown":lm=!0;break;case"contextmenu":case"mouseup":case"dragend":lm=!1,Wk(Ae,u,Te);break;case"selectionchange":if(zL)break;case"keydown":case"keyup":Wk(Ae,u,Te)}var Ot;if(rm)e:{switch(i){case"compositionstart":var Gt="onCompositionStart";break e;case"compositionend":Gt="onCompositionEnd";break e;case"compositionupdate":Gt="onCompositionUpdate";break e}Gt=void 0}else ka?Dk(i,u)&&(Gt="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(Gt="onCompositionStart");Gt&&(Ok&&u.locale!=="ko"&&(ka||Gt!=="onCompositionStart"?Gt==="onCompositionEnd"&&ka&&(Ot=Rk()):(Is=Te,Qh="value"in Is?Is.value:Is.textContent,ka=!0)),rt=sd(pe,Gt),0<rt.length&&(Gt=new Nk(Gt,i,null,u,Te),Ae.push({event:Gt,listeners:rt}),Ot?Gt.data=Ot:(Ot=Lk(u),Ot!==null&&(Gt.data=Ot)))),(Ot=CL?_L(i,u):NL(i,u))&&(Gt=sd(pe,"onBeforeInput"),0<Gt.length&&(rt=new Nk("onBeforeInput","beforeinput",null,u,Te),Ae.push({event:rt,listeners:Gt}),rt.data=Ot)),xj(Ae,i,pe,u,Te)}vw(Ae,o)})}function wu(i,o,u){return{instance:i,listener:o,currentTarget:u}}function sd(i,o){for(var u=o+"Capture",p=[];i!==null;){var x=i,w=x.stateNode;if(x=x.tag,x!==5&&x!==26&&x!==27||w===null||(x=Hl(i,u),x!=null&&p.unshift(wu(i,x,w)),x=Hl(i,o),x!=null&&p.push(wu(i,x,w))),i.tag===3)return p;i=i.return}return[]}function Ej(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function kw(i,o,u,p,x){for(var w=o._reactName,M=[];u!==null&&u!==p;){var G=u,Q=G.alternate,pe=G.stateNode;if(G=G.tag,Q!==null&&Q===p)break;G!==5&&G!==26&&G!==27||pe===null||(Q=pe,x?(pe=Hl(u,w),pe!=null&&M.unshift(wu(u,pe,Q))):x||(pe=Hl(u,w),pe!=null&&M.push(wu(u,pe,Q)))),u=u.return}M.length!==0&&i.push({event:o,listeners:M})}var Tj=/\r\n?/g,Rj=/\u0000|\uFFFD/g;function Sw(i){return(typeof i=="string"?i:""+i).replace(Tj,`
|
|
9
|
+
`).replace(Rj,"")}function ww(i,o){return o=Sw(o),Sw(i)===o}function un(i,o,u,p,x,w){switch(u){case"children":typeof p=="string"?o==="body"||o==="textarea"&&p===""||bt(i,p):(typeof p=="number"||typeof p=="bigint")&&o!=="body"&&bt(i,""+p);break;case"className":Pr(i,"class",p);break;case"tabIndex":Pr(i,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":Pr(i,u,p);break;case"style":sn(i,p,w);break;case"data":if(o!=="object"){Pr(i,"data",p);break}case"src":case"href":if(p===""&&(o!=="a"||u!=="href")){i.removeAttribute(u);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(u);break}p=Ms(""+p),i.setAttribute(u,p);break;case"action":case"formAction":if(typeof p=="function"){i.setAttribute(u,"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 w=="function"&&(u==="formAction"?(o!=="input"&&un(i,o,"name",x.name,x,null),un(i,o,"formEncType",x.formEncType,x,null),un(i,o,"formMethod",x.formMethod,x,null),un(i,o,"formTarget",x.formTarget,x,null)):(un(i,o,"encType",x.encType,x,null),un(i,o,"method",x.method,x,null),un(i,o,"target",x.target,x,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(u);break}p=Ms(""+p),i.setAttribute(u,p);break;case"onClick":p!=null&&(i.onclick=Ve);break;case"onScroll":p!=null&&Ft("scroll",i);break;case"onScrollEnd":p!=null&&Ft("scrollend",i);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(u=p.__html,u!=null){if(x.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"multiple":i.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":i.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){i.removeAttribute("xlink:href");break}u=Ms(""+p),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,""+p):i.removeAttribute(u);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":p&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":p===!0?i.setAttribute(u,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,p):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?i.setAttribute(u,p):i.removeAttribute(u);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?i.removeAttribute(u):i.setAttribute(u,p);break;case"popover":Ft("beforetoggle",i),Ft("toggle",i),rr(i,"popover",p);break;case"xlinkActuate":kr(i,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":kr(i,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":kr(i,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":kr(i,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":kr(i,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":kr(i,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":kr(i,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":kr(i,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":kr(i,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":rr(i,"is",p);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=Xi.get(u)||u,rr(i,u,p))}}function Ig(i,o,u,p,x,w){switch(u){case"style":sn(i,p,w);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(u=p.__html,u!=null){if(x.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"children":typeof p=="string"?bt(i,p):(typeof p=="number"||typeof p=="bigint")&&bt(i,""+p);break;case"onScroll":p!=null&&Ft("scroll",i);break;case"onScrollEnd":p!=null&&Ft("scrollend",i);break;case"onClick":p!=null&&(i.onclick=Ve);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!To.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(x=u.endsWith("Capture"),o=u.slice(2,x?u.length-7:void 0),w=i[$t]||null,w=w!=null?w[u]:null,typeof w=="function"&&i.removeEventListener(o,w,x),typeof p=="function")){typeof w!="function"&&w!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(o,p,x);break e}u in i?i[u]=p:p===!0?i.setAttribute(u,""):rr(i,u,p)}}}function er(i,o,u){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ft("error",i),Ft("load",i);var p=!1,x=!1,w;for(w in u)if(u.hasOwnProperty(w)){var M=u[w];if(M!=null)switch(w){case"src":p=!0;break;case"srcSet":x=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:un(i,o,w,M,u,null)}}x&&un(i,o,"srcSet",u.srcSet,u,null),p&&un(i,o,"src",u.src,u,null);return;case"input":Ft("invalid",i);var G=w=M=x=null,Q=null,pe=null;for(p in u)if(u.hasOwnProperty(p)){var Te=u[p];if(Te!=null)switch(p){case"name":x=Te;break;case"type":M=Te;break;case"checked":Q=Te;break;case"defaultChecked":pe=Te;break;case"value":w=Te;break;case"defaultValue":G=Te;break;case"children":case"dangerouslySetInnerHTML":if(Te!=null)throw Error(r(137,o));break;default:un(i,o,p,Te,u,null)}}Ro(i,w,G,Q,pe,M,x,!1);return;case"select":Ft("invalid",i),p=M=w=null;for(x in u)if(u.hasOwnProperty(x)&&(G=u[x],G!=null))switch(x){case"value":w=G;break;case"defaultValue":M=G;break;case"multiple":p=G;default:un(i,o,x,G,u,null)}o=w,u=M,i.multiple=!!p,o!=null?Xn(i,!!p,o,!1):u!=null&&Xn(i,!!p,u,!0);return;case"textarea":Ft("invalid",i),w=x=p=null;for(M in u)if(u.hasOwnProperty(M)&&(G=u[M],G!=null))switch(M){case"value":p=G;break;case"defaultValue":x=G;break;case"children":w=G;break;case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(91));break;default:un(i,o,M,G,u,null)}xa(i,p,x,w);return;case"option":for(Q in u)u.hasOwnProperty(Q)&&(p=u[Q],p!=null)&&(Q==="selected"?i.selected=p&&typeof p!="function"&&typeof p!="symbol":un(i,o,Q,p,u,null));return;case"dialog":Ft("beforetoggle",i),Ft("toggle",i),Ft("cancel",i),Ft("close",i);break;case"iframe":case"object":Ft("load",i);break;case"video":case"audio":for(p=0;p<Su.length;p++)Ft(Su[p],i);break;case"image":Ft("error",i),Ft("load",i);break;case"details":Ft("toggle",i);break;case"embed":case"source":case"link":Ft("error",i),Ft("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(pe in u)if(u.hasOwnProperty(pe)&&(p=u[pe],p!=null))switch(pe){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:un(i,o,pe,p,u,null)}return;default:if(Os(o)){for(Te in u)u.hasOwnProperty(Te)&&(p=u[Te],p!==void 0&&Ig(i,o,Te,p,u,void 0));return}}for(G in u)u.hasOwnProperty(G)&&(p=u[G],p!=null&&un(i,o,G,p,u,null))}function Cj(i,o,u,p){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var x=null,w=null,M=null,G=null,Q=null,pe=null,Te=null;for(ve in u){var Ae=u[ve];if(u.hasOwnProperty(ve)&&Ae!=null)switch(ve){case"checked":break;case"value":break;case"defaultValue":Q=Ae;default:p.hasOwnProperty(ve)||un(i,o,ve,null,p,Ae)}}for(var me in p){var ve=p[me];if(Ae=u[me],p.hasOwnProperty(me)&&(ve!=null||Ae!=null))switch(me){case"type":w=ve;break;case"name":x=ve;break;case"checked":pe=ve;break;case"defaultChecked":Te=ve;break;case"value":M=ve;break;case"defaultValue":G=ve;break;case"children":case"dangerouslySetInnerHTML":if(ve!=null)throw Error(r(137,o));break;default:ve!==Ae&&un(i,o,me,ve,p,Ae)}}Fl(i,M,G,Q,pe,Te,w,x);return;case"select":ve=M=G=me=null;for(w in u)if(Q=u[w],u.hasOwnProperty(w)&&Q!=null)switch(w){case"value":break;case"multiple":ve=Q;default:p.hasOwnProperty(w)||un(i,o,w,null,p,Q)}for(x in p)if(w=p[x],Q=u[x],p.hasOwnProperty(x)&&(w!=null||Q!=null))switch(x){case"value":me=w;break;case"defaultValue":G=w;break;case"multiple":M=w;default:w!==Q&&un(i,o,x,w,p,Q)}o=G,u=M,p=ve,me!=null?Xn(i,!!u,me,!1):!!p!=!!u&&(o!=null?Xn(i,!!u,o,!0):Xn(i,!!u,u?[]:"",!1));return;case"textarea":ve=me=null;for(G in u)if(x=u[G],u.hasOwnProperty(G)&&x!=null&&!p.hasOwnProperty(G))switch(G){case"value":break;case"children":break;default:un(i,o,G,null,p,x)}for(M in p)if(x=p[M],w=u[M],p.hasOwnProperty(M)&&(x!=null||w!=null))switch(M){case"value":me=x;break;case"defaultValue":ve=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:x!==w&&un(i,o,M,x,p,w)}uf(i,me,ve);return;case"option":for(var Je in u)me=u[Je],u.hasOwnProperty(Je)&&me!=null&&!p.hasOwnProperty(Je)&&(Je==="selected"?i.selected=!1:un(i,o,Je,null,p,me));for(Q in p)me=p[Q],ve=u[Q],p.hasOwnProperty(Q)&&me!==ve&&(me!=null||ve!=null)&&(Q==="selected"?i.selected=me&&typeof me!="function"&&typeof me!="symbol":un(i,o,Q,me,p,ve));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 gt in u)me=u[gt],u.hasOwnProperty(gt)&&me!=null&&!p.hasOwnProperty(gt)&&un(i,o,gt,null,p,me);for(pe in p)if(me=p[pe],ve=u[pe],p.hasOwnProperty(pe)&&me!==ve&&(me!=null||ve!=null))switch(pe){case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(r(137,o));break;default:un(i,o,pe,me,p,ve)}return;default:if(Os(o)){for(var cn in u)me=u[cn],u.hasOwnProperty(cn)&&me!==void 0&&!p.hasOwnProperty(cn)&&Ig(i,o,cn,void 0,p,me);for(Te in p)me=p[Te],ve=u[Te],!p.hasOwnProperty(Te)||me===ve||me===void 0&&ve===void 0||Ig(i,o,Te,me,p,ve);return}}for(var ae in u)me=u[ae],u.hasOwnProperty(ae)&&me!=null&&!p.hasOwnProperty(ae)&&un(i,o,ae,null,p,me);for(Ae in p)me=p[Ae],ve=u[Ae],!p.hasOwnProperty(Ae)||me===ve||me==null&&ve==null||un(i,o,Ae,me,p,ve)}function Ew(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function _j(){if(typeof performance.getEntriesByType=="function"){for(var i=0,o=0,u=performance.getEntriesByType("resource"),p=0;p<u.length;p++){var x=u[p],w=x.transferSize,M=x.initiatorType,G=x.duration;if(w&&G&&Ew(M)){for(M=0,G=x.responseEnd,p+=1;p<u.length;p++){var Q=u[p],pe=Q.startTime;if(pe>G)break;var Te=Q.transferSize,Ae=Q.initiatorType;Te&&Ew(Ae)&&(Q=Q.responseEnd,M+=Te*(Q<G?1:(G-pe)/(Q-pe)))}if(--p,o+=8*(w+M)/(x.duration/1e3),i++,10<i)break}}if(0<i)return o/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var Dg=null,Lg=null;function od(i){return i.nodeType===9?i:i.ownerDocument}function Tw(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 Rw(i,o){if(i===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&o==="foreignObject"?0:i}function jg(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var zg=null;function Nj(){var i=window.event;return i&&i.type==="popstate"?i===zg?!1:(zg=i,!0):(zg=null,!1)}var Cw=typeof setTimeout=="function"?setTimeout:void 0,Aj=typeof clearTimeout=="function"?clearTimeout:void 0,_w=typeof Promise=="function"?Promise:void 0,Oj=typeof queueMicrotask=="function"?queueMicrotask:typeof _w<"u"?function(i){return _w.resolve(null).then(i).catch(Mj)}:Cw;function Mj(i){setTimeout(function(){throw i})}function Xs(i){return i==="head"}function Nw(i,o){var u=o,p=0;do{var x=u.nextSibling;if(i.removeChild(u),x&&x.nodeType===8)if(u=x.data,u==="/$"||u==="/&"){if(p===0){i.removeChild(x),Ya(o);return}p--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")p++;else if(u==="html")Eu(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,Eu(u);for(var w=u.firstChild;w;){var M=w.nextSibling,G=w.nodeName;w[Wi]||G==="SCRIPT"||G==="STYLE"||G==="LINK"&&w.rel.toLowerCase()==="stylesheet"||u.removeChild(w),w=M}}else u==="body"&&Eu(i.ownerDocument.body);u=x}while(u);Ya(o)}function Aw(i,o){var u=i;i=0;do{var p=u.nextSibling;if(u.nodeType===1?o?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(o?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),p&&p.nodeType===8)if(u=p.data,u==="/$"){if(i===0)break;i--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||i++;u=p}while(u)}function Pg(i){var o=i.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var u=o;switch(o=o.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":Pg(u),Eo(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function Ij(i,o,u,p){for(;i.nodeType===1;){var x=u;if(i.nodeName.toLowerCase()!==o.toLowerCase()){if(!p&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(p){if(!i[Wi])switch(o){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(w=i.getAttribute("rel"),w==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(w!==x.rel||i.getAttribute("href")!==(x.href==null||x.href===""?null:x.href)||i.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin)||i.getAttribute("title")!==(x.title==null?null:x.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(w=i.getAttribute("src"),(w!==(x.src==null?null:x.src)||i.getAttribute("type")!==(x.type==null?null:x.type)||i.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin))&&w&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(o==="input"&&i.type==="hidden"){var w=x.name==null?null:""+x.name;if(x.type==="hidden"&&i.getAttribute("name")===w)return i}else return i;if(i=si(i.nextSibling),i===null)break}return null}function Dj(i,o,u){if(o==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=si(i.nextSibling),i===null))return null;return i}function Ow(i,o){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!o||(i=si(i.nextSibling),i===null))return null;return i}function $g(i){return i.data==="$?"||i.data==="$~"}function Bg(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function Lj(i,o){var u=i.ownerDocument;if(i.data==="$~")i._reactRetry=o;else if(i.data!=="$?"||u.readyState!=="loading")o();else{var p=function(){o(),u.removeEventListener("DOMContentLoaded",p)};u.addEventListener("DOMContentLoaded",p),i._reactRetry=p}}function si(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return i}var Fg=null;function Mw(i){i=i.nextSibling;for(var o=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(o===0)return si(i.nextSibling);o--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||o++}i=i.nextSibling}return null}function Iw(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(o===0)return i;o--}else u!=="/$"&&u!=="/&"||o++}i=i.previousSibling}return null}function Dw(i,o,u){switch(o=od(u),i){case"html":if(i=o.documentElement,!i)throw Error(r(452));return i;case"head":if(i=o.head,!i)throw Error(r(453));return i;case"body":if(i=o.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function Eu(i){for(var o=i.attributes;o.length;)i.removeAttributeNode(o[0]);Eo(i)}var oi=new Map,Lw=new Set;function ad(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var ds=W.d;W.d={f:jj,r:zj,D:Pj,C:$j,L:Bj,m:Fj,X:qj,S:Uj,M:Hj};function jj(){var i=ds.f(),o=Qf();return i||o}function zj(i){var o=Ki(i);o!==null&&o.tag===5&&o.type==="form"?Q0(o):ds.r(i)}var Va=typeof document>"u"?null:document;function jw(i,o,u){var p=Va;if(p&&typeof o=="string"&&o){var x=Sr(o);x='link[rel="'+i+'"][href="'+x+'"]',typeof u=="string"&&(x+='[crossorigin="'+u+'"]'),Lw.has(x)||(Lw.add(x),i={rel:i,crossOrigin:u,href:o},p.querySelector(x)===null&&(o=p.createElement("link"),er(o,"link",i),zn(o),p.head.appendChild(o)))}}function Pj(i){ds.D(i),jw("dns-prefetch",i,null)}function $j(i,o){ds.C(i,o),jw("preconnect",i,o)}function Bj(i,o,u){ds.L(i,o,u);var p=Va;if(p&&i&&o){var x='link[rel="preload"][as="'+Sr(o)+'"]';o==="image"&&u&&u.imageSrcSet?(x+='[imagesrcset="'+Sr(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(x+='[imagesizes="'+Sr(u.imageSizes)+'"]')):x+='[href="'+Sr(i)+'"]';var w=x;switch(o){case"style":w=Wa(i);break;case"script":w=Ka(i)}oi.has(w)||(i=m({rel:"preload",href:o==="image"&&u&&u.imageSrcSet?void 0:i,as:o},u),oi.set(w,i),p.querySelector(x)!==null||o==="style"&&p.querySelector(Tu(w))||o==="script"&&p.querySelector(Ru(w))||(o=p.createElement("link"),er(o,"link",i),zn(o),p.head.appendChild(o)))}}function Fj(i,o){ds.m(i,o);var u=Va;if(u&&i){var p=o&&typeof o.as=="string"?o.as:"script",x='link[rel="modulepreload"][as="'+Sr(p)+'"][href="'+Sr(i)+'"]',w=x;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=Ka(i)}if(!oi.has(w)&&(i=m({rel:"modulepreload",href:i},o),oi.set(w,i),u.querySelector(x)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Ru(w)))return}p=u.createElement("link"),er(p,"link",i),zn(p),u.head.appendChild(p)}}}function Uj(i,o,u){ds.S(i,o,u);var p=Va;if(p&&i){var x=As(p).hoistableStyles,w=Wa(i);o=o||"default";var M=x.get(w);if(!M){var G={loading:0,preload:null};if(M=p.querySelector(Tu(w)))G.loading=5;else{i=m({rel:"stylesheet",href:i,"data-precedence":o},u),(u=oi.get(w))&&Ug(i,u);var Q=M=p.createElement("link");zn(Q),er(Q,"link",i),Q._p=new Promise(function(pe,Te){Q.onload=pe,Q.onerror=Te}),Q.addEventListener("load",function(){G.loading|=1}),Q.addEventListener("error",function(){G.loading|=2}),G.loading|=4,ld(M,o,p)}M={type:"stylesheet",instance:M,count:1,state:G},x.set(w,M)}}}function qj(i,o){ds.X(i,o);var u=Va;if(u&&i){var p=As(u).hoistableScripts,x=Ka(i),w=p.get(x);w||(w=u.querySelector(Ru(x)),w||(i=m({src:i,async:!0},o),(o=oi.get(x))&&qg(i,o),w=u.createElement("script"),zn(w),er(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},p.set(x,w))}}function Hj(i,o){ds.M(i,o);var u=Va;if(u&&i){var p=As(u).hoistableScripts,x=Ka(i),w=p.get(x);w||(w=u.querySelector(Ru(x)),w||(i=m({src:i,async:!0,type:"module"},o),(o=oi.get(x))&&qg(i,o),w=u.createElement("script"),zn(w),er(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},p.set(x,w))}}function zw(i,o,u,p){var x=(x=se.current)?ad(x):null;if(!x)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(o=Wa(u.href),u=As(x).hoistableStyles,p=u.get(o),p||(p={type:"style",instance:null,count:0,state:null},u.set(o,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=Wa(u.href);var w=As(x).hoistableStyles,M=w.get(i);if(M||(x=x.ownerDocument||x,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(i,M),(w=x.querySelector(Tu(i)))&&!w._p&&(M.instance=w,M.state.loading=5),oi.has(i)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},oi.set(i,u),w||Gj(x,i,u,M.state))),o&&p===null)throw Error(r(528,""));return M}if(o&&p!==null)throw Error(r(529,""));return null;case"script":return o=u.async,u=u.src,typeof u=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=Ka(u),u=As(x).hoistableScripts,p=u.get(o),p||(p={type:"script",instance:null,count:0,state:null},u.set(o,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function Wa(i){return'href="'+Sr(i)+'"'}function Tu(i){return'link[rel="stylesheet"]['+i+"]"}function Pw(i){return m({},i,{"data-precedence":i.precedence,precedence:null})}function Gj(i,o,u,p){i.querySelector('link[rel="preload"][as="style"]['+o+"]")?p.loading=1:(o=i.createElement("link"),p.preload=o,o.addEventListener("load",function(){return p.loading|=1}),o.addEventListener("error",function(){return p.loading|=2}),er(o,"link",u),zn(o),i.head.appendChild(o))}function Ka(i){return'[src="'+Sr(i)+'"]'}function Ru(i){return"script[async]"+i}function $w(i,o,u){if(o.count++,o.instance===null)switch(o.type){case"style":var p=i.querySelector('style[data-href~="'+Sr(u.href)+'"]');if(p)return o.instance=p,zn(p),p;var x=m({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return p=(i.ownerDocument||i).createElement("style"),zn(p),er(p,"style",x),ld(p,u.precedence,i),o.instance=p;case"stylesheet":x=Wa(u.href);var w=i.querySelector(Tu(x));if(w)return o.state.loading|=4,o.instance=w,zn(w),w;p=Pw(u),(x=oi.get(x))&&Ug(p,x),w=(i.ownerDocument||i).createElement("link"),zn(w);var M=w;return M._p=new Promise(function(G,Q){M.onload=G,M.onerror=Q}),er(w,"link",p),o.state.loading|=4,ld(w,u.precedence,i),o.instance=w;case"script":return w=Ka(u.src),(x=i.querySelector(Ru(w)))?(o.instance=x,zn(x),x):(p=u,(x=oi.get(w))&&(p=m({},u),qg(p,x)),i=i.ownerDocument||i,x=i.createElement("script"),zn(x),er(x,"link",p),i.head.appendChild(x),o.instance=x);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(p=o.instance,o.state.loading|=4,ld(p,u.precedence,i));return o.instance}function ld(i,o,u){for(var p=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=p.length?p[p.length-1]:null,w=x,M=0;M<p.length;M++){var G=p[M];if(G.dataset.precedence===o)w=G;else if(w!==x)break}w?w.parentNode.insertBefore(i,w.nextSibling):(o=u.nodeType===9?u.head:u,o.insertBefore(i,o.firstChild))}function Ug(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.title==null&&(i.title=o.title)}function qg(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.integrity==null&&(i.integrity=o.integrity)}var ud=null;function Bw(i,o,u){if(ud===null){var p=new Map,x=ud=new Map;x.set(u,p)}else x=ud,p=x.get(u),p||(p=new Map,x.set(u,p));if(p.has(i))return p;for(p.set(i,null),u=u.getElementsByTagName(i),x=0;x<u.length;x++){var w=u[x];if(!(w[Wi]||w[wt]||i==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var M=w.getAttribute(o)||"";M=i+M;var G=p.get(M);G?G.push(w):p.set(M,[w])}}return p}function Fw(i,o,u){i=i.ownerDocument||i,i.head.insertBefore(u,o==="title"?i.querySelector("head > title"):null)}function Vj(i,o,u){if(u===1||o.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(i=o.disabled,typeof o.precedence=="string"&&i==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function Uw(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function Wj(i,o,u,p){if(u.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var x=Wa(p.href),w=o.querySelector(Tu(x));if(w){o=w._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(i.count++,i=cd.bind(i),o.then(i,i)),u.state.loading|=4,u.instance=w,zn(w);return}w=o.ownerDocument||o,p=Pw(p),(x=oi.get(x))&&Ug(p,x),w=w.createElement("link"),zn(w);var M=w;M._p=new Promise(function(G,Q){M.onload=G,M.onerror=Q}),er(w,"link",p),u.instance=w}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,o),(o=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=cd.bind(i),o.addEventListener("load",u),o.addEventListener("error",u))}}var Hg=0;function Kj(i,o){return i.stylesheets&&i.count===0&&dd(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var p=setTimeout(function(){if(i.stylesheets&&dd(i,i.stylesheets),i.unsuspend){var w=i.unsuspend;i.unsuspend=null,w()}},6e4+o);0<i.imgBytes&&Hg===0&&(Hg=62500*_j());var x=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&dd(i,i.stylesheets),i.unsuspend)){var w=i.unsuspend;i.unsuspend=null,w()}},(i.imgBytes>Hg?50:800)+o);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(p),clearTimeout(x)}}:null}function cd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)dd(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var fd=null;function dd(i,o){i.stylesheets=null,i.unsuspend!==null&&(i.count++,fd=new Map,o.forEach(Yj,i),fd=null,cd.call(i))}function Yj(i,o){if(!(o.state.loading&4)){var u=fd.get(i);if(u)var p=u.get(null);else{u=new Map,fd.set(i,u);for(var x=i.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<x.length;w++){var M=x[w];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(u.set(M.dataset.precedence,M),p=M)}p&&u.set(null,p)}x=o.instance,M=x.getAttribute("data-precedence"),w=u.get(M)||p,w===p&&u.set(null,x),u.set(M,x),this.count++,p=cd.bind(this),x.addEventListener("load",p),x.addEventListener("error",p),w?w.parentNode.insertBefore(x,w.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(x,i.firstChild)),o.state.loading|=4}}var Cu={$$typeof:C,Provider:null,Consumer:null,_currentValue:B,_currentValue2:B,_threadCount:0};function Xj(i,o,u,p,x,w,M,G,Q){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=St(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=St(0),this.hiddenUpdates=St(null),this.identifierPrefix=p,this.onUncaughtError=x,this.onCaughtError=w,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function qw(i,o,u,p,x,w,M,G,Q,pe,Te,Ae){return i=new Xj(i,o,u,M,Q,pe,Te,Ae,G),o=1,w===!0&&(o|=24),w=Fr(3,null,null,o),i.current=w,w.stateNode=i,o=wm(),o.refCount++,i.pooledCache=o,o.refCount++,w.memoizedState={element:p,isDehydrated:u,cache:o},Cm(w),i}function Hw(i){return i?(i=Ta,i):Ta}function Gw(i,o,u,p,x,w){x=Hw(x),p.context===null?p.context=x:p.pendingContext=x,p=$s(o),p.payload={element:u},w=w===void 0?null:w,w!==null&&(p.callback=w),u=Bs(i,p,o),u!==null&&(_r(u,i,o),su(u,i,o))}function Vw(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<o?u:o}}function Gg(i,o){Vw(i,o),(i=i.alternate)&&Vw(i,o)}function Ww(i){if(i.tag===13||i.tag===31){var o=Ao(i,67108864);o!==null&&_r(o,i,67108864),Gg(i,67108864)}}function Kw(i){if(i.tag===13||i.tag===31){var o=Vr();o=Ne(o);var u=Ao(i,o);u!==null&&_r(u,i,o),Gg(i,o)}}var pd=!0;function Zj(i,o,u,p){var x=U.T;U.T=null;var w=W.p;try{W.p=2,Vg(i,o,u,p)}finally{W.p=w,U.T=x}}function Qj(i,o,u,p){var x=U.T;U.T=null;var w=W.p;try{W.p=8,Vg(i,o,u,p)}finally{W.p=w,U.T=x}}function Vg(i,o,u,p){if(pd){var x=Wg(p);if(x===null)Mg(i,o,p,hd,u),Xw(i,p);else if(ez(x,i,o,u,p))p.stopPropagation();else if(Xw(i,p),o&4&&-1<Jj.indexOf(i)){for(;x!==null;){var w=Ki(x);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var M=At(w.pendingLanes);if(M!==0){var G=w;for(G.pendingLanes|=2,G.entangledLanes|=2;M;){var Q=1<<31-tt(M);G.entanglements[1]|=Q,M&=~Q}Ai(w),(tn&6)===0&&(Xf=ee()+500,ku(0))}}break;case 31:case 13:G=Ao(w,2),G!==null&&_r(G,w,2),Qf(),Gg(w,2)}if(w=Wg(p),w===null&&Mg(i,o,p,hd,u),w===x)break;x=w}x!==null&&p.stopPropagation()}else Mg(i,o,p,null,u)}}function Wg(i){return i=Ct(i),Kg(i)}var hd=null;function Kg(i){if(hd=null,i=hr(i),i!==null){var o=a(i);if(o===null)i=null;else{var u=o.tag;if(u===13){if(i=l(o),i!==null)return i;i=null}else if(u===31){if(i=c(o),i!==null)return i;i=null}else if(u===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return hd=i,null}function Yw(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(ce()){case J:return 2;case re:return 8;case xe:case $e:return 32;case Xe:return 268435456;default:return 32}default:return 32}}var Yg=!1,Zs=null,Qs=null,Js=null,_u=new Map,Nu=new Map,eo=[],Jj="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 Xw(i,o){switch(i){case"focusin":case"focusout":Zs=null;break;case"dragenter":case"dragleave":Qs=null;break;case"mouseover":case"mouseout":Js=null;break;case"pointerover":case"pointerout":_u.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nu.delete(o.pointerId)}}function Au(i,o,u,p,x,w){return i===null||i.nativeEvent!==w?(i={blockedOn:o,domEventName:u,eventSystemFlags:p,nativeEvent:w,targetContainers:[x]},o!==null&&(o=Ki(o),o!==null&&Ww(o)),i):(i.eventSystemFlags|=p,o=i.targetContainers,x!==null&&o.indexOf(x)===-1&&o.push(x),i)}function ez(i,o,u,p,x){switch(o){case"focusin":return Zs=Au(Zs,i,o,u,p,x),!0;case"dragenter":return Qs=Au(Qs,i,o,u,p,x),!0;case"mouseover":return Js=Au(Js,i,o,u,p,x),!0;case"pointerover":var w=x.pointerId;return _u.set(w,Au(_u.get(w)||null,i,o,u,p,x)),!0;case"gotpointercapture":return w=x.pointerId,Nu.set(w,Au(Nu.get(w)||null,i,o,u,p,x)),!0}return!1}function Zw(i){var o=hr(i.target);if(o!==null){var u=a(o);if(u!==null){if(o=u.tag,o===13){if(o=l(u),o!==null){i.blockedOn=o,Be(i.priority,function(){Kw(u)});return}}else if(o===31){if(o=c(u),o!==null){i.blockedOn=o,Be(i.priority,function(){Kw(u)});return}}else if(o===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function md(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var u=Wg(i.nativeEvent);if(u===null){u=i.nativeEvent;var p=new u.constructor(u.type,u);nt=p,u.target.dispatchEvent(p),nt=null}else return o=Ki(u),o!==null&&Ww(o),i.blockedOn=u,!1;o.shift()}return!0}function Qw(i,o,u){md(i)&&u.delete(o)}function tz(){Yg=!1,Zs!==null&&md(Zs)&&(Zs=null),Qs!==null&&md(Qs)&&(Qs=null),Js!==null&&md(Js)&&(Js=null),_u.forEach(Qw),Nu.forEach(Qw)}function gd(i,o){i.blockedOn===o&&(i.blockedOn=null,Yg||(Yg=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,tz)))}var bd=null;function Jw(i){bd!==i&&(bd=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){bd===i&&(bd=null);for(var o=0;o<i.length;o+=3){var u=i[o],p=i[o+1],x=i[o+2];if(typeof p!="function"){if(Kg(p||u)===null)continue;break}var w=Ki(u);w!==null&&(i.splice(o,3),o-=3,Wm(w,{pending:!0,data:x,method:u.method,action:p},p,x))}}))}function Ya(i){function o(Q){return gd(Q,i)}Zs!==null&&gd(Zs,i),Qs!==null&&gd(Qs,i),Js!==null&&gd(Js,i),_u.forEach(o),Nu.forEach(o);for(var u=0;u<eo.length;u++){var p=eo[u];p.blockedOn===i&&(p.blockedOn=null)}for(;0<eo.length&&(u=eo[0],u.blockedOn===null);)Zw(u),u.blockedOn===null&&eo.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(p=0;p<u.length;p+=3){var x=u[p],w=u[p+1],M=x[$t]||null;if(typeof w=="function")M||Jw(u);else if(M){var G=null;if(w&&w.hasAttribute("formAction")){if(x=w,M=w[$t]||null)G=M.formAction;else if(Kg(x)!==null)continue}else G=M.action;typeof G=="function"?u[p+1]=G:(u.splice(p,3),p-=3),Jw(u)}}}function e1(){function i(w){w.canIntercept&&w.info==="react-transition"&&w.intercept({handler:function(){return new Promise(function(M){return x=M})},focusReset:"manual",scroll:"manual"})}function o(){x!==null&&(x(),x=null),p||setTimeout(u,20)}function u(){if(!p&&!navigation.transition){var w=navigation.currentEntry;w&&w.url!=null&&navigation.navigate(w.url,{state:w.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,x=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(u,100),function(){p=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),x!==null&&(x(),x=null)}}}function Xg(i){this._internalRoot=i}yd.prototype.render=Xg.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(r(409));var u=o.current,p=Vr();Gw(u,p,i,o,null,null)},yd.prototype.unmount=Xg.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;Gw(i.current,2,null,i,null,null),Qf(),o[Rn]=null}};function yd(i){this._internalRoot=i}yd.prototype.unstable_scheduleHydration=function(i){if(i){var o=ut();i={blockedOn:null,target:i,priority:o};for(var u=0;u<eo.length&&o!==0&&o<eo[u].priority;u++);eo.splice(u,0,i),u===0&&Zw(i)}};var t1=t.version;if(t1!=="19.2.6")throw Error(r(527,t1,"19.2.6"));W.findDOMNode=function(i){var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=f(o),i=i!==null?h(i):null,i=i===null?null:i.stateNode,i};var nz={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vd.isDisabled&&vd.supportsFiber)try{Qe=vd.inject(nz),yt=vd}catch{}}return Mu.createRoot=function(i,o){if(!s(i))throw Error(r(299));var u=!1,p="",x=lS,w=uS,M=cS;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(x=o.onUncaughtError),o.onCaughtError!==void 0&&(w=o.onCaughtError),o.onRecoverableError!==void 0&&(M=o.onRecoverableError)),o=qw(i,1,!1,null,null,u,p,null,x,w,M,e1),i[Rn]=o.current,Og(i),new Xg(o)},Mu.hydrateRoot=function(i,o,u){if(!s(i))throw Error(r(299));var p=!1,x="",w=lS,M=uS,G=cS,Q=null;return u!=null&&(u.unstable_strictMode===!0&&(p=!0),u.identifierPrefix!==void 0&&(x=u.identifierPrefix),u.onUncaughtError!==void 0&&(w=u.onUncaughtError),u.onCaughtError!==void 0&&(M=u.onCaughtError),u.onRecoverableError!==void 0&&(G=u.onRecoverableError),u.formState!==void 0&&(Q=u.formState)),o=qw(i,1,!0,o,u??null,p,x,Q,w,M,G,e1),o.context=Hw(null),u=o.current,p=Vr(),p=Ne(p),x=$s(p),x.callback=null,Bs(u,x,p),u=p,o.current.lanes=u,at(o,u),Ai(o),i[Rn]=o.current,Og(i),new yd(o)},Mu.version="19.2.6",Mu}var f1;function pz(){if(f1)return Jg.exports;f1=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(),Jg.exports=dz(),Jg.exports}var hz=pz(),Iu={},d1;function mz(){if(d1)return Iu;d1=1,Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.styleq=void 0;var e=new WeakMap,t="$$css";function n(s){var a,l,c;return s!=null&&(a=s.disableCache===!0,l=s.disableMix===!0,c=s.transform),function(){for(var f=[],h="",m=null,b="",y=a?null:e,k=new Array(arguments.length),S=0;S<arguments.length;S++)k[S]=arguments[S];for(;k.length>0;){var R=k.pop();if(!(R==null||R===!1)){if(Array.isArray(R)){for(var T=0;T<R.length;T++)k.push(R[T]);continue}var E=c!=null?c(R):R;if(E.$$css!=null){var C="";if(y!=null&&y.has(E)){var _=y.get(E);_!=null&&(C=_[0],b=_[2],f.push.apply(f,_[1]),y=_[3])}else{var D=[];for(var N in E){var A=E[N];if(N===t){var $=E[N];$!==!0&&(b=b?$+"; "+b:$);continue}typeof A=="string"||A===null?f.includes(N)||(f.push(N),y!=null&&D.push(N),typeof A=="string"&&(C+=C?" "+A:A)):console.error("styleq: ".concat(N," typeof ").concat(String(A),' is not "string" or "null".'))}if(y!=null){var z=new WeakMap;y.set(E,[C,D,b,z]),y=z}}C&&(h=h?C+" "+h:C)}else if(l)m==null&&(m={}),m=Object.assign({},E,m);else{var I=null;for(var Y in E){var H=E[Y];H!==void 0&&(f.includes(Y)||(H!=null&&(m==null&&(m={}),I==null&&(I={}),I[Y]=H),f.push(Y),y=null))}I!=null&&(m=Object.assign(I,m))}}}var q=[h,m,b];return q}}var r=Iu.styleq=n();return r.factory=n,Iu}var gz=mz();function jt(...e){const[t,n,r]=gz.styleq(e),s={};return t!=null&&t!==""&&(s.className=t),n!=null&&Object.keys(n).length>0&&(s.style=n),r!=null&&r!==""&&(s["data-style-src"]=r),s}function OC(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=OC(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function bz(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=OC(e))&&(r&&(r+=" "),r+=t);return r}function nn(...e){return bz(e)}function Kt({rootClass:e,stylexStyles:t,className:n,style:r}){const s=jt(t);return{className:nn(e,s.className,n),style:{...s.style,...r}}}const yz={"--cursor-easing-out-quint":"var(--cursor-easing-out-quint)"},vi={base:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",khDVqt:"ui-uxw1ft",kMv6JI:"ui-1acoasx",krdFHd:"ui-1bi1pm6",kfmiAY:"ui-4ao1vk",kT0f0o:"ui-cwn6ta",kVL7Gh:"ui-42qtjs",kGuDYH:"ui-1wm8ruf",kLWn49:"ui-spwq11",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0},sizeSm:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-1hcev8z",kGO01o:"ui-18d9i69",kZCmMZ:"ui-149t747",$$css:!0},sizeMd:{kLKAdn:"ui-493x5y",kwRFfy:"ui-1tlft3r",kGO01o:"ui-b6dno7",kZCmMZ:"ui-tw3t59",$$css:!0},pill:{krdFHd:"ui-inloh",kfmiAY:"ui-zbf5sq",kT0f0o:"ui-jpqjuy",kVL7Gh:"ui-mzb00y",$$css:!0},pillSizeSm:{kLKAdn:"ui-493x5y",kwRFfy:"ui-196pc8s",kGO01o:"ui-b6dno7",kZCmMZ:"ui-22095l",$$css:!0},pillSizeMd:{kLKAdn:"ui-5pb957",kwRFfy:"ui-19bzwdx",kGO01o:"ui-1mmyrcj",kZCmMZ:"ui-v853mj",$$css:!0},variantAccent:{kMwMTN:"ui-kbann2",kWkggS:"ui-gsjhps",$$css:!0},variantNeutral:{kMwMTN:"ui-19aaqeu",kWkggS:"ui-i07v4r",$$css:!0},variantSuccess:{kMwMTN:"ui-1w5rjie",kWkggS:"ui-1buh4up",$$css:!0},variantWarn:{kMwMTN:"ui-1izesbo",kWkggS:"ui-1xvwvse",$$css:!0},variantDanger:{kMwMTN:"ui-1jh5svw",kWkggS:"ui-1xnwcy6",$$css:!0}};function vz({pill:e,size:t,variant:n}){return[vi.base,t==="sm"?vi.sizeSm:vi.sizeMd,e?[vi.pill,t==="sm"?vi.pillSizeSm:vi.pillSizeMd]:null,xz(n)]}function xz(e){switch(e){case"accent":return vi.variantAccent;case"neutral":return vi.variantNeutral;case"success":return vi.variantSuccess;case"warn":return vi.variantWarn;case"danger":return vi.variantDanger}}function uo({children:e,variant:t="neutral",size:n="md",pill:r=!1,as:s="span",className:a,style:l,...c}){const d=Kt({rootClass:"ui-status-badge",stylexStyles:vz({pill:r,size:n,variant:t}),className:a,style:l});return g.jsx(s,{className:d.className,style:d.style,"data-variant":t,"data-size":n,"data-pill":r||void 0,...c,children:e})}function kz(e,t){return function(r,...s){const a=new URL(e);return a.searchParams.set("code",r.toString()),s.forEach(l=>a.searchParams.append("args[]",l)),`${t} error #${r}; visit ${a} for the full message.`}}const Nn=kz("https://base-ui.com/production-error","Base UI"),p1={};function Ir(e,t){const n=v.useRef(p1);return n.current===p1&&(n.current=e(t)),n}function co(e,t,n,r){const s=Ir(MC).current;return wz(s,e,t,n,r)&&IC(s,[e,t,n,r]),s.callback}function Sz(e){const t=Ir(MC).current;return Ez(t,e)&&IC(t,e),t.callback}function MC(){return{callback:null,cleanup:null,refs:[]}}function wz(e,t,n,r,s){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==s}function Ez(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function IC(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let s=0;s<t.length;s+=1){const a=t[s];if(a!=null)switch(typeof a){case"function":{const l=a(n);typeof l=="function"&&(r[s]=l);break}case"object":{a.current=n;break}}}e.cleanup=()=>{for(let s=0;s<t.length;s+=1){const a=t[s];if(a!=null)switch(typeof a){case"function":{const l=r[s];typeof l=="function"?l():a(null);break}case"object":{a.current=null;break}}}}}}}const Tz=parseInt(v.version,10);function Rv(e){return Tz>=e}function h1(e){if(!v.isValidElement(e))return null;const t=e,n=t.props;return(Rv(19)?n?.ref:t.ref)??null}function xy(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Vn(){}const fo=Object.freeze([]),jn=Object.freeze({});function Rz(e,t){const n={};for(const r in e){const s=e[r];if(t?.hasOwnProperty(r)){const a=t[r](s);a!=null&&Object.assign(n,a);continue}s===!0?n[`data-${r.toLowerCase()}`]="":s&&(n[`data-${r.toLowerCase()}`]=s.toString())}return n}function Cz(e,t){return typeof e=="function"?e(t):e}function DC(e,t){return typeof e=="function"?e(t):e}const Cv={};function Pi(e,t,n,r,s){if(!n&&!r&&!s&&!e)return gp(t);let a=gp(e);return t&&(a=Zu(a,t)),n&&(a=Zu(a,n)),r&&(a=Zu(a,r)),s&&(a=Zu(a,s)),a}function _z(e){if(e.length===0)return Cv;if(e.length===1)return gp(e[0]);let t=gp(e[0]);for(let n=1;n<e.length;n+=1)t=Zu(t,e[n]);return t}function gp(e){return _v(e)?{...jC(e,Cv)}:Nz(e)}function Zu(e,t){return _v(t)?jC(t,e):Az(e,t)}function Nz(e){const t={...e};for(const n in t){const r=t[n];LC(n,r)&&(t[n]=zC(r))}return t}function Az(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=xy(e.style,r);break}case"className":{e[n]=PC(e.className,r);break}default:LC(n,r)?e[n]=Oz(e[n],r):e[n]=r}}return e}function LC(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),s=e.charCodeAt(2);return n===111&&r===110&&s>=65&&s<=90&&(typeof t=="function"||typeof t>"u")}function _v(e){return typeof e=="function"}function jC(e,t){return _v(e)?e(t):e??Cv}function Oz(e,t){return t?e?(...n)=>{const r=n[0];if($C(r)){const a=r;bp(a);const l=t(...n);return a.baseUIHandlerPrevented||e?.(...n),l}const s=t(...n);return e?.(...n),s}:zC(t):e}function zC(e){return e&&((...t)=>{const n=t[0];return $C(n)&&bp(n),e(...t)})}function bp(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function PC(e,t){return t?e?t+" "+e:t:e}function $C(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function hn(e,t,n={}){const r=t.render,s=Mz(t,n);if(n.enabled===!1)return null;const a=n.state??jn;return Lz(e,r,s,a)}function Mz(e,t={}){const{className:n,style:r,render:s}=e,{state:a=jn,ref:l,props:c,stateAttributesMapping:d,enabled:f=!0}=t,h=f?Cz(n,a):void 0,m=f?DC(r,a):void 0,b=f?Rz(a,d):jn,y=f&&c?Iz(c):void 0,k=f?xy(b,y)??{}:jn;return typeof document<"u"&&(f?Array.isArray(l)?k.ref=Sz([k.ref,h1(s),...l]):k.ref=co(k.ref,h1(s),l):co(null,null)),f?(h!==void 0&&(k.className=PC(k.className,h)),m!==void 0&&(k.style=xy(k.style,m)),k):jn}function Iz(e){return Array.isArray(e)?_z(e):Pi(void 0,e)}const Dz=Symbol.for("react.lazy");function Lz(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const s=Pi(n,t.props);s.ref=n.ref;let a=t;return a?.$$typeof===Dz&&(a=v.Children.toArray(t)[0]),v.cloneElement(a,s)}if(e&&typeof e=="string")return jz(e,n);throw new Error(Nn(8))}function jz(e,t){return e==="button"?v.createElement("button",{type:"button",...t,key:t.key}):e==="img"?v.createElement("img",{alt:"",...t,key:t.key}):v.createElement(e,t)}let Jo=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const zz={[Jo.startingStyle]:""},Pz={[Jo.endingStyle]:""},go={transitionStatus(e){return e==="starting"?zz:e==="ending"?Pz:null}};let Nv=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Jo.startingStyle]="startingStyle",e[e.endingStyle=Jo.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),yp=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const $z={[yp.popupOpen]:""},Bz={[yp.popupOpen]:"",[yp.pressed]:""},Fz={[Nv.open]:""},Uz={[Nv.closed]:""},qz={[Nv.anchorHidden]:""},BC={open(e){return e?$z:null}},Hz={open(e){return e?Bz:null}},$c={open(e){return e?Fz:Uz},anchorHidden(e){return e?qz:null}};function nh(){return typeof window<"u"}function Wn(e){return rh(e)?(e.nodeName||"").toLowerCase():"#document"}function kn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Hi(e){var t;return(t=(rh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function rh(e){return nh()?e instanceof Node||e instanceof kn(e).Node:!1}function ft(e){return nh()?e instanceof Element||e instanceof kn(e).Element:!1}function zt(e){return nh()?e instanceof HTMLElement||e instanceof kn(e).HTMLElement:!1}function po(e){return!nh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kn(e).ShadowRoot}function bo(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=fr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function Gz(e){return/^(table|td|th)$/.test(Wn(e))}function ih(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Vz=/transform|translate|scale|rotate|perspective|filter/,Wz=/paint|layout|strict|content/,qo=e=>!!e&&e!=="none";let rb;function Av(e){const t=ft(e)?fr(e):e;return qo(t.transform)||qo(t.translate)||qo(t.scale)||qo(t.rotate)||qo(t.perspective)||!sh()&&(qo(t.backdropFilter)||qo(t.filter))||Vz.test(t.willChange||"")||Wz.test(t.contain||"")}function Kz(e){let t=qi(e);for(;zt(t)&&!fi(t);){if(Av(t))return t;if(ih(t))return null;t=qi(t)}return null}function sh(){return rb==null&&(rb=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),rb}function fi(e){return/^(html|body|#document)$/.test(Wn(e))}function fr(e){return kn(e).getComputedStyle(e)}function oh(e){return ft(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qi(e){if(Wn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||po(e)&&e.host||Hi(e);return po(t)?t.host:t}function FC(e){const t=qi(e);return fi(t)?e.ownerDocument?e.ownerDocument.body:e.body:zt(t)&&bo(t)?t:FC(t)}function ao(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=FC(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),l=kn(s);if(a){const c=ky(l);return t.concat(l,l.visualViewport||[],bo(s)?s:[],c&&n?ao(c):[])}else return t.concat(s,ao(s,[],n))}function ky(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Ov={...Tv},ib=Ov.useInsertionEffect,Yz=ib&&ib!==Ov.useLayoutEffect?ib:e=>e();function We(e){const t=Ir(Xz).current;return t.next=e,Yz(t.effect),t.trampoline}function Xz(){const e={next:void 0,callback:Zz,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Zz(){}const Qz=()=>{},Ge=typeof document<"u"?v.useLayoutEffect:Qz,UC=v.createContext(void 0);function qC(e=!1){const t=v.useContext(UC);if(t===void 0&&!e)throw new Error(Nn(16));return t}function Jz(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:s=0,isNativeButton:a}=e,l=r&&t!==!1,c=r&&t===!1;return{props:v.useMemo(()=>{const f={onKeyDown(h){n&&t&&h.key!=="Tab"&&h.preventDefault()}};return r||(f.tabIndex=s,!a&&n&&(f.tabIndex=t?s:-1)),(a&&(t||l)||!a&&n)&&(f["aria-disabled"]=n),a&&(!t||c)&&(f.disabled=n),f},[r,n,t,l,c,a,s])}}function Al(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:s=!0,composite:a}=e,l=v.useRef(null),c=qC(!0),d=a??c!==void 0,{props:f}=Jz({focusableWhenDisabled:n,disabled:t,composite:d,tabIndex:r,isNativeButton:s}),h=v.useCallback(()=>{const y=l.current;sb(y)&&d&&t&&f.disabled===void 0&&y.disabled&&(y.disabled=!1)},[t,f.disabled,d]);Ge(h,[h]);const m=v.useCallback((y={})=>{const{onClick:k,onMouseDown:S,onKeyUp:R,onKeyDown:T,onPointerDown:E,...C}=y;return Pi({onClick(_){if(t){_.preventDefault();return}k?.(_)},onMouseDown(_){t||S?.(_)},onKeyDown(_){if(t||(bp(_),T?.(_),_.baseUIHandlerPrevented))return;const D=_.target===_.currentTarget,N=_.currentTarget,A=sb(N),$=!s&&e2(N),z=D&&(s?A:!$),I=_.key==="Enter",Y=_.key===" ",H=N.getAttribute("role"),q=H?.startsWith("menuitem")||H==="option"||H==="gridcell";if(D&&d&&Y){if(_.defaultPrevented&&q)return;_.preventDefault(),$||s&&A?(N.click(),_.preventBaseUIHandler()):z&&(k?.(_),_.preventBaseUIHandler());return}z&&(!s&&(Y||I)&&_.preventDefault(),!s&&I&&k?.(_))},onKeyUp(_){if(!t){if(bp(_),R?.(_),_.target===_.currentTarget&&s&&d&&sb(_.currentTarget)&&_.key===" "){_.preventDefault();return}_.baseUIHandlerPrevented||_.target===_.currentTarget&&!s&&!d&&_.key===" "&&k?.(_)}},onPointerDown(_){if(t){_.preventDefault();return}E?.(_)}},s?{type:"button"}:{role:"button"},f,C)},[t,f,d,s]),b=We(y=>{l.current=y,h()});return{getButtonProps:m,buttonRef:b}}function sb(e){return zt(e)&&e.tagName==="BUTTON"}function e2(e){return!!(e?.tagName==="A"&&e?.href)}const Si="none",Ol="trigger-press",yr="trigger-hover",ap="trigger-focus",Mv="outside-press",ob="item-press",ah="focus-out",Iv="escape-key",m1="list-navigation",t2="cancel-open",HC="disabled",g1="missing",b1="initial",vp="imperative-action",n2="window-resize";function xt(e,t,n,r){let s=!1,a=!1;const l=r??jn;return{reason:e,event:t??new Event("base-ui"),cancel(){s=!0},allowPropagation(){a=!0},get isCanceled(){return s},get isPropagationAllowed(){return a},trigger:n,...l}}let y1=0;function r2(e,t="mui"){const[n,r]=v.useState(e),s=e||n;return v.useEffect(()=>{n==null&&(y1+=1,r(`${t}-${y1}`))},[n,t]),s}const v1=Ov.useId;function Bc(e,t){if(v1!==void 0){const n=v1();return e??(t?`${t}-${n}`:n)}return r2(e,t)}function Ml(e){return Bc(e,"base-ui")}const i2=[];function Dv(e){v.useEffect(e,i2)}const Du=0;class wi{static create(){return new wi}currentId=Du;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Du,n()},t)}isStarted(){return this.currentId!==Du}clear=()=>{this.currentId!==Du&&(clearTimeout(this.currentId),this.currentId=Du)};disposeEffect=()=>this.clear}function di(){const e=Ir(wi.create).current;return Dv(e.disposeEffect),e}function s2(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:o2,platform:a2,maxTouchPoints:l2}=s2(),lh=o2.toLowerCase(),mc=a2.toLowerCase(),uh=/^i(os$|p)/.test(mc)||mc==="macintel"&&l2>1,x1="android",Sy=mc===x1||lh.includes(x1),GC=!uh&&mc.startsWith("mac");mc.startsWith("win");const u2=GC||uh,yo=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!yo&&lh.includes("firefox");!yo&&lh.includes("chrom");const c2=u2,Lv=/jsdom|happydom/.test(lh);function Di(e){e.preventDefault(),e.stopPropagation()}function f2(e){return"nativeEvent"in e}function jv(e){return e.pointerType===""&&e.isTrusted?!0:Sy&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function VC(e){return Lv?!1:!Sy&&e.width===0&&e.height===0||Sy&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function ea(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function d2(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const wy="data-base-ui-focusable",WC="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",ch="ArrowLeft",fh="ArrowRight",KC="ArrowUp",zv="ArrowDown";function ar(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function dt(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&po(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function cr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function xp(e,t){if(!ft(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(dt(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function ab(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function p2(e){return e.matches("html,body")}function dh(e){return zt(e)&&e.matches(WC)}function h2(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${WC}`)!=null}function Ey(e){return e?e.getAttribute("role")==="combobox"&&dh(e):!1}function m2(e){if(!e||Lv)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function kp(e){return e?e.hasAttribute(wy)?e:e.querySelector(`[${wy}]`)||e:null}function g2(e,t){return t!=null&&!ea(t)?0:typeof e=="function"?e():e}function Sp(e,t,n){const r=g2(e,n);return typeof r=="number"?r:r?.[t]}function k1(e){return typeof e=="function"?e():e}function YC(e,t){return t||e==="click"||e==="mousedown"}function b2(e){return e?.includes("mouse")&&e!=="mousedown"}const y2=v.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new wi,currentIdRef:{current:null},currentContextRef:{current:null}});function v2(e,t){e.current=t.current}function x2(e,t={open:!1}){const{open:n}=t,r="rootStore"in e?e.rootStore:e,s=r.useState("floatingId"),a=v.useContext(y2),{currentIdRef:l,delayRef:c,timeoutMs:d,initialDelayRef:f,currentContextRef:h,hasProvider:m,timeout:b}=a,[y,k]=v.useState(!1),S=v.useRef(n),R=v.useRef(!1);return Ge(()=>{S.current=n},[n]),Ge(()=>()=>{R.current=!0},[]),Ge(()=>{function T(){R.current||k(!1),h.current?.setIsInstantPhase(!1),l.current=null,h.current=null,c.current=f.current,b.clear()}if(l.current&&!n&&l.current===s){if(k(!1),d){const E=s;return b.start(d,()=>{r.select("open")||l.current&&l.current!==E||T()}),()=>{(S.current||l.current!==E)&&b.clear()}}T()}},[n,s,l,c,d,f,h,b,r]),Ge(()=>{if(!n)return;const T=h.current,E=l.current;b.clear(),h.current={onOpenChange:r.setOpen,setIsInstantPhase:k},l.current=s,c.current={open:0,close:Sp(f.current,"close")},E!==null&&E!==s?(k(!0),T?.setIsInstantPhase(!0),T?.onOpenChange(!1,xt(Si))):(k(!1),T?.setIsInstantPhase(!1))},[n,s,r,l,c,f,h,b]),Ge(()=>()=>{if(l.current===s){if(h.current=null,!S.current)return;l.current=null,v2(c,f),b.clear()}},[h,l,c,s,f,b]),v.useMemo(()=>({hasProvider:m,delayRef:c,isInstantPhase:y}),[m,c,y])}function It(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function $i(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function _n(e){const t=Ir(k2,e).current;return t.next=e,Ge(t.effect),t}function k2(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const xd=null;class S2{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let s=0;s<n.length;s+=1)n[s]?.(t)};request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const kd=new S2;class Ar{static create(){return new Ar}static request(t){return kd.request(t)}static cancel(t){return kd.cancel(t)}currentId=xd;request(t){this.cancel(),this.currentId=kd.request(()=>{this.currentId=xd,t()})}cancel=()=>{this.currentId!==xd&&(kd.cancel(this.currentId),this.currentId=xd)};disposeEffect=()=>this.cancel}function bl(){const e=Ir(Ar.create).current;return Dv(e.disposeEffect),e}function Vt(e){return e?.ownerDocument||document}const XC={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},ZC={...XC,position:"fixed",top:0,left:0},w2={...XC,position:"absolute"},wp=v.forwardRef(function(t,n){const[r,s]=v.useState();Ge(()=>{c2&&yo&&s("button")},[]);const a={tabIndex:0,role:r};return g.jsx("span",{...t,ref:n,style:ZC,"aria-hidden":r?void 0:!0,...a,"data-base-ui-focus-guard":""})}),E2=["top","right","bottom","left"],yl=Math.min,Yr=Math.max,vl=Math.round,al=Math.floor,Bi=e=>({x:e,y:e}),T2={left:"right",right:"left",bottom:"top",top:"bottom"};function Ty(e,t,n){return Yr(e,yl(t,n))}function ws(e,t){return typeof e=="function"?e(t):e}function Mr(e){return e.split("-")[0]}function vo(e){return e.split("-")[1]}function Pv(e){return e==="x"?"y":"x"}function $v(e){return e==="y"?"height":"width"}function ui(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Bv(e){return Pv(ui(e))}function R2(e,t,n){n===void 0&&(n=!1);const r=vo(e),s=Bv(e),a=$v(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=Ep(l)),[l,Ep(l)]}function C2(e){const t=Ep(e);return[Ry(e),t,Ry(t)]}function Ry(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const S1=["left","right"],w1=["right","left"],_2=["top","bottom"],N2=["bottom","top"];function A2(e,t,n){switch(e){case"top":case"bottom":return n?t?w1:S1:t?S1:w1;case"left":case"right":return t?_2:N2;default:return[]}}function O2(e,t,n,r){const s=vo(e);let a=A2(Mr(e),n==="start",r);return s&&(a=a.map(l=>l+"-"+s),t&&(a=a.concat(a.map(Ry)))),a}function Ep(e){const t=Mr(e);return T2[t]+e.slice(t.length)}function M2(e){return{top:0,right:0,bottom:0,left:0,...e}}function QC(e){return typeof e!="number"?M2(e):{top:e,right:e,bottom:e,left:e}}function gc(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function tc(e,t){return t<0||t>=e.length}function lp(e,t){return xs(e.current,{disabledIndices:t})}function Cy(e,t){return xs(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function xs(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:s=1}={}){let a=t;do a+=n?-s:s;while(a>=0&&a<=e.length-1&&Tp(e,a,r));return a}function Tp(e,t,n){if(typeof n=="function"?n(t):n?.includes(t)??!1)return!0;const s=e[t];return s?ph(s)?!n&&(s.hasAttribute("disabled")||s.getAttribute("aria-disabled")==="true"):!0:!1}function I2(e){return e.visibility==="hidden"||e.visibility==="collapse"}function ph(e,t=e?fr(e):null){return!e||!e.isConnected||!t||I2(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const D2='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function L2(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return po(n)?n.host:null}function _y(e){for(const t of Array.from(e.children))if(Wn(t)==="summary")return t;return null}function j2(e,t){const n=_y(t);return!!n&&(e===n||dt(n,e))}function JC(e){const t=e?Wn(e):"";return e!=null&&e.matches(D2)&&(t!=="summary"||e.parentElement!=null&&Wn(e.parentElement)==="details"&&_y(e.parentElement)===e)&&(t!=="details"||_y(e)==null)&&(t!=="input"||e.type!=="hidden")}function e_(e){if(!JC(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=L2(t)){const n=t!==e,r=Wn(t)==="slot";if(t.hasAttribute("inert")||n&&Wn(t)==="details"&&!t.open&&!j2(e,t)||t.hasAttribute("hidden")||!r&&!z2(t,n))return!1}return!0}function z2(e,t){const n=fr(e);return t?n.display!=="none":ph(e,n)}function t_(e){const t=e.tabIndex;if(t<0){const n=Wn(e);if(n==="details"||n==="audio"||n==="video"||zt(e)&&e.isContentEditable)return 0}return t}function lb(e){if(Wn(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function P2(e,t){const n=lb(e);if(!n)return!0;const r=t.find(s=>{const a=lb(s);return a?.name===n.name&&a.form===n.form&&a.checked});return r?r===n:t.find(s=>{const a=lb(s);return a?.name===n.name&&a.form===n.form})===n}function n_(e){if(zt(e)&&Wn(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return zt(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function r_(e,t){n_(e).forEach(n=>{JC(n)&&t.push(n),r_(n,t)})}function i_(e,t,n){n_(e).forEach(r=>{zt(r)&&r.matches(t)&&n.push(r),i_(r,t,n)})}function Fv(e){return e_(e)&&t_(e)>=0}function s_(e){const t=[];return r_(e,t),t.filter(e_)}function hh(e){const t=s_(e);return t.filter(n=>t_(n)>=0&&P2(n,t))}function o_(e,t){const n=hh(e),r=n.length;if(r===0)return;const s=ar(Vt(e)),a=n.indexOf(s),l=a===-1?t===1?0:r-1:a+t;return n[l]}function a_(e){return o_(Vt(e).body,1)||e}function l_(e){return o_(Vt(e).body,-1)||e}function nc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!dt(n,r)}function $2(e){hh(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function E1(e){const t=[];i_(e,"[data-tabindex]",t),t.forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function ho(e,t,n=!0){return e.filter(s=>s.parentId===t).flatMap(s=>[...!n||s.context?.open?[s]:[],...ho(e,s.id,n)])}function T1(e,t){let n=[],r=e.find(s=>s.id===t)?.parentId;for(;r;){const s=e.find(a=>a.id===r);r=s?.parentId,s&&(n=n.concat(s))}return n}function bc(e){return`data-base-ui-${e}`}let Sd=0;function up(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:s}=t;cancelAnimationFrame(Sd);function a(){s&&!s()||e?.focus({preventScroll:n})}if(r)return a(),Vn;const l=requestAnimationFrame(a);return Sd=l,()=>{Sd===l&&(cancelAnimationFrame(l),Sd=0)}}const ub={inert:new WeakMap,"aria-hidden":new WeakMap},R1="data-base-ui-inert",Ny={inert:new WeakSet,"aria-hidden":new WeakSet};let Lu=new WeakMap,cb=0;function B2(e){return Ny[e]}function u_(e){return e?po(e)?e.host:u_(e.parentNode):null}const C1=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=u_(n);return e.contains(r)?r:null}).filter(n=>n!=null),_1=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},N1=(e,t,n)=>{const r=[],s=a=>{!a||n.has(a)||Array.from(a.children).forEach(l=>{Wn(l)!=="script"&&(t.has(l)?s(l):r.push(l))})};return s(e),r};function F2(e,t,n,r,{mark:s=!0}){let a=null;r?a="inert":n&&(a="aria-hidden");let l=null,c=null;const d=C1(t,e),f=s?N1(t,_1(d),new Set(d)):[],h=[],m=[];if(a){const b=ub[a],y=B2(a);c=y,l=b;const k=C1(t,Array.from(t.querySelectorAll("[aria-live]"))),S=d.concat(k);N1(t,_1(S),new Set(S)).forEach(T=>{const E=T.getAttribute(a),C=E!==null&&E!=="false",_=(b.get(T)||0)+1;b.set(T,_),h.push(T),_===1&&C&&y.add(T),C||T.setAttribute(a,a==="inert"?"":"true")})}return s&&f.forEach(b=>{const y=(Lu.get(b)||0)+1;Lu.set(b,y),m.push(b),y===1&&b.setAttribute(R1,"")}),cb+=1,()=>{l&&h.forEach(b=>{const k=(l.get(b)||0)-1;l.set(b,k),k||(!c?.has(b)&&a&&b.removeAttribute(a),c?.delete(b))}),s&&m.forEach(b=>{const y=(Lu.get(b)||0)-1;Lu.set(b,y),y||b.removeAttribute(R1)}),cb-=1,cb||(ub.inert=new WeakMap,ub["aria-hidden"]=new WeakMap,Ny.inert=new WeakSet,Ny["aria-hidden"]=new WeakSet,Lu=new WeakMap)}}function A1(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:s=!0}=t,a=Vt(e[0]).body;return F2(e,a,n,r,{mark:s})}var Ti=AC();const U2={style:{transition:"none"}},q2="data-base-ui-click-trigger",H2={fallbackAxisSide:"none"},c_={fallbackAxisSide:"end"},G2={clipPath:"inset(50%)",position:"fixed",top:0,left:0},f_=v.createContext(null),d_=()=>v.useContext(f_),V2=bc("portal");function p_(e={}){const{ref:t,container:n,componentProps:r=jn,elementProps:s}=e,a=Bc(),c=d_()?.portalNode,[d,f]=v.useState(null),[h,m]=v.useState(null),b=We(R=>{R!==null&&m(R)}),y=v.useRef(null);Ge(()=>{if(n===null){y.current&&(y.current=null,m(null),f(null));return}if(a==null)return;const R=(n&&(rh(n)?n:n.current))??c??document.body;if(R==null){y.current&&(y.current=null,m(null),f(null));return}y.current!==R&&(y.current=R,m(null),f(R))},[n,c,a]);const k=hn("div",r,{ref:[t,b],props:[{id:a,[V2]:""},s]});return{portalNode:h,portalSubtree:d&&k?Ti.createPortal(k,d):null}}const W2=v.forwardRef(function(t,n){const{render:r,className:s,style:a,children:l,container:c,renderGuards:d,...f}=t,{portalNode:h,portalSubtree:m}=p_({container:c,ref:n,componentProps:t,elementProps:f}),b=v.useRef(null),y=v.useRef(null),k=v.useRef(null),S=v.useRef(null),[R,T]=v.useState(null),E=v.useRef(!1),C=R?.modal,_=R?.open,D=typeof d=="boolean"?d:!!R&&!R.modal&&R.open&&!!h;v.useEffect(()=>{if(!h||C)return;function A($){h&&$.relatedTarget&&nc($)&&($.type==="focusin"?E.current&&(E1(h),E.current=!1):($2(h),E.current=!0))}return $i(It(h,"focusin",A,!0),It(h,"focusout",A,!0))},[h,C]),Ge(()=>{!h||_!==!0||!E.current||(E1(h),E.current=!1)},[_,h]);const N=v.useMemo(()=>({beforeOutsideRef:b,afterOutsideRef:y,beforeInsideRef:k,afterInsideRef:S,portalNode:h,setFocusManagerState:T}),[h]);return g.jsxs(v.Fragment,{children:[m,g.jsxs(f_.Provider,{value:N,children:[D&&h&&g.jsx(wp,{"data-type":"outside",ref:b,onFocus:A=>{if(nc(A,h))k.current?.focus();else{const $=R?R.domReference:null;l_($)?.focus()}}}),D&&h&&g.jsx("span",{"aria-owns":h.id,style:G2}),h&&Ti.createPortal(l,h),D&&h&&g.jsx(wp,{"data-type":"outside",ref:y,onFocus:A=>{if(nc(A,h))S.current?.focus();else{const $=R?R.domReference:null;a_($)?.focus(),R?.closeOnFocusOut&&R?.onOpenChange(!1,xt(ah,A.nativeEvent))}}})]})]})});function h_(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}class K2{nodesRef={current:[]};events=h_();addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const m_=v.createContext(null),g_=v.createContext(null),Il=()=>v.useContext(m_)?.id||null,la=e=>{const t=v.useContext(g_);return e??t};function Y2(e){const t=Bc(),n=la(e),r=Il();return Ge(()=>{if(!t)return;const s={id:t,parentId:r};return n?.addNode(s),()=>{n?.removeNode(s)}},[n,t,r]),t}function X2(e){const{children:t,id:n}=e,r=Il();return g.jsx(m_.Provider,{value:v.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Z2(e){const{children:t,externalTree:n}=e,r=Ir(()=>n??new K2).current;return g.jsx(g_.Provider,{value:r,children:t})}function ms(e){return e==null?e:"current"in e?e.current:e}function Q2(e,t){const n=kn(cr(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const O1=20;let so=[];function Uv(){so=so.filter(e=>e.deref()?.isConnected)}function M1(e){Uv(),e&&Wn(e)!=="body"&&(so.push(new WeakRef(e)),so.length>O1&&(so=so.slice(-O1)))}function I1(){return Uv(),so[so.length-1]?.deref()}function J2(e){return e?Fv(e)?e:hh(e)[0]||e:null}function D1(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const n=s_(e).filter(s=>{const a=s.getAttribute("data-tabindex")||"";return Fv(s)||s.hasAttribute("data-tabindex")&&!a.startsWith("-")}),r=e.getAttribute("tabindex");n.length===0?r!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(r!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function eP(e){const{context:t,children:n,disabled:r=!1,initialFocus:s=!0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,closeOnFocusOut:d=!0,openInteractionType:f="",nextFocusableElement:h,previousFocusableElement:m,beforeContentFocusGuardRef:b,externalTree:y,getInsideElements:k}=e,S="rootStore"in t?t.rootStore:t,R=S.useState("open"),T=S.useState("domReferenceElement"),E=S.useState("floatingElement"),{events:C,dataRef:_}=S.context,D=We(()=>_.current.floatingContext?.nodeId),N=s===!1,A=Ey(T)&&N,$=_n(s),z=_n(a),I=_n(f),Y=_n(R),H=la(y),q=d_(),L=v.useRef(!1),F=v.useRef(!1),U=v.useRef(!1),W=v.useRef(null),B=v.useRef(""),K=v.useRef(""),O=v.useRef(null),P=v.useRef(null),V=co(O,b,q?.beforeInsideRef),j=co(P,q?.afterInsideRef),Z=di(),te=di(),se=bl(),ue=q!=null,le=kp(E),fe=We((oe=le)=>oe?hh(oe):[]),ge=We(()=>k?.().filter(oe=>oe!=null)??[]);v.useEffect(()=>{if(r||!c)return;function oe(Se){Se.key==="Tab"&&dt(le,ar(Vt(le)))&&fe().length===0&&!A&&Di(Se)}const ye=Vt(le);return It(ye,"keydown",oe)},[r,le,c,A,fe]),v.useEffect(()=>{if(r||!R)return;const oe=Vt(le);function ye(){U.current=!1}function Se(we){const ke=cr(we),De=ge(),Me=dt(E,ke)||dt(T,ke)||dt(q?.portalNode,ke)||De.some(Le=>Le===ke||dt(Le,ke));U.current=!Me,K.current=we.pointerType||"keyboard",ke?.closest(`[${q2}]`)&&(F.current=!0,te.start(0,()=>{F.current=!1}))}function Oe(){K.current="keyboard"}return $i(It(oe,"pointerdown",Se,!0),It(oe,"pointerup",ye,!0),It(oe,"pointercancel",ye,!0),It(oe,"keydown",Oe,!0),ye)},[r,E,T,le,R,q,te,ge]),v.useEffect(()=>{if(r||!d)return;const oe=Vt(le);function ye(){F.current=!0,te.start(0,()=>{F.current=!1})}function Se(De){const Me=cr(De);Fv(Me)&&(W.current=Me)}function Oe(De){const Me=De.relatedTarget,Le=De.currentTarget,He=cr(De);c&&Me==null&&He!=null&&dt(E,He)&&M1(He),queueMicrotask(()=>{const be=D(),Re=S.context.triggerElements,ee=ge(),ce=Me?.hasAttribute(bc("focus-guard"))&&[O.current,P.current,q?.beforeInsideRef.current,q?.afterInsideRef.current,q?.beforeOutsideRef.current,q?.afterOutsideRef.current,ms(m),ms(h)].includes(Me),J=!(dt(T,Me)||dt(E,Me)||dt(Me,E)||dt(q?.portalNode,Me)||ee.some(re=>re===Me||dt(re,Me))||Me!=null&&Re.hasElement(Me)||Re.hasMatchingElement(re=>dt(re,Me))||ce||H&&(ho(H.nodesRef.current,be).find(re=>dt(re.context?.elements.floating,Me)||dt(re.context?.elements.domReference,Me))||T1(H.nodesRef.current,be).find(re=>[re.context?.elements.floating,kp(re.context?.elements.floating)].includes(Me)||re.context?.elements.domReference===Me)));if(Le===T&&le&&D1(le),l&&Le!==T&&!ph(He)&&ar(oe)===oe.body){if(zt(le)&&(le.focus(),l==="popup")){se.request(()=>{le.focus()});return}const re=fe(),xe=W.current,$e=(xe&&re.includes(xe)?xe:null)||re[re.length-1]||le;zt($e)&&$e.focus()}if(_.current.insideReactTree){_.current.insideReactTree=!1;return}(A||!c)&&Me&&J&&!F.current&&(A||Me!==I1())&&(L.current=!0,S.setOpen(!1,xt(ah,De)))})}function we(){U.current||(_.current.insideReactTree=!0,Z.start(0,()=>{_.current.insideReactTree=!1}))}const ke=zt(T)?T:null;if(!(!E&&!ke))return $i(ke&&It(ke,"focusout",Oe),ke&&It(ke,"pointerdown",ye),E&&It(E,"focusin",Se),E&&It(E,"focusout",Oe),E&&q&&It(E,"focusout",we,!0))},[r,T,E,le,c,H,q,S,d,l,fe,A,D,_,Z,te,se,h,m,ge]),v.useEffect(()=>{if(r||!E||!R)return;const oe=Array.from(q?.portalNode?.querySelectorAll(`[${bc("portal")}]`)||[]),Se=(H?T1(H.nodesRef.current,D()):[]).find(Le=>Ey(Le.context?.elements.domReference||null))?.context?.elements.domReference,we=[...[E,...oe,O.current,P.current,q?.beforeOutsideRef.current,q?.afterOutsideRef.current,...ge()],Se,ms(m),ms(h),A?T:null].filter(Le=>Le!=null),ke=A1(we,{ariaHidden:c||A,mark:!1}),De=[E,...oe].filter(Le=>Le!=null),Me=A1(De);return()=>{Me(),ke()}},[R,r,T,E,c,q,A,H,D,h,m,ge]),Ge(()=>{if(!R||r||!zt(le))return;const oe=Vt(le),ye=ar(oe);queueMicrotask(()=>{const Se=$.current,Oe=typeof Se=="function"?Se(I.current||""):Se;if(Oe===void 0||Oe===!1||dt(le,ye))return;let ke=null;const De=()=>(ke==null&&(ke=fe(le)),ke[0]||le);let Me;Oe===!0||Oe===null?Me=De():Me=ms(Oe),Me=Me||De();const Le=dt(le,ar(oe));up(Me,{preventScroll:Me===le,shouldFocus(){if(!Y.current)return!1;if(Le)return!0;const He=ar(oe);return!(He!==Me&&dt(le,He))}})})},[r,R,le,fe,$,I,Y]),Ge(()=>{if(r||!le)return;const oe=Vt(le),ye=ar(oe),Se=I.current==null;M1(ye);function Oe(ke){if(ke.open||(B.current=Q2(ke.nativeEvent,K.current)),ke.reason===yr&&ke.nativeEvent.type==="mouseleave"&&(L.current=!0),ke.reason===Mv)if(ke.nested)L.current=!1;else if(jv(ke.nativeEvent)||VC(ke.nativeEvent))L.current=!1;else{let De=!1;Vt(le).createElement("div").focus({get preventScroll(){return De=!0,!1}}),De?L.current=!1:L.current=!0}}C.on("openchange",Oe);function we(){const ke=z.current;let De=typeof ke=="function"?ke(B.current):ke;if(De===void 0||De===!1)return null;De===null&&(De=!0);const Me=T?.isConnected?T:null,Le=ye?.isConnected&&Wn(ye)!=="body"?ye:null;let He=Se?Le||Me:Me||Le;return He||(He=I1()||null),typeof De=="boolean"?He:ms(De)||He||null}return()=>{C.off("openchange",Oe);const ke=ar(oe),De=ge(),Me=dt(E,ke)||De.some(be=>be===ke||dt(be,ke))||H&&ho(H.nodesRef.current,D(),!1).some(be=>dt(be.context?.elements.floating,ke)),Le=z.current,He=we();queueMicrotask(()=>{const be=J2(He),Re=typeof Le!="boolean";Le&&!L.current&&zt(be)&&(!(!Re&&be!==ke&&ke!==oe.body)||Me)&&be.focus({preventScroll:!0}),L.current=!1})}},[r,E,le,z,I,C,H,T,D,ge]),Ge(()=>{if(!yo||R||!E)return;const oe=ar(Vt(E));!zt(oe)||!dh(oe)||dt(E,oe)&&oe.blur()},[R,E]),Ge(()=>{if(!(r||!q))return q.setFocusManagerState({modal:c,closeOnFocusOut:d,open:R,onOpenChange:S.setOpen,domReference:T}),()=>{q.setFocusManagerState(null)}},[r,q,c,R,S,d,T]),Ge(()=>{if(!(r||!le))return D1(le),()=>{queueMicrotask(Uv)}},[r,le]);const _e=!r&&(c?!A:!0)&&(ue||c);return g.jsxs(v.Fragment,{children:[_e&&g.jsx(wp,{"data-type":"inside",ref:V,onFocus:oe=>{if(c){const ye=fe();up(ye[ye.length-1])}else q?.portalNode&&(L.current=!1,nc(oe,q.portalNode)?a_(T)?.focus():ms(m??q.beforeOutsideRef)?.focus())}}),n,_e&&g.jsx(wp,{"data-type":"inside",ref:j,onFocus:oe=>{c?up(fe()[0]):q?.portalNode&&(d&&(L.current=!0),nc(oe,q.portalNode)?l_(T)?.focus():ms(h??q.afterOutsideRef)?.focus())}})]})}function tP(e,t={}){const{enabled:n=!0,event:r="click",toggle:s=!0,ignoreMouse:a=!1,stickIfOpen:l=!0,touchOpenDelay:c=0,reason:d=Ol}=t,f="rootStore"in e?e.rootStore:e,h=f.context.dataRef,m=v.useRef(void 0),b=bl(),y=di(),k=v.useMemo(()=>{function S(T,E,C,_){const D=xt(d,E,C);T&&_==="touch"&&c>0?y.start(c,()=>{f.setOpen(!0,D)}):f.setOpen(T,D)}function R(T,E,C){const _=h.current.openEvent,D=f.select("domReferenceElement")!==E;return T&&D||!T||!s?!0:_&&l?!C(_.type):!1}return{onPointerDown(T){m.current=T.pointerType},onMouseDown(T){const E=m.current,C=T.nativeEvent,_=f.select("open");if(T.button!==0||r==="click"||ea(E,!0)&&a)return;const D=R(_,T.currentTarget,$=>$==="click"||$==="mousedown"),N=cr(C);if(dh(N)){S(D,C,N,E);return}const A=T.currentTarget;b.request(()=>{S(D,C,A,E)})},onClick(T){if(r==="mousedown-only")return;const E=m.current;if(r==="mousedown"&&E){m.current=void 0;return}if(ea(E,!0)&&a)return;const C=f.select("open"),_=R(C,T.currentTarget,D=>D==="click"||D==="mousedown"||D==="keydown"||D==="keyup");S(_,T.nativeEvent,T.currentTarget,E)},onKeyDown(){m.current=void 0}}},[h,r,a,d,f,l,s,b,y,c]);return v.useMemo(()=>n?{reference:k}:jn,[n,k])}function nP(e,t){let n=null,r=null,s=!1;return{contextElement:e||void 0,getBoundingClientRect(){const a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},l=t.axis==="x"||t.axis==="both",c=t.axis==="y"||t.axis==="both",d=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let f=a.width,h=a.height,m=a.x,b=a.y;return n==null&&t.x&&l&&(n=a.x-t.x),r==null&&t.y&&c&&(r=a.y-t.y),m-=n||0,b-=r||0,f=0,h=0,!s||d?(f=t.axis==="y"?a.width:0,h=t.axis==="x"?a.height:0,m=l&&t.x!=null?t.x:m,b=c&&t.y!=null?t.y:b):s&&!d&&(h=t.axis==="x"?a.height:h,f=t.axis==="y"?a.width:f),s=!0,{width:f,height:h,x:m,y:b,top:b,right:m+f,bottom:b+h,left:m}}}}function L1(e){return e!=null&&e.clientX!=null}function rP(e,t={}){const{enabled:n=!0,axis:r="both"}=t,s="rootStore"in e?e.rootStore:e,a=s.useState("open"),l=s.useState("floatingElement"),c=s.useState("domReferenceElement"),d=s.context.dataRef,f=v.useRef(!1),h=v.useRef(null),[m,b]=v.useState(),[y,k]=v.useState([]),S=We(_=>{s.set("positionReference",_)}),R=We((_,D,N)=>{f.current||d.current.openEvent&&!L1(d.current.openEvent)||s.set("positionReference",nP(N??c,{x:_,y:D,axis:r,dataRef:d,pointerType:m}))}),T=We(_=>{a?h.current||(R(_.clientX,_.clientY,_.currentTarget),k([])):R(_.clientX,_.clientY,_.currentTarget)}),E=ea(m)?l:a;v.useEffect(()=>{if(!n){S(c);return}if(!E)return;function _(){h.current?.(),h.current=null}const D=kn(l);function N(A){const $=cr(A);dt(l,$)?_():R(A.clientX,A.clientY)}return!d.current.openEvent||L1(d.current.openEvent)?h.current=It(D,"mousemove",N):S(c),_},[E,n,l,d,c,s,R,S,y]),v.useEffect(()=>()=>{s.set("positionReference",null)},[s]),v.useEffect(()=>{n&&!l&&(f.current=!1)},[n,l]),v.useEffect(()=>{!n&&a&&(f.current=!0)},[n,a]);const C=v.useMemo(()=>{function _(D){b(D.pointerType)}return{onPointerDown:_,onPointerEnter:_,onMouseMove:T,onMouseEnter:T}},[T]);return v.useMemo(()=>n?{reference:C,trigger:C}:{},[n,C])}function iP(){return!1}function sP(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function qv(e,t={}){const{enabled:n=!0,escapeKey:r=!0,outsidePress:s=!0,outsidePressEvent:a="sloppy",referencePress:l=iP,bubbles:c,externalTree:d}=t,f="rootStore"in e?e.rootStore:e,h=f.useState("open"),m=f.useState("floatingElement"),{dataRef:b}=f.context,y=la(d),k=We(typeof s=="function"?s:()=>!1),S=typeof s=="function"?k:s,R=S!==!1,T=We(()=>a),{escapeKey:E,outsidePress:C}=sP(c),_=v.useRef(!1),D=v.useRef(!1),N=v.useRef(!1),A=v.useRef(!1),$=v.useRef(""),z=v.useRef(null),I=di(),Y=di(),H=We(()=>{Y.clear(),b.current.insideReactTree=!1}),q=We(V=>{const j=b.current.floatingContext?.nodeId;return(y?ho(y.nodesRef.current,j):[]).some(te=>te.context?.open&&!te.context.dataRef.current[V])}),L=We(V=>ab(V,f.select("floatingElement"))||ab(V,f.select("domReferenceElement"))),F=We(V=>{l()&&f.setOpen(!1,xt(Ol,V.nativeEvent))}),U=We(V=>{if(!h||!n||!r||V.key!=="Escape"||A.current||!E&&q("__escapeKeyBubbles"))return;const j=f2(V)?V.nativeEvent:V,Z=xt(Iv,j);f.setOpen(!1,Z),Z.isCanceled||V.preventDefault(),!E&&!Z.isPropagationAllowed&&V.stopPropagation()}),W=We(()=>{b.current.insideReactTree=!0,Y.start(0,H)}),B=We(V=>{if(!h||!n||V.button!==0)return;const j=cr(V.nativeEvent);dt(f.select("floatingElement"),j)&&(_.current||(_.current=!0,D.current=!1))}),K=We(V=>{!h||!n||(V.defaultPrevented||V.nativeEvent.defaultPrevented)&&_.current&&(D.current=!0)});v.useEffect(()=>{if(!h||!n)return;b.current.__escapeKeyBubbles=E,b.current.__outsidePressBubbles=C;const V=new wi,j=new wi;function Z(){V.clear(),A.current=!0}function te(){V.start(yo?5:0,()=>{A.current=!1})}function se(){N.current=!0,j.start(0,()=>{N.current=!1})}function ue(){_.current=!1,D.current=!1}function le(){const ee=$.current,ce=ee==="pen"||!ee?"mouse":ee,J=T(),re=typeof J=="function"?J():J;return typeof re=="string"?re:re[ce]}function fe(ee){const ce=le();return ce==="intentional"&&ee.type!=="click"||ce==="sloppy"&&ee.type==="click"}function ge(ee){const ce=b.current.floatingContext?.nodeId,J=y&&ho(y.nodesRef.current,ce).some(re=>ab(ee,re.context?.elements.floating));return L(ee)||J}function _e(ee){if(fe(ee)){ee.type!=="click"&&!L(ee)&&(j.clear(),N.current=!1),H();return}if(b.current.insideReactTree){H();return}const ce=cr(ee),J=`[${bc("inert")}]`,re=ft(ce)?ce.getRootNode():null,xe=Array.from((po(re)?re:Vt(f.select("floatingElement"))).querySelectorAll(J)),$e=f.context.triggerElements;if(ce&&($e.hasElement(ce)||$e.hasMatchingElement(Ye=>dt(Ye,ce))))return;let Xe=ft(ce)?ce:null;for(;Xe&&!fi(Xe);){const Ye=qi(Xe);if(fi(Ye)||!ft(Ye))break;Xe=Ye}if(!(xe.length&&ft(ce)&&!p2(ce)&&!dt(ce,f.select("floatingElement"))&&xe.every(Ye=>!dt(Xe,Ye)))){if(zt(ce)&&!("touches"in ee)){const Ye=fi(ce),ht=fr(ce),Qe=/auto|scroll/,yt=Ye||Qe.test(ht.overflowX),kt=Ye||Qe.test(ht.overflowY),tt=yt&&ce.clientWidth>0&&ce.scrollWidth>ce.clientWidth,Tt=kt&&ce.clientHeight>0&&ce.scrollHeight>ce.clientHeight,_t=ht.direction==="rtl",st=Tt&&(_t?ee.offsetX<=ce.offsetWidth-ce.clientWidth:ee.offsetX>ce.clientWidth),vt=tt&&ee.offsetY>ce.clientHeight;if(st||vt)return}if(!ge(ee)){if(le()==="intentional"&&N.current){j.clear(),N.current=!1;return}typeof S=="function"&&!S(ee)||q("__outsidePressBubbles")||(f.setOpen(!1,xt(Mv,ee)),H())}}}function oe(ee){le()!=="sloppy"||ee.pointerType==="touch"||!f.select("open")||!n||L(ee)||_e(ee)}function ye(ee){if(le()!=="sloppy"||!f.select("open")||!n||L(ee))return;const ce=ee.touches[0];ce&&(z.current={startTime:Date.now(),startX:ce.clientX,startY:ce.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},I.start(1e3,()=>{z.current&&(z.current.dismissOnTouchEnd=!1,z.current.dismissOnMouseDown=!1)}))}function Se(ee,ce){const J=cr(ee);if(!J)return;const re=It(J,ee.type,()=>{ce(ee),re()})}function Oe(ee){$.current="touch",Se(ee,ye)}function we(ee){I.clear(),ee.type==="pointerdown"&&($.current=ee.pointerType),!(ee.type==="mousedown"&&z.current&&!z.current.dismissOnMouseDown)&&Se(ee,ce=>{ce.type==="pointerdown"?oe(ce):_e(ce)})}function ke(ee){if(!_.current)return;const ce=D.current;if(ue(),le()==="intentional"){if(ee.type==="pointercancel"){ce&&se();return}if(!ge(ee)){if(ce){se();return}typeof S=="function"&&!S(ee)||(j.clear(),N.current=!0,H())}}}function De(ee){if(le()!=="sloppy"||!z.current||L(ee))return;const ce=ee.touches[0];if(!ce)return;const J=Math.abs(ce.clientX-z.current.startX),re=Math.abs(ce.clientY-z.current.startY),xe=Math.sqrt(J*J+re*re);xe>5&&(z.current.dismissOnTouchEnd=!0),xe>10&&(_e(ee),I.clear(),z.current=null)}function Me(ee){Se(ee,De)}function Le(ee){le()!=="sloppy"||!z.current||L(ee)||(z.current.dismissOnTouchEnd&&_e(ee),I.clear(),z.current=null)}function He(ee){Se(ee,Le)}const be=Vt(m),Re=$i(r&&$i(It(be,"keydown",U),It(be,"compositionstart",Z),It(be,"compositionend",te)),R&&$i(It(be,"click",we,!0),It(be,"pointerdown",we,!0),It(be,"pointerup",ke,!0),It(be,"pointercancel",ke,!0),It(be,"mousedown",we,!0),It(be,"mouseup",ke,!0),It(be,"touchstart",Oe,!0),It(be,"touchmove",Me,!0),It(be,"touchend",He,!0)));return()=>{Re(),V.clear(),j.clear(),ue(),N.current=!1}},[b,m,r,R,S,h,n,E,C,U,H,T,q,L,y,f,I]),v.useEffect(H,[S,H]);const O=v.useMemo(()=>({onKeyDown:U,onPointerDown:F,onClick:F}),[U,F]),P=v.useMemo(()=>({onKeyDown:U,onPointerDown:K,onMouseDown:K,onClickCapture:W,onMouseDownCapture(V){W(),B(V)},onPointerDownCapture(V){W(),B(V)},onMouseUpCapture:W,onTouchEndCapture:W,onTouchMoveCapture:W}),[U,W,B,K]);return v.useMemo(()=>n?{reference:O,floating:P,trigger:O}:{},[n,O,P])}function j1(e,t,n){let{reference:r,floating:s}=e;const a=ui(t),l=Bv(t),c=$v(l),d=Mr(t),f=a==="y",h=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,b=r[c]/2-s[c]/2;let y;switch(d){case"top":y={x:h,y:r.y-s.height};break;case"bottom":y={x:h,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-s.width,y:m};break;default:y={x:r.x,y:r.y}}switch(vo(t)){case"start":y[l]-=b*(n&&f?-1:1);break;case"end":y[l]+=b*(n&&f?-1:1);break}return y}async function oP(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:l,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:m="floating",altBoundary:b=!1,padding:y=0}=ws(t,e),k=QC(y),R=c[b?m==="floating"?"reference":"floating":m],T=gc(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(R)))==null||n?R:R.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:h,strategy:d})),E=m==="floating"?{x:r,y:s,width:l.floating.width,height:l.floating.height}:l.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),_=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},D=gc(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:E,offsetParent:C,strategy:d}):E);return{top:(T.top-D.top+k.top)/_.y,bottom:(D.bottom-T.bottom+k.bottom)/_.y,left:(T.left-D.left+k.left)/_.x,right:(D.right-T.right+k.right)/_.x}}const aP=50,lP=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:oP},d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:m}=j1(f,r,d),b=r,y=0;const k={};for(let S=0;S<a.length;S++){const R=a[S];if(!R)continue;const{name:T,fn:E}=R,{x:C,y:_,data:D,reset:N}=await E({x:h,y:m,initialPlacement:r,placement:b,strategy:s,middlewareData:k,rects:f,platform:c,elements:{reference:e,floating:t}});h=C??h,m=_??m,k[T]={...k[T],...D},N&&y<aP&&(y++,typeof N=="object"&&(N.placement&&(b=N.placement),N.rects&&(f=N.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):N.rects),{x:h,y:m}=j1(f,b,d)),S=-1)}return{x:h,y:m,placement:b,strategy:s,middlewareData:k}},uP=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:a,rects:l,initialPlacement:c,platform:d,elements:f}=t,{mainAxis:h=!0,crossAxis:m=!0,fallbackPlacements:b,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:S=!0,...R}=ws(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const T=Mr(s),E=ui(c),C=Mr(c)===c,_=await(d.isRTL==null?void 0:d.isRTL(f.floating)),D=b||(C||!S?[Ep(c)]:C2(c)),N=k!=="none";!b&&N&&D.push(...O2(c,S,k,_));const A=[c,...D],$=await d.detectOverflow(t,R),z=[];let I=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&z.push($[T]),m){const L=R2(s,l,_);z.push($[L[0]],$[L[1]])}if(I=[...I,{placement:s,overflows:z}],!z.every(L=>L<=0)){var Y,H;const L=(((Y=a.flip)==null?void 0:Y.index)||0)+1,F=A[L];if(F&&(!(m==="alignment"?E!==ui(F):!1)||I.every(B=>ui(B.placement)===E?B.overflows[0]>0:!0)))return{data:{index:L,overflows:I},reset:{placement:F}};let U=(H=I.filter(W=>W.overflows[0]<=0).sort((W,B)=>W.overflows[1]-B.overflows[1])[0])==null?void 0:H.placement;if(!U)switch(y){case"bestFit":{var q;const W=(q=I.filter(B=>{if(N){const K=ui(B.placement);return K===E||K==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(K=>K>0).reduce((K,O)=>K+O,0)]).sort((B,K)=>B[1]-K[1])[0])==null?void 0:q[0];W&&(U=W);break}case"initialPlacement":U=c;break}if(s!==U)return{reset:{placement:U}}}return{}}}};function z1(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function P1(e){return E2.some(t=>e[t]>=0)}const cP=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:s="referenceHidden",...a}=ws(e,t);switch(s){case"referenceHidden":{const l=await r.detectOverflow(t,{...a,elementContext:"reference"}),c=z1(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:P1(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...a,altBoundary:!0}),c=z1(l,n.floating);return{data:{escapedOffsets:c,escaped:P1(c)}}}default:return{}}}}},b_=new Set(["left","top"]);async function fP(e,t){const{placement:n,platform:r,elements:s}=e,a=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=Mr(n),c=vo(n),d=ui(n)==="y",f=b_.has(l)?-1:1,h=a&&d?-1:1,m=ws(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:k}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof k=="number"&&(y=c==="end"?k*-1:k),d?{x:y*h,y:b*f}:{x:b*f,y:y*h}}const dP=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:a,placement:l,middlewareData:c}=t,d=await fP(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:s+d.x,y:a+d.y,data:{...d,placement:l}}}}},pP=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s,platform:a}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:d={fn:T=>{let{x:E,y:C}=T;return{x:E,y:C}}},...f}=ws(e,t),h={x:n,y:r},m=await a.detectOverflow(t,f),b=ui(Mr(s)),y=Pv(b);let k=h[y],S=h[b];if(l){const T=y==="y"?"top":"left",E=y==="y"?"bottom":"right",C=k+m[T],_=k-m[E];k=Ty(C,k,_)}if(c){const T=b==="y"?"top":"left",E=b==="y"?"bottom":"right",C=S+m[T],_=S-m[E];S=Ty(C,S,_)}const R=d.fn({...t,[y]:k,[b]:S});return{...R,data:{x:R.x-n,y:R.y-r,enabled:{[y]:l,[b]:c}}}}}},hP=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:a,middlewareData:l}=t,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=ws(e,t),h={x:n,y:r},m=ui(s),b=Pv(m);let y=h[b],k=h[m];const S=ws(c,t),R=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const C=b==="y"?"height":"width",_=a.reference[b]-a.floating[C]+R.mainAxis,D=a.reference[b]+a.reference[C]-R.mainAxis;y<_?y=_:y>D&&(y=D)}if(f){var T,E;const C=b==="y"?"width":"height",_=b_.has(Mr(s)),D=a.reference[m]-a.floating[C]+(_&&((T=l.offset)==null?void 0:T[m])||0)+(_?0:R.crossAxis),N=a.reference[m]+a.reference[C]+(_?0:((E=l.offset)==null?void 0:E[m])||0)-(_?R.crossAxis:0);k<D?k=D:k>N&&(k=N)}return{[b]:y,[m]:k}}}},mP=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:a,platform:l,elements:c}=t,{apply:d=()=>{},...f}=ws(e,t),h=await l.detectOverflow(t,f),m=Mr(s),b=vo(s),y=ui(s)==="y",{width:k,height:S}=a.floating;let R,T;m==="top"||m==="bottom"?(R=m,T=b===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(T=m,R=b==="end"?"top":"bottom");const E=S-h.top-h.bottom,C=k-h.left-h.right,_=yl(S-h[R],E),D=yl(k-h[T],C),N=!t.middlewareData.shift;let A=_,$=D;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&($=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=E),N&&!b){const I=Yr(h.left,0),Y=Yr(h.right,0),H=Yr(h.top,0),q=Yr(h.bottom,0);y?$=k-2*(I!==0||Y!==0?I+Y:Yr(h.left,h.right)):A=S-2*(H!==0||q!==0?H+q:Yr(h.top,h.bottom))}await d({...t,availableWidth:$,availableHeight:A});const z=await l.getDimensions(c.floating);return k!==z.width||S!==z.height?{reset:{rects:!0}}:{}}}};function y_(e){const t=fr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=zt(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:r,c=vl(n)!==a||vl(r)!==l;return c&&(n=a,r=l),{width:n,height:r,$:c}}function Hv(e){return ft(e)?e:e.contextElement}function fl(e){const t=Hv(e);if(!zt(t))return Bi(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=y_(t);let l=(a?vl(n.width):n.width)/r,c=(a?vl(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const gP=Bi(0);function v_(e){const t=kn(e);return!sh()||!t.visualViewport?gP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==kn(e)?!1:t}function ta(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Hv(e);let l=Bi(1);t&&(r?ft(r)&&(l=fl(r)):l=fl(e));const c=bP(a,n,r)?v_(a):Bi(0);let d=(s.left+c.x)/l.x,f=(s.top+c.y)/l.y,h=s.width/l.x,m=s.height/l.y;if(a){const b=kn(a),y=r&&ft(r)?kn(r):r;let k=b,S=ky(k);for(;S&&r&&y!==k;){const R=fl(S),T=S.getBoundingClientRect(),E=fr(S),C=T.left+(S.clientLeft+parseFloat(E.paddingLeft))*R.x,_=T.top+(S.clientTop+parseFloat(E.paddingTop))*R.y;d*=R.x,f*=R.y,h*=R.x,m*=R.y,d+=C,f+=_,k=kn(S),S=ky(k)}}return gc({width:h,height:m,x:d,y:f})}function mh(e,t){const n=oh(e).scrollLeft;return t?t.left+n:ta(Hi(e)).left+n}function x_(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-mh(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function yP(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",l=Hi(r),c=t?ih(t.floating):!1;if(r===l||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Bi(1);const h=Bi(0),m=zt(r);if((m||!m&&!a)&&((Wn(r)!=="body"||bo(l))&&(d=oh(r)),m)){const y=ta(r);f=fl(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const b=l&&!m&&!a?x_(l,d):Bi(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+h.x+b.x,y:n.y*f.y-d.scrollTop*f.y+h.y+b.y}}function vP(e){return Array.from(e.getClientRects())}function xP(e){const t=Hi(e),n=oh(e),r=e.ownerDocument.body,s=Yr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Yr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+mh(e);const c=-n.scrollTop;return fr(r).direction==="rtl"&&(l+=Yr(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:l,y:c}}const $1=25;function kP(e,t){const n=kn(e),r=Hi(e),s=n.visualViewport;let a=r.clientWidth,l=r.clientHeight,c=0,d=0;if(s){a=s.width,l=s.height;const h=sh();(!h||h&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}const f=mh(r);if(f<=0){const h=r.ownerDocument,m=h.body,b=getComputedStyle(m),y=h.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,k=Math.abs(r.clientWidth-m.clientWidth-y);k<=$1&&(a-=k)}else f<=$1&&(a+=f);return{width:a,height:l,x:c,y:d}}function SP(e,t){const n=ta(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=zt(e)?fl(e):Bi(1),l=e.clientWidth*a.x,c=e.clientHeight*a.y,d=s*a.x,f=r*a.y;return{width:l,height:c,x:d,y:f}}function B1(e,t,n){let r;if(t==="viewport")r=kP(e,n);else if(t==="document")r=xP(Hi(e));else if(ft(t))r=SP(t,n);else{const s=v_(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return gc(r)}function k_(e,t){const n=qi(e);return n===t||!ft(n)||fi(n)?!1:fr(n).position==="fixed"||k_(n,t)}function wP(e,t){const n=t.get(e);if(n)return n;let r=ao(e,[],!1).filter(c=>ft(c)&&Wn(c)!=="body"),s=null;const a=fr(e).position==="fixed";let l=a?qi(e):e;for(;ft(l)&&!fi(l);){const c=fr(l),d=Av(l);!d&&c.position==="fixed"&&(s=null),(a?!d&&!s:!d&&c.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||bo(l)&&!d&&k_(e,l))?r=r.filter(h=>h!==l):s=c,l=qi(l)}return t.set(e,r),r}function EP(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?ih(t)?[]:wP(t,this._c):[].concat(n),r],c=B1(t,l[0],s);let d=c.top,f=c.right,h=c.bottom,m=c.left;for(let b=1;b<l.length;b++){const y=B1(t,l[b],s);d=Yr(y.top,d),f=yl(y.right,f),h=yl(y.bottom,h),m=Yr(y.left,m)}return{width:f-m,height:h-d,x:m,y:d}}function TP(e){const{width:t,height:n}=y_(e);return{width:t,height:n}}function RP(e,t,n){const r=zt(t),s=Hi(t),a=n==="fixed",l=ta(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Bi(0);function f(){d.x=mh(s)}if(r||!r&&!a)if((Wn(t)!=="body"||bo(s))&&(c=oh(t)),r){const y=ta(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&f();a&&!r&&s&&f();const h=s&&!r&&!a?x_(s,c):Bi(0),m=l.left+c.scrollLeft-d.x-h.x,b=l.top+c.scrollTop-d.y-h.y;return{x:m,y:b,width:l.width,height:l.height}}function fb(e){return fr(e).position==="static"}function F1(e,t){if(!zt(e)||fr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Hi(e)===n&&(n=n.ownerDocument.body),n}function S_(e,t){const n=kn(e);if(ih(e))return n;if(!zt(e)){let s=qi(e);for(;s&&!fi(s);){if(ft(s)&&!fb(s))return s;s=qi(s)}return n}let r=F1(e,t);for(;r&&Gz(r)&&fb(r);)r=F1(r,t);return r&&fi(r)&&fb(r)&&!Av(r)?n:r||Kz(e)||n}const CP=async function(e){const t=this.getOffsetParent||S_,n=this.getDimensions,r=await n(e.floating);return{reference:RP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function _P(e){return fr(e).direction==="rtl"}const w_={convertOffsetParentRelativeRectToViewportRelativeRect:yP,getDocumentElement:Hi,getClippingRect:EP,getOffsetParent:S_,getElementRects:CP,getClientRects:vP,getDimensions:TP,getScale:fl,isElement:ft,isRTL:_P};function E_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function NP(e,t){let n=null,r;const s=Hi(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:h,top:m,width:b,height:y}=f;if(c||t(),!b||!y)return;const k=al(m),S=al(s.clientWidth-(h+b)),R=al(s.clientHeight-(m+y)),T=al(h),C={rootMargin:-k+"px "+-S+"px "+-R+"px "+-T+"px",threshold:Yr(0,yl(1,d))||1};let _=!0;function D(N){const A=N[0].intersectionRatio;if(A!==d){if(!_)return l();A?l(!1,A):r=setTimeout(()=>{l(!1,1e-7)},1e3)}A===1&&!E_(f,e.getBoundingClientRect())&&l(),_=!1}try{n=new IntersectionObserver(D,{...C,root:s.ownerDocument})}catch{n=new IntersectionObserver(D,C)}n.observe(e)}return l(!0),a}function Rp(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Hv(e),h=s||a?[...f?ao(f):[],...t?ao(t):[]]:[];h.forEach(T=>{s&&T.addEventListener("scroll",n,{passive:!0}),a&&T.addEventListener("resize",n)});const m=f&&c?NP(f,n):null;let b=-1,y=null;l&&(y=new ResizeObserver(T=>{let[E]=T;E&&E.target===f&&y&&t&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var C;(C=y)==null||C.observe(t)})),n()}),f&&!d&&y.observe(f),t&&y.observe(t));let k,S=d?ta(e):null;d&&R();function R(){const T=ta(e);S&&!E_(S,T)&&n(),S=T,k=requestAnimationFrame(R)}return n(),()=>{var T;h.forEach(E=>{s&&E.removeEventListener("scroll",n),a&&E.removeEventListener("resize",n)}),m?.(),(T=y)==null||T.disconnect(),y=null,d&&cancelAnimationFrame(k)}}const AP=dP,OP=pP,MP=uP,IP=mP,DP=cP,LP=hP,jP=(e,t,n)=>{const r=new Map,s={platform:w_,...n},a={...s.platform,_c:r};return lP(e,t,{...s,platform:a})};var zP=typeof document<"u",PP=function(){},cp=zP?v.useLayoutEffect:PP;function Cp(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,s;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(!Cp(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const a=s[r];if(!(a==="_owner"&&e.$$typeof)&&!Cp(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function T_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function U1(e,t){const n=T_(e);return Math.round(t*n)/n}function db(e){const t=v.useRef(e);return cp(()=>{t.current=e}),t}function R_(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:d,open:f}=e,[h,m]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,y]=v.useState(r);Cp(b,r)||y(r);const[k,S]=v.useState(null),[R,T]=v.useState(null),E=v.useCallback(B=>{B!==N.current&&(N.current=B,S(B))},[]),C=v.useCallback(B=>{B!==A.current&&(A.current=B,T(B))},[]),_=a||k,D=l||R,N=v.useRef(null),A=v.useRef(null),$=v.useRef(h),z=d!=null,I=db(d),Y=db(s),H=db(f),q=v.useCallback(()=>{if(!N.current||!A.current)return;const B={placement:t,strategy:n,middleware:b};Y.current&&(B.platform=Y.current),jP(N.current,A.current,B).then(K=>{const O={...K,isPositioned:H.current!==!1};L.current&&!Cp($.current,O)&&($.current=O,Ti.flushSync(()=>{m(O)}))})},[b,t,n,Y,H]);cp(()=>{f===!1&&$.current.isPositioned&&($.current.isPositioned=!1,m(B=>({...B,isPositioned:!1})))},[f]);const L=v.useRef(!1);cp(()=>(L.current=!0,()=>{L.current=!1}),[]),cp(()=>{if(_&&(N.current=_),D&&(A.current=D),_&&D){if(I.current)return I.current(_,D,q);q()}},[_,D,q,I,z]);const F=v.useMemo(()=>({reference:N,floating:A,setReference:E,setFloating:C}),[E,C]),U=v.useMemo(()=>({reference:_,floating:D}),[_,D]),W=v.useMemo(()=>{const B={position:n,left:0,top:0};if(!U.floating)return B;const K=U1(U.floating,h.x),O=U1(U.floating,h.y);return c?{...B,transform:"translate("+K+"px, "+O+"px)",...T_(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:O}},[n,c,U.floating,h.x,h.y]);return v.useMemo(()=>({...h,update:q,refs:F,elements:U,floatingStyles:W}),[h,q,F,U,W])}const Gv=(e,t)=>{const n=AP(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vv=(e,t)=>{const n=OP(e);return{name:n.name,fn:n.fn,options:[e,t]}},$P=(e,t)=>({fn:LP(e).fn,options:[e,t]}),Wv=(e,t)=>{const n=MP(e);return{name:n.name,fn:n.fn,options:[e,t]}},Kv=(e,t)=>{const n=IP(e);return{name:n.name,fn:n.fn,options:[e,t]}},BP=(e,t)=>{const n=DP(e);return{name:n.name,fn:n.fn,options:[e,t]}};function _p(e,t,n,r){return{left:e,top:t,right:n,bottom:r,x:e,y:t,width:n-e,height:r-t}}function FP(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function C_(e){const t=[];let n,r=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY;for(const c of Array.from(e).sort((d,f)=>d.top-f.top)){if(r=Math.min(r,c.left),s=Math.min(s,c.top),a=Math.max(a,c.right),l=Math.max(l,c.bottom),!n||c.top-n.top>n.height/2)t.push(FP(c));else{const d=t[t.length-1];d.left=Math.min(d.left,c.left),d.right=Math.max(d.right,c.right),d.bottom=Math.max(d.bottom,c.bottom),d.width=d.right-d.left,d.height=d.bottom-d.top}n=c}return{lines:t,fallback:_p(r,s,a,l)}}function __(e,t,n){return e.findIndex(r=>t>r.left-2&&t<r.right+2&&n>r.top-2&&n<r.bottom+2)}function q1(e){return _p(e.left,e.top,e.right,e.bottom)}function UP(e,t,n){const{lines:r}=C_(e.getClientRects());if(r.length<2)return;const s=__(r,t,n);return{x:t,y:n,lineIndex:s===-1?void 0:s,element:e}}function qP(e,t,n){const{lines:r,fallback:s}=C_(e.getClientRects());if(r.length<2)return null;const a=n?.x,l=n?.y,c=t[0];if(n?.lineIndex!=null&&r[n.lineIndex])return q1(r[n.lineIndex]);if(a!=null&&l!=null){const k=__(r,a,l);if(k!==-1)return q1(r[k])}if(r.length===2&&r[0].left>r[1].right&&a!=null&&l!=null)return s;if(c==="t"||c==="b"){const k=r[0],S=r[r.length-1],R=c==="t"?k:S;return _p(R.left,k.top,R.right,S.bottom)}const d=c==="l";let f=r[0].left,h=r[0].right,m=d?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY,b=r[0],y=r[0];for(const k of r){f=Math.min(f,k.left),h=Math.max(h,k.right);const S=d?k.left:k.right;d&&S<m||!d&&S>m?(m=S,b=k,y=k):S===m&&(y=k)}return _p(f,b.top,h,y.bottom)}function HP(e){return"contextElement"in e&&e.contextElement?e.contextElement:ft(e)?e:void 0}function GP(e,t){function n(s){N_(e,s.currentTarget,s.clientX,s.clientY)}function r(s){t||n(s)}return{onFocus(){e.current=void 0},onMouseEnter:r,onMouseMove:r}}function N_(e,t,n,r){const s=UP(t,n,r);return e.current=s,s}function VP(e){return{name:"inline",async fn(t){const n=t.elements.reference;if(typeof n?.getClientRects!="function")return{};const r=HP(n),s=e.current,a=s?.element===n||s?.element===r?s:void 0,l=qP(n,t.placement,a);if(!l||typeof t.platform.getElementRects!="function")return{};const c=await t.platform.getElementRects({reference:{contextElement:r,getBoundingClientRect(){return l}},floating:t.elements.floating,strategy:t.strategy});return t.rects.reference.x===c.reference.x&&t.rects.reference.y===c.reference.y&&t.rects.reference.width===c.reference.width&&t.rects.reference.height===c.reference.height?{}:{reset:{rects:c}}}}}function A_(e){const t=v.useRef(!0);t.current&&(t.current=!1,e())}const et=(e,t,n,r,s,a,...l)=>{if(l.length>0)throw new Error(Nn(1));let c;if(e)c=e;else throw new Error("Missing arguments");return c};var pb={exports:{}},hb={};var H1;function WP(){if(H1)return hb;H1=1;var e=Pc();function t(m,b){return m===b&&(m!==0||1/m===1/b)||m!==m&&b!==b}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,s=e.useEffect,a=e.useLayoutEffect,l=e.useDebugValue;function c(m,b){var y=b(),k=r({inst:{value:y,getSnapshot:b}}),S=k[0].inst,R=k[1];return a(function(){S.value=y,S.getSnapshot=b,d(S)&&R({inst:S})},[m,y,b]),s(function(){return d(S)&&R({inst:S}),m(function(){d(S)&&R({inst:S})})},[m]),l(y),y}function d(m){var b=m.getSnapshot;m=m.value;try{var y=b();return!n(m,y)}catch{return!0}}function f(m,b){return b()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return hb.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,hb}var G1;function O_(){return G1||(G1=1,pb.exports=WP()),pb.exports}var Yv=O_(),mb={exports:{}},gb={};var V1;function KP(){if(V1)return gb;V1=1;var e=Pc(),t=O_();function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:n,s=t.useSyncExternalStore,a=e.useRef,l=e.useEffect,c=e.useMemo,d=e.useDebugValue;return gb.useSyncExternalStoreWithSelector=function(f,h,m,b,y){var k=a(null);if(k.current===null){var S={hasValue:!1,value:null};k.current=S}else S=k.current;k=c(function(){function T(N){if(!E){if(E=!0,C=N,N=b(N),y!==void 0&&S.hasValue){var A=S.value;if(y(A,N))return _=A}return _=N}if(A=_,r(C,N))return A;var $=b(N);return y!==void 0&&y(A,$)?(C=N,A):(C=N,_=$)}var E=!1,C,_,D=m===void 0?null:m;return[function(){return T(h())},D===null?void 0:function(){return T(D())}]},[h,m,b,y]);var R=s(f,k[0],k[1]);return l(function(){S.hasValue=!0,S.value=R},[R]),d(R),R},gb}var W1;function YP(){return W1||(W1=1,mb.exports=KP()),mb.exports}var XP=YP();const Ay=[];let Oy;function ZP(){return Oy}function QP(e){Ay.push(e)}function Xv(e){const t=(n,r)=>{const s=Ir(JP).current;let a;try{Oy=s;for(const l of Ay)l.before(s);a=e(n,r);for(const l of Ay)l.after(s);s.didInitialize=!0}finally{Oy=void 0}return a};return t.displayName=e.displayName||e.name,t}function M_(e){return v.forwardRef(Xv(e))}function JP(){return{didInitialize:!1}}const e$=Rv(19),t$=e$?r$:i$;function pt(e,t,n,r,s){return t$(e,t,n,r,s)}function n$(e,t,n,r,s){const a=v.useCallback(()=>t(e.getSnapshot(),n,r,s),[e,t,n,r,s]);return Yv.useSyncExternalStore(e.subscribe,a,a)}QP({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],s=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,s)||(t=!0,r.value=s)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const s of e.syncHooks)n.add(s.store);const r=[];for(const s of n)r.push(s.subscribe(t));return()=>{for(const s of r)s()}}),Yv.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function r$(e,t,n,r,s){const a=ZP();if(!a)return n$(e,t,n,r,s);const l=a.syncIndex;a.syncIndex+=1;let c;return a.didInitialize?(c=a.syncHooks[l],(c.store!==e||c.selector!==t||!Object.is(c.a1,n)||!Object.is(c.a2,r)||!Object.is(c.a3,s))&&(c.store!==e&&(a.didChangeStore=!0),c.store=e,c.selector=t,c.a1=n,c.a2=r,c.a3=s,c.value=t(e.getSnapshot(),n,r,s))):(c={store:e,selector:t,a1:n,a2:r,a3:s,value:t(e.getSnapshot(),n,r,s)},a.syncHooks.push(c)),c.value}function i$(e,t,n,r,s){return XP.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a=>t(a,n,r,s))}class I_{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,s){return pt(this,t,n,r,s)}}class Zv extends I_{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){v.useDebugValue(t);const r=this;Ge(()=>{r.state[t]!==n&&r.set(t,n)},[r,t,n])}useSyncedValueWithCleanup(t,n){const r=this;Ge(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);Ge(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){v.useDebugValue(t);const r=this,s=n!==void 0;Ge(()=>{s&&!Object.is(r.state[t],n)&&r.setState({...r.state,[t]:n})},[r,t,n,s])}select(t,n,r,s){const a=this.selectors[t];return a(this.state,n,r,s)}useState(t,n,r,s){return v.useDebugValue(t),pt(this,this.selectors[t],n,r,s)}useContextCallback(t,n){v.useDebugValue(t);const r=We(n??Vn);this.context[t]=r}useStateSetter(t){const n=v.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let s=r(this.state);return n(s,s,this),this.subscribe(a=>{const l=r(a);if(!Object.is(s,l)){const c=s;s=l,n(l,c,this)}})}}function s$(){const[,e]=v.useState({});return v.useCallback(()=>{e({})},[])}const o$={open:et(e=>e.open),transitionStatus:et(e=>e.transitionStatus),domReferenceElement:et(e=>e.domReferenceElement),referenceElement:et(e=>e.positionReference??e.referenceElement),floatingElement:et(e=>e.floatingElement),floatingId:et(e=>e.floatingId)};class gh extends Zv{constructor(t){const{syncOnly:n,nested:r,onOpenChange:s,triggerElements:a,...l}=t;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:h_(),nested:r,triggerElements:a},o$),this.syncOnly=n}syncOpenEvent=(t,n)=>{(!t||!this.state.open||n!=null&&d2(n))&&(this.context.dataRef.current.openEvent=t?n:void 0)};dispatchOpenChange=(t,n)=>{this.syncOpenEvent(t,n.event);const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)};setOpen=(t,n)=>{if(this.syncOnly){this.context.onOpenChange?.(t,n);return}this.dispatchOpenChange(t,n),this.context.onOpenChange?.(t,n)}}function a$(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:s,nested:a,onOpenChange:l}=e,c=t.useState("open"),d=t.useState("activeTriggerElement"),f=t.useState(n?"popupElement":"positionerElement"),h=t.context.triggerElements,m=l,b=v.useRef(null);r===void 0&&b.current===null&&(b.current=new gh({open:c,transitionStatus:void 0,referenceElement:d,floatingElement:f,triggerElements:h,onOpenChange:m,floatingId:s,syncOnly:!0,nested:a}));const y=r??b.current;return t.useSyncedValue("floatingId",s),Ge(()=>{const k={open:c,floatingId:s,referenceElement:d,floatingElement:f};ft(d)&&(k.domReferenceElement=d),y.state.positionReference===y.state.referenceElement&&(k.positionReference=d),y.update(k)},[c,s,d,f,y]),y.context.onOpenChange=m,y.context.nested=a,y}function Fc(e,t=!1,n=!1){const[r,s]=v.useState(e&&t?"idle":void 0),[a,l]=v.useState(e);return e&&!a&&(l(!0),s("starting")),!e&&a&&r!=="ending"&&!n&&s("ending"),!e&&!a&&r==="ending"&&s(void 0),Ge(()=>{if(!e&&a&&r!=="ending"&&n){const c=Ar.request(()=>{s("ending")});return()=>{Ar.cancel(c)}}},[e,a,r,n]),Ge(()=>{if(!e||t)return;const c=Ar.request(()=>{s(void 0)});return()=>{Ar.cancel(c)}},[t,e]),Ge(()=>{if(!e||!t)return;e&&a&&r!=="idle"&&s("starting");const c=Ar.request(()=>{s("idle")});return()=>{Ar.cancel(c)}},[t,e,a,r]),{mounted:a,setMounted:l,transitionStatus:r}}function D_(e,t=!1,n=!0){const r=bl();return We((s,a=null)=>{r.cancel();const l=ms(e);if(l==null)return;const c=l,d=()=>{Ti.flushSync(s)};if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){s();return}function f(){Promise.all(c.getAnimations().map(h=>h.finished)).then(()=>{a?.aborted||d()}).catch(()=>{if(n){a?.aborted||d();return}const h=c.getAnimations();!a?.aborted&&h.length>0&&h.some(m=>m.pending||m.playState!=="finished")&&f()})}if(t){const h=Jo.startingStyle;if(!c.hasAttribute(h)){r.request(f);return}const m=new MutationObserver(()=>{c.hasAttribute(h)||(m.disconnect(),f())});m.observe(c,{attributes:!0,attributeFilter:[h]}),a?.addEventListener("abort",()=>m.disconnect(),{once:!0});return}r.request(f)})}function xo(e){const{enabled:t=!0,open:n,ref:r,onComplete:s}=e,a=We(s),l=D_(r,n,!1);v.useEffect(()=>{if(!t)return;const c=new AbortController;return l(a,c.signal),()=>{c.abort()}},[t,n,a,l])}const Qv={tabIndex:-1,[wy]:""};function L_(e,t,n=!1){const r=Bc(),s=Il()!=null,a=v.useRef(null);e===void 0&&a.current===null&&(a.current=t(r,s));const l=e??a.current;return a$({popupStore:l,treatPopupAsFloatingElement:n,floatingRootContext:l.state.floatingRootContext,floatingId:r,nested:s,onOpenChange:l.setOpen}),{store:l,internalStore:a.current}}function l$(e,t){const n=v.useRef(null),r=v.useRef(null);return v.useCallback(s=>{if(e===void 0)return;let a=!1;if(n.current!==null){const l=n.current,c=r.current,d=t.context.triggerElements.getById(l);c&&d===c&&(t.context.triggerElements.delete(l),a=!0),n.current=null,r.current=null}if(s!==null&&(n.current=e,r.current=s,t.context.triggerElements.add(e,s),a=!0),a){const l=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==l&&t.set("triggerCount",l)}},[t,e])}function u$(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);const s=n?.id??null;(s||t)&&(e.activeTriggerId=s,e.activeTriggerElement=n??null)}function c$(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function j_(e,t,n,r={}){const s=n.reason,a=s===yr,l=t&&s===ap,c=!t&&(s===Ol||s===Iv),d=c$(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);const f=()=>{const h={...r.extraState,open:t};l?h.instantType="focus":c?h.instantType="dismiss":a&&(h.instantType=void 0),u$(h,t,n.trigger,d()),e.update(h)};a?Ti.flushSync(f):f()}function z_(e,t,n,r){A_(()=>{t===void 0&&e.state.open===!1&&n&&(e.state={...e.state,open:!0,activeTriggerId:r,preventUnmountingOnClose:!1})})}function P_(e,t,n,r){const s=n.useState("isMountedByTrigger",e),a=l$(e,n),l=We(c=>{if(a(c),!c)return;const d=n.select("open"),f=n.select("activeTriggerId");if(f===e){n.update({activeTriggerElement:c,...d?r:null});return}f==null&&d&&n.update({activeTriggerId:e,activeTriggerElement:c,...r})});return Ge(()=>{s&&n.update({activeTriggerElement:t.current,...r})},[s,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:s}}function $_(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState("open"),s=e.useState("triggerCount");Ge(()=>{if(!r){e.state.triggerCount!==0&&e.set("triggerCount",0);return}const a=e.context.triggerElements.size,l={};e.state.triggerCount!==a&&(l.triggerCount=a);const c=e.select("activeTriggerId");let d=null;if(c){const f=e.context.triggerElements.getById(c);f?f!==e.state.activeTriggerElement&&(l.activeTriggerElement=f):d=c}if(!d&&!c&&a===1){const f=e.context.triggerElements.entries().next();if(!f.done){const[h,m]=f.value;l.activeTriggerId=h,l.activeTriggerElement=m}}(l.triggerCount!==void 0||l.activeTriggerId!==void 0||l.activeTriggerElement!==void 0)&&e.update(l),d&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===d&&!e.context.triggerElements.getById(d)){const f=xt(Si);e.setOpen(!1,f),f.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,s,n])}function B_(e,t,n){const{mounted:r,setMounted:s,transitionStatus:a}=Fc(e),l=t.useState("preventUnmountingOnClose"),c=e?!1:l;t.useSyncedValues({mounted:r,transitionStatus:a,preventUnmountingOnClose:c});const d=We(()=>{s(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return xo({enabled:r&&!e&&!c,open:e,ref:t.context.popupRef,onComplete(){e||d()}}),{forceUnmount:d,transitionStatus:a}}function F_(e,t){e.useSyncedValues(t),Ge(()=>()=>{e.update({activeTriggerProps:jn,inactiveTriggerProps:jn,popupProps:jn})},[e])}class bh{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function f$(){return new gh({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new bh,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function U_(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:f$(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:jn,inactiveTriggerProps:jn,popupProps:jn}}function q_(e,t,n=!1){return new gh({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}const rc=et(e=>e.triggerIdProp??e.activeTriggerId),Jv=et(e=>e.openProp??e.open),K1=et(e=>(e.popupElement?.id??e.floatingId)||void 0);function H_(e,t){return t!==void 0&&Jv(e)&&rc(e)===t}function d$(e,t){return H_(e,t)?!0:t!==void 0&&Jv(e)&&rc(e)==null&&e.triggerCount===1}const G_={open:Jv,mounted:et(e=>e.mounted),transitionStatus:et(e=>e.transitionStatus),floatingRootContext:et(e=>e.floatingRootContext),triggerCount:et(e=>e.triggerCount),preventUnmountingOnClose:et(e=>e.preventUnmountingOnClose),payload:et(e=>e.payload),activeTriggerId:rc,activeTriggerElement:et(e=>e.mounted?e.activeTriggerElement:null),popupId:K1,isTriggerActive:et((e,t)=>t!==void 0&&rc(e)===t),isOpenedByTrigger:et((e,t)=>H_(e,t)),isMountedByTrigger:et((e,t)=>t!==void 0&&rc(e)===t&&e.mounted),triggerProps:et((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:et((e,t)=>d$(e,t)?K1(e):void 0),popupProps:et(e=>e.popupProps),popupElement:et(e=>e.popupElement),positionerElement:et(e=>e.positionerElement)};function V_(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,s=Bc(),a=Il()!=null,l=Ir(()=>new gh({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new bh,floatingId:s,syncOnly:!1,nested:a})).current;return Ge(()=>{const c={open:t,floatingId:s};r.reference!==void 0&&(c.referenceElement=r.reference,c.domReferenceElement=ft(r.reference)?r.reference:null),r.floating!==void 0&&(c.floatingElement=r.floating),l.update(c)},[t,s,r.reference,r.floating,l]),l.context.onOpenChange=n,l.context.nested=a,l}function p$(e={}){const{nodeId:t,externalTree:n}=e,r=V_(e),s=e.rootContext||r,a=s.useState("referenceElement"),l=s.useState("floatingElement"),c=s.useState("domReferenceElement"),d=s.useState("open"),f=s.useState("floatingId"),[h,m]=v.useState(null),[b,y]=v.useState(void 0),[k,S]=v.useState(void 0),R=v.useRef(null),T=la(n),E=v.useMemo(()=>({reference:a,floating:l,domReference:c}),[a,l,c]),C=R_({...e,elements:{...E,...h&&{reference:h}}}),_=ft(b)?b:null,D=k===void 0?s.state.floatingElement:k;s.useSyncedValue("referenceElement",b??null),s.useSyncedValue("domReferenceElement",b===void 0?c:_),s.useSyncedValue("floatingElement",D);const N=v.useCallback(H=>{const q=ft(H)?{getBoundingClientRect:()=>H.getBoundingClientRect(),getClientRects:()=>H.getClientRects(),contextElement:H}:H;m(q),C.refs.setReference(q)},[C.refs]),A=v.useCallback(H=>{(ft(H)||H===null)&&(R.current=H,y(H)),(ft(C.refs.reference.current)||C.refs.reference.current===null||H!==null&&!ft(H))&&C.refs.setReference(H)},[C.refs,y]),$=v.useCallback(H=>{S(H),C.refs.setFloating(H)},[C.refs]),z=v.useMemo(()=>({...C.refs,setReference:A,setFloating:$,setPositionReference:N,domReference:R}),[C.refs,A,$,N]),I=v.useMemo(()=>({...C.elements,domReference:c}),[C.elements,c]),Y=v.useMemo(()=>({...C,dataRef:s.context.dataRef,open:d,onOpenChange:s.setOpen,events:s.context.events,floatingId:f,refs:z,elements:I,nodeId:t,rootStore:s}),[C,z,I,t,s,d,f]);return Ge(()=>{c&&(R.current=c)},[c]),Ge(()=>{s.context.dataRef.current.floatingContext=Y;const H=T?.nodesRef.current.find(q=>q.id===t);H&&(H.context=Y)}),v.useMemo(()=>({...C,context:Y,refs:z,elements:I,rootStore:s}),[C,z,I,Y,s])}const bb=GC&&yo;function W_(e,t={}){const{enabled:n=!0,delay:r}=t,s="rootStore"in e?e.rootStore:e,{events:a,dataRef:l}=s.context,c=v.useRef(!1),d=v.useRef(null),f=v.useRef(!0),h=di();v.useEffect(()=>{const b=s.select("domReferenceElement");if(!n)return;const y=kn(b);function k(){const T=s.select("domReferenceElement");!s.select("open")&&zt(T)&&T===ar(Vt(T))&&(c.current=!0)}function S(){f.current=!0}function R(){f.current=!1}return $i(It(y,"blur",k),bb&&It(y,"keydown",S,!0),bb&&It(y,"pointerdown",R,!0))},[s,n]),v.useEffect(()=>{if(!n)return;function b(y){if(y.reason===Ol||y.reason===Iv){const k=s.select("domReferenceElement");ft(k)&&(d.current=k,c.current=!0)}}return a.on("openchange",b),()=>{a.off("openchange",b)}},[a,n,s]);const m=v.useMemo(()=>{function b(){c.current=!1,d.current=null}return{onMouseLeave(){b()},onFocus(y){const k=y.currentTarget;if(c.current){if(d.current===k)return;b()}const S=cr(y.nativeEvent);if(ft(S)){if(bb&&!y.relatedTarget){if(!f.current&&!dh(S))return}else if(!m2(S))return}const R=xp(y.relatedTarget,s.context.triggerElements),{nativeEvent:T,currentTarget:E}=y,C=typeof r=="function"?r():r;if(s.select("open")&&R||C===0||C===void 0){s.setOpen(!0,xt(ap,T,E));return}h.start(C,()=>{c.current||s.setOpen(!0,xt(ap,T,E))})},onBlur(y){b();const k=y.relatedTarget,S=y.nativeEvent,R=ft(k)&&k.hasAttribute(bc("focus-guard"))&&k.getAttribute("data-type")==="outside";h.start(0,()=>{const T=s.select("domReferenceElement"),E=ar(Vt(T));!k&&E===T||dt(l.current.floatingContext?.refs.floating.current,E)||dt(T,E)||R||xp(k??E,s.context.triggerElements)||s.setOpen(!1,xt(ap,S))})}}},[l,r,s,h]);return v.useMemo(()=>n?{reference:m,trigger:m}:{},[n,m])}class ex{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new wi,this.restTimeout=new wi,this.handleCloseOptions=void 0}static create(){return new ex}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const Np=new WeakMap;function Ap(e){if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&Np.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Np.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function K_(e,t){const{scopeElement:n,referenceElement:r,floatingElement:s}=t,a=Np.get(n);a&&a!==e&&Ap(a),Ap(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=s,Np.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",s.style.pointerEvents="auto"}function tx(e){const t=e.context.dataRef.current,n=Ir(()=>t.hoverInteractionState??ex.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=n),Dv(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Y_(e,t={}){const{enabled:n=!0,closeDelay:r=0,nodeId:s}=t,a="rootStore"in e?e.rootStore:e,l=a.useState("open"),c=a.useState("floatingElement"),d=a.useState("domReferenceElement"),{dataRef:f}=a.context,h=la(),m=Il(),b=tx(a),y=di(),k=We(()=>YC(f.current.openEvent?.type,b.interactedInside)),S=We(()=>b2(f.current.openEvent?.type)),R=We(()=>{Ap(b)});Ge(()=>{l||(b.pointerType=void 0,b.restTimeoutPending=!1,b.interactedInside=!1,R())},[l,b,R]),v.useEffect(()=>R,[R]),Ge(()=>{if(n&&l&&b.handleCloseOptions?.blockPointerEvents&&S()&&ft(d)&&c){const T=d,E=c,C=Vt(c),_=h?.nodesRef.current.find($=>$.id===m)?.context?.elements.floating;_&&(_.style.pointerEvents="");const D=b.pointerEventsScopeElement!==E?b.pointerEventsScopeElement:null,N=_!==E?_:null,A=b.handleCloseOptions?.getScope?.()??D??N??T.closest("[data-rootownerid]")??C.body;return K_(b,{scopeElement:A,referenceElement:T,floatingElement:E}),()=>{R()}}},[n,l,d,c,b,S,h,m,R]),v.useEffect(()=>{if(!n)return;function T(){return!!(h&&m&&ho(h.nodesRef.current,m).length>0)}function E($){const z=Sp(r,"close",b.pointerType),I=()=>{a.setOpen(!1,xt(yr,$)),h?.events.emit("floating.closed",$)};z?b.openChangeTimeout.start(z,I):(b.openChangeTimeout.clear(),I())}function C($){const z=cr($);if(!h2(z)){b.interactedInside=!1;return}b.interactedInside=z?.closest("[aria-haspopup]")!=null}function _(){b.openChangeTimeout.clear(),y.clear(),h?.events.off("floating.closed",N),R()}function D($){if(T()&&h){h.events.on("floating.closed",N);return}if(xp($.relatedTarget,a.context.triggerElements))return;const z=f.current.floatingContext?.nodeId??s,I=$.relatedTarget;if(!(h&&z&&ft(I)&&ho(h.nodesRef.current,z,!1).some(H=>dt(H.context?.elements.floating,I)))){if(b.handler){b.handler($);return}R(),S()&&!k()&&E($)}}function N($){!h||!m||T()||y.start(0,()=>{h.events.off("floating.closed",N),a.setOpen(!1,xt(yr,$)),h.events.emit("floating.closed",$)})}const A=c;return $i(A&&It(A,"mouseenter",_),A&&It(A,"mouseleave",D),A&&It(A,"pointerdown",C,!0),()=>{h?.events.off("floating.closed",N)})},[n,c,a,f,r,s,S,k,R,b,h,m,y])}const h$={current:null};function X_(e,t={}){const{enabled:n=!0,delay:r=0,handleClose:s=null,mouseOnly:a=!1,restMs:l=0,move:c=!0,triggerElementRef:d=h$,externalTree:f,isActiveTrigger:h=!0,getHandleCloseContext:m,isClosing:b,shouldOpen:y}=t,k="rootStore"in e?e.rootStore:e,{dataRef:S,events:R}=k.context,T=la(f),E=tx(k),C=v.useRef(!1),_=_n(s),D=_n(r),N=_n(l),A=_n(n),$=_n(y),z=_n(b),I=We(()=>YC(S.current.openEvent?.type,E.interactedInside)),Y=We(()=>$.current?.()!==!1),H=We((F,U,W)=>{const B=k.context.triggerElements;if(B.hasElement(U))return!F||!dt(F,U);if(!ft(W))return!1;const K=W;return B.hasMatchingElement(O=>dt(O,K))&&(!F||!dt(F,K))}),q=We(()=>{if(!E.handler)return;Vt(k.select("domReferenceElement")).removeEventListener("mousemove",E.handler),E.handler=void 0}),L=We(()=>{Ap(E)});return h&&(E.handleCloseOptions=_.current?.__options),v.useEffect(()=>q,[q]),v.useEffect(()=>{if(!n)return;function F(U){U.open?C.current=!1:(C.current=U.reason===yr,q(),E.openChangeTimeout.clear(),E.restTimeout.clear(),E.blockMouseMove=!0,E.restTimeoutPending=!1)}return R.on("openchange",F),()=>{R.off("openchange",F)}},[n,R,E,q]),v.useEffect(()=>{if(!n)return;function F(K,O=!0){const P=Sp(D.current,"close",E.pointerType);P?E.openChangeTimeout.start(P,()=>{k.setOpen(!1,xt(yr,K)),T?.events.emit("floating.closed",K)}):O&&(E.openChangeTimeout.clear(),k.setOpen(!1,xt(yr,K)),T?.events.emit("floating.closed",K))}const U=d.current??(h?k.select("domReferenceElement"):null);if(!ft(U))return;function W(K){if(E.openChangeTimeout.clear(),E.blockMouseMove=!1,a&&!ea(E.pointerType))return;const O=k1(N.current),P=Sp(D.current,"open",E.pointerType),V=cr(K),j=K.currentTarget??null,Z=k.select("domReferenceElement");let te=j;if(ft(V)&&!k.context.triggerElements.hasElement(V)){for(const Se of k.context.triggerElements.elements())if(dt(Se,V)){te=Se;break}}ft(j)&&ft(Z)&&!k.context.triggerElements.hasElement(j)&&dt(j,Z)&&(te=Z);const se=te==null?!1:H(Z,te,V),ue=k.select("open"),le=z.current?.()??k.select("transitionStatus")==="ending",fe=!ue&&le&&C.current,ge=!se&&ft(te)&&ft(Z)&&dt(Z,te)&&fe,_e=O>0&&!P,oe=se&&(ue||fe)||ge,ye=!ue||se;if(oe){Y()&&k.setOpen(!0,xt(yr,K,te));return}_e||(P?E.openChangeTimeout.start(P,()=>{ye&&Y()&&k.setOpen(!0,xt(yr,K,te))}):ye&&Y()&&k.setOpen(!0,xt(yr,K,te)))}function B(K){if(I()){L();return}q();const O=k.select("domReferenceElement"),P=Vt(O);E.restTimeout.clear(),E.restTimeoutPending=!1;const V=S.current.floatingContext??m?.();if(xp(K.relatedTarget,k.context.triggerElements))return;if(_.current&&V){k.select("open")||E.openChangeTimeout.clear();const Z=d.current;E.handler=_.current({...V,tree:T,x:K.clientX,y:K.clientY,onClose(){L(),q(),A.current&&!I()&&Z===k.select("domReferenceElement")&&F(K,!0)}}),P.addEventListener("mousemove",E.handler),E.handler(K);return}(E.pointerType!=="touch"||!dt(k.select("floatingElement"),K.relatedTarget))&&F(K)}return c?$i(It(U,"mousemove",W,{once:!0}),It(U,"mouseenter",W),It(U,"mouseleave",B)):$i(It(U,"mouseenter",W),It(U,"mouseleave",B))},[q,L,S,D,k,n,_,E,h,H,I,a,c,N,d,T,A,m,z,Y]),v.useMemo(()=>{if(!n)return;function F(U){E.pointerType=U.pointerType}return{onPointerDown:F,onPointerEnter:F,onMouseMove(U){const{nativeEvent:W}=U,B=U.currentTarget,K=k.select("domReferenceElement"),O=k.select("open"),P=H(K,B,U.target);if(a&&!ea(E.pointerType))return;if(O&&P&&E.handleCloseOptions?.blockPointerEvents){const Z=k.select("floatingElement");if(Z){const te=E.handleCloseOptions?.getScope?.()??B.ownerDocument.body;K_(E,{scopeElement:te,referenceElement:B,floatingElement:Z})}}const V=k1(N.current);if(O&&!P||V===0||!P&&E.restTimeoutPending&&U.movementX**2+U.movementY**2<2)return;E.restTimeout.clear();function j(){if(E.restTimeoutPending=!1,I())return;const Z=k.select("open");!E.blockMouseMove&&(!Z||P)&&Y()&&k.setOpen(!0,xt(yr,W,B))}E.pointerType==="touch"?Ti.flushSync(()=>{j()}):P&&O?j():(E.restTimeoutPending=!0,E.restTimeout.start(V,j))}}},[n,E,I,H,a,k,N,Y])}const m$="Escape";function yh(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function wd(e,t){return yh(t,e===KC||e===zv,e===ch||e===fh)}function yb(e,t,n){return yh(t,e===zv,n?e===ch:e===fh)||e==="Enter"||e===" "||e===""}function g$(e,t,n){return yh(t,n?e===ch:e===fh,e===zv)}function b$(e,t,n,r){const s=n?e===fh:e===ch,a=e===KC;return t==="both"||t==="horizontal"&&r?e===m$:yh(t,s,a)}function y$(e,t){const{listRef:n,activeIndex:r,onNavigate:s=()=>{},enabled:a=!0,selectedIndex:l=null,allowEscape:c=!1,loopFocus:d=!1,nested:f=!1,rtl:h=!1,virtual:m=!1,focusItemOnOpen:b="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:k=!0,disabledIndices:S=void 0,orientation:R="vertical",parentOrientation:T,id:E,resetOnPointerLeave:C=!0,externalTree:_,grid:D}=t,N=D!=null,A="rootStore"in e?e.rootStore:e,$=A.useState("open"),z=A.useState("floatingElement"),I=A.useState("domReferenceElement"),Y=A.context.dataRef,H=kp(z),q=Ey(I),L=_n(H),F=Il(),U=la(_),W=v.useRef(b),B=v.useRef(l??-1),K=v.useRef(null),O=v.useRef(!0),P=We(ee=>{s(B.current===-1?null:B.current,ee)}),V=v.useRef(!!z),j=v.useRef($),Z=v.useRef(!1),te=v.useRef(!1),se=v.useRef(null),ue=_n(S),le=_n($),fe=_n(l),ge=_n(C),_e=bl(),oe=bl(),ye=We(()=>{function ee(xe){m?U?.events.emit("virtualfocus",xe):se.current=up(xe,{sync:Z.current,preventScroll:!0})}const ce=n.current[B.current],J=te.current;ce&&ee(ce),(Z.current?xe=>xe():xe=>_e.request(xe))(()=>{const xe=n.current[B.current]||ce;if(!xe)return;ce||ee(xe),Me&&(J||!O.current)&&xe.scrollIntoView?.({block:"nearest",inline:"nearest"})})});Ge(()=>{Y.current.orientation=R},[Y,R]),Ge(()=>{a&&($&&z?(B.current=l??-1,W.current&&l!=null&&(te.current=!0,P())):V.current&&(B.current=-1,P()))},[a,$,z,l,P]),Ge(()=>{if(a){if(!$){Z.current=!1;return}if(z)if(r==null){if(Z.current=!1,fe.current!=null)return;if(V.current&&(B.current=-1,ye()),(!j.current||!V.current)&&W.current&&(K.current!=null||W.current===!0&&K.current==null)){let ee=0;const ce=()=>{n.current[0]==null?(ee<2&&(ee?re=>oe.request(re):queueMicrotask)(ce),ee+=1):(B.current=K.current==null||yb(K.current,R,h)||f?lp(n):Cy(n),K.current=null,P())};ce()}}else tc(n.current,r)||(B.current=r,ye(),te.current=!1)}},[a,$,z,r,fe,f,n,R,h,P,ye,oe]),Ge(()=>{if(!a||z||!U||m||!V.current)return;const ee=U.nodesRef.current,ce=ee.find(xe=>xe.id===F)?.context?.elements.floating,J=ar(Vt(I??ce??null)),re=ee.some(xe=>xe.context&&dt(xe.context.elements.floating,J));ce&&!re&&O.current&&ce.focus({preventScroll:!0})},[a,z,I,U,F,m]),Ge(()=>{j.current=$,V.current=!!z}),Ge(()=>{$||(K.current=null,W.current=b)},[$,b]);const Se=r!=null,Oe=We(ee=>{if(!le.current)return;const ce=n.current.indexOf(ee.currentTarget);ce!==-1&&(B.current!==ce||r!==ce)&&(B.current=ce,P(ee))}),we=We(()=>T??U?.nodesRef.current.find(ee=>ee.id===F)?.context?.dataRef?.current.orientation),ke=We(()=>lp(n,ue.current)),De=We(ee=>{if(O.current=!1,Z.current=!0,ee.which===229||!le.current&&ee.currentTarget===L.current)return;if(f&&b$(ee.key,R,h,N)){wd(ee.key,we())||Di(ee),A.setOpen(!1,xt(m1,ee.nativeEvent)),zt(I)&&(m?U?.events.emit("virtualfocus",I):I.focus());return}const ce=B.current,J=lp(n,S),re=Cy(n,S);if(q||(ee.key==="Home"&&(Di(ee),B.current=J,P(ee)),ee.key==="End"&&(Di(ee),B.current=re,P(ee))),D!=null){const xe=D(ee,B.current,n,R,d,h,S,J,re);if(xe!=null&&(B.current=xe,P(ee)),R==="both")return}if(wd(ee.key,R)){if(Di(ee),$&&!m&&ar(ee.currentTarget.ownerDocument)===ee.currentTarget){B.current=yb(ee.key,R,h)?J:re,P(ee);return}yb(ee.key,R,h)?d?ce>=re?c&&ce!==n.current.length?B.current=-1:(Z.current=!1,B.current=J):B.current=xs(n.current,{startingIndex:ce,disabledIndices:S}):B.current=Math.min(re,xs(n.current,{startingIndex:ce,disabledIndices:S})):d?ce<=J?c&&ce!==-1?B.current=n.current.length:(Z.current=!1,B.current=re):B.current=xs(n.current,{startingIndex:ce,decrement:!0,disabledIndices:S}):B.current=Math.max(J,xs(n.current,{startingIndex:ce,decrement:!0,disabledIndices:S})),tc(n.current,B.current)&&(B.current=-1),P(ee)}}),Me=v.useMemo(()=>({onFocus(ce){Z.current=!0,Oe(ce)},onClick:({currentTarget:ce})=>ce.focus({preventScroll:!0}),onMouseMove(ce){Z.current=!0,te.current=!1,y&&Oe(ce)},onPointerLeave(ce){if(!le.current||!O.current||ce.pointerType==="touch")return;Z.current=!0;const J=ce.relatedTarget;if(!(!y||n.current.includes(J))&&ge.current&&(se.current?.(),se.current=null,B.current=-1,P(ce),!m)){const re=L.current,xe=ar(Vt(re));re&&dt(re,xe)&&re.focus({preventScroll:!0})}}}),[Oe,le,L,y,n,P,ge,m]),Le=v.useMemo(()=>m&&$&&Se&&{"aria-activedescendant":`${E}-${r}`},[m,$,Se,E,r]),He=v.useMemo(()=>({"aria-orientation":R==="both"?void 0:R,...q?{}:Le,onKeyDown(ee){if(ee.key==="Tab"&&ee.shiftKey&&$&&!m){const ce=cr(ee.nativeEvent);if(ce&&!dt(L.current,ce))return;Di(ee),A.setOpen(!1,xt(ah,ee.nativeEvent)),zt(I)&&I.focus();return}De(ee)},onPointerMove(){O.current=!0}}),[Le,De,L,R,q,A,$,m,I]),be=v.useMemo(()=>{function ee(re){A.setOpen(!0,xt(m1,re.nativeEvent,re.currentTarget))}function ce(re){b==="auto"&&jv(re.nativeEvent)&&(W.current=!m)}function J(re){W.current=b,b==="auto"&&VC(re.nativeEvent)&&(W.current=!0)}return{onKeyDown(re){const xe=A.select("open");O.current=!1;const $e=re.key.startsWith("Arrow"),Xe=g$(re.key,we(),h),Ye=wd(re.key,R),ht=(f?Xe:Ye)||re.key==="Enter"||re.key.trim()==="";if(m&&xe)return De(re);if(!(!xe&&!k&&$e)){if(ht){const Qe=wd(re.key,we());K.current=f&&Qe?null:re.key}if(f){Xe&&(Di(re),xe?(B.current=ke(),P(re)):ee(re));return}Ye&&(fe.current!=null&&(B.current=fe.current),Di(re),!xe&&k?ee(re):De(re),xe&&P(re))}},onFocus(re){A.select("open")&&!m&&(B.current=-1,P(re))},onPointerDown:J,onPointerEnter:J,onMouseDown:ce,onClick:ce}},[De,b,ke,f,P,A,k,R,we,h,fe,m]),Re=v.useMemo(()=>({...Le,...be}),[Le,be]);return v.useMemo(()=>a?{reference:Re,floating:He,item:Me,trigger:be}:{},[a,Re,He,be,Me])}function v$(e,t){const{listRef:n,elementsRef:r,activeIndex:s,onMatch:a,disabledIndices:l,onTyping:c,enabled:d=!0,resetMs:f=750,selectedIndex:h=null}=t,m="rootStore"in e?e.rootStore:e,b=m.useState("open"),y=di(),k=v.useRef(""),S=v.useRef(h??s??-1),R=v.useRef(null),T=We(_=>{function D(L){const F=r?.current[L];return!F||ph(F)}function N(L){return D(L)?l==null||!Tp(fo,L,l):!1}function A(L,F,U=0){if(L.length===0)return-1;const W=(U%L.length+L.length)%L.length,B=F.toLowerCase();for(let K=0;K<L.length;K+=1){const O=(W+K)%L.length;if(!(!L[O]?.toLowerCase().startsWith(B)||!N(O)))return O}return-1}const $=n.current;if(k.current.length>0&&_.key===" "&&(Di(_),c?.(!0)),k.current.length>0&&k.current[0]!==" "&&A($,k.current)===-1&&_.key!==" "&&c?.(!1),$==null||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;b&&_.key!==" "&&(Di(_),c?.(!0));const z=k.current==="";z&&(S.current=h??s??-1),$.every((L,F)=>L&&N(F)?L[0]?.toLowerCase()!==L[1]?.toLowerCase():!0)&&k.current===_.key&&(k.current="",S.current=R.current),k.current+=_.key,y.start(f,()=>{k.current="",S.current=R.current,c?.(!1)});const H=((z?h??s??-1:S.current)??0)+1,q=A($,k.current,H);q!==-1?(a?.(q),R.current=q):_.key!==" "&&(k.current="",c?.(!1))}),E=We(_=>{const D=_.relatedTarget,N=m.select("domReferenceElement"),A=m.select("floatingElement");dt(N,D)||dt(A,D)||(y.clear(),k.current="",S.current=R.current,c?.(!1))});Ge(()=>{!b&&h!==null||(y.clear(),R.current=null,k.current!==""&&(k.current=""))},[b,h,y]),Ge(()=>{b&&k.current===""&&(S.current=h??s??-1)},[b,h,s]);const C=v.useMemo(()=>({onKeyDown:T,onBlur:E}),[T,E]);return v.useMemo(()=>d?{reference:C,floating:C}:{},[d,C])}const Y1=.1,x$=Y1*Y1,fn=.5;function Ed(e,t,n,r,s,a){return r>=t!=a>=t&&e<=(s-n)*(t-r)/(a-r)+n}function Td(e,t,n,r,s,a,l,c,d,f){let h=!1;return Ed(e,t,n,r,s,a)&&(h=!h),Ed(e,t,s,a,l,c)&&(h=!h),Ed(e,t,l,c,d,f)&&(h=!h),Ed(e,t,d,f,n,r)&&(h=!h),h}function k$(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Rd(e,t,n,r,s,a){const l=Math.min(n,s),c=Math.max(n,s),d=Math.min(r,a),f=Math.max(r,a);return e>=l&&e<=c&&t>=d&&t<=f}function Z_(e={}){const{blockPointerEvents:t=!1}=e,n=new wi,r=({x:s,y:a,placement:l,elements:c,onClose:d,nodeId:f,tree:h})=>{const m=l?.split("-")[0];let b=!1,y=null,k=null,S=typeof performance<"u"?performance.now():0;function R(E,C){const _=performance.now(),D=_-S;if(y===null||k===null||D===0)return y=E,k=C,S=_,!1;const N=E-y,A=C-k,$=N*N+A*A,z=D*D*x$;return y=E,k=C,S=_,$<z}function T(){n.clear(),d()}return function(C){n.clear();const _=c.domReference,D=c.floating;if(!_||!D||m==null||s==null||a==null)return;const{clientX:N,clientY:A}=C,$=cr(C),z=C.type==="mouseleave",I=dt(D,$),Y=dt(_,$);if(I&&(b=!0,!z))return;if(Y&&(b=!1,!z)){b=!0;return}if(z&&ft(C.relatedTarget)&&dt(D,C.relatedTarget))return;function H(){return!!(h&&ho(h.nodesRef.current,f).length>0)}function q(){H()||T()}if(H())return;const L=_.getBoundingClientRect(),F=D.getBoundingClientRect(),U=s>F.right-F.width/2,W=a>F.bottom-F.height/2,B=F.width>L.width,K=F.height>L.height,O=(B?L:F).left,P=(B?L:F).right,V=(K?L:F).top,j=(K?L:F).bottom;if(m==="top"&&a>=L.bottom-1||m==="bottom"&&a<=L.top+1||m==="left"&&s>=L.right-1||m==="right"&&s<=L.left+1){q();return}let Z=!1;switch(m){case"top":Z=Rd(N,A,O,L.top+1,P,F.bottom-1);break;case"bottom":Z=Rd(N,A,O,F.top+1,P,L.bottom-1);break;case"left":Z=Rd(N,A,F.right-1,j,L.left+1,V);break;case"right":Z=Rd(N,A,L.right-1,j,F.left+1,V);break}if(Z)return;if(b&&!k$(N,A,L)){q();return}if(!z&&R(N,A)){q();return}let te=!1;switch(m){case"top":{const se=B?fn/2:fn*4,ue=B||U?s+se:s-se,le=B?s-se:U?s+se:s-se,fe=a+fn+1,ge=U||B?F.bottom-fn:F.top,_e=U?B?F.bottom-fn:F.top:F.bottom-fn;te=Td(N,A,ue,fe,le,fe,F.left,ge,F.right,_e);break}case"bottom":{const se=B?fn/2:fn*4,ue=B||U?s+se:s-se,le=B?s-se:U?s+se:s-se,fe=a-fn,ge=U||B?F.top+fn:F.bottom,_e=U?B?F.top+fn:F.bottom:F.top+fn;te=Td(N,A,ue,fe,le,fe,F.left,ge,F.right,_e);break}case"left":{const se=K?fn/2:fn*4,ue=K||W?a+se:a-se,le=K?a-se:W?a+se:a-se,fe=s+fn+1,ge=W||K?F.right-fn:F.left,_e=W?K?F.right-fn:F.left:F.right-fn;te=Td(N,A,ge,F.top,_e,F.bottom,fe,ue,fe,le);break}case"right":{const se=K?fn/2:fn*4,ue=K||W?a+se:a-se,le=K?a-se:W?a+se:a-se,fe=s-fn,ge=W||K?F.left+fn:F.right,_e=W?K?F.left+fn:F.right:F.left+fn;te=Td(N,A,fe,ue,fe,le,ge,F.top,_e,F.bottom);break}}te?b||n.start(40,q):q()}};return r.__options={...e,blockPointerEvents:t},r}const ic="ArrowUp",sc="ArrowDown",Op="ArrowLeft",Mp="ArrowRight",vh="Home",xh="End",Q_=new Set([Op,Mp]),S$=new Set([Op,Mp,vh,xh]),J_=new Set([ic,sc]),w$=new Set([ic,sc,vh,xh]),eN=new Set([...Q_,...J_]),tN=new Set([...eN,vh,xh]),E$="Shift",T$="Control",R$="Alt",C$="Meta",_$=new Set([E$,T$,R$,C$]);function N$(e){return zt(e)&&e.tagName==="INPUT"}function X1(e){return!!(N$(e)&&e.selectionStart!=null||zt(e)&&e.tagName==="TEXTAREA")}function Z1(e,t,n,r){if(!e||!t||!t.scrollTo)return;let s=e.scrollLeft,a=e.scrollTop;const l=e.clientWidth<e.scrollWidth,c=e.clientHeight<e.scrollHeight;if(l&&r!=="vertical"){const d=Q1(e,t,"left"),f=Cd(e),h=Cd(t);n==="ltr"&&(d+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-f.scrollPaddingRight?s=d+t.offsetWidth+h.scrollMarginRight-e.clientWidth+f.scrollPaddingRight:d-h.scrollMarginLeft<e.scrollLeft+f.scrollPaddingLeft&&(s=d-h.scrollMarginLeft-f.scrollPaddingLeft)),n==="rtl"&&(d-h.scrollMarginRight<e.scrollLeft+f.scrollPaddingLeft?s=d-h.scrollMarginLeft-f.scrollPaddingLeft:d+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-f.scrollPaddingRight&&(s=d+t.offsetWidth+h.scrollMarginRight-e.clientWidth+f.scrollPaddingRight))}if(c&&r!=="horizontal"){const d=Q1(e,t,"top"),f=Cd(e),h=Cd(t);d-h.scrollMarginTop<e.scrollTop+f.scrollPaddingTop?a=d-h.scrollMarginTop-f.scrollPaddingTop:d+t.offsetHeight+h.scrollMarginBottom>e.scrollTop+e.clientHeight-f.scrollPaddingBottom&&(a=d+t.offsetHeight+h.scrollMarginBottom-e.clientHeight+f.scrollPaddingBottom)}e.scrollTo({left:s,top:a,behavior:"auto"})}function Q1(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let s=0;for(;t.offsetParent&&(s+=t[r],t.offsetParent!==e);)t=t.offsetParent;return s}function Cd(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}function A$(e){return Rv(19)?e:e?"true":void 0}const O$=v.forwardRef(function(t,n){const{cutout:r,...s}=t;let a;if(r){const l=r.getBoundingClientRect();a=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${l.left}px ${l.top}px,${l.left}px ${l.bottom}px,${l.right}px ${l.bottom}px,${l.right}px ${l.top}px,${l.left}px ${l.top}px)`}return g.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...s,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:a}})});let J1={},eE={},tE="";function M$(e){if(typeof document>"u")return!1;const t=Vt(e);return kn(t).innerWidth-t.documentElement.clientWidth>0}function I$(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Vt(e),r=n.documentElement,s=n.body,a=bo(r)?r:s,l=a.style.overflowY,c=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",a.style.overflowY="scroll";const d=a.offsetWidth;a.style.overflowY="hidden";const f=a.offsetWidth;return a.style.overflowY=l,r.style.scrollbarGutter=c,d===f}function D$(e){const t=Vt(e),n=t.documentElement,r=t.body,s=bo(n)?n:r,a={overflowY:s.style.overflowY,overflowX:s.style.overflowX};return Object.assign(s.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(s.style,a)}}function L$(e){const t=Vt(e),n=t.documentElement,r=t.body,s=kn(n);let a=0,l=0,c=!1;const d=Ar.create();if(yo&&(s.visualViewport?.scale??1)!==1)return()=>{};function f(){const y=s.getComputedStyle(n),k=s.getComputedStyle(r),T=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";a=n.scrollTop,l=n.scrollLeft,J1={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},tE=n.style.scrollBehavior,eE={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const E=n.scrollHeight>n.clientHeight,C=n.scrollWidth>n.clientWidth,_=y.overflowY==="scroll"||k.overflowY==="scroll",D=y.overflowX==="scroll"||k.overflowX==="scroll",N=Math.max(0,s.innerWidth-r.clientWidth),A=Math.max(0,s.innerHeight-r.clientHeight),$=parseFloat(k.marginTop)+parseFloat(k.marginBottom),z=parseFloat(k.marginLeft)+parseFloat(k.marginRight),I=bo(n)?n:r;if(c=I$(e),c){n.style.scrollbarGutter=T,I.style.overflowY="hidden",I.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:T,overflowY:"hidden",overflowX:"hidden"}),(E||_)&&(n.style.overflowY="scroll"),(C||D)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:$||A?`calc(100dvh - ${$+A}px)`:"100dvh",width:z||N?`calc(100vw - ${z+N}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=a,r.scrollLeft=l,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function h(){Object.assign(n.style,J1),Object.assign(r.style,eE),c||(n.scrollTop=a,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=tE)}function m(){h(),d.request(f)}f();const b=It(s,"resize",m);return()=>{d.cancel(),h(),typeof s.removeEventListener=="function"&&b()}}class j${lockCount=0;restore=null;timeoutLock=wi.create();timeoutUnlock=wi.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=Vt(t).documentElement,s=kn(r).getComputedStyle(r).overflowY;if(s==="hidden"||s==="clip"){this.restore=Vn;return}const a=uh||!M$(t);this.restore=a?D$(t):L$(t)}}const z$=new j$;function P$(e=!0,t=null){Ge(()=>{if(e)return z$.acquire(t)},[e,t])}function $$(e){const t=v.useRef(""),n=v.useCallback(s=>{s.defaultPrevented||(t.current=s.pointerType,e(s,s.pointerType))},[e]);return{onClick:v.useCallback(s=>{if(s.detail===0){e(s,"keyboard");return}"pointerType"in s?e(s,s.pointerType):e(s,t.current),t.current=""},[e]),onPointerDown:n}}function nN(e,t){const n=v.useRef(e),r=We(t);Ge(()=>{n.current!==e&&r(n.current)},[e,r]),Ge(()=>{n.current=e},[e])}function B$(e,t){const n=We((a,l)=>{(typeof e=="function"?e():e)||t(l||(uh?"touch":""))}),{onClick:r,onPointerDown:s}=$$(n);return v.useMemo(()=>({onClick:r,onPointerDown:s}),[r,s])}function F$(e){const[t,n]=v.useState(null),r=B$(e,n);return nN(e,s=>{s&&!e&&n(null)}),v.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}const U$=v.createContext(void 0);function Ri(){return v.useContext(U$)?.direction??"ltr"}const rN={account:"",add:"",agent:"","agent-circle":"","agent-square":"",agents:"","agents-swarm":"","alarm-clock":"",alert:"",archive:"","army-base":"","arrow-block-down":"","arrow-block-left":"","arrow-block-line-down":"","arrow-block-line-left":"","arrow-block-line-right":"","arrow-block-line-up":"","arrow-block-right":"","arrow-block-up":"","arrow-bracket-from-down":"","arrow-bracket-from-left":"","arrow-bracket-from-right":"","arrow-bracket-from-up":"","arrow-bracket-from-up-dashed":"","arrow-bracket-to-down":"","arrow-bracket-to-left":"","arrow-bracket-to-right":"","arrow-bracket-to-up":"","arrow-ccw":"","arrow-circle-down":"","arrow-circle-left":"","arrow-circle-right":"","arrow-circle-up":"","arrow-cw":"","arrow-down":"","arrow-left":"","arrow-left-down":"","arrow-left-up":"","arrow-right":"","arrow-right-down":"","arrow-right-up":"","arrow-square-down":"","arrow-square-from-down":"","arrow-square-from-left":"","arrow-square-from-right":"","arrow-square-from-up":"","arrow-square-left":"","arrow-square-left-down":"","arrow-square-left-top":"","arrow-square-left-up":"","arrow-square-right":"","arrow-square-right-down":"","arrow-square-right-top":"","arrow-square-right-up":"","arrow-square-to-down":"","arrow-square-to-left":"","arrow-square-to-right":"","arrow-square-to-up":"","arrow-square-up":"","arrow-swap":"","arrow-u-up-left":"","arrow-u-up-right":"","arrow-up":"","arrows-both-horizontal":"","arrows-both-vertical":"","arrows-ccw":"","arrows-ccw-angular":"","arrows-contract":"","arrows-contract-simple":"","arrows-cw":"","arrows-down-up":"","arrows-expand":"","arrows-expand-simple":"","arrows-left-right":"","arrows-out-cardinal":"",asterisk:"",at:"",atom:"",bandaid:"",banknote:"","banknotes-stack":"",barbell:"",basketball:"","beach-umbrella":"",beaker:"","beaker-stop":"",beehouse:"",bell:"","bell-dot":"","bell-slash":"",binary:"",binoculars:"",bluetooth:"","board-kanban":"",book:"","book-open":"",bookmark:"",books:"",bowtie:"",bracket:"","bracket-dot":"","bracket-error":"","brackets-curly":"","brackets-curly-dot":"","brackets-curly-x":"","brackets-square":"",brain:"","brain-hourglass":"","brain-simple":"","brain-simplest":"","brain-slash":"",briefcase:"",browser:"",browsers:"",brush:"",bug:"",bugbot:"",building:"",buildings:"",bullseye:"",calculator:"",calendar:"","calendar-hourglass":"",camera:"",car:"",cardholder:"",castle:"",cd:"","chart-bars":"","chart-line":"","chart-pie":"","chart-pyramid":"","chart-scatter":"","chat-bubble":"","chat-bubble-chevrons-left-right":"","chat-bubble-ellipsis":"","chat-bubble-exclamation":"","chat-bubble-pencil":"","chat-bubble-question":"","chat-bubbles":"","chat-bubbles-grid":"",chatBubble:"","chatBubble-ellipsis":"","chatBubble-exclamation":"","chatBubble-question":"",chatBubbles:"",check:"","check-circle":"","check-square":"",checks:"","chef-hat":"","chess-king":"","chess-tower":"","chevron-circle-down":"","chevron-circle-left":"","chevron-circle-right":"","chevron-circle-up":"","chevron-down":"","chevron-down-small":"","chevron-left":"","chevron-left-small":"","chevron-right":"","chevron-right-small":"","chevron-up":"","chevron-up-small":"","chevrons-down":"","chevrons-down-up":"","chevrons-left":"","chevrons-left-right":"","chevrons-right":"","chevrons-right-dotted-left":"","chevrons-up":"","chevrons-up-down":"",chip:"","chip-simple":"",circle:"","circle-circle":"","circle-dashed":"",circles:"","circles-check":"",clipboard:"",clock:"",clone:"",close:"",cloud:"","cloud-arrow-down":"","cloud-arrow-up":"","cloud-download":"","cloud-upload":"",code:"","code-brackets":"","code-simple":"",cog:"",collection:"","collection-plus":"","color-mode":"",command:"",comment:"","comment-dashed":"","comment-discussion":"","comment-dot":"",comments:"",compass:"","compass-check":"","compass-dot":"",conversation:"",cookie:"",copilot:"",copy:"","corners-in":"","corners-out":"","corners-out-check":"","corners-out-sparkle":"","cost-high":"","cost-low":"","cost-medium":"","credit-card":"","cross-medical":"",crosshair:"",crown:"","crystal-ball":"",cube:"","cube-coordinates":"","cube-nodes":"","cube-transparent":"","currency-btc":"","currency-dollar":"","currency-eth":"","cursor-logo":"","cursor-text":"",cutlery:"",cylinder:"",dashboard:"",database:"","database-network":"","debug-pause":"","debug-restart":"","debug-start":"","debug-stop":"","deckchair-umbrella":"","desktop-download":"","device-camera":"","device-camera-video":"","device-desktop":"","device-mobile":"",diagram:"",diff:"","diff-added":"","diff-ignored":"","diff-modified":"","diff-multiple":"","diff-removed":"","diff-renamed":"","diff-single":"","diff-single-arrow-right-up":"","diff-single-dot":"",discard:"",display:"","display-check":"","display-circle":"","display-connect":"","display-play":"","display-waves":"",displays:"","dots-3-horizontal":"","dots-3-vertical":"",drop:"",easel:"",edit:"",elephant:"",ellipsis:"",envelope:"","envelope-open":"",eraser:"",error:"","exclamation-circle":"","exclamation-triangle":"","execution-parallel":"","execution-sequential":"",extensions:"",eye:"","eye-closed":"","eye-slash":"","fast-backward":"","fast-forward":"",feedback:"",file:"","file-add":"","file-arrow-right-up":"","file-binary":"","file-chevrons-left-right":"","file-code":"","file-directory":"","file-directory-create":"","file-image":"","file-list":"","file-lock":"","file-media":"","file-pdf":"","file-plus":"","file-text":"","file-type-adobe-illustrator":"","file-type-adobe-photoshop":"","file-type-babel":"","file-type-bazel":"","file-type-bevy":"","file-type-bicep":"","file-type-biomejs":"","file-type-bower":"","file-type-bun":"","file-type-c-plus-plus":"","file-type-c-sharp":"","file-type-clojure":"","file-type-crystal":"","file-type-cuda":"","file-type-dart":"","file-type-docker":"","file-type-ejs":"","file-type-elixir":"","file-type-eslint":"","file-type-f-sharp":"","file-type-firebase":"","file-type-geckodriver":"","file-type-git-meta":"","file-type-go":"","file-type-godot":"","file-type-grails":"","file-type-graphql":"","file-type-groovy":"","file-type-grunt":"","file-type-gulp":"","file-type-haml":"","file-type-handlebars":"","file-type-haskell":"","file-type-ionic":"","file-type-java":"","file-type-javascript":"","file-type-julia":"","file-type-jupyter":"","file-type-karma":"","file-type-kotlin":"","file-type-latex":"","file-type-liquid":"","file-type-maven":"","file-type-mustache":"","file-type-npm":"","file-type-nunjucks":"","file-type-ocaml":"","file-type-odata":"","file-type-pdf":"","file-type-perl":"","file-type-platformio":"","file-type-powershell":"","file-type-prettier":"","file-type-prisma":"","file-type-prolog":"","file-type-puppet":"","file-type-python":"","file-type-reason":"","file-type-rescript":"","file-type-rollup":"","file-type-rust":"","file-type-sass":"","file-type-sbt":"","file-type-scala":"","file-type-slim":"","file-type-stylus":"","file-type-sublime":"","file-type-svelte":"","file-type-swift":"","file-type-terraform":"","file-type-typescript":"","file-type-vala":"","file-type-vite":"","file-type-vsc":"","file-type-vue":"","file-type-web-assembly":"","file-type-webpack":"","file-type-windows":"","file-type-yarn":"","file-type-zig":"","file-zip":"",files:"","film-reel":"","film-strip":"",filter:"",flag:"","flag-hill":"",flame:"",flask:"","flask-slash-circle":"","floppy-disc":"","focus-window":"","fold-dashed":"",folder:"","folder-active":"","folder-arrow-right-up":"","folder-check":"","folder-dashed":"","folder-library":"","folder-open":"","folder-opened":"","folder-plus":"",folders:"",fork:"",funnel:"","funnel-simple":"","game-controller":"","game-controller-retro":"",gauge:"",gear:"",gem:"",gift:"","git-branch":"","git-commit":"","git-commit-horizontal":"","git-compare":"","git-fetch":"","git-fork":"","git-merge":"","git-pull":"","git-pull-request":"","git-pull-request-closed":"","git-pull-request-create":"","git-pull-request-done":"","git-pull-request-draft":"","git-push":"",github:"","github-actions":"",globe:"","graduation-cap":"",graph:"","graph-line":"","graph-scatter":"",grid:"","grid-plus":"","grid-sparkle":"",gripper:"",hamburger:"",hammer:"",hash:"",hat:"",headphones:"",headset:"",heart:"",hexagon:"",history:"",home:"",hourglass:"",house:"","i-circle":"",image:"","image-square":"",inbox:"",infinity:"",info:"",inspect:"",issue:"","issue-closed":"","issue-draft":"",issues:"",joystick:"",json:"","kebab-horizontal":"","kebab-vertical":"",key:"",keyboard:"","keyboard-tab":"",laptop:"",layers:"","layout-dialog":"","layout-empty":"","layout-floating-window":"","layout-panel-bottom":"","layout-panel-bottom-dock":"","layout-panel-bottom-on":"","layout-panel-bottom-undock":"","layout-panel-off":"","layout-sidebar-left":"","layout-sidebar-left-dock":"","layout-sidebar-left-off":"","layout-sidebar-left-on":"","layout-sidebar-left-undock":"","layout-sidebar-right":"","layout-sidebar-right-dock":"","layout-sidebar-right-off":"","layout-sidebar-right-on":"","layout-sidebar-right-undock":"","layout-split-horizontal":"","layout-split-horizontal-dashed":"","layout-split-horizontal-right-dock":"","layout-split-horizontal-right-undock":"","layout-split-vertical":"",leaf:"",lego:"",library:"",lightbulb:"","lightbulb-sparkle":"",lightning:"",link:"","link-external":"","list-bullets":"","list-checks":"","list-filter":"","list-ordered":"","list-todo":"","list-todo-subtask":"","list-x":"",loading:"",location:"",lock:"","lock-locked":"","lock-unlocked":"","logo-azure":"","logo-azure-devops":"","logo-figma":"","logo-github":"","logo-gitlab":"","logo-jira":"","logo-linear":"","logo-markdown":"","logo-mcp":"","logo-microsoft-teams":"","logo-notion":"","logo-python":"","logo-sentry":"","logo-slack":"","logo-vscode":"","logo-vscode-insiders":"","logo-x":"","mac-mini":"","magic-wand":"",magnet:"","magnifying-glass":"","magnifying-glass-fuzzy":"","magnifying-glass-minus":"","magnifying-glass-plus":"","magnifying-glass-slash-circle":"","magnifying-glass-sparkle":"",magnifyingGlass:"","magnifyingGlass-minus":"","magnifyingGlass-plus":"","magnifyingGlass-slash-circle":"",mail:"",map:"","map-pin":"","mark-github":"",markdown:"","mask-happy":"","masks-happy":"",mcp:"",megaphone:"",mention:"",menu:"",merge:"",mic:"",microscope:"",minus:"","minus-circle":"","minus-small":"",mobile:"",moon:"","moon-sparkle":"","moon-z":"",more:"",music:"",mute:"","new-file":"","new-folder":"",newspaper:"",note:"","one-circle":"",organization:"","organization-filled":"",owl:"",package:"","package-zipper":"","paint-roller":"",palette:"",paperclip:"",paperplane:"",paragraph:"",pass:"",pause:"","pause-circle":"",paw:"","pen-nib":"",pencil:"","pencil-square":"",pentagon:"",people:"","people-3":"",percent:"",person:"","person-add":"","person-chat-bubble":"","person-circle":"","person-follow":"","person-plus":"",piano:"","pie-chart":"",pilcrow:"",pin:"","pin-slash":"",pipe:"",plan:"",plane:"",play:"","play-bug":"","play-circle":"","play-slow":"","play-super-fast":"","playback-loop":"","plays-bug":"",plug:"","plug-slash":"",plus:"","plus-circle":"","plus-minus":"","pointer-arrow":"",pug:"",pulse:"","puzzle-piece":"",question:"","question-circle":"",quote:"",radar:"","radio-tower":"","rect-magnifying-glass":"","rect-magnifyingGlass":"",redo:"",refresh:"",regex:"","remote-control":"",remove:"","remove-close":"",replace:"","replace-all":"",report:"",return:"",review:"",robot:"",rocket:"","rocking-chair":"",rss:"",ruler:"",rules:"",run:"",satellite:"",scales:"",seal:"","seal-check":"","seal-question":"",search:"","search-stop":"",send:"",server:"",servers:"",settings:"","settings-gear":"","shapes-square-circle":"",share:"",shield:"","shield-check":"","shield-question":"","shield-x":"","shoe-fast":"","shopping-bag":"","shopping-basket":"",signal:"",skills:"","skills-capability":"","slash-circle":"",sliders:"",smartwatch:"","smiley-happy":"","smiley-happy-square":"","smiley-neutral":"","smiley-plus":"","smiley-sad":"",snowflake:"","soccer-ball":"","sort-ascending":"","sort-descending":"","source-control":"",sparkle:"",sparkles:"","speaker-hifi":"","speaker-waves":"","speaker-x":"",spinner:"",split:"","split-horizontal":"","split-vertical":"",sprint:"",square:"","square-dashed":"","square-dot":"",squares:"","squares-minus":"","squares-plus":"","squares-x":"",stack:"",star:"","star-empty":"","star-full":"","status-done":"","status-draft":"","status-needs-attention":"",stop:"","stop-circle":"",stopwatch:"",storefront:"",sun:"",swatches:"","symbol-folder":"",sync:"","t-shirt":"",table:"",tabs:"",tag:"","tags-chevron-down":"","tags-chevron-left":"","tags-chevron-right":"","tags-chevron-up":"",target:"",terminal:"","terminal-rectangle":"","text-aa":"","text-ab":"","text-b":"","text-c":"","text-d":"","text-italic":"","text-j":"","text-r":"","text-s":"","text-strikethrough":"","text-t":"","text-t-square":"","text-tt":"","text-y":"","thinking-high":"","thinking-low":"","thinking-medium":"","threads-parallel":"","threads-single":"","three-bars":"","thumbs-down":"","thumbs-up":"",thumbsdown:"",thumbsup:"","traffic-cone":"",trafficCone:"",trash:"",trashcan:"",tray:"","treasure-chest":"","trending-down":"","trending-up":"","triangle-small-down":"","triangle-small-left":"","triangle-small-right":"","triangle-small-up":"",twig:"","unfold-dashed":"",unlock:"",unmute:"",unverified:"",vault:"",verified:"",versions:"","video-camera":"",vm:"",vr:"","vr-headset":"","vr-headset-head":"",wallet:"",wand:"",warning:"",watch:"",waveform:"","whole-word":"",window:"","window-pointer-arrow":"",windows:"",wrench:"",x:"","x-circle":"",yarn:"",zap:"",zipper:"","zoom-in":"","zoom-out":"",zzz:""},q$={account:"",add:"",agent:"","agent-circle":"","agent-square":"",agents:"","agents-swarm":"","alarm-clock":"",alert:"",archive:"","army-base":"","arrow-block-down":"","arrow-block-left":"","arrow-block-line-down":"","arrow-block-line-left":"","arrow-block-line-right":"","arrow-block-line-up":"","arrow-block-right":"","arrow-block-up":"","arrow-bracket-from-down":"","arrow-bracket-from-left":"","arrow-bracket-from-right":"","arrow-bracket-from-up":"","arrow-bracket-from-up-dashed":"","arrow-bracket-to-down":"","arrow-bracket-to-left":"","arrow-bracket-to-right":"","arrow-bracket-to-up":"","arrow-ccw":"","arrow-circle-down":"","arrow-circle-left":"","arrow-circle-right":"","arrow-circle-up":"","arrow-cw":"","arrow-down":"","arrow-left":"","arrow-left-down":"","arrow-left-up":"","arrow-right":"","arrow-right-down":"","arrow-right-up":"","arrow-square-down":"","arrow-square-from-down":"","arrow-square-from-left":"","arrow-square-from-right":"","arrow-square-from-up":"","arrow-square-left":"","arrow-square-left-down":"","arrow-square-left-top":"","arrow-square-left-up":"","arrow-square-right":"","arrow-square-right-down":"","arrow-square-right-top":"","arrow-square-right-up":"","arrow-square-to-down":"","arrow-square-to-left":"","arrow-square-to-right":"","arrow-square-to-up":"","arrow-square-up":"","arrow-swap":"","arrow-u-up-left":"","arrow-u-up-right":"","arrow-up":"","arrows-both-horizontal":"","arrows-both-vertical":"","arrows-ccw":"","arrows-ccw-angular":"","arrows-contract":"","arrows-contract-simple":"","arrows-cw":"","arrows-down-up":"","arrows-expand":"","arrows-expand-simple":"","arrows-left-right":"","arrows-out-cardinal":"",asterisk:"",at:"",atom:"",bandaid:"",banknote:"","banknotes-stack":"",barbell:"",basketball:"","beach-umbrella":"",beaker:"","beaker-stop":"",beehouse:"",bell:"","bell-dot":"","bell-slash":"",binary:"",binoculars:"",bluetooth:"","board-kanban":"",book:"","book-open":"",bookmark:"",books:"",bowtie:"",bracket:"","bracket-dot":"","bracket-error":"","brackets-curly":"","brackets-curly-dot":"","brackets-curly-x":"","brackets-square":"",brain:"","brain-hourglass":"","brain-simple":"","brain-simplest":"","brain-slash":"",briefcase:"",browser:"",browsers:"",brush:"",bug:"",bugbot:"",building:"",buildings:"",bullseye:"",calculator:"",calendar:"","calendar-hourglass":"",camera:"",car:"",cardholder:"",castle:"",cd:"","chart-bars":"","chart-line":"","chart-pie":"","chart-pyramid":"","chart-scatter":"","chat-bubble":"","chat-bubble-chevrons-left-right":"","chat-bubble-ellipsis":"","chat-bubble-exclamation":"","chat-bubble-pencil":"","chat-bubble-question":"","chat-bubbles":"","chat-bubbles-grid":"",chatBubble:"","chatBubble-ellipsis":"","chatBubble-exclamation":"","chatBubble-question":"",chatBubbles:"",check:"","check-circle":"","check-square":"",checks:"","chef-hat":"","chess-king":"","chess-tower":"","chevron-circle-down":"","chevron-circle-left":"","chevron-circle-right":"","chevron-circle-up":"","chevron-down":"","chevron-down-small":"","chevron-left":"","chevron-left-small":"","chevron-right":"","chevron-right-small":"","chevron-up":"","chevron-up-small":"","chevrons-down":"","chevrons-down-up":"","chevrons-left":"","chevrons-left-right":"","chevrons-right":"","chevrons-right-dotted-left":"","chevrons-up":"","chevrons-up-down":"",chip:"","chip-simple":"",circle:"","circle-circle":"","circle-dashed":"",circles:"","circles-check":"",clipboard:"",clock:"",clone:"",close:"",cloud:"","cloud-arrow-down":"","cloud-arrow-up":"","cloud-download":"","cloud-upload":"",code:"","code-brackets":"","code-simple":"",cog:"",collection:"","collection-plus":"","color-mode":"",command:"",comment:"","comment-dashed":"","comment-discussion":"","comment-dot":"",comments:"",compass:"","compass-check":"","compass-dot":"",conversation:"",cookie:"",copilot:"",copy:"","corners-in":"","corners-out":"","corners-out-check":"","corners-out-sparkle":"","cost-high":"","cost-low":"","cost-medium":"","credit-card":"","cross-medical":"",crosshair:"",crown:"","crystal-ball":"",cube:"","cube-coordinates":"","cube-nodes":"","cube-transparent":"","currency-btc":"","currency-dollar":"","currency-eth":"","cursor-logo":"","cursor-text":"",cutlery:"",cylinder:"",dashboard:"",database:"","database-network":"","debug-pause":"","debug-restart":"","debug-start":"","debug-stop":"","deckchair-umbrella":"","desktop-download":"","device-camera":"","device-camera-video":"","device-desktop":"","device-mobile":"",diagram:"",diff:"","diff-added":"","diff-ignored":"","diff-modified":"","diff-multiple":"","diff-removed":"","diff-renamed":"","diff-single":"","diff-single-arrow-right-up":"","diff-single-dot":"",discard:"",display:"","display-check":"","display-circle":"","display-connect":"","display-play":"","display-waves":"",displays:"","dots-3-horizontal":"","dots-3-vertical":"",drop:"",easel:"",edit:"",elephant:"",ellipsis:"",envelope:"","envelope-open":"",eraser:"",error:"","exclamation-circle":"","exclamation-triangle":"","execution-parallel":"","execution-sequential":"",extensions:"",eye:"","eye-closed":"","eye-slash":"","fast-backward":"","fast-forward":"",feedback:"",file:"","file-add":"","file-arrow-right-up":"","file-binary":"","file-chevrons-left-right":"","file-code":"","file-directory":"","file-directory-create":"","file-image":"","file-list":"","file-lock":"","file-media":"","file-pdf":"","file-plus":"","file-text":"","file-type-adobe-illustrator":"","file-type-adobe-photoshop":"","file-type-babel":"","file-type-bazel":"","file-type-bevy":"","file-type-bicep":"","file-type-biomejs":"","file-type-bower":"","file-type-bun":"","file-type-c-plus-plus":"","file-type-c-sharp":"","file-type-clojure":"","file-type-crystal":"","file-type-cuda":"","file-type-dart":"","file-type-docker":"","file-type-ejs":"","file-type-elixir":"","file-type-eslint":"","file-type-f-sharp":"","file-type-firebase":"","file-type-geckodriver":"","file-type-git-meta":"","file-type-go":"","file-type-godot":"","file-type-grails":"","file-type-graphql":"","file-type-groovy":"","file-type-grunt":"","file-type-gulp":"","file-type-haml":"","file-type-handlebars":"","file-type-haskell":"","file-type-ionic":"","file-type-java":"","file-type-javascript":"","file-type-julia":"","file-type-jupyter":"","file-type-karma":"","file-type-kotlin":"","file-type-latex":"","file-type-liquid":"","file-type-maven":"","file-type-mustache":"","file-type-npm":"","file-type-nunjucks":"","file-type-ocaml":"","file-type-odata":"","file-type-pdf":"","file-type-perl":"","file-type-platformio":"","file-type-powershell":"","file-type-prettier":"","file-type-prisma":"","file-type-prolog":"","file-type-puppet":"","file-type-python":"","file-type-reason":"","file-type-rescript":"","file-type-rollup":"","file-type-rust":"","file-type-sass":"","file-type-sbt":"","file-type-scala":"","file-type-slim":"","file-type-stylus":"","file-type-sublime":"","file-type-svelte":"","file-type-swift":"","file-type-terraform":"","file-type-typescript":"","file-type-vala":"","file-type-vite":"","file-type-vsc":"","file-type-vue":"","file-type-web-assembly":"","file-type-webpack":"","file-type-windows":"","file-type-yarn":"","file-type-zig":"","file-zip":"",files:"","film-reel":"","film-strip":"",filter:"",flag:"","flag-hill":"",flame:"",flask:"","flask-slash-circle":"","floppy-disc":"","focus-window":"","fold-dashed":"",folder:"","folder-active":"","folder-arrow-right-up":"","folder-check":"","folder-dashed":"","folder-library":"","folder-open":"","folder-opened":"","folder-plus":"",folders:"",fork:"",funnel:"","funnel-simple":"","game-controller":"","game-controller-retro":"",gauge:"",gear:"",gem:"",gift:"","git-branch":"","git-commit":"","git-commit-horizontal":"","git-compare":"","git-fetch":"","git-fork":"","git-merge":"","git-pull":"","git-pull-request":"","git-pull-request-closed":"","git-pull-request-create":"","git-pull-request-done":"","git-pull-request-draft":"","git-push":"",github:"","github-actions":"",globe:"","graduation-cap":"",graph:"","graph-line":"","graph-scatter":"",grid:"","grid-plus":"","grid-sparkle":"",gripper:"",hamburger:"",hammer:"",hash:"",hat:"",headphones:"",headset:"",heart:"",hexagon:"",history:"",home:"",hourglass:"",house:"","i-circle":"",image:"","image-square":"",inbox:"",infinity:"",info:"",inspect:"",issue:"","issue-closed":"","issue-draft":"",issues:"",joystick:"",json:"","kebab-horizontal":"","kebab-vertical":"",key:"",keyboard:"","keyboard-tab":"",laptop:"",layers:"","layout-dialog":"","layout-empty":"","layout-floating-window":"","layout-panel-bottom":"","layout-panel-bottom-dock":"","layout-panel-bottom-on":"","layout-panel-bottom-undock":"","layout-panel-off":"","layout-sidebar-left":"","layout-sidebar-left-dock":"","layout-sidebar-left-off":"","layout-sidebar-left-on":"","layout-sidebar-left-undock":"","layout-sidebar-right":"","layout-sidebar-right-dock":"","layout-sidebar-right-off":"","layout-sidebar-right-on":"","layout-sidebar-right-undock":"","layout-split-horizontal":"","layout-split-horizontal-dashed":"","layout-split-horizontal-right-dock":"","layout-split-horizontal-right-undock":"","layout-split-vertical":"",leaf:"",lego:"",library:"",lightbulb:"","lightbulb-sparkle":"",lightning:"",link:"","link-external":"","list-bullets":"","list-checks":"","list-filter":"","list-ordered":"","list-todo":"","list-todo-subtask":"","list-x":"",loading:"",location:"",lock:"","lock-locked":"","lock-unlocked":"","logo-azure":"","logo-azure-devops":"","logo-figma":"","logo-github":"","logo-gitlab":"","logo-jira":"","logo-linear":"","logo-markdown":"","logo-mcp":"","logo-microsoft-teams":"","logo-notion":"","logo-python":"","logo-sentry":"","logo-slack":"","logo-vscode":"","logo-vscode-insiders":"","logo-x":"","mac-mini":"","magic-wand":"",magnet:"","magnifying-glass":"","magnifying-glass-fuzzy":"","magnifying-glass-minus":"","magnifying-glass-plus":"","magnifying-glass-slash-circle":"","magnifying-glass-sparkle":"",magnifyingGlass:"","magnifyingGlass-minus":"","magnifyingGlass-plus":"","magnifyingGlass-slash-circle":"",mail:"",map:"","map-pin":"","mark-github":"",markdown:"","mask-happy":"","masks-happy":"",mcp:"",megaphone:"",mention:"",menu:"",merge:"",mic:"",microscope:"",minus:"","minus-circle":"","minus-small":"",mobile:"",moon:"","moon-sparkle":"","moon-z":"",more:"",music:"",mute:"","new-file":"","new-folder":"",newspaper:"",note:"","one-circle":"",organization:"","organization-filled":"",owl:"",package:"","package-zipper":"","paint-roller":"",palette:"",paperclip:"",paperplane:"",paragraph:"",pass:"",pause:"","pause-circle":"",paw:"","pen-nib":"",pencil:"","pencil-square":"",pentagon:"",people:"","people-3":"",percent:"",person:"","person-add":"","person-chat-bubble":"","person-circle":"","person-follow":"","person-plus":"",piano:"","pie-chart":"",pilcrow:"",pin:"","pin-slash":"",pipe:"",plan:"",plane:"",play:"","play-bug":"","play-circle":"","play-slow":"","play-super-fast":"","playback-loop":"","plays-bug":"",plug:"","plug-slash":"",plus:"","plus-circle":"","plus-minus":"","pointer-arrow":"",pug:"",pulse:"","puzzle-piece":"",question:"","question-circle":"",quote:"",radar:"","radio-tower":"","rect-magnifying-glass":"","rect-magnifyingGlass":"",redo:"",refresh:"",regex:"","remote-control":"",remove:"","remove-close":"",replace:"","replace-all":"",report:"",return:"",review:"",robot:"",rocket:"","rocking-chair":"",rss:"",ruler:"",rules:"",run:"",satellite:"",scales:"",seal:"","seal-check":"","seal-question":"",search:"","search-stop":"",send:"",server:"",servers:"",settings:"","settings-gear":"","shapes-square-circle":"",share:"",shield:"","shield-check":"","shield-question":"","shield-x":"","shoe-fast":"","shopping-bag":"","shopping-basket":"",signal:"",skills:"","skills-capability":"","slash-circle":"",sliders:"",smartwatch:"","smiley-happy":"","smiley-happy-square":"","smiley-neutral":"","smiley-plus":"","smiley-sad":"",snowflake:"","soccer-ball":"","sort-ascending":"","sort-descending":"","source-control":"",sparkle:"",sparkles:"","speaker-hifi":"","speaker-waves":"","speaker-x":"",spinner:"",split:"","split-horizontal":"","split-vertical":"",sprint:"",square:"","square-dashed":"","square-dot":"",squares:"","squares-minus":"","squares-plus":"","squares-x":"",stack:"",star:"","star-empty":"","star-full":"","status-done":"","status-draft":"","status-needs-attention":"",stop:"","stop-circle":"",stopwatch:"",storefront:"",sun:"",swatches:"","symbol-folder":"",sync:"","t-shirt":"",table:"",tabs:"",tag:"","tags-chevron-down":"","tags-chevron-left":"","tags-chevron-right":"","tags-chevron-up":"",target:"",terminal:"","terminal-rectangle":"","text-aa":"","text-ab":"","text-b":"","text-c":"","text-d":"","text-italic":"","text-j":"","text-r":"","text-s":"","text-strikethrough":"","text-t":"","text-t-square":"","text-tt":"","text-y":"","thinking-high":"","thinking-low":"","thinking-medium":"","threads-parallel":"","threads-single":"","three-bars":"","thumbs-down":"","thumbs-up":"",thumbsdown:"",thumbsup:"","traffic-cone":"",trafficCone:"",trash:"",trashcan:"",tray:"","treasure-chest":"","trending-down":"","trending-up":"","triangle-small-down":"","triangle-small-left":"","triangle-small-right":"","triangle-small-up":"",twig:"","unfold-dashed":"",unlock:"",unmute:"",unverified:"",vault:"",verified:"",versions:"","video-camera":"",vm:"",vr:"","vr-headset":"","vr-headset-head":"",wallet:"",wand:"",warning:"",watch:"",waveform:"","whole-word":"",window:"","window-pointer-arrow":"",windows:"",wrench:"",x:"","x-circle":"",yarn:"",zap:"",zipper:"","zoom-in":"","zoom-out":"",zzz:""},H$=Object.keys(rN);function G$(e,t="outline"){return t==="filled"?q$[e]:rN[e]}const V$={root:{km0Bbg:"ui-ngwomw",$$css:!0}},W$=new Set(["ui-progress-spin","cursor-icon-spin"]);function K$(e){if(!(!e||typeof CSSAnimation>"u"))for(const t of e.getAnimations({subtree:!0}))t instanceof CSSAnimation&&W$.has(t.animationName)&&(t.startTime=0)}const My=v.createContext(void 0);function Ts({iconSize:e,iconButtonSize:t,iconButtonVariant:n,iconButtonTone:r,iconButtonRootStyle:s,iconButtonIconStyle:a,iconButtonIconSize:l,buttonSize:c,buttonRootStyle:d,buttonVariant:f,buttonTone:h,buttonIconSize:m,buttonRounded:b,buttonFullWidth:y,menuSize:k,disabled:S,children:R}){const T=v.useContext(My),E=v.useMemo(()=>({iconSize:e??T?.iconSize,iconButtonSize:t??T?.iconButtonSize,iconButtonVariant:n??T?.iconButtonVariant,iconButtonTone:r??T?.iconButtonTone,iconButtonRootStyle:s??T?.iconButtonRootStyle,iconButtonIconStyle:a??T?.iconButtonIconStyle,iconButtonIconSize:l??T?.iconButtonIconSize,buttonSize:c??T?.buttonSize,buttonRootStyle:d??T?.buttonRootStyle,buttonVariant:f??T?.buttonVariant,buttonTone:h??T?.buttonTone,buttonIconSize:m??T?.buttonIconSize,buttonRounded:b??T?.buttonRounded,buttonFullWidth:y??T?.buttonFullWidth,menuSize:k??T?.menuSize,disabled:S??T?.disabled}),[y,h,m,d,b,c,f,S,l,a,r,s,t,n,e,k,T]);return g.jsx(My.Provider,{value:E,children:R})}function ua(){return v.useContext(My)}const Y$="sm",X$=/(^|-)(left|right)(-|$)/,Z$=new Set(["history","link-external","list-bullets","list-ordered","quote","redo","return"]),Q$=new Set(H$.filter(e=>X$.test(e)||Z$.has(e))),Xt={base:{kKX8nH:"ui-1j61x8r",k63SB2:"ui-etm3q0",kGuDYH:"ui-1tachi3",kMv6JI:"ui-1qt6sjn",kLWn49:"ui-o5v014",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kMwMTN:"ui-1heor9g",kzqmXN:"ui-1oai4fc",kZKoxP:"ui-higkf7",kXLuUW:"ui-xymvpz",kMnn75:"ui-krqix3",kJwUce:"ui-1403hyl",k9WMMc:"ui-2b8uid",kP9fke:"ui-6mezaz",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",kfSwDN:"ui-87ps6o",kO7zv1:"ui-1winvzj","--icon-size":"ui-1u4itkb","--icon-weight":"ui-1q5xvfy",kQmYQc:"ui-1ehclkv",kgeoSG:"ui-1yj7g93",$$css:!0},noPresetSize:{$$css:!0},sizeXs:{"--icon-size":"ui-aiyo0p",$$css:!0},sizeSm:{"--icon-size":"ui-1u4itkb",$$css:!0},sizeBase:{"--icon-size":"ui-xfpx3u",$$css:!0},sizeLg:{"--icon-size":"ui-1qxde8p",$$css:!0},sizeXl:{"--icon-size":"ui-dyy2ci",$$css:!0},size2xl:{"--icon-size":"ui-7lg4th",$$css:!0},noColor:{$$css:!0},colorPrimary:{kMwMTN:"ui-1nqczng",$$css:!0},colorSecondary:{kMwMTN:"ui-1mh7f6w",$$css:!0},colorTertiary:{kMwMTN:"ui-1lbmi28",$$css:!0},colorQuaternary:{kMwMTN:"ui-1qh17o",$$css:!0},colorGitAdded:{kMwMTN:"ui-15wwr8d",$$css:!0},colorGitModified:{kMwMTN:"ui-eedwss",$$css:!0},colorGitRemoved:{kMwMTN:"ui-fowoju",$$css:!0},colorGitUntracked:{kMwMTN:"ui-1p7vtww",$$css:!0},colorCyan:{kMwMTN:"ui-1rbygr4",$$css:!0},colorBlue:{kMwMTN:"ui-101qeuz",$$css:!0},colorRed:{kMwMTN:"ui-ku4wcm",$$css:!0},colorGreen:{kMwMTN:"ui-p6nzhx",$$css:!0},colorSuccess:{kMwMTN:"ui-1qphcl",$$css:!0},colorDanger:{kMwMTN:"ui-yz91fk",$$css:!0},colorYellow:{kMwMTN:"ui-1hn9r2r",$$css:!0},colorMagenta:{kMwMTN:"ui-pwp9en",$$css:!0},colorOrange:{kMwMTN:"ui-4qtrdv",$$css:!0},colorPurple:{kMwMTN:"ui-1b0hn6l",$$css:!0},colorAccent:{kMwMTN:"ui-scuw3h",$$css:!0},colorBrand:{kMwMTN:"ui-v3vxec",$$css:!0},noModifier:{$$css:!0},modifierSpin:{kKVMdj:"ui-138fvbv",k44tkh:"ui-lmf4m6",kyAemX:"ui-1esw782",ko0y90:"ui-a4qsjk",$$css:!0},modifierDisabled:{kSiTet:"ui-ti2d7y",$$css:!0},modifierHidden:{k33iCy:"ui-lshs6z",$$css:!0},capTrim:{kQypYc:"ui-14ymb62",$$css:!0}};function J$(e,t,n){return[Xt.base,iN(e),e3(t),t3(n)]}function nx(e){return typeof e=="string"&&!e.startsWith("var(")}function iN(e){if(!nx(e))return Xt.noPresetSize;switch(e){case"xs":return Xt.sizeXs;case"sm":return Xt.sizeSm;case"base":return Xt.sizeBase;case"lg":return Xt.sizeLg;case"xl":return Xt.sizeXl;case"2xl":return Xt.size2xl}}function e3(e){switch(e){case"primary":return Xt.colorPrimary;case"secondary":return Xt.colorSecondary;case"tertiary":return Xt.colorTertiary;case"quaternary":return Xt.colorQuaternary;case"git-added":return Xt.colorGitAdded;case"git-modified":return Xt.colorGitModified;case"git-removed":return Xt.colorGitRemoved;case"git-untracked":return Xt.colorGitUntracked;case"cyan":return Xt.colorCyan;case"blue":return Xt.colorBlue;case"red":return Xt.colorRed;case"green":return Xt.colorGreen;case"success":return Xt.colorSuccess;case"danger":return Xt.colorDanger;case"yellow":return Xt.colorYellow;case"magenta":return Xt.colorMagenta;case"orange":return Xt.colorOrange;case"purple":return Xt.colorPurple;case"accent":return Xt.colorAccent;case"brand":return Xt.colorBrand;case void 0:return Xt.noColor}}function t3(e){switch(e){case"spin":return Xt.modifierSpin;case"disabled":return Xt.modifierDisabled;case"hidden":return Xt.modifierHidden;case void 0:return Xt.noModifier}}function n3(e){if(!(typeof e!="string"||e.length===0))return`"${e}"`}function Yt({name:e,modifier:t,syncSpin:n=!0,variant:r="outline",size:s,color:a,capTrim:l=!1,className:c,rootStyle:d,style:f,title:h,"aria-label":m,"aria-hidden":b,ref:y}){const k=ua(),S=v.useCallback(N=>{typeof y=="function"?y(N):y&&(y.current=N),N&&t==="spin"&&n&&K$(N)},[y,t,n]),R=s??k?.iconSize??Y$,T=nx(R),E=Ri()==="rtl"&&Q$.has(e),C=n3(G$(e,r)),_={...C?{"--cursor-icon-content":C}:{},...T?{}:{"--icon-size":typeof R=="number"?`${R}px`:R},...f},D=Kt({rootClass:"ui-icon",stylexStyles:[J$(R,a,t),E&&V$.root,l&&Xt.capTrim,d],className:nn("cursor-icon",c),style:_});return g.jsx("i",{ref:S,className:D.className,"data-icon-name":e,"data-size":T?R:void 0,"data-color":a,style:D.style,title:h??m,"aria-hidden":b??(m?void 0:!0)})}const r3=v.createContext({root:null});function ca(){return v.useContext(r3).root}const i3={dropdown:"--ui-portal-layer-z-index-dropdown",tooltip:"--ui-portal-layer-z-index-tooltip",modal:"--ui-portal-layer-z-index-modal",popover:"--ui-portal-layer-z-index-popover"},s3={},o3=3e3,a3=10;let nE=o3;function l3(){const e=nE;return nE+=a3,{zIndex:e,release:()=>{}}}const u3=v.createContext(null);function c3(){return v.useContext(u3)}function Dl(e,t){const n=c3(),[r,s]=v.useState(null);v.useLayoutEffect(()=>{if(!t){s(null);return}const l=n?.claimZIndex()??l3();return s(l.zIndex),()=>{l.release()}},[t,n]);const a=v.useMemo(()=>r===null?s3:{[i3[e]]:String(r)},[r,e]);return v.useMemo(()=>({zIndex:r,portalLayerStyles:a}),[r,a])}const rx=v.forwardRef(function(t,n){const{render:r,className:s,disabled:a=!1,focusableWhenDisabled:l=!1,nativeButton:c=!0,style:d,...f}=t,{getButtonProps:h,buttonRef:m}=Al({disabled:a,focusableWhenDisabled:l,native:c});return hn("button",t,{state:{disabled:a},ref:[n,m],props:[f,h]})}),sN={none:{kMzoRj:"ui-c342km",ksu8eU:"ui-ng3xce",kVAM5u:"ui-9r1u3d",$$css:!0},subtle:{kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kVAM5u:"ui-qz0629 ui-1njd9qq ui-8df9bq ui-1tkfsc1 ui-uv06hm",$$css:!0}},f3=["secondary","tertiary","accent","monochrome","success","warning","danger","git-added","git-modified","git-removed","git-untracked","plan"],d3=["accent","monochrome","success","danger","warning","plan","git-added","git-modified","git-removed","git-untracked"],p3=new Set(f3);new Set(d3);function h3(e){return e!==void 0&&p3.has(e)}const oN="accent",m3=["primary","secondary","media"],g3=["outline","ghost","text"],b3=new Set(m3),y3=new Set(g3);function v3(e){return b3.has(e)}function x3(e){return y3.has(e)}const k3=new Set(["accent","success","warning","danger","plan","git-added","git-modified","git-removed","git-untracked"]);function ix(e,t){const n=e==="secondary"&&h3(t)&&!k3.has(t);return{applyControlTone:e!=="secondary"||n,applyFilledColors:v3(e)&&!n,applyNonFilledBackground:x3(e)||n}}const sx={foreground:{"--ui-button-fg":"ui-1h31wig ui-qalphj ui-alrmhx ui-1e1xjh9 ui-1eont2s ui-qygd40 ui-1ucl2ju ui-4txb8k ui-xy4i2e ui-1y3ilr3 ui-1g9hv69 ui-1t2lbjw ui-1u8kle6 ui-7f1mz7 ui-cn7l2l ui-v6bjuk ui-17og37h ui-1mruliz ui-10ch5e ui-1xnt5ni ui-bcxwum","--ui-button-fg-hover":"ui-ve8a38 ui-572mpw ui-vp5bk3 ui-16shgaf ui-mjj3su ui-1v3oqsu ui-2ngaw7 ui-28dmf3",$$css:!0}},aN={secondary:{"--ui-button-fg":"ui-1j8p2m6","--ui-button-fg-hover":"ui-e6ovir",$$css:!0},tertiary:{"--ui-button-fg":"ui-1fwx157","--ui-button-fg-hover":"ui-111fdx3",$$css:!0},accent:{"--ui-button-fg":"ui-1f79f0m","--ui-button-fg-hover":"ui-orjwaf",$$css:!0},monochrome:{"--ui-button-fg":"ui-4zyimg","--ui-button-fg-hover":"ui-l1tqj1",$$css:!0},success:{"--ui-button-fg":"ui-gquhxt","--ui-button-fg-hover":"ui-10bqnq7",$$css:!0},warning:{"--ui-button-fg":"ui-1sxygwt","--ui-button-fg-hover":"ui-1bw7wxf",$$css:!0},danger:{"--ui-button-fg":"ui-3kwxde","--ui-button-fg-hover":"ui-1z0kkrr",$$css:!0},"git-added":{"--ui-button-fg":"ui-1atr7y6","--ui-button-fg-hover":"ui-18h1be3",$$css:!0},"git-modified":{"--ui-button-fg":"ui-hgltzh","--ui-button-fg-hover":"ui-2hn4cg",$$css:!0},"git-removed":{"--ui-button-fg":"ui-1c1bp8o","--ui-button-fg-hover":"ui-kk408f",$$css:!0},"git-untracked":{"--ui-button-fg":"ui-1fpy100","--ui-button-fg-hover":"ui-7ehido",$$css:!0},plan:{"--ui-button-fg":"ui-1c8nrdx","--ui-button-fg-hover":"ui-1by700s",$$css:!0}},S3={secondary:{"--ui-button-fg":"ui-zinbld","--ui-button-fg-hover":"ui-l1tqj1",$$css:!0},tertiary:{"--ui-button-fg":"ui-1mn641q","--ui-button-fg-hover":"ui-17wn194",$$css:!0}},xi={appearance:{kWkggS:"ui-elcf9h ui-g74ub2 ui-86fbs8",kMwMTN:"ui-gl2jp8 ui-qfdz8i",k1ekBW:"ui-fvdr79",kIyJzY:"ui-2krxs4 ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},press:{k3aq6I:"ui-3oybdh ui-e60hhf ui-1v3nhsv",k3nNDw:"ui-1g0ag68",$$css:!0},engaged:{kWkggS:"ui-1x1890e",kMwMTN:"ui-8ech78",$$css:!0},media:{k6WDB:"ui-1hvsj6t",kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kVAM5u:"ui-1aml6k",$$css:!0},colors:{"--ui-button-bg":"ui-111vzy2 ui-125v35v ui-4462wj ui-ln9km0 ui-htinfv ui-1tjgpey ui-1le2bn6 ui-1u2lfwm ui-186rrbs ui-uzems4 ui-302ab4 ui-18o3eha ui-1lf2xg1 ui-8nfnk1 ui-1a0cs8t ui-10ymqg5 ui-1xfuoz4 ui-1s4pfgv ui-1x5ih9k ui-1dph52k ui-18ab9qp","--ui-button-bg-hover":"ui-10ckxxq ui-10aqgsk ui-nikh4q ui-v0nv0s ui-m9yhoz ui-1hx6fzk ui-10w9v6x ui-1v87jpz ui-kcfunw ui-11g56iz ui-1kvkcw9 ui-43o616 ui-8plkn9 ui-1l8tdf5 ui-zytb9n ui-y212bs ui-jzkrsc ui-13b5mdj ui-n9k1sf ui-1v4rm0v ui-uontnf","--ui-button-fg":"ui-18rr0f6 ui-crn35x ui-1oum4wa ui-rwu1v7 ui-9sccad ui-z1osth ui-s45wth ui-13k0jm5 ui-1h8ruqd ui-gh4tnf ui-sop4tk ui-1o7cpox ui-d2q3b0 ui-pzfz8q","--ui-button-fg-hover":"ui-ve8a38",$$css:!0}},xl={background:{"--ui-button-bg":"ui-1gwrc9l ui-302ab4 ui-1luhpj5 ui-14iu9ww","--ui-button-bg-hover":"ui-s16ggv ui-1kvkcw9 ui-hqa6pe ui-e032zu",$$css:!0},outline:{kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kVAM5u:"ui-13747pv",$$css:!0}},lN=["success","warning","danger","plan","git-added","git-modified","git-removed","git-untracked"],w3=new Set(lN);function uN(e){return e!==void 0&&w3.has(e)}const E3=["accent",...lN],T3=new Set(E3);function cN(e){return e!==void 0&&T3.has(e)}const fN={success:{"--ui-button-bg-hover":"ui-1tdt9ah",$$css:!0},warning:{"--ui-button-bg-hover":"ui-1feq7lt",$$css:!0},danger:{"--ui-button-bg-hover":"ui-1filpbt",$$css:!0},plan:{"--ui-button-bg-hover":"ui-2jb78i",$$css:!0},"git-added":{"--ui-button-bg-hover":"ui-1bw414x",$$css:!0},"git-modified":{"--ui-button-bg-hover":"ui-1hxpt55",$$css:!0},"git-removed":{"--ui-button-bg-hover":"ui-137iwle",$$css:!0},"git-untracked":{"--ui-button-bg-hover":"ui-1bf1sw5",$$css:!0}},dN={accent:{kVAM5u:"ui-5r2jki",$$css:!0},success:{kVAM5u:"ui-1gvt79p",$$css:!0},warning:{kVAM5u:"ui-1cucnr7",$$css:!0},danger:{kVAM5u:"ui-105evjg",$$css:!0},plan:{kVAM5u:"ui-1cucnr7",$$css:!0},"git-added":{kVAM5u:"ui-1y8sze9",$$css:!0},"git-modified":{kVAM5u:"ui-1wu7fly",$$css:!0},"git-removed":{kVAM5u:"ui-1b3t4f7",$$css:!0},"git-untracked":{kVAM5u:"ui-pop0y2",$$css:!0}},R3={rowActive:{k1xSpc:"ui-1s85apg ui-i8sxwt ui-14aajud ui-1gue9j1",kmuXW:"ui-2lah0s",$$css:!0}},pN={always:null,rowActive:R3.rowActive},ox={root:{kFalU9:"ui-ggy1nq",kSiTet:"ui-1szrgyu",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-7s97pk",kjBf7l:"ui-1uczgqu ui-1725o6r",$$css:!0}},C3={root:{kB7OPa:"ui-9f619",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-1qlqyl8",kLWn49:"ui-15bjb6t",kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kVAM5u:"ui-9r1u3d",kkrTdU:"ui-1ypdohk ui-1j1ks5o",kSiTet:"ui-1hc1fzr",kfzvcC:"ui-67bb7w ui-7gqb9v",$$css:!0}},hN={root:[C3.root,ox.root]},_d={sm:{kaIpWk:"ui-1e1y6u3",$$css:!0},md:{kaIpWk:"ui-1043rbw",$$css:!0},lg:{kaIpWk:"ui-1043rbw",$$css:!0},xl:{kaIpWk:"ui-1043rbw",$$css:!0}},ji={sm:{kZKoxP:"ui-1a6rlst",$$css:!0},md:{kZKoxP:"ui-1e94bgo",$$css:!0},lg:{kZKoxP:"ui-170hpbr",$$css:!0},xl:{kZKoxP:"ui-t8t6p",$$css:!0}},mN={root:{kGuDYH:"ui-y5h43f",kLWn49:"ui-19ji09o",kb6lSQ:"ui-t1j8c4",$$css:!0}},Rs={root:{kGuDYH:"ui-1wm8ruf",kLWn49:"ui-spwq11",kb6lSQ:"ui-14s4slr",$$css:!0}},Fi={root:{kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-vu1jfw",$$css:!0}},gN={root:{kGuDYH:"ui-fc7y3v",kLWn49:"ui-1yxxptd",kb6lSQ:"ui-1bignsj",$$css:!0}},_3={root:{kGuDYH:"ui-19d36u7",kLWn49:"ui-dod15v",kb6lSQ:"ui-k22nv0",$$css:!0}},N3={root:{kGuDYH:"ui-wsyq91",kLWn49:"ui-19v9tvf",kb6lSQ:"ui-1h56xvc",$$css:!0}},A3={root:{kGuDYH:"ui-1i1m3gp",kLWn49:"ui-eqr9p9",kb6lSQ:"ui-qhv51x",$$css:!0}},Ll={root:{kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",$$css:!0}},ax={root:{khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0}},ju={root:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kOIVth:"ui-11twubx",k63SB2:"ui-20ajya",khDVqt:"ui-uxw1ft","--ui-md-state-color":"ui-1w18epr",kfSwDN:"ui-87ps6o",k9WMMc:"ui-2b8uid",$$css:!0},alignLeft:{kjj79g:"ui-1nhvcw1",$$css:!0},fullWidth:{kzqmXN:"ui-h8yej3",$$css:!0},frameContent:{kZCmMZ:"ui-1c1uobl",kwRFfy:"ui-yri2b",$$css:!0},shapePill:{kaIpWk:"ui-1i4c3av",$$css:!0}},Nd={sm:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-1tlft3r",kGO01o:"ui-18d9i69",kZCmMZ:"ui-tw3t59",$$css:!0},md:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-19bzwdx",kGO01o:"ui-18d9i69",kZCmMZ:"ui-v853mj",kOIVth:"ui-11twubx",$$css:!0},lg:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-196pc8s",kGO01o:"ui-18d9i69",kZCmMZ:"ui-22095l",kOIVth:"ui-pkkfsy",$$css:!0},xl:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-1fg0g13",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1tajz9i",$$css:!0}},O3={sm:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-196pc8s",kGO01o:"ui-18d9i69",kZCmMZ:"ui-22095l",$$css:!0},md:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-1fg0g13",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1tajz9i",$$css:!0},lg:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-t1q3vd",kGO01o:"ui-18d9i69",kZCmMZ:"ui-8fiw5y",$$css:!0},xl:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-1n9uuka",kGO01o:"ui-18d9i69",kZCmMZ:"ui-cssynl",$$css:!0}},rE={labelGroup:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",$$css:!0},kbs:{kMv6JI:"ui-y1aii3",k63SB2:"ui-20ajya",kSiTet:"ui-byyjgo ui-s6mkfk",$$css:!0}},yi={root:[hN.root,ju.root],fontSmoothing:ax.root,align:{center:null,left:ju.alignLeft},fullWidth:ju.fullWidth,frame:{container:null,content:ju.frameContent},shape:{pill:ju.shapePill},size:{sm:[ji.sm,_d.sm,Nd.sm],md:[ji.md,_d.md,Nd.md],lg:[ji.lg,_d.lg,Nd.lg],xl:[ji.xl,_d.xl,Nd.xl]},pillSize:O3,typography:{sm:Fi.root,md:Fi.root,lg:Fi.root,xl:gN.root},labelGroup:rE.labelGroup,kbs:[Rs.root,rE.kbs]},bN={sm:"sm",md:"sm",lg:"base",xl:"lg"};function M3({rounded:e,variant:t,enforcedRounded:n}){return e!==void 0?e:t==="text"?!1:n===!0}const I3="md",D3=bN,L3={"ui--default-marker":"ui--default-marker",$$css:!0};function gn({variant:e,tone:t,border:n,size:r,iconSize:s,rounded:a,frame:l="container",reveal:c="always",align:d,fullWidth:f,disabled:h,children:m,kbs:b,kbsStyle:y,labelGroupStyle:k,pressed:S,className:R,style:T,rootStyle:E,"aria-expanded":C,"aria-pressed":_,...D}){const N=ua(),A=e??N?.buttonVariant??"secondary",$=r??N?.buttonSize??I3,z=M3({enforcedRounded:N?.buttonRounded,rounded:a,variant:A}),I=f??N?.buttonFullWidth??!1,Y=h??N?.disabled,H=t??(A==="primary"||A==="ghost"?N?.buttonTone:void 0),q=H??(A==="primary"?oN:void 0),L=s??N?.buttonIconSize??D3[$],F=D["data-pressed"],U=ix(A,H),W=jt(yi.root,yi.fontSmoothing,xi.appearance,U.applyControlTone&&sx.foreground,U.applyControlTone&&H!==void 0&&aN[H],U.applyFilledColors&&xi.colors,U.applyNonFilledBackground&&xl.background,(A==="outline"||A==="ghost")&&uN(H)&&fN[H],A==="outline"&&xl.outline,A==="outline"&&cN(H)&&dN[H],A==="media"&&xi.media,n&&sN[n],pN[c],S===!0&&xi.engaged,yi.size[$],yi.typography[$],yi.align[d??"center"],I&&yi.fullWidth,z&&yi.shape.pill,z&&yi.pillSize[$],yi.frame[l],N?.buttonRootStyle,E,L3);let B=m;if(b!=null){const K=jt(yi.labelGroup,k),O=jt(yi.kbs,y);B=g.jsxs("span",{className:nn("ui-button__label-group",K.className),style:K.style,children:[m,g.jsx("span",{className:nn("ui-button__kbs",O.className),style:O.style,children:b})]})}return g.jsx(rx,{...D,"aria-expanded":C,"aria-pressed":C===void 0&&S!==void 0?S:_,className:nn("ui-button",W.className,R),style:{...W.style,...T},"data-variant":A,"data-size":$,"data-rounded":z||void 0,"data-frame":l!=="container"?l:void 0,"data-border":n,"data-tone":q,"data-align":d==="left"?d:void 0,"data-full-width":I||void 0,"data-reveal":c!=="always"?c:void 0,"data-pressed":S!==void 0?String(S):F,disabled:Y,children:g.jsx(Ts,{iconSize:L,children:B})})}function Uc(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function kl({controlled:e,default:t,name:n,state:r="value"}){const{current:s}=v.useRef(e!==void 0),[a,l]=v.useState(t),c=s?e:a,d=v.useCallback(f=>{s||l(f)},[]);return[c,d]}let iE=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.indeterminate="data-indeterminate",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({}),sE=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const j3={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Qu={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},z3={disabled:!1,...Qu},qc={valid(e){return e===null?null:e?{[sE.valid]:""}:{[sE.invalid]:""}}};function P3(e){return v.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[iE.checked]:""}:{[iE.unchecked]:""}},...qc}),[e.indeterminate])}const $3={invalid:void 0,name:void 0,validityData:{state:j3,errors:[],error:"",value:"",initialValue:null},setValidityData:Vn,disabled:void 0,touched:Qu.touched,setTouched:Vn,dirty:Qu.dirty,setDirty:Vn,filled:Qu.filled,setFilled:Vn,focused:Qu.focused,setFocused:Vn,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:z3,markedDirtyRef:{current:!1},registerFieldControl:Vn,validation:{getValidationProps:(e,t=jn)=>t,inputRef:{current:null},registerInput:Vn,commit:async()=>{},change:Vn}},B3=v.createContext($3);function kh(e=!0){const t=v.useContext(B3);if(t.setValidityData===Vn&&!e)throw new Error(Nn(28));return t}function yN(e,t,n,r,s=!0,a){const{registerFieldControl:l}=kh(),c=v.useRef(null);c.current||(c.current=Symbol()),Ge(()=>{const d=c.current;return!d||!s?void 0:(l(d,{controlRef:e,getValue:r,id:t,name:a,value:n}),()=>{l(d,void 0)})},[e,s,r,t,a,l,n])}const F3=v.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Vn,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function vN(){return v.useContext(F3)}const U3=v.createContext({controlId:void 0,registerControlId:Vn,labelId:void 0,setLabelId:Vn,messageIds:[],setMessageIds:Vn,getDescriptionProps:e=>e});function lx(){return v.useContext(U3)}const q3=v.createContext(void 0);function H3(){const e=v.useContext(q3);if(e===void 0)throw new Error(Nn(14));return e}const G3=v.forwardRef(function(t,n){const{render:r,className:s,style:a,keepMounted:l=!1,...c}=t,d=H3(),f=d.checked||d.indeterminate,{mounted:h,transitionStatus:m,setMounted:b}=Fc(f),y=v.useRef(null),k={...d,transitionStatus:m};xo({open:f,ref:y,onComplete(){f||b(!1)}});const R={...P3(d),...go,...qc},T=l||h,E=hn("span",t,{ref:[n,y],state:k,stateAttributesMapping:R,props:c});return T?E:null}),V3="md",oE={root:{kVAEAm:"ui-1n2onr6",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kB7OPa:"ui-9f619",kMeerF:"ui-1k57tk5 ui-1gv1zob",k3XXqK:"ui-1t137rt ui-1rsevuf",kjBf7l:"ui-1uczgqu ui-14qs42y",kInvED:"ui-1wfwxd8 ui-1i57s2w",kSiTet:"ui-1hc1fzr ui-1goyyu5",kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kaIpWk:"ui-1e1y6u3",kMwMTN:"ui-1lriclw",kWkggS:"ui-i07v4r ui-190xqy7",kVAM5u:"ui-1tjqsyf ui-14ytyh1",k3aq6I:"ui-3oybdh ui-78fr0e",k3nNDw:"ui-1g0ag68",k1ekBW:"ui-1lxufdw",kIyJzY:"ui-2krxs4 ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},sm:{kzqmXN:"ui-2s4hoy",kZKoxP:"ui-px1j5t",$$css:!0},md:{kzqmXN:"ui-ek66a6",kZKoxP:"ui-1q5geii",$$css:!0},lg:{kzqmXN:"ui-1xx3ewh",kZKoxP:"ui-14dyci",$$css:!0}},W3={primary:{"--ui-checkbox-bg":"ui-x0sf4j","--ui-checkbox-border":"ui-14p436a","--ui-checkbox-glyph":"ui-1d5945d",$$css:!0},green:{"--ui-checkbox-bg":"ui-1g72fie","--ui-checkbox-border":"ui-165ap9x","--ui-checkbox-glyph":"ui-1d5945d",$$css:!0},neutral:{"--ui-checkbox-bg":"ui-1rpsy8r","--ui-checkbox-border":"ui-mtpsoh","--ui-checkbox-glyph":"ui-qnctk6",$$css:!0}},K3={sm:9,md:10,lg:11},aE={"--icon-weight":"700"};function Y3({indeterminate:e,interactive:t,size:n,variant:r}){const s=jt(oE.root,oE[n],W3[r]),a={className:"ui-10l6tqk ui-10a8y8t ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1g0ag68 ui-n9if97 ui-7pq1vu ui-sagj69 ui-6ekqhr ui-g01cxk ui-hhdk15 ui-nyzrob ui-h98lc ui-1nrvvgt ui-cntms"},l=K3[n];return g.jsx("span",{"aria-hidden":"true",className:nn("ui-checkbox__box",s.className),style:s.style,children:t?g.jsx(G3,{className:nn("ui-checkbox__icon",a.className),keepMounted:!0,render:(c,d)=>g.jsx("span",{...c,children:g.jsx(Yt,{name:d.indeterminate?"minus":"check",size:l,style:aE})}),style:a.style}):g.jsx("span",{className:nn("ui-checkbox__icon",a.className),style:a.style,children:g.jsx(Yt,{name:e?"minus":"check",size:l,style:aE})})})}function xN({checked:e,disabled:t,indeterminate:n=!1,size:r=V3,variant:s="primary"}){const a={className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1c4vz4f ui-2lah0s ui-dl72j9 ui-xymvpz ui-47corl ui--default-marker"};return g.jsx("span",{"aria-hidden":"true",className:nn("ui-checkbox",a.className),style:a.style,"data-component":"checkbox","data-size":r,"data-variant":s,"data-checked":e||void 0,"data-disabled":t||void 0,"data-indeterminate":n||void 0,children:g.jsx(Y3,{indeterminate:n,interactive:!1,size:r,variant:s})})}function X3(e,t,n=(r,s)=>r===s){return e.length===t.length&&e.every((r,s)=>n(r,t[s]))}function Z3(e){const{open:t,defaultOpen:n,onOpenChange:r,disabled:s}=e,[a,l]=kl({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:c,setMounted:d,transitionStatus:f}=Fc(a,!0,!0),h=Ml(),[m,b]=v.useState(),y=m??h,k=We(S=>{const R=!a,T=xt(Ol,S.nativeEvent);r(R,T),!T.isCanceled&&l(R)});return v.useMemo(()=>({disabled:s,handleTrigger:k,mounted:c,open:a,panelId:y,setMounted:d,setOpen:l,setPanelIdState:b,transitionStatus:f}),[s,k,c,a,y,d,l,b,f])}const kN=v.createContext(void 0);function SN(){const e=v.useContext(kN);if(e===void 0)throw new Error(Nn(15));return e}let ux=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Jo.startingStyle]="startingStyle",e[e.endingStyle=Jo.endingStyle]="endingStyle",e})({}),Q3=(function(e){return e.panelOpen="data-panel-open",e})({});const J3={[ux.open]:""},e6={[ux.closed]:""},t6={open(e){return e?{[Q3.panelOpen]:""}:null}},n6={open(e){return e?J3:e6}},wN={...n6,...go},r6=v.forwardRef(function(t,n){const{render:r,className:s,defaultOpen:a=!1,disabled:l=!1,onOpenChange:c,open:d,style:f,...h}=t,m=We(c),b=Z3({open:d,defaultOpen:a,onOpenChange:m,disabled:l}),y=v.useMemo(()=>({open:b.open,disabled:b.disabled,transitionStatus:b.transitionStatus}),[b.open,b.disabled,b.transitionStatus]),k=v.useMemo(()=>({...b,onOpenChange:m,state:y}),[b,m,y]),S=hn("div",t,{state:y,ref:n,props:h,stateAttributesMapping:wN});return g.jsx(kN.Provider,{value:k,children:S})}),i6={...t6,...go},lE=v.forwardRef(function(t,n){const{panelId:r,open:s,handleTrigger:a,state:l,disabled:c}=SN(),{className:d,disabled:f=c,render:h,nativeButton:m=!0,style:b,...y}=t,{getButtonProps:k,buttonRef:S}=Al({disabled:f,focusableWhenDisabled:!0,native:m});return hn("button",t,{state:l,ref:[n,S],props:[{"aria-controls":s?r:void 0,"aria-expanded":s,onClick:a},y,k],stateAttributesMapping:i6})}),zu={height:void 0,width:void 0};function s6(e){const{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:s,mounted:a,onOpenChange:l,open:c,setMounted:d,setOpen:f,transitionStatus:h}=e,m=v.useRef(null),b=v.useRef(null),[y,k]=v.useState(zu),S=v.useRef(zu),R=v.useRef(!1),T=v.useRef(c),E=v.useRef(!1),[C,_]=v.useState(!1),D=v.useRef(null),N=co(t,m),A=_n({mounted:a,open:c}),$=D_(m,!1,!1),z=!c&&!a,I=C?"idle":h,Y=c&&(T.current||E.current),H=!c&&a&&b.current==="css-animation"&&y.height===void 0&&y.width===void 0?S.current:y,q=n&&z&&b.current!=="css-animation",L=We((K,O=!0)=>{O&&(S.current=K),k(K)}),F=We(()=>{D.current?.(),D.current=null}),U=We(K=>{F(),D.current=()=>{D.current=null,K()}}),W=We(()=>{c&&a&&b.current==="css-animation"&&(E.current=!0)});Ge(()=>{!C||h==="starting"||_(!1)},[C,h]),v.useEffect(()=>()=>{W(),F()},[W,F]),Ge(()=>{const K=m.current;if(!K)return;!c&&D.current&&F();const O=o6(K,Y);if(b.current=O,c&&h==="idle"&&T.current&&O==="css-animation"){S.current=Xa(K);return}if(c&&h==="starting"){const j=R.current;if(R.current=!1,O==="none"){L(Xa(K)),_(!0);return}if(O==="css-transition"){const Z=a6(K);if(L(Xa(K)),!j)return Z;const te=Pu(K,"transition-duration","0s");return U(te),_(!0),Z}if(O==="css-animation"){if(L(Xa(K)),!j){Pu(K,"animation-name","none")();return}const Z=Pu(K,"animation-name","none"),te=Pu(K,"animation-duration","0s");Z(),U(te),_(!0);return}}if(!c&&a&&(h==="idle"||h==="starting")){if(T.current=!1,E.current=!1,O==="none"){L(zu,!1),d(!1);return}L(Xa(K));return}if(h!=="ending")return;if(O==="none"){d(!1);return}const P=Xa(K);if(!((P.height??0)>0||(P.width??0)>0)){d(!1);return}L(P),O==="css-animation"&&Pu(K,"animation-name","none")()},[a,c,F,L,d,U,Y,h]),xo({enabled:c&&a&&I==="idle",open:!0,ref:m,onComplete(){c&&L(zu,!1)}}),v.useEffect(()=>{if(c||!a||I!=="ending"||!m.current)return;const O=new AbortController;let P=-1;function V(){A.current.open||(d(!1),L(zu,!1))}return P=Ar.request(()=>{O.signal.aborted||$(V,O.signal)}),()=>{Ar.cancel(P),O.abort()}},[A,a,c,I,$,L,d]),Ge(()=>{const K=m.current;!K||!n||!z||K.setAttribute("hidden","until-found")},[z,n]),v.useEffect(function(){const O=m.current;if(!O)return;function P(V){const j=xt(Si,V);l(!0,j),!j.isCanceled&&(R.current=!0,f(!0))}return It(O,"beforematch",P)},[l,f]);const B=s||n||a||c;return{height:H.height,props:{...q?{[ux.startingStyle]:""}:void 0,hidden:z,id:r},ref:N,shouldPreventOpenAnimation:Y,shouldRender:B,transitionStatus:I,width:H.width}}function Xa(e){return{height:e.scrollHeight,width:e.scrollWidth}}function o6(e,t=!1){const n=kn(e).getComputedStyle(e),r=(n.animationName.split(",").map(a=>a.trim()).some(a=>a!==""&&a!=="none")||t)&&uE(n.animationDuration),s=uE(n.transitionDuration);return r&&s||s?"css-transition":r?"css-animation":"none"}function uE(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function Pu(e,t,n){const r=e.style.getPropertyValue(t),s=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===""){e.style.removeProperty(t);return}e.style.setProperty(t,r,s)}}function a6(e){const t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(s=>{e.style.setProperty(s,"initial","important")});function n(){Object.entries(t).forEach(([s,a])=>{if(a===""){e.style.removeProperty(s);return}e.style.setProperty(s,a)})}const r=Ar.request(n);return()=>{Ar.cancel(r),n()}}let cE=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});const l6=v.forwardRef(function(t,n){const{className:r,hiddenUntilFound:s,keepMounted:a,render:l,id:c,style:d,...f}=t,{mounted:h,onOpenChange:m,open:b,panelId:y,setMounted:k,setPanelIdState:S,setOpen:R,state:T,transitionStatus:E}=SN(),C=s??!1,_=a??!1;Ge(()=>{if(c)return S(c),()=>{S(void 0)}},[c,S]);const{height:D,props:N,ref:A,shouldPreventOpenAnimation:$,shouldRender:z,transitionStatus:I,width:Y}=s6({externalRef:n,hiddenUntilFound:C,id:y,keepMounted:_,mounted:h,onOpenChange:m,open:b,setMounted:k,setOpen:R,transitionStatus:E}),H={...T,transitionStatus:I},q=DC(d,H),L=hn("div",{...t,style:void 0},{state:H,ref:A,props:[N,{style:{[cE.collapsiblePanelHeight]:D===void 0?"auto":`${D}px`,[cE.collapsiblePanelWidth]:Y===void 0?"auto":`${Y}px`}},f,q?{style:q}:void 0,$?{style:{animationName:"none"}}:void 0],stateAttributesMapping:wN});return z?L:null}),u6={root:{kKwaWg:"ui-c079w9 ui-phioz4",kgSjnq:"ui-akli9p",kHypHr:"ui-1ta4xzc ui-15mlgz9",kBahZS:"ui-1t23j8t ui-nqxwjk",kUisrP:"ui-g7jpbn ui-1xgngqn",kKVMdj:"ui-1dtn8og ui-1aquc0h",k44tkh:"ui-1q3qbx4",kyAemX:"ui-1esw782",ko0y90:"ui-a4qsjk",$$css:!0}},c6={inherit:{"--ui-text-shimmer-base":"ui-1ptom83","--ui-text-shimmer-highlight":"ui-rxqqkw",$$css:!0},primary:{kMwMTN:"ui-1wd3ewq","--ui-text-shimmer-base":"ui-cf8467","--ui-text-shimmer-highlight":"ui-17vhta",$$css:!0},secondary:{kMwMTN:"ui-19aaqeu","--ui-text-shimmer-base":"ui-1dl6blw","--ui-text-shimmer-highlight":"ui-17vhta",$$css:!0},tertiary:{kMwMTN:"ui-4b2ntj","--ui-text-shimmer-base":"ui-3zfljf","--ui-text-shimmer-highlight":"ui-1ph1pus",$$css:!0}};function EN(e){return[u6.root,c6[e]]}const f6={"ui--default-marker":"ui--default-marker",$$css:!0};function TN(e){return e==="default"?"secondary":"tertiary"}const Ho={base:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kfSwDN:"ui-87ps6o",kOIVth:"ui-11twubx",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",kGuDYH:"ui-hwpfco",kLWn49:"ui-1bcdmom",$$css:!0},buttonReset:{kWkggS:"ui-jbqb8w",kMzoRj:"ui-c342km",ksu8eU:"ui-ng3xce",kLKAdn:"ui-exx8yu",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1c1uobl",kwRFfy:"ui-yri2b",keoZOQ:"ui-dj266r",k1K539:"ui-at24cr",keTefX:"ui-1lziwak",k71WvV:"ui-14z9mp",kMv6JI:"ui-jb2p0i",k63SB2:"ui-1pd3egz",kMwMTN:"ui-1heor9g",k9WMMc:"ui-1yc453h",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-1bqaal",kjBf7l:"ui-1uczgqu ui-1725o6r",$$css:!0},presentational:{kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",$$css:!0},clickable:{kkrTdU:"ui-1ypdohk",$$css:!0},disabled:{kSiTet:"ui-byyjgo",$$css:!0},detailsButton:{ks0D6T:"ui-193iq5w",kVQacm:"ui-b3r6kr",kkrTdU:"ui-1ypdohk",kMnn75:"ui-ujl8zx",k1TLXF:"ui-r5o5jz ui-9ojkr9 ui-1e7jyuc",k1ekBW:"ui-eirdtl",kIyJzY:"ui-7pq1vu ui-6xbvzw ui-1nk6rg0",kAMwcw:"ui-1bt1wk1",kg5iWk:"ui-lyipyv",khDVqt:"ui-uxw1ft",$$css:!0}},vb={base:{kmuXW:"ui-2lah0s",kMwMTN:"ui-19aaqeu ui-1dkqrid",k63SB2:"ui-20ajya",k1ekBW:"ui-t3l3uh",kIyJzY:"ui-7pq1vu",kAMwcw:"ui-1bt1wk1",$$css:!0},muted:{kMwMTN:"ui-4b2ntj ui-1uq8sgy",$$css:!0},tabularNums:{kcqcaj:"ui-ss6m8b",$$css:!0}};function d6({action:e,chevronRef:t,details:n,detailsRef:r,leadingIcon:s,loading:a,shimmerDetails:l,showChevron:c,tabularNums:d,tone:f}){const h=jt(vb.base,(f==="muted"||f==="tertiary")&&vb.muted,d&&vb.tabularNums,a&&!l&&EN(TN(f))),m={0:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-4b2ntj ui-qdr9cq ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1"},2:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1e4uaio ui-116yoyw"},1:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-4b2ntj ui-qdr9cq ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-ss6m8b"},3:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1e4uaio ui-116yoyw ui-ss6m8b"}}[(f==="muted")<<1|!!d<<0],b={className:"ui-2lah0s ui-fdlg0y ui-1urst0s ui-1lbmi28 ui-18tq7xr ui-g01cxk ui-bthccv ui-7p49u4 ui-1tty4wy ui-p33vsb ui-4f0zl0 ui-93pzih ui-1bt1wk1"},y={className:"ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui-14ju556 ui-1urst0s"};return g.jsxs(g.Fragment,{children:[s!=null&&g.jsx("span",{className:nn("ui-collapsible-leading-icon",y.className),style:y.style,children:s}),e!=null&&g.jsx("span",{className:nn("ui-collapsible-action",h.className),style:h.style,children:e}),n&&g.jsx("span",{ref:r,className:nn("ui-collapsible-details",m.className),style:m.style,children:n}),c&&g.jsx(Yt,{ref:t,name:"chevron-right",className:nn("ui-collapsible-chevron",b.className),style:b.style,size:"sm"})]})}function pi({action:e,details:t,onDetailsClick:n,detailsButtonStyle:r,headerStyle:s,leadingIcon:a,disabled:l=!1,expandable:c=!0,loading:d=!1,shimmerDetails:f=!0,tabularNums:h=!1,tone:m="default",children:b,headerRef:y,detailsRef:k,chevronRef:S,className:R,contentClassName:T,open:E,defaultOpen:C,onOpenChange:_,...D}){const N=n!==void 0,A=c&&N,$=E!==void 0,[z,I]=v.useState(()=>C??!1),Y=$?!!E:z,H=(Z,te)=>{$||I(Z),_?.(Z,te)},q=N?g.jsx("button",{type:"button",...jt(Ho.buttonReset,Ho.detailsButton,r),disabled:l,onClick:Z=>{Z.stopPropagation(),n(Z)},children:t}):t,L=c&&b!=null&&typeof b!="boolean",F={className:"ui-78zum5 ui-dt5ytf"},U=jt(Ho.base,c&&!N?Ho.buttonReset:Ho.presentational,c&&!l&&Ho.clickable,l&&Ho.disabled,d&&f&&EN(TN(m)),f6,s),W={0:{className:"ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui--default-marker"},1:{className:"ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-1ypdohk ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui--default-marker"}}[!l<<0],B={className:"ui-2lah0s ui-fdlg0y ui-1urst0s ui-1lbmi28 ui-18tq7xr ui-7p49u4 ui-1tty4wy ui-p33vsb ui-4f0zl0 ui-93pzih ui-1bt1wk1 ui-1hc1fzr"},K={className:"ui-1lliihq ui-1kd3hbs ui-uan8c8 ui-1fe7yth ui-12wejat ui-6ikm8r ui-10wlt62 ui-pv8u57 ui-ua3uq3 ui-4wkmsb ui-g3p6pi ui-ptf4uz"},O={className:"ui-6ikm8r ui-10wlt62 ui-2lwn1j"},P={className:"ui-78zum5 ui-dt5ytf ui-1y48gol ui-1vdilah ui-1hc1fzr ui-19991ni ui-4wkmsb ui-g3p6pi ui-1bt1wk1"},V={"data-component":"collapsible-header",className:nn("ui-collapsible-header",U.className),style:U.style},j=g.jsx(d6,{action:e,chevronRef:S,details:q,detailsRef:k,leadingIcon:a,loading:d,shimmerDetails:f,showChevron:c&&!N,tabularNums:h,tone:m});return g.jsxs(r6,{...D,open:A?Y:E,defaultOpen:A?void 0:C,onOpenChange:A?H:_,disabled:l,"data-expandable":c?"":void 0,"data-loading":d?"":void 0,"data-tone":m,className:nn("ui-collapsible",F.className,R),style:F.style,children:[A?g.jsxs("div",{...V,ref:y,onClick:()=>{l||H(!Y)},children:[j,g.jsx(lE,{"data-component":"collapsible-header","aria-label":typeof t=="string"?`Toggle ${t}`:"Toggle details",className:W.className,style:W.style,...L?null:{"aria-controls":void 0},onClick:Z=>{l||Z.stopPropagation()},children:g.jsx(Yt,{ref:S,name:"chevron-right",className:nn("ui-collapsible-chevron",B.className),style:B.style,size:"sm"})})]}):c?g.jsx(lE,{...V,ref:y,...L?null:{"aria-controls":void 0},onClick:Z=>{l||Z.stopPropagation()},children:j}):g.jsx("div",{...V,ref:y,children:j}),L&&g.jsx(l6,{keepMounted:!0,className:nn("ui-collapsible-content-view",K.className),style:K.style,children:g.jsx("div",{className:O.className,style:O.style,children:g.jsx("div",{className:nn("ui-collapsible-content",P.className,T),style:P.style,children:b})})})]})}const p6=(e,t)=>Object.is(e,t);function na(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function h6(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:na(t,r,n))}function oc(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:na(r,t,n))}function m6(e,t,n){return e.filter(r=>!na(t,r,n))}function Iy(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function RN(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function g6(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(RN(t)){for(const n of t)for(const r of n.items)if(r&&r.value==null&&r.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function CN(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return Iy(e)}function Vo(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Iy(e.value):Iy(e)}function _N(e,t,n){function r(){return CN(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){const s=t,a=RN(s)?s.flatMap(l=>l.items):s;if(e==null||typeof e!="object"){const l=a.find(c=>c.value===e);return l&&l.label!=null?l.label:r()}if("value"in e){const l=a.find(c=>c&&c.value===e.value);if(l&&l.label!=null)return l.label}}return r()}function b6(e,t,n){return e.reduce((r,s,a)=>(a>0&&r.push(", "),r.push(g.jsx(v.Fragment,{children:_N(s,t,n)},a)),r),[])}function cx(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:s,registerControlId:a}=lx(),l=Ml(t),c=n?s:void 0,d=Ir(()=>Symbol("labelable-control")),f=v.useRef(!1),h=v.useRef(t!=null),m=We(()=>{!f.current||a===Vn||(f.current=!1,a(d.current,void 0))});return Ge(()=>{if(a===Vn)return;let b;if(n){const y=r?.current;ft(y)&&y.closest("label")!=null?b=t??null:b=c??l}else if(t!=null)h.current=!0,b=t;else if(h.current)b=l;else{m();return}if(b===void 0){m();return}f.current=!0,a(d.current,b)},[t,r,c,a,n,l,d,m]),v.useEffect(()=>m,[m]),s??l}function y6(e,t){return e??t}function v6(e){const t=e.getBoundingClientRect(),n=kn(e);if(Lv)return t;const r=n.getComputedStyle(e,"::before"),s=n.getComputedStyle(e,"::after");if(!(r.content!=="none"||s.content!=="none"))return t;const l=parseFloat(r.width)||0,c=parseFloat(r.height)||0,d=parseFloat(s.width)||0,f=parseFloat(s.height)||0,h=Math.max(t.width,l,d),m=Math.max(t.height,c,f),b=h-t.width,y=m-t.height;return{left:t.left-b/2,right:t.right+b/2,top:t.top-y/2,bottom:t.bottom+y/2}}const NN=v.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function x6(){return v.useContext(NN)}function fx(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:s}=e,a=We(s),l=v.useRef(0),c=Ir(S6).current,d=Ir(k6).current,[f,h]=v.useState(0),m=v.useRef(f),b=We((T,E)=>{d.set(T,E??null),m.current+=1,h(m.current)}),y=We(T=>{d.delete(T),m.current+=1,h(m.current)}),k=v.useMemo(()=>{const T=new Map;return Array.from(d.keys()).filter(C=>C.isConnected).sort(w6).forEach((C,_)=>{const D=d.get(C)??{};T.set(C,{...D,index:_})}),T},[d,f]);Ge(()=>{if(typeof MutationObserver!="function"||k.size===0)return;const T=new MutationObserver(E=>{const C=new Set,_=D=>C.has(D)?C.delete(D):C.add(D);E.forEach(D=>{D.removedNodes.forEach(_),D.addedNodes.forEach(_)}),C.size===0&&(m.current+=1,h(m.current))});return k.forEach((E,C)=>{C.parentElement&&T.observe(C.parentElement,{childList:!0})}),()=>{T.disconnect()}},[k]),Ge(()=>{m.current===f&&(n.current.length!==k.size&&(n.current.length=k.size),r&&r.current.length!==k.size&&(r.current.length=k.size),l.current=k.size),a(k)},[a,k,n,r,f]),Ge(()=>()=>{n.current=[]},[n]),Ge(()=>()=>{r&&(r.current=[])},[r]);const S=We(T=>(c.add(T),()=>{c.delete(T)}));Ge(()=>{c.forEach(T=>T(k))},[c,k]);const R=v.useMemo(()=>({register:b,unregister:y,subscribeMapChange:S,elementsRef:n,labelsRef:r,nextIndexRef:l}),[b,y,S,n,r,l]);return g.jsx(NN.Provider,{value:R,children:t})}function k6(){return new Map}function S6(){return new Set}function w6(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const E6=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:a,platform:l,elements:c,middlewareData:d}=t,{element:f,padding:h=0,offsetParent:m="real"}=ws(e,t)||{};if(f==null)return{};const b=QC(h),y={x:n,y:r},k=Bv(s),S=$v(k),R=await l.getDimensions(f),T=k==="y",E=T?"top":"left",C=T?"bottom":"right",_=T?"clientHeight":"clientWidth",D=a.reference[S]+a.reference[k]-y[k]-a.floating[S],N=y[k]-a.reference[k],A=m==="real"?await l.getOffsetParent?.(f):c.floating;let $=c.floating[_]||a.floating[S];(!$||!await l.isElement?.(A))&&($=c.floating[_]||a.floating[S]);const z=D/2-N/2,I=$/2-R[S]/2-1,Y=Math.min(b[E],I),H=Math.min(b[C],I),q=Y,L=$-R[S]-H,F=$/2-R[S]/2+z,U=Ty(q,F,L),W=!d.arrow&&vo(s)!=null&&F!==U&&a.reference[S]/2-(F<q?Y:H)-R[S]/2<0,B=W?F<q?F-q:F-L:0;return{[k]:y[k]+B,data:{[k]:U,centerOffset:F-U-B,...W&&{alignmentOffset:B}},reset:W}}}),T6=(e,t)=>({...E6(e),options:[e,t]}),R6=BP().fn,C6={name:"hide",async fn(e){const{width:t,height:n,x:r,y:s}=e.rects.reference,a=t===0&&n===0&&r===0&&s===0;return{data:{referenceHidden:(await R6(e)).data?.referenceHidden||a}}}},fp={sideX:"left",sideY:"top"},AN={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:s},platform:a,strategy:l,placement:c}=e,d=kn(s),f=d.getComputedStyle(s);if(!(f.transitionDuration!=="0s"&&f.transitionDuration!==""))return{x:t,y:n,data:fp};const m=await a.getOffsetParent?.(s);let b={width:0,height:0};if(l==="fixed"&&d?.visualViewport)b={width:d.visualViewport.width,height:d.visualViewport.height};else if(m===d){const E=Vt(s);b={width:E.documentElement.clientWidth,height:E.documentElement.clientHeight}}else await a.isElement?.(m)&&(b=await a.getDimensions(m));const y=Mr(c);let k=t,S=n;y==="left"&&(k=b.width-(t+r.width)),y==="top"&&(S=b.height-(n+r.height));const R=y==="left"?"right":fp.sideX,T=y==="top"?"bottom":fp.sideY;return{x:k,y:S,data:{sideX:R,sideY:T}}}};function ON(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function fE(e,t,n){const{rects:r,placement:s}=e;return{side:ON(t,Mr(s),n),align:vo(s)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function dx(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:s=0,align:a="center",alignOffset:l=0,collisionBoundary:c,collisionPadding:d=5,sticky:f=!1,arrowPadding:h=5,disableAnchorTracking:m=!1,inline:b,keepMounted:y=!1,floatingRootContext:k,mounted:S,collisionAvoidance:R,shiftCrossAxis:T=!1,nodeId:E,adaptiveOrigin:C,lazyFlip:_=!1,externalTree:D}=e,[N,A]=v.useState(null);!S&&N!==null&&A(null);const $=R.side||"flip",z=R.align||"flip",I=R.fallbackAxisSide||"end",Y=typeof t=="function"?t:void 0,H=We(Y),q=Y?H:t,L=_n(t),F=_n(S),W=Ri()==="rtl",B=N||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":W?"left":"right","inline-start":W?"right":"left"}[r],K=a==="center"?B:`${B}-${a}`;let O=d;const P=1,V=r==="bottom"?P:0,j=r==="top"?P:0,Z=r==="right"?P:0,te=r==="left"?P:0;typeof O=="number"?O={top:O+V,right:O+te,bottom:O+j,left:O+Z}:O&&(O={top:(O.top||0)+V,right:(O.right||0)+te,bottom:(O.bottom||0)+j,left:(O.left||0)+Z});const se={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:O},ue=v.useRef(null),le=_n(s),fe=_n(l),ge=typeof s!="function"?s:0,_e=typeof l!="function"?l:0,oe=[];b&&oe.push(b),oe.push(Gv(st=>{const vt=fE(st,r,W),Dt=typeof le.current=="function"?le.current(vt):le.current,Pt=typeof fe.current=="function"?fe.current(vt):fe.current;return{mainAxis:Dt,crossAxis:Pt,alignmentAxis:Pt}},[ge,_e,W,r]));const ye=z==="none"&&$!=="shift",Se=!ye&&(f||T||$==="shift"),Oe=$==="none"?null:Wv({...se,padding:{top:O.top+P,right:O.right+P,bottom:O.bottom+P,left:O.left+P},mainAxis:!T&&$==="flip",crossAxis:z==="flip"?"alignment":!1,fallbackAxisSideDirection:I}),we=ye?null:Vv(st=>{const vt=Vt(st.elements.floating).documentElement;return{...se,rootBoundary:T?{x:0,y:0,width:vt.clientWidth,height:vt.clientHeight}:void 0,mainAxis:z!=="none",crossAxis:Se,limiter:f||T?void 0:$P(Dt=>{if(!ue.current)return{};const{width:Pt,height:At}=ue.current.getBoundingClientRect(),X=ui(Mr(Dt.placement)),he=X==="y"?Pt:At,je=X==="y"?O.left+O.right:O.top+O.bottom;return{offset:he/2+je/2}})}},[se,f,T,O,z]);$==="shift"||z==="shift"||a==="center"?oe.push(we,Oe):oe.push(Oe,we),oe.push(Kv({...se,apply({elements:{floating:st},availableWidth:vt,availableHeight:Dt,rects:Pt}){if(!F.current)return;const At=st.style;At.setProperty("--available-width",`${vt}px`),At.setProperty("--available-height",`${Dt}px`);const X=kn(st).devicePixelRatio||1,{x:he,y:je,width:Ze,height:St}=Pt.reference,at=(Math.round((he+Ze)*X)-Math.round(he*X))/X,qe=(Math.round((je+St)*X)-Math.round(je*X))/X;At.setProperty("--anchor-width",`${at}px`),At.setProperty("--anchor-height",`${qe}px`)}}),T6(st=>({element:ue.current||Vt(st.elements.floating).createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(st){const{elements:vt,middlewareData:Dt,placement:Pt,rects:At,y:X}=st,he=Mr(Pt),je=ui(he),Ze=ue.current,St=Dt.arrow?.x||0,at=Dt.arrow?.y||0,qe=Ze?.clientWidth||0,Ee=Ze?.clientHeight||0,Ue=St+qe/2,ze=at+Ee/2,Ne=Math.abs(Dt.shift?.y||0),Ie=At.reference.height/2,ut=typeof s=="function"?s(fE(st,r,W)):s,Be=Ne>ut,Rt={top:`${Ue}px calc(100% + ${ut}px)`,bottom:`${Ue}px ${-ut}px`,left:`calc(100% + ${ut}px) ${ze}px`,right:`${-ut}px ${ze}px`}[he],wt=`${Ue}px ${At.reference.y+Ie-X}px`;return vt.floating.style.setProperty("--transform-origin",Se&&je==="y"&&Be?wt:Rt),{}}},C6,C),Ge(()=>{!S&&k&&k.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[S,k]);const ke=v.useMemo(()=>({elementResize:!m&&typeof ResizeObserver<"u",layoutShift:!m&&typeof IntersectionObserver<"u"}),[m]),{refs:De,elements:Me,x:Le,y:He,middlewareData:be,update:Re,placement:ee,context:ce,isPositioned:J,floatingStyles:re}=p$({rootContext:k,open:y?S:void 0,placement:K,middleware:oe,strategy:n,whileElementsMounted:y?void 0:(...st)=>Rp(...st,ke),nodeId:E,externalTree:D}),{sideX:xe,sideY:$e}=be.adaptiveOrigin||fp,Xe=J?n:"fixed",Ye=v.useMemo(()=>{const st=C?{position:Xe,[xe]:Le,[$e]:He}:{position:Xe,...re};return J||(st.opacity=0),st},[C,Xe,xe,Le,$e,He,re,J]),ht=v.useRef(null);Ge(()=>{if(!S)return;const st=L.current,vt=typeof st=="function"?st():st,Pt=(dE(vt)?vt.current:vt)||null||null;Pt!==ht.current&&(De.setPositionReference(Pt),ht.current=Pt)},[S,De,q,L]),v.useEffect(()=>{if(!S)return;const st=L.current;typeof st!="function"&&dE(st)&&st.current!==ht.current&&(De.setPositionReference(st.current),ht.current=st.current)},[S,De,q,L]),v.useEffect(()=>{if(y&&S&&Me.reference&&Me.floating)return Rp(Me.reference,Me.floating,Re,ke)},[y,S,Me,Re,ke]);const Qe=Mr(ee),yt=ON(r,Qe,W),kt=vo(ee)||"center",tt=!!be.hide?.referenceHidden;Ge(()=>{_&&S&&J&&A(Qe)},[_,S,J,Qe]);const Tt=v.useMemo(()=>({position:"absolute",top:be.arrow?.y,left:be.arrow?.x}),[be.arrow]),_t=be.arrow?.centerOffset!==0;return v.useMemo(()=>({positionerStyles:Ye,arrowStyles:Tt,arrowRef:ue,arrowUncentered:_t,side:yt,align:kt,physicalSide:Qe,anchorHidden:tt,refs:De,context:ce,isPositioned:J,update:Re}),[Ye,Tt,ue,_t,yt,kt,Qe,tt,De,ce,J,Re])}function dE(e){return e!=null&&"current"in e}function Sh(e){return e==="starting"?U2:jn}function px(e,t,{styles:n,transitionStatus:r,props:s,refs:a,hidden:l,inert:c=!1}){const d={...n};return c&&(d.pointerEvents="none"),hn("div",e,{state:t,ref:a,props:[{role:"presentation",hidden:l,style:d},Sh(r),s],stateAttributesMapping:$c})}const _6=20;function N6(e,t,n,r){const[s,a]=v.useState(!1);Ge(()=>{if(!e||!t||n==null){a(!1);return}const l=Vt(n).documentElement.clientWidth,c=n.offsetWidth;a(l>0&&c>0&&c>=l-_6)},[e,t,n]),P$(e&&(!t||s),r)}let MN=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function IN(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:s,index:a}=e,{register:l,unregister:c,subscribeMapChange:d,elementsRef:f,labelsRef:h,nextIndexRef:m}=x6(),b=v.useRef(-1),[y,k]=v.useState(a??(s===MN.GuessFromOrder?()=>{if(b.current===-1){const T=m.current;m.current+=1,b.current=T}return b.current}:-1)),S=v.useRef(null),R=v.useCallback(T=>{if(S.current=T,y!==-1&&T!==null&&(f.current[y]=T,h)){const E=t!==void 0;h.current[y]=E?t:r?.current?.textContent??T.textContent}},[y,f,h,t,r]);return Ge(()=>{if(a!=null)return;const T=S.current;if(T)return l(T,n),()=>{c(T)}},[a,l,c,n]),Ge(()=>{if(a==null)return d(T=>{const E=S.current?T.get(S.current)?.index:null;E!=null&&k(E)})},[a,d,k]),{ref:R,index:y}}const DN={popup:{k6sLGO:"ui-1so62im",k3nNDw:"ui-ctpfpq",k1ekBW:"ui-11xpdln",kAMwcw:"ui-19frgs0",kIyJzY:"ui-7pq1vu ui-1fdgx8g ui-sagj69",k3aq6I:"ui-1c071of ui-17ll0io ui-2um2vg ui-1ahjy9u ui-s2p038 ui-fld6f8 ui-14hpypv ui-1296zyv ui-1h7md5i",$$css:!0},positioner:{"--ui-floating-anchor-fade-duration":"ui-1kwwprx ui-5ece57 ui-4rr00i",kSiTet:"ui-1hc1fzr ui-4itv7f ui-fwszop",$$css:!0}},wh=DN.popup,A6=DN.positioner,O6={transition:`opacity var(--ui-floating-anchor-fade-duration) ${yz["--cursor-easing-out-quint"]}`};function Eh(...e){const t=jt(A6,...e);return{...t,style:{...t.style,...O6}}}const Th={border:{k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",k3foIR:"ui-1m1drc7",kH8aOt:"ui-1unh1gc",k8Iv0R:"ui-1xrz1ek",kc1e00:"ui-1iygr5g",kDVEDD:"ui-itxdhh",kUfP38:"ui-1k48kgn",kbMawA:"ui-1o7vem3",kloYau:"ui-2q1x1w",$$css:!0}},nr={positioner:{kY2c9j:"ui-2hst0z",$$css:!0},popupPositioner:{kY2c9j:"ui-fc2p8",$$css:!0},popupShadow:{kGVxlE:"ui-1x78n9t",$$css:!0},tooltipShadow:{kGVxlE:"ui-4l6n3x",$$css:!0},popupRadius:{kaIpWk:"ui-1pkpdue",$$css:!0},tooltipRadius:{kaIpWk:"ui-15ujvgx",$$css:!0},surface:{kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kWkggS:"ui-f1vpex",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",ke9TFa:"ui-10w94by",k8ry5P:"ui-18oe1m7",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",k2ei4v:"ui-14e42zd",kVhnKS:"ui-stzfhl",kaIpWk:"ui-1pkpdue",kMwMTN:"ui-1wd3ewq",kMv6JI:"ui-1acoasx",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-vu1jfw",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0},popupLayout:{k1xSpc:"ui-1lliihq",kzqmXN:"ui-ezivpi",ks0D6T:"ui-w5ewwj",kHjlTd:"ui-j0a0fe",$$css:!0},popupInset:{kLKAdn:"ui-uve7l6",kwRFfy:"ui-196pc8s",kGO01o:"ui-1rgtt3y",kZCmMZ:"ui-22095l",$$css:!0},previewCardInset:{kLKAdn:"ui-oyc9vk",kwRFfy:"ui-1fg0g13",kGO01o:"ui-2lprc",kZCmMZ:"ui-1tajz9i",$$css:!0},popupInteractive:{kfzvcC:"ui-67bb7w",kfSwDN:"ui-1hx0egp",$$css:!0},popupSurfaceMd:{kaIpWk:"ui-1pkpdue",$$css:!0},tooltipSurface:{"--ui-surface-hairline-width":"ui-10ssw4j",kGuDYH:"ui-mppzg7",kLWn49:"ui-l68z86",kb6lSQ:"ui-55tv1j",kLKAdn:"ui-3jsnqb",kGO01o:"ui-1w5ico7",kwRFfy:"ui-180w9kh",kZCmMZ:"ui-1vs96pt",$$css:!0}},LN=nr.positioner,hx=[nr.surface,Th.border],jN=[LN,nr.popupShadow,nr.popupRadius],M6=[LN,nr.tooltipShadow,nr.tooltipRadius],I6=[nr.tooltipRadius,nr.tooltipSurface],D6=nr.popupLayout,L6=nr.popupInset,zN=nr.previewCardInset,PN=[D6,L6],j6=nr.popupInteractive,$N=[nr.surface,Th.border],z6=nr.popupSurfaceMd,P6=nr.popupPositioner,$6=[P6,nr.popupShadow,nr.popupRadius],fa={popupFrame:{kB7OPa:"ui-9f619",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kHBbk8:"ui-c8icb0",kfSwDN:"ui-87ps6o",kY4cRS:"ui-lvsv26",$$css:!0},list:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kAzted:"ui-2lwn1j",kXHlph:"ui-6ikm8r",kORKVm:"ui-ryxfnj",$$css:!0},row:{k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-6s0dn4",kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kkrTdU:"ui-1ypdohk ui-mh7c9n",kMwMTN:"ui-1wd3ewq ui-1kosevp",kWkggS:"ui-jbqb8w ui-1sbws7q",$$css:!0},rowFrame:{kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kOIVth:"ui-xhr3t",kaIpWk:"ui-2u8bby","--ui-popup-list-row-highlighted-opacity":"ui-5i412e ui-1nlrr02",kWkggS:"ui-jbqb8w ui-9wl9qz",$$css:!0},rowInsetHighlight:{kfYRhQ:"ui-1b16mni",k7VdEw:"ui-1nwgpwx",kXO8Uu:"ui-1r87rg3",kDFFfQ:"ui-1wv1pz9",kllAdU:"ui-1v0xhfw",kxsapM:"ui-13bjwnm",k3JYP4:"ui-t2or2s",kDMCui:"ui-tj3xra",kWQQwa:"ui-50seq6",kYNu72:"ui-95qkr9",$$css:!0},rowSectionTrailing:{keTefX:"ui-kiyga0",$$css:!0},rowSectionDescription:{kSGwAc:"ui-qcrz7y",keoZOQ:"ui-1k5org8",$$css:!0}},B6=fa.list,F6=fa.row,U6=fa.popupFrame,q6=fa.rowFrame,H6=fa.rowInsetHighlight,G6=fa.rowSectionTrailing,V6=fa.rowSectionDescription,Dr={popup:{k7Eaqz:"ui-1i9suas",ks0D6T:"ui-13kvn80",kskxy:"ui-2pj5ht",$$css:!0},popupWidth:e=>[{kzqmXN:e!=null?"ui-5lhr3w":e,ks0D6T:e!=null?"ui-f68679":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e),"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(e)}],popupDefaultWidth:{kzqmXN:"ui-ezivpi",k7Eaqz:"ui-lopysa",$$css:!0},list:{kOIVth:"ui-ihas45",kLKAdn:"ui-9g4tyx",kwRFfy:"ui-yri2b",kGO01o:"ui-x776sp",kZCmMZ:"ui-1c1uobl",$$css:!0},row:{kAzted:"ui-14dnd5q ui-12uk8lx",kLKAdn:"ui-p90ga9 ui-17apzky",kwRFfy:"ui-mk9vl6",kGO01o:"ui-1ep5yuf ui-zkc5ih",kZCmMZ:"ui-vtdk6d",$$css:!0},rowText:{kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",kVAEAm:"ui-1n2onr6",kY2c9j:"ui-1vjfegm",$$css:!0},rowLabel:{k1xSpc:"ui-1lliihq",kzQI83:"ui-1iyjqo2",kmuXW:"ui-s83m0k",kCS8Yb:"ui-dl72j9",k7Eaqz:"ui-euugli",ks0D6T:"ui-193iq5w",kVQacm:"ui-b3r6kr",kg5iWk:"ui-lyipyv",khDVqt:"ui-uxw1ft",$$css:!0},itemTextWithMeta:{k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-1pha0wt",k7Eaqz:"ui-euugli",ks0D6T:"ui-193iq5w",$$css:!0},rowTextWithDescription:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kGNEyG:"ui-1cy8zhl",kOIVth:"ui-137clkk",$$css:!0},rowDescription:{k1xSpc:"ui-1lliihq",ks0D6T:"ui-193iq5w",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",khDVqt:"ui-uxw1ft",kMwMTN:"ui-4b2ntj",$$css:!0},rowMeta:{keTefX:"ui-1uokl23",$$css:!0},rowSection:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kmuXW:"ui-2lah0s",kVAEAm:"ui-1n2onr6",kY2c9j:"ui-1vjfegm",kMwMTN:"ui-19aaqeu",$$css:!0},rowSectionLeading:{k71WvV:"ui-17adnql",$$css:!0},rowSectionEnd:{kOIVth:"ui-1jcujwu",$$css:!0}},W6=[$N,U6,Dr.popup],K6={sm:null,md:z6},Y6=Dr.popupWidth,X6=Dr.popupDefaultWidth,Z6=[B6,Dr.list],Q6=[F6,q6,Dr.row,H6,Fi.root],J6=Dr.rowText,eB=Dr.rowLabel,tB=Dr.itemTextWithMeta,nB=Dr.rowTextWithDescription,rB=Dr.rowDescription,iB=Dr.rowMeta,xb=Dr.rowSection,sB=Dr.rowSectionLeading,pE=G6,oB=Dr.rowSectionEnd,kb=V6;function Za(e,t,n){let r=n.initialDeps??[],s,a=!0;function l(){var c,d,f;let h;n.key&&((c=n.debug)!=null&&c.call(n))&&(h=Date.now());const m=e();if(!(m.length!==r.length||m.some((k,S)=>r[S]!==k)))return s;r=m;let y;if(n.key&&((d=n.debug)!=null&&d.call(n))&&(y=Date.now()),s=t(...m),n.key&&((f=n.debug)!=null&&f.call(n))){const k=Math.round((Date.now()-h)*100)/100,S=Math.round((Date.now()-y)*100)/100,R=S/16,T=(E,C)=>{for(E=String(E);E.length<C;)E=" "+E;return E};console.info(`%c⏱ ${T(S,5)} /${T(k,5)} ms`,`
|
|
10
|
+
font-size: .6rem;
|
|
11
|
+
font-weight: bold;
|
|
12
|
+
color: hsl(${Math.max(0,Math.min(120-120*R,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(s),a=!1,s}return l.updateDeps=c=>{r=c},l}function hE(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const aB=(e,t)=>Math.abs(e-t)<1.01,lB=(e,t,n)=>{let r;return function(...s){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,s),n)}},mE=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},uB=e=>e,cB=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let s=t;s<=n;s++)r.push(s);return r},fB=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const s=l=>{const{width:c,height:d}=l;t({width:Math.round(c),height:Math.round(d)})};if(s(mE(n)),!r.ResizeObserver)return()=>{};const a=new r.ResizeObserver(l=>{const c=()=>{const d=l[0];if(d?.borderBoxSize){const f=d.borderBoxSize[0];if(f){s({width:f.inlineSize,height:f.blockSize});return}}s(mE(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},gE={passive:!0},bE=typeof window>"u"?!0:"onscrollend"in window,dB=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let s=0;const a=e.options.useScrollendEvent&&bE?()=>{}:lB(r,()=>{t(s,!1)},e.options.isScrollingResetDelay),l=h=>()=>{const{horizontal:m,isRtl:b}=e.options;s=m?n.scrollLeft*(b&&-1||1):n.scrollTop,a(),t(s,h)},c=l(!0),d=l(!1);n.addEventListener("scroll",c,gE);const f=e.options.useScrollendEvent&&bE;return f&&n.addEventListener("scrollend",d,gE),()=>{n.removeEventListener("scroll",c),f&&n.removeEventListener("scrollend",d)}},pB=(e,t,n)=>{if(t?.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},hB=(e,{adjustments:t=0,behavior:n},r)=>{var s,a;const l=e+t;(a=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||a.call(s,{[r.options.horizontal?"left":"top"]:l,behavior:n})};class mB{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var n,r,s;return((s=(r=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:r.now)==null?void 0:s.call(r))??Date.now()},this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(a=>{const l=()=>{const c=a.target,d=this.indexFromElement(c);if(!c.isConnected){this.observer.unobserve(c);return}this.shouldMeasureDuringScroll(d)&&this.resizeItem(d,this.options.measureElement(c,a,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()})}));return{disconnect:()=>{var s;(s=r())==null||s.disconnect(),n=null},observe:s=>{var a;return(a=r())==null?void 0:a.observe(s,{box:"border-box"})},unobserve:s=>{var a;return(a=r())==null?void 0:a.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,s])=>{typeof s>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:uB,rangeExtractor:cB,onChange:()=>{},measureElement:pB,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,n)},this.maybeNotify=Za(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=a,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const s=new Map,a=new Map;for(let l=r-1;l>=0;l--){const c=n[l];if(s.has(c.lane))continue;const d=a.get(c.lane);if(d==null||c.end>d.end?a.set(c.lane,c):c.end<d.end&&s.set(c.lane,!0),s.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((l,c)=>l.end===c.end?l.index-c.index:l.end-c.end)[0]:void 0},this.getMeasurementOptions=Za(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,r,s,a,l,c)=>(this.prevLanes!==void 0&&this.prevLanes!==c&&(this.lanesChangedFlag=!0),this.prevLanes=c,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:s,getItemKey:a,enabled:l,lanes:c}),{key:!1}),this.getMeasurements=Za(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:a,enabled:l,lanes:c},d)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const b of this.laneAssignments.keys())b>=n&&this.laneAssignments.delete(b);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(b=>{this.itemSizeCache.set(b.key,b.size)}));const f=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const h=this.measurementsCache.slice(0,f),m=new Array(c).fill(void 0);for(let b=0;b<f;b++){const y=h[b];y&&(m[y.lane]=b)}for(let b=f;b<n;b++){const y=a(b),k=this.laneAssignments.get(b);let S,R;if(k!==void 0&&this.options.lanes>1){S=k;const _=m[S],D=_!==void 0?h[_]:void 0;R=D?D.end+this.options.gap:r+s}else{const _=this.options.lanes===1?h[b-1]:this.getFurthestMeasurement(h,b);R=_?_.end+this.options.gap:r+s,S=_?_.lane:b%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(b,S)}const T=d.get(y),E=typeof T=="number"?T:this.options.estimateSize(b),C=R+E;h[b]={index:b,start:R,size:E,end:C,key:y,lane:S},m[S]=b}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Za(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,s,a)=>this.range=n.length>0&&r>0?gB({measurements:n,outerSize:r,scrollOffset:s,lanes:a}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Za(()=>{let n=null,r=null;const s=this.calculateRange();return s&&(n=s.startIndex,r=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,s,a,l)=>a===null||l===null?[]:n({startIndex:a,endIndex:l,overscan:r,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,s=n.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const s=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index);if(s!==void 0&&this.range){const a=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),l=Math.max(0,s-a),c=Math.min(this.options.count-1,s+a);return n>=l&&n<=c}return!0},this.measureElement=n=>{if(!n){this.elementsCache.forEach((l,c)=>{l.isConnected||(this.observer.unobserve(l),this.elementsCache.delete(c))});return}const r=this.indexFromElement(n),s=this.options.getItemKey(r),a=this.elementsCache.get(s);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(s,n)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,r)=>{var s;const a=this.measurementsCache[n];if(!a)return;const l=this.itemSizeCache.get(a.key)??a.size,c=r-l;c!==0&&(((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(a,c,this):a.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=c,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(a.index),this.itemSizeCache=new Map(this.itemSizeCache.set(a.key,r)),this.notify(!1))},this.getVirtualItems=Za(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let a=0,l=n.length;a<l;a++){const c=n[a],d=r[c];s.push(d)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return hE(r[BN(0,r.length-1,s=>hE(r[s]).start,n)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(n,r,s=0)=>{if(!this.scrollElement)return 0;const a=this.getSize(),l=this.getScrollOffset();r==="auto"&&(r=n>=l+a?"end":"start"),r==="center"?n+=(s-a)/2:r==="end"&&(n-=a);const c=this.getMaxScrollOffset();return Math.max(Math.min(c,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.getSize(),a=this.getScrollOffset(),l=this.measurementsCache[n];if(!l)return;if(r==="auto")if(l.end>=a+s-this.options.scrollPaddingEnd)r="end";else if(l.start<=a+this.options.scrollPaddingStart)r="start";else return[a,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];const c=r==="end"?l.end+this.options.scrollPaddingEnd:l.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(c,r,l.size),r]},this.scrollToOffset=(n,{align:r="start",behavior:s="auto"}={})=>{const a=this.getOffsetForAlignment(n,r),l=this.now();this.scrollState={index:null,align:r,behavior:s,startedAt:l,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:r="auto",behavior:s="auto"}={})=>{n=Math.max(0,Math.min(n,this.options.count-1));const a=this.getOffsetForIndex(n,r);if(!a)return;const[l,c]=a,d=this.now();this.scrollState={index:n,align:c,behavior:s,startedAt:d,lastTargetOffset:l,stableFrames:0},this._scrollToOffset(l,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:r="auto"}={})=>{const s=this.getScrollOffset()+n,a=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:a,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let s;if(r.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=r[r.length-1])==null?void 0:n.end)??0;else{const a=Array(this.options.lanes).fill(null);let l=r.length-1;for(;l>=0&&a.some(c=>c===null);){const c=r[l];a[c.lane]===null&&(a[c.lane]=c.end),l--}s=Math.max(...a.filter(c=>c!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,s=r?r[0]:this.scrollState.lastTargetOffset,a=1,l=s!==this.scrollState.lastTargetOffset;if(!l&&aB(s,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=a){this.scrollState=null;return}}else this.scrollState.stableFrames=0,l&&(this.scrollState.lastTargetOffset=s,this.scrollState.behavior="auto",this._scrollToOffset(s,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}const BN=(e,t,n,r)=>{for(;e<=t;){const s=(e+t)/2|0,a=n(s);if(a<r)e=s+1;else if(a>r)t=s-1;else return s}return e>0?e-1:0};function gB({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const s=e.length-1,a=d=>e[d].start;if(e.length<=r)return{startIndex:0,endIndex:s};let l=BN(0,s,a,n),c=l;if(r===1)for(;c<s&&e[c].end<n+t;)c++;else if(r>1){const d=Array(r).fill(0);for(;c<s&&d.some(h=>h<n+t);){const h=e[c];d[h.lane]=h.end,c++}const f=Array(r).fill(n+t);for(;l>=0&&f.some(h=>h>=n);){const h=e[l];f[h.lane]=h.start,l--}l=Math.max(0,l-l%r),c=Math.min(s,c+(r-1-c%r))}return{startIndex:l,endIndex:c}}function bB(){const e=v.useRef(void 0),t=v.useCallback(()=>{const r=e.current;r!==void 0&&(e.current=void 0,cancelAnimationFrame(r))},[]),n=v.useCallback(r=>{t(),e.current=requestAnimationFrame(s=>{e.current=void 0,r(s)})},[t]);return v.useEffect(()=>t,[t]),v.useMemo(()=>({dispose:t,request:n}),[t,n])}function FN(e){return typeof ResizeObserver>"u"?null:new ResizeObserver(e)}function Dy({deltaX:e,deltaY:t,mapVerticalWheelToHorizontal:n,axisBehavior:r="dominant",mappedBehavior:s="dominant"}){if(n){let c;return s==="dominant"&&Math.abs(t)>Math.abs(e)?c=t:c=e||t,c===0?null:c}if(r==="raw")return e===0?null:e;const a=Math.abs(e),l=Math.abs(t);return e===0||a<=l?null:e}const yB="hover",vB=4,xB={kn1fP1:"ui-xqa2ke",kJcbqH:"ui-16fucec",$$css:!0};function kB(e){const{scrollTop:t,scrollHeight:n,clientHeight:r,threshold:s}=e;return{isAtTop:t<=s,isAtBottom:t+r>=n-s}}function SB(e){const{scrollLeft:t,scrollWidth:n,clientWidth:r,threshold:s}=e,a=Math.abs(t);return{isAtStart:a<=s,isAtEnd:a+r>=n-s}}const yE={maskGeometry:e=>[xB,{kQB4zb:(e>1?"intersect":null)!=null?"ui-1xrn8sl":e>1?"intersect":null,kRVSR3:(e>1?"source-in":null)!=null?"ui-60m5pi":e>1?"source-in":null,$$css:!0},{"--x-maskSize":(e>1?"100% 100%, 100% 100%":"100% 100%")!=null?e>1?"100% 100%, 100% 100%":"100% 100%":void 0,"--x-maskComposite":(e>1?"intersect":null)!=null?e>1?"intersect":null:void 0,"--x-WebkitMaskComposite":(e>1?"source-in":null)!=null?e>1?"source-in":null:void 0}],mask:e=>[{kX1K2I:e!=null?"ui-wjwp01":e,kAExgp:e!=null?"ui-11jd449":e,$$css:!0},{"--x-maskImage":e??void 0,"--x-WebkitMaskImage":e??void 0}]};function wB({topFadePx:e,bottomFadePx:t,topFadeStartOpacity:n=0,bottomFadeStartOpacity:r=0,startFadePx:s=0,endFadePx:a=0}){const l=[];return(e>0||t>0)&&l.push(`linear-gradient(to bottom, rgba(0, 0, 0, ${n}) 0px, black ${e}px, black calc(100% - ${t}px), rgba(0, 0, 0, ${r}) 100%)`),(s>0||a>0)&&l.push(`linear-gradient(to right, transparent 0px, black ${s}px, black calc(100% - ${a}px), transparent 100%)`),l.length===0?null:[yE.maskGeometry(l.length),yE.mask(l.join(", "))]}const EB=20;class TB{constructor(){this._trackSize=0,this._viewportSize=0,this._scrollSize=0,this._scrollPosition=0,this._isScrollable=!1,this._thumbSize=0,this._thumbPosition=0,this._thumbRatio=0}setDimensions(t,n,r,s){const a=Math.round(t),l=Math.round(n),c=Math.round(r),d=Math.round(s);return this._trackSize===a&&this._viewportSize===l&&this._scrollSize===c&&this._scrollPosition===d?!1:(this._trackSize=a,this._viewportSize=l,this._scrollSize=c,this._scrollPosition=d,this._recompute(),!0)}setScrollPosition(t){const n=Math.round(t);return this._scrollPosition===n?!1:(this._scrollPosition=n,this._thumbPosition=this._computeThumbPosition(),!0)}_recompute(){if(this._isScrollable=this._scrollSize>0&&this._viewportSize>0&&this._scrollSize>this._viewportSize,!this._isScrollable||this._trackSize<=0){this._thumbSize=0,this._thumbPosition=0,this._thumbRatio=0;return}const t=Math.floor(this._trackSize*this._viewportSize/this._scrollSize);this._thumbSize=Math.min(this._trackSize,Math.max(EB,t));const n=this._trackSize-this._thumbSize,r=this._scrollSize-this._viewportSize;this._thumbRatio=r>0?n/r:0,this._thumbPosition=this._computeThumbPosition()}_computeThumbPosition(){return!this._isScrollable||this._thumbRatio===0?0:Math.round(this._scrollPosition*this._thumbRatio)}isScrollable(){return this._isScrollable}getThumbSize(){return this._thumbSize}getThumbPosition(){return this._thumbPosition}getScrollPositionFromThumbDelta(t,n){return!this._isScrollable||this._thumbRatio===0?0:Math.round(n+t/this._thumbRatio)}getScrollPositionFromTrackOffset(t){if(!this._isScrollable||this._thumbRatio===0)return 0;const n=Math.max(0,Math.min(this._trackSize-this._thumbSize,t-this._thumbSize/2));return Math.round(n/this._thumbRatio)}}const cl=class cl{constructor(t){this.thumbInsetStart=0,this.horizontalWheelAxisLock=null,this.horizontalWheelResetTimer=null,this.resizeObserver=null,this.boundOnScroll=null,this.boundOnThumbDown=null,this.boundOnTrackDown=null,this.boundOnWheel=null,this.dragCleanup=null,this.pendingSyncThumbFrame=null,this.viewport=t.viewport,this.content=t.content,this.scrollbar=t.scrollbar,this.thumb=t.thumb,this.state=new TB,this.direction=t.direction,this.mapVerticalWheelToHorizontal=t.mapVerticalWheelToHorizontal??!1}get horizontal(){return this.direction==="horizontal"}attach(){this.attachScrollListener(),this.attachResizeObserver(),this.attachPointerEvents(),this.attachWheelForwarding(),this.scheduleSyncThumb()}detach(){this.detachScrollListener(),this.detachResizeObserver(),this.detachPointerEvents(),this.detachWheelForwarding(),this.pendingSyncThumbFrame!==null&&(cancelAnimationFrame(this.pendingSyncThumbFrame),this.pendingSyncThumbFrame=null),this.horizontalWheelResetTimer&&(clearTimeout(this.horizontalWheelResetTimer),this.horizontalWheelResetTimer=null),this.horizontalWheelAxisLock=null}refresh(){this.scheduleSyncThumb()}attachScrollListener(){this.boundOnScroll=this.handleScroll.bind(this),this.viewport.addEventListener("scroll",this.boundOnScroll,{passive:!0})}detachScrollListener(){this.boundOnScroll&&(this.viewport.removeEventListener("scroll",this.boundOnScroll),this.boundOnScroll=null)}handleScroll(){const t=this.horizontal?this.viewport.scrollLeft:this.viewport.scrollTop;if(this.state.setScrollPosition(t)){const n=this.state.getThumbPosition();this.thumb.style.transform=this.getThumbTransform(n)}}attachResizeObserver(){this.resizeObserver=FN(()=>this.scheduleSyncThumb()),this.resizeObserver!==null&&(this.resizeObserver.observe(this.viewport),this.content!==void 0&&this.resizeObserver.observe(this.content),this.resizeObserver.observe(this.scrollbar))}detachResizeObserver(){this.resizeObserver?.disconnect(),this.resizeObserver=null}scheduleSyncThumb(){this.pendingSyncThumbFrame===null&&(this.pendingSyncThumbFrame=requestAnimationFrame(()=>{this.pendingSyncThumbFrame=null,this.syncThumb()}))}syncThumb(){this.thumbInsetStart=this.getThumbInsetStart();const t=this.readDimensions();this.state.setDimensions(t.trackSize,t.viewportSize,t.scrollSize,t.scrollPos)&&this.applyThumbStyle()}readDimensions(){const t=Math.max(0,this.scrollbar.clientHeight-this.thumbInsetStart);return{trackSize:this.horizontal?this.scrollbar.clientWidth:t,viewportSize:this.horizontal?this.viewport.clientWidth:this.viewport.clientHeight,scrollSize:this.horizontal?this.viewport.scrollWidth:this.viewport.scrollHeight,scrollPos:this.horizontal?this.viewport.scrollLeft:this.viewport.scrollTop}}applyThumbStyle(){const t=this.state.getThumbSize(),n=this.state.getThumbPosition();this.horizontal?(this.thumb.style.width=`${t}px`,this.thumb.style.height="",this.thumb.style.transform=this.getThumbTransform(n)):(this.thumb.style.height=`${t}px`,this.thumb.style.width="",this.thumb.style.transform=this.getThumbTransform(n)),this.scrollbar.dataset.scrollable=this.state.isScrollable()?"true":"false"}attachPointerEvents(){this.boundOnThumbDown=this.handleThumbDown.bind(this),this.boundOnTrackDown=this.handleTrackDown.bind(this),this.thumb.addEventListener("pointerdown",this.boundOnThumbDown),this.scrollbar.addEventListener("pointerdown",this.boundOnTrackDown)}detachPointerEvents(){this.boundOnThumbDown&&(this.thumb.removeEventListener("pointerdown",this.boundOnThumbDown),this.boundOnThumbDown=null),this.boundOnTrackDown&&(this.scrollbar.removeEventListener("pointerdown",this.boundOnTrackDown),this.boundOnTrackDown=null),this.dragCleanup?.(),this.dragCleanup=null}handleThumbDown(t){if(t.button!==0)return;t.preventDefault();const n=this.horizontal?t.clientX:t.clientY,r=this.horizontal?this.viewport.scrollLeft:this.viewport.scrollTop,s=t.pointerId;this.thumb.setPointerCapture(s),this.thumb.classList.add("ui-scroll-area__thumb--active");const a=c=>{const d=(this.horizontal?c.clientX:c.clientY)-n,f=this.state.getScrollPositionFromThumbDelta(d,r);this.horizontal?this.viewport.scrollLeft=f:this.viewport.scrollTop=f},l=()=>{this.thumb.classList.remove("ui-scroll-area__thumb--active");try{this.thumb.releasePointerCapture(s)}catch{}this.thumb.removeEventListener("pointermove",a),this.thumb.removeEventListener("pointerup",l),this.thumb.removeEventListener("pointercancel",l),this.dragCleanup=null};this.thumb.addEventListener("pointermove",a),this.thumb.addEventListener("pointerup",l),this.thumb.addEventListener("pointercancel",l),this.dragCleanup=l}handleTrackDown(t){if(t.button!==0||t.target===this.thumb)return;const n=this.scrollbar.getBoundingClientRect();if(!this.horizontal){this.viewport.scrollTop=this.state.getScrollPositionFromTrackOffset(t.clientY-n.top-this.thumbInsetStart);return}const r=getComputedStyle(this.viewport).direction==="rtl",s=r?n.right-t.clientX:t.clientX-n.left,a=this.state.getScrollPositionFromTrackOffset(s);this.viewport.scrollLeft=r?-a:a}attachWheelForwarding(){this.boundOnWheel=t=>{if(this.horizontal){const n=this.viewport.scrollWidth-this.viewport.clientWidth;if(n<=0)return;let r=null;if(this.mapVerticalWheelToHorizontal)r=Dy({deltaX:t.deltaX,deltaY:t.deltaY,mapVerticalWheelToHorizontal:!0,mappedBehavior:"prefer-horizontal"});else{if(this.horizontalWheelAxisLock||(this.horizontalWheelAxisLock=Math.abs(t.deltaX)>Math.abs(t.deltaY)?"x":"y"),this.horizontalWheelResetTimer&&clearTimeout(this.horizontalWheelResetTimer),this.horizontalWheelResetTimer=setTimeout(()=>{this.horizontalWheelAxisLock=null,this.horizontalWheelResetTimer=null},cl.WHEEL_GESTURE_RESET_MS),this.horizontalWheelAxisLock!=="x")return;if(r=Dy({deltaX:t.deltaX,deltaY:t.deltaY,mapVerticalWheelToHorizontal:!1,axisBehavior:"raw"}),r===null){t.preventDefault(),t.stopPropagation();return}}if(r===null)return;const s=Math.max(0,Math.min(n,this.viewport.scrollLeft+r));this.viewport.scrollLeft=s,t.preventDefault(),t.stopPropagation()}else this.viewport.scrollTop+=t.deltaY},this.scrollbar.addEventListener("wheel",this.boundOnWheel,{passive:!1})}detachWheelForwarding(){this.boundOnWheel&&(this.scrollbar.removeEventListener("wheel",this.boundOnWheel),this.boundOnWheel=null)}getThumbTransform(t){return this.horizontal?`translateX(${t}px)`:`translateY(${t+this.thumbInsetStart}px)`}getThumbInsetStart(){if(this.horizontal)return 0;const t=getComputedStyle(this.scrollbar).getPropertyValue(cl.VERTICAL_THUMB_OFFSET_CSS_VAR),n=Number.parseFloat(t);return Number.isFinite(n)?Math.max(0,n):0}};cl.VERTICAL_THUMB_OFFSET_CSS_VAR="--scrollbar-thumb-top-offset",cl.WHEEL_GESTURE_RESET_MS=150;let Ip=cl;const RB={base:{"--scrollbar-size":"ui-1ekbvf6","--scrollbar-inset":"ui-1logqu4","--scrollbar-thumb-top-offset":"ui-1fx8caa","--scroll-area-scroll-padding":"ui-8ddqcf",kVAEAm:"ui-1n2onr6",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",k1xSpc:"ui-rvj5dj",k52YG4:"ui-ypqxfk",$$css:!0}},Sb={base:{kJuA4N:"ui-175mniq",kAzted:"ui-2lwn1j",kskxy:"ui-mz0i5r",kaIpWk:"ui-1pjcqnp",kXHlph:"ui-6ikm8r",kORKVm:"ui-1odjw0f",kaPefq:"ui-1fu52t7",kC2sXz:"ui-1ufbpdf",k9lH4S:"ui-3oazx1",kphCe6:"ui-19l4kpp",kvh3hx:"ui-1t1jukp",kacamN:"ui-1e4zzel",k5wCbM:"ui-1rohswg",kAnDOJ:"ui-6ehuon",kOuLrU:"ui-fk6m8",$$css:!0},horizontal:{kXHlph:"ui-w2csxc",kORKVm:"ui-10wlt62",kaPefq:"ui-k8sdt9",kC2sXz:"ui-1duton",k9lH4S:"ui-101ixbw",kphCe6:"ui-exgr1p",kvh3hx:"ui-7p5m3t",kacamN:"ui-y5w88m",$$css:!0},both:{kXHlph:"ui-w2csxc",kORKVm:"ui-1odjw0f",kaPefq:"ui-k8sdt9",kC2sXz:"ui-1duton",k9lH4S:"ui-101ixbw",kphCe6:"ui-exgr1p",kZeWKH:"ui-ish69e",$$css:!0}},wb={base:{kB7OPa:"ui-9f619",kzqmXN:"ui-eq5yr9",k7Eaqz:"ui-gqtt45",ks0D6T:"ui-193iq5w",kAzted:"ui-1us19tq",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",$$css:!0},horizontal:{kzqmXN:"ui-14atkfc",kZKoxP:"ui-g7h5cd",kXwgrk:"ui-1q0g3np",$$css:!0},both:{kzqmXN:"ui-ezivpi",k7Eaqz:"ui-gqtt45",ks0D6T:"ui-1x1rfll",kZKoxP:"ui-t7dq6l",kXwgrk:"ui-dt5ytf",$$css:!0}},$u={base:{kVAEAm:"ui-10l6tqk",kY2c9j:"ui-1n327nk",k87sOh:"ui-16271f3",kt4wiu:"ui-1cdd6y0",krVfgx:"ui-1c87l4o",kLqNvP:"ui-hi6v0a",kzqmXN:"ui-790ffn",kfzvcC:"ui-67bb7w",k1xSpc:"ui-1lliihq ui-y36ywk",$$css:!0},horizontal:{k87sOh:"ui-80663w",kt4wiu:"ui-1cdd6y0",krVfgx:"ui-1gncbth",kLqNvP:"ui-pl0nw1",kzqmXN:"ui-14atkfc",kZKoxP:"ui-a38mao",$$css:!0},bothVertical:{krVfgx:"ui-1143y87",$$css:!0},bothHorizontal:{kt4wiu:"ui-13kbk1n",$$css:!0},visibilityNever:{k1xSpc:"ui-1s85apg",$$css:!0}},Eb={base:{kVAEAm:"ui-10l6tqk",k87sOh:"ui-13vifvy",kt4wiu:"ui-tijo5x",krVfgx:"ui-dd4er5",kLqNvP:"ui-1o0tod",kAzted:"ui-4jlmx6",kzqmXN:"ui-790ffn",kaIpWk:"ui-1i4c3av",kWkggS:"ui-1m4ooaa ui-1kik0b9 ui-19p5jqy ui-gk890x",kSiTet:"ui-1hc1fzr",kfzvcC:"ui-67bb7w",k3aq6I:"ui-oww4n8",k1ekBW:"ui-1e8aii2",kIyJzY:"ui-1vaoic9 ui-144st5w",kAMwcw:"ui-1aiz5cx",$$css:!0},horizontal:{k87sOh:"ui-13vifvy",kt4wiu:"ui-1woyocn",krVfgx:"ui-1ey2m1c",kLqNvP:"ui-1o0tod",kzqmXN:"ui-14atkfc",kZKoxP:"ui-a38mao",kAzted:"ui-65nank",k7Eaqz:"ui-cbmsab",$$css:!0},hoverHidden:{kSiTet:"ui-g01cxk ui-4gyw5p ui-gorybd",$$css:!0}};function CB(){return RB.base}function _B({direction:e}){return[Sb.base,e==="horizontal"?Sb.horizontal:null,e==="both"?Sb.both:null]}function NB(e){return[wb.base,e==="horizontal"?wb.horizontal:null,e==="both"?wb.both:null]}function vE({direction:e,orientation:t,visibility:n}){return[$u.base,t==="horizontal"?$u.horizontal:null,e==="both"&&t==="vertical"?$u.bothVertical:null,e==="both"&&t==="horizontal"?$u.bothHorizontal:null,n==="never"?$u.visibilityNever:null]}function xE(e,t){return[Eb.base,e==="horizontal"?Eb.horizontal:null,t?Eb.hoverHidden:null]}const AB=1e4,Bu=5,Sl=v.forwardRef(function({children:t,height:n,maxHeight:r,width:s,className:a,viewportClassName:l,rootStyle:c,viewportStyle:d,allowScrollChaining:f=!1,contentStyle:h,overlay:m,style:b,scrollbarVisibility:y=yB,isScrollbarRevealed:k=!1,direction:S="vertical",topFadeSize:R,bottomFadeSize:T,topFadeStartOpacity:E=0,bottomFadeStartOpacity:C=0,startFadeSize:_,endFadeSize:D,autoScrollToBottom:N=!1,scrollTrigger:A,autoScrollPauseTimeout:$=AB,onScrollStateChange:z,mapVerticalWheelToHorizontal:I=!1,scrollPadding:Y=vB,scrollbarInset:H,onPointerEnter:q,onPointerLeave:L,...F},U){const W=v.useRef(null),B=v.useRef(null),K=v.useRef(null),O=v.useRef(null),P=v.useRef(null),V=v.useRef(null),j=v.useRef(null),Z=S!=="horizontal",te=S!=="vertical",se=I&&!Z,[ue,le]=v.useState(!1),[fe,ge]=v.useState(!1),[_e,oe]=v.useState(!1),[ye,Se]=v.useState(!1),[Oe,we]=v.useState(!1),ke=v.useRef(!1);ke.current=Oe;const De=v.useRef(0),Me=v.useRef(0),Le=v.useRef(null),He=v.useRef(null);v.useLayoutEffect(()=>{const Ee=B.current,Ue=K.current;if(!Ee||!Ue)return;const ze=[];if(Z){const Ne=O.current,Ie=P.current;Ne&&Ie&&ze.push(new Ip({viewport:Ee,content:Ue,scrollbar:Ne,thumb:Ie,direction:"vertical",mapVerticalWheelToHorizontal:se}))}if(te){const Ne=V.current,Ie=j.current;Ne&&Ie&&ze.push(new Ip({viewport:Ee,content:Ue,scrollbar:Ne,thumb:Ie,direction:"horizontal",mapVerticalWheelToHorizontal:se}))}if(ze.length!==0){for(const Ne of ze)Ne.attach();return()=>{for(const Ne of ze)Ne.detach()}}},[Z,te,se]);const be=v.useCallback(()=>{const Ee=B.current;return Ee?{scrollTop:Ee.scrollTop,scrollHeight:Ee.scrollHeight,clientHeight:Ee.clientHeight}:{scrollTop:0,scrollHeight:0,clientHeight:0}},[]),Re=v.useCallback((Ee=!1)=>{const Ue=B.current;Ue&&Ue.scrollTo({top:Ue.scrollHeight,behavior:Ee?"smooth":"instant"})},[]),ee=v.useCallback((Ee=!1)=>{const Ue=B.current;Ue&&Ue.scrollTo({top:0,behavior:Ee?"smooth":"instant"})},[]),ce=v.useCallback(()=>{He.current===null&&(He.current=requestAnimationFrame(()=>{He.current=null,!ke.current&&Re(!1)}))},[Re]),J=v.useCallback(()=>{N&&(ke.current||ce())},[N,ce]);v.useImperativeHandle(U,()=>({scrollToBottom:Re,scrollToTop:ee,requestAutoScroll:J,getScrollPosition:be,get rootElement(){return W.current},get viewportElement(){return B.current}}),[Re,ee,J,be]);const re=v.useCallback(()=>{const Ee=B.current;if(!Ee)return;const{scrollTop:Ue,scrollHeight:ze,clientHeight:Ne}=Ee,{isAtTop:Ie,isAtBottom:ut}=kB({scrollTop:Ue,scrollHeight:ze,clientHeight:Ne,threshold:Bu});le(!Ie),ge(!ut);const{isAtStart:Be,isAtEnd:Rt}=SB({scrollLeft:Ee.scrollLeft,scrollWidth:Ee.scrollWidth,clientWidth:Ee.clientWidth,threshold:Bu});oe(!Be),Se(!Rt),z?.({isAtBottom:ut,isAtTop:Ie}),ut&&ke.current&&(we(!1),Le.current&&(clearTimeout(Le.current),Le.current=null));const wt=ze<Me.current-Bu,$t=ze>Me.current+Bu,Rn=Ue<De.current-Bu;Rn&&!wt&&!ut&&N&&!ke.current&&(we(!0),Le.current&&clearTimeout(Le.current),Le.current=setTimeout(()=>{we(!1),Le.current=null},$)),$t&&N&&!ke.current&&!ut&&!Rn&&ce(),wt&&N&&!ke.current&&!ut&&ce(),De.current=Ue,Me.current=ze},[z,N,$,ce]),xe=bB(),$e=v.useCallback(()=>{xe.request(re)},[xe,re]);v.useEffect(()=>{const Ee=B.current,Ue=K.current;if(!Ee)return;const ze=()=>{$e()};Ee.addEventListener("scroll",ze,{passive:!0});const Ne=FN(re);return Ne!==null&&(Ne.observe(Ee),Ue&&Ne.observe(Ue)),()=>{Ee.removeEventListener("scroll",ze),Ne?.disconnect(),xe.dispose()}},[re,$e,xe]),v.useEffect(()=>{A!==void 0&&N&&(ke.current||ce())},[A,N,ce]),v.useEffect(()=>{if(!Z)return;const Ee=B.current;if(!Ee)return;const Ue=ze=>{const Ne=ze.deltaY;if(Ne===0)return;const Ie=Ee.scrollHeight-Ee.clientHeight;if(Ie<=0)return;const ut=Ee.scrollTop,Be=ut<=0&&Ne<0,Rt=ut>=Ie-.5&&Ne>0;Be||Rt||ze.stopPropagation()};return Ee.addEventListener("wheel",Ue,{passive:!0}),()=>Ee.removeEventListener("wheel",Ue)},[Z]),v.useEffect(()=>{if(!te)return;const Ee=B.current;if(!Ee)return;const Ue=Ne=>{const Ie=Dy({deltaX:Ne.deltaX,deltaY:Ne.deltaY,mapVerticalWheelToHorizontal:se});if(Ie===null)return;const ut=Ee.scrollWidth-Ee.clientWidth;if(ut<=0)return;const Be=Ee.scrollLeft;if(!(Ie<0&&Be<=0)&&!(Ie>0&&Be>=ut-.5)){if(!se){Ne.stopPropagation();return}Ne.preventDefault(),Ee.scrollLeft=Be+Ie}},ze=se?{passive:!1,capture:!0}:{passive:!0,capture:!0};return Ee.addEventListener("wheel",Ue,ze),()=>Ee.removeEventListener("wheel",Ue,ze)},[te,se]);const Xe=R!==void 0||T!==void 0,Ye=_!==void 0||D!==void 0,ht=Xe||Ye,Qe=Xe?R??24:0,yt=Xe?T??24:0,kt=Ye?_??24:0,tt=Ye?D??24:0,Tt=y==="hover",[_t,st]=v.useState(!1);v.useLayoutEffect(()=>{Tt&&st(W.current?.matches(":hover")??!1)},[Tt]);const vt=v.useCallback(Ee=>{st(!0),q?.(Ee)},[q]),Dt=v.useCallback(Ee=>{st(!1),L?.(Ee)},[L]),Pt=Tt&&!_t&&!k;v.useEffect(()=>()=>{Le.current&&clearTimeout(Le.current),He.current!==null&&(cancelAnimationFrame(He.current),He.current=null)},[]);const At={"--scroll-area-scroll-padding":`${Y}px`,...H!==void 0?{"--scrollbar-inset":`${H}px`}:void 0},X=Kt({rootClass:"ui-scroll-area",stylexStyles:[CB(),c],className:nn(ht&&"ui-scroll-area--masked",a),style:{height:n,maxHeight:r,width:s,...At,...b}}),he=Kt({rootClass:"ui-scroll-area__viewport",stylexStyles:[_B({direction:S}),d,ht?wB({topFadePx:ue?Qe:0,bottomFadePx:fe?yt:0,topFadeStartOpacity:E,bottomFadeStartOpacity:C,startFadePx:_e?kt:0,endFadePx:ye?tt:0}):null],className:l,style:f?{overscrollBehavior:"auto"}:void 0}),je=Kt({rootClass:"ui-scroll-area__content",stylexStyles:[NB(S),h]}),Ze=Kt({rootClass:"ui-scroll-area__scrollbar",stylexStyles:vE({direction:S,orientation:"vertical",visibility:y})}),St=jt(xE("vertical",Pt)),at=Kt({rootClass:"ui-scroll-area__scrollbar",stylexStyles:vE({direction:S,orientation:"horizontal",visibility:y})}),qe=jt(xE("horizontal",Pt));return g.jsxs("div",{ref:W,className:X.className,style:X.style,"data-scroll-padding":Y,"data-visibility":y,"data-direction":S,...F,onPointerEnter:Tt?vt:q,onPointerLeave:Tt?Dt:L,children:[g.jsx("div",{ref:B,className:he.className,style:he.style,"data-native-scrollbar":"none",children:g.jsx("div",{ref:K,className:je.className,style:je.style,children:t})}),m,Z&&g.jsx("div",{ref:O,className:Ze.className,style:Ze.style,"data-orientation":"vertical","data-scrollable":"false",role:"presentation","aria-hidden":"true",children:g.jsx("div",{ref:P,className:St.className,style:St.style,"data-orientation":"vertical"})}),te&&g.jsx("div",{ref:V,className:at.className,style:at.style,"data-orientation":"horizontal","data-scrollable":"false",role:"presentation","aria-hidden":"true",children:g.jsx("div",{ref:j,className:qe.className,style:qe.style,"data-orientation":"horizontal"})})]})}),Tb={root:{kzQI83:"ui-1iyjqo2",kmuXW:"ui-s83m0k",kCS8Yb:"ui-dl72j9",kAzted:"ui-2lwn1j",k7Eaqz:"ui-euugli",$$css:!0},rootHidden:{k1xSpc:"ui-1s85apg",$$css:!0},viewport:{kaPefq:"ui-1uzft2t",k9lH4S:"ui-pt7jon",$$css:!0}};function OB({children:e,hidden:t=!1,ref:n}){return g.jsx(Sl,{ref:n,"data-component":"list-popup-scroll",maxHeight:"none",rootStyle:[Tb.root,t&&Tb.rootHidden],viewportStyle:Tb.viewport,children:e})}const Rh="top",mx=300,Ch=100;function MB(e){const[t,n="center"]=e.split("-");return{side:t,align:n}}function IB(e){return typeof e=="number"?{sideOffset:e}:{sideOffset:e.mainAxis,alignOffset:e.alignmentAxis}}function DB(e){return e?{side:"flip",align:"shift",fallbackAxisSide:"none"}:{side:"flip",align:"shift",fallbackAxisSide:"start"}}function _h(e,t,n){const{side:r,align:s}=v.useMemo(()=>MB(e),[e]),{sideOffset:a,alignOffset:l}=v.useMemo(()=>IB(t),[t]),c=v.useMemo(()=>DB(n),[n]);return{side:r,align:s,sideOffset:a,alignOffset:l,collisionAvoidance:c,positionMethod:"fixed"}}const LB=v.forwardRef(function(t,n){const{render:r,className:s,id:a,name:l,value:c,disabled:d=!1,onValueChange:f,defaultValue:h,autoFocus:m=!1,style:b,...y}=t,{state:k,name:S,disabled:R,setTouched:T,setDirty:E,validityData:C,setFocused:_,setFilled:D,validationMode:N,validation:A}=kh(),{clearErrors:$}=vN(),z=R||d,I=S??l,Y={...k,disabled:z},{labelId:H}=lx(),q=cx({id:a});Ge(()=>{const O=c!=null;A.inputRef.current?.value||O&&c!==""?D(!0):O&&c===""&&D(!1)},[A.inputRef,D,c]);const L=v.useRef(null);Ge(()=>{m&&L.current===ar(Vt(L.current))&&_(!0)},[m,_]);const[F]=kl({controlled:c,default:h,name:"FieldControl",state:"value"}),U=c!==void 0,W=U?F:void 0,B=We(()=>A.inputRef.current?.value);return yN(A.inputRef,q,W,B,!z,l),hn("input",t,{ref:[n,L],state:Y,props:[{id:q,disabled:z,name:I,ref:A.inputRef,"aria-labelledby":H,autoFocus:m,...U?{value:W}:{defaultValue:h},onChange(O){const P=O.currentTarget.value;f?.(P,xt(Si,O.nativeEvent)),E(P!==C.initialValue),D(P!==""),O.nativeEvent.defaultPrevented||($(I),A.change(P))},onFocus(){_(!0)},onBlur(O){T(!0),_(!1),N==="onBlur"&&A.commit(O.currentTarget.value)},onKeyDown(O){O.currentTarget.tagName==="INPUT"&&O.key==="Enter"&&(T(!0),A.commit(O.currentTarget.value))}},y,O=>A.getValidationProps(z,O)],stateAttributesMapping:qc})}),jB=v.forwardRef(function(t,n){return g.jsx(LB,{ref:n,...t})});var zB=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Dp=zB.join(","),UN=typeof Element>"u",wl=UN?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Lp=!UN&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},jp=function(t,n){var r;n===void 0&&(n=!0);var s=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),a=s===""||s==="true",l=a||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):jp(t.parentNode));return l},PB=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},qN=function(t,n,r){if(jp(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(Dp));return n&&wl.call(t,Dp)&&s.unshift(t),s=s.filter(r),s},zp=function(t,n,r){for(var s=[],a=Array.from(t);a.length;){var l=a.shift();if(!jp(l,!1))if(l.tagName==="SLOT"){var c=l.assignedElements(),d=c.length?c:l.children,f=zp(d,!0,r);r.flatten?s.push.apply(s,f):s.push({scopeParent:l,candidates:f})}else{var h=wl.call(l,Dp);h&&r.filter(l)&&(n||!t.includes(l))&&s.push(l);var m=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),b=!jp(m,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(m&&b){var y=zp(m===!0?l.children:m.children,!0,r);r.flatten?s.push.apply(s,y):s.push({scopeParent:l,candidates:y})}else a.unshift.apply(a,l.children)}}return s},HN=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},GN=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||PB(t))&&!HN(t)?0:t.tabIndex},$B=function(t,n){var r=GN(t);return r<0&&n&&!HN(t)?0:r},BB=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},VN=function(t){return t.tagName==="INPUT"},FB=function(t){return VN(t)&&t.type==="hidden"},UB=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},qB=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},HB=function(t){if(!t.name)return!0;var n=t.form||Lp(t),r=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=r(window.CSS.escape(t.name));else try{s=r(t.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var a=qB(s,t.form);return!a||a===t},GB=function(t){return VN(t)&&t.type==="radio"},VB=function(t){return GB(t)&&!HB(t)},WB=function(t){var n,r=t&&Lp(t),s=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var l,c,d;for(a=!!((l=s)!==null&&l!==void 0&&(c=l.ownerDocument)!==null&&c!==void 0&&c.contains(s)||t!=null&&(d=t.ownerDocument)!==null&&d!==void 0&&d.contains(t));!a&&s;){var f,h,m;r=Lp(s),s=(f=r)===null||f===void 0?void 0:f.host,a=!!((h=s)!==null&&h!==void 0&&(m=h.ownerDocument)!==null&&m!==void 0&&m.contains(s))}}return a},kE=function(t){var n=t.getBoundingClientRect(),r=n.width,s=n.height;return r===0&&s===0},KB=function(t,n){var r=n.displayCheck,s=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var a=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!a}if(getComputedStyle(t).visibility==="hidden")return!0;var l=wl.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(wl.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof s=="function"){for(var d=t;t;){var f=t.parentElement,h=Lp(t);if(f&&!f.shadowRoot&&s(f)===!0)return kE(t);t.assignedSlot?t=t.assignedSlot:!f&&h!==t.ownerDocument?t=h.host:t=f}t=d}if(WB(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return kE(t);return!1},YB=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var s=n.children.item(r);if(s.tagName==="LEGEND")return wl.call(n,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}n=n.parentElement}return!1},Ly=function(t,n){return!(n.disabled||FB(n)||KB(n,t)||UB(n)||YB(n))},jy=function(t,n){return!(VB(n)||GN(n)<0||!Ly(t,n))},XB=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},WN=function(t){var n=[],r=[];return t.forEach(function(s,a){var l=!!s.scopeParent,c=l?s.scopeParent:s,d=$B(c,l),f=l?WN(s.candidates):c;d===0?l?n.push.apply(n,f):n.push(c):r.push({documentOrder:a,tabIndex:d,item:s,isScope:l,content:f})}),r.sort(BB).reduce(function(s,a){return a.isScope?s.push.apply(s,a.content):s.push(a.content),s},[]).concat(n)},Nh=function(t,n){n=n||{};var r;return n.getShadowRoot?r=zp([t],n.includeContainer,{filter:jy.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:XB}):r=qN(t,n.includeContainer,jy.bind(null,n)),WN(r)},ZB=function(t,n){n=n||{};var r;return n.getShadowRoot?r=zp([t],n.includeContainer,{filter:Ly.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=qN(t,n.includeContainer,Ly.bind(null,n)),r},KN=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return wl.call(t,Dp)===!1?!1:jy(n,t)};function QB(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function YN(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function JB(){return/apple/i.test(navigator.vendor)}function zy(){const e=/android/i;return e.test(QB())||e.test(YN())}function e4(){return YN().includes("jsdom/")}const SE="data-floating-ui-focusable",t4="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Rb="ArrowLeft",Cb="ArrowRight",n4="ArrowUp",r4="ArrowDown";function ro(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function gr(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&po(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function io(e){return"composedPath"in e?e.composedPath()[0]:e.target}function _b(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function i4(e){return e.matches("html,body")}function lr(e){return e?.ownerDocument||document}function XN(e){return zt(e)&&e.matches(t4)}function Py(e){return e?e.getAttribute("role")==="combobox"&&XN(e):!1}function Pp(e){return e?e.hasAttribute(SE)?e:e.querySelector("["+SE+"]")||e:null}function Xo(e,t,n){return n===void 0&&(n=!0),e.filter(s=>{var a;return s.parentId===t&&(!n||((a=s.context)==null?void 0:a.open))}).flatMap(s=>[s,...Xo(e,s.id,n)])}function s4(e,t){let n,r=-1;function s(a,l){l>r&&(n=a,r=l),Xo(e,a).forEach(d=>{s(d.id,l+1)})}return s(t,0),e.find(a=>a.id===n)}function wE(e,t){var n;let r=[],s=(n=e.find(a=>a.id===t))==null?void 0:n.parentId;for(;s;){const a=e.find(l=>l.id===s);s=a?.parentId,a&&(r=r.concat(a))}return r}function tr(e){e.preventDefault(),e.stopPropagation()}function o4(e){return"nativeEvent"in e}function ZN(e){return e.mozInputSource===0&&e.isTrusted?!0:zy()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function QN(e){return e4()?!1:!zy()&&e.width===0&&e.height===0||zy()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function yc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var a4=typeof document<"u",l4=function(){},pn=a4?v.useLayoutEffect:l4;const u4={...Tv};function Yn(e){const t=v.useRef(e);return pn(()=>{t.current=e}),t}const c4=u4.useInsertionEffect,f4=c4||(e=>e());function Ln(e){const t=v.useRef(()=>{});return f4(()=>{t.current=e}),v.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return t.current==null?void 0:t.current(...r)},[])}function Ad(e,t,n){return Math.floor(e/t)!==n}function ac(e,t){return t<0||t>=e.current.length}function Nb(e,t){return or(e,{disabledIndices:t})}function EE(e,t){return or(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function or(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:s,amount:a=1}=t===void 0?{}:t,l=n;do l+=r?-a:a;while(l>=0&&l<=e.current.length-1&&dp(e,l,s));return l}function d4(e,t){let{event:n,orientation:r,loop:s,rtl:a,cols:l,disabledIndices:c,minIndex:d,maxIndex:f,prevIndex:h,stopEvent:m=!1}=t,b=h;if(n.key===n4){if(m&&tr(n),h===-1)b=f;else if(b=or(e,{startingIndex:b,amount:l,decrement:!0,disabledIndices:c}),s&&(h-l<d||b<0)){const y=h%l,k=f%l,S=f-(k-y);k===y?b=f:b=k>y?S:S-l}ac(e,b)&&(b=h)}if(n.key===r4&&(m&&tr(n),h===-1?b=d:(b=or(e,{startingIndex:h,amount:l,disabledIndices:c}),s&&h+l>f&&(b=or(e,{startingIndex:h%l-l,amount:l,disabledIndices:c}))),ac(e,b)&&(b=h)),r==="both"){const y=al(h/l);n.key===(a?Rb:Cb)&&(m&&tr(n),h%l!==l-1?(b=or(e,{startingIndex:h,disabledIndices:c}),s&&Ad(b,l,y)&&(b=or(e,{startingIndex:h-h%l-1,disabledIndices:c}))):s&&(b=or(e,{startingIndex:h-h%l-1,disabledIndices:c})),Ad(b,l,y)&&(b=h)),n.key===(a?Cb:Rb)&&(m&&tr(n),h%l!==0?(b=or(e,{startingIndex:h,decrement:!0,disabledIndices:c}),s&&Ad(b,l,y)&&(b=or(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c}))):s&&(b=or(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c})),Ad(b,l,y)&&(b=h));const k=al(f/l)===y;ac(e,b)&&(s&&k?b=n.key===(a?Cb:Rb)?f:or(e,{startingIndex:h-h%l-1,disabledIndices:c}):b=h)}return b}function p4(e,t,n){const r=[];let s=0;return e.forEach((a,l)=>{let{width:c,height:d}=a,f=!1;for(n&&(s=0);!f;){const h=[];for(let m=0;m<c;m++)for(let b=0;b<d;b++)h.push(s+m+b*t);s%t+c<=t&&h.every(m=>r[m]==null)?(h.forEach(m=>{r[m]=l}),f=!0):s++}}),[...r]}function h4(e,t,n,r,s){if(e===-1)return-1;const a=n.indexOf(e),l=t[e];switch(s){case"tl":return a;case"tr":return l?a+l.width-1:a;case"bl":return l?a+(l.height-1)*r:a;case"br":return n.lastIndexOf(e)}}function m4(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function dp(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}const Hc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function JN(e,t){const n=Nh(e,Hc()),r=n.length;if(r===0)return;const s=ro(lr(e)),a=n.indexOf(s),l=a===-1?t===1?0:r-1:a+t;return n[l]}function eA(e){return JN(lr(e).body,1)||e}function tA(e){return JN(lr(e).body,-1)||e}function lc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!gr(n,r)}function g4(e){Nh(e,Hc()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function TE(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Gc(e){const t=v.useRef(void 0),n=v.useCallback(r=>{const s=e.map(a=>{if(a!=null){if(typeof a=="function"){const l=a,c=l(r);return typeof c=="function"?c:()=>{l(null)}}return a.current=r,()=>{a.current=null}}});return()=>{s.forEach(a=>a?.())}},e);return v.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function b4(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const nA=v.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function rA(e){const{children:t,elementsRef:n,labelsRef:r}=e,[s,a]=v.useState(()=>new Set),l=v.useCallback(f=>{a(h=>new Set(h).add(f))},[]),c=v.useCallback(f=>{a(h=>{const m=new Set(h);return m.delete(f),m})},[]),d=v.useMemo(()=>{const f=new Map;return Array.from(s.keys()).sort(b4).forEach((m,b)=>{f.set(m,b)}),f},[s]);return g.jsx(nA.Provider,{value:v.useMemo(()=>({register:l,unregister:c,map:d,elementsRef:n,labelsRef:r}),[l,c,d,n,r]),children:t})}function Ah(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:s,elementsRef:a,labelsRef:l}=v.useContext(nA),[c,d]=v.useState(null),f=v.useRef(null),h=v.useCallback(m=>{if(f.current=m,c!==null&&(a.current[c]=m,l)){var b;const y=t!==void 0;l.current[c]=y?t:(b=m?.textContent)!=null?b:null}},[c,a,l,t]);return pn(()=>{const m=f.current;if(m)return n(m),()=>{r(m)}},[n,r]),pn(()=>{const m=f.current?s.get(f.current):null;m!=null&&d(m)},[s]),v.useMemo(()=>({ref:h,index:c??-1}),[c,h])}const y4="data-floating-ui-focusable",RE="active",CE="selected",Vc="ArrowLeft",Wc="ArrowRight",iA="ArrowUp",Oh="ArrowDown",v4={...Tv};let _E=!1,x4=0;const NE=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+x4++;function k4(){const[e,t]=v.useState(()=>_E?NE():void 0);return pn(()=>{e==null&&t(NE())},[]),v.useEffect(()=>{_E=!0},[]),e}const S4=v4.useId,Mh=S4||k4;function sA(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(s=>s(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const oA=v.createContext(null),aA=v.createContext(null),ko=()=>{var e;return((e=v.useContext(oA))==null?void 0:e.id)||null},So=()=>v.useContext(aA);function gx(e){const t=Mh(),n=So(),s=ko();return pn(()=>{if(!t)return;const a={id:t,parentId:s};return n?.addNode(a),()=>{n?.removeNode(a)}},[n,t,s]),t}function bx(e){const{children:t,id:n}=e,r=ko();return g.jsx(oA.Provider,{value:v.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function w4(e){const{children:t}=e,n=v.useRef([]),r=v.useCallback(l=>{n.current=[...n.current,l]},[]),s=v.useCallback(l=>{n.current=n.current.filter(c=>c!==l)},[]),[a]=v.useState(()=>sA());return g.jsx(aA.Provider,{value:v.useMemo(()=>({nodesRef:n,addNode:r,removeNode:s,events:a}),[r,s,a]),children:t})}function El(e){return"data-floating-ui-"+e}function sr(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const AE=El("safe-polygon");function Ab(e,t,n){if(n&&!yc(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function Ob(e){return typeof e=="function"?e():e}function lA(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,events:a,elements:l}=e,{enabled:c=!0,delay:d=0,handleClose:f=null,mouseOnly:h=!1,restMs:m=0,move:b=!0}=t,y=So(),k=ko(),S=Yn(f),R=Yn(d),T=Yn(n),E=Yn(m),C=v.useRef(),_=v.useRef(-1),D=v.useRef(),N=v.useRef(-1),A=v.useRef(!0),$=v.useRef(!1),z=v.useRef(()=>{}),I=v.useRef(!1),Y=Ln(()=>{var W;const B=(W=s.current.openEvent)==null?void 0:W.type;return B?.includes("mouse")&&B!=="mousedown"});v.useEffect(()=>{if(!c)return;function W(B){let{open:K}=B;K||(sr(_),sr(N),A.current=!0,I.current=!1)}return a.on("openchange",W),()=>{a.off("openchange",W)}},[c,a]),v.useEffect(()=>{if(!c||!S.current||!n)return;function W(K){Y()&&r(!1,K,"hover")}const B=lr(l.floating).documentElement;return B.addEventListener("mouseleave",W),()=>{B.removeEventListener("mouseleave",W)}},[l.floating,n,r,c,S,Y]);const H=v.useCallback(function(W,B,K){B===void 0&&(B=!0),K===void 0&&(K="hover");const O=Ab(R.current,"close",C.current);O&&!D.current?(sr(_),_.current=window.setTimeout(()=>r(!1,W,K),O)):B&&(sr(_),r(!1,W,K))},[R,r]),q=Ln(()=>{z.current(),D.current=void 0}),L=Ln(()=>{if($.current){const W=lr(l.floating).body;W.style.pointerEvents="",W.removeAttribute(AE),$.current=!1}}),F=Ln(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);v.useEffect(()=>{if(!c)return;function W(V){if(sr(_),A.current=!1,h&&!yc(C.current)||Ob(E.current)>0&&!Ab(R.current,"open"))return;const j=Ab(R.current,"open",C.current);j?_.current=window.setTimeout(()=>{T.current||r(!0,V,"hover")},j):n||r(!0,V,"hover")}function B(V){if(F()){L();return}z.current();const j=lr(l.floating);if(sr(N),I.current=!1,S.current&&s.current.floatingContext){n||sr(_),D.current=S.current({...s.current.floatingContext,tree:y,x:V.clientX,y:V.clientY,onClose(){L(),q(),F()||H(V,!0,"safe-polygon")}});const te=D.current;j.addEventListener("mousemove",te),z.current=()=>{j.removeEventListener("mousemove",te)};return}(C.current!=="touch"||!gr(l.floating,V.relatedTarget))&&H(V)}function K(V){F()||s.current.floatingContext&&(S.current==null||S.current({...s.current.floatingContext,tree:y,x:V.clientX,y:V.clientY,onClose(){L(),q(),F()||H(V)}})(V))}function O(){sr(_)}function P(V){F()||H(V,!1)}if(ft(l.domReference)){const V=l.domReference,j=l.floating;return n&&V.addEventListener("mouseleave",K),b&&V.addEventListener("mousemove",W,{once:!0}),V.addEventListener("mouseenter",W),V.addEventListener("mouseleave",B),j&&(j.addEventListener("mouseleave",K),j.addEventListener("mouseenter",O),j.addEventListener("mouseleave",P)),()=>{n&&V.removeEventListener("mouseleave",K),b&&V.removeEventListener("mousemove",W),V.removeEventListener("mouseenter",W),V.removeEventListener("mouseleave",B),j&&(j.removeEventListener("mouseleave",K),j.removeEventListener("mouseenter",O),j.removeEventListener("mouseleave",P))}}},[l,c,e,h,b,H,q,L,r,n,T,y,R,S,s,F,E]),pn(()=>{var W;if(c&&n&&(W=S.current)!=null&&(W=W.__options)!=null&&W.blockPointerEvents&&Y()){$.current=!0;const K=l.floating;if(ft(l.domReference)&&K){var B;const O=lr(l.floating).body;O.setAttribute(AE,"");const P=l.domReference,V=y==null||(B=y.nodesRef.current.find(j=>j.id===k))==null||(B=B.context)==null?void 0:B.elements.floating;return V&&(V.style.pointerEvents=""),O.style.pointerEvents="none",P.style.pointerEvents="auto",K.style.pointerEvents="auto",()=>{O.style.pointerEvents="",P.style.pointerEvents="",K.style.pointerEvents=""}}}},[c,n,k,l,y,S,Y]),pn(()=>{n||(C.current=void 0,I.current=!1,q(),L())},[n,q,L]),v.useEffect(()=>()=>{q(),sr(_),sr(N),L()},[c,l.domReference,q,L]);const U=v.useMemo(()=>{function W(B){C.current=B.pointerType}return{onPointerDown:W,onPointerEnter:W,onMouseMove(B){const{nativeEvent:K}=B;function O(){!A.current&&!T.current&&r(!0,K,"hover")}h&&!yc(C.current)||n||Ob(E.current)===0||I.current&&B.movementX**2+B.movementY**2<2||(sr(N),C.current==="touch"?O():(I.current=!0,N.current=window.setTimeout(O,Ob(E.current))))}}},[h,r,n,T,E]);return v.useMemo(()=>c?{reference:U}:{},[c,U])}let OE=0;function Wo(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=t;r&&cancelAnimationFrame(OE);const a=()=>e?.focus({preventScroll:n});s?a():OE=requestAnimationFrame(a)}function Mb(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&po(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function E4(e){return"composedPath"in e?e.composedPath()[0]:e.target}function T4(e){return e?.ownerDocument||document}const dl={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function ME(e){return e==="inert"?dl.inert:e==="aria-hidden"?dl["aria-hidden"]:dl.none}let Od=new WeakSet,Md={},Ib=0;const R4=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,uA=e=>e&&(e.host||uA(e.parentNode)),C4=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=uA(n);return e.contains(r)?r:null}).filter(n=>n!=null);function _4(e,t,n,r){const s="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,l=C4(t,e),c=new Set,d=new Set(l),f=[];Md[s]||(Md[s]=new WeakMap);const h=Md[s];l.forEach(m),b(t),c.clear();function m(y){!y||c.has(y)||(c.add(y),y.parentNode&&m(y.parentNode))}function b(y){!y||d.has(y)||[].forEach.call(y.children,k=>{if(Wn(k)!=="script")if(c.has(k))b(k);else{const S=a?k.getAttribute(a):null,R=S!==null&&S!=="false",T=ME(a),E=(T.get(k)||0)+1,C=(h.get(k)||0)+1;T.set(k,E),h.set(k,C),f.push(k),E===1&&R&&Od.add(k),C===1&&k.setAttribute(s,""),!R&&a&&k.setAttribute(a,a==="inert"?"":"true")}})}return Ib++,()=>{f.forEach(y=>{const k=ME(a),R=(k.get(y)||0)-1,T=(h.get(y)||0)-1;k.set(y,R),h.set(y,T),R||(!Od.has(y)&&a&&y.removeAttribute(a),Od.delete(y)),T||y.removeAttribute(s)}),Ib--,Ib||(dl.inert=new WeakMap,dl["aria-hidden"]=new WeakMap,dl.none=new WeakMap,Od=new WeakSet,Md={})}}function IE(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=T4(e[0]).body;return _4(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const Ih={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},$p=v.forwardRef(function(t,n){const[r,s]=v.useState();pn(()=>{JB()&&s("button")},[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[El("focus-guard")]:"",style:Ih};return g.jsx("span",{...t,...a})}),cA=v.createContext(null),DE=El("portal");function N4(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Mh(),s=fA(),[a,l]=v.useState(null),c=v.useRef(null);return pn(()=>()=>{a?.remove(),queueMicrotask(()=>{c.current=null})},[a]),pn(()=>{if(!r||c.current)return;const d=t?document.getElementById(t):null;if(!d)return;const f=document.createElement("div");f.id=r,f.setAttribute(DE,""),d.appendChild(f),c.current=f,l(f)},[t,r]),pn(()=>{if(n===null||!r||c.current)return;let d=n||s?.portalNode;d&&!rh(d)&&(d=d.current),d=d||document.body;let f=null;t&&(f=document.createElement("div"),f.id=t,d.appendChild(f));const h=document.createElement("div");h.id=r,h.setAttribute(DE,""),d=f||d,d.appendChild(h),c.current=h,l(h)},[t,n,r,s]),a}function yx(e){const{children:t,id:n,root:r,preserveTabOrder:s=!0}=e,a=N4({id:n,root:r}),[l,c]=v.useState(null),d=v.useRef(null),f=v.useRef(null),h=v.useRef(null),m=v.useRef(null),b=l?.modal,y=l?.open,k=!!l&&!l.modal&&l.open&&s&&!!(r||a);return v.useEffect(()=>{if(!a||!s||b)return;function S(R){a&&lc(R)&&(R.type==="focusin"?TE:g4)(a)}return a.addEventListener("focusin",S,!0),a.addEventListener("focusout",S,!0),()=>{a.removeEventListener("focusin",S,!0),a.removeEventListener("focusout",S,!0)}},[a,s,b]),v.useEffect(()=>{a&&(y||TE(a))},[y,a]),g.jsxs(cA.Provider,{value:v.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:h,afterInsideRef:m,portalNode:a,setFocusManagerState:c}),[s,a]),children:[k&&a&&g.jsx($p,{"data-type":"outside",ref:d,onFocus:S=>{if(lc(S,a)){var R;(R=h.current)==null||R.focus()}else{const T=l?l.domReference:null,E=tA(T);E?.focus()}}}),k&&a&&g.jsx("span",{"aria-owns":a.id,style:Ih}),a&&Ti.createPortal(t,a),k&&a&&g.jsx($p,{"data-type":"outside",ref:f,onFocus:S=>{if(lc(S,a)){var R;(R=m.current)==null||R.focus()}else{const T=l?l.domReference:null,E=eA(T);E?.focus(),l?.closeOnFocusOut&&l?.onOpenChange(!1,S.nativeEvent,"focus-out")}}})]})}const fA=()=>v.useContext(cA);function LE(e){return v.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const A4=20;let oo=[];function vx(){oo=oo.filter(e=>e.isConnected)}function O4(e){vx(),e&&Wn(e)!=="body"&&(oo.push(e),oo.length>A4&&(oo=oo.slice(-20)))}function jE(){return vx(),oo[oo.length-1]}function M4(e){const t=Hc();return KN(e,t)?e:Nh(e,t)[0]||e}function zE(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Hc(),a=ZB(e,r).filter(c=>{const d=c.getAttribute("data-tabindex")||"";return KN(c,r)||c.hasAttribute("data-tabindex")&&!d.startsWith("-")}),l=e.getAttribute("tabindex");t.current.includes("floating")||a.length===0?l!=="0"&&e.setAttribute("tabindex","0"):(l!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const I4=v.forwardRef(function(t,n){return g.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:Ih})});function xx(e){const{context:t,children:n,disabled:r=!1,order:s=["content"],guards:a=!0,initialFocus:l=0,returnFocus:c=!0,restoreFocus:d=!1,modal:f=!0,visuallyHiddenDismiss:h=!1,closeOnFocusOut:m=!0,outsideElementsInert:b=!1,getInsideElements:y=()=>[]}=e,{open:k,onOpenChange:S,events:R,dataRef:T,elements:{domReference:E,floating:C}}=t,_=Ln(()=>{var oe;return(oe=T.current.floatingContext)==null?void 0:oe.nodeId}),D=Ln(y),N=typeof l=="number"&&l<0,A=Py(E)&&N,$=R4(),z=$?a:!0,I=!z||$&&b,Y=Yn(s),H=Yn(l),q=Yn(c),L=So(),F=fA(),U=v.useRef(null),W=v.useRef(null),B=v.useRef(!1),K=v.useRef(!1),O=v.useRef(-1),P=v.useRef(-1),V=F!=null,j=Pp(C),Z=Ln(function(oe){return oe===void 0&&(oe=j),oe?Nh(oe,Hc()):[]}),te=Ln(oe=>{const ye=Z(oe);return Y.current.map(Se=>E&&Se==="reference"?E:j&&Se==="floating"?j:ye).filter(Boolean).flat()});v.useEffect(()=>{if(r||!f)return;function oe(Se){if(Se.key==="Tab"){gr(j,ro(lr(j)))&&Z().length===0&&!A&&tr(Se);const Oe=te(),we=io(Se);Y.current[0]==="reference"&&we===E&&(tr(Se),Se.shiftKey?Wo(Oe[Oe.length-1]):Wo(Oe[1])),Y.current[1]==="floating"&&we===j&&Se.shiftKey&&(tr(Se),Wo(Oe[0]))}}const ye=lr(j);return ye.addEventListener("keydown",oe),()=>{ye.removeEventListener("keydown",oe)}},[r,E,j,f,Y,A,Z,te]),v.useEffect(()=>{if(r||!C)return;function oe(ye){const Se=io(ye),we=Z().indexOf(Se);we!==-1&&(O.current=we)}return C.addEventListener("focusin",oe),()=>{C.removeEventListener("focusin",oe)}},[r,C,Z]),v.useEffect(()=>{if(r||!m)return;function oe(){K.current=!0,setTimeout(()=>{K.current=!1})}function ye(we){const ke=we.relatedTarget,De=we.currentTarget,Me=io(we);queueMicrotask(()=>{const Le=_(),He=!(gr(E,ke)||gr(C,ke)||gr(ke,C)||gr(F?.portalNode,ke)||ke!=null&&ke.hasAttribute(El("focus-guard"))||L&&(Xo(L.nodesRef.current,Le).find(be=>{var Re,ee;return gr((Re=be.context)==null?void 0:Re.elements.floating,ke)||gr((ee=be.context)==null?void 0:ee.elements.domReference,ke)})||wE(L.nodesRef.current,Le).find(be=>{var Re,ee,ce;return[(Re=be.context)==null?void 0:Re.elements.floating,Pp((ee=be.context)==null?void 0:ee.elements.floating)].includes(ke)||((ce=be.context)==null?void 0:ce.elements.domReference)===ke})));if(De===E&&j&&zE(j,Y),d&&De!==E&&!(Me!=null&&Me.isConnected)&&ro(lr(j))===lr(j).body){zt(j)&&j.focus();const be=O.current,Re=Z(),ee=Re[be]||Re[Re.length-1]||j;zt(ee)&&ee.focus()}if(T.current.insideReactTree){T.current.insideReactTree=!1;return}(A||!f)&&ke&&He&&!K.current&&ke!==jE()&&(B.current=!0,S(!1,we,"focus-out"))})}const Se=!!(!L&&F);function Oe(){sr(P),T.current.insideReactTree=!0,P.current=window.setTimeout(()=>{T.current.insideReactTree=!1})}if(C&&zt(E))return E.addEventListener("focusout",ye),E.addEventListener("pointerdown",oe),C.addEventListener("focusout",ye),Se&&C.addEventListener("focusout",Oe,!0),()=>{E.removeEventListener("focusout",ye),E.removeEventListener("pointerdown",oe),C.removeEventListener("focusout",ye),Se&&C.removeEventListener("focusout",Oe,!0)}},[r,E,C,j,f,L,F,S,m,d,Z,A,_,Y,T]);const se=v.useRef(null),ue=v.useRef(null),le=LE([se,F?.beforeInsideRef]),fe=LE([ue,F?.afterInsideRef]);v.useEffect(()=>{var oe,ye;if(r||!C)return;const Se=Array.from((F==null||(oe=F.portalNode)==null?void 0:oe.querySelectorAll("["+El("portal")+"]"))||[]),we=(ye=(L?wE(L.nodesRef.current,_()):[]).find(Me=>{var Le;return Py(((Le=Me.context)==null?void 0:Le.elements.domReference)||null)}))==null||(ye=ye.context)==null?void 0:ye.elements.domReference,ke=[C,we,...Se,...D(),U.current,W.current,se.current,ue.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,Y.current.includes("reference")||A?E:null].filter(Me=>Me!=null),De=f||A?IE(ke,!I,I):IE(ke);return()=>{De()}},[r,E,C,f,Y,F,A,z,I,L,_,D]),pn(()=>{if(r||!zt(j))return;const oe=lr(j),ye=ro(oe);queueMicrotask(()=>{const Se=te(j),Oe=H.current,we=(typeof Oe=="number"?Se[Oe]:Oe.current)||j,ke=gr(j,ye);!N&&!ke&&k&&Wo(we,{preventScroll:we===j})})},[r,k,j,N,te,H]),pn(()=>{if(r||!j)return;const oe=lr(j),ye=ro(oe);O4(ye);function Se(ke){let{reason:De,event:Me,nested:Le}=ke;if(["hover","safe-polygon"].includes(De)&&Me.type==="mouseleave"&&(B.current=!0),De==="outside-press")if(Le)B.current=!1;else if(ZN(Me)||QN(Me))B.current=!1;else{let He=!1;document.createElement("div").focus({get preventScroll(){return He=!0,!1}}),He?B.current=!1:B.current=!0}}R.on("openchange",Se);const Oe=oe.createElement("span");Oe.setAttribute("tabindex","-1"),Oe.setAttribute("aria-hidden","true"),Object.assign(Oe.style,Ih),V&&E&&E.insertAdjacentElement("afterend",Oe);function we(){if(typeof q.current=="boolean"){const ke=E||jE();return ke&&ke.isConnected?ke:Oe}return q.current.current||Oe}return()=>{R.off("openchange",Se);const ke=ro(oe),De=gr(C,ke)||L&&Xo(L.nodesRef.current,_(),!1).some(Le=>{var He;return gr((He=Le.context)==null?void 0:He.elements.floating,ke)}),Me=we();queueMicrotask(()=>{const Le=M4(Me);q.current&&!B.current&&zt(Le)&&(!(Le!==ke&&ke!==oe.body)||De)&&Le.focus({preventScroll:!0}),Oe.remove()})}},[r,C,j,q,T,R,L,V,E,_]),v.useEffect(()=>(queueMicrotask(()=>{B.current=!1}),()=>{queueMicrotask(vx)}),[r]),pn(()=>{if(!r&&F)return F.setFocusManagerState({modal:f,closeOnFocusOut:m,open:k,onOpenChange:S,domReference:E}),()=>{F.setFocusManagerState(null)}},[r,F,f,k,S,m,E]),pn(()=>{r||j&&zE(j,Y)},[r,j,Y]);function ge(oe){return r||!h||!f?null:g.jsx(I4,{ref:oe==="start"?U:W,onClick:ye=>S(!1,ye.nativeEvent),children:typeof h=="string"?h:"Dismiss"})}const _e=!r&&z&&(f?!A:!0)&&(V||f);return g.jsxs(g.Fragment,{children:[_e&&g.jsx($p,{"data-type":"inside",ref:le,onFocus:oe=>{if(f){const Se=te();Wo(s[0]==="reference"?Se[0]:Se[Se.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(B.current=!1,lc(oe,F.portalNode)){const Se=eA(E);Se?.focus()}else{var ye;(ye=F.beforeOutsideRef.current)==null||ye.focus()}}}),!A&&ge("start"),n,ge("end"),_e&&g.jsx($p,{"data-type":"inside",ref:fe,onFocus:oe=>{if(f)Wo(te()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(m&&(B.current=!0),lc(oe,F.portalNode)){const Se=tA(E);Se?.focus()}else{var ye;(ye=F.afterOutsideRef.current)==null||ye.focus()}}})]})}function PE(e){return zt(e.target)&&e.target.tagName==="BUTTON"}function D4(e){return zt(e.target)&&e.target.tagName==="A"}function $E(e){return XN(e)}function dA(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,elements:{domReference:a}}=e,{enabled:l=!0,event:c="click",toggle:d=!0,ignoreMouse:f=!1,keyboardHandlers:h=!0,stickIfOpen:m=!0}=t,b=v.useRef(),y=v.useRef(!1),k=v.useMemo(()=>({onPointerDown(S){b.current=S.pointerType},onMouseDown(S){const R=b.current;S.button===0&&c!=="click"&&(yc(R,!0)&&f||(n&&d&&(!(s.current.openEvent&&m)||s.current.openEvent.type==="mousedown")?r(!1,S.nativeEvent,"click"):(S.preventDefault(),r(!0,S.nativeEvent,"click"))))},onClick(S){const R=b.current;if(c==="mousedown"&&b.current){b.current=void 0;return}yc(R,!0)&&f||(n&&d&&(!(s.current.openEvent&&m)||s.current.openEvent.type==="click")?r(!1,S.nativeEvent,"click"):r(!0,S.nativeEvent,"click"))},onKeyDown(S){b.current=void 0,!(S.defaultPrevented||!h||PE(S))&&(S.key===" "&&!$E(a)&&(S.preventDefault(),y.current=!0),!D4(S)&&S.key==="Enter"&&r(!(n&&d),S.nativeEvent,"click"))},onKeyUp(S){S.defaultPrevented||!h||PE(S)||$E(a)||S.key===" "&&y.current&&(y.current=!1,r(!(n&&d),S.nativeEvent,"click"))}}),[s,a,c,f,h,r,n,m,d]);return v.useMemo(()=>l?{reference:k}:{},[l,k])}const L4={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},j4={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},BE=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function pA(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:s,dataRef:a}=e,{enabled:l=!0,escapeKey:c=!0,outsidePress:d=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:b=!1,bubbles:y,capture:k}=t,S=So(),R=Ln(typeof d=="function"?d:()=>!1),T=typeof d=="function"?R:d,E=v.useRef(!1),{escapeKey:C,outsidePress:_}=BE(y),{escapeKey:D,outsidePress:N}=BE(k),A=v.useRef(!1),$=Ln(L=>{var F;if(!n||!l||!c||L.key!=="Escape"||A.current)return;const U=(F=a.current.floatingContext)==null?void 0:F.nodeId,W=S?Xo(S.nodesRef.current,U):[];if(!C&&(L.stopPropagation(),W.length>0)){let B=!0;if(W.forEach(K=>{var O;if((O=K.context)!=null&&O.open&&!K.context.dataRef.current.__escapeKeyBubbles){B=!1;return}}),!B)return}r(!1,o4(L)?L.nativeEvent:L,"escape-key")}),z=Ln(L=>{var F;const U=()=>{var W;$(L),(W=io(L))==null||W.removeEventListener("keydown",U)};(F=io(L))==null||F.addEventListener("keydown",U)}),I=Ln(L=>{var F;const U=a.current.insideReactTree;a.current.insideReactTree=!1;const W=E.current;if(E.current=!1,f==="click"&&W||U||typeof T=="function"&&!T(L))return;const B=io(L),K="["+El("inert")+"]",O=lr(s.floating).querySelectorAll(K);let P=ft(B)?B:null;for(;P&&!fi(P);){const te=qi(P);if(fi(te)||!ft(te))break;P=te}if(O.length&&ft(B)&&!i4(B)&&!gr(B,s.floating)&&Array.from(O).every(te=>!gr(P,te)))return;if(zt(B)&&q){const te=fi(B),se=fr(B),ue=/auto|scroll/,le=te||ue.test(se.overflowX),fe=te||ue.test(se.overflowY),ge=le&&B.clientWidth>0&&B.scrollWidth>B.clientWidth,_e=fe&&B.clientHeight>0&&B.scrollHeight>B.clientHeight,oe=se.direction==="rtl",ye=_e&&(oe?L.offsetX<=B.offsetWidth-B.clientWidth:L.offsetX>B.clientWidth),Se=ge&&L.offsetY>B.clientHeight;if(ye||Se)return}const V=(F=a.current.floatingContext)==null?void 0:F.nodeId,j=S&&Xo(S.nodesRef.current,V).some(te=>{var se;return _b(L,(se=te.context)==null?void 0:se.elements.floating)});if(_b(L,s.floating)||_b(L,s.domReference)||j)return;const Z=S?Xo(S.nodesRef.current,V):[];if(Z.length>0){let te=!0;if(Z.forEach(se=>{var ue;if((ue=se.context)!=null&&ue.open&&!se.context.dataRef.current.__outsidePressBubbles){te=!1;return}}),!te)return}r(!1,L,"outside-press")}),Y=Ln(L=>{var F;const U=()=>{var W;I(L),(W=io(L))==null||W.removeEventListener(f,U)};(F=io(L))==null||F.addEventListener(f,U)});v.useEffect(()=>{if(!n||!l)return;a.current.__escapeKeyBubbles=C,a.current.__outsidePressBubbles=_;let L=-1;function F(O){r(!1,O,"ancestor-scroll")}function U(){window.clearTimeout(L),A.current=!0}function W(){L=window.setTimeout(()=>{A.current=!1},sh()?5:0)}const B=lr(s.floating);c&&(B.addEventListener("keydown",D?z:$,D),B.addEventListener("compositionstart",U),B.addEventListener("compositionend",W)),T&&B.addEventListener(f,N?Y:I,N);let K=[];return b&&(ft(s.domReference)&&(K=ao(s.domReference)),ft(s.floating)&&(K=K.concat(ao(s.floating))),!ft(s.reference)&&s.reference&&s.reference.contextElement&&(K=K.concat(ao(s.reference.contextElement)))),K=K.filter(O=>{var P;return O!==((P=B.defaultView)==null?void 0:P.visualViewport)}),K.forEach(O=>{O.addEventListener("scroll",F,{passive:!0})}),()=>{c&&(B.removeEventListener("keydown",D?z:$,D),B.removeEventListener("compositionstart",U),B.removeEventListener("compositionend",W)),T&&B.removeEventListener(f,N?Y:I,N),K.forEach(O=>{O.removeEventListener("scroll",F)}),window.clearTimeout(L)}},[a,s,c,T,f,n,r,b,l,C,_,$,D,z,I,N,Y]),v.useEffect(()=>{a.current.insideReactTree=!1},[a,T,f]);const H=v.useMemo(()=>({onKeyDown:$,...h&&{[L4[m]]:L=>{r(!1,L.nativeEvent,"reference-press")},...m!=="click"&&{onClick(L){r(!1,L.nativeEvent,"reference-press")}}}}),[$,r,h,m]),q=v.useMemo(()=>({onKeyDown:$,onMouseDown(){E.current=!0},onMouseUp(){E.current=!0},[j4[f]]:()=>{a.current.insideReactTree=!0}}),[$,f,a]);return v.useMemo(()=>l?{reference:H,floating:q}:{},[l,H,q])}function z4(e){const{open:t=!1,onOpenChange:n,elements:r}=e,s=Mh(),a=v.useRef({}),[l]=v.useState(()=>sA()),c=ko()!=null,[d,f]=v.useState(r.reference),h=Ln((y,k,S)=>{a.current.openEvent=y?k:void 0,l.emit("openchange",{open:y,event:k,reason:S,nested:c}),n?.(y,k,S)}),m=v.useMemo(()=>({setPositionReference:f}),[]),b=v.useMemo(()=>({reference:d||r.reference||null,floating:r.floating||null,domReference:r.reference}),[d,r.reference,r.floating]);return v.useMemo(()=>({dataRef:a,open:t,onOpenChange:h,elements:b,events:l,floatingId:s,refs:m}),[t,h,b,l,s,m])}function kx(e){e===void 0&&(e={});const{nodeId:t}=e,n=z4({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,s=r.elements,[a,l]=v.useState(null),[c,d]=v.useState(null),h=s?.domReference||a,m=v.useRef(null),b=So();pn(()=>{h&&(m.current=h)},[h]);const y=R_({...e,elements:{...s,...c&&{reference:c}}}),k=v.useCallback(C=>{const _=ft(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),getClientRects:()=>C.getClientRects(),contextElement:C}:C;d(_),y.refs.setReference(_)},[y.refs]),S=v.useCallback(C=>{(ft(C)||C===null)&&(m.current=C,l(C)),(ft(y.refs.reference.current)||y.refs.reference.current===null||C!==null&&!ft(C))&&y.refs.setReference(C)},[y.refs]),R=v.useMemo(()=>({...y.refs,setReference:S,setPositionReference:k,domReference:m}),[y.refs,S,k]),T=v.useMemo(()=>({...y.elements,domReference:h}),[y.elements,h]),E=v.useMemo(()=>({...y,...r,refs:R,elements:T,nodeId:t}),[y,R,T,t,r]);return pn(()=>{r.dataRef.current.floatingContext=E;const C=b?.nodesRef.current.find(_=>_.id===t);C&&(C.context=E)}),v.useMemo(()=>({...y,context:E,refs:R,elements:T}),[y,R,T,E])}function Db(e,t,n){const r=new Map,s=n==="item";let a=e;if(s&&e){const{[RE]:l,[CE]:c,...d}=e;a=d}return{...n==="floating"&&{tabIndex:-1,[y4]:""},...a,...t.map(l=>{const c=l?l[n]:null;return typeof c=="function"?e?c(e):null:c}).concat(e).reduce((l,c)=>(c&&Object.entries(c).forEach(d=>{let[f,h]=d;if(!(s&&[RE,CE].includes(f)))if(f.indexOf("on")===0){if(r.has(f)||r.set(f,[]),typeof h=="function"){var m;(m=r.get(f))==null||m.push(h),l[f]=function(){for(var b,y=arguments.length,k=new Array(y),S=0;S<y;S++)k[S]=arguments[S];return(b=r.get(f))==null?void 0:b.map(R=>R(...k)).find(R=>R!==void 0)}}}else l[f]=h}),l),{})}}function hA(e){e===void 0&&(e=[]);const t=e.map(c=>c?.reference),n=e.map(c=>c?.floating),r=e.map(c=>c?.item),s=v.useCallback(c=>Db(c,e,"reference"),t),a=v.useCallback(c=>Db(c,e,"floating"),n),l=v.useCallback(c=>Db(c,e,"item"),r);return v.useMemo(()=>({getReferenceProps:s,getFloatingProps:a,getItemProps:l}),[s,a,l])}const P4="Escape";function Dh(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Id(e,t){return Dh(t,e===iA||e===Oh,e===Vc||e===Wc)}function Lb(e,t,n){return Dh(t,e===Oh,n?e===Vc:e===Wc)||e==="Enter"||e===" "||e===""}function FE(e,t,n){return Dh(t,n?e===Vc:e===Wc,e===Oh)}function UE(e,t,n,r){const s=n?e===Wc:e===Vc,a=e===iA;return t==="both"||t==="horizontal"&&r&&r>1?e===P4:Dh(t,s,a)}function mA(e,t){const{open:n,onOpenChange:r,elements:s,floatingId:a}=e,{listRef:l,activeIndex:c,onNavigate:d=()=>{},enabled:f=!0,selectedIndex:h=null,allowEscape:m=!1,loop:b=!1,nested:y=!1,rtl:k=!1,virtual:S=!1,focusItemOnOpen:R="auto",focusItemOnHover:T=!0,openOnArrowKeyDown:E=!0,disabledIndices:C=void 0,orientation:_="vertical",parentOrientation:D,cols:N=1,scrollItemIntoView:A=!0,virtualItemRef:$,itemSizes:z,dense:I=!1}=t,Y=Pp(s.floating),H=Yn(Y),q=ko(),L=So();pn(()=>{e.dataRef.current.orientation=_},[e,_]);const F=Ln(()=>{d(B.current===-1?null:B.current)}),U=Py(s.domReference),W=v.useRef(R),B=v.useRef(h??-1),K=v.useRef(null),O=v.useRef(!0),P=v.useRef(F),V=v.useRef(!!s.floating),j=v.useRef(n),Z=v.useRef(!1),te=v.useRef(!1),se=Yn(C),ue=Yn(n),le=Yn(A),fe=Yn(h),[ge,_e]=v.useState(),[oe,ye]=v.useState(),Se=Ln(()=>{function be(J){if(S){var re;(re=J.id)!=null&&re.endsWith("-fui-option")&&(J.id=a+"-"+Math.random().toString(16).slice(2,10)),_e(J.id),L?.events.emit("virtualfocus",J),$&&($.current=J)}else Wo(J,{sync:Z.current,preventScroll:!0})}const Re=l.current[B.current],ee=te.current;Re&&be(Re),(Z.current?J=>J():requestAnimationFrame)(()=>{const J=l.current[B.current]||Re;if(!J)return;Re||be(J);const re=le.current;re&&we&&(ee||!O.current)&&(J.scrollIntoView==null||J.scrollIntoView(typeof re=="boolean"?{block:"nearest",inline:"nearest"}:re))})});pn(()=>{f&&(n&&s.floating?W.current&&h!=null&&(te.current=!0,B.current=h,F()):V.current&&(B.current=-1,P.current()))},[f,n,s.floating,h,F]),pn(()=>{if(f&&n&&s.floating)if(c==null){if(Z.current=!1,fe.current!=null)return;if(V.current&&(B.current=-1,Se()),(!j.current||!V.current)&&W.current&&(K.current!=null||W.current===!0&&K.current==null)){let be=0;const Re=()=>{l.current[0]==null?(be<2&&(be?requestAnimationFrame:queueMicrotask)(Re),be++):(B.current=K.current==null||Lb(K.current,_,k)||y?Nb(l,se.current):EE(l,se.current),K.current=null,F())};Re()}}else ac(l,c)||(B.current=c,Se(),te.current=!1)},[f,n,s.floating,c,fe,y,l,_,k,F,Se,se]),pn(()=>{var be;if(!f||s.floating||!L||S||!V.current)return;const Re=L.nodesRef.current,ee=(be=Re.find(re=>re.id===q))==null||(be=be.context)==null?void 0:be.elements.floating,ce=ro(lr(s.floating)),J=Re.some(re=>re.context&&gr(re.context.elements.floating,ce));ee&&!J&&O.current&&ee.focus({preventScroll:!0})},[f,s.floating,L,q,S]),pn(()=>{if(!f||!L||!S||q)return;function be(Re){ye(Re.id),$&&($.current=Re)}return L.events.on("virtualfocus",be),()=>{L.events.off("virtualfocus",be)}},[f,L,S,q,$]),pn(()=>{P.current=F,j.current=n,V.current=!!s.floating}),pn(()=>{n||(K.current=null,W.current=R)},[n,R]);const Oe=c!=null,we=v.useMemo(()=>{function be(ee){if(!ue.current)return;const ce=l.current.indexOf(ee);ce!==-1&&B.current!==ce&&(B.current=ce,F())}return{onFocus(ee){let{currentTarget:ce}=ee;Z.current=!0,be(ce)},onClick:ee=>{let{currentTarget:ce}=ee;return ce.focus({preventScroll:!0})},onMouseMove(ee){let{currentTarget:ce}=ee;Z.current=!0,te.current=!1,T&&be(ce)},onPointerLeave(ee){let{pointerType:ce}=ee;if(!(!O.current||ce==="touch")&&(Z.current=!0,!!T&&(B.current=-1,F(),!S))){var J;(J=H.current)==null||J.focus({preventScroll:!0})}}}},[ue,H,T,l,F,S]),ke=v.useCallback(()=>{var be;return D??(L==null||(be=L.nodesRef.current.find(Re=>Re.id===q))==null||(be=be.context)==null||(be=be.dataRef)==null?void 0:be.current.orientation)},[q,L,D]),De=Ln(be=>{if(O.current=!1,Z.current=!0,be.which===229||!ue.current&&be.currentTarget===H.current)return;if(y&&UE(be.key,_,k,N)){Id(be.key,ke())||tr(be),r(!1,be.nativeEvent,"list-navigation"),zt(s.domReference)&&(S?L?.events.emit("virtualfocus",s.domReference):s.domReference.focus());return}const Re=B.current,ee=Nb(l,C),ce=EE(l,C);if(U||(be.key==="Home"&&(tr(be),B.current=ee,F()),be.key==="End"&&(tr(be),B.current=ce,F())),N>1){const J=z||Array.from({length:l.current.length},()=>({width:1,height:1})),re=p4(J,N,I),xe=re.findIndex(Ye=>Ye!=null&&!dp(l,Ye,C)),$e=re.reduce((Ye,ht,Qe)=>ht!=null&&!dp(l,ht,C)?Qe:Ye,-1),Xe=re[d4({current:re.map(Ye=>Ye!=null?l.current[Ye]:null)},{event:be,orientation:_,loop:b,rtl:k,cols:N,disabledIndices:m4([...(typeof C!="function"?C:null)||l.current.map((Ye,ht)=>dp(l,ht,C)?ht:void 0),void 0],re),minIndex:xe,maxIndex:$e,prevIndex:h4(B.current>ce?ee:B.current,J,re,N,be.key===Oh?"bl":be.key===(k?Vc:Wc)?"tr":"tl"),stopEvent:!0})];if(Xe!=null&&(B.current=Xe,F()),_==="both")return}if(Id(be.key,_)){if(tr(be),n&&!S&&ro(be.currentTarget.ownerDocument)===be.currentTarget){B.current=Lb(be.key,_,k)?ee:ce,F();return}Lb(be.key,_,k)?b?B.current=Re>=ce?m&&Re!==l.current.length?-1:ee:or(l,{startingIndex:Re,disabledIndices:C}):B.current=Math.min(ce,or(l,{startingIndex:Re,disabledIndices:C})):b?B.current=Re<=ee?m&&Re!==-1?l.current.length:ce:or(l,{startingIndex:Re,decrement:!0,disabledIndices:C}):B.current=Math.max(ee,or(l,{startingIndex:Re,decrement:!0,disabledIndices:C})),ac(l,B.current)&&(B.current=-1),F()}}),Me=v.useMemo(()=>S&&n&&Oe&&{"aria-activedescendant":oe||ge},[S,n,Oe,oe,ge]),Le=v.useMemo(()=>({"aria-orientation":_==="both"?void 0:_,...U?{}:Me,onKeyDown:De,onPointerMove(){O.current=!0}}),[Me,De,_,U]),He=v.useMemo(()=>{function be(ee){R==="auto"&&ZN(ee.nativeEvent)&&(W.current=!0)}function Re(ee){W.current=R,R==="auto"&&QN(ee.nativeEvent)&&(W.current=!0)}return{...Me,onKeyDown(ee){O.current=!1;const ce=ee.key.startsWith("Arrow"),J=["Home","End"].includes(ee.key),re=ce||J,xe=FE(ee.key,_,k),$e=UE(ee.key,_,k,N),Xe=FE(ee.key,ke(),k),Ye=Id(ee.key,_),ht=(y?Xe:Ye)||ee.key==="Enter"||ee.key.trim()==="";if(S&&n){const tt=L?.nodesRef.current.find(_t=>_t.parentId==null),Tt=L&&tt?s4(L.nodesRef.current,tt.id):null;if(re&&Tt&&$){const _t=new KeyboardEvent("keydown",{key:ee.key,bubbles:!0});if(xe||$e){var Qe,yt;const st=((Qe=Tt.context)==null?void 0:Qe.elements.domReference)===ee.currentTarget,vt=$e&&!st?(yt=Tt.context)==null?void 0:yt.elements.domReference:xe?l.current.find(Dt=>Dt?.id===ge):null;vt&&(tr(ee),vt.dispatchEvent(_t),ye(void 0))}if((Ye||J)&&Tt.context&&Tt.context.open&&Tt.parentId&&ee.currentTarget!==Tt.context.elements.domReference){var kt;tr(ee),(kt=Tt.context.elements.domReference)==null||kt.dispatchEvent(_t);return}}return De(ee)}if(!(!n&&!E&&ce)){if(ht){const tt=Id(ee.key,ke());K.current=y&&tt?null:ee.key}if(y){Xe&&(tr(ee),n?(B.current=Nb(l,se.current),F()):r(!0,ee.nativeEvent,"list-navigation"));return}Ye&&(h!=null&&(B.current=h),tr(ee),!n&&E?r(!0,ee.nativeEvent,"list-navigation"):De(ee),n&&F())}},onFocus(){n&&!S&&(B.current=-1,F())},onPointerDown:Re,onPointerEnter:Re,onMouseDown:be,onClick:be}},[ge,Me,N,De,se,R,l,y,F,r,n,E,_,ke,k,h,L,S,$]);return v.useMemo(()=>f?{reference:He,floating:Le,item:we}:{},[f,He,Le,we])}const $4=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function gA(e,t){var n,r;t===void 0&&(t={});const{open:s,elements:a,floatingId:l}=e,{enabled:c=!0,role:d="dialog"}=t,f=Mh(),h=((n=a.domReference)==null?void 0:n.id)||f,m=v.useMemo(()=>{var E;return((E=Pp(a.floating))==null?void 0:E.id)||l},[a.floating,l]),b=(r=$4.get(d))!=null?r:d,k=ko()!=null,S=v.useMemo(()=>b==="tooltip"||d==="label"?{["aria-"+(d==="label"?"labelledby":"describedby")]:s?m:void 0}:{"aria-expanded":s?"true":"false","aria-haspopup":b==="alertdialog"?"dialog":b,"aria-controls":s?m:void 0,...b==="listbox"&&{role:"combobox"},...b==="menu"&&{id:h},...b==="menu"&&k&&{role:"menuitem"},...d==="select"&&{"aria-autocomplete":"none"},...d==="combobox"&&{"aria-autocomplete":"list"}},[b,m,k,s,h,d]),R=v.useMemo(()=>{const E={id:m,...b&&{role:b}};return b==="tooltip"||d==="label"?E:{...E,...b==="menu"&&{"aria-labelledby":h}}},[b,m,h,d]),T=v.useCallback(E=>{let{active:C,selected:_}=E;const D={role:"option",...C&&{id:m+"-fui-option"}};switch(d){case"select":case"combobox":return{...D,"aria-selected":_}}return{}},[m,d]);return v.useMemo(()=>c?{reference:S,floating:R,item:T}:{},[c,S,R,T])}const qE=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Qa(e,t){return typeof e=="function"?e(t):e}function B4(e,t){const[n,r]=v.useState(e);return e&&!n&&r(!0),v.useEffect(()=>{if(!e&&n){const s=setTimeout(()=>r(!1),t);return()=>clearTimeout(s)}},[e,n,t]),n}function F4(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:s=250}=t,l=(typeof s=="number"?s:s.close)||0,[c,d]=v.useState("unmounted"),f=B4(n,l);return!f&&c==="close"&&d("unmounted"),pn(()=>{if(r){if(n){d("initial");const h=requestAnimationFrame(()=>{Ti.flushSync(()=>{d("open")})});return()=>{cancelAnimationFrame(h)}}d("close")}},[n,r]),{isMounted:f,status:c}}function bA(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:s,common:a,duration:l=250}=t,c=e.placement,d=c.split("-")[0],f=v.useMemo(()=>({side:d,placement:c}),[d,c]),h=typeof l=="number",m=(h?l:l.open)||0,b=(h?l:l.close)||0,[y,k]=v.useState(()=>({...Qa(a,f),...Qa(n,f)})),{isMounted:S,status:R}=F4(e,{duration:l}),T=Yn(n),E=Yn(r),C=Yn(s),_=Yn(a);return pn(()=>{const D=Qa(T.current,f),N=Qa(C.current,f),A=Qa(_.current,f),$=Qa(E.current,f)||Object.keys(D).reduce((z,I)=>(z[I]="",z),{});if(R==="initial"&&k(z=>({transitionProperty:z.transitionProperty,...A,...D})),R==="open"&&k({transitionProperty:Object.keys($).map(qE).join(","),transitionDuration:m+"ms",...A,...$}),R==="close"){const z=N||D;k({transitionProperty:Object.keys(z).map(qE).join(","),transitionDuration:b+"ms",...A,...z})}},[b,C,T,E,_,m,R,f]),{isMounted:S,styles:y}}function yA(e,t){var n;const{open:r,dataRef:s}=e,{listRef:a,activeIndex:l,onMatch:c,onTypingChange:d,enabled:f=!0,findMatch:h=null,resetMs:m=750,ignoreKeys:b=[],selectedIndex:y=null}=t,k=v.useRef(-1),S=v.useRef(""),R=v.useRef((n=y??l)!=null?n:-1),T=v.useRef(null),E=Ln(c),C=Ln(d),_=Yn(h),D=Yn(b);pn(()=>{r&&(sr(k),T.current=null,S.current="")},[r]),pn(()=>{if(r&&S.current===""){var I;R.current=(I=y??l)!=null?I:-1}},[r,y,l]);const N=Ln(I=>{I?s.current.typing||(s.current.typing=I,C(I)):s.current.typing&&(s.current.typing=I,C(I))}),A=Ln(I=>{function Y(U,W,B){const K=_.current?_.current(W,B):W.find(O=>O?.toLocaleLowerCase().indexOf(B.toLocaleLowerCase())===0);return K?U.indexOf(K):-1}const H=a.current;if(S.current.length>0&&S.current[0]!==" "&&(Y(H,H,S.current)===-1?N(!1):I.key===" "&&tr(I)),H==null||D.current.includes(I.key)||I.key.length!==1||I.ctrlKey||I.metaKey||I.altKey)return;r&&I.key!==" "&&(tr(I),N(!0)),H.every(U=>{var W,B;return U?((W=U[0])==null?void 0:W.toLocaleLowerCase())!==((B=U[1])==null?void 0:B.toLocaleLowerCase()):!0})&&S.current===I.key&&(S.current="",R.current=T.current),S.current+=I.key,sr(k),k.current=window.setTimeout(()=>{S.current="",R.current=T.current,N(!1)},m);const L=R.current,F=Y(H,[...H.slice((L||0)+1),...H.slice(0,(L||0)+1)],S.current);F!==-1?(E(F),T.current=F):I.key!==" "&&(S.current="",N(!1))}),$=v.useMemo(()=>({onKeyDown:A}),[A]),z=v.useMemo(()=>({onKeyDown:A,onKeyUp(I){I.key===" "&&N(!1)}}),[A,N]);return v.useMemo(()=>f?{reference:$,floating:z}:{},[f,$,z])}function vA(e,t,n){return n===void 0&&(n=!0),e.filter(s=>{var a;return s.parentId===t&&(!n||((a=s.context)==null?void 0:a.open))}).flatMap(s=>[s,...vA(e,s.id,n)])}function HE(e,t){const[n,r]=e;let s=!1;const a=t.length;for(let l=0,c=a-1;l<a;c=l++){const[d,f]=t[l]||[0,0],[h,m]=t[c]||[0,0];f>=r!=m>=r&&n<=(h-d)*(r-f)/(m-f)+d&&(s=!s)}return s}function U4(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function xA(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,s={current:-1};let a=!1,l=null,c=null,d=typeof performance<"u"?performance.now():0;function f(m,b){const y=performance.now(),k=y-d;if(l===null||c===null||k===0)return l=m,c=b,d=y,null;const S=m-l,R=b-c,E=Math.sqrt(S*S+R*R)/k;return l=m,c=b,d=y,E}const h=m=>{let{x:b,y,placement:k,elements:S,onClose:R,nodeId:T,tree:E}=m;return function(_){function D(){sr(s),R()}if(sr(s),!S.domReference||!S.floating||k==null||b==null||y==null)return;const{clientX:N,clientY:A}=_,$=[N,A],z=E4(_),I=_.type==="mouseleave",Y=Mb(S.floating,z),H=Mb(S.domReference,z),q=S.domReference.getBoundingClientRect(),L=S.floating.getBoundingClientRect(),F=k.split("-")[0],U=b>L.right-L.width/2,W=y>L.bottom-L.height/2,B=U4($,q),K=L.width>q.width,O=L.height>q.height,P=(K?q:L).left,V=(K?q:L).right,j=(O?q:L).top,Z=(O?q:L).bottom;if(Y&&(a=!0,!I))return;if(H&&(a=!1),H&&!I){a=!0;return}if(I&&ft(_.relatedTarget)&&Mb(S.floating,_.relatedTarget)||E&&vA(E.nodesRef.current,T).length)return;if(F==="top"&&y>=q.bottom-1||F==="bottom"&&y<=q.top+1||F==="left"&&b>=q.right-1||F==="right"&&b<=q.left+1)return D();let te=[];switch(F){case"top":te=[[P,q.top+1],[P,L.bottom-1],[V,L.bottom-1],[V,q.top+1]];break;case"bottom":te=[[P,L.top+1],[P,q.bottom-1],[V,q.bottom-1],[V,L.top+1]];break;case"left":te=[[L.right-1,Z],[L.right-1,j],[q.left+1,j],[q.left+1,Z]];break;case"right":te=[[q.right-1,Z],[q.right-1,j],[L.left+1,j],[L.left+1,Z]];break}function se(ue){let[le,fe]=ue;switch(F){case"top":{const ge=[K?le+t/2:U?le+t*4:le-t*4,fe+t+1],_e=[K?le-t/2:U?le+t*4:le-t*4,fe+t+1],oe=[[L.left,U||K?L.bottom-t:L.top],[L.right,U?K?L.bottom-t:L.top:L.bottom-t]];return[ge,_e,...oe]}case"bottom":{const ge=[K?le+t/2:U?le+t*4:le-t*4,fe-t],_e=[K?le-t/2:U?le+t*4:le-t*4,fe-t],oe=[[L.left,U||K?L.top+t:L.bottom],[L.right,U?K?L.top+t:L.bottom:L.top+t]];return[ge,_e,...oe]}case"left":{const ge=[le+t+1,O?fe+t/2:W?fe+t*4:fe-t*4],_e=[le+t+1,O?fe-t/2:W?fe+t*4:fe-t*4];return[...[[W||O?L.right-t:L.left,L.top],[W?O?L.right-t:L.left:L.right-t,L.bottom]],ge,_e]}case"right":{const ge=[le-t,O?fe+t/2:W?fe+t*4:fe-t*4],_e=[le-t,O?fe-t/2:W?fe+t*4:fe-t*4],oe=[[W||O?L.left+t:L.right,L.top],[W?O?L.left+t:L.right:L.left+t,L.bottom]];return[ge,_e,...oe]}}}if(!HE([N,A],te)){if(a&&!B)return D();if(!I&&r){const ue=f(_.clientX,_.clientY);if(ue!==null&&ue<.1)return D()}HE([N,A],se([b,y]))?!a&&r&&(s.current=window.setTimeout(D,40)):D()}}};return h.__options={blockPointerEvents:n},h}function kA(e){return hn(e.defaultTagName??"div",e,e)}const q4=v.createContext(void 0);function H4(){return v.useContext(q4)}const jb={base:{kVAEAm:"ui-10l6tqk",krVfgx:"ui-r0fw0u",kCIrl2:"ui-7zl9wm",kzqmXN:"ui-jwey39",kZKoxP:"ui-wbbb81",kaIpWk:"ui-16rqkct",kfzvcC:"ui-47corl",$$css:!0},colorBlue:{kWkggS:"ui-1b558e3",$$css:!0},colorGreen:{kWkggS:"ui-15xcjd2",$$css:!0}};function G4(e){return[jb.base,e==="green"?jb.colorGreen:jb.colorBlue]}function V4({color:e="blue",className:t}){const n=Kt({rootClass:"ui-indicator-dot",stylexStyles:G4(e),className:t});return g.jsx("span",{"aria-hidden":!0,className:n.className,"data-color":e,style:n.style})}const W4={root:{kysU6D:"ui-jyslct",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kmuXW:"ui-2lah0s",kB7OPa:"ui-9f619",kLKAdn:"ui-exx8yu",kwRFfy:"ui-yri2b",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1c1uobl",keoZOQ:"ui-dj266r",k71WvV:"ui-14z9mp",k1K539:"ui-at24cr",keTefX:"ui-1lziwak",kMzoRj:"ui-c342km",ksu8eU:"ui-ng3xce",kaIpWk:"ui-1e1y6u3 ui-r5ixlt ui-1yhsa9g",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-1qlqyl8",k63SB2:"ui-1pd3egz",kLWn49:"ui-15bjb6t",kkrTdU:"ui-1ypdohk ui-1j1ks5o",kSiTet:null,kfzvcC:"ui-67bb7w ui-7gqb9v",kVAEAm:"ui-1fxuinm",$$css:!0}},Dd={sm:{kzqmXN:"ui-16bvwqk",$$css:!0},md:{kzqmXN:"ui-1eu7oa3",$$css:!0},lg:{kzqmXN:"ui-jst10v",$$css:!0},xl:{kzqmXN:"ui-mjrt60",$$css:!0}},K4={sm:{keoZOQ:"ui-vqhhvk",k71WvV:"ui-1bk7dnq",k1K539:"ui-1dy9ubm",keTefX:"ui-1fesk1l",$$css:!0},md:{keoZOQ:"ui-kv60qn",k71WvV:"ui-xku7nj",k1K539:"ui-1hi8m59",keTefX:"ui-13srazm",$$css:!0},lg:{keoZOQ:"ui-4xtw7q",k71WvV:"ui-7quaee",k1K539:"ui-eci9o5",keTefX:"ui-1na8g2l",$$css:!0},xl:{keoZOQ:"ui-1fm9hdn",k71WvV:"ui-tyhy2u",k1K539:"ui-foffu7",keTefX:"ui-1tnioq7",$$css:!0}},zb={root:[W4.root,ox.root],size:{sm:[ji.sm,Dd.sm],md:[ji.md,Dd.md],lg:[ji.lg,Dd.lg],xl:[ji.xl,Dd.xl]},contentFrame:K4},Y4="md",X4={root:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kzqmXN:"ui-1oai4fc",kZKoxP:"ui-higkf7",kGuDYH:"ui-1tachi3",kLWn49:"ui-o5v014",$$css:!0}};function SA(e){if(nx(e))return jt(X4.root,iN(e));const t={className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1oai4fc ui-higkf7 ui-1tachi3 ui-o5v014"};return{...t,style:{...t.style,"--icon-size":typeof e=="number"?`${e}px`:e}}}function Z4(e){return{border:e??"variant"}}function Q4({chrome:e,variant:t,rounded:n,frame:r,reveal:s="always",size:a,tone:l,indicatorDot:c}){return{"data-variant":t,"data-border":e.border==="variant"?void 0:e.border,"data-rounded":n||void 0,"data-frame":r,"data-size":a,"data-tone":l,"data-fg-channel":"icon","data-indicator-dot":c||void 0,"data-reveal":s!=="always"?s:void 0}}function wA({border:e,enforcedRootStyle:t,frame:n,indicatorDot:r,reveal:s,rootStyle:a,rounded:l,size:c,tone:d,variant:f}){const h=Z4(e),m=ix(f,d);return{dataAttrs:Q4({chrome:h,frame:n,indicatorDot:r,reveal:s,rounded:l,size:c,tone:d,variant:f}),rootAttrs:jt(zb.root,xi.appearance,m.applyControlTone&&sx.foreground,m.applyControlTone&&d!==void 0&&aN[d],f==="ghost"&&(d==="secondary"||d==="tertiary")&&S3[d],m.applyFilledColors&&xi.colors,m.applyNonFilledBackground&&xl.background,(f==="outline"||f==="ghost")&&uN(d)&&fN[d],f==="outline"&&xl.outline,f==="outline"&&cN(d)&&dN[d],f==="media"&&xi.media,h.border!=="variant"&&sN[h.border],pN[s],xi.press,zb.size[c],n==="content"&&zb.contentFrame[c],t,a)}}function EA({size:e,iconSize:t,disabled:n,variant:r,tone:s,enforced:a}){const l=e??a?.iconButtonSize??Y4,c=r??a?.iconButtonVariant??"ghost",d=bN[l];return{size:l,innerIconSize:t??a?.iconButtonIconSize??d,disabled:n??a?.disabled,variant:c,tone:s??a?.iconButtonTone??(c==="primary"?oN:void 0)}}function dr({icon:e,iconVariant:t="outline",variant:n,border:r,rounded:s,frame:a="container",reveal:l="always",size:c,iconSize:d,tone:f,isSuccess:h=!1,className:m,style:b,rootStyle:y,iconStyle:k,disabled:S,indicatorDot:R=!1,indicatorDotColor:T="blue","aria-label":E,"aria-labelledby":C,..._}){const D=ua(),{size:N,innerIconSize:A,disabled:$,variant:z,tone:I}=EA({disabled:S,enforced:D,iconSize:d,size:c,tone:f,variant:n}),Y=h?"check":e,H=wA({border:r,enforcedRootStyle:D?.iconButtonRootStyle,frame:a,indicatorDot:R,reveal:l,rootStyle:y,rounded:s,size:N,tone:I,variant:z});return g.jsxs(rx,{..._,className:nn("ui-icon-button",H.rootAttrs.className,m),style:{...H.rootAttrs.style,...b},...H.dataAttrs,disabled:$,"aria-label":E,"aria-labelledby":C,children:[typeof Y=="string"?g.jsx(Yt,{name:Y,rootStyle:[D?.iconButtonIconStyle,k],variant:t,size:A,"aria-hidden":"true"}):g.jsx("span",{...SA(A),"aria-hidden":"true",children:Y}),R?g.jsx(V4,{color:T}):null]})}function J4(){return typeof navigator<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)}function Sx(e){if(!(J4()?e.metaKey:e.ctrlKey)||e.shiftKey||e.altKey)return!1;switch(e.key.toLowerCase()){case"a":return e.preventDefault(),e.nativeEvent.stopImmediatePropagation(),e.currentTarget.select(),!0;case"c":case"v":case"x":case"z":return e.nativeEvent.stopImmediatePropagation(),!0;default:return!1}}const Ld={base:{kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",ke9TFa:"ui-10w94by",k8ry5P:"ui-18oe1m7",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",k2ei4v:"ui-14e42zd",kVhnKS:"ui-stzfhl",kWkggS:"ui-jbqb8w",kMwMTN:"ui-1wd3ewq",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-12oo3zp",k8Qsv1:"ui-19ovir5",$$css:!0},disabled:{kkrTdU:"ui-1h6gzvc",k8Qsv1:"ui-ompknl",$$css:!0},mono:{kMv6JI:"ui-ul7cyv",$$css:!0},monoInput:{kGuDYH:"ui-pr5cyi",$$css:!0}};function eF({className:e,disabled:t=!1,mono:n=!1,ref:r,rootStyle:s,style:a,onKeyDown:l,...c}){const d=Kt({rootClass:"ui-input-group__input",stylexStyles:[Ld.base,t?Ld.disabled:null,n?Ld.mono:null,n?Ld.monoInput:null,s],className:e,style:a}),f=v.useCallback(h=>{l?.(h),!h.defaultPrevented&&Sx(h)},[l]);return g.jsx("input",{ref:r,className:d.className,style:d.style,disabled:t,onKeyDown:f,...c})}const xr={base:{"--ui-input-group-border-width":"ui-1cx02xk","--ui-input-group-padding-block":"ui-1we15r7","--ui-input-group-padding-inline":"ui-vnd6s4","--input-group-button-inset":"ui-1c59nzh",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kB7OPa:"ui-9f619",kzqmXN:"ui-h8yej3",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-1aeic0j ui-9afaxg ui-4vz0kq",ke9TFa:"ui-1lun4ml",k8ry5P:"ui-18b5jzi",kBCPoo:"ui-5q6521 ui-jsivns ui-1n6ytmu",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-17fyfba ui-illscj ui-1rfq9xa",k2ei4v:"ui-pilrb4",kVhnKS:"ui-1t7ytsu",kGJrpR:"ui-4n2izg ui-16dcxar ui-ghzbfo",kaIpWk:"ui-1043rbw",kLKAdn:"ui-e8kt42",kwRFfy:"ui-n29lvp",kGO01o:"ui-1ftrzfz",kZCmMZ:"ui-1ecvjd7",kWkggS:"ui-1gwrjia",k1ekBW:"ui-1oy24xj",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0},disabled:{kLZC3w:"ui-1aeic0j",kBCPoo:"ui-5q6521",kL6WhQ:"ui-17fyfba",kGJrpR:"ui-4n2izg",kkrTdU:"ui-1h6gzvc",kSiTet:"ui-byyjgo",$$css:!0},sizeMd:{"--ui-input-group-padding-block":"ui-174jhef","--ui-input-group-padding-inline":"ui-xlcw59","--input-group-button-inset":"ui-1ethuh",kZKoxP:"ui-1e94bgo",kOIVth:"ui-11twubx",$$css:!0},sizeLg:{"--ui-input-group-padding-block":"ui-174jhef","--ui-input-group-padding-inline":"ui-cby3z1","--input-group-button-inset":"ui-1u9w55t",kZKoxP:"ui-170hpbr",kOIVth:"ui-pkkfsy",$$css:!0},sizeXl:{"--ui-input-group-padding-block":"ui-17wxzvn","--ui-input-group-padding-inline":"ui-cby3z1","--input-group-button-inset":"ui-1ethuh",kOIVth:"ui-ehausa",$$css:!0},layoutTextarea:{kGNEyG:"ui-1cy8zhl",kZKoxP:"ui-t7dq6l",kAzted:"ui-16ry4p3",$$css:!0},layoutTextareaMd:{kAzted:"ui-t6xkjb",$$css:!0},layoutTextareaLg:{kAzted:"ui-16ry4p3",$$css:!0},frameContent:{kzqmXN:"ui-q8za26",kqGvvJ:"ui-1k4kybs",kUOVxO:"ui-d1nd0v",$$css:!0},variantDefault:{kLZC3w:"ui-2kampu",kBCPoo:"ui-15nuqqu",kL6WhQ:"ui-1jfuf7k",kGJrpR:"ui-19smxde",$$css:!0},variantElevated:{kWkggS:"ui-f1vpex",$$css:!0},variantGhost:{kWkggS:"ui-jbqb8w ui-qjnua1 ui-aig341",kLZC3w:"ui-1v8p93f",kBCPoo:"ui-1o3jo1z",kL6WhQ:"ui-16stqrj",kGJrpR:"ui-v5lvn5",$$css:!0},variantUnfilled:{"--ui-input-group-border-width":"ui-qkl0tc","--ui-input-group-padding-block":"ui-1we15r7","--ui-input-group-padding-inline":"ui-vnd6s4",kWkggS:"ui-jbqb8w",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kLZC3w:"ui-1b4hy2t",ke9TFa:"ui-10w94by",k8ry5P:"ui-18oe1m7",kBCPoo:"ui-1273586",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kL6WhQ:"ui-1tnzt7h",k2ei4v:"ui-14e42zd",kVhnKS:"ui-stzfhl",kGJrpR:"ui-1mi4oqr",kOIVth:"ui-137clkk",kGVxlE:"ui-1gnnqk1 ui-15ysqaf",$$css:!0},variantUnfilledSize:{kZKoxP:"ui-t7dq6l",$$css:!0},shapePill:{kaIpWk:"ui-1i4c3av",$$css:!0}},jd={field:{kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",ke9TFa:"ui-10w94by",k8ry5P:"ui-18oe1m7",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",k2ei4v:"ui-14e42zd",kVhnKS:"ui-stzfhl",kWkggS:"ui-jbqb8w",kMwMTN:"ui-1wd3ewq",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-12oo3zp",kAzted:"ui-10fesj9",kHenm0:"ui-tt52l0",kORKVm:"ui-10wlt62",k8Qsv1:"ui-19ovir5",$$css:!0},disabled:{kkrTdU:"ui-1h6gzvc",k8Qsv1:"ui-ompknl",$$css:!0},mono:{kMv6JI:"ui-ul7cyv",$$css:!0},collapseBlur:{kskxy:"ui-1kxtfma ui-5u5ifr",kORKVm:"ui-10wlt62",$$css:!0}},Tl={base:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kmuXW:"ui-2lah0s",kMwMTN:"ui-1mh7f6w",keTefX:"ui-1lziwak ui-dve3mh",k71WvV:"ui-14z9mp ui-rybaqh",$$css:!0},textareaLayout:{kAzted:"ui-1tn5z8q",$$css:!0}},GE={base:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kmuXW:"ui-2lah0s",kMwMTN:"ui-19aaqeu",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-12oo3zp",$$css:!0},mono:{kMv6JI:"ui-ul7cyv",$$css:!0}},tF={md:xr.sizeMd,lg:xr.sizeLg,xl:xr.sizeXl},nF={md:xr.layoutTextareaMd,lg:xr.layoutTextareaLg,xl:null},rF={container:null,content:xr.frameContent},iF={default:xr.variantDefault,elevated:xr.variantElevated,ghost:xr.variantGhost,unfilled:xr.variantUnfilled},sF={rounded:null,pill:xr.shapePill},TA=v.createContext(null);function da(e){const t=v.useContext(TA);if(!t)throw new Error(`${e} must be used within InputGroup.Root`);return t}function oF(){return da("InputGroup.useContext")}const aF={md:"sm",lg:"base",xl:"lg"},lF={md:"sm",lg:"sm",xl:"sm"},uF={md:"sm",lg:"sm",xl:"md"};function VE({variant:e="default",frame:t="container",size:n="lg",shape:r="rounded",layout:s="default",mono:a=!1,disabled:l=!1,rootStyle:c,className:d,children:f}){const h=H4(),m=l||h?.disabled===!0,b=Kt({rootClass:"ui-input-group",stylexStyles:[xr.base,tF[n],s==="textarea"?xr.layoutTextarea:null,s==="textarea"?nF[n]:null,rF[t],iF[e],e==="unfilled"?xr.variantUnfilledSize:null,sF[r],m?xr.disabled:null,c],className:d});return g.jsx(TA.Provider,{value:{disabled:m,layout:s,mono:a},children:g.jsx(Ts,{iconSize:aF[n],iconButtonSize:lF[n],buttonSize:uF[n],disabled:m||void 0,children:g.jsx("div",{className:b.className,style:b.style,"data-variant":e,"data-frame":t,"data-size":n,"data-shape":r!=="rounded"?r:void 0,"data-layout":s==="textarea"?"textarea":void 0,"data-mono":a||void 0,"data-disabled":m||void 0,children:f})})})}function cF({className:e,disabled:t,ref:n,rootStyle:r,style:s,...a}){const l=da("InputGroup.Input"),c=l.disabled||t===!0;return g.jsx(jB,{...a,className:e,disabled:c,ref:n,render:g.jsx(eF,{mono:l.mono,rootStyle:r}),style:s})}function fF({className:e,disabled:t,ref:n,rootStyle:r,style:s,onKeyDown:a,onInput:l,onFocus:c,onBlur:d,minRows:f=1,maxRows:h,autoResize:m=!0,collapseToSingleLineWhenBlurred:b=!1,rows:y,value:k,placeholder:S,focusedPlaceholder:R,...T}){const E=da("InputGroup.Textarea"),C=E.disabled||t===!0,_=Kt({rootClass:"ui-input-group__textarea",stylexStyles:[jd.field,C?jd.disabled:null,E.mono?jd.mono:null,b?jd.collapseBlur:null,r],className:e,style:s}),D=v.useRef(null),N=Gc([D,n]),[A,$]=v.useState(!1),z=f<1?1:f,I=h===void 0?void 0:h<z?z:h,Y=v.useCallback(()=>{if(!m)return;const B=D.current;if(!B)return;if(I===z&&(y===void 0||y===z)){B.style.height="",B.style.overflowY="auto";return}B.style.height="auto";const K=window.getComputedStyle(B),O=Number.parseFloat(K.lineHeight),P=Number.parseFloat(K.paddingTop)||0,V=Number.parseFloat(K.paddingBottom)||0,j=Number.parseFloat(K.borderTopWidth)||0,Z=Number.parseFloat(K.borderBottomWidth)||0,te=P+V+j+Z,se=Number.isFinite(O)&&O>0?te+O*z:0,ue=I!==void 0&&Number.isFinite(O)&&O>0?te+O*I:void 0,le=Math.max(B.scrollHeight,se),fe=ue!==void 0?Math.min(le,ue):le;B.style.height=`${fe}px`,B.style.overflowY=ue!==void 0&&B.scrollHeight>ue?"auto":"hidden"},[m,I,z,y]);v.useLayoutEffect(()=>{Y()},[k,Y]);const H=v.useCallback(B=>{a?.(B),!B.defaultPrevented&&Sx(B)},[a]),q=v.useCallback(B=>{l?.(B),B.defaultPrevented||Y()},[l,Y]),L=v.useCallback(B=>{$(!0),c?.(B)},[c]),F=v.useCallback(B=>{$(!1),d?.(B)},[d]),U=y??z,W=A&&R!==void 0?R:S;return g.jsx("textarea",{ref:N,className:_.className,style:_.style,disabled:C,onKeyDown:H,rows:U,value:k,placeholder:W,...T,"data-textarea-collapse-blur":b?"":void 0,onInput:q,onFocus:L,onBlur:F})}function dF({addonStyle:e,className:t,ref:n,...r}){const s=da("InputGroup.Icon"),a=Kt({rootClass:"ui-input-group__addon",stylexStyles:[Tl.base,s.layout==="textarea"?Tl.textareaLayout:null,e],className:t});return g.jsx("span",{className:a.className,style:a.style,children:g.jsx(Yt,{ref:n,...r})})}function pF({addonStyle:e,className:t,disabled:n,ref:r,...s}){const a=da("InputGroup.IconButton"),l=a.disabled?!0:n,c=Kt({rootClass:"ui-input-group__addon",stylexStyles:[Tl.base,a.layout==="textarea"?Tl.textareaLayout:null,e],className:t});return g.jsx("span",{className:c.className,style:c.style,children:g.jsx(dr,{ref:r,disabled:l,...s})})}function hF({addonStyle:e,className:t,disabled:n,ref:r,...s}){const a=da("InputGroup.Button"),l=a.disabled?!0:n,c=Kt({rootClass:"ui-input-group__addon",stylexStyles:[Tl.base,a.layout==="textarea"?Tl.textareaLayout:null,e],className:t});return g.jsx("span",{className:c.className,style:c.style,children:g.jsx(gn,{ref:r,disabled:l,...s})})}function mF({className:e,children:t}){const n=da("InputGroup.Span"),r=Kt({rootClass:"ui-input-group__span",stylexStyles:[GE.base,n.mono?GE.mono:null],className:e});return g.jsx("span",{className:r.className,style:r.style,children:t})}const zd=Object.assign(VE,{Root:VE,Input:cF,Textarea:fF,Icon:dF,IconButton:pF,Button:hF,Span:mF,useContext:oF}),gF=v.createContext(void 0);function bF(e){return v.useContext(gF)}function RA(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=qC(),{ref:s,index:a}=IN(e),l=n===a,c=v.useRef(null),d=co(s,c);return{compositeProps:{tabIndex:l?0:-1,onFocus(){r(a)},onMouseMove(){const h=c.current;if(!t||!h)return;const m=h.hasAttribute("disabled")||h.ariaDisabled==="true";!l&&!m&&h.focus()}},compositeRef:d,index:a}}function yF(e){const{render:t,className:n,style:r,state:s=jn,props:a=fo,refs:l=fo,metadata:c,stateAttributesMapping:d,tag:f="div",...h}=e,{compositeProps:m,compositeRef:b}=RA({metadata:c});return hn(f,e,{state:s,ref:[...l,b],props:[m,...a,h],stateAttributesMapping:d})}function vF(e){const[t,n]=v.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}function WE(e){const t=fr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=zt(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:r;return(vl(n)!==a||vl(r)!==l)&&(n=a,r=l),{width:n,height:r}}function CA(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const _A=v.createContext(void 0);function Kc(e){const t=v.useContext(_A);if(t===void 0&&!e)throw new Error(Nn(50));return t}const xF=600,NA=300,kF={...G_,instantType:et(e=>e.instantType),hasViewport:et(e=>e.hasViewport)};class Lh extends Zv{constructor(t,n,r=!1){const s=new bh,a={...SF(),...t};a.floatingRootContext=q_(s,n,r),super(a,{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:s,closeDelayRef:{current:NA},inlineRectCoordsRef:{current:void 0}},kF)}setOpen=(t,n)=>{const{inlineRectCoordsRef:r}=this.context;j_(this,t,n,{onBeforeDispatch(){const s=n.event;t&&n.reason===yr&&n.trigger&&"clientX"in s&&"clientY"in s&&r.current?.element!==n.trigger&&N_(r,n.trigger,s.clientX,s.clientY)}})};static useStore(t,n){return L_(t,(s,a)=>new Lh(n,s,a)).store}}function SF(){return{...U_(),instantType:void 0,hasViewport:!1}}function KE(e){const{open:t,defaultOpen:n=!1,onOpenChange:r,onOpenChangeComplete:s,actionsRef:a,handle:l,triggerId:c,defaultTriggerId:d=null,children:f}=e,h=Lh.useStore(l?.store,{open:n,openProp:t,activeTriggerId:d,triggerIdProp:c});z_(h,t,n,d),h.useControlledProp("openProp",t),h.useControlledProp("triggerIdProp",c),h.useContextCallback("onOpenChange",r),h.useContextCallback("onOpenChangeComplete",s);const m=h.useState("open"),b=h.useState("activeTriggerId"),y=h.useState("mounted"),k=h.useState("payload");$_(h,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:S}=B_(m,h,()=>{h.context.inlineRectCoordsRef.current=void 0});Ge(()=>{m&&b==null&&h.set("payload",void 0)},[h,b,m]);const R=v.useCallback(()=>{h.setOpen(!1,xt(vp))},[h]);v.useImperativeHandle(a,()=>({unmount:S,close:R}),[S,R]);const T=m||y;return g.jsxs(_A.Provider,{value:h,children:[T&&g.jsx(wF,{store:h}),typeof f=="function"?f({payload:k}):f]})}function wF({store:e}){const t=e.useState("floatingRootContext"),n=qv(t),r=n.reference??jn,s=n.trigger??jn,a=v.useMemo(()=>Pi(Qv,n.floating),[n.floating]);return F_(e,{activeTriggerProps:r,inactiveTriggerProps:s,popupProps:a}),null}const AA=Xv(function(t){return Kc(!0)?g.jsx(KE,{...t}):g.jsx(Z2,{children:g.jsx(KE,{...t})})}),OA=v.createContext(void 0);function EF(){const e=v.useContext(OA);if(e===void 0)throw new Error(Nn(48));return e}const MA=v.forwardRef(function(t,n){const{children:r,container:s,className:a,render:l,style:c,...d}=t,{portalNode:f,portalSubtree:h}=p_({container:s,ref:n,componentProps:t,elementProps:d});return!h&&!f?null:g.jsxs(v.Fragment,{children:[h,f&&Ti.createPortal(r,f)]})}),IA=v.forwardRef(function(t,n){const{keepMounted:r=!1,...s}=t;return Kc().useState("mounted")||r?g.jsx(OA.Provider,{value:r,children:g.jsx(MA,{ref:n,...s})}):null}),DA=M_(function(t,n){const{render:r,className:s,delay:a,closeDelay:l,id:c,payload:d,handle:f,style:h,...m}=t,b=Kc(!0),y=f?.store??b;if(!y)throw new Error(Nn(89));const k=Ml(c),S=y.useState("isTriggerActive",k),R=y.useState("isOpenedByTrigger",k),T=y.useState("floatingRootContext"),E=y.context.inlineRectCoordsRef,C=v.useRef(null),_=a??xF,D=l??NA,{registerTrigger:N,isMountedByThisTrigger:A}=P_(k,C,y,{payload:d});Ge(()=>{A&&(y.context.closeDelayRef.current=D)},[y,A,D]);const $=X_(T,{mouseOnly:!0,move:!1,handleClose:Z_(),delay:()=>({open:_,close:D}),triggerElementRef:C,isActiveTrigger:S,isClosing:()=>y.select("transitionStatus")==="ending"}),z=W_(T,{delay:_}),I={open:R},Y=y.useState("triggerProps",A),H=GP(E,R);return hn("a",t,{state:I,ref:[n,N,C],props:[$,z.reference,Y,H,{id:k},m],stateAttributesMapping:BC})}),LA=v.createContext(void 0);function TF(){const e=v.useContext(LA);if(e===void 0)throw new Error(Nn(49));return e}const jA=v.forwardRef(function(t,n){const{render:r,className:s,anchor:a,positionMethod:l="absolute",side:c="bottom",align:d="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:b=5,arrowPadding:y=5,sticky:k=!1,disableAnchorTracking:S=!1,collisionAvoidance:R=c_,style:T,...E}=t,C=Kc(),_=EF(),D=Y2(),N=C.useState("open"),A=C.useState("mounted"),$=C.useState("floatingRootContext"),z=C.useState("instantType"),I=C.useState("transitionStatus"),Y=C.useState("hasViewport"),H=C.context.inlineRectCoordsRef,q=dx({anchor:a,floatingRootContext:$,positionMethod:l,mounted:A,side:c,sideOffset:f,align:d,alignOffset:h,arrowPadding:y,collisionBoundary:m,collisionPadding:b,sticky:k,disableAnchorTracking:S,keepMounted:_,nodeId:D,collisionAvoidance:R,adaptiveOrigin:Y?AN:void 0,inline:VP(H)}),L=q.update;Ge(()=>{N&&A&&L()},[N,A,L]);const F={open:N,side:q.side,align:q.align,anchorHidden:q.anchorHidden,instant:z},U=px(t,F,{styles:q.positionerStyles,transitionStatus:I,props:E,refs:[n,C.useStateSetter("positionerElement")],hidden:!A,inert:!N});return g.jsx(LA.Provider,{value:q,children:g.jsx(X2,{id:D,children:U})})}),RF={...$c,...go},zA=v.forwardRef(function(t,n){const{className:r,render:s,style:a,...l}=t,c=Kc(),{side:d,align:f}=TF(),h=c.useState("open"),m=c.useState("instantType"),b=c.useState("transitionStatus"),y=c.useState("popupProps"),k=c.useState("floatingRootContext");xo({open:h,ref:c.context.popupRef,onComplete(){h&&c.context.onOpenChangeComplete?.(!0)}});const S=We(()=>c.context.closeDelayRef.current);return Y_(k,{closeDelay:S}),hn("div",t,{state:{open:h,side:d,align:f,instant:m,transitionStatus:b},ref:[n,c.context.popupRef,c.useStateSetter("popupElement")],props:[y,Sh(b),l],stateAttributesMapping:RF})});class CF{constructor(){this.store=new Lh}open(t){const n=t?this.store.context.triggerElements.getById(t):void 0;if(t&&!n)throw new Error(Nn(88,t));this.store.setOpen(!0,xt(vp,void 0,n))}close(){this.store.setOpen(!1,xt(vp,void 0,void 0))}get isOpen(){return this.store.select("open")}}function _F(){return new CF}const PA="never",Pb={base:{kVAEAm:"ui-1n2onr6",kfSwDN:"ui-1hx0egp",kfzvcC:"ui-67bb7w",$$css:!0},width:e=>[{kzqmXN:e!=null?"ui-5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}],maxWidth:e=>[{ks0D6T:e!=null?"ui-f68679":e,$$css:!0},{"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]},NF={base:{kB7OPa:"ui-9f619",$$css:!0}};function AF({ariaLabel:e,close:t,content:n,contentStyle:r,maxHeight:s,maxWidth:a,offset:l,placement:c,sameAxisOnly:d,scrollbarVisibility:f,surfaceClassName:h,surfaceStyle:m,width:b}){const{portalLayerStyles:y}=Dl("tooltip",!0),{side:k,align:S,sideOffset:R,alignOffset:T,collisionAvoidance:E,positionMethod:C}=_h(c??Rh,l,d),_=Eh(jN),D=jt(hx,Pb.base,wh,Pb.width(b),a!==void 0&&Pb.maxWidth(a),m),N=jt(zN,NF.base,r);return g.jsx(jA,{align:S,alignOffset:T,className:_.className,collisionAvoidance:E,collisionPadding:8,positionMethod:C,side:k,sideOffset:R,style:{..._.style,...y},children:g.jsx(zA,{"aria-label":e,className:nn("ui-preview-card",h,D.className),role:"dialog",style:D.style,children:g.jsx(Sl,{maxHeight:s,scrollbarVisibility:f,children:g.jsx("div",{className:nn("ui-preview-card__content",N.className),style:N.style,children:typeof n=="function"?n(t):n})})})})}function $A({children:e,content:t,placement:n=Rh,sameAxisOnly:r=!1,offset:s=8,openDelay:a=mx,closeDelay:l=Ch,disabled:c=!1,maxHeight:d=300,maxWidth:f,scrollbarVisibility:h=PA,width:m=280,className:b,surfaceStyle:y,contentStyle:k,"aria-label":S,ref:R,defaultOpen:T=!1,open:E,onOpenChange:C,onOpenChangeComplete:_,...D}){const N=v.useRef(null),A=v.Children.only(e),$=v.isValidElement(A),z=v.useCallback(L=>{L!==null&&(N.current?.close(),E===void 0&&N.current?.unmount())},[E]),I=kA({defaultTagName:"span",props:D,ref:[R,z],render:$?A:void 0}),Y=ca(),H=v.useCallback((L,F)=>{if(c){L&&F.cancel();return}if(F.reason==="outside-press"||F.reason==="trigger-press"){F.cancel();return}C?.(L,F)},[c,C]),q=v.useCallback(()=>N.current?.close(),[]);return $?g.jsxs(AA,{actionsRef:N,defaultOpen:T,onOpenChange:H,onOpenChangeComplete:_,open:E,children:[c?I:g.jsx(DA,{...D,closeDelay:l,delay:a,ref:R,render:A}),c?null:g.jsx(IA,{container:Y??void 0,children:g.jsx(AF,{ariaLabel:S,close:q,content:t,contentStyle:k,maxHeight:d,maxWidth:f,offset:s,placement:n,sameAxisOnly:r,scrollbarVisibility:h,surfaceClassName:b,surfaceStyle:y,width:m})})]}):g.jsx(g.Fragment,{children:e})}function YE(e){const t=v.useRef(e);return v.useLayoutEffect(()=>{t.current=e},[e]),t}function OF(e,t){const n=YE(e),r=YE(t);return v.useCallback(s=>{if(s==null)return;const{ownerDocument:a}=s,l=c=>{const d=c.target,f=a.defaultView?.Element;if(f===void 0||!(d instanceof f))return;const h=r.current;if(h==null)return;const m=a.getElementById(h);m!=null&&d.contains(m)&&n.current.close()};return a.addEventListener("scroll",l,{capture:!0,passive:!0}),()=>{a.removeEventListener("scroll",l,!0)}},[n,r])}const Bp=v.createContext(!1);function BA({children:e,dismiss:t}){const n=v.use(Bp);return g.jsx(Bp.Provider,{value:n||t,children:e})}const FA=v.createContext(null),UA=v.createContext(null),qA=v.createContext(null);function HA(e){const t=v.use(FA);if(t===null)throw new Error(`${e} must be used within PreviewCardLayer`);return t}function MF(){const e=v.use(UA);if(e===null)throw new Error("PreviewCardLayer.Popup must be inside an open PreviewCardLayer");return e}function IF(){const e=v.use(qA);if(e===null)throw new Error("PreviewCardLayer.Popup must be inside an open PreviewCardLayer");return e}function DF({children:e}){const t=gx();return kx({nodeId:t,open:!0}),g.jsx(bx,{id:t,children:e})}function vc({children:e,placement:t=Rh,offset:n=8,sameAxisOnly:r=!1,openDelay:s=mx,closeDelay:a=Ch,controlledTargetId:l}){const c=v.useMemo(()=>_F(),[]),d=v.useRef(null),f=v.useRef(null),h=v.useRef(null),m=v.useRef(!1),b=v.useRef(new Map),y=v.useRef(l),[k,S]=v.useState(!1),R=v.use(Bp),T=_h(t,n,r),E=v.useCallback($=>{d.current===$&&(d.current=null,c.close())},[c]),C=v.useCallback(()=>{const $=y.current;if($===void 0)return;const z=$===null?void 0:b.current.get($);if($===null||z===void 0||z.suppressed){d.current=null,c.close();return}d.current=z.triggerId,c.open(z.triggerId)},[c]),_=v.useCallback(()=>{const $=m.current;m.current=!1;const z=f.current;if(z===null)return;const I=h.current;I===null||I.id!==z||!I.isConnected||I.hasAttribute("data-preview-card-layer-trigger-suppressed")||!$&&I!==I.ownerDocument.activeElement&&!I.matches(":hover")||(d.current=z,c.open(z))},[c]),D=v.useCallback(($,z)=>(b.current.set($,z),C(),()=>{b.current.get($)===z&&(b.current.delete($),C())}),[C]);v.useLayoutEffect(()=>{const $=y.current;if($===void 0&&l!==void 0&&(f.current=d.current),y.current=l,l===void 0){$!==void 0&&_();return}$!==l&&(m.current=!1),C()},[l,C,_]);const N=v.useCallback(($,z)=>{if(y.current!==void 0&&z.reason!=="imperative-action"){$&&z.trigger!==void 0&&!z.trigger.hasAttribute("data-preview-card-layer-trigger-suppressed")?(f.current=z.trigger.id,h.current=z.trigger,m.current=!0):!$&&z.trigger?.id===f.current&&(f.current=null,h.current=null,m.current=!1),z.cancel(),C();return}if($&&z.trigger?.hasAttribute("data-preview-card-layer-trigger-suppressed")){if(z.cancel(),y.current!==void 0){C();return}d.current=null,f.current=null,c.close();return}if(!$&&z.reason==="trigger-focus"&&z.event instanceof FocusEvent&&z.event.relatedTarget===null&&z.event.target instanceof Element&&z.event.target.matches(":hover")){z.cancel();return}!$&&z.reason!=="imperative-action"&&z.trigger?.id===f.current&&(f.current=null,h.current=null,m.current=!1),d.current=$?z.trigger?.id??d.current:null,y.current===void 0&&(f.current=d.current),S($),y.current===void 0&&z.trigger!==void 0&&(h.current=$?z.trigger:null)},[c,C]),A=v.useMemo(()=>({handle:c,instantDismiss:R,openDelay:s,closeDelay:a,positioner:T,closeIfActive:E,registerTarget:D}),[a,E,c,R,s,T,D]);return g.jsxs(FA.Provider,{value:A,children:[e,g.jsx(AA,{handle:c,onOpenChange:N,children:({payload:$})=>!R&&k&&$!==void 0?g.jsx(UA.Provider,{value:$.triggerId,children:g.jsx(qA.Provider,{value:$.contentKey,children:g.jsx(DF,{children:$.content})})}):null})]})}function LF({children:e,content:t,targetId:n,contentKey:r,disabled:s=!1,openDelay:a,closeDelay:l}){const{handle:c,instantDismiss:d,openDelay:f,closeDelay:h,closeIfActive:m,registerTarget:b}=HA("PreviewCardLayer.Trigger"),y=v.useId(),k=e.props.id,S=typeof k=="string"?k:y,R=s||d,T=v.useMemo(()=>({content:t,contentKey:r??S,triggerId:S}),[t,r,S]);return v.useLayoutEffect(()=>{const E=n===void 0?void 0:b(n,{triggerId:S,suppressed:R});return R&&m(S),()=>{E?.(),m(S)}},[m,b,R,n,S]),g.jsx(DA,{closeDelay:l??h,delay:a??f,handle:c,id:S,payload:T,"data-preview-card-layer-trigger-suppressed":R?"":void 0,render:e})}function jF({children:e,maxHeight:t,surfaceClassName:n,surfaceStyle:r}){const{handle:s,positioner:a}=HA("PreviewCardLayer.Popup"),l=MF(),c=IF(),d=ca(),f=OF(s,l),{portalLayerStyles:h}=Dl("tooltip",!0),m=Eh(jN),b=jt(hx,PN,zN,wh,j6,r);return g.jsx(IA,{container:d??void 0,children:g.jsx(jA,{align:a.align,alignOffset:a.alignOffset,className:m.className,collisionAvoidance:a.collisionAvoidance,collisionPadding:8,positionMethod:a.positionMethod,side:a.side,sideOffset:a.sideOffset,style:{...m.style,...h},children:g.jsx(zA,{"data-component":"preview-card-layer-popup",className:nn("ui-preview-card-layer",n,b.className),ref:f,role:"dialog",style:b.style,children:t===void 0?e:g.jsx(Sl,{maxHeight:`min(${typeof t=="number"?`${t}px`:t}, var(--available-height, 100vh))`,scrollbarVisibility:PA,children:e})},c)})})}(function(e){e.Trigger=LF,e.Popup=jF})(vc||(vc={}));function xc(e,t,n,r){const[s,a]=v.useState(t),l=v.useRef(n),c=v.useRef(s),d=e!==void 0,f=v.useRef(d);v.useLayoutEffect(()=>{l.current=n},[n]),v.useEffect(()=>{c.current!==s&&l.current?.(s),c.current=s},[s]),v.useEffect(()=>{f.current,f.current=d},[r,d]);const h=d?e:s,m=v.useCallback(b=>{if(!d){a(b);return}const y=typeof b=="function"?b(e):b;y!==e&&l.current?.(y)},[e,d]);return[h,m]}const GA="data-composite-item-active",zF=[];function PF(e){const{loopFocus:t=!0,orientation:n="both",grid:r,onLoop:s,direction:a,highlightedIndex:l,onHighlightedIndexChange:c,rootRef:d,enableHomeAndEndKeys:f=!1,stopEventPropagation:h=!1,disabledIndices:m,modifierKeys:b=zF}=e,[y,k]=v.useState(0),S=r!=null,R=v.useRef(null),T=co(R,d),E=v.useRef([]),C=v.useRef(!1),_=l??y,D=We((I,Y=!1)=>{if((c??k)(I),Y){const H=E.current[I];Z1(R.current,H,a,n)}}),N=We(I=>{if(I.size===0||C.current)return;C.current=!0;const Y=Array.from(I.keys()),H=Y.find(L=>L?.hasAttribute(GA))??null,q=H?Y.indexOf(H):-1;if(q!==-1)D(q);else if(Tp(Y,_,m)){const L=xs(Y,{disabledIndices:m});tc(Y,L)||D(L)}Z1(R.current,H,a,n)});Ge(()=>{if(m==null||l!=null||!C.current)return;const I=E.current;if(Tp(I,_,m)){const Y=xs(I,{disabledIndices:m});tc(I,Y)||D(Y)}},[m,l,_,E,D]);const A=We((I,Y,H)=>s?s(I,Y,H,E):H),$=We(I=>{const Y=f?tN:eN;if(!Y.has(I.key)||$F(I,b)||!R.current)return;const q=a==="rtl",L=q?Op:Mp,F={horizontal:L,vertical:sc,both:L}[n],U=q?Mp:Op,W={horizontal:U,vertical:ic,both:U}[n],B=cr(I.nativeEvent);if(B!=null&&X1(B)&&!CA(B)){const te=B.selectionStart,se=B.selectionEnd,ue=B.value??"";if(te==null||I.shiftKey||te!==se||I.key!==W&&te<ue.length||I.key!==F&&te>0)return}let K=_;const O=lp(E,m),P=Cy(E,m);r!=null&&(K=r({disabledIndices:m,elementsRef:E,event:I,highlightedIndex:_,loopFocus:t,maxIndex:P,minIndex:O,onLoop:A,orientation:n,rtl:q}));const V={horizontal:[L],vertical:[sc],both:[L,sc]}[n],j={horizontal:[U],vertical:[ic],both:[U,ic]}[n],Z=S?Y:{horizontal:f?S$:Q_,vertical:f?w$:J_,both:Y}[n];f&&(I.key===vh?K=O:I.key===xh&&(K=P)),K===_&&(V.includes(I.key)||j.includes(I.key))&&(t&&K===P&&V.includes(I.key)?(K=O,s&&(K=s(I,_,K,E))):t&&K===O&&j.includes(I.key)?(K=P,s&&(K=s(I,_,K,E))):K=xs(E.current,{startingIndex:K,decrement:j.includes(I.key),disabledIndices:m})),K!==_&&!tc(E.current,K)&&(h&&I.stopPropagation(),Z.has(I.key)&&I.preventDefault(),D(K,!0),queueMicrotask(()=>{E.current[K]?.focus()}))});return{props:{ref:T,onFocus(I){const Y=R.current,H=cr(I.nativeEvent);!Y||H==null||!X1(H)||H.setSelectionRange(0,H.value.length??0)},onKeyDown:$},highlightedIndex:_,onHighlightedIndexChange:D,elementsRef:E,disabledIndices:m,onMapChange:N,relayKeyboardEvent:$}}function $F(e,t){for(const n of _$.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function BF(e){const{render:t,className:n,style:r,refs:s=fo,props:a=fo,state:l=jn,stateAttributesMapping:c,highlightedIndex:d,onHighlightedIndexChange:f,orientation:h,grid:m,loopFocus:b,onLoop:y,enableHomeAndEndKeys:k,onMapChange:S,stopEventPropagation:R=!0,rootRef:T,disabledIndices:E,modifierKeys:C,highlightItemOnHover:_=!1,tag:D="div",...N}=e,A=Ri(),{props:$,highlightedIndex:z,onHighlightedIndexChange:I,elementsRef:Y,onMapChange:H,relayKeyboardEvent:q}=PF({grid:m,loopFocus:b,onLoop:y,orientation:h,highlightedIndex:d,onHighlightedIndexChange:f,rootRef:T,stopEventPropagation:R,enableHomeAndEndKeys:k,direction:A,disabledIndices:E,modifierKeys:C}),L=hn(D,e,{state:l,ref:s,props:[$,...a,N],stateAttributesMapping:c}),F=v.useMemo(()=>({highlightedIndex:z,onHighlightedIndexChange:I,highlightItemOnHover:_,relayKeyboardEvent:q}),[z,I,_,q]);return g.jsx(UC.Provider,{value:F,children:g.jsx(fx,{elementsRef:Y,onMapChange:U=>{S?.(U),H(U)},children:L})})}const FF=v.createContext(void 0);function UF(){const e=v.useContext(FF);if(e===void 0)throw new Error(Nn(63));return e}let XE=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const qF={...qc,checked(e){return e?{[XE.checked]:""}:{[XE.unchecked]:""}}},HF=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,c=UF();return hn("span",t,{state:c,ref:n,stateAttributesMapping:qF,props:l})}),GF="md",ZE={root:{kVAEAm:"ui-1n2onr6",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kB7OPa:"ui-9f619",kmuXW:"ui-2lah0s",kaIpWk:"ui-1i4c3av",kMeerF:"ui-1k57tk5 ui-x510wv",k3XXqK:"ui-1t137rt ui-15veape",kjBf7l:"ui-1uczgqu ui-1whe2fk",kInvED:"ui-1wfwxd8 ui-1edn9mt",kSiTet:"ui-1hc1fzr ui-vlaemc",kWkggS:"ui-59yu97 ui-1jnhqrh",k1ekBW:"ui-15406qy",kIyJzY:"ui-7pq1vu",kAMwcw:"ui-6ekqhr",$$css:!0},sm:{kzqmXN:"ui-23j0i4",kZKoxP:"ui-1vatr1o","--ui-switch-thumb-travel":"ui-sc32xf",$$css:!0},regular:{kzqmXN:"ui-1849jeq",kZKoxP:"ui-mix8c7","--ui-switch-thumb-travel":"ui-9pb0k7",kWkggS:"ui-3dhcaw ui-1jnhqrh",kGVxlE:"ui-1gnnqk1 ui-10yfhlr",$$css:!0},md:{kzqmXN:"ui-1td3qas",kZKoxP:"ui-1a6rlst","--ui-switch-thumb-travel":"ui-9pb0k7",$$css:!0},lg:{kzqmXN:"ui-1guw455",kZKoxP:"ui-1e94bgo","--ui-switch-thumb-travel":"ui-1c3f5sz",$$css:!0}},VF={primary:{"--ui-switch-active-bg":"ui-i0s8m6",$$css:!0},green:{"--ui-switch-active-bg":"ui-1g3p0vo",$$css:!0},neutral:{"--ui-switch-active-bg":"ui-742exl",$$css:!0},monochrome:{"--ui-switch-active-bg":"ui-1iuey4n","--ui-switch-thumb-bg":"ui-1bnmce8",$$css:!0}};function WF({interactive:e,size:t,variant:n}){const r=g.jsx("span",{className:"ui-1lliihq ui-h8yej3 ui-5yr21d ui-1i4c3av ui-hwtojv ui-10z6xd1 ui-19ule2h ui-1g0ag68 ui-3oybdh ui-27jcm2 ui-11xpdln ui-622pbu ui-99dd5c ui-sagj69 ui-6tor67"}),s=e?g.jsx(HF,{className:"ui-10l6tqk ui-np7j22 ui-it89om ui-121ilyj ui-1plog1 ui-bryuvx ui-kkvxwt ui-11xpdln ui-1bqoo3p ui-sagj69 ui-1tkypeg",children:r}):g.jsx("span",{className:"ui-10l6tqk ui-np7j22 ui-it89om ui-121ilyj ui-1plog1 ui-bryuvx ui-kkvxwt ui-11xpdln ui-1bqoo3p ui-sagj69 ui-1tkypeg",children:r});return g.jsx("span",{"aria-hidden":"true",...jt(ZE.root,ZE[t],VF[n]),children:s})}function KF({checked:e,disabled:t,size:n=GF,variant:r="green"}){return g.jsx("span",{"aria-hidden":"true","data-component":"switch","data-size":n,"data-variant":r,"data-checked":e||void 0,"data-disabled":t||void 0,className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1c4vz4f ui-2lah0s ui-dl72j9 ui-xymvpz ui-47corl ui--default-marker",children:g.jsx(WF,{interactive:!1,size:n,variant:r})})}const vn={base:{kMv6JI:"ui-1acoasx",keoZOQ:"ui-dj266r",k71WvV:"ui-14z9mp",k1K539:"ui-at24cr",keTefX:"ui-1lziwak",kLKAdn:"ui-exx8yu",kwRFfy:"ui-yri2b",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1c1uobl",$$css:!0},sizeInherit:{kGuDYH:"ui-1qlqyl8",kLWn49:"ui-15bjb6t",kb6lSQ:"ui-4gjf66",$$css:!0},variantCode:{kMv6JI:"ui-ul7cyv",$$css:!0},weightRegular:{k63SB2:"ui-20ajya",$$css:!0},weightMedium:{k63SB2:"ui-1yl5bsf",$$css:!0},weightSemibold:{k63SB2:"ui-13ebx5f",$$css:!0},weightBold:{k63SB2:"ui-1v8v64w",$$css:!0},colorPrimary:{kMwMTN:"ui-1wd3ewq",$$css:!0},colorSecondary:{kMwMTN:"ui-19aaqeu",$$css:!0},colorTertiary:{kMwMTN:"ui-4b2ntj",$$css:!0},colorQuaternary:{kMwMTN:"ui-1e4uaio",$$css:!0},colorActive:{kMwMTN:"ui-7qsbfx",$$css:!0},colorFocused:{kMwMTN:"ui-zlszhr",$$css:!0},colorRed:{kMwMTN:"ui-1jh5svw",$$css:!0},colorRedSecondary:{kMwMTN:"ui-o7cye4",$$css:!0},colorYellow:{kMwMTN:"ui-1izesbo",$$css:!0},colorYellowSecondary:{kMwMTN:"ui-14nh9a",$$css:!0},colorGreen:{kMwMTN:"ui-1w5rjie",$$css:!0},colorGreenSecondary:{kMwMTN:"ui-dki84f",$$css:!0},colorMagenta:{kMwMTN:"ui-xjecij",$$css:!0},colorMagentaSecondary:{kMwMTN:"ui-29qggb",$$css:!0},colorCyan:{kMwMTN:"ui-1d0l12",$$css:!0},colorCyanSecondary:{kMwMTN:"ui-l34bp",$$css:!0},colorOrange:{kMwMTN:"ui-11pqmr",$$css:!0},colorOrangeSecondary:{kMwMTN:"ui-11nfuof",$$css:!0},truncateStart:{k1xSpc:"ui-1lliihq",kzqmXN:"ui-h8yej3",k7Eaqz:"ui-euugli",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",ksoyAI:"ui-zyj77d",k9WMMc:"ui-dpxx8g",$$css:!0}},YF={xs:mN.root,sm:Rs.root,md:Fi.root,lg:gN.root,xl:_3.root,"2xl":N3.root,"3xl":A3.root,inherit:vn.sizeInherit},XF={regular:vn.weightRegular,medium:vn.weightMedium,semibold:vn.weightSemibold,bold:vn.weightBold},ZF={primary:vn.colorPrimary,secondary:vn.colorSecondary,tertiary:vn.colorTertiary,quaternary:vn.colorQuaternary,active:vn.colorActive,focused:vn.colorFocused,red:vn.colorRed,"red-secondary":vn.colorRedSecondary,yellow:vn.colorYellow,"yellow-secondary":vn.colorYellowSecondary,green:vn.colorGreen,"green-secondary":vn.colorGreenSecondary,magenta:vn.colorMagenta,"magenta-secondary":vn.colorMagentaSecondary,cyan:vn.colorCyan,"cyan-secondary":vn.colorCyanSecondary,orange:vn.colorOrange,"orange-secondary":vn.colorOrangeSecondary};function QF({color:e,size:t,truncate:n,variant:r,weight:s}){return[vn.base,ax.root,YF[t],XF[s],r==="code"?vn.variantCode:null,e?ZF[e]:null,n==="start"?vn.truncateStart:null,n==="end"?Ll.root:null]}function Fp({as:e="span",variant:t="default",size:n="md",weight:r="regular",color:s,truncate:a,numeric:l,children:c,rootStyle:d,className:f,style:h,ref:m,...b}){const y=a===!0?"end":a===!1?void 0:a??void 0,{className:k,style:S}=jt(QF({color:s,size:n,truncate:y,variant:t,weight:r}),d);return g.jsx(e,{ref:m,className:nn("ui-text",k,f),style:{...S,...h},"data-variant":t,"data-size":n,"data-weight":r,"data-color":s,"data-truncate":y,"data-numeric":l||void 0,...b,children:y==="start"?g.jsxs(g.Fragment,{children:["",c,""]}):c})}const VA={text:{kzqmXN:"ui-h8yej3",kHjlTd:"ui-j0a0fe",kN2L0X:"ui-1w2vvpw",$$css:!0}};function WA({children:e}){return g.jsx("div",{"data-component":"empty-state-root",className:"ui-98rzlu ui-5yr21d ui-2lwn1j ui-euugli ui-78zum5 ui-dt5ytf ui-6s0dn4 ui-l56j7k ui-1rea2x4 ui-j2grvh ui-mw8u6f ui-9f619 ui-2b8uid ui-1oot3zn",children:e})}function KA({children:e,variant:t="default"}){return g.jsx("div",{"data-component":"empty-state-icon","data-variant":t,...{0:{className:"ui-1pwdyn5 ui-1vatr1o ui-2lah0s ui-78zum5 ui-6s0dn4 ui-l56j7k ui-1lbmi28"},1:{className:"ui-2lah0s ui-78zum5 ui-6s0dn4 ui-l56j7k ui-1lbmi28 ui-1niwmkg ui-f2gx5w ui-9f619 ui-mkeg23 ui-1y0btm7 ui-qz0629 ui-1m7fhj7"}}[(t==="tab")<<0],children:e})}function YA({children:e}){return g.jsx("div",{"data-component":"empty-state-header",className:"ui-h8yej3 ui-euugli ui-78zum5 ui-dt5ytf ui-6s0dn4 ui-137clkk",children:e})}function XA({children:e}){return g.jsx(Fp,{as:"p",color:"primary","data-component":"empty-state-title",rootStyle:VA.text,size:"md",weight:"medium",children:e})}function ZA({children:e}){return g.jsx(Fp,{as:"p",color:"secondary","data-component":"empty-state-description",rootStyle:VA.text,size:"md",weight:"regular",children:e})}function QA({children:e}){return g.jsx("div",{"data-component":"empty-state-content",className:"ui-78zum5 ui-6s0dn4 ui-l56j7k ui-1a02dak ui-ehausa",children:e})}function JF({body:e,cta:t,icon:n,iconVariant:r="default",title:s}){const a=typeof n=="string"?n:void 0,l=a!==void 0?g.jsx(Yt,{color:"tertiary",name:a,size:"lg"}):n;return g.jsxs(WA,{children:[l===void 0?null:g.jsx(KA,{variant:r,children:l}),g.jsxs(YA,{children:[s===void 0?null:g.jsx(XA,{children:s}),g.jsx(ZA,{children:e})]}),t===void 0?null:g.jsx(QA,{children:g.jsx(gn,{disabled:t.disabled,onClick:t.onClick,size:"md",variant:"outline",children:t.label})})]})}const ks=Object.assign(JF,{Root:WA,Icon:KA,Header:YA,Title:XA,Description:ZA,Content:QA});function Yc({className:e,variant:t="default",size:n="lg",ref:r,disabled:s,startIcon:a,endIcon:l,inputGroupRootStyle:c,...d}){return g.jsxs(zd.Root,{className:e,rootStyle:c,variant:t,size:n,disabled:s,children:[a!=null&&g.jsx(zd.Icon,{name:a}),g.jsx(zd.Input,{ref:r,...d}),l!=null&&g.jsx(zd.Icon,{name:l})]})}const ys=class ys{constructor(){this.data=null,this.listeners=new Set}static getInstance(){return ys.instance||(ys.instance=new ys),ys.instance}static subscribe(t){return ys.getInstance().subscribeToChanges(t)}static isDragActive(){return ys.getInstance().hasData()}notifyListeners(){for(const t of this.listeners)t()}subscribeToChanges(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}setData(t){this.data!==t&&(this.data=t,this.notifyListeners())}getData(){return this.data}getValidatedData(t){if(!this.data)return null;for(const n of t)if(this.data instanceof n)return n.schema.safeParse(this.data.payload).success?this.data:null;return null}hasAnyClass(t){return this.data?t.some(n=>this.data instanceof n):!1}clearData(){this.data!==null&&(this.data=null,this.notifyListeners())}hasData(){return this.data!==null}};ys.instance=null;let ci=ys;const $b={fontFamily:{sans:"var(--cursor-font-family, var(--vscode-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif))",mono:"var(--cursor-font-family-mono, var(--monaco-monospace-font, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace))"},scrollbar:{verticalSize:"var(--vscode-scrollbar-vertical-size, 14px)",horizontalSize:"var(--vscode-scrollbar-horizontal-size, 12px)",thumbBackground:"var(--vscode-scrollbarSlider-background)",thumbHoverBackground:"var(--vscode-scrollbarSlider-hoverBackground)",thumbActiveBackground:"var(--vscode-scrollbarSlider-activeBackground)"},syntax:{foreground:"oklch(0.878 0.01 286.202)",background:"oklch(0.209 0 0)",keyword:"oklch(0.811 0.079 191.639)",string:"oklch(0.769 0.132 329.919)",function:"oklch(0.805 0.097 58.138)",number:"oklch(0.849 0.086 80.222)",comment:"oklch(0.919 0 0 / 0.369)",constant:"oklch(0.854 0.131 83.385)",parameter:"oklch(0.878 0.01 286.202)",punctuation:"oklch(0.878 0.01 286.202)",link:"oklch(0.799 0.106 249.274)",stringExpression:"oklch(0.769 0.132 329.919)"}},e9={1:1,2:2},$y={instant:50,fast:100,normal:150,slow:200,slower:300},JA={default:"ease",in:"ease-in",out:"ease-out",inOut:"ease-in-out",inStrong:"cubic-bezier(0.895, 0.03, 0.685, 0.22)",outStrong:"cubic-bezier(0.165, 0.84, 0.44, 1)",outCubic:"cubic-bezier(0.215, 0.61, 0.355, 1)",outQuint:"cubic-bezier(0.16, 1, 0.3, 1)",inOutStrong:"cubic-bezier(0.77, 0, 0.175, 1)"},t9={"ne-0.25":-1,"ne-0.5":-2,"ne-0.75":-3,"ne-1":-4,"ne-1.25":-5,"ne-1.5":-6,"ne-1.75":-7,"ne-2":-8,"ne-2.25":-9,"ne-2.5":-10,"ne-2.75":-11,"ne-3":-12,"ne-3.25":-13,"ne-3.5":-14,"ne-3.75":-15,"ne-4":-16,"ne-4.25":-17,"ne-4.5":-18,"ne-4.75":-19,"ne-5":-20,"0.25":1,"0.5":2,"0.75":3,1:4,"1.25":5,"1.5":6,"1.75":7,2:8,"2.25":9,"2.5":10,"2.75":11,3:12,"3.25":13,"3.5":14,"3.75":15,4:16,"4.25":17,"4.5":18,"4.75":19,5:20,"5.5":22,6:24,"6.5":26,7:28,"7.5":30,8:32,"8.5":34,9:36,"9.5":38,10:40,11:44,12:48,13:52,14:56,15:60,16:64,17:68,18:72,19:76,20:80},n9={none:0,xs:2,sm:4,base:6,lg:8,xl:12,"2xl":14,"3xl":16,"4xl":18,full:9999},r9={xs:20,sm:24,base:28,lg:32},i9={xs:11,sm:12,base:13,lg:14},s9={xs:14,sm:16,base:18,lg:22},o9={xs:.07,sm:0,base:-.08,lg:-.15,xl:.08,"2xl":-.46,"3xl":-.26},a9=.98,l9=2,QE={open:$y.fast,close:$y.fast},u9=JA.outQuint;function eO(e){const[t,n]=e.split("-");switch(t){case"top":case"right":case"bottom":case"left":return{side:t,alignment:n==="start"||n==="end"?n:void 0};default:throw new Error(`Unsupported floating placement: ${e}`)}}function c9(e){const{side:t,alignment:n}=eO(e);switch(t){case"top":return`${JE(n)} bottom`;case"right":return`left ${eT(n)}`;case"bottom":return`${JE(n)} top`;case"left":return`right ${eT(n)}`}}function f9(e,t={}){const{side:n}=eO(e),r=t.offset??l9,s=t.scale??a9;switch(n){case"top":return`translate3d(0, ${r}px, 0) scale(${s})`;case"right":return`translate3d(-${r}px, 0, 0) scale(${s})`;case"bottom":return`translate3d(0, -${r}px, 0) scale(${s})`;case"left":return`translate3d(${r}px, 0, 0) scale(${s})`}}function d9(e,t){return{opacity:0,transform:f9(e,t)}}function p9(e){return{transformOrigin:c9(e),transitionTimingFunction:u9}}function h9({closeDuration:e=QE.close,transform:t}={}){return{duration:{open:QE.open,close:e},initial:({placement:n})=>d9(n,t),common:({placement:n})=>p9(n)}}function JE(e){switch(e){case"start":return"left";case"end":return"right";case void 0:return"center"}}function eT(e){switch(e){case"start":return"top";case"end":return"bottom";case void 0:return"center"}}function m9(){const e=v.useRef(!0),t=v.useRef(void 0),n=v.useCallback(()=>{t.current!==void 0&&(clearTimeout(t.current),t.current=void 0)},[]),r=v.useCallback((s,a)=>{e.current&&(n(),t.current=setTimeout(()=>{t.current=void 0,s()},a))},[n]);return v.useEffect(()=>(e.current=!0,()=>{e.current=!1,n()}),[n]),v.useMemo(()=>({cancel:n,schedule:r}),[n,r])}const g9=300,tO=v.createContext(null);function By({children:e}){const[t,n]=v.useState(null),r=m9(),s=v.useCallback(c=>{r.cancel(),n(c)},[r]),a=v.useCallback(c=>{r.schedule(()=>{n(d=>d===c?null:d)},g9)},[r]),l=v.useMemo(()=>({activeId:t,markOpen:s,markClosed:a}),[t,s,a]);return g.jsx(tO.Provider,{value:l,children:e})}function b9(e,t){const n=v.useContext(tO),r=n?.markOpen,s=n?.markClosed;return v.useEffect(()=>{if(!(!t||e==null||r==null||s==null))return r(e),()=>s(e)},[t,e,r,s]),{activeId:n?.activeId??null}}const jl="data-ui-menu-item-region",nO=v.createContext("body");function Ss({value:e,children:t}){return g.jsx(nO.Provider,{value:e,children:t})}function Xc(){return v.useContext(nO)}const y9='[role="menuitem"]',tT=["pointermove","mousemove"];function rO(e){if(e.key==="ArrowDown"||e.key==="ArrowUp"||e.key==="ArrowLeft"||e.key==="ArrowRight"||e.key==="Home"||e.key==="End")return!0;if(!e.ctrlKey||e.metaKey)return!1;const t=e.key.toLowerCase();return t==="n"||t==="p"||t==="j"||t==="k"}function v9(e,t){if(t==null)return null;const n=e.current[t];return n instanceof HTMLElement?n:null}function x9(e,t){const n=e.current;for(let r=0;r<n.length;r++)if(n[r]?.getAttribute(jl)===t)return r;return null}function iO(e,t,n){queueMicrotask(()=>{const r=x9(e,t);n(r??null)})}function sO(e,t){if(!(e instanceof Element))return null;const n=e.closest(y9);if(!n)return null;const r=t.current.indexOf(n);return r>=0?r:null}function k9(e,t){if(!e)return()=>{};for(const n of tT)e.addEventListener(n,t,{passive:!0});return()=>{for(const n of tT)e.removeEventListener(n,t)}}function S9({event:e,direction:t,activeIndex:n,listRef:r,restoreFocus:s}){const a=v9(r,n);if(!a)return!1;e.preventDefault(),e.stopPropagation();const l=document.activeElement===e.currentTarget;return a.focus(),a.dispatchEvent(new KeyboardEvent("keydown",{key:t,bubbles:!0,cancelable:!0})),l&&document.activeElement===a&&s?.(),!0}function oO(){const[e,t]=v.useState(!0),n=v.useCallback(()=>{t(!1)},[]),r=v.useCallback(()=>{t(!0)},[]),s=v.useCallback(()=>{t(!0)},[]);return{focusItemOnHoverEnabled:e,markKeyboardNavigation:n,markPointerNavigation:r,resetFocusItemOnHover:s}}const w9=360,aO="--ui-menu-available-width",wx="--ui-menu-available-height",E9=new Set(["none","auto","initial","inherit","unset","revert","revert-layer","min-content","max-content","fit-content","stretch"]);function lO(e){const t=`var(${wx}, 100vh)`;return e==null||T9(e)?t:`min(${rl(e)}, ${t})`}function T9(e){return typeof e=="string"&&E9.has(e.trim().toLowerCase())}const R9="320px";function rl(e){return typeof e=="number"?`${e}px`:e}function Bb(e){return`min(${e}, var(${aO}, 100vw))`}function Ex(e){const{width:t,minWidth:n,maxWidth:r,clampToAvailableWidth:s=!1}=e,l=t===void 0&&(n!==void 0||r!==void 0)?"max-content":rl(t??"200px");return s?{width:l==="max-content"?l:Bb(l),...n!=null&&{minWidth:Bb(rl(n))},maxWidth:Bb(r!=null?rl(r):R9)}:{width:l,...n!=null&&{minWidth:rl(n)},...r!=null&&{maxWidth:rl(r)}}}const C9=50;function Tx({isOpen:e,isPositioned:t}){return e&&!t?{opacity:0}:void 0}function _9(e,t){v.useLayoutEffect(()=>{if(!e)return;const n=t.current;if(!(n instanceof HTMLElement))return;const r=n.closest('[role="menu"]');if(r!=null)return r.style.pointerEvents="none",n.style.pointerEvents="auto",()=>{r.style.pointerEvents="",n.style.pointerEvents=""}},[e,t])}function N9(){return{name:"bottomAnchor",fn({y:e,placement:t,rects:n,elements:r}){if(!t.startsWith("top"))return{};const s=r.floating.offsetParent,a=s===document.body&&window.getComputedStyle(s).position==="static";return{data:{bottom:(!s||s===document.documentElement||a?document.documentElement.clientHeight||window.innerHeight:s.clientHeight)-e-n.floating.height}}}}}function jh(e=200){const t=v.useRef(0);return v.useEffect(()=>{const n=()=>{t.current=Date.now()+e};return window.addEventListener("focus",n),()=>{window.removeEventListener("focus",n)}},[e]),v.useCallback(n=>{const r=n.target,s=r instanceof Node?r.ownerDocument:document,a=Date.now(),l=s?.hasFocus()??document.hasFocus(),c=a>=t.current;return l&&c},[])}const A9={open:0,close:0},O9={opacity:1,transform:"none"},Rx=v.createContext(null);function Gi(e){const t=v.useContext(Rx);if(!t)throw new Error(`${e} must be used within LegacyMenu`);return t}function uO(){return Gi("LegacyMenu.useContext")}function M9({children:e,open:t,defaultOpen:n=!1,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l="bottom-start",offset:c=4,flip:d=!0,closeOnSelect:f,instantClose:h=!1,instantTransitions:m=!1,returnFocusOnSelect:b=!0,returnFocus:y,focusItemOnOpen:k=!1,virtualFocus:S=!1,shouldKeepOpenDuringDrag:R=!1,lockPositionWhileOpen:T=!1,dismissOnReferenceScroll:E=!1,enableClick:C=!0,strategy:_,shouldDismissOutsidePress:D}){const N=gx(),[A,$]=xc(t,n,r,"LegacyMenu.Root (open)"),[z,I]=v.useState(""),Y=v.useRef(null),[H,q]=v.useState(!1),[L,F]=v.useState(!1),[U,W]=xc(s,null,a,"LegacyMenu.Root (activeIndex)"),{focusItemOnHoverEnabled:B,markKeyboardNavigation:K,markPointerNavigation:O,resetFocusItemOnHover:P}=oO(),V=v.useRef([]),j=v.useRef([]),Z=v.useRef(null),te=v.useCallback(xe=>{$(xe),xe?(I(""),Z.current=null):W(null),P()},[P,$,W]),se=v.useRef(!1);v.useLayoutEffect(()=>{const xe=se.current;se.current=A,!xe&&A&&I(""),xe!==A&&P()},[A,P]);const{refs:ue,floatingStyles:le,middlewareData:fe,context:ge,update:_e}=kx({nodeId:N,open:A,onOpenChange:te,placement:l,strategy:_,middleware:[Gv(c),...d?[Wv()]:[],Vv(),Kv({padding:8,apply({availableHeight:xe,elements:$e}){$e.floating.style.setProperty(wx,`${Math.max(0,Math.floor(xe))}px`)}}),N9()],whileElementsMounted:T?void 0:Rp,transform:!1}),oe=lA(ge,{enabled:L,delay:{open:75},handleClose:xA({blockPointerEvents:!0,requireIntent:!1})}),ye=dA(ge,{enabled:C&&!L}),Se=jh(),Oe=v.useCallback(xe=>D!==void 0&&!D(xe)||R&&ci.getInstance().hasData()?!1:Se(xe),[D,R,Se]),we=pA(ge,{ancestorScroll:E,outsidePressEvent:"click",outsidePress:Oe}),ke=gA(ge,{role:"menu"}),De=mA(ge,{listRef:V,activeIndex:U,onNavigate:W,loop:!1,virtual:S||H,focusItemOnOpen:k,focusItemOnHover:B}),Me=yA(ge,{listRef:j,activeIndex:U,onMatch:H?void 0:W,enabled:!H}),{getReferenceProps:Le,getFloatingProps:He,getItemProps:be}=hA([oe,ye,we,ke,De,Me]),Re=v.useCallback(xe=>({...Le(xe),ref:ue.setReference,"aria-haspopup":"menu","aria-expanded":A}),[Le,ue.setReference,A]),ee=m?{duration:A9,initial:O9}:h9(h?{closeDuration:0}:void 0),{isMounted:ce,styles:J}=bA(ge,ee),re=v.useMemo(()=>({isOpen:A,isMounted:ce,setIsOpen:$,activeIndex:U,setActiveIndex:W,markKeyboardNavigation:K,markPointerNavigation:O,virtualFocus:S,searchValue:z,setSearchValue:I,hasSearchInput:H,setHasSearchInput:q,enableHover:L,setHasHoverTrigger:F,closeOnSelect:f,returnFocusOnSelect:b,returnFocus:y,nodeId:N,listRef:V,labelsRef:j,searchInputRef:Y,refs:ue,floatingStyles:le,middlewareData:fe,transitionStyles:J,context:ge,updateFloating:_e,getReferenceProps:Le,getFloatingProps:He,getItemProps:be,getTriggerProps:Re,dismissCauseRef:Z,shouldAllowPointerInteraction:Oe}),[A,ce,$,U,W,K,O,S,z,H,L,f,b,y,N,ue,le,fe,J,ge,_e,Le,He,be,Re,Oe]);return g.jsx(bx,{id:N,children:g.jsx(Rx.Provider,{value:re,children:g.jsx(By,{children:e})})})}function Fu(e,t){return n=>{e?.(n),n.defaultPrevented||t(n)}}function zl(e,t){switch(e){case"ArrowLeft":return t==="rtl"?"end":"start";case"ArrowRight":return t==="rtl"?"start":"end";default:return null}}const I9={_zod:{output:{}},safeParse:e=>e!==null&&typeof e=="object"&&!Array.isArray(e)?{success:!0}:{success:!1,error:new TypeError("drag payload must be an object")}};function cO(e,t=()=>I9){var a;let n=null;const r=()=>(n===null&&(n=t()),n);return a=class{constructor(c){this.type=e,this.payload=c}static get schema(){return r()}},a.type=e,a}const D9=v.createContext(null);function L9(){return v.useContext(D9)}const j9=v.createContext("copy-with-plain-text");function z9(){return v.useContext(j9)}const P9="application/x-cursor-draggable",Pd=B9("ui-i9pz9s"),$9="data-no-drag";let Ko=!1,nT=!1;function B9(e){return e?.split(/\s+/).filter(Boolean)??[]}function $d(e,t,n){for(const r of t)e.classList.toggle(r,n)}function F9(){if(nT||typeof document>"u")return;nT=!0,document.addEventListener("pointerdown",t=>{if(t.button!==0||!(t.target instanceof Element)){Ko=!1;return}Ko=t.target.closest(`[${$9}]`)!==null},{capture:!0});const e=()=>{Ko=!1};document.addEventListener("pointerup",e,{capture:!0}),document.addEventListener("pointercancel",e,{capture:!0})}function U9({id:e,data:t,disabled:n=!1,dragImageOffset:r,onDragStart:s,onDragEnd:a}){const l=L9(),c=z9(),d=v.useRef(null),f=v.useRef({onDragStart:s,onDragEnd:a});f.current={onDragStart:s,onDragEnd:a};const h=v.useRef(t);h.current=t;const m=v.useRef(r);m.current=r;const b=v.useRef(l);b.current=l;const y=l?.activeDragId===e,k=v.useRef(y);return k.current=y,v.useEffect(()=>{const R=d.current;if(R)return $d(R,Pd,!n&&y),()=>{$d(R,Pd,!1)}},[n,y]),v.useEffect(()=>{const R=d.current;if(!R)return;if(n){R.removeAttribute("aria-grabbed");return}const T=y?"true":"false";R.getAttribute("aria-grabbed")!==T&&R.setAttribute("aria-grabbed",T)},[n,y]),{ref:v.useCallback(R=>{if(d.current=R,!R)return;$d(R,Pd,!n&&k.current);const T=!n;if(R.draggable!==T&&(R.draggable=T),n)return;F9();const E=ci.getInstance(),C=D=>{if(Ko){Ko=!1,D.preventDefault(),D.stopPropagation();return}const N=h.current;E.setData(N);const A=R.ownerDocument,$=()=>{A.removeEventListener("dragend",$,!0),A.removeEventListener("drop",$,!0),A.removeEventListener("mousemove",$,!0),setTimeout(()=>{E.getData()===N&&(E.clearData(),Ko=!1,b.current?.setDragging(null,null))},0)};if(A.addEventListener("dragend",$,!0),A.addEventListener("drop",$,!0),A.addEventListener("mousemove",$,!0),D.dataTransfer){const z=c==="copy-with-plain-text";D.dataTransfer.effectAllowed=z?"copyMove":"move",D.dataTransfer.setData(P9,N.type),z&&D.dataTransfer.setData("text/plain",N.type);const I=m.current;I&&D.dataTransfer.setDragImage(R,I.x,I.y)}b.current?.setDragging(e,N,{x:D.clientX,y:D.clientY}),f.current.onDragStart?.(D)},_=D=>{E.clearData(),Ko=!1,b.current?.setDragging(null,null),f.current.onDragEnd?.(D)};return R.addEventListener("dragstart",C),R.addEventListener("dragend",_),()=>{R.removeEventListener("dragstart",C),R.removeEventListener("dragend",_),$d(R,Pd,!1)}},[e,n,c]),isDragging:y}}const pp={base:{"--ui-menu-row-padding-block":"ui-kd6fbz","--ui-menu-row-padding-inline":"ui-1ucplye","--ui-menu-row-gap":"ui-1fi38xd","--ui-menu-row-border-radius":"ui-1swa0pb","--ui-menu-item-left-width":"ui-1bm229x","--ui-menu-item-left-height":"ui-1eaezr9","--ui-menu-search-row-padding-top":"ui-so2ig8","--ui-menu-section-title-padding-inline":"ui-e020nh",kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kY2c9j:"ui-fc2p8",kVAEAm:"ui-1n2onr6",kGVxlE:"ui-1gnnqk1",k7Eaqz:"ui-1i9suas",ks0D6T:"ui-1va8c73",kfSwDN:"ui-87ps6o",kY4cRS:"ui-lvsv26",k6sLGO:"ui-1q1rmc8",k3aq6I:"ui-17dzmu4",kgyCeQ:"ui-lp1x4z",kdrBUz:"ui-7iibnf",kHBbk8:"ui-c8icb0",ktR8K2:"ui-awy1a7",kgeoSG:"ui-1cpjm7i",kEoFBp:"ui-1hmns74",kFcpXp:"ui-xx281p",kPB484:"ui-xyica1",ktNmms:"ui-wfqmlb",km8f2m:"ui-kk1bqk",k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",kv0HGH:"ui-arstr8",kDVEDD:"ui-itxdhh",kUfP38:"ui-1k48kgn",kbMawA:"ui-1o7vem3",kloYau:"ui-2q1x1w",$$css:!0},sizeMd:{"--ui-menu-row-padding-block":"ui-1jjxvf6","--ui-menu-row-padding-inline":"ui-18k90n9","--ui-menu-row-gap":"ui-vzyzmz","--ui-menu-item-left-width":"ui-eurstk","--ui-menu-item-left-height":"ui-1eaezr9","--ui-menu-search-row-padding-top":"ui-14atyw8","--ui-menu-section-title-padding-inline":"ui-mhevzc","--ui-menu-row-border-radius":"ui-s7jddj",kaIpWk:"ui-1pkpdue",$$css:!0},hasAttachment:{kWkggS:"ui-jbqb8w",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",khm7nJ:"ui-3r2rup",kP1sEF:"ui-15ozc13",kc3QkE:"ui-1h1zc6f",$$css:!0},dropIndicator:{kMeerF:"ui-1qgsegg",k3XXqK:"ui-aatb59",kjBf7l:"ui-pkz39j",kInvED:"ui-1jn6s22",k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",kc1e00:"ui-cfinr5",kH8aOt:"ui-14idyls",k3foIR:"ui-17mrvg7",k4zj60:"ui-1d1o5dh",ks3ayO:"ui-1ssvodr",kUfP38:"ui-gad8h8",kloYau:"ui-2q1x1w",kDVEDD:"ui-itxdhh",$$css:!0}},q9={base:{kVAEAm:"ui-ixxii4",kpwlN0:"ui-10a8y8t",kY2c9j:"ui-cfsmg2",kLKAdn:"ui-exx8yu",kwRFfy:"ui-yri2b",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1c1uobl",keoZOQ:"ui-dj266r",k71WvV:"ui-14z9mp",k1K539:"ui-at24cr",keTefX:"ui-1lziwak",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kLZC3w:"ui-1b4hy2t",ke9TFa:"ui-10w94by",k8ry5P:"ui-18oe1m7",kBCPoo:"ui-1273586",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kL6WhQ:"ui-1tnzt7h",k2ei4v:"ui-14e42zd",kVhnKS:"ui-stzfhl",kGJrpR:"ui-1mi4oqr",kysU6D:"ui-jyslct",kkrTdU:"ui-t0e3qv",kWkggS:"ui-jbqb8w",kY4cRS:"ui-lvsv26",$$css:!0}},hi={dropIndicatorSlot:{k1xSpc:"ui-jp7ctv",kfzvcC:"ui-47corl",$$css:!0},inner:{kLKAdn:"ui-12ryuzz",kwRFfy:"ui-opxd5p",kGO01o:"ui-ftabeb",kZCmMZ:"ui-1bpcb8s",k2VNRW:"ui-1aj3mmm",$$css:!0},layout:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kAzted:"ui-2lwn1j",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",$$css:!0},bodyScroll:{kzQI83:"ui-1iyjqo2",kmuXW:"ui-s83m0k",kCS8Yb:"ui-dl72j9",kAzted:"ui-2lwn1j",$$css:!0},header:{kLKAdn:"ui-f6zju3",kwRFfy:"ui-1tlft3r",kGO01o:"ui-cnij5n",kZCmMZ:"ui-tw3t59",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-17fyfba",$$css:!0},footer:{kLKAdn:"ui-f6zju3",kwRFfy:"ui-1tlft3r",kGO01o:"ui-cnij5n",kZCmMZ:"ui-tw3t59",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-1aeic0j",$$css:!0},layoutCard:{kVAEAm:"ui-1n2onr6",kWkggS:"ui-f1vpex",kaIpWk:"ui-1pjcqnp",kGVxlE:"ui-1x78n9t",$$css:!0},attachment:{kVAEAm:"ui-1n2onr6",kmuXW:"ui-2lah0s",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kWkggS:"ui-f1vpex",kaIpWk:"ui-1pjcqnp",kGVxlE:"ui-1x78n9t",$$css:!0},list:{kH6xsr:"ui-3ct3a4",keoZOQ:"ui-dj266r",k71WvV:"ui-14z9mp",k1K539:"ui-at24cr",keTefX:"ui-1lziwak",kLKAdn:"ui-exx8yu",kwRFfy:"ui-yri2b",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1c1uobl",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kOIVth:"ui-1374kml",$$css:!0},virtualizedList:{kOIVth:"ui-xhr3t",$$css:!0},virtualizedRow:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kGNEyG:"ui-1qjc9v5",kB7OPa:"ui-9f619",$$css:!0},virtualizedScroller:{kzqmXN:"ui-h8yej3",kXHlph:"ui-6ikm8r",k5wCbM:"ui-1rohswg",kAnDOJ:"ui-6ehuon",kOuLrU:"ui-fk6m8",$$css:!0}},Oi={base:{k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-1cy8zhl",kB7OPa:"ui-9f619",kAzted:"ui-bpgt9h",kOIVth:"ui-1kk7d6x",kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kLKAdn:"ui-1xgckd",kwRFfy:"ui-yupq46",kGO01o:"ui-1mv37q2",kZCmMZ:"ui-1xc7y5k",kaIpWk:"ui-1w5zb4f",kkrTdU:"ui-1ypdohk",kWkggS:"ui-jbqb8w",$$css:!0},focused:{kWkggS:"ui-flfp0o",$$css:!0},submenuHover:{kWkggS:"ui-qjnua1",$$css:!0},selected:{kWkggS:"ui-i07v4r",$$css:!0},disabled:{kMwMTN:"ui-4b2ntj",kkrTdU:"ui-t0e3qv",$$css:!0},disabledFocused:{kWkggS:"ui-jbqb8w",$$css:!0},muted:{kMwMTN:"ui-1e4uaio",$$css:!0},mutedFocused:{kMwMTN:"ui-19aaqeu",$$css:!0},indent:{kZCmMZ:"ui-bp56qb",$$css:!0},expanded:{kWkggS:"ui-flfp0o",$$css:!0}},Ui={left:{kmuXW:"ui-2lah0s",kMwMTN:"ui-r88yfa",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kzqmXN:"ui-1kvrb00",kZKoxP:"ui-g2ss61",$$css:!0},leftWide:{kzqmXN:"ui-1td3qas",$$css:!0},content:{kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-1qughib",$$css:!0},right:{kmuXW:"ui-2lah0s",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kMwMTN:"ui-19aaqeu",kZKoxP:"ui-g2ss61",$$css:!0},rightDisabled:{kMwMTN:"ui-1e4uaio",$$css:!0},rightHidden:{k33iCy:"ui-lshs6z",$$css:!0},submenuRight:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",$$css:!0},wrapper:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",k7Eaqz:"ui-euugli",kUk6DE:"ui-98rzlu",kLWn49:"ui-1evy7pa",$$css:!0},title:{kzqmXN:"ui-h8yej3",kUk6DE:"ui-98rzlu",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",$$css:!0},description:{k63SB2:"ui-20ajya",kMwMTN:"ui-4b2ntj",$$css:!0}},Zo={wrapper:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",$$css:!0},wrapperInline:{kXwgrk:"ui-1q0g3np",kGNEyG:"ui-1pha0wt",kOIVth:"ui-ehausa",$$css:!0},title:{kMwMTN:"ui-1wd3ewq",$$css:!0},titleInline:{kzQI83:"ui-1ikap7u",kmuXW:"ui-2lah0s",kCS8Yb:"ui-1r8uery",k7Eaqz:"ui-euugli",ks0D6T:"ui-1t8xbu",$$css:!0},subtitle:{kMwMTN:"ui-4b2ntj",$$css:!0},subtitleInline:{kzQI83:"ui-gyuaek",kmuXW:"ui-2lah0s",kCS8Yb:"ui-1r8uery",k7Eaqz:"ui-euugli",ks0D6T:"ui-1t8xbu",$$css:!0},subtitleWrap:{khDVqt:"ui-eaf4i8",kXHlph:"ui-1plvlek",kORKVm:"ui-ryxfnj",kg5iWk:"ui-brixnn",$$css:!0}},Up={wrapper:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kOIVth:"ui-1374kml",kEbPVU:"ui-g259vi",kisVnR:"ui-141yacn",kPhN0D:"ui-xacq05",kCI4qJ:"ui-119sr6i",kflGA3:"ui-144guhz",kuQXTp:"ui-yhg72o",k8KjL7:"ui-o6llqc",k6ANuI:"ui-qapjow",kzNLci:"ui-13cyfv6",kvgbxY:"ui-449esf",kSChS3:"ui-i7iayf",kW5UhK:"ui-43qgld",kIK0UP:"ui-16isvt",kKhlpd:"ui-1s6a5gi",kWPmei:"ui-f2yixb",k1ZCP1:"ui-9ymq9g",k8vVtf:"ui-8il1zj",kXJ5VR:"ui-tv04z4",kFqVbU:"ui-al8qud",k3zOy0:"ui-bvt3p7",kYzy8m:"ui-1b3rhy7",k4QksK:"ui-azug9i",kA8bO0:"ui-p35uty",kOegPX:"ui-11nj3wz",kMHwGy:"ui-1db8ipi",kcy3WD:"ui-1xjs8pl",k1e9jE:"ui-1lnrnqe",kSTvrD:"ui-ejpia5",kvV0by:"ui-6xymf4",kysnry:"ui-1hw1hzy",$$css:!0},title:{kLKAdn:"ui-f6zju3",kwRFfy:"ui-fp2jl6",kGO01o:"ui-cnij5n",kZCmMZ:"ui-vc46pw",kMwMTN:"ui-4b2ntj",$$css:!0},titleAction:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-1qughib",kOIVth:"ui-ehausa",$$css:!0},textAction:{kmuXW:"ui-2lah0s",kEafiO:"ui-972fbf",ke9TFa:"ui-10w94by",kt9PQ7:"ui-1qhh985",k2ei4v:"ui-14e42zd",kWkggS:"ui-jbqb8w",kLKAdn:"ui-exx8yu",kwRFfy:"ui-yri2b",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1c1uobl",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-1qlqyl8",k63SB2:"ui-1pd3egz",kLWn49:"ui-15bjb6t",kMwMTN:"ui-4b2ntj ui-7gh5u8",kkrTdU:"ui-1ypdohk",kaIpWk:"ui-1e1y6u3",k1ekBW:"ui-1oy24xj",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-7s97pk",kjBf7l:"ui-1uczgqu ui-1725o6r",$$css:!0}},H9={divider:{k1xSpc:"ui-1lliihq",kEafiO:"ui-jpjugk",kPef9Z:"ui-13fuv20",kLZC3w:"ui-14av3n6",keoZOQ:"ui-15lde7i",k71WvV:"ui-1av4zx7",k1K539:"ui-4qbr5s",keTefX:"ui-3f5ixz",kfzvcC:"ui-47corl",$$css:!0}},G9={row:{kLKAdn:"ui-fs8kq3",kwRFfy:"ui-yupq46",kGO01o:"ui-b6dno7",kZCmMZ:"ui-1xc7y5k",$$css:!0}},Fy={surface:{kzqmXN:"ui-1oysuqx",kskxy:"ui-uyqlj2",kORKVm:"ui-1odjw0f",kfzvcC:"ui-67bb7w",k5wCbM:"ui-1597r2g",k6w4Gs:"ui-xkn5u1",$$css:!0},surfaceMedium:{kzqmXN:"ui-ezivpi",ks0D6T:"ui-y2m5lo",$$css:!0},surfaceWide:{kzqmXN:"ui-ezivpi",ks0D6T:"ui-c74ic2",$$css:!0}},qp={empty:{kLKAdn:"ui-f6zju3",kwRFfy:"ui-t1q3vd",kGO01o:"ui-cnij5n",kZCmMZ:"ui-8fiw5y",kMwMTN:"ui-4b2ntj",k9WMMc:"ui-2b8uid",$$css:!0},emptyIndent:{kZCmMZ:"ui-14o0yop",$$css:!0},loading:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kOIVth:"ui-ehausa",kLKAdn:"ui-13ly8rp",kwRFfy:"ui-t1q3vd",kGO01o:"ui-1xlntvz",kZCmMZ:"ui-8fiw5y",kMwMTN:"ui-4b2ntj",$$css:!0},loadingSpinner:{k44tkh:"ui-1s1fvk8",$$css:!0}};function V9(e,t=!1){return[$N,pp.base,Fi.root,e==="md"&&pp.sizeMd,t&&pp.hasAttachment]}function W9(e=!1){return e&&pp.dropIndicator}function K9(){return q9.base}function Y9(){return hi.inner}function X9(){return hi.dropIndicatorSlot}function Z9(e=!1){return[hi.layout,e&&hi.layoutCard,e&&Th.border]}function Q9(){return[hi.attachment,Th.border]}function fO(){return hi.bodyScroll}function J9(){return hi.header}function eU(){return hi.footer}function tU(e=!1){return[hi.list,e&&hi.virtualizedList]}function nU(){return hi.virtualizedRow}function rU(){return hi.virtualizedScroller}function Cx(e={}){return[Oi.base,e.selected&&Oi.selected,e.inSubmenu&&!e.disabled&&Oi.submenuHover,e.focused&&Oi.focused,e.expanded&&Oi.expanded,e.disabled&&Oi.disabled,e.disabled&&e.focused&&Oi.disabledFocused,e.variant==="muted"&&Oi.muted,e.variant==="muted"&&e.focused&&Oi.mutedFocused,e.indent&&Oi.indent]}const iU={disabled:{kkrTdU:"ui-1h6gzvc",$$css:!0}};function sU(){return iU.disabled}function oU(e={}){return[Ui.left,e.wideLeft&&Ui.leftWide]}function aU(){return Ui.content}function lU(e={}){return[Ui.right,e.disabled&&Ui.rightDisabled,e.trailingHidden&&Ui.rightHidden]}function uU(){return Ui.submenuRight}function cU(){return Ui.wrapper}function fU(){return[Ll.root,Ui.title]}function dU(){return[Rs.root,Ll.root,Ui.description]}function pU(e){return[Zo.wrapper,e&&Zo.wrapperInline]}function hU(e){return[Ll.root,Zo.title,e&&Zo.titleInline]}function mU({inline:e,wrap:t}){return[Rs.root,Ll.root,Zo.subtitle,e&&Zo.subtitleInline,t&&Zo.subtitleWrap]}function gU(){return G9.row}function bU(){return Up.wrapper}function yU(e){return[Rs.root,Up.title,e&&Up.titleAction]}function vU(){return Up.textAction}function xU(){return H9.divider}function _x(){return Fy.surface}function dO(e){switch(e){case"default":return;case"medium":return Fy.surfaceMedium;case"wide":return Fy.surfaceWide;default:return e}}function kU(e){return[Rs.root,qp.empty,e&&qp.emptyIndent]}function SU(){return[Fi.root,qp.loading]}function wU(){return qp.loadingSpinner}const pO=v.createContext(null);function Zc(e){const t=v.useContext(pO);if(!t)throw new Error(`${e} must be used within LegacyMenu.Content or LegacyMenu.SubMenuContent`);return t}function hO({children:e,activeIndex:t,setIsOpen:n,getItemProps:r,searchValue:s,closeOnSelect:a,virtualFocus:l=!1}){const c=v.useMemo(()=>({activeIndex:t,setIsOpen:n,getItemProps:r,searchValue:s,closeOnSelect:a,virtualFocus:l}),[t,n,r,s,a,l]);return g.jsx(pO.Provider,{value:c,children:e})}const mO=v.createContext(void 0);function zh(e){const t=v.useContext(mO);if(t===void 0&&!e)throw new Error(Nn(72));return t}const EU={...G_,disabled:et(e=>e.disabled),instantType:et(e=>e.instantType),isInstantPhase:et(e=>e.isInstantPhase),trackCursorAxis:et(e=>e.trackCursorAxis),disableHoverablePopup:et(e=>e.disableHoverablePopup),lastOpenChangeReason:et(e=>e.openChangeReason),closeOnClick:et(e=>e.closeOnClick),closeDelay:et(e=>e.closeDelay),hasViewport:et(e=>e.hasViewport)};class Nx extends Zv{constructor(t,n,r=!1){const s=new bh,a={...TU(),...t};a.floatingRootContext=q_(s,n,r),super(a,{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:s},EU)}setOpen=(t,n)=>{j_(this,t,n,{extraState:{openChangeReason:n.reason}})};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,xt(Ol,t))}static useStore(t,n){return L_(t,(s,a)=>new Nx(n,s,a)).store}}function TU(){return{...U_(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}const RU=Xv(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:s,disableHoverablePopup:a=!1,trackCursorAxis:l="none",actionsRef:c,onOpenChange:d,onOpenChangeComplete:f,handle:h,triggerId:m,defaultTriggerId:b=null,children:y}=t,k=Nx.useStore(h?.store,{open:r,openProp:s,activeTriggerId:b,triggerIdProp:m});z_(k,s,r,b),k.useControlledProp("openProp",s),k.useControlledProp("triggerIdProp",m),k.useContextCallback("onOpenChange",d),k.useContextCallback("onOpenChangeComplete",f);const S=k.useState("open"),R=!n&&S,T=k.useState("activeTriggerId"),E=k.useState("mounted"),C=k.useState("payload");k.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:a}),k.useSyncedValue("disabled",n),$_(k,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:_,transitionStatus:D}=B_(R,k),N=k.useState("isInstantPhase"),A=k.useState("instantType"),$=k.useState("lastOpenChangeReason"),z=v.useRef(null);Ge(()=>{S&&n&&k.setOpen(!1,xt(HC))},[S,n,k]),Ge(()=>{D==="ending"&&$===Si||D!=="ending"&&N?(A!=="delay"&&(z.current=A),k.set("instantType","delay")):z.current!==null&&(k.set("instantType",z.current),z.current=null)},[D,N,$,A,k]),Ge(()=>{R&&T==null&&k.set("payload",void 0)},[k,T,R]);const I=v.useCallback(()=>{k.setOpen(!1,xt(vp))},[k]);v.useImperativeHandle(c,()=>({unmount:_,close:I}),[_,I]);const Y=R||E||!n&&l!=="none";return g.jsxs(mO.Provider,{value:k,children:[Y&&g.jsx(CU,{store:k,disabled:n,trackCursorAxis:l}),typeof y=="function"?y({payload:C}):y]})});function CU({store:e,disabled:t,trackCursorAxis:n}){const r=e.useState("floatingRootContext"),s=qv(r,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),a=rP(r,{enabled:!t&&n!=="none",axis:n==="none"?void 0:n}),l=v.useMemo(()=>Pi(a.reference,s.reference),[a.reference,s.reference]),c=v.useMemo(()=>Pi(a.trigger,s.trigger),[a.trigger,s.trigger]),d=v.useMemo(()=>Pi(Qv,a.floating,s.floating),[a.floating,s.floating]);return F_(e,{activeTriggerProps:l,inactiveTriggerProps:c,popupProps:d}),null}const _U=v.createContext(void 0);function NU(){return v.useContext(_U)}let AU=(function(e){return e[e.popupOpen=yp.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const OU=600,gO="data-base-ui-tooltip-trigger";function rT(e){if("composedPath"in e){const n=e.composedPath();for(let r=0;r<n.length;r+=1){const s=n[r];if(ft(s))return s}}const t=e.target;return ft(t)?t:null}function MU(e){let t=e;for(;t;){if(t.hasAttribute(gO))return t;const n=t.parentElement;if(n){t=n;continue}const r=t.getRootNode();t="host"in r&&ft(r.host)?r.host:null}return null}const IU=M_(function(t,n){const{render:r,className:s,style:a,handle:l,payload:c,disabled:d,delay:f,closeOnClick:h=!0,closeDelay:m,id:b,...y}=t,k=zh(!0),S=l?.store??k;if(!S)throw new Error(Nn(82));const R=Ml(b),T=S.useState("isTriggerActive",R),E=S.useState("isOpenedByTrigger",R),C=S.useState("floatingRootContext"),_=v.useRef(null),D=f??OU,N=m??0,{registerTrigger:A,isMountedByThisTrigger:$}=P_(R,_,S,{payload:c,closeOnClick:h,closeDelay:N}),z=NU(),{delayRef:I,isInstantPhase:Y,hasProvider:H}=x2(C,{open:E}),q=tx(C);S.useSyncedValue("isInstantPhase",Y);const L=S.useState("disabled"),F=d??L,U=_n(F),W=S.useState("trackCursorAxis"),B=S.useState("disableHoverablePopup"),K=v.useRef(!1),O=di(),P=v.useRef(void 0);function V(){const oe=z?.delay,ye=typeof I.current=="object"?I.current.open:void 0;let Se=D;return H&&(ye!==0?Se=f??oe??D:Se=0),Se}function j(oe){const ye=_.current;if(!ye||!oe)return!1;const Se=MU(oe);return Se!==null&&Se!==ye&&dt(ye,Se)}function Z(oe){const ye=j(oe);return K.current=ye,ye&&(q.openChangeTimeout.clear(),q.restTimeout.clear(),q.restTimeoutPending=!1,O.clear()),ye}const te=X_(C,{enabled:!F,mouseOnly:!0,move:!1,handleClose:!B&&W!=="both"?Z_():null,restMs:V,delay(){const oe=typeof I.current=="object"?I.current.close:void 0;let ye=N;return m==null&&H&&(ye=oe),{close:ye}},triggerElementRef:_,isActiveTrigger:T,isClosing:()=>S.select("transitionStatus")==="ending",shouldOpen(){return!K.current}}),se=W_(C,{enabled:!F}).reference,ue=oe=>{const ye=K.current,Se=rT(oe),Oe=Z(Se),we=_.current,ke=we&&Se&&dt(we,Se);if(Oe&&S.select("open")&&S.select("lastOpenChangeReason")===yr){S.setOpen(!1,xt(yr,oe));return}if(ye&&!Oe&&ke&&!U.current&&!S.select("open")&&we&&ea(P.current)){const De=()=>{!K.current&&!U.current&&!S.select("open")&&S.setOpen(!0,xt(yr,oe,we))},Me=V();Me===0?(O.clear(),De()):O.start(Me,De)}},le=S.useState("triggerProps",$);return hn("button",t,{state:{open:E},ref:[n,A,_],props:[te,se,$||W!=="none"?le:void 0,{onMouseOver(oe){ue(oe.nativeEvent)},onFocus(oe){j(rT(oe.nativeEvent))&&oe.preventBaseUIHandler()},onMouseLeave(){K.current=!1,O.clear(),P.current=void 0},onPointerEnter(oe){P.current=oe.pointerType},onPointerDown(oe){P.current=oe.pointerType,S.set("closeOnClick",h),h&&!S.select("open")&&S.cancelPendingOpen(oe.nativeEvent)},onClick(oe){h&&!S.select("open")&&S.cancelPendingOpen(oe.nativeEvent)},id:R,[AU.triggerDisabled]:F?"":void 0,[gO]:F?void 0:""},y],stateAttributesMapping:BC})}),bO=v.createContext(void 0);function DU(){const e=v.useContext(bO);if(e===void 0)throw new Error(Nn(70));return e}const LU=v.forwardRef(function(t,n){const{keepMounted:r=!1,...s}=t;return zh().useState("mounted")||r?g.jsx(bO.Provider,{value:r,children:g.jsx(MA,{ref:n,...s})}):null}),yO=v.createContext(void 0);function jU(){const e=v.useContext(yO);if(e===void 0)throw new Error(Nn(71));return e}const zU=v.forwardRef(function(t,n){const{render:r,className:s,anchor:a,positionMethod:l="absolute",side:c="top",align:d="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:b=5,arrowPadding:y=5,sticky:k=!1,disableAnchorTracking:S=!1,collisionAvoidance:R=c_,style:T,...E}=t,C=zh(),_=DU(),D=C.useState("open"),N=C.useState("mounted"),A=C.useState("trackCursorAxis"),$=C.useState("disableHoverablePopup"),z=C.useState("floatingRootContext"),I=C.useState("instantType"),Y=C.useState("transitionStatus"),H=C.useState("hasViewport"),q=dx({anchor:a,positionMethod:l,floatingRootContext:z,mounted:N,side:c,sideOffset:f,align:d,alignOffset:h,collisionBoundary:m,collisionPadding:b,sticky:k,arrowPadding:y,disableAnchorTracking:S,keepMounted:_,collisionAvoidance:R,adaptiveOrigin:H?AN:void 0}),L=v.useMemo(()=>({open:D,side:q.side,align:q.align,anchorHidden:q.anchorHidden,instant:A!=="none"?"tracking-cursor":I}),[D,q.side,q.align,q.anchorHidden,A,I]),F=px(t,L,{styles:q.positionerStyles,transitionStatus:Y,props:E,refs:[n,C.useStateSetter("positionerElement")],hidden:!N,inert:!D||A==="both"||$});return g.jsx(yO.Provider,{value:q,children:F})}),PU={...$c,...go},$U=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,c=zh(),{side:d,align:f}=jU(),h=c.useState("open"),m=c.useState("instantType"),b=c.useState("transitionStatus"),y=c.useState("popupProps"),k=c.useState("floatingRootContext"),S=c.useState("disabled"),R=c.useState("closeDelay");xo({open:h,ref:c.context.popupRef,onComplete(){h&&c.context.onOpenChangeComplete?.(!0)}}),Y_(k,{enabled:!S,closeDelay:R});const T=c.useStateSetter("popupElement");return hn("div",t,{state:{open:h,side:d,align:f,instant:m,transitionStatus:b},ref:[n,c.context.popupRef,T],props:[y,Sh(b),l],stateAttributesMapping:PU})}),BU=v.createContext(null),FU={base:{kfSwDN:"ui-87ps6o",kfzvcC:"ui-47corl",$$css:!0}},vO=v.createContext(null);function xO(e){const t=v.use(vO);if(t===null)throw new Error(`${e} must be used within Tooltip.Root`);return t}function kO({children:e,placement:t=Rh,offset:n=8,openDelay:r=mx,closeDelay:s=Ch,disabled:a=!1,defaultOpen:l,open:c,sameAxisOnly:d=!1,onOpenChange:f,onOpenChangeComplete:h}){const m=v.use(BU),b=v.use(Bp),y=a||b,k=m?.open??r,S=m?.close??s,R=v.useMemo(()=>({disabled:y,instantDismiss:b,offset:n,placement:t,sameAxisOnly:d,triggerCloseDelay:S,triggerDelay:k}),[y,b,n,t,d,S,k]);return g.jsx(vO.Provider,{value:R,children:g.jsx(RU,{defaultOpen:l,disabled:y,disableHoverablePopup:!0,onOpenChange:f,onOpenChangeComplete:h,open:c,children:e})})}function SO({children:e,ref:t,...n}){const{disabled:r,triggerCloseDelay:s,triggerDelay:a}=xO("Tooltip.Trigger"),l=e.props?.id;return g.jsx(IU,{...n,closeDelay:s,delay:a,disabled:r,id:l??n.id,ref:t,render:e})}function wO({content:e,anchor:t,ariaLabel:n,width:r,minWidth:s,maxWidth:a}){const{instantDismiss:l,offset:c,placement:d,sameAxisOnly:f}=xO("Tooltip.Popup"),h=ca(),{side:m,align:b,sideOffset:y,alignOffset:k,collisionAvoidance:S,positionMethod:R}=_h(d,c,f),T=Eh(M6),E=jt(hx,PN,I6,FU.base,wh);return l?null:g.jsx(LU,{container:h??void 0,children:g.jsx(zU,{align:b,alignOffset:k,anchor:t,className:T.className,collisionAvoidance:S,collisionPadding:8,positionMethod:R,side:m,sideOffset:y,style:T.style,children:g.jsx($U,{"aria-label":n,className:E.className,"data-component":"tooltip-popup",role:"tooltip",style:r===void 0&&s===void 0&&a===void 0?E.style:{...E.style,width:r,minWidth:s,maxWidth:a},children:typeof e=="function"?e():e})})})}function UU({children:e,anchor:t,"aria-label":n,width:r,minWidth:s,maxWidth:a}){return g.jsx(wO,{anchor:t,ariaLabel:n,content:e,maxWidth:a,minWidth:s,width:r})}function Uy({children:e,content:t,placement:n,offset:r,openDelay:s,closeDelay:a,disabled:l,defaultOpen:c,open:d,"aria-label":f,width:h,minWidth:m,maxWidth:b,sameAxisOnly:y,onOpenChange:k,onOpenChangeComplete:S,ref:R,...T}){const E=v.Children.only(e);return v.isValidElement(E)?g.jsxs(kO,{closeDelay:a,defaultOpen:c,disabled:l,offset:r,onOpenChange:k,onOpenChangeComplete:S,open:d,openDelay:s,placement:n,sameAxisOnly:y,children:[g.jsx(SO,{...T,ref:R,children:E}),g.jsx(wO,{ariaLabel:f,content:t,maxWidth:b,minWidth:m,width:h})]}):g.jsx(g.Fragment,{children:e})}(function(e){e.Root=kO,e.Trigger=SO,e.Popup=UU})(Uy||(Uy={}));const qU="ui-menu",Ax="ui-menu__backdrop",HU="ui-menu__list",GU="ui-menu__content",VU="ui-menu__drop-indicator-slot",WU="ui-menu__layout",EO="ui-menu__body-scroll",KU="ui-menu__header",YU="ui-menu__footer",XU="ui-menu__attachment",ZU="ui-menu__row",QU="ui-menu__item-left",JU="ui-menu__item-content",e5="ui-menu__item-right",t5="ui-menu__item-wrapper",n5="ui-menu__item-title",r5="ui-menu__item-description",i5="ui-menu__text-wrapper",s5="ui-menu__title",o5="ui-menu__subtitle",a5="ui-menu__search-row",l5="ui-menu__section",u5="ui-menu__section-title",c5="ui-menu__section-text-action",f5="ui-menu__virtualized-section-divider",d5="ui-menu__submenu-trigger",p5="ui-menu__submenu-right-section",h5="ui-menu__toggle-row",m5="ui-menu__tooltip",g5="ui-menu__empty",b5="ui-menu__loading",y5="ui-menu__loading-spinner",v5="ui-menu__virtualized-row",x5="ui-menu__virtualized-scroller";function en(e,t,n={}){return Kt({rootClass:e,stylexStyles:t,className:n.className,style:n.style})}function Ox({className:e,hasDropIndicator:t=!1,size:n,style:r,hasAttachment:s=!1,surfaceStyle:a}){return a=[W9(t),a],en(qU,[V9(n,s),a],{className:e,style:r})}function TO(e){return en(Ax,K9(),{style:e})}function Mx(e=!1,t){return en(HU,[tU(e),t],{className:e?"ui-menu__list--virtualized":void 0})}function Ix(e){return en(GU,[Y9(),e])}function k5(){return en(VU,X9())}function Dx(e,t=!1,n){return en(WU,[Z9(t),n],{style:e})}function S5(){return en(XU,Q9())}function Lx(){return en(KU,J9())}function jx(){return en(YU,eU())}function zx(e={},t){return en(ZU,[{"ui--default-marker":"ui--default-marker",$$css:!0},Cx(e),t],{className:e.className})}function w5(e={},t){return en(h5,[Cx(e),e.disabled&&sU(),t],{className:e.className})}function E5(e={}){return en(d5,Cx(e),{className:e.className})}function T5(e={},t){return en(QU,[oU(e),t])}function R5(e){return en(JU,[aU(),e])}function C5(e={},t){return en(e5,[lU(e),t])}function Px(){return en(t5,cU())}function $x(){return en(n5,fU())}function Bx(){return en(r5,dU())}function _5(e){return en(i5,pU(e))}function N5(e){return en(s5,hU(e))}function A5({inline:e,wrap:t}){return en(o5,mU({inline:e,wrap:t}))}function O5(e,t){return en(a5,[gU(),t],{className:e})}function M5(e){return en(l5,[bU(),e])}function RO(e,t){return en(u5,[yU(e),t])}function I5(){return en(c5,vU())}function D5(){return en(f5,xU())}function L5(){return en(p5,uU())}function j5(e,t){return en(g5,[kU(e),t])}function z5(){return en(b5,SU())}function P5(){return en(v5,nU())}function $5(){return en(x5,rU())}const B5=en(y5,wU()).className,Hp="submenuOpenChange",Fx=v.createContext(null);function Ux(e){return Math.max(e,Ch)}function qx(){return v.use(Fx)}function Hx({children:e,layerNodeId:t,placement:n="right-start"}){const r=So(),[s,a]=v.useState(new Set);v.useEffect(()=>{if(!r)return;const d=f=>{f.parentId===t&&a(h=>{const m=new Set(h);return f.isOpen?m.add(f.nodeId):m.delete(f.nodeId),m})};return r.events.on(Hp,d),()=>{r.events.off(Hp,d)}},[r,t]);const l=s.size>0,c=v.useMemo(()=>({hasOpenChild:l}),[l]);return g.jsx(Fx.Provider,{value:c,children:g.jsx(vc,{offset:6,placement:n,sameAxisOnly:!0,children:e})})}function F5({content:e,surfaceStyle:t}){return g.jsx(vc.Popup,{surfaceClassName:m5,surfaceStyle:[_x(),t],children:typeof e=="function"?e():e})}function CO({children:e,content:t,contentKey:n,disabled:r=!1,openDelay:s=0,closeDelay:a=0,surfaceStyle:l}){const c=v.use(Fx);return c==null?g.jsx(g.Fragment,{children:e}):g.jsx(vc.Trigger,{closeDelay:Ux(a),content:g.jsx(F5,{content:t,surfaceStyle:l}),contentKey:n,openDelay:s,disabled:r||c.hasOpenChild,children:e})}function U5(e,t){const n=So(),r=ko();v.useEffect(()=>{if(!n||e===void 0)return;const s={nodeId:e,parentId:r,isOpen:t};return n.events.emit(Hp,s),()=>{t&&n.events.emit(Hp,{nodeId:e,parentId:r,isOpen:!1})}},[n,e,r,t])}function Qc({children:e,content:t,contentKey:n,disabled:r=!1,openDelay:s=0,closeDelay:a=0,interactive:l=!0,surfaceStyle:c}){return qx()!=null?g.jsx(CO,{closeDelay:a,content:t,contentKey:n,disabled:r,openDelay:s,surfaceStyle:c,children:e}):l?g.jsx($A,{closeDelay:Ux(a),content:t,disabled:r,offset:6,openDelay:s,placement:"right",sameAxisOnly:!0,surfaceStyle:[_x(),c],children:e}):g.jsx(Uy,{closeDelay:a,content:t,disabled:r,offset:6,openDelay:s,placement:"right",sameAxisOnly:!0,children:e})}function Rl({children:e,disabled:t=!1,leading:n,trailing:r,rightFallback:s,trailingAccessory:a,trailingHidden:l=!1,wideLeft:c=!1,leadingStyle:d,contentStyle:f,trailingStyle:h}){const m=r??s,b=m!=null||a!=null,y=T5({wideLeft:c},d),k=R5(f),S=C5({disabled:t,trailingHidden:l},h);return g.jsxs(Ts,{iconSize:"base",children:[n!=null?g.jsx("span",{className:y.className,style:y.style,"data-component":"menu-item-left",children:n}):null,g.jsx("div",{className:k.className,style:k.style,"data-component":"menu-item-content",children:e}),b?g.jsxs("span",{className:S.className,style:S.style,"data-component":"menu-item-right",children:[m,a]}):null]})}const _O=v.createContext(!1);function Jc(){return v.useContext(_O)}const Ph=v.createContext(null);function $h(e){const t=v.useContext(Ph);if(!t)throw new Error(`${e} must be used within LegacyMenu.SubMenu`);return t}function q5(){return $h("LegacyMenu.SubMenu.useContext")}function Gx(){const e=v.useContext(Ph),{setIsOpen:t,dismissCauseRef:n}=uO();return v.useCallback(r=>{n.current="selection",r(!1),e!=null&&t(!1)},[e,t,n])}function Vx(e,t,n){const{searchValue:r}=Zc(n);return t||!r||!e?!0:e.toLowerCase().includes(r.toLowerCase())}const H5=cO("@@menu-item-noop"),G5=new H5({}),NO=v.createContext(null);function V5(){return v.useContext(NO)}function AO({children:e,label:t,ignoreSearch:n=!1,...r}){const s=t??(typeof e=="string"?e:"");return Vx(s,n,"LegacyMenu.Item")?g.jsx(OO,{...r,contextPart:"LegacyMenu.Item",itemLabel:s,children:e}):null}function OO({children:e,"data-testid":t,"aria-haspopup":n,"aria-expanded":r,mentionMenuFlatIndex:s,disabled:a=!1,onMouseDown:l,onAuxClick:c,onSelect:d,onKeyDown:f,leading:h,trailing:m,tooltip:b,tooltipDisabled:y=!1,tooltipOpenDelay:k=0,tooltipCloseDelay:S=0,tooltipSurface:R="default",closeOnSelect:T,description:E,rootStyle:C,leadingStyle:_,contentStyle:D,trailingStyle:N,variant:A="default",trailingVisibility:$="always",selected:z=!1,radioChecked:I,indent:Y=!1,wideLeftSection:H=!1,draggable:q,ref:L,itemLabel:F,referenceRef:U,itemPropsTransform:W,trailingAccessory:B,contextPart:K}){const{activeIndex:O,setIsOpen:P,getItemProps:V,closeOnSelect:j,virtualFocus:Z}=Zc(K),{shouldAllowPointerInteraction:te}=Gi(K),se=Jc(),ue=Gx(),le=Xc(),fe=Ri(),ge=le==="body",_e=T??j??!0,{ref:oe,index:ye}=Ah({label:F||null}),Se=O===ye,[Oe,we]=v.useState(!1);qx();const ke=v.useRef(null),De=v.useId(),Me=q!=null,Le=q?.mode==="pointer",He=v.useSyncExternalStore(ci.subscribe,ci.isDragActive,ci.isDragActive),be=v.useRef(null),Re=v.useRef(null),ee=v.useRef(null),ce=v.useRef(null),J=v.useRef(!1),[re,xe]=v.useState(null),{ref:$e,isDragging:Xe}=U9({id:q?.id??`menu-item-${De}`,data:q?.data??G5,disabled:!Me||Le||(q?.disabled??!1),dragImageOffset:q?.dragImageOffset,onDragStart:q?.onDragStart,onDragEnd:q?.onDragEnd}),Ye=Gc([oe,U,L,Me&&!Le?$e:null]),ht=v.useCallback(Be=>{ke.current=Be},[]),Qe=v.useMemo(()=>({setSubMenuOpen:we,isSubMenuOpen:Oe,registerSubMenuOpener:ht}),[Oe,ht]),yt=dO(R);v.useEffect(()=>()=>{be.current?.(),ee.current!=null&&cancelAnimationFrame(ee.current)},[]);const kt=v.useCallback(()=>{ee.current=null;const Be=Re.current,Rt=ce.current;!Be||!Rt||(Be.style.transform=`translate3d(${Rt.x+8}px, ${Rt.y+8}px, 0)`)},[]),tt=v.useCallback(Be=>{ce.current=Be,ee.current==null&&(ee.current=requestAnimationFrame(kt))},[kt]),Tt=v.useCallback(Be=>{Re.current=Be,kt()},[kt]),_t=()=>{if(a)return;const Be={defaultPrevented:!1,preventDefault:()=>{Be.defaultPrevented=!0}};d?.(Be),_e&&!Be.defaultPrevented&&ue(P)},st=Be=>{if(J.current){J.current=!1,Be.preventDefault(),Be.stopPropagation();return}if(!te(Be.nativeEvent)){Be.preventDefault(),Be.stopPropagation();return}_t()},vt=v.useCallback(Be=>{if(!te(Be.nativeEvent)){Be.preventDefault(),Be.stopPropagation();return}if(l?.(Be),!Be.defaultPrevented){if(Le&&q!=null&&!q.disabled&&Be.button===0){be.current?.();const Rt=ci.getInstance(),wt=Be.currentTarget,$t={clientX:Be.clientX,clientY:Be.clientY,isDragging:!1},Rn=()=>{document.removeEventListener("mousemove",jr,!0),document.removeEventListener("mouseup",zr,!0),ee.current!=null&&(cancelAnimationFrame(ee.current),ee.current=null),ce.current=null,be.current=null,Rt.clearData(),setTimeout(()=>{J.current=!1},0)},jr=Sn=>{const ga=Sn.clientX-$t.clientX,Wi=Sn.clientY-$t.clientY;if(!(!$t.isDragging&&Math.hypot(ga,Wi)<4)){if(!$t.isDragging){$t.isDragging=!0,J.current=!0,Rt.setData(q.data);const Eo=wt.getBoundingClientRect().width;tt({x:Sn.clientX,y:Sn.clientY}),xe(Eo),q.onPointerDragStart?.(Sn)}Sn.preventDefault(),tt({x:Sn.clientX,y:Sn.clientY}),q.onPointerDragMove?.(Sn)}},zr=Sn=>{if(!$t.isDragging){Rn();return}Sn.preventDefault(),xe(null),q.onPointerDragEnd?.(Sn),Rn()};be.current=Rn,document.addEventListener("mousemove",jr,!0),document.addEventListener("mouseup",zr,!0)}Z&&!Me&&Be.preventDefault()}},[q,Me,Le,l,tt,te,Z]),Dt=v.useCallback(Be=>{if(!te(Be.nativeEvent)){Be.preventDefault(),Be.stopPropagation();return}c?.(Be)},[c,te]),At=V({onClick:st,onKeyDown:Be=>{a||(f?.(Be),!Be.defaultPrevented&&((Be.key==="Enter"||Be.key===" ")&&(Be.preventDefault(),Be.stopPropagation(),_t()),zl(Be.key,fe)==="end"&&ke.current&&(Be.preventDefault(),Be.stopPropagation(),ke.current())))},onMouseDown:vt,onAuxClick:Dt}),X=W?.(At)??At,he=m!=null?g.jsx(NO.Provider,{value:Qe,children:m}):void 0,je=Px(),Ze=$x(),St=Bx(),at=E!=null?g.jsxs("div",{className:je.className,style:je.style,children:[g.jsx("div",{className:Ze.className,style:Ze.style,children:e}),g.jsx("div",{className:St.className,style:St.style,"data-component":"menu-item-description",children:E})]}):e,qe=y||He||Oe,Ee=$==="focused"&&(He||!Se),Ue=zx({disabled:a,expanded:r===!0,focused:!He&&Se,indent:Y,inSubmenu:se,selected:z,variant:A},C),ze={role:I===void 0?"menuitem":"menuitemradio",tabIndex:Se?0:-1,...I!==void 0?{"aria-checked":I}:{},...n!==void 0?{"aria-haspopup":n}:{},...r!==void 0?{"aria-expanded":r}:{},"aria-disabled":a||void 0,"data-component":"menu-row","data-expanded":r===!0||void 0,draggable:Le?!1:void 0,"data-disabled":a||void 0,"data-focused":!He&&Se?!0:void 0,"data-menu-draggable":Me||void 0,"data-selected":z||void 0,"data-has-description":E!=null||void 0,"data-variant":A!=="default"?A:void 0,"data-indent":Y||void 0,"data-wide-left":H||void 0,"data-dragging":Xe||re!=null||void 0,...t?{"data-testid":t}:{},...s!==void 0?{"data-mention-menu-flat-index":String(s)}:{},[jl]:le,className:Ue.className,style:Ue.style,...X},Ne={className:"ui-u96u03 ui-47corl ui-ixxii4 ui-13vifvy ui-u1ixa1 ui-1so62im ui-18ivbjn"},Ie=re!=null&&q?.preview!=null?Ti.createPortal(g.jsx("div",{"aria-hidden":"true",ref:Tt,className:Ne.className,style:{...Ne.style,width:re},children:q.preview}),document.body):null,ut=ge?g.jsxs("li",{ref:Ye,...ze,children:[g.jsx(Rl,{disabled:a,leading:h,trailing:he,trailingAccessory:B,trailingHidden:Ee,wideLeft:H,leadingStyle:_,contentStyle:D,trailingStyle:N,children:at}),Ie]}):g.jsxs("div",{ref:Ye,...ze,children:[g.jsx(Rl,{disabled:a,leading:h,trailing:he,trailingAccessory:B,trailingHidden:Ee,wideLeft:H,leadingStyle:_,contentStyle:D,trailingStyle:N,children:at}),Ie]});return b!=null?g.jsx(Qc,{closeDelay:S,content:qe?null:b,disabled:qe,openDelay:k,surfaceStyle:yt,children:ut}):ut}const MO=v.createContext(null);function IO(e){const t=v.useContext(MO);if(!t)throw new Error(`${e} must be used within LegacyMenu.ExpandableSection`);return t}function W5({children:e,defaultExpanded:t=!1,expanded:n,onExpandedChange:r}){const[s,a]=v.useState(t),l=n!==void 0,c=l?n:s,d=h=>{l||a(h),r?.(h)},f=()=>d(!c);return g.jsx(MO.Provider,{value:{expanded:c,setExpanded:d,toggle:f},children:e})}function K5({children:e,contentStyle:t,leading:n,leadingStyle:r,rootStyle:s,trailing:a,trailingStyle:l,label:c}){const{expanded:d,setExpanded:f,toggle:h}=IO("LegacyMenu.ExpandableSectionTrigger"),m=Ri(),b=typeof n=="function"?n(d):n,y=k=>{const S=zl(k.key,m);if(S==="end"&&!d){k.preventDefault(),k.stopPropagation(),f(!0);return}S==="start"&&d&&(k.preventDefault(),k.stopPropagation(),f(!1))};return g.jsx(AO,{closeOnSelect:!1,contentStyle:t,wideLeftSection:!0,leading:b,leadingStyle:r,rootStyle:s,trailing:a,trailingStyle:l,label:c??(typeof e=="string"?e:void 0),onKeyDown:y,onSelect:h,children:e})}function Y5({children:e}){const{expanded:t}=IO("LegacyMenu.ExpandableSectionContent");return t?g.jsx(g.Fragment,{children:e}):null}function X5({children:e,label:t,ignoreSearch:n,...r}){const s=t??(typeof e=="string"?e:"");return Vx(s,n,"LegacyMenu.CheckboxItem")?g.jsx(Z5,{...r,itemLabel:s,children:e}):null}function Z5({children:e,"data-testid":t,checked:n,defaultChecked:r=!1,onChange:s,disabled:a=!1,trailing:l,description:c,tooltip:d,tooltipOpenDelay:f=0,tooltipCloseDelay:h=0,tooltipSurface:m="default",closeOnSelect:b,itemLabel:y,rootStyle:k,contentStyle:S,trailingStyle:R}){const{activeIndex:T,getItemProps:E,setIsOpen:C,closeOnSelect:_}=Zc("LegacyMenu.CheckboxItem"),{shouldAllowPointerInteraction:D}=Gi("LegacyMenu.CheckboxItem"),N=Jc(),A=Gx(),$=Xc(),z=$==="body",I=b??_??!1,[Y,H]=v.useState(r),q=n!==void 0,L=q?n:Y,{ref:F,index:U}=Ah({label:y||null}),W=T===U,B=qx(),K=dO(m),O=v.useCallback(()=>{if(a)return;const Oe=!L;q||H(Oe);const we={defaultPrevented:!1,preventDefault:()=>{we.defaultPrevented=!0}};s?.(Oe,we),I&&!we.defaultPrevented&&A(C)},[a,L,q,s,I,C,A]),P=v.useCallback(Oe=>{if(!D(Oe.nativeEvent)){Oe.preventDefault(),Oe.stopPropagation();return}Oe.preventDefault(),Oe.stopPropagation(),O()},[O,D]),V=v.useCallback(Oe=>{a||(Oe.key==="Enter"||Oe.key===" ")&&(Oe.preventDefault(),Oe.stopPropagation(),O())},[a,O]),j=E({onClick:P,onKeyDown:V}),Z=c!=null,te=zx({disabled:a,focused:W,inSubmenu:N},k),se={role:"menuitemcheckbox","aria-checked":L,tabIndex:W?0:-1,"aria-disabled":a||void 0,"data-checked":L||void 0,"data-component":"menu-row","data-disabled":a||void 0,"data-focused":W||void 0,"data-has-description":Z||void 0,...t?{"data-testid":t}:{},[jl]:$,className:te.className,style:te.style,...j},ue=g.jsx(xN,{checked:L,disabled:a}),le=Px(),fe=$x(),ge=Bx(),_e=Z?g.jsxs("div",{className:le.className,style:le.style,children:[g.jsx("div",{className:fe.className,style:fe.style,children:e}),g.jsx("div",{className:ge.className,style:ge.style,"data-component":"menu-item-description",children:c})]}):e,oe=g.jsx(Rl,{disabled:a,leading:ue,trailing:l,contentStyle:S,trailingStyle:R,children:_e}),ye=d!=null&&B!=null,Se=z?g.jsx("li",{ref:F,...se,children:oe}):g.jsx("div",{ref:F,...se,children:oe});return ye?g.jsx(CO,{closeDelay:h,content:d,openDelay:f,surfaceStyle:K,children:Se}):d!=null?g.jsx($A,{content:d,placement:"right",offset:6,openDelay:f,closeDelay:Ux(h),sameAxisOnly:!0,surfaceStyle:[_x(),K],children:Se}):Se}function Fb(e,t){if(!t?.length||!e.dataTransfer)return!1;for(const n of e.dataTransfer.types)for(const r of t)if(n.toLowerCase()===r.toLowerCase())return!0;return!1}function Q5(e,t){const n=e.relatedTarget;if(n!==null&&t.contains(n))return!1;const r=t.defaultView;return r?e.clientX<=0||e.clientY<=0||e.clientX>=r.innerWidth||e.clientY>=r.innerHeight:!0}function J5(e){const{accept:t,disabled:n=!1,acceptNativeTypes:r,onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c}=e,d=v.useRef(null),f=v.useRef(null),h=v.useRef(0),m=v.useRef(null),[b,y]=v.useState(!1),[k,S]=v.useState(!1),R=v.useRef(b);R.current=b;const T=v.useCallback(()=>{h.current=0,y(!1),S(!1)},[]),E=v.useCallback(()=>{m.current!==null&&(cancelAnimationFrame(m.current),m.current=null)},[]);v.useEffect(()=>{if(!b)return;const A=f.current?.ownerDocument??document,$=()=>{E(),T()};return A.addEventListener("mousemove",$,!0),()=>{A.removeEventListener("mousemove",$,!0)}},[b,E,T]);const C=v.useRef({onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c});C.current={onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c};const _=v.useRef(r);_.current=r;const D=v.useRef(Array.isArray(t)?t:[t]);D.current=Array.isArray(t)?t:[t];const N=v.useCallback(A=>{if(f.current=A,d.current&&(d.current(),d.current=null),h.current=0,A!==null&&(y(!1),S(!1)),!A||n)return;const $=ci.getInstance(),z=B=>{if(h.current++,h.current===1){y(!0);const K=D.current,O=!n&&$.hasAnyClass(K),P=O||!n&&Fb(B,_.current);S(P);const V=O?$.getValidatedData(K):null;C.current.onDragEnter?.(B,V)}},I=B=>{h.current=Math.max(0,h.current-1),h.current===0&&(E(),T(),C.current.onDragLeave?.(B))},Y=B=>{const K=D.current,O=!n&&$.hasAnyClass(K),P=!O&&!n&&Fb(B,_.current);if(O||P){if(B.preventDefault(),B.dataTransfer&&(B.dataTransfer.dropEffect=O?"move":"copy"),h.current===0){h.current=1,y(!0),S(!0);const V=O?$.getValidatedData(K):null;C.current.onDragEnter?.(B,V)}if(C.current.onDragOver&&m.current===null){const V=O?$.getValidatedData(K):null;m.current=requestAnimationFrame(()=>{m.current=null,C.current.onDragOver?.(B,V)})}}},H=B=>{B.preventDefault(),E(),T();const K=D.current;if($.hasAnyClass(K)){const O=$.getValidatedData(K),{onDrop:P}=C.current;P&&(P(B,O),B.stopPropagation())}else if(Fb(B,_.current)){const{onDrop:O}=C.current;O&&(O(B,null),B.stopPropagation())}};A.addEventListener("dragenter",z),A.addEventListener("dragleave",I),A.addEventListener("dragover",Y),A.addEventListener("drop",H);const q=A.ownerDocument,L=()=>{(h.current!==0||R.current)&&(E(),T())},F=()=>L(),U=()=>L(),W=B=>{Q5(B,q)&&L()};q.addEventListener("drop",F,!0),q.addEventListener("dragend",U,!0),q.addEventListener("dragleave",W,!0),d.current=()=>{A.removeEventListener("dragenter",z),A.removeEventListener("dragleave",I),A.removeEventListener("dragover",Y),A.removeEventListener("drop",H),q.removeEventListener("drop",F,!0),q.removeEventListener("dragend",U,!0),q.removeEventListener("dragleave",W,!0),m.current!==null&&(cancelAnimationFrame(m.current),m.current=null)}},[n,T,E]);return v.useEffect(()=>()=>{d.current&&(d.current(),d.current=null)},[]),{ref:N,isOver:b,canDrop:k,isDropBlocked:b&&!k}}const eq=cO("@@menu-content-noop");function tq({children:e,header:t,footer:n,attachment:r,"aria-label":s,"data-testid":a,className:l,surfaceStyle:c,contentStyle:d,layoutStyle:f,listStyle:h,scrollAreaStyles:m,style:b,dropIndicatorTop:y,maxHeight:k,width:S,minWidth:R,maxWidth:T,tooltipPlacement:E,size:C,backdrop:_,adaptiveHeight:D=!0,returnFocus:N,onKeyDownCapture:A,onBodyPointerEnter:$,droppable:z,ref:I}){const Y=ua(),{isOpen:H,isMounted:q,activeIndex:L,setActiveIndex:F,setIsOpen:U,markKeyboardNavigation:W,markPointerNavigation:B,virtualFocus:K,searchValue:O,setSearchValue:P,hasSearchInput:V,searchInputRef:j,enableHover:Z,closeOnSelect:te,nodeId:se,listRef:ue,labelsRef:le,refs:fe,floatingStyles:ge,middlewareData:_e,transitionStyles:oe,context:ye,getFloatingProps:Se,getItemProps:Oe,dismissCauseRef:we,returnFocusOnSelect:ke,returnFocus:De}=Gi("LegacyMenu.Content"),Me=_??!Z,[Le,He]=v.useState(null),be=K&&!V,Re=jh(),ee=v.useSyncExternalStore(ci.subscribe,ci.isDragActive,ci.isDragActive),ce=ye.placement.startsWith("top"),J=ce&&q?_e.bottomAnchor?.bottom??null:null,re=v.useRef(null),xe=v.useRef(L),$e=v.useRef(!1);v.useLayoutEffect(()=>{xe.current=L},[L]),v.useLayoutEffect(()=>{if(!H){$e.current=!1;return}const Ie=wt=>{rO(wt)&&($e.current=!0,W())},ut=wt=>{const $t=sO(wt,ue);$t==null||$t===xe.current||F($t)},Be=wt=>{const $t=$e.current;$e.current=!1,B(),$t&&ut(wt.target)};document.addEventListener("keydown",Ie,!0);const Rt=k9(Le,Be);return()=>{document.removeEventListener("keydown",Ie,!0),Rt()}},[H,ue,W,B,Le,F]),v.useLayoutEffect(()=>{if(!H){re.current=null;return}if(!K||L==null||re.current===L||(re.current=L,!$e.current))return;const Ie=ue.current[L]??null;if(!Ie)return;const ut=requestAnimationFrame(()=>{Ie.scrollIntoView({block:"nearest",inline:"nearest"})});return()=>cancelAnimationFrame(ut)},[H,K,L,ue]);const Xe=v.useCallback(Ie=>{if(Ie.key==="Escape"){we.current="escape";return}if(Ie.ctrlKey&&!Ie.metaKey){const Be=Ie.key.toLowerCase(),Rt=Be==="n"||Be==="j";if(Rt||(Be==="p"||Be==="k")){Ie.preventDefault();const $t=ue.current,Rn=$t.length;if(Rn===0)return;const jr=xe.current,zr=Rt?1:-1;let Sn=jr==null?Rt?0:Rn-1:jr+zr;for(;Sn>=0&&Sn<Rn;){if($t[Sn]!=null){F(Sn);return}Sn+=zr}return}}if(!V)return;if(Ie.key.length===1&&!Ie.ctrlKey&&!Ie.metaKey&&!Ie.altKey){if(document.activeElement===j.current)return;Ie.preventDefault(),Ie.stopPropagation(),j.current?.focus(),P(O+Ie.key),iO(ue,"body",F)}},[we,V,ue,j,O,F,P]),Ye=v.useCallback(Ie=>{Re(Ie.nativeEvent)&&(we.current="backdrop",U(!1))},[we,U,Re]),ht=v.useCallback(Ie=>{if(Ie.stopPropagation(),!Re(Ie.nativeEvent))return;Ie.preventDefault(),we.current="backdrop",U(!1);const Rt=document.elementsFromPoint(Ie.clientX,Ie.clientY).find(wt=>!wt.classList.contains(Ax));Rt&&Rt.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:Ie.clientX,clientY:Ie.clientY,screenX:Ie.screenX,screenY:Ie.screenY,button:Ie.button,buttons:Ie.buttons,ctrlKey:Ie.ctrlKey,shiftKey:Ie.shiftKey,altKey:Ie.altKey,metaKey:Ie.metaKey}))},[we,U,Re]),Qe=z!=null,{ref:yt,isOver:kt,isDropBlocked:tt}=J5({accept:z?.accept??eq,disabled:!Qe||(z?.disabled??!1),onDragEnter:z?.onDragEnter,onDragOver:z?.onDragOver,onDragLeave:z?.onDragLeave,onDrop:z?.onDrop}),Tt=Gc([fe.setFloating,He,I,Qe?yt:null]),_t=ca(),{zIndex:st,portalLayerStyles:vt}=Dl("popover",q);if(!q)return null;const Dt=C??Y?.menuSize??"sm",Pt={...ge,...oe,...vt,...st!==null?{zIndex:st}:{},...b,...y!==void 0?{"--ui-menu-drop-indicator-top":`${y}px`}:{},...Ex({width:S,minWidth:R,maxWidth:T}),...ce&&J!==null?{top:"auto",bottom:J}:{},...Tx({isOpen:H,isPositioned:ye.isPositioned})},At={...vt,...st!==null?{zIndex:st-1}:{},pointerEvents:Qe&&ee?"none":void 0},X=D?lO(k):k,he=r!=null,je=TO(At),Ze=Ox({className:l,hasDropIndicator:y!==void 0,size:Dt,surfaceStyle:c,style:he&&X!==void 0?{...Pt,maxHeight:X}:Pt,hasAttachment:he}),St=Dx(he||X===void 0?void 0:{maxHeight:X},he,f),at=Lx(),qe=Ix(d),Ee=Mx(!1,h),Ue=jx(),ze=S5(),Ne=k5();return g.jsxs(yx,{..._t?{root:_t}:{},children:[Me&&g.jsx("div",{className:je.className,style:je.style,"data-component":"menu-backdrop",onClick:Ye,onContextMenu:ht,role:"none"}),g.jsx(xx,{context:ye,initialFocus:be?-1:j,returnFocus:N??De??(we.current!=="backdrop"&&(we.current!=="selection"||ke)),modal:!be,children:g.jsxs("div",{ref:Tt,className:Ze.className,style:Ze.style,tabIndex:-1,"data-component":"menu-popup","data-size":Dt,"data-drop-active":Qe&&kt&&!tt?"":void 0,"data-drop-blocked":Qe&&tt?"":void 0,...a?{"data-testid":a}:{},...he?{"aria-label":s??"Menu"}:{},...Se({onKeyDown:Xe,onKeyDownCapture:A,onMouseDown:K?Ie=>{Ie.stopPropagation()}:void 0}),children:[Qe&&z?.indicator!=null?g.jsx("div",{"aria-hidden":"true",className:Ne.className,style:Ne.style,children:z.indicator}):null,g.jsx(Ts,{menuSize:Dt,children:g.jsx(BA,{dismiss:!H,children:g.jsx(Hx,{layerNodeId:se,placement:E,children:g.jsx(hO,{activeIndex:L,setIsOpen:U,getItemProps:Oe,searchValue:O,closeOnSelect:te,virtualFocus:K,children:g.jsxs(rA,{elementsRef:ue,labelsRef:le,children:[g.jsxs("div",{className:St.className,style:St.style,"data-component":"menu-layout",...he?{}:{role:"menu","aria-label":s??"Menu"},children:[t!=null?g.jsx("div",{className:at.className,style:at.style,"data-component":"menu-header",children:g.jsx(Ss,{value:"header",children:t})}):null,g.jsx(Sl,{className:EO,rootStyle:[fO(),m?.root],viewportStyle:m?.viewport,contentStyle:m?.content,maxHeight:"none","data-component":"menu-body-scroll",children:g.jsx("div",{className:qe.className,style:qe.style,"data-component":"menu-content",onPointerEnter:$,children:g.jsx("ul",{role:"presentation",className:Ee.className,style:Ee.style,"data-component":"menu-list",children:e})})}),n!=null?g.jsx("div",{className:Ue.className,style:Ue.style,"data-component":"menu-footer",children:g.jsx(Ss,{value:"footer",children:n})}):null]}),r!=null?g.jsx("div",{className:ze.className,style:ze.style,"data-component":"menu-attachment",children:g.jsx("div",{className:qe.className,style:qe.style,"data-component":"menu-content",children:g.jsx(Ss,{value:"footer",children:r})})}):null]})})})})})]})})]})}function nq({children:e,indent:t=!1,rootStyle:n}){const r=j5(t,n);return g.jsx("div",{className:r.className,style:r.style,"data-component":"menu-empty","data-indent":t||void 0,children:e})}function DO(e){const t=v.useContext(Ph),n=v.useContext(Rx),r=t??n;if(!r)throw new Error(`${e} must be used within LegacyMenu or LegacyMenu.SubMenu`);return r}function rq(){return DO("LegacyMenu.useLayerContext")}function iq({children:e}){const t=z5();return g.jsxs("div",{className:t.className,style:t.style,role:"status","aria-live":"polite","aria-busy":"true",children:[g.jsx(Yt,{name:"loading",size:"base",modifier:"spin",className:B5}),g.jsx("span",{children:e??"Loading..."})]})}function sq({placeholder:e="Search...","aria-label":t,className:n,rootStyle:r,inputGroupRootStyle:s,value:a,onValueChange:l,autoFocus:c=!1}){const f=Xc()==="body",h=Jc(),m=Ri(),{searchValue:b,setSearchValue:y,searchInputRef:k,activeIndex:S,setActiveIndex:R,listRef:T,setHasSearchInput:E}=DO("LegacyMenu.SearchInput"),C=v.useRef(null),_=a!==void 0&&l!==void 0,N=!_||c||h?k:C,A=_?a:b;v.useEffect(()=>{if(!_)return E(!0),()=>E(!1)},[_,E]),v.useLayoutEffect(()=>{if(_&&!c)return;const H=k.current;if(!H)return;H.focus({preventScroll:!0});const q=requestAnimationFrame(()=>{document.activeElement!==H&&H.focus({preventScroll:!0})});return()=>cancelAnimationFrame(q)},[_,c,k]);const $=H=>{_?l(H.target.value):(y(H.target.value),iO(T,"body",R),l?.(H.target.value))},z=H=>{if(Sx(H))return;if(H.ctrlKey&&!H.metaKey){const W=H.key.toLowerCase();if(W==="n"||W==="p"||W==="j"||W==="k"){H.preventDefault();return}}if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Tab","Escape"].includes(H.key)&&!H.metaKey&&!H.ctrlKey&&!H.altKey&&H.stopPropagation(),_&&H.key==="Enter"){H.preventDefault(),H.stopPropagation();return}if(!_&&H.key==="Enter"&&S!=null){H.preventDefault();const W=T.current[S];W&&(W.click(),k.current?.focus())}if(H.key!=="ArrowLeft"&&H.key!=="ArrowRight")return;const L=H.currentTarget,F=zl(H.key,m)==="end"?L.value.length:0;if(!(L.selectionStart===F&&L.selectionEnd===F)){H.stopPropagation();return}S9({event:H,direction:H.key,activeIndex:S,listRef:T,restoreFocus:()=>k.current?.focus()})},I=O5(n,r),Y=g.jsx(Yc,{ref:N,type:"text",variant:"unfilled",size:"md",inputGroupRootStyle:s,value:A,onChange:$,onKeyDown:z,placeholder:e,"aria-label":t??"Search menu items"});return f?g.jsx("li",{className:I.className,style:I.style,"data-component":"menu-search-row",role:"none",children:Y}):g.jsx("div",{className:I.className,style:I.style,"data-component":"menu-search-row",role:"none",children:Y})}function oq(e){const[t,n]=v.useState(!1);return v.useLayoutEffect(()=>{const r=e.current;if(r===null||r.parentElement===null)return;const s=()=>{n(r.nextElementSibling?.hasAttribute("data-menu-section")??!1)};s();const a=new MutationObserver(s);return a.observe(r.parentElement,{childList:!0}),()=>a.disconnect()},[e]),t}function aq({children:e,title:t,dividerVisibility:n="default",trailingDividerVisibility:r="default",textAction:s,titleTrailing:a,tooltip:l,noDivider:c,rootStyle:d,titleStyle:f}){const h=v.useRef(null),m=oq(h),b=M5(d),y=s!=null||a!=null,k=RO(y,f),S=I5(),R=t!=null&&t!==!1?g.jsxs("div",{role:"presentation",className:k.className,style:k.style,"data-component":"menu-section-title","data-has-action":y||void 0,children:[g.jsx("span",{children:t}),a,s!=null?g.jsx("button",{type:"button",className:S.className,style:S.style,onClick:s.onClick,children:s.label}):null]}):null,T=R!=null&&l!=null?g.jsx(Qc,{content:l,openDelay:0,closeDelay:0,children:R}):R;return g.jsxs("div",{ref:h,role:"group","aria-label":typeof t=="string"?t:void 0,className:b.className,style:b.style,"data-menu-section":!0,"data-next-is-section":m||void 0,"data-divider-visibility":n!=="default"?n:void 0,"data-trailing-divider-visibility":r!=="default"?r:void 0,"data-no-divider":c||void 0,children:[T,e]})}function LO({children:e,trigger:t="hover",placement:n,anchorRef:r,offset:s,keepHoverSubmenuInset:a=!1,closeOnSelect:l,open:c,defaultOpen:d=!1,onOpenChange:f,hoverOpenDelay:h,keepOpenOnHoverOut:m=!1,dismissOnReferenceScroll:b=!1,suppressSiblingPointerGuard:y=!1,virtualFocus:k=!1,focusItemOnOpen:S}){const R=gx(),T=Ri(),[E,C]=xc(c,d,f,"LegacyMenu.SubMenu"),_=c!==void 0,D=t==="hover"&&(!_||r==null),[N,A]=v.useState(null),{focusItemOnHoverEnabled:$,markKeyboardNavigation:z,markPointerNavigation:I,resetFocusItemOnHover:Y}=oO(),[H,q]=v.useState(""),[L,F]=v.useState(!1),U=v.useRef([]),W=v.useRef([]),B=v.useRef(null);U5(R,E);const K=V5();v.useEffect(()=>{K&&K.setSubMenuOpen(E)},[E,K]);const O=v.useRef(E);v.useEffect(()=>{const $e=O.current;O.current=E,$e!==E&&(q(""),E||A(null),Y())},[E,Y]);const P=v.useCallback($e=>{C($e)},[C]);v.useEffect(()=>{if(K)return K.registerSubMenuOpener(()=>P(!0)),()=>{K.registerSubMenuOpener(null)}},[K,P]);const V=v.useCallback(($e,Xe,Ye)=>{const ht=B.current;!$e&&t==="hover"&&(Ye==="hover"||Ye==="safe-polygon")&&(m||ht?.value&&ht.ownerDocument.activeElement===ht)||P($e)},[m,P,t]),j=v.useCallback(()=>{P(!1)},[P]),te=n??(t==="hover"?T==="rtl"?"left-start":"right-start":"bottom-start"),se={mainAxis:-2,alignmentAxis:-2},fe=s??(a?se:t==="hover"?se:4),{refs:ge,floatingStyles:_e,context:oe}=kx({nodeId:R,open:E,onOpenChange:V,placement:te,middleware:[Gv(fe),Wv(),Vv({crossAxis:te.startsWith("left")||te.startsWith("right")}),Kv({padding:8,apply({availableWidth:$e,availableHeight:Xe,elements:Ye}){Ye.floating.style.setProperty(aO,`${Math.max(0,Math.floor($e))}px`),Ye.floating.style.setProperty(wx,`${Math.max(0,Math.floor(Xe))}px`)}})],whileElementsMounted:Rp,transform:!1});v.useLayoutEffect(()=>{const $e=r?.current;$e&&ge.setReference($e)}),_9(D&&E&&!y,ge.domReference);const{activeId:ye}=b9(R,E),Se=ye!=null?0:h??75,Oe=lA(oe,{enabled:D,delay:{open:Se},handleClose:xA({blockPointerEvents:!1,requireIntent:!1})}),we=dA(oe,{enabled:t==="click"&&!_}),ke=jh(),De=pA(oe,{ancestorScroll:b,bubbles:!0,outsidePressEvent:"click",outsidePress:ke}),Me=gA(oe,{role:"menu"}),Le=mA(oe,{listRef:U,activeIndex:N,onNavigate:A,nested:!0,rtl:T==="rtl",loop:!0,focusItemOnOpen:k?!1:S??!0,virtual:L||k,focusItemOnHover:$&&!k}),He=yA(oe,{listRef:W,activeIndex:N,onMatch:L?void 0:A,enabled:!L&&!k}),{getReferenceProps:be,getFloatingProps:Re,getItemProps:ee}=hA([Oe,we,De,Me,Le,He]),ce=v.useCallback(()=>({...be(),ref:r?void 0:ge.setReference,"aria-haspopup":"menu","aria-expanded":E}),[be,ge.setReference,E,r]),{isMounted:J,styles:re}=bA(oe,{duration:{open:0,close:C9},initial:{opacity:0,transform:"scale(1)"}}),xe=v.useMemo(()=>({isOpen:E,isMounted:J,setIsOpen:P,closeFromKeyboard:j,activeIndex:N,setActiveIndex:A,markKeyboardNavigation:z,markPointerNavigation:I,trigger:t,closeOnSelect:l,nodeId:R,listRef:U,labelsRef:W,searchInputRef:B,searchValue:H,setSearchValue:q,hasSearchInput:L,setHasSearchInput:F,refs:ge,floatingStyles:_e,transitionStyles:re,context:oe,getReferenceProps:be,getFloatingProps:Re,getItemProps:ee,getTriggerProps:ce,virtualFocus:k}),[E,J,P,j,N,t,z,I,l,R,H,L,k,ge,_e,re,oe,be,Re,ee,ce]);return g.jsx(bx,{id:R,children:g.jsx(Ph.Provider,{value:xe,children:e})})}function lq({children:e,disabled:t=!1,label:n,leading:r,leadingStyle:s,trailing:a,contentStyle:l,trailingStyle:c}){const{activeIndex:d,getItemProps:f}=Zc("LegacyMenu.SubMenuTrigger"),{shouldAllowPointerInteraction:h}=Gi("LegacyMenu.SubMenuTrigger"),m=$h("LegacyMenu.SubMenuTrigger"),b=Xc(),y=Ri(),k=b==="body",S=n??(typeof e=="string"?e:""),{ref:R,index:T}=Ah({label:S||null}),E=d===T,C=Gc([R,m.refs.setReference]),_=g.jsx(Yt,{name:"chevron-right",color:"tertiary"}),D=E5({disabled:t,expanded:m.isOpen,focused:E}),N={role:"menuitem","aria-haspopup":"menu","aria-expanded":m.isOpen,"data-component":"menu-submenu-trigger","data-expanded":m.isOpen||void 0,tabIndex:E?0:-1,"aria-disabled":t||void 0,"data-disabled":t||void 0,"data-focused":E||void 0,[jl]:b,className:D.className,style:D.style,...m.getReferenceProps(f({onMouseDown(z){h(z.nativeEvent)||(z.preventDefault(),z.stopPropagation())},onClick(z){if(!h(z.nativeEvent)){z.preventDefault(),z.stopPropagation();return}!t&&m.trigger==="hover"&&m.setIsOpen(!0)},onKeyDown(z){(zl(z.key,y)==="end"||z.key==="Enter"||z.key===" ")&&!t&&(z.preventDefault(),z.stopPropagation(),m.setIsOpen(!0))}}))},A=L5(),$=g.jsx(Rl,{disabled:t,leading:r,leadingStyle:s,contentStyle:l,trailing:a!=null?g.jsx("div",{className:A.className,style:A.style,"data-component":"menu-submenu-right-section",children:a}):void 0,rightFallback:_,trailingStyle:c,children:e});return k?g.jsx("li",{ref:C,...N,children:$}):g.jsx("div",{ref:C,...N,children:$})}function uq({children:e,label:t,showChevron:n=!0,onKeyDown:r,closeOnSelect:s,...a}){const l=$h("LegacyMenu.SubMenuItem"),c=Ri(),d=t??(typeof e=="string"?e:""),f=m=>{a.disabled||(r?.(m),!m.defaultPrevented&&zl(m.key,c)==="end"&&(m.preventDefault(),m.stopPropagation(),l.setIsOpen(!0)))},h=n?g.jsx(Yt,{name:"chevron-right",color:"tertiary"}):void 0;return g.jsx(OO,{...a,contextPart:"LegacyMenu.SubMenuItem",itemLabel:d,closeOnSelect:s??l.closeOnSelect,"aria-haspopup":"menu","aria-expanded":l.isOpen,referenceRef:l.refs.setReference,itemPropsTransform:l.getReferenceProps,onKeyDown:f,trailingAccessory:h,children:e})}function cq({children:e,header:t,footer:n,"aria-label":r,"data-testid":s,onPointerEnter:a,keepSearchFocus:l=!1,className:c,surfaceStyle:d,contentStyle:f,listStyle:h,width:m,minWidth:b,maxWidth:y,maxHeight:k,size:S,contentPadding:R}){const T=ua(),E=$h("LegacyMenu.SubMenuContent"),C=Ri(),_=ca(),{portalLayerStyles:D}=Dl("popover",E.isMounted),N=S??T?.menuSize??"sm",{virtualFocus:A}=E;if(!E.isMounted)return null;const $={...E.floatingStyles,...E.transitionStyles,...D,...Ex({width:m,minWidth:b,maxWidth:y,clampToAvailableWidth:!0}),...Tx({isOpen:E.isOpen,isPositioned:E.context.isPositioned})},z=Ox({className:c,size:N,surfaceStyle:d,style:$}),I=Ix(f),Y=Mx(!1,h),H=lO(k),q=t!=null||n!=null,L=Dx(q?{maxHeight:H}:void 0),F=Lx(),U=jx(),W=R===void 0?I.style:{...I.style,padding:R,scrollPaddingBlock:R},B=O=>{O.stopPropagation()},K=O=>{E.markPointerNavigation();const P=sO(O,E.listRef);if(P!=null&&P!==E.activeIndex&&E.setActiveIndex(P),!l||P==null)return;const V=E.searchInputRef.current;if(V==null)return;const j=V.ownerDocument.activeElement;j!==V&&(j instanceof HTMLInputElement||j instanceof HTMLTextAreaElement||V.focus({preventScroll:!0}))};return g.jsx(yx,{..._?{root:_}:{},children:g.jsx(xx,{context:E.context,disabled:A,initialFocus:E.hasSearchInput?E.searchInputRef:-1,returnFocus:!1,modal:!1,closeOnFocusOut:E.trigger==="click",children:g.jsx("div",{ref:E.refs.setFloating,className:z.className,style:z.style,"data-component":"menu-popup","data-submenu":"","data-size":N,...s?{"data-testid":s}:{},...E.getFloatingProps({onClick:B,onPointerEnter:a,onMouseMove(O){K(O.target)},onPointerMove(O){K(O.target)},onKeyDown(O){if(rO(O)&&E.markKeyboardNavigation(),zl(O.key,C)==="start"||O.key==="Escape"){O.preventDefault(),O.stopPropagation(),E.closeFromKeyboard();const P=E.refs.domReference.current;P instanceof HTMLElement&&P.focus()}}}),children:g.jsx(_O.Provider,{value:!0,children:g.jsx(Ts,{menuSize:N,children:g.jsx(Hx,{layerNodeId:E.nodeId,children:g.jsx(hO,{activeIndex:E.activeIndex,setIsOpen:E.setIsOpen,getItemProps:E.getItemProps,searchValue:E.searchValue,closeOnSelect:E.closeOnSelect,virtualFocus:A,children:g.jsx(rA,{elementsRef:E.listRef,labelsRef:E.labelsRef,children:q?g.jsxs("div",{className:L.className,style:L.style,role:"menu","aria-label":r??"Submenu","data-component":"menu-layout",children:[t!=null?g.jsx("div",{className:F.className,style:F.style,"data-component":"menu-header",children:g.jsx(Ss,{value:"header",children:t})}):null,g.jsx(Sl,{className:EO,rootStyle:fO(),maxHeight:"none","data-component":"menu-body-scroll",children:g.jsx("div",{className:I.className,style:W,"data-component":"menu-content",children:g.jsx("ul",{role:"presentation",className:Y.className,style:Y.style,"data-component":"menu-list",children:g.jsx(Ss,{value:"body",children:g.jsx(By,{children:e})})})})}),n!=null?g.jsx("div",{className:U.className,style:U.style,"data-component":"menu-footer",children:g.jsx(Ss,{value:"footer",children:n})}):null]}):g.jsx(Sl,{maxHeight:H,children:g.jsx("div",{className:I.className,style:W,"data-component":"menu-content",children:g.jsx("ul",{role:"menu","aria-label":r??"Submenu",className:Y.className,style:Y.style,"data-component":"menu-list",children:g.jsx(Ss,{value:"body",children:g.jsx(By,{children:e})})})})})})})})})})})})})}function fq({children:e,label:t,ignoreSearch:n,...r}){const s=t??(typeof e=="string"?e:"");return Vx(s,n,"LegacyMenu.SwitchItem")?g.jsx(dq,{...r,itemLabel:s,children:e}):null}function dq({children:e,"data-testid":t,checked:n,defaultChecked:r=!1,onChange:s,disabled:a=!1,switchVariant:l,leading:c,leadingStyle:d,trailing:f,contentStyle:h,trailingStyle:m,rootStyle:b,tooltip:y,closeOnSelect:k,itemLabel:S}){const{activeIndex:R,getItemProps:T,setIsOpen:E,closeOnSelect:C}=Zc("LegacyMenu.SwitchItem"),{shouldAllowPointerInteraction:_}=Gi("LegacyMenu.SwitchItem"),D=Jc(),N=Gx(),A=Xc(),$=A==="body",z=k??C??!1,[I,Y]=v.useState(r),H=n!==void 0,q=H?n:I,{ref:L,index:F}=Ah({label:S||null}),U=R===F,W=v.useCallback(()=>{if(a)return;const te=!q;H||Y(te);const se={defaultPrevented:!1,preventDefault:()=>{se.defaultPrevented=!0}};s?.(te,se),z&&!se.defaultPrevented&&N(E)},[a,q,H,s,z,E,N]),B=v.useCallback(te=>{if(!_(te.nativeEvent)){te.preventDefault(),te.stopPropagation();return}te.preventDefault(),te.stopPropagation(),W()},[W,_]),K=v.useCallback(te=>{a||(te.key==="Enter"||te.key===" ")&&(te.preventDefault(),te.stopPropagation(),W())},[a,W]),O=T({onClick:B,onKeyDown:K}),P=w5({disabled:a,focused:U,inSubmenu:D},b),V={role:"menuitemcheckbox","aria-checked":q,tabIndex:U?0:-1,"aria-disabled":a||void 0,"data-checked":q||void 0,"data-component":"menu-toggle-row","data-disabled":a||void 0,"data-focused":U||void 0,...t?{"data-testid":t}:{},[jl]:A,className:P.className,style:P.style,...O},j=g.jsx(Rl,{disabled:a,leading:c,leadingStyle:d,contentStyle:h,trailing:f,trailingStyle:m,trailingAccessory:g.jsx(KF,{checked:q,disabled:a,size:"sm",variant:l}),children:e}),Z=$?g.jsx("li",{ref:L,...V,children:j}):g.jsx("div",{ref:L,...V,children:j});return y!=null?g.jsx(Qc,{content:y,openDelay:0,closeDelay:0,children:Z}):Z}function pq({title:e,subtitle:t,inline:n=!1,wrapSubtitle:r=!1}){const s=_5(n),a=N5(n),l=A5({inline:n,wrap:r});return g.jsxs("div",{className:s.className,style:s.style,"data-inline":n||void 0,children:[g.jsx(Fp,{size:"md",weight:"regular",color:"primary",className:a.className,style:a.style,children:e}),t!=null?g.jsx(Fp,{size:"sm",weight:"regular",color:"tertiary",className:l.className,style:l.style,"data-wrap":r||void 0,children:t}):null]})}const hq={title:{kZKoxP:"ui-xk0z11",kB7OPa:"ui-9f619",kVQacm:"ui-b3r6kr",$$css:!0}};function mq({title:e,divider:t}){const n=RO(!1,hq.title),r=D5();return g.jsxs(g.Fragment,{children:[t?g.jsx("div",{role:"presentation","aria-hidden":"true",className:r.className,style:r.style}):null,e!==void 0?g.jsx("div",{role:"presentation",className:n.className,"data-component":"menu-section-title",style:n.style,children:g.jsx("span",{children:e})}):null]})}const kc=typeof window<"u"?v.useLayoutEffect:v.useEffect;function iT(e){if(e!==void 0)switch(typeof e){case"number":return e;case"string":{if(e.endsWith("px"))return parseFloat(e);break}}}function gq({box:e,defaultHeight:t,defaultWidth:n,disabled:r,element:s,mode:a,style:l}){const{styleHeight:c,styleWidth:d}=v.useMemo(()=>({styleHeight:iT(l?.height),styleWidth:iT(l?.width)}),[l?.height,l?.width]),[f,h]=v.useState({height:t,width:n}),m=r||c!==void 0||a==="only-width"||c!==void 0&&d!==void 0;return kc(()=>{if(s===null||m)return;const b=new ResizeObserver(y=>{for(const k of y){const{contentRect:S,target:R}=k;s===R&&h(T=>T.height===S.height&&T.width===S.width?T:{height:S.height,width:S.width})}});return b.observe(s,{box:e}),()=>{b?.unobserve(s)}},[e,m,s,c,d]),v.useMemo(()=>({height:c??f.height,width:d??f.width}),[f,c,d])}function bq(e){const t=v.useRef(()=>{throw new Error("Cannot call during render.")});return kc(()=>{t.current=e},[e]),v.useCallback(n=>t.current?.(n),[t])}function Ub({containerElement:e,direction:t,isRtl:n,scrollOffset:r}){return r}function lo(e,t="Assertion error"){if(!e)throw console.error(t),Error(t)}function uc(e,t){if(e===t)return!0;if(!!e!=!!t||(lo(e!==void 0),lo(t!==void 0),Object.keys(e).length!==Object.keys(t).length))return!1;for(const n in e)if(!Object.is(t[n],e[n]))return!1;return!0}function jO({cachedBounds:e,itemCount:t,itemSize:n}){if(t===0)return 0;if(typeof n=="number")return t*n;{const r=e.get(e.size===0?0:e.size-1);lo(r!==void 0,"Unexpected bounds cache miss");const s=(r.scrollOffset+r.size)/e.size;return t*s}}function yq({align:e,cachedBounds:t,index:n,itemCount:r,itemSize:s,containerScrollOffset:a,containerSize:l}){if(n<0||n>=r)throw RangeError(`Invalid index specified: ${n}`,{cause:`Index ${n} is not within the range of 0 - ${r-1}`});const c=jO({cachedBounds:t,itemCount:r,itemSize:s}),d=t.get(n),f=Math.max(0,Math.min(c-l,d.scrollOffset)),h=Math.max(0,d.scrollOffset-l+d.size);switch(e==="smart"&&(a>=h&&a<=f?e="auto":e="center"),e){case"start":return f;case"end":return h;case"center":return d.scrollOffset<=l/2?0:d.scrollOffset+d.size/2>=c-l/2?c-l:d.scrollOffset+d.size/2-l/2;default:return a>=h&&a<=f?a:a<h?h:f}}function sT({cachedBounds:e,containerScrollOffset:t,containerSize:n,itemCount:r,overscanCount:s}){const a=r-1;let l=0,c=-1,d=0,f=-1,h=0;for(;h<a;){const m=e.get(h);if(m.scrollOffset+m.size>t)break;h++}for(l=h,d=Math.max(0,l-s);h<a;){const m=e.get(h);if(m.scrollOffset+m.size>=t+n)break;h++}return c=Math.min(a,h),f=Math.min(r-1,c+s),l<0&&(l=0,c=-1,d=0,f=-1),{startIndexVisible:l,stopIndexVisible:c,startIndexOverscan:d,stopIndexOverscan:f}}function vq({itemCount:e,itemProps:t,itemSize:n}){const r=new Map;return{get(s){for(lo(s<e,`Invalid index ${s}`);r.size-1<s;){const l=r.size;let c;switch(typeof n){case"function":{c=n(l,t);break}case"number":{c=n;break}}if(l===0)r.set(l,{size:c,scrollOffset:0});else{const d=r.get(l-1);lo(d!==void 0,`Unexpected bounds cache miss for index ${s}`),r.set(l,{scrollOffset:d.scrollOffset+d.size,size:c})}}const a=r.get(s);return lo(a!==void 0,`Unexpected bounds cache miss for index ${s}`),a},set(s,a){r.set(s,a)},get size(){return r.size}}}function xq({itemCount:e,itemProps:t,itemSize:n}){return v.useMemo(()=>vq({itemCount:e,itemProps:t,itemSize:n}),[e,t,n])}function kq({containerSize:e,itemSize:t}){let n;return typeof t==="string"?(lo(t.endsWith("%"),`Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`),lo(e!==void 0,"Container size must be defined if a percentage item size is specified"),n=e*parseInt(t)/100):n=t,n}function Sq({containerElement:e,containerStyle:t,defaultContainerSize:n=0,direction:r,isRtl:s=!1,itemCount:a,itemProps:l,itemSize:c,onResize:d,overscanCount:f}){const[h,m]=v.useState({startIndexVisible:0,startIndexOverscan:0,stopIndexVisible:-1,stopIndexOverscan:-1}),{startIndexVisible:b,startIndexOverscan:y,stopIndexVisible:k,stopIndexOverscan:S}={startIndexVisible:Math.min(a-1,h.startIndexVisible),startIndexOverscan:Math.min(a-1,h.startIndexOverscan),stopIndexVisible:Math.min(a-1,h.stopIndexVisible),stopIndexOverscan:Math.min(a-1,h.stopIndexOverscan)},{height:R=n,width:T=n}=gq({defaultHeight:n,defaultWidth:void 0,element:e,mode:"only-height",style:t}),E=v.useRef({height:0,width:0}),C=R,_=kq({containerSize:C,itemSize:c});v.useLayoutEffect(()=>{if(typeof d=="function"){const I=E.current;(I.height!==R||I.width!==T)&&(d({height:R,width:T},{...I}),I.height=R,I.width=T)}},[R,d,T]);const D=xq({itemCount:a,itemProps:l,itemSize:_}),N=v.useCallback(I=>D.get(I),[D]),A=v.useCallback(()=>jO({cachedBounds:D,itemCount:a,itemSize:_}),[D,a,_]),$=v.useCallback(I=>{const Y=Ub({containerElement:e,direction:r,isRtl:s,scrollOffset:I});return sT({cachedBounds:D,containerScrollOffset:Y,containerSize:C,itemCount:a,overscanCount:f})},[D,e,C,r,s,a,f]);kc(()=>{const I=e?.scrollTop??0;m($(I))},[e,r,$]),kc(()=>{if(!e)return;const I=()=>{m(Y=>{const{scrollLeft:H,scrollTop:q}=e,L=Ub({containerElement:e,direction:r,isRtl:s,scrollOffset:q}),F=sT({cachedBounds:D,containerScrollOffset:L,containerSize:C,itemCount:a,overscanCount:f});return uc(F,Y)?Y:F})};return e.addEventListener("scroll",I),()=>{e.removeEventListener("scroll",I)}},[D,e,C,r,a,f]);const z=bq(({align:I="auto",containerScrollOffset:Y,index:H})=>{let q=yq({align:I,cachedBounds:D,containerScrollOffset:Y,containerSize:C,index:H,itemCount:a,itemSize:_});if(e){if(q=Ub({containerElement:e,direction:r,isRtl:s,scrollOffset:q}),typeof e.scrollTo!="function"){const L=$(q);uc(h,L)||m(L)}return q}});return{getCellBounds:N,getEstimatedSize:A,scrollToIndex:z,startIndexOverscan:y,startIndexVisible:b,stopIndexOverscan:S,stopIndexVisible:k}}function wq(e){return v.useMemo(()=>e,Object.values(e))}function Eq(e,t){const{ariaAttributes:n,style:r,...s}=e,{ariaAttributes:a,style:l,...c}=t;return uc(n,a)&&uc(r,l)&&uc(s,c)}function Tq(e){return e!=null&&typeof e=="object"&&"getAverageRowHeight"in e&&typeof e.getAverageRowHeight=="function"}const Rq="data-react-window-index";function Cq({children:e,className:t,defaultHeight:n=0,listRef:r,onResize:s,onRowsRendered:a,overscanCount:l=3,rowComponent:c,rowCount:d,rowHeight:f,rowProps:h,tagName:m="div",style:b,...y}){const k=wq(h),S=v.useMemo(()=>v.memo(c,Eq),[c]),[R,T]=v.useState(null),E=Tq(f),C=v.useMemo(()=>E?q=>f.getRowHeight(q)??f.getAverageRowHeight():f,[E,f]),{getCellBounds:_,getEstimatedSize:D,scrollToIndex:N,startIndexOverscan:A,startIndexVisible:$,stopIndexOverscan:z,stopIndexVisible:I}=Sq({containerElement:R,containerStyle:b,defaultContainerSize:n,direction:"vertical",itemCount:d,itemProps:k,itemSize:C,onResize:s,overscanCount:l});v.useImperativeHandle(r,()=>({get element(){return R},scrollToRow({align:q="auto",behavior:L="auto",index:F}){const U=N({align:q,containerScrollOffset:R?.scrollTop??0,index:F});typeof R?.scrollTo=="function"&&R.scrollTo({behavior:L,top:U})}}),[R,N]),kc(()=>{if(!R)return;const q=Array.from(R.children).filter((L,F)=>{if(L.hasAttribute("aria-hidden"))return!1;const U=`${A+F}`;return L.setAttribute(Rq,U),!0});if(E)return f.observeRowElements(q)},[R,E,f,A,z]),v.useEffect(()=>{A>=0&&z>=0&&a&&a({startIndex:$,stopIndex:I},{startIndex:A,stopIndex:z})},[a,A,$,z,I]);const Y=v.useMemo(()=>{const q=[];if(d>0)for(let L=A;L<=z;L++){const F=_(L);q.push(v.createElement(S,{...k,ariaAttributes:{"aria-posinset":L+1,"aria-setsize":d,role:"listitem"},key:L,index:L,style:{position:"absolute",left:0,transform:`translateY(${F.scrollOffset}px)`,height:E?void 0:F.size,width:"100%"}}))}return q},[S,_,E,d,k,A,z]),H=g.jsx("div",{"aria-hidden":!0,style:{height:D(),width:"100%",zIndex:-1}});return v.createElement(m,{role:"list",...y,className:t,ref:T,style:{position:"relative",maxHeight:"100%",flexGrow:1,overflowY:"auto",...b}},Y,e,H)}const zO=v.createContext(null);function _q(e){const t=v.useContext(zO);if(!t)throw new Error(`${e} must be used within LegacyMenu.VirtualizedContent`);return t}function Nq({children:e,activeIndex:t,setIsOpen:n,getItemProps:r,listRef:s,closeOnSelect:a,onRowElementChange:l}){const c=v.useMemo(()=>({activeIndex:t,setIsOpen:n,getItemProps:r,listRef:s,closeOnSelect:a,onRowElementChange:l}),[t,n,r,s,a,l]);return g.jsx(zO.Provider,{value:c,children:e})}const Aq=4,oT="ui-menu--virtualized";function Oq({index:e,style:t,items:n,activeIndex:r,renderItem:s,onMouseMove:a}){const l=n[e],c=r===e,d=P5();return g.jsx("div",{className:d.className,style:{...t,...d.style},onMouseMove:f=>a(e,f),children:s(l,e,c)})}function Mq({items:e,itemHeight:t,renderItem:n,getItemLabel:r,header:s,footer:a,emptyState:l,"aria-label":c,className:d,style:f,surfaceStyle:h,maxHeight:m,width:b="200px",size:y,backdrop:k,closeOnSelect:S=!0,overscanCount:R=5,getItemKey:T,onPreserveActiveIndex:E,renderActivePreview:C,ref:_}){const D=ua(),{isOpen:N,isMounted:A,activeIndex:$,setActiveIndex:z,setIsOpen:I,virtualFocus:Y,enableHover:H,nodeId:q,listRef:L,labelsRef:F,searchValue:U,refs:W,floatingStyles:B,middlewareData:K,transitionStyles:O,context:P,getFloatingProps:V,getItemProps:j,dismissCauseRef:Z,returnFocusOnSelect:te,returnFocus:se}=Gi("LegacyMenu.VirtualizedContent"),ue=v.useRef(null),le=v.useRef(null),fe=v.useRef($);fe.current=$;const ge=v.useRef(null),[_e,oe]=v.useState(null),[ye,Se]=v.useState(null),Oe=k??!H,we=jh(),{portalLayerStyles:ke}=Dl("popover",A),De=v.useRef(null),Me=v.useRef(void 0),Le=v.useRef(e),He=v.useRef($),be=v.useRef(null);v.useEffect(()=>{r?F.current=e.map(ze=>r(ze)):F.current=e.map(()=>null),L.current.length!==e.length&&(L.current.length=e.length)},[e,r,F,L]),v.useLayoutEffect(()=>{const ze=Le.current!==e,Ne=He.current!==$;if(Le.current=e,He.current=$,T===void 0||$==null){Me.current=void 0;return}const Ie=Me.current;if(ze&&!Ne&&Ie!==void 0){const Be=e.findIndex(Rt=>T(Rt)===Ie);if(Be>=0&&Be!==$){be.current=Be,E===void 0?z(Be):E(Be);return}}const ut=e[$];Me.current=ut===void 0?void 0:T(ut)},[$,T,e,E,z]);const Re=P.placement.startsWith("top"),ee=Re&&A?K.bottomAnchor?.bottom??null:null,ce=v.useRef(null);v.useLayoutEffect(()=>{if(!N){ce.current=null,De.current=null;return}if($==null||ce.current===$)return;ce.current=$;const ze=be.current===$;if(be.current=null,ze)return;const Ne=De.current===$;De.current=null,!Ne&&($<0||$>=e.length||le.current?.scrollToRow({index:$,align:"smart",behavior:"instant"}))},[N,$,e.length]);const J=v.useRef(U),re=v.useRef(N);v.useEffect(()=>{const ze=J.current,Ne=re.current;J.current=U,re.current=N,!(!N||!Ne||ze===U)&&(e.length>0&&le.current?.scrollToRow({index:0,align:"start",behavior:"instant"}),z(e.length>0?0:null))},[N,e.length,U,z]);const xe=v.useCallback((ze,Ne)=>{ge.current=ze,oe(Ie=>Ie===ze?Ie:ze),Se(Ie=>Ie===Ne?Ie:Ne)},[]);v.useLayoutEffect(()=>{if(!N||$==null||$<0||$>=e.length){xe(null,null);return}const ze=L.current[$];ze!=null&&xe(ze,$)},[$,N,e.length,L,xe]);const $e=v.useCallback((ze,Ne)=>{ze===fe.current&&Ne!=null&&xe(Ne,ze)},[xe]),Xe=v.useRef(null),Ye=v.useCallback((ze,Ne)=>{const Ie=Xe.current;Xe.current={x:Ne.clientX,y:Ne.clientY},!(Ie!==null&&Ie.x===Ne.clientX&&Ie.y===Ne.clientY)&&$!==ze&&(De.current=ze,z(ze))},[$,z]),ht=v.useCallback(ze=>{ze.key==="Escape"&&(Z.current="escape")},[Z]),Qe=v.useCallback(ze=>{we(ze.nativeEvent)&&(Z.current="backdrop",I(!1))},[Z,I,we]),yt=v.useCallback(ze=>{if(!we(ze.nativeEvent))return;ze.preventDefault(),Z.current="backdrop",I(!1);const ut=document.elementsFromPoint(ze.clientX,ze.clientY).find(Be=>!Be.classList.contains(Ax));ut&&ut.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:ze.clientX,clientY:ze.clientY,screenX:ze.screenX,screenY:ze.screenY,button:ze.button,buttons:ze.buttons,ctrlKey:ze.ctrlKey,shiftKey:ze.shiftKey,altKey:ze.altKey,metaKey:ze.metaKey}))},[Z,I,we]),kt=Gc([W.setFloating,ue,_]),tt=ca();if(!A)return null;const Tt=m??w9,_t=typeof t=="number"?e.length*t:e.reduce((ze,Ne,Ie)=>ze+t(Ie),0),st=Math.min(_t,Math.max(0,Tt-Aq*2)),vt=y??D?.menuSize??"sm",Dt={...B,...O,...f,...Ex({width:b}),...ke,...Re&&ee!==null?{top:"auto",bottom:ee}:{},...Tx({isOpen:N,isPositioned:P.isPositioned})},Pt=TO(ke),At=Ox({className:d?`${oT} ${d}`:oT,size:vt,style:Dt,surfaceStyle:h}),X=Dx(),he=Lx(),je=Ix(),Ze=Mx(!0),St=$5(),at=jx(),qe=N&&ye!=null&&ye>=0&&ye<e.length&&_e!=null&&C!=null?C(ye,{rowElement:_e,menuContentElement:ue.current}):null,Ee=qe!=null&&_e!=null,Ue={items:e,activeIndex:$,renderItem:n,onMouseMove:Ye};return g.jsxs(yx,{...tt?{root:tt}:{},children:[Oe&&g.jsx("div",{className:Pt.className,style:Pt.style,"data-component":"menu-backdrop",onClick:Qe,onContextMenu:yt,role:"none"}),g.jsx(xx,{context:P,initialFocus:-1,returnFocus:se??(Z.current!=="backdrop"&&(Z.current!=="selection"||te)),modal:!Y&&N,children:g.jsx("div",{ref:kt,className:At.className,style:At.style,tabIndex:-1,"data-component":"menu-popup","data-virtualized":"","data-size":vt,...V({onKeyDown:ht,onMouseDown:Y?ze=>{ze.stopPropagation()}:void 0}),children:g.jsx(Ts,{menuSize:vt,children:g.jsx("div",{className:X.className,style:X.style,"data-component":"menu-layout",role:"menu","aria-label":c??"Menu",children:g.jsx(BA,{dismiss:!N,children:g.jsx(Hx,{layerNodeId:q,children:g.jsxs(Nq,{activeIndex:$,setIsOpen:I,getItemProps:j,listRef:L,closeOnSelect:S,onRowElementChange:$e,children:[s!=null?g.jsx("div",{className:he.className,style:he.style,"data-component":"menu-header",children:g.jsx(Ss,{value:"header",children:s})}):null,e.length>0?g.jsx("div",{className:je.className,style:je.style,"data-component":"menu-content",children:g.jsx("div",{className:Ze.className,style:Ze.style,"data-component":"menu-list",role:"presentation",children:g.jsx(Cq,{listRef:le,className:St.className,rowComponent:Oq,rowProps:Ue,rowCount:e.length,rowHeight:t,overscanCount:R,"data-native-scrollbar":"none",style:{height:st}})})}):l,a!=null?g.jsx("div",{className:at.className,style:at.style,"data-component":"menu-footer",children:g.jsx(Ss,{value:"footer",children:a})}):null,C!=null?g.jsx(LO,{open:Ee,placement:"right-start",anchorRef:ge,offset:6,closeOnSelect:!1,virtualFocus:!0,children:Ee?qe:null}):null]})})})})})})})]})}function Iq({index:e,children:t,disabled:n=!1,onSelect:r,onMouseDown:s,leading:a,leadingStyle:l,contentStyle:c,trailing:d,trailingStyle:f,wideLeftSection:h=!1,tooltip:m,tooltipContentKey:b,closeOnSelect:y,description:k,variant:S="default",checked:R,ref:T}){const{shouldAllowPointerInteraction:E,virtualFocus:C}=Gi("LegacyMenu.VirtualizedItem"),_=Jc(),{activeIndex:D,setIsOpen:N,getItemProps:A,listRef:$,closeOnSelect:z,onRowElementChange:I}=_q("LegacyMenu.VirtualizedItem"),Y=y??z??!0,H=D===e,q=v.useCallback(ge=>{$.current[e]=ge,I?.(e,ge),typeof T=="function"?T(ge):T&&(T.current=ge)},[e,$,I,T]),L=()=>{if(n)return;const ge={defaultPrevented:!1,preventDefault:()=>{ge.defaultPrevented=!0}};r?.(ge),Y&&!ge.defaultPrevented&&N(!1)},F=ge=>{if(!E(ge.nativeEvent)){ge.preventDefault(),ge.stopPropagation();return}L()},U=ge=>{n||(ge.key==="Enter"||ge.key===" ")&&(ge.preventDefault(),L())},W=ge=>{if(!E(ge.nativeEvent)){ge.preventDefault(),ge.stopPropagation();return}s?.(ge),!ge.defaultPrevented&&C&&ge.preventDefault()},{onMouseMove:B,onPointerLeave:K,...O}=A({onClick:F,onKeyDown:U,onMouseDown:W}),P=Px(),V=$x(),j=Bx(),Z=k!=null?g.jsxs("div",{className:P.className,style:P.style,children:[g.jsx("div",{className:V.className,style:V.style,children:t}),g.jsx("div",{className:j.className,style:j.style,"data-component":"menu-item-description",children:k})]}):t,te=zx({disabled:n,focused:H,inSubmenu:_,variant:S}),se=R!==void 0,ue=se&&a==null?g.jsx(xN,{checked:R,disabled:n}):a,le=se?{role:"menuitemcheckbox","aria-checked":R,"data-checked":R||void 0}:{role:"menuitem"},fe=g.jsx("li",{ref:q,...le,tabIndex:H?0:-1,"aria-disabled":n||void 0,"data-component":"menu-row","data-disabled":n||void 0,"data-focused":H||void 0,"data-has-description":k!=null||void 0,"data-variant":S!=="default"?S:void 0,"data-wide-left":h||void 0,[jl]:"body",className:te.className,style:te.style,...O,children:g.jsx(Rl,{disabled:n,leading:ue,leadingStyle:l,contentStyle:c,trailing:d,trailingStyle:f,wideLeft:h,children:Z})});return m!=null?g.jsx(Qc,{content:m,contentKey:b,children:fe}):fe}function aT({children:e,open:t,defaultOpen:n,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l,offset:c,flip:d,closeOnSelect:f,instantClose:h,instantTransitions:m,returnFocusOnSelect:b,returnFocus:y,focusItemOnOpen:k,virtualFocus:S,shouldKeepOpenDuringDrag:R,lockPositionWhileOpen:T,dismissOnReferenceScroll:E}){return g.jsx(M9,{open:t,defaultOpen:n,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l,offset:c,flip:d,closeOnSelect:f,instantClose:h,instantTransitions:m,returnFocusOnSelect:b,returnFocus:y,focusItemOnOpen:k,virtualFocus:S,shouldKeepOpenDuringDrag:R,lockPositionWhileOpen:T,dismissOnReferenceScroll:E,children:e})}function Dq(e){return ko()===null?g.jsx(w4,{children:g.jsx(aT,{...e})}):g.jsx(aT,{...e})}function PO(e,t,n){const{ref:r,...s}=n,a=kA({defaultTagName:"button",props:s,ref:r,render:e});return t?e:a}function Lq({children:e,disabled:t=!1}){const{getTriggerProps:n}=Gi("LegacyMenu.Trigger");return PO(e,t,n())}function jq({children:e,onClick:t,disabled:n=!1}){const{getTriggerProps:r,setHasHoverTrigger:s,setIsOpen:a}=Gi("LegacyMenu.HoverTrigger");v.useEffect(()=>{if(!n)return s(!0),()=>s(!1)},[n,s]);const l=r();return PO(e,n,{...l,onPointerDown:Fu(void 0,Fu(l.onPointerDown,c=>{c.button===2&&a(!1)})),onContextMenu:Fu(void 0,Fu(l.onContextMenu,c=>{a(!1),c.stopPropagation()})),onClick:Fu(t,c=>{l.onClick?.(c)})})}const zq=Object.assign(LO,{useContext:q5}),Xr=Object.assign(Dq,{useContext:uO,useLayerContext:rq,Trigger:Lq,HoverTrigger:jq,Content:tq,Item:AO,CheckboxItem:X5,TextItem:pq,SwitchItem:fq,Section:aq,SearchInput:sq,EmptyState:nq,LoadingState:iq,ExpandableSection:W5,ExpandableSectionTrigger:K5,ExpandableSectionContent:Y5,SubMenu:zq,SubMenuItem:uq,SubMenuTrigger:lq,SubMenuContent:cq,VirtualizedContent:Mq,VirtualizedItem:Iq,VirtualizedSectionHeader:mq}),$O=v.createContext(void 0);function Wx(){const e=v.useContext($O);if(e===void 0)throw new Error(Nn(64));return e}let Pq=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const Bh={tabActivationDirection:e=>({[Pq.activationDirection]:e})},BO=v.forwardRef(function(t,n){const{className:r,defaultValue:s=0,onValueChange:a,orientation:l="horizontal",render:c,value:d,style:f,...h}=t,m=t.defaultValue!==void 0,b=v.useRef([]),[y,k]=v.useState(()=>new Map),[S,R]=kl({controlled:d,default:s,name:"Tabs",state:"value"}),T=d!==void 0,[E,C]=v.useState(()=>new Map),_=v.useRef(void 0),D=v.useCallback(fe=>{if(fe===void 0)return null;for(const[ge,_e]of E.entries())if(_e!=null&&fe===(_e.value??_e.index))return ge;return null},[E]),[N,A]=v.useState(()=>({previousValue:S,tabActivationDirection:"none"})),{previousValue:$,tabActivationDirection:z}=N;let I=z,Y=!1;$!==S&&(I=lT($,S,l,E),Y=$!=null&&S!=null&&D(S)==null);const H=Y?$:S,q=$!==H||z!==I;Ge(()=>{q&&A({previousValue:H,tabActivationDirection:I})},[H,q,I]);const L=We((fe,ge)=>{const _e=lT(S,fe,l,E);ge.activationDirection=_e,a?.(fe,ge),!ge.isCanceled&&R(fe)}),F=We((fe,ge)=>{a?.(fe,xt(ge,void 0,void 0,{activationDirection:"none"}))}),U=We((fe,ge)=>{k(_e=>{if(_e.get(fe)===ge)return _e;const oe=new Map(_e);return oe.set(fe,ge),oe})}),W=We((fe,ge)=>{k(_e=>{if(!_e.has(fe)||_e.get(fe)!==ge)return _e;const oe=new Map(_e);return oe.delete(fe),oe})}),B=v.useCallback(fe=>y.get(fe),[y]),K=v.useCallback(fe=>{for(const ge of E.values())if(fe===ge?.value)return ge?.id},[E]),O=v.useMemo(()=>({getTabElementBySelectedValue:D,getTabIdByPanelValue:K,getTabPanelIdByValue:B,onValueChange:L,orientation:l,registerMountedTabPanel:U,setTabMap:C,unregisterMountedTabPanel:W,tabActivationDirection:I,value:S}),[D,K,B,L,l,U,C,W,I,S]),P=v.useMemo(()=>{for(const fe of E.values())if(fe!=null&&fe.value===S)return fe},[E,S]),V=v.useMemo(()=>{for(const fe of E.values())if(fe!=null&&!fe.disabled)return fe.value},[E]),j=v.useRef(!m),Z=v.useRef(s),te=v.useRef(m),se=v.useRef(!1);Ge(()=>{if(T)return;function fe(ye,Se){R(ye),A(Oe=>Oe.previousValue===ye&&Oe.tabActivationDirection==="none"?Oe:{previousValue:ye,tabActivationDirection:"none"}),F(ye,Se),j.current=!1}if(E.size===0){se.current&&S!==null&&!_.current?.isConnected&&fe(null,g1);return}se.current=!0,_.current=E.keys().next().value;const ge=P?.disabled,_e=P==null&&S!==null;if(!ge&&S===Z.current&&(te.current=!1),te.current&&ge&&S===Z.current)return;const oe=j.current;if(ge||_e){const ye=V??null;if(S===ye){j.current=!1;return}let Se=g1;oe?Se=b1:ge&&(Se=HC),fe(ye,Se);return}oe&&P!=null&&(F(S,b1),j.current=!1)},[V,T,F,P,R,E,S]);const le=hn("div",t,{state:{orientation:l,tabActivationDirection:I},ref:n,props:h,stateAttributesMapping:Bh});return g.jsx($O.Provider,{value:O,children:g.jsx(fx,{elementsRef:b,children:le})})});function lT(e,t,n,r){if(e==null||t==null)return"none";let s=null,a=null;for(const[d,f]of r.entries()){if(f==null)continue;const h=f.value??f.index;if(e===h&&(s=d),t===h&&(a=d),s!=null&&a!=null)break}if(s==null||a==null)return s!==a&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof t?n==="horizontal"?t>e?"right":"left":t>e?"down":"up":"none";const l=s.getBoundingClientRect(),c=a.getBoundingClientRect();if(n==="horizontal"){if(c.left<l.left)return"left";if(c.left>l.left)return"right"}else{if(c.top<l.top)return"up";if(c.top>l.top)return"down"}return"none"}const FO=v.createContext(void 0);function UO(){const e=v.useContext(FO);if(e===void 0)throw new Error(Nn(65));return e}const qO=v.forwardRef(function(t,n){const{className:r,disabled:s=!1,render:a,value:l,id:c,nativeButton:d=!0,style:f,...h}=t,{value:m,getTabPanelIdByValue:b,orientation:y,tabActivationDirection:k}=Wx(),{activateOnFocus:S,highlightedTabIndex:R,onTabActivation:T,registerTabResizeObserverElement:E,setHighlightedTabIndex:C,tabsListElement:_}=UO(),D=Ml(c),N=v.useMemo(()=>({disabled:s,id:D,value:l}),[s,D,l]),{compositeProps:A,compositeRef:$,index:z}=RA({metadata:N}),I=l===m,Y=v.useRef(!1),H=v.useRef(null);Ge(()=>{const j=H.current;if(j)return E(j)},[E]),Ge(()=>{if(Y.current){Y.current=!1;return}if(!(I&&z>-1&&R!==z))return;const j=_;if(j!=null){const Z=ar(Vt(j));if(Z&&dt(j,Z))return}s||C(z)},[I,z,R,C,s,_]);const{getButtonProps:q,buttonRef:L}=Al({disabled:s,native:d,focusableWhenDisabled:!0}),F=b(l),U=v.useRef(!1),W=v.useRef(!1);function B(j){I||s||T(l,xt(Si,j.nativeEvent,void 0,{activationDirection:"none"}))}function K(j){I||(z>-1&&!s&&C(z),!s&&S&&(!U.current||U.current&&W.current)&&T(l,xt(Si,j.nativeEvent,void 0,{activationDirection:"none"})))}function O(j){if(I||s)return;U.current=!0;function Z(){U.current=!1,W.current=!1}(!j.button||j.button===0)&&(W.current=!0,Vt(j.currentTarget).addEventListener("pointerup",Z,{once:!0}))}return hn("button",t,{state:{disabled:s,active:I,orientation:y,tabActivationDirection:k},ref:[n,L,$,H],props:[A,{role:"tab","aria-controls":F,"aria-selected":I,id:D,onClick:B,onFocus:K,onPointerDown:O,[GA]:I?"":void 0,onKeyDownCapture(){Y.current=!0}},h,q],stateAttributesMapping:Bh})});function $q(){return Vn}function Bq(){return!1}function Fq(){return!0}function Uq(){return Yv.useSyncExternalStore($q,Bq,Fq)}const qq='!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();';let Ja=(function(e){return e.activeTabLeft="--active-tab-left",e.activeTabRight="--active-tab-right",e.activeTabTop="--active-tab-top",e.activeTabBottom="--active-tab-bottom",e.activeTabWidth="--active-tab-width",e.activeTabHeight="--active-tab-height",e})({});const Hq=v.createContext(void 0),Gq={disableStyleElements:!1};function HO(){return v.useContext(Hq)??Gq}const Vq={...Bh,activeTabPosition:()=>null,activeTabSize:()=>null},GO=v.forwardRef(function(t,n){const{className:r,render:s,renderBeforeHydration:a=!1,style:l,...c}=t,{nonce:d}=HO(),{getTabElementBySelectedValue:f,orientation:h,tabActivationDirection:m,value:b}=Wx(),{tabsListElement:y,registerIndicatorUpdateListener:k}=UO(),S=Uq(),R=s$();v.useEffect(()=>k(R),[k,R]);let T=0,E=0,C=0,_=0,D=0,N=0,A=!1;if(b!=null&&y!=null){const L=f(b);if(L!=null){A=!0;const{width:F,height:U}=WE(L),{width:W,height:B}=WE(y),K=L.getBoundingClientRect(),O=y.getBoundingClientRect(),P=W>0?O.width/W:1,V=B>0?O.height/B:1;if(Math.abs(P)>Number.EPSILON&&Math.abs(V)>Number.EPSILON){const Z=K.left-O.left,te=K.top-O.top;T=Z/P+y.scrollLeft-y.clientLeft,C=te/V+y.scrollTop-y.clientTop}else T=L.offsetLeft,C=L.offsetTop;D=F,N=U,E=y.scrollWidth-T-D,_=y.scrollHeight-C-N}}const $=A?{left:T,right:E,top:C,bottom:_}:null,z=A?{width:D,height:N}:null,I=A?{[Ja.activeTabLeft]:`${T}px`,[Ja.activeTabRight]:`${E}px`,[Ja.activeTabTop]:`${C}px`,[Ja.activeTabBottom]:`${_}px`,[Ja.activeTabWidth]:`${D}px`,[Ja.activeTabHeight]:`${N}px`}:void 0,Y=A&&D>0&&N>0,q=hn("span",t,{state:{orientation:h,activeTabPosition:$,activeTabSize:z,tabActivationDirection:m},ref:n,props:[{role:"presentation",style:I,hidden:!Y},c,{suppressHydrationWarning:!0}],stateAttributesMapping:Vq});return b==null?null:g.jsxs(v.Fragment,{children:[q,S&&a&&g.jsx("script",{nonce:d,dangerouslySetInnerHTML:{__html:qq},suppressHydrationWarning:!0})]})}),VO=v.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:s,loopFocus:a=!0,render:l,style:c,...d}=t,{onValueChange:f,orientation:h,value:m,setTabMap:b,tabActivationDirection:y}=Wx(),[k,S]=v.useState(0),[R,T]=v.useState(null),E=v.useRef(new Set),C=v.useRef(new Set),_=v.useRef(null);Ge(()=>{if(typeof ResizeObserver>"u")return;const Y=new ResizeObserver(()=>{E.current.forEach(H=>{H()})});return _.current=Y,R&&Y.observe(R),C.current.forEach(H=>{Y.observe(H)}),()=>{Y.disconnect(),_.current=null}},[R]);const D=We(Y=>(E.current.add(Y),()=>{E.current.delete(Y)})),N=We(Y=>(C.current.add(Y),_.current?.observe(Y),()=>{C.current.delete(Y),_.current?.unobserve(Y)})),A=We((Y,H)=>{Y!==m&&f(Y,H)}),$={orientation:h,tabActivationDirection:y},z={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},I=v.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:k,registerIndicatorUpdateListener:D,registerTabResizeObserverElement:N,onTabActivation:A,setHighlightedTabIndex:S,tabsListElement:R}),[r,k,D,N,A,S,R]);return g.jsx(FO.Provider,{value:I,children:g.jsx(BF,{render:l,className:s,style:c,state:$,refs:[n,T],props:[z,d],stateAttributesMapping:Bh,highlightedIndex:k,enableHomeAndEndKeys:!0,loopFocus:a,orientation:h,onHighlightedIndexChange:S,onMapChange:b,disabledIndices:fo})})}),uT={base:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-1qjc9v5",kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kzQI83:"ui-1iyjqo2",k7Eaqz:"ui-euugli",ks0D6T:"ui-193iq5w",$$css:!0},default:{kWkggS:"ui-flfp0o",$$css:!0}},Wq={sm:{kmVPX3:"ui-1e29tyv",kaIpWk:"ui-1sxf85j",$$css:!0},md:{kmVPX3:"ui-1hbkpea",kaIpWk:"ui-1043rbw",$$css:!0},lg:{kmVPX3:"ui-1hbkpea",kaIpWk:"ui-1043rbw",$$css:!0}},Kq={base:{kVAEAm:"ui-10l6tqk",kY2c9j:"ui-1ja2u2z",kfzvcC:"ui-47corl",kB7OPa:"ui-9f619",kbCHJM:"ui-vbikie",k87sOh:"ui-10uur0e",kzqmXN:"ui-offw1",kZKoxP:"ui-1gezbiy",kWkggS:"ui-i07v4r",k1ekBW:"ui-98hnz2",kIyJzY:"ui-1bqoo3p ui-sagj69",kAMwcw:"ui-1tkypeg",$$css:!0}},Yq={sm:{kaIpWk:"ui-1bl94mz",$$css:!0},md:{kaIpWk:"ui-1e1y6u3",$$css:!0},lg:{kaIpWk:"ui-1e1y6u3",$$css:!0}},qb={base:{kysU6D:"ui-jyslct",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kzQI83:"ui-1c4vz4f",kmuXW:"ui-2lah0s",kCS8Yb:"ui-dl72j9",khDVqt:"ui-uxw1ft",kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kY2c9j:"ui-1vjfegm",kLKAdn:"ui-exx8yu",kGO01o:"ui-18d9i69",kMv6JI:"ui-jb2p0i",k63SB2:"ui-1pd3egz",kWkggS:"ui-jbqb8w",ksu8eU:"ui-ng3xce",kMwMTN:"ui-19aaqeu ui-1qp4pc4 ui-1gfq6vl",kkrTdU:"ui-1ypdohk ui-mh7c9n",kSiTet:"ui-1hc1fzr",k1ekBW:"ui-1gbuem2",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},fullWidth:{kzQI83:"ui-1iyjqo2",kCS8Yb:"ui-1r8uery",$$css:!0},compact:{k63SB2:"ui-20ajya",kMwMTN:"ui-4b2ntj ui-1qp4pc4 ui-1gfq6vl",kWkggS:"ui-jbqb8w ui-x05fgs",$$css:!0}},Xq={sm:{kpe85a:"ui-g31tg3",kE3dHu:"ui-43mhey",kaIpWk:"ui-1bl94mz",$$css:!0},md:{kpe85a:"ui-17v7654",kE3dHu:"ui-1lfpczk",kaIpWk:"ui-1e1y6u3",$$css:!0},lg:{kpe85a:"ui-1yxiud8",kE3dHu:"ui-yab65l",kaIpWk:"ui-1e1y6u3",$$css:!0}},Zq={sm:{kpe85a:"ui-g31tg3",kE3dHu:"ui-43mhey",kaIpWk:"ui-1e1y6u3",$$css:!0},md:{kpe85a:"ui-17v7654",kE3dHu:"ui-1lfpczk",kaIpWk:"ui-1043rbw",$$css:!0},lg:{kpe85a:"ui-1yxiud8",kE3dHu:"ui-yab65l",kaIpWk:"ui-1043rbw",$$css:!0}},WO=v.createContext(null);function Qq(){const e=v.use(WO);if(e===null)throw new Error("SegmentedControl.Item must be used within SegmentedControl");return e}function Jq({value:e,defaultValue:t,onValueChange:n,variant:r="default",size:s="md",disabled:a=!1,fullWidth:l=!1,children:c,"aria-label":d,"aria-labelledby":f,...h}){const m=v.useMemo(()=>({variant:r,size:s,disabled:a,fullWidth:l}),[a,l,s,r]);return g.jsx(WO.Provider,{value:m,children:g.jsx(BO,{...h,value:e,defaultValue:t,onValueChange:n,"data-component":"segmented-control","data-size":s,"data-variant":r,...{0:{className:"ui-3nfvp2 ui-1qjc9v5 ui-9f619 ui-2lah0s ui-eq5yr9 ui-193iq5w"},1:{className:"ui-3nfvp2 ui-1qjc9v5 ui-9f619 ui-2lah0s ui-193iq5w ui-h8yej3"}}[!!l<<0],children:g.jsxs(VO,{activateOnFocus:!0,"aria-label":d,"aria-labelledby":f,"data-component":"segmented-control-list",...jt(uT.base,ji[s],r==="default"&&uT.default,r==="default"&&Wq[s]),children:[c,r==="default"?g.jsx(GO,{"data-component":"segmented-control-indicator",...jt(Kq.base,Yq[s])}):null]})})})}function e8({value:e,disabled:t=!1,children:n,...r}){const s=Qq();return g.jsx(qO,{...r,value:e,disabled:s.disabled||t,"data-component":"segmented-control-item","data-size":s.size,"data-variant":s.variant,...jt(qb.base,ox.root,s.size==="sm"?Rs.root:Fi.root,s.variant==="default"?Xq[s.size]:Zq[s.size],s.variant==="compact"&&qb.compact,s.fullWidth&&qb.fullWidth),children:n})}const cc=Object.assign(Jq,{Item:e8}),KO=v.createContext(null),YO=v.createContext(null);function Cs(){const e=v.useContext(KO);if(e===null)throw new Error(Nn(60));return e}function XO(){const e=v.useContext(YO);if(e===null)throw new Error(Nn(61));return e}const ct={id:et(e=>e.id),labelId:et(e=>e.labelId),modal:et(e=>e.modal),multiple:et(e=>e.multiple),items:et(e=>e.items),itemToStringLabel:et(e=>e.itemToStringLabel),itemToStringValue:et(e=>e.itemToStringValue),isItemEqualToValue:et(e=>e.isItemEqualToValue),value:et(e=>e.value),hasSelectedValue:et(e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Vo(t,r)!==""}),hasNullItemLabel:et((e,t)=>t?g6(e.items):!1),open:et(e=>e.open),mounted:et(e=>e.mounted),forceMount:et(e=>e.forceMount),transitionStatus:et(e=>e.transitionStatus),openMethod:et(e=>e.openMethod),activeIndex:et(e=>e.activeIndex),selectedIndex:et(e=>e.selectedIndex),isActive:et((e,t)=>e.activeIndex===t),isSelected:et((e,t)=>{const n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(s=>na(t,s,n)):na(t,r,n)}),isSelectedByFocus:et((e,t)=>e.selectedIndex===t),popupProps:et(e=>e.popupProps),triggerProps:et(e=>e.triggerProps),triggerElement:et(e=>e.triggerElement),positionerElement:et(e=>e.positionerElement),listElement:et(e=>e.listElement),popupSide:et(e=>e.popupSide),scrollUpArrowVisible:et(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:et(e=>e.scrollDownArrowVisible),hasScrollArrows:et(e=>e.hasScrollArrows)};function Ju(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const gs=1;function ZO(e,t){return Math.max(0,e-t)}function t8(e,t){if(t<=0)return 0;const n=Ju(e,0,t),r=n,s=t-n,a=r<=gs,l=s<=gs;return a&&l?r<=s?0:t:a?0:l?t:n}function n8(e){const{id:t,value:n,defaultValue:r=null,onValueChange:s,open:a,defaultOpen:l=!1,onOpenChange:c,name:d,form:f,autoComplete:h,disabled:m=!1,readOnly:b=!1,required:y=!1,modal:k=!0,actionsRef:S,inputRef:R,onOpenChangeComplete:T,items:E,multiple:C=!1,itemToStringLabel:_,itemToStringValue:D,isItemEqualToValue:N=p6,highlightItemOnHover:A=!0,children:$}=e,{clearErrors:z}=vN(),{setDirty:I,setTouched:Y,setFocused:H,validityData:q,setFilled:L,name:F,disabled:U,validation:W,validationMode:B}=kh(),K=cx({id:t}),O=U||m,P=F??d,[V,j]=kl({controlled:n,default:C?r??fo:r,name:"Select",state:"value"}),[Z,te]=kl({controlled:a,default:l,name:"Select",state:"open"}),se=v.useRef([]),ue=v.useRef([]),le=v.useRef(null),fe=v.useRef(null),ge=v.useRef(0),_e=v.useRef(null),oe=v.useRef([]),ye=v.useRef(!1),Se=v.useRef(null),Oe=v.useRef(null),we=v.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),ke=v.useRef(!1),{mounted:De,setMounted:Me,transitionStatus:Le}=Fc(Z),{openMethod:He,triggerProps:be}=F$(Z),Re=Ir(()=>new I_({id:K,labelId:void 0,modal:k,multiple:C,itemToStringLabel:_,itemToStringValue:D,isItemEqualToValue:N,value:V,open:Z,mounted:De,transitionStatus:Le,items:E,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,ee=pt(Re,ct.activeIndex),ce=pt(Re,ct.selectedIndex),J=pt(Re,ct.triggerElement),re=pt(Re,ct.positionerElement),xe=vF(He),$e=He??xe??null,Xe=v.useMemo(()=>C?"":Vo(V,D),[C,V,D]),Ye=v.useMemo(()=>C&&Array.isArray(V)?V.map(Ne=>Vo(Ne,D)):Vo(V,D),[C,V,D]),ht=_n(Re.state.triggerElement),Qe=We(()=>Ye);yN(ht,K,V,Qe,!O,d);const yt=v.useRef(V),kt=C?Array.isArray(V)&&V.length>0:V!=null&&Vo(V,D)!=="";Ge(()=>{V!==yt.current&&Re.set("forceMount",!0)},[Re,V]),Ge(()=>{L(kt)},[kt,L]),Ge(function(){const Ie=oe.current;let ut;if(C){const Be=Array.isArray(V)?V:[];if(Be.length===0)ut=null;else{const Rt=Be[Be.length-1],wt=oc(Ie,Rt,N);ut=wt===-1?null:wt}}else{const Be=oc(Ie,V,N);ut=Be===-1?null:Be}ut===null&&(Oe.current=null),!Z&&Re.set("selectedIndex",ut)},[kt,C,Z,V,oe,N,Re,Oe]);function tt(Ne){const Ie=q.initialValue;return Array.isArray(Ne)&&Array.isArray(Ie)?!X3(Ne,Ie,(ut,Be)=>na(ut,Be,N)):Ne!==Ie}nN(V,()=>{z(P),I(tt(V)),W.change(V)});const Tt=We((Ne,Ie)=>{c?.(Ne,Ie),!Ie.isCanceled&&(te(Ne),!Ne&&(Ie.reason===ah||Ie.reason===Mv)&&(Y(!0),H(!1),B==="onBlur"&&W.commit(V)))}),_t=We(()=>{Me(!1),Re.update({activeIndex:null,openMethod:null}),T?.(!1)});xo({enabled:!S,open:Z,ref:le,onComplete(){Z||_t()}}),v.useImperativeHandle(S,()=>({unmount:_t}),[_t]);const st=We((Ne,Ie)=>{s?.(Ne,Ie),!Ie.isCanceled&&j(Ne)}),vt=We(()=>{const Ne=Re.state.listElement||le.current;if(!Ne)return;const Ie=ZO(Ne.scrollHeight,Ne.clientHeight),ut=t8(Ne.scrollTop,Ie),Be=ut>0,Rt=ut<Ie;Re.state.scrollUpArrowVisible!==Be&&Re.set("scrollUpArrowVisible",Be),Re.state.scrollDownArrowVisible!==Rt&&Re.set("scrollDownArrowVisible",Rt)}),Dt=V_({open:Z,onOpenChange:Tt,elements:{reference:J,floating:re}}),Pt=tP(Dt,{enabled:!b&&!O,event:"mousedown"}),At=qv(Dt),X=y$(Dt,{enabled:!b&&!O,listRef:se,activeIndex:ee,selectedIndex:ce,disabledIndices:fo,onNavigate(Ne){Ne===null&&!Z||Re.set("activeIndex",Ne)},focusItemOnHover:A}),he=v$(Dt,{enabled:!b&&!O&&(Z||!C),listRef:ue,activeIndex:ee,selectedIndex:ce,disabledIndices:Ne=>CA(se.current[Ne]),onMatch(Ne){Z?Re.set("activeIndex",Ne):st(oe.current[Ne],xt("none"))},onTyping(Ne){ye.current=Ne}}),je=v.useMemo(()=>{const Ne=Pi(he.reference,X.reference,At.reference,Pt.reference,be);return K&&(Ne.id=K),Ne},[Pt.reference,he.reference,X.reference,At.reference,be,K]),Ze=v.useMemo(()=>Pi(Qv,he.floating,X.floating,At.floating),[he.floating,X.floating,At.floating]),St=X.item??jn;A_(()=>{Re.update({popupProps:Ze,triggerProps:je})}),Ge(()=>{Re.update({id:K,modal:k,multiple:C,value:V,open:Z,mounted:De,transitionStatus:Le,popupProps:Ze,triggerProps:je,items:E,itemToStringLabel:_,itemToStringValue:D,isItemEqualToValue:N,openMethod:$e})},[Re,K,k,C,V,Z,De,Le,Ze,je,E,_,D,N,$e]);const at=v.useMemo(()=>({store:Re,name:P,required:y,disabled:O,readOnly:b,multiple:C,highlightItemOnHover:A,setValue:st,setOpen:Tt,listRef:se,popupRef:le,scrollHandlerRef:fe,handleScrollArrowVisibility:vt,scrollArrowsMountedCountRef:ge,itemProps:St,valueRef:_e,valuesRef:oe,labelsRef:ue,typingRef:ye,selectionRef:we,firstItemTextRef:Se,selectedItemTextRef:Oe,validation:W,onOpenChangeComplete:T,alignItemWithTriggerActiveRef:ke,initialValueRef:yt}),[Re,P,y,O,b,C,A,st,Tt,St,W,T,vt]),qe=co(R,W.inputRef),Ee=C&&Array.isArray(V)&&V.length>0,Ue=C?void 0:P,ze=v.useMemo(()=>!C||!Array.isArray(V)||!P?null:V.map(Ne=>{const Ie=Vo(Ne,D);return g.jsx("input",{type:"hidden",form:f,name:P,value:Ie,disabled:O},Ie)}),[C,V,f,P,D,O]);return g.jsx(KO.Provider,{value:at,children:g.jsxs(YO.Provider,{value:Dt,children:[$,g.jsx("input",{...W.getValidationProps(O,{onFocus(){Re.state.triggerElement?.focus({focusVisible:!0})},onChange(Ne){if(Ne.nativeEvent.defaultPrevented||O||b)return;const Ie=Ne.currentTarget.value,ut=xt(Si,Ne.nativeEvent);function Be(){if(C)return;const Rt=Ie.toLowerCase();let wt=oe.current.findIndex(Rn=>Vo(Rn,D).toLowerCase()===Rt||CN(Rn,_).toLowerCase()===Rt);wt===-1&&(wt=oe.current.findIndex((Rn,jr)=>{const zr=ue.current[jr];return zr!=null&&zr.toLowerCase()===Rt}));const $t=wt===-1?void 0:oe.current[wt];$t!=null&&st($t,ut)}Re.set("forceMount",!0),queueMicrotask(Be)}}),id:K&&Ue==null?`${K}-hidden-input`:void 0,form:f,name:Ue,autoComplete:h,value:Xe,disabled:O,required:y&&!Ee,readOnly:b,ref:qe,style:P?w2:ZC,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),ze]})})}const Bd=2,r8=400,i8={...Hz,...qc,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},s8=v.forwardRef(function(t,n){const{render:r,className:s,id:a,disabled:l=!1,nativeButton:c=!0,style:d,...f}=t,{setTouched:h,setFocused:m,validationMode:b,state:y,disabled:k}=kh(),{labelId:S}=lx(),{store:R,setOpen:T,selectionRef:E,validation:C,readOnly:_,required:D,alignItemWithTriggerActiveRef:N,disabled:A}=Cs(),$=k||A||l,z=pt(R,ct.open),I=pt(R,ct.mounted),Y=pt(R,ct.value),H=pt(R,ct.triggerProps),q=pt(R,ct.positionerElement),L=pt(R,ct.listElement),F=pt(R,ct.popupSide),U=pt(R,ct.id),W=pt(R,ct.labelId),B=pt(R,ct.hasSelectedValue),K=I&&q?F:null,O=a??U,P=y6(S,W);cx({id:O});const V=_n(q),j=v.useRef(null),{getButtonProps:Z,buttonRef:te}=Al({disabled:$,native:c}),se=We(ye=>{R.set("triggerElement",ye)}),ue=di(),le=di(),fe=di();v.useEffect(()=>{if(z)return fe.start(r8,()=>{E.current.allowUnselectedMouseUp=!0,E.current.allowSelectedMouseUp=!0}),()=>{fe.clear()};E.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},le.clear()},[z,E,le,fe]);const ge=Pi(H,{id:O,role:"combobox","aria-expanded":z?"true":"false","aria-haspopup":"listbox","aria-controls":z?L?.id??kp(q)?.id:void 0,"aria-labelledby":P,"aria-readonly":_||void 0,"aria-required":D||void 0,tabIndex:$?-1:0,onFocus(ye){m(!0),z&&N.current&&T(!1,xt(Si,ye.nativeEvent)),ue.start(0,()=>{R.set("forceMount",!0)})},onBlur(ye){dt(q,ye.relatedTarget)||(h(!0),m(!1),b==="onBlur"&&C.commit(Y))},onMouseDown(ye){if(z)return;const Se=Vt(ye.currentTarget);function Oe(we){if(!j.current)return;const ke=we.target;if(dt(j.current,ke)||dt(V.current,ke))return;const De=v6(j.current);we.clientX>=De.left-Bd&&we.clientX<=De.right+Bd&&we.clientY>=De.top-Bd&&we.clientY<=De.bottom+Bd||T(!1,xt(t2,we))}le.start(0,()=>{Se.addEventListener("mouseup",Oe,{once:!0})})}},f,Z),_e=C.getValidationProps($,ge);_e.role="combobox";const oe={...y,open:z,disabled:$,value:Y,readOnly:_,popupSide:K,placeholder:!B};return hn("button",t,{ref:[n,j,te,se],state:oe,stateAttributesMapping:i8,props:_e})}),o8={value:()=>null},a8=v.forwardRef(function(t,n){const{className:r,render:s,children:a,placeholder:l,style:c,...d}=t,{store:f,valueRef:h}=Cs(),m=pt(f,ct.value),b=pt(f,ct.items),y=pt(f,ct.itemToStringLabel),k=pt(f,ct.hasSelectedValue),S=!k&&l!=null&&a==null,R=pt(f,ct.hasNullItemLabel,S),T={value:m,placeholder:!k};let E=null;return typeof a=="function"?E=a(m):a!=null?E=a:!k&&l!=null&&!R?E=l:Array.isArray(m)?E=b6(m,b,y):E=_N(m,b,y),hn("span",t,{state:T,ref:[n,h],props:[{children:E},d],stateAttributesMapping:o8})}),l8=v.createContext(void 0),u8=v.forwardRef(function(t,n){const{store:r}=Cs(),s=pt(r,ct.mounted),a=pt(r,ct.forceMount);return s||a?g.jsx(l8.Provider,{value:!0,children:g.jsx(W2,{ref:n,...t})}):null}),c8={...$c,...go},f8=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,{store:c}=Cs(),d=pt(c,ct.open),f=pt(c,ct.mounted),h=pt(c,ct.transitionStatus);return hn("div",t,{state:{open:d,transitionStatus:h},ref:n,props:[{role:"presentation",hidden:!f,style:{userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:c8})}),QO=v.createContext(void 0);function JO(){const e=v.useContext(QO);if(!e)throw new Error(Nn(59));return e}function Gp(e,t){e&&Object.assign(e.style,t)}const eM={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},d8={position:"fixed"},p8=v.forwardRef(function(t,n){const{anchor:r,positionMethod:s="absolute",className:a,render:l,side:c="bottom",align:d="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:b,arrowPadding:y=5,sticky:k=!1,disableAnchorTracking:S,alignItemWithTrigger:R=!0,collisionAvoidance:T=H2,style:E,...C}=t,{store:_,listRef:D,labelsRef:N,alignItemWithTriggerActiveRef:A,selectedItemTextRef:$,valuesRef:z,initialValueRef:I,popupRef:Y,setValue:H}=Cs(),q=XO(),L=pt(_,ct.open),F=pt(_,ct.mounted),U=pt(_,ct.modal),W=pt(_,ct.value),B=pt(_,ct.openMethod),K=pt(_,ct.positionerElement),O=pt(_,ct.triggerElement),P=pt(_,ct.isItemEqualToValue),V=pt(_,ct.transitionStatus),j=v.useRef(null),Z=v.useRef(null),[te,se]=v.useState(R),ue=F&&te&&B!=="touch";!F&&te!==R&&se(R),Ge(()=>{F||(ct.scrollUpArrowVisible(_.state)&&_.set("scrollUpArrowVisible",!1),ct.scrollDownArrowVisible(_.state)&&_.set("scrollDownArrowVisible",!1))},[_,F]),v.useImperativeHandle(A,()=>ue),N6((ue||U)&&L,B==="touch",K,O);const le=dx({anchor:r,floatingRootContext:q,positionMethod:s,mounted:F,side:c,sideOffset:f,align:d,alignOffset:h,arrowPadding:y,collisionBoundary:m,collisionPadding:b,sticky:k,disableAnchorTracking:S??ue,collisionAvoidance:T,keepMounted:!0}),fe=ue?"none":le.side,ge=ue?d8:le.positionerStyles,_e={open:L,side:fe,align:le.align,anchorHidden:le.anchorHidden};Ge(()=>{_.set("popupSide",le.side)},[_,le.side]);const oe=We(ke=>{_.set("positionerElement",ke)}),ye=px(t,_e,{styles:ge,transitionStatus:V,props:C,refs:[n,oe],hidden:!F,inert:!L}),Se=v.useRef(0),Oe=We(ke=>{if(ke.size===0&&Se.current===0||z.current.length===0)return;const De=Se.current;if(Se.current=ke.size,ke.size===De)return;const Me=xt(Si);if(De!==0&&!_.state.multiple&&W!==null&&oc(z.current,W,P)===-1){const He=I.current,Re=He!=null&&oc(z.current,He,P)!==-1?He:null;H(Re,Me),Re===null&&(_.set("selectedIndex",null),$.current=null)}if(De!==0&&_.state.multiple&&Array.isArray(W)){const Le=be=>oc(z.current,be,P)!==-1,He=W.filter(be=>Le(be));(He.length!==W.length||He.some(be=>!h6(W,be,P)))&&(H(He,Me),He.length===0&&(_.set("selectedIndex",null),$.current=null))}if(L&&ue){_.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const Le={height:""};Gp(K,Le),Gp(Y.current,Le)}}),we=v.useMemo(()=>({...le,side:fe,alignItemWithTriggerActive:ue,setControlledAlignItemWithTrigger:se,scrollUpArrowRef:j,scrollDownArrowRef:Z}),[le,fe,ue,se]);return g.jsx(fx,{elementsRef:D,labelsRef:N,onMapChange:Oe,children:g.jsxs(QO.Provider,{value:we,children:[F&&U&&g.jsx(O$,{inert:A$(!L),cutout:O}),ye]})})}),Fd="base-ui-disable-scrollbar",qy={className:Fd,getElement(e){return g.jsx("style",{nonce:e,href:Fd,precedence:"base-ui:low",children:`.${Fd}{scrollbar-width:none}.${Fd}::-webkit-scrollbar{display:none}`})}},h8={...$c,...go},m8=v.forwardRef(function(t,n){const{render:r,className:s,style:a,finalFocus:l,...c}=t,{store:d,popupRef:f,onOpenChangeComplete:h,setOpen:m,valueRef:b,firstItemTextRef:y,selectedItemTextRef:k,multiple:S,handleScrollArrowVisibility:R,scrollHandlerRef:T,listRef:E,highlightItemOnHover:C}=Cs(),{side:_,align:D,alignItemWithTriggerActive:N,isPositioned:A,setControlledAlignItemWithTrigger:$}=JO(),z=bF()!=null,I=XO(),Y=Ri(),{nonce:H,disableStyleElements:q}=HO(),L=pt(d,ct.id),F=pt(d,ct.open),U=pt(d,ct.openMethod),W=pt(d,ct.mounted),B=pt(d,ct.popupProps),K=pt(d,ct.transitionStatus),O=pt(d,ct.triggerElement),P=pt(d,ct.positionerElement),V=pt(d,ct.listElement),j=v.useRef(!1),Z=v.useRef(!1),te=v.useRef({}),se=bl(),ue=We(_e=>{if(!P||!f.current||!Z.current)return;if(j.current||!N){R();return}const oe=P.style.top==="0px",ye=P.style.bottom==="0px";if(!oe&&!ye){R();return}const Se=fT(P),Oe=ec(P.getBoundingClientRect().height,"y",Se),we=Vt(P),ke=kn(P),De=ke.getComputedStyle(P),Me=parseFloat(De.marginTop),Le=parseFloat(De.marginBottom),He=cT(ke.getComputedStyle(f.current)),be=Math.min(we.documentElement.clientHeight-Me-Le,He),Re=_e.scrollTop,ee=Ud(_e);let ce=0,J=null,re=!1,xe=!1;const $e=Qe=>{P.style.height=`${Qe}px`},Xe=(Qe,yt)=>{const kt=Ju(Qe,0,be-Oe);kt>0&&$e(Oe+kt),_e.scrollTop=yt,be-(Oe+kt)<=gs&&(j.current=!0),R()},Ye=oe?ee-Re:Re,ht=Math.min(Oe+Ye,be);if(ce=ht,Ye<=gs){Xe(Ye,oe?ee:0);return}if(be-ht>gs)oe?xe=!0:J=0;else if(re=!0,ye&&Re<ee){const Qe=Oe+Ye-be;J=Re-(Ye-Qe)}if(ce=Math.ceil(ce),ce!==0&&$e(ce),xe||J!=null){const Qe=Ud(_e),yt=xe?Qe:Ju(J,0,Qe);Math.abs(_e.scrollTop-yt)>gs&&(_e.scrollTop=yt)}(re||ce>=be-gs)&&(j.current=!0),R()});v.useImperativeHandle(T,()=>ue,[ue]),xo({open:F,ref:f,onComplete(){F&&h?.(!0)}});const le={open:F,transitionStatus:K,side:_,align:D};Ge(()=>{!P||!f.current||Object.keys(te.current).length||(te.current={top:P.style.top||"0",left:P.style.left||"0",right:P.style.right,height:P.style.height,bottom:P.style.bottom,minHeight:P.style.minHeight,maxHeight:P.style.maxHeight,marginTop:P.style.marginTop,marginBottom:P.style.marginBottom})},[f,P]),Ge(()=>{F||N||(Z.current=!1,j.current=!1,Gp(P,te.current))},[F,N,P,f]),Ge(()=>{const _e=f.current;if(!F||!O||!P||!_e||N&&!A||d.state.transitionStatus==="ending")return;if(!N){Z.current=!0,se.request(R),_e.style.removeProperty("--transform-origin");return}const oe=g8(_e);_e.style.removeProperty("--transform-origin");try{let ye=k.current;ye?.isConnected||(ye=!ct.hasSelectedValue(d.state)&&y.current?.isConnected?y.current:null);const Se=b.current,Oe=kn(P),we=Oe.getComputedStyle(P),ke=Oe.getComputedStyle(_e),De=Vt(O),Me=fT(O),Le=qd(O.getBoundingClientRect(),Me),He=qd(P.getBoundingClientRect(),Me),be=Le.height,Re=V||_e,ee=Re.scrollHeight,ce=parseFloat(ke.borderBottomWidth),J=parseFloat(we.marginTop)||10,re=parseFloat(we.marginBottom)||10,xe=parseFloat(we.minHeight)||100,$e=cT(ke),Xe=5,Ye=5,ht=20,Qe=De.documentElement.clientHeight-J-re,yt=De.documentElement.clientWidth,kt=Qe-Le.bottom+be;let tt,Tt=Y==="rtl"?Le.right-He.width:Le.left,_t=0;if(ye&&Se){const at=qd(Se.getBoundingClientRect(),Me);tt=qd(ye.getBoundingClientRect(),Me),Tt=He.left+(Y==="rtl"?at.right-tt.right:at.left-tt.left);const qe=at.top-Le.top+at.height/2;_t=tt.top-He.top+tt.height/2-qe}const st=kt+_t+re+ce;let vt=Math.min(Qe,st);const Dt=Qe-J-re,Pt=st-vt,At=yt-Ye;P.style.left=`${Ju(Tt,Xe,At-He.width)}px`,P.style.height=`${vt}px`,P.style.maxHeight="none",P.style.marginTop=`${J}px`,P.style.marginBottom=`${re}px`,_e.style.height="100%";const X=Ud(Re),he=Pt>=X-gs;he&&(vt=Math.min(Qe,He.height)-(Pt-X));const je=Le.top<ht||Le.bottom>Qe-ht||Math.ceil(vt)+gs<Math.min(ee,xe),Ze=(Oe.visualViewport?.scale??1)!==1&&yo;if(je||Ze){Z.current=!0,Gp(P,te.current),$(!1);return}const St=Math.max(xe,vt);if(he){const at=Math.max(0,Qe-st);P.style.top=He.height>=Dt?"0":`${at}px`,P.style.height=`${vt}px`,Re.scrollTop=Ud(Re)}else P.style.bottom="0",Re.scrollTop=Pt;if(tt){const at=He.top,qe=He.height,Ee=tt.top+tt.height/2,Ue=qe>0?(Ee-at)/qe*100:50,ze=Ju(Ue,0,100);_e.style.setProperty("--transform-origin",`50% ${ze}%`)}(St===Qe||vt>=$e)&&(j.current=!0),R(),C&&d.state.selectedIndex===null&&d.state.activeIndex===null&&E.current[0]!=null&&d.set("activeIndex",0),Z.current=!0}finally{oe()}},[d,F,P,O,b,y,k,f,R,N,$,se,V,E,C,Y,A]),v.useEffect(()=>{if(!N||!P||!F)return;const _e=kn(P);function oe(ye){m(!1,xt(n2,ye))}return It(_e,"resize",oe)},[m,N,P,F]);const fe={...V?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":S||void 0,id:`${L}-list`},onKeyDown(_e){z&&tN.has(_e.key)&&_e.stopPropagation()},onScroll(_e){V||ue(_e.currentTarget)},...N&&{style:V?{height:"100%"}:eM}},ge=hn("div",t,{ref:[n,f],state:le,stateAttributesMapping:h8,props:[B,fe,Sh(K),{className:!V&&N?qy.className:void 0},c]});return g.jsxs(v.Fragment,{children:[!q&&qy.getElement(H),g.jsx(eP,{context:I,modal:!1,disabled:!W,openInteractionType:U,returnFocus:l,restoreFocus:!0,children:ge})]})});function cT(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function Ud(e){return ZO(e.scrollHeight,e.clientHeight)}function fT(e){return w_.getScale(e)}function ec(e,t,n){return e/n[t]}function qd(e,t){return gc({x:ec(e.x,"x",t),y:ec(e.y,"y",t),width:ec(e.width,"x",t),height:ec(e.height,"y",t)})}const dT=[["transform","none"],["scale","1"],["translate","0 0"]];function g8(e){const{style:t}=e,n={};for(const[r,s]of dT)n[r]=t.getPropertyValue(r),t.setProperty(r,s,"important");return()=>{for(const[r]of dT){const s=n[r];s?t.setProperty(r,s):t.removeProperty(r)}}}const b8=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,{store:c,scrollHandlerRef:d}=Cs(),{alignItemWithTriggerActive:f}=JO(),h=pt(c,ct.hasScrollArrows),m=pt(c,ct.openMethod),b=pt(c,ct.multiple),k={id:`${pt(c,ct.id)}-list`,role:"listbox","aria-multiselectable":b||void 0,onScroll(R){d.current?.(R.currentTarget)},...f&&{style:eM},className:h&&m!=="touch"?qy.className:void 0},S=We(R=>{c.set("listElement",R)});return hn("div",t,{ref:[n,S],props:[k,l]})}),tM=v.createContext(void 0);function Kx(){const e=v.useContext(tM);if(!e)throw new Error(Nn(57));return e}const y8=v.memo(v.forwardRef(function(t,n){const{render:r,className:s,style:a,value:l=null,label:c,disabled:d=!1,nativeButton:f=!1,...h}=t,m=v.useRef(null),b=IN({label:c,textRef:m,indexGuessBehavior:MN.GuessFromOrder}),{store:y,itemProps:k,setOpen:S,setValue:R,selectionRef:T,typingRef:E,valuesRef:C,multiple:_,selectedItemTextRef:D,disabled:N,readOnly:A}=Cs(),$=pt(y,ct.isActive,b.index),z=pt(y,ct.open),I=pt(y,ct.isSelected,l),Y=pt(y,ct.isSelectedByFocus,b.index),H=pt(y,ct.isItemEqualToValue),q=b.index,L=q!==-1,F=v.useRef(null);Ge(()=>{if(!L)return;const ue=C.current;return ue[q]=l,()=>{delete ue[q]}},[L,q,l,C]),Ge(()=>{if(!L)return;const ue=y.state.value;let le=ue;_&&Array.isArray(ue)&&(le=ue.length>0?ue[ue.length-1]:void 0),le!==void 0&&na(l,le,H)&&(y.set("selectedIndex",q),m.current&&(D.current=m.current))},[L,q,_,H,y,l,D]);const U=v.useRef(null),W=v.useRef("mouse"),B=v.useRef(!1),{getButtonProps:K,buttonRef:O}=Al({disabled:d,focusableWhenDisabled:!0,native:f,composite:!0}),P={disabled:d,selected:I,highlighted:$};function V(ue){if(N||A)return;const le=y.state.value;if(_){const fe=Array.isArray(le)?le:[],ge=I?m6(fe,l,H):[...fe,l];R(ge,xt(ob,ue))}else R(l,xt(ob,ue)),S(!1,xt(ob,ue))}function j(){T.current.dragY=0}const Z={role:"option","aria-selected":I,tabIndex:z&&$?0:-1,onKeyDown(ue){U.current=ue.key,y.set("activeIndex",q),ue.key===" "&&E.current&&ue.preventDefault()},onClick(ue){const le=ue.type==="click"&&W.current!=="touch",fe=ue.nativeEvent.pointerType,ge=le&&jv(ue.nativeEvent)&&(fe!==void 0||$),_e=le&&!ge&&!B.current;B.current=!1,!(ue.type==="keydown"&&U.current===null)&&(d||ue.type==="keydown"&&U.current===" "&&E.current||_e||(U.current=null,V(ue.nativeEvent)))},onPointerEnter(ue){W.current=ue.pointerType},onPointerMove(ue){if(ue.pointerType==="mouse"&&ue.buttons===1){const le=T.current;le.dragY+=ue.movementY,le.dragY**2>=64&&(le.allowUnselectedMouseUp=!0)}},onPointerDown(ue){W.current=ue.pointerType,B.current=!0,j()},onMouseUp(){if(j(),d||W.current==="touch"||B.current)return;const ue=!T.current.allowSelectedMouseUp&&I,le=!T.current.allowUnselectedMouseUp&&!I;ue||le||(B.current=!0,F.current?.click(),B.current=!1)}},te=hn("div",t,{ref:[O,n,b.ref,F],state:P,props:[k,Z,h,K]}),se=v.useMemo(()=>({selected:I,index:q,textRef:m,selectedByFocus:Y,hasRegistered:L}),[I,q,m,Y,L]);return g.jsx(tM.Provider,{value:se,children:te})})),pT=v.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:s}=Kx();return r||s?g.jsx(v8,{...t,ref:n}):null}),v8=v.memo(v.forwardRef((e,t)=>{const{render:n,className:r,style:s,keepMounted:a,...l}=e,{selected:c}=Kx(),d=v.useRef(null),{transitionStatus:f,setMounted:h}=Fc(c),b=hn("span",e,{ref:[t,d],state:{selected:c,transitionStatus:f},props:[{"aria-hidden":!0,children:"✔️"},l],stateAttributesMapping:go});return xo({open:c,ref:d,onComplete(){c||h(!1)}}),b})),x8=v.memo(v.forwardRef(function(t,n){const{index:r,textRef:s,selectedByFocus:a,hasRegistered:l}=Kx(),{firstItemTextRef:c,selectedItemTextRef:d}=Cs(),{render:f,className:h,style:m,...b}=t,y=v.useCallback(S=>{S&&(l&&r===0&&(c.current=S),l&&a&&(d.current=S))},[c,d,r,a,l]);return hn("div",t,{ref:[y,n,s],props:b})})),nM="lg",rM="outline",k8={"ui--default-marker":"ui--default-marker",$$css:!0},zi={base:{kysU6D:"ui-jyslct",keoZOQ:"ui-dj266r",k71WvV:"ui-14z9mp",k1K539:"ui-at24cr",keTefX:"ui-1lziwak",k63SB2:"ui-1pd3egz",k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",$$css:!0},sizeLg:{kLKAdn:"ui-f6zju3",kwRFfy:"ui-1msowdo",kGO01o:"ui-cnij5n",kZCmMZ:"ui-1uxnm1j",$$css:!0},sizeMd:{kLKAdn:"ui-493x5y",kwRFfy:"ui-1tlft3r",kGO01o:"ui-b6dno7",kZCmMZ:"ui-v853mj",$$css:!0},shapeRounded:{kaIpWk:"ui-1043rbw",$$css:!0},shapePill:{kaIpWk:"ui-1i4c3av",$$css:!0},frameContentLg:{keoZOQ:"ui-1m79sar",k1K539:"ui-1w4rq16",keTefX:"ui-1t34h19",k71WvV:"ui-u45m27",$$css:!0},frameContentMd:{keoZOQ:"ui-lvyip8",k1K539:"ui-b4cpfm",keTefX:"ui-1hk7dha",k71WvV:"ui-yy14hb",$$css:!0},frameContentHugFalseLg:{kzqmXN:"ui-lai49p",$$css:!0},frameContentHugFalseMd:{kzqmXN:"ui-u0r5jw",$$css:!0},hugFalse:{kzqmXN:"ui-h8yej3",kjj79g:"ui-13a6bvl",$$css:!0}},hT={base:{kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",k9WMMc:"ui-1yc453h",kMwMTN:"ui-15rks2t",$$css:!0},placeholder:{kMwMTN:"ui-4b2ntj",$$css:!0}},S8="sm",w8={md:zi.sizeMd,lg:zi.sizeLg},E8={md:zi.frameContentMd,lg:zi.frameContentLg},T8={md:zi.frameContentHugFalseMd,lg:zi.frameContentHugFalseLg};function R8({children:e,variant:t=rM,frame:n="container",shape:r="rounded",size:s=nM,hug:a=!0,className:l,style:c,rootStyle:d,labelStyle:f,disabled:h=!1,id:m,leading:b,trailing:y,open:k,placeholder:S,hideChevron:R=!1,ref:T,"data-popup-open":E,...C}){const _=e==null&&S!=null,D=k??(E!==void 0&&E!==!1),N=k===void 0?E:k||void 0,A=ix(t,void 0),$=jt(hN.root,zi.base,Fi.root,ji[s],w8[s],xi.appearance,A.applyControlTone&&sx.foreground,A.applyFilledColors&&xi.colors,A.applyNonFilledBackground&&xl.background,t==="outline"&&xl.outline,D&&xi.engaged,!a&&zi.hugFalse,r==="pill"?zi.shapePill:zi.shapeRounded,n==="content"&&E8[s],n==="content"&&!a&&T8[s],d,k8),z=jt(Ll.root,ax.root,hT.base,_&&hT.placeholder,f),I={className:"ui-78zum5 ui-6s0dn4 ui-2lah0s ui-1mh7f6w"},Y={0:{className:"ui-2lah0s ui-1mh7f6w"},1:{className:"ui-2lah0s ui-7qsbfx"}}[!!D<<0];return g.jsxs(rx,{...C,ref:T,id:m,className:nn("ui-select-trigger",$.className,l),style:{...$.style,...c},"data-popup-open":N,"data-variant":t,"data-size":s,disabled:h,children:[b!=null&&g.jsx("span",{className:I.className,style:I.style,children:b}),g.jsx("span",{className:nn("ui-select-label",z.className),style:z.style,children:_?S:e}),y!=null&&g.jsx("span",{className:I.className,style:I.style,children:y}),R?null:g.jsx(Yt,{name:"chevron-down",size:10,className:nn("ui-select-icon",Y.className),style:Y.style})]})}const mT={backdrop:{kVAEAm:"ui-ixxii4",kpwlN0:"ui-10a8y8t",kWkggS:"ui-jbqb8w",$$css:!0},backdropZIndex:e=>[{kY2c9j:e!=null?"ui-r3buco":e,$$css:!0},{"--x-zIndex":e??void 0}]},iM=v.createContext(null);function Yx(){const e=v.useContext(iM);if(!e)throw new Error("Select internals must be used within Select");return e}function C8(){const e=Yx(),t=e.hasValue?g.jsx(a8,{}):void 0;return g.jsx(s8,{disabled:e.disabled,id:e.id,...e.ariaLabel!==void 0?{"aria-label":e.ariaLabel}:{},...e.ariaLabelledBy!==void 0?{"aria-labelledby":e.ariaLabelledBy}:{},render:e.renderTrigger??((n,r)=>g.jsx(R8,{...n,className:nn(n.className,e.className),disabled:e.disabled,frame:e.frame,hug:e.hug,hideChevron:e.hideChevron,leading:e.leading,labelStyle:e.labelStyle,open:r.open,placeholder:e.placeholder,rootStyle:e.rootStyle,trailing:e.trailing,shape:e.shape,size:e.size,variant:e.variant})),children:t})}function _8({children:e}){const t=Yx(),n=ca(),{zIndex:r,portalLayerStyles:s}=Dl("popover",t.open),a=_h(t.placement,t.offset,!1),l=t.matchAnchorWidth?"var(--anchor-width)":t.contentWidth;return g.jsxs(u8,{container:n??void 0,style:s,children:[g.jsx(f8,{"data-component":"select-backdrop",...jt(mT.backdrop,r!==null&&mT.backdropZIndex(r-1))}),g.jsx(p8,{align:a.align,alignItemWithTrigger:!1,alignOffset:a.alignOffset,collisionAvoidance:a.collisionAvoidance,"data-component":"select-positioner",positionMethod:a.positionMethod,side:a.side,sideOffset:a.sideOffset,...Eh($6),children:g.jsx(m8,{"data-component":"select-popup","data-size":t.menuSize,...jt(W6,wh,K6[t.menuSize],l!==void 0?Y6(l):X6,t.contentStyle),children:g.jsx(Ts,{menuSize:t.menuSize,children:g.jsx(OB,{children:g.jsx(b8,{"aria-label":t.ariaLabel??"Select an option",...jt(Z6),children:e})})})})})]})}function N8({option:e}){Yx();const t=e.description!==void 0,n=g.jsxs(y8,{disabled:e.disabled,label:typeof e.label=="string"?e.label:void 0,value:e.value,"data-component":"select-item","data-has-description":t||void 0,...jt(Q6),children:[e.leading!=null?g.jsx("span",{...jt(xb,sB,t&&kb),children:e.leading}):null,g.jsxs("span",{...jt(J6,t&&nB),children:[g.jsxs(x8,{...jt(e.labelMeta!=null&&tB),children:[g.jsx("span",{...jt(eB),children:e.label}),e.labelMeta!=null?g.jsx("span",{...jt(iB),children:e.labelMeta}):null]}),t?g.jsx("span",{"data-component":"select-item-description",...jt(rB,Rs.root),children:e.description}):null]}),e.trailing!=null?g.jsxs("span",{"data-component":"select-item-end",...jt(xb,pE,oB,t&&kb),children:[e.trailing,g.jsx(pT,{"data-component":"select-item-indicator",children:g.jsx(Yt,{color:"primary",name:"check","aria-hidden":!0})})]}):g.jsx(pT,{"data-component":"select-item-indicator",...jt(xb,pE,t&&kb),children:g.jsx(Yt,{color:"primary",name:"check","aria-hidden":!0})})]});return e.tooltip==null?n:g.jsx(Qc,{closeDelay:e.tooltipCloseDelay,content:e.tooltip,openDelay:e.tooltipOpenDelay,children:n})}function A8({value:e,defaultValue:t,onValueChange:n,open:r,defaultOpen:s,onOpenChange:a,options:l,placeholder:c,variant:d=rM,frame:f="container",shape:h="rounded",size:m=nM,menuSize:b,contentWidth:y,matchAnchorWidth:k=!1,hug:S=!0,disabled:R=!1,className:T,renderTrigger:E,placement:C="bottom-start",offset:_=4,"aria-label":D,"aria-labelledby":N,id:A,leading:$,trailing:z,labelStyle:I,rootStyle:Y,hideChevron:H=!1,contentStyle:q,...L}){const[F,U]=xc(e,t,void 0,"Select.Root (value)"),W=F!=null&&l.some(te=>te.value===F),[B,K]=xc(r,s??!1,void 0,"Select.Root (open)"),O=b??"sm",P=v.useCallback((te,se)=>{n?.(te,se),!se.isCanceled&&U(te)},[n,U]),V=v.useCallback((te,se)=>{a?.(te,se),!se.isCanceled&&K(te)},[a,K]),j=v.useMemo(()=>({hasValue:W,variant:d,frame:f,shape:h,size:m,menuSize:O,hug:S,disabled:R,open:B,placement:C,offset:_,id:A,ariaLabel:D,ariaLabelledBy:N,placeholder:c,leading:$,trailing:z,labelStyle:I,rootStyle:Y,hideChevron:H,contentStyle:q,className:T,renderTrigger:E,contentWidth:y,matchAnchorWidth:k}),[D,N,T,q,y,R,f,S,W,H,A,B,I,$,k,_,C,c,O,Y,z,E,h,m,d]),Z=l.map(te=>({label:te.label,value:te.value}));return g.jsx(iM.Provider,{value:j,children:g.jsx(Ts,{iconSize:S8,children:g.jsxs(n8,{...L,defaultOpen:s,defaultValue:t,disabled:R,id:A,items:Z,onOpenChange:V,onValueChange:P,open:r,value:e,children:[g.jsx(C8,{}),g.jsx(_8,{children:l.map((te,se)=>g.jsx(N8,{option:te},typeof te.value=="string"||typeof te.value=="number"?String(te.value):se))})]})})})}const O8=v.createContext(void 0);function M8(e=!0){const t=v.useContext(O8);if(t===void 0&&!e)throw new Error(Nn(7));return t}const I8=v.forwardRef(function(t,n){const{className:r,defaultPressed:s=!1,disabled:a=!1,form:l,onPressedChange:c,pressed:d,render:f,type:h,value:m,nativeButton:b=!0,style:y,...k}=t,S=Ml(m||void 0),R=M8(),T=R?.value??[],E=R?void 0:s,C=(a||R?.disabled)??!1,[_,D]=kl({controlled:R?S!==void 0&&T.indexOf(S)>-1:d,default:E,name:"Toggle",state:"pressed"}),{getButtonProps:N,buttonRef:A}=Al({disabled:C,native:b}),$={disabled:C,pressed:_},z=[A,n],I=[{"aria-pressed":_,onClick(q){const L=!_,F=xt(Si,q.nativeEvent);c?.(L,F),!F.isCanceled&&(S&&R?.setGroupValue?.(S,L,F),!F.isCanceled&&D(L))}},k,N],Y=hn("button",t,{enabled:!R,state:$,ref:z,props:I}),H=v.useMemo(()=>({disabled:C,focusableWhenDisabled:!1}),[C]);return R?g.jsx(yF,{tag:"button",render:f,className:r,style:y,metadata:H,state:$,refs:z,props:I}):Y});function gT(e,t,n,r){return typeof e=="string"?g.jsx(Yt,{"aria-hidden":"true",name:e,rootStyle:r,size:n,variant:t}):g.jsx("span",{...SA(n),"aria-hidden":"true",children:e})}function D8({icon:e,pressedIcon:t,pressed:n,iconVariant:r,iconSize:s,iconStyle:a}){return g.jsxs("span",{className:"ui-rvj5dj ui-6s0dn4 ui-1o2pa38 ui-c8icb0 ui-47corl ui-1heor9g","aria-hidden":"true",children:[g.jsx("span",{className:"ui-1ms6mhf ui-gkxs2y ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1g0ag68 ui-g01cxk ui-6rycqq ui-fimr68 ui-1owdx9d ui-tea3wc ui-1qzdkne ui-nejef0 ui-4wkmsb ui-7pq1vu ui-6ekqhr","data-swap-active":!n||void 0,children:gT(e,r,s,a)}),g.jsx("span",{className:"ui-1ms6mhf ui-gkxs2y ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1g0ag68 ui-g01cxk ui-6rycqq ui-fimr68 ui-1owdx9d ui-tea3wc ui-1qzdkne ui-nejef0 ui-4wkmsb ui-7pq1vu ui-6ekqhr","data-swap-active":n||void 0,children:gT(t,r,s,a)})]})}function L8({icon:e,pressedIcon:t=e,iconVariant:n="outline",variant:r,border:s,rounded:a,frame:l="container",reveal:c="always",size:d,iconSize:f,tone:h,rootStyle:m,iconStyle:b,disabled:y,"aria-label":k,"aria-labelledby":S,...R}){const T=ua(),{size:E,innerIconSize:C,disabled:_,variant:D,tone:N}=EA({disabled:y,enforced:T,iconSize:f,size:d,tone:h,variant:r}),A=wA({border:s,enforcedRootStyle:T?.iconButtonRootStyle,frame:l,reveal:c,rootStyle:m,rounded:a,size:E,tone:N,variant:D});return g.jsx(I8,{...R,className:nn("ui-icon-button",A.rootAttrs.className),style:A.rootAttrs.style,...A.dataAttrs,"aria-label":k,"aria-labelledby":S,"data-component":"toggle-icon-button",disabled:_,render:($,z)=>g.jsx("button",{...$,"data-pressed":void 0,children:g.jsx(D8,{icon:e,iconSize:C,iconStyle:[T?.iconButtonIconStyle,b],iconVariant:n,pressed:z.pressed,pressedIcon:t})})})}function j8({pressed:e,...t}){return g.jsx(L8,{...t,pressed:e,variant:e?"secondary":"ghost"})}const bT=e=>{let t;const n=new Set,r=(f,h)=>{const m=typeof f=="function"?f(t):f;if(!Object.is(m,t)){const b=t;t=h??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(y=>y(t,b))}},s=()=>t,c={setState:r,getState:s,getInitialState:()=>d,subscribe:f=>(n.add(f),()=>n.delete(f))},d=t=e(r,s,c);return c},z8=(e=>e?bT(e):bT),P8=e=>e;function $8(e,t=P8){const n=Xu.useSyncExternalStore(e.subscribe,Xu.useCallback(()=>t(e.getState()),[e,t]),Xu.useCallback(()=>t(e.getInitialState()),[e,t]));return Xu.useDebugValue(n),n}const B8=/^\/internal\/agent-serve\/agents\/(asd_[0-9a-f]{32})\/engine(?:\/|$)/,F8=/^asd-([0-9a-f]{32})\.agents\.cursorusercontent\.com$/;function U8(e=window.location.pathname,t=window.location.hostname){const n=F8.exec(t.toLowerCase());if(n!==null)return{publicId:`asd_${n[1]}`,mountPath:""};const r=B8.exec(e);if(r===null)return null;const s=r[1];return{publicId:s,mountPath:`/internal/agent-serve/agents/${s}/engine`}}function q8(e=window.location.search){return new URLSearchParams(e).get("embed")==="1"}function sM(e=window.location,t=window.history){const n=e.hash.startsWith("#")?e.hash.slice(1):e.hash;if(n==="")return"";const s=new URLSearchParams(n).get("access")?.trim()??"";return s===""?"":(t.replaceState(null,"",`${e.pathname}${e.search}`),s)}function H8(e,t=window){const n=()=>{const r=sM(t.location,t.history);r!==""&&e(r)};return t.addEventListener("hashchange",n),()=>t.removeEventListener("hashchange",n)}class G8{constructor(t,n,r=()=>""){this.basePath=t,this.getToken=n,this.getAliasToken=r}url(t){return(this.basePath||"")+t}headers(t){const n={...t},r=this.getToken().trim();r&&(n.authorization=`Bearer ${r}`);const s=this.getAliasToken().trim();return s&&(n["x-agent-alias-token"]=s),n}async request(t,n={}){const r=await fetch(this.url(t),{...n,headers:this.headers(n.headers)}),s=await r.text();let a=null;try{a=s?JSON.parse(s):null}catch{a=null}return{status:r.status,ok:r.ok,body:a}}postJson(t,n){return this.request(t,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)})}health(){return this.request("/v1/health")}info(){return this.request("/v1/info")}logs(t=-1){const n=t<0?"":`?after=${t}`;return this.request(`/v1/logs${n}`)}meta(){return this.request("/v1/meta")}sessions(){return this.request("/v1/sessions")}artifacts(t={}){const n=new URLSearchParams;t.sessionId!==void 0&&t.sessionId!==""&&n.set("sessionId",t.sessionId),t.limit!==void 0&&n.set("limit",String(t.limit));const r=n.toString();return this.request(`/v1/artifacts${r===""?"":`?${r}`}`)}async artifactContent(t,n){const r=await fetch(this.url(`/v1/artifacts/${encodeURIComponent(t)}/content`),{headers:this.headers()}),s=r.headers.get("content-type")??void 0;if(!r.ok||r.body===null)return await r.body?.cancel().catch(()=>{}),{status:r.status,ok:!1,contentType:s,bytes:new Uint8Array(0),truncated:!1};const a=r.body.getReader(),l=[];let c=0,d=!1;for(;;){const{done:m,value:b}=await a.read();if(m)break;if(b!==void 0){if(c+b.length>n){l.push(b.slice(0,n-c)),c=n,d=!0,await a.cancel().catch(()=>{});break}l.push(b),c+=b.length}}const f=new Uint8Array(c);let h=0;for(const m of l)f.set(m,h),h+=m.length;return{status:r.status,ok:!0,contentType:s,bytes:f,truncated:d}}createSession(t){return this.postJson("/v1/session",{message:t})}followUp(t,n,r){return this.postJson(`/v1/session/${encodeURIComponent(t)}`,{message:n,continuationToken:r})}stopSession(t){return this.postJson(`/v1/session/${encodeURIComponent(t)}/stop`,{})}resolveApproval(t,n,r){return this.postJson(`/v1/session/${encodeURIComponent(t)}/approvals/${encodeURIComponent(n)}`,{decision:r})}resolveAuth(t,n,r){return this.postJson(`/v1/session/${encodeURIComponent(t)}/auths/${encodeURIComponent(n)}`,{decision:r})}dispatchSchedule(t){return this.request(`/v1/dev/schedules/${encodeURIComponent(t)}`,{method:"POST"})}evalsList(){return this.request("/v1/dev/evals")}evalsListRuns(){return this.request("/v1/dev/evals/runs")}evalsStartRun(t={}){return this.postJson("/v1/dev/evals/runs",t)}evalsRunStatus(t){return this.request(`/v1/dev/evals/runs/${encodeURIComponent(t)}`)}evalsCancelRun(t){return this.postJson(`/v1/dev/evals/runs/${encodeURIComponent(t)}/cancel`,{})}channelRequest(t,n,r={}){let s=n;if(r.query!==void 0){const l=new URLSearchParams;for(const[d,f]of Object.entries(r.query))f!==""&&l.set(d,f);const c=l.toString();c!==""&&(s=`${n}?${c}`)}const a={method:t.toUpperCase()};return r.body!==void 0&&(a.headers={"content-type":"application/json"},a.body=JSON.stringify(r.body)),this.request(s,a)}streamFetch(t,n,r){return fetch(this.url(`/v1/session/${encodeURIComponent(t)}/stream?startIndex=${n}`),{signal:r,headers:this.headers()})}eventsText(t){return fetch(this.url(`/v1/session/${encodeURIComponent(t)}/events`),{headers:this.headers()})}sessionCost(t){return this.request(`/v1/session/${encodeURIComponent(t)}/cost`)}}function oM(e){const t=typeof e=="string"?e:e!==null&&typeof e=="object"&&typeof e.url=="string"?e.url:null;if(t===null)return null;let n;try{n=new URL(t)}catch{return null}return n.protocol==="http:"||n.protocol==="https:"?t:null}function aM(e){return{kind:typeof e.kind=="string"&&e.kind!==""?e.kind:"artifact",title:typeof e.title=="string"&&e.title.trim()!==""?e.title:void 0,url:oM(e.data)??void 0,artifactId:typeof e.id=="string"&&e.id!==""?e.id:void 0,data:e.data}}function Hy(e){if(!Number.isFinite(e)||e<0)return"";if(e<1024)return`${e} B`;const t=["KB","MB","GB"];let n=e,r="B";for(const s of t){if(n<1024)break;n/=1024,r=s}return`${n>=10?Math.round(n):Math.round(n*10)/10} ${r}`}function V8(e){if(e===void 0||e.trim()==="")return!0;const t=e.split(";")[0]?.trim().toLowerCase()??"";return t.startsWith("text/")||t.endsWith("+json")||t.endsWith("+xml")||t==="application/json"||t==="application/x-ndjson"||t==="application/xml"||t==="application/javascript"||t==="application/yaml"||t==="application/x-yaml"||t==="application/toml"||t==="application/sql"?!0:!(t.startsWith("image/")||t.startsWith("audio/")||t.startsWith("video/")||t.startsWith("font/")||t==="application/pdf"||t==="application/zip"||t==="application/gzip")}function W8(e){return/\u0000|[\u0001-\u0008\u000b\u000e-\u001f]{4}/.test(e)}function K8(e,t){const n=e?.split(";")[0]?.trim().toLowerCase()??"";if(n==="text/x-diff"||n==="text/x-patch")return!0;const r=t.slice(0,4e3);return/^diff --git /m.test(r)||/^--- /m.test(r)&&/^\+\+\+ /m.test(r)&&/^@@ /m.test(r)}function Y8(e){return e.startsWith("+++")||e.startsWith("---")?"meta":e.startsWith("+")?"add":e.startsWith("-")?"del":e.startsWith("@@")?"hunk":e.startsWith("diff ")||e.startsWith("index ")||e.startsWith("new file mode")||e.startsWith("deleted file mode")||e.startsWith("rename from")||e.startsWith("rename to")||e.startsWith("similarity index")||e.startsWith("Binary files ")?"meta":"ctx"}function X8(e){const t=e.title?.trim();return t!==void 0&&t!==""?t:`${e.kind} · ${e.id}`}function Z8(e){const t=new Set;for(const n of e)t.add(n.kind);return[...t].sort((n,r)=>n.localeCompare(r))}function yT(e){const t=Date.parse(e.updatedAt);return Number.isNaN(t)?0:t}function lM(e){return[...e].sort((t,n)=>yT(n)-yT(t))}function Q8(e,t){return t===null?e:e.filter(n=>n.kind===t)}function J8(e){const t=new Map,n=[];for(const s of lM(e)){const a=s.sessionId;if(a===void 0||a===""){n.push(s);continue}const l=t.get(a);l===void 0?t.set(a,[s]):l.push(s)}const r=[...t.entries()].map(([s,a])=>({sessionId:s,artifacts:a}));return n.length>0&&r.push({sessionId:null,artifacts:n}),r}const eH=["home","runs","evals","logs"],Gy="section",tH="home",nH={agent:"home"};function rH(e){const t=e?.trim()??"";return t===""?null:eH.includes(t)?t:nH[t]??null}function iH(e){let t=null,n=null,r=null;try{const s=new URL(e,"https://playground.invalid"),a=s.searchParams.get("sessionId")?.trim()??"";t=a.length>0?a:null;const l=s.searchParams.get("view")?.trim()??"";n=l.length>0?l:null,r=rH(s.searchParams.get(Gy))}catch{return{sessionId:null,view:null,section:null}}return n==="logs"&&r===null&&(r="logs"),{sessionId:t,view:n,section:r}}function uM(e){try{const t=new URL(window.location.href);e===tH?t.searchParams.delete(Gy):t.searchParams.set(Gy,e);const n=t.toString();if(n===window.location.href)return;history.replaceState(null,"",n)}catch{}}const sH="cursor-playground",oH=["https://cursor.com","https://www.cursor.com","https://prod.cursor.com","https://staging.cursor.com","http://localhost:4000","https://localhost:4000"];function aH(e=document.referrer,t=window.parent!==window){if(!t||e==="")return null;let n;try{n=new URL(e).origin}catch{return null}return oH.includes(n)?n:null}function lH(e,t,n=aH(),r){if(n===null)return;const s={source:sH,type:"state",view:e};t!==void 0&&(s.sessionId=t),r!==void 0&&(s.section=r),window.parent.postMessage(s,n)}const vT=e=>Number.isFinite(e)?e:0;function uH(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(vT(e*1e3)%1e3),nanoseconds:Math.trunc(vT(e*1e6)%1e3)}}function cH(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}function fH(e){switch(typeof e){case"number":{if(Number.isFinite(e))return uH(e);break}case"bigint":return cH(e)}throw new TypeError("Expected a finite number or bigint")}const dH=e=>e===0||e===0n,pH=(e,t)=>t===1||t===1n?e:`${e}s`,hH=1e-7,mH=24n*60n*60n*1000n;function gH(e,t){const n=typeof e=="bigint";if(!n&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");t={...t};const r=e<0?"-":"";e=e<0?-e:e,t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let s=[];const a=(h,m)=>{const b=Math.floor(h*10**m+hH);return(Math.round(b)/10**m).toFixed(m)},l=(h,m,b,y)=>{if(!((s.length===0||!t.colonNotation)&&dH(h)&&!(t.colonNotation&&b==="m"))){if(y??=String(h),t.colonNotation){const k=y.includes(".")?y.split(".")[0].length:y.length,S=s.length>0?2:1;y="0".repeat(Math.max(0,S-k))+y}else y+=t.verbose?" "+pH(m,h):b;s.push(y)}},c=fH(e),d=BigInt(c.days);if(t.hideYearAndDays?l(BigInt(d)*24n+BigInt(c.hours),"hour","h"):(t.hideYear?l(d,"day","d"):(l(d/365n,"year","y"),l(d%365n,"day","d")),l(Number(c.hours),"hour","h")),l(Number(c.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3){const h=Number(c.seconds),m=Number(c.milliseconds),b=Number(c.microseconds),y=Number(c.nanoseconds);if(l(h,"second","s"),t.formatSubMilliseconds)l(m,"millisecond","ms"),l(b,"microsecond","µs"),l(y,"nanosecond","ns");else{const k=m+b/1e3+y/1e6,S=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,R=k>=1?Math.round(k):Math.ceil(k),T=S?k.toFixed(S):R;l(Number.parseFloat(T),"millisecond","ms",T)}}else{const h=(n?Number(e%mH):e)/1e3%60,m=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,b=a(h,m),y=t.keepDecimalsOnWholeSeconds?b:b.replace(/\.0+$/,"");l(Number.parseFloat(y),"second","s",y)}if(s.length===0)return r+"0"+(t.verbose?" milliseconds":"ms");const f=t.colonNotation?":":" ";return typeof t.unitCount=="number"&&(s=s.slice(0,Math.max(t.unitCount,1))),r+s.join(f)}var cM="en",Xx={},Vy={};function fM(){return cM}function dM(e){cM=e}function bH(e){return Xx[e]}function pM(e){if(!e)throw new Error("No locale data passed");Xx[e.locale]=e,Vy[e.locale.toLowerCase()]=e.locale}function xT(e){if(Xx[e])return e;if(Vy[e.toLowerCase()])return Vy[e.toLowerCase()]}function hM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.localeMatcher||"lookup";switch(n){case"lookup":return kT(e);case"best fit":return kT(e);default:throw new RangeError('Invalid "localeMatcher" option: '.concat(n))}}function kT(e){var t=xT(e);if(t)return t;for(var n=e.split("-");e.length>1;){n.pop(),e=n.join("-");var r=xT(e);if(r)return r}}var ne={af:function(t){return t==1?"one":"other"},ak:function(t){return t==0||t==1?"one":"other"},am:function(t){return t>=0&&t<=1?"one":"other"},ar:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return t==0?"zero":t==1?"one":t==2?"two":s>=3&&s<=10?"few":s>=11&&s<=99?"many":"other"},ast:function(t){var n=String(t).split("."),r=!n[1];return t==1&&r?"one":"other"},be:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),a=r&&n[0].slice(-2);return s==1&&a!=11?"one":s>=2&&s<=4&&(a<12||a>14)?"few":r&&s==0||s>=5&&s<=9||a>=11&&a<=14?"many":"other"},blo:function(t){return t==0?"zero":t==1?"one":"other"},br:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),a=r&&n[0].slice(-2),l=r&&n[0].slice(-6);return s==1&&a!=11&&a!=71&&a!=91?"one":s==2&&a!=12&&a!=72&&a!=92?"two":(s==3||s==4||s==9)&&(a<10||a>19)&&(a<70||a>79)&&(a<90||a>99)?"few":t!=0&&r&&l==0?"many":"other"},bs:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-1),c=r.slice(-2),d=s.slice(-1),f=s.slice(-2);return a&&l==1&&c!=11||d==1&&f!=11?"one":a&&l>=2&&l<=4&&(c<12||c>14)||d>=2&&d<=4&&(f<12||f>14)?"few":"other"},ca:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return t==1&&a?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ceb:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-1),c=s.slice(-1);return a&&(r==1||r==2||r==3)||a&&l!=4&&l!=6&&l!=9||!a&&c!=4&&c!=6&&c!=9?"one":"other"},cs:function(t){var n=String(t).split("."),r=n[0],s=!n[1];return t==1&&s?"one":r>=2&&r<=4&&s?"few":s?"other":"many"},cy:function(t){return t==0?"zero":t==1?"one":t==2?"two":t==3?"few":t==6?"many":"other"},da:function(t){var n=String(t).split("."),r=n[0],s=Number(n[0])==t;return t==1||!s&&(r==0||r==1)?"one":"other"},dsb:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-2),c=s.slice(-2);return a&&l==1||c==1?"one":a&&l==2||c==2?"two":a&&(l==3||l==4)||c==3||c==4?"few":"other"},dz:function(t){return"other"},es:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return t==1?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ff:function(t){return t>=0&&t<2?"one":"other"},fr:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return t>=0&&t<2?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ga:function(t){var n=String(t).split("."),r=Number(n[0])==t;return t==1?"one":t==2?"two":r&&t>=3&&t<=6?"few":r&&t>=7&&t<=10?"many":"other"},gd:function(t){var n=String(t).split("."),r=Number(n[0])==t;return t==1||t==11?"one":t==2||t==12?"two":r&&t>=3&&t<=10||r&&t>=13&&t<=19?"few":"other"},he:function(t){var n=String(t).split("."),r=n[0],s=!n[1];return r==1&&s||r==0&&!s?"one":r==2&&s?"two":"other"},is:function(t){var n=String(t).split("."),r=n[0],s=(n[1]||"").replace(/0+$/,""),a=Number(n[0])==t,l=r.slice(-1),c=r.slice(-2);return a&&l==1&&c!=11||s%10==1&&s%100!=11?"one":"other"},lt:function(t){var n=String(t).split("."),r=n[1]||"",s=Number(n[0])==t,a=s&&n[0].slice(-1),l=s&&n[0].slice(-2);return a==1&&(l<11||l>19)?"one":a>=2&&a<=9&&(l<11||l>19)?"few":r!=0?"many":"other"},lv:function(t){var n=String(t).split("."),r=n[1]||"",s=r.length,a=Number(n[0])==t,l=a&&n[0].slice(-1),c=a&&n[0].slice(-2),d=r.slice(-2),f=r.slice(-1);return a&&l==0||c>=11&&c<=19||s==2&&d>=11&&d<=19?"zero":l==1&&c!=11||s==2&&f==1&&d!=11||s!=2&&f==1?"one":"other"},mk:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-1),c=r.slice(-2),d=s.slice(-1),f=s.slice(-2);return a&&l==1&&c!=11||d==1&&f!=11?"one":"other"},mt:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return t==1?"one":t==2?"two":t==0||s>=3&&s<=10?"few":s>=11&&s<=19?"many":"other"},pl:function(t){var n=String(t).split("."),r=n[0],s=!n[1],a=r.slice(-1),l=r.slice(-2);return t==1&&s?"one":s&&a>=2&&a<=4&&(l<12||l>14)?"few":s&&r!=1&&(a==0||a==1)||s&&a>=5&&a<=9||s&&l>=12&&l<=14?"many":"other"},pt:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return s==0||s==1?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ro:function(t){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,a=s&&n[0].slice(-2);return t==1&&r?"one":!r||t==0||t!=1&&a>=1&&a<=19?"few":"other"},ru:function(t){var n=String(t).split("."),r=n[0],s=!n[1],a=r.slice(-1),l=r.slice(-2);return s&&a==1&&l!=11?"one":s&&a>=2&&a<=4&&(l<12||l>14)?"few":s&&a==0||s&&a>=5&&a<=9||s&&l>=11&&l<=14?"many":"other"},se:function(t){return t==1?"one":t==2?"two":"other"},si:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"";return t==0||t==1||r==0&&s==1?"one":"other"},sl:function(t){var n=String(t).split("."),r=n[0],s=!n[1],a=r.slice(-2);return s&&a==1?"one":s&&a==2?"two":s&&(a==3||a==4)||!s?"few":"other"}};ne.as=ne.am;ne.az=ne.af;ne.bal=ne.af;ne.bg=ne.af;ne.bn=ne.am;ne.brx=ne.af;ne.ce=ne.af;ne.chr=ne.af;ne.csw=ne.ak;ne.cv=ne.blo;ne.de=ne.ast;ne.doi=ne.am;ne.ee=ne.af;ne.el=ne.af;ne.en=ne.ast;ne.eo=ne.af;ne.et=ne.ast;ne.eu=ne.af;ne.fa=ne.am;ne.fi=ne.ast;ne.fil=ne.ceb;ne.fo=ne.af;ne.fur=ne.af;ne.fy=ne.ast;ne.gl=ne.ast;ne.gu=ne.am;ne.ha=ne.af;ne.hi=ne.am;ne.hr=ne.bs;ne.hsb=ne.dsb;ne.hu=ne.af;ne.hy=ne.ff;ne.ia=ne.ast;ne.id=ne.dz;ne.ie=ne.ast;ne.ig=ne.dz;ne.ii=ne.dz;ne.it=ne.ca;ne.ja=ne.dz;ne.jgo=ne.af;ne.jv=ne.dz;ne.ka=ne.af;ne.kea=ne.dz;ne.kk=ne.af;ne.kl=ne.af;ne.km=ne.dz;ne.kn=ne.am;ne.ko=ne.dz;ne.kok=ne.am;ne.ks=ne.af;ne.ksh=ne.blo;ne.ku=ne.af;ne.ky=ne.af;ne.lb=ne.af;ne.lkt=ne.dz;ne.lld=ne.ca;ne.lo=ne.dz;ne.ml=ne.af;ne.mn=ne.af;ne.mr=ne.af;ne.ms=ne.dz;ne.my=ne.dz;ne.nb=ne.af;ne.ne=ne.af;ne.nl=ne.ast;ne.nn=ne.af;ne.no=ne.af;ne.nqo=ne.dz;ne.nso=ne.ak;ne.om=ne.af;ne.or=ne.af;ne.pa=ne.ak;ne.pcm=ne.am;ne.ps=ne.af;ne.rm=ne.af;ne.sah=ne.dz;ne.sc=ne.ast;ne.scn=ne.ca;ne.sd=ne.af;ne.sk=ne.cs;ne.so=ne.af;ne.sq=ne.af;ne.sr=ne.bs;ne.su=ne.dz;ne.sv=ne.ast;ne.sw=ne.ast;ne.syr=ne.af;ne.ta=ne.af;ne.te=ne.af;ne.th=ne.dz;ne.ti=ne.ak;ne.tk=ne.af;ne.tn=ne.af;ne.to=ne.dz;ne.tr=ne.af;ne.ug=ne.af;ne.uk=ne.ru;ne.ur=ne.ast;ne.uz=ne.af;ne.vec=ne.ca;ne.vi=ne.dz;ne.wae=ne.af;ne.wo=ne.dz;ne.xh=ne.af;ne.yi=ne.ast;ne.yo=ne.dz;ne.yue=ne.dz;ne.zh=ne.dz;ne.zu=ne.am;function ST(e){return e==="pt-PT"?e:vH(e)}var yH=/^([a-z0-9]+)/i;function vH(e){var t=e.match(yH);if(!t)throw new TypeError("Invalid locale: ".concat(e));return t[1]}function Sc(e){"@babel/helpers - typeof";return Sc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sc(e)}function xH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,SH(r.key),r)}}function kH(e,t,n){return t&&wT(e.prototype,t),n&&wT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function SH(e){var t=wH(e,"string");return Sc(t)=="symbol"?t:t+""}function wH(e,t){if(Sc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Wy=(function(){function e(t,n){xH(this,e);var r=e.supportedLocalesOf(t);if(r.length===0)throw new RangeError("Unsupported locale: "+t);if(n&&n.type!=="cardinal")throw new RangeError('Only "cardinal" "type" is supported');this.$=ne[ST(r[0])]}return kH(e,[{key:"select",value:function(n){return this.$(n)}}],[{key:"supportedLocalesOf",value:function(n){return typeof n=="string"&&(n=[n]),n.filter(function(r){return ne[ST(r)]})}}]),e})();function Cl(e){"@babel/helpers - typeof";return Cl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cl(e)}function ET(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function TT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ET(Object(n),!0).forEach(function(r){EH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ET(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function EH(e,t,n){return(t=mM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RT(e,t){return _H(e)||CH(e,t)||RH(e,t)||TH()}function TH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
13
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RH(e,t){if(e){if(typeof e=="string")return CT(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?CT(e,t):void 0}}function CT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function CH(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,l,c=[],d=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(d=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(h){f=!0,s=h}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw s}}return c}}function _H(e){if(Array.isArray(e))return e}function NH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,mM(r.key),r)}}function OH(e,t,n){return t&&AH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mM(e){var t=MH(e,"string");return Cl(t)=="symbol"?t:t+""}function MH(e,t){if(Cl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var IH=["second","minute","hour","day","week","month","quarter","year"],DH=["auto","always"],LH=["long","short","narrow"],jH=["lookup","best fit"],Es=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};NH(this,e);var r=n.numeric,s=n.style,a=n.localeMatcher;if(this.numeric="always",this.style="long",this.localeMatcher="lookup",r!==void 0){if(DH.indexOf(r)<0)throw new RangeError('Invalid "numeric" option: '.concat(r));this.numeric=r}if(s!==void 0){if(LH.indexOf(s)<0)throw new RangeError('Invalid "style" option: '.concat(s));this.style=s}if(a!==void 0){if(jH.indexOf(a)<0)throw new RangeError('Invalid "localeMatcher" option: '.concat(a));this.localeMatcher=a}if(typeof t=="string"&&(t=[t]),t.push(fM()),this.locale=e.supportedLocalesOf(t,{localeMatcher:this.localeMatcher})[0],!this.locale)throw new Error("Unsupported locale");Wy.supportedLocalesOf(this.locale).length>0?this.pluralRules=new Wy(this.locale):console.warn('"'.concat(this.locale,'" locale is not supported')),typeof Intl<"u"&&Intl.NumberFormat?(this.numberFormat=new Intl.NumberFormat(this.locale),this.numberingSystem=this.numberFormat.resolvedOptions().numberingSystem):this.numberingSystem="latn",this.locale=hM(this.locale,{localeMatcher:this.localeMatcher})}return OH(e,[{key:"format",value:function(){var n=_T(arguments),r=RT(n,2),s=r[0],a=r[1];return this.getRule(s,a).replace("{0}",this.formatNumber(Math.abs(s)))}},{key:"formatToParts",value:function(){var n=_T(arguments),r=RT(n,2),s=r[0],a=r[1],l=this.getRule(s,a),c=l.indexOf("{0}");if(c<0)return[{type:"literal",value:l}];var d=[];return c>0&&d.push({type:"literal",value:l.slice(0,c)}),d=d.concat(this.formatNumberToParts(Math.abs(s)).map(function(f){return TT(TT({},f),{},{unit:a})})),c+3<l.length-1&&d.push({type:"literal",value:l.slice(c+3)}),d}},{key:"getRule",value:function(n,r){var s=bH(this.locale)[this.style][r];if(typeof s=="string")return s;if(this.numeric==="auto"){if(n===-2||n===-1){var a=s["previous".concat(n===-1?"":"-"+Math.abs(n))];if(a)return a}else if(n===1||n===2){var l=s["next".concat(n===1?"":"-"+Math.abs(n))];if(l)return l}else if(n===0&&s.current)return s.current}var c=s[FH(n)?"past":"future"];if(typeof c=="string")return c;var d=this.pluralRules&&this.pluralRules.select(Math.abs(n))||"other";return c[d]||c.other}},{key:"formatNumber",value:function(n){return this.numberFormat?this.numberFormat.format(n):String(n)}},{key:"formatNumberToParts",value:function(n){return this.numberFormat&&this.numberFormat.formatToParts?this.numberFormat.formatToParts(n):[{type:"integer",value:this.formatNumber(n)}]}},{key:"resolvedOptions",value:function(){return{locale:this.locale,style:this.style,numeric:this.numeric,numberingSystem:this.numberingSystem}}}]),e})();Es.supportedLocalesOf=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof e=="string")e=[e];else if(!Array.isArray(e))throw new TypeError('Invalid "locales" argument');return e.filter(function(n){return hM(n,t)})};Es.addLocale=pM;Es.addDefaultLocale=function(e){pM(e),dM(e.locale)};Es.setDefaultLocale=dM;Es.getDefaultLocale=fM;Es.PluralRules=Wy;var Hb='Invalid "unit" argument';function zH(e){if(Cl(e)==="symbol")throw new TypeError(Hb);if(typeof e!="string")throw new RangeError("".concat(Hb,": ").concat(e));if(e[e.length-1]==="s"&&(e=e.slice(0,e.length-1)),IH.indexOf(e)<0)throw new RangeError("".concat(Hb,": ").concat(e));return e}var PH='Invalid "number" argument';function $H(e){if(e=Number(e),Number.isFinite&&!Number.isFinite(e))throw new RangeError("".concat(PH,": ").concat(e));return e}function BH(e){return 1/e===-1/0}function FH(e){return e<0||e===0&&BH(e)}function _T(e){if(e.length<2)throw new TypeError('"unit" argument is required');return[$H(e[0]),zH(e[1])]}function ra(e){"@babel/helpers - typeof";return ra=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ra(e)}function UH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,GH(r.key),r)}}function HH(e,t,n){return t&&qH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function GH(e){var t=VH(e,"string");return ra(t)=="symbol"?t:t+""}function VH(e,t){if(ra(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ra(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var NT=(function(){function e(){UH(this,e),this.cache={}}return HH(e,[{key:"get",value:function(){for(var n=this.cache,r=arguments.length,s=new Array(r),a=0;a<r;a++)s[a]=arguments[a];for(var l=0,c=s;l<c.length;l++){var d=c[l];if(ra(n)!=="object")return;n=n[d]}return n}},{key:"put",value:function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];for(var a=r.pop(),l=r.pop(),c=this.cache,d=0,f=r;d<f.length;d++){var h=f[d];ra(c[h])!=="object"&&(c[h]={}),c=c[h]}return c[l]=a}}]),e})();function Ky(e){"@babel/helpers - typeof";return Ky=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ky(e)}function WH(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=KH(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
14
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KH(e,t){if(e){if(typeof e=="string")return AT(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?AT(e,t):void 0}}function AT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function YH(e,t){for(var n=WH(e),r;!(r=n()).done;){var s=r.value;if(t(s))return s;for(var a=s.split("-");a.length>1;)if(a.pop(),s=a.join("-"),t(s))return s}throw new Error("No locale data has been registered for any of the locales: ".concat(e.join(", ")))}function XH(){var e=(typeof Intl>"u"?"undefined":Ky(Intl))==="object";return e&&typeof Intl.DateTimeFormat=="function"}function Yy(e){"@babel/helpers - typeof";return Yy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yy(e)}function ZH(e){return JH(e)&&(Array.isArray(e.steps)||Array.isArray(e.gradation)||Array.isArray(e.flavour)||typeof e.flavour=="string"||Array.isArray(e.labels)||typeof e.labels=="string"||Array.isArray(e.units)||typeof e.custom=="function")}var QH={}.constructor;function JH(e){return Yy(e)!==void 0&&e!==null&&e.constructor===QH}var vs=60,Vp=60*vs,Qo=24*Vp,Xy=7*Qo,Zy=30.44*Qo,gM=146097/400*Qo;function pl(e){switch(e){case"second":return 1;case"minute":return vs;case"hour":return Vp;case"day":return Qo;case"week":return Xy;case"month":return Zy;case"year":return gM}}function bM(e){return e.factor!==void 0?e.factor:pl(e.unit||e.formatAs)||1}function wc(e){return e==="floor"?Math.floor:Math.round}function Zx(e){return e==="floor"?1:.5}function Qy(e){"@babel/helpers - typeof";return Qy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qy(e)}function yM(e,t){var n=t.prevStep,r=t.timestamp,s=t.now,a=t.future,l=t.round,c;return n&&(n.id||n.unit)&&(c=e["threshold_for_".concat(n.id||n.unit)]),c===void 0&&e.threshold!==void 0&&(c=e.threshold,typeof c=="function"&&(c=c(s,a))),c===void 0&&(c=e.minTime),Qy(c)==="object"&&(n&&n.id&&c[n.id]!==void 0?c=c[n.id]:c=c.default),typeof c=="function"&&(c=c(r,{future:a,getMinTimeForUnit:function(f,h){return OT(f,h||n&&n.formatAs,{round:l})}})),c===void 0&&e.test&&(e.test(r,{now:s,future:a})?c=0:c=9007199254740991),c===void 0&&(n?e.formatAs&&n.formatAs&&(c=OT(e.formatAs,n.formatAs,{round:l})):c=0),c===void 0&&console.warn("[javascript-time-ago] A step should specify `minTime`:\n"+JSON.stringify(e,null,2)),c}function OT(e,t,n){var r=n.round,s=pl(e),a=pl(t==="now"?e:t);if(s!==void 0&&a!==void 0)return s-a*(1-Zx(r))}function Ec(e){"@babel/helpers - typeof";return Ec=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ec(e)}function MT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function e7(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MT(Object(n),!0).forEach(function(r){t7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function t7(e,t,n){return(t=n7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n7(e){var t=r7(e,"string");return Ec(t)=="symbol"?t:t+""}function r7(e,t){if(Ec(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ec(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function i7(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.units;e=o7(e,l);var c=s7(e,t,{now:r,future:s,round:a});{if(c){var d=e[e.indexOf(c)-1],f=e[e.indexOf(c)+1];return[d,c,f]}return[void 0,void 0,e[0]]}}function s7(e,t,n){var r=n.now,s=n.future,a=n.round;if(e.length!==0){var l=vM(e,t,{now:r,future:s||t<0,round:a});if(l!==-1){var c=e[l];if(c.granularity){var d=wc(a)(Math.abs(t)/bM(c)/c.granularity)*c.granularity;if(d===0&&l>0)return e[l-1]}return c}}}function vM(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=yM(e[r],e7({prevStep:e[r-1],timestamp:n.now-t*1e3},n));return s===void 0||Math.abs(t)<s?r-1:r===e.length-1?r:vM(e,t,n,r+1)}function o7(e,t){return e.filter(function(n){var r=n.unit,s=n.formatAs;return r=r||s,r?t.indexOf(r)>=0:!0})}function a7(e,t,n){var r=n.now,s=n.round;if(pl(e)){var a=pl(e)*1e3,l=t>r,c=Math.abs(t-r),d=wc(s)(c/a)*a;return l?d>0?c-d+u7(s,a):c-d+1:-(c-d)+l7(s,a)}}function l7(e,t){return Zx(e)*t}function u7(e,t){return(1-Zx(e))*t+1}var c7=365*24*60*60*1e3,xM=1e3*c7;function f7(e,t,n){var r=n.prevStep,s=n.nextStep,a=n.now,l=n.future,c=n.round,d=e.getTime?e.getTime():e,f=function(k){return a7(k,d,{now:a,round:c})},h=p7(l?t:s,d,{future:l,now:a,round:c,prevStep:l?r:t});if(h!==void 0){var m;if(t&&(t.getTimeToNextUpdate&&(m=t.getTimeToNextUpdate(d,{getTimeToNextUpdateForUnit:f,getRoundFunction:wc,now:a,future:l,round:c})),m===void 0)){var b=t.unit||t.formatAs;b&&(m=f(b))}return m===void 0?h:Math.min(m,h)}}function d7(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.prevStep,c=yM(e,{timestamp:t,now:r,future:s,round:a,prevStep:l});if(c!==void 0)return s?t-c*1e3+1:c===0&&t===r?xM:t+c*1e3}function p7(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.prevStep;if(e){var c=d7(e,t,{now:r,future:s,round:a,prevStep:l});return c===void 0?void 0:c-r}else return s?t-r+1:xM}var kM={};function ll(e){return kM[e]}function SM(e){if(!e)throw new Error("[javascript-time-ago] No locale data passed.");kM[e.locale]=e}const h7=[{formatAs:"now"},{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"}],Jy={steps:h7,labels:"long"};function Tc(e){"@babel/helpers - typeof";return Tc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tc(e)}function IT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function DT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?IT(Object(n),!0).forEach(function(r){m7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function m7(e,t,n){return(t=g7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g7(e){var t=b7(e,"string");return Tc(t)=="symbol"?t:t+""}function b7(e,t){if(Tc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const ev=DT(DT({},Jy),{},{steps:Jy.steps.filter(function(e){return e.formatAs!=="second"})}),wM=[{factor:1,unit:"now"},{threshold:1,threshold_for_now:45.5,factor:1,unit:"second"},{threshold:45.5,factor:vs,unit:"minute"},{threshold:2.5*vs,granularity:5,factor:vs,unit:"minute"},{threshold:22.5*vs,factor:.5*Vp,unit:"half-hour"},{threshold:42.5*vs,threshold_for_minute:52.5*vs,factor:Vp,unit:"hour"},{threshold:20.5/24*Qo,factor:Qo,unit:"day"},{threshold:5.5*Qo,factor:Xy,unit:"week"},{threshold:3.5*Xy,factor:Zy,unit:"month"},{threshold:10.5*Zy,factor:gM,unit:"year"}],LT={gradation:wM,flavour:"long",units:["now","minute","hour","day","week","month","year"]},y7={gradation:wM,flavour:"long-time",units:["now","minute","hour","day","week","month","year"]};function EM(e){return e instanceof Date?e:new Date(e)}var tv=[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"}],Li={},v7={minTime:function(t,n){n.future;var r=n.getMinTimeForUnit;return r("day")},format:function(t,n){return Li[n]||(Li[n]={}),Li[n].dayMonth||(Li[n].dayMonth=new Intl.DateTimeFormat(n,{month:"short",day:"numeric"})),Li[n].dayMonth.format(EM(t))}},x7={minTime:function(t,n){var r=n.future;if(r){var s=new Date(new Date(t).getFullYear(),0).getTime()-1;return(t-s)/1e3}else{var a=new Date(new Date(t).getFullYear()+1,0).getTime();return(a-t)/1e3}},format:function(t,n){return Li[n]||(Li[n]={}),Li[n].dayMonthYear||(Li[n].dayMonthYear=new Intl.DateTimeFormat(n,{year:"numeric",month:"short",day:"numeric"})),Li[n].dayMonthYear.format(EM(t))}};XH()?tv.push(v7,x7):tv.push({formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"});const ia={steps:tv,labels:["mini","short-time","narrow","short"]};function Rc(e){"@babel/helpers - typeof";return Rc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rc(e)}function jT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function zT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jT(Object(n),!0).forEach(function(r){k7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function k7(e,t,n){return(t=S7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S7(e){var t=w7(e,"string");return Rc(t)=="symbol"?t:t+""}function w7(e,t){if(Rc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const E7=zT(zT({},ia),{},{steps:[{formatAs:"now"}].concat(ia.steps)});function Cc(e){"@babel/helpers - typeof";return Cc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cc(e)}function PT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function $T(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PT(Object(n),!0).forEach(function(r){T7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function T7(e,t,n){return(t=R7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R7(e){var t=C7(e,"string");return Cc(t)=="symbol"?t:t+""}function C7(e,t){if(Cc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const nv=$T($T({},ia),{},{steps:ia.steps.filter(function(e){return e.formatAs!=="second"})});function _c(e){"@babel/helpers - typeof";return _c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_c(e)}function BT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function FT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BT(Object(n),!0).forEach(function(r){_7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _7(e,t,n){return(t=N7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N7(e){var t=A7(e,"string");return _c(t)=="symbol"?t:t+""}function A7(e,t){if(_c(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_c(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const O7=FT(FT({},nv),{},{steps:[{formatAs:"now"}].concat(nv.steps)});function Nc(e){"@babel/helpers - typeof";return Nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nc(e)}function UT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Hd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UT(Object(n),!0).forEach(function(r){M7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function M7(e,t,n){return(t=I7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I7(e){var t=D7(e,"string");return Nc(t)=="symbol"?t:t+""}function D7(e,t){if(Nc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const L7=Hd(Hd({},ia),{},{steps:ia.steps.filter(function(e){return e.formatAs!=="second"}).map(function(e){return e.formatAs==="minute"?Hd(Hd({},e),{},{minTime:vs}):e})}),Ac={steps:[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"month"},{formatAs:"year"}],labels:["mini","short-time","narrow","short"]};function Oc(e){"@babel/helpers - typeof";return Oc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oc(e)}function qT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function HT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qT(Object(n),!0).forEach(function(r){j7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function j7(e,t,n){return(t=z7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z7(e){var t=P7(e,"string");return Oc(t)=="symbol"?t:t+""}function P7(e,t){if(Oc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Oc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const $7=HT(HT({},Ac),{},{steps:[{formatAs:"now"}].concat(Ac.steps)});function Mc(e){"@babel/helpers - typeof";return Mc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mc(e)}function GT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function VT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GT(Object(n),!0).forEach(function(r){B7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function B7(e,t,n){return(t=F7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F7(e){var t=U7(e,"string");return Mc(t)=="symbol"?t:t+""}function U7(e,t){if(Mc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const rv=VT(VT({},Ac),{},{steps:Ac.steps.filter(function(e){return e.formatAs!=="second"})});function Ic(e){"@babel/helpers - typeof";return Ic=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ic(e)}function WT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function KT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WT(Object(n),!0).forEach(function(r){q7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function q7(e,t,n){return(t=H7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H7(e){var t=G7(e,"string");return Ic(t)=="symbol"?t:t+""}function G7(e,t){if(Ic(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ic(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const V7=KT(KT({},rv),{},{steps:[{formatAs:"now"}].concat(rv.steps)});function W7(e){switch(e){case"default":case"round":return Jy;case"round-minute":return ev;case"approximate":return LT;case"time":case"approximate-time":return y7;case"mini":return Ac;case"mini-now":return $7;case"mini-minute":return rv;case"mini-minute-now":return V7;case"twitter":return ia;case"twitter-now":return E7;case"twitter-minute":return nv;case"twitter-minute-now":return O7;case"twitter-first-minute":return L7;default:return LT}}function sa(e){"@babel/helpers - typeof";return sa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sa(e)}function K7(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=TM(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
15
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Y7(e,t){return Q7(e)||Z7(e,t)||TM(e,t)||X7()}function X7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
16
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TM(e,t){if(e){if(typeof e=="string")return YT(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?YT(e,t):void 0}}function YT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Z7(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,l,c=[],d=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(d=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(h){f=!0,s=h}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw s}}return c}}function Q7(e){if(Array.isArray(e))return e}function J7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nG(r.key),r)}}function tG(e,t,n){return t&&eG(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function nG(e){var t=rG(e,"string");return sa(t)=="symbol"?t:t+""}function rG(e,t){if(sa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(sa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Or=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.polyfill;J7(this,e),typeof t=="string"&&(t=[t]),this.locale=YH(t.concat(e.getDefaultLocale()),ll),typeof Intl<"u"&&Intl.NumberFormat&&(this.numberFormat=new Intl.NumberFormat(this.locale)),r===!1?(this.IntlRelativeTimeFormat=Intl.RelativeTimeFormat,this.IntlPluralRules=Intl.PluralRules):(this.IntlRelativeTimeFormat=Es,this.IntlPluralRules=Es.PluralRules),this.relativeTimeFormatCache=new NT,this.pluralRulesCache=new NT}return tG(e,[{key:"format",value:function(n,r,s){var a=this;s||(r&&!lG(r)?(s=r,r=void 0):s={}),r||(r=ev),typeof r=="string"&&(r=W7(r));var l=iG(n),c=this.getLabels(r.flavour||r.labels),d=c.labels,f=c.labelsType,h=s.round||r.round,m,b=Date.now();r.now!==void 0&&(m=r.now),m===void 0&&s.now!==void 0&&(m=s.now),m===void 0&&(m=b);var y=function(N){var A=N.now,$=(A-l)/1e3,z=s.future||$<0,I=aG(d,ll(a.locale).now,ll(a.locale).long,z);if(r.custom){var Y=r.custom({now:A,date:new Date(l),time:l,elapsed:$,locale:a.locale});if(Y!==void 0)return{getText:function(){return Y},getTextRefreshDelay:function(){throw new Error('`getTimeToNextUpdate: true` feature is not supported by legacy "styles" that have a `custom` function')}}}var H=oG(r.units,d,I),q=i7(r.gradation||r.steps||ev.steps,$,{now:A,units:H,round:h,future:z}),L=Y7(q,3),F=L[0],U=L[1],W=L[2],B=function(){return a.formatDateForStep(l,U,$,{labels:d,labelsType:f,nowLabel:I,now:A,future:z,round:h})||""},K=function(){var P=f7(l,U,{nextStep:W,prevStep:F,now:A,future:z,round:h});if(typeof P=="number")return s.getTimeToNextUpdateUncapped?P:CM(P)};return{getText:B,getTextRefreshDelay:K}},k=y({now:m}),S=k.getText,R=k.getTextRefreshDelay;if(s.getTimeToNextUpdate)return[S(),R()];if(s.refresh){var T=6e4,E,C=function D(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:T;E=uG(function(){var A=y({now:m+(Date.now()-b)}),$=A.getText,z=A.getTextRefreshDelay;s.refresh($()),D(z())},N)};C(R());var _=function(){clearTimeout(E)};return[S(),_]}return S()}},{key:"formatDateForStep",value:function(n,r,s,a){var l=this,c=a.labels,d=a.labelsType,f=a.nowLabel,h=a.now,m=a.future,b=a.round;if(r){if(r.format)return r.format(n,this.locale,{formatAs:function(T,E){return l.formatValue(E,T,{labels:c,future:m})},now:h,future:m});var y=r.unit||r.formatAs;if(!y)throw new Error("[javascript-time-ago] Each step must define either `formatAs` or `format()`. Step: ".concat(JSON.stringify(r)));if(y==="now")return f;var k=Math.abs(s)/bM(r);r.granularity&&(k=wc(b)(k/r.granularity)*r.granularity);var S=-1*Math.sign(s)*wc(b)(k);switch(S===0&&(m?S=0:S=-0),d){case"long":case"short":case"narrow":return this.getFormatter(d).format(S,y);default:return this.formatValue(S,y,{labels:c,future:m})}}}},{key:"formatValue",value:function(n,r,s){var a=s.labels,l=s.future;return this.getFormattingRule(a,r,n,{future:l}).replace("{0}",this.formatNumber(Math.abs(n)))}},{key:"getFormattingRule",value:function(n,r,s,a){var l=a.future;if(this.locale,n=n[r],typeof n=="string")return n;var c=s===0?l?"future":"past":s<0?"past":"future",d=n[c]||n;if(typeof d=="string")return d;var f=this.getPluralRules().select(Math.abs(s));return d[f]||d.other}},{key:"formatNumber",value:function(n){return this.numberFormat?this.numberFormat.format(n):String(n)}},{key:"getFormatter",value:function(n){return this.relativeTimeFormatCache.get(this.locale,n)||this.relativeTimeFormatCache.put(this.locale,n,new this.IntlRelativeTimeFormat(this.locale,{style:n}))}},{key:"getPluralRules",value:function(){return this.pluralRulesCache.get(this.locale)||this.pluralRulesCache.put(this.locale,new this.IntlPluralRules(this.locale))}},{key:"getLabels",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];typeof n=="string"&&(n=[n]),n=n.map(function(c){switch(c){case"tiny":case"mini-time":return"mini";default:return c}}),n=n.concat("long");for(var r=ll(this.locale),s=K7(n),a;!(a=s()).done;){var l=a.value;if(r[l])return{labelsType:l,labels:r[l]}}}}]),e})(),RM="en";Or.getDefaultLocale=function(){return RM};Or.setDefaultLocale=function(e){iv=!0,RM=e};Or.addDefaultLocale=function(e){iv&&Or.getDefaultLocale()!==e.locale&&console.warn(`[javascript-time-ago] You're adding "`.concat(e.locale,'" as the default locale but you have already added "').concat(Or.getDefaultLocale(),'" as the default locale. "').concat(e.locale,'" is the default locale now.')),iv=!0,Or.addLocale(e),Or.setDefaultLocale(e.locale)};var iv=!1;Or.addLocale=function(e){SM(e),Es.addLocale(e)};Or.locale=Or.addLocale;Or.addLabels=function(e,t,n){var r=ll(e);r||(SM({locale:e}),r=ll(e)),r[t]=n};function iG(e){if(e.constructor===Date||sG(e))return e.getTime();if(typeof e=="number")return e;throw new Error("Unsupported relative time formatter input: ".concat(sa(e),", ").concat(e))}function sG(e){return sa(e)==="object"&&typeof e.getTime=="function"}function oG(e,t,n){var r=Object.keys(t);return n&&r.push("now"),e&&(r=e.filter(function(s){return s==="now"||r.indexOf(s)>=0})),r}function aG(e,t,n,r){var s=e.now||t&&t.now;if(s)return typeof s=="string"?s:r?s.future:s.past;if(n&&n.second&&n.second.current)return n.second.current}function lG(e){return typeof e=="string"||ZH(e)}function uG(e,t){return setTimeout(e,CM(t))}function CM(e){return Math.min(e,cG)}var cG=2147483647;const _M={locale:"en",long:{year:{previous:"last year",current:"this year",next:"next year",past:{one:"{0} year ago",other:"{0} years ago"},future:{one:"in {0} year",other:"in {0} years"}},quarter:{previous:"last quarter",current:"this quarter",next:"next quarter",past:{one:"{0} quarter ago",other:"{0} quarters ago"},future:{one:"in {0} quarter",other:"in {0} quarters"}},month:{previous:"last month",current:"this month",next:"next month",past:{one:"{0} month ago",other:"{0} months ago"},future:{one:"in {0} month",other:"in {0} months"}},week:{previous:"last week",current:"this week",next:"next week",past:{one:"{0} week ago",other:"{0} weeks ago"},future:{one:"in {0} week",other:"in {0} weeks"}},day:{previous:"yesterday",current:"today",next:"tomorrow",past:{one:"{0} day ago",other:"{0} days ago"},future:{one:"in {0} day",other:"in {0} days"}},hour:{current:"this hour",past:{one:"{0} hour ago",other:"{0} hours ago"},future:{one:"in {0} hour",other:"in {0} hours"}},minute:{current:"this minute",past:{one:"{0} minute ago",other:"{0} minutes ago"},future:{one:"in {0} minute",other:"in {0} minutes"}},second:{current:"now",past:{one:"{0} second ago",other:"{0} seconds ago"},future:{one:"in {0} second",other:"in {0} seconds"}}},short:{year:{previous:"last yr.",current:"this yr.",next:"next yr.",past:"{0} yr. ago",future:"in {0} yr."},quarter:{previous:"last qtr.",current:"this qtr.",next:"next qtr.",past:{one:"{0} qtr. ago",other:"{0} qtrs. ago"},future:{one:"in {0} qtr.",other:"in {0} qtrs."}},month:{previous:"last mo.",current:"this mo.",next:"next mo.",past:"{0} mo. ago",future:"in {0} mo."},week:{previous:"last wk.",current:"this wk.",next:"next wk.",past:"{0} wk. ago",future:"in {0} wk."},day:{previous:"yesterday",current:"today",next:"tomorrow",past:{one:"{0} day ago",other:"{0} days ago"},future:{one:"in {0} day",other:"in {0} days"}},hour:{current:"this hour",past:"{0} hr. ago",future:"in {0} hr."},minute:{current:"this minute",past:"{0} min. ago",future:"in {0} min."},second:{current:"now",past:"{0} sec. ago",future:"in {0} sec."}},narrow:{year:{previous:"last yr.",current:"this yr.",next:"next yr.",past:"{0}y ago",future:"in {0}y"},quarter:{previous:"last qtr.",current:"this qtr.",next:"next qtr.",past:"{0}q ago",future:"in {0}q"},month:{previous:"last mo.",current:"this mo.",next:"next mo.",past:"{0}mo ago",future:"in {0}mo"},week:{previous:"last wk.",current:"this wk.",next:"next wk.",past:"{0}w ago",future:"in {0}w"},day:{previous:"yesterday",current:"today",next:"tomorrow",past:"{0}d ago",future:"in {0}d"},hour:{current:"this hour",past:"{0}h ago",future:"in {0}h"},minute:{current:"this minute",past:"{0}m ago",future:"in {0}m"},second:{current:"now",past:"{0}s ago",future:"in {0}s"}},now:{now:{current:"now",future:"in a moment",past:"just now"}},mini:{year:"{0}yr",month:"{0}mo",week:"{0}wk",day:"{0}d",hour:"{0}h",minute:"{0}m",second:"{0}s",now:"now"},"short-time":{year:"{0} yr.",month:"{0} mo.",week:"{0} wk.",day:{one:"{0} day",other:"{0} days"},hour:"{0} hr.",minute:"{0} min.",second:"{0} sec."},"long-time":{year:{one:"{0} year",other:"{0} years"},month:{one:"{0} month",other:"{0} months"},week:{one:"{0} week",other:"{0} weeks"},day:{one:"{0} day",other:"{0} days"},hour:{one:"{0} hour",other:"{0} hours"},minute:{one:"{0} minute",other:"{0} minutes"},second:{one:"{0} second",other:"{0} seconds"}}};Or.addLocale(_M);Or.addDefaultLocale(_M);const fG=new Or("en-US");function Hn(e,t){let n=typeof e=="string"?e:JSON.stringify(e);return n===void 0&&(n=""),n.length>t?`${n.slice(0,t-1)}…`:n}function Kr(e,t){const n=String(e??"").replace(/\s+/g," ").trim();return n.length>t?`${n.slice(0,t-1)}…`:n}function dG(e,t){const n=String(e??"").replace(/\s+/g," ").trim();if(n.length<=t)return n;const r=t-1,s=Math.max(1,Math.floor(r*.35)),a=Math.max(1,r-s);return`${n.slice(0,s)}…${n.slice(n.length-a)}`}function hl(e){if(!e)return null;const t=Date.parse(e);return Number.isNaN(t)?null:t}function Ei(e){return e==null||!Number.isFinite(e)?"—":gH(e)}function Qx(e){const t=Math.ceil(e/1e3);if(e<1e3)return"1s";if(t<60)return`${t}s`;if(t>=3600){const s=Math.floor(t/3600),a=Math.floor(t%3600/60);return a>0?`${s}h ${a}m`:`${s}h`}const n=Math.floor(t/60),r=t%60;return r>0?`${n}m ${r}s`:`${n}m`}const pG=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3,hour12:!1});function XT(e){return e==null||!Number.isFinite(e)?"—":pG.format(e)}function sv(e,t=Date.now()){const n=hl(e);return n===null?null:fG.format(Math.min(n,t),"mini",{now:t})}function mo(e,t=8e3){if(e==null)return"";let n;try{n=typeof e=="string"?e:JSON.stringify(e,null,2)}catch{n=String(e)}return n.length>t?`${n.slice(0,t-1)}…`:n}const hG=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1});function Wp(e){return e==null||!Number.isFinite(e)?"0":hG.format(e)}function Jx(e){return e==null||!Number.isFinite(e)?"—":e===0?"$0.00":e>=.1?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`}function ov(e){const t=String(e||"").trim();if(!t)return[];if(t.charAt(0)==="[")try{const r=JSON.parse(t);return Array.isArray(r)?r:[]}catch{return[]}const n=[];for(const r of t.split(/\n/)){const s=r.trim();if(s)try{n.push(JSON.parse(s))}catch{}}return n}function NM(e){try{const t=new URL(e),n=t.pathname.split("/").filter(Boolean);return t.hostname==="github.com"&&n.length>=4&&n[2]==="pull"||t.hostname==="review.cursor.com"&&n[0]==="pr"?!0:(/^origin(-[a-z0-9]+)?\.cursor\.com$/i.test(t.hostname)||t.hostname==="localhost")&&n.length>=4&&n[2]==="github"}catch{return!1}}function mG(e){return typeof e=="string"?e:e&&typeof e=="object"&&typeof e.id=="string"?e.id:e?JSON.stringify(e):""}function AM(e){return e!=="http"}const gG=new Set(["chat","trace","raw","artifacts"]);function bG(e){if(!e.seeded||!e.embedded)return{action:"none"};const n=e.sessions.filter(s=>!e.knownIds.has(s.sessionId)&&AM(s.channelId)&&s.running===!0)[0];return n===void 0?{action:"none"}:e.currentSessionId===null&&gG.has(e.view)?{action:"select",sessionId:n.sessionId}:{action:"reveal",sessionId:n.sessionId}}function yG(e){return e.filter(t=>AM(t.channelId)&&t.running===!0).length}const vG=new Set(["github","slack"]);function xG(e){return/^\s*\//.test(e)}function Fh(e){const t=[];for(const n of e??[])if(n.id!=="http"&&!(n.kind!==void 0&&vG.has(n.kind)))for(const r of n.routes??[]){const s=TG(n.id,r.path);if(s===null)continue;const a={name:s,channelId:n.id,method:r.method.toUpperCase(),url:r.url,path:r.path};r.description!==void 0&&(a.description=r.description),r.bodySchema!==void 0&&(a.bodySchema=r.bodySchema),r.querySchema!==void 0&&(a.querySchema=r.querySchema),t.push(a)}return t.sort((n,r)=>{const s=n.name.localeCompare(r.name);return s!==0?s:Kp(n.method)-Kp(r.method)}),t}function OM(e){const t=new Set,n=[];for(const r of e)t.has(r.name)||(t.add(r.name),n.push(r.name));return n}function kG(e,t){const n=e.trim().toLowerCase();if(!n.startsWith("/"))return[];const r=new Set,s=[];for(const a of t)a.name.toLowerCase().startsWith(n)&&(r.has(a.name)||(r.add(a.name),s.push(a)));return s}function SG(e){if(e.length===0)return"No channel slash commands on this agent. Send a normal message to chat on http.";const t=["Channel slash commands (from `/v1/info` routes):",""],n=new Map;for(const r of e){const s=n.get(r.name)??[];s.push(r),n.set(r.name,s)}for(const[r,s]of n){const a=s.map(f=>f.method).join("|"),l=s.find(f=>f.description)?.description??"",c=ek(s[0]),d=MM(c);t.push(d?`- \`${r}\` (${a}) — ${l}${l?" ":""}${d}`:`- \`${r}\` (${a})${l?` — ${l}`:""}`)}return t.push("","Args: JSON object, `key=value` flags, or a positional value for the first required string field."),t.join(`
|
|
17
|
+
`)}function wG(e,t){const n=e.trim(),r=/^(\/[^\s]+)(?:\s+([\s\S]*))?$/.exec(n);if(r===null)return{ok:!1,error:"Expected `/command` optionally followed by args."};const s=r[1],a=(r[2]??"").trim(),l=t.filter(m=>m.name===s);if(l.length===0){const m=OM(t);return{ok:!1,error:m.length===0?`Unknown command \`${s}\`. No channel commands on this agent.`:`Unknown command \`${s}\`. Try ${m.map(b=>`\`${b}\``).join(", ")} or \`/help\`.`,commandName:s}}const c=EG(l,a),d=ek(c),f=_G(a,d);if(!f.ok)return{ok:!1,error:f.error,commandName:s};const h=RG(d,f.value);return h.length>0?{ok:!1,error:`Missing required field${h.length>1?"s":""}: ${h.join(", ")}. ${MM(d)||""}`.trim(),commandName:s}:c.method==="GET"||c.method==="HEAD"?{ok:!0,command:c,query:OG(f.value)}:{ok:!0,command:c,body:f.value,query:c.querySchema!==void 0?MG(f.value,c.querySchema):void 0}}function EG(e,t){if(e.length===1)return e[0];const n=[...e].sort((a,l)=>Kp(a.method)-Kp(l.method)),r=IM(t);if(r!==null){let a=null,l=-1;for(const c of n){const d=ek(c),f=CG(d,r);f>l&&(l=f,a=c)}if(a!==null&&l>0)return a}const s=n.find(a=>a.method==="GET");return s!==void 0?s:n[0]}function TG(e,t){const n=e.trim();if(n==="")return null;const r=t===""||t==="/"?"":t.startsWith("/")?t.replace(/\/+$/,""):`/${t.replace(/\/+$/,"")}`;return r.includes(":")?null:`/${n}${r}`}function Kp(e){switch(e.toUpperCase()){case"GET":return 0;case"POST":return 1;case"PUT":return 2;case"PATCH":return 3;case"DELETE":return 4;default:return 9}}function ek(e){return e.method==="GET"||e.method==="HEAD"?e.querySchema:e.bodySchema??e.querySchema}function MM(e){if(e===void 0)return"";const t=Uh(e);if(t===void 0)return"";const n=qh(e),r=[];for(const s of n)t[s]?.type==="string"?r.push(`<${s}>`):r.push(`${s}=…`);for(const s of Object.keys(t))n.has(s)||r.push(`[${s}=…]`);return r.length>0?`Usage: ${r.join(" ")}`:""}function Uh(e){if(e===void 0||e.type!=="object")return;const t=e.properties;if(!(typeof t!="object"||t===null||Array.isArray(t)))return t}function qh(e){return e===void 0||!Array.isArray(e.required)?new Set:new Set(e.required.filter(t=>typeof t=="string"))}function RG(e,t){const n=qh(e),r=[];for(const s of n){const a=t[s];(a==null||typeof a=="string"&&a.trim()==="")&&r.push(s)}return r}function CG(e,t){const n=Uh(e);if(n===void 0)return 0;let r=0;for(const s of Object.keys(t))s in n?r+=2:r-=1;for(const s of qh(e))s in t&&(r+=3);return r}function IM(e){const t=e.trim();if(!t.startsWith("{"))return null;try{const n=JSON.parse(t);if(typeof n=="object"&&n!==null&&!Array.isArray(n))return n}catch{return null}return null}function _G(e,t){if(e==="")return{ok:!0,value:{}};const n=IM(e);if(n!==null)return{ok:!0,value:n};if(e.startsWith("{"))return{ok:!1,error:"Args look like JSON but failed to parse."};const r=Uh(t),s={},a=[];for(const l of NG(e)){const c=l.indexOf("=");if(c>0){const d=l.slice(0,c),f=l.slice(c+1);s[d]=AG(f,r?.[d])}else a.push(l)}if(a.length>0){const l=[...qh(t)],c=(l.length>0?l:Object.keys(r??{})).filter(f=>{const h=r?.[f];return h===void 0||h.type==="string"||h.type===void 0}),d=c.find(f=>s[f]===void 0)??c[0];if(d===void 0)return{ok:!1,error:`Unexpected positional args: ${a.join(" ")}`};a.length===1?s[d]=a[0]:s[d]=a.join(" ")}return{ok:!0,value:s}}function NG(e){const t=[];let n="",r=null;for(let s=0;s<e.length;s++){const a=e[s];if(r!==null){a===r?r=null:n+=a;continue}if(a==='"'||a==="'"){r=a;continue}if(/\s/.test(a)){n!==""&&(t.push(n),n="");continue}n+=a}return n!==""&&t.push(n),t}function AG(e,t){const n=t?.type;if(n==="number"||n==="integer"){const r=Number(e);return Number.isFinite(r)?r:e}if(n==="boolean"){if(e==="true")return!0;if(e==="false")return!1}if(n==="array"||n==="object")try{return JSON.parse(e)}catch{return e}return e}function OG(e){const t={};for(const[n,r]of Object.entries(e))r!=null&&(t[n]=typeof r=="string"?r:String(r));return t}function MG(e,t){const n=Uh(t);if(n===void 0)return;const r={};for(const s of Object.keys(n)){const a=e[s];a!=null&&(r[s]=typeof a=="string"?a:String(a))}return Object.keys(r).length>0?r:void 0}const IG=new Set(["actions.requested","action.result","action.approval_requested","action.approval_resolved","action.auth_requested","action.auth_resolved","subagent.called","subagent.completed","artifact.tagged"]),DG=new Set(["message.received","turn.started","message.completed","reasoning.appended","reasoning.completed","actions.requested","action.approval_requested","action.approval_resolved","action.auth_requested","action.auth_resolved","action.result","subagent.called","subagent.completed","artifact.tagged","turn.completed","turn.failed","agent.bound","session.failed"]);function DM(){const e=window.location.pathname,t=e.replace(/\/playground\/?$/,"");return t===e?"":t}function LG(){const e=U8()!==null,t=e?sM():"";return{meta:{name:"agent",dev:!1,basePath:DM()},info:null,health:"unknown",sessions:[],current:null,localTrace:!1,view:"overview",running:!1,turnStartedAt:null,queued:[],composerDraft:null,authToken:"",aliasToken:t,aliasHosted:e,embedded:e&&q8(),transcript:[],traceEvents:[],sessionCostUsd:null,barTitle:"No session",barId:"",externalUrl:null,drawerOpen:!1,overviewSection:"home",overviewRunId:null,surfaceFocusNonce:0,chatPanelOpen:!0,toast:null,evalCases:[],evalConfig:null,evalRun:null,evalRuns:[],evalNavReturn:!1}}const Yo=z8(()=>LG());class jG{constructor(){this.api=new G8(DM(),()=>this.state.authToken,()=>this.state.aliasToken),this.items=[],this.itemIndex=new Map,this.toolIds=new Set,this.assistantId=null,this.reasoningId=null,this.nestedAssistantIds=new Map,this.nestedReasoningIds=new Map,this.idSeq=0,this.streamAbort=null,this.snapshotOpen=!1,this.snapshotToken=0,this.lastIndex=-1,this.toastTimer=null,this.evalPollTimer=null,this.evalRestoreGeneration=0,this.evalPollGeneration=0,this.evalRestoreInFlight=null,this.booted=!1,this.pendingSessionDeepLink=null,this.aliasStreamInterrupted=!1,this.discardTurnBody=!1,this.activeTurnId=null,this.activeTurnStartedAt=null,this.flushingQueue=!1,this.queueHeld=!1,this.knownSessionIds=new Set,this.sessionsSeeded=!1,this.subscribe=Yo.subscribe,this.getState=()=>Yo.getState()}get historyOnly(){return this.state.meta.readonly===!0}get state(){return Yo.getState()}set(t){Yo.setState(t)}commitTranscript(){this.set({transcript:this.items.slice()})}toast(t){this.set({toast:t}),this.toastTimer&&clearTimeout(this.toastTimer),this.toastTimer=setTimeout(()=>this.set({toast:null}),4e3)}setAuthToken(t){this.set({authToken:t})}async signInWithAliasToken(t){const n=t.trim();if(n==="")return{ok:!1,error:"Enter the deployment's alias token."};this.set({aliasToken:n});const r=await this.api.health();return!r.ok&&r.status===404?(this.set({aliasToken:""}),{ok:!1,error:"That token was not accepted. Check it and try again."}):(this.aliasStreamInterrupted=!1,this.booted=!1,await this.boot(),{ok:!0})}acceptAliasTokenHandoff(t){if(this.set({aliasToken:t}),!this.booted){this.boot();return}if(!this.aliasStreamInterrupted)return;this.aliasStreamInterrupted=!1;const n=this.state.current;n!==null&&this.streamAbort===null&&this.startStream(n.sessionId,this.lastIndex+1)}noteAliasAuthLoss(t){return!this.state.aliasHosted||t!==401&&t!==404||this.state.aliasToken.trim()===""?!1:(this.aliasStreamInterrupted=this.streamAbort!==null,this.stopStream(),this.set({aliasToken:""}),!0)}setDrawerOpen(t){this.set({drawerOpen:t})}setOverviewSection(t,n=null){this.set({overviewSection:t,overviewRunId:n}),this.setView("overview")}focusAgentSurface(){this.setOverviewSection("home"),this.set({drawerOpen:!1,surfaceFocusNonce:this.state.surfaceFocusNonce+1})}setChatPanelOpen(t){this.set({chatPanelOpen:t})}nextId(t){return this.idSeq+=1,`${t}-${this.idSeq}`}push(t){this.itemIndex.set(t.id,this.items.length),this.items.push(t)}update(t,n){const r=this.itemIndex.get(t);r!==void 0&&(this.items[r]={...this.items[r],...n})}resetTranscript(){this.items=[],this.itemIndex.clear(),this.toolIds.clear(),this.assistantId=null,this.reasoningId=null,this.nestedAssistantIds.clear(),this.nestedReasoningIds.clear(),this.discardTurnBody=!1,this.activeTurnId=null,this.activeTurnStartedAt=null,this.queueHeld=!1}subagentToolCallId(t){return`sub:${t}`}ensureSubagentTool(t,n){const r=this.subagentToolCallId(t),s=this.itemIndex.has(this.toolItemId(r));return this.upsertTool(r,s?"":"subagent:task",null,n)}getToolItem(t){const n=this.itemIndex.get(t);if(n===void 0)return null;const r=this.items[n];return r?.kind==="tool"?r:null}updateSubagentChildren(t,n,r=null){const s=this.ensureSubagentTool(t,r),a=this.getToolItem(s);if(a===null)return;const l=n([...a.children??[]]);this.update(s,{children:l})}upsertNestedTool(t,n,r,s,a){this.updateSubagentChildren(t,l=>{const c=l.findIndex(d=>d.kind==="tool"&&d.callId===n);if(c>=0){const d=l[c];if(d?.kind!=="tool")return l;const f=l.slice();return f[c]={...d,name:r||d.name,args:s??d.args},f}return l.push({kind:"tool",id:this.nextId("nested-tool"),callId:n,name:r,args:s??null,status:"running",output:null,startedAt:a??Date.now(),endedAt:null}),l},a)}finishNestedTool(t,n,r,s,a,l){this.updateSubagentChildren(t,c=>{const d=c.findIndex(b=>b.kind==="tool"&&b.callId===n),f=s==null?"(no output)":Hn(s,4e3);if(d<0)return c.push({kind:"tool",id:this.nextId("nested-tool"),callId:n,name:r,args:null,status:a?"error":"done",output:f,outputRaw:s,startedAt:l??Date.now(),endedAt:l??Date.now()}),c;const h=c[d];if(h?.kind!=="tool")return c;const m=c.slice();return m[d]={...h,name:r||h.name,status:a?"error":"done",output:f,outputRaw:s,endedAt:l??Date.now()},m},l)}ensureNestedAssistant(t){const n=this.nestedAssistantIds.get(t);if(n)return n;const r=this.nextId("nested-asst");return this.nestedAssistantIds.set(t,r),this.updateSubagentChildren(t,s=>(s.push({kind:"assistant",id:r,text:"",streaming:!0}),s)),r}ensureNestedReasoning(t){const n=this.nestedReasoningIds.get(t);if(n)return n;const r=this.nextId("nested-think");return this.nestedReasoningIds.set(t,r),this.updateSubagentChildren(t,s=>(s.push({kind:"reasoning",id:r,text:"",open:!0}),s)),r}updateNestedChild(t,n,r){this.updateSubagentChildren(t,s=>{const a=s.findIndex(d=>d.id===n);if(a<0)return s;const l=s[a];if(l===void 0)return s;const c=s.slice();return c[a]={...l,...r},c})}pushUser(t){this.assistantId=null,this.reasoningId=null,this.push({kind:"user",id:this.nextId("user"),text:String(t??"")})}pushDivider(t,n=!1,r){this.push({kind:"divider",id:this.nextId("div"),text:t,fail:n,url:r})}ensureAssistant(){if(this.assistantId)return this.assistantId;const t=this.nextId("asst");return this.push({kind:"assistant",id:t,text:"",streaming:!0}),this.assistantId=t,t}ensureReasoning(){if(this.reasoningId)return this.reasoningId;const t=this.nextId("think");return this.push({kind:"reasoning",id:t,text:"",open:!0}),this.reasoningId=t,t}toolItemId(t){return`tool:${t}`}upsertTool(t,n,r,s){const a=this.toolItemId(t);if(this.itemIndex.has(a)){const l={};if(n&&(l.name=n),r!=null&&(l.args=r),s!==null){const c=this.getToolItem(a);c!==null&&c.startedAt===null&&(l.startedAt=s)}return Object.keys(l).length>0&&this.update(a,l),a}return this.push({kind:"tool",id:a,callId:t,name:n,args:r??null,status:"running",output:null,startedAt:s??Date.now(),endedAt:null}),this.toolIds.add(a),a}markAwaiting(t,n,r){const s=this.upsertTool(t,n,r,Date.now());this.update(s,{status:"awaiting",gate:"approval",output:"Parked for human approval. Approve or deny to continue the turn."})}markAwaitingAuth(t,n,r,s){const a=this.upsertTool(t,n,null,Date.now());this.update(a,{status:"awaiting",gate:"auth",connection:r,authUrl:s,output:`Waiting for ${r} authorization.`})}clearAwaiting(t,n){const r=this.toolItemId(t);if(!this.itemIndex.has(r))return;const s=this.getToolItem(r)?.gate==="auth",a=n==="deny";this.update(r,{status:"running",output:a?s?"Canceled — tool will not execute.":"Denied — tool will not execute.":s?"Connected — retrying…":"Approved — executing…"})}finishTool(t,n,r,s,a){const l=this.upsertTool(t,n,null,a),c=r==null?"(no output)":Hn(r,4e3);this.update(l,{status:s?"error":"done",output:c,outputRaw:r,endedAt:a??Date.now()}),this.activeTurnId===null&&!this.hasOpenTools()&&this.setRunning(!1)}hasOpenTools(){for(const t of this.toolIds){const n=this.itemIndex.get(t);if(n===void 0)continue;const r=this.items[n];if(r.kind==="tool"&&(r.status==="running"||r.status==="awaiting"))return!0}return!1}finalizeOpenTools(t,n){const r=t??Date.now();for(const s of this.toolIds){const a=this.itemIndex.get(s);if(a===void 0)continue;const l=this.items[a];l.kind==="tool"&&(l.status==="done"||l.status==="error"||l.status!=="awaiting"&&this.update(s,{status:"orphan",endedAt:r,output:n}))}}beginDiscardStaleTurnBody(){this.discardTurnBody=!0,this.activeTurnId=null}applyChat(t){if(this.discardTurnBody){if(t.type==="turn.started")this.discardTurnBody=!1;else if(t.type!=="message.received"&&t.type!=="agent.bound")return}else if(this.activeTurnId!==null&&t.turnId!==void 0&&t.turnId!==this.activeTurnId&&!IG.has(t.type)&&t.type!=="message.received"&&t.type!=="agent.bound")return;const n=t.data||{},r=hl(t.at)||Date.now();switch(t.type){case"message.received":this.pushUser(n.text);break;case"agent.bound":this.pushDivider(n.url?`cloud agent ${n.sdkAgentId}`:`agent ${n.sdkAgentId}`,!1,typeof n.url=="string"?n.url:void 0);break;case"turn.started":this.activeTurnId=t.turnId??null,this.activeTurnStartedAt=hl(t.at),this.setRunning(!0);break;case"reasoning.appended":if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.ensureNestedReasoning(n.parentCallId);this.updateNestedChild(n.parentCallId,s,{text:String(n.text??"")})}else this.update(this.ensureReasoning(),{text:String(n.text??"")});break;case"reasoning.completed":if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.nestedReasoningIds.get(n.parentCallId);s&&(this.updateNestedChild(n.parentCallId,s,{open:!1}),this.nestedReasoningIds.delete(n.parentCallId))}else this.reasoningId&&(this.update(this.reasoningId,{open:!1}),this.reasoningId=null);break;case"message.appended":if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.ensureNestedAssistant(n.parentCallId);this.updateNestedChild(n.parentCallId,s,{text:String(n.text??"")})}else this.update(this.ensureAssistant(),{text:String(n.text??"")});break;case"message.completed":{if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.ensureNestedAssistant(n.parentCallId);this.updateNestedChild(n.parentCallId,s,{text:String(n.text??""),streaming:!1}),this.nestedAssistantIds.delete(n.parentCallId)}else{const s=this.ensureAssistant();this.update(s,{text:String(n.text??""),streaming:!1}),this.assistantId=null}break}case"actions.requested":this.setRunning(!0);for(const s of n.calls||[]){const a=typeof s.parentCallId=="string"&&s.parentCallId!==""?s.parentCallId:typeof n.parentCallId=="string"&&n.parentCallId!==""?n.parentCallId:void 0;a!==void 0?this.upsertNestedTool(a,s.callId,s.toolName,s.args,r):s.toolName==="task"||this.upsertTool(s.callId,s.toolName,s.args,r)}break;case"action.approval_requested":this.markAwaiting(n.callId,n.toolName,n.args);break;case"action.approval_resolved":this.clearAwaiting(n.callId,n.decision);break;case"action.auth_requested":this.markAwaitingAuth(n.callId,n.toolName,n.connection,n.authUrl);break;case"action.auth_resolved":this.clearAwaiting(n.callId,n.decision);break;case"action.result":typeof n.parentCallId=="string"&&n.parentCallId!==""?this.finishNestedTool(n.parentCallId,n.callId,n.toolName,n.output,!!n.isError,r):n.toolName==="task"||this.finishTool(n.callId,n.toolName,n.output,!!n.isError,r);break;case"subagent.called":this.setRunning(!0),this.upsertTool(this.subagentToolCallId(n.callId),`subagent:${n.name||"task"}`,n.description,r);break;case"artifact.tagged":{const s=aM(n);this.push({kind:"artifact",id:this.nextId("artifact"),artifactKind:s.kind,title:s.title,url:s.url,artifactId:s.artifactId,data:s.data});break}case"subagent.completed":this.nestedAssistantIds.delete(n.callId),this.nestedReasoningIds.delete(n.callId),this.finishTool(this.subagentToolCallId(n.callId),"","completed",!1,r);break;case"turn.completed":{this.activeTurnId=null,this.finalizeOpenTools(r,"(no result — turn completed before the tool reported back)");const s=this.activeTurnStartedAt;this.activeTurnStartedAt=null,this.push({kind:"turn-end",id:this.nextId("turn"),ms:s!==null&&hl(t.at)!==null?Math.max(0,r-s):null,inTokens:typeof n.usage?.inputTokens=="number"?n.usage.inputTokens:void 0,outTokens:typeof n.usage?.outputTokens=="number"?n.usage.outputTokens:void 0,costUsd:typeof n.cost?.totalUsd=="number"?n.cost.totalUsd:void 0});const a=this.state.current?.sessionId;a&&this.refreshSessionCost(a),this.setRunning(this.hasOpenTools());break}case"turn.failed":this.activeTurnId=null,this.activeTurnStartedAt=null,this.finalizeOpenTools(r,`(no result — turn failed: ${n.message||"unknown"})`),this.pushDivider(`turn failed: ${n.message}`,!0),this.setRunning(this.hasOpenTools());break;case"session.waiting":this.setRunning(this.hasOpenTools()),this.refreshSessions();break;case"session.completed":this.finalizeOpenTools(r,"(no result — session completed)"),this.pushDivider("task session completed"),this.setRunning(!1),this.refreshSessions();break;case"session.failed":this.finalizeOpenTools(r,`(no result — session failed: ${n.message||"unknown"})`),this.pushDivider(`session failed: ${n.message}`,!0),this.setRunning(!1),this.refreshSessions();break}}ingestStreamEvent(t){if(t.index!==void 0){if(t.index<=this.lastIndex)return;this.lastIndex=t.index}this.state.traceEvents.push(t),this.applyChat(t)}flushStreamPaint(){this.set({transcript:this.items.slice(),traceEvents:this.state.traceEvents.slice()})}setRunning(t){this.set({running:t,turnStartedAt:t?this.activeTurnStartedAt:null}),t||queueMicrotask(()=>this.maybeFlushQueue())}setView(t){if(t==="logs"){this.set({view:"overview",overviewSection:"logs",evalNavReturn:!1});try{const s=new URL(window.location.href);s.searchParams.delete("view"),history.replaceState(null,"",s.toString())}catch{}uM("logs");return}const n=t==="overview"||t==="chat"||t==="trace"||t==="raw"||t==="evals"||t==="artifacts"?t:"overview",r=this.state.view==="evals"&&(n==="chat"||n==="trace"||n==="raw"||n==="artifacts");this.set({view:n,...n==="evals"||n==="overview"?{evalNavReturn:!1}:r?{evalNavReturn:!0}:{}}),r&&this.state.current===null&&this.attachEvalCaseSessionForView(n);try{const s=new URL(window.location.href);n==="overview"?s.searchParams.delete("view"):s.searchParams.set("view",n),history.replaceState(null,"",s.toString())}catch{}n==="evals"&&(this.refreshEvalRuns(),this.restoreEvalRun())}backToEvals(){this.set({evalNavReturn:!1}),this.setView("evals")}backToOverview(){this.set({evalNavReturn:!1}),this.setView("overview")}newChat(){this.historyOnly||(this.deselectSession(),this.setView("chat"))}async refreshSessions(){let t;try{t=await this.api.sessions()}catch{return}if(!t.ok||!t.body){this.noteAliasAuthLoss(t.status);return}const n=t.body.sessions||[],r=bG({knownIds:this.knownSessionIds,sessions:n,currentSessionId:this.state.current?.sessionId??null,embedded:this.state.embedded,view:this.state.view,seeded:this.sessionsSeeded});this.knownSessionIds=new Set(n.map(l=>l.sessionId)),this.sessionsSeeded=!0;const s={sessions:n};let a=!1;if(this.state.current){const l=n.find(c=>c.sessionId===this.state.current?.sessionId);l?.continuationToken&&(s.current={...this.state.current,continuationToken:l.continuationToken}),l?.running===!0&&!this.state.running&&this.streamAbort===null&&!this.snapshotOpen&&!this.historyOnly?(s.running=!0,a=!0):l?.running===!1&&this.state.running&&!this.hasOpenTools()&&(s.running=!1)}if(this.set(s),s.running===!1&&queueMicrotask(()=>this.maybeFlushQueue()),a&&this.state.current!==null&&this.startStream(this.state.current.sessionId,this.lastIndex+1),r.action==="select"){const l=n.find(c=>c.sessionId===r.sessionId);l!==void 0&&this.selectSession(l);return}r.action==="reveal"&&this.revealEmbeddedTriggeredRun(r.sessionId,n)}revealEmbeddedTriggeredRun(t,n){if(this.state.view==="overview"){this.set({overviewSection:"runs"});return}const r=n.find(l=>l.sessionId===t),s=r?.channelId??"triggered",a=r?.title?.trim();this.toast(a===void 0||a===""?`New ${s} run started`:`New ${s} run: ${a}`)}isCurrent(t){return this.state.current!==null&&this.state.current.sessionId===t}stopStream(){this.streamAbort&&(this.streamAbort.abort(),this.streamAbort=null)}startStream(t,n){if(this.historyOnly)return;this.stopStream();const r=new AbortController;this.streamAbort=r,this.api.streamFetch(t,n,r.signal).then(async s=>{if(!s.ok||!s.body){this.toast(`Stream failed (${s.status})`);return}const a=s.body.getReader(),l=new TextDecoder;let c="";for(;;){const d=await a.read();if(d.done){this.scheduleReconnect(t,r);return}c+=l.decode(d.value,{stream:!0});const f=c.split(`
|
|
18
|
+
`);c=f.pop()||"";const h=[];for(const m of f){if(r.signal.aborted)return;if(!m||!m.trim())continue;let b=null;try{b=JSON.parse(m)}catch{continue}b!==null&&h.push(b)}if(r.signal.aborted)return;for(const m of h)this.ingestStreamEvent(m);h.length>0&&this.flushStreamPaint()}}).catch(()=>{r.signal.aborted||this.scheduleReconnect(t,r)})}scheduleReconnect(t,n){n.signal.aborted||this.historyOnly||this.isCurrent(t)&&setTimeout(()=>{!this.isCurrent(t)||this.streamAbort!==n||this.startStream(t,this.lastIndex+1)},1e3)}async refreshSessionCost(t){try{const n=await this.api.sessionCost(t);if(!n.ok||n.body===null||this.state.current?.sessionId!==t)return;this.set({sessionCostUsd:n.body.source==="unavailable"?null:n.body.costUsd})}catch{}}selectSession(t){this.stopStream(),this.resetTranscript(),this.lastIndex=-1,this.state.traceEvents=[];const n=this.state.view==="evals";this.set({localTrace:!1,current:{sessionId:t.sessionId,channelId:t.channelId,mode:t.mode,continuationToken:t.continuationToken,externalUrl:t.externalUrl||null,prUrl:t.prUrl||null},running:!!t.running,turnStartedAt:null,queued:[],composerDraft:null,barTitle:t.title||"Session",barId:t.sessionId,externalUrl:t.externalUrl||null,transcript:[],traceEvents:[],sessionCostUsd:null,chatPanelOpen:!0,evalNavReturn:!1}),this.syncSessionUrl(t.sessionId),(n||this.state.view==="overview")&&(this.setView("chat"),this.set({evalNavReturn:!1})),this.refreshSessions(),this.refreshSessionCost(t.sessionId),this.loadEventsSnapshot(t.sessionId,!!t.running)}syncSessionUrl(t){try{const n=new URL(window.location.href);t?n.searchParams.set("sessionId",t):n.searchParams.delete("sessionId"),history.replaceState(null,"",n.toString())}catch{}}async loadEventsSnapshot(t,n){const r=++this.snapshotToken;this.snapshotOpen=!0,this.stopStream();try{const s=await this.api.eventsText(t);if(r!==this.snapshotToken||!this.isCurrent(t))return;if(!s.ok){this.historyOnly?this.toast(`Could not load trace (${s.status})`):(this.toast(`Could not load trace (${s.status}) — falling back to stream`),this.startStream(t,0));return}const a=await s.text();if(r!==this.snapshotToken||!this.isCurrent(t)||(await this.refreshSessions(),r!==this.snapshotToken||!this.isCurrent(t)))return;const l=this.state.sessions.find(f=>f.sessionId===t),c=l!==void 0?l.running===!0:n;this.ingestEventsCompact(ov(a),c);const d=this.hasOpenTools()||c;this.setRunning(d),d&&!this.historyOnly&&this.startStream(t,this.lastIndex+1)}catch(s){if(r!==this.snapshotToken||!this.isCurrent(t))return;this.toast(`Trace load failed: ${zG(s)}`),this.historyOnly||this.startStream(t,0)}finally{r===this.snapshotToken&&(this.snapshotOpen=!1)}}ingestEventsCompact(t,n=!1){this.resetTranscript(),this.lastIndex=-1;for(const r of t){const s=DG.has(r.type)||n&&r.type==="message.appended";s&&this.applyChat(r),!(!s&&r.type==="message.appended")&&typeof r.index=="number"&&r.index>this.lastIndex&&(this.lastIndex=r.index)}this.setRunning(this.hasOpenTools()||n),this.set({traceEvents:t.slice(),transcript:this.items.slice()})}deselectSession(){this.stopStream(),this.resetTranscript(),this.lastIndex=-1,this.set({current:null,localTrace:!1,running:!1,turnStartedAt:null,queued:[],composerDraft:null,transcript:[],traceEvents:[],sessionCostUsd:null,barTitle:"No session",barId:"",externalUrl:null,chatPanelOpen:!0,evalNavReturn:!1}),this.syncSessionUrl(null),this.state.embedded||this.setView("overview"),this.refreshSessions()}loadLocalTrace(t,n){this.stopStream(),this.resetTranscript(),this.lastIndex=-1;const r=ov(t);if(r.length===0){this.toast("No session events found in that file."),this.deselectSession();return}const s=r[0].sessionId||"local-trace";this.set({current:null,localTrace:!0,running:!1,turnStartedAt:null,queued:[],composerDraft:null,barTitle:"Trace",barId:`${n||s} · ${r.length} events`,externalUrl:null,chatPanelOpen:!0}),this.setView("trace"),this.syncSessionUrl(null),this.ingestEventsCompact(r),this.toast(`Loaded ${r.length} events — Trace timeline ready`)}slashCommands(){return Fh(this.state.info?.channels)}async sendMessage(t,n={}){const r=t.trim();if(!r||this.state.localTrace||this.historyOnly)return!1;const s=this.state.current;if(xG(r))return this.invokeSlashCommand(r);if(this.queueHeld=!1,s!==null&&this.state.running&&!n.force)return this.queueMessage(r),!0;if(s===null){this.setRunning(!0);const a=await this.api.createSession(r);return!a.ok||!a.body?(this.setRunning(!1),this.toast(`Create failed: ${Hn(a.body,160)}`),!1):(this.resetTranscript(),this.lastIndex=-1,this.state.traceEvents=[],this.set({localTrace:!1,current:{sessionId:a.body.sessionId,channelId:"http",mode:"chat",continuationToken:a.body.continuationToken},barTitle:"Session",barId:a.body.sessionId,externalUrl:null,transcript:[],traceEvents:[]}),this.syncSessionUrl(a.body.sessionId),this.startStream(a.body.sessionId,0),this.refreshSessions(),!0)}return this.setRunning(!0),this.beginDiscardStaleTurnBody(),this.streamAbort===null&&this.startStream(s.sessionId,this.lastIndex+1),this.postFollowUp(s,r,!0)}async postFollowUp(t,n,r){const s=await this.api.followUp(t.sessionId,n,t.continuationToken);if(s.ok&&s.body)return this.set({current:{...t,continuationToken:s.body.continuationToken}}),!0;if(s.body?.error==="stale_continuation_token"&&r){await this.refreshSessions();const a=this.state.current??t;return this.postFollowUp(a,n,!1)}return this.setRunning(!1),this.toast(`Send failed: ${Hn(s.body,160)}`),!1}queueMessage(t){this.set({queued:[...this.state.queued,{id:this.nextId("queued"),text:t}]})}removeQueued(t){this.set({queued:this.state.queued.filter(n=>n.id!==t)})}clearQueue(){this.set({queued:[]})}editQueued(t){const n=this.state.queued.find(r=>r.id===t);n!==void 0&&(this.removeQueued(t),this.set({composerDraft:n.text}))}consumeComposerDraft(){this.set({composerDraft:null})}setComposerDraft(t){this.set({composerDraft:t})}async sendQueuedNow(t){const n=this.state.queued.find(s=>s.id===t);if(n===void 0)return;this.removeQueued(t),this.queueHeld=!1,await this.sendMessage(n.text,{force:!0})||this.requeueFront(n)}requeueFront(t){this.set({queued:[t,...this.state.queued]}),this.queueHeld=!0}maybeFlushQueue(){if(this.flushingQueue||this.queueHeld)return;const{running:t,queued:n,localTrace:r,current:s}=this.state;if(t||r||this.historyOnly||s===null||n.length===0)return;const[a,...l]=n;a!==void 0&&(this.flushingQueue=!0,this.set({queued:l}),this.setRunning(!0),this.streamAbort===null&&this.startStream(s.sessionId,this.lastIndex+1),this.postFollowUp(s,a.text,!0).then(c=>{c||this.requeueFront(a)}).finally(()=>{this.flushingQueue=!1}))}async stopTurn(){const t=this.state.current?.sessionId;if(!t||this.state.localTrace||this.historyOnly||!this.state.running)return;this.state.queued.length>0&&(this.queueHeld=!0),this.beginDiscardStaleTurnBody(),this.stopStream(),this.setRunning(!1),this.assistantId&&(this.update(this.assistantId,{streaming:!1}),this.assistantId=null),this.reasoningId&&(this.update(this.reasoningId,{open:!1}),this.reasoningId=null),this.finalizeOpenTools(Date.now(),"(no result — turn interrupted)"),this.pushDivider("turn interrupted"),this.commitTranscript();const n=await this.api.stopSession(t);if(!n.ok){this.toast(`Stop failed: ${Hn(n.body,160)}`);return}this.refreshSessions()}async submitApproval(t,n){const r=this.state.current?.sessionId;if(!r||this.historyOnly)return;const s=await this.api.resolveApproval(r,t,n);s.ok||this.toast(`Approval failed: ${Hn(s.body,160)}`)}async submitAuth(t,n){const r=this.state.current?.sessionId;if(!r||this.historyOnly)return;const s=await this.api.resolveAuth(r,t,n);s.ok||this.toast(`Connect failed: ${Hn(s.body,160)}`)}async dispatchSchedule(t){if(this.historyOnly)return;const n=await this.api.dispatchSchedule(t);if(!n.ok||!n.body){this.toast(`Dispatch failed: ${Hn(n.body,120)}`);return}await this.refreshSessions();const r=n.body.sessionIds?.[0],s=this.state.sessions.find(a=>a.sessionId===r);s&&this.selectSession(s)}async refreshEvalCases(){const t=await this.api.evalsList();if(!t.ok||!t.body){t.status!==0&&this.toast(`Could not list evals (${t.status}): ${Hn(t.body,120)}`);return}this.set({evalCases:t.body.evals??[],evalConfig:t.body.config??null})}async refreshEvalRuns(){const t=await this.api.evalsListRuns();if(!t.ok||t.body===null)return;const n=Array.isArray(t.body.runs)?t.body.runs:null;n!==null&&this.set({evalRuns:n})}async selectEvalRun(t){const n=t.trim();if(n==="")return;this.set({chatPanelOpen:!0});const r=this.state.evalRuns.find(a=>a.runId===n);if(r!==void 0&&r.status!=="running"){this.applyRestoredEvalRun(r),this.setView("evals");return}const s=await this.api.evalsRunStatus(n);if(!s.ok||s.body===null){this.toast(`Eval run not found: ${n}`);return}this.applyRestoredEvalRun(s.body),this.setView("evals"),this.refreshEvalRuns()}async openEvalRunInOverview(t){const n=t.trim();n!==""&&(this.setOverviewSection("runs",n),await this.selectEvalRun(n))}async restoreEvalRun(){return this.evalRestoreInFlight!==null?this.evalRestoreInFlight:(this.evalRestoreInFlight=this.doRestoreEvalRun().finally(()=>{this.evalRestoreInFlight=null}),this.evalRestoreInFlight)}async doRestoreEvalRun(){const t=++this.evalRestoreGeneration,n=BG();if(n!==null){const f=await this.api.evalsRunStatus(n);if(t!==this.evalRestoreGeneration)return;if(f.ok&&f.body){this.applyRestoredEvalRun(f.body),this.refreshEvalRuns();return}}const r=await this.api.evalsListRuns();if(t!==this.evalRestoreGeneration)return;const s=r.ok?r.body:null,a=Array.isArray(s?.runs)?s.runs:null;if(a!==null&&this.set({evalRuns:a}),s?.activeRunId!==void 0&&a!==null){const f=s.activeRunId,h=a.find(m=>m.runId===f)??await this.fetchEvalRunIfCurrent(t,f);if(t!==this.evalRestoreGeneration)return;if(h!==void 0){this.state.evalRun?.runId===h.runId?(this.set({evalRun:h}),h.status==="running"&&this.evalPollTimer===null&&this.startEvalRunPoll(h.runId)):this.applyRestoredEvalRun(h);return}}const l=this.state.evalRun;if(l!==null){l.status==="running"&&this.evalPollTimer===null&&this.startEvalRunPoll(l.runId);return}const c=$G(this.state.meta.basePath);if(c!==null){const f=await this.api.evalsRunStatus(c);if(t!==this.evalRestoreGeneration||this.state.evalRun!==null)return;if(f.ok&&f.body){this.applyRestoredEvalRun(f.body);return}}if(a===null)return;const d=a[0];d!==void 0&&this.state.evalRun===null&&this.applyRestoredEvalRun(d)}async fetchEvalRunIfCurrent(t,n){const r=await this.api.evalsRunStatus(n);if(t===this.evalRestoreGeneration)return r.ok&&r.body?r.body:void 0}applyRestoredEvalRun(t){this.set({evalRun:t}),this.mergeEvalRunIntoList(t),Gd(this.state.meta.basePath,t.runId),FG(t.runId),t.status==="running"&&this.startEvalRunPoll(t.runId)}mergeEvalRunIntoList(t){const n=this.state.evalRuns.filter(r=>r.runId!==t.runId);this.set({evalRuns:[t,...n]})}async startEvalRun(t){if(this.historyOnly)return;if(this.state.evalRun?.status==="running"){this.toast("An eval run is already in progress");return}this.evalRestoreGeneration+=1;const n=await this.api.evalsStartRun(t===void 0||t.length===0?{}:{filterIds:t});if(!n.ok||!n.body){this.toast(`Eval start failed: ${Hn(n.body,160)}`);return}this.set({evalRun:n.body}),Gd(this.state.meta.basePath,n.body.runId),(this.state.view==="overview"||this.state.view==="chat")&&(this.set({overviewSection:"runs",overviewRunId:n.body.runId,chatPanelOpen:!0}),this.mergeEvalRunIntoList(n.body)),this.setView("evals"),this.toast(`Eval ID: ${n.body.runId}`),this.startEvalRunPoll(n.body.runId),this.refreshEvalRuns()}async cancelEvalRun(t){const n=t??this.state.evalRun?.runId;if(n===void 0||n===""){this.toast("No eval run to cancel");return}const r=await this.api.evalsCancelRun(n);if(!r.ok||!r.body){this.toast(`Eval cancel failed: ${Hn(r.body,160)}`);return}this.set({evalRun:r.body}),Gd(this.state.meta.basePath,r.body.runId),this.toast(`Cancelled Eval ID ${r.body.runId}`),r.body.status==="running"?this.startEvalRunPoll(r.body.runId):this.stopEvalRunPoll(),this.refreshEvalRuns()}stopEvalRunPoll(){this.evalPollTimer!==null&&(clearInterval(this.evalPollTimer),this.evalPollTimer=null)}startEvalRunPoll(t){this.stopEvalRunPoll();const n=++this.evalPollGeneration;let r=!1,s=!1;const a=async()=>{if(!(n!==this.evalPollGeneration||r)){r=!0;try{const l=await this.api.evalsRunStatus(t);if(n!==this.evalPollGeneration||!l.ok||!l.body)return;if(this.set({evalRun:l.body}),Gd(this.state.meta.basePath,l.body.runId),this.mergeEvalRunIntoList(l.body),l.body.status!=="running"){if(this.stopEvalRunPoll(),this.refreshSessions(),this.refreshEvalRuns(),s||n!==this.evalPollGeneration)return;s=!0;const{passed:c,failed:d,total:f}=l.body.summary;this.toast(l.body.status==="failed"?`Eval run failed: ${l.body.error??"unknown error"}`:`Evals done — ${c} passed, ${d} failed, ${f} total`)}}finally{r=!1}}};a(),this.evalPollTimer=setInterval(()=>{a()},1500)}async attachEvalCaseSessionForView(t){const r=(this.state.evalRun??this.state.evalRuns[0]??null)?.cases.find(a=>a.sessionId!==void 0)?.sessionId;if(r===void 0||(await this.refreshSessions(),this.state.current!==null||this.state.view!==t))return;const s=this.state.sessions.find(a=>a.sessionId===r);s!==void 0?this.selectSession({...s,running:s.running===!0}):this.selectSession({sessionId:r,channelId:"http",mode:"conversation",title:"Eval session",turnCount:0,running:!1}),this.set({evalNavReturn:!0}),this.setView(t)}async openEvalCaseSession(t){await this.refreshSessions();const n=this.state.sessions.find(r=>r.sessionId===t);n!==void 0?this.selectSession({...n,running:n.running===!0}):this.selectSession({sessionId:t,channelId:"http",mode:"conversation",title:"Eval session",turnCount:0,running:!1}),this.set({evalNavReturn:!0}),this.setView("chat")}async openEvalCaseTrace(t){await this.refreshSessions();const n=this.state.sessions.find(r=>r.sessionId===t);n!==void 0?this.selectSession({...n,running:n.running===!0}):this.selectSession({sessionId:t,channelId:"http",mode:"conversation",title:"Eval session",turnCount:0,running:!1}),this.set({evalNavReturn:!0}),this.setView("trace")}async openSessionFromChannelResponse(t,n){const r=typeof n?.sessionId=="string"&&n.sessionId.trim()!==""?n.sessionId:null;if(r===null)return!1;await this.refreshSessions();const s=this.state.sessions.find(c=>c.sessionId===r),a=typeof n.status=="string"?n.status:void 0,l=a===void 0||a==="started"||a==="running";if(s!==void 0)this.selectSession({...s,running:l?!0:!!s.running});else{const c=typeof n.continuationToken=="string"?n.continuationToken:typeof n.key=="string"?n.key:void 0,d=typeof n.pr=="string"?n.pr:typeof n.title=="string"?n.title:"Session";this.selectSession({sessionId:r,channelId:t,mode:typeof n.mode=="string"?n.mode:"task",title:d,turnCount:0,running:l,continuationToken:c,externalUrl:typeof n.agentUrl=="string"?n.agentUrl:null})}return this.setView("chat"),this.setDrawerOpen(!1),!0}async openSessionById(t){const n=t.trim();if(n==="")return;await this.refreshSessions();const r=this.state.sessions.find(s=>s.sessionId===n);r!==void 0?this.selectSession(r):this.selectSession({sessionId:n,channelId:"http",mode:"conversation",title:"Session",turnCount:0,running:!1}),this.setView("chat")}async invokeSlashCommand(t){const n=t.trim(),r=this.slashCommands();if(/^\/help(?:\s|$)/i.test(n)){this.resetTranscript(),this.pushUser(n);const l=this.ensureAssistant();return this.update(l,{text:SG(r),streaming:!1}),this.assistantId=null,this.set({localTrace:!1,current:null,barTitle:"Help",barId:"",externalUrl:null,running:!1,turnStartedAt:null}),this.syncSessionUrl(null),this.commitTranscript(),!0}const s=wG(n,r);if(!s.ok)return this.toast(s.error),!1;this.setRunning(!0),this.resetTranscript(),this.pushUser(n);const a=this.ensureAssistant();this.update(a,{text:`Running \`${s.command.name}\` (${s.command.method} ${s.command.url})…`}),this.set({localTrace:!1,current:null,barTitle:s.command.name,barId:s.command.method,externalUrl:null,transcript:this.items.slice()}),this.syncSessionUrl(null);try{const l=await this.api.channelRequest(s.command.method,s.command.url,{body:s.body,query:s.query});return l.ok?await this.openSessionFromChannelResponse(s.command.channelId,l.body)?(this.assistantId=null,!0):(this.setRunning(!1),this.update(a,{text:"```json\n"+PG(l.body)+"\n```",streaming:!1}),this.assistantId=null,this.commitTranscript(),!0):(this.setRunning(!1),this.update(a,{text:`Command failed (${l.status}): ${Hn(l.body,400)}`,streaming:!1}),this.assistantId=null,this.commitTranscript(),!0)}catch(l){return this.setRunning(!1),this.update(a,{text:`Command failed: ${l instanceof Error?l.message:String(l)}`,streaming:!1}),this.assistantId=null,this.commitTranscript(),!0}}async loadEngineMeta(){let t;try{t=await this.api.meta()}catch{return!1}return!t.ok||!t.body?!1:(this.set({meta:{name:t.body.name??"agent",dev:!!t.body.dev,basePath:this.api.basePath,indexPath:t.body.indexPath,version:t.body.version,readonly:t.body.readonly===!0}}),console.info(`[playground] engine version ${t.body.version??"pre-0.1.14"}`),!0)}refreshEngineStatus(){this.api.health().then(t=>{this.set({health:t.ok?"ok":"bad"})}),this.api.info().then(t=>{t.ok&&t.body?this.set({info:t.body}):t.status===401&&(this.noteAliasAuthLoss(t.status)||this.toast("Unauthorized: set a bearer token (⋯ menu) that matches the channel auth."))})}async pollEngineMetaUntilReady(){const t=Date.now()+18e4;let n=1e3;for(;Date.now()<t;){if(await new Promise(r=>setTimeout(r,n)),n=Math.min(n*2,1e4),this.aliasAuthPending)return;if(await this.loadEngineMeta()){this.refreshEngineStatus(),this.refreshEvalCases(),this.restoreEvalRun();const r=this.pendingSessionDeepLink;if(this.pendingSessionDeepLink=null,r!==null){await this.refreshSessions(),this.selectDeepLinkedSession(r);try{new URL(window.location.href).searchParams.get("view")==="overview"&&this.setView("overview")}catch{}}return}}this.pendingSessionDeepLink=null}selectDeepLinkedSession(t){const n=this.state.sessions.find(r=>r.sessionId===t);n?this.selectSession(n):this.state.sessions.length>0&&this.toast(`Session not found: ${t}`)}get aliasAuthPending(){return this.state.aliasHosted&&this.state.aliasToken.trim()===""}async boot(){if(this.booted||this.aliasAuthPending)return;this.booted=!0;let t=null,n=null,r=null;try{const a=iH(window.location.href);t=a.sessionId,n=a.view,r=a.section}catch{}const s=await this.loadEngineMeta();s?this.refreshEngineStatus():(this.pendingSessionDeepLink=t,this.set({health:"bad"}),this.pollEngineMetaUntilReady()),n?this.setView(n):this.setView("overview"),r!==null&&this.set({overviewSection:r}),await this.refreshSessions(),this.refreshEvalCases(),this.refreshEvalRuns(),this.restoreEvalRun(),t&&s&&(this.selectDeepLinkedSession(t),n==="overview"&&this.setView("overview")),this.historyOnly||setInterval(()=>{this.refreshSessions()},this.state.meta.dev?2e3:5e3)}modelLabel(){return mG(this.state.info?.model)}}function zG(e){return e instanceof Error?e.message:String(e)}function PG(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function LM(e){return`agent-serve:evalRunId:${e||"/"}`}function $G(e){try{const t=sessionStorage.getItem(LM(e));return t!==null&&t!==""?t:null}catch{return null}}function BG(){try{const e=new URL(window.location.href).searchParams.get("evalRunId");if(e===null)return null;const t=e.trim();return t===""?null:t}catch{return null}}function FG(e){try{const t=new URL(window.location.href);if(t.searchParams.get("evalRunId")===e)return;t.searchParams.set("evalRunId",e),history.replaceState(null,"",t.toString())}catch{}}function Gd(e,t){try{sessionStorage.setItem(LM(e),t)}catch{}}const it=new jG;it.getState().aliasHosted&&H8(e=>it.acceptAliasTokenHandoff(e));let ZT=it.getState().overviewSection;Yo.subscribe(e=>{e.overviewSection!==ZT&&(ZT=e.overviewSection,uM(e.overviewSection))});if(it.getState().embedded){let e=it.getState().view,t=it.getState().current?.sessionId??null,n=it.getState().overviewSection,r=t!==null;Yo.subscribe(s=>{const a=s.current?.sessionId??null;a!==null&&(r=!0),!(s.view===e&&a===t&&s.overviewSection===n)&&(e=s.view,t=a,n=s.overviewSection,lH(s.view,r?a:void 0,void 0,s.overviewSection))})}function Ke(e){return $8(Yo,e)}function UG(){const[e,t]=v.useState(""),[n,r]=v.useState(null),[s,a]=v.useState(!1);async function l(c){c.preventDefault(),a(!0),r(null);const d=await it.signInWithAliasToken(e);a(!1),d.ok||r(d.error)}return g.jsx("div",{className:"pg-alias-signin",children:g.jsxs("div",{className:"pg-alias-signin-box",children:[g.jsx("h1",{children:"agent-serve playground"}),g.jsx("p",{children:"This deployment requires its alias token."}),n!==null?g.jsx("div",{className:"pg-alias-signin-error",children:n}):null,g.jsxs("form",{onSubmit:c=>{l(c)},children:[g.jsx(Yc,{type:"password",size:"md","aria-label":"Alias token",placeholder:"adt_…",autoComplete:"off",autoFocus:!0,value:e,onChange:c=>t(c.target.value),disabled:s}),g.jsx(gn,{type:"submit",variant:"primary",disabled:s||e.trim()==="",children:s?"Checking…":"Open playground"})]}),g.jsxs("div",{className:"pg-alias-signin-hint",children:["The alias token was shown once when the agent was deployed. Lost it?",g.jsx("code",{children:"agent-sdk rotate-token <slug>"})," mints a replacement. The token stays in this tab only — refresh to sign in again."]})]})})}function qG(){return g.jsx("div",{className:"pg-alias-signin",children:g.jsxs("div",{className:"pg-alias-signin-box",children:[g.jsx("h1",{children:"Playground disconnected"}),g.jsx("p",{children:"This playground connects through your Cursor dashboard. Use Reconnect on the dashboard, or reload the page."})]})})}const HG=["noopener","noreferrer"];function tk(e){return e.trim()===""}function jM(e){const t=e.trim();if(tk(t)||t.startsWith("#"))return!1;try{const n=new URL(t,"https://playground.invalid").protocol.toLowerCase();return n!=="javascript:"&&n!=="data:"&&n!=="vbscript:"&&n!=="file:"}catch{return!0}}function GG(e){if(e.hasAttribute("download"))return;const t=e.getAttribute("href");if(t===null||!jM(t))return;e.target="_blank";const n=new Set(e.rel.split(/\s+/).map(r=>r.toLowerCase()).filter(r=>r!==""));for(const r of HG)n.add(r);e.rel=[...n].join(" ")}function QT(e){const t=e.target;if(!(t instanceof Element))return;const n=t.closest("a");if(!(n instanceof HTMLAnchorElement))return;GG(n);const r=n.getAttribute("href");r!==null&&tk(r)&&!n.hasAttribute("download")&&e.preventDefault()}function VG(e=document){return e.addEventListener("click",QT,!0),()=>e.removeEventListener("click",QT,!0)}function oa({href:e,onClick:t,...n}){const s=e!==void 0&&tk(e)?a=>{a.preventDefault(),t?.(a)}:t;return e===void 0||!jM(e)?g.jsx("a",{href:e,...n,onClick:s}):g.jsx("a",{href:e,...n,onClick:s,target:"_blank",rel:"noopener noreferrer"})}const zM=512*1024,WG=64*1024*1024,KG=240;async function PM(e){try{const t=await it.api.artifactContent(e,zM);if(!t.ok)return t.status===404?{phase:"absent"}:{phase:"error",message:`HTTP ${t.status}`};let n=null;if(V8(t.contentType)){const r=new TextDecoder("utf-8",{fatal:!1}).decode(t.bytes);n=W8(r)?null:r}return{phase:"loaded",text:n,isDiff:n!==null&&K8(t.contentType,n),contentType:t.contentType,size:t.bytes.length,truncated:t.truncated}}catch(t){return{phase:"error",message:t instanceof Error?t.message:String(t)}}}async function $M(e,t){try{const n=await it.api.artifactContent(e,WG);if(!n.ok)return;const r=new Blob([n.bytes.buffer],{type:n.contentType??"application/octet-stream"}),s=URL.createObjectURL(r),a=document.createElement("a");a.href=s,a.download=XG(t,e,n.contentType),a.click(),URL.revokeObjectURL(s)}catch{}}const YG={"text/x-diff":".diff","text/x-patch":".patch","application/json":".json","text/markdown":".md","text/plain":".txt","text/html":".html","text/csv":".csv"};function XG(e,t,n){const r=(e??t).trim().replace(/[^\w.-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,80),s=n?.split(";")[0]?.trim().toLowerCase()??"",a=YG[s]??"",l=r===""?t:r;return l.includes(".")?l:`${l}${a}`}function ZG({text:e,isDiff:t}){const n=v.useMemo(()=>t?e.split(`
|
|
19
|
+
`):null,[e,t]);return n===null?g.jsx("pre",{className:"pg-artifact-file-text",children:e}):g.jsx("pre",{className:"pg-artifact-file-text pg-artifact-diff",children:n.map((r,s)=>g.jsx("span",{className:`diff-line diff-${Y8(r)}`,children:r},s))})}function BM({artifactId:e,title:t,state:n}){if(n.phase==="idle"||n.phase==="loading")return g.jsx("div",{className:"pg-artifact-file-note",children:"Loading contents…"});if(n.phase==="absent")return null;if(n.phase==="error")return g.jsxs("div",{className:"pg-artifact-file-note",children:["Failed to load contents: ",n.message]});const r=Hy(n.size),s=[n.contentType?.split(";")[0],r].filter(a=>a!==void 0&&a!=="").join(" · ");return g.jsxs("div",{className:"pg-artifact-file",children:[g.jsxs("div",{className:"pg-artifact-file-head",children:[g.jsx(Yt,{name:"file",size:"sm",color:"tertiary"}),g.jsx("span",{className:"pg-artifact-file-meta",children:s||"file payload"}),g.jsx(gn,{variant:"ghost",size:"sm",onClick:()=>{$M(e,t)},children:"Download"})]}),n.text!==null?g.jsx(ZG,{text:n.text,isDiff:n.isDiff}):g.jsx("div",{className:"pg-artifact-file-note",children:"Binary payload — use Download to save it."}),n.truncated?g.jsxs("div",{className:"pg-artifact-file-note",children:["Preview truncated to ",Hy(zM)," — Download has the full payload."]}):null]})}function QG({data:e}){const[t,n]=v.useState(!1),r=v.useMemo(()=>mo(e),[e]);if(r===""||r==="null")return null;const s=r.length>KG;return g.jsxs("div",{className:"pg-artifact-data",children:[g.jsx("pre",{className:s&&!t?"pg-artifact-json clamped":"pg-artifact-json",children:r}),s?g.jsx("button",{type:"button",className:"link-btn",onClick:()=>n(a=>!a),children:t?"Collapse":"Show all"}):null]})}const JG=v.memo(function({artifactKind:t,title:n,url:r,artifactId:s,data:a}){const[l,c]=v.useState(!1),[d,f]=v.useState({phase:"idle"}),h=m=>{c(m),!(!m||s===void 0||d.phase!=="idle")&&(f({phase:"loading"}),PM(s).then(f))};return g.jsx("div",{className:"pg-artifact-card",children:g.jsx(pi,{action:"Artifact",details:g.jsxs("span",{className:"pg-artifact-head",children:[g.jsx(uo,{variant:"accent",size:"sm",pill:!0,children:t}),n!==void 0?g.jsx("span",{className:"pg-artifact-head-title",children:n}):null]}),leadingIcon:g.jsx(Yt,{name:"bookmark",size:"sm",color:"secondary"}),open:l,onOpenChange:h,tone:"tertiary",children:g.jsxs("div",{className:"pg-artifact-body",children:[r!==void 0?g.jsx(oa,{className:"pg-artifact-link",href:r,children:r}):null,a!==void 0?g.jsx(QG,{data:a}):null,s!==void 0?g.jsx(BM,{artifactId:s,title:n,state:d}):null]})})})}),JT=280,eV=8,Gb=1e3;function tV({record:e}){const[t,n]=v.useState(!1),r=v.useMemo(()=>{const a=oM(e.data);return a!==null?{url:a,json:"",short:""}:{url:null,json:mo(e.data),short:Hn(e.data,JT)}},[e.data]);if(r.url!==null)return g.jsx(oa,{className:"artifact-link",href:r.url,children:r.url});if(r.json==="")return null;const s=r.json.length>JT||r.json.split(`
|
|
20
|
+
`).length>eV;return g.jsxs("div",{className:"artifact-data",children:[g.jsx("pre",{className:"artifact-json",children:s&&!t?r.short:r.json}),s?g.jsx("button",{type:"button",className:"link-btn",onClick:()=>n(!t),children:t?"Collapse":"Expand"}):null]})}function nV({record:e}){const[t,n]=v.useState({phase:"idle"}),r=e.content;if(r===void 0)return null;if(t.phase==="idle"){const s=[r.contentType,Hy(r.size)].filter(a=>a!==void 0&&a!=="").join(" · ");return g.jsxs("div",{className:"pg-artifact-file-head",children:[g.jsx(Yt,{name:"file",size:"sm",color:"tertiary"}),g.jsx("span",{className:"pg-artifact-file-meta",children:s||"file payload"}),g.jsx(gn,{variant:"ghost",size:"sm",onClick:()=>{n({phase:"loading"}),PM(e.id).then(n)},children:"View"}),g.jsx(gn,{variant:"ghost",size:"sm",onClick:()=>{$M(e.id,e.title)},children:"Download"})]})}return g.jsx(BM,{artifactId:e.id,title:e.title,state:t})}const eR=v.memo(function({record:t}){return g.jsxs("div",{className:"artifact-row",children:[g.jsxs("div",{className:"artifact-row-head",children:[g.jsx("span",{className:"artifact-title",children:X8(t)}),g.jsx(uo,{variant:"accent",size:"sm",pill:!0,children:t.kind}),g.jsx(uo,{variant:t.source==="model"?"success":"neutral",size:"sm",pill:!0,children:t.source}),g.jsx("span",{className:"artifact-updated",title:`updated ${t.updatedAt}`,children:sv(t.updatedAt)??t.updatedAt})]}),g.jsx(tV,{record:t}),g.jsx(nV,{record:t})]})});function rV({sessionId:e,count:t,title:n}){const r=`${t} artifact${t===1?"":"s"}`;return e===null?g.jsxs("div",{className:"artifact-group-head",children:[g.jsx("span",{className:"artifact-group-id",children:"No session"}),g.jsx("span",{className:"artifact-group-n",children:r})]}):g.jsxs("button",{type:"button",className:"artifact-group-head",onClick:()=>{it.openSessionById(e)},title:"Open this session's replay",children:[g.jsx("span",{className:"artifact-group-id",children:n||e}),n?g.jsx("span",{className:"artifact-group-sub",children:e}):null,g.jsxs("span",{className:"artifact-group-n",children:[r," →"]})]})}function FM(){const e=Ke(N=>N.current),t=Ke(N=>N.sessions),[n,r]=v.useState(null),[s,a]=v.useState(null),[l,c]=v.useState(null),[d,f]=v.useState("all"),[h,m]=v.useState(0);e===null&&d==="session"&&f("all");const b=d==="session"&&e!==null?e.sessionId:null,y=n!==null&&n.scope===b?n.rows:null;v.useEffect(()=>{let N=!1,A=!1;a(null);const $=async()=>{if(!A){A=!0;try{const I=await it.api.artifacts({sessionId:b??void 0,limit:Gb});if(N)return;if(!I.ok||I.body===null){a(`Failed to load artifacts (${I.status})`);return}a(null),r({scope:b,rows:I.body.artifacts??[]})}catch(I){N||a(I instanceof Error?I.message:String(I))}finally{A=!1}}};$();const z=setInterval(()=>{$()},4e3);return()=>{N=!0,clearInterval(z)}},[b,h]);const k=()=>m(N=>N+1),S=b!==null;if(y===null)return g.jsx("div",{className:"pg-artifacts is-empty",children:s!==null?g.jsx(ks,{body:s,cta:{label:"Retry",onClick:k}}):g.jsx(ks,{body:"Loading artifacts…"})});const R=lM(y);if(R.length===0)return g.jsx("div",{className:"pg-artifacts is-empty",children:g.jsx(ks,{body:S?"No artifacts tagged for this session.":"No artifacts tagged yet."})});const T=Z8(R),E=l!==null&&T.includes(l)?l:null,C=Q8(R,E),_=S?[]:J8(C),D=new Map(t.map(N=>[N.sessionId,N.title]));return g.jsxs("div",{className:"pg-artifacts",children:[g.jsxs("div",{className:"pg-artifacts-toolbar",children:[g.jsx("span",{className:"pg-artifacts-toolbar-title",children:"Artifacts"}),g.jsxs("span",{className:"pg-artifacts-toolbar-meta",children:[C.length," of ",R.length,R.length>=Gb?` (newest ${Gb})`:""]}),s!==null?g.jsx("span",{className:"pg-artifacts-toolbar-error",children:s}):null,g.jsx("span",{className:"grow"}),e!==null?g.jsxs(cc,{size:"sm",variant:"compact",value:d,onValueChange:N=>f(N==="session"?"session":"all"),"aria-label":"Artifact scope",children:[g.jsx(cc.Item,{value:"all",children:"All sessions"}),g.jsx(cc.Item,{value:"session",children:"This session"})]}):null,g.jsx(gn,{variant:"secondary",size:"sm",onClick:k,children:"Refresh"})]}),T.length>1?g.jsxs("div",{className:"artifact-kinds",role:"group","aria-label":"Filter by kind",children:[g.jsx("button",{type:"button",className:`artifact-kind-chip${E===null?" active":""}`,onClick:()=>c(null),children:"All"}),T.map(N=>g.jsx("button",{type:"button",className:`artifact-kind-chip${E===N?" active":""}`,onClick:()=>c(E===N?null:N),children:N},N))]}):null,C.length===0?g.jsx(ks,{body:"No artifacts match this kind filter."}):S?g.jsx("div",{className:"artifact-list",children:C.map(N=>g.jsx(eR,{record:N},N.id))}):g.jsx("div",{className:"artifact-group-list",children:_.map(N=>g.jsxs("section",{className:"artifact-group",children:[g.jsx(rV,{sessionId:N.sessionId,count:N.artifacts.length,title:N.sessionId===null?void 0:D.get(N.sessionId)}),g.jsx("div",{className:"artifact-list",children:N.artifacts.map(A=>g.jsx(eR,{record:A},A.id))})]},N.sessionId??"(none)"))})]})}function iV(e){const{localTrace:t,historyOnly:n,current:r,running:s,slashNames:a}=e;if(n)return{disabled:!0,hint:"This agent is stopped. Open a session from Runs to inspect its chat and trace."};if(t)return{disabled:!0,hint:"Local trace (view only). Click New or pick a live session to chat."};if(r===null)return{disabled:!1,hint:a.length>0?`Slash commands: ${a.slice(0,4).join(", ")}${a.length>4?", …":""}, /help.`:""};if(r.mode==="task"||r.channelId!=="http")return r.mode==="task"?{disabled:!0,hint:"Task sessions (schedules) are fire-and-forget; watch only."}:r.channelId==="slack"?{disabled:!0,hint:`Slack thread — watch here, reply in Slack${r.externalUrl?" (Open in Slack above).":"."}`}:{disabled:!0,hint:`Sessions owned by the “${r.channelId}” channel take follow-ups through that channel; watch only here.`};if(!r.continuationToken)return{disabled:!0,hint:"This session has no continuation token; watch only."};const c=a.length>0?` Channel commands (${a.slice(0,3).join(", ")}${a.length>3?", …":""}) also work from here.`:"";return{disabled:!1,hint:s?"Turn running — Enter queues the follow-up; ⌘Enter sends now and interrupts.":`Follow-ups reuse this session’s rotating continuation token.${c}`}}function sV(){const e=Ke(t=>t.queued);return e.length===0?null:g.jsx("div",{className:"pg-queue",role:"list","aria-label":"Queued messages",children:e.map(t=>g.jsxs("div",{className:"pg-queue-item",role:"listitem",children:[g.jsx("button",{type:"button",className:"pg-queue-label",title:"Edit queued message",onClick:()=>it.editQueued(t.id),children:t.text}),g.jsxs("span",{className:"pg-queue-actions",children:[g.jsx(dr,{icon:"arrow-up",size:"sm",variant:"ghost","aria-label":"Send now (interrupts the running turn)",onClick:()=>{it.sendQueuedNow(t.id)}}),g.jsx(dr,{icon:"x",size:"sm",variant:"ghost","aria-label":"Remove queued message",onClick:()=>it.removeQueued(t.id)})]})]},t.id))})}function UM(){const[e,t]=v.useState(""),[n,r]=v.useState(0),s=v.useRef(null),a=Ke(N=>N.localTrace),l=Ke(N=>N.meta.readonly===!0),c=Ke(N=>N.current),d=Ke(N=>N.running),f=Ke(N=>N.composerDraft),h=Ke(N=>N.info);v.useEffect(()=>{f!==null&&(t(N=>N.trim()?`${N} ${f}`:f),it.consumeComposerDraft(),s.current?.focus())},[f]);const m=v.useMemo(()=>Fh(h?.channels),[h]),b=v.useMemo(()=>OM(m),[m]),y=v.useMemo(()=>{if(a||l)return null;const N=e.replace(/^\s+/,"");return!N.startsWith("/")||/\s/.test(N)?null:N},[e,a,l]),k=v.useMemo(()=>y===null?[]:kG(y,m),[y,m]),S=y!==null&&k.length>0,{disabled:R,hint:T}=iV({localTrace:a,historyOnly:l,current:c,running:d,slashNames:b}),E=d&&c!==null&&!a&&!l,C=async(N=e,A=!1)=>{if(!N.trim())return;await it.sendMessage(N,{force:A})&&(t(""),r(0))},_=N=>{t(`${N} `),r(0)},D=N=>{if(S){if(N.key==="ArrowDown"){N.preventDefault(),r(A=>(A+1)%k.length);return}if(N.key==="ArrowUp"){N.preventDefault(),r(A=>(A-1+k.length)%k.length);return}if(N.key==="Tab"||N.key==="Enter"&&!N.shiftKey){const A=k[n]??k[0];if(A!==void 0&&y!==A.name){N.preventDefault(),_(A.name);return}}if(N.key==="Escape"){N.preventDefault(),t(""),r(0);return}}N.key==="Enter"&&!N.shiftKey&&(N.preventDefault(),C(e,N.metaKey||N.ctrlKey))};return g.jsxs("div",{className:"pg-composer",children:[S?g.jsxs("ul",{className:"pg-slash-menu",role:"listbox","aria-label":"Slash commands",children:[k.map((N,A)=>g.jsx("li",{children:g.jsxs("button",{type:"button",role:"option","aria-selected":A===n,className:A===n?"pg-slash-item is-active":"pg-slash-item",onMouseDown:$=>{$.preventDefault(),_(N.name)},onMouseEnter:()=>r(A),children:[g.jsx("code",{className:"pg-slash-name",children:N.name}),g.jsx("span",{className:"pg-slash-method",children:N.method}),N.description?g.jsx("span",{className:"pg-slash-desc",children:N.description}):null]})},`${N.name}:${N.method}`)),g.jsxs("li",{className:"pg-slash-footer",children:[g.jsx("code",{children:"/help"})," lists all channel commands"]})]}):null,g.jsxs("div",{className:"inner",children:[g.jsx(sV,{}),g.jsxs("div",{className:R&&!E?"pg-prompt disabled":"pg-prompt",children:[g.jsx("textarea",{ref:s,className:"pg-prompt-input",rows:1,placeholder:b.length>0?`Message the agent, or ${b[0]} …`:"Message the agent...","aria-label":"Message the agent","aria-autocomplete":S?"list":void 0,"aria-expanded":S,value:e,onChange:N=>{t(N.target.value),r(0)},onKeyDown:D,disabled:R,autoFocus:!0}),g.jsxs("div",{className:"pg-prompt-toolbar",children:[g.jsx("span",{className:"pg-prompt-hint",title:T,children:T}),E&&!e.trim()?g.jsx(dr,{icon:"square",iconVariant:"filled",variant:"primary",tone:"monochrome",rounded:!0,size:"lg",className:"pg-prompt-stop","aria-label":"Stop the running turn",onClick:()=>{it.stopTurn()}}):g.jsx(dr,{icon:"arrow-up",variant:"primary",tone:"monochrome",rounded:!0,size:"lg","aria-label":d?"Queue message (⌘Enter sends now)":"Send message",disabled:R,onClick:()=>{C()}})]})]})]})]})}function oV(e){return{filename:`${e.runId}.eval-results.json`,text:`${JSON.stringify(e,null,2)}
|
|
21
|
+
`}}function aV(e,t,n="application/json"){const r=new Blob([t],{type:n}),s=URL.createObjectURL(r),a=document.createElement("a");a.href=s,a.download=e,a.target="_self",document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(s)}function ai(e){const t=e.at??null,n=e.ms??null;let r=e.startAt??null;return r===null&&t!==null&&n!==null&&n>0&&(r=t-n),r===null&&(r=t),{...e,startAt:r,at:t,ms:n}}function qM(e){const t=[];let n=null,r={};const s=new Map;let a=null,l="";const c=new Map;let d=null,f=1,h=0,m=0;function b(R){return n&&n.endedAt===null||(n={turnId:R?.turnId||`turn_${t.length+1}`,startedAt:R?.at?hl(R.at):null,endedAt:null,usage:null,rows:[],provisional:!0},t.push(n)),n}function y(R){b({turnId:R.turnId,at:null}).rows.push(R),R.ms&&R.ms>f&&(f=R.ms)}function k(R){if(a===null)return;const T=b(),E=R!==null&&a!==null?Math.max(0,R-a):null,C=l.trim()||void 0;T.rows.push(ai({kind:"think",label:C?Kr(C,80):"thinking",body:C,ms:E,at:R,startAt:a})),E&&E>f&&(f=E),a=null,l=""}for(const R of e){const T=R.data||{},E=hl(R.at);switch(R.type){case"turn.started":n&&n.provisional&&n.endedAt===null?(n.turnId=R.turnId||n.turnId,n.startedAt=E,n.provisional=!1):(n={turnId:R.turnId||`turn_${t.length+1}`,startedAt:E,endedAt:null,usage:null,rows:[],provisional:!1},t.push(n)),a=null,l="",d=null;break;case"message.received":y(ai({kind:"user",label:Kr(T.text,140),body:typeof T.text=="string"?T.text:void 0,at:E,startAt:E,ms:0,turnId:R.turnId}));break;case"reasoning.appended":if(typeof T.parentCallId=="string"&&T.parentCallId!==""){const C=c.get(T.parentCallId)??{start:E,text:""};C.start===null&&(C.start=E),typeof T.text=="string"&&(C.text=T.text),c.set(T.parentCallId,C);break}a===null&&(a=E),typeof T.text=="string"&&(l=T.text);break;case"reasoning.completed":if(typeof T.parentCallId=="string"&&T.parentCallId!==""){const C=T.parentCallId,_=c.get(C);c.delete(C);const D=_?.text.trim()||void 0;if(D!==void 0){const N=_?.start??E,A=N!==null&&E!==null?Math.max(0,E-N):null;y(ai({kind:"think",label:Kr(D,80),body:D,ms:A,at:E,startAt:N,turnId:R.turnId,depth:1,parentCallId:C}))}break}k(E);break;case"message.appended":if(typeof T.parentCallId=="string"&&T.parentCallId!=="")break;d===null&&(d=E);break;case"message.completed":{if(typeof T.parentCallId=="string"&&T.parentCallId!==""){const D=T.parentCallId;y(ai({kind:"agent",label:Kr(T.text,160)||"(empty reply)",body:typeof T.text=="string"?T.text:void 0,at:E,startAt:E,ms:0,turnId:R.turnId,depth:1,parentCallId:D}));break}const C=d??E,_=C!==null&&E!==null?Math.max(0,E-C):null;y(ai({kind:"agent",label:Kr(T.text,160)||"(empty reply)",body:typeof T.text=="string"?T.text:void 0,at:E,startAt:C,ms:_,turnId:R.turnId})),_&&_>f&&(f=_),d=null;break}case"actions.requested":for(const C of T.calls||[]){const _=typeof C.parentCallId=="string"&&C.parentCallId!==""?C.parentCallId:typeof T.parentCallId=="string"&&T.parentCallId!==""?T.parentCallId:void 0;if(_===void 0&&C.toolName==="task")continue;const D=_===void 0?C.callId:`${_}:${C.callId}`;r[D]={name:C.toolName,args:C.args,start:E,turnId:R.turnId,parentCallId:_}}break;case"action.result":{const C=T.callId;if(C==null)break;const _=typeof T.parentCallId=="string"&&T.parentCallId!==""?T.parentCallId:void 0;if(_===void 0&&T.toolName==="task"){delete r[C];break}const D=_===void 0?C:`${_}:${C}`,N=r[D];delete r[D];const A=N&&N.start!==null&&E!==null?E-N.start:null;h+=1,T.isError&&(m+=1);{const $=T.toolName||N?.name||"tool",z=N?.args;y(ai({kind:"tool",label:$+(z?` ${Kr(Hn(z,60),60)}`:""),toolName:$,callId:typeof C=="string"?C:String(C),toolArgs:z,toolOutput:T.output,body:typeof T.output=="string"?T.output:T.output!=null?Hn(T.output,4e3):void 0,ms:A,error:!!T.isError,at:E,startAt:N?.start??null,turnId:R.turnId,depth:_===void 0?0:1,parentCallId:_}))}A&&A>f&&(f=A);break}case"subagent.called":{const C=`task:${T.name||"subagent"}`,_=typeof T.callId=="string"?T.callId:String(T.callId);r[`sub:${_}`]={name:C,args:T.description,start:E,turnId:R.turnId};const D=b(R);D.rows.push(ai({kind:"tool",label:C,toolName:C,callId:_,toolArgs:T.description,ms:null,at:E,startAt:E,turnId:R.turnId,depth:0})),s.set(_,{turn:D,index:D.rows.length-1});break}case"subagent.completed":{const C=typeof T.callId=="string"?T.callId:String(T.callId),_=`sub:${C}`,D=r[_];delete r[_];const N=D&&D.start!==null&&E!==null?E-D.start:null;h+=1;const A=s.get(C);s.delete(C);const $=A!==void 0?A.turn.rows[A.index]:void 0;$!==void 0&&$.kind==="tool"?($.ms=N,$.at=E,N&&N>f&&(f=N)):y(ai({kind:"tool",label:D?.name||"subagent",toolName:D?.name||"subagent",callId:C,toolArgs:D?.args,ms:N,at:E,startAt:D?.start??null,turnId:R.turnId}));break}case"artifact.tagged":{const C=aM(T);y(ai({kind:"artifact",label:Kr(C.title===void 0?C.kind:`${C.kind} · ${C.title}`,120),body:T.data!=null?Hn(T.data,4e3):void 0,url:C.url,at:E,startAt:E,ms:0,turnId:R.turnId}));break}case"turn.completed":case"turn.failed":case"session.waiting":{if(R.type==="session.waiting"&&(n===null||n.endedAt!==null))break;const C=b(R);if((R.type==="turn.completed"||R.type==="turn.failed")&&(C.endedAt=E,C.usage=T.usage||null,C.cost=T.cost||null,C.failed=R.type==="turn.failed",C.error=T.message,C.startedAt!==null&&C.endedAt!==null)){const _=C.endedAt-C.startedAt;_>f&&(f=_),C.wallMs=_}if(k(E),d!==null&&E!==null){const _=Math.max(0,E-d);C.rows.push(ai({kind:"agent",label:"(streaming…)",ms:_,at:E,startAt:d})),d=null}for(const _ of Object.keys(r)){const D=r[_],N=D.start!==null&&E!==null?E-D.start:null;C.rows.push(ai({kind:"tool",label:`${D.name||"tool"} (no result)`,ms:N,error:!0,at:E,startAt:D.start,turnId:D.turnId})),N&&N>f&&(f=N)}r={},(R.type==="turn.completed"||R.type==="turn.failed")&&(n=null);break}}}for(const R of Object.keys(r)){const T=r[R];y(ai({kind:"tool",label:`${T.name||"tool"} (running…)`,ms:null,at:T.start,startAt:T.start,turnId:T.turnId}))}let S=null;for(const R of t){const T=R.cost?.totalUsd;typeof T=="number"&&Number.isFinite(T)&&(S=(S??0)+T)}return{turns:t,maxWallMs:f,totalTools:h,failedTools:m,eventCount:e.length,totalCostUsd:S}}function lV(e,t=6){if(!Number.isFinite(e)||e<=0)return[0];const n=e/Math.max(2,t-1),r=10**Math.floor(Math.log10(Math.max(n,1))),s=[1,2,2.5,5,10].map(c=>c*r),a=s.find(c=>n/c<=1.5)??s[s.length-1],l=[0];for(let c=a;c<e-a*.25&&(l.push(c),!(l.length>=t-1));c+=a);return l[l.length-1]!==e&&l.push(e),l}function uV({case:e}){const t=Object.entries(e.metrics??{});return t.length===0?null:g.jsx("div",{className:"eval-metrics","aria-label":"Eval metrics",children:t.map(([n,r])=>g.jsxs("span",{className:"eval-metric",title:n,children:[g.jsx("span",{className:"eval-metric-name",children:n}),g.jsx("span",{className:"eval-metric-value",children:String(r)})]},n))})}const cV={},fV={};function dV(e){return/\/factory\/([^/]+)\/agent\/playground\//.exec(e)?.[1]}const HM=new Map;for(const[e,t]of Object.entries(fV)){if(t?.default==null)continue;const n=typeof t.agentName=="string"&&t.agentName.trim()!==""?t.agentName.trim():void 0,r=dV(e),s=new Set;n!==void 0&&s.add(n),r!==void 0&&s.add(r);for(const a of s)HM.set(a,t.default)}function pV(e){if(!(e===void 0||e.trim()===""))return HM.get(e.trim())}const hV={passed:"Pass",failed:"Fail",scored:"Scored",skipped:"Skipped"},mV={passed:"success",failed:"danger",scored:"warn",skipped:"neutral"};function gV(e){return e.verdict??(e.ok===!0?"passed":"failed")}function bV(e){const t=[];return e.score!==void 0&&t.push(`score ${e.score.toFixed(3)}${e.threshold===void 0?"":` ≥ ${e.threshold}`}`),e.detail!==void 0&&t.push(e.detail),t.length===0?void 0:t.join(" · ")}function yV({a:e}){return e.passed?g.jsx(Yt,{name:"check-circle",variant:"filled",size:"sm",color:"green"}):e.severity==="soft"?g.jsx(Yt,{name:"minus-circle",variant:"filled",size:"sm",color:"yellow"}):g.jsx(Yt,{name:"x-circle",variant:"filled",size:"sm",color:"red"})}function GM(e,t=200){const[n,r]=v.useState(e);return v.useEffect(()=>{if(e){r(!0);return}if(!n)return;const s=window.setTimeout(()=>r(!1),t);return()=>window.clearTimeout(s)},[e,n,t]),e||n}const vV={user:"chat-bubble",agent:"sparkles",think:"brain-simple",tool:"wrench",artifact:"bookmark"},xV={user:"User",agent:"Assistant",think:"Thinking",tool:"Tool call",artifact:"Artifact"},kV={user:"accent",agent:"green",think:"yellow",tool:"purple",artifact:"orange"};function SV({row:e}){const[t,n]=v.useState(!1),r=e.body!==void 0&&e.body.length>0||e.toolArgs!==void 0||e.toolOutput!==void 0,s=t&&r,a=GM(s),l=e.error?"error":e.kind;return g.jsxs("div",{className:`eval-step eval-step-${e.kind}${e.error?" error":""}`,children:[g.jsxs("button",{type:"button",className:"eval-step-head",disabled:!r,onClick:()=>n(c=>!c),"aria-expanded":t,children:[g.jsxs("span",{className:`eval-step-kind kind-${l}`,children:[g.jsx(Yt,{name:vV[e.kind],size:"sm",color:e.error?"red":kV[e.kind]}),g.jsx("span",{className:"eval-step-kind-label",children:xV[e.kind]})]}),g.jsx("span",{className:"eval-step-label",title:e.label,children:e.kind==="tool"&&e.toolName!==void 0?e.toolName:e.label}),e.ms!=null&&e.ms>0?g.jsx("span",{className:"eval-step-ms",children:Ei(e.ms)}):null,r?g.jsx("span",{className:t?"eval-chevron open":"eval-chevron",children:g.jsx(Yt,{name:"chevron-right",size:10})}):null]}),a?g.jsx("div",{className:s?"eval-collapse-clip":"eval-collapse-clip collapsed","aria-hidden":!s,inert:s?void 0:!0,children:g.jsxs("div",{className:"eval-step-detail",children:[e.kind==="tool"&&e.toolArgs!==void 0?g.jsxs("div",{className:"eval-step-block",children:[g.jsx("div",{className:"eval-step-block-label",children:"args"}),g.jsx("pre",{children:mo(e.toolArgs)})]}):null,e.kind==="tool"&&e.toolOutput!==void 0?g.jsxs("div",{className:"eval-step-block",children:[g.jsx("div",{className:"eval-step-block-label",children:e.error?"error":"result"}),g.jsx("pre",{children:typeof e.toolOutput=="string"?e.toolOutput:mo(e.toolOutput)})]}):null,e.kind!=="tool"&&e.body!==void 0?g.jsx("div",{className:"eval-step-block",children:g.jsx("pre",{children:e.body})}):null,e.kind==="tool"&&e.body!==void 0&&e.toolOutput===void 0?g.jsx("div",{className:"eval-step-block",children:g.jsx("pre",{children:e.body})}):null]})}):null]})}function wV({sessionId:e,live:t}){const[n,r]=v.useState([]),[s,a]=v.useState(null),[l,c]=v.useState(!0),[d,f]=v.useState(!1),h=v.useRef(null);v.useEffect(()=>{let b=!1;const y=new AbortController;return c(!0),a(null),r([]),f(!1),(async()=>{let k=-1;try{const S=await it.api.eventsText(e);if(b)return;if(S.ok){const R=await S.text();if(b)return;const T=ov(R);for(const E of T)typeof E.index=="number"&&E.index>k&&(k=E.index);r(T)}}catch(S){b||a(S instanceof Error?S.message:String(S))}finally{b||c(!1)}if(!(!t||b)){f(!0);try{const S=await it.api.streamFetch(e,k+1,y.signal);if(!S.ok||!S.body){b||(a(`Stream failed (${S.status})`),f(!1));return}const R=S.body.getReader(),T=new TextDecoder;let E="";for(;;){const{done:C,value:_}=await R.read();if(C||b)break;E+=T.decode(_,{stream:!0});const D=E.split(`
|
|
22
|
+
`);E=D.pop()??"";const N=[];for(const A of D){const $=A.trim();if($)try{const z=JSON.parse($);N.push(z),typeof z.index=="number"&&z.index>k&&(k=z.index)}catch{}}N.length>0&&!b&&r(A=>[...A,...N])}}catch(S){!b&&!(S instanceof DOMException&&S.name==="AbortError")&&a(S instanceof Error?S.message:String(S))}finally{b||f(!1)}}})(),()=>{b=!0,y.abort()}},[e,t]),v.useEffect(()=>{t&&h.current&&h.current.scrollIntoView({block:"nearest"})},[n.length,t]);const m=v.useMemo(()=>qM(n),[n]);return l&&n.length===0?g.jsxs("div",{className:"eval-trace",children:[g.jsx("span",{className:"spin"})," Loading session trace…"]}):s!==null&&n.length===0?g.jsx("div",{className:"eval-error",children:s}):m.turns.length===0?g.jsx("div",{className:"eval-trace",children:g.jsx("div",{className:"eval-trace-empty",children:t?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"spin"})," Waiting for first events…"]}):"No events in this session."})}):g.jsxs("div",{className:"eval-trace",children:[g.jsxs("div",{className:"eval-trace-meta",children:[m.eventCount," events · ",m.totalTools," tool",m.totalTools===1?"":"s",m.failedTools>0?` · ${m.failedTools} failed`:"",t||d?g.jsxs(g.Fragment,{children:[" · ",g.jsxs("span",{className:"eval-live",children:[g.jsx("span",{className:"spin"})," live"]})]}):null]}),s!==null?g.jsx("div",{className:"eval-error",children:s}):null,m.turns.map((b,y)=>g.jsxs("div",{className:"eval-turn",children:[g.jsxs("div",{className:"eval-turn-head",children:["Turn ",y+1,b.failed?" · failed":"",b.wallMs!=null&&b.wallMs>0?` · ${Ei(b.wallMs)}`:""]}),b.rows.map((k,S)=>g.jsx(SV,{row:k},`${b.turnId}-${S}-${k.kind}`))]},b.turnId)),g.jsx("div",{ref:h})]})}function EV({c:e}){const t=e.inputs??[],n=e.toolCalls??[];return t.length>0||e.finalText!==void 0||n.length>0||e.tools!==void 0&&e.tools.length>0?g.jsxs("div",{className:"eval-io",children:[g.jsxs("div",{className:"eval-io-section",children:[g.jsx("div",{className:"eval-io-heading",children:"Inputs"}),t.length===0?g.jsx("div",{className:"eval-trace-empty",children:"None yet"}):t.map((s,a)=>g.jsxs("div",{className:"eval-step-block",children:[g.jsxs("div",{className:"eval-step-block-label",children:["message ",t.length>1?a+1:""]}),g.jsx("pre",{children:s})]},`in-${a}`))]}),g.jsxs("div",{className:"eval-io-section",children:[g.jsx("div",{className:"eval-io-heading",children:"Tool calls"}),n.length===0?g.jsx("div",{className:"eval-trace-empty",children:e.tools&&e.tools.length>0?e.tools.join(", "):"None"}):n.map((s,a)=>g.jsxs("div",{className:`eval-step eval-step-tool${s.isError?" error":""}`,children:[g.jsxs("div",{className:"eval-step-head",style:{cursor:"default"},children:[g.jsxs("span",{className:`eval-step-kind kind-${s.isError?"error":"tool"}`,children:[g.jsx(Yt,{name:"wrench",size:"sm",color:s.isError?"red":"purple"}),g.jsx("span",{className:"eval-step-kind-label",children:"Tool call"})]}),g.jsx("span",{className:"eval-step-label",children:s.toolName})]}),g.jsxs("div",{className:"eval-step-detail",children:[s.args!==void 0?g.jsxs("div",{className:"eval-step-block",children:[g.jsx("div",{className:"eval-step-block-label",children:"args"}),g.jsx("pre",{children:mo(s.args)})]}):null,s.output!==void 0?g.jsxs("div",{className:"eval-step-block",children:[g.jsx("div",{className:"eval-step-block-label",children:s.isError?"error":"result"}),g.jsx("pre",{children:typeof s.output=="string"?s.output:mo(s.output)})]}):null]})]},`tc-${a}-${s.toolName}`))]}),g.jsxs("div",{className:"eval-io-section",children:[g.jsx("div",{className:"eval-io-heading",children:"Output"}),e.finalText!==void 0&&e.finalText!==""?g.jsxs("div",{className:"eval-step-block",children:[g.jsx("div",{className:"eval-step-block-label",children:"final reply"}),g.jsx("pre",{children:e.finalText})]}):g.jsx("div",{className:"eval-trace-empty",children:e.status==="running"?"Waiting for reply…":"No final reply"})]})]}):g.jsx("div",{className:"eval-io",children:g.jsx("div",{className:"eval-trace-empty",children:e.status==="running"?"Waiting for inputs / outputs…":"No captured inputs or outputs."})})}function TV({c:e,batchRunning:t,customization:n}){const[r,s]=v.useState(!1),[a,l]=v.useState(!1),c=r||a,d=GM(c),f=v.useRef({io:!1,expanded:!1});c&&(f.current={io:a,expanded:r});const h=c?a:f.current.io,m=c?r:f.current.expanded,b=gV(e),y=e.status==="pending"?"Queued":e.status==="running"?"Running":hV[b],k=e.status==="done"?mV[b]:e.status==="running"?"accent":"neutral",S=e.sessionId!==void 0||e.status==="done"||e.status==="running",R=e.status==="done"||e.status==="running"||e.inputs!==void 0&&e.inputs.length>0||e.finalText!==void 0,T=n?.CaseMetrics,E=n?.CaseExtras;return g.jsxs("div",{className:`eval-case${r||a?" expanded":""}`,children:[g.jsxs("div",{className:"eval-case-head",children:[g.jsxs("button",{type:"button",className:"eval-id-btn",disabled:!S,"aria-expanded":r,title:S?r?"Collapse":"Expand live trace":void 0,onClick:()=>s(C=>!C),children:[g.jsx("span",{className:r?"eval-chevron open":"eval-chevron",children:g.jsx(Yt,{name:"chevron-right",size:10})}),g.jsx(uo,{variant:k,size:"sm",children:y}),g.jsx("span",{className:"eval-id",children:e.id})]}),g.jsxs("div",{className:"eval-case-actions",children:[e.durationMs!==void 0?g.jsxs("span",{className:"eval-dur",children:[(e.durationMs/1e3).toFixed(1),"s"]}):null,R?g.jsx(gn,{variant:a?"secondary":"ghost",size:"sm",onClick:()=>l(C=>!C),title:"View eval inputs, tool results, and final output",children:"I/O"}):null,e.sessionId!==void 0?g.jsxs(g.Fragment,{children:[g.jsx(gn,{variant:"ghost",size:"sm",onClick:()=>{it.openEvalCaseTrace(e.sessionId)},children:"Full trace"}),g.jsx(gn,{variant:"ghost",size:"sm",onClick:()=>{it.openEvalCaseSession(e.sessionId)},children:"Chat"})]}):null]})]}),e.description!==void 0?g.jsx("div",{className:"eval-desc",children:e.description}):null,T!==void 0?g.jsx(T,{case:e,batchRunning:t}):g.jsx(uV,{case:e}),E!==void 0?g.jsx(E,{case:e,batchRunning:t}):null,e.error!==void 0?g.jsxs("div",{className:"eval-error",children:["error: ",e.error]}):null,e.skipReason!==void 0?g.jsxs("div",{className:"eval-desc",children:["skipped: ",e.skipReason]}):null,e.assertions!==void 0&&e.assertions.length>0?g.jsx("div",{className:"eval-assertions",children:e.assertions.map(C=>{const _=bV(C);return g.jsxs("div",{className:C.passed||C.severity==="soft"?"eval-assertion":"eval-assertion fail",children:[g.jsx("span",{className:"eval-assertion-icon",children:g.jsx(yV,{a:C})}),g.jsxs("span",{className:"eval-assertion-text",children:[g.jsx("span",{className:"eval-assertion-name",children:C.name}),_!==void 0?g.jsx("span",{className:"eval-assertion-detail",children:_}):null]})]},`${C.name}-${C.passed}-${C.detail??""}`)})}):null,e.logs!==void 0&&e.logs.length>0?g.jsx("div",{className:"eval-logs",children:e.logs.map((C,_)=>g.jsx("div",{className:"eval-log-line",children:C},`${_}:${C}`))}):null,d?g.jsxs("div",{className:c?"eval-collapse-clip":"eval-collapse-clip collapsed","aria-hidden":!c,inert:c?void 0:!0,children:[h?g.jsx(EV,{c:e}):null,m&&e.sessionId!==void 0?g.jsx(wV,{sessionId:e.sessionId,live:e.status==="running"&&t},e.sessionId):null,m&&e.sessionId===void 0?g.jsx("div",{className:"eval-trace-empty",children:e.status==="running"?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"spin"})," ",tR(e)?"Aggregating sibling cases…":"Waiting for session…"]}):tR(e)?g.jsxs(g.Fragment,{children:["Suite summary (no agent session)",e.finalText!==void 0?g.jsx("pre",{className:"eval-final-text",children:e.finalText}):null]}):g.jsxs(g.Fragment,{children:["No session for this case",e.finalText!==void 0?g.jsx("pre",{className:"eval-final-text",children:e.finalText}):null]})}):null]}):null]})}function tR(e){return e.id==="overall"||e.id.endsWith("/overall")||(e.tags?.includes("summary")??!1)}function VM(){const e=Ke(y=>y.evalRun),t=Ke(y=>y.evalCases),n=Ke(y=>y.evalConfig),r=Ke(y=>y.meta.name),s=Ke(y=>y.meta.readonly===!0),a=v.useMemo(()=>pV(r),[r]),l=e?.status==="running",c=!s&&t.length>0,d=a?.RunSummary;if(e===null)return g.jsx("div",{className:"pg-evals",children:g.jsxs("div",{className:"eval-empty",children:[g.jsx("p",{children:"No eval run selected."}),g.jsxs("p",{className:"eval-hint",children:[t.length>0?`${t.length} case${t.length===1?"":"s"} discovered.`:"No evals/ cases found for this agent.",n?.maxConcurrency!==void 0?` Concurrency: ${n.maxConcurrency}.`:""]}),c?g.jsx("p",{className:"eval-hint",children:n?.durableRuns===!0?`Runs persist via the agent/storage.ts evals table (keeps last ${n.maxPlaygroundRuns??20}).`:`Runs stay in memory only (last ${n?.maxPlaygroundRuns??20}); lost when serve exits. Add an evals table to agent/storage.ts to keep them.`}):null,c?g.jsx(gn,{variant:"secondary",size:"sm",disabled:l,onClick:()=>{it.startEvalRun()},children:"Run all"}):null]})});const{summary:f,status:h}=e,m=h==="failed"||h==="cancelled"?"danger":l?"accent":"success",b=h==="failed"?"Failed":h==="cancelled"?"Cancelled":l?"Running":"Completed";return g.jsxs("div",{className:"pg-evals",children:[g.jsxs("div",{className:"eval-summary",children:[g.jsx(uo,{variant:m,size:"sm",children:b}),g.jsx("span",{className:"eval-run-id",title:"Eval ID",children:e.runId}),g.jsxs("span",{className:"eval-summary-stats",children:[g.jsxs("span",{className:"eval-summary-muted",children:[f.done,"/",f.total," done · ",f.passed," passed"]})," · ",f.failed," failed",f.scored!==void 0&&f.scored>0?g.jsxs("span",{className:"eval-summary-muted",children:[" · ",f.scored," scored"]}):null,f.skipped!==void 0&&f.skipped>0?g.jsxs("span",{className:"eval-summary-muted",children:[" · ",f.skipped," skipped"]}):null]}),d!==void 0?g.jsx(d,{run:e}):null,l?g.jsx("span",{className:"spin"}):null,e.error!==void 0?g.jsx("span",{className:"eval-error",children:e.error}):null,g.jsxs("div",{className:"eval-actions",children:[g.jsx(gn,{variant:"ghost",size:"sm",onClick:()=>{const y=oV(e);aV(y.filename,y.text)},title:"Download this eval run's results (assertions, metrics, I/O) as JSON",children:"Download run"}),l?g.jsx(gn,{variant:"secondary",size:"sm",onClick:()=>{it.cancelEvalRun(e.runId)},children:"Cancel"}):null,c?g.jsx(gn,{variant:"secondary",size:"sm",disabled:l,onClick:()=>{it.startEvalRun()},children:"Run all"}):null]})]}),g.jsx("div",{className:"eval-case-list",children:e.cases.map(y=>g.jsx(TV,{c:y,batchRunning:l,customization:a},y.id))})]})}const nR=typeof document<"u"?v.useLayoutEffect:v.useEffect;function RV({useFlushSync:e=!0,...t}){const n=v.useReducer(()=>({}),{})[1],r={...t,onChange:(a,l)=>{var c;e&&l?Ti.flushSync(n):n(),(c=t.onChange)==null||c.call(t,a,l)}},[s]=v.useState(()=>new mB(r));return s.setOptions(r),nR(()=>s._didMount(),[]),nR(()=>s._willUpdate()),s}function WM(e){return RV({observeElementRect:fB,observeElementOffset:dB,scrollToFn:hB,...e})}const KM=48;function CV(e){return e.scrollHeight-e.scrollTop-e.clientHeight}function _V(e,t=KM){return CV(e)<=t}function Vb(e){e.scrollTop=e.scrollHeight}function YM(e){const{contentKey:t,latchKey:n,thresholdPx:r=KM}=e,s=v.useRef(null),a=v.useRef(!0);return v.useEffect(()=>{const l=s.current;if(!l)return;const c=()=>{a.current=_V(l,r)};return l.addEventListener("scroll",c,{passive:!0}),()=>l.removeEventListener("scroll",c)},[r,t,n]),v.useLayoutEffect(()=>{if(n===void 0)return;a.current=!0;const l=s.current;l&&Vb(l)},[n]),v.useLayoutEffect(()=>{if(!a.current)return;const l=s.current;l&&Vb(l)},[t]),v.useEffect(()=>{const l=s.current;if(!l)return;const c=()=>{a.current&&Vb(l)};c();const d=new Set,f=new ResizeObserver(c),h=y=>{d.has(y)||(d.add(y),f.observe(y))},m=y=>{h(y);for(const k of y.children)m(k)};m(l);const b=new MutationObserver(y=>{for(const k of y)k.addedNodes.forEach(S=>{S instanceof Element&&m(S)});c()});return b.observe(l,{childList:!0,subtree:!0}),()=>{f.disconnect(),b.disconnect()}},[t,n]),{scrollRef:s}}function XM(){const e=Ke(a=>a.traceEvents),t=Ke(a=>a.current),n=e.length,{scrollRef:r}=YM({contentKey:n,latchKey:`${t?.sessionId??"none"}:${n}`}),s=WM({count:n,getScrollElement:()=>r.current,estimateSize:()=>18,overscan:24});return n===0?g.jsx("div",{className:"pg-raw",children:g.jsx(ks,{body:"Select a session to see the raw event stream."})}):g.jsxs("div",{className:"pg-raw",children:[g.jsx("div",{className:"head",children:"Raw NDJSON stream"}),g.jsx("div",{className:"raw-lines",ref:r,children:g.jsx("div",{style:{height:s.getTotalSize(),position:"relative",width:"100%"},children:s.getVirtualItems().map(a=>{const l=e[a.index];return g.jsxs("div",{"data-index":a.index,ref:s.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${a.start}px)`},children:[g.jsx("span",{children:`[${l.index??a.index}] `}),g.jsx("span",{className:"etype",children:l.type}),g.jsx("span",{children:` ${Hn(l.data,240)}`})]},a.key)})})})]})}const NV={user:"chat-bubble",agent:"sparkles",think:"brain-simple",tool:"wrench",artifact:"bookmark"},AV={user:"User",agent:"Assistant",think:"Thinking",tool:"Tool call",artifact:"Artifact"},OV={user:"accent",agent:"green",think:"yellow",tool:"purple",artifact:"orange"};function MV(e,t){return t?"red":OV[e]}function ZM({kind:e,error:t,showLabel:n=!0}){const r=MV(e,t),s=`${AV[e]}${t?" · error":""}`;return g.jsxs("span",{className:`wf-kind kind-${t?"error":e}`,title:n?void 0:s,"aria-label":n?void 0:s,children:[g.jsx(Yt,{name:NV[e],size:"sm",color:r}),n?g.jsx("span",{className:"wf-kind-label",children:s}):null]})}function IV(e){if(e.startedAt!=null)return e.startedAt;let t=Number.POSITIVE_INFINITY;for(const n of e.rows){const r=n.startAt??n.at;r!=null&&r<t&&(t=r)}return Number.isFinite(t)?t:0}function DV(e,t){if(e.wallMs!=null&&e.wallMs>0)return e.wallMs;if(e.endedAt!=null&&e.endedAt>t)return e.endedAt-t;let n=0;for(const r of e.rows){const a=(r.startAt??r.at??t)+(r.ms!=null&&r.ms>0?r.ms:0);a-t>n&&(n=a-t)}return Math.max(n,1)}function LV(e,t,n,r,s){const a=e.startAt??e.at??r,l=Math.max(0,a-r),c=e.ms!=null&&e.ms>0?e.ms:e.ms===0?0:null,d=c===null||c===0,f=s*.012,h=d?f:Math.max(c,f),m=Math.max(0,Math.min(100,l/s*100)),b=Math.max(.9,Math.min(100-m,h/s*100));return{id:`${n}-${t}`,row:e,turnId:n,wallMs:s,startMs:l,durMs:h,trueDurMs:c,leftPct:m,widthPct:b,instant:d}}function QM(e){return e===null?"—":e===0?"instant":Ei(e)}function ps({label:e,value:t}){return g.jsxs("div",{children:[g.jsx("dt",{children:e}),g.jsx("dd",{title:t,children:t})]})}function jV({span:e,onClose:t}){const{row:n,turnId:r,startMs:s,trueDurMs:a,wallMs:l}=e,c=a!=null?s+a:s,d=a!=null&&a>0&&l>0?`${(a/l*100).toFixed(1)}%`:"—",f=n.body?.trim()||"",h=n.toolArgs!=null?mo(n.toolArgs):"",m=n.toolOutput!=null?mo(n.toolOutput):n.kind==="tool"&&f?f:"";return g.jsxs("aside",{className:"trace-detail","aria-label":"Span details",children:[g.jsxs("div",{className:"trace-detail-head",children:[g.jsx(ZM,{kind:n.kind,error:n.error}),g.jsx(dr,{icon:"x",size:"sm",variant:"ghost","aria-label":"Close",onClick:t})]}),n.toolName?g.jsx("div",{className:"trace-detail-title",children:n.toolName}):null,n.url?g.jsx(oa,{className:"artifact-link",href:n.url,children:n.url}):null,n.kind!=="tool"&&f?g.jsx("pre",{className:"trace-detail-body",children:f}):null,n.kind!=="tool"&&!f&&n.label?g.jsx("div",{className:"trace-detail-label",children:n.label}):null,g.jsxs("dl",{className:"trace-detail-meta",children:[g.jsx(ps,{label:"Turn",value:r}),n.error?g.jsx(ps,{label:"Status",value:"error"}):null,g.jsx(ps,{label:"Start +",value:Ei(s)}),g.jsx(ps,{label:"End +",value:Ei(c)}),g.jsx(ps,{label:"Duration",value:QM(a)}),g.jsx(ps,{label:"% of turn",value:d}),g.jsx(ps,{label:"Started",value:XT(n.startAt)}),g.jsx(ps,{label:"Ended",value:XT(n.at)}),n.callId?g.jsx(ps,{label:"Call id",value:n.callId}):null]}),h?g.jsxs("div",{className:"trace-detail-section",children:[g.jsx("div",{className:"trace-detail-section-title",children:"Args"}),g.jsx("pre",{className:"trace-detail-body",children:h})]}):null,m?g.jsxs("div",{className:"trace-detail-section",children:[g.jsx("div",{className:"trace-detail-section-title",children:n.error?"Error":"Output"}),g.jsx("pre",{className:"trace-detail-body",children:m})]}):null]})}function zV({span:e,selected:t,detailOpen:n,onSelect:r}){const{row:s}=e,a=`${s.kind}${s.error?" error":""}`,l=QM(e.trueDurMs),c=e.widthPct>=8,d=s.depth??0;return g.jsxs("button",{type:"button",className:`wf-row ${a}${t?" selected":""}${d>0?" nested":""}`,onClick:r,"aria-pressed":t,style:d>0?{paddingLeft:`${8+d*14}px`}:void 0,children:[g.jsx(ZM,{kind:s.kind,error:s.error,showLabel:!n}),g.jsx("span",{className:"wf-name",title:s.label,children:d>0?`↳ ${s.label||"—"}`:s.label||"—"}),g.jsx("span",{className:"wf-track","aria-hidden":"true",children:g.jsx("span",{className:`wf-bar ${a}${e.instant?" instant":""}`,style:{left:`${e.leftPct}%`,width:`${e.widthPct}%`},children:c?g.jsx("span",{className:"wf-bar-label",children:l}):null})}),g.jsx("span",{className:"wf-dur",children:l})]})}function PV({turn:e,index:t,selectedId:n,onSelect:r}){const s=IV(e),a=DV(e,s),l=v.useMemo(()=>e.rows.map((h,m)=>LV(h,m,e.turnId,s,a)),[e,s,a]),c=v.useMemo(()=>lV(a),[a]),d=[];e.wallMs!==void 0&&d.push(`Worked for ${Qx(e.wallMs)}`),e.usage&&d.push(`in ${Wp(e.usage.inputTokens)} · out ${Wp(e.usage.outputTokens)}`);const f=e.cost?.totalUsd;return typeof f=="number"&&Number.isFinite(f)&&d.push(Jx(f)),g.jsxs("div",{className:e.failed?"trace-turn trace-turn--failed":"trace-turn",children:[g.jsxs("div",{className:"thead",children:[g.jsxs("span",{className:"thead-title",children:["Turn ",t+1,g.jsx("code",{className:"thead-id",children:e.turnId}),e.failed?g.jsxs("span",{className:"thead-failed",children:[g.jsx(Yt,{name:"x-circle",size:"sm",variant:"filled",color:"red","aria-hidden":"true"}),"Failed"]}):null]}),g.jsx("span",{className:"wall",children:d.join(" · ")||"In progress"})]}),g.jsxs("div",{className:"wf",children:[g.jsxs("div",{className:"wf-ruler","aria-hidden":"true",children:[g.jsx("span",{className:"wf-kind"}),g.jsx("span",{className:"wf-name"}),g.jsx("span",{className:"wf-track wf-ruler-track",children:c.map(h=>g.jsxs("span",{className:"wf-tick",style:{left:`${h/a*100}%`},children:[g.jsx("span",{className:"wf-tick-line"}),g.jsx("span",{className:"wf-tick-label",children:Ei(h)})]},h))}),g.jsx("span",{className:"wf-dur"})]}),l.length===0?g.jsx("div",{className:"trace-empty-turn",children:"No timed spans in this turn."}):l.map(h=>g.jsx(zV,{span:h,selected:n===h.id,detailOpen:n!=null,onSelect:()=>r(n===h.id?null:h)},h.id))]})]})}function JM(){const e=Ke(c=>c.traceEvents),t=Ke(c=>c.sessionCostUsd),n=v.useMemo(()=>qM(e),[e]),[r,s]=v.useState(null);if(!e.length)return g.jsx("div",{className:"pg-trace",children:g.jsx(ks,{body:"Select a session to see the timeline."})});const a=t??n.totalCostUsd,l=[`${n.eventCount} events`,`${n.turns.length} turn${n.turns.length===1?"":"s"}`,`${n.totalTools} tool call${n.totalTools===1?"":"s"}`,n.failedTools?`${n.failedTools} error${n.failedTools===1?"":"s"}`:null,a!==null?`cost ${Jx(a)}`:null].filter(Boolean).join(" · ");return g.jsx("div",{className:"pg-trace",children:g.jsxs("div",{className:"trace-rows",children:[g.jsx("div",{className:"trace-summary",children:l}),g.jsxs("div",{className:`trace-layout${r?" has-detail":""}`,children:[g.jsx("div",{className:"trace-main",children:n.turns.map((c,d)=>g.jsx(PV,{turn:c,index:d,selectedId:r?.id??null,onSelect:s},`${c.turnId||"turn"}-${d}`))}),r?g.jsx(jV,{span:r,onClose:()=>s(null)}):null]})]})})}function $V(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const BV=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,FV=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,UV={};function rR(e,t){return(UV.jsx?FV:BV).test(e)}const qV=/[ \t\n\f\r]/g;function HV(e){return typeof e=="object"?e.type==="text"?iR(e.value):!1:iR(e)}function iR(e){return e.replace(qV,"")===""}class ef{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ef.prototype.normal={};ef.prototype.property={};ef.prototype.space=void 0;function eI(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new ef(n,r,t)}function av(e){return e.toLowerCase()}class Lr{constructor(t,n){this.attribute=n,this.property=t}}Lr.prototype.attribute="";Lr.prototype.booleanish=!1;Lr.prototype.boolean=!1;Lr.prototype.commaOrSpaceSeparated=!1;Lr.prototype.commaSeparated=!1;Lr.prototype.defined=!1;Lr.prototype.mustUseProperty=!1;Lr.prototype.number=!1;Lr.prototype.overloadedBoolean=!1;Lr.prototype.property="";Lr.prototype.spaceSeparated=!1;Lr.prototype.space=void 0;let GV=0;const Mt=pa(),qn=pa(),lv=pa(),Fe=pa(),xn=pa(),ml=pa(),Wr=pa();function pa(){return 2**++GV}const uv=Object.freeze(Object.defineProperty({__proto__:null,boolean:Mt,booleanish:qn,commaOrSpaceSeparated:Wr,commaSeparated:ml,number:Fe,overloadedBoolean:lv,spaceSeparated:xn},Symbol.toStringTag,{value:"Module"})),Wb=Object.keys(uv);class nk extends Lr{constructor(t,n,r,s){let a=-1;if(super(t,n),sR(this,"space",s),typeof r=="number")for(;++a<Wb.length;){const l=Wb[a];sR(this,Wb[a],(r&uv[l])===uv[l])}}}nk.prototype.defined=!0;function sR(e,t,n){n&&(e[t]=n)}function Pl(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new nk(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[av(r)]=r,n[av(a.attribute)]=r}return new ef(t,n,e.space)}const tI=Pl({properties:{ariaActiveDescendant:null,ariaAtomic:qn,ariaAutoComplete:null,ariaBusy:qn,ariaChecked:qn,ariaColCount:Fe,ariaColIndex:Fe,ariaColSpan:Fe,ariaControls:xn,ariaCurrent:null,ariaDescribedBy:xn,ariaDetails:null,ariaDisabled:qn,ariaDropEffect:xn,ariaErrorMessage:null,ariaExpanded:qn,ariaFlowTo:xn,ariaGrabbed:qn,ariaHasPopup:null,ariaHidden:qn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xn,ariaLevel:Fe,ariaLive:null,ariaModal:qn,ariaMultiLine:qn,ariaMultiSelectable:qn,ariaOrientation:null,ariaOwns:xn,ariaPlaceholder:null,ariaPosInSet:Fe,ariaPressed:qn,ariaReadOnly:qn,ariaRelevant:null,ariaRequired:qn,ariaRoleDescription:xn,ariaRowCount:Fe,ariaRowIndex:Fe,ariaRowSpan:Fe,ariaSelected:qn,ariaSetSize:Fe,ariaSort:null,ariaValueMax:Fe,ariaValueMin:Fe,ariaValueNow:Fe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function nI(e,t){return t in e?e[t]:t}function rI(e,t){return nI(e,t.toLowerCase())}const VV=Pl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ml,acceptCharset:xn,accessKey:xn,action:null,allow:null,allowFullScreen:Mt,allowPaymentRequest:Mt,allowUserMedia:Mt,alt:null,as:null,async:Mt,autoCapitalize:null,autoComplete:xn,autoFocus:Mt,autoPlay:Mt,blocking:xn,capture:null,charSet:null,checked:Mt,cite:null,className:xn,cols:Fe,colSpan:null,content:null,contentEditable:qn,controls:Mt,controlsList:xn,coords:Fe|ml,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Mt,defer:Mt,dir:null,dirName:null,disabled:Mt,download:lv,draggable:qn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Mt,formTarget:null,headers:xn,height:Fe,hidden:lv,high:Fe,href:null,hrefLang:null,htmlFor:xn,httpEquiv:xn,id:null,imageSizes:null,imageSrcSet:null,inert:Mt,inputMode:null,integrity:null,is:null,isMap:Mt,itemId:null,itemProp:xn,itemRef:xn,itemScope:Mt,itemType:xn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Mt,low:Fe,manifest:null,max:null,maxLength:Fe,media:null,method:null,min:null,minLength:Fe,multiple:Mt,muted:Mt,name:null,nonce:null,noModule:Mt,noValidate:Mt,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:Mt,optimum:Fe,pattern:null,ping:xn,placeholder:null,playsInline:Mt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Mt,referrerPolicy:null,rel:xn,required:Mt,reversed:Mt,rows:Fe,rowSpan:Fe,sandbox:xn,scope:null,scoped:Mt,seamless:Mt,selected:Mt,shadowRootClonable:Mt,shadowRootDelegatesFocus:Mt,shadowRootMode:null,shape:null,size:Fe,sizes:null,slot:null,span:Fe,spellCheck:qn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Fe,step:null,style:null,tabIndex:Fe,target:null,title:null,translate:null,type:null,typeMustMatch:Mt,useMap:null,value:qn,width:Fe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xn,axis:null,background:null,bgColor:null,border:Fe,borderColor:null,bottomMargin:Fe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Mt,declare:Mt,event:null,face:null,frame:null,frameBorder:null,hSpace:Fe,leftMargin:Fe,link:null,longDesc:null,lowSrc:null,marginHeight:Fe,marginWidth:Fe,noResize:Mt,noHref:Mt,noShade:Mt,noWrap:Mt,object:null,profile:null,prompt:null,rev:null,rightMargin:Fe,rules:null,scheme:null,scrolling:qn,standby:null,summary:null,text:null,topMargin:Fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Fe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Mt,disableRemotePlayback:Mt,prefix:null,property:null,results:Fe,security:null,unselectable:null},space:"html",transform:rI}),WV=Pl({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:Wr,accentHeight:Fe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Fe,amplitude:Fe,arabicForm:null,ascent:Fe,attributeName:null,attributeType:null,azimuth:Fe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Fe,by:null,calcMode:null,capHeight:Fe,className:xn,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:Fe,diffuseConstant:Fe,direction:null,display:null,dur:null,divisor:Fe,dominantBaseline:null,download:Mt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Fe,enableBackground:null,end:null,event:null,exponent:Fe,externalResourcesRequired:null,fill:null,fillOpacity:Fe,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:ml,g2:ml,glyphName:ml,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Fe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Fe,horizOriginX:Fe,horizOriginY:Fe,id:null,ideographic:Fe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Fe,k:Fe,k1:Fe,k2:Fe,k3:Fe,k4:Fe,kernelMatrix:Wr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Fe,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:Fe,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:Fe,overlineThickness:Fe,paintOrder:null,panose1:null,path:null,pathLength:Fe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Fe,pointsAtY:Fe,pointsAtZ:Fe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Wr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Wr,rev:Wr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Wr,requiredFeatures:Wr,requiredFonts:Wr,requiredFormats:Wr,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:Fe,specularExponent:Fe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Fe,strikethroughThickness:Fe,string:null,stroke:null,strokeDashArray:Wr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Fe,strokeOpacity:Fe,strokeWidth:null,style:null,surfaceScale:Fe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Wr,tabIndex:Fe,tableValues:null,target:null,targetX:Fe,targetY:Fe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Wr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Fe,underlineThickness:Fe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Fe,values:null,vAlphabetic:Fe,vMathematical:Fe,vectorEffect:null,vHanging:Fe,vIdeographic:Fe,version:null,vertAdvY:Fe,vertOriginX:Fe,vertOriginY:Fe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Fe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:nI}),iI=Pl({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()}}),sI=Pl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:rI}),oI=Pl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),KV={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"},YV=/[A-Z]/g,oR=/-[a-z]/g,XV=/^data[-\w.:]+$/i;function ZV(e,t){const n=av(t);let r=t,s=Lr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&XV.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(oR,JV);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!oR.test(a)){let l=a.replace(YV,QV);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}s=nk}return new s(r,t)}function QV(e){return"-"+e.toLowerCase()}function JV(e){return e.charAt(1).toUpperCase()}const eW=eI([tI,VV,iI,sI,oI],"html"),rk=eI([tI,WV,iI,sI,oI],"svg");function tW(e){return e.join(" ").trim()}var el={},Kb,aR;function nW(){if(aR)return Kb;aR=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
23
|
+
`,f="/",h="*",m="",b="comment",y="declaration";Kb=function(S,R){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];R=R||{};var T=1,E=1;function C(q){var L=q.match(t);L&&(T+=L.length);var F=q.lastIndexOf(d);E=~F?q.length-F:E+q.length}function _(){var q={line:T,column:E};return function(L){return L.position=new D(q),$(),L}}function D(q){this.start=q,this.end={line:T,column:E},this.source=R.source}D.prototype.content=S;function N(q){var L=new Error(R.source+":"+T+":"+E+": "+q);if(L.reason=q,L.filename=R.source,L.line=T,L.column=E,L.source=S,!R.silent)throw L}function A(q){var L=q.exec(S);if(L){var F=L[0];return C(F),S=S.slice(F.length),L}}function $(){A(n)}function z(q){var L;for(q=q||[];L=I();)L!==!1&&q.push(L);return q}function I(){var q=_();if(!(f!=S.charAt(0)||h!=S.charAt(1))){for(var L=2;m!=S.charAt(L)&&(h!=S.charAt(L)||f!=S.charAt(L+1));)++L;if(L+=2,m===S.charAt(L-1))return N("End of comment missing");var F=S.slice(2,L-2);return E+=2,C(F),S=S.slice(L),E+=2,q({type:b,comment:F})}}function Y(){var q=_(),L=A(r);if(L){if(I(),!A(s))return N("property missing ':'");var F=A(a),U=q({type:y,property:k(L[0].replace(e,m)),value:F?k(F[0].replace(e,m)):m});return A(l),U}}function H(){var q=[];z(q);for(var L;L=Y();)L!==!1&&(q.push(L),z(q));return q}return $(),H()};function k(S){return S?S.replace(c,m):m}return Kb}var lR;function rW(){if(lR)return el;lR=1;var e=el&&el.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(el,"__esModule",{value:!0}),el.default=n;var t=e(nW());function n(r,s){var a=null;if(!r||typeof r!="string")return a;var l=(0,t.default)(r),c=typeof s=="function";return l.forEach(function(d){if(d.type==="declaration"){var f=d.property,h=d.value;c?s(f,h,d):h&&(a=a||{},a[f]=h)}}),a}return el}var iW=rW();const uR=zc(iW),sW=uR.default||uR,oW=Object.freeze(Object.defineProperty({__proto__:null,default:sW},Symbol.toStringTag,{value:"Module"})),aW=sz(oW);var Uu={},cR;function lW(){if(cR)return Uu;cR=1,Object.defineProperty(Uu,"__esModule",{value:!0}),Uu.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},l=function(f,h){return h.toUpperCase()},c=function(f,h){return"".concat(h,"-")},d=function(f,h){return h===void 0&&(h={}),a(f)?f:(f=f.toLowerCase(),h.reactCompat?f=f.replace(s,c):f=f.replace(r,c),f.replace(t,l))};return Uu.camelCase=d,Uu}var qu,fR;function uW(){if(fR)return qu;fR=1;var e=qu&&qu.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(aW),n=lW();function r(s,a){var l={};return!s||typeof s!="string"||(0,t.default)(s,function(c,d){c&&d&&(l[(0,n.camelCase)(c,a)]=d)}),l}return r.default=r,qu=r,qu}var cW=uW();const fW=zc(cW),aI=lI("end"),ik=lI("start");function lI(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 dW(e){const t=ik(e),n=aI(e);if(t&&n)return{start:t,end:n}}function fc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?dR(e.position):"start"in e||"end"in e?dR(e):"line"in e||"column"in e?cv(e):""}function cv(e){return pR(e&&e.line)+":"+pR(e&&e.column)}function dR(e){return cv(e&&e.start)+"-"+cv(e&&e.end)}function pR(e){return e&&typeof e=="number"?e:1}class pr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",a={},l=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?s=t:!a.cause&&t&&(l=!0,s=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=s,this.line=c?c.line:void 0,this.name=fc(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}pr.prototype.file="";pr.prototype.name="";pr.prototype.reason="";pr.prototype.message="";pr.prototype.stack="";pr.prototype.column=void 0;pr.prototype.line=void 0;pr.prototype.ancestors=void 0;pr.prototype.cause=void 0;pr.prototype.fatal=void 0;pr.prototype.place=void 0;pr.prototype.ruleId=void 0;pr.prototype.source=void 0;const sk={}.hasOwnProperty,pW=new Map,hW=/[A-Z]/g,mW=new Set(["table","tbody","thead","tfoot","tr"]),gW=new Set(["td","th"]),uI="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function bW(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=TW(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=EW(n,t.jsx,t.jsxs)}const s={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"?rk:eW,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=cI(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function cI(e,t,n){if(t.type==="element")return yW(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return vW(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return kW(e,t,n);if(t.type==="mdxjsEsm")return xW(e,t);if(t.type==="root")return SW(e,t,n);if(t.type==="text")return wW(e,t)}function yW(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=rk,e.schema=s),e.ancestors.push(t);const a=dI(e,t.tagName,!1),l=RW(e,t);let c=ak(e,t);return mW.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!HV(d):!0})),fI(e,l,a,t),ok(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function vW(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)}Dc(e,t.position)}function xW(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Dc(e,t.position)}function kW(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=rk,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:dI(e,t.name,!0),l=CW(e,t),c=ak(e,t);return fI(e,l,a,t),ok(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function SW(e,t,n){const r={};return ok(r,ak(e,t)),e.create(t,e.Fragment,r,n)}function wW(e,t){return t.value}function fI(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ok(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function EW(e,t,n){return r;function r(s,a,l,c){const f=Array.isArray(l.children)?n:t;return c?f(a,l,c):f(a,l)}}function TW(e,t){return n;function n(r,s,a,l){const c=Array.isArray(a.children),d=ik(r);return t(s,a,l,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function RW(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&sk.call(t.properties,s)){const a=_W(e,s,t.properties[s]);if(a){const[l,c]=a;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&gW.has(t.tagName)?r=c:n[l]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function CW(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Dc(e,t.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else Dc(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function ak(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:pW;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=s.get(d)||0;l=d+"-"+f,s.set(d,f+1)}}const c=cI(e,a,l);c!==void 0&&n.push(c)}return n}function _W(e,t,n){const r=ZV(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?$V(n):tW(n)),r.property==="style"){let s=typeof n=="object"?n:NW(e,String(n));return e.stylePropertyNameCase==="css"&&(s=AW(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?KV[r.property]||r.property:r.attribute,n]}}function NW(e,t){try{return fW(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new pr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=uI+"#cannot-parse-style-attribute",s}}function dI(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,l;for(;++a<s.length;){const c=rR(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=l}else r=rR(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return sk.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);Dc(e)}function Dc(e,t){const n=new pr("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=uI+"#cannot-handle-mdx-estrees-without-createevaluater",n}function AW(e){const t={};let n;for(n in e)sk.call(e,n)&&(t[OW(n)]=e[n]);return t}function OW(e){let t=e.replace(hW,MW);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function MW(e){return"-"+e.toLowerCase()}const Yb={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},IW={};function lk(e,t){const n=IW,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return pI(e,r,s)}function pI(e,t,n){if(DW(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 hR(e.children,t,n)}return Array.isArray(e)?hR(e,t,n):""}function hR(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=pI(e[s],t,n);return r.join("")}function DW(e){return!!(e&&typeof e=="object")}const mR=document.createElement("i");function uk(e){const t="&"+e+";";mR.innerHTML=t;const n=mR.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Zr(e,t,n,r){const s=e.length;let a=0,l;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);a<r.length;)l=r.slice(a,a+1e4),l.unshift(t,0),e.splice(...l),a+=1e4,t+=1e4}function li(e,t){return e.length>0?(Zr(e,e.length,0,t),e):t}const gR={}.hasOwnProperty;function hI(e){const t={};let n=-1;for(;++n<e.length;)LW(t,e[n]);return t}function LW(e,t){let n;for(n in t){const s=(gR.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){gR.call(s,l)||(s[l]=[]);const c=a[l];jW(s[l],Array.isArray(c)?c:c?[c]:[])}}}function jW(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Zr(e,0,0,r)}function mI(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)}function ki(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const vr=wo(/[A-Za-z]/),ur=wo(/[\dA-Za-z]/),zW=wo(/[#-'*+\--9=?A-Z^-~]/);function Yp(e){return e!==null&&(e<32||e===127)}const fv=wo(/\d/),PW=wo(/[\dA-Fa-f]/),$W=wo(/[!-/:-@[-`{-~]/);function mt(e){return e!==null&&e<-2}function bn(e){return e!==null&&(e<0||e===32)}function Ut(e){return e===-2||e===-1||e===32}const Hh=wo(new RegExp("\\p{P}|\\p{S}","u")),aa=wo(/\s/);function wo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function $l(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&ur(e.charCodeAt(n+1))&&ur(e.charCodeAt(n+2)))s=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(l=String.fromCharCode(a,c),s=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+s+1,l=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function Zt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(d){return Ut(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ut(d)&&a++<s?(e.consume(d),c):(e.exit(n),t(d))}}const BW={tokenize:FW};function FW(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Zt(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return mt(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),l)}}const UW={tokenize:qW},bR={tokenize:HW};function qW(e){const t=this,n=[];let r=0,s,a,l;return c;function c(C){if(r<n.length){const _=n[r];return t.containerState=_[1],e.attempt(_[0].continuation,d,f)(C)}return f(C)}function d(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&E();const _=t.events.length;let D=_,N;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){N=t.events[D][1].end;break}T(r);let A=_;for(;A<t.events.length;)t.events[A][1].end={...N},A++;return Zr(t.events,D+1,0,t.events.slice(_)),t.events.length=A,f(C)}return c(C)}function f(C){if(r===n.length){if(!s)return b(C);if(s.currentConstruct&&s.currentConstruct.concrete)return k(C);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(bR,h,m)(C)}function h(C){return s&&E(),T(r),b(C)}function m(C){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,k(C)}function b(C){return t.containerState={},e.attempt(bR,y,k)(C)}function y(C){return r++,n.push([t.currentConstruct,t.containerState]),b(C)}function k(C){if(C===null){s&&E(),T(0),e.consume(C);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),S(C)}function S(C){if(C===null){R(e.exit("chunkFlow"),!0),T(0),e.consume(C);return}return mt(C)?(e.consume(C),R(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(C),S)}function R(C,_){const D=t.sliceStream(C);if(_&&D.push(null),C.previous=a,a&&(a.next=C),a=C,s.defineSkip(C.start),s.write(D),t.parser.lazy[C.start.line]){let N=s.events.length;for(;N--;)if(s.events[N][1].start.offset<l&&(!s.events[N][1].end||s.events[N][1].end.offset>l))return;const A=t.events.length;let $=A,z,I;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){if(z){I=t.events[$][1].end;break}z=!0}for(T(r),N=A;N<t.events.length;)t.events[N][1].end={...I},N++;Zr(t.events,$+1,0,t.events.slice(A)),t.events.length=N}}function T(C){let _=n.length;for(;_-- >C;){const D=n[_];t.containerState=D[1],D[0].exit.call(t,e)}n.length=C}function E(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function HW(e,t,n){return Zt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function _l(e){if(e===null||bn(e)||aa(e))return 1;if(Hh(e))return 2}function Gh(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const dv={name:"attention",resolveAll:GW,tokenize:VW};function GW(e,t){let n=-1,r,s,a,l,c,d,f,h;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;d=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 m={...e[r][1].end},b={...e[n][1].start};yR(m,-d),yR(b,d),l={type:d>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},a={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:d>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[r][1].end={...l.start},e[n][1].start={...c.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=li(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=li(f,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",a,t]]),f=li(f,Gh(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=li(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,f=li(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Zr(e,r-1,n-r+3,f),n=r+f.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function VW(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=_l(r);let a;return l;function l(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const f=e.exit("attentionSequence"),h=_l(d),m=!h||h===2&&s||n.includes(d),b=!s||s===2&&h||n.includes(r);return f._open=!!(a===42?m:m&&(s||!b)),f._close=!!(a===42?b:b&&(h||!m)),t(d)}}function yR(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const WW={name:"autolink",tokenize:KW};function KW(e,t,n){let r=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return vr(y)?(e.consume(y),l):y===64?n(y):f(y)}function l(y){return y===43||y===45||y===46||ur(y)?(r=1,c(y)):f(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||ur(y))&&r++<32?(e.consume(y),c):(r=0,f(y))}function d(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||Yp(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),h):zW(y)?(e.consume(y),f):n(y)}function h(y){return ur(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,h):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||ur(y))&&r++<63){const k=y===45?b:m;return e.consume(y),k}return n(y)}}const tf={partial:!0,tokenize:YW};function YW(e,t,n){return r;function r(a){return Ut(a)?Zt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||mt(a)?t(a):n(a)}}const gI={continuation:{tokenize:ZW},exit:QW,name:"blockQuote",tokenize:XW};function XW(e,t,n){const r=this;return s;function s(l){if(l===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return n(l)}function a(l){return Ut(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function ZW(e,t,n){const r=this;return s;function s(l){return Ut(l)?Zt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(gI,t,n)(l)}}function QW(e){e.exit("blockQuote")}const bI={name:"characterEscape",tokenize:JW};function JW(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),s}function s(a){return $W(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const yI={name:"characterReference",tokenize:eK};function eK(e,t,n){const r=this;let s=0,a,l;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,l=ur,h(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=PW,h):(e.enter("characterReferenceValue"),a=7,l=fv,h(m))}function h(m){if(m===59&&s){const b=e.exit("characterReferenceValue");return l===ur&&!uk(r.sliceSerialize(b))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(m)&&s++<a?(e.consume(m),h):n(m)}}const vR={partial:!0,tokenize:nK},xR={concrete:!0,name:"codeFenced",tokenize:tK};function tK(e,t,n){const r=this,s={partial:!0,tokenize:D};let a=0,l=0,c;return d;function d(N){return f(N)}function f(N){const A=r.events[r.events.length-1];return a=A&&A[1].type==="linePrefix"?A[2].sliceSerialize(A[1],!0).length:0,c=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(N)}function h(N){return N===c?(l++,e.consume(N),h):l<3?n(N):(e.exit("codeFencedFenceSequence"),Ut(N)?Zt(e,m,"whitespace")(N):m(N))}function m(N){return N===null||mt(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(vR,S,_)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(N))}function b(N){return N===null||mt(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(N)):Ut(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Zt(e,y,"whitespace")(N)):N===96&&N===c?n(N):(e.consume(N),b)}function y(N){return N===null||mt(N)?m(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(N))}function k(N){return N===null||mt(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(N)):N===96&&N===c?n(N):(e.consume(N),k)}function S(N){return e.attempt(s,_,R)(N)}function R(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),T}function T(N){return a>0&&Ut(N)?Zt(e,E,"linePrefix",a+1)(N):E(N)}function E(N){return N===null||mt(N)?e.check(vR,S,_)(N):(e.enter("codeFlowValue"),C(N))}function C(N){return N===null||mt(N)?(e.exit("codeFlowValue"),E(N)):(e.consume(N),C)}function _(N){return e.exit("codeFenced"),t(N)}function D(N,A,$){let z=0;return I;function I(F){return N.enter("lineEnding"),N.consume(F),N.exit("lineEnding"),Y}function Y(F){return N.enter("codeFencedFence"),Ut(F)?Zt(N,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):H(F)}function H(F){return F===c?(N.enter("codeFencedFenceSequence"),q(F)):$(F)}function q(F){return F===c?(z++,N.consume(F),q):z>=l?(N.exit("codeFencedFenceSequence"),Ut(F)?Zt(N,L,"whitespace")(F):L(F)):$(F)}function L(F){return F===null||mt(F)?(N.exit("codeFencedFence"),A(F)):$(F)}}}function nK(e,t,n){const r=this;return s;function s(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Xb={name:"codeIndented",tokenize:iK},rK={partial:!0,tokenize:sK};function iK(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),Zt(e,a,"linePrefix",5)(f)}function a(f){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(f):n(f)}function l(f){return f===null?d(f):mt(f)?e.attempt(rK,l,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||mt(f)?(e.exit("codeFlowValue"),l(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function sK(e,t,n){const r=this;return s;function s(l){return r.parser.lazy[r.now().line]?n(l):mt(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):Zt(e,a,"linePrefix",5)(l)}function a(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):mt(l)?s(l):n(l)}}const oK={name:"codeText",previous:lK,resolve:aK,tokenize:uK};function aK(e){let t=e.length-4,n=3,r,s;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;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function lK(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function uK(e,t,n){let r=0,s,a;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),r++,c):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),s=0,h(m)):mt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||mt(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function h(m){return m===96?(e.consume(m),s++,h):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class cK{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 s=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&Hu(this.left,r),a.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),Hu(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Hu(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);Hu(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Hu(this.left,n.reverse())}}}function Hu(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 vI(e){const t={};let n=-1,r,s,a,l,c,d,f;const h=new cK(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,fK(h,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(l=h.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(s&&(h.get(s)[1].type="lineEndingBlank"),l[1].type="lineEnding",s=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;s&&(r[1].end={...h.get(s)[1].start},c=h.slice(s,n),c.unshift(r),h.splice(s,n-s+1,c))}}return Zr(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!f}function fK(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const a=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,d=[],f={};let h,m,b=-1,y=n,k=0,S=0;const R=[S];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(h=r.sliceStream(y),y.next||h.push(null),m&&l.defineSkip(y.start),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(h),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++b<c.length;)c[b][0]==="exit"&&c[b-1][0]==="enter"&&c[b][1].type===c[b-1][1].type&&c[b][1].start.line!==c[b][1].end.line&&(S=b+1,R.push(S),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(l.events=[],y?(y._tokenizer=void 0,y.previous=void 0):R.pop(),b=R.length;b--;){const T=c.slice(R[b],R[b+1]),E=a.pop();d.push([E,E+T.length-1]),e.splice(E,2,T)}for(d.reverse(),b=-1;++b<d.length;)f[k+d[b][0]]=k+d[b][1],k+=d[b][1]-d[b][0]-1;return f}const dK={resolve:hK,tokenize:mK},pK={partial:!0,tokenize:gK};function hK(e){return vI(e),e}function mK(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?a(c):mt(c)?e.check(pK,l,a)(c):(e.consume(c),s)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function gK(e,t,n){const r=this;return s;function s(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Zt(e,a,"linePrefix")}function a(l){if(l===null||mt(l))return n(l);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function xI(e,t,n,r,s,a,l,c,d){const f=d||Number.POSITIVE_INFINITY;let h=0;return m;function m(T){return T===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(T),e.exit(a),b):T===null||T===32||T===41||Yp(T)?n(T):(e.enter(r),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(T))}function b(T){return T===62?(e.enter(a),e.consume(T),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(T))}function y(T){return T===62?(e.exit("chunkString"),e.exit(c),b(T)):T===null||T===60||mt(T)?n(T):(e.consume(T),T===92?k:y)}function k(T){return T===60||T===62||T===92?(e.consume(T),y):y(T)}function S(T){return!h&&(T===null||T===41||bn(T))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(r),t(T)):h<f&&T===40?(e.consume(T),h++,S):T===41?(e.consume(T),h--,S):T===null||T===32||T===40||Yp(T)?n(T):(e.consume(T),T===92?R:S)}function R(T){return T===40||T===41||T===92?(e.consume(T),S):S(T)}}function kI(e,t,n,r,s,a){const l=this;let c=0,d;return f;function f(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),e.enter(a),h}function h(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(y):y===93?(e.exit(a),e.enter(s),e.consume(y),e.exit(s),e.exit(r),t):mt(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||mt(y)||c++>999?(e.exit("chunkString"),h(y)):(e.consume(y),d||(d=!Ut(y)),y===92?b:m)}function b(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function SI(e,t,n,r,s,a){let l;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(s),e.consume(b),e.exit(s),l=b===40?41:b,d):n(b)}function d(b){return b===l?(e.enter(s),e.consume(b),e.exit(s),e.exit(r),t):(e.enter(a),f(b))}function f(b){return b===l?(e.exit(a),d(l)):b===null?n(b):mt(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Zt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===l||b===null||mt(b)?(e.exit("chunkString"),f(b)):(e.consume(b),b===92?m:h)}function m(b){return b===l||b===92?(e.consume(b),h):h(b)}}function dc(e,t){let n;return r;function r(s){return mt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):Ut(s)?Zt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const bK={name:"definition",tokenize:vK},yK={partial:!0,tokenize:xK};function vK(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),l(y)}function l(y){return kI.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=ki(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return bn(y)?dc(e,f)(y):f(y)}function f(y){return xI(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function h(y){return e.attempt(yK,m,m)(y)}function m(y){return Ut(y)?Zt(e,b,"whitespace")(y):b(y)}function b(y){return y===null||mt(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function xK(e,t,n){return r;function r(c){return bn(c)?dc(e,s)(c):n(c)}function s(c){return SI(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ut(c)?Zt(e,l,"whitespace")(c):l(c)}function l(c){return c===null||mt(c)?t(c):n(c)}}const kK={name:"hardBreakEscape",tokenize:SK};function SK(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return mt(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const wK={name:"headingAtx",resolve:EK,tokenize:TK};function EK(e,t){let n=e.length-2,r=3,s,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Zr(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function TK(e,t,n){let r=0;return s;function s(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),l(h)}function l(h){return h===35&&r++<6?(e.consume(h),l):h===null||bn(h)?(e.exit("atxHeadingSequence"),c(h)):n(h)}function c(h){return h===35?(e.enter("atxHeadingSequence"),d(h)):h===null||mt(h)?(e.exit("atxHeading"),t(h)):Ut(h)?Zt(e,c,"whitespace")(h):(e.enter("atxHeadingText"),f(h))}function d(h){return h===35?(e.consume(h),d):(e.exit("atxHeadingSequence"),c(h))}function f(h){return h===null||h===35||bn(h)?(e.exit("atxHeadingText"),c(h)):(e.consume(h),f)}}const RK=["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"],kR=["pre","script","style","textarea"],CK={concrete:!0,name:"htmlFlow",resolveTo:AK,tokenize:OK},_K={partial:!0,tokenize:IK},NK={partial:!0,tokenize:MK};function AK(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 OK(e,t,n){const r=this;let s,a,l,c,d;return f;function f(j){return h(j)}function h(j){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(j),m}function m(j){return j===33?(e.consume(j),b):j===47?(e.consume(j),a=!0,S):j===63?(e.consume(j),s=3,r.interrupt?t:O):vr(j)?(e.consume(j),l=String.fromCharCode(j),R):n(j)}function b(j){return j===45?(e.consume(j),s=2,y):j===91?(e.consume(j),s=5,c=0,k):vr(j)?(e.consume(j),s=4,r.interrupt?t:O):n(j)}function y(j){return j===45?(e.consume(j),r.interrupt?t:O):n(j)}function k(j){const Z="CDATA[";return j===Z.charCodeAt(c++)?(e.consume(j),c===Z.length?r.interrupt?t:H:k):n(j)}function S(j){return vr(j)?(e.consume(j),l=String.fromCharCode(j),R):n(j)}function R(j){if(j===null||j===47||j===62||bn(j)){const Z=j===47,te=l.toLowerCase();return!Z&&!a&&kR.includes(te)?(s=1,r.interrupt?t(j):H(j)):RK.includes(l.toLowerCase())?(s=6,Z?(e.consume(j),T):r.interrupt?t(j):H(j)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(j):a?E(j):C(j))}return j===45||ur(j)?(e.consume(j),l+=String.fromCharCode(j),R):n(j)}function T(j){return j===62?(e.consume(j),r.interrupt?t:H):n(j)}function E(j){return Ut(j)?(e.consume(j),E):I(j)}function C(j){return j===47?(e.consume(j),I):j===58||j===95||vr(j)?(e.consume(j),_):Ut(j)?(e.consume(j),C):I(j)}function _(j){return j===45||j===46||j===58||j===95||ur(j)?(e.consume(j),_):D(j)}function D(j){return j===61?(e.consume(j),N):Ut(j)?(e.consume(j),D):C(j)}function N(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),d=j,A):Ut(j)?(e.consume(j),N):$(j)}function A(j){return j===d?(e.consume(j),d=null,z):j===null||mt(j)?n(j):(e.consume(j),A)}function $(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||bn(j)?D(j):(e.consume(j),$)}function z(j){return j===47||j===62||Ut(j)?C(j):n(j)}function I(j){return j===62?(e.consume(j),Y):n(j)}function Y(j){return j===null||mt(j)?H(j):Ut(j)?(e.consume(j),Y):n(j)}function H(j){return j===45&&s===2?(e.consume(j),U):j===60&&s===1?(e.consume(j),W):j===62&&s===4?(e.consume(j),P):j===63&&s===3?(e.consume(j),O):j===93&&s===5?(e.consume(j),K):mt(j)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(_K,V,q)(j)):j===null||mt(j)?(e.exit("htmlFlowData"),q(j)):(e.consume(j),H)}function q(j){return e.check(NK,L,V)(j)}function L(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),F}function F(j){return j===null||mt(j)?q(j):(e.enter("htmlFlowData"),H(j))}function U(j){return j===45?(e.consume(j),O):H(j)}function W(j){return j===47?(e.consume(j),l="",B):H(j)}function B(j){if(j===62){const Z=l.toLowerCase();return kR.includes(Z)?(e.consume(j),P):H(j)}return vr(j)&&l.length<8?(e.consume(j),l+=String.fromCharCode(j),B):H(j)}function K(j){return j===93?(e.consume(j),O):H(j)}function O(j){return j===62?(e.consume(j),P):j===45&&s===2?(e.consume(j),O):H(j)}function P(j){return j===null||mt(j)?(e.exit("htmlFlowData"),V(j)):(e.consume(j),P)}function V(j){return e.exit("htmlFlow"),t(j)}}function MK(e,t,n){const r=this;return s;function s(l){return mt(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):n(l)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function IK(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(tf,t,n)}}const DK={name:"htmlText",tokenize:LK};function LK(e,t,n){const r=this;let s,a,l;return c;function c(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),d}function d(O){return O===33?(e.consume(O),f):O===47?(e.consume(O),D):O===63?(e.consume(O),C):vr(O)?(e.consume(O),$):n(O)}function f(O){return O===45?(e.consume(O),h):O===91?(e.consume(O),a=0,k):vr(O)?(e.consume(O),E):n(O)}function h(O){return O===45?(e.consume(O),y):n(O)}function m(O){return O===null?n(O):O===45?(e.consume(O),b):mt(O)?(l=m,W(O)):(e.consume(O),m)}function b(O){return O===45?(e.consume(O),y):m(O)}function y(O){return O===62?U(O):O===45?b(O):m(O)}function k(O){const P="CDATA[";return O===P.charCodeAt(a++)?(e.consume(O),a===P.length?S:k):n(O)}function S(O){return O===null?n(O):O===93?(e.consume(O),R):mt(O)?(l=S,W(O)):(e.consume(O),S)}function R(O){return O===93?(e.consume(O),T):S(O)}function T(O){return O===62?U(O):O===93?(e.consume(O),T):S(O)}function E(O){return O===null||O===62?U(O):mt(O)?(l=E,W(O)):(e.consume(O),E)}function C(O){return O===null?n(O):O===63?(e.consume(O),_):mt(O)?(l=C,W(O)):(e.consume(O),C)}function _(O){return O===62?U(O):C(O)}function D(O){return vr(O)?(e.consume(O),N):n(O)}function N(O){return O===45||ur(O)?(e.consume(O),N):A(O)}function A(O){return mt(O)?(l=A,W(O)):Ut(O)?(e.consume(O),A):U(O)}function $(O){return O===45||ur(O)?(e.consume(O),$):O===47||O===62||bn(O)?z(O):n(O)}function z(O){return O===47?(e.consume(O),U):O===58||O===95||vr(O)?(e.consume(O),I):mt(O)?(l=z,W(O)):Ut(O)?(e.consume(O),z):U(O)}function I(O){return O===45||O===46||O===58||O===95||ur(O)?(e.consume(O),I):Y(O)}function Y(O){return O===61?(e.consume(O),H):mt(O)?(l=Y,W(O)):Ut(O)?(e.consume(O),Y):z(O)}function H(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),s=O,q):mt(O)?(l=H,W(O)):Ut(O)?(e.consume(O),H):(e.consume(O),L)}function q(O){return O===s?(e.consume(O),s=void 0,F):O===null?n(O):mt(O)?(l=q,W(O)):(e.consume(O),q)}function L(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||bn(O)?z(O):(e.consume(O),L)}function F(O){return O===47||O===62||bn(O)?z(O):n(O)}function U(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function W(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),B}function B(O){return Ut(O)?Zt(e,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):K(O)}function K(O){return e.enter("htmlTextData"),l(O)}}const ck={name:"labelEnd",resolveAll:$K,resolveTo:BK,tokenize:FK},jK={tokenize:UK},zK={tokenize:qK},PK={tokenize:HK};function $K(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 s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&Zr(e,0,e.length,n),e}function BK(e,t){let n=e.length,r=0,s,a,l,c;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(l=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[l-2][1].start}};return c=[["enter",d,t],["enter",f,t]],c=li(c,e.slice(a+1,a+r+3)),c=li(c,[["enter",h,t]]),c=li(c,Gh(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),c=li(c,[["exit",h,t],e[l-2],e[l-1],["exit",f,t]]),c=li(c,e.slice(l+1)),c=li(c,[["exit",d,t]]),Zr(e,a,e.length,c),e}function FK(e,t,n){const r=this;let s=r.events.length,a,l;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return c;function c(b){return a?a._inactive?m(b):(l=r.parser.defined.includes(ki(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(jK,h,l?h:m)(b):b===91?e.attempt(zK,h,l?f:m)(b):l?h(b):m(b)}function f(b){return e.attempt(PK,h,m)(b)}function h(b){return t(b)}function m(b){return a._balanced=!0,n(b)}}function UK(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),s}function s(m){return bn(m)?dc(e,a)(m):a(m)}function a(m){return m===41?h(m):xI(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return bn(m)?dc(e,d)(m):h(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?SI(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):h(m)}function f(m){return bn(m)?dc(e,h)(m):h(m)}function h(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function qK(e,t,n){const r=this;return s;function s(c){return kI.call(r,e,a,l,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(ki(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function HK(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),s}function s(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const GK={name:"labelStartImage",resolveAll:ck.resolveAll,tokenize:VK};function VK(e,t,n){const r=this;return s;function s(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const WK={name:"labelStartLink",resolveAll:ck.resolveAll,tokenize:KK};function KK(e,t,n){const r=this;return s;function s(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Zb={name:"lineEnding",tokenize:YK};function YK(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Zt(e,t,"linePrefix")}}const hp={name:"thematicBreak",tokenize:XK};function XK(e,t,n){let r=0,s;return a;function a(f){return e.enter("thematicBreak"),l(f)}function l(f){return s=f,c(f)}function c(f){return f===s?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||mt(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ut(f)?Zt(e,c,"whitespace")(f):c(f))}}const Nr={continuation:{tokenize:eY},exit:nY,name:"list",tokenize:JK},ZK={partial:!0,tokenize:rY},QK={partial:!0,tokenize:tY};function JK(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,l=0;return c;function c(y){const k=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:fv(y)){if(r.containerState.type||(r.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(hp,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return fv(y)&&++l<10?(e.consume(y),d):(!r.interrupt||l<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(tf,r.interrupt?n:h,e.attempt(ZK,b,m))}function h(y){return r.containerState.initialBlankLine=!0,a++,b(y)}function m(y){return Ut(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),b):n(y)}function b(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function eY(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(tf,s,a);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Zt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ut(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(QK,t,l)(c))}function l(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Zt(e,e.attempt(Nr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function tY(e,t,n){const r=this;return Zt(e,s,"listItemIndent",r.containerState.size+1);function s(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(a):n(a)}}function nY(e){e.exit(this.containerState.type)}function rY(e,t,n){const r=this;return Zt(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const l=r.events[r.events.length-1];return!Ut(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const SR={name:"setextUnderline",resolveTo:iY,tokenize:sY};function iY(e,t){let n=e.length,r,s,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",l,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function sY(e,t,n){const r=this;let s;return a;function a(f){let h=r.events.length,m;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){m=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),s=f,l(f)):n(f)}function l(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===s?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),Ut(f)?Zt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||mt(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const oY={tokenize:aY};function aY(e){const t=this,n=e.attempt(tf,r,e.attempt(this.parser.constructs.flowInitial,s,Zt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(dK,s)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const lY={resolveAll:EI()},uY=wI("string"),cY=wI("text");function wI(e){return{resolveAll:EI(e==="text"?fY:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,l,c);return l;function l(h){return f(h)?a(h):c(h)}function c(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),d}function d(h){return f(h)?(n.exit("data"),a(h)):(n.consume(h),d)}function f(h){if(h===null)return!0;const m=s[h];let b=-1;if(m)for(;++b<m.length;){const y=m[b];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function EI(e){return t;function t(n,r){let s=-1,a;for(;++s<=n.length;)a===void 0?n[s]&&n[s][1].type==="data"&&(a=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==a+2&&(n[a][1].end=n[s-1][1].end,n.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(n,r):n}}function fY(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],s=t.sliceStream(r);let a=s.length,l=-1,c=0,d;for(;a--;){const f=s[a];if(typeof f=="string"){for(l=f.length;f.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(f===-2)d=!0,c++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const dY={42:Nr,43:Nr,45:Nr,48:Nr,49:Nr,50:Nr,51:Nr,52:Nr,53:Nr,54:Nr,55:Nr,56:Nr,57:Nr,62:gI},pY={91:bK},hY={[-2]:Xb,[-1]:Xb,32:Xb},mY={35:wK,42:hp,45:[SR,hp],60:CK,61:SR,95:hp,96:xR,126:xR},gY={38:yI,92:bI},bY={[-5]:Zb,[-4]:Zb,[-3]:Zb,33:GK,38:yI,42:dv,60:[WW,DK],91:WK,92:[kK,bI],93:ck,95:dv,96:oK},yY={null:[dv,lY]},vY={null:[42,95]},xY={null:[]},kY=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:vY,contentInitial:pY,disable:xY,document:dY,flow:mY,flowInitial:hY,insideSpan:yY,string:gY,text:bY},Symbol.toStringTag,{value:"Module"}));function SY(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 s={},a=[];let l=[],c=[];const d={attempt:A(D),check:A(N),consume:E,enter:C,exit:_,interrupt:A(N,{interrupt:!0})},f={code:null,containerState:{},defineSkip:S,events:[],now:k,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:m};let h=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(Y){return l=li(l,Y),R(),l[l.length-1]!==null?[]:($(t,0),f.events=Gh(a,f.events,f),f.events)}function b(Y,H){return EY(y(Y),H)}function y(Y){return wY(l,Y)}function k(){const{_bufferIndex:Y,_index:H,line:q,column:L,offset:F}=r;return{_bufferIndex:Y,_index:H,line:q,column:L,offset:F}}function S(Y){s[Y.line]=Y.column,I()}function R(){let Y;for(;r._index<l.length;){const H=l[r._index];if(typeof H=="string")for(Y=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===Y&&r._bufferIndex<H.length;)T(H.charCodeAt(r._bufferIndex));else T(H)}}function T(Y){h=h(Y)}function E(Y){mt(Y)?(r.line++,r.column=1,r.offset+=Y===-3?2:1,I()):Y!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=Y}function C(Y,H){const q=H||{};return q.type=Y,q.start=k(),f.events.push(["enter",q,f]),c.push(q),q}function _(Y){const H=c.pop();return H.end=k(),f.events.push(["exit",H,f]),H}function D(Y,H){$(Y,H.from)}function N(Y,H){H.restore()}function A(Y,H){return q;function q(L,F,U){let W,B,K,O;return Array.isArray(L)?V(L):"tokenize"in L?V([L]):P(L);function P(se){return ue;function ue(le){const fe=le!==null&&se[le],ge=le!==null&&se.null,_e=[...Array.isArray(fe)?fe:fe?[fe]:[],...Array.isArray(ge)?ge:ge?[ge]:[]];return V(_e)(le)}}function V(se){return W=se,B=0,se.length===0?U:j(se[B])}function j(se){return ue;function ue(le){return O=z(),K=se,se.partial||(f.currentConstruct=se),se.name&&f.parser.constructs.disable.null.includes(se.name)?te():se.tokenize.call(H?Object.assign(Object.create(f),H):f,d,Z,te)(le)}}function Z(se){return Y(K,O),F}function te(se){return O.restore(),++B<W.length?j(W[B]):U}}}function $(Y,H){Y.resolveAll&&!a.includes(Y)&&a.push(Y),Y.resolve&&Zr(f.events,H,f.events.length-H,Y.resolve(f.events.slice(H),f)),Y.resolveTo&&(f.events=Y.resolveTo(f.events,f))}function z(){const Y=k(),H=f.previous,q=f.currentConstruct,L=f.events.length,F=Array.from(c);return{from:L,restore:U};function U(){r=Y,f.previous=H,f.currentConstruct=q,f.events.length=L,c=F,I()}}function I(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function wY(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let l;if(n===s)l=[e[n].slice(r,a)];else{if(l=e.slice(n,s),r>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(r):l.shift()}a>0&&l.push(e[s].slice(0,a))}return l}function EY(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const a=e[n];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
|
|
24
|
+
`;break}case-3:{l=`\r
|
|
25
|
+
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&s)continue;l=" ";break}default:l=String.fromCharCode(a)}s=a===-2,r.push(l)}return r.join("")}function TY(e){const r={constructs:hI([kY,...(e||{}).extensions||[]]),content:s(BW),defined:[],document:s(UW),flow:s(oY),lazy:{},string:s(uY),text:s(cY)};return r;function s(a){return l;function l(c){return SY(r,a,c)}}}function RY(e){for(;!vI(e););return e}const wR=/[\0\t\n\r]/g;function CY(){let e=1,t="",n=!0,r;return s;function s(a,l,c){const d=[];let f,h,m,b,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(wR.lastIndex=m,f=wR.exec(a),b=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(b),!f){t=a.slice(m);break}if(y===10&&m===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<b&&(d.push(a.slice(m,b)),e+=b-m),y){case 0:{d.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,d.push(-2);e++<h;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=b+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const _Y=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function NY(e){return e.replace(_Y,AY)}function AY(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return mI(n.slice(a?2:1),a?16:10)}return uk(n)||e}const TI={}.hasOwnProperty;function OY(e,t,n){return typeof t!="string"&&(n=t,t=void 0),MY(n)(RY(TY(n).document().write(CY()(e,t,!0))))}function MY(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Me),autolinkProtocol:z,autolinkEmail:z,atxHeading:a(Oe),blockQuote:a(ge),characterEscape:z,characterReference:z,codeFenced:a(_e),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(_e,l),codeText:a(oe,l),codeTextData:z,data:z,codeFlowValue:z,definition:a(ye),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(Se),hardBreakEscape:a(we),hardBreakTrailing:a(we),htmlFlow:a(ke,l),htmlFlowData:z,htmlText:a(ke,l),htmlTextData:z,image:a(De),label:l,link:a(Me),listItem:a(He),listItemValue:b,listOrdered:a(Le,m),listUnordered:a(Le),paragraph:a(be),reference:j,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(Oe),strong:a(Re),thematicBreak:a(ce)},exit:{atxHeading:d(),atxHeadingSequence:D,autolink:d(),autolinkEmail:fe,autolinkProtocol:le,blockQuote:d(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:te,characterReferenceMarkerNumeric:te,characterReferenceValue:se,characterReference:ue,codeFenced:d(R),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:k,codeFlowValue:I,codeIndented:d(T),codeText:d(F),codeTextData:I,data:I,definition:d(),definitionDestinationString:_,definitionLabelString:E,definitionTitleString:C,emphasis:d(),hardBreakEscape:d(H),hardBreakTrailing:d(H),htmlFlow:d(q),htmlFlowData:I,htmlText:d(L),htmlTextData:I,image:d(W),label:K,labelText:B,lineEnding:Y,link:d(U),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Z,resourceDestinationString:O,resourceTitleString:P,resource:V,setextHeading:d($),setextHeadingLineSequence:A,setextHeadingText:N,strong:d(),thematicBreak:d()}};RI(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let re={type:"root",children:[]};const xe={stack:[re],tokenStack:[],config:t,enter:c,exit:f,buffer:l,resume:h,data:n},$e=[];let Xe=-1;for(;++Xe<J.length;)if(J[Xe][1].type==="listOrdered"||J[Xe][1].type==="listUnordered")if(J[Xe][0]==="enter")$e.push(Xe);else{const Ye=$e.pop();Xe=s(J,Ye,Xe)}for(Xe=-1;++Xe<J.length;){const Ye=t[J[Xe][0]];TI.call(Ye,J[Xe][1].type)&&Ye[J[Xe][1].type].call(Object.assign({sliceSerialize:J[Xe][2].sliceSerialize},xe),J[Xe][1])}if(xe.tokenStack.length>0){const Ye=xe.tokenStack[xe.tokenStack.length-1];(Ye[1]||ER).call(xe,void 0,Ye[0])}for(re.position={start:no(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:no(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Xe=-1;++Xe<t.transforms.length;)re=t.transforms[Xe](re)||re;return re}function s(J,re,xe){let $e=re-1,Xe=-1,Ye=!1,ht,Qe,yt,kt;for(;++$e<=xe;){const tt=J[$e];switch(tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{tt[0]==="enter"?Xe++:Xe--,kt=void 0;break}case"lineEndingBlank":{tt[0]==="enter"&&(ht&&!kt&&!Xe&&!yt&&(yt=$e),kt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:kt=void 0}if(!Xe&&tt[0]==="enter"&&tt[1].type==="listItemPrefix"||Xe===-1&&tt[0]==="exit"&&(tt[1].type==="listUnordered"||tt[1].type==="listOrdered")){if(ht){let Tt=$e;for(Qe=void 0;Tt--;){const _t=J[Tt];if(_t[1].type==="lineEnding"||_t[1].type==="lineEndingBlank"){if(_t[0]==="exit")continue;Qe&&(J[Qe][1].type="lineEndingBlank",Ye=!0),_t[1].type="lineEnding",Qe=Tt}else if(!(_t[1].type==="linePrefix"||_t[1].type==="blockQuotePrefix"||_t[1].type==="blockQuotePrefixWhitespace"||_t[1].type==="blockQuoteMarker"||_t[1].type==="listItemIndent"))break}yt&&(!Qe||yt<Qe)&&(ht._spread=!0),ht.end=Object.assign({},Qe?J[Qe][1].start:tt[1].end),J.splice(Qe||$e,0,["exit",ht,tt[2]]),$e++,xe++}if(tt[1].type==="listItemPrefix"){const Tt={type:"listItem",_spread:!1,start:Object.assign({},tt[1].start),end:void 0};ht=Tt,J.splice($e,0,["enter",Tt,tt[2]]),$e++,xe++,yt=void 0,kt=!0}}}return J[re][1]._spread=Ye,xe}function a(J,re){return xe;function xe($e){c.call(this,J($e),$e),re&&re.call(this,$e)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(J,re,xe){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([re,xe||void 0]),J.position={start:no(re.start),end:void 0}}function d(J){return re;function re(xe){J&&J.call(this,xe),f.call(this,xe)}}function f(J,re){const xe=this.stack.pop(),$e=this.tokenStack.pop();if($e)$e[0].type!==J.type&&(re?re.call(this,J,$e[0]):($e[1]||ER).call(this,J,$e[0]));else throw new Error("Cannot close `"+J.type+"` ("+fc({start:J.start,end:J.end})+"): it’s not open");xe.position.end=no(J.end)}function h(){return lk(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function b(J){if(this.data.expectingFirstListItemValue){const re=this.stack[this.stack.length-2];re.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function y(){const J=this.resume(),re=this.stack[this.stack.length-1];re.lang=J}function k(){const J=this.resume(),re=this.stack[this.stack.length-1];re.meta=J}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function R(){const J=this.resume(),re=this.stack[this.stack.length-1];re.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function T(){const J=this.resume(),re=this.stack[this.stack.length-1];re.value=J.replace(/(\r?\n|\r)$/g,"")}function E(J){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.label=re,xe.identifier=ki(this.sliceSerialize(J)).toLowerCase()}function C(){const J=this.resume(),re=this.stack[this.stack.length-1];re.title=J}function _(){const J=this.resume(),re=this.stack[this.stack.length-1];re.url=J}function D(J){const re=this.stack[this.stack.length-1];if(!re.depth){const xe=this.sliceSerialize(J).length;re.depth=xe}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function A(J){const re=this.stack[this.stack.length-1];re.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function z(J){const xe=this.stack[this.stack.length-1].children;let $e=xe[xe.length-1];(!$e||$e.type!=="text")&&($e=ee(),$e.position={start:no(J.start),end:void 0},xe.push($e)),this.stack.push($e)}function I(J){const re=this.stack.pop();re.value+=this.sliceSerialize(J),re.position.end=no(J.end)}function Y(J){const re=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=re.children[re.children.length-1];xe.position.end=no(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(re.type)&&(z.call(this,J),I.call(this,J))}function H(){this.data.atHardBreak=!0}function q(){const J=this.resume(),re=this.stack[this.stack.length-1];re.value=J}function L(){const J=this.resume(),re=this.stack[this.stack.length-1];re.value=J}function F(){const J=this.resume(),re=this.stack[this.stack.length-1];re.value=J}function U(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=re,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function W(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=re,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function B(J){const re=this.sliceSerialize(J),xe=this.stack[this.stack.length-2];xe.label=NY(re),xe.identifier=ki(re).toLowerCase()}function K(){const J=this.stack[this.stack.length-1],re=this.resume(),xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,xe.type==="link"){const $e=J.children;xe.children=$e}else xe.alt=re}function O(){const J=this.resume(),re=this.stack[this.stack.length-1];re.url=J}function P(){const J=this.resume(),re=this.stack[this.stack.length-1];re.title=J}function V(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function Z(J){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.label=re,xe.identifier=ki(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function te(J){this.data.characterReferenceType=J.type}function se(J){const re=this.sliceSerialize(J),xe=this.data.characterReferenceType;let $e;xe?($e=mI(re,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$e=uk(re);const Xe=this.stack[this.stack.length-1];Xe.value+=$e}function ue(J){const re=this.stack.pop();re.position.end=no(J.end)}function le(J){I.call(this,J);const re=this.stack[this.stack.length-1];re.url=this.sliceSerialize(J)}function fe(J){I.call(this,J);const re=this.stack[this.stack.length-1];re.url="mailto:"+this.sliceSerialize(J)}function ge(){return{type:"blockquote",children:[]}}function _e(){return{type:"code",lang:null,meta:null,value:""}}function oe(){return{type:"inlineCode",value:""}}function ye(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Se(){return{type:"emphasis",children:[]}}function Oe(){return{type:"heading",depth:0,children:[]}}function we(){return{type:"break"}}function ke(){return{type:"html",value:""}}function De(){return{type:"image",title:null,url:"",alt:null}}function Me(){return{type:"link",title:null,url:"",children:[]}}function Le(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function He(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function be(){return{type:"paragraph",children:[]}}function Re(){return{type:"strong",children:[]}}function ee(){return{type:"text",value:""}}function ce(){return{type:"thematicBreak"}}}function no(e){return{line:e.line,column:e.column,offset:e.offset}}function RI(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?RI(e,r):IY(e,r)}}function IY(e,t){let n;for(n in t)if(TI.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 ER(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+fc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+fc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+fc({start:t.start,end:t.end})+") is still open")}function DY(e){const t=this;t.parser=n;function n(r){return OY(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function LY(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 jY(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
26
|
+
`}]}function zY(e,t){const n=t.value?t.value+`
|
|
27
|
+
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);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 PY(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $Y(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function BY(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=$l(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let l,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function FY(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 UY(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function CI(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 s=e.all(t),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const l=s[s.length-1];return l&&l.type==="text"?l.value+=r:s.push({type:"text",value:r}),s}function qY(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return CI(e,t);const s={src:$l(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,a),e.applyData(t,a)}function HY(e,t){const n={src:$l(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 GY(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 VY(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return CI(e,t);const s={href:$l(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function WY(e,t){const n={href:$l(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 KY(e,t,n){const r=e.all(t),s=n?YY(n):_I(t),a={},l=[];if(typeof t.checked=="boolean"){const h=r[0];let m;h&&h.type==="element"&&h.tagName==="p"?m=h:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const h=r[c];(s||c!==0||h.type!=="element"||h.tagName!=="p")&&l.push({type:"text",value:`
|
|
28
|
+
`}),h.type==="element"&&h.tagName==="p"&&!s?l.push(...h.children):l.push(h)}const d=r[r.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
|
|
29
|
+
`});const f={type:"element",tagName:"li",properties:a,children:l};return e.patch(t,f),e.applyData(t,f)}function YY(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=_I(n[r])}return t}function _I(e){const t=e.spread;return t??e.children.length>1}function XY(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const l=r[s];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function ZY(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function QY(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function JY(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function eX(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),s.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=ik(t.children[1]),d=aI(t.children[t.children.length-1]);c&&d&&(l.position={start:c,end:d}),s.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function tX(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let d=-1;const f=[];for(;++d<c;){const m=t.children[d],b={},y=l?l[d]:void 0;y&&(b.align=y);let k={type:"element",tagName:a,properties:b,children:[]};m&&(k.children=e.all(m),e.patch(m,k),k=e.applyData(m,k)),f.push(k)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,h),e.applyData(t,h)}function nX(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const TR=9,RR=32;function rX(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(CR(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(CR(t.slice(s),s>0,!1)),a.join("")}function CR(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===TR||a===RR;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===TR||a===RR;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function iX(e,t){const n={type:"text",value:rX(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function sX(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const oX={blockquote:LY,break:jY,code:zY,delete:PY,emphasis:$Y,footnoteReference:BY,heading:FY,html:UY,imageReference:qY,image:HY,inlineCode:GY,linkReference:VY,link:WY,listItem:KY,list:XY,paragraph:ZY,root:QY,strong:JY,table:eX,tableCell:nX,tableRow:tX,text:iX,thematicBreak:sX,toml:Vd,yaml:Vd,definition:Vd,footnoteDefinition:Vd};function Vd(){}const NI=-1,Vh=0,pc=1,Xp=2,fk=3,dk=4,pk=5,hk=6,AI=7,OI=8,_R=typeof self=="object"?self:globalThis,aX=(e,t)=>{const n=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,l]=t[s];switch(a){case Vh:case NI:return n(l,s);case pc:{const c=n([],s);for(const d of l)c.push(r(d));return c}case Xp:{const c=n({},s);for(const[d,f]of l)c[r(d)]=r(f);return c}case fk:return n(new Date(l),s);case dk:{const{source:c,flags:d}=l;return n(new RegExp(c,d),s)}case pk:{const c=n(new Map,s);for(const[d,f]of l)c.set(r(d),r(f));return c}case hk:{const c=n(new Set,s);for(const d of l)c.add(r(d));return c}case AI:{const{name:c,message:d}=l;return n(new _R[c](d),s)}case OI:return n(BigInt(l),s);case"BigInt":return n(Object(BigInt(l)),s);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(new _R[a](l),s)};return r},NR=e=>aX(new Map,e)(0),tl="",{toString:lX}={},{keys:uX}=Object,Gu=e=>{const t=typeof e;if(t!=="object"||!e)return[Vh,t];const n=lX.call(e).slice(8,-1);switch(n){case"Array":return[pc,tl];case"Object":return[Xp,tl];case"Date":return[fk,tl];case"RegExp":return[dk,tl];case"Map":return[pk,tl];case"Set":return[hk,tl];case"DataView":return[pc,n]}return n.includes("Array")?[pc,n]:n.includes("Error")?[AI,n]:[Xp,n]},Wd=([e,t])=>e===Vh&&(t==="function"||t==="symbol"),cX=(e,t,n,r)=>{const s=(l,c)=>{const d=r.push(l)-1;return n.set(c,d),d},a=l=>{if(n.has(l))return n.get(l);let[c,d]=Gu(l);switch(c){case Vh:{let h=l;switch(d){case"bigint":c=OI,h=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);h=null;break;case"undefined":return s([NI],l)}return s([c,h],l)}case pc:{if(d){let b=l;return d==="DataView"?b=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(l)),s([d,[...b]],l)}const h=[],m=s([c,h],l);for(const b of l)h.push(a(b));return m}case Xp:{if(d)switch(d){case"BigInt":return s([d,l.toString()],l);case"Boolean":case"Number":case"String":return s([d,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const h=[],m=s([c,h],l);for(const b of uX(l))(e||!Wd(Gu(l[b])))&&h.push([a(b),a(l[b])]);return m}case fk:return s([c,l.toISOString()],l);case dk:{const{source:h,flags:m}=l;return s([c,{source:h,flags:m}],l)}case pk:{const h=[],m=s([c,h],l);for(const[b,y]of l)(e||!(Wd(Gu(b))||Wd(Gu(y))))&&h.push([a(b),a(y)]);return m}case hk:{const h=[],m=s([c,h],l);for(const b of l)(e||!Wd(Gu(b)))&&h.push(a(b));return m}}const{message:f}=l;return s([c,{name:d,message:f}],l)};return a},AR=(e,{json:t,lossy:n}={})=>{const r=[];return cX(!(t||n),!!t,new Map,r)(e),r},Zp=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?NR(AR(e,t)):structuredClone(e):(e,t)=>NR(AR(e,t));function fX(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 dX(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function pX(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||fX,r=e.options.footnoteBackLabel||dX,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const h=e.all(f),m=String(f.identifier).toUpperCase(),b=$l(m.toLowerCase());let y=0;const k=[],S=e.footnoteCounts.get(m);for(;S!==void 0&&++y<=S;){k.length>0&&k.push({type:"text",value:" "});let E=typeof n=="string"?n:n(d,y);typeof E=="string"&&(E={type:"text",value:E}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}const R=h[h.length-1];if(R&&R.type==="element"&&R.tagName==="p"){const E=R.children[R.children.length-1];E&&E.type==="text"?E.value+=" ":R.children.push({type:"text",value:" "}),R.children.push(...k)}else h.push(...k);const T={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(h,!0)};e.patch(f,T),c.push(T)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Zp(l),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
30
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
31
|
+
`}]}}const nf=(function(e){if(e==null)return bX;if(typeof e=="function")return Wh(e);if(typeof e=="object")return Array.isArray(e)?hX(e):mX(e);if(typeof e=="string")return gX(e);throw new Error("Expected function, string, or object as test")});function hX(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=nf(e[n]);return Wh(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function mX(e){const t=e;return Wh(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function gX(e){return Wh(t);function t(n){return n&&n.type===e}}function Wh(e){return t;function t(n,r,s){return!!(yX(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function bX(){return!0}function yX(e){return e!==null&&typeof e=="object"&&"type"in e}const MI=[],vX=!0,pv=!1,xX="skip";function II(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=nf(s),l=r?-1:1;c(e,void 0,[])();function c(d,f,h){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return b;function b(){let y=MI,k,S,R;if((!t||a(d,f,h[h.length-1]||void 0))&&(y=kX(n(d,h)),y[0]===pv))return y;if("children"in d&&d.children){const T=d;if(T.children&&y[0]!==xX)for(S=(r?T.children.length:-1)+l,R=h.concat(T);S>-1&&S<T.children.length;){const E=T.children[S];if(k=c(E,S,R)(),k[0]===pv)return k;S=typeof k[1]=="number"?k[1]:S+l}}return y}}}function kX(e){return Array.isArray(e)?e:typeof e=="number"?[vX,e]:e==null?MI:[e]}function Kh(e,t,n,r){let s,a,l;typeof t=="function"&&typeof n!="function"?(a=void 0,l=t,s=n):(a=t,l=n,s=r),II(e,a,c,s);function c(d,f){const h=f[f.length-1],m=h?h.children.indexOf(d):void 0;return l(d,m,h)}}const hv={}.hasOwnProperty,SX={};function wX(e,t){const n=t||SX,r=new Map,s=new Map,a=new Map,l={...oX,...n.handlers},c={all:f,applyData:TX,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:l,one:d,options:n,patch:EX,wrap:CX};return Kh(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const m=h.type==="definition"?r:s,b=String(h.identifier).toUpperCase();m.has(b)||m.set(b,h)}}),c;function d(h,m){const b=h.type,y=c.handlers[b];if(hv.call(c.handlers,b)&&y)return y(c,h,m);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in h){const{children:S,...R}=h,T=Zp(R);return T.children=c.all(h),T}return Zp(h)}return(c.options.unknownHandler||RX)(c,h,m)}function f(h){const m=[];if("children"in h){const b=h.children;let y=-1;for(;++y<b.length;){const k=c.one(b[y],h);if(k){if(y&&b[y-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=OR(k.value)),!Array.isArray(k)&&k.type==="element")){const S=k.children[0];S&&S.type==="text"&&(S.value=OR(S.value))}Array.isArray(k)?m.push(...k):m.push(k)}}}return m}}function EX(e,t){e.position&&(t.position=dW(e))}function TX(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&a&&Object.assign(n.properties,Zp(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function RX(e,t){const n=t.data||{},r="value"in t&&!(hv.call(n,"hProperties")||hv.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 CX(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
32
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
33
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
34
|
+
`}),n}function OR(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function MR(e,t){const n=wX(e,t),r=n.one(e,void 0),s=pX(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
|
|
35
|
+
`},s),a}function _X(e,t){return e&&"run"in e?async function(n,r){const s=MR(n,{file:r,...t});await e.run(s,r)}:function(n,r){return MR(n,{file:r,...e||t})}}function IR(e){if(e)throw e}var Qb,DR;function NX(){if(DR)return Qb;DR=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var h=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!h&&!m)return!1;var b;for(b in f);return typeof b>"u"||e.call(f,b)},l=function(f,h){n&&h.name==="__proto__"?n(f,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):f[h.name]=h.newValue},c=function(f,h){if(h==="__proto__")if(e.call(f,h)){if(r)return r(f,h).value}else return;return f[h]};return Qb=function d(){var f,h,m,b,y,k,S=arguments[0],R=1,T=arguments.length,E=!1;for(typeof S=="boolean"&&(E=S,S=arguments[1]||{},R=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});R<T;++R)if(f=arguments[R],f!=null)for(h in f)m=c(S,h),b=c(f,h),S!==b&&(E&&b&&(a(b)||(y=s(b)))?(y?(y=!1,k=m&&s(m)?m:[]):k=m&&a(m)?m:{},l(S,{name:h,newValue:d(E,k,b)})):typeof b<"u"&&l(S,{name:h,newValue:b}));return S},Qb}var AX=NX();const Jb=zc(AX);function mv(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 OX(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const l=s.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...s);function c(d,...f){const h=e[++a];let m=-1;if(d){l(d);return}for(;++m<s.length;)(f[m]===null||f[m]===void 0)&&(f[m]=s[m]);s=f,h?MX(h,c)(...f):l(null,...f)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function MX(e,t){let n;return r;function r(...l){const c=e.length>l.length;let d;c&&l.push(s);try{d=e.apply(this,l)}catch(f){const h=f;if(c&&n)throw h;return s(h)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(l,...c){n||(n=!0,t(l,...c))}function a(l){s(null,l)}}const Ii={basename:IX,dirname:DX,extname:LX,join:jX,sep:"/"};function IX(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');rf(e);let n=0,r=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,c=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else l<0&&(a=!0,l=s+1),c>-1&&(e.codePointAt(s)===t.codePointAt(c--)?c<0&&(r=s):(c=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function DX(e){if(rf(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 LX(e){rf(e);let t=e.length,n=-1,r=0,s=-1,a=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),c===46?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||n<0||a===0||a===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function jX(...e){let t=-1,n;for(;++t<e.length;)rf(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":zX(n)}function zX(e){rf(e);const t=e.codePointAt(0)===47;let n=PX(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function PX(e,t){let n="",r=0,s=-1,a=0,l=-1,c,d;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(s===l-1||a===1))if(s!==l-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),s=l,a=0;continue}}else if(n.length>0){n="",r=0,s=l,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,l):n=e.slice(s+1,l),r=l-s-1;s=l,a=0}else c===46&&a>-1?a++:a=-1}return n}function rf(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const $X={cwd:BX};function BX(){return"/"}function gv(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function FX(e){if(typeof e=="string")e=new URL(e);else if(!gv(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 UX(e)}function UX(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 s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const ey=["history","path","basename","stem","extname","dirname"];class DI{constructor(t){let n;t?gv(t)?n={path:t}:typeof t=="string"||qX(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":$X.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ey.length;){const a=ey[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)ey.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Ii.basename(this.path):void 0}set basename(t){ny(t,"basename"),ty(t,"basename"),this.path=Ii.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ii.dirname(this.path):void 0}set dirname(t){LR(this.basename,"dirname"),this.path=Ii.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ii.extname(this.path):void 0}set extname(t){if(ty(t,"extname"),LR(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=Ii.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){gv(t)&&(t=FX(t)),ny(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ii.basename(this.path,this.extname):void 0}set stem(t){ny(t,"stem"),ty(t,"stem"),this.path=Ii.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new pr(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ty(e,t){if(e&&e.includes(Ii.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ii.sep+"`")}function ny(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function LR(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function qX(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const HX=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),GX={}.hasOwnProperty;class mk extends HX{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=OX()}copy(){const t=new mk;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Jb(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(sy("data",this.frozen),this.namespace[t]=n,this):GX.call(this.namespace,t)&&this.namespace[t]||void 0:t?(sy("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 s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Kd(t),r=this.parser||this.Parser;return ry("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ry("process",this.parser||this.Parser),iy("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,l){const c=Kd(t),d=r.parse(c);r.run(d,c,function(h,m,b){if(h||!m||!b)return f(h);const y=m,k=r.stringify(y,b);KX(k)?b.value=k:b.result=k,f(h,b)});function f(h,m){h||!m?l(h):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),ry("processSync",this.parser||this.Parser),iy("processSync",this.compiler||this.Compiler),this.process(t,s),zR("processSync","process",n),r;function s(a,l){n=!0,IR(a),r=l}}run(t,n,r){jR(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(l,c){const d=Kd(n);s.run(t,d,f);function f(h,m,b){const y=m||t;h?c(h):l?l(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),zR("runSync","run",r),s;function a(l,c){IR(l),s=c,r=!0}}stringify(t,n){this.freeze();const r=Kd(n),s=this.compiler||this.Compiler;return iy("stringify",s),jR(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(sy("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[h,...m]=f;d(h,m)}else l(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function l(f){if(!("plugins"in f)&&!("settings"in f))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");c(f.plugins),f.settings&&(s.settings=Jb(!0,s.settings,f.settings))}function c(f){let h=-1;if(f!=null)if(Array.isArray(f))for(;++h<f.length;){const m=f[h];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,h){let m=-1,b=-1;for(;++m<r.length;)if(r[m][0]===f){b=m;break}if(b===-1)r.push([f,...h]);else if(h.length>0){let[y,...k]=h;const S=r[b][1];mv(S)&&mv(y)&&(y=Jb(!0,S,y)),r[b]=[f,y,...k]}}}}const VX=new mk().freeze();function ry(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function iy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function sy(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 jR(e){if(!mv(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function zR(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Kd(e){return WX(e)?e:new DI(e)}function WX(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function KX(e){return typeof e=="string"||YX(e)}function YX(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const XX="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",PR=[],$R={allowDangerousHtml:!0},ZX=/^(https?|ircs?|mailto|xmpp)$/i,QX=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function JX(e){const t=eZ(e),n=tZ(e);return nZ(t.runSync(t.parse(n),n),e)}function eZ(e){const t=e.rehypePlugins||PR,n=e.remarkPlugins||PR,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...$R}:$R;return VX().use(DY).use(n).use(_X,r).use(t)}function tZ(e){const t=e.children||"",n=new DI;return typeof t=="string"&&(n.value=t),n}function nZ(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||rZ;for(const h of QX)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+XX+h.id,void 0);return Kh(e,f),bW(e,{Fragment:g.Fragment,components:s,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function f(h,m,b){if(h.type==="raw"&&b&&typeof m=="number")return l?b.children.splice(m,1):b.children[m]={type:"text",value:h.value},m;if(h.type==="element"){let y;for(y in Yb)if(Object.hasOwn(Yb,y)&&Object.hasOwn(h.properties,y)){const k=h.properties[y],S=Yb[y];(S===null||S.includes(h.tagName))&&(h.properties[y]=d(String(k||""),y,h))}}if(h.type==="element"){let y=n?!n.includes(h.tagName):a?a.includes(h.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(h,m,b)),y&&b&&typeof m=="number")return c&&h.children?b.children.splice(m,1,...h.children):b.children.splice(m,1),m}}}function rZ(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||ZX.test(e.slice(0,t))?e:""}const BR=(function(e,t,n){const r=nf(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]}),ha=(function(e){if(e==null)return oZ;if(typeof e=="string")return sZ(e);if(typeof e=="object")return iZ(e);if(typeof e=="function")return gk(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]=ha(e[n]);return gk(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function sZ(e){return gk(t);function t(n){return n.tagName===e}}function gk(e){return t;function t(n,r,s){return!!(aZ(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function oZ(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function aZ(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const FR=/\n/g,UR=/[\t ]+/g,bv=ha("br"),qR=ha(mZ),lZ=ha("p"),HR=ha("tr"),uZ=ha(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",hZ,gZ]),LI=ha(["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 cZ(e,t){const n=t||{},r="children"in e?e.children:[],s=LI(e),a=PI(e,{whitespace:n.whitespace||"normal"}),l=[];(e.type==="text"||e.type==="comment")&&l.push(...zI(e,{breakBefore:!0,breakAfter:!0}));let c=-1;for(;++c<r.length;)l.push(...jI(r[c],e,{whitespace:a,breakBefore:c?void 0:s,breakAfter:c<r.length-1?bv(r[c+1]):s}));const d=[];let f;for(c=-1;++c<l.length;){const h=l[c];typeof h=="number"?f!==void 0&&h>f&&(f=h):h&&(f!==void 0&&f>-1&&d.push(`
|
|
36
|
+
`.repeat(f)||" "),f=-1,d.push(h))}return d.join("")}function jI(e,t,n){return e.type==="element"?fZ(e,t,n):e.type==="text"?n.whitespace==="normal"?zI(e,n):dZ(e):[]}function fZ(e,t,n){const r=PI(e,n),s=e.children||[];let a=-1,l=[];if(uZ(e))return l;let c,d;for(bv(e)||HR(e)&&BR(t,e,HR)?d=`
|
|
37
|
+
`:lZ(e)?(c=2,d=2):LI(e)&&(c=1,d=1);++a<s.length;)l=l.concat(jI(s[a],e,{whitespace:r,breakBefore:a?void 0:c,breakAfter:a<s.length-1?bv(s[a+1]):d}));return qR(e)&&BR(t,e,qR)&&l.push(" "),c&&l.unshift(c),d&&l.push(d),l}function zI(e,t){const n=String(e.value),r=[],s=[];let a=0;for(;a<=n.length;){FR.lastIndex=a;const d=FR.exec(n),f=d&&"index"in d?d.index:n.length;r.push(pZ(n.slice(a,f).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),a===0?t.breakBefore:!0,f===n.length?t.breakAfter:!0)),a=f+1}let l=-1,c;for(;++l<r.length;)r[l].charCodeAt(r[l].length-1)===8203||l<r.length-1&&r[l+1].charCodeAt(0)===8203?(s.push(r[l]),c=void 0):r[l]?(typeof c=="number"&&s.push(c),s.push(r[l]),c=0):(l===0||l===r.length-1)&&s.push(0);return s}function dZ(e){return[String(e.value)]}function pZ(e,t,n){const r=[];let s=0,a;for(;s<e.length;){UR.lastIndex=s;const l=UR.exec(e);a=l?l.index:e.length,!s&&!a&&l&&!t&&r.push(""),s!==a&&r.push(e.slice(s,a)),s=l?a+l[0].length:a}return s!==a&&!n&&r.push(""),r.join(" ")}function PI(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 hZ(e){return!!(e.properties||{}).hidden}function mZ(e){return e.tagName==="td"||e.tagName==="th"}function gZ(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function bZ(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",l="(?!struct)("+r+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",c={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},f={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},h={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(f,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},b={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},y=t.optional(s)+e.IDENT_RE+"\\s*\\(",k=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],S=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],R=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],T=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],_={type:S,keyword:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:R},D={className:"function.dispatch",relevance:0,keywords:{_hint:T},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[D,m,c,n,e.C_BLOCK_COMMENT_MODE,h,f],A={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:N.concat([{begin:/\(/,end:/\)/,keywords:_,contains:N.concat(["self"]),relevance:0}]),relevance:0},$={className:"function",begin:"("+l+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:_,relevance:0},{begin:y,returnBegin:!0,contains:[b],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[f,h]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,h,c,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,h,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:_,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(A,$,D,N,[m,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:_,contains:["self",c]},{begin:e.IDENT_RE+"::",keywords:_},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function yZ(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=bZ(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function vZ(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),l={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,s]};s.contains.push(c);const d={match:/\\"/},f={className:"string",begin:/'/,end:/'/},h={match:/\\'/},m={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},b=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],y=e.SHEBANG({binary:`(${b.join("|")})`,relevance:10}),k={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},S=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],R=["true","false"],T={match:/(\/[a-z._-]+)+/},E=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],C=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],_=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],D=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:S,literal:R,built_in:[...E,...C,"set","shopt",..._,...D]},contains:[y,e.SHEBANG(),k,m,a,l,T,c,d,f,h,n]}}function xZ(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",l="("+r+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",c={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},f={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},h={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(f,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},b={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},y=t.optional(s)+e.IDENT_RE+"\\s*\\(",R={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},T=[m,c,n,e.C_BLOCK_COMMENT_MODE,h,f],E={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:R,contains:T.concat([{begin:/\(/,end:/\)/,keywords:R,contains:T.concat(["self"]),relevance:0}]),relevance:0},C={begin:"("+l+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:R,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:R,relevance:0},{begin:y,returnBegin:!0,contains:[e.inherit(b,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:R,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,h,c,{begin:/\(/,end:/\)/,keywords:R,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,h,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C",aliases:["h"],keywords:R,disableAutodetect:!0,illegal:"</",contains:[].concat(E,C,T,[m,{begin:e.IDENT_RE+"::",keywords:R},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:m,strings:f,keywords:R}}}function kZ(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",l="(?!struct)("+r+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",c={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},f={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},h={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(f,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},b={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},y=t.optional(s)+e.IDENT_RE+"\\s*\\(",k=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],S=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],R=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],T=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],_={type:S,keyword:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:R},D={className:"function.dispatch",relevance:0,keywords:{_hint:T},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[D,m,c,n,e.C_BLOCK_COMMENT_MODE,h,f],A={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:N.concat([{begin:/\(/,end:/\)/,keywords:_,contains:N.concat(["self"]),relevance:0}]),relevance:0},$={className:"function",begin:"("+l+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:_,relevance:0},{begin:y,returnBegin:!0,contains:[b],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[f,h]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,h,c,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,h,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:_,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(A,$,D,N,[m,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:_,contains:["self",c]},{begin:e.IDENT_RE+"::",keywords:_},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function SZ(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],s=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],a=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],l={keyword:s.concat(a),built_in:t,literal:r},c=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),d={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},f={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},h={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},m=e.inherit(h,{illegal:/\n/}),b={className:"subst",begin:/\{/,end:/\}/,keywords:l},y=e.inherit(b,{illegal:/\n/}),k={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,y]},S={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},b]},R=e.inherit(S,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]});b.contains=[S,k,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.C_BLOCK_COMMENT_MODE],y.contains=[R,k,m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const T={variants:[f,S,k,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},E={begin:"<",end:">",contains:[{beginKeywords:"in out"},c]},C=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",_={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:l,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},T,d,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},c,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[c,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[c,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+C+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:l,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,E],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,relevance:0,contains:[T,d,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},_]}}const wZ=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),EZ=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],TZ=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],RZ=[...EZ,...TZ],CZ=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),_Z=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),NZ=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),AZ=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function OZ(e){const t=e.regex,n=wZ(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",a=/@-?\w[\w]*(-\w+)*/,l="[a-zA-Z-][a-zA-Z0-9_-]*",c=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+l,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+_Z.join("|")+")"},{begin:":(:)?("+NZ.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+AZ.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...c,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...c,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:a},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:CZ.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...c,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+RZ.join("|")+")\\b"}]}}function MZ(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function IZ(e){const a={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:a,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:a,illegal:/["']/}]}]}}function DZ(e){const t=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function LZ(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const s={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},a={className:"literal",begin:/\bon|off|true|false|yes|no\b/},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},c={begin:/\[/,end:/\]/,contains:[r,a,s,l,n,"self"],relevance:0},d=/[A-Za-z0-9_-]+/,f=/"(\\"|[^"])*"/,h=/'[^']*'/,m=t.either(d,f,h),b=t.concat(m,"(\\s*\\.\\s*",m,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:b,className:"attr",starts:{end:/$/,contains:[r,c,a,s,l,n]}}]}}var il="[0-9](_*[0-9])*",Yd=`\\.(${il})`,Xd="[0-9a-fA-F](_*[0-9a-fA-F])*",GR={className:"number",variants:[{begin:`(\\b(${il})((${Yd})|\\.)?|(${Yd}))[eE][+-]?(${il})[fFdD]?\\b`},{begin:`\\b(${il})((${Yd})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Yd})[fFdD]?\\b`},{begin:`\\b(${il})[fFdD]\\b`},{begin:`\\b0[xX]((${Xd})\\.?|(${Xd})?\\.(${Xd}))[pP][+-]?(${il})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Xd})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function $I(e,t,n){return n===-1?"":e.replace(t,r=>$I(e,t,n-1))}function jZ(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+$I("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),d={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},f={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},h={className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:d,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:d,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[f,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,GR,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},GR,f]}}const VR="[A-Za-z$_][0-9A-Za-z$_]*",zZ=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],PZ=["true","false","null","undefined","NaN","Infinity"],BI=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],FI=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],UI=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],$Z=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],BZ=[].concat(UI,BI,FI);function FZ(e){const t=e.regex,n=(B,{after:K})=>{const O="</"+B[0].slice(1);return B.input.indexOf(O,K)!==-1},r=VR,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(B,K)=>{const O=B[0].length+B.index,P=B.input[O];if(P==="<"||P===","){K.ignoreMatch();return}P===">"&&(n(B,{after:O})||K.ignoreMatch());let V;const j=B.input.substring(O);if(V=j.match(/^\s*=/)){K.ignoreMatch();return}if((V=j.match(/^\s+extends\s+/))&&V.index===0){K.ignoreMatch();return}}},c={$pattern:VR,keyword:zZ,literal:PZ,built_in:BZ,"variable.language":$Z},d="[0-9](_?[0-9])*",f=`\\.(${d})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${h})((${f})|\\.)?|(${f}))[eE][+-]?(${d})\\b`},{begin:`\\b(${h})\\b((${f})\\b|\\.)?|(${f})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},b={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},y={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"xml"}},k={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"css"}},S={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"graphql"}},R={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,b]},E={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},C=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,S,R,{match:/\$\d+/},m];b.contains=C.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(C)});const _=[].concat(E,b.contains),D=_.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(_)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:D},A={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},$={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...BI,...FI]}},z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},I={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},Y={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function H(B){return t.concat("(?!",B.join("|"),")")}const q={match:t.concat(/\b/,H([...UI,"super","import"].map(B=>`${B}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},L={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},F={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},U="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",W={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(U)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:$},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),z,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,S,R,E,{match:/\$\d+/},m,$,{scope:"attr",match:r+t.lookahead(":"),relevance:0},W,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[E,e.REGEXP_MODE,{className:"function",begin:U,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:D}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:a},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]}]},I,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},L,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},q,Y,A,F,{match:/\$[(.]/}]}}function UZ(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],s={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,s,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var sl="[0-9](_*[0-9])*",Zd=`\\.(${sl})`,Qd="[0-9a-fA-F](_*[0-9a-fA-F])*",qZ={className:"number",variants:[{begin:`(\\b(${sl})((${Zd})|\\.)?|(${Zd}))[eE][+-]?(${sl})[fFdD]?\\b`},{begin:`\\b(${sl})((${Zd})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Zd})[fFdD]?\\b`},{begin:`\\b(${sl})[fFdD]\\b`},{begin:`\\b0[xX]((${Qd})\\.?|(${Qd})?\\.(${Qd}))[pP][+-]?(${sl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Qd})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function HZ(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},l={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[a,s]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,s]}]};s.contains.push(l);const c={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},d={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(l,{className:"string"}),"self"]}]},f=qZ,h=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),m={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},b=m;return b.variants[1].contains=[m],m.variants[1].contains=[b],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,h,n,r,c,d,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[m,e.C_LINE_COMMENT_MODE,h],relevance:0},e.C_LINE_COMMENT_MODE,h,c,d,l,e.C_NUMBER_MODE]},h]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},c,d]},l,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
38
|
+
`},f]}}const GZ=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),VZ=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],WZ=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],KZ=[...VZ,...WZ],YZ=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),qI=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),HI=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),XZ=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),ZZ=qI.concat(HI).sort().reverse();function QZ(e){const t=GZ(e),n=ZZ,r="and or not only",s="[\\w-]+",a="("+s+"|@\\{"+s+"\\})",l=[],c=[],d=function(C){return{className:"string",begin:"~?"+C+".*?"+C}},f=function(C,_,D){return{className:C,begin:_,relevance:D}},h={$pattern:/[a-z-]+/,keyword:r,attribute:YZ.join(" ")},m={begin:"\\(",end:"\\)",contains:c,keywords:h,relevance:0};c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d("'"),d('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,m,f("variable","@@?"+s,10),f("variable","@\\{"+s+"\\}"),f("built_in","~?`[^`]*?`"),{className:"attribute",begin:s+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const b=c.concat({begin:/\{/,end:/\}/,contains:l}),y={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(c)},k={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+XZ.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:c}}]},S={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:h,returnEnd:!0,contains:c,relevance:0}},R={className:"variable",variants:[{begin:"@"+s+"\\s*:",relevance:15},{begin:"@"+s}],starts:{end:"[;}]",returnEnd:!0,contains:b}},T={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:a,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,y,f("keyword","all\\b"),f("variable","@\\{"+s+"\\}"),{begin:"\\b("+KZ.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,f("selector-tag",a,0),f("selector-id","#"+a),f("selector-class","\\."+a,0),f("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+qI.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+HI.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:b},{begin:"!important"},t.FUNCTION_DISPATCH]},E={begin:s+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[T]};return l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,S,R,E,k,T,y,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:l}}function JZ(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},s=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:s.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:s}].concat(s)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function eQ(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},s={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},a={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},l={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,r,s,a,l]}}function tQ(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},s={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},a={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},l={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},c=/[A-Za-z][A-Za-z0-9+.-]*/,d={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,c,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},f={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},h={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},m=e.inherit(f,{contains:[]}),b=e.inherit(h,{contains:[]});f.contains.push(b),h.contains.push(m);let y=[n,d];return[f,h,m,b].forEach(T=>{T.contains=T.contains.concat(y)}),y=y.concat(f,h),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:y},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:y}]}]},n,a,f,h,{className:"quote",begin:"^>\\s+",contains:y,end:"$"},s,r,d,l,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function nQ(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,c={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},d={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:c,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+d.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:d,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function rQ(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,s={$pattern:/[\w.]+/,keyword:n.join(" ")},a={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:s},l={begin:/->\{/,end:/\}/},c={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},d={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[c]},f={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},h=[e.BACKSLASH_ESCAPE,a,d],m=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],b=(S,R,T="\\1")=>{const E=T==="\\1"?T:t.concat(T,R);return t.concat(t.concat("(?:",S,")"),R,/(?:\\.|[^\\\/])*?/,E,/(?:\\.|[^\\\/])*?/,T,r)},y=(S,R,T)=>t.concat(t.concat("(?:",S,")"),R,/(?:\\.|[^\\\/])*?/,T,r),k=[d,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),l,{className:"string",contains:h,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},f,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:b("s|tr|y",t.either(...m,{capture:!0}))},{begin:b("s|tr|y","\\(","\\)")},{begin:b("s|tr|y","\\[","\\]")},{begin:b("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:y("(?:m|qr)?",/\//,/\//)},{begin:y("m|qr",t.either(...m,{capture:!0}),/\1/)},{begin:y("m|qr",/\(/,/\)/)},{begin:y("m|qr",/\[/,/\]/)},{begin:y("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,c]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,c,f]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return a.contains=k,l.contains=k,{name:"Perl",aliases:["pl","pm"],keywords:s,contains:k}}function iQ(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),s=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),a=t.concat(/[A-Z]+/,n),l={scope:"variable",match:"\\$+"+r},c={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},d={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},f=e.inherit(e.APOS_STRING_MODE,{illegal:null}),h=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(d)}),m={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(d),"on:begin":(L,F)=>{F.data._beginMatch=L[1]||L[2]},"on:end":(L,F)=>{F.data._beginMatch!==L[1]&&F.ignoreMatch()}},b=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),y=`[
|
|
39
|
+
]`,k={scope:"string",variants:[h,f,m,b]},S={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},R=["false","null","true"],T=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],E=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],_={keyword:T,literal:(L=>{const F=[];return L.forEach(U=>{F.push(U),U.toLowerCase()===U?F.push(U.toUpperCase()):F.push(U.toLowerCase())}),F})(R),built_in:E},D=L=>L.map(F=>F.replace(/\|\d+$/,"")),N={variants:[{match:[/new/,t.concat(y,"+"),t.concat("(?!",D(E).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},A=t.concat(r,"\\b(?!\\()"),$={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),A],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),A],scope:{1:"title.class",3:"variable.constant"}},{match:[s,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[s,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},z={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},I={relevance:0,begin:/\(/,end:/\)/,keywords:_,contains:[z,l,$,e.C_BLOCK_COMMENT_MODE,k,S,N]},Y={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",D(T).join("\\b|"),"|",D(E).join("\\b|"),"\\b)"),r,t.concat(y,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[I]};I.contains.push(Y);const H=[z,$,e.C_BLOCK_COMMENT_MODE,k,S,N],q={begin:t.concat(/#\[\s*\\?/,t.either(s,a)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:R,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:R,keyword:["new","array"]},contains:["self",...H]},...H,{scope:"meta",variants:[{match:s},{match:a}]}]};return{case_insensitive:!1,keywords:_,contains:[q,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},c,{scope:"variable.language",match:/\$this\b/},l,Y,$,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},N,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:_,contains:["self",q,l,$,e.C_BLOCK_COMMENT_MODE,k,S]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},k,S]}}function sQ(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function oQ(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function aQ(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],c={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},d={className:"meta",begin:/^(>>>|\.\.\.) /},f={className:"subst",begin:/\{/,end:/\}/,keywords:c,illegal:/#/},h={begin:/\{\{/,relevance:0},m={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d,h,f]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d,h,f]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,h,f]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,h,f]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},b="[0-9](_?[0-9])*",y=`(\\b(${b}))?\\.(${b})|\\b(${b})\\.`,k=`\\b|${r.join("|")}`,S={className:"number",relevance:0,variants:[{begin:`(\\b(${b})|(${y}))[eE][+-]?(${b})[jJ]?(?=${k})`},{begin:`(${y})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${k})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${k})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${k})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${k})`},{begin:`\\b(${b})[jJ](?=${k})`}]},R={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:c,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},T={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:["self",d,S,m,e.HASH_COMMENT_MODE]}]};return f.contains=[m,S,d],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:c,illegal:/(<\/|\?)|=>/,contains:[d,S,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},m,R,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[T]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[S,T,m]}]}}function lQ(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function uQ(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),s=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,a=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[s,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[a,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:s},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function cQ(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),s=t.concat(r,/(::\w+)*/),l={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},c={className:"doctag",begin:"@[A-Za-z]+"},d={begin:"#<",end:">"},f=[e.COMMENT("#","$",{contains:[c]}),e.COMMENT("^=begin","^=end",{contains:[c],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],h={className:"subst",begin:/#\{/,end:/\}/,keywords:l},m={className:"string",contains:[e.BACKSLASH_ESCAPE,h],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,h]})]}]},b="[1-9](_?[0-9])*|0",y="[0-9](_?[0-9])*",k={className:"number",relevance:0,variants:[{begin:`\\b(${b})(\\.(${y}))?([eE][+-]?(${y})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},S={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:l}]},N=[m,{variants:[{match:[/class\s+/,s,/\s+<\s+/,s]},{match:[/\b(class|module)\s+/,s]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:l},{match:[/(include|extend)\s+/,s],scope:{2:"title.class"},keywords:l},{relevance:0,match:[s,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[S]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[m,{begin:n}],relevance:0},k,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:l},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,h],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(d,f),relevance:0}].concat(d,f);h.contains=N,S.contains=N;const I=[{begin:/^\s*=>/,starts:{end:"$",contains:N}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:l,contains:N}}];return f.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:l,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(I).concat(f).concat(N)}}function fQ(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),s=t.concat(n,e.IDENT_RE),a={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,s,t.lookahead(/\s*\(/))},l="([ui](8|16|32|64|128|size)|f(32|64))?",c=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],d=["true","false","Some","None","Ok","Err"],f=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],h=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:h,keyword:c,literal:d,built_in:f},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+l},{begin:"\\b0o([0-7_]+)"+l},{begin:"\\b0x([A-Fa-f0-9_]+)"+l},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+l}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:f,type:h}},{className:"punctuation",begin:"->"},a]}}const dQ=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),pQ=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],hQ=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],mQ=[...pQ,...hQ],gQ=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),bQ=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),yQ=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),vQ=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function xQ(e){const t=dQ(e),n=yQ,r=bQ,s="@[a-z-]+",a="and or not only",c={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+mQ.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},c,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+vQ.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,c,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:s,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:a,attribute:gQ.join(" ")},contains:[{begin:s,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},c,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function kQ(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function SQ(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},a=["true","false","unknown"],l=["double precision","large object","with timezone","without timezone"],c=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],d=["add","asc","collation","desc","final","first","last","view"],f=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],h=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],m=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],b=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],y=h,k=[...f,...d].filter(D=>!h.includes(D)),S={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},R={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},T={match:t.concat(/\b/,t.either(...y),/\s*\(/),relevance:0,keywords:{built_in:y}};function E(D){return t.concat(/\b/,t.either(...D.map(N=>N.replace(/\s+/,"\\s+"))),/\b/)}const C={scope:"keyword",match:E(b),relevance:0};function _(D,{exceptions:N,when:A}={}){const $=A;return N=N||[],D.map(z=>z.match(/\|\d+$/)||N.includes(z)?z:$(z)?`${z}|0`:z)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:_(k,{when:D=>D.length<3}),literal:a,type:c,built_in:m},contains:[{scope:"type",match:E(l)},C,T,S,r,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,R]}}function GI(e){return e?typeof e=="string"?e:e.source:null}function Vu(e){return dn("(?=",e,")")}function dn(...e){return e.map(n=>GI(n)).join("")}function wQ(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function br(...e){return"("+(wQ(e).capture?"":"?:")+e.map(r=>GI(r)).join("|")+")"}const bk=e=>dn(/\b/,e,/\w$/.test(e)?/\b/:/\B/),EQ=["Protocol","Type"].map(bk),WR=["init","self"].map(bk),TQ=["Any","Self"],oy=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],KR=["false","nil","true"],RQ=["assignment","associativity","higherThan","left","lowerThan","none","right"],CQ=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],YR=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],VI=br(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),WI=br(VI,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),ay=dn(VI,WI,"*"),KI=br(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Qp=br(KI,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Mi=dn(KI,Qp,"*"),Jd=dn(/[A-Z]/,Qp,"*"),_Q=["attached","autoclosure",dn(/convention\(/,br("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",dn(/objc\(/,Mi,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],NQ=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function AQ(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],s={match:[/\./,br(...EQ,...WR)],className:{2:"keyword"}},a={match:dn(/\./,br(...oy)),relevance:0},l=oy.filter(we=>typeof we=="string").concat(["_|0"]),c=oy.filter(we=>typeof we!="string").concat(TQ).map(bk),d={variants:[{className:"keyword",match:br(...c,...WR)}]},f={$pattern:br(/\b\w+/,/#\w+/),keyword:l.concat(CQ),literal:KR},h=[s,a,d],m={match:dn(/\./,br(...YR)),relevance:0},b={className:"built_in",match:dn(/\b/,br(...YR),/(?=\()/)},y=[m,b],k={match:/->/,relevance:0},S={className:"operator",relevance:0,variants:[{match:ay},{match:`\\.(\\.|${WI})+`}]},R=[k,S],T="([0-9]_*)+",E="([0-9a-fA-F]_*)+",C={className:"number",relevance:0,variants:[{match:`\\b(${T})(\\.(${T}))?([eE][+-]?(${T}))?\\b`},{match:`\\b0x(${E})(\\.(${E}))?([pP][+-]?(${T}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},_=(we="")=>({className:"subst",variants:[{match:dn(/\\/,we,/[0\\tnr"']/)},{match:dn(/\\/,we,/u\{[0-9a-fA-F]{1,8}\}/)}]}),D=(we="")=>({className:"subst",match:dn(/\\/,we,/[\t ]*(?:[\r\n]|\r\n)/)}),N=(we="")=>({className:"subst",label:"interpol",begin:dn(/\\/,we,/\(/),end:/\)/}),A=(we="")=>({begin:dn(we,/"""/),end:dn(/"""/,we),contains:[_(we),D(we),N(we)]}),$=(we="")=>({begin:dn(we,/"/),end:dn(/"/,we),contains:[_(we),N(we)]}),z={className:"string",variants:[A(),A("#"),A("##"),A("###"),$(),$("#"),$("##"),$("###")]},I=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],Y={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:I},H=we=>{const ke=dn(we,/\//),De=dn(/\//,we);return{begin:ke,end:De,contains:[...I,{scope:"comment",begin:`#(?!.*${De})`,end:/$/}]}},q={scope:"regexp",variants:[H("###"),H("##"),H("#"),Y]},L={match:dn(/`/,Mi,/`/)},F={className:"variable",match:/\$\d+/},U={className:"variable",match:`\\$${Qp}+`},W=[L,F,U],B={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:NQ,contains:[...R,C,z]}]}},K={scope:"keyword",match:dn(/@/,br(..._Q),Vu(br(/\(/,/\s+/)))},O={scope:"meta",match:dn(/@/,Mi)},P=[B,K,O],V={match:Vu(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:dn(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Qp,"+")},{className:"type",match:Jd,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:dn(/\s+&\s+/,Vu(Jd)),relevance:0}]},j={begin:/</,end:/>/,keywords:f,contains:[...r,...h,...P,k,V]};V.contains.push(j);const Z={match:dn(Mi,/\s*:/),keywords:"_|0",relevance:0},te={begin:/\(/,end:/\)/,relevance:0,keywords:f,contains:["self",Z,...r,q,...h,...y,...R,C,z,...W,...P,V]},se={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,V]},ue={begin:br(Vu(dn(Mi,/\s*:/)),Vu(dn(Mi,/\s+/,Mi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Mi}]},le={begin:/\(/,end:/\)/,keywords:f,contains:[ue,...r,...h,...R,C,z,...P,V,te],endsParent:!0,illegal:/["']/},fe={match:[/(func|macro)/,/\s+/,br(L.match,Mi,ay)],className:{1:"keyword",3:"title.function"},contains:[se,le,t],illegal:[/\[/,/%/]},ge={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[se,le,t],illegal:/\[|%/},_e={match:[/operator/,/\s+/,ay],className:{1:"keyword",3:"title"}},oe={begin:[/precedencegroup/,/\s+/,Jd],className:{1:"keyword",3:"title"},contains:[V],keywords:[...RQ,...KR],end:/}/},ye={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Se={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Oe={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Mi,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:f,contains:[se,...h,{begin:/:/,end:/\{/,keywords:f,contains:[{scope:"title.class.inherited",match:Jd},...h],relevance:0}]};for(const we of z.variants){const ke=we.contains.find(Me=>Me.label==="interpol");ke.keywords=f;const De=[...h,...y,...R,C,z,...W];ke.contains=[...De,{begin:/\(/,end:/\)/,contains:["self",...De]}]}return{name:"Swift",keywords:f,contains:[...r,fe,ge,ye,Se,Oe,_e,oe,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},q,...h,...y,...R,C,z,...W,...P,V,te]}}const Jp="[A-Za-z$_][0-9A-Za-z$_]*",YI=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],XI=["true","false","null","undefined","NaN","Infinity"],ZI=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],QI=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],JI=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],eD=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],tD=[].concat(JI,ZI,QI);function OQ(e){const t=e.regex,n=(B,{after:K})=>{const O="</"+B[0].slice(1);return B.input.indexOf(O,K)!==-1},r=Jp,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(B,K)=>{const O=B[0].length+B.index,P=B.input[O];if(P==="<"||P===","){K.ignoreMatch();return}P===">"&&(n(B,{after:O})||K.ignoreMatch());let V;const j=B.input.substring(O);if(V=j.match(/^\s*=/)){K.ignoreMatch();return}if((V=j.match(/^\s+extends\s+/))&&V.index===0){K.ignoreMatch();return}}},c={$pattern:Jp,keyword:YI,literal:XI,built_in:tD,"variable.language":eD},d="[0-9](_?[0-9])*",f=`\\.(${d})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${h})((${f})|\\.)?|(${f}))[eE][+-]?(${d})\\b`},{begin:`\\b(${h})\\b((${f})\\b|\\.)?|(${f})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},b={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},y={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"xml"}},k={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"css"}},S={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"graphql"}},R={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,b]},E={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},C=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,S,R,{match:/\$\d+/},m];b.contains=C.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(C)});const _=[].concat(E,b.contains),D=_.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(_)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:D},A={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},$={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...ZI,...QI]}},z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},I={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},Y={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function H(B){return t.concat("(?!",B.join("|"),")")}const q={match:t.concat(/\b/,H([...JI,"super","import"].map(B=>`${B}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},L={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},F={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},U="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",W={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(U)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:$},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),z,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,S,R,E,{match:/\$\d+/},m,$,{scope:"attr",match:r+t.lookahead(":"),relevance:0},W,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[E,e.REGEXP_MODE,{className:"function",begin:U,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:D}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:a},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]}]},I,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},L,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},q,Y,A,F,{match:/\$[(.]/}]}}function MQ(e){const t=e.regex,n=OQ(e),r=Jp,s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},l={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[n.exports.CLASS_REFERENCE]},c={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},d=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],f={$pattern:Jp,keyword:YI.concat(d),literal:XI,built_in:tD.concat(s),"variable.language":eD},h={className:"meta",begin:"@"+r},m=(S,R,T)=>{const E=S.contains.findIndex(C=>C.label===R);if(E===-1)throw new Error("can not find mode to replace");S.contains.splice(E,1,T)};Object.assign(n.keywords,f),n.exports.PARAMS_CONTAINS.push(h);const b=n.contains.find(S=>S.scope==="attr"),y=Object.assign({},b,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,b,y]),n.contains=n.contains.concat([h,a,l,y]),m(n,"shebang",e.SHEBANG()),m(n,"use_strict",c);const k=n.contains.find(S=>S.label==="func.def");return k.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function IQ(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,l=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,c=/\d{1,2}(:\d{1,2}){1,2}/,d={className:"literal",variants:[{begin:t.concat(/# */,t.either(a,s),/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,t.either(a,s),/ +/,t.either(l,c),/ *#/)}]},f={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},h={className:"label",begin:/^\w+:/},m=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),b=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,d,f,h,m,b,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[b]}]}}function DQ(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],s={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},a={className:"variable",begin:/\$[\w_]+/},l={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},c={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},d={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},f={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},a,l,s,e.QUOTE_STRING_MODE,d,f,c]}}function LQ(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},l=e.inherit(a,{begin:/\(/,end:/\)/}),c=e.inherit(e.APOS_STRING_MODE,{className:"string"}),d=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),f={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,d,c,l,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,l,d,c]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[d]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[f],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[f],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:f}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function jQ(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},s={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},l={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,s]},c=e.inherit(l,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),b={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},y={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},k={begin:/\{/,end:/\}/,contains:[y],illegal:"\\n",relevance:0},S={begin:"\\[",end:"\\]",contains:[y],illegal:"\\n",relevance:0},R=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},b,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},k,S,a,l],T=[...R];return T.pop(),T.push(c),y.contains=T,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:R}}const zQ={arduino:yZ,bash:vZ,c:xZ,cpp:kZ,csharp:SZ,css:OZ,diff:MZ,go:IZ,graphql:DZ,ini:LZ,java:jZ,javascript:FZ,json:UZ,kotlin:HZ,less:QZ,lua:JZ,makefile:eQ,markdown:tQ,objectivec:nQ,perl:rQ,php:iQ,"php-template":sQ,plaintext:oQ,python:aQ,"python-repl":lQ,r:uQ,ruby:cQ,rust:fQ,scss:xQ,shell:kQ,sql:SQ,swift:AQ,typescript:MQ,vbnet:IQ,wasm:DQ,xml:LQ,yaml:jQ};var ly,XR;function PQ(){if(XR)return ly;XR=1;function e(X){return X instanceof Map?X.clear=X.delete=X.set=function(){throw new Error("map is read-only")}:X instanceof Set&&(X.add=X.clear=X.delete=function(){throw new Error("set is read-only")}),Object.freeze(X),Object.getOwnPropertyNames(X).forEach(he=>{const je=X[he],Ze=typeof je;(Ze==="object"||Ze==="function")&&!Object.isFrozen(je)&&e(je)}),X}class t{constructor(he){he.data===void 0&&(he.data={}),this.data=he.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(X){return X.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(X,...he){const je=Object.create(null);for(const Ze in X)je[Ze]=X[Ze];return he.forEach(function(Ze){for(const St in Ze)je[St]=Ze[St]}),je}const s="</span>",a=X=>!!X.scope,l=(X,{prefix:he})=>{if(X.startsWith("language:"))return X.replace("language:","language-");if(X.includes(".")){const je=X.split(".");return[`${he}${je.shift()}`,...je.map((Ze,St)=>`${Ze}${"_".repeat(St+1)}`)].join(" ")}return`${he}${X}`};class c{constructor(he,je){this.buffer="",this.classPrefix=je.classPrefix,he.walk(this)}addText(he){this.buffer+=n(he)}openNode(he){if(!a(he))return;const je=l(he.scope,{prefix:this.classPrefix});this.span(je)}closeNode(he){a(he)&&(this.buffer+=s)}value(){return this.buffer}span(he){this.buffer+=`<span class="${he}">`}}const d=(X={})=>{const he={children:[]};return Object.assign(he,X),he};class f{constructor(){this.rootNode=d(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(he){this.top.children.push(he)}openNode(he){const je=d({scope:he});this.add(je),this.stack.push(je)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(he){return this.constructor._walk(he,this.rootNode)}static _walk(he,je){return typeof je=="string"?he.addText(je):je.children&&(he.openNode(je),je.children.forEach(Ze=>this._walk(he,Ze)),he.closeNode(je)),he}static _collapse(he){typeof he!="string"&&he.children&&(he.children.every(je=>typeof je=="string")?he.children=[he.children.join("")]:he.children.forEach(je=>{f._collapse(je)}))}}class h extends f{constructor(he){super(),this.options=he}addText(he){he!==""&&this.add(he)}startScope(he){this.openNode(he)}endScope(){this.closeNode()}__addSublanguage(he,je){const Ze=he.root;je&&(Ze.scope=`language:${je}`),this.add(Ze)}toHTML(){return new c(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function m(X){return X?typeof X=="string"?X:X.source:null}function b(X){return S("(?=",X,")")}function y(X){return S("(?:",X,")*")}function k(X){return S("(?:",X,")?")}function S(...X){return X.map(je=>m(je)).join("")}function R(X){const he=X[X.length-1];return typeof he=="object"&&he.constructor===Object?(X.splice(X.length-1,1),he):{}}function T(...X){return"("+(R(X).capture?"":"?:")+X.map(Ze=>m(Ze)).join("|")+")"}function E(X){return new RegExp(X.toString()+"|").exec("").length-1}function C(X,he){const je=X&&X.exec(he);return je&&je.index===0}const _=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function D(X,{joinWith:he}){let je=0;return X.map(Ze=>{je+=1;const St=je;let at=m(Ze),qe="";for(;at.length>0;){const Ee=_.exec(at);if(!Ee){qe+=at;break}qe+=at.substring(0,Ee.index),at=at.substring(Ee.index+Ee[0].length),Ee[0][0]==="\\"&&Ee[1]?qe+="\\"+String(Number(Ee[1])+St):(qe+=Ee[0],Ee[0]==="("&&je++)}return qe}).map(Ze=>`(${Ze})`).join(he)}const N=/\b\B/,A="[a-zA-Z]\\w*",$="[a-zA-Z_]\\w*",z="\\b\\d+(\\.\\d+)?",I="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Y="\\b(0b[01]+)",H="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",q=(X={})=>{const he=/^#![ ]*\//;return X.binary&&(X.begin=S(he,/.*\b/,X.binary,/\b.*/)),r({scope:"meta",begin:he,end:/$/,relevance:0,"on:begin":(je,Ze)=>{je.index!==0&&Ze.ignoreMatch()}},X)},L={begin:"\\\\[\\s\\S]",relevance:0},F={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[L]},U={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[L]},W={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},B=function(X,he,je={}){const Ze=r({scope:"comment",begin:X,end:he,contains:[]},je);Ze.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const St=T("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Ze.contains.push({begin:S(/[ ]+/,"(",St,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Ze},K=B("//","$"),O=B("/\\*","\\*/"),P=B("#","$"),V={scope:"number",begin:z,relevance:0},j={scope:"number",begin:I,relevance:0},Z={scope:"number",begin:Y,relevance:0},te={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[L,{begin:/\[/,end:/\]/,relevance:0,contains:[L]}]},se={scope:"title",begin:A,relevance:0},ue={scope:"title",begin:$,relevance:0},le={begin:"\\.\\s*"+$,relevance:0};var ge=Object.freeze({__proto__:null,APOS_STRING_MODE:F,BACKSLASH_ESCAPE:L,BINARY_NUMBER_MODE:Z,BINARY_NUMBER_RE:Y,COMMENT:B,C_BLOCK_COMMENT_MODE:O,C_LINE_COMMENT_MODE:K,C_NUMBER_MODE:j,C_NUMBER_RE:I,END_SAME_AS_BEGIN:function(X){return Object.assign(X,{"on:begin":(he,je)=>{je.data._beginMatch=he[1]},"on:end":(he,je)=>{je.data._beginMatch!==he[1]&&je.ignoreMatch()}})},HASH_COMMENT_MODE:P,IDENT_RE:A,MATCH_NOTHING_RE:N,METHOD_GUARD:le,NUMBER_MODE:V,NUMBER_RE:z,PHRASAL_WORDS_MODE:W,QUOTE_STRING_MODE:U,REGEXP_MODE:te,RE_STARTERS_RE:H,SHEBANG:q,TITLE_MODE:se,UNDERSCORE_IDENT_RE:$,UNDERSCORE_TITLE_MODE:ue});function _e(X,he){X.input[X.index-1]==="."&&he.ignoreMatch()}function oe(X,he){X.className!==void 0&&(X.scope=X.className,delete X.className)}function ye(X,he){he&&X.beginKeywords&&(X.begin="\\b("+X.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",X.__beforeBegin=_e,X.keywords=X.keywords||X.beginKeywords,delete X.beginKeywords,X.relevance===void 0&&(X.relevance=0))}function Se(X,he){Array.isArray(X.illegal)&&(X.illegal=T(...X.illegal))}function Oe(X,he){if(X.match){if(X.begin||X.end)throw new Error("begin & end are not supported with match");X.begin=X.match,delete X.match}}function we(X,he){X.relevance===void 0&&(X.relevance=1)}const ke=(X,he)=>{if(!X.beforeMatch)return;if(X.starts)throw new Error("beforeMatch cannot be used with starts");const je=Object.assign({},X);Object.keys(X).forEach(Ze=>{delete X[Ze]}),X.keywords=je.keywords,X.begin=S(je.beforeMatch,b(je.begin)),X.starts={relevance:0,contains:[Object.assign(je,{endsParent:!0})]},X.relevance=0,delete je.beforeMatch},De=["of","and","for","in","not","or","if","then","parent","list","value"],Me="keyword";function Le(X,he,je=Me){const Ze=Object.create(null);return typeof X=="string"?St(je,X.split(" ")):Array.isArray(X)?St(je,X):Object.keys(X).forEach(function(at){Object.assign(Ze,Le(X[at],he,at))}),Ze;function St(at,qe){he&&(qe=qe.map(Ee=>Ee.toLowerCase())),qe.forEach(function(Ee){const Ue=Ee.split("|");Ze[Ue[0]]=[at,He(Ue[0],Ue[1])]})}}function He(X,he){return he?Number(he):be(X)?0:1}function be(X){return De.includes(X.toLowerCase())}const Re={},ee=X=>{console.error(X)},ce=(X,...he)=>{console.log(`WARN: ${X}`,...he)},J=(X,he)=>{Re[`${X}/${he}`]||(console.log(`Deprecated as of ${X}. ${he}`),Re[`${X}/${he}`]=!0)},re=new Error;function xe(X,he,{key:je}){let Ze=0;const St=X[je],at={},qe={};for(let Ee=1;Ee<=he.length;Ee++)qe[Ee+Ze]=St[Ee],at[Ee+Ze]=!0,Ze+=E(he[Ee-1]);X[je]=qe,X[je]._emit=at,X[je]._multi=!0}function $e(X){if(Array.isArray(X.begin)){if(X.skip||X.excludeBegin||X.returnBegin)throw ee("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),re;if(typeof X.beginScope!="object"||X.beginScope===null)throw ee("beginScope must be object"),re;xe(X,X.begin,{key:"beginScope"}),X.begin=D(X.begin,{joinWith:""})}}function Xe(X){if(Array.isArray(X.end)){if(X.skip||X.excludeEnd||X.returnEnd)throw ee("skip, excludeEnd, returnEnd not compatible with endScope: {}"),re;if(typeof X.endScope!="object"||X.endScope===null)throw ee("endScope must be object"),re;xe(X,X.end,{key:"endScope"}),X.end=D(X.end,{joinWith:""})}}function Ye(X){X.scope&&typeof X.scope=="object"&&X.scope!==null&&(X.beginScope=X.scope,delete X.scope)}function ht(X){Ye(X),typeof X.beginScope=="string"&&(X.beginScope={_wrap:X.beginScope}),typeof X.endScope=="string"&&(X.endScope={_wrap:X.endScope}),$e(X),Xe(X)}function Qe(X){function he(qe,Ee){return new RegExp(m(qe),"m"+(X.case_insensitive?"i":"")+(X.unicodeRegex?"u":"")+(Ee?"g":""))}class je{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Ee,Ue){Ue.position=this.position++,this.matchIndexes[this.matchAt]=Ue,this.regexes.push([Ue,Ee]),this.matchAt+=E(Ee)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Ee=this.regexes.map(Ue=>Ue[1]);this.matcherRe=he(D(Ee,{joinWith:"|"}),!0),this.lastIndex=0}exec(Ee){this.matcherRe.lastIndex=this.lastIndex;const Ue=this.matcherRe.exec(Ee);if(!Ue)return null;const ze=Ue.findIndex((Ie,ut)=>ut>0&&Ie!==void 0),Ne=this.matchIndexes[ze];return Ue.splice(0,ze),Object.assign(Ue,Ne)}}class Ze{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Ee){if(this.multiRegexes[Ee])return this.multiRegexes[Ee];const Ue=new je;return this.rules.slice(Ee).forEach(([ze,Ne])=>Ue.addRule(ze,Ne)),Ue.compile(),this.multiRegexes[Ee]=Ue,Ue}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Ee,Ue){this.rules.push([Ee,Ue]),Ue.type==="begin"&&this.count++}exec(Ee){const Ue=this.getMatcher(this.regexIndex);Ue.lastIndex=this.lastIndex;let ze=Ue.exec(Ee);if(this.resumingScanAtSamePosition()&&!(ze&&ze.index===this.lastIndex)){const Ne=this.getMatcher(0);Ne.lastIndex=this.lastIndex+1,ze=Ne.exec(Ee)}return ze&&(this.regexIndex+=ze.position+1,this.regexIndex===this.count&&this.considerAll()),ze}}function St(qe){const Ee=new Ze;return qe.contains.forEach(Ue=>Ee.addRule(Ue.begin,{rule:Ue,type:"begin"})),qe.terminatorEnd&&Ee.addRule(qe.terminatorEnd,{type:"end"}),qe.illegal&&Ee.addRule(qe.illegal,{type:"illegal"}),Ee}function at(qe,Ee){const Ue=qe;if(qe.isCompiled)return Ue;[oe,Oe,ht,ke].forEach(Ne=>Ne(qe,Ee)),X.compilerExtensions.forEach(Ne=>Ne(qe,Ee)),qe.__beforeBegin=null,[ye,Se,we].forEach(Ne=>Ne(qe,Ee)),qe.isCompiled=!0;let ze=null;return typeof qe.keywords=="object"&&qe.keywords.$pattern&&(qe.keywords=Object.assign({},qe.keywords),ze=qe.keywords.$pattern,delete qe.keywords.$pattern),ze=ze||/\w+/,qe.keywords&&(qe.keywords=Le(qe.keywords,X.case_insensitive)),Ue.keywordPatternRe=he(ze,!0),Ee&&(qe.begin||(qe.begin=/\B|\b/),Ue.beginRe=he(Ue.begin),!qe.end&&!qe.endsWithParent&&(qe.end=/\B|\b/),qe.end&&(Ue.endRe=he(Ue.end)),Ue.terminatorEnd=m(Ue.end)||"",qe.endsWithParent&&Ee.terminatorEnd&&(Ue.terminatorEnd+=(qe.end?"|":"")+Ee.terminatorEnd)),qe.illegal&&(Ue.illegalRe=he(qe.illegal)),qe.contains||(qe.contains=[]),qe.contains=[].concat(...qe.contains.map(function(Ne){return kt(Ne==="self"?qe:Ne)})),qe.contains.forEach(function(Ne){at(Ne,Ue)}),qe.starts&&at(qe.starts,Ee),Ue.matcher=St(Ue),Ue}if(X.compilerExtensions||(X.compilerExtensions=[]),X.contains&&X.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return X.classNameAliases=r(X.classNameAliases||{}),at(X)}function yt(X){return X?X.endsWithParent||yt(X.starts):!1}function kt(X){return X.variants&&!X.cachedVariants&&(X.cachedVariants=X.variants.map(function(he){return r(X,{variants:null},he)})),X.cachedVariants?X.cachedVariants:yt(X)?r(X,{starts:X.starts?r(X.starts):null}):Object.isFrozen(X)?r(X):X}var tt="11.11.1";class Tt extends Error{constructor(he,je){super(he),this.name="HTMLInjectionError",this.html=je}}const _t=n,st=r,vt=Symbol("nomatch"),Dt=7,Pt=function(X){const he=Object.create(null),je=Object.create(null),Ze=[];let St=!0;const at="Could not find the language '{}', did you forget to load/include a language module?",qe={disableAutodetect:!0,name:"Plain text",contains:[]};let Ee={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:h};function Ue(Pe){return Ee.noHighlightRe.test(Pe)}function ze(Pe){let ot=Pe.className+" ";ot+=Pe.parentNode?Pe.parentNode.className:"";const Lt=Ee.languageDetectRe.exec(ot);if(Lt){const rn=hr(Lt[1]);return rn||(ce(at.replace("{}",Lt[1])),ce("Falling back to no-highlight mode for this block.",Pe)),rn?Lt[1]:"no-highlight"}return ot.split(/\s+/).find(rn=>Ue(rn)||hr(rn))}function Ne(Pe,ot,Lt){let rn="",Mn="";typeof ot=="object"?(rn=Pe,Lt=ot.ignoreIllegals,Mn=ot.language):(J("10.7.0","highlight(lang, code, ...args) has been deprecated."),J("10.7.0",`Please use highlight(code, options) instead.
|
|
40
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Mn=Pe,rn=ot),Lt===void 0&&(Lt=!0);const rr={code:rn,language:Mn};To("before:highlight",rr);const Pr=rr.result?rr.result:Ie(rr.language,rr.code,Lt);return Pr.code=rr.code,To("after:highlight",Pr),Pr}function Ie(Pe,ot,Lt,rn){const Mn=Object.create(null);function rr(Ve,nt){return Ve.keywords[nt]}function Pr(){if(!bt.keywords){Pn.addText(sn);return}let Ve=0;bt.keywordPatternRe.lastIndex=0;let nt=bt.keywordPatternRe.exec(sn),Ct="";for(;nt;){Ct+=sn.substring(Ve,nt.index);const qt=Xn.case_insensitive?nt[0].toLowerCase():nt[0],Cn=rr(bt,qt);if(Cn){const[Qr,ql]=Cn;if(Pn.addText(Ct),Ct="",Mn[qt]=(Mn[qt]||0)+1,Mn[qt]<=Dt&&(Os+=ql),Qr.startsWith("_"))Ct+=nt[0];else{const ff=Xn.classNameAliases[Qr]||Qr;$r(nt[0],ff)}}else Ct+=nt[0];Ve=bt.keywordPatternRe.lastIndex,nt=bt.keywordPatternRe.exec(sn)}Ct+=sn.substring(Ve),Pn.addText(Ct)}function kr(){if(sn==="")return;let Ve=null;if(typeof bt.subLanguage=="string"){if(!he[bt.subLanguage]){Pn.addText(sn);return}Ve=Ie(bt.subLanguage,sn,!0,cf[bt.subLanguage]),cf[bt.subLanguage]=Ve._top}else Ve=Be(sn,bt.subLanguage.length?bt.subLanguage:null);bt.relevance>0&&(Os+=Ve.relevance),Pn.__addSublanguage(Ve._emitter,Ve.language)}function yn(){bt.subLanguage!=null?kr():Pr(),sn=""}function $r(Ve,nt){Ve!==""&&(Pn.startScope(nt),Pn.addText(Ve),Pn.endScope())}function lf(Ve,nt){let Ct=1;const qt=nt.length-1;for(;Ct<=qt;){if(!Ve._emit[Ct]){Ct++;continue}const Cn=Xn.classNameAliases[Ve[Ct]]||Ve[Ct],Qr=nt[Ct];Cn?$r(Qr,Cn):(sn=Qr,Pr(),sn=""),Ct++}}function ba(Ve,nt){return Ve.scope&&typeof Ve.scope=="string"&&Pn.openNode(Xn.classNameAliases[Ve.scope]||Ve.scope),Ve.beginScope&&(Ve.beginScope._wrap?($r(sn,Xn.classNameAliases[Ve.beginScope._wrap]||Ve.beginScope._wrap),sn=""):Ve.beginScope._multi&&(lf(Ve.beginScope,nt),sn="")),bt=Object.create(Ve,{parent:{value:bt}}),bt}function Bl(Ve,nt,Ct){let qt=C(Ve.endRe,Ct);if(qt){if(Ve["on:end"]){const Cn=new t(Ve);Ve["on:end"](nt,Cn),Cn.isMatchIgnored&&(qt=!1)}if(qt){for(;Ve.endsParent&&Ve.parent;)Ve=Ve.parent;return Ve}}if(Ve.endsWithParent)return Bl(Ve.parent,nt,Ct)}function ya(Ve){return bt.matcher.regexIndex===0?(sn+=Ve[0],1):(Ms=!0,0)}function Xh(Ve){const nt=Ve[0],Ct=Ve.rule,qt=new t(Ct),Cn=[Ct.__beforeBegin,Ct["on:begin"]];for(const Qr of Cn)if(Qr&&(Qr(Ve,qt),qt.isMatchIgnored))return ya(nt);return Ct.skip?sn+=nt:(Ct.excludeBegin&&(sn+=nt),yn(),!Ct.returnBegin&&!Ct.excludeBegin&&(sn=nt)),ba(Ct,Ve),Ct.returnBegin?0:nt.length}function Sr(Ve){const nt=Ve[0],Ct=ot.substring(Ve.index),qt=Bl(bt,Ve,Ct);if(!qt)return vt;const Cn=bt;bt.endScope&&bt.endScope._wrap?(yn(),$r(nt,bt.endScope._wrap)):bt.endScope&&bt.endScope._multi?(yn(),lf(bt.endScope,Ve)):Cn.skip?sn+=nt:(Cn.returnEnd||Cn.excludeEnd||(sn+=nt),yn(),Cn.excludeEnd&&(sn=nt));do bt.scope&&Pn.closeNode(),!bt.skip&&!bt.subLanguage&&(Os+=bt.relevance),bt=bt.parent;while(bt!==qt.parent);return qt.starts&&ba(qt.starts,Ve),Cn.returnEnd?0:nt.length}function Fl(){const Ve=[];for(let nt=bt;nt!==Xn;nt=nt.parent)nt.scope&&Ve.unshift(nt.scope);Ve.forEach(nt=>Pn.openNode(nt))}let Ro={};function va(Ve,nt){const Ct=nt&&nt[0];if(sn+=Ve,Ct==null)return yn(),0;if(Ro.type==="begin"&&nt.type==="end"&&Ro.index===nt.index&&Ct===""){if(sn+=ot.slice(nt.index,nt.index+1),!St){const qt=new Error(`0 width match regex (${Pe})`);throw qt.languageName=Pe,qt.badRule=Ro.rule,qt}return 1}if(Ro=nt,nt.type==="begin")return Xh(nt);if(nt.type==="illegal"&&!Lt){const qt=new Error('Illegal lexeme "'+Ct+'" for mode "'+(bt.scope||"<unnamed>")+'"');throw qt.mode=bt,qt}else if(nt.type==="end"){const qt=Sr(nt);if(qt!==vt)return qt}if(nt.type==="illegal"&&Ct==="")return sn+=`
|
|
41
|
+
`,1;if(Ul>1e5&&Ul>nt.index*3)throw new Error("potential infinite loop, way more iterations than matches");return sn+=Ct,Ct.length}const Xn=hr(Pe);if(!Xn)throw ee(at.replace("{}",Pe)),new Error('Unknown language: "'+Pe+'"');const uf=Qe(Xn);let xa="",bt=rn||uf;const cf={},Pn=new Ee.__emitter(Ee);Fl();let sn="",Os=0,Xi=0,Ul=0,Ms=!1;try{if(Xn.__emitTokens)Xn.__emitTokens(ot,Pn);else{for(bt.matcher.considerAll();;){Ul++,Ms?Ms=!1:bt.matcher.considerAll(),bt.matcher.lastIndex=Xi;const Ve=bt.matcher.exec(ot);if(!Ve)break;const nt=ot.substring(Xi,Ve.index),Ct=va(nt,Ve);Xi=Ve.index+Ct}va(ot.substring(Xi))}return Pn.finalize(),xa=Pn.toHTML(),{language:Pe,value:xa,relevance:Os,illegal:!1,_emitter:Pn,_top:bt}}catch(Ve){if(Ve.message&&Ve.message.includes("Illegal"))return{language:Pe,value:_t(ot),illegal:!0,relevance:0,_illegalBy:{message:Ve.message,index:Xi,context:ot.slice(Xi-100,Xi+100),mode:Ve.mode,resultSoFar:xa},_emitter:Pn};if(St)return{language:Pe,value:_t(ot),illegal:!1,relevance:0,errorRaised:Ve,_emitter:Pn,_top:bt};throw Ve}}function ut(Pe){const ot={value:_t(Pe),illegal:!1,relevance:0,_top:qe,_emitter:new Ee.__emitter(Ee)};return ot._emitter.addText(Pe),ot}function Be(Pe,ot){ot=ot||Ee.languages||Object.keys(he);const Lt=ut(Pe),rn=ot.filter(hr).filter(Ns).map(yn=>Ie(yn,Pe,!1));rn.unshift(Lt);const Mn=rn.sort((yn,$r)=>{if(yn.relevance!==$r.relevance)return $r.relevance-yn.relevance;if(yn.language&&$r.language){if(hr(yn.language).supersetOf===$r.language)return 1;if(hr($r.language).supersetOf===yn.language)return-1}return 0}),[rr,Pr]=Mn,kr=rr;return kr.secondBest=Pr,kr}function Rt(Pe,ot,Lt){const rn=ot&&je[ot]||Lt;Pe.classList.add("hljs"),Pe.classList.add(`language-${rn}`)}function wt(Pe){let ot=null;const Lt=ze(Pe);if(Ue(Lt))return;if(To("before:highlightElement",{el:Pe,language:Lt}),Pe.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Pe);return}if(Pe.children.length>0&&(Ee.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(Pe)),Ee.throwUnescapedHTML))throw new Tt("One of your code blocks includes unescaped HTML.",Pe.innerHTML);ot=Pe;const rn=ot.textContent,Mn=Lt?Ne(rn,{language:Lt,ignoreIllegals:!0}):Be(rn);Pe.innerHTML=Mn.value,Pe.dataset.highlighted="yes",Rt(Pe,Lt,Mn.language),Pe.result={language:Mn.language,re:Mn.relevance,relevance:Mn.relevance},Mn.secondBest&&(Pe.secondBest={language:Mn.secondBest.language,relevance:Mn.secondBest.relevance}),To("after:highlightElement",{el:Pe,result:Mn,text:rn})}function $t(Pe){Ee=st(Ee,Pe)}const Rn=()=>{Sn(),J("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function jr(){Sn(),J("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let zr=!1;function Sn(){function Pe(){Sn()}if(document.readyState==="loading"){zr||window.addEventListener("DOMContentLoaded",Pe,!1),zr=!0;return}document.querySelectorAll(Ee.cssSelector).forEach(wt)}function ga(Pe,ot){let Lt=null;try{Lt=ot(X)}catch(rn){if(ee("Language definition for '{}' could not be registered.".replace("{}",Pe)),St)ee(rn);else throw rn;Lt=qe}Lt.name||(Lt.name=Pe),he[Pe]=Lt,Lt.rawDefinition=ot.bind(null,X),Lt.aliases&&Ki(Lt.aliases,{languageName:Pe})}function Wi(Pe){delete he[Pe];for(const ot of Object.keys(je))je[ot]===Pe&&delete je[ot]}function Eo(){return Object.keys(he)}function hr(Pe){return Pe=(Pe||"").toLowerCase(),he[Pe]||he[je[Pe]]}function Ki(Pe,{languageName:ot}){typeof Pe=="string"&&(Pe=[Pe]),Pe.forEach(Lt=>{je[Lt.toLowerCase()]=ot})}function Ns(Pe){const ot=hr(Pe);return ot&&!ot.disableAutodetect}function As(Pe){Pe["before:highlightBlock"]&&!Pe["before:highlightElement"]&&(Pe["before:highlightElement"]=ot=>{Pe["before:highlightBlock"](Object.assign({block:ot.el},ot))}),Pe["after:highlightBlock"]&&!Pe["after:highlightElement"]&&(Pe["after:highlightElement"]=ot=>{Pe["after:highlightBlock"](Object.assign({block:ot.el},ot))})}function zn(Pe){As(Pe),Ze.push(Pe)}function af(Pe){const ot=Ze.indexOf(Pe);ot!==-1&&Ze.splice(ot,1)}function To(Pe,ot){const Lt=Pe;Ze.forEach(function(rn){rn[Lt]&&rn[Lt](ot)})}function Yi(Pe){return J("10.7.0","highlightBlock will be removed entirely in v12.0"),J("10.7.0","Please use highlightElement now."),wt(Pe)}Object.assign(X,{highlight:Ne,highlightAuto:Be,highlightAll:Sn,highlightElement:wt,highlightBlock:Yi,configure:$t,initHighlighting:Rn,initHighlightingOnLoad:jr,registerLanguage:ga,unregisterLanguage:Wi,listLanguages:Eo,getLanguage:hr,registerAliases:Ki,autoDetection:Ns,inherit:st,addPlugin:zn,removePlugin:af}),X.debugMode=function(){St=!1},X.safeMode=function(){St=!0},X.versionString=tt,X.regex={concat:S,lookahead:b,either:T,optional:k,anyNumberOfTimes:y};for(const Pe in ge)typeof ge[Pe]=="object"&&e(ge[Pe]);return Object.assign(X,ge),X},At=Pt({});return At.newInstance=()=>Pt({}),ly=At,At.HighlightJS=At,At.default=At,ly}var $Q=PQ();const BQ=zc($Q),ZR={},FQ="hljs-";function UQ(e){const t=BQ.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:s,register:a,registerAlias:l,registered:c};function n(d,f,h){const m=h||ZR,b=typeof m.prefix=="string"?m.prefix:FQ;if(!t.getLanguage(d))throw new Error("Unknown language: `"+d+"` is not registered");t.configure({__emitter:qQ,classPrefix:b});const y=t.highlight(f,{ignoreIllegals:!0,language:d});if(y.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:y.errorRaised});const k=y._emitter.root,S=k.data;return S.language=y.language,S.relevance=y.relevance,k}function r(d,f){const m=(f||ZR).subset||s();let b=-1,y=0,k;for(;++b<m.length;){const S=m[b];if(!t.getLanguage(S))continue;const R=n(S,d,f);R.data&&R.data.relevance!==void 0&&R.data.relevance>y&&(y=R.data.relevance,k=R)}return k||{type:"root",children:[],data:{language:void 0,relevance:y}}}function s(){return t.listLanguages()}function a(d,f){if(typeof d=="string")t.registerLanguage(d,f);else{let h;for(h in d)Object.hasOwn(d,h)&&t.registerLanguage(h,d[h])}}function l(d,f){if(typeof d=="string")t.registerAliases(typeof f=="string"?f:[...f],{languageName:d});else{let h;for(h in d)if(Object.hasOwn(d,h)){const m=d[h];t.registerAliases(typeof m=="string"?m:[...m],{languageName:h})}}}function c(d){return!!t.getLanguage(d)}}class qQ{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],s=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:s}):r.children.push(...s)}openNode(t){const n=this,r=t.split(".").map(function(l,c){return c?l+"_".repeat(c):n.options.classPrefix+l}),s=this.stack[this.stack.length-1],a={type:"element",tagName:"span",properties:{className:r},children:[]};s.children.push(a),this.stack.push(a)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const HQ={};function GQ(e){const t=e||HQ,n=t.aliases,r=t.detect||!1,s=t.languages||zQ,a=t.plainText,l=t.prefix,c=t.subset;let d="hljs";const f=UQ(s);if(n&&f.registerAlias(n),l){const h=l.indexOf("-");d=h===-1?l:l.slice(0,h)}return function(h,m){Kh(h,"element",function(b,y,k){if(b.tagName!=="code"||!k||k.type!=="element"||k.tagName!=="pre")return;const S=VQ(b);if(S===!1||!S&&!r||S&&a&&a.includes(S))return;Array.isArray(b.properties.className)||(b.properties.className=[]),b.properties.className.includes(d)||b.properties.className.unshift(d);const R=cZ(b,{whitespace:"pre"});let T;try{T=S?f.highlight(S,R,{prefix:l}):f.highlightAuto(R,{prefix:l,subset:c})}catch(E){const C=E;if(S&&/Unknown language/.test(C.message)){m.message("Cannot highlight as `"+S+"`, it’s not registered",{ancestors:[k,b],cause:C,place:b.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw C}!S&&T.data&&T.data.language&&b.properties.className.push("language-"+T.data.language),T.children.length>0&&(b.children=T.children)})}}function VQ(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let r;for(;++n<t.length;){const s=String(t[n]);if(s==="no-highlight"||s==="nohighlight")return!1;!r&&s.slice(0,5)==="lang-"&&(r=s.slice(5)),!r&&s.slice(0,9)==="language-"&&(r=s.slice(9))}return r}function QR(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function WQ(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function KQ(e,t,n){const s=nf((n||{}).ignore||[]),a=YQ(t);let l=-1;for(;++l<a.length;)II(e,"text",c);function c(f,h){let m=-1,b;for(;++m<h.length;){const y=h[m],k=b?b.children:void 0;if(s(y,k?k.indexOf(y):void 0,b))return;b=y}if(b)return d(f,h)}function d(f,h){const m=h[h.length-1],b=a[l][0],y=a[l][1];let k=0;const R=m.children.indexOf(f);let T=!1,E=[];b.lastIndex=0;let C=b.exec(f.value);for(;C;){const _=C.index,D={index:C.index,input:C.input,stack:[...h,f]};let N=y(...C,D);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?b.lastIndex=_+1:(k!==_&&E.push({type:"text",value:f.value.slice(k,_)}),Array.isArray(N)?E.push(...N):N&&E.push(N),k=_+C[0].length,T=!0),!b.global)break;C=b.exec(f.value)}return T?(k<f.value.length&&E.push({type:"text",value:f.value.slice(k)}),m.children.splice(R,1,...E)):E=[f],R+E.length}}function YQ(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 s=n[r];t.push([XQ(s[0]),ZQ(s[1])])}return t}function XQ(e){return typeof e=="string"?new RegExp(WQ(e),"g"):e}function ZQ(e){return typeof e=="function"?e:function(){return e}}const uy="phrasing",cy=["autolink","link","image","label"];function QQ(){return{transforms:[sJ],enter:{literalAutolink:eJ,literalAutolinkEmail:fy,literalAutolinkHttp:fy,literalAutolinkWww:fy},exit:{literalAutolink:iJ,literalAutolinkEmail:rJ,literalAutolinkHttp:tJ,literalAutolinkWww:nJ}}}function JQ(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:uy,notInConstruct:cy},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:uy,notInConstruct:cy},{character:":",before:"[ps]",after:"\\/",inConstruct:uy,notInConstruct:cy}]}}function eJ(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function fy(e){this.config.enter.autolinkProtocol.call(this,e)}function tJ(e){this.config.exit.autolinkProtocol.call(this,e)}function nJ(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 rJ(e){this.config.exit.autolinkEmail.call(this,e)}function iJ(e){this.exit(e)}function sJ(e){KQ(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,oJ],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),aJ]],{ignore:["link","linkReference"]})}function oJ(e,t,n,r,s){let a="";if(!nD(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!lJ(n)))return!1;const l=uJ(n+r);if(!l[0])return!1;const c={type:"link",title:null,url:a+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[c,{type:"text",value:l[1]}]:c}function aJ(e,t,n,r){return!nD(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function lJ(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 uJ(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 s=QR(e,"(");let a=QR(e,")");for(;r!==-1&&s>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function nD(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||aa(n)||Hh(n))&&(!t||n!==47)}rD.peek=yJ;function cJ(){this.buffer()}function fJ(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function dJ(){this.buffer()}function pJ(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function hJ(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ki(this.sliceSerialize(e)).toLowerCase(),n.label=t}function mJ(e){this.exit(e)}function gJ(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ki(this.sliceSerialize(e)).toLowerCase(),n.label=t}function bJ(e){this.exit(e)}function yJ(){return"["}function rD(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const l=n.enter("footnoteReference"),c=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),l(),a+=s.move("]"),a}function vJ(){return{enter:{gfmFootnoteCallString:cJ,gfmFootnoteCall:fJ,gfmFootnoteDefinitionLabelString:dJ,gfmFootnoteDefinition:pJ},exit:{gfmFootnoteCallString:hJ,gfmFootnoteCall:mJ,gfmFootnoteDefinitionLabelString:gJ,gfmFootnoteDefinition:bJ}}}function xJ(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:rD},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,l){const c=a.createTracker(l);let d=c.move("[^");const f=a.enter("footnoteDefinition"),h=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),h(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
42
|
+
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?iD:kJ))),f(),d}}function kJ(e,t,n){return t===0?e:iD(e,t,n)}function iD(e,t,n){return(n?"":" ")+e}const SJ=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];sD.peek=CJ;function wJ(){return{canContainEols:["delete"],enter:{strikethrough:TJ},exit:{strikethrough:RJ}}}function EJ(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:SJ}],handlers:{delete:sD}}}function TJ(e){this.enter({type:"delete",children:[]},e)}function RJ(e){this.exit(e)}function sD(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let l=s.move("~~");return l+=n.containerPhrasing(e,{...s.current(),before:l,after:"~"}),l+=s.move("~~"),a(),l}function CJ(){return"~"}function _J(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||AJ,s=[],a=[],l=[],c=[];let d=0,f=-1;for(;++f<e.length;){const k=[],S=[];let R=-1;for(e[f].length>d&&(d=e[f].length);++R<e[f].length;){const T=NJ(e[f][R]);if(t.alignDelimiters!==!1){const E=r(T);S[R]=E,(c[R]===void 0||E>c[R])&&(c[R]=E)}k.push(T)}a[f]=k,l[f]=S}let h=-1;if(typeof n=="object"&&"length"in n)for(;++h<d;)s[h]=JR(n[h]);else{const k=JR(n);for(;++h<d;)s[h]=k}h=-1;const m=[],b=[];for(;++h<d;){const k=s[h];let S="",R="";k===99?(S=":",R=":"):k===108?S=":":k===114&&(R=":");let T=t.alignDelimiters===!1?1:Math.max(1,c[h]-S.length-R.length);const E=S+"-".repeat(T)+R;t.alignDelimiters!==!1&&(T=S.length+T+R.length,T>c[h]&&(c[h]=T),b[h]=T),m[h]=E}a.splice(1,0,m),l.splice(1,0,b),f=-1;const y=[];for(;++f<a.length;){const k=a[f],S=l[f];h=-1;const R=[];for(;++h<d;){const T=k[h]||"";let E="",C="";if(t.alignDelimiters!==!1){const _=c[h]-(S[h]||0),D=s[h];D===114?E=" ".repeat(_):D===99?_%2?(E=" ".repeat(_/2+.5),C=" ".repeat(_/2-.5)):(E=" ".repeat(_/2),C=E):C=" ".repeat(_)}t.delimiterStart!==!1&&!h&&R.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&T==="")&&(t.delimiterStart!==!1||h)&&R.push(" "),t.alignDelimiters!==!1&&R.push(E),R.push(T),t.alignDelimiters!==!1&&R.push(C),t.padding!==!1&&R.push(" "),(t.delimiterEnd!==!1||h!==d-1)&&R.push("|")}y.push(t.delimiterEnd===!1?R.join("").replace(/ +$/,""):R.join(""))}return y.join(`
|
|
43
|
+
`)}function NJ(e){return e==null?"":String(e)}function AJ(e){return e.length}function JR(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 OJ(e,t,n,r){const s=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const l=n.indentLines(n.containerFlow(e,a.current()),MJ);return s(),l}function MJ(e,t,n){return">"+(n?"":" ")+e}function IJ(e,t){return eC(e,t.inConstruct,!0)&&!eC(e,t.notInConstruct,!1)}function eC(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 tC(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
44
|
+
`&&IJ(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
45
|
+
`}function DJ(e,t){const n=String(e);let r=n.indexOf(t),s=r,a=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++a>l&&(l=a):a=1,s=r+t.length,r=n.indexOf(t,s);return l}function LJ(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 jJ(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 zJ(e,t,n,r){const s=jJ(n),a=e.value||"",l=s==="`"?"GraveAccent":"Tilde";if(LJ(e,n)){const m=n.enter("codeIndented"),b=n.indentLines(a,PJ);return m(),b}const c=n.createTracker(r),d=s.repeat(Math.max(DJ(a,s)+1,3)),f=n.enter("codeFenced");let h=c.move(d);if(e.lang){const m=n.enter(`codeFencedLang${l}`);h+=c.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...c.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${l}`);h+=c.move(" "),h+=c.move(n.safe(e.meta,{before:h,after:`
|
|
46
|
+
`,encode:["`"],...c.current()})),m()}return h+=c.move(`
|
|
47
|
+
`),a&&(h+=c.move(a+`
|
|
48
|
+
`)),h+=c.move(d),f(),h}function PJ(e,t,n){return(n?"":" ")+e}function yk(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 $J(e,t,n,r){const s=yk(n),a=s==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),{before:f,after:"]",...d.current()})),f+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":`
|
|
49
|
+
`,...d.current()}))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,{before:f,after:s,...d.current()})),f+=d.move(s),c()),l(),f}function BJ(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 Lc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function eh(e,t,n){const r=_l(e),s=_l(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}oD.peek=FJ;function oD(e,t,n,r){const s=BJ(n),a=n.enter("emphasis"),l=n.createTracker(r),c=l.move(s);let d=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const f=d.charCodeAt(0),h=eh(r.before.charCodeAt(r.before.length-1),f,s);h.inside&&(d=Lc(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=eh(r.after.charCodeAt(0),m,s);b.inside&&(d=d.slice(0,-1)+Lc(m));const y=l.move(s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:h.outside},c+d+y}function FJ(e,t,n){return n.options.emphasis||"*"}function UJ(e,t){let n=!1;return Kh(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,pv}),!!((!e.depth||e.depth<3)&&lk(e)&&(t.options.setext||n))}function qJ(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(UJ(e,n)){const h=n.enter("headingSetext"),m=n.enter("phrasing"),b=n.containerPhrasing(e,{...a.current(),before:`
|
|
50
|
+
`,after:`
|
|
51
|
+
`});return m(),h(),b+`
|
|
52
|
+
`+(s===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
53
|
+
`))+1))}const l="#".repeat(s),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(l+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
|
|
54
|
+
`,...a.current()});return/^[\t ]/.test(f)&&(f=Lc(f.charCodeAt(0))+f.slice(1)),f=f?l+" "+f:l,n.options.closeAtx&&(f+=" "+l),d(),c(),f}aD.peek=HJ;function aD(e){return e.value||""}function HJ(){return"<"}lD.peek=GJ;function lD(e,t,n,r){const s=yk(n),a=s==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,{before:f,after:"]",...d.current()})),f+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":")",...d.current()}))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,{before:f,after:s,...d.current()})),f+=d.move(s),c()),f+=d.move(")"),l(),f}function GJ(){return"!"}uD.peek=VJ;function uD(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const f=n.safe(e.alt,{before:d,after:"]",...c.current()});d+=c.move(f+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return l(),n.stack=h,a(),s==="full"||!f||f!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function VJ(){return"!"}cD.peek=WJ;function cD(e,t,n){let r=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const l=n.unsafe[a],c=n.compilePattern(l);let d;if(l.atBreak)for(;d=c.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return s+r+s}function WJ(){return"`"}function fD(e,t){const n=lk(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))}dD.peek=KJ;function dD(e,t,n,r){const s=yk(n),a=s==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,d;if(fD(e,n)){const h=n.stack;n.stack=[],c=n.enter("autolink");let m=l.move("<");return m+=l.move(n.containerPhrasing(e,{before:m,after:">",...l.current()})),m+=l.move(">"),c(),n.stack=h,m}c=n.enter("link"),d=n.enter("label");let f=l.move("[");return f+=l.move(n.containerPhrasing(e,{before:f,after:"](",...l.current()})),f+=l.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=l.move("<"),f+=l.move(n.safe(e.url,{before:f,after:">",...l.current()})),f+=l.move(">")):(d=n.enter("destinationRaw"),f+=l.move(n.safe(e.url,{before:f,after:e.title?" ":")",...l.current()}))),d(),e.title&&(d=n.enter(`title${a}`),f+=l.move(" "+s),f+=l.move(n.safe(e.title,{before:f,after:s,...l.current()})),f+=l.move(s),d()),f+=l.move(")"),c(),f}function KJ(e,t,n){return fD(e,n)?"<":"["}pD.peek=YJ;function pD(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const f=n.containerPhrasing(e,{before:d,after:"]",...c.current()});d+=c.move(f+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return l(),n.stack=h,a(),s==="full"||!f||f!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function YJ(){return"["}function vk(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 XJ(e){const t=vk(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 ZJ(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 hD(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 QJ(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let l=e.ordered?ZJ(n):vk(n);const c=e.ordered?l==="."?")":".":XJ(n);let d=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&h&&(!h.children||!h.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&&(d=!0),hD(n)===l&&h){let m=-1;for(;++m<e.children.length;){const b=e.children[m];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(l=c),n.bulletCurrent=l;const f=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=a,s(),f}function JJ(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 eee(e,t,n,r){const s=JJ(n);let a=n.bulletCurrent||vk(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let l=a.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(l-a.length)),c.shift(l);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.current()),h);return d(),f;function h(m,b,y){return b?(y?"":" ".repeat(l))+m:(y?a:a+" ".repeat(l-a.length))+m}}function tee(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),l=n.containerPhrasing(e,r);return a(),s(),l}const nee=nf(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function ree(e,t,n,r){return(e.children.some(function(l){return nee(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function iee(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}mD.peek=see;function mD(e,t,n,r){const s=iee(n),a=n.enter("strong"),l=n.createTracker(r),c=l.move(s+s);let d=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const f=d.charCodeAt(0),h=eh(r.before.charCodeAt(r.before.length-1),f,s);h.inside&&(d=Lc(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=eh(r.after.charCodeAt(0),m,s);b.inside&&(d=d.slice(0,-1)+Lc(m));const y=l.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:h.outside},c+d+y}function see(e,t,n){return n.options.strong||"*"}function oee(e,t,n,r){return n.safe(e.value,r)}function aee(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 lee(e,t,n){const r=(hD(n)+(n.options.ruleSpaces?" ":"")).repeat(aee(n));return n.options.ruleSpaces?r.slice(0,-1):r}const gD={blockquote:OJ,break:tC,code:zJ,definition:$J,emphasis:oD,hardBreak:tC,heading:qJ,html:aD,image:lD,imageReference:uD,inlineCode:cD,link:dD,linkReference:pD,list:QJ,listItem:eee,paragraph:tee,root:ree,strong:mD,text:oee,thematicBreak:lee};function uee(){return{enter:{table:cee,tableData:nC,tableHeader:nC,tableRow:dee},exit:{codeText:pee,table:fee,tableData:dy,tableHeader:dy,tableRow:dy}}}function cee(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 fee(e){this.exit(e),this.data.inTable=void 0}function dee(e){this.enter({type:"tableRow",children:[]},e)}function dy(e){this.exit(e)}function nC(e){this.enter({type:"tableCell",children:[]},e)}function pee(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,hee));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function hee(e,t){return t==="|"?t:e}function mee(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
55
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:l,tableCell:d,tableRow:c}};function l(y,k,S,R){return f(h(y,S,R),y.align)}function c(y,k,S,R){const T=m(y,S,R),E=f([T]);return E.slice(0,E.indexOf(`
|
|
56
|
+
`))}function d(y,k,S,R){const T=S.enter("tableCell"),E=S.enter("phrasing"),C=S.containerPhrasing(y,{...R,before:a,after:a});return E(),T(),C}function f(y,k){return _J(y,{align:k,alignDelimiters:r,padding:n,stringLength:s})}function h(y,k,S){const R=y.children;let T=-1;const E=[],C=k.enter("table");for(;++T<R.length;)E[T]=m(R[T],k,S);return C(),E}function m(y,k,S){const R=y.children;let T=-1;const E=[],C=k.enter("tableRow");for(;++T<R.length;)E[T]=d(R[T],y,k,S);return C(),E}function b(y,k,S){let R=gD.inlineCode(y,k,S);return S.stack.includes("tableCell")&&(R=R.replace(/\|/g,"\\$&")),R}}function gee(){return{exit:{taskListCheckValueChecked:rC,taskListCheckValueUnchecked:rC,paragraph:yee}}}function bee(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:vee}}}function rC(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function yee(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 s=t.children;let a=-1,l;for(;++a<s.length;){const c=s[a];if(c.type==="paragraph"){l=c;break}}l===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 vee(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(l);let d=gD.listItem(e,t,n,{...r,...c.current()});return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(h){return h+l}}function xee(){return[QQ(),vJ(),wJ(),uee(),gee()]}function kee(e){return{extensions:[JQ(),xJ(e),EJ(),mee(e),bee()]}}const See={tokenize:_ee,partial:!0},bD={tokenize:Nee,partial:!0},yD={tokenize:Aee,partial:!0},vD={tokenize:Oee,partial:!0},wee={tokenize:Mee,partial:!0},xD={name:"wwwAutolink",tokenize:Ree,previous:SD},kD={name:"protocolAutolink",tokenize:Cee,previous:wD},_s={name:"emailAutolink",tokenize:Tee,previous:ED},Vi={};function Eee(){return{text:Vi}}let Go=48;for(;Go<123;)Vi[Go]=_s,Go++,Go===58?Go=65:Go===91&&(Go=97);Vi[43]=_s;Vi[45]=_s;Vi[46]=_s;Vi[95]=_s;Vi[72]=[_s,kD];Vi[104]=[_s,kD];Vi[87]=[_s,xD];Vi[119]=[_s,xD];function Tee(e,t,n){const r=this;let s,a;return l;function l(m){return!yv(m)||!ED.call(r,r.previous)||xk(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return yv(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(wee,h,f)(m):m===45||m===95||ur(m)?(a=!0,e.consume(m),d):h(m)}function f(m){return e.consume(m),s=!0,d}function h(m){return a&&s&&vr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function Ree(e,t,n){const r=this;return s;function s(l){return l!==87&&l!==119||!SD.call(r,r.previous)||xk(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(See,e.attempt(bD,e.attempt(yD,a),n),n)(l))}function a(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function Cee(e,t,n){const r=this;let s="",a=!1;return l;function l(m){return(m===72||m===104)&&wD.call(r,r.previous)&&!xk(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(vr(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const b=s.toLowerCase();if(b==="http"||b==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),a?f:(a=!0,d)):n(m)}function f(m){return m===null||Yp(m)||bn(m)||aa(m)||Hh(m)?n(m):e.attempt(bD,e.attempt(yD,h),n)(m)}function h(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function _ee(e,t,n){let r=0;return s;function s(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),s):l===46&&r===3?(e.consume(l),a):n(l)}function a(l){return l===null?n(l):t(l)}}function Nee(e,t,n){let r,s,a;return l;function l(f){return f===46||f===95?e.check(vD,d,c)(f):f===null||bn(f)||aa(f)||f!==45&&Hh(f)?d(f):(a=!0,e.consume(f),l)}function c(f){return f===95?r=!0:(s=r,r=void 0),e.consume(f),l}function d(f){return s||r||!a?n(f):t(f)}}function Aee(e,t){let n=0,r=0;return s;function s(l){return l===40?(n++,e.consume(l),s):l===41&&r<n?a(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(vD,t,a)(l):l===null||bn(l)||aa(l)?t(l):(e.consume(l),s)}function a(l){return l===41&&r++,e.consume(l),s}}function Oee(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),s):c===60||c===null||bn(c)||aa(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||bn(c)||aa(c)?t(c):r(c)}function a(c){return vr(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),r):vr(c)?(e.consume(c),l):n(c)}}function Mee(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return ur(a)?n(a):t(a)}}function SD(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||bn(e)}function wD(e){return!vr(e)}function ED(e){return!(e===47||yv(e))}function yv(e){return e===43||e===45||e===46||e===95||ur(e)}function xk(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}const Iee={tokenize:Fee,partial:!0};function Dee(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Pee,continuation:{tokenize:$ee},exit:Bee}},text:{91:{name:"gfmFootnoteCall",tokenize:zee},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Lee,resolveTo:jee}}}}function Lee(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;s--;){const d=r.events[s][1];if(d.type==="labelImage"){l=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!l||!l._balanced)return n(d);const f=ki(r.sliceSerialize({start:l.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function jee(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)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",a,t],["enter",l,t],["exit",l,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function zee(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,l;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!l||m===null||m===91||bn(m))return n(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(ki(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return bn(m)||(l=!0),a++,e.consume(m),m===92?h:f}function h(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function Pee(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,c;return d;function d(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(k)}function h(k){if(l>999||k===93&&!c||k===null||k===91||bn(k))return n(k);if(k===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=ki(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return bn(k)||(c=!0),l++,e.consume(k),k===92?m:h}function m(k){return k===91||k===92||k===93?(e.consume(k),l++,h):h(k)}function b(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),s.includes(a)||s.push(a),Zt(e,y,"gfmFootnoteDefinitionWhitespace")):n(k)}function y(k){return t(k)}}function $ee(e,t,n){return e.check(tf,t,e.attempt(Iee,t,n))}function Bee(e){e.exit("gfmFootnoteDefinition")}function Fee(e,t,n){const r=this;return Zt(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(a):n(a)}}function Uee(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(l,c){let d=-1;for(;++d<l.length;)if(l[d][0]==="enter"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._close){let f=d;for(;f--;)if(l[f][0]==="exit"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._open&&l[d][1].end.offset-l[d][1].start.offset===l[f][1].end.offset-l[f][1].start.offset){l[d][1].type="strikethroughSequence",l[f][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},l[f][1].start),end:Object.assign({},l[d][1].end)},m={type:"strikethroughText",start:Object.assign({},l[f][1].end),end:Object.assign({},l[d][1].start)},b=[["enter",h,c],["enter",l[f][1],c],["exit",l[f][1],c],["enter",m,c]],y=c.parser.constructs.insideSpan.null;y&&Zr(b,b.length,0,Gh(y,l.slice(f+1,d),c)),Zr(b,b.length,0,[["exit",m,c],["enter",l[d][1],c],["exit",l[d][1],c],["exit",h,c]]),Zr(l,f-1,d-f+3,b),d=f+b.length-2;break}}for(d=-1;++d<l.length;)l[d][1].type==="strikethroughSequenceTemporary"&&(l[d][1].type="data");return l}function a(l,c,d){const f=this.previous,h=this.events;let m=0;return b;function b(k){return f===126&&h[h.length-1][1].type!=="characterEscape"?d(k):(l.enter("strikethroughSequenceTemporary"),y(k))}function y(k){const S=_l(f);if(k===126)return m>1?d(k):(l.consume(k),m++,y);if(m<2&&!n)return d(k);const R=l.exit("strikethroughSequenceTemporary"),T=_l(k);return R._open=!T||T===2&&!!S,R._close=!S||S===2&&!!T,c(k)}}}class qee{constructor(){this.map=[]}add(t,n,r){Hee(this,t,n,r)}consume(t){if(this.map.sort(function(a,l){return a[0]-l[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 s=r.pop();for(;s;){for(const a of s)t.push(a);s=r.pop()}this.map.length=0}}function Hee(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function Gee(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Vee(){return{flow:{null:{name:"table",tokenize:Wee,resolveAll:Kee}}}}function Wee(e,t,n){const r=this;let s=0,a=0,l;return c;function c(I){let Y=r.events.length-1;for(;Y>-1;){const L=r.events[Y][1].type;if(L==="lineEnding"||L==="linePrefix")Y--;else break}const H=Y>-1?r.events[Y][1].type:null,q=H==="tableHead"||H==="tableRow"?N:d;return q===N&&r.parser.lazy[r.now().line]?n(I):q(I)}function d(I){return e.enter("tableHead"),e.enter("tableRow"),f(I)}function f(I){return I===124||(l=!0,a+=1),h(I)}function h(I){return I===null?n(I):mt(I)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),y):n(I):Ut(I)?Zt(e,h,"whitespace")(I):(a+=1,l&&(l=!1,s+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),l=!0,h):(e.enter("data"),m(I)))}function m(I){return I===null||I===124||bn(I)?(e.exit("data"),h(I)):(e.consume(I),I===92?b:m)}function b(I){return I===92||I===124?(e.consume(I),m):m(I)}function y(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),l=!1,Ut(I)?Zt(e,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):k(I))}function k(I){return I===45||I===58?R(I):I===124?(l=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),S):D(I)}function S(I){return Ut(I)?Zt(e,R,"whitespace")(I):R(I)}function R(I){return I===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),T):I===45?(a+=1,T(I)):I===null||mt(I)?_(I):D(I)}function T(I){return I===45?(e.enter("tableDelimiterFiller"),E(I)):D(I)}function E(I){return I===45?(e.consume(I),E):I===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(I))}function C(I){return Ut(I)?Zt(e,_,"whitespace")(I):_(I)}function _(I){return I===124?k(I):I===null||mt(I)?!l||s!==a?D(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):D(I)}function D(I){return n(I)}function N(I){return e.enter("tableRow"),A(I)}function A(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),A):I===null||mt(I)?(e.exit("tableRow"),t(I)):Ut(I)?Zt(e,A,"whitespace")(I):(e.enter("data"),$(I))}function $(I){return I===null||I===124||bn(I)?(e.exit("data"),A(I)):(e.consume(I),I===92?z:$)}function z(I){return I===92||I===124?(e.consume(I),$):$(I)}}function Kee(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],l=[0,0,0,0],c=!1,d=0,f,h,m;const b=new qee;for(;++n<e.length;){const y=e[n],k=y[1];y[0]==="enter"?k.type==="tableHead"?(c=!1,d!==0&&(iC(b,t,d,f,h),h=void 0,d=0),f={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(n,0,[["enter",f,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,h={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(n,0,[["enter",h,t]])),s=k.type==="tableDelimiterRow"?2:h?3:1):s&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(a[1]!==0&&(l[0]=l[1],m=ep(b,t,a,s,void 0,m),a=[0,0,0,0]),l[2]=n)):k.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(l[0]=l[1],m=ep(b,t,a,s,void 0,m)),a=l,l=[a[1],n,0,0])):k.type==="tableHead"?(c=!0,d=n):k.type==="tableRow"||k.type==="tableDelimiterRow"?(d=n,a[1]!==0?(l[0]=l[1],m=ep(b,t,a,s,n,m)):l[1]!==0&&(m=ep(b,t,l,s,n,m)),s=0):s&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(l[3]=n)}for(d!==0&&iC(b,t,d,f,h),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=Gee(t.events,n))}return e}function ep(e,t,n,r,s,a){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},ol(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=ol(t.events,n[1]);if(a={type:l,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=ol(t.events,n[2]),h=ol(t.events,n[3]),m={type:c,start:Object.assign({},f),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",m,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 k=n[2]+1,S=n[3]-n[2]-1;e.add(k,S,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},ol(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function iC(e,t,n,r,s){const a=[],l=ol(t.events,n);s&&(s.end=Object.assign({},l),a.push(["exit",s,t])),r.end=Object.assign({},l),a.push(["exit",r,t]),e.add(n+1,0,a)}function ol(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Yee={name:"tasklistCheck",tokenize:Zee};function Xee(){return{text:{91:Yee}}}function Zee(e,t,n){const r=this;return s;function s(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return bn(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return mt(d)?t(d):Ut(d)?e.check({tokenize:Qee},t,n)(d):n(d)}}function Qee(e,t,n){return Zt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function Jee(e){return hI([Eee(),Dee(),Uee(e),Vee(),Xee()])}const ete={};function tte(e){const t=this,n=e||ete,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(Jee(n)),a.push(xee()),l.push(kee(n))}function nte(e){return g.jsx("div",{className:"md-table-wrap",children:g.jsx("table",{...e})})}function TD(e){return g.jsx("span",{className:"md-cell",children:e})}function rte({children:e,...t}){return g.jsx("th",{...t,children:TD(e)})}function ite({children:e,...t}){return g.jsx("td",{...t,children:TD(e)})}function vv(e){return e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(vv).join(""):v.isValidElement(e)?vv(e.props.children):""}function ste({children:e,...t}){const[n,r]=v.useState(!1),s=v.useRef(void 0),a=v.useCallback(()=>{navigator.clipboard.writeText(vv(e)),r(!0),clearTimeout(s.current),s.current=setTimeout(()=>r(!1),2e3)},[e]);return g.jsxs("div",{className:"md-pre-wrap",children:[g.jsx("pre",{...t,children:e}),g.jsx("span",{className:"md-copy",children:g.jsx(dr,{icon:n?"check":"copy",size:"sm",variant:"ghost","aria-label":n?"Copied":"Copy code",onClick:a})})]})}const ote={table:nte,th:rte,td:ite,pre:ste,a:oa},Nl=v.memo(function({text:t,className:n}){return g.jsx("div",{className:n?`md ${n}`:"md",children:g.jsx(JX,{remarkPlugins:[tte],rehypePlugins:[[GQ,{detect:!1}]],components:ote,children:t??""})})});function ate(e){switch(e){case"done":return{name:"check-circle",color:"secondary"};case"error":return{name:"x-circle",color:"red"};case"awaiting":return{name:"clock",color:"yellow"};case"orphan":return{name:"slash-circle",color:"tertiary"};default:return{name:"spinner",color:"blue",modifier:"spin"}}}function sf(e){const[t,n]=v.useState(()=>Date.now()),r=e.status==="running"||e.status==="awaiting";v.useEffect(()=>{if(!r||e.endedAt!=null)return;const a=setInterval(()=>n(Date.now()),250);return()=>clearInterval(a)},[r,e.endedAt]);const s=e.endedAt??(r?t:e.startedAt??t);return e.startedAt!=null?Math.max(0,s-e.startedAt):null}function ma({status:e}){const t=ate(e);return g.jsx(Yt,{name:t.name,color:t.color,...t.modifier?{modifier:t.modifier}:{}})}function lte({callId:e}){return g.jsxs("div",{className:"approval-bar",children:[g.jsx("span",{children:"Awaiting human approval"}),g.jsx(gn,{variant:"secondary",tone:"success",size:"sm",onClick:()=>{it.submitApproval(e,"approve")},children:"Approve"}),g.jsx(gn,{variant:"secondary",tone:"danger",size:"sm",onClick:()=>{it.submitApproval(e,"deny")},children:"Deny"})]})}function ute({callId:e,authUrl:t,connection:n}){return g.jsxs("div",{className:"approval-bar",children:[g.jsxs("span",{children:["Connect ",n]}),g.jsx(gn,{variant:"secondary",tone:"success",size:"sm",onClick:()=>window.open(t,"_blank","noopener,noreferrer"),children:"Connect"}),g.jsx(gn,{variant:"secondary",size:"sm",onClick:()=>{it.submitAuth(e,"approve")},children:"Connected"}),g.jsx(gn,{variant:"secondary",tone:"danger",size:"sm",onClick:()=>{it.submitAuth(e,"deny")},children:"Cancel"})]})}function of({item:e}){return e.status!=="awaiting"?null:e.gate!=="auth"?g.jsx(lte,{callId:e.callId}):e.authUrl===void 0||e.connection===void 0?null:g.jsx(ute,{callId:e.callId,authUrl:e.authUrl,connection:e.connection})}function kk(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function gl(e,...t){if(!e)return"";for(const n of t){const r=e[n];if(typeof r=="string"&&r.trim()!=="")return r}return""}const RD=new Map;for(const[e,t]of Object.entries(cV)){if(t?.default==null)continue;const n=typeof t.toolName=="string"&&t.toolName.trim()!==""?t.toolName.trim():void 0,r=e.split("/").pop()?.replace(/\.(tsx|ts)$/,""),s=n??r;s&&RD.set(s,t.default)}function cte(e){return e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.command=="string"?e.command:typeof e=="string"?e:""}function sC(e){if(e&&typeof e=="object"&&!Array.isArray(e)){const t=e;if("stdout"in t||"stderr"in t||"exitCode"in t)return t}return null}function fte(e){const t=sC(e.outputRaw);if(t)return t;if(e.output)try{return sC(JSON.parse(e.output))}catch{}return null}function oC(e){return e.replace(/[\s\uFEFF\u00A0]+$/,"")}const dte=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=sf(t),a=cte(t.args),l=fte(t),c=oC(l?.stdout??""),d=oC(l?.stderr??""),f=l?.exitCode!=null&&l.exitCode!==0,h=t.status==="done"&&f?"error":t.status,m=[a?Kr(a,80):"shell"];return f&&m.push(`exit ${l?.exitCode}`),m.push(Ei(s)),g.jsxs("div",{className:`pg-tool pg-shell ${h}`,children:[g.jsxs(pi,{action:"shell",details:m.join(" · "),leadingIcon:g.jsx(ma,{status:h}),open:n,onOpenChange:b=>r(b),tabularNums:!0,children:[a?g.jsx("pre",{className:"shell-cmd",children:a}):null,c?g.jsx("pre",{className:"shell-std",children:c}):null,d?g.jsx("pre",{className:"shell-std shell-err",children:d}):null,!c&&!d?g.jsx("div",{className:"shell-empty",children:l?`Exited ${l.exitCode??0} with no output.`:t.output??"running…"}):null]}),g.jsx(of,{item:t})]})}),pte=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=sf(t),a=gl(kk(t.args),"path"),l=hte(t),c=[a?dG(a,80):"read",Ei(s)];return g.jsxs("div",{className:`pg-tool pg-read ${t.status}`,children:[g.jsxs(pi,{action:"read",details:c.join(" · "),leadingIcon:g.jsx(ma,{status:t.status}),open:n,onOpenChange:d=>r(d),tabularNums:!0,children:[a?g.jsx("pre",{className:"tool-primary",children:a}):null,l!=null?l?g.jsx("pre",{className:"tool-body",children:l}):g.jsx("div",{className:"tool-empty",children:"(empty file)"}):g.jsx("div",{className:"out",children:t.output??"running…"})]}),g.jsx(of,{item:t})]})});function hte(e){const t=aC(e.outputRaw);if(t!=null)return t;if(e.output)try{return aC(JSON.parse(e.output))}catch{}return null}function aC(e){if(e&&typeof e=="object"&&!Array.isArray(e)){const t=e.content;if(typeof t=="string")return t}if(typeof e=="string")try{const t=JSON.parse(e);if(t&&typeof t=="object"&&!Array.isArray(t)){const n=t.content;if(typeof n=="string")return n}}catch{return e}return null}const mte=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=sf(t),a=kk(t.args),l=gl(a,"glob_pattern","globPattern"),c=gl(a,"target_directory","targetDirectory"),d=gte(t),f=[l?Kr(l,80):"glob",Ei(s)];return g.jsxs("div",{className:`pg-tool pg-glob ${t.status}`,children:[g.jsxs(pi,{action:"glob",details:f.join(" · "),leadingIcon:g.jsx(ma,{status:t.status}),open:n,onOpenChange:h=>r(h),tabularNums:!0,children:[l?g.jsx("pre",{className:"tool-primary",children:l}):null,c?g.jsx("pre",{className:"tool-meta",children:c}):null,d!=null?d.length>0?g.jsx("pre",{className:"tool-body",children:d.join(`
|
|
57
|
+
`)}):g.jsx("div",{className:"tool-empty",children:"(no matches)"}):g.jsx("div",{className:"out",children:t.output??"running…"})]}),g.jsx(of,{item:t})]})});function gte(e){const t=lC(e.outputRaw);if(t!=null)return t;if(e.output)try{return lC(JSON.parse(e.output))}catch{}return null}function lC(e){let t=e;if(typeof t=="string")try{t=JSON.parse(t)}catch{return null}if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t.files;return Array.isArray(n)?n.filter(r=>typeof r=="string"):null}const bte=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=sf(t),a=kk(t.args),l=gl(a,"pattern"),c=gl(a,"path"),d=gl(a,"glob"),f=[l?Kr(l,80):"grep",Ei(s)],h=[c,d?`glob ${d}`:""].filter(Boolean).join(`
|
|
58
|
+
`);return g.jsxs("div",{className:`pg-tool pg-grep ${t.status}`,children:[g.jsxs(pi,{action:"grep",details:f.join(" · "),leadingIcon:g.jsx(ma,{status:t.status}),open:n,onOpenChange:m=>r(m),tabularNums:!0,children:[l?g.jsx("pre",{className:"tool-primary",children:l}):null,h?g.jsx("pre",{className:"tool-meta",children:h}):null,g.jsx("div",{className:"out",children:t.output??"running…"})]}),g.jsx(of,{item:t})]})}),yte=v.memo(function({text:t,open:n}){const[r,s]=v.useState(!1);return n?g.jsx("div",{className:"pg-subagent-reasoning",children:g.jsx(pi,{action:"Thinking",loading:!0,open:!r,onOpenChange:a=>s(!a),tone:"muted",children:g.jsx(Nl,{text:t,className:"body"})})}):g.jsx("div",{className:"pg-subagent-reasoning",children:g.jsx(pi,{action:"Thought",defaultOpen:!1,tone:"muted",children:g.jsx(Nl,{text:t,className:"body"})})})}),vte=v.memo(function({child:t}){if(t.kind==="assistant")return g.jsx("div",{className:`pg-subagent-msg${t.streaming?" streaming":""}`,children:g.jsx(Nl,{text:t.text||"…",className:"body"})});if(t.kind==="reasoning")return g.jsx(yte,{text:t.text,open:t.open});const n=t.args==null?"":Hn(t.args,80),r=t.status==="running"?"running…":t.status==="error"?"error":t.status==="done"?"done":t.status;return g.jsxs("div",{className:`pg-subagent-tool ${t.status}`,children:[g.jsxs("div",{className:"pg-subagent-tool-head",children:[g.jsx(ma,{status:t.status}),g.jsx("span",{className:"pg-subagent-tool-name",children:t.name}),n?g.jsx("span",{className:"pg-subagent-tool-args",children:n}):null,g.jsx("span",{className:"pg-subagent-tool-status",children:r})]}),t.output?g.jsx("pre",{className:"pg-subagent-tool-out",children:t.output}):null]})});function xte(e,t){for(let n=t.length-1;n>=0;n--){const r=t[n];if(r!==void 0&&r.kind==="tool")return r.status==="running"?`Running ${r.name}`:r.status==="error"?`Failed ${r.name}`:`Ran ${r.name}`}return e.status==="running"?"Generating":e.status==="error"?"Error":"Completed"}const kte=v.memo(function({item:t}){const n=t.children??[],r=n.length>0,[s,a]=v.useState(t.status==="running"),l=t.name.replace(/^subagent:/,"")||"subagent",c=typeof t.args=="string"?t.args:t.args==null?"":Hn(t.args,100),d=t.status==="running",f=c?Kr(c,120):l;return g.jsxs("div",{className:`pg-tool pg-subagent-card ${t.status}`,children:[g.jsxs("button",{type:"button",className:"pg-subagent-head","aria-expanded":s,onClick:()=>a(h=>!h),children:[g.jsx("span",{className:"pg-subagent-status",children:g.jsx(ma,{status:t.status})}),g.jsxs("span",{className:"pg-subagent-titles",children:[g.jsx("span",{className:d?"pg-subagent-title shimmer":"pg-subagent-title",children:f}),g.jsxs("span",{className:"pg-subagent-subtitle",children:[xte(t,n)," · ",l]})]}),g.jsx("span",{className:s?"pg-subagent-chevron open":"pg-subagent-chevron",children:g.jsx(Yt,{name:"chevron-right",size:10})})]}),g.jsx("div",{className:s?"pg-subagent-clip":"pg-subagent-clip collapsed","aria-hidden":!s,inert:s?void 0:!0,children:g.jsx("div",{className:"pg-subagent-body",children:r?n.map(h=>g.jsx(vte,{child:h},h.id)):g.jsx("div",{className:"pg-subagent-empty",children:t.output??"running…"})})})]})});function Ste(e){if(e==null)return"";if(typeof e=="string")return Kr(e,80);if(typeof e=="object"&&!Array.isArray(e)){const t=Object.entries(e);if(t.length===1){const n=t[0]?.[1];if(typeof n=="string"&&n!=="")return Kr(n,80)}}return Hn(e,120)}const wte=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=sf(t),a=Ste(t.args),l=Ei(s);return g.jsxs("div",{className:`pg-tool ${t.status}`,children:[g.jsx(pi,{action:t.name,details:a?`${a} · ${l}`:l,leadingIcon:g.jsx(ma,{status:t.status}),open:n,onOpenChange:c=>r(c),tabularNums:!0,children:g.jsx("div",{className:"out",children:t.output??"running…"})}),g.jsx(of,{item:t})]})}),Ete={shell:e=>g.jsx(dte,{item:e}),read:e=>g.jsx(pte,{item:e}),glob:e=>g.jsx(mte,{item:e}),grep:e=>g.jsx(bte,{item:e})};function Tte(e){return e.name.startsWith("subagent:")}const Rte=v.memo(function({item:t}){if(Tte(t))return g.jsx(kte,{item:t});const n=RD.get(t.name);if(n)return g.jsx(n,{item:t});const r=Ete[t.name];return r?r(t):g.jsx(wte,{item:t})}),uC=120,Cte=v.memo(function({text:t}){const[n,r]=v.useState(!1),[s,a]=v.useState(!1),l=v.useRef(null);v.useLayoutEffect(()=>{const h=l.current;if(!h)return;const m=()=>{a(h.scrollHeight>uC)};m();const b=new ResizeObserver(m);return b.observe(h),()=>b.disconnect()},[t]);const c=s&&!n,d=()=>{s&&r(h=>!h)},f=h=>{s&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),d())};return g.jsx("div",{className:"msg user",children:g.jsx("div",{ref:l,className:c?"bubble furled":s?"bubble expandable":"bubble",style:c?{maxHeight:uC}:void 0,role:s?"button":void 0,tabIndex:s?0:void 0,"aria-expanded":s?n:void 0,"aria-label":s?n?"Collapse message":"Expand message":void 0,onClick:s?d:void 0,onKeyDown:s?f:void 0,children:t})})}),_te=v.memo(function({text:t,streaming:n}){return g.jsx("div",{className:"msg assistant",children:g.jsx(Nl,{text:t,className:n?"bubble streaming":"bubble"})})}),Nte=v.memo(function({text:t,open:n}){const[r,s]=v.useState(!1);return n?g.jsx("div",{className:"pg-reasoning",children:g.jsx(pi,{action:"Thinking",loading:!0,open:!r,onOpenChange:a=>s(!a),tone:"muted",children:g.jsx(Nl,{text:t,className:"body"})})}):g.jsx("div",{className:"pg-reasoning",children:g.jsx(pi,{action:"Thought",defaultOpen:!1,tone:"muted",children:g.jsx(Nl,{text:t,className:"body"})})})}),Ate=v.memo(function({text:t,fail:n,url:r}){return g.jsxs("div",{className:n?"divider fail":"divider",children:[t,r?g.jsxs(g.Fragment,{children:[" · ",g.jsx(oa,{href:r,children:r})]}):null]})});function hc(e){switch(e.kind){case"user":return g.jsx(Cte,{text:e.text},e.id);case"assistant":return g.jsx(_te,{text:e.text,streaming:e.streaming},e.id);case"reasoning":return g.jsx(Nte,{text:e.text,open:e.open},e.id);case"tool":return g.jsx(Rte,{item:e},e.id);case"divider":return g.jsx(Ate,{text:e.text,fail:e.fail,url:e.url},e.id);case"artifact":return g.jsx(JG,{artifactKind:e.artifactKind,title:e.title,url:e.url,artifactId:e.artifactId,data:e.data},e.id);case"turn-end":return null;default:return null}}function cC(e){return e.kind==="tool"&&e.name.startsWith("subagent:")}function Ote({steps:e,cards:t,final:n,marker:r,isLatest:s}){const[a,l]=v.useState(void 0),c=a??s,d=[];(r.inTokens!==void 0||r.outTokens!==void 0)&&d.push(`${Wp(r.inTokens)} in · ${Wp(r.outTokens)} out tokens`),r.costUsd!==void 0&&d.push(Jx(r.costUsd));const f=d.length>0?d.join(" · "):void 0;return g.jsxs(g.Fragment,{children:[e.length>0?g.jsx("div",{className:"pg-turn-group",title:f,children:g.jsx(pi,{action:"Worked",details:r.ms!==null?`for ${Qx(r.ms)}`:void 0,open:c,onOpenChange:l,tabularNums:!0,tone:"tertiary",children:g.jsx("div",{className:"pg-turn-group-content",children:e.map(hc)})})}):null,t.map(hc),n?hc(n):null]})}function Mte({startMs:e}){const[t,n]=v.useState(()=>Date.now());return v.useEffect(()=>{const r=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(r)},[]),g.jsx("div",{className:"pg-turn-group",children:g.jsx(pi,{action:"Working",details:`for ${Qx(Math.max(0,t-e))}`,expandable:!1,tabularNums:!0,tone:"tertiary"})})}function Ite(e,t){const n=e.findLast(l=>l.kind==="turn-end")?.id,r=[];let s=[];const a=()=>{for(const l of s)r.push(hc(l));s=[]};for(const l of e)switch(l.kind){case"user":case"divider":a(),r.push(hc(l));break;case"turn-end":{const c=s[s.length-1],d=c!==void 0&&c.kind==="assistant"&&!c.streaming?c:null,f=d===null?s:s.slice(0,-1),h=f.filter(b=>!cC(b)),m=f.filter(cC);r.push(g.jsx(Ote,{steps:h,cards:m,final:d,marker:l,isLatest:l.id===n},l.id)),s=[];break}default:s.push(l);break}return t!==null&&r.push(g.jsx(Mte,{startMs:t},"working")),a(),r}function CD(){const e=Ke(h=>h.transcript),t=Ke(h=>h.current),n=Ke(h=>h.localTrace),r=Ke(h=>h.running),s=Ke(h=>h.turnStartedAt),a=e.length===0&&t===null&&!n,l=v.useMemo(()=>e.map(h=>{switch(h.kind){case"user":case"assistant":case"reasoning":return`${h.id}:${h.text.length}`;case"tool":return`${h.id}:${h.status}:${h.output?.length??0}`;case"divider":return`${h.id}:${h.text}`;case"artifact":case"turn-end":return h.id;default:return h}}).join("|"),[e]),c=e.findLast(h=>h.kind==="user")?.id??"",d=`${t?.sessionId??"none"}:${c}:${e.length}`,{scrollRef:f}=YM({contentKey:l,latchKey:d});return g.jsx("div",{ref:f,className:a?"pg-transcript is-empty":"pg-transcript",children:a?g.jsx(ks,{body:"Start a session to talk to your agent. Type below or pick a session, then use the Trace tab for a timeline with tool timings."}):Ite(e,r?s:null)})}const fC=["accent","blue","magenta","orange","purple"];function _D(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return fC[t%fC.length]}function dC(e,t,n){if(e.length===0)return 0;if(t<=0)return e.length;let r=1,s=0;for(const a of e){const l=s===0?a:s+n+a;l>t&&s>0?(r+=1,s=a):s=l}return r}function Dte(e){const{availableWidth:t,itemWidths:n,gap:r,triggerWidth:s,maxLines:a=2}=e,l=n.length;if(l===0)return 0;if(dC(n,t,r)<=a)return l;for(let c=l-1;c>=0;c-=1){const d=[...n.slice(0,c),s];if(dC(d,t,r)<=a)return c}return 0}const Lte="Send a message below to start a new HTTP session. Use the Trace tab for a timeline with tool timings.",jte="This agent is stopped. Pick a session from the Runs tab to inspect its chat and trace.",pC="... More";function zte({cases:e,disabled:t}){const n=v.useRef(null),r=v.useRef(null),s=v.useRef(null),a=e.map(m=>m.id).join("|"),[l,c]=v.useState({key:a,visibleCount:Number.POSITIVE_INFINITY});l.key!==a&&c({key:a,visibleCount:Number.POSITIVE_INFINITY}),v.useLayoutEffect(()=>{const m=n.current;if(!m||e.length===0)return;if(s.current?.key!==a){const S=Array.from(m.querySelectorAll(":scope > [data-measure]"));if(S.length!==e.length)return;const R=getComputedStyle(m);s.current={key:a,widths:S.map(T=>T.offsetWidth),gap:parseFloat(R.gap)||0,triggerWidth:r.current?.offsetWidth??0}}const b=()=>{const S=s.current;if(!S)return;const R=Dte({availableWidth:m.clientWidth,itemWidths:S.widths,gap:S.gap,triggerWidth:S.triggerWidth});c(T=>T.visibleCount===R?T:{...T,visibleCount:R})};b();let y;const k=new ResizeObserver(()=>{y!==void 0&&cancelAnimationFrame(y),y=requestAnimationFrame(()=>{y=void 0,b()})});return k.observe(m),()=>{k.disconnect(),y!==void 0&&cancelAnimationFrame(y)}},[e.length,a]);const d=Math.min(l.visibleCount,e.length),f=e.slice(0,d),h=e.slice(d);return g.jsxs("div",{ref:n,className:"pg-panel-empty__evals",children:[f.map(m=>g.jsx("button",{type:"button",className:"pg-panel-empty__eval","data-measure":"",title:m.description||`Run ${m.id}`,disabled:t,onClick:()=>{it.startEvalRun([m.id])},children:m.id},m.id)),g.jsx("button",{ref:r,type:"button",className:"pg-panel-empty__eval pg-panel-empty__eval-more-measure",tabIndex:-1,"aria-hidden":"true",children:pC}),h.length>0?g.jsxs(Xr,{placement:"bottom",children:[g.jsx(Xr.Trigger,{disabled:t,children:g.jsx("button",{type:"button",className:"pg-panel-empty__eval",disabled:t,"aria-label":`Show ${h.length} more evaluations`,children:pC})}),g.jsx(Xr.Content,{"aria-label":"More evaluations",size:"sm",children:h.map(m=>g.jsx(Xr.Item,{disabled:t,onSelect:()=>{it.startEvalRun([m.id])},children:m.id},m.id))})]}):null]})}function Pte(){const e=Ke(d=>d.meta),t=Ke(d=>d.info),n=Ke(d=>d.evalCases),r=Ke(d=>d.evalRun?.status==="running"),s=e.name||t?.name||"Agent",a=e.readonly===!0,l=_D(s),c=a?jte:t?.description||Lte;return g.jsxs("div",{className:"pg-panel-empty",children:[g.jsx("div",{className:"pg-panel-empty__avatar","data-color":l,"aria-hidden":"true",children:g.jsx(Yt,{name:"robot",variant:"filled",size:24,color:l})}),g.jsx("div",{className:"pg-panel-empty__name",children:s}),g.jsx("p",{className:"pg-panel-empty__description",children:c}),n.length>0&&!a?g.jsx(zte,{cases:n,disabled:r}):null]})}const py={base:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kB7OPa:"ui-9f619",k7Eaqz:"ui-euugli",ks0D6T:"ui-193iq5w",$$css:!0},wrap:{kwnvtZ:"ui-1a02dak",$$css:!0},underline:{k1xSpc:"ui-78zum5",kVAEAm:"ui-1n2onr6",kGNEyG:"ui-1qjc9v5",kzqmXN:"ui-h8yej3",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-17fyfba",$$css:!0}},$te={sm:{kOIVth:"ui-137clkk",$$css:!0},md:{kOIVth:"ui-pkkfsy",$$css:!0}},Bte={sm:{kOIVth:"ui-1oot3zn",$$css:!0},md:{kOIVth:"ui-1jlwbde",$$css:!0}};function Fte(e,t){return e==="filter"||e==="underline"&&t==="lg"?"md":"sm"}const hC={base:{kysU6D:"ui-jyslct",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kmuXW:"ui-2lah0s",khDVqt:"ui-uxw1ft",kMv6JI:"ui-jb2p0i",k63SB2:"ui-1pd3egz",kMwMTN:"ui-19aaqeu ui-1qp4pc4 ui-1gfq6vl",kWkggS:"ui-jbqb8w",ksu8eU:"ui-ng3xce",kaIpWk:"ui-1i4c3av",kkrTdU:"ui-1ypdohk ui-mh7c9n",kSiTet:"ui-1hc1fzr ui-1szrgyu",kFalU9:"ui-ggy1nq",kOIVth:"ui-11twubx",kMnn75:"ui-krqix3",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-7s97pk",kjBf7l:"ui-1uczgqu ui-1725o6r",k1ekBW:"ui-1gbuem2",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},default:{kWkggS:"ui-jbqb8w ui-q24i1q ui-x05fgs",$$css:!0},filter:{kaIpWk:"ui-1e1y6u3",kAzted:"ui-4jlmx6",kMwMTN:"ui-19aaqeu ui-1t93vz6 ui-t6ogrd",kWkggS:"ui-jbqb8w ui-1834tr1 ui-d9g367",k63SB2:"ui-1yl5bsf",$$css:!0},underline:{kaIpWk:"ui-2u8bby",kWkggS:"ui-jbqb8w",kMwMTN:"ui-19aaqeu ui-1qp4pc4 ui-1gfq6vl",$$css:!0}},Ute={sm:{kLKAdn:"ui-493x5y",kpe85a:"ui-17v7654",kGO01o:"ui-b6dno7",kE3dHu:"ui-1lfpczk",$$css:!0},md:{kLKAdn:"ui-1gv78wz",kpe85a:"ui-1yxiud8",kGO01o:"ui-1cea8gx",kE3dHu:"ui-yab65l",$$css:!0},lg:{kLKAdn:"ui-1to6kjf",kpe85a:"ui-16b7oty",kGO01o:"ui-5wifs",kE3dHu:"ui-o7x2bt",$$css:!0}},qte={sm:{kLKAdn:"ui-13ly8rp",kpe85a:"ui-14ndyrl",kGO01o:"ui-1xlntvz",kE3dHu:"ui-1e7ydrk",$$css:!0},md:{kLKAdn:"ui-13ly8rp",kpe85a:"ui-14ndyrl",kGO01o:"ui-1xlntvz",kE3dHu:"ui-1e7ydrk",$$css:!0},lg:{kLKAdn:"ui-oyc9vk",kpe85a:"ui-14ndyrl",kGO01o:"ui-2lprc",kE3dHu:"ui-1e7ydrk",$$css:!0}},ND=v.createContext(null);function AD(e){const t=v.use(ND);if(t===null)throw new Error(`${e} must be used within Tabs.Root`);return t}function Hte({value:e,defaultValue:t,onValueChange:n,size:r="md",variant:s="default",children:a,...l}){const c=v.useMemo(()=>({size:r,variant:s}),[r,s]);return g.jsx(ND.Provider,{value:c,children:g.jsx(BO,{...l,value:e,defaultValue:t,onValueChange:n,"data-component":"tabs-root","data-size":r,"data-variant":s,className:"ui-jp7ctv",children:a})})}function Gte({activateOnFocus:e,spacing:t,wrap:n=!1,children:r,...s}){const a=AD("Tabs.List"),l=t??Fte(a.variant,a.size),c=n&&a.variant!=="underline";return g.jsxs(VO,{...s,activateOnFocus:e,"data-component":"tabs-list","data-variant":a.variant,"data-wrap":c?"true":void 0,...jt(py.base,a.variant==="underline"&&py.underline,a.variant==="underline"?Bte[l]:$te[l],c&&py.wrap),children:[r,a.variant==="underline"?g.jsx(GO,{"data-component":"tabs-underline-indicator",className:"ui-10l6tqk ui-1vjfegm ui-47corl ui-9f619 ui-vbikie ui-offw1 ui-jm9jq1 ui-qmqy1e ui-mak4db ui-1ym43eq ui-1bqoo3p ui-sagj69 ui-1tkypeg"}):null]})}function Vte({value:e,secondaryLabel:t,href:n,children:r,...s}){const a=AD("Tabs.Item");return g.jsxs(qO,{...s,value:e,render:n===void 0?void 0:l=>g.jsx("a",{...l,href:n}),nativeButton:n===void 0,"data-component":"tabs-item","data-size":a.size,"data-variant":a.variant,...jt(hC.base,a.size==="sm"?Rs.root:Fi.root,a.variant==="underline"?qte[a.size]:Ute[a.size],hC[a.variant],a.variant==="filter"&&mN.root),children:[r,t!=null?g.jsx("span",{className:"ui-2lah0s ui-4b2ntj",children:t}):null]})}const hy={Root:Hte,List:Gte,Item:Vte};function Wte(e,t){return t===null?!0:e!=="artifacts"||t.artifacts!==void 0}function OD(e,t,n){return e.filter(r=>r.value===n||Wte(r.value,t))}const mC=[{value:"chat",label:"Chat"},{value:"trace",label:"Trace"},{value:"raw",label:"Raw"},{value:"evals",label:"Evals"},{value:"artifacts",label:"Artifacts"}];function Sk(e){return e==="overview"?"chat":e}function Kte({size:e="lg"}){const t=Ke(l=>l.view),n=Ke(l=>l.evalNavReturn),r=Ke(l=>l.info),s=n||t==="evals"?mC:mC.filter(l=>l.value!=="evals"),a=OD(s,r,t);return g.jsx(hy.Root,{value:Sk(t),onValueChange:l=>it.setView(l),size:e,children:g.jsx(hy.List,{"aria-label":"Visualization mode",wrap:!0,children:a.map(l=>g.jsx(hy.Item,{value:l.value,children:l.label},l.value))})})}function MD(){const e=Ke(s=>s.view),t=Ke(s=>s.current),n=Ke(s=>s.transcript.length===0),r=t===null&&n;return g.jsxs(g.Fragment,{children:[Sk(e)==="chat"?g.jsxs(g.Fragment,{children:[r?g.jsx(Pte,{}):g.jsx(CD,{}),g.jsx(UM,{})]}):null,e==="trace"?g.jsx(JM,{}):null,e==="raw"?g.jsx(XM,{}):null,e==="evals"?g.jsx(VM,{}):null,e==="artifacts"?g.jsx(FM,{}):null]})}function Yte({className:e,labeled:t=!1}){const n=Ke(r=>r.authToken);return g.jsxs("div",{className:e,children:[t?g.jsx("label",{className:"pg-auth-token-label",htmlFor:"pg-auth-token",children:"Bearer token"}):null,g.jsx(Yc,{id:t?"pg-auth-token":void 0,type:"password",size:"md","aria-label":"Bearer token",placeholder:t?"Optional":"Bearer token (optional)",value:n,onChange:r=>it.setAuthToken(r.target.value),title:"Sent as Authorization: Bearer ... on API calls"})]})}function Xte(){return Ke(t=>t.aliasHosted)?null:g.jsxs(Xr,{placement:"bottom-end",children:[g.jsx(Xr.Trigger,{children:g.jsx(dr,{icon:"dots-3-horizontal",size:"lg","aria-label":"More actions"})}),g.jsx(Xr.Content,{"aria-label":"More actions",className:"pg-detail-more",size:"sm",width:240,footer:g.jsx(Yte,{className:"pg-detail-more__token",labeled:!0}),children:null})]})}function ID({variant:e}){const t=Ke(l=>l.barTitle),n=Ke(l=>l.barId),r=Ke(l=>l.current),s=e==="panel",a=n||t;return g.jsxs("div",{className:s?"pg-detail__head pg-detail__head--panel":"pg-detail__head",children:[g.jsxs("div",{className:"pg-detail__head-start",children:[s?null:g.jsx(dr,{icon:"arrow-left",size:"lg","aria-label":"Back to overview",onClick:()=>it.backToOverview()}),r!==null||n?g.jsx("div",{className:"pg-detail__session",title:a,children:g.jsx("span",{className:"pg-detail__session-id",children:a})}):null]}),g.jsx(Kte,{}),g.jsxs("div",{className:"pg-detail__head-end",children:[g.jsx(Xte,{}),s?g.jsx(dr,{icon:"x",size:"lg","aria-label":"Close chat panel",onClick:()=>it.setChatPanelOpen(!1)}):null]})]})}function Zte(){return g.jsxs("div",{className:"pg-detail",children:[g.jsx(ID,{variant:"page"}),g.jsx("div",{className:"pg-transcript-wrap",children:g.jsx(MD,{})})]})}const Qte="agent-serve.playground.try.";function DD(e,t){return`${Qte}${e}:${t}`}function gC(e,t){try{const n=localStorage.getItem(DD(e,t));if(n===null)return null;const r=JSON.parse(n);if(typeof r!="object"||r===null||Array.isArray(r))return null;const s=r,a={};return typeof s.body=="string"&&(a.body=s.body),typeof s.query=="string"&&(a.query=s.query),a}catch{return null}}function Jte(e,t,n){try{localStorage.setItem(DD(e,t),JSON.stringify(n))}catch{}}function bC(e){if(e===void 0)return"{}";const t=e.properties;if(e.type!=="object"||t===void 0)return"{}";const n={};for(const[r,s]of Object.entries(t)){const a=s.type;a==="string"?n[r]="":a==="number"||a==="integer"?n[r]=0:a==="boolean"?n[r]=!1:a==="array"?n[r]=[]:a==="object"?n[r]={}:n[r]=null}return JSON.stringify(n,null,2)}function yC({label:e,schema:t}){if(t===void 0)return g.jsxs("div",{className:"pg-try-schema-missing",children:["No ",e," schema on this route — body is free-form JSON."]});const n=t.properties,r=new Set(Array.isArray(t.required)?t.required.filter(s=>typeof s=="string"):[]);return n===void 0||Object.keys(n).length===0?g.jsxs("details",{className:"pg-try-schema",children:[g.jsxs("summary",{children:[e," schema"]}),g.jsx("pre",{children:JSON.stringify(t,null,2)})]}):g.jsxs("details",{className:"pg-try-schema",open:!0,children:[g.jsxs("summary",{children:[e," schema"]}),g.jsx("ul",{children:Object.entries(n).map(([s,a])=>{const l=typeof a.type=="string"?a.type:"any",c=typeof a.description=="string"?a.description:null;return g.jsxs("li",{children:[g.jsx("code",{children:s}),r.has(s)?g.jsx("span",{className:"req",children:" required"}):g.jsx("span",{className:"opt",children:" optional"}),g.jsxs("span",{className:"type",children:[" · ",l]}),c?g.jsx("div",{className:"desc",children:c}):null]},s)})})]})}function LD(e,t){const n=e.trim();if(n==="")return{ok:!0,value:{}};try{const r=JSON.parse(n);return typeof r!="object"||r===null||Array.isArray(r)?{ok:!1,error:`${t} must be a JSON object`}:{ok:!0,value:r}}catch(r){return{ok:!1,error:`${t}: ${r instanceof Error?r.message:String(r)}`}}}function tp(e){return`'${e.replace(/'/g,"'\\''")}'`}function ene(e){const t=["curl","-sS","-X",e.method],n=e.token.trim();if(n!==""&&t.push("-H",tp(`Authorization: Bearer ${n}`)),e.hasBody){t.push("-H",tp("Content-Type: application/json"));const r=e.bodyText.trim()===""?"{}":e.bodyText.trim();t.push("--data-binary",tp(r))}return t.push(tp(e.absoluteUrl)),t.join(" ")}function tne(e,t,n){let r=it.api.url(e);if(n){const s=LD(t,"Query");if(!s.ok)return s;const a=new URLSearchParams;for(const[c,d]of Object.entries(s.value)){if(d==null)continue;const f=typeof d=="string"?d:String(d);f!==""&&a.set(c,f)}const l=a.toString();l!==""&&(r=`${r}?${l}`)}try{return{ok:!0,url:new URL(r,window.location.origin).toString()}}catch(s){return{ok:!1,error:`URL: ${s instanceof Error?s.message:String(s)}`}}}function jD({channelId:e,route:t,onClose:n}){const r=t.method.toUpperCase(),s=r!=="GET"&&r!=="HEAD",a=t.querySchema!==void 0||r==="GET"||r==="HEAD",l=Ke(A=>A.authToken),[c,d]=v.useState(()=>{const A=gC(r,t.url);return A?.query!==void 0&&A.query.trim()!==""?A.query:bC(t.querySchema)}),[f,h]=v.useState(()=>{const A=gC(r,t.url);return A?.body!==void 0&&A.body.trim()!==""?A.body:bC(t.bodySchema)}),[m,b]=v.useState(!1),[y,k]=v.useState(!1),[S,R]=v.useState(null),[T,E]=v.useState(null);v.useEffect(()=>{const A=$=>{$.key==="Escape"&&n()};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[n]);const C=A=>{const $={};s&&($.body=A.body??f),a&&($.query=A.query??c),Jte(r,t.url,$)},_=()=>{C({body:f,query:c}),n()},D=async()=>{if(R(null),k(!1),s&&f.trim()!=="")try{JSON.parse(f)}catch(z){R(`Body: ${z instanceof Error?z.message:String(z)}`);return}const A=tne(t.url,c,a);if(!A.ok){R(A.error);return}const $=ene({method:r,absoluteUrl:A.url,token:l,hasBody:s,bodyText:f});try{await navigator.clipboard.writeText($),k(!0),it.toast("Copied curl to clipboard"),window.setTimeout(()=>k(!1),1500)}catch(z){R(`Copy failed: ${z instanceof Error?z.message:String(z)}`)}},N=async()=>{R(null),E(null);let A;if(a){const z=LD(c,"Query");if(!z.ok){R(z.error);return}A={};for(const[I,Y]of Object.entries(z.value))Y!=null&&(A[I]=typeof Y=="string"?Y:String(Y))}let $;if(s){const z=f.trim();if(z==="")$={};else try{$=JSON.parse(z)}catch(I){R(`Body: ${I instanceof Error?I.message:String(I)}`);return}}C({body:f,query:c}),b(!0);try{const z=await it.api.channelRequest(r,t.url,{body:s?$:void 0,query:A});if(z.ok&&z.body&&await it.openSessionFromChannelResponse(e,z.body)){n();return}E({status:z.status,body:z.body})}catch(z){R(z instanceof Error?z.message:String(z))}finally{b(!1)}};return g.jsx("div",{className:"pg-try-backdrop",role:"presentation",onClick:_,children:g.jsxs("div",{className:"pg-try-modal",role:"dialog","aria-modal":"true","aria-label":`Try ${r} ${t.url}`,onClick:A=>A.stopPropagation(),children:[g.jsxs("div",{className:"pg-try-head",children:[g.jsxs("div",{children:[g.jsxs("div",{className:"pg-try-title",children:[g.jsx("span",{className:"pg-try-method",children:r})," ",g.jsx("code",{children:t.url})]}),g.jsxs("div",{className:"pg-try-sub",children:["channel ",g.jsx("code",{children:e}),t.description?` · ${t.description}`:null]})]}),g.jsx("button",{type:"button",className:"link-btn",onClick:_,children:"Close"})]}),g.jsxs("div",{className:"pg-try-body",children:[a?g.jsxs(g.Fragment,{children:[g.jsx(yC,{label:"Query",schema:t.querySchema}),g.jsxs("label",{className:"pg-try-field",children:[g.jsx("span",{children:"Query (JSON object → search params)"}),g.jsx("textarea",{value:c,onChange:A=>d(A.target.value),spellCheck:!1,rows:6})]})]}):null,s?g.jsxs(g.Fragment,{children:[g.jsx(yC,{label:"Body",schema:t.bodySchema}),g.jsxs("label",{className:"pg-try-field",children:[g.jsx("span",{children:"Body (JSON)"}),g.jsx("textarea",{value:f,onChange:A=>h(A.target.value),spellCheck:!1,rows:10})]})]}):null,S?g.jsx("div",{className:"pg-try-error",children:S}):null,T?g.jsxs("div",{className:"pg-try-result",children:[g.jsxs("div",{className:"pg-try-status",children:["Status ",g.jsx("code",{children:T.status})]}),g.jsx("pre",{children:JSON.stringify(T.body,null,2)})]}):null]}),g.jsxs("div",{className:"pg-try-foot",children:[g.jsx(gn,{variant:"secondary",size:"sm",onClick:()=>{D()},children:y?"Copied":"Copy curl"}),g.jsx("div",{className:"pg-try-foot-spacer"}),g.jsx(gn,{variant:"secondary",size:"sm",onClick:_,children:"Cancel"}),g.jsx(gn,{variant:"primary",size:"sm",disabled:m,onClick:()=>{N()},children:m?"Sending…":"Send"})]})]})})}const zD="agent-serve.playground.drawerWidth",my=340,xv=280,kv=720;function mp(e){return Math.min(kv,Math.max(xv,e))}function nne(){try{const e=localStorage.getItem(zD);if(e===null)return my;const t=Number.parseInt(e,10);return Number.isFinite(t)?mp(t):my}catch{return my}}function nl({title:e,children:t}){return g.jsxs(g.Fragment,{children:[g.jsx("h4",{children:e}),t]})}function Wu({name:e,detail:t}){return g.jsxs("div",{className:"item",children:[g.jsx("div",{className:"n",children:e}),t?g.jsx("div",{className:"d",children:t}):null]})}function rne(){const e=Ke(E=>E.drawerOpen),t=Ke(E=>E.info),[n,r]=v.useState(null),[s,a]=v.useState(nne),[l,c]=v.useState(!1),d=v.useRef(s);d.current=s,v.useEffect(()=>{try{localStorage.setItem(zD,String(s))}catch{}},[s]);const f=v.useCallback(E=>{E.preventDefault();const C=E.currentTarget,_=E.clientX,D=d.current;C.setPointerCapture(E.pointerId),c(!0),document.body.classList.add("pg-resizing-drawer");const N=$=>{a(mp(D+($.clientX-_)))},A=$=>{C.releasePointerCapture($.pointerId),C.removeEventListener("pointermove",N),C.removeEventListener("pointerup",A),C.removeEventListener("pointercancel",A),c(!1),document.body.classList.remove("pg-resizing-drawer")};C.addEventListener("pointermove",N),C.addEventListener("pointerup",A),C.addEventListener("pointercancel",A)},[]),h=t?.tools??[],m=t?.skills??[],b=t?.subagents??[],y=t?.connections??[],k=t?.channels??[],S=t?.hooks??[],R=v.useMemo(()=>{const E=new Map;for(const C of Fh(k))E.set(`${C.method}:${C.url}`,C.name);return E},[k]),T=t!==null&&h.length===0&&m.length===0&&b.length===0&&y.length===0&&k.length===0&&S.length===0;return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:e?l?"pg-drawer open resizing":"pg-drawer open":"pg-drawer",style:{width:s},children:[g.jsx("div",{className:l?"pg-drawer-resizer dragging":"pg-drawer-resizer",role:"separator","aria-orientation":"vertical","aria-label":"Resize agent surface","aria-valuenow":s,"aria-valuemin":xv,"aria-valuemax":kv,tabIndex:0,onPointerDown:f,onKeyDown:E=>{E.key==="ArrowLeft"?(E.preventDefault(),a(C=>mp(C-16))):E.key==="ArrowRight"?(E.preventDefault(),a(C=>mp(C+16))):E.key==="Home"?(E.preventDefault(),a(xv)):E.key==="End"&&(E.preventDefault(),a(kv))}}),g.jsxs("div",{className:"head",children:[g.jsx("span",{children:"Agent surface"}),g.jsx("button",{type:"button",className:"link-btn",onClick:()=>it.setDrawerOpen(!1),children:"Close"})]}),g.jsxs("div",{className:"body",children:[t===null?g.jsx("div",{className:"drawer-empty",children:"Loading…"}):null,T?g.jsx("div",{className:"drawer-empty",children:"No surface to show for this agent."}):null,h.length?g.jsx(nl,{title:"Tools",children:h.map(E=>g.jsx(Wu,{name:E.name,detail:E.description},E.name))}):null,m.length?g.jsx(nl,{title:"Skills",children:m.map(E=>g.jsx(Wu,{name:E.name,detail:E.description},E.name))}):null,b.length?g.jsx(nl,{title:"Subagents",children:b.map(E=>g.jsx(Wu,{name:E.name,detail:E.description},E.name))}):null,y.length?g.jsx(nl,{title:"MCP Connections",children:y.map(E=>g.jsx(Wu,{name:E.name,detail:E.transport},E.name))}):null,k.length?g.jsx(nl,{title:"Channels",children:k.map(E=>g.jsxs("div",{className:"item",children:[g.jsx("div",{className:"n",children:E.id}),(E.routes??[]).length===0?g.jsx("div",{className:"d",children:"(events only)"}):g.jsx("div",{className:"channel-routes",children:(E.routes??[]).map(C=>{const _=E.id!=="http",D=`${C.method} ${C.url}`,N=R.get(`${C.method.toUpperCase()}:${C.url}`);return _?g.jsxs("div",{className:"channel-route",children:[g.jsx("code",{children:D}),N?g.jsx("code",{className:"channel-slash",title:"Composer slash command",children:N}):null,g.jsx("button",{type:"button",className:"link-btn",onClick:()=>r({channelId:E.id,route:C}),children:"Try"})]},D):g.jsx("div",{className:"channel-route",children:g.jsx("code",{children:D})},D)})})]},E.id))}):null,S.length?g.jsx(nl,{title:"Hooks",children:S.map(E=>g.jsx(Wu,{name:E},E))}):null]})]}),n?g.jsx(jD,{channelId:n.channelId,route:n.route,onClose:()=>r(null)}):null]})}function ine(){const e=Ke(f=>f.meta.readonly===!0),[t,n]=v.useState([]),[r,s]=v.useState(null),a=v.useRef(-1),l=v.useRef(null),c=t.length,d=WM({count:c,getScrollElement:()=>l.current,estimateSize:()=>18,overscan:24});return v.useEffect(()=>{let f=!1;const h=async()=>{const b=await it.api.logs(a.current);if(f)return;if(!b.ok||b.body===null){s(`logs failed (${b.status})`);return}s(null);const y=b.body.entries??[];y.length>0&&(a.current=b.body.nextAfter,n(k=>{const S=k.concat(y);return S.length>2e3?S.slice(S.length-2e3):S}))};if(h(),e)return()=>{f=!0};const m=window.setInterval(()=>{h()},1e3);return()=>{f=!0,window.clearInterval(m)}},[e]),v.useEffect(()=>{c>0&&d.scrollToIndex(c-1,{align:"end"})},[c,d]),r!==null&&c===0?g.jsx("div",{className:"pg-raw",children:g.jsx(ks,{body:r})}):c===0?g.jsx("div",{className:"pg-raw",children:g.jsx(ks,{body:e?"No stored logs for this stopped agent.":"Waiting for agent logs… webhook captures and session activity appear here."})}):g.jsxs("div",{className:"pg-raw",children:[g.jsx("div",{className:"head",children:"Agent logs"}),g.jsx("div",{className:"raw-lines",ref:l,children:g.jsx("div",{style:{height:d.getTotalSize(),position:"relative",width:"100%"},children:d.getVirtualItems().map(f=>{const h=t[f.index];if(h===void 0)return null;const m=h.at.slice(11,19);return g.jsxs("div",{"data-index":f.index,ref:d.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${f.start}px)`},children:[g.jsxs("span",{className:"elog-time",children:[m," "]}),g.jsx("span",{children:h.line})]},f.key)})})})]})}const wk={root:{k1xSpc:"ui-78zum5",kzqmXN:"ui-h8yej3",kGNEyG:"ui-6s0dn4",kjj79g:"ui-1qughib",kOIVth:"ui-ehausa",kMwMTN:"ui-4b2ntj",kGuDYH:"ui-1wm8ruf",kLWn49:"ui-spwq11",kcqcaj:"ui-ss6m8b",$$css:!0},controls:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kOIVth:"ui-ehausa",$$css:!0},status:{kMwMTN:"ui-4b2ntj",kcqcaj:"ui-ss6m8b",$$css:!0}};function sne(){return wk.root}function one(){return wk.controls}function ane(){return wk.status}function lne({currentPage:e,totalPages:t,totalItems:n,pageSize:r,onPageChange:s,isLoading:a=!1,leading:l,rootStyle:c,className:d}){const f=Math.min(Math.max(1,e),t),h=n===0?0:Math.min(n,(f-1)*r+1),m=Math.min(n,f*r),b=R=>{R<1||R>t||R===f||a||s(R)},y=Kt({rootClass:"ui-pagination-footer",stylexStyles:[sne(),c],className:["pagination-footer",d].filter(Boolean).join(" ")}),k=Kt({rootClass:"ui-pagination-footer__controls",stylexStyles:one(),className:"pagination-footer__controls"}),S=Kt({rootClass:"ui-pagination-footer__status",stylexStyles:ane(),className:"pagination-footer__status"});return g.jsxs("div",{className:y.className,style:y.style,children:[g.jsxs("div",{className:"pagination-footer__summary",children:[l,g.jsxs("span",{className:S.className,style:S.style,children:[h.toLocaleString(),"–",m.toLocaleString()," of ",n.toLocaleString()]})]}),g.jsxs("div",{className:k.className,style:k.style,children:[g.jsx(dr,{"aria-label":"Previous page",disabled:f<=1||a,icon:"chevron-left",onClick:()=>b(f-1),size:"sm",variant:"ghost"}),g.jsxs("span",{className:S.className,style:S.style,children:[f.toLocaleString()," / ",t.toLocaleString()]}),g.jsx(dr,{"aria-label":"Next page",disabled:f>=t||a,icon:"chevron-right",onClick:()=>b(f+1),size:"sm",variant:"ghost"})]})]})}const une={base:{k1xSpc:"ui-78zum5",kzqmXN:"ui-h8yej3",kXwgrk:"ui-dt5ytf",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kLKAdn:"ui-f6zju3",kpe85a:"ui-17v7654",kGO01o:"ui-1rgtt3y",kE3dHu:"ui-1lfpczk",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-1w002xl",kWqL5O:"ui-s1s249",kSWEuD:"ui-32b0ac",k26BEO:"ui-1ppb01f",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-1g95lbd",kZ1KPB:"ui-e0pwq",k4WBpm:"ui-19ypqd9",kaZRDh:"ui-fektcw",kaIpWk:"ui-1m7fhj7",kWkggS:"ui-f1vpex",$$css:!0}},PD={base:{k1xSpc:"ui-78zum5",k7Eaqz:"ui-euugli",kGNEyG:"ui-6s0dn4",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kLKAdn:"ui-1t8xvyj",kpe85a:"ui-14ndyrl",kGO01o:"ui-usxwy5",kE3dHu:"ui-1e7ydrk",kMwMTN:"ui-19aaqeu",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",kmkexE:"ui-po99wt",$$css:!0}},cne={base:{kjj79g:"ui-13a6bvl",k9WMMc:"ui-1hr2gdg",$$css:!0}},fne={base:{kMwMTN:"ui-1wd3ewq",$$css:!0}},dne={base:{k1xSpc:"ui-78zum5",k7Eaqz:"ui-euugli",kGNEyG:"ui-6s0dn4",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kLKAdn:"ui-1t8xvyj",kpe85a:"ui-14ndyrl",kGO01o:"ui-usxwy5",kE3dHu:"ui-1e7ydrk",kMwMTN:"ui-19aaqeu",kGuDYH:"ui-fifm61",k63SB2:"ui-20ajya",kLWn49:"ui-1d3mw78",k9WMMc:"ui-dpxx8g",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",$$css:!0}},pne={base:{kjj79g:"ui-13a6bvl",k9WMMc:"ui-1hr2gdg",$$css:!0}},hne={base:{k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-1qjc9v5",kOIVth:"ui-1oot3zn",kLKAdn:"ui-exx8yu",kpe85a:"ui-1yxiud8",kGO01o:"ui-18d9i69",kE3dHu:"ui-yab65l",$$css:!0}},mne={base:{kVAEAm:"ui-1n2onr6",k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-1qjc9v5",kOIVth:"ui-1oot3zn",kLKAdn:"ui-exx8yu",kpe85a:"ui-1yxiud8",kGO01o:"ui-18d9i69",kE3dHu:"ui-yab65l",k4Z53h:"ui-gfevyv",kGzVvX:"ui-qjnua1",kSWMeD:"ui-h5l0ry",kNVotH:"ui-1487vgl",k2syFR:"ui-o4r6jd",kyZIQH:"ui-fp6kh7",$$css:!0}},gne={base:{kkrTdU:"ui-1ypdohk",$$css:!0}},bne={base:{kVAEAm:"ui-10l6tqk",k87sOh:"ui-13vifvy",kCIrl2:"ui-1qo02jc",kbCHJM:"ui-134kyd4",kZKoxP:"ui-jyxbwm",kWkggS:"ui-iw1gut",kfzvcC:"ui-47corl",k1xSpc:"ui-1vga6i0",$$css:!0}},vC={base:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kGuDYH:"ui-4z9k3i",kLWn49:"ui-1fc57z9",$$css:!0}},yne={base:{kjj79g:"ui-l56j7k",k9WMMc:"ui-2b8uid",$$css:!0}},vne={base:{kMwMTN:"ui-1e4uaio",$$css:!0}},xne={base:{kMwMTN:"ui-19aaqeu",$$css:!0}},kne={base:{kMwMTN:"ui-4b2ntj",$$css:!0}},Sne={base:{k1xSpc:"ui-78zum5",kAzted:"ui-i3av73",kXwgrk:"ui-dt5ytf",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kOIVth:"ui-11twubx",kLKAdn:"ui-t9g0qb",kpe85a:"ui-1yxiud8",kGO01o:"ui-20eq2h",kE3dHu:"ui-yab65l",k9WMMc:"ui-2b8uid",kMwMTN:"ui-4b2ntj",kGuDYH:"ui-4z9k3i",kLWn49:"ui-1fc57z9",$$css:!0}},wne={base:{kMwMTN:"ui-4b2ntj",kGuDYH:"ui-4z9k3i",kLWn49:"ui-d4r4e8",$$css:!0}},Ene={base:{kMwMTN:"ui-19aaqeu",kGuDYH:"ui-4z9k3i",k63SB2:"ui-20ajya",kLWn49:"ui-d4r4e8",$$css:!0}},Tne={base:{kjj79g:"ui-l56j7k",k9WMMc:"ui-2b8uid",$$css:!0}},xC={base:{k1xSpc:"ui-jp7ctv",kMwMTN:"ui-1heor9g",kybGjl:"ui-1hl2dhg",kysU6D:"ui-jyslct",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kWqL5O:"ui-gfja2r",kSWEuD:"ui-11pwa6s",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kZ1KPB:"ui-yj58a3",k4WBpm:"ui-1b16gh4",kWkggS:"ui-jbqb8w",kVVagm:"ui-ln7xf2",k9WMMc:"ui-16tdsg8",kkrTdU:"ui-1ypdohk",kDPRdz:"ui-144v4sp",k67Jb4:"ui-1lku1pv",kfbEmr:"ui-17kgsl5",kxHR8W:"ui-1dmdw0h",$$css:!0}},Rne={base:{k1xSpc:"ui-1lliihq",kZKoxP:"ui-1qx5ct2",kaIpWk:"ui-1e1y6u3",kWkggS:"ui-flfp0o",kKVMdj:"ui-16iawpz",k44tkh:"ui-1c74tu6",kyAemX:"ui-w1l40g",ko0y90:"ui-a4qsjk",$$css:!0}},Cne={base:{kzqmXN:"ui-3hqpx7",$$css:!0}},_ne={base:{kzqmXN:"ui-1iy3nof",$$css:!0}},Nne={base:{kzqmXN:"ui-g0jo4d",$$css:!0}},Ane={base:{k1xSpc:"ui-78zum5",kzqmXN:"ui-h8yej3",k7Eaqz:"ui-euugli",kXwgrk:"ui-dt5ytf",$$css:!0}},One={base:{keoZOQ:"ui-1e66mq1",kLKAdn:"ui-f6zju3",kpe85a:"ui-1yxiud8",kGO01o:"ui-cnij5n",kE3dHu:"ui-yab65l",$$css:!0}},kC=[{identityClass:"automations-run-history-table__skeleton--wide",style:Nne.base},{identityClass:"automations-run-history-table__skeleton--medium",style:Cne.base},{identityClass:"automations-run-history-table__skeleton--short",style:_ne.base}];function Mne(e){return typeof e=="number"?`${e}px`:e}function Ine(e){if(e.fixedWidth!==void 0)return{flexValue:`0 0 ${Mne(e.fixedWidth)}`,minWidth:e.fixedWidth,maxWidth:e.fixedWidth};const t=e.flexWidth;return t!==void 0?{flexValue:`${t.grow??1} 1 0`,minWidth:t.minWidth,maxWidth:t.maxWidth}:{flexValue:"1 1 0",minWidth:void 0,maxWidth:void 0}}function Ek(e){const t=Ine(e),n={flex:t.flexValue};return t.minWidth!==void 0&&(n.minWidth=t.minWidth),t.maxWidth!==void 0&&(n.maxWidth=t.maxWidth),n}const Tk={identityClass:"",style:null};function $D(e){switch(e){case"right":return{identityClass:"automations-run-history-table__cell--align-right",style:cne.base};case"center":return{identityClass:"automations-run-history-table__cell--align-center",style:yne.base};default:return Tk}}function Dne(e){switch(e){case"right":return{identityClass:"automations-run-history-table__header--align-right",style:pne.base};case"center":return{identityClass:"automations-run-history-table__header--align-center",style:Tne.base};default:return Tk}}function Lne(e){switch(e){case"primary":return{identityClass:"automations-run-history-table__cell--tint-primary",style:fne.base};case"secondary":return{identityClass:"automations-run-history-table__cell--tint-secondary",style:xne.base};case"tertiary":return{identityClass:"automations-run-history-table__cell--tint-tertiary",style:kne.base};case"quaternary":return{identityClass:"automations-run-history-table__cell--tint-quaternary",style:vne.base};default:return Tk}}function jne(e){return!e.defaultPrevented&&e.button===0&&!e.metaKey&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.currentTarget.target!=="_blank"}function jc(...e){return e.filter(Boolean).join(" ")}function BD(e){return nn(Kt({rootClass:"ui-automations-run-history-table__row",stylexStyles:[mne.base,e&&gne.base],className:jc("automations-run-history-table__row",e&&"automations-run-history-table__row--linked")}).className,"ui--default-marker")}function FD(){return g.jsx("div",{className:Kt({rootClass:"ui-automations-run-history-table__row-divider",stylexStyles:bne.base,className:"automations-run-history-table__row-divider"}).className,"data-run-history-row-divider":""})}function zne({columns:e}){return g.jsx("div",{className:Kt({rootClass:"ui-automations-run-history-table__header-row",stylexStyles:hne.base,className:"automations-run-history-table__header-row"}).className,children:e.map(t=>{const n=Dne(t.align);return g.jsx("div",{className:Kt({rootClass:"ui-automations-run-history-table__header",stylexStyles:[dne.base,n.style],className:jc("automations-run-history-table__header",n.identityClass)}).className,style:Ek(t),children:t.header},`header-${t.key}`)})})}function SC({row:e,column:t}){const n=$D(t.align),r=Lne(t.tintColor);return g.jsx("div",{className:Kt({rootClass:"ui-automations-run-history-table__cell",stylexStyles:[PD.base,n.style,r.style],className:jc("automations-run-history-table__cell",n.identityClass,r.identityClass)}).className,style:Ek(t),children:t.render(e)})}function Pne({columns:e,rowIndex:t}){const n=kC[t%kC.length];return g.jsxs("div",{className:BD(!1),"data-run-history-row":"",children:[g.jsx(FD,{}),e.map(r=>{const s=$D(r.align);return g.jsx("div",{className:Kt({rootClass:"ui-automations-run-history-table__cell",stylexStyles:[PD.base,s.style],className:jc("automations-run-history-table__cell",s.identityClass)}).className,style:Ek(r),children:r.header!==""&&r.header!=null&&g.jsx("span",{className:Kt({rootClass:"ui-automations-run-history-table__skeleton",stylexStyles:[Rne.base,n.style],className:jc("automations-run-history-table__skeleton",n.identityClass)}).className})},`skeleton-${r.key}`)})]})}function UD({data:e,columns:t,isLoading:n=!1,skeletonRowCount:r=3,emptyState:s,onRowClick:a,getRowHref:l,pagination:c,ariaLabel:d="Run history"}){const{linkColumns:f,excludedColumns:h,hasExcludedColumns:m}=v.useMemo(()=>{const S=[],R=[];for(const T of t)T.excludeFromRowLink===!0?R.push(T):S.push(T);return{linkColumns:S,excludedColumns:R,hasExcludedColumns:R.length>0}},[t]),b=n&&e.length===0,y=!n&&e.length===0,k=c!==void 0&&c.totalPages>1&&!n;return g.jsxs("div",{className:Kt({rootClass:"ui-automations-run-history-table__wrapper",stylexStyles:Ane.base,className:"automations-run-history-table__wrapper"}).className,"data-vr":"all-runs",children:[g.jsxs("section",{"aria-busy":n,"aria-label":d,className:Kt({rootClass:"ui-automations-run-history-table",stylexStyles:une.base,className:"automations-run-history-table"}).className,children:[g.jsx(zne,{columns:t}),b?g.jsx("div",{className:Kt({rootClass:"ui-automations-run-history-table__rows",stylexStyles:vC.base,className:"automations-run-history-table__rows"}).className,children:Array.from({length:r},(S,R)=>g.jsx(Pne,{columns:t,rowIndex:R},`skeleton-row-${R.toString()}`))}):y?g.jsx("div",{"aria-live":"polite",className:Kt({rootClass:"ui-automations-run-history-table__empty",stylexStyles:Sne.base,className:"automations-run-history-table__empty"}).className,role:"status",children:s??g.jsxs(g.Fragment,{children:[g.jsx("span",{className:Kt({rootClass:"ui-automations-run-history-table__empty-title",stylexStyles:Ene.base,className:"automations-run-history-table__empty-title"}).className,children:"No Results"}),g.jsx("span",{className:Kt({rootClass:"ui-automations-run-history-table__empty-description",stylexStyles:wne.base,className:"automations-run-history-table__empty-description"}).className,children:"Try different filters"})]})}):g.jsx("div",{className:Kt({rootClass:"ui-automations-run-history-table__rows",stylexStyles:vC.base,className:"automations-run-history-table__rows"}).className,children:e.map(S=>{const R=l?.(S),T=R!==void 0&&R!==""&&f.length>0,E=T||a!==void 0&&f.length>0,C=()=>f.map(_=>g.jsx(SC,{column:_,row:S},`cell-${S.id}-${_.key}`));return g.jsx(v.Fragment,{children:g.jsxs("div",{className:BD(E),"data-run-history-row":"",children:[g.jsx(FD,{}),T?g.jsx("a",{className:Kt({rootClass:"ui-automations-run-history-table__row-link",stylexStyles:xC.base,className:"automations-run-history-table__row-link"}).className,"data-run-history-row-link":"",href:R,onClick:_=>{a!==void 0&&jne(_)&&(_.preventDefault(),a(S))},children:C()}):a!==void 0&&f.length>0?g.jsx("button",{className:Kt({rootClass:"ui-automations-run-history-table__row-link",stylexStyles:xC.base,className:"automations-run-history-table__row-link"}).className,"data-run-history-row-link":"",onClick:()=>a(S),type:"button",children:C()}):C(),m&&h.map(_=>g.jsx(SC,{column:_,row:S},`cell-${S.id}-${_.key}`))]})},S.id)})})]}),k&&c!==void 0&&g.jsx(lne,{currentPage:c.currentPage,onPageChange:c.onPageChange,pageSize:c.pageSize,rootStyle:One.base,totalItems:c.totalItems,totalPages:c.totalPages})]})}function Yh(e,...t){const n=e.trim().toLowerCase();return n===""?!0:t.filter(r=>r!=null&&r!=="").join(" ").toLowerCase().includes(n)}function qD({title:e,count:t,singularLabel:n,pluralLabel:r,search:s,searchPlaceholder:a,onSearchChange:l,actions:c,children:d}){const f=t===1?n:r;return g.jsxs("section",{className:"pg-list-section",children:[e!==void 0?g.jsxs("header",{className:"pg-list-section__header",children:[g.jsx("h1",{className:"pg-list-section__title",children:e}),c?g.jsx("div",{className:"pg-list-section__actions",children:c}):null]}):null,g.jsxs("div",{className:"pg-list-section__toolbar",children:[g.jsxs("p",{className:"pg-list-section__count",children:[t," ",f]}),g.jsxs("div",{className:"pg-list-section__toolbar-end",children:[g.jsx("div",{className:"pg-list-section__search",children:g.jsx(Yc,{type:"search",size:"lg",startIcon:"search",value:s,onChange:h=>l(h.target.value),placeholder:a,"aria-label":a,autoComplete:"off"})}),e===void 0&&c?g.jsx("div",{className:"pg-list-section__actions",children:c}):null]})]}),d]})}function $ne(e){return e==="running"?"Running":e==="cancelled"?"Cancelled":e==="failed"?"Failed":"Completed"}function Bne(e){return e==="running"?"accent":e==="failed"?"danger":"neutral"}function Fne(e,t){return Yh(t,e.id,e.description,e.verdict,e.error,e.sessionId)}function Une(e,t){return Yh(t,e.runId,"eval",e.status,e.error,`${e.summary.passed} passed`,`${e.summary.failed} failed`,`${e.summary.done}/${e.summary.total}`)?!0:e.cases.some(n=>Fne(n,t))}function qne(e,t){return Yh(t,e.title,e.sessionId,e.channelId,e.mode)}function wC({running:e,active:t=!1,children:n}){const r=["pg-agent-run__primary",t?"pg-agent-run__primary--active":null].filter(Boolean).join(" ");return g.jsxs("span",{className:r,children:[e===!0?g.jsx("span",{className:"spin","aria-label":"Running"}):null,g.jsx("span",{className:"pg-agent-run__primary-text",children:n})]})}function Hne({sessions:e,runs:t,currentSessionId:n,currentEvalRunId:r,readOnly:s=!1,onSelectSession:a,onOpenEvalRun:l}){const[c,d]=v.useState(""),f=v.useMemo(()=>[...e.map(S=>({kind:"session",at:S.updatedAt??S.createdAt??"",session:S})),...t.map(S=>({kind:"evalRun",at:S.finishedAt??S.startedAt,run:S}))].sort((S,R)=>R.at.localeCompare(S.at)),[e,t]),h=v.useMemo(()=>f.filter(k=>k.kind==="session"?qne(k.session,c):Une(k.run,c)),[f,c]),m=v.useMemo(()=>h.map(k=>k.kind==="session"?{id:`session:${k.session.sessionId}`,kind:"session",session:k.session,active:k.session.sessionId===n}:{id:`eval:${k.run.runId}`,kind:"evalRun",run:k.run,active:k.run.runId===r}),[h,n,r]),b=v.useMemo(()=>[{key:"run",header:"Run",flexWidth:{minWidth:160,grow:2},tintColor:"primary",render:k=>k.kind==="session"?g.jsx(wC,{running:k.session.running,active:k.active,children:k.session.title||k.session.sessionId}):g.jsx(wC,{running:k.run.status==="running",active:k.active,children:k.run.runId})},{key:"type",header:"Type",flexWidth:{minWidth:140,grow:1},render:k=>{if(k.kind==="session")return k.session.channelId||"—";const{status:S,summary:R}=k.run;return g.jsxs("span",{className:"pg-agent-run__type",children:[g.jsx(uo,{variant:Bne(S),size:"sm",children:"Eval"}),g.jsxs("span",{className:"pg-eval-run__meta",children:[$ne(S),S==="running"?` · ${R.done}/${R.total} done`:""]})]})}},{key:"details",header:"Details",flexWidth:{minWidth:160,grow:1.5},render:k=>{if(k.kind==="session"){const R=k.session.turnCount;return`${R} ${R===1?"turn":"turns"}`}const{summary:S}=k.run;return g.jsxs("span",{className:"pg-eval-run__cases-summary",children:[g.jsxs("span",{className:"pg-eval-run__stat pg-verdict--success",children:[g.jsx(Yt,{name:"check-circle",size:12,variant:"filled","aria-hidden":!0}),S.passed," passed"]}),g.jsxs("span",{className:"pg-eval-run__stat pg-verdict--danger",children:[g.jsx(Yt,{name:"x-circle",size:12,variant:"filled","aria-hidden":!0}),S.failed," failed"]})]})}},{key:"activity",header:"Last activity",fixedWidth:96,align:"right",render:k=>k.kind==="session"?k.session.updatedAt?sv(k.session.updatedAt)??"—":"—":sv(k.run.finishedAt??k.run.startedAt)??"—"}],[]),y=f.length===0?g.jsx("span",{children:s?"No stored runs for this stopped agent.":"No runs yet — start a chat."}):g.jsx("span",{children:"No runs match your search."});return g.jsx(qD,{count:h.length,singularLabel:"run",pluralLabel:"runs",search:c,searchPlaceholder:"Search runs",onSearchChange:d,children:g.jsx(UD,{data:m,columns:b,ariaLabel:"Agent runs",emptyState:y,onRowClick:k=>{if(k.kind==="session"){a(k.session);return}l(k.run.runId)}})})}function Gne(e,t){const n=e?.cases.find(s=>s.id===t);if(n===void 0)return{label:"—",className:"",icon:void 0};if(n.status==="running")return{label:"Running…",className:"pg-verdict--warn",icon:void 0};const r=n.verdict??(n.ok===!0?"passed":"failed");return r==="passed"?{label:"Passed",className:"pg-verdict--success",icon:"check-circle"}:r==="failed"?{label:"Failed",className:"pg-verdict--danger",icon:"x-circle"}:{label:r,className:"pg-verdict--muted",icon:void 0}}function Vne({cases:e,latestRun:t,running:n,onRun:r,onRunAll:s,readOnly:a=!1}){const[l,c]=v.useState(""),d=v.useMemo(()=>e.filter(b=>Yh(l,b.id,b.description,b.fileId,b.tags?.join(" "))),[e,l]),f=v.useMemo(()=>d.map(b=>{const y=Gne(t,b.id);return{id:b.id,evalCase:b,verdictLabel:y.label,verdictClassName:y.className,verdictIcon:y.icon,isSummary:b.id.endsWith("/overall")||(b.tags?.includes("summary")??!1)}}),[d,t]),h=v.useMemo(()=>{const b=[{key:"case",header:"Case",flexWidth:{minWidth:160,grow:1.4},tintColor:"primary",render:y=>g.jsx("span",{className:"pg-agent-run__primary-text",children:y.evalCase.id})},{key:"description",header:"Description",flexWidth:{minWidth:180,grow:2.4},render:y=>g.jsx("span",{className:"pg-agent-run__primary-text",children:y.evalCase.description||"—"})},{key:"tags",header:"Tags",flexWidth:{minWidth:100,grow:1},render:y=>y.evalCase.tags?.join(", ")||"—"},{key:"latest",header:"Latest",flexWidth:{minWidth:80,grow:1},render:y=>g.jsxs("span",{className:y.verdictClassName?`pg-eval-run__stat ${y.verdictClassName}`:"pg-eval-run__stat",children:[y.verdictIcon!==void 0?g.jsx(Yt,{name:y.verdictIcon,variant:"filled",size:12,"aria-hidden":!0}):null,y.verdictLabel]})}];return a||b.push({key:"actions",header:"",fixedWidth:40,align:"right",excludeFromRowLink:!0,render:y=>g.jsx(dr,{icon:"play",size:"sm","aria-label":"Run",disabled:n,title:y.isSummary?`Runs full ${y.evalCase.fileId} suite (summary needs siblings)`:void 0,onClick:()=>r(y.evalCase.id)})}),b},[r,n,a]),m=e.length===0?g.jsx("span",{children:"No evals/ cases found for this agent."}):g.jsx("span",{children:"No evaluations match your search."});return g.jsx(qD,{count:d.length,singularLabel:"evaluation",pluralLabel:"evaluations",search:l,searchPlaceholder:"Search evaluations",onSearchChange:c,actions:!a&&e.length>0?g.jsx(gn,{variant:"primary",tone:"monochrome",size:"lg",disabled:n,title:n?"Eval run in progress":void 0,onClick:s,children:"Run all"}):null,children:g.jsx(UD,{data:f,columns:h,ariaLabel:"Evaluations",emptyState:m})})}function Ku({label:e,children:t}){return g.jsxs("div",{className:"pg-meta-table__cell",children:[g.jsx("div",{className:"pg-meta-table__label",children:e}),g.jsx("div",{className:"pg-meta-table__value",children:t})]})}function gy(){return g.jsx("span",{className:"pg-meta-table__empty",children:"—"})}function Wne(e,t){return t?"History":e?"Development":"Production"}function Kne(e,t){return t?"neutral":e?"warn":"neutral"}function Yne(e,t){return t&&e!=="bad"?"Stopped":e==="ok"?"Healthy":e==="bad"?"Unhealthy":"Unknown"}function Xne(e,t){return t&&e!=="bad"?"neutral":e==="ok"?"success":e==="bad"?"danger":"neutral"}function Zne(e,t){return t&&t.trim()!==""?t:e&&e.trim()!==""?e.charAt(0).toUpperCase()+e.slice(1):null}function Qne({dev:e=!1,health:t="unknown",model:n,runtime:r,sourcePath:s,version:a,readOnly:l=!1}){const c=Zne(r,s),d=n&&n.trim()!==""?n:null,f=a&&a.trim()!==""?a.trim():null,h=l&&t!=="bad",m=!h&&t==="ok";return g.jsxs("section",{className:"pg-meta-table","aria-labelledby":"pg-overview-title",children:[g.jsx("h2",{id:"pg-overview-title",className:"pg-section-title",children:"Overview"}),g.jsxs("div",{className:"pg-meta-table__card",children:[g.jsx(Ku,{label:"Mode",children:g.jsxs(uo,{variant:Kne(e,l),size:"sm",pill:!0,children:[e&&!l?g.jsx("span",{className:"pg-meta-table__dot pg-meta-table__dot--dev","aria-hidden":!0}):null,Wne(e,l)]})}),g.jsx(Ku,{label:"Status",children:g.jsxs(uo,{variant:Xne(t,l),size:"sm",pill:!0,children:[g.jsx(Yt,{name:h?"pause-circle":m?"check-circle":"x-circle",variant:"filled",size:12,color:m?"green":t==="bad"?"red":"secondary","aria-hidden":!0}),Yne(t,l)]})}),g.jsx(Ku,{label:"Model",children:d?g.jsx("span",{className:"pg-meta-table__text",children:d}):g.jsx(gy,{})}),g.jsx(Ku,{label:"Source",children:c?g.jsx("span",{className:"pg-meta-table__text",title:c,children:c}):g.jsx(gy,{})}),g.jsx(Ku,{label:"Agent SDK",children:f?g.jsx("span",{className:"pg-meta-table__text",children:f}):g.jsx(gy,{})})]})]})}function Jne({schedules:e,dev:t,onDispatch:n}){return e.length===0?null:g.jsxs("section",{className:"pg-schedules","aria-labelledby":"pg-schedules-title",children:[g.jsx("h2",{id:"pg-schedules-title",className:"pg-section-title",children:"Schedules"}),g.jsx("div",{className:"pg-schedules__card",children:e.map(r=>g.jsxs("div",{className:"pg-schedules__row",children:[g.jsxs("div",{className:"pg-schedules__copy",children:[g.jsx("div",{className:"pg-schedules__name",children:r.name}),g.jsx("div",{className:"pg-schedules__cron",children:r.cron})]}),g.jsx(gn,{variant:"outline",size:"lg",className:"pg-outline-button",disabled:!t,title:t?`Dispatch ${r.name} once`:"Start the server with --dev to dispatch schedules by hand",onClick:()=>{n(r.name)},children:"Dispatch"})]},r.name))})]})}function np(e){return g.jsx("span",{className:"pg-surface-field__text",children:e.map((t,n)=>g.jsxs("span",{children:[n>0?", ":"",t.name]},t.name))})}function rp(e){return e.map(t=>g.jsxs("div",{className:"pg-surface-detail",children:[g.jsx("div",{className:"pg-surface-detail__name",children:t.name}),t.detail?g.jsx("div",{className:"pg-surface-detail__desc",children:t.detail}):null]},t.name))}function ere({field:e,expanded:t,onToggle:n}){const s=!e.empty&&e.details!==void 0?g.jsxs("button",{type:"button",className:"pg-surface-field__head","aria-expanded":t,"aria-label":`${t?"Collapse":"Expand"} ${e.label}`,onClick:n,children:[g.jsx("span",{className:"pg-surface-field__label",children:e.label}),g.jsx(Yt,{name:"chevron-down",size:12,"aria-hidden":!0,className:t?"pg-surface-field__chevron open":"pg-surface-field__chevron"})]}):g.jsx("div",{className:"pg-surface-field__label",children:e.label});return g.jsxs("div",{className:"pg-surface-field",children:[s,g.jsx("div",{className:"pg-surface-field__value",children:e.empty?g.jsx("span",{className:"pg-surface-field__empty",children:"Empty"}):t&&e.details!==void 0?g.jsx("div",{className:"pg-surface-field__details",children:e.details}):e.summary})]})}function tre({info:e,onTryRoute:t,readOnly:n=!1}){const[r,s]=v.useState(null),[a,l]=v.useState(new Set),c=e?.tools??[],d=e?.skills??[],f=e?.subagents??[],h=e?.connections??[],m=e?.channels??[],b=e?.hooks??[],y=v.useMemo(()=>{const T=new Map;for(const E of Fh(m))T.set(`${E.method}:${E.url}`,E.name);return T},[m]),k=(T,E)=>{if(t){t(T,E);return}s({channelId:T,route:E})},S=m.map(T=>g.jsxs("div",{className:"pg-surface-detail",children:[g.jsx("div",{className:"pg-surface-detail__name",children:T.id}),(T.routes??[]).length===0?g.jsx("div",{className:"pg-surface-detail__desc",children:"(events only)"}):g.jsx("div",{className:"pg-surface-channel__routes",children:(T.routes??[]).map(E=>{const C=!n&&T.id!=="http",_=`${E.method} ${E.url}`,D=y.get(`${E.method.toUpperCase()}:${E.url}`);return g.jsxs("div",{className:"pg-surface-channel__route",children:[g.jsx("code",{children:_}),D?g.jsx("code",{className:"pg-surface-channel__slash",title:"Composer slash command",children:D}):null,C?g.jsx("button",{type:"button",className:"link-btn",onClick:()=>k(T.id,E),children:"Try"}):null]},_)})})]},T.id)),R=[{id:"tools",label:"Tools",empty:c.length===0,summary:np(c),details:rp(c.map(T=>({name:T.name,detail:T.description})))},{id:"skills",label:"Skills",empty:d.length===0,summary:np(d),details:rp(d.map(T=>({name:T.name,detail:T.description})))},{id:"subagents",label:"Subagents",empty:f.length===0,summary:np(f),details:rp(f.map(T=>({name:T.name,detail:T.description})))},{id:"connections",label:"MCP Connections",empty:h.length===0,summary:np(h),details:rp(h.map(T=>({name:T.name,detail:T.transport})))},{id:"channels",label:"Channels",empty:m.length===0,summary:g.jsx("span",{className:"pg-surface-field__text",children:m.map(T=>T.id).join(", ")}),details:S},{id:"hooks",label:"Hooks",empty:b.length===0,summary:g.jsx("span",{className:"pg-surface-field__text",children:b.join(", ")})}];return g.jsxs("section",{className:"pg-surface",id:"pg-agent-surface","aria-labelledby":"pg-agent-trace-title",children:[g.jsx("h2",{id:"pg-agent-trace-title",className:"pg-section-title",children:"Agent Trace"}),e===null?g.jsx("div",{className:"pg-surface-empty",children:"Loading…"}):g.jsx("div",{className:"pg-surface-card",children:R.map(T=>g.jsx(ere,{field:T,expanded:a.has(T.id),onToggle:()=>{l(E=>{const C=new Set(E);return C.has(T.id)?C.delete(T.id):C.add(T.id),C})}},T.id))}),r?g.jsx(jD,{channelId:r.channelId,route:r.route,onClose:()=>s(null)}):null]})}function EC(){const e=Ke(z=>z.meta),t=Ke(z=>z.info),n=Ke(z=>z.health),r=Ke(z=>z.sessions),s=Ke(z=>z.current),a=Ke(z=>z.view),l=Ke(z=>z.evalCases),c=Ke(z=>z.evalRuns),d=Ke(z=>z.evalRun),f=Ke(z=>z.evalNavReturn),h=Ke(z=>z.overviewSection),m=Ke(z=>z.surfaceFocusNonce),b=v.useRef(null);v.useEffect(()=>{m!==0&&b.current?.scrollIntoView({behavior:"smooth",block:"start"})},[m]);const y=e.name||t?.name||"Agent",k=_D(y),S=d??c?.[0]??null,R=d?.status==="running",T=it.modelLabel(),E=v.useMemo(()=>{const z=d===null?c:[d,...c],I=new Set(z.flatMap(Y=>Y.cases.flatMap(H=>H.sessionId===void 0?[]:[H.sessionId])));return r.filter(Y=>!I.has(Y.sessionId))},[r,c,d]),C=yG(E),_=Sk(a),D=f||_==="evals",N=D?null:s?.sessionId??null,A=D?d?.runId??null:null,$=[{id:"home",label:"Agent"},{id:"runs",label:C>0?`Runs (${C})`:"Runs"},{id:"evals",label:"Evaluations"},{id:"logs",label:"Logs"}];return g.jsxs("div",{className:"pg-overview",children:[g.jsxs("div",{className:"pg-overview-identity",children:[g.jsx("div",{className:"pg-overview-identity__avatar","data-color":k,"aria-hidden":"true",children:g.jsx(Yt,{name:"robot",variant:"filled",size:24,color:k})}),g.jsxs("div",{className:"pg-overview-identity__text",children:[g.jsx("h1",{className:"pg-overview-identity__name",children:y}),t?.description?g.jsx("p",{className:"pg-overview-identity__description",children:t.description}):null]})]}),g.jsx("div",{className:"pg-tabs",role:"tablist","aria-label":"Overview sections",children:$.map(z=>g.jsx("button",{type:"button",role:"tab","aria-selected":h===z.id,className:h===z.id?"pg-tab pg-tab--active":"pg-tab",onClick:()=>it.setOverviewSection(z.id),children:z.label},z.id))}),h==="home"?g.jsxs(g.Fragment,{children:[g.jsx(Qne,{dev:e.dev,health:n,model:T||void 0,runtime:t?.runtime,sourcePath:t?.local?.cwd,version:e.version,readOnly:e.readonly===!0}),g.jsx(Jne,{schedules:t?.schedules??[],dev:e.dev&&e.readonly!==!0,onDispatch:z=>it.dispatchSchedule(z)}),g.jsx("div",{ref:b,children:g.jsx(tre,{info:t,readOnly:e.readonly===!0})})]}):null,h==="runs"?g.jsx(Hne,{sessions:E,runs:c,currentSessionId:N,currentEvalRunId:A,readOnly:e.readonly===!0,onSelectSession:z=>it.selectSession(z),onOpenEvalRun:z=>{it.selectEvalRun(z)}}):null,h==="evals"?g.jsx(Vne,{cases:l,latestRun:S,running:R,readOnly:e.readonly===!0,onRun:z=>{it.startEvalRun([z])},onRunAll:()=>{it.startEvalRun()}}):null,h==="logs"?g.jsx("div",{className:"pg-overview-logs",children:g.jsx(ine,{})}):null]})}const HD="agent-serve.playground.chatPanelWidth.v2",th=320,nre=.5,rre=.8;function Yu(e){const t=e?.parentElement;return t&&t.clientWidth>0?t.clientWidth:typeof window<"u"?window.innerWidth:1200}function Sv(e){return Math.max(th,Math.floor(e*rre))}function ul(e,t){return Math.min(Sv(t),Math.max(th,Math.round(e)))}function by(e){return ul(e*nre,e)}function TC(e){try{const t=localStorage.getItem(HD);if(t===null)return by(e);const n=Number.parseInt(t,10);return Number.isFinite(n)?ul(n,e):by(e)}catch{return by(e)}}function ire(){const e=Ke(h=>h.chatPanelOpen),t=v.useRef(null),[n,r]=v.useState(()=>TC(typeof window<"u"?window.innerWidth:1200)),[s,a]=v.useState(!1),l=v.useRef(n);l.current=n,v.useLayoutEffect(()=>{const h=t.current?.parentElement;if(!h)return;r(TC(Yu(t.current)));const m=()=>{const y=Yu(t.current);r(k=>ul(k,y))},b=new ResizeObserver(m);return b.observe(h),()=>b.disconnect()},[]),v.useEffect(()=>{try{localStorage.setItem(HD,String(n))}catch{}},[n]);const c=v.useCallback(h=>{h.preventDefault();const m=h.currentTarget,b=h.clientX,y=l.current;m.setPointerCapture(h.pointerId),a(!0),document.body.classList.add("pg-resizing-chat-panel");const k=R=>{const T=Yu(t.current);r(ul(y-(R.clientX-b),T))},S=R=>{m.releasePointerCapture(R.pointerId),m.removeEventListener("pointermove",k),m.removeEventListener("pointerup",S),m.removeEventListener("pointercancel",S),a(!1),document.body.classList.remove("pg-resizing-chat-panel")};m.addEventListener("pointermove",k),m.addEventListener("pointerup",S),m.addEventListener("pointercancel",S)},[]);if(!e)return null;const d=Yu(t.current),f=Sv(d);return g.jsxs("aside",{ref:t,className:s?"pg-chat-panel pg-chat-panel--resizing":"pg-chat-panel",style:{width:n},children:[g.jsx("div",{className:s?"pg-chat-panel__resizer dragging":"pg-chat-panel__resizer",role:"separator","aria-orientation":"vertical","aria-label":"Resize chat panel","aria-valuenow":n,"aria-valuemin":th,"aria-valuemax":f,tabIndex:0,onPointerDown:c,onKeyDown:h=>{const m=Yu(t.current);h.key==="ArrowLeft"?(h.preventDefault(),r(b=>ul(b+16,m))):h.key==="ArrowRight"?(h.preventDefault(),r(b=>ul(b-16,m))):h.key==="Home"?(h.preventDefault(),r(th)):h.key==="End"&&(h.preventDefault(),r(Sv(m)))}}),g.jsx(ID,{variant:"panel"}),g.jsx("div",{className:"pg-transcript-wrap",children:g.jsx(MD,{})})]})}function sre(e){const t=e.replace("#","").trim();if(t.length===8)return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:parseInt(t.slice(6,8),16)/255};if(t.length===6)return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:1};if(t.length===3)return{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:1};throw new Error(`Invalid hex: ${e}`)}function GD(e){const t=e.r.toString(16).padStart(2,"0"),n=e.g.toString(16).padStart(2,"0"),r=e.b.toString(16).padStart(2,"0");return`#${t}${n}${r}`.toUpperCase()}function ore(e){const t=Math.round(Math.min(1,Math.max(0,e.a))*255).toString(16).padStart(2,"0");return`${GD(e)}${t}`.toUpperCase()}const are=/^oklch\(\s*([^\s/]+)\s+([^\s/]+)\s+([^\s/)]+?)(?:\s*\/\s*([^)]+?))?\s*\)$/i,lre=/^rgba?\(\s*([0-9.]+)\s*,\s*([0-9.]+)\s*,\s*([0-9.]+)(?:\s*,\s*([0-9.]+))?\s*\)$/i,VD=.5/255;function ip(e,t,n){return Math.min(n,Math.max(t,e))}function yy(e){const t=Math.abs(e);return t<=.04045?e/12.92:(e<0?-1:1)*((t+.055)/1.055)**2.4}function vy(e){const t=Math.abs(e);return t<=.0031308?e*12.92:(e<0?-1:1)*(1.055*t**(1/2.4)-.055)}function ure(e){const t=yy(e.r/255),n=yy(e.g/255),r=yy(e.b/255),s=.4122214708*t+.5363325363*n+.0514459929*r,a=.2119034982*t+.6806995451*n+.1073969566*r,l=.0883024619*t+.2817188376*n+.6299787005*r,c=Math.cbrt(s),d=Math.cbrt(a),f=Math.cbrt(l),h=.2104542553*c+.793617785*d-.0040720468*f,m=1.9779984951*c-2.428592205*d+.4505937099*f,b=.0259040371*c+.7827717662*d-.808675766*f,y=Math.sqrt(m*m+b*b);let k=Math.atan2(b,m)*180/Math.PI;return k<0&&(k+=360),{l:h,c:y,h:y<5e-4?0:k,a:e.a}}function cre(e){const t=e.h*Math.PI/180,n=e.c*Math.cos(t),r=e.c*Math.sin(t),s=e.l+.3963377774*n+.2158037573*r,a=e.l-.1055613458*n-.0638541728*r,l=e.l-.0894841775*n-1.291485548*r,c=s*s*s,d=a*a*a,f=l*l*l,h=4.0767416621*c-3.3077115913*d+.2309699292*f,m=-1.2684380046*c+2.6097574011*d-.3413193965*f,b=-.0041960863*c-.7034186147*d+1.707614701*f;return{r:Math.round(ip(vy(h),0,1)*255),g:Math.round(ip(vy(m),0,1)*255),b:Math.round(ip(vy(b),0,1)*255),a:ip(e.a,0,1)}}function sp(e,t){const n=5e-4*10**(1-t);return!Number.isFinite(e)||Object.is(e,-0)||Math.abs(e)<n?"0":e.toFixed(t).replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,"")}function WD(e){const t=sp(e.l,3),n=sp(e.c,3),r=n==="0"?"0":sp(e.h,3);return e.a<1-VD?`oklch(${t} ${n} ${r} / ${sp(e.a,3)})`:`oklch(${t} ${n} ${r})`}function op(e,t){const n=e.trim();if(n.endsWith("%"))return Number.parseFloat(n.slice(0,-1))/100*t;const r=n.replace(/deg$/i,"");return Number.parseFloat(r)}function KD(e){const t=are.exec(e.trim());if(t===null)throw new Error(`Invalid oklch: ${e}`);const n=op(t[1],1),r=op(t[2],.4),s=op(t[3],1),a=t[4]===void 0?1:op(t[4],1);if(![n,r,s,a].every(Number.isFinite))throw new Error(`Invalid oklch: ${e}`);return{l:n,c:r,h:s,a}}function fre(e){const t=lre.exec(e.trim());if(t===null)throw new Error(`Invalid rgb: ${e}`);return{r:Number.parseFloat(t[1]),g:Number.parseFloat(t[2]),b:Number.parseFloat(t[3]),a:t[4]===void 0?1:Number.parseFloat(t[4])}}function YD(e){const t=e.trim();if(t.startsWith("#"))return sre(t);if(t.toLowerCase().startsWith("oklch("))return cre(KD(t));if(/^rgba?\(/i.test(t))return fre(t);throw new Error(`Unsupported CSS color: ${e}`)}function dre(e){return WD(ure(e))}function pre(e){const t=e.trim();return t.toLowerCase().startsWith("oklch(")?WD(KD(t)):dre(YD(t))}function hre(e){const t=YD(e);return t.a<1-VD?ore(t):GD(t)}function mre(e,t){const n=Object.keys(e).sort((l,c)=>l.localeCompare(c)),r=n.map(l=>`${t}--cursor-${l}: ${hre(e[l])};`),s=`${t} `,a=n.map(l=>`${s}--cursor-${l}: ${pre(e[l])};`);return[...r,`${t}@supports (color: oklch(0 0 0)) {`,...a,`${t}}`]}const gre={name:"dark",appearance:"dark",highContrast:!1,sidebar:"oklch(0.209 0 0)",chrome:"oklch(0.191 0 0)",editor:"oklch(0.209 0 0)",base:"oklch(0.955 0 0)",accent:"oklch(0.681 0.131 252.629)",actionLabel:"oklch(0.226 0.013 264.284)",brand:"oklch(0.652 0.214 37.99)",focus:"oklch(0.955 0 0)",success:"oklch(0.638 0.129 153.739)",warn:"oklch(0.811 0.118 71.255)",danger:"oklch(0.628 0.194 8.387)",added:"oklch(0.713 0.094 155.438)",modified:"oklch(0.811 0.118 71.255)",removed:"oklch(0.712 0.177 12.651)",untracked:"oklch(0.775 0.062 217.469)",terminalAnsiBlack:"oklch(0.26 0 0)",terminalAnsiRed:"oklch(0.712 0.177 12.651)",terminalAnsiYellow:"oklch(0.712 0.125 71.923)",terminalAnsiGreen:"oklch(0.638 0.129 153.739)",terminalAnsiCyan:"oklch(0.775 0.062 217.469)",terminalAnsiBlue:"oklch(0.697 0.059 248.687)",terminalAnsiMagenta:"oklch(0.692 0.062 332.665)",terminalAnsiWhite:"oklch(0.955 0 0)",terminalAnsiBrightBlack:"oklch(0.955 0 0 / 0.6)",terminalAnsiBrightRed:"oklch(0.712 0.177 12.651)",terminalAnsiBrightYellow:"oklch(0.811 0.118 71.255)",terminalAnsiBrightGreen:"oklch(0.713 0.094 155.438)",terminalAnsiBrightCyan:"oklch(0.775 0.062 217.469)",terminalAnsiBrightBlue:"oklch(0.713 0.056 247.764)",terminalAnsiBrightMagenta:"oklch(0.692 0.062 332.665)",terminalAnsiBrightWhite:"oklch(0.955 0 0)",red:"oklch(0.712 0.177 12.651)",orange:"oklch(0.693 0.096 38.241)",yellow:"oklch(0.811 0.118 71.255)",green:"oklch(0.638 0.129 153.739)",cyan:"oklch(0.697 0.059 248.687)",blue:"oklch(0.74 0.101 251.884)",magenta:"oklch(0.692 0.062 332.665)",purple:"oklch(0.679 0.156 286.998)",diffAddedLineBackground:"oklch(0.638 0.129 153.739 / 0.2)",diffAddedTextBackground:"oklch(0.638 0.129 153.739 / 0.133)",diffRemovedLineBackground:"oklch(0.5 0.2 9.842 / 0.2)",diffRemovedTextBackground:"oklch(0.5 0.2 9.842 / 0.133)"},bre={name:"light",appearance:"light",highContrast:!1,sidebar:"oklch(0.964 0 0)",chrome:"oklch(0.979 0 0)",editor:"oklch(0.991 0 0)",base:"oklch(0.191 0 0)",accent:"oklch(0.561 0.137 249.943)",actionLabel:"oklch(0.991 0 0)",brand:"oklch(0.652 0.214 37.99)",focus:"oklch(0.561 0.137 249.943)",success:"oklch(0.479 0.116 156.327)",warn:"oklch(0.567 0.123 69.543)",danger:"oklch(0.518 0.196 14.313)",added:"oklch(0.479 0.116 156.327)",modified:"oklch(0.567 0.123 69.543)",removed:"oklch(0.518 0.196 14.313)",untracked:"oklch(0.487 0.077 204.607)",terminalAnsiBlack:"oklch(0.191 0 0)",terminalAnsiRed:"oklch(0.518 0.196 14.313)",terminalAnsiYellow:"oklch(0.503 0.109 69.936)",terminalAnsiGreen:"oklch(0.479 0.116 156.327)",terminalAnsiCyan:"oklch(0.487 0.077 204.607)",terminalAnsiBlue:"oklch(0.497 0.143 250.703)",terminalAnsiMagenta:"oklch(0.449 0.176 345.345)",terminalAnsiWhite:"oklch(0.991 0 0)",terminalAnsiBrightBlack:"oklch(0.191 0 0 / 0.741)",terminalAnsiBrightRed:"oklch(0.582 0.178 13.604)",terminalAnsiBrightYellow:"oklch(0.567 0.123 69.543)",terminalAnsiBrightGreen:"oklch(0.542 0.133 155.45)",terminalAnsiBrightCyan:"oklch(0.552 0.068 203.209)",terminalAnsiBrightBlue:"oklch(0.561 0.137 249.943)",terminalAnsiBrightMagenta:"oklch(0.577 0.154 343.697)",terminalAnsiBrightWhite:"oklch(1 0 0)",red:"oklch(0.518 0.196 14.313)",orange:"oklch(0.576 0.183 39.534)",yellow:"oklch(0.567 0.123 69.543)",green:"oklch(0.479 0.116 156.327)",cyan:"oklch(0.487 0.077 204.607)",blue:"oklch(0.561 0.137 249.943)",magenta:"oklch(0.449 0.176 345.345)",purple:"oklch(0.572 0.154 287.656)",diffAddedLineBackground:"oklch(0.663 0.162 155.537 / 0.141)",diffAddedTextBackground:"oklch(0.666 0.162 155.968 / 0.22)",diffRemovedLineBackground:"oklch(0.703 0.192 13.697 / 0.22)",diffRemovedTextBackground:"oklch(0.703 0.192 13.697 / 0.341)"},XD=["sidebar","chrome","editor","base","accent","actionLabel","brand","focus","success","warn","danger","added","modified","removed","untracked","terminalAnsiBlack","terminalAnsiRed","terminalAnsiYellow","terminalAnsiGreen","terminalAnsiCyan","terminalAnsiBlue","terminalAnsiMagenta","terminalAnsiWhite","terminalAnsiBrightBlack","terminalAnsiBrightRed","terminalAnsiBrightYellow","terminalAnsiBrightGreen","terminalAnsiBrightCyan","terminalAnsiBrightBlue","terminalAnsiBrightMagenta","terminalAnsiBrightWhite","red","orange","yellow","green","cyan","blue","magenta","purple","diffAddedLineBackground","diffAddedTextBackground","diffRemovedLineBackground","diffRemovedTextBackground"];function yre(e){const t={};for(const n of XD){const r=e[n],s=Uc(n);t[s]=r}return t}function vre(e){return e.highContrast?e.appearance==="light"?"lightHighContrast":"darkHighContrast":e.appearance}new Set(XD);const xre={foreground:{op:"ref",ref:"base"},textPrimary:{op:"ref",ref:"base"},textSecondary:{op:"mixTransparent",ref:"base",percent:74},textTertiary:{op:"mixTransparent",ref:"base",percent:60},textQuaternary:{op:"mixTransparent",ref:"base",percent:36},textInvert:{op:"ref",ref:"editor"},textMedia:{op:"mixWhite",whitePercent:100},textActive:{op:"ref",ref:"textPrimary"},textFocused:{op:"ref",ref:"textPrimary"},textGitAddedPrimary:{op:"ref",ref:"added"},textGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:78},textGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:64},textGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:40},textGitModifiedPrimary:{op:"ref",ref:"modified"},textGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:78},textGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:64},textGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:40},textGitRemovedPrimary:{op:"ref",ref:"removed"},textGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:78},textGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:64},textGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:40},textGitUntrackedPrimary:{op:"ref",ref:"untracked"},textGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:78},textGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:64},textGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:40},textRedPrimary:{op:"ref",ref:"red"},textRedSecondary:{op:"mixTransparent",ref:"red",percent:78},textYellowPrimary:{op:"ref",ref:"yellow"},textYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:78},textGreenPrimary:{op:"ref",ref:"green"},textGreenSecondary:{op:"mixTransparent",ref:"green",percent:78},textMagentaPrimary:{op:"ref",ref:"magenta"},textMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:78},textPurplePrimary:{op:"ref",ref:"purple"},textPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:78},textCyanPrimary:{op:"ref",ref:"cyan"},textCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:78},textBluePrimary:{op:"ref",ref:"blue"},textBlueSecondary:{op:"mixTransparent",ref:"blue",percent:78},textOrangePrimary:{op:"ref",ref:"orange"},textOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:78},textAccent:{op:"ref",ref:"accent"},textLink:{op:"ref",ref:"textBluePrimary"},iconPrimary:{op:"ref",ref:"base"},iconSecondary:{op:"mixTransparent",ref:"base",percent:66},iconTertiary:{op:"mixTransparent",ref:"base",percent:52},iconQuaternary:{op:"mixTransparent",ref:"base",percent:28},iconGitAddedPrimary:{op:"ref",ref:"added"},iconGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:70},iconGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:56},iconGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:32},iconGitModifiedPrimary:{op:"ref",ref:"modified"},iconGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:70},iconGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:56},iconGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:32},iconGitRemovedPrimary:{op:"ref",ref:"removed"},iconGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:70},iconGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:56},iconGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:32},iconGitUntrackedPrimary:{op:"ref",ref:"untracked"},iconGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:70},iconGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:56},iconGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:32},iconAccentPrimary:{op:"ref",ref:"accent"},iconAccentSecondary:{op:"mixTransparent",ref:"accent",percent:70},iconRedPrimary:{op:"ref",ref:"red"},iconRedSecondary:{op:"mixTransparent",ref:"red",percent:70},iconYellowPrimary:{op:"ref",ref:"yellow"},iconYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:70},iconGreenPrimary:{op:"ref",ref:"green"},iconGreenSecondary:{op:"mixTransparent",ref:"green",percent:70},iconMagentaPrimary:{op:"ref",ref:"magenta"},iconMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:70},iconCyanPrimary:{op:"ref",ref:"cyan"},iconCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:70},iconBluePrimary:{op:"ref",ref:"blue"},iconBlueSecondary:{op:"mixTransparent",ref:"blue",percent:70},iconOrangePrimary:{op:"ref",ref:"orange"},iconOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:70},iconPurplePrimary:{op:"ref",ref:"purple"},iconPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:70},bgPrimary:{op:"mixTransparent",ref:"base",percent:20},bgSecondary:{op:"mixTransparent",ref:"base",percent:14},bgTertiary:{op:"mixTransparent",ref:"base",percent:8},bgQuaternary:{op:"mixTransparent",ref:"base",percent:6},bgQuinary:{op:"mixTransparent",ref:"base",percent:4},bgMedia:{op:"mixBlack",blackPercent:72},bgMediaHover:{op:"mixBlack",blackPercent:54},bgElevated:{op:"ref",ref:"editor"},bgChrome:{op:"ref",ref:"chrome"},bgCard:{op:"ref",ref:"bgQuaternary"},bgInput:{op:"ref",ref:"editor"},bgInputField:{op:"mixTransparentOverlay",ref:"base",percent:3},bgInputSurface:{op:"ref",ref:"bgQuaternary"},bgEditor:{op:"ref",ref:"editor"},bgSidebar:{op:"ref",ref:"sidebar"},bgDiffInserted:{op:"ref",ref:"diffAddedLineBackground"},bgDiffRemoved:{op:"ref",ref:"diffRemovedLineBackground"},bgGitAddedPrimary:{op:"ref",ref:"added"},bgGitAddedHover:{op:"mixTwo",k1:"base",p1:10,k2:"added"},bgGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:24},bgGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:12},bgGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:8},bgGitModifiedPrimary:{op:"ref",ref:"modified"},bgGitModifiedHover:{op:"mixTwo",k1:"base",p1:10,k2:"modified"},bgGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:24},bgGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:12},bgGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:8},bgGitRemovedPrimary:{op:"ref",ref:"removed"},bgGitRemovedHover:{op:"mixTwo",k1:"base",p1:10,k2:"removed"},bgGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:24},bgGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:12},bgGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:8},bgGitUntrackedPrimary:{op:"ref",ref:"untracked"},bgGitUntrackedHover:{op:"mixTwo",k1:"base",p1:10,k2:"untracked"},bgGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:24},bgGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:12},bgGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:8},bgActive:{op:"mixTransparent",ref:"base",percent:16},bgFocused:{op:"mixTransparent",ref:"base",percent:22},bgRedPrimary:{op:"ref",ref:"red"},bgRedSecondary:{op:"mixTransparent",ref:"red",percent:12},bgYellowPrimary:{op:"ref",ref:"yellow"},bgYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:12},bgGreenPrimary:{op:"ref",ref:"green"},bgGreenSecondary:{op:"mixTransparent",ref:"green",percent:12},bgMagentaPrimary:{op:"ref",ref:"magenta"},bgMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:12},bgCyanPrimary:{op:"ref",ref:"cyan"},bgCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:12},bgBluePrimary:{op:"ref",ref:"blue"},bgBlueSecondary:{op:"mixTransparent",ref:"blue",percent:12},bgOrangePrimary:{op:"ref",ref:"orange"},bgOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:12},bgPurplePrimary:{op:"ref",ref:"purple"},bgPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:12},bgPurpleTertiary:{op:"mixTransparent",ref:"purple",percent:8},bgAccent:{op:"ref",ref:"accent"},bgAccentHover:{op:"mixTwo",k1:"base",p1:10,k2:"accent"},bgAccentSecondary:{op:"mixTransparent",ref:"accent",percent:24},bgAccentTertiary:{op:"mixTransparent",ref:"accent",percent:12},bgAccentQuaternary:{op:"mixTransparent",ref:"accent",percent:8},strokeControlDivider:{op:"mixBlack",blackPercent:16},strokeControlDividerMonochrome:{op:"mixTransparent",ref:"editor",percent:16},strokePrimary:{op:"mixTransparent",ref:"base",percent:20},strokeSecondary:{op:"mixTransparent",ref:"base",percent:12},strokeMedia:{op:"mixWhite",whitePercent:12},strokeTertiary:{op:"mixTransparent",ref:"base",percent:8},strokeTertiaryOpaque:{op:"mixTwo",k1:"base",p1:8,k2:"chrome"},strokeQuaternary:{op:"mixTransparent",ref:"base",percent:4},strokeFocused:{op:"ref",ref:"focus",fadePercent:15},strokeHighContrast:{op:"mixTransparent",ref:"base",percent:0},strokeAccent:{op:"mixTransparent",ref:"accent",percent:56},strokeGitAdded:{op:"mixTransparent",ref:"added",percent:56},strokeGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:32},strokeGitModified:{op:"mixTransparent",ref:"modified",percent:56},strokeGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:32},strokeGitRemoved:{op:"mixTransparent",ref:"removed",percent:56},strokeGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:32},strokeGitUntracked:{op:"mixTransparent",ref:"untracked",percent:56},strokeGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:32},strokeRedPrimary:{op:"mixTransparent",ref:"red",percent:56},strokeRedSecondary:{op:"mixTransparent",ref:"red",percent:32},strokeYellowPrimary:{op:"mixTransparent",ref:"yellow",percent:56},strokeYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:32},strokeGreenPrimary:{op:"mixTransparent",ref:"green",percent:56},strokeGreenSecondary:{op:"mixTransparent",ref:"green",percent:32},strokeMagentaPrimary:{op:"mixTransparent",ref:"magenta",percent:56},strokeMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:32},strokeCyanPrimary:{op:"mixTransparent",ref:"cyan",percent:56},strokeCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:32},strokeBluePrimary:{op:"mixTransparent",ref:"blue",percent:56},strokeBlueSecondary:{op:"mixTransparent",ref:"blue",percent:32},strokeOrangePrimary:{op:"mixTransparent",ref:"orange",percent:56},strokeOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:32},shadowPrimary:{op:"mixBlack",blackPercent:20},shadowSecondary:{op:"mixTransparent",ref:"shadowPrimary",percent:60},shadowTertiary:{op:"mixTransparent",ref:"shadowPrimary",percent:30},shadowWorkbench:{op:"shadow",candidates:[{x:0,y:0,blur:8,spread:2,primaryMixPercent:40}]},boxShadowSm:{op:"shadow",candidates:[{x:0,y:2,blur:8,spread:0,shadowToken:"shadowSecondary"}]},boxShadowBase:{op:"shadow",candidates:[{x:0,y:0,blur:8,spread:2,shadowToken:"shadowPrimary"}]},boxShadowSoft:{op:"shadow",candidates:[{x:0,y:0,blur:8,spread:2,shadowToken:"shadowTertiary"}]},boxShadowPopup:{op:"shadow",candidates:[{x:0,y:3,blur:8,spread:0,shadowToken:"shadowSecondary"},{x:0,y:2,blur:5,spread:0,shadowToken:"shadowSecondary"},{x:0,y:1,blur:1,spread:0,shadowToken:"shadowSecondary"}]},boxShadowLg:{op:"shadow",candidates:[{inset:!0,x:0,y:0,blur:4,spread:0,literalColor:"oklch(1 0 0 / 0.05)"},{x:0,y:0,blur:3,spread:0,shadowToken:"shadowSecondary"},{x:0,y:16,blur:24,spread:0,shadowToken:"shadowTertiary"}]},boxShadowXl:{op:"shadow",candidates:[{inset:!0,x:0,y:0,blur:4,spread:0,literalColor:"oklch(1 0 0 / 0.05)"},{x:0,y:0,blur:6,spread:8,shadowToken:"shadowSecondary"},{x:0,y:24,blur:16,spread:6,shadowToken:"shadowTertiary"}]},buttonSecondaryBackground:{op:"ref",ref:"bgTertiary"},buttonSecondaryForeground:{op:"ref",ref:"textPrimary"},buttonSecondaryHoverBackground:{op:"ref",ref:"bgSecondary"},titlebarActiveForeground:{op:"ref",ref:"textSecondary"},titlebarInactiveForeground:{op:"ref",ref:"textTertiary"},commandCenterForeground:{op:"ref",ref:"textSecondary"},commandCenterBackground:{op:"ref",ref:"bgTertiary"},commandCenterBorder:{op:"ref",ref:"strokeSecondary"},commandCenterActiveForeground:{op:"ref",ref:"textSecondary"},commandCenterActiveBorder:{op:"ref",ref:"strokePrimary"},commandCenterActiveBackground:{op:"ref",ref:"bgSecondary"},commandCenterInactiveForeground:{op:"ref",ref:"textTertiary"},commandCenterInactiveBorder:{op:"ref",ref:"strokeSecondary"},terminalBackground:{op:"ref",ref:"chrome"},terminalForeground:{op:"ref",ref:"textPrimary"},terminalSelectionBackground:{op:"mixTransparent",ref:"base",percent:12},scrollbarThumbBackground:{op:"mixTransparentOverlay",ref:"base",percent:14},scrollbarThumbHoverBackground:{op:"mixTransparentOverlay",ref:"base",percent:22},scrollbarThumbActiveBackground:{op:"mixTransparentOverlay",ref:"base",percent:26},scrollbarShadow:{op:"ref",ref:"shadowPrimary"},progressBarBackground:{op:"ref",ref:"accent"},toolbarHoverBackground:{op:"ref",ref:"bgTertiary"},inputBorder:{op:"ref",ref:"strokeSecondary"},inputPlaceholderForeground:{op:"ref",ref:"textQuaternary"},editorForeground:{op:"ref",ref:"textPrimary"},editorLineHighlightBackground:{op:"mixTransparent",ref:"base",percent:8},editorLineNumberForeground:{op:"ref",ref:"textTertiary"},editorLineNumberActiveForeground:{op:"ref",ref:"textPrimary"},editorCursorForeground:{op:"ref",ref:"textPrimary"},editorSelectionBackground:{op:"mixTransparent",ref:"accent",percent:42},editorInactiveSelectionBackground:{op:"mixTransparent",ref:"accent",percent:30},editorSelectionHighlightBackground:{op:"mixTransparentAlpha",key:"accent",percent:32,alpha:128/255},editorWidgetBackground:{op:"ref",ref:"bgElevated"},editorWidgetBorder:{op:"ref",ref:"strokeSecondary"},editorWidgetForeground:{op:"ref",ref:"textPrimary"},editorGutterBackground:{op:"ref",ref:"editor"},editorWhitespaceForeground:{op:"mixTransparent",ref:"base",percent:22},editorBracketMatchBackground:{op:"mixTransparent",ref:"success",percent:22},editorBracketMatchBorder:{op:"mixTransparent",ref:"base",percent:52},editorIndentGuideBackground:{op:"mixTransparent",ref:"base",percent:22},editorIndentGuideActiveBackground:{op:"mixTransparent",ref:"base",percent:40},editorFindMatchBackground:{op:"mixTransparent",ref:"warn",percent:72},editorFindMatchHighlightBackground:{op:"mixTransparentOverlay",ref:"warn",percent:32},textCodeBlockBackground:{op:"ref",ref:"bgElevated"},textLinkActive:{op:"ref",ref:"accent"}},RC={textPrimary:{op:"ref",ref:"base"},textSecondary:{op:"mixTransparent",ref:"base",percent:84},textTertiary:{op:"mixTransparent",ref:"base",percent:72},textQuaternary:{op:"mixTransparent",ref:"base",percent:60},textGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:88},textGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:76},textGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:64},textGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:88},textGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:76},textGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:64},textGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:88},textGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:76},textGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:64},textGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:88},textGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:76},textGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:64},textRedSecondary:{op:"mixTransparent",ref:"red",percent:88},textYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:88},textGreenSecondary:{op:"mixTransparent",ref:"green",percent:88},textMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:88},textPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:88},textCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:88},textBlueSecondary:{op:"mixTransparent",ref:"blue",percent:88},textOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:88},iconGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:80},iconGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:68},iconGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:56},iconGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:80},iconGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:68},iconGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:56},iconGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:80},iconGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:68},iconGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:56},iconGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:80},iconGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:68},iconGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:56},iconRedSecondary:{op:"mixTransparent",ref:"red",percent:80},iconYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:80},iconGreenSecondary:{op:"mixTransparent",ref:"green",percent:80},iconMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:80},iconPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:80},iconCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:80},iconBlueSecondary:{op:"mixTransparent",ref:"blue",percent:80},iconOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:80},iconAccentSecondary:{op:"mixTransparent",ref:"accent",percent:80},iconPrimary:{op:"ref",ref:"base"},iconSecondary:{op:"mixTransparent",ref:"base",percent:76},iconTertiary:{op:"mixTransparent",ref:"base",percent:64},iconQuaternary:{op:"mixTransparent",ref:"base",percent:52},bgPrimary:{op:"mixTransparent",ref:"base",percent:36},bgSecondary:{op:"mixTransparent",ref:"base",percent:24},bgTertiary:{op:"mixTransparent",ref:"base",percent:14},bgQuaternary:{op:"mixTransparent",ref:"base",percent:8},bgQuinary:{op:"mixTransparent",ref:"base",percent:5},bgInputField:{op:"ref",ref:"bgInput"},bgInputSurface:{op:"ref",ref:"bgInput"},bgYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:24},bgRedSecondary:{op:"mixTransparent",ref:"red",percent:24},bgGreenSecondary:{op:"mixTransparent",ref:"green",percent:24},bgMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:24},bgCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:24},bgBlueSecondary:{op:"mixTransparent",ref:"blue",percent:24},strokePrimary:{op:"mixTransparent",ref:"base",percent:48},strokeSecondary:{op:"mixTransparent",ref:"base",percent:36},strokeTertiary:{op:"mixTransparent",ref:"base",percent:28},strokeTertiaryOpaque:{op:"mixTwo",k1:"base",p1:28,k2:"chrome"},strokeQuaternary:{op:"mixTransparent",ref:"base",percent:20},strokeGitAdded:{op:"mixTransparent",ref:"added",percent:80},strokeGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:56},strokeGitModified:{op:"mixTransparent",ref:"modified",percent:80},strokeGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:56},strokeGitRemoved:{op:"mixTransparent",ref:"removed",percent:80},strokeGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:56},strokeGitUntracked:{op:"mixTransparent",ref:"untracked",percent:80},strokeGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:56},strokeAccent:{op:"mixTransparent",ref:"accent",percent:80},strokeRedPrimary:{op:"mixTransparent",ref:"red",percent:80},strokeRedSecondary:{op:"mixTransparent",ref:"red",percent:56},strokeYellowPrimary:{op:"mixTransparent",ref:"yellow",percent:80},strokeYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:56},strokeGreenPrimary:{op:"mixTransparent",ref:"green",percent:80},strokeGreenSecondary:{op:"mixTransparent",ref:"green",percent:56},strokeMagentaPrimary:{op:"mixTransparent",ref:"magenta",percent:80},strokeMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:56},strokeCyanPrimary:{op:"mixTransparent",ref:"cyan",percent:80},strokeCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:56},strokeBluePrimary:{op:"mixTransparent",ref:"blue",percent:80},strokeBlueSecondary:{op:"mixTransparent",ref:"blue",percent:56},strokeFocused:{op:"ref",ref:"focus",fadePercent:100},strokeHighContrast:{op:"mixTransparent",ref:"base",percent:36}},kre={light:{shadowPrimary:{op:"mixBlack",blackPercent:6},boxShadowPopup:{op:"shadow",candidates:[{x:0,y:6,blur:18,spread:0,literalColor:"lch(0% 0 0 / 0.02)"},{x:0,y:3,blur:9,spread:0,literalColor:"lch(0% 0 0 / 0.04)"},{x:0,y:1,blur:1,spread:0,literalColor:"lch(0% 0 0 / 0.04)"}]}},dark:{},lightHighContrast:{...RC},darkHighContrast:{...RC}};function bs(e){return`var(--cursor-${Uc(e)})`}function Sre(e){const t=e.inset?"inset ":"",n=`${e.x}px ${e.y}px ${e.blur}px ${e.spread}px`;return"literalColor"in e?`${t}${n} ${e.literalColor}`:"shadowToken"in e?`${t}${n} ${bs(e.shadowToken)}`:`${t}${n} color-mix(in srgb, ${bs("shadowPrimary")} ${e.primaryMixPercent}%, transparent)`}function wre(e){return e.map(t=>Sre(t)).join(", ")}function Ere(e){switch(e.op){case"mixTransparent":case"mixTransparentOverlay":return`color-mix(in srgb, ${bs(e.ref)} ${e.percent}%, transparent)`;case"mixTwo":return`color-mix(in srgb, ${bs(e.k1)} ${e.p1}%, ${bs(e.k2)})`;case"mixBlackChrome":return`color-mix(in srgb, oklch(0 0 0) ${e.blackPercent}%, ${bs("chrome")})`;case"mixBlack":return`color-mix(in srgb, oklch(0 0 0) ${e.blackPercent}%, transparent)`;case"mixWhite":return`color-mix(in srgb, oklch(1 0 0) ${e.whitePercent}%, transparent)`;case"ref":return e.fadePercent!==void 0?`color-mix(in srgb, ${bs(e.ref)} ${e.fadePercent}%, transparent)`:bs(e.ref);case"shadow":return wre(e.candidates);case"mixTransparentAlpha":return`color-mix(in srgb, ${bs(e.key)} ${e.percent}%, transparent)`;default:return e}}function Tre(e){const t=kre[e];return Object.entries(xre).map(([n,r])=>({name:Uc(n),expr:t[n]??r}))}function Rre(e){const t=Tre(e),n=[];for(const{name:r,expr:s}of t)n.push(` --cursor-${r}: ${Ere(s)};`);return n}function Cre(e){const t=yre(e),n=mre(t," "),r=vre(e),s=Rre(r).join(`
|
|
59
|
+
`);return`:root {
|
|
60
|
+
${n.join(`
|
|
61
|
+
`)}
|
|
62
|
+
}
|
|
63
|
+
:root {
|
|
64
|
+
${s}
|
|
65
|
+
}`}const wv={fontFamily:$b.fontFamily,scrollbar:$b.scrollbar,syntax:$b.syntax},_re=[{key:"fontFamily",cssMid:"font-family"},{key:"scrollbar",cssMid:"scrollbar"},{key:"syntax",cssMid:"syntax"}];function Nre(e,t){const n=Uc(t.replace(/\./g,"-"));return`--cursor-${e}-${n}`}function hs(e,t,n,r=""){for(const[s,a]of Object.entries(t)){const l=typeof a=="number"?`${a}${r}`:a;n.push(` ${Nre(e,s)}: ${l};`)}}function Are(e={}){const t=e.selector??":root",n=e.theme??wv,r=[`${t} {`];for(const{key:s,cssMid:a}of _re)for(const[l,c]of Object.entries(n[s]))r.push(` --cursor-${a}-${Uc(l)}: ${c};`);return hs("duration",$y,r,"ms"),hs("easing",JA,r),hs("spacing",t9,r,"px"),hs("radius",n9,r,"px"),hs("height",r9,r,"px"),hs("font-size",i9,r,"px"),hs("line-height",s9,r,"px"),hs("letter-spacing",o9,r,"px"),hs("elevation",e9,r),r.push("}"),r.join(`
|
|
66
|
+
`)}function Ore(e){const t=Cre(e.core),n=Are(e.nonColor);return`${t}
|
|
67
|
+
${n}`}function Mre(e){if(!e)return"default";const t=e.toLowerCase().replace(/_/g,"-");return t==="ja"||t.startsWith("ja-")?"ja":t==="ko"||t.startsWith("ko-")?"ko":t==="zh-tw"||t==="zh-hk"||t==="zh-mo"||t.includes("hant")?"zh-Hant":t==="zh"||t.startsWith("zh-")?"zh-Hans":"default"}function Ire(e,t){switch(e){case"mac":switch(t){case"zh-Hans":return'-apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif';case"zh-Hant":return'-apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif';case"ja":return'-apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif';case"ko":return'-apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Nanum Gothic", "AppleGothic", sans-serif';default:return"-apple-system, BlinkMacSystemFont, sans-serif"}case"windows":switch(t){case"zh-Hans":return'"Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif';case"zh-Hant":return'"Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif';case"ja":return'"Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif';case"ko":return'"Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif';default:return'"Segoe WPC", "Segoe UI", sans-serif'}case"linux":switch(t){case"zh-Hans":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif';case"zh-Hant":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif';case"ja":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif';case"ko":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif';default:return'system-ui, "Ubuntu", "Droid Sans", sans-serif'}default:return e}}function Dre(e,t){const n=`${e} ${t}`.toLowerCase();return n.includes("mac")?"mac":n.includes("win")?"windows":"linux"}function Lre(e){return Ire(e.platform,Mre(e.locale))}function jre(e){switch(e){case"mac":return'"SF Mono", Monaco, Menlo, Courier, monospace';case"windows":return'Consolas, "Courier New", monospace';case"linux":return'"Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace';default:return e}}const CC="agent-serve-cursor-theme",ZD="agent-serve.playground.theme";function QD(){try{return localStorage.getItem(ZD)}catch{return null}}function zre(){return typeof window>"u"||typeof window.matchMedia!="function"?!0:window.matchMedia("(prefers-color-scheme: dark)").matches}function Pre(e=typeof window<"u"?window.location.search:"",t={}){const n=new URLSearchParams(e).get("theme");if(n==="light"||n==="dark")return n;const r=t.stored!==void 0?t.stored:QD();return r==="light"||r==="dark"?r:(t.prefersDark!==void 0?t.prefersDark:zre())?"dark":"light"}function Ev(e){const t=document.documentElement;t.dataset.theme=e==="light"?"cursor-light":"cursor-dark",t.style.colorScheme=e;const n=Dre(navigator.userAgent,navigator.platform),r=Ore({core:e==="light"?bre:gre,nonColor:{theme:{...wv,fontFamily:{...wv.fontFamily,sans:Lre({platform:n,locale:navigator.language}),mono:jre(n)}}}});let s=document.getElementById(CC);s==null&&(s=document.createElement("style"),s.id=CC,document.head.appendChild(s)),s.textContent=r}function $re(){return document.documentElement.dataset.theme==="cursor-light"?"light":"dark"}function Bre(e){try{localStorage.setItem(ZD,e)}catch{}try{const t=new URL(window.location.href);t.searchParams.set("theme",e),history.replaceState(null,"",t.toString())}catch{}Ev(e)}function Fre(e=window.location.search){if(Ev(Pre(e)),typeof window.matchMedia!="function")return()=>{};const t=window.matchMedia("(prefers-color-scheme: dark)"),n=()=>{const r=new URLSearchParams(window.location.search).get("theme");if(r==="light"||r==="dark")return;const s=QD();s==="light"||s==="dark"||Ev(t.matches?"dark":"light")};return t.addEventListener("change",n),()=>t.removeEventListener("change",n)}function Ure(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>t.disconnect()}function qre(){return v.useSyncExternalStore(Ure,$re,()=>"dark")}function _C({title:e="Playground",onNewChat:t}){const n=qre(),r=Ke(s=>s.chatPanelOpen);return g.jsxs("header",{className:"pg-overview-header",children:[g.jsxs("div",{className:"pg-overview-header__start",children:[g.jsx("div",{className:"pg-overview-header__title",children:e}),g.jsx(dr,{icon:n==="dark"?"sun":"moon",size:"lg","aria-label":n==="dark"?"Switch to light theme":"Switch to dark theme",onClick:()=>Bre(n==="dark"?"light":"dark")})]}),g.jsxs("div",{className:"pg-overview-header__actions",children:[t?g.jsx(gn,{variant:"primary",tone:"monochrome",size:"lg",title:"New chat",onClick:t,children:"New Chat"}):null,g.jsx("span",{className:"pg-overview-header__panel-toggle",children:g.jsx(j8,{icon:"layout-sidebar-right",size:"lg","aria-label":r?"Close chat panel":"Open chat panel",pressed:r,onPressedChange:s=>it.setChatPanelOpen(s)})})]})]})}function Hre(){const e=Ke(t=>t.toast);return e?g.jsx("div",{className:"pg-toast",role:"status","aria-live":"polite",children:e}):null}const Gre=/\b([\w.-]+)\/([\w.-]+)#(\d+)\b/,Vre=/https?:\/\/(?:www\.)?github\.com\/([\w.-]+)\/([\w.-]+)\/pull\/(\d+)/i;function Wre(e){const t=Yre(e.externalUrl),n=NC(e.prUrl)??NC(e.externalUrl)??Kre(e.title);return{slack:t,github:n!==void 0&&n!==t?n:void 0}}function Kre(e){const n=e.match(Vre)??e.match(Gre);if(n!==null)return`https://github.com/${n[1]}/${n[2]}/pull/${n[3]}`}function Yre(e){if(!(e===null||e===""||!Zre(e)||NM(e)))return Xre(e)?e:void 0}function NC(e){if(!(e==null||e===""))return NM(e)?e:void 0}function Xre(e){try{const t=new URL(e).hostname.toLowerCase();return t==="slack.com"||t.endsWith(".slack.com")}catch{return!1}}function Zre(e){return e.startsWith("https://")||e.startsWith("http://")}const Qre=[{value:"overview",label:"Overview"},{value:"chat",label:"Chat"},{value:"trace",label:"Trace"},{value:"raw",label:"Raw"},{value:"evals",label:"Evals"},{value:"artifacts",label:"Artifacts"}],JD="(max-width: 640px)";function Jre(e){const t=window.matchMedia(JD);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function eie(){return v.useSyncExternalStore(Jre,()=>window.matchMedia(JD).matches)}function tie(){const e=Ke(_=>_.barTitle),t=Ke(_=>_.barId),n=Ke(_=>_.externalUrl),r=Ke(_=>_.current),s=Ke(_=>_.view),a=Ke(_=>_.authToken),l=Ke(_=>_.aliasHosted),c=Ke(_=>_.embedded),d=Ke(_=>_.evalNavReturn),f=Ke(_=>_.evalRun),h=Ke(_=>_.info),m=eie(),b=OD(Qre,h,s),y=r?.sessionId??null,k=d&&s!=="evals"&&f!==null,S=Wre({title:e,externalUrl:n,prUrl:r?.prUrl}),R=S.slack,T=S.github,E=async()=>{if(y)try{const _=await it.api.eventsText(y);if(!_.ok){it.toast(`Download failed (${_.status})`);return}const D=await _.blob(),N=URL.createObjectURL(D),A=document.createElement("a");A.href=N,A.download=`${y}.events.ndjson`,A.target="_self",document.body.appendChild(A),A.click(),A.remove(),URL.revokeObjectURL(N)}catch(_){it.toast(`Download failed: ${_ instanceof Error?_.message:String(_)}`)}},C=m?g.jsx(A8,{size:"md","aria-label":"Visualization mode",value:s,onValueChange:_=>it.setView(_??"overview"),options:b}):g.jsx(cc,{size:"sm",variant:"compact",value:s,onValueChange:_=>it.setView(_),"aria-label":"Visualization mode",children:b.map(_=>g.jsx(cc.Item,{value:_.value,children:_.label},_.value))});return g.jsxs("div",{className:"pg-topbar",children:[g.jsx(dr,{icon:"arrow-left",size:"sm","aria-label":"Back to overview",onClick:()=>it.backToOverview()}),k?g.jsx(gn,{variant:"secondary",size:"sm",onClick:()=>it.backToEvals(),title:"Return to eval results",children:"← Back to Evals"}):null,g.jsx("span",{className:"session-title",children:e}),t?g.jsx("span",{className:"session-id",children:t}):null,c?null:g.jsxs(g.Fragment,{children:[R!==void 0?g.jsx(oa,{className:"tlink",href:R,title:"Open the Slack thread",children:"Open in Slack"}):null,T!==void 0?g.jsx(oa,{className:"tlink",href:T,title:"Open the GitHub pull request",children:"Open in GitHub"}):null,y?g.jsx(gn,{variant:"ghost",size:"sm",onClick:()=>{E()},title:"Download this session's event log",children:"Download"}):null]}),g.jsx("span",{className:"grow"}),C,c&&(y!==null||R!==void 0||T!==void 0)?g.jsxs(Xr,{children:[g.jsx(Xr.Trigger,{children:g.jsx(dr,{icon:"dots-3-horizontal",size:"sm","aria-label":"More actions"})}),g.jsxs(Xr.Content,{"aria-label":"Session actions",size:"sm",children:[R!==void 0?g.jsx(Xr.Item,{onSelect:()=>window.open(R,"_blank","noopener,noreferrer"),children:"Open in Slack"}):null,T!==void 0?g.jsx(Xr.Item,{onSelect:()=>window.open(T,"_blank","noopener,noreferrer"),children:"Open in GitHub"}):null,y!==null?g.jsx(Xr.Item,{onSelect:()=>{E()},children:"Download event log"}):null]})]}):null,l?null:g.jsx("div",{className:"pg-token",children:g.jsx(Yc,{type:"password",size:"md","aria-label":"Bearer token",placeholder:"Bearer token (optional)",value:a,onChange:_=>it.setAuthToken(_.target.value),title:"Sent as Authorization: Bearer ... on API calls"})})]})}const eL="(min-width: 1201px)";function nie(e){const t=window.matchMedia(eL);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function rie(){return window.matchMedia(eL).matches}function iie(){return!0}function sie(){return v.useSyncExternalStore(nie,rie,iie)}function oie(){const e=Ke(d=>d.view),t=Ke(d=>d.drawerOpen),n=Ke(d=>d.aliasHosted),r=Ke(d=>d.aliasToken),s=Ke(d=>d.embedded),a=Ke(d=>d.meta.readonly===!0),l=sie();if(v.useEffect(()=>{it.boot()},[]),n&&r.trim()==="")return s?g.jsx(qG,{}):g.jsx(UG,{});const c=l||s;return g.jsxs("div",{className:"pg-app",children:[g.jsx("div",{className:"pg-main",children:c?g.jsxs("div",{className:"pg-overview-layout",children:[g.jsxs("div",{className:"pg-overview-main",children:[g.jsx(_C,{onNewChat:a?void 0:()=>it.newChat()}),g.jsx("div",{className:"pg-overview-scroll",children:g.jsx(EC,{})})]}),g.jsx(ire,{})]}):e==="overview"?g.jsxs("div",{className:"pg-overview-main",children:[g.jsx(_C,{onNewChat:a?void 0:()=>it.newChat()}),g.jsx("div",{className:"pg-overview-scroll",children:g.jsx(EC,{})})]}):s?g.jsxs(g.Fragment,{children:[g.jsx(tie,{}),g.jsxs("div",{className:"pg-columns",children:[e==="chat"?g.jsxs("div",{className:"pg-transcript-wrap",children:[g.jsx(CD,{}),g.jsx(UM,{})]}):null,e==="trace"?g.jsx(JM,{}):null,e==="raw"?g.jsx(XM,{}):null,e==="evals"?g.jsx(VM,{}):null,e==="artifacts"?g.jsx(FM,{}):null]})]}):g.jsx(Zte,{})}),t?g.jsx("button",{type:"button","aria-label":"Close agent surface",className:"pg-drawer-backdrop",onClick:()=>it.setDrawerOpen(!1)}):null,g.jsx(rne,{}),g.jsx(Hre,{})]})}Fre();VG();const tL=document.getElementById("root");if(tL===null)throw new Error("Playground bootstrap failed: #root element is missing.");hz.createRoot(tL).render(g.jsx(v.StrictMode,{children:g.jsx(Ts,{menuSize:"md",children:g.jsx(oie,{})})}));
|