@cursor/bdk 0.2.17 → 0.2.20
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 +16 -6
- package/dist/bin/agent-serve.js +7 -0
- package/dist/channels/runs/index.d.ts +4 -0
- package/dist/channels/runs/index.d.ts.map +1 -0
- package/dist/channels/runs/index.js +2 -0
- package/dist/channels/runs/runs-channel.d.ts +5 -0
- package/dist/channels/runs/runs-channel.d.ts.map +1 -0
- package/dist/channels/runs/runs-channel.js +34 -0
- package/dist/channels/runs/types.d.ts +34 -0
- package/dist/channels/runs/types.d.ts.map +1 -0
- package/dist/channels/runs/types.js +1 -0
- package/dist/channels/slack/slack-channel.d.ts +3 -2
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +9 -2
- package/dist/docs/404.html +2 -2
- package/dist/docs/assets/{app.CUNuFTSm.js → app.BzgJFr_T.js} +4 -4
- package/dist/docs/assets/chunks/@localSearchIndexroot.gGwBYU3d.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.Dez74k0W.js → VPLocalSearchBox.Bn5QyUDM.js} +1 -1
- package/dist/docs/assets/chunks/{arc.CJ3FhK7H.js → arc.D734Gm5d.js} +1 -1
- package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.CfUdbHsa.js → architectureDiagram-Q4EWVU46.NX1jj-YX.js} +1 -1
- package/dist/docs/assets/chunks/{baseUniq.D93LawU9.js → baseUniq.nd8dxdeO.js} +1 -1
- package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.Zvsd6UHP.js → blockDiagram-DXYQGD6D.DG8faTim.js} +1 -1
- package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.CGX5xZ9d.js → c4Diagram-AHTNJAMY.zD31AJ3b.js} +1 -1
- package/dist/docs/assets/chunks/channel.DQLJQMi3.js +1 -0
- package/dist/docs/assets/chunks/{chunk-4BX2VUAB.CCIf0QCo.js → chunk-4BX2VUAB.BHQj6Rko.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-4TB4RGXK.D_N1RPyi.js → chunk-4TB4RGXK.Cs38Yh16.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-55IACEB6.B1oecjzx.js → chunk-55IACEB6.CFUR21JO.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-EDXVE4YY.BzUNVPGX.js → chunk-EDXVE4YY.C80-Sneg.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-FMBD7UC4.DheI8WSO.js → chunk-FMBD7UC4.CdT1MGza.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-OYMX7WX6.Bg4iL0sM.js → chunk-OYMX7WX6.BctEzab0.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-QZHKN3VN.CSQjDhAD.js → chunk-QZHKN3VN.DTneeX3k.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-YZCP3GAM.BDdxnPU4.js → chunk-YZCP3GAM.Cz47F_-o.js} +1 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.j55aerUT.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.j55aerUT.js +1 -0
- package/dist/docs/assets/chunks/clone.XimRS84I.js +1 -0
- package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.AT0weO8r.js → cose-bilkent-S5V4N54A.BPYgB-_O.js} +1 -1
- package/dist/docs/assets/chunks/{dagre-KV5264BT.CJ30TxV0.js → dagre-KV5264BT.Cu6hECod.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-5BDNPKRD.KtE--1fW.js → diagram-5BDNPKRD.BMgp95Tz.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.BFGygSUQ.js → diagram-G4DWMVQ6.towWdhDi.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-MMDJMWI5.BLU-79eb.js → diagram-MMDJMWI5.D9IfOvE9.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-TYMM5635.CdjfJdVG.js → diagram-TYMM5635.NTX57RPu.js} +1 -1
- package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.Dj1Iwypl.js → erDiagram-SMLLAGMA.DIQLqDqu.js} +1 -1
- package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.BXqj_Su2.js → flowDiagram-DWJPFMVM.DhqpItRe.js} +1 -1
- package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.CNfgGSst.js → ganttDiagram-T4ZO3ILL.B998R3Ps.js} +1 -1
- package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.2tgvFDBr.js → gitGraphDiagram-UUTBAWPF.B45nTn8-.js} +1 -1
- package/dist/docs/assets/chunks/{graph.CWHZMxx6.js → graph.DPseWzzM.js} +1 -1
- package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.DhLIK8m1.js → infoDiagram-42DDH7IO._GhhBBai.js} +1 -1
- package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.BIN11n1G.js → ishikawaDiagram-UXIWVN3A.CTUMcaMM.js} +1 -1
- package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.BARmNJ0n.js → journeyDiagram-VCZTEJTY.DkJBUddC.js} +1 -1
- package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.BrTJYFyF.js → kanban-definition-6JOO6SKY.B5Q3uwhy.js} +1 -1
- package/dist/docs/assets/chunks/{layout.CPZIIywK.js → layout.CDY13IKh.js} +1 -1
- package/dist/docs/assets/chunks/{linear.DTpmzI5S.js → linear.BPd1ql9p.js} +1 -1
- package/dist/docs/assets/chunks/{min.BBLQmXwZ.js → min.dlGuqIBP.js} +1 -1
- package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.5qkWJvdl.js → mindmap-definition-QFDTVHPH.Cp7zCtmb.js} +1 -1
- package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.-4wufv_f.js → pieDiagram-DEJITSTG.CRH034nu.js} +1 -1
- package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.C0jrp1-8.js → quadrantDiagram-34T5L4WZ.BspgZ-pX.js} +1 -1
- package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.DUDpANfe.js → requirementDiagram-MS252O5E.CQZqZ0nZ.js} +1 -1
- package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.74Lvg6Gu.js → sankeyDiagram-XADWPNL6.DllwFU3k.js} +1 -1
- package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.BHDIH286.js → sequenceDiagram-FGHM5R23.B5fTXycf.js} +1 -1
- package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.Dr-HIuLb.js → stateDiagram-FHFEXIEX.12GQjmbD.js} +1 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.Ctv5WEMu.js +1 -0
- package/dist/docs/assets/chunks/{theme.H8zSBhlM.js → theme.BgocqONV.js} +2 -2
- package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.GtyCaSiL.js → timeline-definition-GMOUNBTQ.DXKUL5rH.js} +1 -1
- package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.DLId0rxH.js → vennDiagram-DHZGUBPP.BrsjYCjp.js} +1 -1
- package/dist/docs/assets/chunks/wardley-RL74JXVD.DZDndEXQ.js +162 -0
- package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.CI6mGYNG.js → wardleyDiagram-NUSXRM2D.C4oM69gv.js} +1 -1
- package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.CG1n865F.js → xychartDiagram-5P7HB3ND.qzHH9efW.js} +1 -1
- package/dist/docs/assets/{deployment.md.ajc3VM0m.js → deployment.md.D0uprX2p.js} +3 -3
- package/dist/docs/assets/{deployment.md.ajc3VM0m.lean.js → deployment.md.D0uprX2p.lean.js} +1 -1
- package/dist/docs/assets/{guides_agent-to-agent.md.Cps5NiCV.js → guides_agent-to-agent.md.CwL5cwuE.js} +6 -5
- package/dist/docs/assets/{guides_agent-to-agent.md.Cps5NiCV.lean.js → guides_agent-to-agent.md.CwL5cwuE.lean.js} +1 -1
- package/dist/docs/assets/guides_export-grokbot.md.qo5bxi4h.js +55 -0
- package/dist/docs/assets/guides_export-grokbot.md.qo5bxi4h.lean.js +1 -0
- package/dist/docs/assets/{guides_opentelemetry.md.jcPNrQbH.js → guides_opentelemetry.md.BHPm32OR.js} +3 -3
- package/dist/docs/assets/{guides_opentelemetry.md.jcPNrQbH.lean.js → guides_opentelemetry.md.BHPm32OR.lean.js} +1 -1
- package/dist/docs/assets/{index.md.CHAFTf6m.js → index.md.CAnsLl8D.js} +2 -2
- package/dist/docs/assets/{index.md.CHAFTf6m.lean.js → index.md.CAnsLl8D.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.Bt3sAfat.js → reference_cli.md.Bkrsce22.js} +7 -4
- package/dist/docs/assets/{reference_cli.md.Bt3sAfat.lean.js → reference_cli.md.Bkrsce22.lean.js} +1 -1
- package/dist/docs/assets/{reference_connections.md.CxbLpaaP.js → reference_connections.md.BJE2Zllp.js} +4 -4
- package/dist/docs/assets/{reference_connections.md.CxbLpaaP.lean.js → reference_connections.md.BJE2Zllp.lean.js} +1 -1
- package/dist/docs/assets/{reference_hooks.md.DbJC8mcZ.js → reference_hooks.md.CP3FENFJ.js} +1 -1
- package/dist/docs/assets/reference_memory.md.BwyJXYZe.js +4 -0
- package/dist/docs/assets/reference_memory.md.BwyJXYZe.lean.js +1 -0
- package/dist/docs/assets/{reference_skills.md.Ckddg6KX.js → reference_skills.md.C2GWh7g8.js} +3 -3
- package/dist/docs/building-with-agents.html +35 -35
- package/dist/docs/deployment.html +38 -38
- package/dist/docs/deployment.md +17 -0
- package/dist/docs/evals.html +35 -35
- package/dist/docs/guides/agent-to-agent.html +41 -40
- package/dist/docs/guides/agent-to-agent.md +34 -21
- package/dist/docs/guides/bitbucket.html +35 -35
- package/dist/docs/guides/cloud-agents.html +35 -35
- package/dist/docs/guides/convert-automation.html +35 -35
- package/dist/docs/guides/export-grokbot.html +114 -0
- package/dist/docs/guides/export-grokbot.md +239 -0
- package/dist/docs/guides/github.html +35 -35
- package/dist/docs/guides/gitlab.html +35 -35
- package/dist/docs/guides/grokbot-agents.html +35 -35
- package/dist/docs/guides/hooks.html +35 -35
- package/dist/docs/guides/improve.html +35 -35
- package/dist/docs/guides/jev.html +35 -35
- package/dist/docs/guides/mcp-oauth.html +35 -35
- package/dist/docs/guides/migrate.html +36 -36
- package/dist/docs/guides/opentelemetry.html +37 -37
- package/dist/docs/guides/opentelemetry.md +19 -0
- package/dist/docs/guides/slack.html +35 -35
- package/dist/docs/guides/webhooks.html +35 -35
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +35 -35
- package/dist/docs/index.html +37 -37
- package/dist/docs/index.md +3 -0
- package/dist/docs/llms-full.txt +493 -29
- package/dist/docs/llms.txt +2 -0
- package/dist/docs/quickstart.html +35 -35
- package/dist/docs/reference/agent-config.html +35 -35
- package/dist/docs/reference/artifacts.html +35 -35
- package/dist/docs/reference/channels.html +35 -35
- package/dist/docs/reference/cli.html +41 -38
- package/dist/docs/reference/cli.md +39 -1
- package/dist/docs/reference/connections.html +38 -38
- package/dist/docs/reference/connections.md +16 -6
- package/dist/docs/reference/evals.html +36 -36
- package/dist/docs/reference/extensions.html +35 -35
- package/dist/docs/reference/hooks.html +38 -38
- package/dist/docs/reference/hooks.md +2 -1
- package/dist/docs/reference/http-api.html +35 -35
- package/dist/docs/reference/instructions.html +35 -35
- package/dist/docs/reference/memory.html +63 -0
- package/dist/docs/reference/memory.md +114 -0
- package/dist/docs/reference/playground.html +35 -35
- package/dist/docs/reference/project-layout.html +35 -35
- package/dist/docs/reference/prompt.html +35 -35
- package/dist/docs/reference/schedules.html +35 -35
- package/dist/docs/reference/sessions.html +35 -35
- package/dist/docs/reference/skills.html +38 -38
- package/dist/docs/reference/subagents.html +35 -35
- package/dist/docs/reference/tools.html +35 -35
- package/dist/docs/templates/agentic-owners.html +35 -35
- package/dist/docs/templates/grokbot-agents.html +35 -35
- package/dist/docs/templates/security-reviewer.html +35 -35
- package/dist/docs/templates/thermo-quality-review.html +35 -35
- package/dist/docs/templates/thermo-review.html +35 -35
- package/dist/docs/templates/triage.html +35 -35
- package/dist/docs/troubleshooting.html +35 -35
- package/dist/evals.d.ts +1 -1
- package/dist/evals.js +1 -1
- package/dist/extensions/cursor-cloud-agents/extension.d.ts +2 -2
- package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/extension.js +1 -1
- package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts +8 -1
- package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/lib/launch-agent.js +10 -1
- package/dist/internal/cli-ax.d.ts +7 -7
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +36 -15
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +0 -14
- package/dist/internal/cloud-turn-usage.d.ts +34 -0
- package/dist/internal/cloud-turn-usage.d.ts.map +1 -0
- package/dist/internal/cloud-turn-usage.js +94 -0
- package/dist/internal/continuation-channel.d.ts.map +1 -1
- package/dist/internal/continuation-channel.js +6 -0
- package/dist/internal/continuation-identity.d.ts +6 -3
- package/dist/internal/continuation-identity.d.ts.map +1 -1
- package/dist/internal/continuation-identity.js +43 -0
- package/dist/internal/estimate-cost.d.ts +55 -0
- package/dist/internal/estimate-cost.d.ts.map +1 -0
- package/dist/internal/{turn-cost.js → estimate-cost.js} +18 -26
- package/dist/internal/event-log.d.ts +2 -2
- package/dist/internal/event-log.js +2 -2
- package/dist/internal/http-channel.d.ts.map +1 -1
- package/dist/internal/http-channel.js +21 -2
- package/dist/internal/http-control-plane-session.d.ts +5 -2
- package/dist/internal/http-control-plane-session.d.ts.map +1 -1
- package/dist/internal/http-control-plane-session.js +38 -2
- package/dist/internal/init-scaffold.d.ts.map +1 -1
- package/dist/internal/init-scaffold.js +3 -4
- package/dist/internal/model-config.d.ts +7 -0
- package/dist/internal/model-config.d.ts.map +1 -0
- package/dist/internal/model-config.js +67 -0
- package/dist/internal/otel/collector.d.ts +3 -3
- package/dist/internal/otel/collector.d.ts.map +1 -1
- package/dist/internal/otel/collector.js +8 -21
- package/dist/internal/otel/computer-use-attrs.d.ts +13 -0
- package/dist/internal/otel/computer-use-attrs.d.ts.map +1 -0
- package/dist/internal/otel/computer-use-attrs.js +29 -0
- package/dist/internal/peer-connections.d.ts +17 -8
- package/dist/internal/peer-connections.d.ts.map +1 -1
- package/dist/internal/peer-connections.js +41 -10
- package/dist/internal/request-error-status.d.ts.map +1 -1
- package/dist/internal/request-error-status.js +4 -1
- package/dist/internal/resolved-connections.d.ts +4 -1
- package/dist/internal/resolved-connections.d.ts.map +1 -1
- package/dist/internal/resolved-connections.js +9 -4
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +16 -14
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +2 -1
- package/dist/internal/session-cost.d.ts +21 -22
- package/dist/internal/session-cost.d.ts.map +1 -1
- package/dist/internal/session-cost.js +38 -46
- package/dist/internal/session-engine.d.ts +25 -41
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +130 -122
- package/dist/internal/sessions-client.d.ts +13 -1
- package/dist/internal/sessions-client.d.ts.map +1 -1
- package/dist/internal/sessions-client.js +24 -0
- package/dist/internal/storage-coordinator.d.ts +9 -9
- package/dist/internal/storage-coordinator.d.ts.map +1 -1
- package/dist/internal/storage-coordinator.js +116 -36
- package/dist/internal/testing/factory-resource-fixtures.d.ts +16 -0
- package/dist/internal/testing/factory-resource-fixtures.d.ts.map +1 -1
- package/dist/internal/testing/factory-resource-fixtures.js +14 -0
- package/dist/internal/trajectory.d.ts +5 -6
- package/dist/internal/trajectory.d.ts.map +1 -1
- package/dist/internal/trajectory.js +1 -13
- package/dist/memory.d.ts +5 -2
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +1 -1
- package/dist/playground/assets/cursor-icons-16-gwXtdAvu.woff2 +0 -0
- package/dist/playground/assets/index-C77_FdOx.css +1 -0
- package/dist/playground/assets/index-CvzI2lhj.js +71 -0
- package/dist/playground/index.html +2 -2
- package/dist/types.d.ts +57 -22
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +3 -0
- package/docs/deployment.md +17 -0
- package/docs/guides/agent-to-agent.md +34 -21
- package/docs/guides/export-grokbot.md +244 -0
- package/docs/guides/opentelemetry.md +19 -0
- package/docs/reference/cli.md +39 -1
- package/docs/reference/connections.md +16 -6
- package/docs/reference/hooks.md +2 -1
- package/docs/reference/memory.md +119 -0
- package/package.json +13 -5
- package/templates/agentic-owners/bot/lib/owners/matching.ts +57 -2
- package/dist/docs/assets/chunks/@localSearchIndexroot.3c56VHUt.js +0 -1
- package/dist/docs/assets/chunks/channel.S8-FFjmE.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.BB98tFjZ.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.BB98tFjZ.js +0 -1
- package/dist/docs/assets/chunks/clone.B98w8OEv.js +0 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.DW_lwpZY.js +0 -1
- package/dist/docs/assets/chunks/wardley-RL74JXVD.CSlECTHi.js +0 -162
- package/dist/internal/cloud-turn-cost.d.ts +0 -42
- package/dist/internal/cloud-turn-cost.d.ts.map +0 -1
- package/dist/internal/cloud-turn-cost.js +0 -120
- package/dist/internal/turn-cost.d.ts +0 -41
- package/dist/internal/turn-cost.d.ts.map +0 -1
- package/dist/playground/assets/cursor-icons-16-4RnoYH3n.woff2 +0 -0
- package/dist/playground/assets/index-7fVUOA5l.css +0 -1
- package/dist/playground/assets/index-U3TRnwAP.js +0 -71
- /package/dist/docs/assets/{reference_hooks.md.DbJC8mcZ.lean.js → reference_hooks.md.CP3FENFJ.lean.js} +0 -0
- /package/dist/docs/assets/{reference_skills.md.Ckddg6KX.lean.js → reference_skills.md.C2GWh7g8.lean.js} +0 -0
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
function zj(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 Vc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Pj(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 cb={exports:{}},Bu={};var mw;function $j(){if(mw)return Bu;mw=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 Bu.Fragment=t,Bu.jsx=n,Bu.jsxs=n,Bu}var gw;function Bj(){return gw||(gw=1,cb.exports=$j()),cb.exports}var g=Bj(),fb={exports:{}},_t={};var bw;function Fj(){if(bw)return _t;bw=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"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),b=Symbol.iterator;function y(j){return j===null||typeof j!="object"?null:(j=b&&j[b]||j["@@iterator"],typeof j=="function"?j:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,R={};function T(j,V,L){this.props=j,this.context=V,this.refs=R,this.updater=L||k}T.prototype.isReactComponent={},T.prototype.setState=function(j,V){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,V,"setState")},T.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function E(){}E.prototype=T.prototype;function C(j,V,L){this.props=j,this.context=V,this.refs=R,this.updater=L||k}var _=C.prototype=new E;_.constructor=C,S(_,T.prototype),_.isPureReactComponent=!0;var D=Array.isArray;function A(){}var M={H:null,A:null,T:null,S:null},B=Object.prototype.hasOwnProperty;function P(j,V,L){var X=L.ref;return{$$typeof:e,type:j,key:V,ref:X!==void 0?X:null,props:L}}function N(j,V){return P(j.type,V,j.props)}function W(j){return typeof j=="object"&&j!==null&&j.$$typeof===e}function $(j){var V={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(L){return V[L]})}var F=/\/+/g;function z(j,V){return typeof j=="object"&&j!==null&&j.key!=null?$(""+j.key):V.toString(36)}function U(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(A,A):(j.status="pending",j.then(function(V){j.status==="pending"&&(j.status="fulfilled",j.value=V)},function(V){j.status==="pending"&&(j.status="rejected",j.reason=V)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function H(j,V,L,X,se){var ne=typeof j;(ne==="undefined"||ne==="boolean")&&(j=null);var oe=!1;if(j===null)oe=!0;else switch(ne){case"bigint":case"string":case"number":oe=!0;break;case"object":switch(j.$$typeof){case e:case t:oe=!0;break;case h:return oe=j._init,H(oe(j._payload),V,L,X,se)}}if(oe)return se=se(j),oe=X===""?"."+z(j,0):X,D(se)?(L="",oe!=null&&(L=oe.replace(F,"$&/")+"/"),H(se,V,L,"",function(Ee){return Ee})):se!=null&&(W(se)&&(se=N(se,L+(se.key==null||j&&j.key===se.key?"":(""+se.key).replace(F,"$&/")+"/")+oe)),V.push(se)),1;oe=0;var le=X===""?".":X+":";if(D(j))for(var ce=0;ce<j.length;ce++)X=j[ce],ne=le+z(X,ce),oe+=H(X,V,L,ne,se);else if(ce=y(j),typeof ce=="function")for(j=ce.call(j),ce=0;!(X=j.next()).done;)X=X.value,ne=le+z(X,ce++),oe+=H(X,V,L,ne,se);else if(ne==="object"){if(typeof j.then=="function")return H(U(j),V,L,X,se);throw V=String(j),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return oe}function K(j,V,L){if(j==null)return j;var X=[],se=0;return H(j,X,"","",function(ne){return V.call(L,ne,se++)}),X}function q(j){if(j._status===-1){var V=j._result;V=V(),V.then(function(L){(j._status===0||j._status===-1)&&(j._status=1,j._result=L)},function(L){(j._status===0||j._status===-1)&&(j._status=2,j._result=L)}),j._status===-1&&(j._status=0,j._result=V)}if(j._status===1)return j._result.default;throw j._result}var Y=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},O={map:K,forEach:function(j,V,L){K(j,function(){V.apply(this,arguments)},L)},count:function(j){var V=0;return K(j,function(){V++}),V},toArray:function(j){return K(j,function(V){return V})||[]},only:function(j){if(!W(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return _t.Activity=m,_t.Children=O,_t.Component=T,_t.Fragment=n,_t.Profiler=s,_t.PureComponent=C,_t.StrictMode=r,_t.Suspense=f,_t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,_t.__COMPILER_RUNTIME={__proto__:null,c:function(j){return M.H.useMemoCache(j)}},_t.cache=function(j){return function(){return j.apply(null,arguments)}},_t.cacheSignal=function(){return null},_t.cloneElement=function(j,V,L){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var X=S({},j.props),se=j.key;if(V!=null)for(ne in V.key!==void 0&&(se=""+V.key),V)!B.call(V,ne)||ne==="key"||ne==="__self"||ne==="__source"||ne==="ref"&&V.ref===void 0||(X[ne]=V[ne]);var ne=arguments.length-2;if(ne===1)X.children=L;else if(1<ne){for(var oe=Array(ne),le=0;le<ne;le++)oe[le]=arguments[le+2];X.children=oe}return P(j.type,se,X)},_t.createContext=function(j){return j={$$typeof:l,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:a,_context:j},j},_t.createElement=function(j,V,L){var X,se={},ne=null;if(V!=null)for(X in V.key!==void 0&&(ne=""+V.key),V)B.call(V,X)&&X!=="key"&&X!=="__self"&&X!=="__source"&&(se[X]=V[X]);var oe=arguments.length-2;if(oe===1)se.children=L;else if(1<oe){for(var le=Array(oe),ce=0;ce<oe;ce++)le[ce]=arguments[ce+2];se.children=le}if(j&&j.defaultProps)for(X in oe=j.defaultProps,oe)se[X]===void 0&&(se[X]=oe[X]);return P(j,ne,se)},_t.createRef=function(){return{current:null}},_t.forwardRef=function(j){return{$$typeof:c,render:j}},_t.isValidElement=W,_t.lazy=function(j){return{$$typeof:h,_payload:{_status:-1,_result:j},_init:q}},_t.memo=function(j,V){return{$$typeof:d,type:j,compare:V===void 0?null:V}},_t.startTransition=function(j){var V=M.T,L={};M.T=L;try{var X=j(),se=M.S;se!==null&&se(L,X),typeof X=="object"&&X!==null&&typeof X.then=="function"&&X.then(A,Y)}catch(ne){Y(ne)}finally{V!==null&&L.types!==null&&(V.types=L.types),M.T=V}},_t.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},_t.use=function(j){return M.H.use(j)},_t.useActionState=function(j,V,L){return M.H.useActionState(j,V,L)},_t.useCallback=function(j,V){return M.H.useCallback(j,V)},_t.useContext=function(j){return M.H.useContext(j)},_t.useDebugValue=function(){},_t.useDeferredValue=function(j,V){return M.H.useDeferredValue(j,V)},_t.useEffect=function(j,V){return M.H.useEffect(j,V)},_t.useEffectEvent=function(j){return M.H.useEffectEvent(j)},_t.useId=function(){return M.H.useId()},_t.useImperativeHandle=function(j,V,L){return M.H.useImperativeHandle(j,V,L)},_t.useInsertionEffect=function(j,V){return M.H.useInsertionEffect(j,V)},_t.useLayoutEffect=function(j,V){return M.H.useLayoutEffect(j,V)},_t.useMemo=function(j,V){return M.H.useMemo(j,V)},_t.useOptimistic=function(j,V){return M.H.useOptimistic(j,V)},_t.useReducer=function(j,V,L){return M.H.useReducer(j,V,L)},_t.useRef=function(j){return M.H.useRef(j)},_t.useState=function(j){return M.H.useState(j)},_t.useSyncExternalStore=function(j,V,L){return M.H.useSyncExternalStore(j,V,L)},_t.useTransition=function(){return M.H.useTransition()},_t.version="19.2.6",_t}var yw;function Gc(){return yw||(yw=1,fb.exports=Fj()),fb.exports}var v=Gc();const sc=Vc(v),Pv=zj({__proto__:null,default:sc},[v]);var db={exports:{}},Fu={},pb={exports:{}},hb={};var vw;function Uj(){return vw||(vw=1,(function(e){function t(H,K){var q=H.length;H.push(K);e:for(;0<q;){var Y=q-1>>>1,O=H[Y];if(0<s(O,K))H[Y]=K,H[q]=O,q=Y;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var K=H[0],q=H.pop();if(q!==K){H[0]=q;e:for(var Y=0,O=H.length,j=O>>>1;Y<j;){var V=2*(Y+1)-1,L=H[V],X=V+1,se=H[X];if(0>s(L,q))X<O&&0>s(se,L)?(H[Y]=se,H[X]=q,Y=X):(H[Y]=L,H[V]=q,Y=V);else if(X<O&&0>s(se,q))H[Y]=se,H[X]=q,Y=X;else break e}}return K}function s(H,K){var q=H.sortIndex-K.sortIndex;return q!==0?q:H.id-K.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 f=[],d=[],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 _(H){for(var K=n(d);K!==null;){if(K.callback===null)r(d);else if(K.startTime<=H)r(d),K.sortIndex=K.expirationTime,t(f,K);else break;K=n(d)}}function D(H){if(S=!1,_(H),!k)if(n(f)!==null)k=!0,A||(A=!0,$());else{var K=n(d);K!==null&&U(D,K.startTime-H)}}var A=!1,M=-1,B=5,P=-1;function N(){return R?!0:!(e.unstable_now()-P<B)}function W(){if(R=!1,A){var H=e.unstable_now();P=H;var K=!0;try{e:{k=!1,S&&(S=!1,E(M),M=-1),y=!0;var q=b;try{t:{for(_(H),m=n(f);m!==null&&!(m.expirationTime>H&&N());){var Y=m.callback;if(typeof Y=="function"){m.callback=null,b=m.priorityLevel;var O=Y(m.expirationTime<=H);if(H=e.unstable_now(),typeof O=="function"){m.callback=O,_(H),K=!0;break t}m===n(f)&&r(f),_(H)}else r(f);m=n(f)}if(m!==null)K=!0;else{var j=n(d);j!==null&&U(D,j.startTime-H),K=!1}}break e}finally{m=null,b=q,y=!1}K=void 0}}finally{K?$():A=!1}}}var $;if(typeof C=="function")$=function(){C(W)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,z=F.port2;F.port1.onmessage=W,$=function(){z.postMessage(null)}}else $=function(){T(W,0)};function U(H,K){M=T(function(){H(e.unstable_now())},K)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(H){switch(b){case 1:case 2:case 3:var K=3;break;default:K=b}var q=b;b=K;try{return H()}finally{b=q}},e.unstable_requestPaint=function(){R=!0},e.unstable_runWithPriority=function(H,K){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var q=b;b=H;try{return K()}finally{b=q}},e.unstable_scheduleCallback=function(H,K,q){var Y=e.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?Y+q:Y):q=Y,H){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=q+O,H={id:h++,callback:K,priorityLevel:H,startTime:q,expirationTime:O,sortIndex:-1},q>Y?(H.sortIndex=q,t(d,H),n(f)===null&&H===n(d)&&(S?(E(M),M=-1):S=!0,U(D,q-Y))):(H.sortIndex=O,t(f,H),k||y||(k=!0,A||(A=!0,$()))),H},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(H){var K=b;return function(){var q=b;b=K;try{return H.apply(this,arguments)}finally{b=q}}}})(hb)),hb}var xw;function qj(){return xw||(xw=1,pb.exports=Uj()),pb.exports}var mb={exports:{}},cr={};var kw;function Hj(){if(kw)return cr;kw=1;var e=Gc();function t(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)d+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+f+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function a(f,d,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:m==null?null:""+m,children:f,containerInfo:d,implementation:h}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return cr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,cr.createPortal=function(f,d){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return a(f,d,null,h)},cr.flushSync=function(f){var d=l.T,h=r.p;try{if(l.T=null,r.p=2,f)return f()}finally{l.T=d,r.p=h,r.d.f()}},cr.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,r.d.C(f,d))},cr.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},cr.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var h=d.as,m=c(h,d.crossOrigin),b=typeof d.integrity=="string"?d.integrity:void 0,y=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;h==="style"?r.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:m,integrity:b,fetchPriority:y}):h==="script"&&r.d.X(f,{crossOrigin:m,integrity:b,fetchPriority:y,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},cr.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var h=c(d.as,d.crossOrigin);r.d.M(f,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&r.d.M(f)},cr.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var h=d.as,m=c(h,d.crossOrigin);r.d.L(f,h,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},cr.preloadModule=function(f,d){if(typeof f=="string")if(d){var h=c(d.as,d.crossOrigin);r.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else r.d.m(f)},cr.requestFormReset=function(f){r.d.r(f)},cr.unstable_batchedUpdates=function(f,d){return f(d)},cr.useFormState=function(f,d,h){return l.H.useFormState(f,d,h)},cr.useFormStatus=function(){return l.H.useHostTransitionStatus()},cr.version="19.2.6",cr}var Sw;function JC(){if(Sw)return mb.exports;Sw=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(),mb.exports=Hj(),mb.exports}var ww;function Vj(){if(ww)return Fu;ww=1;var e=qj(),t=Gc(),n=JC();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 f(i){if(a(i)!==i)throw Error(r(188))}function d(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 f(x),i;if(w===p)return f(x),o;w=w.sibling}throw Error(r(188))}if(u.return!==p.return)u=x,p=w;else{for(var I=!1,G=x.child;G;){if(G===u){I=!0,u=x,p=w;break}if(G===p){I=!0,p=x,u=w;break}G=G.sibling}if(!I){for(G=w.child;G;){if(G===u){I=!0,u=w,p=x;break}if(G===p){I=!0,p=w,u=x;break}G=G.sibling}if(!I)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"),A=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),N=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function $(i){return i===null||typeof i!="object"?null:(i=W&&i[W]||i["@@iterator"],typeof i=="function"?i:null)}var F=Symbol.for("react.client.reference");function z(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===F?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 A:return"SuspenseList";case P: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 M:return o=i.displayName||null,o!==null?o:z(i.type)||"Memo";case B:o=i._payload,i=i._init;try{return z(i(o))}catch{}}return null}var U=Array.isArray,H=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},Y=[],O=-1;function j(i){return{current:i}}function V(i){0>O||(i.current=Y[O],Y[O]=null,O--)}function L(i,o){O++,Y[O]=i.current,i.current=o}var X=j(null),se=j(null),ne=j(null),oe=j(null);function le(i,o){switch(L(ne,o),L(se,i),L(X,null),o.nodeType){case 9:case 11:i=(i=o.documentElement)&&(i=i.namespaceURI)?P1(i):0;break;default:if(i=o.tagName,o=o.namespaceURI)o=P1(o),i=$1(o,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}V(X),L(X,i)}function ce(){V(X),V(se),V(ne)}function Ee(i){i.memoizedState!==null&&L(oe,i);var o=X.current,u=$1(o,i.type);o!==u&&(L(se,i),L(X,u))}function be(i){se.current===i&&(V(X),V(se)),oe.current===i&&(V(oe),ju._currentValue=q)}var ue,ge;function Se(i){if(ue===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);ue=o&&o[1]||"",ge=-1<u.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+ue+i+ge}var Ae=!1;function ke(i,o){if(!i||Ae)return"";Ae=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(o){var Oe=function(){throw Error()};if(Object.defineProperty(Oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Oe,[])}catch(ve){var he=ve}Reflect.construct(i,[],Oe)}else{try{Oe.call()}catch(ve){he=ve}i.call(Oe.prototype)}}else{try{throw Error()}catch(ve){he=ve}(Oe=i())&&typeof Oe.catch=="function"&&Oe.catch(function(){})}}catch(ve){if(ve&&he&&typeof ve.stack=="string")return[ve.stack,he.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(),I=w[0],G=w[1];if(I&&G){var J=I.split(`
|
|
4
|
-
`),pe=G.split(`
|
|
5
|
-
`);for(x=p=0;p<J.length&&!J[p].includes("DetermineComponentFrameRoot");)p++;for(;x<pe.length&&!pe[x].includes("DetermineComponentFrameRoot");)x++;if(p===J.length||x===pe.length)for(p=J.length-1,x=pe.length-1;1<=p&&0<=x&&J[p]!==pe[x];)x--;for(;1<=p&&0<=x;p--,x--)if(J[p]!==pe[x]){if(p!==1||x!==1)do if(p--,x--,0>x||J[p]!==pe[x]){var Te=`
|
|
6
|
-
`+J[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{Ae=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?Se(u):""}function xe(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 ke(i.type,!1);case 11:return ke(i.type.render,!1);case 1:return ke(i.type,!0);case 31:return Se("Activity");default:return""}}function Re(i){try{var o="",u=null;do o+=xe(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,ze=e.unstable_scheduleCallback,Fe=e.unstable_cancelCallback,ye=e.unstable_shouldYield,_e=e.unstable_requestPaint,ee=e.unstable_now,fe=e.unstable_getCurrentPriorityLevel,Q=e.unstable_ImmediatePriority,re=e.unstable_UserBlockingPriority,we=e.unstable_NormalPriority,Pe=e.unstable_LowPriority,Ye=e.unstable_IdlePriority,Ze=e.log,bt=e.unstable_setDisableYieldValue,Je=null,xt=null;function St(i){if(typeof Ze=="function"&&bt(i),xt&&typeof xt.setStrictMode=="function")try{xt.setStrictMode(Je,i)}catch{}}var nt=Math.clz32?Math.clz32:it,rt=Math.log,ct=Math.LN2;function it(i){return i>>>=0,i===0?32:31-(rt(i)/ct|0)|0}var ft=256,Lt=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 Z(i,o,u){var p=i.pendingLanes;if(p===0)return 0;var x=0,w=i.suspendedLanes,I=i.pingedLanes;i=i.warmLanes;var G=p&134217727;return G!==0?(p=G&~w,p!==0?x=At(p):(I&=G,I!==0?x=At(I):u||(u=G&~i,u!==0&&(x=At(u))))):(G=p&~w,G!==0?x=At(G):I!==0?x=At(I):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 me(i,o){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&o)===0}function Le(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 Xe(){var i=Pt;return Pt<<=1,(Pt&62914560)===0&&(Pt=4194304),i}function Ct(i){for(var o=[],u=0;31>u;u++)o.push(i);return o}function lt(i,o){i.pendingLanes|=o,o!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function He(i,o,u,p,x,w){var I=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,J=i.expirationTimes,pe=i.hiddenUpdates;for(u=I&~u;0<u;){var Te=31-nt(u),Oe=1<<Te;G[Te]=0,J[Te]=-1;var he=pe[Te];if(he!==null)for(pe[Te]=null,Te=0;Te<he.length;Te++){var ve=he[Te];ve!==null&&(ve.lane&=-536870913)}u&=~Oe}p!==0&&qe(i,p,0),w!==0&&x===0&&i.tag!==0&&(i.suspendedLanes|=w&~(I&~o))}function qe(i,o,u){i.pendingLanes|=o,i.suspendedLanes&=~o;var p=31-nt(o);i.entangledLanes|=o,i.entanglements[p]=i.entanglements[p]|1073741824|u&261930}function De(i,o){var u=i.entangledLanes|=o;for(i=i.entanglements;u;){var p=31-nt(u),x=1<<p;x&o|i[p]&o&&(i[p]|=o),u&=~x}}function je(i,o){var u=o&-o;return u=(u&42)!==0?1:Ie(u),(u&(i.suspendedLanes|o))!==0?0:u}function Ie(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 We(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function dt(){var i=K.p;return i!==0?i:(i=window.event,i===void 0?32:lw(i.type))}function Et(i,o){var u=K.p;try{return K.p=i,o()}finally{K.p=u}}var Ne=Math.random().toString(36).slice(2),Tt="__reactFiber$"+Ne,Qt="__reactProps$"+Ne,rn="__reactContainer$"+Ne,_n="__reactEvents$"+Ne,Yn="__reactListeners$"+Ne,Br="__reactHandles$"+Ne,Fn="__reactResources$"+Ne,ri="__reactMarker$"+Ne;function Fr(i){delete i[Tt],delete i[Qt],delete i[_n],delete i[Yn],delete i[Br]}function tr(i){var o=i[Tt];if(o)return o;for(var u=i.parentNode;u;){if(o=u[rn]||u[Tt]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(i=G1(i);i!==null;){if(u=i[Tt])return u;i=G1(i)}return o}i=u,u=i.parentNode}return null}function Zi(i){if(i=i[Tt]||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 js(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i.stateNode;throw Error(r(33))}function zs(i){var o=i[Fn];return o||(o=i[Fn]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Un(i){i[ri]=!0}var gf=new Set,Io={};function Qi(i,o){$e(i,o),$e(i+"Capture",o)}function $e(i,o){for(Io[i]=o,i=0;i<o.length;i++)gf.add(o[i])}var at=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]*$"),jt={},on={};function Ln(i){return Me.call(on,i)?!0:Me.call(jt,i)?!1:at.test(i)?on[i]=!0:(jt[i]=!0,!1)}function ur(i,o,u){if(Ln(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 Ur(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 Rr(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 Sn(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function qr(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function bf(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(I){u=""+I,w.call(this,I)}}),Object.defineProperty(i,o,{enumerable:p.enumerable}),{getValue:function(){return u},setValue:function(I){u=""+I},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Ta(i){if(!i._valueTracker){var o=qr(i)?"checked":"value";i._valueTracker=bf(i,o,""+i[o])}}function Yl(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var u=o.getValue(),p="";return i&&(p=qr(i)?i.checked?"true":"false":i.value),i=p,i!==u?(o.setValue(i),!0):!1}function Ra(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 um=/[\n"\\]/g;function Cr(i){return i.replace(um,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Xl(i,o,u,p,x,w,I,G){i.name="",I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?i.type=I:i.removeAttribute("type"),o!=null?I==="number"?(o===0&&i.value===""||i.value!=o)&&(i.value=""+Sn(o)):i.value!==""+Sn(o)&&(i.value=""+Sn(o)):I!=="submit"&&I!=="reset"||i.removeAttribute("value"),o!=null?Ca(i,I,Sn(o)):u!=null?Ca(i,I,Sn(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=""+Sn(G):i.removeAttribute("name")}function Mo(i,o,u,p,x,w,I,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)){Ta(i);return}u=u!=null?""+Sn(u):"",o=o!=null?""+Sn(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,I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"&&(i.name=I),Ta(i)}function Ca(i,o,u){o==="number"&&Ra(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function nr(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=""+Sn(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 yf(i,o,u){if(o!=null&&(o=""+Sn(o),o!==i.value&&(i.value=o),u==null)){i.defaultValue!==o&&(i.defaultValue=o);return}i.defaultValue=u!=null?""+Sn(u):""}function _a(i,o,u,p){if(o==null){if(p!=null){if(u!=null)throw Error(r(92));if(U(p)){if(1<p.length)throw Error(r(93));p=p[0]}u=p}u==null&&(u=""),o=u}u=Sn(o),i.defaultValue=u,p=i.textContent,p===u&&p!==""&&p!==null&&(i.value=p),Ta(i)}function wt(i,o){if(o){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=o;return}}i.textContent=o}var vf=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 qn(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||vf.has(o)?o==="float"?i.cssFloat=u:i[o]=(""+u).trim():i[o]=u+"px"}function an(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&&qn(i,x,p)}else for(var w in o)o.hasOwnProperty(w)&&qn(i,w,o[w])}function Ps(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 Ji=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"]]),Zl=/^[\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 $s(i){return Zl.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Ge(){}var st=null;function Nt(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ht=null,An=null;function ii(i){var o=Zi(i);if(o&&(i=o.stateNode)){var u=i[Qt]||null;e:switch(i=o.stateNode,o.type){case"input":if(Xl(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="'+Cr(""+o)+'"][type="radio"]'),o=0;o<u.length;o++){var p=u[o];if(p!==i&&p.form===i.form){var x=p[Qt]||null;if(!x)throw Error(r(90));Xl(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&&Yl(p)}break e;case"textarea":yf(i,u.value,u.defaultValue);break e;case"select":o=u.value,o!=null&&nr(i,!!u.multiple,o,!1)}}}var Ql=!1;function xf(i,o,u){if(Ql)return i(o,u);Ql=!0;try{var p=i(o);return p}finally{if(Ql=!1,(Ht!==null||An!==null)&&(ad(),Ht&&(o=Ht,i=An,An=Ht=null,ii(o),i)))for(o=0;o<i.length;o++)ii(i[o])}}function Jl(i,o){var u=i.stateNode;if(u===null)return null;var p=u[Qt]||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 es=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cm=!1;if(es)try{var eu={};Object.defineProperty(eu,"passive",{get:function(){cm=!0}}),window.addEventListener("test",eu,eu),window.removeEventListener("test",eu,eu)}catch{cm=!1}var Bs=null,fm=null,kf=null;function $0(){if(kf)return kf;var i,o=fm,u=o.length,p,x="value"in Bs?Bs.value:Bs.textContent,w=x.length;for(i=0;i<u&&o[i]===x[i];i++);var I=u-i;for(p=1;p<=I&&o[u-p]===x[w-p];p++);return kf=x.slice(i,1<p?1-p:void 0)}function Sf(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 wf(){return!0}function B0(){return!1}function _r(i){function o(u,p,x,w,I){this._reactName=u,this._targetInst=x,this.type=p,this.nativeEvent=w,this.target=I,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)?wf:B0,this.isPropagationStopped=B0,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=wf)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=wf)},persist:function(){},isPersistent:wf}),o}var Do={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ef=_r(Do),tu=m({},Do,{view:0,detail:0}),L2=_r(tu),dm,pm,nu,Tf=m({},tu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mm,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!==nu&&(nu&&i.type==="mousemove"?(dm=i.screenX-nu.screenX,pm=i.screenY-nu.screenY):pm=dm=0,nu=i),dm)},movementY:function(i){return"movementY"in i?i.movementY:pm}}),F0=_r(Tf),j2=m({},Tf,{dataTransfer:0}),z2=_r(j2),P2=m({},tu,{relatedTarget:0}),hm=_r(P2),$2=m({},Do,{animationName:0,elapsedTime:0,pseudoElement:0}),B2=_r($2),F2=m({},Do,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),U2=_r(F2),q2=m({},Do,{data:0}),U0=_r(q2),H2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},V2={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"},G2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function W2(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=G2[i])?!!o[i]:!1}function mm(){return W2}var K2=m({},tu,{key:function(i){if(i.key){var o=H2[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=Sf(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?V2[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mm,charCode:function(i){return i.type==="keypress"?Sf(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Sf(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),Y2=_r(K2),X2=m({},Tf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),q0=_r(X2),Z2=m({},tu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mm}),Q2=_r(Z2),J2=m({},Do,{propertyName:0,elapsedTime:0,pseudoElement:0}),eL=_r(J2),tL=m({},Tf,{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}),nL=_r(tL),rL=m({},Do,{newState:0,oldState:0}),iL=_r(rL),sL=[9,13,27,32],gm=es&&"CompositionEvent"in window,ru=null;es&&"documentMode"in document&&(ru=document.documentMode);var oL=es&&"TextEvent"in window&&!ru,H0=es&&(!gm||ru&&8<ru&&11>=ru),V0=" ",G0=!1;function W0(i,o){switch(i){case"keyup":return sL.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function K0(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Aa=!1;function aL(i,o){switch(i){case"compositionend":return K0(o);case"keypress":return o.which!==32?null:(G0=!0,V0);case"textInput":return i=o.data,i===V0&&G0?null:i;default:return null}}function lL(i,o){if(Aa)return i==="compositionend"||!gm&&W0(i,o)?(i=$0(),kf=fm=Bs=null,Aa=!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 H0&&o.locale!=="ko"?null:o.data;default:return null}}var uL={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 Y0(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!uL[i.type]:o==="textarea"}function X0(i,o,u,p){Ht?An?An.push(p):An=[p]:Ht=p,o=hd(o,"onChange"),0<o.length&&(u=new Ef("onChange","change",null,u,p),i.push({event:u,listeners:o}))}var iu=null,su=null;function cL(i){I1(i,0)}function Rf(i){var o=js(i);if(Yl(o))return i}function Z0(i,o){if(i==="change")return o}var Q0=!1;if(es){var bm;if(es){var ym="oninput"in document;if(!ym){var J0=document.createElement("div");J0.setAttribute("oninput","return;"),ym=typeof J0.oninput=="function"}bm=ym}else bm=!1;Q0=bm&&(!document.documentMode||9<document.documentMode)}function ek(){iu&&(iu.detachEvent("onpropertychange",tk),su=iu=null)}function tk(i){if(i.propertyName==="value"&&Rf(su)){var o=[];X0(o,su,i,Nt(i)),xf(cL,o)}}function fL(i,o,u){i==="focusin"?(ek(),iu=o,su=u,iu.attachEvent("onpropertychange",tk)):i==="focusout"&&ek()}function dL(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Rf(su)}function pL(i,o){if(i==="click")return Rf(o)}function hL(i,o){if(i==="input"||i==="change")return Rf(o)}function mL(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var Hr=typeof Object.is=="function"?Object.is:mL;function ou(i,o){if(Hr(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)||!Hr(i[x],o[x]))return!1}return!0}function nk(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function rk(i,o){var u=nk(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=nk(u)}}function ik(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?ik(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function sk(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var o=Ra(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=Ra(i.document)}return o}function vm(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 gL=es&&"documentMode"in document&&11>=document.documentMode,Na=null,xm=null,au=null,km=!1;function ok(i,o,u){var p=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;km||Na==null||Na!==Ra(p)||(p=Na,"selectionStart"in p&&vm(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}),au&&ou(au,p)||(au=p,p=hd(xm,"onSelect"),0<p.length&&(o=new Ef("onSelect","select",null,o,u),i.push({event:o,listeners:p}),o.target=Na)))}function Lo(i,o){var u={};return u[i.toLowerCase()]=o.toLowerCase(),u["Webkit"+i]="webkit"+o,u["Moz"+i]="moz"+o,u}var Oa={animationend:Lo("Animation","AnimationEnd"),animationiteration:Lo("Animation","AnimationIteration"),animationstart:Lo("Animation","AnimationStart"),transitionrun:Lo("Transition","TransitionRun"),transitionstart:Lo("Transition","TransitionStart"),transitioncancel:Lo("Transition","TransitionCancel"),transitionend:Lo("Transition","TransitionEnd")},Sm={},ak={};es&&(ak=document.createElement("div").style,"AnimationEvent"in window||(delete Oa.animationend.animation,delete Oa.animationiteration.animation,delete Oa.animationstart.animation),"TransitionEvent"in window||delete Oa.transitionend.transition);function jo(i){if(Sm[i])return Sm[i];if(!Oa[i])return i;var o=Oa[i],u;for(u in o)if(o.hasOwnProperty(u)&&u in ak)return Sm[i]=o[u];return i}var lk=jo("animationend"),uk=jo("animationiteration"),ck=jo("animationstart"),bL=jo("transitionrun"),yL=jo("transitionstart"),vL=jo("transitioncancel"),fk=jo("transitionend"),dk=new Map,wm="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(" ");wm.push("scrollEnd");function xi(i,o){dk.set(i,o),Qi(o,[i])}var Cf=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)},si=[],Ia=0,Em=0;function _f(){for(var i=Ia,o=Em=Ia=0;o<i;){var u=si[o];si[o++]=null;var p=si[o];si[o++]=null;var x=si[o];si[o++]=null;var w=si[o];if(si[o++]=null,p!==null&&x!==null){var I=p.pending;I===null?x.next=x:(x.next=I.next,I.next=x),p.pending=x}w!==0&&pk(u,x,w)}}function Af(i,o,u,p){si[Ia++]=i,si[Ia++]=o,si[Ia++]=u,si[Ia++]=p,Em|=p,i.lanes|=p,i=i.alternate,i!==null&&(i.lanes|=p)}function Tm(i,o,u,p){return Af(i,o,u,p),Nf(i)}function zo(i,o){return Af(i,null,null,o),Nf(i)}function pk(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-nt(u),i=w.hiddenUpdates,p=i[x],p===null?i[x]=[o]:p.push(o),o.lane=u|536870912),w):null}function Nf(i){if(50<Au)throw Au=0,Dg=null,Error(r(185));for(var o=i.return;o!==null;)i=o,o=i.return;return i.tag===3?i.stateNode:null}var Ma={};function xL(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 Vr(i,o,u,p){return new xL(i,o,u,p)}function Rm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function ts(i,o){var u=i.alternate;return u===null?(u=Vr(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 hk(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 Of(i,o,u,p,x,w){var I=0;if(p=i,typeof i=="function")Rm(i)&&(I=1);else if(typeof i=="string")I=Tj(i,u,X.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case P:return i=Vr(31,u,o,x),i.elementType=P,i.lanes=w,i;case S:return Po(u.children,x,w,o);case R:I=8,x|=24;break;case T:return i=Vr(12,u,o,x|2),i.elementType=T,i.lanes=w,i;case D:return i=Vr(13,u,o,x),i.elementType=D,i.lanes=w,i;case A:return i=Vr(19,u,o,x),i.elementType=A,i.lanes=w,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case C:I=10;break e;case E:I=9;break e;case _:I=11;break e;case M:I=14;break e;case B:I=16,p=null;break e}I=29,u=Error(r(130,i===null?"null":typeof i,"")),p=null}return o=Vr(I,u,o,x),o.elementType=i,o.type=p,o.lanes=w,o}function Po(i,o,u,p){return i=Vr(7,i,p,o),i.lanes=u,i}function Cm(i,o,u){return i=Vr(6,i,null,o),i.lanes=u,i}function mk(i){var o=Vr(18,null,null,0);return o.stateNode=i,o}function _m(i,o,u){return o=Vr(4,i.children!==null?i.children:[],i.key,o),o.lanes=u,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}var gk=new WeakMap;function oi(i,o){if(typeof i=="object"&&i!==null){var u=gk.get(i);return u!==void 0?u:(o={value:i,source:o,stack:Re(o)},gk.set(i,o),o)}return{value:i,source:o,stack:Re(o)}}var Da=[],La=0,If=null,lu=0,ai=[],li=0,Fs=null,Li=1,ji="";function ns(i,o){Da[La++]=lu,Da[La++]=If,If=i,lu=o}function bk(i,o,u){ai[li++]=Li,ai[li++]=ji,ai[li++]=Fs,Fs=i;var p=Li;i=ji;var x=32-nt(p)-1;p&=~(1<<x),u+=1;var w=32-nt(o)+x;if(30<w){var I=x-x%5;w=(p&(1<<I)-1).toString(32),p>>=I,x-=I,Li=1<<32-nt(o)+x|u<<x|p,ji=w+i}else Li=1<<w|u<<x|p,ji=i}function Am(i){i.return!==null&&(ns(i,1),bk(i,1,0))}function Nm(i){for(;i===If;)If=Da[--La],Da[La]=null,lu=Da[--La],Da[La]=null;for(;i===Fs;)Fs=ai[--li],ai[li]=null,ji=ai[--li],ai[li]=null,Li=ai[--li],ai[li]=null}function yk(i,o){ai[li++]=Li,ai[li++]=ji,ai[li++]=Fs,Li=o.id,ji=o.overflow,Fs=i}var rr=null,Tn=null,Kt=!1,Us=null,ui=!1,Om=Error(r(519));function qs(i){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw uu(oi(o,i)),Om}function vk(i){var o=i.stateNode,u=i.type,p=i.memoizedProps;switch(o[Tt]=i,o[Qt]=p,u){case"dialog":Bt("cancel",o),Bt("close",o);break;case"iframe":case"object":case"embed":Bt("load",o);break;case"video":case"audio":for(u=0;u<Ou.length;u++)Bt(Ou[u],o);break;case"source":Bt("error",o);break;case"img":case"image":case"link":Bt("error",o),Bt("load",o);break;case"details":Bt("toggle",o);break;case"input":Bt("invalid",o),Mo(o,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":Bt("invalid",o);break;case"textarea":Bt("invalid",o),_a(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||j1(o.textContent,u)?(p.popover!=null&&(Bt("beforetoggle",o),Bt("toggle",o)),p.onScroll!=null&&Bt("scroll",o),p.onScrollEnd!=null&&Bt("scrollend",o),p.onClick!=null&&(o.onclick=Ge),o=!0):o=!1,o||qs(i,!0)}function xk(i){for(rr=i.return;rr;)switch(rr.tag){case 5:case 31:case 13:ui=!1;return;case 27:case 3:ui=!0;return;default:rr=rr.return}}function ja(i){if(i!==rr)return!1;if(!Kt)return xk(i),Kt=!0,!1;var o=i.tag,u;if((u=o!==3&&o!==27)&&((u=o===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||Yg(i.type,i.memoizedProps)),u=!u),u&&Tn&&qs(i),xk(i),o===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Tn=V1(i)}else if(o===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Tn=V1(i)}else o===27?(o=Tn,ro(i.type)?(i=eb,eb=null,Tn=i):Tn=o):Tn=rr?fi(i.stateNode.nextSibling):null;return!0}function $o(){Tn=rr=null,Kt=!1}function Im(){var i=Us;return i!==null&&(Ir===null?Ir=i:Ir.push.apply(Ir,i),Us=null),i}function uu(i){Us===null?Us=[i]:Us.push(i)}var Mm=j(null),Bo=null,rs=null;function Hs(i,o,u){L(Mm,o._currentValue),o._currentValue=u}function is(i){i._currentValue=Mm.current,V(Mm)}function Dm(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 Lm(i,o,u,p){var x=i.child;for(x!==null&&(x.return=i);x!==null;){var w=x.dependencies;if(w!==null){var I=x.child;w=w.firstContext;e:for(;w!==null;){var G=w;w=x;for(var J=0;J<o.length;J++)if(G.context===o[J]){w.lanes|=u,G=w.alternate,G!==null&&(G.lanes|=u),Dm(w.return,u,i),p||(I=null);break e}w=G.next}}else if(x.tag===18){if(I=x.return,I===null)throw Error(r(341));I.lanes|=u,w=I.alternate,w!==null&&(w.lanes|=u),Dm(I,u,i),I=null}else I=x.child;if(I!==null)I.return=x;else for(I=x;I!==null;){if(I===i){I=null;break}if(x=I.sibling,x!==null){x.return=I.return,I=x;break}I=I.return}x=I}}function za(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 I=x.alternate;if(I===null)throw Error(r(387));if(I=I.memoizedProps,I!==null){var G=x.type;Hr(x.pendingProps.value,I.value)||(i!==null?i.push(G):i=[G])}}else if(x===oe.current){if(I=x.alternate,I===null)throw Error(r(387));I.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(i!==null?i.push(ju):i=[ju])}x=x.return}i!==null&&Lm(o,i,u,p),o.flags|=262144}function Mf(i){for(i=i.firstContext;i!==null;){if(!Hr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Fo(i){Bo=i,rs=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function ir(i){return kk(Bo,i)}function Df(i,o){return Bo===null&&Fo(i),kk(i,o)}function kk(i,o){var u=o._currentValue;if(o={context:o,memoizedValue:u,next:null},rs===null){if(i===null)throw Error(r(308));rs=o,i.dependencies={lanes:0,firstContext:o},i.flags|=524288}else rs=rs.next=o;return u}var kL=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()})}},SL=e.unstable_scheduleCallback,wL=e.unstable_NormalPriority,Hn={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function jm(){return{controller:new kL,data:new Map,refCount:0}}function cu(i){i.refCount--,i.refCount===0&&SL(wL,function(){i.controller.abort()})}var fu=null,zm=0,Pa=0,$a=null;function EL(i,o){if(fu===null){var u=fu=[];zm=0,Pa=Bg(),$a={status:"pending",value:void 0,then:function(p){u.push(p)}}}return zm++,o.then(Sk,Sk),o}function Sk(){if(--zm===0&&fu!==null){$a!==null&&($a.status="fulfilled");var i=fu;fu=null,Pa=0,$a=null;for(var o=0;o<i.length;o++)(0,i[o])()}}function TL(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 wk=H.S;H.S=function(i,o){o1=ee(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&EL(i,o),wk!==null&&wk(i,o)};var Uo=j(null);function Pm(){var i=Uo.current;return i!==null?i:yn.pooledCache}function Lf(i,o){o===null?L(Uo,Uo.current):L(Uo,o.pool)}function Ek(){var i=Pm();return i===null?null:{parent:Hn._currentValue,pool:i}}var Ba=Error(r(460)),$m=Error(r(474)),jf=Error(r(542)),zf={then:function(){}};function Tk(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Rk(i,o,u){switch(u=i[u],u===void 0?i.push(o):u!==o&&(o.then(Ge,Ge),o=u),o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,_k(i),i;default:if(typeof o.status=="string")o.then(Ge,Ge);else{if(i=yn,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,_k(i),i}throw Ho=o,Ba}}function qo(i){try{var o=i._init;return o(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Ho=u,Ba):u}}var Ho=null;function Ck(){if(Ho===null)throw Error(r(459));var i=Ho;return Ho=null,i}function _k(i){if(i===Ba||i===jf)throw Error(r(483))}var Fa=null,du=0;function Pf(i){var o=du;return du+=1,Fa===null&&(Fa=[]),Rk(Fa,i,o)}function pu(i,o){o=o.props.ref,i.ref=o!==void 0?o:null}function $f(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 Ak(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=ts(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 I(ae){return i&&ae.alternate===null&&(ae.flags|=67108866),ae}function G(ae,ie,de,Ce){return ie===null||ie.tag!==6?(ie=Cm(de,ae.mode,Ce),ie.return=ae,ie):(ie=x(ie,de),ie.return=ae,ie)}function J(ae,ie,de,Ce){var ut=de.type;return ut===S?Te(ae,ie,de.props.children,Ce,de.key):ie!==null&&(ie.elementType===ut||typeof ut=="object"&&ut!==null&&ut.$$typeof===B&&qo(ut)===ie.type)?(ie=x(ie,de.props),pu(ie,de),ie.return=ae,ie):(ie=Of(de.type,de.key,de.props,null,ae.mode,Ce),pu(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=_m(de,ae.mode,Ce),ie.return=ae,ie):(ie=x(ie,de.children||[]),ie.return=ae,ie)}function Te(ae,ie,de,Ce,ut){return ie===null||ie.tag!==7?(ie=Po(de,ae.mode,Ce,ut),ie.return=ae,ie):(ie=x(ie,de),ie.return=ae,ie)}function Oe(ae,ie,de){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return ie=Cm(""+ie,ae.mode,de),ie.return=ae,ie;if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case y:return de=Of(ie.type,ie.key,ie.props,null,ae.mode,de),pu(de,ie),de.return=ae,de;case k:return ie=_m(ie,ae.mode,de),ie.return=ae,ie;case B:return ie=qo(ie),Oe(ae,ie,de)}if(U(ie)||$(ie))return ie=Po(ie,ae.mode,de,null),ie.return=ae,ie;if(typeof ie.then=="function")return Oe(ae,Pf(ie),de);if(ie.$$typeof===C)return Oe(ae,Df(ae,ie),de);$f(ae,ie)}return null}function he(ae,ie,de,Ce){var ut=ie!==null?ie.key:null;if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return ut!==null?null:G(ae,ie,""+de,Ce);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case y:return de.key===ut?J(ae,ie,de,Ce):null;case k:return de.key===ut?pe(ae,ie,de,Ce):null;case B:return de=qo(de),he(ae,ie,de,Ce)}if(U(de)||$(de))return ut!==null?null:Te(ae,ie,de,Ce,null);if(typeof de.then=="function")return he(ae,ie,Pf(de),Ce);if(de.$$typeof===C)return he(ae,ie,Df(ae,de),Ce);$f(ae,de)}return null}function ve(ae,ie,de,Ce,ut){if(typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint")return ae=ae.get(de)||null,G(ie,ae,""+Ce,ut);if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case y:return ae=ae.get(Ce.key===null?de:Ce.key)||null,J(ie,ae,Ce,ut);case k:return ae=ae.get(Ce.key===null?de:Ce.key)||null,pe(ie,ae,Ce,ut);case B:return Ce=qo(Ce),ve(ae,ie,de,Ce,ut)}if(U(Ce)||$(Ce))return ae=ae.get(de)||null,Te(ie,ae,Ce,ut,null);if(typeof Ce.then=="function")return ve(ae,ie,de,Pf(Ce),ut);if(Ce.$$typeof===C)return ve(ae,ie,de,Df(ie,Ce),ut);$f(ie,Ce)}return null}function et(ae,ie,de,Ce){for(var ut=null,Jt=null,ot=ie,It=ie=0,Gt=null;ot!==null&&It<de.length;It++){ot.index>It?(Gt=ot,ot=null):Gt=ot.sibling;var en=he(ae,ot,de[It],Ce);if(en===null){ot===null&&(ot=Gt);break}i&&ot&&en.alternate===null&&o(ae,ot),ie=w(en,ie,It),Jt===null?ut=en:Jt.sibling=en,Jt=en,ot=Gt}if(It===de.length)return u(ae,ot),Kt&&ns(ae,It),ut;if(ot===null){for(;It<de.length;It++)ot=Oe(ae,de[It],Ce),ot!==null&&(ie=w(ot,ie,It),Jt===null?ut=ot:Jt.sibling=ot,Jt=ot);return Kt&&ns(ae,It),ut}for(ot=p(ot);It<de.length;It++)Gt=ve(ot,ae,It,de[It],Ce),Gt!==null&&(i&&Gt.alternate!==null&&ot.delete(Gt.key===null?It:Gt.key),ie=w(Gt,ie,It),Jt===null?ut=Gt:Jt.sibling=Gt,Jt=Gt);return i&&ot.forEach(function(lo){return o(ae,lo)}),Kt&&ns(ae,It),ut}function kt(ae,ie,de,Ce){if(de==null)throw Error(r(151));for(var ut=null,Jt=null,ot=ie,It=ie=0,Gt=null,en=de.next();ot!==null&&!en.done;It++,en=de.next()){ot.index>It?(Gt=ot,ot=null):Gt=ot.sibling;var lo=he(ae,ot,en.value,Ce);if(lo===null){ot===null&&(ot=Gt);break}i&&ot&&lo.alternate===null&&o(ae,ot),ie=w(lo,ie,It),Jt===null?ut=lo:Jt.sibling=lo,Jt=lo,ot=Gt}if(en.done)return u(ae,ot),Kt&&ns(ae,It),ut;if(ot===null){for(;!en.done;It++,en=de.next())en=Oe(ae,en.value,Ce),en!==null&&(ie=w(en,ie,It),Jt===null?ut=en:Jt.sibling=en,Jt=en);return Kt&&ns(ae,It),ut}for(ot=p(ot);!en.done;It++,en=de.next())en=ve(ot,ae,It,en.value,Ce),en!==null&&(i&&en.alternate!==null&&ot.delete(en.key===null?It:en.key),ie=w(en,ie,It),Jt===null?ut=en:Jt.sibling=en,Jt=en);return i&&ot.forEach(function(jj){return o(ae,jj)}),Kt&&ns(ae,It),ut}function dn(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 ut=de.key;ie!==null;){if(ie.key===ut){if(ut=de.type,ut===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===ut||typeof ut=="object"&&ut!==null&&ut.$$typeof===B&&qo(ut)===ie.type){u(ae,ie.sibling),Ce=x(ie,de.props),pu(Ce,de),Ce.return=ae,ae=Ce;break e}u(ae,ie);break}else o(ae,ie);ie=ie.sibling}de.type===S?(Ce=Po(de.props.children,ae.mode,Ce,de.key),Ce.return=ae,ae=Ce):(Ce=Of(de.type,de.key,de.props,null,ae.mode,Ce),pu(Ce,de),Ce.return=ae,ae=Ce)}return I(ae);case k:e:{for(ut=de.key;ie!==null;){if(ie.key===ut)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=_m(de,ae.mode,Ce),Ce.return=ae,ae=Ce}return I(ae);case B:return de=qo(de),dn(ae,ie,de,Ce)}if(U(de))return et(ae,ie,de,Ce);if($(de)){if(ut=$(de),typeof ut!="function")throw Error(r(150));return de=ut.call(de),kt(ae,ie,de,Ce)}if(typeof de.then=="function")return dn(ae,ie,Pf(de),Ce);if(de.$$typeof===C)return dn(ae,ie,Df(ae,de),Ce);$f(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=Cm(de,ae.mode,Ce),Ce.return=ae,ae=Ce),I(ae)):u(ae,ie)}return function(ae,ie,de,Ce){try{du=0;var ut=dn(ae,ie,de,Ce);return Fa=null,ut}catch(ot){if(ot===Ba||ot===jf)throw ot;var Jt=Vr(29,ot,null,ae.mode);return Jt.lanes=Ce,Jt.return=ae,Jt}}}var Vo=Ak(!0),Nk=Ak(!1),Vs=!1;function Bm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Fm(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 Gs(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ws(i,o,u){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(nn&2)!==0){var x=p.pending;return x===null?o.next=o:(o.next=x.next,x.next=o),p.pending=o,o=Nf(i),pk(i,null,u),o}return Af(i,p,o,u),Nf(i)}function hu(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,De(i,u)}}function Um(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 I={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};w===null?x=w=I:w=w.next=I,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 qm=!1;function mu(){if(qm){var i=$a;if(i!==null)throw i}}function gu(i,o,u,p){qm=!1;var x=i.updateQueue;Vs=!1;var w=x.firstBaseUpdate,I=x.lastBaseUpdate,G=x.shared.pending;if(G!==null){x.shared.pending=null;var J=G,pe=J.next;J.next=null,I===null?w=pe:I.next=pe,I=J;var Te=i.alternate;Te!==null&&(Te=Te.updateQueue,G=Te.lastBaseUpdate,G!==I&&(G===null?Te.firstBaseUpdate=pe:G.next=pe,Te.lastBaseUpdate=J))}if(w!==null){var Oe=x.baseState;I=0,Te=pe=J=null,G=w;do{var he=G.lane&-536870913,ve=he!==G.lane;if(ve?(Vt&he)===he:(p&he)===he){he!==0&&he===Pa&&(qm=!0),Te!==null&&(Te=Te.next={lane:0,tag:G.tag,payload:G.payload,callback:null,next:null});e:{var et=i,kt=G;he=o;var dn=u;switch(kt.tag){case 1:if(et=kt.payload,typeof et=="function"){Oe=et.call(dn,Oe,he);break e}Oe=et;break e;case 3:et.flags=et.flags&-65537|128;case 0:if(et=kt.payload,he=typeof et=="function"?et.call(dn,Oe,he):et,he==null)break e;Oe=m({},Oe,he);break e;case 2:Vs=!0}}he=G.callback,he!==null&&(i.flags|=64,ve&&(i.flags|=8192),ve=x.callbacks,ve===null?x.callbacks=[he]:ve.push(he))}else ve={lane:he,tag:G.tag,payload:G.payload,callback:G.callback,next:null},Te===null?(pe=Te=ve,J=Oe):Te=Te.next=ve,I|=he;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&&(J=Oe),x.baseState=J,x.firstBaseUpdate=pe,x.lastBaseUpdate=Te,w===null&&(x.shared.lanes=0),Qs|=I,i.lanes=I,i.memoizedState=Oe}}function Ok(i,o){if(typeof i!="function")throw Error(r(191,i));i.call(o)}function Ik(i,o){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)Ok(u[i],o)}var Ua=j(null),Bf=j(0);function Mk(i,o){i=ps,L(Bf,i),L(Ua,o),ps=i|o.baseLanes}function Hm(){L(Bf,ps),L(Ua,Ua.current)}function Vm(){ps=Bf.current,V(Ua),V(Bf)}var Gr=j(null),ci=null;function Ks(i){var o=i.alternate;L(jn,jn.current&1),L(Gr,i),ci===null&&(o===null||Ua.current!==null||o.memoizedState!==null)&&(ci=i)}function Gm(i){L(jn,jn.current),L(Gr,i),ci===null&&(ci=i)}function Dk(i){i.tag===22?(L(jn,jn.current),L(Gr,i),ci===null&&(ci=i)):Ys()}function Ys(){L(jn,jn.current),L(Gr,Gr.current)}function Wr(i){V(Gr),ci===i&&(ci=null),V(jn)}var jn=j(0);function Ff(i){for(var o=i;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Qg(u)||Jg(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 ss=0,Ot=null,cn=null,Vn=null,Uf=!1,qa=!1,Go=!1,qf=0,bu=0,Ha=null,RL=0;function Mn(){throw Error(r(321))}function Wm(i,o){if(o===null)return!1;for(var u=0;u<o.length&&u<i.length;u++)if(!Hr(i[u],o[u]))return!1;return!0}function Km(i,o,u,p,x,w){return ss=w,Ot=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,H.H=i===null||i.memoizedState===null?bS:ug,Go=!1,w=u(p,x),Go=!1,qa&&(w=jk(o,u,p,x)),Lk(i),w}function Lk(i){H.H=xu;var o=cn!==null&&cn.next!==null;if(ss=0,Vn=cn=Ot=null,Uf=!1,bu=0,Ha=null,o)throw Error(r(300));i===null||Gn||(i=i.dependencies,i!==null&&Mf(i)&&(Gn=!0))}function jk(i,o,u,p){Ot=i;var x=0;do{if(qa&&(Ha=null),bu=0,qa=!1,25<=x)throw Error(r(301));if(x+=1,Vn=cn=null,i.updateQueue!=null){var w=i.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}H.H=yS,w=o(u,p)}while(qa);return w}function CL(){var i=H.H,o=i.useState()[0];return o=typeof o.then=="function"?yu(o):o,i=i.useState()[0],(cn!==null?cn.memoizedState:null)!==i&&(Ot.flags|=1024),o}function Ym(){var i=qf!==0;return qf=0,i}function Xm(i,o,u){o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~u}function Zm(i){if(Uf){for(i=i.memoizedState;i!==null;){var o=i.queue;o!==null&&(o.pending=null),i=i.next}Uf=!1}ss=0,Vn=cn=Ot=null,qa=!1,bu=qf=0,Ha=null}function vr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vn===null?Ot.memoizedState=Vn=i:Vn=Vn.next=i,Vn}function zn(){if(cn===null){var i=Ot.alternate;i=i!==null?i.memoizedState:null}else i=cn.next;var o=Vn===null?Ot.memoizedState:Vn.next;if(o!==null)Vn=o,cn=i;else{if(i===null)throw Ot.alternate===null?Error(r(467)):Error(r(310));cn=i,i={memoizedState:cn.memoizedState,baseState:cn.baseState,baseQueue:cn.baseQueue,queue:cn.queue,next:null},Vn===null?Ot.memoizedState=Vn=i:Vn=Vn.next=i}return Vn}function Hf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yu(i){var o=bu;return bu+=1,Ha===null&&(Ha=[]),i=Rk(Ha,i,o),o=Ot,(Vn===null?o.memoizedState:Vn.next)===null&&(o=o.alternate,H.H=o===null||o.memoizedState===null?bS:ug),i}function Vf(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return yu(i);if(i.$$typeof===C)return ir(i)}throw Error(r(438,String(i)))}function Qm(i){var o=null,u=Ot.updateQueue;if(u!==null&&(o=u.memoCache),o==null){var p=Ot.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=Hf(),Ot.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]=N;return o.index++,u}function os(i,o){return typeof o=="function"?o(i):o}function Gf(i){var o=zn();return Jm(o,cn,i)}function Jm(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 I=x.next;x.next=w.next,w.next=I}o.baseQueue=x=w,p.pending=null}if(w=i.baseState,x===null)i.memoizedState=w;else{o=x.next;var G=I=null,J=null,pe=o,Te=!1;do{var Oe=pe.lane&-536870913;if(Oe!==pe.lane?(Vt&Oe)===Oe:(ss&Oe)===Oe){var he=pe.revertLane;if(he===0)J!==null&&(J=J.next={lane:0,revertLane:0,gesture:null,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null}),Oe===Pa&&(Te=!0);else if((ss&he)===he){pe=pe.next,he===Pa&&(Te=!0);continue}else Oe={lane:0,revertLane:pe.revertLane,gesture:null,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null},J===null?(G=J=Oe,I=w):J=J.next=Oe,Ot.lanes|=he,Qs|=he;Oe=pe.action,Go&&u(w,Oe),w=pe.hasEagerState?pe.eagerState:u(w,Oe)}else he={lane:Oe,revertLane:pe.revertLane,gesture:pe.gesture,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null},J===null?(G=J=he,I=w):J=J.next=he,Ot.lanes|=Oe,Qs|=Oe;pe=pe.next}while(pe!==null&&pe!==o);if(J===null?I=w:J.next=G,!Hr(w,i.memoizedState)&&(Gn=!0,Te&&(u=$a,u!==null)))throw u;i.memoizedState=w,i.baseState=I,i.baseQueue=J,p.lastRenderedState=w}return x===null&&(p.lanes=0),[i.memoizedState,p.dispatch]}function eg(i){var o=zn(),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 I=x=x.next;do w=i(w,I.action),I=I.next;while(I!==x);Hr(w,o.memoizedState)||(Gn=!0),o.memoizedState=w,o.baseQueue===null&&(o.baseState=w),u.lastRenderedState=w}return[w,p]}function zk(i,o,u){var p=Ot,x=zn(),w=Kt;if(w){if(u===void 0)throw Error(r(407));u=u()}else u=o();var I=!Hr((cn||x).memoizedState,u);if(I&&(x.memoizedState=u,Gn=!0),x=x.queue,rg(Bk.bind(null,p,x,i),[i]),x.getSnapshot!==o||I||Vn!==null&&Vn.memoizedState.tag&1){if(p.flags|=2048,Va(9,{destroy:void 0},$k.bind(null,p,x,u,o),null),yn===null)throw Error(r(349));w||(ss&127)!==0||Pk(p,o,u)}return u}function Pk(i,o,u){i.flags|=16384,i={getSnapshot:o,value:u},o=Ot.updateQueue,o===null?(o=Hf(),Ot.updateQueue=o,o.stores=[i]):(u=o.stores,u===null?o.stores=[i]:u.push(i))}function $k(i,o,u,p){o.value=u,o.getSnapshot=p,Fk(o)&&Uk(i)}function Bk(i,o,u){return u(function(){Fk(o)&&Uk(i)})}function Fk(i){var o=i.getSnapshot;i=i.value;try{var u=o();return!Hr(i,u)}catch{return!0}}function Uk(i){var o=zo(i,2);o!==null&&Mr(o,i,2)}function tg(i){var o=vr();if(typeof i=="function"){var u=i;if(i=u(),Go){St(!0);try{u()}finally{St(!1)}}}return o.memoizedState=o.baseState=i,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:os,lastRenderedState:i},o}function qk(i,o,u,p){return i.baseState=u,Jm(i,cn,typeof p=="function"?p:os)}function _L(i,o,u,p,x){if(Yf(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(I){w.listeners.push(I)}};H.T!==null?u(!0):w.isTransition=!1,p(w),u=o.pending,u===null?(w.next=o.pending=w,Hk(o,w)):(w.next=u.next,o.pending=u.next=w)}}function Hk(i,o){var u=o.action,p=o.payload,x=i.state;if(o.isTransition){var w=H.T,I={};H.T=I;try{var G=u(x,p),J=H.S;J!==null&&J(I,G),Vk(i,o,G)}catch(pe){ng(i,o,pe)}finally{w!==null&&I.types!==null&&(w.types=I.types),H.T=w}}else try{w=u(x,p),Vk(i,o,w)}catch(pe){ng(i,o,pe)}}function Vk(i,o,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(p){Gk(i,o,p)},function(p){return ng(i,o,p)}):Gk(i,o,u)}function Gk(i,o,u){o.status="fulfilled",o.value=u,Wk(o),i.state=u,o=i.pending,o!==null&&(u=o.next,u===o?i.pending=null:(u=u.next,o.next=u,Hk(i,u)))}function ng(i,o,u){var p=i.pending;if(i.pending=null,p!==null){p=p.next;do o.status="rejected",o.reason=u,Wk(o),o=o.next;while(o!==p)}i.action=null}function Wk(i){i=i.listeners;for(var o=0;o<i.length;o++)(0,i[o])()}function Kk(i,o){return o}function Yk(i,o){if(Kt){var u=yn.formState;if(u!==null){e:{var p=Ot;if(Kt){if(Tn){t:{for(var x=Tn,w=ui;x.nodeType!==8;){if(!w){x=null;break t}if(x=fi(x.nextSibling),x===null){x=null;break t}}w=x.data,x=w==="F!"||w==="F"?x:null}if(x){Tn=fi(x.nextSibling),p=x.data==="F!";break e}}qs(p)}p=!1}p&&(o=u[0])}}return u=vr(),u.memoizedState=u.baseState=o,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kk,lastRenderedState:o},u.queue=p,u=hS.bind(null,Ot,p),p.dispatch=u,p=tg(!1),w=lg.bind(null,Ot,!1,p.queue),p=vr(),x={state:o,dispatch:null,action:i,pending:null},p.queue=x,u=_L.bind(null,Ot,x,w,u),x.dispatch=u,p.memoizedState=i,[o,u,!1]}function Xk(i){var o=zn();return Zk(o,cn,i)}function Zk(i,o,u){if(o=Jm(i,o,Kk)[0],i=Gf(os)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var p=yu(o)}catch(I){throw I===Ba?jf:I}else p=o;o=zn();var x=o.queue,w=x.dispatch;return u!==o.memoizedState&&(Ot.flags|=2048,Va(9,{destroy:void 0},AL.bind(null,x,u),null)),[p,w,i]}function AL(i,o){i.action=o}function Qk(i){var o=zn(),u=cn;if(u!==null)return Zk(o,u,i);zn(),o=o.memoizedState,u=zn();var p=u.queue.dispatch;return u.memoizedState=i,[o,p,!1]}function Va(i,o,u,p){return i={tag:i,create:u,deps:p,inst:o,next:null},o=Ot.updateQueue,o===null&&(o=Hf(),Ot.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 Jk(){return zn().memoizedState}function Wf(i,o,u,p){var x=vr();Ot.flags|=i,x.memoizedState=Va(1|o,{destroy:void 0},u,p===void 0?null:p)}function Kf(i,o,u,p){var x=zn();p=p===void 0?null:p;var w=x.memoizedState.inst;cn!==null&&p!==null&&Wm(p,cn.memoizedState.deps)?x.memoizedState=Va(o,w,u,p):(Ot.flags|=i,x.memoizedState=Va(1|o,w,u,p))}function eS(i,o){Wf(8390656,8,i,o)}function rg(i,o){Kf(2048,8,i,o)}function NL(i){Ot.flags|=4;var o=Ot.updateQueue;if(o===null)o=Hf(),Ot.updateQueue=o,o.events=[i];else{var u=o.events;u===null?o.events=[i]:u.push(i)}}function tS(i){var o=zn().memoizedState;return NL({ref:o,nextImpl:i}),function(){if((nn&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function nS(i,o){return Kf(4,2,i,o)}function rS(i,o){return Kf(4,4,i,o)}function iS(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 sS(i,o,u){u=u!=null?u.concat([i]):null,Kf(4,4,iS.bind(null,o,i),u)}function ig(){}function oS(i,o){var u=zn();o=o===void 0?null:o;var p=u.memoizedState;return o!==null&&Wm(o,p[1])?p[0]:(u.memoizedState=[i,o],i)}function aS(i,o){var u=zn();o=o===void 0?null:o;var p=u.memoizedState;if(o!==null&&Wm(o,p[1]))return p[0];if(p=i(),Go){St(!0);try{i()}finally{St(!1)}}return u.memoizedState=[p,o],p}function sg(i,o,u){return u===void 0||(ss&1073741824)!==0&&(Vt&261930)===0?i.memoizedState=o:(i.memoizedState=u,i=l1(),Ot.lanes|=i,Qs|=i,u)}function lS(i,o,u,p){return Hr(u,o)?u:Ua.current!==null?(i=sg(i,u,p),Hr(i,o)||(Gn=!0),i):(ss&42)===0||(ss&1073741824)!==0&&(Vt&261930)===0?(Gn=!0,i.memoizedState=u):(i=l1(),Ot.lanes|=i,Qs|=i,o)}function uS(i,o,u,p,x){var w=K.p;K.p=w!==0&&8>w?w:8;var I=H.T,G={};H.T=G,lg(i,!1,o,u);try{var J=x(),pe=H.S;if(pe!==null&&pe(G,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var Te=TL(J,p);vu(i,o,Te,Xr(i))}else vu(i,o,p,Xr(i))}catch(Oe){vu(i,o,{then:function(){},status:"rejected",reason:Oe},Xr())}finally{K.p=w,I!==null&&G.types!==null&&(I.types=G.types),H.T=I}}function OL(){}function og(i,o,u,p){if(i.tag!==5)throw Error(r(476));var x=cS(i).queue;uS(i,x,o,q,u===null?OL:function(){return fS(i),u(p)})}function cS(i){var o=i.memoizedState;if(o!==null)return o;o={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:os,lastRenderedState:q},next:null};var u={};return o.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:os,lastRenderedState:u},next:null},i.memoizedState=o,i=i.alternate,i!==null&&(i.memoizedState=o),o}function fS(i){var o=cS(i);o.next===null&&(o=i.alternate.memoizedState),vu(i,o.next.queue,{},Xr())}function ag(){return ir(ju)}function dS(){return zn().memoizedState}function pS(){return zn().memoizedState}function IL(i){for(var o=i.return;o!==null;){switch(o.tag){case 24:case 3:var u=Xr();i=Gs(u);var p=Ws(o,i,u);p!==null&&(Mr(p,o,u),hu(p,o,u)),o={cache:jm()},i.payload=o;return}o=o.return}}function ML(i,o,u){var p=Xr();u={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Yf(i)?mS(o,u):(u=Tm(i,o,u,p),u!==null&&(Mr(u,i,p),gS(u,o,p)))}function hS(i,o,u){var p=Xr();vu(i,o,u,p)}function vu(i,o,u,p){var x={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Yf(i))mS(o,x);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=o.lastRenderedReducer,w!==null))try{var I=o.lastRenderedState,G=w(I,u);if(x.hasEagerState=!0,x.eagerState=G,Hr(G,I))return Af(i,o,x,0),yn===null&&_f(),!1}catch{}if(u=Tm(i,o,x,p),u!==null)return Mr(u,i,p),gS(u,o,p),!0}return!1}function lg(i,o,u,p){if(p={lane:2,revertLane:Bg(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Yf(i)){if(o)throw Error(r(479))}else o=Tm(i,u,p,2),o!==null&&Mr(o,i,2)}function Yf(i){var o=i.alternate;return i===Ot||o!==null&&o===Ot}function mS(i,o){qa=Uf=!0;var u=i.pending;u===null?o.next=o:(o.next=u.next,u.next=o),i.pending=o}function gS(i,o,u){if((u&4194048)!==0){var p=o.lanes;p&=i.pendingLanes,u|=p,o.lanes=u,De(i,u)}}var xu={readContext:ir,use:Vf,useCallback:Mn,useContext:Mn,useEffect:Mn,useImperativeHandle:Mn,useLayoutEffect:Mn,useInsertionEffect:Mn,useMemo:Mn,useReducer:Mn,useRef:Mn,useState:Mn,useDebugValue:Mn,useDeferredValue:Mn,useTransition:Mn,useSyncExternalStore:Mn,useId:Mn,useHostTransitionStatus:Mn,useFormState:Mn,useActionState:Mn,useOptimistic:Mn,useMemoCache:Mn,useCacheRefresh:Mn};xu.useEffectEvent=Mn;var bS={readContext:ir,use:Vf,useCallback:function(i,o){return vr().memoizedState=[i,o===void 0?null:o],i},useContext:ir,useEffect:eS,useImperativeHandle:function(i,o,u){u=u!=null?u.concat([i]):null,Wf(4194308,4,iS.bind(null,o,i),u)},useLayoutEffect:function(i,o){return Wf(4194308,4,i,o)},useInsertionEffect:function(i,o){Wf(4,2,i,o)},useMemo:function(i,o){var u=vr();o=o===void 0?null:o;var p=i();if(Go){St(!0);try{i()}finally{St(!1)}}return u.memoizedState=[p,o],p},useReducer:function(i,o,u){var p=vr();if(u!==void 0){var x=u(o);if(Go){St(!0);try{u(o)}finally{St(!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=ML.bind(null,Ot,i),[p.memoizedState,i]},useRef:function(i){var o=vr();return i={current:i},o.memoizedState=i},useState:function(i){i=tg(i);var o=i.queue,u=hS.bind(null,Ot,o);return o.dispatch=u,[i.memoizedState,u]},useDebugValue:ig,useDeferredValue:function(i,o){var u=vr();return sg(u,i,o)},useTransition:function(){var i=tg(!1);return i=uS.bind(null,Ot,i.queue,!0,!1),vr().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,o,u){var p=Ot,x=vr();if(Kt){if(u===void 0)throw Error(r(407));u=u()}else{if(u=o(),yn===null)throw Error(r(349));(Vt&127)!==0||Pk(p,o,u)}x.memoizedState=u;var w={value:u,getSnapshot:o};return x.queue=w,eS(Bk.bind(null,p,w,i),[i]),p.flags|=2048,Va(9,{destroy:void 0},$k.bind(null,p,w,u,o),null),u},useId:function(){var i=vr(),o=yn.identifierPrefix;if(Kt){var u=ji,p=Li;u=(p&~(1<<32-nt(p)-1)).toString(32)+u,o="_"+o+"R_"+u,u=qf++,0<u&&(o+="H"+u.toString(32)),o+="_"}else u=RL++,o="_"+o+"r_"+u.toString(32)+"_";return i.memoizedState=o},useHostTransitionStatus:ag,useFormState:Yk,useActionState:Yk,useOptimistic:function(i){var o=vr();o.memoizedState=o.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=u,o=lg.bind(null,Ot,!0,u),u.dispatch=o,[i,o]},useMemoCache:Qm,useCacheRefresh:function(){return vr().memoizedState=IL.bind(null,Ot)},useEffectEvent:function(i){var o=vr(),u={impl:i};return o.memoizedState=u,function(){if((nn&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},ug={readContext:ir,use:Vf,useCallback:oS,useContext:ir,useEffect:rg,useImperativeHandle:sS,useInsertionEffect:nS,useLayoutEffect:rS,useMemo:aS,useReducer:Gf,useRef:Jk,useState:function(){return Gf(os)},useDebugValue:ig,useDeferredValue:function(i,o){var u=zn();return lS(u,cn.memoizedState,i,o)},useTransition:function(){var i=Gf(os)[0],o=zn().memoizedState;return[typeof i=="boolean"?i:yu(i),o]},useSyncExternalStore:zk,useId:dS,useHostTransitionStatus:ag,useFormState:Xk,useActionState:Xk,useOptimistic:function(i,o){var u=zn();return qk(u,cn,i,o)},useMemoCache:Qm,useCacheRefresh:pS};ug.useEffectEvent=tS;var yS={readContext:ir,use:Vf,useCallback:oS,useContext:ir,useEffect:rg,useImperativeHandle:sS,useInsertionEffect:nS,useLayoutEffect:rS,useMemo:aS,useReducer:eg,useRef:Jk,useState:function(){return eg(os)},useDebugValue:ig,useDeferredValue:function(i,o){var u=zn();return cn===null?sg(u,i,o):lS(u,cn.memoizedState,i,o)},useTransition:function(){var i=eg(os)[0],o=zn().memoizedState;return[typeof i=="boolean"?i:yu(i),o]},useSyncExternalStore:zk,useId:dS,useHostTransitionStatus:ag,useFormState:Qk,useActionState:Qk,useOptimistic:function(i,o){var u=zn();return cn!==null?qk(u,cn,i,o):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:Qm,useCacheRefresh:pS};yS.useEffectEvent=tS;function cg(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 fg={enqueueSetState:function(i,o,u){i=i._reactInternals;var p=Xr(),x=Gs(p);x.payload=o,u!=null&&(x.callback=u),o=Ws(i,x,p),o!==null&&(Mr(o,i,p),hu(o,i,p))},enqueueReplaceState:function(i,o,u){i=i._reactInternals;var p=Xr(),x=Gs(p);x.tag=1,x.payload=o,u!=null&&(x.callback=u),o=Ws(i,x,p),o!==null&&(Mr(o,i,p),hu(o,i,p))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var u=Xr(),p=Gs(u);p.tag=2,o!=null&&(p.callback=o),o=Ws(i,p,u),o!==null&&(Mr(o,i,u),hu(o,i,u))}};function vS(i,o,u,p,x,w,I){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,w,I):o.prototype&&o.prototype.isPureReactComponent?!ou(u,p)||!ou(x,w):!0}function xS(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&&fg.enqueueReplaceState(o,o.state,null)}function Wo(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 kS(i){Cf(i)}function SS(i){console.error(i)}function wS(i){Cf(i)}function Xf(i,o){try{var u=i.onUncaughtError;u(o.value,{componentStack:o.stack})}catch(p){setTimeout(function(){throw p})}}function ES(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 dg(i,o,u){return u=Gs(u),u.tag=3,u.payload={element:null},u.callback=function(){Xf(i,o)},u}function TS(i){return i=Gs(i),i.tag=3,i}function RS(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(){ES(o,u,p)}}var I=u.stateNode;I!==null&&typeof I.componentDidCatch=="function"&&(i.callback=function(){ES(o,u,p),typeof x!="function"&&(Js===null?Js=new Set([this]):Js.add(this));var G=p.stack;this.componentDidCatch(p.value,{componentStack:G!==null?G:""})})}function DL(i,o,u,p,x){if(u.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(o=u.alternate,o!==null&&za(o,u,x,!0),u=Gr.current,u!==null){switch(u.tag){case 31:case 13:return ci===null?ld():u.alternate===null&&Dn===0&&(Dn=3),u.flags&=-257,u.flags|=65536,u.lanes=x,p===zf?u.flags|=16384:(o=u.updateQueue,o===null?u.updateQueue=new Set([p]):o.add(p),zg(i,p,x)),!1;case 22:return u.flags|=65536,p===zf?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)),zg(i,p,x)),!1}throw Error(r(435,u.tag))}return zg(i,p,x),ld(),!1}if(Kt)return o=Gr.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=x,p!==Om&&(i=Error(r(422),{cause:p}),uu(oi(i,u)))):(p!==Om&&(o=Error(r(423),{cause:p}),uu(oi(o,u))),i=i.current.alternate,i.flags|=65536,x&=-x,i.lanes|=x,p=oi(p,u),x=dg(i.stateNode,p,x),Um(i,x),Dn!==4&&(Dn=2)),!1;var w=Error(r(520),{cause:p});if(w=oi(w,u),_u===null?_u=[w]:_u.push(w),Dn!==4&&(Dn=2),o===null)return!0;p=oi(p,u),u=o;do{switch(u.tag){case 3:return u.flags|=65536,i=x&-x,u.lanes|=i,i=dg(u.stateNode,p,i),Um(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"&&(Js===null||!Js.has(w))))return u.flags|=65536,x&=-x,u.lanes|=x,x=TS(x),RS(x,i,u,p),Um(u,x),!1}u=u.return}while(u!==null);return!1}var pg=Error(r(461)),Gn=!1;function sr(i,o,u,p){o.child=i===null?Nk(o,null,u,p):Vo(o,i.child,u,p)}function CS(i,o,u,p,x){u=u.render;var w=o.ref;if("ref"in p){var I={};for(var G in p)G!=="ref"&&(I[G]=p[G])}else I=p;return Fo(o),p=Km(i,o,u,I,w,x),G=Ym(),i!==null&&!Gn?(Xm(i,o,x),as(i,o,x)):(Kt&&G&&Am(o),o.flags|=1,sr(i,o,p,x),o.child)}function _S(i,o,u,p,x){if(i===null){var w=u.type;return typeof w=="function"&&!Rm(w)&&w.defaultProps===void 0&&u.compare===null?(o.tag=15,o.type=w,AS(i,o,w,p,x)):(i=Of(u.type,null,p,o,o.mode,x),i.ref=o.ref,i.return=o,o.child=i)}if(w=i.child,!kg(i,x)){var I=w.memoizedProps;if(u=u.compare,u=u!==null?u:ou,u(I,p)&&i.ref===o.ref)return as(i,o,x)}return o.flags|=1,i=ts(w,p),i.ref=o.ref,i.return=o,o.child=i}function AS(i,o,u,p,x){if(i!==null){var w=i.memoizedProps;if(ou(w,p)&&i.ref===o.ref)if(Gn=!1,o.pendingProps=p=w,kg(i,x))(i.flags&131072)!==0&&(Gn=!0);else return o.lanes=i.lanes,as(i,o,x)}return hg(i,o,u,p,x)}function NS(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 OS(i,o,w,u,p)}if((u&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},i!==null&&Lf(o,w!==null?w.cachePool:null),w!==null?Mk(o,w):Hm(),Dk(o);else return p=o.lanes=536870912,OS(i,o,w!==null?w.baseLanes|u:u,u,p)}else w!==null?(Lf(o,w.cachePool),Mk(o,w),Ys(),o.memoizedState=null):(i!==null&&Lf(o,null),Hm(),Ys());return sr(i,o,x,u),o.child}function ku(i,o){return i!==null&&i.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function OS(i,o,u,p,x){var w=Pm();return w=w===null?null:{parent:Hn._currentValue,pool:w},o.memoizedState={baseLanes:u,cachePool:w},i!==null&&Lf(o,null),Hm(),Dk(o),i!==null&&za(i,o,p,!0),o.childLanes=x,null}function Zf(i,o){return o=Jf({mode:o.mode,children:o.children},i.mode),o.ref=i.ref,i.child=o,o.return=i,o}function IS(i,o,u){return Vo(o,i.child,null,u),i=Zf(o,o.pendingProps),i.flags|=2,Wr(o),o.memoizedState=null,i}function LL(i,o,u){var p=o.pendingProps,x=(o.flags&128)!==0;if(o.flags&=-129,i===null){if(Kt){if(p.mode==="hidden")return i=Zf(o,p),o.lanes=536870912,ku(null,i);if(Gm(o),(i=Tn)?(i=H1(i,ui),i=i!==null&&i.data==="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:Fs!==null?{id:Li,overflow:ji}:null,retryLane:536870912,hydrationErrors:null},u=mk(i),u.return=o,o.child=u,rr=o,Tn=null)):i=null,i===null)throw qs(o);return o.lanes=536870912,null}return Zf(o,p)}var w=i.memoizedState;if(w!==null){var I=w.dehydrated;if(Gm(o),x)if(o.flags&256)o.flags&=-257,o=IS(i,o,u);else if(o.memoizedState!==null)o.child=i.child,o.flags|=128,o=null;else throw Error(r(558));else if(Gn||za(i,o,u,!1),x=(u&i.childLanes)!==0,Gn||x){if(p=yn,p!==null&&(I=je(p,u),I!==0&&I!==w.retryLane))throw w.retryLane=I,zo(i,I),Mr(p,i,I),pg;ld(),o=IS(i,o,u)}else i=w.treeContext,Tn=fi(I.nextSibling),rr=o,Kt=!0,Us=null,ui=!1,i!==null&&yk(o,i),o=Zf(o,p),o.flags|=4096;return o}return i=ts(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 hg(i,o,u,p,x){return Fo(o),u=Km(i,o,u,p,void 0,x),p=Ym(),i!==null&&!Gn?(Xm(i,o,x),as(i,o,x)):(Kt&&p&&Am(o),o.flags|=1,sr(i,o,u,x),o.child)}function MS(i,o,u,p,x,w){return Fo(o),o.updateQueue=null,u=jk(o,p,u,x),Lk(i),p=Ym(),i!==null&&!Gn?(Xm(i,o,w),as(i,o,w)):(Kt&&p&&Am(o),o.flags|=1,sr(i,o,u,w),o.child)}function DS(i,o,u,p,x){if(Fo(o),o.stateNode===null){var w=Ma,I=u.contextType;typeof I=="object"&&I!==null&&(w=ir(I)),w=new u(p,w),o.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=fg,o.stateNode=w,w._reactInternals=o,w=o.stateNode,w.props=p,w.state=o.memoizedState,w.refs={},Bm(o),I=u.contextType,w.context=typeof I=="object"&&I!==null?ir(I):Ma,w.state=o.memoizedState,I=u.getDerivedStateFromProps,typeof I=="function"&&(cg(o,u,I,p),w.state=o.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(I=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),I!==w.state&&fg.enqueueReplaceState(w,w.state,null),gu(o,p,w,x),mu(),w.state=o.memoizedState),typeof w.componentDidMount=="function"&&(o.flags|=4194308),p=!0}else if(i===null){w=o.stateNode;var G=o.memoizedProps,J=Wo(u,G);w.props=J;var pe=w.context,Te=u.contextType;I=Ma,typeof Te=="object"&&Te!==null&&(I=ir(Te));var Oe=u.getDerivedStateFromProps;Te=typeof Oe=="function"||typeof w.getSnapshotBeforeUpdate=="function",G=o.pendingProps!==G,Te||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(G||pe!==I)&&xS(o,w,p,I),Vs=!1;var he=o.memoizedState;w.state=he,gu(o,p,w,x),mu(),pe=o.memoizedState,G||he!==pe||Vs?(typeof Oe=="function"&&(cg(o,u,Oe,p),pe=o.memoizedState),(J=Vs||vS(o,u,J,p,he,pe,I))?(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=I,p=J):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),p=!1)}else{w=o.stateNode,Fm(i,o),I=o.memoizedProps,Te=Wo(u,I),w.props=Te,Oe=o.pendingProps,he=w.context,pe=u.contextType,J=Ma,typeof pe=="object"&&pe!==null&&(J=ir(pe)),G=u.getDerivedStateFromProps,(pe=typeof G=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(I!==Oe||he!==J)&&xS(o,w,p,J),Vs=!1,he=o.memoizedState,w.state=he,gu(o,p,w,x),mu();var ve=o.memoizedState;I!==Oe||he!==ve||Vs||i!==null&&i.dependencies!==null&&Mf(i.dependencies)?(typeof G=="function"&&(cg(o,u,G,p),ve=o.memoizedState),(Te=Vs||vS(o,u,Te,p,he,ve,J)||i!==null&&i.dependencies!==null&&Mf(i.dependencies))?(pe||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(p,ve,J),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(p,ve,J)),typeof w.componentDidUpdate=="function"&&(o.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof w.componentDidUpdate!="function"||I===i.memoizedProps&&he===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&he===i.memoizedState||(o.flags|=1024),o.memoizedProps=p,o.memoizedState=ve),w.props=p,w.state=ve,w.context=J,p=Te):(typeof w.componentDidUpdate!="function"||I===i.memoizedProps&&he===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&he===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=Vo(o,i.child,null,x),o.child=Vo(o,null,u,x)):sr(i,o,u,x),o.memoizedState=w.state,i=o.child):i=as(i,o,x),i}function LS(i,o,u,p){return $o(),o.flags|=256,sr(i,o,u,p),o.child}var mg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gg(i){return{baseLanes:i,cachePool:Ek()}}function bg(i,o,u){return i=i!==null?i.childLanes&~u:0,o&&(i|=Yr),i}function jS(i,o,u){var p=o.pendingProps,x=!1,w=(o.flags&128)!==0,I;if((I=w)||(I=i!==null&&i.memoizedState===null?!1:(jn.current&2)!==0),I&&(x=!0,o.flags&=-129),I=(o.flags&32)!==0,o.flags&=-33,i===null){if(Kt){if(x?Ks(o):Ys(),(i=Tn)?(i=H1(i,ui),i=i!==null&&i.data!=="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:Fs!==null?{id:Li,overflow:ji}:null,retryLane:536870912,hydrationErrors:null},u=mk(i),u.return=o,o.child=u,rr=o,Tn=null)):i=null,i===null)throw qs(o);return Jg(i)?o.lanes=32:o.lanes=536870912,null}var G=p.children;return p=p.fallback,x?(Ys(),x=o.mode,G=Jf({mode:"hidden",children:G},x),p=Po(p,x,u,null),G.return=o,p.return=o,G.sibling=p,o.child=G,p=o.child,p.memoizedState=gg(u),p.childLanes=bg(i,I,u),o.memoizedState=mg,ku(null,p)):(Ks(o),yg(o,G))}var J=i.memoizedState;if(J!==null&&(G=J.dehydrated,G!==null)){if(w)o.flags&256?(Ks(o),o.flags&=-257,o=vg(i,o,u)):o.memoizedState!==null?(Ys(),o.child=i.child,o.flags|=128,o=null):(Ys(),G=p.fallback,x=o.mode,p=Jf({mode:"visible",children:p.children},x),G=Po(G,x,u,null),G.flags|=2,p.return=o,G.return=o,p.sibling=G,o.child=p,Vo(o,i.child,null,u),p=o.child,p.memoizedState=gg(u),p.childLanes=bg(i,I,u),o.memoizedState=mg,o=ku(null,p));else if(Ks(o),Jg(G)){if(I=G.nextSibling&&G.nextSibling.dataset,I)var pe=I.dgst;I=pe,p=Error(r(419)),p.stack="",p.digest=I,uu({value:p,source:null,stack:null}),o=vg(i,o,u)}else if(Gn||za(i,o,u,!1),I=(u&i.childLanes)!==0,Gn||I){if(I=yn,I!==null&&(p=je(I,u),p!==0&&p!==J.retryLane))throw J.retryLane=p,zo(i,p),Mr(I,i,p),pg;Qg(G)||ld(),o=vg(i,o,u)}else Qg(G)?(o.flags|=192,o.child=i.child,o=null):(i=J.treeContext,Tn=fi(G.nextSibling),rr=o,Kt=!0,Us=null,ui=!1,i!==null&&yk(o,i),o=yg(o,p.children),o.flags|=4096);return o}return x?(Ys(),G=p.fallback,x=o.mode,J=i.child,pe=J.sibling,p=ts(J,{mode:"hidden",children:p.children}),p.subtreeFlags=J.subtreeFlags&65011712,pe!==null?G=ts(pe,G):(G=Po(G,x,u,null),G.flags|=2),G.return=o,p.return=o,p.sibling=G,o.child=p,ku(null,p),p=o.child,G=i.child.memoizedState,G===null?G=gg(u):(x=G.cachePool,x!==null?(J=Hn._currentValue,x=x.parent!==J?{parent:J,pool:J}:x):x=Ek(),G={baseLanes:G.baseLanes|u,cachePool:x}),p.memoizedState=G,p.childLanes=bg(i,I,u),o.memoizedState=mg,ku(i.child,p)):(Ks(o),u=i.child,i=u.sibling,u=ts(u,{mode:"visible",children:p.children}),u.return=o,u.sibling=null,i!==null&&(I=o.deletions,I===null?(o.deletions=[i],o.flags|=16):I.push(i)),o.child=u,o.memoizedState=null,u)}function yg(i,o){return o=Jf({mode:"visible",children:o},i.mode),o.return=i,i.child=o}function Jf(i,o){return i=Vr(22,i,null,o),i.lanes=0,i}function vg(i,o,u){return Vo(o,i.child,null,u),i=yg(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function zS(i,o,u){i.lanes|=o;var p=i.alternate;p!==null&&(p.lanes|=o),Dm(i.return,o,u)}function xg(i,o,u,p,x,w){var I=i.memoizedState;I===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:p,tail:u,tailMode:x,treeForkCount:w}:(I.isBackwards=o,I.rendering=null,I.renderingStartTime=0,I.last=p,I.tail=u,I.tailMode=x,I.treeForkCount=w)}function PS(i,o,u){var p=o.pendingProps,x=p.revealOrder,w=p.tail;p=p.children;var I=jn.current,G=(I&2)!==0;if(G?(I=I&1|2,o.flags|=128):I&=1,L(jn,I),sr(i,o,p,u),p=Kt?lu:0,!G&&i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&zS(i,u,o);else if(i.tag===19)zS(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&&Ff(i)===null&&(x=u),u=u.sibling;u=x,u===null?(x=o.child,o.child=null):(x=u.sibling,u.sibling=null),xg(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&&Ff(i)===null){o.child=x;break}i=x.sibling,x.sibling=u,u=x,x=i}xg(o,!0,u,null,w,p);break;case"together":xg(o,!1,null,null,void 0,p);break;default:o.memoizedState=null}return o.child}function as(i,o,u){if(i!==null&&(o.dependencies=i.dependencies),Qs|=o.lanes,(u&o.childLanes)===0)if(i!==null){if(za(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=ts(i,i.pendingProps),o.child=u,u.return=o;i.sibling!==null;)i=i.sibling,u=u.sibling=ts(i,i.pendingProps),u.return=o;u.sibling=null}return o.child}function kg(i,o){return(i.lanes&o)!==0?!0:(i=i.dependencies,!!(i!==null&&Mf(i)))}function jL(i,o,u){switch(o.tag){case 3:le(o,o.stateNode.containerInfo),Hs(o,Hn,i.memoizedState.cache),$o();break;case 27:case 5:Ee(o);break;case 4:le(o,o.stateNode.containerInfo);break;case 10:Hs(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,Gm(o),null;break;case 13:var p=o.memoizedState;if(p!==null)return p.dehydrated!==null?(Ks(o),o.flags|=128,null):(u&o.child.childLanes)!==0?jS(i,o,u):(Ks(o),i=as(i,o,u),i!==null?i.sibling:null);Ks(o);break;case 19:var x=(i.flags&128)!==0;if(p=(u&o.childLanes)!==0,p||(za(i,o,u,!1),p=(u&o.childLanes)!==0),x){if(p)return PS(i,o,u);o.flags|=128}if(x=o.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),L(jn,jn.current),p)break;return null;case 22:return o.lanes=0,NS(i,o,u,o.pendingProps);case 24:Hs(o,Hn,i.memoizedState.cache)}return as(i,o,u)}function $S(i,o,u){if(i!==null)if(i.memoizedProps!==o.pendingProps)Gn=!0;else{if(!kg(i,u)&&(o.flags&128)===0)return Gn=!1,jL(i,o,u);Gn=(i.flags&131072)!==0}else Gn=!1,Kt&&(o.flags&1048576)!==0&&bk(o,lu,o.index);switch(o.lanes=0,o.tag){case 16:e:{var p=o.pendingProps;if(i=qo(o.elementType),o.type=i,typeof i=="function")Rm(i)?(p=Wo(i,p),o.tag=1,o=DS(null,o,i,p,u)):(o.tag=0,o=hg(null,o,i,p,u));else{if(i!=null){var x=i.$$typeof;if(x===_){o.tag=11,o=CS(null,o,i,p,u);break e}else if(x===M){o.tag=14,o=_S(null,o,i,p,u);break e}}throw o=z(i)||i,Error(r(306,o,""))}}return o;case 0:return hg(i,o,o.type,o.pendingProps,u);case 1:return p=o.type,x=Wo(p,o.pendingProps),DS(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,Fm(i,o),gu(o,p,null,u);var I=o.memoizedState;if(p=I.cache,Hs(o,Hn,p),p!==w.cache&&Lm(o,[Hn],u,!0),mu(),p=I.element,w.isDehydrated)if(w={element:p,isDehydrated:!1,cache:I.cache},o.updateQueue.baseState=w,o.memoizedState=w,o.flags&256){o=LS(i,o,p,u);break e}else if(p!==x){x=oi(Error(r(424)),o),uu(x),o=LS(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,Tn=fi(i.firstChild),rr=o,Kt=!0,Us=null,ui=!0,u=Nk(o,null,p,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if($o(),p===x){o=as(i,o,u);break e}sr(i,o,p,u)}o=o.child}return o;case 26:return Qf(i,o),i===null?(u=X1(o.type,null,o.pendingProps,null))?o.memoizedState=u:Kt||(u=o.type,i=o.pendingProps,p=md(ne.current).createElement(u),p[Tt]=o,p[Qt]=i,or(p,u,i),Un(p),o.stateNode=p):o.memoizedState=X1(o.type,i.memoizedProps,o.pendingProps,i.memoizedState),null;case 27:return Ee(o),i===null&&Kt&&(p=o.stateNode=W1(o.type,o.pendingProps,ne.current),rr=o,ui=!0,x=Tn,ro(o.type)?(eb=x,Tn=fi(p.firstChild)):Tn=x),sr(i,o,o.pendingProps.children,u),Qf(i,o),i===null&&(o.flags|=4194304),o.child;case 5:return i===null&&Kt&&((x=p=Tn)&&(p=dj(p,o.type,o.pendingProps,ui),p!==null?(o.stateNode=p,rr=o,Tn=fi(p.firstChild),ui=!1,x=!0):x=!1),x||qs(o)),Ee(o),x=o.type,w=o.pendingProps,I=i!==null?i.memoizedProps:null,p=w.children,Yg(x,w)?p=null:I!==null&&Yg(x,I)&&(o.flags|=32),o.memoizedState!==null&&(x=Km(i,o,CL,null,null,u),ju._currentValue=x),Qf(i,o),sr(i,o,p,u),o.child;case 6:return i===null&&Kt&&((i=u=Tn)&&(u=pj(u,o.pendingProps,ui),u!==null?(o.stateNode=u,rr=o,Tn=null,i=!0):i=!1),i||qs(o)),null;case 13:return jS(i,o,u);case 4:return le(o,o.stateNode.containerInfo),p=o.pendingProps,i===null?o.child=Vo(o,null,p,u):sr(i,o,p,u),o.child;case 11:return CS(i,o,o.type,o.pendingProps,u);case 7:return sr(i,o,o.pendingProps,u),o.child;case 8:return sr(i,o,o.pendingProps.children,u),o.child;case 12:return sr(i,o,o.pendingProps.children,u),o.child;case 10:return p=o.pendingProps,Hs(o,o.type,p.value),sr(i,o,p.children,u),o.child;case 9:return x=o.type._context,p=o.pendingProps.children,Fo(o),x=ir(x),p=p(x),o.flags|=1,sr(i,o,p,u),o.child;case 14:return _S(i,o,o.type,o.pendingProps,u);case 15:return AS(i,o,o.type,o.pendingProps,u);case 19:return PS(i,o,u);case 31:return LL(i,o,u);case 22:return NS(i,o,u,o.pendingProps);case 24:return Fo(o),p=ir(Hn),i===null?(x=Pm(),x===null&&(x=yn,w=jm(),x.pooledCache=w,w.refCount++,w!==null&&(x.pooledCacheLanes|=u),x=w),o.memoizedState={parent:p,cache:x},Bm(o),Hs(o,Hn,x)):((i.lanes&u)!==0&&(Fm(i,o),gu(o,null,null,u),mu()),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),Hs(o,Hn,p)):(p=w.cache,Hs(o,Hn,p),p!==x.cache&&Lm(o,[Hn],u,!0))),sr(i,o,o.pendingProps.children,u),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}function ls(i){i.flags|=4}function Sg(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(d1())i.flags|=8192;else throw Ho=zf,$m}else i.flags&=-16777217}function BS(i,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!tw(o))if(d1())i.flags|=8192;else throw Ho=zf,$m}function ed(i,o){o!==null&&(i.flags|=4),i.flags&16384&&(o=i.tag!==22?Xe():536870912,i.lanes|=o,Ya|=o)}function Su(i,o){if(!Kt)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 Rn(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 zL(i,o,u){var p=o.pendingProps;switch(Nm(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rn(o),null;case 1:return Rn(o),null;case 3:return u=o.stateNode,p=null,i!==null&&(p=i.memoizedState.cache),o.memoizedState.cache!==p&&(o.flags|=2048),is(Hn),ce(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(ja(o)?ls(o):i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Im())),Rn(o),null;case 26:var x=o.type,w=o.memoizedState;return i===null?(ls(o),w!==null?(Rn(o),BS(o,w)):(Rn(o),Sg(o,x,null,p,u))):w?w!==i.memoizedState?(ls(o),Rn(o),BS(o,w)):(Rn(o),o.flags&=-16777217):(i=i.memoizedProps,i!==p&&ls(o),Rn(o),Sg(o,x,i,p,u)),null;case 27:if(be(o),u=ne.current,x=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==p&&ls(o);else{if(!p){if(o.stateNode===null)throw Error(r(166));return Rn(o),null}i=X.current,ja(o)?vk(o):(i=W1(x,p,u),o.stateNode=i,ls(o))}return Rn(o),null;case 5:if(be(o),x=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==p&&ls(o);else{if(!p){if(o.stateNode===null)throw Error(r(166));return Rn(o),null}if(w=X.current,ja(o))vk(o);else{var I=md(ne.current);switch(w){case 1:w=I.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:w=I.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":w=I.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":w=I.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;case"script":w=I.createElement("div"),w.innerHTML="<script><\/script>",w=w.removeChild(w.firstChild);break;case"select":w=typeof p.is=="string"?I.createElement("select",{is:p.is}):I.createElement("select"),p.multiple?w.multiple=!0:p.size&&(w.size=p.size);break;default:w=typeof p.is=="string"?I.createElement(x,{is:p.is}):I.createElement(x)}}w[Tt]=o,w[Qt]=p;e:for(I=o.child;I!==null;){if(I.tag===5||I.tag===6)w.appendChild(I.stateNode);else if(I.tag!==4&&I.tag!==27&&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}o.stateNode=w;e:switch(or(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&&ls(o)}}return Rn(o),Sg(o,o.type,i===null?null:i.memoizedProps,o.pendingProps,u),null;case 6:if(i&&o.stateNode!=null)i.memoizedProps!==p&&ls(o);else{if(typeof p!="string"&&o.stateNode===null)throw Error(r(166));if(i=ne.current,ja(o)){if(i=o.stateNode,u=o.memoizedProps,p=null,x=rr,x!==null)switch(x.tag){case 27:case 5:p=x.memoizedProps}i[Tt]=o,i=!!(i.nodeValue===u||p!==null&&p.suppressHydrationWarning===!0||j1(i.nodeValue,u)),i||qs(o,!0)}else i=md(i).createTextNode(p),i[Tt]=o,o.stateNode=i}return Rn(o),null;case 31:if(u=o.memoizedState,i===null||i.memoizedState!==null){if(p=ja(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[Tt]=o}else $o(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Rn(o),i=!1}else u=Im(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return o.flags&256?(Wr(o),o):(Wr(o),null);if((o.flags&128)!==0)throw Error(r(558))}return Rn(o),null;case 13:if(p=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(x=ja(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[Tt]=o}else $o(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Rn(o),x=!1}else x=Im(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=x),x=!0;if(!x)return o.flags&256?(Wr(o),o):(Wr(o),null)}return Wr(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),ed(o,o.updateQueue),Rn(o),null);case 4:return ce(),i===null&&Hg(o.stateNode.containerInfo),Rn(o),null;case 10:return is(o.type),Rn(o),null;case 19:if(V(jn),p=o.memoizedState,p===null)return Rn(o),null;if(x=(o.flags&128)!==0,w=p.rendering,w===null)if(x)Su(p,!1);else{if(Dn!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(w=Ff(i),w!==null){for(o.flags|=128,Su(p,!1),i=w.updateQueue,o.updateQueue=i,ed(o,i),o.subtreeFlags=0,i=u,u=o.child;u!==null;)hk(u,i),u=u.sibling;return L(jn,jn.current&1|2),Kt&&ns(o,p.treeForkCount),o.child}i=i.sibling}p.tail!==null&&ee()>sd&&(o.flags|=128,x=!0,Su(p,!1),o.lanes=4194304)}else{if(!x)if(i=Ff(w),i!==null){if(o.flags|=128,x=!0,i=i.updateQueue,o.updateQueue=i,ed(o,i),Su(p,!0),p.tail===null&&p.tailMode==="hidden"&&!w.alternate&&!Kt)return Rn(o),null}else 2*ee()-p.renderingStartTime>sd&&u!==536870912&&(o.flags|=128,x=!0,Su(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=jn.current,L(jn,x?u&1|2:u&1),Kt&&ns(o,p.treeForkCount),i):(Rn(o),null);case 22:case 23:return Wr(o),Vm(),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&&(Rn(o),o.subtreeFlags&6&&(o.flags|=8192)):Rn(o),u=o.updateQueue,u!==null&&ed(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(Uo),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),o.memoizedState.cache!==u&&(o.flags|=2048),is(Hn),Rn(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function PL(i,o){switch(Nm(o),o.tag){case 1:return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return is(Hn),ce(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 26:case 27:case 5:return be(o),null;case 31:if(o.memoizedState!==null){if(Wr(o),o.alternate===null)throw Error(r(340));$o()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 13:if(Wr(o),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(r(340));$o()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return V(jn),null;case 4:return ce(),null;case 10:return is(o.type),null;case 22:case 23:return Wr(o),Vm(),i!==null&&V(Uo),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 24:return is(Hn),null;case 25:return null;default:return null}}function FS(i,o){switch(Nm(o),o.tag){case 3:is(Hn),ce();break;case 26:case 27:case 5:be(o);break;case 4:ce();break;case 31:o.memoizedState!==null&&Wr(o);break;case 13:Wr(o);break;case 19:V(jn);break;case 10:is(o.type);break;case 22:case 23:Wr(o),Vm(),i!==null&&V(Uo);break;case 24:is(Hn)}}function wu(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,I=u.inst;p=w(),I.destroy=p}u=u.next}while(u!==x)}}catch(G){un(o,o.return,G)}}function Xs(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 I=p.inst,G=I.destroy;if(G!==void 0){I.destroy=void 0,x=o;var J=u,pe=G;try{pe()}catch(Te){un(x,J,Te)}}}p=p.next}while(p!==w)}}catch(Te){un(o,o.return,Te)}}function US(i){var o=i.updateQueue;if(o!==null){var u=i.stateNode;try{Ik(o,u)}catch(p){un(i,i.return,p)}}}function qS(i,o,u){u.props=Wo(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(p){un(i,o,p)}}function Eu(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){un(i,o,x)}}function zi(i,o){var u=i.ref,p=i.refCleanup;if(u!==null)if(typeof p=="function")try{p()}catch(x){un(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){un(i,o,x)}else u.current=null}function HS(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){un(i,i.return,x)}}function wg(i,o,u){try{var p=i.stateNode;oj(p,i.type,u,o),p[Qt]=o}catch(x){un(i,i.return,x)}}function VS(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&ro(i.type)||i.tag===4}function Eg(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||VS(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&&ro(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 Tg(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=Ge));else if(p!==4&&(p===27&&ro(i.type)&&(u=i.stateNode,o=null),i=i.child,i!==null))for(Tg(i,o,u),i=i.sibling;i!==null;)Tg(i,o,u),i=i.sibling}function td(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&&ro(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(td(i,o,u),i=i.sibling;i!==null;)td(i,o,u),i=i.sibling}function GS(i){var o=i.stateNode,u=i.memoizedProps;try{for(var p=i.type,x=o.attributes;x.length;)o.removeAttributeNode(x[0]);or(o,p,u),o[Tt]=i,o[Qt]=u}catch(w){un(i,i.return,w)}}var us=!1,Wn=!1,Rg=!1,WS=typeof WeakSet=="function"?WeakSet:Set,Jn=null;function $L(i,o){if(i=i.containerInfo,Wg=Sd,i=sk(i),vm(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 I=0,G=-1,J=-1,pe=0,Te=0,Oe=i,he=null;t:for(;;){for(var ve;Oe!==u||x!==0&&Oe.nodeType!==3||(G=I+x),Oe!==w||p!==0&&Oe.nodeType!==3||(J=I+p),Oe.nodeType===3&&(I+=Oe.nodeValue.length),(ve=Oe.firstChild)!==null;)he=Oe,Oe=ve;for(;;){if(Oe===i)break t;if(he===u&&++pe===x&&(G=I),he===w&&++Te===p&&(J=I),(ve=Oe.nextSibling)!==null)break;Oe=he,he=Oe.parentNode}Oe=ve}u=G===-1||J===-1?null:{start:G,end:J}}else u=null}u=u||{start:0,end:0}}else u=null;for(Kg={focusedElem:i,selectionRange:u},Sd=!1,Jn=o;Jn!==null;)if(o=Jn,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Jn=i;else for(;Jn!==null;){switch(o=Jn,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 et=Wo(u.type,x);i=p.getSnapshotBeforeUpdate(et,w),p.__reactInternalSnapshotBeforeUpdate=i}catch(kt){un(u,u.return,kt)}}break;case 3:if((i&1024)!==0){if(i=o.stateNode.containerInfo,u=i.nodeType,u===9)Zg(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Zg(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,Jn=i;break}Jn=o.return}}function KS(i,o,u){var p=u.flags;switch(u.tag){case 0:case 11:case 15:fs(i,u),p&4&&wu(5,u);break;case 1:if(fs(i,u),p&4)if(i=u.stateNode,o===null)try{i.componentDidMount()}catch(I){un(u,u.return,I)}else{var x=Wo(u.type,o.memoizedProps);o=o.memoizedState;try{i.componentDidUpdate(x,o,i.__reactInternalSnapshotBeforeUpdate)}catch(I){un(u,u.return,I)}}p&64&&US(u),p&512&&Eu(u,u.return);break;case 3:if(fs(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{Ik(i,o)}catch(I){un(u,u.return,I)}}break;case 27:o===null&&p&4&&GS(u);case 26:case 5:fs(i,u),o===null&&p&4&&HS(u),p&512&&Eu(u,u.return);break;case 12:fs(i,u);break;case 31:fs(i,u),p&4&&ZS(i,u);break;case 13:fs(i,u),p&4&&QS(i,u),p&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=KL.bind(null,u),hj(i,u))));break;case 22:if(p=u.memoizedState!==null||us,!p){o=o!==null&&o.memoizedState!==null||Wn,x=us;var w=Wn;us=p,(Wn=o)&&!w?ds(i,u,(u.subtreeFlags&8772)!==0):fs(i,u),us=x,Wn=w}break;case 30:break;default:fs(i,u)}}function YS(i){var o=i.alternate;o!==null&&(i.alternate=null,YS(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&Fr(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 Cn=null,Ar=!1;function cs(i,o,u){for(u=u.child;u!==null;)XS(i,o,u),u=u.sibling}function XS(i,o,u){if(xt&&typeof xt.onCommitFiberUnmount=="function")try{xt.onCommitFiberUnmount(Je,u)}catch{}switch(u.tag){case 26:Wn||zi(u,o),cs(i,o,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Wn||zi(u,o);var p=Cn,x=Ar;ro(u.type)&&(Cn=u.stateNode,Ar=!1),cs(i,o,u),Mu(u.stateNode),Cn=p,Ar=x;break;case 5:Wn||zi(u,o);case 6:if(p=Cn,x=Ar,Cn=null,cs(i,o,u),Cn=p,Ar=x,Cn!==null)if(Ar)try{(Cn.nodeType===9?Cn.body:Cn.nodeName==="HTML"?Cn.ownerDocument.body:Cn).removeChild(u.stateNode)}catch(w){un(u,o,w)}else try{Cn.removeChild(u.stateNode)}catch(w){un(u,o,w)}break;case 18:Cn!==null&&(Ar?(i=Cn,U1(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),rl(i)):U1(Cn,u.stateNode));break;case 4:p=Cn,x=Ar,Cn=u.stateNode.containerInfo,Ar=!0,cs(i,o,u),Cn=p,Ar=x;break;case 0:case 11:case 14:case 15:Xs(2,u,o),Wn||Xs(4,u,o),cs(i,o,u);break;case 1:Wn||(zi(u,o),p=u.stateNode,typeof p.componentWillUnmount=="function"&&qS(u,o,p)),cs(i,o,u);break;case 21:cs(i,o,u);break;case 22:Wn=(p=Wn)||u.memoizedState!==null,cs(i,o,u),Wn=p;break;default:cs(i,o,u)}}function ZS(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{rl(i)}catch(u){un(o,o.return,u)}}}function QS(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{rl(i)}catch(u){un(o,o.return,u)}}function BL(i){switch(i.tag){case 31:case 13:case 19:var o=i.stateNode;return o===null&&(o=i.stateNode=new WS),o;case 22:return i=i.stateNode,o=i._retryCache,o===null&&(o=i._retryCache=new WS),o;default:throw Error(r(435,i.tag))}}function nd(i,o){var u=BL(i);o.forEach(function(p){if(!u.has(p)){u.add(p);var x=YL.bind(null,i,p);p.then(x,x)}})}function Nr(i,o){var u=o.deletions;if(u!==null)for(var p=0;p<u.length;p++){var x=u[p],w=i,I=o,G=I;e:for(;G!==null;){switch(G.tag){case 27:if(ro(G.type)){Cn=G.stateNode,Ar=!1;break e}break;case 5:Cn=G.stateNode,Ar=!1;break e;case 3:case 4:Cn=G.stateNode.containerInfo,Ar=!0;break e}G=G.return}if(Cn===null)throw Error(r(160));XS(w,I,x),Cn=null,Ar=!1,w=x.alternate,w!==null&&(w.return=null),x.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)JS(o,i),o=o.sibling}var ki=null;function JS(i,o){var u=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Nr(o,i),Or(i),p&4&&(Xs(3,i,i.return),wu(3,i),Xs(5,i,i.return));break;case 1:Nr(o,i),Or(i),p&512&&(Wn||u===null||zi(u,u.return)),p&64&&us&&(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=ki;if(Nr(o,i),Or(i),p&512&&(Wn||u===null||zi(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[ri]||w[Tt]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=x.createElement(p),x.head.insertBefore(w,x.querySelector("head > title"))),or(w,p,u),w[Tt]=i,Un(w),p=w;break e;case"link":var I=J1("link","href",x).get(p+(u.href||""));if(I){for(var G=0;G<I.length;G++)if(w=I[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)){I.splice(G,1);break t}}w=x.createElement(p),or(w,p,u),x.head.appendChild(w);break;case"meta":if(I=J1("meta","content",x).get(p+(u.content||""))){for(G=0;G<I.length;G++)if(w=I[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)){I.splice(G,1);break t}}w=x.createElement(p),or(w,p,u),x.head.appendChild(w);break;default:throw Error(r(468,p))}w[Tt]=i,Un(w),p=w}i.stateNode=p}else ew(x,i.type,i.stateNode);else i.stateNode=Q1(x,p,i.memoizedProps);else w!==p?(w===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):w.count--,p===null?ew(x,i.type,i.stateNode):Q1(x,p,i.memoizedProps)):p===null&&i.stateNode!==null&&wg(i,i.memoizedProps,u.memoizedProps)}break;case 27:Nr(o,i),Or(i),p&512&&(Wn||u===null||zi(u,u.return)),u!==null&&p&4&&wg(i,i.memoizedProps,u.memoizedProps);break;case 5:if(Nr(o,i),Or(i),p&512&&(Wn||u===null||zi(u,u.return)),i.flags&32){x=i.stateNode;try{wt(x,"")}catch(et){un(i,i.return,et)}}p&4&&i.stateNode!=null&&(x=i.memoizedProps,wg(i,x,u!==null?u.memoizedProps:x)),p&1024&&(Rg=!0);break;case 6:if(Nr(o,i),Or(i),p&4){if(i.stateNode===null)throw Error(r(162));p=i.memoizedProps,u=i.stateNode;try{u.nodeValue=p}catch(et){un(i,i.return,et)}}break;case 3:if(yd=null,x=ki,ki=gd(o.containerInfo),Nr(o,i),ki=x,Or(i),p&4&&u!==null&&u.memoizedState.isDehydrated)try{rl(o.containerInfo)}catch(et){un(i,i.return,et)}Rg&&(Rg=!1,e1(i));break;case 4:p=ki,ki=gd(i.stateNode.containerInfo),Nr(o,i),Or(i),ki=p;break;case 12:Nr(o,i),Or(i);break;case 31:Nr(o,i),Or(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,nd(i,p)));break;case 13:Nr(o,i),Or(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(id=ee()),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,nd(i,p)));break;case 22:x=i.memoizedState!==null;var J=u!==null&&u.memoizedState!==null,pe=us,Te=Wn;if(us=pe||x,Wn=Te||J,Nr(o,i),Wn=Te,us=pe,Or(i),p&8192)e:for(o=i.stateNode,o._visibility=x?o._visibility&-2:o._visibility|1,x&&(u===null||J||us||Wn||Ko(i)),u=null,o=i;;){if(o.tag===5||o.tag===26){if(u===null){J=u=o;try{if(w=J.stateNode,x)I=w.style,typeof I.setProperty=="function"?I.setProperty("display","none","important"):I.display="none";else{G=J.stateNode;var Oe=J.memoizedProps.style,he=Oe!=null&&Oe.hasOwnProperty("display")?Oe.display:null;G.style.display=he==null||typeof he=="boolean"?"":(""+he).trim()}}catch(et){un(J,J.return,et)}}}else if(o.tag===6){if(u===null){J=o;try{J.stateNode.nodeValue=x?"":J.memoizedProps}catch(et){un(J,J.return,et)}}}else if(o.tag===18){if(u===null){J=o;try{var ve=J.stateNode;x?q1(ve,!0):q1(J.stateNode,!1)}catch(et){un(J,J.return,et)}}}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,nd(i,u))));break;case 19:Nr(o,i),Or(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,nd(i,p)));break;case 30:break;case 21:break;default:Nr(o,i),Or(i)}}function Or(i){var o=i.flags;if(o&2){try{for(var u,p=i.return;p!==null;){if(VS(p)){u=p;break}p=p.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var x=u.stateNode,w=Eg(i);td(i,w,x);break;case 5:var I=u.stateNode;u.flags&32&&(wt(I,""),u.flags&=-33);var G=Eg(i);td(i,G,I);break;case 3:case 4:var J=u.stateNode.containerInfo,pe=Eg(i);Tg(i,pe,J);break;default:throw Error(r(161))}}catch(Te){un(i,i.return,Te)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function e1(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var o=i;e1(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),i=i.sibling}}function fs(i,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)KS(i,o.alternate,o),o=o.sibling}function Ko(i){for(i=i.child;i!==null;){var o=i;switch(o.tag){case 0:case 11:case 14:case 15:Xs(4,o,o.return),Ko(o);break;case 1:zi(o,o.return);var u=o.stateNode;typeof u.componentWillUnmount=="function"&&qS(o,o.return,u),Ko(o);break;case 27:Mu(o.stateNode);case 26:case 5:zi(o,o.return),Ko(o);break;case 22:o.memoizedState===null&&Ko(o);break;case 30:Ko(o);break;default:Ko(o)}i=i.sibling}}function ds(i,o,u){for(u=u&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var p=o.alternate,x=i,w=o,I=w.flags;switch(w.tag){case 0:case 11:case 15:ds(x,w,u),wu(4,w);break;case 1:if(ds(x,w,u),p=w,x=p.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(pe){un(p,p.return,pe)}if(p=w,x=p.updateQueue,x!==null){var G=p.stateNode;try{var J=x.shared.hiddenCallbacks;if(J!==null)for(x.shared.hiddenCallbacks=null,x=0;x<J.length;x++)Ok(J[x],G)}catch(pe){un(p,p.return,pe)}}u&&I&64&&US(w),Eu(w,w.return);break;case 27:GS(w);case 26:case 5:ds(x,w,u),u&&p===null&&I&4&&HS(w),Eu(w,w.return);break;case 12:ds(x,w,u);break;case 31:ds(x,w,u),u&&I&4&&ZS(x,w);break;case 13:ds(x,w,u),u&&I&4&&QS(x,w);break;case 22:w.memoizedState===null&&ds(x,w,u),Eu(w,w.return);break;case 30:break;default:ds(x,w,u)}o=o.sibling}}function Cg(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&&cu(u))}function _g(i,o){i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&cu(i))}function Si(i,o,u,p){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)t1(i,o,u,p),o=o.sibling}function t1(i,o,u,p){var x=o.flags;switch(o.tag){case 0:case 11:case 15:Si(i,o,u,p),x&2048&&wu(9,o);break;case 1:Si(i,o,u,p);break;case 3:Si(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&&cu(i)));break;case 12:if(x&2048){Si(i,o,u,p),i=o.stateNode;try{var w=o.memoizedProps,I=w.id,G=w.onPostCommit;typeof G=="function"&&G(I,o.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(J){un(o,o.return,J)}}else Si(i,o,u,p);break;case 31:Si(i,o,u,p);break;case 13:Si(i,o,u,p);break;case 23:break;case 22:w=o.stateNode,I=o.alternate,o.memoizedState!==null?w._visibility&2?Si(i,o,u,p):Tu(i,o):w._visibility&2?Si(i,o,u,p):(w._visibility|=2,Ga(i,o,u,p,(o.subtreeFlags&10256)!==0||!1)),x&2048&&Cg(I,o);break;case 24:Si(i,o,u,p),x&2048&&_g(o.alternate,o);break;default:Si(i,o,u,p)}}function Ga(i,o,u,p,x){for(x=x&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var w=i,I=o,G=u,J=p,pe=I.flags;switch(I.tag){case 0:case 11:case 15:Ga(w,I,G,J,x),wu(8,I);break;case 23:break;case 22:var Te=I.stateNode;I.memoizedState!==null?Te._visibility&2?Ga(w,I,G,J,x):Tu(w,I):(Te._visibility|=2,Ga(w,I,G,J,x)),x&&pe&2048&&Cg(I.alternate,I);break;case 24:Ga(w,I,G,J,x),x&&pe&2048&&_g(I.alternate,I);break;default:Ga(w,I,G,J,x)}o=o.sibling}}function Tu(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:Tu(u,p),x&2048&&Cg(p.alternate,p);break;case 24:Tu(u,p),x&2048&&_g(p.alternate,p);break;default:Tu(u,p)}o=o.sibling}}var Ru=8192;function Wa(i,o,u){if(i.subtreeFlags&Ru)for(i=i.child;i!==null;)n1(i,o,u),i=i.sibling}function n1(i,o,u){switch(i.tag){case 26:Wa(i,o,u),i.flags&Ru&&i.memoizedState!==null&&Rj(u,ki,i.memoizedState,i.memoizedProps);break;case 5:Wa(i,o,u);break;case 3:case 4:var p=ki;ki=gd(i.stateNode.containerInfo),Wa(i,o,u),ki=p;break;case 22:i.memoizedState===null&&(p=i.alternate,p!==null&&p.memoizedState!==null?(p=Ru,Ru=16777216,Wa(i,o,u),Ru=p):Wa(i,o,u));break;default:Wa(i,o,u)}}function r1(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 Cu(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];Jn=p,s1(p,i)}r1(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)i1(i),i=i.sibling}function i1(i){switch(i.tag){case 0:case 11:case 15:Cu(i),i.flags&2048&&Xs(9,i,i.return);break;case 3:Cu(i);break;case 12:Cu(i);break;case 22:var o=i.stateNode;i.memoizedState!==null&&o._visibility&2&&(i.return===null||i.return.tag!==13)?(o._visibility&=-3,rd(i)):Cu(i);break;default:Cu(i)}}function rd(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];Jn=p,s1(p,i)}r1(i)}for(i=i.child;i!==null;){switch(o=i,o.tag){case 0:case 11:case 15:Xs(8,o,o.return),rd(o);break;case 22:u=o.stateNode,u._visibility&2&&(u._visibility&=-3,rd(o));break;default:rd(o)}i=i.sibling}}function s1(i,o){for(;Jn!==null;){var u=Jn;switch(u.tag){case 0:case 11:case 15:Xs(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:cu(u.memoizedState.cache)}if(p=u.child,p!==null)p.return=u,Jn=p;else e:for(u=i;Jn!==null;){p=Jn;var x=p.sibling,w=p.return;if(YS(p),p===u){Jn=null;break e}if(x!==null){x.return=w,Jn=x;break e}Jn=w}}}var FL={getCacheForType:function(i){var o=ir(Hn),u=o.data.get(i);return u===void 0&&(u=i(),o.data.set(i,u)),u},cacheSignal:function(){return ir(Hn).controller.signal}},UL=typeof WeakMap=="function"?WeakMap:Map,nn=0,yn=null,$t=null,Vt=0,ln=0,Kr=null,Zs=!1,Ka=!1,Ag=!1,ps=0,Dn=0,Qs=0,Yo=0,Ng=0,Yr=0,Ya=0,_u=null,Ir=null,Og=!1,id=0,o1=0,sd=1/0,od=null,Js=null,Xn=0,eo=null,Xa=null,hs=0,Ig=0,Mg=null,a1=null,Au=0,Dg=null;function Xr(){return(nn&2)!==0&&Vt!==0?Vt&-Vt:H.T!==null?Bg():dt()}function l1(){if(Yr===0)if((Vt&536870912)===0||Kt){var i=Lt;Lt<<=1,(Lt&3932160)===0&&(Lt=262144),Yr=i}else Yr=536870912;return i=Gr.current,i!==null&&(i.flags|=32),Yr}function Mr(i,o,u){(i===yn&&(ln===2||ln===9)||i.cancelPendingCommit!==null)&&(Za(i,0),to(i,Vt,Yr,!1)),lt(i,u),((nn&2)===0||i!==yn)&&(i===yn&&((nn&2)===0&&(Yo|=u),Dn===4&&to(i,Vt,Yr,!1)),Pi(i))}function u1(i,o,u){if((nn&6)!==0)throw Error(r(327));var p=!u&&(o&127)===0&&(o&i.expiredLanes)===0||me(i,o),x=p?VL(i,o):jg(i,o,!0),w=p;do{if(x===0){Ka&&!p&&to(i,o,0,!1);break}else{if(u=i.current.alternate,w&&!qL(u)){x=jg(i,o,!1),w=!1;continue}if(x===2){if(w=o,i.errorRecoveryDisabledLanes&w)var I=0;else I=i.pendingLanes&-536870913,I=I!==0?I:I&536870912?536870912:0;if(I!==0){o=I;e:{var G=i;x=_u;var J=G.current.memoizedState.isDehydrated;if(J&&(Za(G,I).flags|=256),I=jg(G,I,!1),I!==2){if(Ag&&!J){G.errorRecoveryDisabledLanes|=w,Yo|=w,x=4;break e}w=Ir,Ir=x,w!==null&&(Ir===null?Ir=w:Ir.push.apply(Ir,w))}x=I}if(w=!1,x!==2)continue}}if(x===1){Za(i,0),to(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:to(p,o,Yr,!Zs);break e;case 2:Ir=null;break;case 3:case 5:break;default:throw Error(r(329))}if((o&62914560)===o&&(x=id+300-ee(),10<x)){if(to(p,o,Yr,!Zs),Z(p,0,!0)!==0)break e;hs=o,p.timeoutHandle=B1(c1.bind(null,p,u,Ir,od,Og,o,Yr,Yo,Ya,Zs,w,"Throttled",-0,0),x);break e}c1(p,u,Ir,od,Og,o,Yr,Yo,Ya,Zs,w,null,-0,0)}}break}while(!0);Pi(i)}function c1(i,o,u,p,x,w,I,G,J,pe,Te,Oe,he,ve){if(i.timeoutHandle=-1,Oe=o.subtreeFlags,Oe&8192||(Oe&16785408)===16785408){Oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ge},n1(o,w,Oe);var et=(w&62914560)===w?id-ee():(w&4194048)===w?o1-ee():0;if(et=Cj(Oe,et),et!==null){hs=w,i.cancelPendingCommit=et(y1.bind(null,i,o,w,u,p,x,I,G,J,Te,Oe,null,he,ve)),to(i,w,I,!pe);return}}y1(i,o,w,u,p,x,I,G,J)}function qL(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(!Hr(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 to(i,o,u,p){o&=~Ng,o&=~Yo,i.suspendedLanes|=o,i.pingedLanes&=~o,p&&(i.warmLanes|=o),p=i.expirationTimes;for(var x=o;0<x;){var w=31-nt(x),I=1<<w;p[w]=-1,x&=~I}u!==0&&qe(i,u,o)}function ad(){return(nn&6)===0?(Nu(0),!1):!0}function Lg(){if($t!==null){if(ln===0)var i=$t.return;else i=$t,rs=Bo=null,Zm(i),Fa=null,du=0,i=$t;for(;i!==null;)FS(i.alternate,i),i=i.return;$t=null}}function Za(i,o){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,uj(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),hs=0,Lg(),yn=i,$t=u=ts(i.current,null),Vt=o,ln=0,Kr=null,Zs=!1,Ka=me(i,o),Ag=!1,Ya=Yr=Ng=Yo=Qs=Dn=0,Ir=_u=null,Og=!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-nt(p),w=1<<x;o|=i[x],p&=~w}return ps=o,_f(),u}function f1(i,o){Ot=null,H.H=xu,o===Ba||o===jf?(o=Ck(),ln=3):o===$m?(o=Ck(),ln=4):ln=o===pg?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Kr=o,$t===null&&(Dn=1,Xf(i,oi(o,i.current)))}function d1(){var i=Gr.current;return i===null?!0:(Vt&4194048)===Vt?ci===null:(Vt&62914560)===Vt||(Vt&536870912)!==0?i===ci:!1}function p1(){var i=H.H;return H.H=xu,i===null?xu:i}function h1(){var i=H.A;return H.A=FL,i}function ld(){Dn=4,Zs||(Vt&4194048)!==Vt&&Gr.current!==null||(Ka=!0),(Qs&134217727)===0&&(Yo&134217727)===0||yn===null||to(yn,Vt,Yr,!1)}function jg(i,o,u){var p=nn;nn|=2;var x=p1(),w=h1();(yn!==i||Vt!==o)&&(od=null,Za(i,o)),o=!1;var I=Dn;e:do try{if(ln!==0&&$t!==null){var G=$t,J=Kr;switch(ln){case 8:Lg(),I=6;break e;case 3:case 2:case 9:case 6:Gr.current===null&&(o=!0);var pe=ln;if(ln=0,Kr=null,Qa(i,G,J,pe),u&&Ka){I=0;break e}break;default:pe=ln,ln=0,Kr=null,Qa(i,G,J,pe)}}HL(),I=Dn;break}catch(Te){f1(i,Te)}while(!0);return o&&i.shellSuspendCounter++,rs=Bo=null,nn=p,H.H=x,H.A=w,$t===null&&(yn=null,Vt=0,_f()),I}function HL(){for(;$t!==null;)m1($t)}function VL(i,o){var u=nn;nn|=2;var p=p1(),x=h1();yn!==i||Vt!==o?(od=null,sd=ee()+500,Za(i,o)):Ka=me(i,o);e:do try{if(ln!==0&&$t!==null){o=$t;var w=Kr;t:switch(ln){case 1:ln=0,Kr=null,Qa(i,o,w,1);break;case 2:case 9:if(Tk(w)){ln=0,Kr=null,g1(o);break}o=function(){ln!==2&&ln!==9||yn!==i||(ln=7),Pi(i)},w.then(o,o);break e;case 3:ln=7;break e;case 4:ln=5;break e;case 7:Tk(w)?(ln=0,Kr=null,g1(o)):(ln=0,Kr=null,Qa(i,o,w,7));break;case 5:var I=null;switch($t.tag){case 26:I=$t.memoizedState;case 5:case 27:var G=$t;if(I?tw(I):G.stateNode.complete){ln=0,Kr=null;var J=G.sibling;if(J!==null)$t=J;else{var pe=G.return;pe!==null?($t=pe,ud(pe)):$t=null}break t}}ln=0,Kr=null,Qa(i,o,w,5);break;case 6:ln=0,Kr=null,Qa(i,o,w,6);break;case 8:Lg(),Dn=6;break e;default:throw Error(r(462))}}GL();break}catch(Te){f1(i,Te)}while(!0);return rs=Bo=null,H.H=p,H.A=x,nn=u,$t!==null?0:(yn=null,Vt=0,_f(),Dn)}function GL(){for(;$t!==null&&!ye();)m1($t)}function m1(i){var o=$S(i.alternate,i,ps);i.memoizedProps=i.pendingProps,o===null?ud(i):$t=o}function g1(i){var o=i,u=o.alternate;switch(o.tag){case 15:case 0:o=MS(u,o,o.pendingProps,o.type,void 0,Vt);break;case 11:o=MS(u,o,o.pendingProps,o.type.render,o.ref,Vt);break;case 5:Zm(o);default:FS(u,o),o=$t=hk(o,ps),o=$S(u,o,ps)}i.memoizedProps=i.pendingProps,o===null?ud(i):$t=o}function Qa(i,o,u,p){rs=Bo=null,Zm(o),Fa=null,du=0;var x=o.return;try{if(DL(i,x,o,u,Vt)){Dn=1,Xf(i,oi(u,i.current)),$t=null;return}}catch(w){if(x!==null)throw $t=x,w;Dn=1,Xf(i,oi(u,i.current)),$t=null;return}o.flags&32768?(Kt||p===1?i=!0:Ka||(Vt&536870912)!==0?i=!1:(Zs=i=!0,(p===2||p===9||p===3||p===6)&&(p=Gr.current,p!==null&&p.tag===13&&(p.flags|=16384))),b1(o,i)):ud(o)}function ud(i){var o=i;do{if((o.flags&32768)!==0){b1(o,Zs);return}i=o.return;var u=zL(o.alternate,o,ps);if(u!==null){$t=u;return}if(o=o.sibling,o!==null){$t=o;return}$t=o=i}while(o!==null);Dn===0&&(Dn=5)}function b1(i,o){do{var u=PL(i.alternate,i);if(u!==null){u.flags&=32767,$t=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!o&&(i=i.sibling,i!==null)){$t=i;return}$t=i=u}while(i!==null);Dn=6,$t=null}function y1(i,o,u,p,x,w,I,G,J){i.cancelPendingCommit=null;do cd();while(Xn!==0);if((nn&6)!==0)throw Error(r(327));if(o!==null){if(o===i.current)throw Error(r(177));if(w=o.lanes|o.childLanes,w|=Em,He(i,u,w,I,G,J),i===yn&&($t=yn=null,Vt=0),Xa=o,eo=i,hs=u,Ig=w,Mg=x,a1=p,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,XL(we,function(){return w1(),null})):(i.callbackNode=null,i.callbackPriority=0),p=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||p){p=H.T,H.T=null,x=K.p,K.p=2,I=nn,nn|=4;try{$L(i,o,u)}finally{nn=I,K.p=x,H.T=p}}Xn=1,v1(),x1(),k1()}}function v1(){if(Xn===1){Xn=0;var i=eo,o=Xa,u=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||u){u=H.T,H.T=null;var p=K.p;K.p=2;var x=nn;nn|=4;try{JS(o,i);var w=Kg,I=sk(i.containerInfo),G=w.focusedElem,J=w.selectionRange;if(I!==G&&G&&G.ownerDocument&&ik(G.ownerDocument.documentElement,G)){if(J!==null&&vm(G)){var pe=J.start,Te=J.end;if(Te===void 0&&(Te=pe),"selectionStart"in G)G.selectionStart=pe,G.selectionEnd=Math.min(Te,G.value.length);else{var Oe=G.ownerDocument||document,he=Oe&&Oe.defaultView||window;if(he.getSelection){var ve=he.getSelection(),et=G.textContent.length,kt=Math.min(J.start,et),dn=J.end===void 0?kt:Math.min(J.end,et);!ve.extend&&kt>dn&&(I=dn,dn=kt,kt=I);var ae=rk(G,kt),ie=rk(G,dn);if(ae&&ie&&(ve.rangeCount!==1||ve.anchorNode!==ae.node||ve.anchorOffset!==ae.offset||ve.focusNode!==ie.node||ve.focusOffset!==ie.offset)){var de=Oe.createRange();de.setStart(ae.node,ae.offset),ve.removeAllRanges(),kt>dn?(ve.addRange(de),ve.extend(ie.node,ie.offset)):(de.setEnd(ie.node,ie.offset),ve.addRange(de))}}}}for(Oe=[],ve=G;ve=ve.parentNode;)ve.nodeType===1&&Oe.push({element:ve,left:ve.scrollLeft,top:ve.scrollTop});for(typeof G.focus=="function"&&G.focus(),G=0;G<Oe.length;G++){var Ce=Oe[G];Ce.element.scrollLeft=Ce.left,Ce.element.scrollTop=Ce.top}}Sd=!!Wg,Kg=Wg=null}finally{nn=x,K.p=p,H.T=u}}i.current=o,Xn=2}}function x1(){if(Xn===2){Xn=0;var i=eo,o=Xa,u=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||u){u=H.T,H.T=null;var p=K.p;K.p=2;var x=nn;nn|=4;try{KS(i,o.alternate,o)}finally{nn=x,K.p=p,H.T=u}}Xn=3}}function k1(){if(Xn===4||Xn===3){Xn=0,_e();var i=eo,o=Xa,u=hs,p=a1;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Xn=5:(Xn=0,Xa=eo=null,S1(i,i.pendingLanes));var x=i.pendingLanes;if(x===0&&(Js=null),We(u),o=o.stateNode,xt&&typeof xt.onCommitFiberRoot=="function")try{xt.onCommitFiberRoot(Je,o,void 0,(o.current.flags&128)===128)}catch{}if(p!==null){o=H.T,x=K.p,K.p=2,H.T=null;try{for(var w=i.onRecoverableError,I=0;I<p.length;I++){var G=p[I];w(G.value,{componentStack:G.stack})}}finally{H.T=o,K.p=x}}(hs&3)!==0&&cd(),Pi(i),x=i.pendingLanes,(u&261930)!==0&&(x&42)!==0?i===Dg?Au++:(Au=0,Dg=i):Au=0,Nu(0)}}function S1(i,o){(i.pooledCacheLanes&=o)===0&&(o=i.pooledCache,o!=null&&(i.pooledCache=null,cu(o)))}function cd(){return v1(),x1(),k1(),w1()}function w1(){if(Xn!==5)return!1;var i=eo,o=Ig;Ig=0;var u=We(hs),p=H.T,x=K.p;try{K.p=32>u?32:u,H.T=null,u=Mg,Mg=null;var w=eo,I=hs;if(Xn=0,Xa=eo=null,hs=0,(nn&6)!==0)throw Error(r(331));var G=nn;if(nn|=4,i1(w.current),t1(w,w.current,I,u),nn=G,Nu(0,!1),xt&&typeof xt.onPostCommitFiberRoot=="function")try{xt.onPostCommitFiberRoot(Je,w)}catch{}return!0}finally{K.p=x,H.T=p,S1(i,o)}}function E1(i,o,u){o=oi(u,o),o=dg(i.stateNode,o,2),i=Ws(i,o,2),i!==null&&(lt(i,2),Pi(i))}function un(i,o,u){if(i.tag===3)E1(i,i,u);else for(;o!==null;){if(o.tag===3){E1(o,i,u);break}else if(o.tag===1){var p=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Js===null||!Js.has(p))){i=oi(u,i),u=TS(2),p=Ws(o,u,2),p!==null&&(RS(u,p,o,i),lt(p,2),Pi(p));break}}o=o.return}}function zg(i,o,u){var p=i.pingCache;if(p===null){p=i.pingCache=new UL;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)||(Ag=!0,x.add(u),i=WL.bind(null,i,o,u),o.then(i,i))}function WL(i,o,u){var p=i.pingCache;p!==null&&p.delete(o),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,yn===i&&(Vt&u)===u&&(Dn===4||Dn===3&&(Vt&62914560)===Vt&&300>ee()-id?(nn&2)===0&&Za(i,0):Ng|=u,Ya===Vt&&(Ya=0)),Pi(i)}function T1(i,o){o===0&&(o=Xe()),i=zo(i,o),i!==null&&(lt(i,o),Pi(i))}function KL(i){var o=i.memoizedState,u=0;o!==null&&(u=o.retryLane),T1(i,u)}function YL(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),T1(i,u)}function XL(i,o){return ze(i,o)}var fd=null,Ja=null,Pg=!1,dd=!1,$g=!1,no=0;function Pi(i){i!==Ja&&i.next===null&&(Ja===null?fd=Ja=i:Ja=Ja.next=i),dd=!0,Pg||(Pg=!0,QL())}function Nu(i,o){if(!$g&&dd){$g=!0;do for(var u=!1,p=fd;p!==null;){if(i!==0){var x=p.pendingLanes;if(x===0)var w=0;else{var I=p.suspendedLanes,G=p.pingedLanes;w=(1<<31-nt(42|i)+1)-1,w&=x&~(I&~G),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(u=!0,A1(p,w))}else w=Vt,w=Z(p,p===yn?w:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(w&3)===0||me(p,w)||(u=!0,A1(p,w));p=p.next}while(u);$g=!1}}function ZL(){R1()}function R1(){dd=Pg=!1;var i=0;no!==0&&lj()&&(i=no);for(var o=ee(),u=null,p=fd;p!==null;){var x=p.next,w=C1(p,o);w===0?(p.next=null,u===null?fd=x:u.next=x,x===null&&(Ja=u)):(u=p,(i!==0||(w&3)!==0)&&(dd=!0)),p=x}Xn!==0&&Xn!==5||Nu(i),no!==0&&(no=0)}function C1(i,o){for(var u=i.suspendedLanes,p=i.pingedLanes,x=i.expirationTimes,w=i.pendingLanes&-62914561;0<w;){var I=31-nt(w),G=1<<I,J=x[I];J===-1?((G&u)===0||(G&p)!==0)&&(x[I]=Le(G,o)):J<=o&&(i.expiredLanes|=G),w&=~G}if(o=yn,u=Vt,u=Z(i,i===o?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p=i.callbackNode,u===0||i===o&&(ln===2||ln===9)||i.cancelPendingCommit!==null)return p!==null&&p!==null&&Fe(p),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||me(i,u)){if(o=u&-u,o===i.callbackPriority)return o;switch(p!==null&&Fe(p),We(u)){case 2:case 8:u=re;break;case 32:u=we;break;case 268435456:u=Ye;break;default:u=we}return p=_1.bind(null,i),u=ze(u,p),i.callbackPriority=o,i.callbackNode=u,o}return p!==null&&p!==null&&Fe(p),i.callbackPriority=2,i.callbackNode=null,2}function _1(i,o){if(Xn!==0&&Xn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(cd()&&i.callbackNode!==u)return null;var p=Vt;return p=Z(i,i===yn?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p===0?null:(u1(i,p,o),C1(i,ee()),i.callbackNode!=null&&i.callbackNode===u?_1.bind(null,i):null)}function A1(i,o){if(cd())return null;u1(i,o,!0)}function QL(){cj(function(){(nn&6)!==0?ze(Q,ZL):R1()})}function Bg(){if(no===0){var i=Pa;i===0&&(i=ft,ft<<=1,(ft&261888)===0&&(ft=256)),no=i}return no}function N1(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:$s(""+i)}function O1(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 JL(i,o,u,p,x){if(o==="submit"&&u&&u.stateNode===x){var w=N1((x[Qt]||null).action),I=p.submitter;I&&(o=(o=I[Qt]||null)?N1(o.formAction):I.getAttribute("formAction"),o!==null&&(w=o,I=null));var G=new Ef("action","action",null,p,x);i.push({event:G,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(no!==0){var J=I?O1(x,I):new FormData(x);og(u,{pending:!0,data:J,method:x.method,action:w},null,J)}}else typeof w=="function"&&(G.preventDefault(),J=I?O1(x,I):new FormData(x),og(u,{pending:!0,data:J,method:x.method,action:w},w,J))},currentTarget:x}]})}}for(var Fg=0;Fg<wm.length;Fg++){var Ug=wm[Fg],ej=Ug.toLowerCase(),tj=Ug[0].toUpperCase()+Ug.slice(1);xi(ej,"on"+tj)}xi(lk,"onAnimationEnd"),xi(uk,"onAnimationIteration"),xi(ck,"onAnimationStart"),xi("dblclick","onDoubleClick"),xi("focusin","onFocus"),xi("focusout","onBlur"),xi(bL,"onTransitionRun"),xi(yL,"onTransitionStart"),xi(vL,"onTransitionCancel"),xi(fk,"onTransitionEnd"),$e("onMouseEnter",["mouseout","mouseover"]),$e("onMouseLeave",["mouseout","mouseover"]),$e("onPointerEnter",["pointerout","pointerover"]),$e("onPointerLeave",["pointerout","pointerover"]),Qi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Qi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Qi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Qi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Qi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Qi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ou="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(" "),nj=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ou));function I1(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 I=p.length-1;0<=I;I--){var G=p[I],J=G.instance,pe=G.currentTarget;if(G=G.listener,J!==w&&x.isPropagationStopped())break e;w=G,x.currentTarget=pe;try{w(x)}catch(Te){Cf(Te)}x.currentTarget=null,w=J}else for(I=0;I<p.length;I++){if(G=p[I],J=G.instance,pe=G.currentTarget,G=G.listener,J!==w&&x.isPropagationStopped())break e;w=G,x.currentTarget=pe;try{w(x)}catch(Te){Cf(Te)}x.currentTarget=null,w=J}}}}function Bt(i,o){var u=o[_n];u===void 0&&(u=o[_n]=new Set);var p=i+"__bubble";u.has(p)||(M1(o,i,2,!1),u.add(p))}function qg(i,o,u){var p=0;o&&(p|=4),M1(u,i,p,o)}var pd="_reactListening"+Math.random().toString(36).slice(2);function Hg(i){if(!i[pd]){i[pd]=!0,gf.forEach(function(u){u!=="selectionchange"&&(nj.has(u)||qg(u,!1,i),qg(u,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[pd]||(o[pd]=!0,qg("selectionchange",!1,o))}}function M1(i,o,u,p){switch(lw(o)){case 2:var x=Nj;break;case 8:x=Oj;break;default:x=sb}u=x.bind(null,o,u,i),x=void 0,!cm||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 Vg(i,o,u,p,x){var w=p;if((o&1)===0&&(o&2)===0&&p!==null)e:for(;;){if(p===null)return;var I=p.tag;if(I===3||I===4){var G=p.stateNode.containerInfo;if(G===x)break;if(I===4)for(I=p.return;I!==null;){var J=I.tag;if((J===3||J===4)&&I.stateNode.containerInfo===x)return;I=I.return}for(;G!==null;){if(I=tr(G),I===null)return;if(J=I.tag,J===5||J===6||J===26||J===27){p=w=I;continue e}G=G.parentNode}}p=p.return}xf(function(){var pe=w,Te=Nt(u),Oe=[];e:{var he=dk.get(i);if(he!==void 0){var ve=Ef,et=i;switch(i){case"keypress":if(Sf(u)===0)break e;case"keydown":case"keyup":ve=Y2;break;case"focusin":et="focus",ve=hm;break;case"focusout":et="blur",ve=hm;break;case"beforeblur":case"afterblur":ve=hm;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=F0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ve=z2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ve=Q2;break;case lk:case uk:case ck:ve=B2;break;case fk:ve=eL;break;case"scroll":case"scrollend":ve=L2;break;case"wheel":ve=nL;break;case"copy":case"cut":case"paste":ve=U2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ve=q0;break;case"toggle":case"beforetoggle":ve=iL}var kt=(o&4)!==0,dn=!kt&&(i==="scroll"||i==="scrollend"),ae=kt?he!==null?he+"Capture":null:he;kt=[];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=Jl(ie,ae),Ce!=null&&kt.push(Iu(ie,Ce,de))),dn)break;ie=ie.return}0<kt.length&&(he=new ve(he,et,null,u,Te),Oe.push({event:he,listeners:kt}))}}if((o&7)===0){e:{if(he=i==="mouseover"||i==="pointerover",ve=i==="mouseout"||i==="pointerout",he&&u!==st&&(et=u.relatedTarget||u.fromElement)&&(tr(et)||et[rn]))break e;if((ve||he)&&(he=Te.window===Te?Te:(he=Te.ownerDocument)?he.defaultView||he.parentWindow:window,ve?(et=u.relatedTarget||u.toElement,ve=pe,et=et?tr(et):null,et!==null&&(dn=a(et),kt=et.tag,et!==dn||kt!==5&&kt!==27&&kt!==6)&&(et=null)):(ve=null,et=pe),ve!==et)){if(kt=F0,Ce="onMouseLeave",ae="onMouseEnter",ie="mouse",(i==="pointerout"||i==="pointerover")&&(kt=q0,Ce="onPointerLeave",ae="onPointerEnter",ie="pointer"),dn=ve==null?he:js(ve),de=et==null?he:js(et),he=new kt(Ce,ie+"leave",ve,u,Te),he.target=dn,he.relatedTarget=de,Ce=null,tr(Te)===pe&&(kt=new kt(ae,ie+"enter",et,u,Te),kt.target=de,kt.relatedTarget=dn,Ce=kt),dn=Ce,ve&&et)t:{for(kt=rj,ae=ve,ie=et,de=0,Ce=ae;Ce;Ce=kt(Ce))de++;Ce=0;for(var ut=ie;ut;ut=kt(ut))Ce++;for(;0<de-Ce;)ae=kt(ae),de--;for(;0<Ce-de;)ie=kt(ie),Ce--;for(;de--;){if(ae===ie||ie!==null&&ae===ie.alternate){kt=ae;break t}ae=kt(ae),ie=kt(ie)}kt=null}else kt=null;ve!==null&&D1(Oe,he,ve,kt,!1),et!==null&&dn!==null&&D1(Oe,dn,et,kt,!0)}}e:{if(he=pe?js(pe):window,ve=he.nodeName&&he.nodeName.toLowerCase(),ve==="select"||ve==="input"&&he.type==="file")var Jt=Z0;else if(Y0(he))if(Q0)Jt=hL;else{Jt=dL;var ot=fL}else ve=he.nodeName,!ve||ve.toLowerCase()!=="input"||he.type!=="checkbox"&&he.type!=="radio"?pe&&Ps(pe.elementType)&&(Jt=Z0):Jt=pL;if(Jt&&(Jt=Jt(i,pe))){X0(Oe,Jt,u,Te);break e}ot&&ot(i,he,pe),i==="focusout"&&pe&&he.type==="number"&&pe.memoizedProps.value!=null&&Ca(he,"number",he.value)}switch(ot=pe?js(pe):window,i){case"focusin":(Y0(ot)||ot.contentEditable==="true")&&(Na=ot,xm=pe,au=null);break;case"focusout":au=xm=Na=null;break;case"mousedown":km=!0;break;case"contextmenu":case"mouseup":case"dragend":km=!1,ok(Oe,u,Te);break;case"selectionchange":if(gL)break;case"keydown":case"keyup":ok(Oe,u,Te)}var It;if(gm)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 Aa?W0(i,u)&&(Gt="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(Gt="onCompositionStart");Gt&&(H0&&u.locale!=="ko"&&(Aa||Gt!=="onCompositionStart"?Gt==="onCompositionEnd"&&Aa&&(It=$0()):(Bs=Te,fm="value"in Bs?Bs.value:Bs.textContent,Aa=!0)),ot=hd(pe,Gt),0<ot.length&&(Gt=new U0(Gt,i,null,u,Te),Oe.push({event:Gt,listeners:ot}),It?Gt.data=It:(It=K0(u),It!==null&&(Gt.data=It)))),(It=oL?aL(i,u):lL(i,u))&&(Gt=hd(pe,"onBeforeInput"),0<Gt.length&&(ot=new U0("onBeforeInput","beforeinput",null,u,Te),Oe.push({event:ot,listeners:Gt}),ot.data=It)),JL(Oe,i,pe,u,Te)}I1(Oe,o)})}function Iu(i,o,u){return{instance:i,listener:o,currentTarget:u}}function hd(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=Jl(i,u),x!=null&&p.unshift(Iu(i,x,w)),x=Jl(i,o),x!=null&&p.push(Iu(i,x,w))),i.tag===3)return p;i=i.return}return[]}function rj(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function D1(i,o,u,p,x){for(var w=o._reactName,I=[];u!==null&&u!==p;){var G=u,J=G.alternate,pe=G.stateNode;if(G=G.tag,J!==null&&J===p)break;G!==5&&G!==26&&G!==27||pe===null||(J=pe,x?(pe=Jl(u,w),pe!=null&&I.unshift(Iu(u,pe,J))):x||(pe=Jl(u,w),pe!=null&&I.push(Iu(u,pe,J)))),u=u.return}I.length!==0&&i.push({event:o,listeners:I})}var ij=/\r\n?/g,sj=/\u0000|\uFFFD/g;function L1(i){return(typeof i=="string"?i:""+i).replace(ij,`
|
|
9
|
-
`).replace(sj,"")}function j1(i,o){return o=L1(o),L1(i)===o}function fn(i,o,u,p,x,w){switch(u){case"children":typeof p=="string"?o==="body"||o==="textarea"&&p===""||wt(i,p):(typeof p=="number"||typeof p=="bigint")&&o!=="body"&&wt(i,""+p);break;case"className":Ur(i,"class",p);break;case"tabIndex":Ur(i,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":Ur(i,u,p);break;case"style":an(i,p,w);break;case"data":if(o!=="object"){Ur(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=$s(""+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"&&fn(i,o,"name",x.name,x,null),fn(i,o,"formEncType",x.formEncType,x,null),fn(i,o,"formMethod",x.formMethod,x,null),fn(i,o,"formTarget",x.formTarget,x,null)):(fn(i,o,"encType",x.encType,x,null),fn(i,o,"method",x.method,x,null),fn(i,o,"target",x.target,x,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(u);break}p=$s(""+p),i.setAttribute(u,p);break;case"onClick":p!=null&&(i.onclick=Ge);break;case"onScroll":p!=null&&Bt("scroll",i);break;case"onScrollEnd":p!=null&&Bt("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=$s(""+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":Bt("beforetoggle",i),Bt("toggle",i),ur(i,"popover",p);break;case"xlinkActuate":Rr(i,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":Rr(i,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":Rr(i,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":Rr(i,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":Rr(i,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":Rr(i,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":Rr(i,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":Rr(i,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":Rr(i,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":ur(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=Ji.get(u)||u,ur(i,u,p))}}function Gg(i,o,u,p,x,w){switch(u){case"style":an(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"?wt(i,p):(typeof p=="number"||typeof p=="bigint")&&wt(i,""+p);break;case"onScroll":p!=null&&Bt("scroll",i);break;case"onScrollEnd":p!=null&&Bt("scrollend",i);break;case"onClick":p!=null&&(i.onclick=Ge);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Io.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[Qt]||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,""):ur(i,u,p)}}}function or(i,o,u){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Bt("error",i),Bt("load",i);var p=!1,x=!1,w;for(w in u)if(u.hasOwnProperty(w)){var I=u[w];if(I!=null)switch(w){case"src":p=!0;break;case"srcSet":x=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:fn(i,o,w,I,u,null)}}x&&fn(i,o,"srcSet",u.srcSet,u,null),p&&fn(i,o,"src",u.src,u,null);return;case"input":Bt("invalid",i);var G=w=I=x=null,J=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":I=Te;break;case"checked":J=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:fn(i,o,p,Te,u,null)}}Mo(i,w,G,J,pe,I,x,!1);return;case"select":Bt("invalid",i),p=I=w=null;for(x in u)if(u.hasOwnProperty(x)&&(G=u[x],G!=null))switch(x){case"value":w=G;break;case"defaultValue":I=G;break;case"multiple":p=G;default:fn(i,o,x,G,u,null)}o=w,u=I,i.multiple=!!p,o!=null?nr(i,!!p,o,!1):u!=null&&nr(i,!!p,u,!0);return;case"textarea":Bt("invalid",i),w=x=p=null;for(I in u)if(u.hasOwnProperty(I)&&(G=u[I],G!=null))switch(I){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:fn(i,o,I,G,u,null)}_a(i,p,x,w);return;case"option":for(J in u)u.hasOwnProperty(J)&&(p=u[J],p!=null)&&(J==="selected"?i.selected=p&&typeof p!="function"&&typeof p!="symbol":fn(i,o,J,p,u,null));return;case"dialog":Bt("beforetoggle",i),Bt("toggle",i),Bt("cancel",i),Bt("close",i);break;case"iframe":case"object":Bt("load",i);break;case"video":case"audio":for(p=0;p<Ou.length;p++)Bt(Ou[p],i);break;case"image":Bt("error",i),Bt("load",i);break;case"details":Bt("toggle",i);break;case"embed":case"source":case"link":Bt("error",i),Bt("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:fn(i,o,pe,p,u,null)}return;default:if(Ps(o)){for(Te in u)u.hasOwnProperty(Te)&&(p=u[Te],p!==void 0&&Gg(i,o,Te,p,u,void 0));return}}for(G in u)u.hasOwnProperty(G)&&(p=u[G],p!=null&&fn(i,o,G,p,u,null))}function oj(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,I=null,G=null,J=null,pe=null,Te=null;for(ve in u){var Oe=u[ve];if(u.hasOwnProperty(ve)&&Oe!=null)switch(ve){case"checked":break;case"value":break;case"defaultValue":J=Oe;default:p.hasOwnProperty(ve)||fn(i,o,ve,null,p,Oe)}}for(var he in p){var ve=p[he];if(Oe=u[he],p.hasOwnProperty(he)&&(ve!=null||Oe!=null))switch(he){case"type":w=ve;break;case"name":x=ve;break;case"checked":pe=ve;break;case"defaultChecked":Te=ve;break;case"value":I=ve;break;case"defaultValue":G=ve;break;case"children":case"dangerouslySetInnerHTML":if(ve!=null)throw Error(r(137,o));break;default:ve!==Oe&&fn(i,o,he,ve,p,Oe)}}Xl(i,I,G,J,pe,Te,w,x);return;case"select":ve=I=G=he=null;for(w in u)if(J=u[w],u.hasOwnProperty(w)&&J!=null)switch(w){case"value":break;case"multiple":ve=J;default:p.hasOwnProperty(w)||fn(i,o,w,null,p,J)}for(x in p)if(w=p[x],J=u[x],p.hasOwnProperty(x)&&(w!=null||J!=null))switch(x){case"value":he=w;break;case"defaultValue":G=w;break;case"multiple":I=w;default:w!==J&&fn(i,o,x,w,p,J)}o=G,u=I,p=ve,he!=null?nr(i,!!u,he,!1):!!p!=!!u&&(o!=null?nr(i,!!u,o,!0):nr(i,!!u,u?[]:"",!1));return;case"textarea":ve=he=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:fn(i,o,G,null,p,x)}for(I in p)if(x=p[I],w=u[I],p.hasOwnProperty(I)&&(x!=null||w!=null))switch(I){case"value":he=x;break;case"defaultValue":ve=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:x!==w&&fn(i,o,I,x,p,w)}yf(i,he,ve);return;case"option":for(var et in u)he=u[et],u.hasOwnProperty(et)&&he!=null&&!p.hasOwnProperty(et)&&(et==="selected"?i.selected=!1:fn(i,o,et,null,p,he));for(J in p)he=p[J],ve=u[J],p.hasOwnProperty(J)&&he!==ve&&(he!=null||ve!=null)&&(J==="selected"?i.selected=he&&typeof he!="function"&&typeof he!="symbol":fn(i,o,J,he,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 kt in u)he=u[kt],u.hasOwnProperty(kt)&&he!=null&&!p.hasOwnProperty(kt)&&fn(i,o,kt,null,p,he);for(pe in p)if(he=p[pe],ve=u[pe],p.hasOwnProperty(pe)&&he!==ve&&(he!=null||ve!=null))switch(pe){case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,o));break;default:fn(i,o,pe,he,p,ve)}return;default:if(Ps(o)){for(var dn in u)he=u[dn],u.hasOwnProperty(dn)&&he!==void 0&&!p.hasOwnProperty(dn)&&Gg(i,o,dn,void 0,p,he);for(Te in p)he=p[Te],ve=u[Te],!p.hasOwnProperty(Te)||he===ve||he===void 0&&ve===void 0||Gg(i,o,Te,he,p,ve);return}}for(var ae in u)he=u[ae],u.hasOwnProperty(ae)&&he!=null&&!p.hasOwnProperty(ae)&&fn(i,o,ae,null,p,he);for(Oe in p)he=p[Oe],ve=u[Oe],!p.hasOwnProperty(Oe)||he===ve||he==null&&ve==null||fn(i,o,Oe,he,p,ve)}function z1(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function aj(){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,I=x.initiatorType,G=x.duration;if(w&&G&&z1(I)){for(I=0,G=x.responseEnd,p+=1;p<u.length;p++){var J=u[p],pe=J.startTime;if(pe>G)break;var Te=J.transferSize,Oe=J.initiatorType;Te&&z1(Oe)&&(J=J.responseEnd,I+=Te*(J<G?1:(G-pe)/(J-pe)))}if(--p,o+=8*(w+I)/(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 Wg=null,Kg=null;function md(i){return i.nodeType===9?i:i.ownerDocument}function P1(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 $1(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 Yg(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 Xg=null;function lj(){var i=window.event;return i&&i.type==="popstate"?i===Xg?!1:(Xg=i,!0):(Xg=null,!1)}var B1=typeof setTimeout=="function"?setTimeout:void 0,uj=typeof clearTimeout=="function"?clearTimeout:void 0,F1=typeof Promise=="function"?Promise:void 0,cj=typeof queueMicrotask=="function"?queueMicrotask:typeof F1<"u"?function(i){return F1.resolve(null).then(i).catch(fj)}:B1;function fj(i){setTimeout(function(){throw i})}function ro(i){return i==="head"}function U1(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),rl(o);return}p--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")p++;else if(u==="html")Mu(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,Mu(u);for(var w=u.firstChild;w;){var I=w.nextSibling,G=w.nodeName;w[ri]||G==="SCRIPT"||G==="STYLE"||G==="LINK"&&w.rel.toLowerCase()==="stylesheet"||u.removeChild(w),w=I}}else u==="body"&&Mu(i.ownerDocument.body);u=x}while(u);rl(o)}function q1(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 Zg(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":Zg(u),Fr(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function dj(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[ri])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=fi(i.nextSibling),i===null)break}return null}function pj(i,o,u){if(o==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=fi(i.nextSibling),i===null))return null;return i}function H1(i,o){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!o||(i=fi(i.nextSibling),i===null))return null;return i}function Qg(i){return i.data==="$?"||i.data==="$~"}function Jg(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function hj(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 fi(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 eb=null;function V1(i){i=i.nextSibling;for(var o=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(o===0)return fi(i.nextSibling);o--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||o++}i=i.nextSibling}return null}function G1(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 W1(i,o,u){switch(o=md(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 Mu(i){for(var o=i.attributes;o.length;)i.removeAttributeNode(o[0]);Fr(i)}var di=new Map,K1=new Set;function gd(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var ms=K.d;K.d={f:mj,r:gj,D:bj,C:yj,L:vj,m:xj,X:Sj,S:kj,M:wj};function mj(){var i=ms.f(),o=ad();return i||o}function gj(i){var o=Zi(i);o!==null&&o.tag===5&&o.type==="form"?fS(o):ms.r(i)}var el=typeof document>"u"?null:document;function Y1(i,o,u){var p=el;if(p&&typeof o=="string"&&o){var x=Cr(o);x='link[rel="'+i+'"][href="'+x+'"]',typeof u=="string"&&(x+='[crossorigin="'+u+'"]'),K1.has(x)||(K1.add(x),i={rel:i,crossOrigin:u,href:o},p.querySelector(x)===null&&(o=p.createElement("link"),or(o,"link",i),Un(o),p.head.appendChild(o)))}}function bj(i){ms.D(i),Y1("dns-prefetch",i,null)}function yj(i,o){ms.C(i,o),Y1("preconnect",i,o)}function vj(i,o,u){ms.L(i,o,u);var p=el;if(p&&i&&o){var x='link[rel="preload"][as="'+Cr(o)+'"]';o==="image"&&u&&u.imageSrcSet?(x+='[imagesrcset="'+Cr(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(x+='[imagesizes="'+Cr(u.imageSizes)+'"]')):x+='[href="'+Cr(i)+'"]';var w=x;switch(o){case"style":w=tl(i);break;case"script":w=nl(i)}di.has(w)||(i=m({rel:"preload",href:o==="image"&&u&&u.imageSrcSet?void 0:i,as:o},u),di.set(w,i),p.querySelector(x)!==null||o==="style"&&p.querySelector(Du(w))||o==="script"&&p.querySelector(Lu(w))||(o=p.createElement("link"),or(o,"link",i),Un(o),p.head.appendChild(o)))}}function xj(i,o){ms.m(i,o);var u=el;if(u&&i){var p=o&&typeof o.as=="string"?o.as:"script",x='link[rel="modulepreload"][as="'+Cr(p)+'"][href="'+Cr(i)+'"]',w=x;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=nl(i)}if(!di.has(w)&&(i=m({rel:"modulepreload",href:i},o),di.set(w,i),u.querySelector(x)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Lu(w)))return}p=u.createElement("link"),or(p,"link",i),Un(p),u.head.appendChild(p)}}}function kj(i,o,u){ms.S(i,o,u);var p=el;if(p&&i){var x=zs(p).hoistableStyles,w=tl(i);o=o||"default";var I=x.get(w);if(!I){var G={loading:0,preload:null};if(I=p.querySelector(Du(w)))G.loading=5;else{i=m({rel:"stylesheet",href:i,"data-precedence":o},u),(u=di.get(w))&&tb(i,u);var J=I=p.createElement("link");Un(J),or(J,"link",i),J._p=new Promise(function(pe,Te){J.onload=pe,J.onerror=Te}),J.addEventListener("load",function(){G.loading|=1}),J.addEventListener("error",function(){G.loading|=2}),G.loading|=4,bd(I,o,p)}I={type:"stylesheet",instance:I,count:1,state:G},x.set(w,I)}}}function Sj(i,o){ms.X(i,o);var u=el;if(u&&i){var p=zs(u).hoistableScripts,x=nl(i),w=p.get(x);w||(w=u.querySelector(Lu(x)),w||(i=m({src:i,async:!0},o),(o=di.get(x))&&nb(i,o),w=u.createElement("script"),Un(w),or(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},p.set(x,w))}}function wj(i,o){ms.M(i,o);var u=el;if(u&&i){var p=zs(u).hoistableScripts,x=nl(i),w=p.get(x);w||(w=u.querySelector(Lu(x)),w||(i=m({src:i,async:!0,type:"module"},o),(o=di.get(x))&&nb(i,o),w=u.createElement("script"),Un(w),or(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},p.set(x,w))}}function X1(i,o,u,p){var x=(x=ne.current)?gd(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=tl(u.href),u=zs(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=tl(u.href);var w=zs(x).hoistableStyles,I=w.get(i);if(I||(x=x.ownerDocument||x,I={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(i,I),(w=x.querySelector(Du(i)))&&!w._p&&(I.instance=w,I.state.loading=5),di.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},di.set(i,u),w||Ej(x,i,u,I.state))),o&&p===null)throw Error(r(528,""));return I}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=nl(u),u=zs(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 tl(i){return'href="'+Cr(i)+'"'}function Du(i){return'link[rel="stylesheet"]['+i+"]"}function Z1(i){return m({},i,{"data-precedence":i.precedence,precedence:null})}function Ej(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}),or(o,"link",u),Un(o),i.head.appendChild(o))}function nl(i){return'[src="'+Cr(i)+'"]'}function Lu(i){return"script[async]"+i}function Q1(i,o,u){if(o.count++,o.instance===null)switch(o.type){case"style":var p=i.querySelector('style[data-href~="'+Cr(u.href)+'"]');if(p)return o.instance=p,Un(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"),Un(p),or(p,"style",x),bd(p,u.precedence,i),o.instance=p;case"stylesheet":x=tl(u.href);var w=i.querySelector(Du(x));if(w)return o.state.loading|=4,o.instance=w,Un(w),w;p=Z1(u),(x=di.get(x))&&tb(p,x),w=(i.ownerDocument||i).createElement("link"),Un(w);var I=w;return I._p=new Promise(function(G,J){I.onload=G,I.onerror=J}),or(w,"link",p),o.state.loading|=4,bd(w,u.precedence,i),o.instance=w;case"script":return w=nl(u.src),(x=i.querySelector(Lu(w)))?(o.instance=x,Un(x),x):(p=u,(x=di.get(w))&&(p=m({},u),nb(p,x)),i=i.ownerDocument||i,x=i.createElement("script"),Un(x),or(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,bd(p,u.precedence,i));return o.instance}function bd(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,I=0;I<p.length;I++){var G=p[I];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 tb(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.title==null&&(i.title=o.title)}function nb(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.integrity==null&&(i.integrity=o.integrity)}var yd=null;function J1(i,o,u){if(yd===null){var p=new Map,x=yd=new Map;x.set(u,p)}else x=yd,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[ri]||w[Tt]||i==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var I=w.getAttribute(o)||"";I=i+I;var G=p.get(I);G?G.push(w):p.set(I,[w])}}return p}function ew(i,o,u){i=i.ownerDocument||i,i.head.insertBefore(u,o==="title"?i.querySelector("head > title"):null)}function Tj(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 tw(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function Rj(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=tl(p.href),w=o.querySelector(Du(x));if(w){o=w._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(i.count++,i=vd.bind(i),o.then(i,i)),u.state.loading|=4,u.instance=w,Un(w);return}w=o.ownerDocument||o,p=Z1(p),(x=di.get(x))&&tb(p,x),w=w.createElement("link"),Un(w);var I=w;I._p=new Promise(function(G,J){I.onload=G,I.onerror=J}),or(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=vd.bind(i),o.addEventListener("load",u),o.addEventListener("error",u))}}var rb=0;function Cj(i,o){return i.stylesheets&&i.count===0&&kd(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var p=setTimeout(function(){if(i.stylesheets&&kd(i,i.stylesheets),i.unsuspend){var w=i.unsuspend;i.unsuspend=null,w()}},6e4+o);0<i.imgBytes&&rb===0&&(rb=62500*aj());var x=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&kd(i,i.stylesheets),i.unsuspend)){var w=i.unsuspend;i.unsuspend=null,w()}},(i.imgBytes>rb?50:800)+o);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(p),clearTimeout(x)}}:null}function vd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)kd(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var xd=null;function kd(i,o){i.stylesheets=null,i.unsuspend!==null&&(i.count++,xd=new Map,o.forEach(_j,i),xd=null,vd.call(i))}function _j(i,o){if(!(o.state.loading&4)){var u=xd.get(i);if(u)var p=u.get(null);else{u=new Map,xd.set(i,u);for(var x=i.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<x.length;w++){var I=x[w];(I.nodeName==="LINK"||I.getAttribute("media")!=="not all")&&(u.set(I.dataset.precedence,I),p=I)}p&&u.set(null,p)}x=o.instance,I=x.getAttribute("data-precedence"),w=u.get(I)||p,w===p&&u.set(null,x),u.set(I,x),this.count++,p=vd.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 ju={$$typeof:C,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function Aj(i,o,u,p,x,w,I,G,J){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=Ct(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ct(0),this.hiddenUpdates=Ct(null),this.identifierPrefix=p,this.onUncaughtError=x,this.onCaughtError=w,this.onRecoverableError=I,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=J,this.incompleteTransitions=new Map}function nw(i,o,u,p,x,w,I,G,J,pe,Te,Oe){return i=new Aj(i,o,u,I,J,pe,Te,Oe,G),o=1,w===!0&&(o|=24),w=Vr(3,null,null,o),i.current=w,w.stateNode=i,o=jm(),o.refCount++,i.pooledCache=o,o.refCount++,w.memoizedState={element:p,isDehydrated:u,cache:o},Bm(w),i}function rw(i){return i?(i=Ma,i):Ma}function iw(i,o,u,p,x,w){x=rw(x),p.context===null?p.context=x:p.pendingContext=x,p=Gs(o),p.payload={element:u},w=w===void 0?null:w,w!==null&&(p.callback=w),u=Ws(i,p,o),u!==null&&(Mr(u,i,o),hu(u,i,o))}function sw(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<o?u:o}}function ib(i,o){sw(i,o),(i=i.alternate)&&sw(i,o)}function ow(i){if(i.tag===13||i.tag===31){var o=zo(i,67108864);o!==null&&Mr(o,i,67108864),ib(i,67108864)}}function aw(i){if(i.tag===13||i.tag===31){var o=Xr();o=Ie(o);var u=zo(i,o);u!==null&&Mr(u,i,o),ib(i,o)}}var Sd=!0;function Nj(i,o,u,p){var x=H.T;H.T=null;var w=K.p;try{K.p=2,sb(i,o,u,p)}finally{K.p=w,H.T=x}}function Oj(i,o,u,p){var x=H.T;H.T=null;var w=K.p;try{K.p=8,sb(i,o,u,p)}finally{K.p=w,H.T=x}}function sb(i,o,u,p){if(Sd){var x=ob(p);if(x===null)Vg(i,o,p,wd,u),uw(i,p);else if(Mj(x,i,o,u,p))p.stopPropagation();else if(uw(i,p),o&4&&-1<Ij.indexOf(i)){for(;x!==null;){var w=Zi(x);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var I=At(w.pendingLanes);if(I!==0){var G=w;for(G.pendingLanes|=2,G.entangledLanes|=2;I;){var J=1<<31-nt(I);G.entanglements[1]|=J,I&=~J}Pi(w),(nn&6)===0&&(sd=ee()+500,Nu(0))}}break;case 31:case 13:G=zo(w,2),G!==null&&Mr(G,w,2),ad(),ib(w,2)}if(w=ob(p),w===null&&Vg(i,o,p,wd,u),w===x)break;x=w}x!==null&&p.stopPropagation()}else Vg(i,o,p,null,u)}}function ob(i){return i=Nt(i),ab(i)}var wd=null;function ab(i){if(wd=null,i=tr(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 wd=i,null}function lw(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(fe()){case Q:return 2;case re:return 8;case we:case Pe:return 32;case Ye:return 268435456;default:return 32}default:return 32}}var lb=!1,io=null,so=null,oo=null,zu=new Map,Pu=new Map,ao=[],Ij="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 uw(i,o){switch(i){case"focusin":case"focusout":io=null;break;case"dragenter":case"dragleave":so=null;break;case"mouseover":case"mouseout":oo=null;break;case"pointerover":case"pointerout":zu.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pu.delete(o.pointerId)}}function $u(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=Zi(o),o!==null&&ow(o)),i):(i.eventSystemFlags|=p,o=i.targetContainers,x!==null&&o.indexOf(x)===-1&&o.push(x),i)}function Mj(i,o,u,p,x){switch(o){case"focusin":return io=$u(io,i,o,u,p,x),!0;case"dragenter":return so=$u(so,i,o,u,p,x),!0;case"mouseover":return oo=$u(oo,i,o,u,p,x),!0;case"pointerover":var w=x.pointerId;return zu.set(w,$u(zu.get(w)||null,i,o,u,p,x)),!0;case"gotpointercapture":return w=x.pointerId,Pu.set(w,$u(Pu.get(w)||null,i,o,u,p,x)),!0}return!1}function cw(i){var o=tr(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,Et(i.priority,function(){aw(u)});return}}else if(o===31){if(o=c(u),o!==null){i.blockedOn=o,Et(i.priority,function(){aw(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 Ed(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var u=ob(i.nativeEvent);if(u===null){u=i.nativeEvent;var p=new u.constructor(u.type,u);st=p,u.target.dispatchEvent(p),st=null}else return o=Zi(u),o!==null&&ow(o),i.blockedOn=u,!1;o.shift()}return!0}function fw(i,o,u){Ed(i)&&u.delete(o)}function Dj(){lb=!1,io!==null&&Ed(io)&&(io=null),so!==null&&Ed(so)&&(so=null),oo!==null&&Ed(oo)&&(oo=null),zu.forEach(fw),Pu.forEach(fw)}function Td(i,o){i.blockedOn===o&&(i.blockedOn=null,lb||(lb=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Dj)))}var Rd=null;function dw(i){Rd!==i&&(Rd=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Rd===i&&(Rd=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(ab(p||u)===null)continue;break}var w=Zi(u);w!==null&&(i.splice(o,3),o-=3,og(w,{pending:!0,data:x,method:u.method,action:p},p,x))}}))}function rl(i){function o(J){return Td(J,i)}io!==null&&Td(io,i),so!==null&&Td(so,i),oo!==null&&Td(oo,i),zu.forEach(o),Pu.forEach(o);for(var u=0;u<ao.length;u++){var p=ao[u];p.blockedOn===i&&(p.blockedOn=null)}for(;0<ao.length&&(u=ao[0],u.blockedOn===null);)cw(u),u.blockedOn===null&&ao.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],I=x[Qt]||null;if(typeof w=="function")I||dw(u);else if(I){var G=null;if(w&&w.hasAttribute("formAction")){if(x=w,I=w[Qt]||null)G=I.formAction;else if(ab(x)!==null)continue}else G=I.action;typeof G=="function"?u[p+1]=G:(u.splice(p,3),p-=3),dw(u)}}}function pw(){function i(w){w.canIntercept&&w.info==="react-transition"&&w.intercept({handler:function(){return new Promise(function(I){return x=I})},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 ub(i){this._internalRoot=i}Cd.prototype.render=ub.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(r(409));var u=o.current,p=Xr();iw(u,p,i,o,null,null)},Cd.prototype.unmount=ub.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;iw(i.current,2,null,i,null,null),ad(),o[rn]=null}};function Cd(i){this._internalRoot=i}Cd.prototype.unstable_scheduleHydration=function(i){if(i){var o=dt();i={blockedOn:null,target:i,priority:o};for(var u=0;u<ao.length&&o!==0&&o<ao[u].priority;u++);ao.splice(u,0,i),u===0&&cw(i)}};var hw=t.version;if(hw!=="19.2.6")throw Error(r(527,hw,"19.2.6"));K.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=d(o),i=i!==null?h(i):null,i=i===null?null:i.stateNode,i};var Lj={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _d=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_d.isDisabled&&_d.supportsFiber)try{Je=_d.inject(Lj),xt=_d}catch{}}return Fu.createRoot=function(i,o){if(!s(i))throw Error(r(299));var u=!1,p="",x=kS,w=SS,I=wS;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&&(I=o.onRecoverableError)),o=nw(i,1,!1,null,null,u,p,null,x,w,I,pw),i[rn]=o.current,Hg(i),new ub(o)},Fu.hydrateRoot=function(i,o,u){if(!s(i))throw Error(r(299));var p=!1,x="",w=kS,I=SS,G=wS,J=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&&(I=u.onCaughtError),u.onRecoverableError!==void 0&&(G=u.onRecoverableError),u.formState!==void 0&&(J=u.formState)),o=nw(i,1,!0,o,u??null,p,x,J,w,I,G,pw),o.context=rw(null),u=o.current,p=Xr(),p=Ie(p),x=Gs(p),x.callback=null,Ws(u,x,p),u=p,o.current.lanes=u,lt(o,u),Pi(o),i[rn]=o.current,Hg(i),new Cd(o)},Fu.version="19.2.6",Fu}var Ew;function Gj(){if(Ew)return db.exports;Ew=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(),db.exports=Vj(),db.exports}var Wj=Gj(),Uu={},Tw;function Kj(){if(Tw)return Uu;Tw=1,Object.defineProperty(Uu,"__esModule",{value:!0}),Uu.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 d=[],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],d.push.apply(d,_[1]),y=_[3])}else{var D=[];for(var A in E){var M=E[A];if(A===t){var B=E[A];B!==!0&&(b=b?B+"; "+b:B);continue}typeof M=="string"||M===null?d.includes(A)||(d.push(A),y!=null&&D.push(A),typeof M=="string"&&(C+=C?" "+M:M)):console.error("styleq: ".concat(A," typeof ").concat(String(M),' is not "string" or "null".'))}if(y!=null){var P=new WeakMap;y.set(E,[C,D,b,P]),y=P}}C&&(h=h?C+" "+h:C)}else if(l)m==null&&(m={}),m=Object.assign({},E,m);else{var N=null;for(var W in E){var $=E[W];$!==void 0&&(d.includes(W)||($!=null&&(m==null&&(m={}),N==null&&(N={}),N[W]=$),d.push(W),y=null))}N!=null&&(m=Object.assign(N,m))}}}var F=[h,m,b];return F}}var r=Uu.styleq=n();return r.factory=n,Uu}var Yj=Kj();function zt(...e){const[t,n,r]=Yj.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 e_(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=e_(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Xj(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=e_(e))&&(r&&(r+=" "),r+=t);return r}function sn(...e){return Xj(e)}function Yt({rootClass:e,stylexStyles:t,className:n,style:r}){const s=zt(t);return{className:sn(e,s.className,n),style:{...s.style,...r}}}const Zj={"--cursor-easing-out-quint":"var(--cursor-easing-out-quint)"},Ti={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-18wk26n",$$css:!0},variantWarn:{kMwMTN:"ui-1izesbo",kWkggS:"ui-t9f1jb",$$css:!0},variantDanger:{kMwMTN:"ui-1jh5svw",kWkggS:"ui-qhj6il",$$css:!0}};function Qj({pill:e,size:t,variant:n}){return[Ti.base,t==="sm"?Ti.sizeSm:Ti.sizeMd,e?[Ti.pill,t==="sm"?Ti.pillSizeSm:Ti.pillSizeMd]:null,Jj(n)]}function Jj(e){switch(e){case"accent":return Ti.variantAccent;case"neutral":return Ti.variantNeutral;case"success":return Ti.variantSuccess;case"warn":return Ti.variantWarn;case"danger":return Ti.variantDanger}}function vo({children:e,variant:t="neutral",size:n="md",pill:r=!1,as:s="span",className:a,style:l,...c}){const f=Yt({rootClass:"ui-status-badge",stylexStyles:Qj({pill:r,size:n,variant:t}),className:a,style:l});return g.jsx(s,{className:f.className,style:f.style,"data-variant":t,"data-size":n,"data-pill":r||void 0,...c,children:e})}function ez(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 In=ez("https://base-ui.com/production-error","Base UI"),Rw={};function zr(e,t){const n=v.useRef(Rw);return n.current===Rw&&(n.current=e(t)),n}function xo(e,t,n,r){const s=zr(t_).current;return nz(s,e,t,n,r)&&n_(s,[e,t,n,r]),s.callback}function tz(e){const t=zr(t_).current;return rz(t,e)&&n_(t,e),t.callback}function t_(){return{callback:null,cleanup:null,refs:[]}}function nz(e,t,n,r,s){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==s}function rz(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function n_(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 iz=parseInt(v.version,10);function $v(e){return iz>=e}function Cw(e){if(!v.isValidElement(e))return null;const t=e,n=t.props;return($v(19)?n?.ref:t.ref)??null}function My(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Zn(){}const ko=Object.freeze([]),Bn=Object.freeze({});function sz(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 oz(e,t){return typeof e=="function"?e(t):e}function r_(e,t){return typeof e=="function"?e(t):e}const Bv={};function Gi(e,t,n,r,s){if(!n&&!r&&!s&&!e)return Tp(t);let a=Tp(e);return t&&(a=oc(a,t)),n&&(a=oc(a,n)),r&&(a=oc(a,r)),s&&(a=oc(a,s)),a}function az(e){if(e.length===0)return Bv;if(e.length===1)return Tp(e[0]);let t=Tp(e[0]);for(let n=1;n<e.length;n+=1)t=oc(t,e[n]);return t}function Tp(e){return Fv(e)?{...s_(e,Bv)}:lz(e)}function oc(e,t){return Fv(t)?s_(t,e):uz(e,t)}function lz(e){const t={...e};for(const n in t){const r=t[n];i_(n,r)&&(t[n]=o_(r))}return t}function uz(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=My(e.style,r);break}case"className":{e[n]=a_(e.className,r);break}default:i_(n,r)?e[n]=cz(e[n],r):e[n]=r}}return e}function i_(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 Fv(e){return typeof e=="function"}function s_(e,t){return Fv(e)?e(t):e??Bv}function cz(e,t){return t?e?(...n)=>{const r=n[0];if(l_(r)){const a=r;Rp(a);const l=t(...n);return a.baseUIHandlerPrevented||e?.(...n),l}const s=t(...n);return e?.(...n),s}:o_(t):e}function o_(e){return e&&((...t)=>{const n=t[0];return l_(n)&&Rp(n),e(...t)})}function Rp(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function a_(e,t){return t?e?t+" "+e:t:e}function l_(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function bn(e,t,n={}){const r=t.render,s=fz(t,n);if(n.enabled===!1)return null;const a=n.state??Bn;return hz(e,r,s,a)}function fz(e,t={}){const{className:n,style:r,render:s}=e,{state:a=Bn,ref:l,props:c,stateAttributesMapping:f,enabled:d=!0}=t,h=d?oz(n,a):void 0,m=d?r_(r,a):void 0,b=d?sz(a,f):Bn,y=d&&c?dz(c):void 0,k=d?My(b,y)??{}:Bn;return typeof document<"u"&&(d?Array.isArray(l)?k.ref=tz([k.ref,Cw(s),...l]):k.ref=xo(k.ref,Cw(s),l):xo(null,null)),d?(h!==void 0&&(k.className=a_(k.className,h)),m!==void 0&&(k.style=My(k.style,m)),k):Bn}function dz(e){return Array.isArray(e)?az(e):Gi(void 0,e)}const pz=Symbol.for("react.lazy");function hz(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const s=Gi(n,t.props);s.ref=n.ref;let a=t;return a?.$$typeof===pz&&(a=v.Children.toArray(t)[0]),v.cloneElement(a,s)}if(e&&typeof e=="string")return mz(e,n);throw new Error(In(8))}function mz(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 sa=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const gz={[sa.startingStyle]:""},bz={[sa.endingStyle]:""},To={transitionStatus(e){return e==="starting"?gz:e==="ending"?bz:null}};let Uv=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=sa.startingStyle]="startingStyle",e[e.endingStyle=sa.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),Cp=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const yz={[Cp.popupOpen]:""},vz={[Cp.popupOpen]:"",[Cp.pressed]:""},xz={[Uv.open]:""},kz={[Uv.closed]:""},Sz={[Uv.anchorHidden]:""},u_={open(e){return e?yz:null}},wz={open(e){return e?vz:null}},Wc={open(e){return e?xz:kz},anchorHidden(e){return e?Sz:null}};function hh(){return typeof window<"u"}function Qn(e){return mh(e)?(e.nodeName||"").toLowerCase():"#document"}function xn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Os(e){var t;return(t=(mh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function mh(e){return hh()?e instanceof Node||e instanceof xn(e).Node:!1}function gt(e){return hh()?e instanceof Element||e instanceof xn(e).Element:!1}function Ft(e){return hh()?e instanceof HTMLElement||e instanceof xn(e).HTMLElement:!1}function So(e){return!hh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof xn(e).ShadowRoot}function ga(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Tr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function Ez(e){return/^(table|td|th)$/.test(Qn(e))}function gh(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Tz=/transform|translate|scale|rotate|perspective|filter/,Rz=/paint|layout|strict|content/,Xo=e=>!!e&&e!=="none";let gb;function qv(e){const t=gt(e)?Tr(e):e;return Xo(t.transform)||Xo(t.translate)||Xo(t.scale)||Xo(t.rotate)||Xo(t.perspective)||!bh()&&(Xo(t.backdropFilter)||Xo(t.filter))||Tz.test(t.willChange||"")||Rz.test(t.contain||"")}function Cz(e){let t=_s(e);for(;Ft(t)&&!_i(t);){if(qv(t))return t;if(gh(t))return null;t=_s(t)}return null}function bh(){return gb==null&&(gb=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),gb}function _i(e){return/^(html|body|#document)$/.test(Qn(e))}function Tr(e){return xn(e).getComputedStyle(e)}function yh(e){return gt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _s(e){if(Qn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||So(e)&&e.host||Os(e);return So(t)?t.host:t}function c_(e){const t=_s(e);return _i(t)?(e.ownerDocument||e).body:Ft(t)&&ga(t)?t:c_(t)}function bo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=c_(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),l=xn(s);if(a){const c=Dy(l);return t.concat(l,l.visualViewport||[],ga(s)?s:[],c&&n?bo(c):[])}else return t.concat(s,bo(s,[],n))}function Dy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Hv={...Pv},bb=Hv.useInsertionEffect,_z=bb&&bb!==Hv.useLayoutEffect?bb:e=>e();function Ke(e){const t=zr(Az).current;return t.next=e,_z(t.effect),t.trampoline}function Az(){const e={next:void 0,callback:Nz,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Nz(){}const Oz=()=>{},Ve=typeof document<"u"?v.useLayoutEffect:Oz,f_=v.createContext(void 0);function d_(e=!1){const t=v.useContext(f_);if(t===void 0&&!e)throw new Error(In(16));return t}function Iz(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 d={onKeyDown(h){n&&t&&h.key!=="Tab"&&h.preventDefault()}};return r||(d.tabIndex=s,!a&&n&&(d.tabIndex=t?s:-1)),(a&&(t||l)||!a&&n)&&(d["aria-disabled"]=n),a&&(!t||c)&&(d.disabled=n),d},[r,n,t,l,c,a,s])}}function $l(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:s=!0,composite:a}=e,l=v.useRef(null),c=d_(!0),f=a??c!==void 0,{props:d}=Iz({focusableWhenDisabled:n,disabled:t,composite:f,tabIndex:r,isNativeButton:s}),h=v.useCallback(()=>{const y=l.current;yb(y)&&f&&t&&d.disabled===void 0&&y.disabled&&(y.disabled=!1)},[t,d.disabled,f]);Ve(h,[h]);const m=v.useCallback((y={})=>{const{onClick:k,onMouseDown:S,onKeyUp:R,onKeyDown:T,onPointerDown:E,...C}=y;return Gi({onClick(_){if(t){_.preventDefault();return}k?.(_)},onMouseDown(_){t||S?.(_)},onKeyDown(_){if(t||(Rp(_),T?.(_),_.baseUIHandlerPrevented))return;const D=_.target===_.currentTarget,A=_.currentTarget,M=yb(A),B=!s&&Mz(A),P=D&&(s?M:!B),N=_.key==="Enter",W=_.key===" ",$=A.getAttribute("role"),F=$?.startsWith("menuitem")||$==="option"||$==="gridcell";if(D&&f&&W){if(_.defaultPrevented&&F)return;_.preventDefault(),B||s&&M?(A.click(),_.preventBaseUIHandler()):P&&(k?.(_),_.preventBaseUIHandler());return}P&&(!s&&(W||N)&&_.preventDefault(),!s&&N&&k?.(_))},onKeyUp(_){if(!t){if(Rp(_),R?.(_),_.target===_.currentTarget&&s&&f&&yb(_.currentTarget)&&_.key===" "){_.preventDefault();return}_.baseUIHandlerPrevented||_.target===_.currentTarget&&!s&&!f&&_.key===" "&&k?.(_)}},onPointerDown(_){if(t){_.preventDefault();return}E?.(_)}},s?{type:"button"}:{role:"button"},d,C)},[t,d,f,s]),b=Ke(y=>{l.current=y,h()});return{getButtonProps:m,buttonRef:b}}function yb(e){return Ft(e)&&e.tagName==="BUTTON"}function Mz(e){return!!(e?.tagName==="A"&&e?.href)}const Ni="none",Bl="trigger-press",Sr="trigger-hover",gp="trigger-focus",Vv="outside-press",vb="item-press",vh="focus-out",Gv="escape-key",_w="list-navigation",Dz="cancel-open",p_="disabled",Aw="missing",Nw="initial",_p="imperative-action",Lz="window-resize";function Rt(e,t,n,r){let s=!1,a=!1;const l=r??Bn;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 Ow=0;function jz(e,t="mui"){const[n,r]=v.useState(e),s=e||n;return v.useEffect(()=>{n==null&&(Ow+=1,r(`${t}-${Ow}`))},[n,t]),s}const Iw=Hv.useId;function Kc(e,t){if(Iw!==void 0){const n=Iw();return e??(t?`${t}-${n}`:n)}return jz(e,t)}function Fl(e){return Kc(e,"base-ui")}const zz=[];function Wv(e){v.useEffect(e,zz)}const qu=0;class Oi{static create(){return new Oi}currentId=qu;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=qu,n()},t)}isStarted(){return this.currentId!==qu}clear=()=>{this.currentId!==qu&&(clearTimeout(this.currentId),this.currentId=qu)};disposeEffect=()=>this.clear}function bi(){const e=zr(Oi.create).current;return Wv(e.disposeEffect),e}function Pz(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:$z,platform:Bz,maxTouchPoints:Fz}=Pz(),xh=$z.toLowerCase(),Ec=Bz.toLowerCase(),kh=/^i(os$|p)/.test(Ec)||Ec==="macintel"&&Fz>1,Mw="android",Ly=Ec===Mw||xh.includes(Mw),h_=!kh&&Ec.startsWith("mac");Ec.startsWith("win");const Uz=h_||kh,Ro=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!Ro&&xh.includes("firefox");!Ro&&xh.includes("chrom");const qz=Uz,Kv=/jsdom|happydom/.test(xh);function Ui(e){e.preventDefault(),e.stopPropagation()}function Hz(e){return"nativeEvent"in e}function Yv(e){return e.pointerType===""&&e.isTrusted?!0:Ly&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function m_(e){return Kv?!1:!Ly&&e.width===0&&e.height===0||Ly&&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 oa(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Vz(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const jy="data-base-ui-focusable",g_="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Sh="ArrowLeft",wh="ArrowRight",b_="ArrowUp",Xv="ArrowDown";function pr(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function ht(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&So(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function gr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Ap(e,t){if(!gt(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(ht(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function xb(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 Gz(e){return e.matches("html,body")}function Eh(e){return Ft(e)&&e.matches(g_)}function Wz(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${g_}`)!=null}function zy(e){return e?e.getAttribute("role")==="combobox"&&Eh(e):!1}function Kz(e){if(!e||Kv)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Np(e){return e?e.hasAttribute(jy)?e:e.querySelector(`[${jy}]`)||e:null}function Yz(e,t){return t!=null&&!oa(t)?0:typeof e=="function"?e():e}function Op(e,t,n){const r=Yz(e,n);return typeof r=="number"?r:r?.[t]}function Dw(e){return typeof e=="function"?e():e}function y_(e,t){return t||e==="click"||e==="mousedown"}function Xz(e){return e?.includes("mouse")&&e!=="mousedown"}const Zz=v.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Oi,currentIdRef:{current:null},currentContextRef:{current:null}});function Qz(e,t){e.current=t.current}function Jz(e,t={open:!1}){const{open:n}=t,r="rootStore"in e?e.rootStore:e,s=r.useState("floatingId"),a=v.useContext(Zz),{currentIdRef:l,delayRef:c,timeoutMs:f,initialDelayRef:d,currentContextRef:h,hasProvider:m,timeout:b}=a,[y,k]=v.useState(!1),S=v.useRef(n),R=v.useRef(!1);return Ve(()=>{S.current=n},[n]),Ve(()=>()=>{R.current=!0},[]),Ve(()=>{function T(){R.current||k(!1),h.current?.setIsInstantPhase(!1),l.current=null,h.current=null,c.current=d.current,b.clear()}if(l.current&&!n&&l.current===s){if(k(!1),f){const E=s;return b.start(f,()=>{r.select("open")||l.current&&l.current!==E||T()}),()=>{(S.current||l.current!==E)&&b.clear()}}T()}},[n,s,l,c,f,d,h,b,r]),Ve(()=>{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:Op(d.current,"close")},E!==null&&E!==s?(k(!0),T?.setIsInstantPhase(!0),T?.onOpenChange(!1,Rt(Ni))):(k(!1),T?.setIsInstantPhase(!1))},[n,s,r,l,c,d,h,b]),Ve(()=>()=>{if(l.current===s){if(h.current=null,!S.current)return;l.current=null,Qz(c,d),b.clear()}},[h,l,c,s,d,b]),v.useMemo(()=>({hasProvider:m,delayRef:c,isInstantPhase:y}),[m,c,y])}function Dt(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Wi(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function On(e){const t=zr(eP,e).current;return t.next=e,Ve(t.effect),t}function eP(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const Ad=null;class tP{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 Nd=new tP;class Lr{static create(){return new Lr}static request(t){return Nd.request(t)}static cancel(t){return Nd.cancel(t)}currentId=Ad;request(t){this.cancel(),this.currentId=Nd.request(()=>{this.currentId=Ad,t()})}cancel=()=>{this.currentId!==Ad&&(Nd.cancel(this.currentId),this.currentId=Ad)};disposeEffect=()=>this.cancel}function Rl(){const e=zr(Lr.create).current;return Wv(e.disposeEffect),e}function Wt(e){return e?.ownerDocument||document}const v_={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},x_={...v_,position:"fixed",top:0,left:0},nP={...v_,position:"absolute"},Ip=v.forwardRef(function(t,n){const[r,s]=v.useState();Ve(()=>{qz&&Ro&&s("button")},[]);const a={tabIndex:0,role:r};return g.jsx("span",{...t,ref:n,style:x_,"aria-hidden":r?void 0:!0,...a,"data-base-ui-focus-guard":""})}),rP=["top","right","bottom","left"],Cl=Math.min,Ts=Math.max,_l=Math.round,gl=Math.floor,Rs=e=>({x:e,y:e}),iP={left:"right",right:"left",bottom:"top",top:"bottom"};function k_(e,t,n){return Ts(e,Cl(t,n))}function As(e,t){return typeof e=="function"?e(t):e}function ti(e){return e.split("-")[0]}function Co(e){return e.split("-")[1]}function Zv(e){return e==="x"?"y":"x"}function Qv(e){return e==="y"?"height":"width"}function mi(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Jv(e){return Zv(mi(e))}function sP(e,t,n){n===void 0&&(n=!1);const r=Co(e),s=Jv(e),a=Qv(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=Mp(l)),[l,Mp(l)]}function oP(e){const t=Mp(e);return[Py(e),t,Py(t)]}function Py(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Lw=["left","right"],jw=["right","left"],aP=["top","bottom"],lP=["bottom","top"];function uP(e,t,n){switch(e){case"top":case"bottom":return n?t?jw:Lw:t?Lw:jw;case"left":case"right":return t?aP:lP;default:return[]}}function cP(e,t,n,r){const s=Co(e);let a=uP(ti(e),n==="start",r);return s&&(a=a.map(l=>l+"-"+s),t&&(a=a.concat(a.map(Py)))),a}function Mp(e){const t=ti(e);return iP[t]+e.slice(t.length)}function fP(e){var t,n,r,s;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(s=e.left)!=null?s:0}}function S_(e){return typeof e!="number"?fP(e):{top:e,right:e,bottom:e,left:e}}function Tc(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 cc(e,t){return t<0||t>=e.length}function bp(e,t){return Ss(e.current,{disabledIndices:t})}function $y(e,t){return Ss(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ss(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&&Dp(e,a,r));return a}function Dp(e,t,n){if(typeof n=="function"?n(t):n?.includes(t)??!1)return!0;const s=e[t];return s?Th(s)?!n&&(s.hasAttribute("disabled")||s.getAttribute("aria-disabled")==="true"):!0:!1}function dP(e){return e.visibility==="hidden"||e.visibility==="collapse"}function Th(e,t=e?Tr(e):null){return!e||!e.isConnected||!t||dP(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const pP='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function hP(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return So(n)?n.host:null}function By(e){for(const t of Array.from(e.children))if(Qn(t)==="summary")return t;return null}function mP(e,t){const n=By(t);return!!n&&(e===n||ht(n,e))}function w_(e){const t=e?Qn(e):"";return e!=null&&e.matches(pP)&&(t!=="summary"||e.parentElement!=null&&Qn(e.parentElement)==="details"&&By(e.parentElement)===e)&&(t!=="details"||By(e)==null)&&(t!=="input"||e.type!=="hidden")}function E_(e){if(!w_(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=hP(t)){const n=t!==e,r=Qn(t)==="slot";if(t.hasAttribute("inert")||n&&Qn(t)==="details"&&!t.open&&!mP(e,t)||t.hasAttribute("hidden")||!r&&!gP(t,n))return!1}return!0}function gP(e,t){const n=Tr(e);return t?n.display!=="none":Th(e,n)}function T_(e){const t=e.tabIndex;if(t<0){const n=Qn(e);if(n==="details"||n==="audio"||n==="video"||Ft(e)&&e.isContentEditable)return 0}return t}function kb(e){if(Qn(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function bP(e,t){const n=kb(e);if(!n)return!0;const r=t.find(s=>{const a=kb(s);return a?.name===n.name&&a.form===n.form&&a.checked});return r?r===n:t.find(s=>{const a=kb(s);return a?.name===n.name&&a.form===n.form})===n}function R_(e){if(Ft(e)&&Qn(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Ft(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function C_(e,t){R_(e).forEach(n=>{w_(n)&&t.push(n),C_(n,t)})}function __(e,t,n){R_(e).forEach(r=>{Ft(r)&&r.matches(t)&&n.push(r),__(r,t,n)})}function ex(e){return E_(e)&&T_(e)>=0}function A_(e){const t=[];return C_(e,t),t.filter(E_)}function Rh(e){const t=A_(e);return t.filter(n=>T_(n)>=0&&bP(n,t))}function N_(e,t){const n=Rh(e),r=n.length;if(r===0)return;const s=pr(Wt(e)),a=n.indexOf(s),l=a===-1?t===1?0:r-1:a+t;return n[l]}function O_(e){return N_(Wt(e).body,1)||e}function I_(e){return N_(Wt(e).body,-1)||e}function fc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ht(n,r)}function yP(e){Rh(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function zw(e){const t=[];__(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 wo(e,t,n=!0){return e.filter(s=>s.parentId===t).flatMap(s=>[...!n||s.context?.open?[s]:[],...wo(e,s.id,n)])}function Pw(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 Rc(e){return`data-base-ui-${e}`}let Od=0;function yp(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:s}=t;cancelAnimationFrame(Od);function a(){s&&!s()||e?.focus({preventScroll:n})}if(r)return a(),Zn;const l=requestAnimationFrame(a);return Od=l,()=>{Od===l&&(cancelAnimationFrame(l),Od=0)}}const Sb={inert:new WeakMap,"aria-hidden":new WeakMap},$w="data-base-ui-inert",Fy={inert:new WeakSet,"aria-hidden":new WeakSet};let Hu=new WeakMap,wb=0;function vP(e){return Fy[e]}function M_(e){return e?So(e)?e.host:M_(e.parentNode):null}const Bw=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=M_(n);return e.contains(r)?r:null}).filter(n=>n!=null),Fw=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},Uw=(e,t,n)=>{const r=[],s=a=>{!a||n.has(a)||Array.from(a.children).forEach(l=>{Qn(l)!=="script"&&(t.has(l)?s(l):r.push(l))})};return s(e),r};function xP(e,t,n,r,{mark:s=!0}){let a=null;r?a="inert":n&&(a="aria-hidden");let l=null,c=null;const f=Bw(t,e),d=s?Uw(t,Fw(f),new Set(f)):[],h=[],m=[];if(a){const b=Sb[a],y=vP(a);c=y,l=b;const k=Bw(t,Array.from(t.querySelectorAll("[aria-live]"))),S=f.concat(k);Uw(t,Fw(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&&d.forEach(b=>{const y=(Hu.get(b)||0)+1;Hu.set(b,y),m.push(b),y===1&&b.setAttribute($w,"")}),wb+=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=(Hu.get(b)||0)-1;Hu.set(b,y),y||b.removeAttribute($w)}),wb-=1,wb||(Sb.inert=new WeakMap,Sb["aria-hidden"]=new WeakMap,Fy.inert=new WeakSet,Fy["aria-hidden"]=new WeakSet,Hu=new WeakMap)}}function qw(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:s=!0}=t,a=Wt(e[0]).body;return xP(e,a,n,r,{mark:s})}var Mi=JC();const kP={style:{transition:"none"}},SP="data-base-ui-click-trigger",wP={fallbackAxisSide:"none"},D_={fallbackAxisSide:"end"},EP={clipPath:"inset(50%)",position:"fixed",top:0,left:0},L_=v.createContext(null),j_=()=>v.useContext(L_),TP=Rc("portal");function z_(e={}){const{ref:t,container:n,componentProps:r=Bn,elementProps:s}=e,a=Kc(),c=j_()?.portalNode,[f,d]=v.useState(null),[h,m]=v.useState(null),b=Ke(R=>{R!==null&&m(R)}),y=v.useRef(null);Ve(()=>{if(n===null){y.current&&(y.current=null,m(null),d(null));return}if(a==null)return;const R=(n&&(mh(n)?n:n.current))??c??document.body;if(R==null){y.current&&(y.current=null,m(null),d(null));return}y.current!==R&&(y.current=R,m(null),d(R))},[n,c,a]);const k=bn("div",r,{ref:[t,b],props:[{id:a,[TP]:""},s]});return{portalNode:h,portalSubtree:f&&k?Mi.createPortal(k,f):null}}const RP=v.forwardRef(function(t,n){const{render:r,className:s,style:a,children:l,container:c,renderGuards:f,...d}=t,{portalNode:h,portalSubtree:m}=z_({container:c,ref:n,componentProps:t,elementProps:d}),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 f=="boolean"?f:!!R&&!R.modal&&R.open&&!!h;v.useEffect(()=>{if(!h||C)return;function M(B){h&&B.relatedTarget&&fc(B)&&(B.type==="focusin"?E.current&&(zw(h),E.current=!1):(yP(h),E.current=!0))}return Wi(Dt(h,"focusin",M,!0),Dt(h,"focusout",M,!0))},[h,C]),Ve(()=>{!h||_!==!0||!E.current||(zw(h),E.current=!1)},[_,h]);const A=v.useMemo(()=>({beforeOutsideRef:b,afterOutsideRef:y,beforeInsideRef:k,afterInsideRef:S,portalNode:h,setFocusManagerState:T}),[h]);return g.jsxs(v.Fragment,{children:[m,g.jsxs(L_.Provider,{value:A,children:[D&&h&&g.jsx(Ip,{"data-type":"outside",ref:b,onFocus:M=>{if(fc(M,h))k.current?.focus();else{const B=R?R.domReference:null;I_(B)?.focus()}}}),D&&h&&g.jsx("span",{"aria-owns":h.id,style:EP}),h&&Mi.createPortal(l,h),D&&h&&g.jsx(Ip,{"data-type":"outside",ref:y,onFocus:M=>{if(fc(M,h))S.current?.focus();else{const B=R?R.domReference:null;O_(B)?.focus(),R?.closeOnFocusOut&&R?.onOpenChange(!1,Rt(vh,M.nativeEvent))}}})]})]})});function P_(){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 CP{nodesRef={current:[]};events=P_();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 $_=v.createContext(null),B_=v.createContext(null),Ul=()=>v.useContext($_)?.id||null,ba=e=>{const t=v.useContext(B_);return e??t};function _P(e){const t=Kc(),n=ba(e),r=Ul();return Ve(()=>{if(!t)return;const s={id:t,parentId:r};return n?.addNode(s),()=>{n?.removeNode(s)}},[n,t,r]),t}function AP(e){const{children:t,id:n}=e,r=Ul();return g.jsx($_.Provider,{value:v.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function NP(e){const{children:t,externalTree:n}=e,r=zr(()=>n??new CP).current;return g.jsx(B_.Provider,{value:r,children:t})}function ys(e){return e==null?e:"current"in e?e.current:e}function OP(e,t){const n=xn(gr(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 Hw=20;let mo=[];function tx(){mo=mo.filter(e=>e.deref()?.isConnected)}function Vw(e){tx(),e&&Qn(e)!=="body"&&(mo.push(new WeakRef(e)),mo.length>Hw&&(mo=mo.slice(-Hw)))}function Gw(){return tx(),mo[mo.length-1]?.deref()}function IP(e){return e?ex(e)?e:Rh(e)[0]||e:null}function Ww(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const n=A_(e).filter(s=>{const a=s.getAttribute("data-tabindex")||"";return ex(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 MP(e){const{context:t,children:n,disabled:r=!1,initialFocus:s=!0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,closeOnFocusOut:f=!0,openInteractionType:d="",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=Ke(()=>_.current.floatingContext?.nodeId),A=s===!1,M=zy(T)&&A,B=On(s),P=On(a),N=On(d),W=On(R),$=ba(y),F=j_(),z=v.useRef(!1),U=v.useRef(!1),H=v.useRef(!1),K=v.useRef(null),q=v.useRef(""),Y=v.useRef(""),O=v.useRef(null),j=v.useRef(null),V=xo(O,b,F?.beforeInsideRef),L=xo(j,F?.afterInsideRef),X=bi(),se=bi(),ne=Rl(),oe=F!=null,le=Np(E),ce=Ke((ue=le)=>ue?Rh(ue):[]),Ee=Ke(()=>k?.().filter(ue=>ue!=null)??[]);v.useEffect(()=>{if(r||!c)return;function ue(Se){Se.key==="Tab"&&ht(le,pr(Wt(le)))&&ce().length===0&&!M&&Ui(Se)}const ge=Wt(le);return Dt(ge,"keydown",ue)},[r,le,c,M,ce]),v.useEffect(()=>{if(r||!R)return;const ue=Wt(le);function ge(){H.current=!1}function Se(ke){const xe=gr(ke),Re=Ee(),Me=ht(E,xe)||ht(T,xe)||ht(F?.portalNode,xe)||Re.some(ze=>ze===xe||ht(ze,xe));H.current=!Me,Y.current=ke.pointerType||"keyboard",xe?.closest(`[${SP}]`)&&(U.current=!0,se.start(0,()=>{U.current=!1}))}function Ae(){Y.current="keyboard"}return Wi(Dt(ue,"pointerdown",Se,!0),Dt(ue,"pointerup",ge,!0),Dt(ue,"pointercancel",ge,!0),Dt(ue,"keydown",Ae,!0),ge)},[r,E,T,le,R,F,se,Ee]),v.useEffect(()=>{if(r||!f)return;const ue=Wt(le);function ge(){U.current=!0,se.start(0,()=>{U.current=!1})}function Se(Re){const Me=gr(Re);ex(Me)&&(K.current=Me)}function Ae(Re){const Me=Re.relatedTarget,ze=Re.currentTarget,Fe=gr(Re);c&&Me==null&&Fe!=null&&ht(E,Fe)&&Vw(Fe),queueMicrotask(()=>{const ye=D(),_e=S.context.triggerElements,ee=Ee(),fe=Me?.hasAttribute(Rc("focus-guard"))&&[O.current,j.current,F?.beforeInsideRef.current,F?.afterInsideRef.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,ys(m),ys(h)].includes(Me),Q=!(ht(T,Me)||ht(E,Me)||ht(Me,E)||ht(F?.portalNode,Me)||ee.some(re=>re===Me||ht(re,Me))||Me!=null&&_e.hasElement(Me)||_e.hasMatchingElement(re=>ht(re,Me))||fe||$&&(wo($.nodesRef.current,ye).find(re=>ht(re.context?.elements.floating,Me)||ht(re.context?.elements.domReference,Me))||Pw($.nodesRef.current,ye).find(re=>[re.context?.elements.floating,Np(re.context?.elements.floating)].includes(Me)||re.context?.elements.domReference===Me)));if(ze===T&&le&&Ww(le),l&&ze!==T&&!Th(Fe)&&pr(ue)===ue.body){if(Ft(le)&&(le.focus(),l==="popup")){ne.request(()=>{le.focus()});return}const re=ce(),we=K.current,Pe=(we&&re.includes(we)?we:null)||re[re.length-1]||le;Ft(Pe)&&Pe.focus()}if(_.current.insideReactTree){_.current.insideReactTree=!1;return}(M||!c)&&Me&&Q&&!U.current&&(M||Me!==Gw())&&(z.current=!0,S.setOpen(!1,Rt(vh,Re)))})}function ke(){H.current||(_.current.insideReactTree=!0,X.start(0,()=>{_.current.insideReactTree=!1}))}const xe=Ft(T)?T:null;if(!(!E&&!xe))return Wi(xe&&Dt(xe,"focusout",Ae),xe&&Dt(xe,"pointerdown",ge),E&&Dt(E,"focusin",Se),E&&Dt(E,"focusout",Ae),E&&F&&Dt(E,"focusout",ke,!0))},[r,T,E,le,c,$,F,S,f,l,ce,M,D,_,X,se,ne,h,m,Ee]),v.useEffect(()=>{if(r||!E||!R)return;const ue=Array.from(F?.portalNode?.querySelectorAll(`[${Rc("portal")}]`)||[]),Se=($?Pw($.nodesRef.current,D()):[]).find(ze=>zy(ze.context?.elements.domReference||null))?.context?.elements.domReference,ke=[...[E,...ue,O.current,j.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,...Ee()],Se,ys(m),ys(h),M?T:null].filter(ze=>ze!=null),xe=qw(ke,{ariaHidden:c||M,mark:!1}),Re=[E,...ue].filter(ze=>ze!=null),Me=qw(Re);return()=>{Me(),xe()}},[R,r,T,E,c,F,M,$,D,h,m,Ee]),Ve(()=>{if(!R||r||!Ft(le))return;const ue=Wt(le),ge=pr(ue);queueMicrotask(()=>{const Se=B.current,Ae=typeof Se=="function"?Se(N.current||""):Se;if(Ae===void 0||Ae===!1||ht(le,ge))return;let xe=null;const Re=()=>(xe==null&&(xe=ce(le)),xe[0]||le);let Me;Ae===!0||Ae===null?Me=Re():Me=ys(Ae),Me=Me||Re();const ze=ht(le,pr(ue));yp(Me,{preventScroll:Me===le,shouldFocus(){if(!W.current)return!1;if(ze)return!0;const Fe=pr(ue);return!(Fe!==Me&&ht(le,Fe))}})})},[r,R,le,ce,B,N,W]),Ve(()=>{if(r||!le)return;const ue=Wt(le),ge=pr(ue),Se=N.current==null;Vw(ge);function Ae(xe){if(xe.open||(q.current=OP(xe.nativeEvent,Y.current)),xe.reason===Sr&&xe.nativeEvent.type==="mouseleave"&&(z.current=!0),xe.reason===Vv)if(xe.nested)z.current=!1;else if(Yv(xe.nativeEvent)||m_(xe.nativeEvent))z.current=!1;else{let Re=!1;Wt(le).createElement("div").focus({get preventScroll(){return Re=!0,!1}}),Re?z.current=!1:z.current=!0}}C.on("openchange",Ae);function ke(){const xe=P.current;let Re=typeof xe=="function"?xe(q.current):xe;if(Re===void 0||Re===!1)return null;Re===null&&(Re=!0);const Me=T?.isConnected?T:null,ze=ge?.isConnected&&Qn(ge)!=="body"?ge:null;let Fe=Se?ze||Me:Me||ze;return Fe||(Fe=Gw()||null),typeof Re=="boolean"?Fe:ys(Re)||Fe||null}return()=>{C.off("openchange",Ae);const xe=pr(ue),Re=Ee(),Me=ht(E,xe)||Re.some(ye=>ye===xe||ht(ye,xe))||$&&wo($.nodesRef.current,D(),!1).some(ye=>ht(ye.context?.elements.floating,xe)),ze=P.current,Fe=ke();queueMicrotask(()=>{const ye=IP(Fe),_e=typeof ze!="boolean";ze&&!z.current&&Ft(ye)&&(!(!_e&&ye!==xe&&xe!==ue.body)||Me)&&ye.focus({preventScroll:!0}),z.current=!1})}},[r,E,le,P,N,C,$,T,D,Ee]),Ve(()=>{if(!Ro||R||!E)return;const ue=pr(Wt(E));!Ft(ue)||!Eh(ue)||ht(E,ue)&&ue.blur()},[R,E]),Ve(()=>{if(!(r||!F))return F.setFocusManagerState({modal:c,closeOnFocusOut:f,open:R,onOpenChange:S.setOpen,domReference:T}),()=>{F.setFocusManagerState(null)}},[r,F,c,R,S,f,T]),Ve(()=>{if(!(r||!le))return Ww(le),()=>{queueMicrotask(tx)}},[r,le]);const be=!r&&(c?!M:!0)&&(oe||c);return g.jsxs(v.Fragment,{children:[be&&g.jsx(Ip,{"data-type":"inside",ref:V,onFocus:ue=>{if(c){const ge=ce();yp(ge[ge.length-1])}else F?.portalNode&&(z.current=!1,fc(ue,F.portalNode)?O_(T)?.focus():ys(m??F.beforeOutsideRef)?.focus())}}),n,be&&g.jsx(Ip,{"data-type":"inside",ref:L,onFocus:ue=>{c?yp(ce()[0]):F?.portalNode&&(f&&(z.current=!0),fc(ue,F.portalNode)?I_(T)?.focus():ys(h??F.afterOutsideRef)?.focus())}})]})}function DP(e,t={}){const{enabled:n=!0,event:r="click",toggle:s=!0,ignoreMouse:a=!1,stickIfOpen:l=!0,touchOpenDelay:c=0,reason:f=Bl}=t,d="rootStore"in e?e.rootStore:e,h=d.context.dataRef,m=v.useRef(void 0),b=Rl(),y=bi(),k=v.useMemo(()=>{function S(T,E,C,_){const D=Rt(f,E,C);T&&_==="touch"&&c>0?y.start(c,()=>{d.setOpen(!0,D)}):d.setOpen(T,D)}function R(T,E,C){const _=h.current.openEvent,D=d.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,_=d.select("open");if(T.button!==0||r==="click"||oa(E,!0)&&a)return;const D=R(_,T.currentTarget,B=>B==="click"||B==="mousedown"),A=gr(C);if(Eh(A)){S(D,C,A,E);return}const M=T.currentTarget;b.request(()=>{S(D,C,M,E)})},onClick(T){if(r==="mousedown-only")return;const E=m.current;if(r==="mousedown"&&E){m.current=void 0;return}if(oa(E,!0)&&a)return;const C=d.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,f,d,l,s,b,y,c]);return v.useMemo(()=>n?{reference:k}:Bn,[n,k])}function LP(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",f=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let d=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,d=0,h=0,!s||f?(d=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&&!f&&(h=t.axis==="x"?a.height:h,d=t.axis==="y"?a.width:d),s=!0,{width:d,height:h,x:m,y:b,top:b,right:m+d,bottom:b+h,left:m}}}}function Kw(e){return e!=null&&e.clientX!=null}function jP(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"),f=s.context.dataRef,d=v.useRef(!1),h=v.useRef(null),[m,b]=v.useState(),[y,k]=v.useState([]),S=Ke(_=>{s.set("positionReference",_)}),R=Ke((_,D,A)=>{d.current||f.current.openEvent&&!Kw(f.current.openEvent)||s.set("positionReference",LP(A??c,{x:_,y:D,axis:r,dataRef:f,pointerType:m}))}),T=Ke(_=>{a?h.current||(R(_.clientX,_.clientY,_.currentTarget),k([])):R(_.clientX,_.clientY,_.currentTarget)}),E=oa(m)?l:a;v.useEffect(()=>{if(!n){S(c);return}if(!E)return;function _(){h.current?.(),h.current=null}const D=xn(l);function A(M){const B=gr(M);ht(l,B)?_():R(M.clientX,M.clientY)}return!f.current.openEvent||Kw(f.current.openEvent)?h.current=Dt(D,"mousemove",A):S(c),_},[E,n,l,f,c,s,R,S,y]),v.useEffect(()=>()=>{s.set("positionReference",null)},[s]),v.useEffect(()=>{n&&!l&&(d.current=!1)},[n,l]),v.useEffect(()=>{!n&&a&&(d.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 zP(){return!1}function PP(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function nx(e,t={}){const{enabled:n=!0,escapeKey:r=!0,outsidePress:s=!0,outsidePressEvent:a="sloppy",referencePress:l=zP,bubbles:c,externalTree:f}=t,d="rootStore"in e?e.rootStore:e,h=d.useState("open"),m=d.useState("floatingElement"),{dataRef:b}=d.context,y=ba(f),k=Ke(typeof s=="function"?s:()=>!1),S=typeof s=="function"?k:s,R=S!==!1,T=Ke(()=>a),{escapeKey:E,outsidePress:C}=PP(c),_=v.useRef(!1),D=v.useRef(!1),A=v.useRef(!1),M=v.useRef(!1),B=v.useRef(""),P=v.useRef(null),N=bi(),W=bi(),$=Ke(()=>{W.clear(),b.current.insideReactTree=!1}),F=Ke(V=>{const L=b.current.floatingContext?.nodeId;return(y?wo(y.nodesRef.current,L):[]).some(se=>se.context?.open&&!se.context.dataRef.current[V])}),z=Ke(V=>xb(V,d.select("floatingElement"))||xb(V,d.select("domReferenceElement"))),U=Ke(V=>{l()&&d.setOpen(!1,Rt(Bl,V.nativeEvent))}),H=Ke(V=>{if(!h||!n||!r||V.key!=="Escape"||M.current||!E&&F("__escapeKeyBubbles"))return;const L=Hz(V)?V.nativeEvent:V,X=Rt(Gv,L);d.setOpen(!1,X),X.isCanceled||V.preventDefault(),!E&&!X.isPropagationAllowed&&V.stopPropagation()}),K=Ke(()=>{b.current.insideReactTree=!0,W.start(0,$)}),q=Ke(V=>{if(!h||!n||V.button!==0)return;const L=gr(V.nativeEvent);ht(d.select("floatingElement"),L)&&(_.current||(_.current=!0,D.current=!1))}),Y=Ke(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 Oi,L=new Oi;function X(){V.clear(),M.current=!0}function se(){V.start(Ro?5:0,()=>{M.current=!1})}function ne(){A.current=!0,L.start(0,()=>{A.current=!1})}function oe(){_.current=!1,D.current=!1}function le(){const ee=B.current,fe=ee==="pen"||!ee?"mouse":ee,Q=T(),re=typeof Q=="function"?Q():Q;return typeof re=="string"?re:re[fe]}function ce(ee){const fe=le();return fe==="intentional"&&ee.type!=="click"||fe==="sloppy"&&ee.type==="click"}function Ee(ee){const fe=b.current.floatingContext?.nodeId,Q=y&&wo(y.nodesRef.current,fe).some(re=>xb(ee,re.context?.elements.floating));return z(ee)||Q}function be(ee){if(ce(ee)){ee.type!=="click"&&!z(ee)&&(L.clear(),A.current=!1),$();return}if(b.current.insideReactTree){$();return}const fe=gr(ee),Q=`[${Rc("inert")}]`,re=gt(fe)?fe.getRootNode():null,we=Array.from((So(re)?re:Wt(d.select("floatingElement"))).querySelectorAll(Q)),Pe=d.context.triggerElements;if(fe&&(Pe.hasElement(fe)||Pe.hasMatchingElement(Ze=>ht(Ze,fe))))return;let Ye=gt(fe)?fe:null;for(;Ye&&!_i(Ye);){const Ze=_s(Ye);if(_i(Ze)||!gt(Ze))break;Ye=Ze}if(!(we.length&>(fe)&&!Gz(fe)&&!ht(fe,d.select("floatingElement"))&&we.every(Ze=>!ht(Ye,Ze)))){if(Ft(fe)&&!("touches"in ee)){const Ze=_i(fe),bt=Tr(fe),Je=/auto|scroll/,xt=Ze||Je.test(bt.overflowX),St=Ze||Je.test(bt.overflowY),nt=xt&&fe.clientWidth>0&&fe.scrollWidth>fe.clientWidth,rt=St&&fe.clientHeight>0&&fe.scrollHeight>fe.clientHeight,ct=bt.direction==="rtl",it=rt&&(ct?ee.offsetX<=fe.offsetWidth-fe.clientWidth:ee.offsetX>fe.clientWidth),ft=nt&&ee.offsetY>fe.clientHeight;if(it||ft)return}if(!Ee(ee)){if(le()==="intentional"&&A.current){L.clear(),A.current=!1;return}typeof S=="function"&&!S(ee)||F("__outsidePressBubbles")||(d.setOpen(!1,Rt(Vv,ee)),$())}}}function ue(ee){le()!=="sloppy"||ee.pointerType==="touch"||!d.select("open")||!n||z(ee)||be(ee)}function ge(ee){if(le()!=="sloppy"||!d.select("open")||!n||z(ee))return;const fe=ee.touches[0];fe&&(P.current={startTime:Date.now(),startX:fe.clientX,startY:fe.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},N.start(1e3,()=>{P.current&&(P.current.dismissOnTouchEnd=!1,P.current.dismissOnMouseDown=!1)}))}function Se(ee,fe){const Q=gr(ee);if(!Q)return;const re=Dt(Q,ee.type,()=>{fe(ee),re()})}function Ae(ee){B.current="touch",Se(ee,ge)}function ke(ee){N.clear(),ee.type==="pointerdown"&&(B.current=ee.pointerType),!(ee.type==="mousedown"&&P.current&&!P.current.dismissOnMouseDown)&&Se(ee,fe=>{fe.type==="pointerdown"?ue(fe):be(fe)})}function xe(ee){if(!_.current)return;const fe=D.current;if(oe(),le()==="intentional"){if(ee.type==="pointercancel"){fe&&ne();return}if(!Ee(ee)){if(fe){ne();return}typeof S=="function"&&!S(ee)||(L.clear(),A.current=!0,$())}}}function Re(ee){if(le()!=="sloppy"||!P.current||z(ee))return;const fe=ee.touches[0];if(!fe)return;const Q=Math.abs(fe.clientX-P.current.startX),re=Math.abs(fe.clientY-P.current.startY),we=Math.sqrt(Q*Q+re*re);we>5&&(P.current.dismissOnTouchEnd=!0),we>10&&(be(ee),N.clear(),P.current=null)}function Me(ee){Se(ee,Re)}function ze(ee){le()!=="sloppy"||!P.current||z(ee)||(P.current.dismissOnTouchEnd&&be(ee),N.clear(),P.current=null)}function Fe(ee){Se(ee,ze)}const ye=Wt(m),_e=Wi(r&&Wi(Dt(ye,"keydown",H),Dt(ye,"compositionstart",X),Dt(ye,"compositionend",se)),R&&Wi(Dt(ye,"click",ke,!0),Dt(ye,"pointerdown",ke,!0),Dt(ye,"pointerup",xe,!0),Dt(ye,"pointercancel",xe,!0),Dt(ye,"mousedown",ke,!0),Dt(ye,"mouseup",xe,!0),Dt(ye,"touchstart",Ae,!0),Dt(ye,"touchmove",Me,!0),Dt(ye,"touchend",Fe,!0)));return()=>{_e(),V.clear(),L.clear(),oe(),A.current=!1}},[b,m,r,R,S,h,n,E,C,H,$,T,F,z,y,d,N]),v.useEffect($,[S,$]);const O=v.useMemo(()=>({onKeyDown:H,onPointerDown:U,onClick:U}),[H,U]),j=v.useMemo(()=>({onKeyDown:H,onPointerDown:Y,onMouseDown:Y,onClickCapture:K,onMouseDownCapture(V){K(),q(V)},onPointerDownCapture(V){K(),q(V)},onMouseUpCapture:K,onTouchEndCapture:K,onTouchMoveCapture:K}),[H,K,q,Y]);return v.useMemo(()=>n?{reference:O,floating:j,trigger:O}:{},[n,O,j])}function Yw(e,t,n){let{reference:r,floating:s}=e;const a=mi(t),l=Jv(t),c=Qv(l),f=ti(t),d=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(f){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}}const k=Co(t);return k&&(y[l]+=b*(k==="end"?1:-1)*(n&&d?-1:1)),y}async function $P(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:l,elements:c,strategy:f}=e,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:m="floating",altBoundary:b=!1,padding:y=0}=As(t,e),k=S_(y),R=c[b?m==="floating"?"reference":"floating":m],T=Tc(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:d,rootBoundary:h,strategy:f})),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},D=Tc(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:E,offsetParent:C,strategy:f}):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 BP=50,FP=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:$P},f=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:m}=Yw(d,r,f),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:A}=await E({x:h,y:m,initialPlacement:r,placement:b,strategy:s,middlewareData:k,rects:d,platform:c,elements:{reference:e,floating:t}});h=C??h,m=_??m,k[T]={...k[T],...D},A&&y<BP&&(y++,typeof A=="object"&&(A.placement&&(b=A.placement),A.rects&&(d=A.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):A.rects),{x:h,y:m}=Yw(d,b,f)),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:f,elements:d}=t,{mainAxis:h=!0,crossAxis:m=!0,fallbackPlacements:b,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:S=!0,...R}=As(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const T=ti(s),E=mi(c),C=ti(c)===c,_=await(f.isRTL==null?void 0:f.isRTL(d.floating)),D=b||(C||!S?[Mp(c)]:oP(c)),A=k!=="none";!b&&A&&D.push(...cP(c,S,k,_));const M=[c,...D],B=await f.detectOverflow(t,R),P=[];let N=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&P.push(B[T]),m){const z=sP(s,l,_);P.push(B[z[0]],B[z[1]])}if(N=[...N,{placement:s,overflows:P}],!P.every(z=>z<=0)){var W,$;const z=(((W=a.flip)==null?void 0:W.index)||0)+1,U=M[z];if(U&&(!(m==="alignment"?E!==mi(U):!1)||N.every(q=>mi(q.placement)===E?q.overflows[0]>0:!0)))return{data:{index:z,overflows:N},reset:{placement:U}};let H=($=N.filter(K=>K.overflows[0]<=0).sort((K,q)=>K.overflows[1]-q.overflows[1])[0])==null?void 0:$.placement;if(!H)switch(y){case"bestFit":{var F;const K=(F=N.filter(q=>{if(A){const Y=mi(q.placement);return Y===E||Y==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(Y=>Y>0).reduce((Y,O)=>Y+O,0)]).sort((q,Y)=>q[1]-Y[1])[0])==null?void 0:F[0];K&&(H=K);break}case"initialPlacement":H=c;break}if(s!==H)return{reset:{placement:H}}}return{}}}};function Xw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Zw(e){return rP.some(t=>e[t]>=0)}const qP=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:s="referenceHidden",...a}=As(e,t);switch(s){case"referenceHidden":{const l=await r.detectOverflow(t,{...a,elementContext:"reference"}),c=Xw(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Zw(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...a,altBoundary:!0}),c=Xw(l,n.floating);return{data:{escapedOffsets:c,escaped:Zw(c)}}}default:return{}}}}},F_=new Set(["left","top"]);async function HP(e,t){const{placement:n,platform:r,elements:s}=e,a=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=ti(n),c=Co(n),f=mi(n)==="y",d=F_.has(l)?-1:1,h=a&&f?-1:1,m=As(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),f?{x:y*h,y:b*d}:{x:b*d,y:y*h}}const VP=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,f=await HP(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:s+f.x,y:a+f.y,data:{...f,placement:l}}}}},GP=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:f={fn:E=>{let{x:C,y:_}=E;return{x:C,y:_}}},...d}=As(e,t),h={x:n,y:r},m=await a.detectOverflow(t,d),b=mi(s),y=Zv(b);let k=h[y],S=h[b];const R=(E,C)=>k_(C+m[E==="y"?"top":"left"],C,C-m[E==="y"?"bottom":"right"]);l&&(k=R(y,k)),c&&(S=R(b,S));const T=f.fn({...t,[y]:k,[b]:S});return{...T,data:{x:T.x-n,y:T.y-r,enabled:{[y]:l,[b]:c}}}}}},WP=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:s,y:a,placement:l,rects:c,middlewareData:f}=t,{offset:d=0,mainAxis:h=!0,crossAxis:m=!0}=As(e,t),b={x:s,y:a},y=mi(l),k=Zv(y);let S=b[k],R=b[y];const T=As(d,t),E=typeof T=="number"?{mainAxis:T,crossAxis:0}:{mainAxis:(n=T.mainAxis)!=null?n:0,crossAxis:(r=T.crossAxis)!=null?r:0};if(h){const D=k==="y"?"height":"width",A=c.reference[k]-c.floating[D]+E.mainAxis,M=c.reference[k]+c.reference[D]-E.mainAxis;S<A?S=A:S>M&&(S=M)}if(m){var C,_;const D=k==="y"?"width":"height",A=F_.has(ti(l)),M=c.reference[y]-c.floating[D]+(A&&((C=f.offset)==null?void 0:C[y])||0)+(A?0:E.crossAxis),B=c.reference[y]+c.reference[D]+(A?0:((_=f.offset)==null?void 0:_[y])||0)-(A?E.crossAxis:0);R<M?R=M:R>B&&(R=B)}return{[k]:S,[y]:R}}}},KP=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:s,elements:a}=t,{apply:l=()=>{},...c}=As(e,t),f=await s.detectOverflow(t,c),d=ti(n),h=Co(n),m=mi(n)==="y",{width:b,height:y}=r.floating;let k,S;d==="top"||d==="bottom"?(k=d,S=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(S=d,k=h==="end"?"top":"bottom");const R=y-f.top-f.bottom,T=b-f.left-f.right,E=Cl(y-f[k],R),C=Cl(b-f[S],T),_=t.middlewareData.shift,D=!_;let A=E,M=C;_!=null&&_.enabled.x&&(M=T),_!=null&&_.enabled.y&&(A=R),D&&!h&&(m?M=b-2*Ts(f.left,f.right):A=y-2*Ts(f.top,f.bottom)),await l({...t,availableWidth:M,availableHeight:A});const B=await s.getDimensions(a.floating);return b!==B.width||y!==B.height?{reset:{rects:!0}}:{}}}};function U_(e){const t=Tr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Ft(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:r,c=_l(n)!==a||_l(r)!==l;return c&&(n=a,r=l),{width:n,height:r,$:c}}function rx(e){return gt(e)?e:e.contextElement}function xl(e){const t=rx(e);if(!Ft(t))return Rs(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=U_(t);let l=(a?_l(n.width):n.width)/r,c=(a?_l(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const YP=Rs(0);function q_(e){const t=xn(e);return!bh()||!t.visualViewport?YP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function XP(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===xn(e)}function aa(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=rx(e);let l=Rs(1);t&&(r?gt(r)&&(l=xl(r)):l=xl(e));const c=XP(a,n,r)?q_(a):Rs(0);let f=(s.left+c.x)/l.x,d=(s.top+c.y)/l.y,h=s.width/l.x,m=s.height/l.y;if(a&&r){const b=xn(a),y=gt(r)?xn(r):r;let k=b,S=Dy(k);for(;S&&y!==k;){const R=xl(S),T=S.getBoundingClientRect(),E=Tr(S),C=T.left+(S.clientLeft+parseFloat(E.paddingLeft))*R.x,_=T.top+(S.clientTop+parseFloat(E.paddingTop))*R.y;f*=R.x,d*=R.y,h*=R.x,m*=R.y,f+=C,d+=_,k=xn(S),S=Dy(k)}}return Tc({width:h,height:m,x:f,y:d})}function Ch(e,t){const n=yh(e).scrollLeft;return t?t.left+n:aa(Os(e)).left+n}function H_(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ch(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function ZP(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",l=Os(r),c=t?gh(t.floating):!1;if(r===l||c&&a)return n;let f={scrollLeft:0,scrollTop:0},d=Rs(1);const h=Rs(0),m=Ft(r);if((m||!a)&&((Qn(r)!=="body"||ga(l))&&(f=yh(r)),m)){const y=aa(r);d=xl(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const b=l&&!m&&!a?H_(l,f):Rs(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-f.scrollLeft*d.x+h.x+b.x,y:n.y*d.y-f.scrollTop*d.y+h.y+b.y}}function QP(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function JP(e){const t=yh(e),n=e.ownerDocument.body,r=Ts(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=Ts(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-t.scrollLeft+Ch(e);const l=-t.scrollTop;return Tr(n).direction==="rtl"&&(a+=Ts(e.clientWidth,n.clientWidth)-r),{width:r,height:s,x:a,y:l}}const e$=25;function t$(e,t,n){n===void 0&&(n="viewport");const r=n==="layoutViewport",s=xn(e),a=Os(e),l=s.visualViewport;let c=a.clientWidth,f=a.clientHeight,d=0,h=0;if(l){const b=!bh()||t==="fixed";r?b||(d=-l.offsetLeft,h=-l.offsetTop):(c=l.width,f=l.height,b&&(d=l.offsetLeft,h=l.offsetTop))}if(Ch(a)<=0){const b=a.ownerDocument,y=b.body,k=getComputedStyle(y),S=b.compatMode==="CSS1Compat"&&parseFloat(k.marginLeft)+parseFloat(k.marginRight)||0,R=Math.abs(a.clientWidth-y.clientWidth-S),T=getComputedStyle(a).scrollbarGutter==="stable both-edges"?R/2:R;T<=e$&&(c-=T)}return{width:c,height:f,x:d,y:h}}function n$(e,t){const n=aa(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=xl(e),l=e.clientWidth*a.x,c=e.clientHeight*a.y,f=s*a.x,d=r*a.y;return{width:l,height:c,x:f,y:d}}function Qw(e,t,n){let r;if(t==="viewport"||t==="layoutViewport")r=t$(e,n,t);else if(t==="document")r=JP(Os(e));else if(gt(t))r=n$(t,n);else{const s=q_(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Tc(r)}function r$(e,t){const n=t.get(e);if(n)return n;let r=bo(e,[],!1).filter(c=>gt(c)&&Qn(c)!=="body"),s=null;const a=Tr(e).position==="fixed";let l=a?_s(e):e;for(;gt(l)&&!_i(l);){const c=Tr(l),f=qv(l),d=s?s.position:a?"fixed":"";!f&&(d==="fixed"||d==="absolute"&&c.position==="static")?r=r.filter(m=>m!==l):s=c,l=_s(l)}return t.set(e,r),r}function i$(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?gh(t)?[]:r$(t,this._c):[].concat(n),r],c=Qw(t,l[0],s);let f=c.top,d=c.right,h=c.bottom,m=c.left;for(let b=1;b<l.length;b++){const y=Qw(t,l[b],s);f=Ts(y.top,f),d=Cl(y.right,d),h=Cl(y.bottom,h),m=Ts(y.left,m)}return{width:d-m,height:h-f,x:m,y:f}}function s$(e){const{width:t,height:n}=U_(e);return{width:t,height:n}}function o$(e,t,n){const r=Ft(t),s=Os(t),a=n==="fixed",l=aa(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const f=Rs(0);if((r||!a)&&((Qn(t)!=="body"||ga(s))&&(c=yh(t)),r)){const b=aa(t,!0,a,t);f.x=b.x+t.clientLeft,f.y=b.y+t.clientTop}!r&&s&&(f.x=Ch(s));const d=s&&!r&&!a?H_(s,c):Rs(0),h=l.left+c.scrollLeft-f.x-d.x,m=l.top+c.scrollTop-f.y-d.y;return{x:h,y:m,width:l.width,height:l.height}}function Eb(e){return Tr(e).position==="static"}function Jw(e,t){if(!Ft(e)||Tr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Os(e)===n&&(n=n.ownerDocument.body),n}function V_(e,t){const n=xn(e);if(gh(e))return n;if(!Ft(e)){let s=_s(e);for(;s&&!_i(s);){if(gt(s)&&!Eb(s))return s;s=_s(s)}return n}let r=Jw(e,t);for(;r&&Ez(r)&&Eb(r);)r=Jw(r,t);return r&&_i(r)&&Eb(r)&&!qv(r)?n:r||Cz(e)||n}const a$=async function(e){const t=this.getOffsetParent||V_,n=this.getDimensions,r=await n(e.floating);return{reference:o$(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function l$(e){return Tr(e).direction==="rtl"}const G_={convertOffsetParentRelativeRectToViewportRelativeRect:ZP,getDocumentElement:Os,getClippingRect:i$,getOffsetParent:V_,getElementRects:a$,getClientRects:QP,getDimensions:s$,getScale:xl,isElement:gt,isRTL:l$};function W_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function u$(e,t,n){let r=null,s;const a=Os(e);function l(){var h;clearTimeout(s),(h=r)==null||h.disconnect(),r=null}function c(h,m){h===void 0&&(h=!1),m===void 0&&(m=1),l();const b=e.getBoundingClientRect(),{left:y,top:k,width:S,height:R}=b;if(h||t(),!S||!R)return;const T=gl(k),E=gl(a.clientWidth-(y+S)),C=gl(a.clientHeight-(k+R)),_=gl(y),A={rootMargin:-T+"px "+-E+"px "+-C+"px "+-_+"px",threshold:Ts(0,Cl(1,m))||1};let M=!0;function B(P){const N=P[0].intersectionRatio;if(!W_(b,e.getBoundingClientRect()))return c();if(N!==m){if(!M)return c();N?c(!1,N):s=setTimeout(()=>{c(!1,1e-7)},1e3)}M=!1}try{r=new IntersectionObserver(B,{...A,root:a.ownerDocument})}catch{r=new IntersectionObserver(B,A)}r.observe(e)}const f=xn(e),d=()=>c(n);return f.addEventListener("resize",d),c(!0),()=>{f.removeEventListener("resize",d),l()}}function Lp(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:f=!1}=r,d=rx(e),h=s||a?[...d?bo(d):[],...t?bo(t):[]]:[];h.forEach(T=>{s&&T.addEventListener("scroll",n),a&&T.addEventListener("resize",n)});const m=d&&c?u$(d,n,a):null;let b=-1,y=null;l&&(y=new ResizeObserver(T=>{let[E]=T;E&&E.target===d&&y&&t&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var C;(C=y)==null||C.observe(t)})),n()}),d&&!f&&y.observe(d),t&&y.observe(t));let k,S=f?aa(e):null;f&&R();function R(){const T=aa(e);S&&!W_(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,f&&cancelAnimationFrame(k)}}const c$=VP,f$=GP,d$=UP,p$=KP,h$=qP,m$=WP,g$=(e,t,n)=>{const r=new Map,s=n??{},a={...G_,...s.platform,_c:r};return FP(e,t,{...s,platform:a})};var b$=typeof document<"u",y$=function(){},vp=b$?v.useLayoutEffect:y$;function jp(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(!jp(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)&&!jp(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function K_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eE(e,t){const n=K_(e);return Math.round(t*n)/n}function Tb(e){const t=v.useRef(e);return vp(()=>{t.current=e}),t}function Y_(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:f,open:d}=e,[h,m]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,y]=v.useState(r);jp(b,r)||y(r);const[k,S]=v.useState(null),[R,T]=v.useState(null),E=v.useCallback(q=>{q!==A.current&&(A.current=q,S(q))},[]),C=v.useCallback(q=>{q!==M.current&&(M.current=q,T(q))},[]),_=a||k,D=l||R,A=v.useRef(null),M=v.useRef(null),B=v.useRef(h),P=f!=null,N=Tb(f),W=Tb(s),$=Tb(d),F=v.useCallback(()=>{if(!A.current||!M.current)return;const q={placement:t,strategy:n,middleware:b};W.current&&(q.platform=W.current),g$(A.current,M.current,q).then(Y=>{const O={...Y,isPositioned:$.current!==!1};z.current&&!jp(B.current,O)&&(B.current=O,Mi.flushSync(()=>{m(O)}))})},[b,t,n,W,$]);vp(()=>{d===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,m(q=>({...q,isPositioned:!1})))},[d]);const z=v.useRef(!1);vp(()=>(z.current=!0,()=>{z.current=!1}),[]),vp(()=>{if(_&&(A.current=_),D&&(M.current=D),_&&D){if(N.current)return N.current(_,D,F);F()}},[_,D,F,N,P]);const U=v.useMemo(()=>({reference:A,floating:M,setReference:E,setFloating:C}),[E,C]),H=v.useMemo(()=>({reference:_,floating:D}),[_,D]),K=v.useMemo(()=>{const q={position:n,left:0,top:0};if(!H.floating)return q;const Y=eE(H.floating,h.x),O=eE(H.floating,h.y);return c?{...q,transform:"translate("+Y+"px, "+O+"px)",...K_(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Y,top:O}},[n,c,H.floating,h.x,h.y]);return v.useMemo(()=>({...h,update:F,refs:U,elements:H,floatingStyles:K}),[h,F,U,H,K])}const ix=(e,t)=>{const n=c$(e);return{name:n.name,fn:n.fn,options:[e,t]}},sx=(e,t)=>{const n=f$(e);return{name:n.name,fn:n.fn,options:[e,t]}},v$=(e,t)=>({fn:m$(e).fn,options:[e,t]}),ox=(e,t)=>{const n=d$(e);return{name:n.name,fn:n.fn,options:[e,t]}},ax=(e,t)=>{const n=p$(e);return{name:n.name,fn:n.fn,options:[e,t]}},x$=(e,t)=>{const n=h$(e);return{name:n.name,fn:n.fn,options:[e,t]}};function zp(e,t,n,r){return{left:e,top:t,right:n,bottom:r,x:e,y:t,width:n-e,height:r-t}}function k$(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function X_(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((f,d)=>f.top-d.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(k$(c));else{const f=t[t.length-1];f.left=Math.min(f.left,c.left),f.right=Math.max(f.right,c.right),f.bottom=Math.max(f.bottom,c.bottom),f.width=f.right-f.left,f.height=f.bottom-f.top}n=c}return{lines:t,fallback:zp(r,s,a,l)}}function Z_(e,t,n){return e.findIndex(r=>t>r.left-2&&t<r.right+2&&n>r.top-2&&n<r.bottom+2)}function tE(e){return zp(e.left,e.top,e.right,e.bottom)}function S$(e,t,n){const{lines:r}=X_(e.getClientRects());if(r.length<2)return;const s=Z_(r,t,n);return{x:t,y:n,lineIndex:s===-1?void 0:s,element:e}}function w$(e,t,n){const{lines:r,fallback:s}=X_(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 tE(r[n.lineIndex]);if(a!=null&&l!=null){const k=Z_(r,a,l);if(k!==-1)return tE(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 zp(R.left,k.top,R.right,S.bottom)}const f=c==="l";let d=r[0].left,h=r[0].right,m=f?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY,b=r[0],y=r[0];for(const k of r){d=Math.min(d,k.left),h=Math.max(h,k.right);const S=f?k.left:k.right;f&&S<m||!f&&S>m?(m=S,b=k,y=k):S===m&&(y=k)}return zp(d,b.top,h,y.bottom)}function E$(e){return"contextElement"in e&&e.contextElement?e.contextElement:gt(e)?e:void 0}function T$(e,t){function n(s){Q_(e,s.currentTarget,s.clientX,s.clientY)}function r(s){t||n(s)}return{onFocus(){e.current=void 0},onMouseEnter:r,onMouseMove:r}}function Q_(e,t,n,r){const s=S$(t,n,r);return e.current=s,s}function R$(e){return{name:"inline",async fn(t){const n=t.elements.reference;if(typeof n?.getClientRects!="function")return{};const r=E$(n),s=e.current,a=s?.element===n||s?.element===r?s:void 0,l=w$(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 J_(e){const t=v.useRef(!0);t.current&&(t.current=!1,e())}const tt=(e,t,n,r,s,a,...l)=>{if(l.length>0)throw new Error(In(1));let c;if(e)c=e;else throw new Error("Missing arguments");return c};var Rb={exports:{}},Cb={};var nE;function C$(){if(nE)return Cb;nE=1;var e=Gc();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,f(S)&&R({inst:S})},[m,y,b]),s(function(){return f(S)&&R({inst:S}),m(function(){f(S)&&R({inst:S})})},[m]),l(y),y}function f(m){var b=m.getSnapshot;m=m.value;try{var y=b();return!n(m,y)}catch{return!0}}function d(m,b){return b()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:c;return Cb.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,Cb}var rE;function eA(){return rE||(rE=1,Rb.exports=C$()),Rb.exports}var lx=eA(),_b={exports:{}},Ab={};var iE;function _$(){if(iE)return Ab;iE=1;var e=Gc(),t=eA();function n(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var r=typeof Object.is=="function"?Object.is:n,s=t.useSyncExternalStore,a=e.useRef,l=e.useEffect,c=e.useMemo,f=e.useDebugValue;return Ab.useSyncExternalStoreWithSelector=function(d,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(A){if(!E){if(E=!0,C=A,A=b(A),y!==void 0&&S.hasValue){var M=S.value;if(y(M,A))return _=M}return _=A}if(M=_,r(C,A))return M;var B=b(A);return y!==void 0&&y(M,B)?(C=A,M):(C=A,_=B)}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(d,k[0],k[1]);return l(function(){S.hasValue=!0,S.value=R},[R]),f(R),R},Ab}var sE;function A$(){return sE||(sE=1,_b.exports=_$()),_b.exports}var N$=A$();const Uy=[];let qy;function O$(){return qy}function I$(e){Uy.push(e)}function ux(e){const t=(n,r)=>{const s=zr(M$).current;let a;try{qy=s;for(const l of Uy)l.before(s);a=e(n,r);for(const l of Uy)l.after(s);s.didInitialize=!0}finally{qy=void 0}return a};return t.displayName=e.displayName||e.name,t}function tA(e){return v.forwardRef(ux(e))}function M$(){return{didInitialize:!1}}const D$=$v(19),L$=D$?z$:P$;function mt(e,t,n,r,s){return L$(e,t,n,r,s)}function j$(e,t,n,r,s){const a=v.useCallback(()=>t(e.getSnapshot(),n,r,s),[e,t,n,r,s]);return lx.useSyncExternalStore(e.subscribe,a,a)}I$({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()}}),lx.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function z$(e,t,n,r,s){const a=O$();if(!a)return j$(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 P$(e,t,n,r,s){return N$.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a=>t(a,n,r,s))}class nA{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 mt(this,t,n,r,s)}}class cx extends nA{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){v.useDebugValue(t);const r=this;Ve(()=>{r.state[t]!==n&&r.set(t,n)},[r,t,n])}useSyncedValueWithCleanup(t,n){const r=this;Ve(()=>(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);Ve(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){v.useDebugValue(t);const r=this,s=n!==void 0;Ve(()=>{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),mt(this,this.selectors[t],n,r,s)}useContextCallback(t,n){v.useDebugValue(t);const r=Ke(n??Zn);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 $$(){const[,e]=v.useState({});return v.useCallback(()=>{e({})},[])}const B$={open:tt(e=>e.open),transitionStatus:tt(e=>e.transitionStatus),domReferenceElement:tt(e=>e.domReferenceElement),referenceElement:tt(e=>e.positionReference??e.referenceElement),floatingElement:tt(e=>e.floatingElement),floatingId:tt(e=>e.floatingId)};class _h extends cx{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:P_(),nested:r,triggerElements:a},B$),this.syncOnly=n}syncOpenEvent=(t,n)=>{(!t||!this.state.open||n!=null&&Vz(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 F$(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:s,nested:a,onOpenChange:l}=e,c=t.useState("open"),f=t.useState("activeTriggerElement"),d=t.useState(n?"popupElement":"positionerElement"),h=t.context.triggerElements,m=l,b=v.useRef(null);r===void 0&&b.current===null&&(b.current=new _h({open:c,transitionStatus:void 0,referenceElement:f,floatingElement:d,triggerElements:h,onOpenChange:m,floatingId:s,syncOnly:!0,nested:a}));const y=r??b.current;return t.useSyncedValue("floatingId",s),Ve(()=>{const k={open:c,floatingId:s,referenceElement:f,floatingElement:d};gt(f)&&(k.domReferenceElement=f),y.state.positionReference===y.state.referenceElement&&(k.positionReference=f),y.update(k)},[c,s,f,d,y]),y.context.onOpenChange=m,y.context.nested=a,y}function Yc(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),Ve(()=>{if(!e&&a&&r!=="ending"&&n){const c=Lr.request(()=>{s("ending")});return()=>{Lr.cancel(c)}}},[e,a,r,n]),Ve(()=>{if(!e||t)return;const c=Lr.request(()=>{s(void 0)});return()=>{Lr.cancel(c)}},[t,e]),Ve(()=>{if(!e||!t)return;e&&a&&r!=="idle"&&s("starting");const c=Lr.request(()=>{s("idle")});return()=>{Lr.cancel(c)}},[t,e,a,r]),{mounted:a,setMounted:l,transitionStatus:r}}function rA(e,t=!1,n=!0){const r=Rl();return Ke((s,a=null)=>{r.cancel();const l=ys(e);if(l==null)return;const c=l,f=()=>{Mi.flushSync(s)};if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){s();return}function d(){Promise.all(c.getAnimations().map(h=>h.finished)).then(()=>{a?.aborted||f()}).catch(()=>{if(n){a?.aborted||f();return}const h=c.getAnimations();!a?.aborted&&h.length>0&&h.some(m=>m.pending||m.playState!=="finished")&&d()})}if(t){const h=sa.startingStyle;if(!c.hasAttribute(h)){r.request(d);return}const m=new MutationObserver(()=>{c.hasAttribute(h)||(m.disconnect(),d())});m.observe(c,{attributes:!0,attributeFilter:[h]}),a?.addEventListener("abort",()=>m.disconnect(),{once:!0});return}r.request(d)})}function _o(e){const{enabled:t=!0,open:n,ref:r,onComplete:s}=e,a=Ke(s),l=rA(r,n,!1);v.useEffect(()=>{if(!t)return;const c=new AbortController;return l(a,c.signal),()=>{c.abort()}},[t,n,a,l])}const fx={tabIndex:-1,[jy]:""};function iA(e,t,n=!1){const r=Kc(),s=Ul()!=null,a=v.useRef(null);e===void 0&&a.current===null&&(a.current=t(r,s));const l=e??a.current;return F$({popupStore:l,treatPopupAsFloatingElement:n,floatingRootContext:l.state.floatingRootContext,floatingId:r,nested:s,onOpenChange:l.setOpen}),{store:l,internalStore:a.current}}function U$(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,f=t.context.triggerElements.getById(l);c&&f===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 q$(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 H$(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function sA(e,t,n,r={}){const s=n.reason,a=s===Sr,l=t&&s===gp,c=!t&&(s===Bl||s===Gv),f=H$(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);const d=()=>{const h={...r.extraState,open:t};l?h.instantType="focus":c?h.instantType="dismiss":a&&(h.instantType=void 0),q$(h,t,n.trigger,f()),e.update(h)};a?Mi.flushSync(d):d()}function oA(e,t,n,r){J_(()=>{t===void 0&&e.state.open===!1&&n&&(e.state={...e.state,open:!0,activeTriggerId:r,preventUnmountingOnClose:!1})})}function aA(e,t,n,r){const s=n.useState("isMountedByTrigger",e),a=U$(e,n),l=Ke(c=>{if(a(c),!c)return;const f=n.select("open"),d=n.select("activeTriggerId");if(d===e){n.update({activeTriggerElement:c,...f?r:null});return}d==null&&f&&n.update({activeTriggerId:e,activeTriggerElement:c,...r})});return Ve(()=>{s&&n.update({activeTriggerElement:t.current,...r})},[s,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:s}}function lA(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState("open"),s=e.useState("triggerCount");Ve(()=>{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 f=null;if(c){const d=e.context.triggerElements.getById(c);d?d!==e.state.activeTriggerElement&&(l.activeTriggerElement=d):f=c}if(!f&&!c&&a===1){const d=e.context.triggerElements.entries().next();if(!d.done){const[h,m]=d.value;l.activeTriggerId=h,l.activeTriggerElement=m}}(l.triggerCount!==void 0||l.activeTriggerId!==void 0||l.activeTriggerElement!==void 0)&&e.update(l),f&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===f&&!e.context.triggerElements.getById(f)){const d=Rt(Ni);e.setOpen(!1,d),d.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,s,n])}function uA(e,t,n){const{mounted:r,setMounted:s,transitionStatus:a}=Yc(e),l=t.useState("preventUnmountingOnClose"),c=e?!1:l;t.useSyncedValues({mounted:r,transitionStatus:a,preventUnmountingOnClose:c});const f=Ke(()=>{s(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return _o({enabled:r&&!e&&!c,open:e,ref:t.context.popupRef,onComplete(){e||f()}}),{forceUnmount:f,transitionStatus:a}}function cA(e,t){e.useSyncedValues(t),Ve(()=>()=>{e.update({activeTriggerProps:Bn,inactiveTriggerProps:Bn,popupProps:Bn})},[e])}class Ah{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 V$(){return new _h({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Ah,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function fA(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:V$(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Bn,inactiveTriggerProps:Bn,popupProps:Bn}}function dA(e,t,n=!1){return new _h({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}const dc=tt(e=>e.triggerIdProp??e.activeTriggerId),dx=tt(e=>e.openProp??e.open),oE=tt(e=>(e.popupElement?.id??e.floatingId)||void 0);function pA(e,t){return t!==void 0&&dx(e)&&dc(e)===t}function G$(e,t){return pA(e,t)?!0:t!==void 0&&dx(e)&&dc(e)==null&&e.triggerCount===1}const hA={open:dx,mounted:tt(e=>e.mounted),transitionStatus:tt(e=>e.transitionStatus),floatingRootContext:tt(e=>e.floatingRootContext),triggerCount:tt(e=>e.triggerCount),preventUnmountingOnClose:tt(e=>e.preventUnmountingOnClose),payload:tt(e=>e.payload),activeTriggerId:dc,activeTriggerElement:tt(e=>e.mounted?e.activeTriggerElement:null),popupId:oE,isTriggerActive:tt((e,t)=>t!==void 0&&dc(e)===t),isOpenedByTrigger:tt((e,t)=>pA(e,t)),isMountedByTrigger:tt((e,t)=>t!==void 0&&dc(e)===t&&e.mounted),triggerProps:tt((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:tt((e,t)=>G$(e,t)?oE(e):void 0),popupProps:tt(e=>e.popupProps),popupElement:tt(e=>e.popupElement),positionerElement:tt(e=>e.positionerElement)};function mA(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,s=Kc(),a=Ul()!=null,l=zr(()=>new _h({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Ah,floatingId:s,syncOnly:!1,nested:a})).current;return Ve(()=>{const c={open:t,floatingId:s};r.reference!==void 0&&(c.referenceElement=r.reference,c.domReferenceElement=gt(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 W$(e={}){const{nodeId:t,externalTree:n}=e,r=mA(e),s=e.rootContext||r,a=s.useState("referenceElement"),l=s.useState("floatingElement"),c=s.useState("domReferenceElement"),f=s.useState("open"),d=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=ba(n),E=v.useMemo(()=>({reference:a,floating:l,domReference:c}),[a,l,c]),C=Y_({...e,elements:{...E,...h&&{reference:h}}}),_=gt(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 A=v.useCallback($=>{const F=gt($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),getClientRects:()=>$.getClientRects(),contextElement:$}:$;m(F),C.refs.setReference(F)},[C.refs]),M=v.useCallback($=>{(gt($)||$===null)&&(R.current=$,y($)),(gt(C.refs.reference.current)||C.refs.reference.current===null||$!==null&&!gt($))&&C.refs.setReference($)},[C.refs,y]),B=v.useCallback($=>{S($),C.refs.setFloating($)},[C.refs]),P=v.useMemo(()=>({...C.refs,setReference:M,setFloating:B,setPositionReference:A,domReference:R}),[C.refs,M,B,A]),N=v.useMemo(()=>({...C.elements,domReference:c}),[C.elements,c]),W=v.useMemo(()=>({...C,dataRef:s.context.dataRef,open:f,onOpenChange:s.setOpen,events:s.context.events,floatingId:d,refs:P,elements:N,nodeId:t,rootStore:s}),[C,P,N,t,s,f,d]);return Ve(()=>{c&&(R.current=c)},[c]),Ve(()=>{s.context.dataRef.current.floatingContext=W;const $=T?.nodesRef.current.find(F=>F.id===t);$&&($.context=W)}),v.useMemo(()=>({...C,context:W,refs:P,elements:N,rootStore:s}),[C,P,N,W,s])}const Nb=h_&&Ro;function gA(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),f=v.useRef(null),d=v.useRef(!0),h=bi();v.useEffect(()=>{const b=s.select("domReferenceElement");if(!n)return;const y=xn(b);function k(){const T=s.select("domReferenceElement");!s.select("open")&&Ft(T)&&T===pr(Wt(T))&&(c.current=!0)}function S(){d.current=!0}function R(){d.current=!1}return Wi(Dt(y,"blur",k),Nb&&Dt(y,"keydown",S,!0),Nb&&Dt(y,"pointerdown",R,!0))},[s,n]),v.useEffect(()=>{if(!n)return;function b(y){if(y.reason===Bl||y.reason===Gv){const k=s.select("domReferenceElement");gt(k)&&(f.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,f.current=null}return{onMouseLeave(){b()},onFocus(y){const k=y.currentTarget;if(c.current){if(f.current===k)return;b()}const S=gr(y.nativeEvent);if(gt(S)){if(Nb&&!y.relatedTarget){if(!d.current&&!Eh(S))return}else if(!Kz(S))return}const R=Ap(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,Rt(gp,T,E));return}h.start(C,()=>{c.current||s.setOpen(!0,Rt(gp,T,E))})},onBlur(y){b();const k=y.relatedTarget,S=y.nativeEvent,R=gt(k)&&k.hasAttribute(Rc("focus-guard"))&&k.getAttribute("data-type")==="outside";h.start(0,()=>{const T=s.select("domReferenceElement"),E=pr(Wt(T));!k&&E===T||ht(l.current.floatingContext?.refs.floating.current,E)||ht(T,E)||R||Ap(k??E,s.context.triggerElements)||s.setOpen(!1,Rt(gp,S))})}}},[l,r,s,h]);return v.useMemo(()=>n?{reference:m,trigger:m}:{},[n,m])}class px{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 Oi,this.restTimeout=new Oi,this.handleCloseOptions=void 0}static create(){return new px}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const Pp=new WeakMap;function $p(e){if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&Pp.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Pp.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function bA(e,t){const{scopeElement:n,referenceElement:r,floatingElement:s}=t,a=Pp.get(n);a&&a!==e&&$p(a),$p(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=s,Pp.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",s.style.pointerEvents="auto"}function hx(e){const t=e.context.dataRef.current,n=zr(()=>t.hoverInteractionState??px.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=n),Wv(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function yA(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"),f=a.useState("domReferenceElement"),{dataRef:d}=a.context,h=ba(),m=Ul(),b=hx(a),y=bi(),k=Ke(()=>y_(d.current.openEvent?.type,b.interactedInside)),S=Ke(()=>Xz(d.current.openEvent?.type)),R=Ke(()=>{$p(b)});Ve(()=>{l||(b.pointerType=void 0,b.restTimeoutPending=!1,b.interactedInside=!1,R())},[l,b,R]),v.useEffect(()=>R,[R]),Ve(()=>{if(n&&l&&b.handleCloseOptions?.blockPointerEvents&&S()&>(f)&&c){const T=f,E=c,C=Wt(c),_=h?.nodesRef.current.find(B=>B.id===m)?.context?.elements.floating;_&&(_.style.pointerEvents="");const D=b.pointerEventsScopeElement!==E?b.pointerEventsScopeElement:null,A=_!==E?_:null,M=b.handleCloseOptions?.getScope?.()??D??A??T.closest("[data-rootownerid]")??C.body;return bA(b,{scopeElement:M,referenceElement:T,floatingElement:E}),()=>{R()}}},[n,l,f,c,b,S,h,m,R]),v.useEffect(()=>{if(!n)return;function T(){return!!(h&&m&&wo(h.nodesRef.current,m).length>0)}function E(B){const P=Op(r,"close",b.pointerType),N=()=>{a.setOpen(!1,Rt(Sr,B)),h?.events.emit("floating.closed",B)};P?b.openChangeTimeout.start(P,N):(b.openChangeTimeout.clear(),N())}function C(B){const P=gr(B);if(!Wz(P)){b.interactedInside=!1;return}b.interactedInside=P?.closest("[aria-haspopup]")!=null}function _(){b.openChangeTimeout.clear(),y.clear(),h?.events.off("floating.closed",A),R()}function D(B){if(T()&&h){h.events.on("floating.closed",A);return}if(Ap(B.relatedTarget,a.context.triggerElements))return;const P=d.current.floatingContext?.nodeId??s,N=B.relatedTarget;if(!(h&&P&>(N)&&wo(h.nodesRef.current,P,!1).some($=>ht($.context?.elements.floating,N)))){if(b.handler){b.handler(B);return}R(),S()&&!k()&&E(B)}}function A(B){!h||!m||T()||y.start(0,()=>{h.events.off("floating.closed",A),a.setOpen(!1,Rt(Sr,B)),h.events.emit("floating.closed",B)})}const M=c;return Wi(M&&Dt(M,"mouseenter",_),M&&Dt(M,"mouseleave",D),M&&Dt(M,"pointerdown",C,!0),()=>{h?.events.off("floating.closed",A)})},[n,c,a,d,r,s,S,k,R,b,h,m,y])}const K$={current:null};function vA(e,t={}){const{enabled:n=!0,delay:r=0,handleClose:s=null,mouseOnly:a=!1,restMs:l=0,move:c=!0,triggerElementRef:f=K$,externalTree:d,isActiveTrigger:h=!0,getHandleCloseContext:m,isClosing:b,shouldOpen:y}=t,k="rootStore"in e?e.rootStore:e,{dataRef:S,events:R}=k.context,T=ba(d),E=hx(k),C=v.useRef(!1),_=On(s),D=On(r),A=On(l),M=On(n),B=On(y),P=On(b),N=Ke(()=>y_(S.current.openEvent?.type,E.interactedInside)),W=Ke(()=>B.current?.()!==!1),$=Ke((U,H,K)=>{const q=k.context.triggerElements;if(q.hasElement(H))return!U||!ht(U,H);if(!gt(K))return!1;const Y=K;return q.hasMatchingElement(O=>ht(O,Y))&&(!U||!ht(U,Y))}),F=Ke(()=>{if(!E.handler)return;Wt(k.select("domReferenceElement")).removeEventListener("mousemove",E.handler),E.handler=void 0}),z=Ke(()=>{$p(E)});return h&&(E.handleCloseOptions=_.current?.__options),v.useEffect(()=>F,[F]),v.useEffect(()=>{if(!n)return;function U(H){H.open?C.current=!1:(C.current=H.reason===Sr,F(),E.openChangeTimeout.clear(),E.restTimeout.clear(),E.blockMouseMove=!0,E.restTimeoutPending=!1)}return R.on("openchange",U),()=>{R.off("openchange",U)}},[n,R,E,F]),v.useEffect(()=>{if(!n)return;function U(Y,O=!0){const j=Op(D.current,"close",E.pointerType);j?E.openChangeTimeout.start(j,()=>{k.setOpen(!1,Rt(Sr,Y)),T?.events.emit("floating.closed",Y)}):O&&(E.openChangeTimeout.clear(),k.setOpen(!1,Rt(Sr,Y)),T?.events.emit("floating.closed",Y))}const H=f.current??(h?k.select("domReferenceElement"):null);if(!gt(H))return;function K(Y){if(E.openChangeTimeout.clear(),E.blockMouseMove=!1,a&&!oa(E.pointerType))return;const O=Dw(A.current),j=Op(D.current,"open",E.pointerType),V=gr(Y),L=Y.currentTarget??null,X=k.select("domReferenceElement");let se=L;if(gt(V)&&!k.context.triggerElements.hasElement(V)){for(const Se of k.context.triggerElements.elements())if(ht(Se,V)){se=Se;break}}gt(L)&>(X)&&!k.context.triggerElements.hasElement(L)&&ht(L,X)&&(se=X);const ne=se==null?!1:$(X,se,V),oe=k.select("open"),le=P.current?.()??k.select("transitionStatus")==="ending",ce=!oe&&le&&C.current,Ee=!ne&>(se)&>(X)&&ht(X,se)&&ce,be=O>0&&!j,ue=ne&&(oe||ce)||Ee,ge=!oe||ne;if(ue){W()&&k.setOpen(!0,Rt(Sr,Y,se));return}be||(j?E.openChangeTimeout.start(j,()=>{ge&&W()&&k.setOpen(!0,Rt(Sr,Y,se))}):ge&&W()&&k.setOpen(!0,Rt(Sr,Y,se)))}function q(Y){if(N()){z();return}F();const O=k.select("domReferenceElement"),j=Wt(O);E.restTimeout.clear(),E.restTimeoutPending=!1;const V=S.current.floatingContext??m?.();if(Ap(Y.relatedTarget,k.context.triggerElements))return;if(_.current&&V){k.select("open")||E.openChangeTimeout.clear();const X=f.current;E.handler=_.current({...V,tree:T,x:Y.clientX,y:Y.clientY,onClose(){z(),F(),M.current&&!N()&&X===k.select("domReferenceElement")&&U(Y,!0)}}),j.addEventListener("mousemove",E.handler),E.handler(Y);return}(E.pointerType!=="touch"||!ht(k.select("floatingElement"),Y.relatedTarget))&&U(Y)}return c?Wi(Dt(H,"mousemove",K,{once:!0}),Dt(H,"mouseenter",K),Dt(H,"mouseleave",q)):Wi(Dt(H,"mouseenter",K),Dt(H,"mouseleave",q))},[F,z,S,D,k,n,_,E,h,$,N,a,c,A,f,T,M,m,P,W]),v.useMemo(()=>{if(!n)return;function U(H){E.pointerType=H.pointerType}return{onPointerDown:U,onPointerEnter:U,onMouseMove(H){const{nativeEvent:K}=H,q=H.currentTarget,Y=k.select("domReferenceElement"),O=k.select("open"),j=$(Y,q,H.target);if(a&&!oa(E.pointerType))return;if(O&&j&&E.handleCloseOptions?.blockPointerEvents){const X=k.select("floatingElement");if(X){const se=E.handleCloseOptions?.getScope?.()??q.ownerDocument.body;bA(E,{scopeElement:se,referenceElement:q,floatingElement:X})}}const V=Dw(A.current);if(O&&!j||V===0||!j&&E.restTimeoutPending&&H.movementX**2+H.movementY**2<2)return;E.restTimeout.clear();function L(){if(E.restTimeoutPending=!1,N())return;const X=k.select("open");!E.blockMouseMove&&(!X||j)&&W()&&k.setOpen(!0,Rt(Sr,K,q))}E.pointerType==="touch"?Mi.flushSync(()=>{L()}):j&&O?L():(E.restTimeoutPending=!0,E.restTimeout.start(V,L))}}},[n,E,N,$,a,k,A,W])}const Y$="Escape";function Nh(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Id(e,t){return Nh(t,e===b_||e===Xv,e===Sh||e===wh)}function Ob(e,t,n){return Nh(t,e===Xv,n?e===Sh:e===wh)||e==="Enter"||e===" "||e===""}function X$(e,t,n){return Nh(t,n?e===Sh:e===wh,e===Xv)}function Z$(e,t,n,r){const s=n?e===wh:e===Sh,a=e===b_;return t==="both"||t==="horizontal"&&r?e===Y$:Nh(t,s,a)}function Q$(e,t){const{listRef:n,activeIndex:r,onNavigate:s=()=>{},enabled:a=!0,selectedIndex:l=null,allowEscape:c=!1,loopFocus:f=!1,nested:d=!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,A=D!=null,M="rootStore"in e?e.rootStore:e,B=M.useState("open"),P=M.useState("floatingElement"),N=M.useState("domReferenceElement"),W=M.context.dataRef,$=Np(P),F=zy(N),z=On($),U=Ul(),H=ba(_),K=v.useRef(b),q=v.useRef(l??-1),Y=v.useRef(null),O=v.useRef(!0),j=Ke(ee=>{s(q.current===-1?null:q.current,ee)}),V=v.useRef(!!P),L=v.useRef(B),X=v.useRef(!1),se=v.useRef(!1),ne=v.useRef(null),oe=On(S),le=On(B),ce=On(l),Ee=On(C),be=Rl(),ue=Rl(),ge=Ke(()=>{function ee(we){m?H?.events.emit("virtualfocus",we):ne.current=yp(we,{sync:X.current,preventScroll:!0})}const fe=n.current[q.current],Q=se.current;fe&&ee(fe),(X.current?we=>we():we=>be.request(we))(()=>{const we=n.current[q.current]||fe;if(!we)return;fe||ee(we),Me&&(Q||!O.current)&&we.scrollIntoView?.({block:"nearest",inline:"nearest"})})});Ve(()=>{W.current.orientation=R},[W,R]),Ve(()=>{a&&(B&&P?(q.current=l??-1,K.current&&l!=null&&(se.current=!0,j())):V.current&&(q.current=-1,j()))},[a,B,P,l,j]),Ve(()=>{if(a){if(!B){X.current=!1;return}if(P)if(r==null){if(X.current=!1,ce.current!=null)return;if(V.current&&(q.current=-1,ge()),(!L.current||!V.current)&&K.current&&(Y.current!=null||K.current===!0&&Y.current==null)){let ee=0;const fe=()=>{n.current[0]==null?(ee<2&&(ee?re=>ue.request(re):queueMicrotask)(fe),ee+=1):(q.current=Y.current==null||Ob(Y.current,R,h)||d?bp(n):$y(n),Y.current=null,j())};fe()}}else cc(n.current,r)||(q.current=r,ge(),se.current=!1)}},[a,B,P,r,ce,d,n,R,h,j,ge,ue]),Ve(()=>{if(!a||P||!H||m||!V.current)return;const ee=H.nodesRef.current,fe=ee.find(we=>we.id===U)?.context?.elements.floating,Q=pr(Wt(N??fe??null)),re=ee.some(we=>we.context&&ht(we.context.elements.floating,Q));fe&&!re&&O.current&&fe.focus({preventScroll:!0})},[a,P,N,H,U,m]),Ve(()=>{L.current=B,V.current=!!P}),Ve(()=>{B||(Y.current=null,K.current=b)},[B,b]);const Se=r!=null,Ae=Ke(ee=>{if(!le.current)return;const fe=n.current.indexOf(ee.currentTarget);fe!==-1&&(q.current!==fe||r!==fe)&&(q.current=fe,j(ee))}),ke=Ke(()=>T??H?.nodesRef.current.find(ee=>ee.id===U)?.context?.dataRef?.current.orientation),xe=Ke(()=>bp(n,oe.current)),Re=Ke(ee=>{if(O.current=!1,X.current=!0,ee.which===229||!le.current&&ee.currentTarget===z.current)return;if(d&&Z$(ee.key,R,h,A)){Id(ee.key,ke())||Ui(ee),M.setOpen(!1,Rt(_w,ee.nativeEvent)),Ft(N)&&(m?H?.events.emit("virtualfocus",N):N.focus());return}const fe=q.current,Q=bp(n,S),re=$y(n,S);if(F||(ee.key==="Home"&&(Ui(ee),q.current=Q,j(ee)),ee.key==="End"&&(Ui(ee),q.current=re,j(ee))),D!=null){const we=D(ee,q.current,n,R,f,h,S,Q,re);if(we!=null&&(q.current=we,j(ee)),R==="both")return}if(Id(ee.key,R)){if(Ui(ee),B&&!m&&pr(ee.currentTarget.ownerDocument)===ee.currentTarget){q.current=Ob(ee.key,R,h)?Q:re,j(ee);return}Ob(ee.key,R,h)?f?fe>=re?c&&fe!==n.current.length?q.current=-1:(X.current=!1,q.current=Q):q.current=Ss(n.current,{startingIndex:fe,disabledIndices:S}):q.current=Math.min(re,Ss(n.current,{startingIndex:fe,disabledIndices:S})):f?fe<=Q?c&&fe!==-1?q.current=n.current.length:(X.current=!1,q.current=re):q.current=Ss(n.current,{startingIndex:fe,decrement:!0,disabledIndices:S}):q.current=Math.max(Q,Ss(n.current,{startingIndex:fe,decrement:!0,disabledIndices:S})),cc(n.current,q.current)&&(q.current=-1),j(ee)}}),Me=v.useMemo(()=>({onFocus(fe){X.current=!0,Ae(fe)},onClick:({currentTarget:fe})=>fe.focus({preventScroll:!0}),onMouseMove(fe){X.current=!0,se.current=!1,y&&Ae(fe)},onPointerLeave(fe){if(!le.current||!O.current||fe.pointerType==="touch")return;X.current=!0;const Q=fe.relatedTarget;if(!(!y||n.current.includes(Q))&&Ee.current&&(ne.current?.(),ne.current=null,q.current=-1,j(fe),!m)){const re=z.current,we=pr(Wt(re));re&&ht(re,we)&&re.focus({preventScroll:!0})}}}),[Ae,le,z,y,n,j,Ee,m]),ze=v.useMemo(()=>m&&B&&Se&&{"aria-activedescendant":`${E}-${r}`},[m,B,Se,E,r]),Fe=v.useMemo(()=>({"aria-orientation":R==="both"?void 0:R,...F?{}:ze,onKeyDown(ee){if(ee.key==="Tab"&&ee.shiftKey&&B&&!m){const fe=gr(ee.nativeEvent);if(fe&&!ht(z.current,fe))return;Ui(ee),M.setOpen(!1,Rt(vh,ee.nativeEvent)),Ft(N)&&N.focus();return}Re(ee)},onPointerMove(){O.current=!0}}),[ze,Re,z,R,F,M,B,m,N]),ye=v.useMemo(()=>{function ee(re){M.setOpen(!0,Rt(_w,re.nativeEvent,re.currentTarget))}function fe(re){b==="auto"&&Yv(re.nativeEvent)&&(K.current=!m)}function Q(re){K.current=b,b==="auto"&&m_(re.nativeEvent)&&(K.current=!0)}return{onKeyDown(re){const we=M.select("open");O.current=!1;const Pe=re.key.startsWith("Arrow"),Ye=X$(re.key,ke(),h),Ze=Id(re.key,R),bt=(d?Ye:Ze)||re.key==="Enter"||re.key.trim()==="";if(m&&we)return Re(re);if(!(!we&&!k&&Pe)){if(bt){const Je=Id(re.key,ke());Y.current=d&&Je?null:re.key}if(d){Ye&&(Ui(re),we?(q.current=xe(),j(re)):ee(re));return}Ze&&(ce.current!=null&&(q.current=ce.current),Ui(re),!we&&k?ee(re):Re(re),we&&j(re))}},onFocus(re){M.select("open")&&!m&&(q.current=-1,j(re))},onPointerDown:Q,onPointerEnter:Q,onMouseDown:fe,onClick:fe}},[Re,b,xe,d,j,M,k,R,ke,h,ce,m]),_e=v.useMemo(()=>({...ze,...ye}),[ze,ye]);return v.useMemo(()=>a?{reference:_e,floating:Fe,item:Me,trigger:ye}:{},[a,_e,Fe,ye,Me])}function J$(e,t){const{listRef:n,elementsRef:r,activeIndex:s,onMatch:a,disabledIndices:l,onTyping:c,enabled:f=!0,resetMs:d=750,selectedIndex:h=null}=t,m="rootStore"in e?e.rootStore:e,b=m.useState("open"),y=bi(),k=v.useRef(""),S=v.useRef(h??s??-1),R=v.useRef(null),T=Ke(_=>{function D(z){const U=r?.current[z];return!U||Th(U)}function A(z){return D(z)?l==null||!Dp(ko,z,l):!1}function M(z,U,H=0){if(z.length===0)return-1;const K=(H%z.length+z.length)%z.length,q=U.toLowerCase();for(let Y=0;Y<z.length;Y+=1){const O=(K+Y)%z.length;if(!(!z[O]?.toLowerCase().startsWith(q)||!A(O)))return O}return-1}const B=n.current;if(k.current.length>0&&_.key===" "&&(Ui(_),c?.(!0)),k.current.length>0&&k.current[0]!==" "&&M(B,k.current)===-1&&_.key!==" "&&c?.(!1),B==null||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;b&&_.key!==" "&&(Ui(_),c?.(!0));const P=k.current==="";P&&(S.current=h??s??-1),B.every((z,U)=>z&&A(U)?z[0]?.toLowerCase()!==z[1]?.toLowerCase():!0)&&k.current===_.key&&(k.current="",S.current=R.current),k.current+=_.key,y.start(d,()=>{k.current="",S.current=R.current,c?.(!1)});const $=((P?h??s??-1:S.current)??0)+1,F=M(B,k.current,$);F!==-1?(a?.(F),R.current=F):_.key!==" "&&(k.current="",c?.(!1))}),E=Ke(_=>{const D=_.relatedTarget,A=m.select("domReferenceElement"),M=m.select("floatingElement");ht(A,D)||ht(M,D)||(y.clear(),k.current="",S.current=R.current,c?.(!1))});Ve(()=>{!b&&h!==null||(y.clear(),R.current=null,k.current!==""&&(k.current=""))},[b,h,y]),Ve(()=>{b&&k.current===""&&(S.current=h??s??-1)},[b,h,s]);const C=v.useMemo(()=>({onKeyDown:T,onBlur:E}),[T,E]);return v.useMemo(()=>f?{reference:C,floating:C}:{},[f,C])}const aE=.1,e3=aE*aE,pn=.5;function Md(e,t,n,r,s,a){return r>=t!=a>=t&&e<=(s-n)*(t-r)/(a-r)+n}function Dd(e,t,n,r,s,a,l,c,f,d){let h=!1;return Md(e,t,n,r,s,a)&&(h=!h),Md(e,t,s,a,l,c)&&(h=!h),Md(e,t,l,c,f,d)&&(h=!h),Md(e,t,f,d,n,r)&&(h=!h),h}function t3(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Ld(e,t,n,r,s,a){const l=Math.min(n,s),c=Math.max(n,s),f=Math.min(r,a),d=Math.max(r,a);return e>=l&&e<=c&&t>=f&&t<=d}function xA(e={}){const{blockPointerEvents:t=!1}=e,n=new Oi,r=({x:s,y:a,placement:l,elements:c,onClose:f,nodeId:d,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 A=E-y,M=C-k,B=A*A+M*M,P=D*D*e3;return y=E,k=C,S=_,B<P}function T(){n.clear(),f()}return function(C){n.clear();const _=c.domReference,D=c.floating;if(!_||!D||m==null||s==null||a==null)return;const{clientX:A,clientY:M}=C,B=gr(C),P=C.type==="mouseleave",N=ht(D,B),W=ht(_,B);if(N&&(b=!0,!P))return;if(W&&(b=!1,!P)){b=!0;return}if(P&>(C.relatedTarget)&&ht(D,C.relatedTarget))return;function $(){return!!(h&&wo(h.nodesRef.current,d).length>0)}function F(){$()||T()}if($())return;const z=_.getBoundingClientRect(),U=D.getBoundingClientRect(),H=s>U.right-U.width/2,K=a>U.bottom-U.height/2,q=U.width>z.width,Y=U.height>z.height,O=(q?z:U).left,j=(q?z:U).right,V=(Y?z:U).top,L=(Y?z:U).bottom;if(m==="top"&&a>=z.bottom-1||m==="bottom"&&a<=z.top+1||m==="left"&&s>=z.right-1||m==="right"&&s<=z.left+1){F();return}let X=!1;switch(m){case"top":X=Ld(A,M,O,z.top+1,j,U.bottom-1);break;case"bottom":X=Ld(A,M,O,U.top+1,j,z.bottom-1);break;case"left":X=Ld(A,M,U.right-1,L,z.left+1,V);break;case"right":X=Ld(A,M,z.right-1,L,U.left+1,V);break}if(X)return;if(b&&!t3(A,M,z)){F();return}if(!P&&R(A,M)){F();return}let se=!1;switch(m){case"top":{const ne=q?pn/2:pn*4,oe=q||H?s+ne:s-ne,le=q?s-ne:H?s+ne:s-ne,ce=a+pn+1,Ee=H||q?U.bottom-pn:U.top,be=H?q?U.bottom-pn:U.top:U.bottom-pn;se=Dd(A,M,oe,ce,le,ce,U.left,Ee,U.right,be);break}case"bottom":{const ne=q?pn/2:pn*4,oe=q||H?s+ne:s-ne,le=q?s-ne:H?s+ne:s-ne,ce=a-pn,Ee=H||q?U.top+pn:U.bottom,be=H?q?U.top+pn:U.bottom:U.top+pn;se=Dd(A,M,oe,ce,le,ce,U.left,Ee,U.right,be);break}case"left":{const ne=Y?pn/2:pn*4,oe=Y||K?a+ne:a-ne,le=Y?a-ne:K?a+ne:a-ne,ce=s+pn+1,Ee=K||Y?U.right-pn:U.left,be=K?Y?U.right-pn:U.left:U.right-pn;se=Dd(A,M,Ee,U.top,be,U.bottom,ce,oe,ce,le);break}case"right":{const ne=Y?pn/2:pn*4,oe=Y||K?a+ne:a-ne,le=Y?a-ne:K?a+ne:a-ne,ce=s-pn,Ee=K||Y?U.left+pn:U.right,be=K?Y?U.left+pn:U.right:U.left+pn;se=Dd(A,M,ce,oe,ce,le,Ee,U.top,be,U.bottom);break}}se?b||n.start(40,F):F()}};return r.__options={...e,blockPointerEvents:t},r}const pc="ArrowUp",hc="ArrowDown",Bp="ArrowLeft",Fp="ArrowRight",Oh="Home",Ih="End",kA=new Set([Bp,Fp]),n3=new Set([Bp,Fp,Oh,Ih]),SA=new Set([pc,hc]),r3=new Set([pc,hc,Oh,Ih]),wA=new Set([...kA,...SA]),EA=new Set([...wA,Oh,Ih]),i3="Shift",s3="Control",o3="Alt",a3="Meta",l3=new Set([i3,s3,o3,a3]);function u3(e){return Ft(e)&&e.tagName==="INPUT"}function lE(e){return!!(u3(e)&&e.selectionStart!=null||Ft(e)&&e.tagName==="TEXTAREA")}function uE(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 f=cE(e,t,"left"),d=jd(e),h=jd(t);n==="ltr"&&(f+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight?s=f+t.offsetWidth+h.scrollMarginRight-e.clientWidth+d.scrollPaddingRight:f-h.scrollMarginLeft<e.scrollLeft+d.scrollPaddingLeft&&(s=f-h.scrollMarginLeft-d.scrollPaddingLeft)),n==="rtl"&&(f-h.scrollMarginRight<e.scrollLeft+d.scrollPaddingLeft?s=f-h.scrollMarginLeft-d.scrollPaddingLeft:f+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight&&(s=f+t.offsetWidth+h.scrollMarginRight-e.clientWidth+d.scrollPaddingRight))}if(c&&r!=="horizontal"){const f=cE(e,t,"top"),d=jd(e),h=jd(t);f-h.scrollMarginTop<e.scrollTop+d.scrollPaddingTop?a=f-h.scrollMarginTop-d.scrollPaddingTop:f+t.offsetHeight+h.scrollMarginBottom>e.scrollTop+e.clientHeight-d.scrollPaddingBottom&&(a=f+t.offsetHeight+h.scrollMarginBottom-e.clientHeight+d.scrollPaddingBottom)}e.scrollTo({left:s,top:a,behavior:"auto"})}function cE(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 jd(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 c3(e){return $v(19)?e:e?"true":void 0}const f3=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 fE={},dE={},pE="";function d3(e){if(typeof document>"u")return!1;const t=Wt(e);return xn(t).innerWidth-t.documentElement.clientWidth>0}function p3(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Wt(e),r=n.documentElement,s=n.body,a=ga(r)?r:s,l=a.style.overflowY,c=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",a.style.overflowY="scroll";const f=a.offsetWidth;a.style.overflowY="hidden";const d=a.offsetWidth;return a.style.overflowY=l,r.style.scrollbarGutter=c,f===d}function h3(e){const t=Wt(e),n=t.documentElement,r=t.body,s=ga(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 m3(e){const t=Wt(e),n=t.documentElement,r=t.body,s=xn(n);let a=0,l=0,c=!1;const f=Lr.create();if(Ro&&(s.visualViewport?.scale??1)!==1)return()=>{};function d(){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,fE={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},pE=n.style.scrollBehavior,dE={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",A=Math.max(0,s.innerWidth-r.clientWidth),M=Math.max(0,s.innerHeight-r.clientHeight),B=parseFloat(k.marginTop)+parseFloat(k.marginBottom),P=parseFloat(k.marginLeft)+parseFloat(k.marginRight),N=ga(n)?n:r;if(c=p3(e),c){n.style.scrollbarGutter=T,N.style.overflowY="hidden",N.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:B||M?`calc(100dvh - ${B+M}px)`:"100dvh",width:P||A?`calc(100vw - ${P+A}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,fE),Object.assign(r.style,dE),c||(n.scrollTop=a,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=pE)}function m(){h(),f.request(d)}d();const b=Dt(s,"resize",m);return()=>{f.cancel(),h(),typeof s.removeEventListener=="function"&&b()}}class g3{lockCount=0;restore=null;timeoutLock=Oi.create();timeoutUnlock=Oi.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=Wt(t).documentElement,s=xn(r).getComputedStyle(r).overflowY;if(s==="hidden"||s==="clip"){this.restore=Zn;return}const a=kh||!d3(t);this.restore=a?h3(t):m3(t)}}const b3=new g3;function y3(e=!0,t=null){Ve(()=>{if(e)return b3.acquire(t)},[e,t])}function v3(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 TA(e,t){const n=v.useRef(e),r=Ke(t);Ve(()=>{n.current!==e&&r(n.current)},[e,r]),Ve(()=>{n.current=e},[e])}function x3(e,t){const n=Ke((a,l)=>{(typeof e=="function"?e():e)||t(l||(kh?"touch":""))}),{onClick:r,onPointerDown:s}=v3(n);return v.useMemo(()=>({onClick:r,onPointerDown:s}),[r,s])}function k3(e){const[t,n]=v.useState(null),r=x3(e,n);return TA(e,s=>{s&&!e&&n(null)}),v.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}const S3=v.createContext(void 0);function Di(){return v.useContext(S3)?.direction??"ltr"}const w3="0account 1dd 1gent 5-circle 6square 5s 6-swarm 1larm-clock 2ert 1rchive 2my-base 2row-block-bend-up-left cdown cleft dine-down hleft hright hup cright cup 7racket-from-down jleft jright jup l-dashed eto-down hleft hright hup 6ccw 7ircle-down dleft dright dup 7w 6down 6elbow-down-left hright cup-left fright 6left a-down bup 6right b-down cup 6square-down dfrom-down ileft iright iup dleft h-down itop iup dright i-down jtop jup dto-down gleft gright gup dup 7wap 6u-up-left bright 7p 5s-both-horizontal cvertical 7ccw a-angular 8ontract f-simple 8w 7down-up 7elbow-up-left 8xpand d-simple 7left-right 7out-cardinal 1sterisk 1t 2om 0bandaid 3knote 8s-stack 2rbell 2sketball 1each-umbrella 3ker 6-stop 2ehouse 2ll 4-dot 5slash 1inary 3oculars 1luetooth 1oard-kanban 2ok 4-open 4mark 4s 2wtie 1racket 7-dot 8error 7s-curly e-dot fx 9square 3in 5-hourglass 6simple cst 7lash 2iefcase 2owser 7s 2ush 1ug 3bot 2ilding 8s 2llseye 0calculator 3endar 8-hourglass 2mera 2r 3dholder 2stle 1d 1hart-bars 6line 6pie 7yramid 6scatter 3t-bubble b-chevrons-left-right cellipsis dxclamation cpencil cquestion bs c-grid 4Bubble a-ellipsis cxclamation bquestion as 2eck 5-circle 6square 5s 3f-hat 3ss-king 6tower 3vron-circle-down fleft fright fup 8down c-small 8left c-small 8right d-small 8up a-small 7s-down d-up 9left d-right 9right e-dotted-left 9up b-down 2ip 4-simple 1ircle 6-circle 7dashed 6s 7-check 1lipboard 2ock 3ne 3se 3ud 5-arrow-down cup 6download 6upload 1ode 4-brackets 5simple 2g 2llection a-plus 3or-mode 2mmand 4ent 7-dashed 9iscussion 9ot 7s 3pass 7-check 8dot 2nversation 2okie 2pilot 3y 2rners-in 8out b-check csparkle 2st-high 5low 5medium 1redit-card 2oss-medical 5hair 3wn 2ystal-ball 1ube 4-coordinates 5nodes 5transparent 2rrency-btc 9dollar 9eth 3sor-logo 7text 2tlery 1ylinder 0dashboard 2tabase 8-network 1ebug-pause 6restart 6start 8op 2ckchair-umbrella 2sktop-download 2vice-camera d-video 7desktop 7mobile 1iagram 2ff 4-added 5ignored 5modified 6ultiple 5removed 7named 5single b-arrow-right-up cdot 2scard 3play 7-check 9ircle 9onnect 8play 8waves 7s 1ots-3-horizontal 7vertical 1rop 0easel 1dit 1lephant 2lipsis 1nvelope 8-open 1raser 2ror 1xclamation-circle ctriangle 2ecution-parallel asequential 2tensions 1ye 3-closed 4slash 0fast-backward 5forward 1eedback 1ile 4-add 6rrow-right-up 5binary 5chevrons-left-right 6ode 5directory e-create 5image 5list 6ock 5media 5pdf 6lus 5text 6ype-adobe-illustrator gphotoshop ababel czel bevy bicep comejs bower bun ac-plus-plus csharp blojure brystal buda adart bocker aejs blixir bslint af-sharp birebase ageckodriver bit-meta bo cdot brails dphql coovy cunt bulp ahaml cndlebars cskell aionic ajava escript bulia cpyter akarma botlin alatex biquid amaven bustache anpm bunjucks aocaml bdata apdf berl blatformio bowershell brettier cisma colog buppet bython areason cscript bollup bust asass bbt bcala blim btylus bublime bvelte bwift aterraform bypescript avala bite bsc bue aweb-assembly dpack bindows ayarn azig 5zip 4s 3m-reel 5strip 3ter 1lag 4-hill 3me 3sk 5-slash-circle 2oppy-disc 1ocus-window 2ld-dashed 4er 6-active 8rrow-right-up 7check 7dashed 7library 7open bed 7plus 6s 2rk 1unnel 6-simple 0game-controller f-retro 2uge 1ear 2m 1ift 2t-branch 4commit a-horizontal 7pare 4fetch 5ork 4merge 4pull 8-request g-closed ireate hdone iraft 6sh 3hub 6-actions 1lobe 1raduation-cap 3ph 5-line 6scatter 2id 4-plus 5sparkle 3pper 0hamburger 3mer 2sh 2t 1eadphones 4set 3rt 2xagon 1istory 1ome 2urglass 3se 0i-circle 1mage 5-square 1nbox 2finity 3o 2spect 1ssue 5-closed 6draft 5s 0joystick 1son 0kebab-horizontal 6vertical 2y 3board 8-tab 0laptop 2yers 3out-dialog 7empty 7floating-window 7panel-bottom j-dock kon kundock doff 7sidebar-left j-dock koff ln kundock fright k-dock loff mn lundock 8plit-horizontal n-dashed oright-dock uundock dvertical 1eaf 2go 1ibrary 2ghtbulb 9-sparkle 5ning 2nk 4-external 2st-bullets 5checks 5filter 5ordered 5todo 9-subtask 5x 1oading 2cation 3k 4-locked 5unlocked 2go-azure a-devops 5figma 5git 8hub 8lab 5jira 5linear 5markdown 6cp 6icrosoft-teams 5notion 5python 5sentry 6lack 5vscode b-insiders 5x 0mac-mini 2gic-wand 3net 4ifying-glass g-fuzzy hminus hplus hslash-circle iparkle aGlass f-minus gplus gslash-circle 2il 2p 3-pin 2rk-github 4down 2sk-happy 4s-happy 1cp 1egaphone 2ntion 3u 2rge 1ic 3roscope 2nus 5-circle 6small 1obile 2on 4-sparkle 5z 2re 1usic 2te 0new-file 5older 3spaper 1ote 0one-circle 1rganization c-filled 1wl 0package 7-zipper 2int-roller 2lette 2perclip 5plane 2ragraph 2ss 2use 5-circle 2w 1en-nib 3cil 6-square 3tagon 2ople 6-3 2rcent 3son 6-add 7chat-bubble 8ircle 7follow 7plus 1iano 2e-chart 2lcrow 2n 3-slash 2pe 1lan 4e 3y 4-bug 5circle 5slow 6uper-fast 4back-loop 4s-bug 2ug 4-slash 3s 4-circle 5minus 1ointer-arrow 1ug 2lse 2zzle-piece 0question 8-circle 2ote 0radar 3io-tower 1ect-magnifying-glass fGlass 2do 2fresh 2gex 2mote-control 4ve 6-close 2place 7-all 3ort 2turn 2view 1obot 2cket 4ing-chair 1ss 1uler 4s 2n 0satellite 1cales 1eal 4-check 5question 3rch 6-stop 2nd 2rver 6s 2ttings 8-gear 1hapes-square-circle 3re 2ield 6-check 7question 7x 2oe-fast 3pping-bag bsket 1ignal 1kills 6-capability 1lash-circle 2iders 1martwatch 2iley-happy c-square 7neutral 7plus 7sad 1nowflake 1occer-ball 2rt-ascending 5descending 2urce-control 1parkle 7s 2eaker-hifi 8waves 8x 2inner 2lit 5-horizontal 6vertical 2rint 1quare 6-dashed 8ot 6s 7-minus 8plus 8x 1tack 3r 4-empty 5full 3tus-done 8raft 7needs-attention 2op 4-circle 4watch 3refront 1un 1watches 1ymbol-folder 2nc 0t-shirt 1able 3s 2g 3s-chevron-down dleft dright dup 2rget 1erminal 8-rectangle 2xt-aa 6b 5b 5c 5d 5italic 5j 5r 5s 6trikethrough 5t 6-square 6t 5y 1hinking-high 9low 9medium 2reads-parallel 8single 4e-bars 2umbs-down 7up 9-down 6down 6up 1raffic-cone 7Cone 3sh 5can 3y 2easure-chest 3nding-down 9up 2iangle-small-down fleft fright fup 1wig 0unfold-dashed 2lock 2mute 2verified 0vault 1erified 3sions 1ideo-camera 1m 1r 2-headset a-head 0wallet 2nd 2rning 2tch 2veform 1hole-word 1indow 6-pointer-arrow 6s 1rench 0x 1-circle 0yarn 0zap 1ipper 1oom-in 5out 1zz",E3="1ajd -8p 1wz t 1 1 -w ah -273 18 1wb a6 -ke 1 iy 2 2 2 -j3 1 3s 1 a -1f5 -1 -1 1f6 -1 -1 -1ok 8a 1 1 1 -5k -4d 9c 1ww 1 1 -269 1m4 1 -1m4 1m5 -zs 10y 2q -1 -1ra 8u 1ft 7 -1 0 -7 6 -114 0 -k 145 -1r8 1r7 -2k -1ez c9 13u -1od -8 1m9 1x -1v 1w -1v -1na 1nb k4 -i9 -1u -1dw -4p il -a2 1jz 1 5n -5m 1 1 1 -1xc a0 1nd -1w8 6w 32 -80 3k 1qr -1sb 1r8 -1v4 1 6v 1ue -1yb 5y 1 -5z 5y 1 -9o l9 1bp 1 1 1 -1w3 2 39 i8 -lg bu 1k7 1 -1mx 1my -1w2 1ut -1tn 1ux 1 1 1 -1tv 67 2 1md -1me c2 -9q 1ed -1l6 ht vt 7o 5w -1an 14n -1l6 1dm 7o -1pa lk 108 -1ep 1p2 1 1 8d 2 2 2 -24o 1lr -1lq 1lr -1lq 1lr -1lq 1lr -1k3 2 kf zn 1y -11z -k2 k7 -c2 1kx -1np -e es -mc bb bf -9 -dw c6 -d4 -6g 1 -1 1 1vr -1xc 1xd -1ub 1lz c -1np 1le -1nx bn 1fm -1fq -8z 7i 2 -1 1h6 70 -1mk -1w -3j -1 1hq ab -1e 1 1 -1uc 1vp 1 6n -6m -1ac 1ad -1ah 103 af 1 1 -1a3 10r 9d 1 1 -1vt 1vu -70 -1oq 1oo -1it 1pw -1w7 o -1 -2n 2p 1tv -1tp -5 1 1 91 -90 1 8y -n 1 ae -lk 73 1 1b -1a 1zf 1 -26j 44 1yc -4a -1yf 21u -21l 4g -1 hx -m1 mt -nk 1wk 1 -1t7 -3a 1qg -1n5 1tb 1 -5n -1qp lu -in -37 32 -32 8 -3 2y a1 -9l -g 1 iq 1ce 41 -2 28 -p 5 -16 46 -18 1a -5x 1 j 4 2x 2e -7a 58 -2m 1y -2j x r -3o 1 3v -s -32 4j 1e -y o -b -2z -2c 1 1 1 3e -3d 1 34 1f k -1x c r 1k -2t u 21 -1u -1m 4o -2y m -2m -24 4u -s -41 1 2q 24 -3m 3q -12 -x -2y 1 1 1 3f -3e 3c -3b 14 -13 1 3f p -24d 39 1v0 1 -1v0 9a -7z -1a -3d a0 -46 ij 3 -o6 37 -9 9 23b -1wu -6g -38 -3 30 1tf -1ta 42 1qz 1 -1w2 17 28 -27 jf -jc 1l3 -1l2 80 -ca 4b 1u -64 ae -u 3u -2z -4a -59 3f 2 w -u 67 1 1od 1 1 -1um 1un -1bs 1dm -1t 1 1 -1up 1xy -21l 3o jt -jt -42 de 1ae -1jn hx -m2 9p -5h j2 -dd df 1bf -1ug -43 44 1 ij -a8 ba -e8 1x9 1 1 -1w0 20 -2f 1d7 -1cs 1 20 -20 -f 18n -18a 23 -23 -c 18n -15r -1 1be 1 -1in 1sh 1 -1ql -8r bz be -id k1 -1t -ky 5s -31 je 191 -1uu ln -j4 -4l 0 73 2s g 1mq ad -26z 1wn 54 -53 -7n -1ci 1p9 -53 -1kk 1po -53 -1l1 1 -54 1rs -1p7 -x -8x bk -3v -1 -1f 76 -df 7p -1 -1f -1e 6h -6j -46 49 1u6 1 -1lx -89 8n -5d n 2v -bd 5e 1ib b3 -1w2 1l0 b3 1 -1yr bj -6v h5 -lp 1yo -1u2 1ru -1wi 0 24k -1zt 1us -s 1 -1lq -1x 1ci -10n 142 -3e b5 -b4 -1o0 oa 1ds -21r 1yu -1mp -cs 9y -1j 3 1g 0 25 -1i -2v -2a 1r4 85 -gc b5 -7v -1jd l 1ob 1 -l -1m9 -4v -2l -34 1jm 5s -1bf 1sd -20j 1tx -b5 -1ir 1 1tw -1tv 1lp 0 -1lm 0 1 21d -21a g7 15b 0 -1lb 4o 1dp -1c7 -64 1tg -1td -4x 1vi -56 7z -1uv 1jq -1gx -1 -7d 69 5d 1og -1tr 2 -2i 1vm -1n9 -5u 32 2 -1 1q1 1 1 1 -1ny 0 -9f 45 1hz -51 gb -ga -1ds 1dq gd 1 -bb 1 -113 -bo 0 1o2 -1sd -29 iu 19h -1jn -79 1qn -1x0 270 -a3 -1uw a 5s -5w 7l -a0 0 6n gx 1 1 13z -1iu 1o3 2z -ba bb -1z5 -c 1zi -1qm 1dz -1nc 26w 2 2 2 -1vw 1sm -22x 18 3h -3v 20b -2 -1xb 1yi -12 2b 1 -fr -19 -1g8 1va -54 1 1 -r 1 -1ph fg 1 1l8 -1l9 1 14m 0 -1qk 0 3s 1vh 1 1 -1sq 1 1 1 1w2 -1ej -hg 1 1 1sj -1si 1 -4f -2n 1zk 60 1 -60 -1ob -bo 7k 1sg -1se 1 2a 1da -1g2 et -l7 230 -1s3 1od -1sc 1 1sc",T3="01070c0d0e0f0g0h0i0j0p0u0v0w0x0z1415161718191a1f1g1h1i1j1k1l1m1r1v2a2b2o2r2t2u2w2x303a3b3d3l3p3s3v3w3x40414344464748494a4f4g4h4i4j4k4l4m4n4o4p4q5152545758595a5h5i5j5k5l5m5p5s5v5w5x5y66696b6d6e6g6h6i6n6p6r6s6v6w6x6y70717273747576777a7b7h7k7n7p7s7t7x7y838487898a8i8j8k8l8m8n8o8p8q8r8s8t8u8v8w8x8y8z909192939495969798999a9b9c9d9e9f9g9h9i9j9k9l9m9n9o9p9q9r9s9t9u9v9w9x9y9za0a1a2a3a4a5a6a7a8a9aaabacadaeafagahaiajakalamanaoapaqarasauawb1b2b4bbbkblbnbobpbqbsbtbubvbwbxbybzc0c3c8c9cecicjcocpcqctcvcwcyd0d5d6d7dbdfdgdidldndqdudydze0e2e7ebecedeef0f2f3f6f7f8fafcfefjfmfofpfrfsfwfxg5g6g7g9gbgcgdgegfgkgogvgxgzh0h2h4h9hbhchehfhjhshthui0i6i9iaicieihiiijiliminioitiuiviwiyj0j2j7j8j9jbjcjfjgjijljmjnjojpjqjrjtjvjwjxk0k2k5k6k7k8k9kakbkekfkikjklkmkpkqkskzl0l2l3l6l7lgliljlmlnlolplulxlzm1m3m4m5m6m7m8m9",R3="1c6d br -fj 1 ep 2 2 2 -eu 1 ap -ao 1 1 1 1 3 -2 1 4 -2 1 2 3 -2 1 0 4 -2 1 0 2 1 1 93 4a -dc 1 1 aj 2q 0 -d8 1 1 1 8p -8o 4 -3 1 1 2 -1 -2 1 2 3 -2 1 dv 2 2 2 -dy -1 3 -1 3 -1 3 -1 3 -1 2 1 8 34 -3b 8f -8e 2 -1 2 1 -l m -m ac -76 -2j 1 bp -bm -2 1 8a -g -7s 1 -1qm 2j 1qq -3m 3t -2l 1e -1f -7 1 1 1 1 1 1 2r -2p dc -43 -v -8d 2n -2m 1 1 -19 1a 0 0 5 7f 1c -2 28 -p 5 -16 46 -18 1a -3q 1 -1o 4 2x 2e -6p 4n -2m 1y -2j x r -33 50 -1p -s -2i 3z 1e -y o -b -2z -1s 28 2m -4t 2w -28 -n 2n 1f k -1x c r 1k -2t 2e h -1u -1m 4o -2y m -2m -1n 4d -s -3k 1 29 24 -3m 3q -12 -x 29 -4q 1 4o -1o -2z 2x -2w p -o 1 30 p -b0 1 7d -7c 1 1 1 0 -v w 1 2 -1 2 1 1 6 -1 -4 1 1 1 3 1 d8 1 -61 -77 7u -7t 2 -1 -1 3 -1v 13 bv -b2 2 1f -1e 0 1 0 1 0 1 1 8v -7t -11 -u v 6 -5 0 1 3 -2 1 1 -2 1 -17 19 av -dk 2q 2 -1 2 1 1 q 99 -2p 34 -4a -63 6e -8w -1pu 1sd 74 -73 -2q 2r 9d -9c -1px 1py 1 2 -1 2 an -am bn -c1 1c -x -1q4 1q6 -1 -k 8 j -2l 86 -5n -3 1 1 7 0 -5 1 1 1 1 -1r 1s 0 1 1 -15 1 15 4 -3 1 1 2 1 0 -3e 13 -17o 1a0 1 -25 7d 6d -bk an 2 2 2 -as 9l -3v -2 17 -12 -2 -5q 66 3k 1 -1 1 -9q 0 75 -8i z -c r 1 -2l 24 5s -5a 1 2 -1 7g -80 9q -am -1",hE=2;function C3(e){const t=[];let n="";for(const r of e.split(" "))n=n.slice(0,Number.parseInt(r[0],36))+r.slice(1),t.push(n);return t}function RA(e){const t=[];let n=0;for(const r of e.split(" "))n+=Number.parseInt(r,36),t.push(String.fromCharCode(n));return t}const Up=C3(w3);function _3(){const e=RA(E3),t={};for(let n=0;n<Up.length;n++)t[Up[n]]=e[n];return t}function A3(){const e=RA(R3),t={};for(let n=0;n<e.length;n++){const r=Number.parseInt(T3.slice(n*hE,(n+1)*hE),36);t[Up[r]]=e[n]}return t}const CA=_3(),N3=A3(),O3={...CA,...N3};function I3(e,t="outline"){return t==="filled"?O3[e]:CA[e]}const M3={root:{km0Bbg:"ui-ngwomw",$$css:!0}},D3=new Set(["ui-progress-spin","cursor-icon-spin"]);function L3(e){if(!(!e||typeof CSSAnimation>"u"))for(const t of e.getAnimations({subtree:!0}))t instanceof CSSAnimation&&D3.has(t.animationName)&&(t.startTime=0)}const Hy=v.createContext(void 0);function Is({iconSize:e,iconButtonSize:t,iconButtonVariant:n,iconButtonTone:r,iconButtonRootStyle:s,iconButtonIconStyle:a,iconButtonIconSize:l,buttonSize:c,buttonRootStyle:f,buttonVariant:d,buttonTone:h,buttonIconSize:m,buttonRounded:b,buttonFullWidth:y,menuSize:k,disabled:S,children:R}){const T=v.useContext(Hy),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:f??T?.buttonRootStyle,buttonVariant:d??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,f,b,c,d,S,l,a,r,s,t,n,e,k,T]);return g.jsx(Hy.Provider,{value:E,children:R})}function ya(){return v.useContext(Hy)}const j3="sm",z3=/(^|-)(left|right)(-|$)/,P3=new Set(["history","link-external","list-bullets","list-ordered","quote","redo","return"]),$3=new Set(Up.filter(e=>z3.test(e)||P3.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",keTefX:"ui-jb5y04",k71WvV:"ui-1bxnb1t",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-i75md2",$$css:!0},colorDanger:{kMwMTN:"ui-3pdtkl",$$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-13zi6q3",$$css:!0}};function B3(e,t,n){return[Xt.base,_A(e),F3(t),U3(n)]}function mx(e){return typeof e=="string"&&!e.startsWith("var(")}function _A(e){if(!mx(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 F3(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 U3(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 q3(e){if(!(typeof e!="string"||e.length===0))return`"${e}"`}function qt({name:e,modifier:t,syncSpin:n=!0,variant:r="outline",size:s,color:a,capTrim:l=!1,className:c,rootStyle:f,style:d,title:h,"aria-label":m,"aria-hidden":b,ref:y}){const k=ya(),S=v.useCallback(A=>{typeof y=="function"?y(A):y&&(y.current=A),A&&t==="spin"&&n&&L3(A)},[y,t,n]),R=s??k?.iconSize??j3,T=mx(R),E=Di()==="rtl"&&$3.has(e),C=q3(I3(e,r)),_={...C?{"--cursor-icon-content":C}:{},...T?{}:{"--icon-size":typeof R=="number"?`${R}px`:R},...d},D=Yt({rootClass:"ui-icon",stylexStyles:[B3(R,a,t),E&&M3.root,l&&Xt.capTrim,f],className:sn("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 H3=v.createContext({root:null});function va(){return v.useContext(H3).root}const V3={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"},G3={},W3=3e3,K3=10;let mE=W3;function Y3(){const e=mE;return mE+=K3,{zIndex:e,release:()=>{}}}const X3=v.createContext(null);function Z3(){return v.useContext(X3)}function ql(e,t){const n=Z3(),[r,s]=v.useState(null);v.useLayoutEffect(()=>{if(!t){s(null);return}const l=n?.claimZIndex()??Y3();return s(l.zIndex),()=>{l.release()}},[t,n]);const a=v.useMemo(()=>r===null?G3:{[V3[e]]:String(r)},[r,e]);return v.useMemo(()=>({zIndex:r,portalLayerStyles:a}),[r,a])}const gx=v.forwardRef(function(t,n){const{render:r,className:s,disabled:a=!1,focusableWhenDisabled:l=!1,nativeButton:c=!0,style:f,...d}=t,{getButtonProps:h,buttonRef:m}=$l({disabled:a,focusableWhenDisabled:l,native:c});return bn("button",t,{state:{disabled:a},ref:[n,m],props:[d,h]})}),Q3=["secondary","tertiary","accent","monochrome","success","warning","danger"],J3=["accent","monochrome","success","danger","warning"],AA={plan:"warning","git-added":"success","git-modified":"warning","git-removed":"danger"},e6=["accent","success","warning","danger"];new Set(Q3);new Set(J3);const t6=new Set(e6);function n6(e){return e!==void 0&&Object.hasOwn(AA,e)}function r6(e){return e!==void 0&&t6.has(e)}function NA(e){if(e!==void 0)return n6(e)?AA[e]:e}const OA="accent",i6=["primary","secondary","media"],s6=["outline","ghost","text"],o6=new Set(i6),a6=new Set(s6);function l6(e){return o6.has(e)}function u6(e){return a6.has(e)}function bx(e,t){const n=e==="secondary"&&t!==void 0&&!r6(t);return{applyControlTone:e!=="secondary"||n,applyFilledColors:l6(e)&&!n,applyNonFilledBackground:u6(e)||n}}const yx={foreground:{"--ui-button-fg":"ui-1h31wig ui-qalphj ui-alrmhx ui-1e1xjh9 ui-1eont2s ui-qygd40 ui-1ucl2ju ui-111ni6s ui-3id928 ui-wqjwyh 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}},IA={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-1sd9hjt",$$css:!0},monochrome:{"--ui-button-fg":"ui-4zyimg","--ui-button-fg-hover":"ui-l1tqj1",$$css:!0},success:{"--ui-button-fg":"ui-1091cms","--ui-button-fg-hover":"ui-qejad5",$$css:!0},warning:{"--ui-button-fg":"ui-90x234","--ui-button-fg-hover":"ui-v3sia6",$$css:!0},danger:{"--ui-button-fg":"ui-1jtauhq","--ui-button-fg-hover":"ui-1iqdewe",$$css:!0}},c6={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}},Ci={appearance:{"--ui-button-bg-disabled":"ui-t2ps8i ui-1siydi6 ui-9mchb4 ui-b3sabi","--ui-button-fg-disabled":"ui-lxpv47 ui-1wzq4de",kWkggS:"ui-elcf9h ui-g74ub2 ui-1twq3x9 ui-mzrycd",kMwMTN:"ui-gl2jp8 ui-qfdz8i ui-7mi40u",kKMj4B:"ui-e1kniv ui-fq1cfh",kSiTet:"ui-1x77wit",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 ui-mzrycd",kMwMTN:"ui-8ech78 ui-7mi40u",$$css:!0},media:{kSiTet:"ui-1szrgyu",k6WDB:"ui-1hvsj6t",kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kVAM5u:"ui-1aml6k",$$css:!0},colors:{"--ui-button-bg":"ui-afdq1a ui-125v35v ui-1olvpfz ui-oa62de ui-1chhnie ui-302ab4 ui-18o3eha ui-1qs2zoo ui-1g9fn2x ui-10rfvjz ui-18ab9qp","--ui-button-bg-hover":"ui-13v2mu8 ui-yt64w ui-e9ir63 ui-onvtd7 ui-1k8s92z ui-1kvkcw9 ui-43o616 ui-cs87t5 ui-197nqx8 ui-uudzfn ui-uontnf","--ui-button-bg-active":"ui-1f1zgjn ui-1nsurhp ui-11xudch ui-1f8rfv1 ui-ggai1r","--ui-button-fg":"ui-18rr0f6 ui-cdmvwo ui-1oum4wa ui-1yrx47c ui-1s3xcaz ui-2424zi ui-rwu1v7 ui-9sccad ui-hcepst ui-wvzk2y ui-gftpnt ui-pzfz8q","--ui-button-fg-hover":"ui-ve8a38 ui-lidx4s ui-f1csfx ui-10swf5o ui-2fu0p3","--ui-button-label-shadow":"ui-107xv6h ui-1fgkyrd ui-uxtdke ui-1lpoe4m ui-1mh6czn",$$css:!0}},la={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 ui-wm9d6",$$css:!0}},f6=["accent","success","warning","danger"],d6=new Set(f6);function qp(e){return e!==void 0&&d6.has(e)}const MA={accent:{"--ui-button-bg-hover":"ui-2qxk4j",$$css:!0},success:{"--ui-button-bg-hover":"ui-11h7f69",$$css:!0},warning:{"--ui-button-bg-hover":"ui-1donwlf",$$css:!0},danger:{"--ui-button-bg-hover":"ui-x6ealz",$$css:!0}},DA={accent:{kVAM5u:"ui-5r2jki ui-wm9d6",$$css:!0},success:{kVAM5u:"ui-1gvt79p ui-wm9d6",$$css:!0},warning:{kVAM5u:"ui-1cucnr7 ui-wm9d6",$$css:!0},danger:{kVAM5u:"ui-105evjg ui-wm9d6",$$css:!0}},LA={sm:"sm",md:"sm",lg:"base",xl:"lg"},jA={root:{kGuDYH:"ui-y5h43f",kLWn49:"ui-19ji09o",kb6lSQ:"ui-t1j8c4",$$css:!0}},Ms={root:{kGuDYH:"ui-1wm8ruf",kLWn49:"ui-spwq11",kb6lSQ:"ui-14s4slr",$$css:!0}},Cs={root:{kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-vu1jfw",$$css:!0}},zA={root:{kGuDYH:"ui-fc7y3v",kLWn49:"ui-1yxxptd",kb6lSQ:"ui-1bignsj",$$css:!0}},p6={root:{kGuDYH:"ui-19d36u7",kLWn49:"ui-dod15v",kb6lSQ:"ui-k22nv0",$$css:!0}},h6={root:{kGuDYH:"ui-wsyq91",kLWn49:"ui-19v9tvf",kb6lSQ:"ui-1h56xvc",$$css:!0}},m6={root:{kGuDYH:"ui-1i1m3gp",kLWn49:"ui-eqr9p9",kb6lSQ:"ui-qhv51x",$$css:!0}},Hl={root:{kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",$$css:!0}},Mh={root:{khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0}},gE={content:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kOIVth:"ui-pkkfsy",k63SB2:"ui-20ajya",khDVqt:"ui-uxw1ft",kfSwDN:"ui-87ps6o",k9WMMc:"ui-2b8uid",$$css:!0},pill:{kaIpWk:"ui-1i4c3av",kOIVth:"ui-11twubx",$$css:!0}},g6={sm:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-19bzwdx",kGO01o:"ui-18d9i69",kZCmMZ:"ui-v853mj",$$css:!0},md:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-196pc8s",kGO01o:"ui-18d9i69",kZCmMZ:"ui-22095l",$$css:!0},lg:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-1fg0g13",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1tajz9i",$$css:!0},xl:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-t1q3vd",kGO01o:"ui-18d9i69",kZCmMZ:"ui-8fiw5y",$$css:!0}},b6={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}},Ei={content:gE.content,pill:gE.pill,size:g6,pillSize:b6,typography:{sm:Cs.root,md:Cs.root,lg:Cs.root,xl:zA.root}},PA={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}},y6={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}},vx={root:[y6.root,PA.root]},ws={sm:{kaIpWk:"ui-1e1y6u3",$$css:!0},md:{kaIpWk:"ui-1043rbw",$$css:!0},lg:{kaIpWk:"ui-1m7fhj7",$$css:!0},xl:{kaIpWk:"ui-1q4ynmn",$$css:!0}},Hi={sm:{kZKoxP:"ui-1a6rlst",$$css:!0},md:{kZKoxP:"ui-1e94bgo",$$css:!0},lg:{kZKoxP:"ui-170hpbr",$$css:!0},xl:{kZKoxP:"ui-t8t6p",$$css:!0}},Vu={markdownHover:{"--ui-md-state-color":"ui-1w18epr",$$css:!0},primaryWeight:{k63SB2:"ui-20ajya ui-1uv0z76",$$css:!0},alignLeft:{kjj79g:"ui-1nhvcw1",$$css:!0},fullWidth:{kzqmXN:"ui-h8yej3",$$css:!0},frameContent:{kZCmMZ:"ui-1c1uobl",kwRFfy:"ui-yri2b",$$css:!0}},bE={labelGroup:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kOIVth:"ui-pkkfsy",k7Eaqz:"ui-euugli",ks0D6T:"ui-193iq5w",$$css:!0},kbs:{kmuXW:"ui-2lah0s",kMv6JI:"ui-y1aii3",k63SB2:"ui-20ajya",kSiTet:"ui-byyjgo ui-s6mkfk",k33iCy:"ui-1go34h7",$$css:!0}},wi={root:[vx.root,Ei.content,Vu.markdownHover,Vu.primaryWeight],fontSmoothing:Mh.root,align:{center:null,left:Vu.alignLeft},fullWidth:Vu.fullWidth,frame:{container:null,content:Vu.frameContent},shape:{pill:Ei.pill},size:{sm:[Hi.sm,ws.sm,Ei.size.sm],md:[Hi.md,ws.md,Ei.size.md],lg:[Hi.lg,ws.lg,Ei.size.lg],xl:[Hi.xl,ws.xl,Ei.size.xl]},pillSize:Ei.pillSize,typography:Ei.typography,labelGroup:bE.labelGroup,kbs:[Ms.root,bE.kbs]};function v6({rounded:e,variant:t,enforcedRounded:n}){return e!==void 0?e:t==="text"?!1:n===!0}const x6="md",k6="secondary",S6={"ui--default-marker":"ui--default-marker",$$css:!0};function yE(e,t){if(e==null)return null;const n=typeof e=="string"?{name:e}:e;return g.jsx(qt,{"aria-hidden":"true",modifier:n.modifier,name:n.name,size:t,variant:n.variant})}function vn({variant:e,tone:t,size:n,rounded:r,frame:s="container",align:a,fullWidth:l,disabled:c,children:f,leadingIcon:d,trailingIcon:h,kbs:m,pressed:b,className:y,style:k,rootStyle:S,"aria-expanded":R,"aria-pressed":T,"aria-busy":E,...C}){const _=ya(),D=e??_?.buttonVariant??k6,A=n??_?.buttonSize??x6,M=v6({enforcedRounded:_?.buttonRounded,rounded:r,variant:D}),B=l??_?.buttonFullWidth??!1,P=c??_?.disabled,N=t??(D==="primary"||D==="ghost"?_?.buttonTone:void 0),W=NA(N??(D==="primary"?OA:void 0)),$=_?.buttonIconSize??LA[A],F=C["data-pressed"],z=bx(D,W),U=zt(wi.root,wi.fontSmoothing,Ci.appearance,z.applyControlTone&&yx.foreground,z.applyControlTone&&W!==void 0&&IA[W],z.applyFilledColors&&Ci.colors,z.applyNonFilledBackground&&la.background,(D==="outline"||D==="ghost")&&qp(W)&&MA[W],D==="outline"&&la.outline,D==="outline"&&qp(W)&&DA[W],D==="media"&&Ci.media,b===!0&&Ci.engaged,wi.size[A],wi.typography[A],wi.align[a??"center"],B&&wi.fullWidth,M&&wi.shape.pill,M&&wi.pillSize[A],wi.frame[s],_?.buttonRootStyle,S,S6),H=yE(d,$),K=yE(h,$);let q=f;if(m!=null){const Y=zt(wi.labelGroup),O=zt(wi.kbs);q=g.jsxs("span",{className:sn("ui-button__label-group",Y.className),style:Y.style,children:[H,f,K,g.jsx("span",{className:sn("ui-button__kbs",O.className),style:O.style,children:m})]})}else(H!=null||K!=null)&&(q=g.jsxs(g.Fragment,{children:[H,f,K]}));return g.jsx(gx,{...C,"aria-busy":E,"aria-expanded":R,"aria-pressed":R===void 0&&b!==void 0?b:T,className:sn("ui-button",U.className,y),style:{...U.style,...k},"data-variant":D,"data-size":A,"data-rounded":M||void 0,"data-frame":s!=="container"?s:void 0,"data-tone":W,"data-align":a==="left"?a:void 0,"data-full-width":B||void 0,"data-pressed":b!==void 0?String(b):F,"data-busy":E===!0||E==="true"?"":void 0,"data-padded-label":s==="container"?"":void 0,disabled:P,children:g.jsx(Is,{iconSize:$,children:q})})}function Xc(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Al({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,f=v.useCallback(d=>{s||l(d)},[]);return[c,f]}let vE=(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})({}),xE=(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 w6={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},ac={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},E6={disabled:!1,...ac},Zc={valid(e){return e===null?null:e?{[xE.valid]:""}:{[xE.invalid]:""}}};function T6(e){return v.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[vE.checked]:""}:{[vE.unchecked]:""}},...Zc}),[e.indeterminate])}const R6={invalid:void 0,name:void 0,validityData:{state:w6,errors:[],error:"",value:"",initialValue:null},setValidityData:Zn,disabled:void 0,touched:ac.touched,setTouched:Zn,dirty:ac.dirty,setDirty:Zn,filled:ac.filled,setFilled:Zn,focused:ac.focused,setFocused:Zn,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:E6,markedDirtyRef:{current:!1},registerFieldControl:Zn,validation:{getValidationProps:(e,t=Bn)=>t,inputRef:{current:null},registerInput:Zn,commit:async()=>{},change:Zn}},C6=v.createContext(R6);function Dh(e=!0){const t=v.useContext(C6);if(t.setValidityData===Zn&&!e)throw new Error(In(28));return t}function $A(e,t,n,r,s=!0,a){const{registerFieldControl:l}=Dh(),c=v.useRef(null);c.current||(c.current=Symbol()),Ve(()=>{const f=c.current;return!f||!s?void 0:(l(f,{controlRef:e,getValue:r,id:t,name:a,value:n}),()=>{l(f,void 0)})},[e,s,r,t,a,l,n])}const _6=v.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Zn,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function BA(){return v.useContext(_6)}const A6=v.createContext({controlId:void 0,registerControlId:Zn,labelId:void 0,setLabelId:Zn,messageIds:[],setMessageIds:Zn,getDescriptionProps:e=>e});function xx(){return v.useContext(A6)}const N6=v.createContext(void 0);function O6(){const e=v.useContext(N6);if(e===void 0)throw new Error(In(14));return e}const I6=v.forwardRef(function(t,n){const{render:r,className:s,style:a,keepMounted:l=!1,...c}=t,f=O6(),d=f.checked||f.indeterminate,{mounted:h,transitionStatus:m,setMounted:b}=Yc(d),y=v.useRef(null),k={...f,transitionStatus:m};_o({open:d,ref:y,onComplete(){d||b(!1)}});const R={...T6(f),...To,...Zc},T=l||h,E=bn("span",t,{ref:[n,y],state:k,stateAttributesMapping:R,props:c});return T?E:null}),M6="md",kE={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",kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kaIpWk:"ui-1e1y6u3",kMwMTN:"ui-1lriclw ui-m9a9xk",kWkggS:"ui-i07v4r ui-1yow1yk ui-ff598k",kVAM5u:"ui-1tjqsyf ui-1b3ufqo ui-1ch3k2o",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}},D6={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}},L6={sm:9,md:10,lg:11},SE={"--icon-weight":"700"};function j6({indeterminate:e,interactive:t,size:n,variant:r}){const s=zt(kE.root,kE[n],D6[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=L6[n];return g.jsx("span",{"aria-hidden":"true",className:sn("ui-checkbox__box",s.className),style:s.style,children:t?g.jsx(I6,{className:sn("ui-checkbox__icon",a.className),keepMounted:!0,render:(c,f)=>g.jsx("span",{...c,children:g.jsx(qt,{name:f.indeterminate?"minus":"check",size:l,style:SE})}),style:a.style}):g.jsx("span",{className:sn("ui-checkbox__icon",a.className),style:a.style,children:g.jsx(qt,{name:e?"minus":"check",size:l,style:SE})})})}function FA({checked:e,disabled:t,indeterminate:n=!1,size:r=M6,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:sn("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(j6,{indeterminate:n,interactive:!1,size:r,variant:s})})}function z6(e,t,n=(r,s)=>r===s){return e.length===t.length&&e.every((r,s)=>n(r,t[s]))}function P6(e){const{open:t,defaultOpen:n,onOpenChange:r,disabled:s}=e,[a,l]=Al({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:c,setMounted:f,transitionStatus:d}=Yc(a,!0,!0),h=Fl(),[m,b]=v.useState(),y=m??h,k=Ke(S=>{const R=!a,T=Rt(Bl,S.nativeEvent);r(R,T),!T.isCanceled&&l(R)});return v.useMemo(()=>({disabled:s,handleTrigger:k,mounted:c,open:a,panelId:y,setMounted:f,setOpen:l,setPanelIdState:b,transitionStatus:d}),[s,k,c,a,y,f,l,b,d])}const UA=v.createContext(void 0);function qA(){const e=v.useContext(UA);if(e===void 0)throw new Error(In(15));return e}let kx=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=sa.startingStyle]="startingStyle",e[e.endingStyle=sa.endingStyle]="endingStyle",e})({}),$6=(function(e){return e.panelOpen="data-panel-open",e})({});const B6={[kx.open]:""},F6={[kx.closed]:""},U6={open(e){return e?{[$6.panelOpen]:""}:null}},q6={open(e){return e?B6:F6}},HA={...q6,...To},H6=v.forwardRef(function(t,n){const{render:r,className:s,defaultOpen:a=!1,disabled:l=!1,onOpenChange:c,open:f,style:d,...h}=t,m=Ke(c),b=P6({open:f,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=bn("div",t,{state:y,ref:n,props:h,stateAttributesMapping:HA});return g.jsx(UA.Provider,{value:k,children:S})}),V6={...U6,...To},wE=v.forwardRef(function(t,n){const{panelId:r,open:s,handleTrigger:a,state:l,disabled:c}=qA(),{className:f,disabled:d=c,render:h,nativeButton:m=!0,style:b,...y}=t,{getButtonProps:k,buttonRef:S}=$l({disabled:d,focusableWhenDisabled:!0,native:m});return bn("button",t,{state:l,ref:[n,S],props:[{"aria-controls":s?r:void 0,"aria-expanded":s,onClick:a},y,k],stateAttributesMapping:V6})}),Gu={height:void 0,width:void 0};function G6(e){const{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:s,mounted:a,onOpenChange:l,open:c,setMounted:f,setOpen:d,transitionStatus:h}=e,m=v.useRef(null),b=v.useRef(null),[y,k]=v.useState(Gu),S=v.useRef(Gu),R=v.useRef(!1),T=v.useRef(c),E=v.useRef(!1),[C,_]=v.useState(!1),D=v.useRef(null),A=xo(t,m),M=On({mounted:a,open:c}),B=rA(m,!1,!1),P=!c&&!a,N=C?"idle":h,W=c&&(T.current||E.current),$=!c&&a&&b.current==="css-animation"&&y.height===void 0&&y.width===void 0?S.current:y,F=n&&P&&b.current!=="css-animation",z=Ke((Y,O=!0)=>{O&&(S.current=Y),k(Y)}),U=Ke(()=>{D.current?.(),D.current=null}),H=Ke(Y=>{U(),D.current=()=>{D.current=null,Y()}}),K=Ke(()=>{c&&a&&b.current==="css-animation"&&(E.current=!0)});Ve(()=>{!C||h==="starting"||_(!1)},[C,h]),v.useEffect(()=>()=>{K(),U()},[K,U]),Ve(()=>{const Y=m.current;if(!Y)return;!c&&D.current&&U();const O=W6(Y,W);if(b.current=O,c&&h==="idle"&&T.current&&O==="css-animation"){S.current=il(Y);return}if(c&&h==="starting"){const L=R.current;if(R.current=!1,O==="none"){z(il(Y)),_(!0);return}if(O==="css-transition"){const X=K6(Y);if(z(il(Y)),!L)return X;const se=Wu(Y,"transition-duration","0s");return H(se),_(!0),X}if(O==="css-animation"){if(z(il(Y)),!L){Wu(Y,"animation-name","none")();return}const X=Wu(Y,"animation-name","none"),se=Wu(Y,"animation-duration","0s");X(),H(se),_(!0);return}}if(!c&&a&&(h==="idle"||h==="starting")){if(T.current=!1,E.current=!1,O==="none"){z(Gu,!1),f(!1);return}z(il(Y));return}if(h!=="ending")return;if(O==="none"){f(!1);return}const j=il(Y);if(!((j.height??0)>0||(j.width??0)>0)){f(!1);return}z(j),O==="css-animation"&&Wu(Y,"animation-name","none")()},[a,c,U,z,f,H,W,h]),_o({enabled:c&&a&&N==="idle",open:!0,ref:m,onComplete(){c&&z(Gu,!1)}}),v.useEffect(()=>{if(c||!a||N!=="ending"||!m.current)return;const O=new AbortController;let j=-1;function V(){M.current.open||(f(!1),z(Gu,!1))}return j=Lr.request(()=>{O.signal.aborted||B(V,O.signal)}),()=>{Lr.cancel(j),O.abort()}},[M,a,c,N,B,z,f]),Ve(()=>{const Y=m.current;!Y||!n||!P||Y.setAttribute("hidden","until-found")},[P,n]),v.useEffect(function(){const O=m.current;if(!O)return;function j(V){const L=Rt(Ni,V);l(!0,L),!L.isCanceled&&(R.current=!0,d(!0))}return Dt(O,"beforematch",j)},[l,d]);const q=s||n||a||c;return{height:$.height,props:{...F?{[kx.startingStyle]:""}:void 0,hidden:P,id:r},ref:A,shouldPreventOpenAnimation:W,shouldRender:q,transitionStatus:N,width:$.width}}function il(e){return{height:e.scrollHeight,width:e.scrollWidth}}function W6(e,t=!1){const n=xn(e).getComputedStyle(e),r=(n.animationName.split(",").map(a=>a.trim()).some(a=>a!==""&&a!=="none")||t)&&EE(n.animationDuration),s=EE(n.transitionDuration);return r&&s||s?"css-transition":r?"css-animation":"none"}function EE(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function Wu(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 K6(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=Lr.request(n);return()=>{Lr.cancel(r),n()}}let TE=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});const Y6=v.forwardRef(function(t,n){const{className:r,hiddenUntilFound:s,keepMounted:a,render:l,id:c,style:f,...d}=t,{mounted:h,onOpenChange:m,open:b,panelId:y,setMounted:k,setPanelIdState:S,setOpen:R,state:T,transitionStatus:E}=qA(),C=s??!1,_=a??!1;Ve(()=>{if(c)return S(c),()=>{S(void 0)}},[c,S]);const{height:D,props:A,ref:M,shouldPreventOpenAnimation:B,shouldRender:P,transitionStatus:N,width:W}=G6({externalRef:n,hiddenUntilFound:C,id:y,keepMounted:_,mounted:h,onOpenChange:m,open:b,setMounted:k,setOpen:R,transitionStatus:E}),$={...T,transitionStatus:N},F=r_(f,$),z=bn("div",{...t,style:void 0},{state:$,ref:M,props:[A,{style:{[TE.collapsiblePanelHeight]:D===void 0?"auto":`${D}px`,[TE.collapsiblePanelWidth]:W===void 0?"auto":`${W}px`}},d,F?{style:F}:void 0,B?{style:{animationName:"none"}}:void 0],stateAttributesMapping:HA});return P?z:null}),X6={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}},Z6={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 VA(e){return[X6.root,Z6[e]]}const Q6={"ui--default-marker":"ui--default-marker",$$css:!0};function GA(e){return e==="default"?"secondary":"tertiary"}const uo={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:{kGuDYH:"ui-1qlqyl8",kLWn49:"ui-15bjb6t",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},detailsButtonShimmer:{kMnn75:"ui-krqix3 ui-1sur9pj ui-1f2jko9",$$css:!0}},Ib={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 J6({action:e,chevronRef:t,details:n,detailsRef:r,leadingIcon:s,loading:a,shimmerDetails:l,showChevron:c,tabularNums:f,tone:d}){const h=zt(Ib.base,(d==="muted"||d==="tertiary")&&Ib.muted,f&&Ib.tabularNums,a&&!l&&VA(GA(d))),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"}}[(d==="muted")<<1|!!f<<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:sn("ui-collapsible-leading-icon",y.className),style:y.style,children:s}),e!=null&&g.jsx("span",{className:sn("ui-collapsible-action",h.className),style:h.style,children:e}),n&&g.jsx("span",{ref:r,className:sn("ui-collapsible-details",m.className),style:m.style,children:n}),c&&g.jsx(qt,{ref:t,name:"chevron-right",className:sn("ui-collapsible-chevron",b.className),style:b.style,size:"sm"})]})}function yi({action:e,details:t,onDetailsClick:n,detailsButtonStyle:r,headerStyle:s,leadingIcon:a,disabled:l=!1,expandable:c=!0,loading:f=!1,shimmerDetails:d=!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 A=n!==void 0,M=c&&A,B=E!==void 0,[P,N]=v.useState(()=>C??!1),W=B?!!E:P,$=(X,se)=>{B||N(X),_?.(X,se)},F=A?g.jsx("button",{type:"button",...zt(uo.buttonReset,uo.detailsButton,f&&d&&uo.detailsButtonShimmer,r),disabled:l,onClick:X=>{X.stopPropagation(),n(X)},children:t}):t,z=c&&b!=null&&typeof b!="boolean",U={className:"ui-78zum5 ui-dt5ytf"},H=zt(uo.base,c&&!A?uo.buttonReset:uo.presentational,c&&!l&&uo.clickable,l&&uo.disabled,f&&d&&VA(GA(m)),Q6,s),K={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],q={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-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"},j={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:sn("ui-collapsible-header",H.className),style:H.style},L=g.jsx(J6,{action:e,chevronRef:S,details:F,detailsRef:k,leadingIcon:a,loading:f,shimmerDetails:d,showChevron:c&&!A,tabularNums:h,tone:m});return g.jsxs(H6,{...D,open:M?W:E,defaultOpen:M?void 0:C,onOpenChange:M?$:_,disabled:l,"data-expandable":c?"":void 0,"data-loading":f?"":void 0,"data-tone":m,className:sn("ui-collapsible",U.className,R),style:U.style,children:[M?g.jsxs("div",{...V,ref:y,onClick:()=>{l||$(!W)},children:[L,g.jsx(wE,{"data-component":"collapsible-header","aria-label":typeof t=="string"?`Toggle ${t}`:"Toggle details",className:K.className,style:K.style,...z?null:{"aria-controls":void 0},onClick:X=>{l||X.stopPropagation()},children:g.jsx(qt,{ref:S,name:"chevron-right",className:sn("ui-collapsible-chevron",q.className),style:q.style,size:"sm"})})]}):c?g.jsx(wE,{...V,ref:y,...z?null:{"aria-controls":void 0},onClick:X=>{l||X.stopPropagation()},children:L}):g.jsx("div",{...V,ref:y,children:L}),z&&g.jsx(Y6,{keepMounted:!0,className:sn("ui-collapsible-content-view",Y.className),style:Y.style,children:g.jsx("div",{className:O.className,style:O.style,children:g.jsx("div",{className:sn("ui-collapsible-content",j.className,T),style:j.style,children:b})})})]})}const e4=(e,t)=>Object.is(e,t);function ua(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function t4(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:ua(t,r,n))}function mc(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:ua(r,t,n))}function n4(e,t,n){return e.filter(r=>!ua(t,r,n))}function Vy(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function WA(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function r4(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(WA(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 KA(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 Vy(e)}function Jo(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Vy(e.value):Vy(e)}function YA(e,t,n){function r(){return KA(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=WA(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 i4(e,t,n){return e.reduce((r,s,a)=>(a>0&&r.push(", "),r.push(g.jsx(v.Fragment,{children:YA(s,t,n)},a)),r),[])}function Sx(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:s,registerControlId:a}=xx(),l=Fl(t),c=n?s:void 0,f=zr(()=>Symbol("labelable-control")),d=v.useRef(!1),h=v.useRef(t!=null),m=Ke(()=>{!d.current||a===Zn||(d.current=!1,a(f.current,void 0))});return Ve(()=>{if(a===Zn)return;let b;if(n){const y=r?.current;gt(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}d.current=!0,a(f.current,b)},[t,r,c,a,n,l,f,m]),v.useEffect(()=>m,[m]),s??l}function s4(e,t){return e??t}function o4(e){const t=e.getBoundingClientRect(),n=xn(e);if(Kv)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,f=parseFloat(s.width)||0,d=parseFloat(s.height)||0,h=Math.max(t.width,l,f),m=Math.max(t.height,c,d),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 XA=v.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function a4(){return v.useContext(XA)}function wx(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:s}=e,a=Ke(s),l=v.useRef(0),c=zr(u4).current,f=zr(l4).current,[d,h]=v.useState(0),m=v.useRef(d),b=Ke((T,E)=>{f.set(T,E??null),m.current+=1,h(m.current)}),y=Ke(T=>{f.delete(T),m.current+=1,h(m.current)}),k=v.useMemo(()=>{const T=new Map;return Array.from(f.keys()).filter(C=>C.isConnected).sort(c4).forEach((C,_)=>{const D=f.get(C)??{};T.set(C,{...D,index:_})}),T},[f,d]);Ve(()=>{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]),Ve(()=>{m.current===d&&(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,d]),Ve(()=>()=>{n.current=[]},[n]),Ve(()=>()=>{r&&(r.current=[])},[r]);const S=Ke(T=>(c.add(T),()=>{c.delete(T)}));Ve(()=>{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(XA.Provider,{value:R,children:t})}function l4(){return new Map}function u4(){return new Set}function c4(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 f4=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:a,platform:l,elements:c,middlewareData:f}=t,{element:d,padding:h=0,offsetParent:m="real"}=As(e,t)||{};if(d==null)return{};const b=S_(h),y={x:n,y:r},k=Jv(s),S=Qv(k),R=await l.getDimensions(d),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],A=y[k]-a.reference[k],M=m==="real"?await l.getOffsetParent?.(d):c.floating;let B=c.floating[_]||a.floating[S];(!B||!await l.isElement?.(M))&&(B=c.floating[_]||a.floating[S]);const P=D/2-A/2,N=B/2-R[S]/2-1,W=Math.min(b[E],N),$=Math.min(b[C],N),F=W,z=B-R[S]-$,U=B/2-R[S]/2+P,H=k_(F,U,z),K=!f.arrow&&Co(s)!=null&&U!==H&&a.reference[S]/2-(U<F?W:$)-R[S]/2<0,q=K?U<F?U-F:U-z:0;return{[k]:y[k]+q,data:{[k]:H,centerOffset:U-H-q,...K&&{alignmentOffset:q}},reset:K}}}),d4=(e,t)=>({...f4(e),options:[e,t]}),p4=x$().fn,h4={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 p4(e)).data?.referenceHidden||a}}}},xp={sideX:"left",sideY:"top"},ZA={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:s},platform:a,strategy:l,placement:c}=e,f=xn(s),d=f.getComputedStyle(s);if(!(d.transitionDuration!=="0s"&&d.transitionDuration!==""))return{x:t,y:n,data:xp};const m=await a.getOffsetParent?.(s);let b={width:0,height:0};if(l==="fixed"&&f?.visualViewport)b={width:f.visualViewport.width,height:f.visualViewport.height};else if(m===f){const E=Wt(s);b={width:E.documentElement.clientWidth,height:E.documentElement.clientHeight}}else await a.isElement?.(m)&&(b=await a.getDimensions(m));const y=ti(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":xp.sideX,T=y==="top"?"bottom":xp.sideY;return{x:k,y:S,data:{sideX:R,sideY:T}}}};function QA(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 RE(e,t,n){const{rects:r,placement:s}=e;return{side:QA(t,ti(s),n),align:Co(s)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Ex(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:s=0,align:a="center",alignOffset:l=0,collisionBoundary:c,collisionPadding:f=5,sticky:d=!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,[A,M]=v.useState(null);!S&&A!==null&&M(null);const B=R.side||"flip",P=R.align||"flip",N=R.fallbackAxisSide||"end",W=typeof t=="function"?t:void 0,$=Ke(W),F=W?$:t,z=On(t),U=On(S),K=Di()==="rtl",q=A||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":K?"left":"right","inline-start":K?"right":"left"}[r],Y=a==="center"?q:`${q}-${a}`;let O=f;const j=1,V=r==="bottom"?j:0,L=r==="top"?j:0,X=r==="right"?j:0,se=r==="left"?j:0;typeof O=="number"?O={top:O+V,right:O+se,bottom:O+L,left:O+X}:O&&(O={top:(O.top||0)+V,right:(O.right||0)+se,bottom:(O.bottom||0)+L,left:(O.left||0)+X});const ne={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:O},oe=v.useRef(null),le=On(s),ce=On(l),Ee=typeof s!="function"?s:0,be=typeof l!="function"?l:0,ue=[];b&&ue.push(b),ue.push(ix(it=>{const ft=RE(it,r,K),Lt=typeof le.current=="function"?le.current(ft):le.current,Pt=typeof ce.current=="function"?ce.current(ft):ce.current;return{mainAxis:Lt,crossAxis:Pt,alignmentAxis:Pt}},[Ee,be,K,r]));const ge=P==="none"&&B!=="shift",Se=!ge&&(d||T||B==="shift"),Ae=B==="none"?null:ox({...ne,padding:{top:O.top+j,right:O.right+j,bottom:O.bottom+j,left:O.left+j},mainAxis:!T&&B==="flip",crossAxis:P==="flip"?"alignment":!1,fallbackAxisSideDirection:N}),ke=ge?null:sx(it=>{const ft=Wt(it.elements.floating).documentElement;return{...ne,rootBoundary:T?{x:0,y:0,width:ft.clientWidth,height:ft.clientHeight}:void 0,mainAxis:P!=="none",crossAxis:Se,limiter:d||T?void 0:v$(Lt=>{if(!oe.current)return{};const{width:Pt,height:At}=oe.current.getBoundingClientRect(),Z=mi(ti(Lt.placement)),me=Z==="y"?Pt:At,Le=Z==="y"?O.left+O.right:O.top+O.bottom;return{offset:me/2+Le/2}})}},[ne,d,T,O,P]);B==="shift"||P==="shift"||a==="center"?ue.push(ke,Ae):ue.push(Ae,ke),ue.push(ax({...ne,apply({elements:{floating:it},availableWidth:ft,availableHeight:Lt,rects:Pt}){if(!U.current)return;const At=it.style;At.setProperty("--available-width",`${ft}px`),At.setProperty("--available-height",`${Lt}px`);const Z=xn(it).devicePixelRatio||1,{x:me,y:Le,width:Xe,height:Ct}=Pt.reference,lt=(Math.round((me+Xe)*Z)-Math.round(me*Z))/Z,He=(Math.round((Le+Ct)*Z)-Math.round(Le*Z))/Z;At.setProperty("--anchor-width",`${lt}px`),At.setProperty("--anchor-height",`${He}px`)}}),d4(it=>({element:oe.current||Wt(it.elements.floating).createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(it){const{elements:ft,middlewareData:Lt,placement:Pt,rects:At,y:Z}=it,me=ti(Pt),Le=mi(me),Xe=oe.current,Ct=Lt.arrow?.x||0,lt=Lt.arrow?.y||0,He=Xe?.clientWidth||0,qe=Xe?.clientHeight||0,De=Ct+He/2,je=lt+qe/2,Ie=Math.abs(Lt.shift?.y||0),We=At.reference.height/2,dt=typeof s=="function"?s(RE(it,r,K)):s,Et=Ie>dt,Ne={top:`${De}px calc(100% + ${dt}px)`,bottom:`${De}px ${-dt}px`,left:`calc(100% + ${dt}px) ${je}px`,right:`${-dt}px ${je}px`}[me],Tt=`${De}px ${At.reference.y+We-Z}px`;return ft.floating.style.setProperty("--transform-origin",Se&&Le==="y"&&Et?Tt:Ne),{}}},h4,C),Ve(()=>{!S&&k&&k.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[S,k]);const xe=v.useMemo(()=>({elementResize:!m&&typeof ResizeObserver<"u",layoutShift:!m&&typeof IntersectionObserver<"u"}),[m]),{refs:Re,elements:Me,x:ze,y:Fe,middlewareData:ye,update:_e,placement:ee,context:fe,isPositioned:Q,floatingStyles:re}=W$({rootContext:k,open:y?S:void 0,placement:Y,middleware:ue,strategy:n,whileElementsMounted:y?void 0:(...it)=>Lp(...it,xe),nodeId:E,externalTree:D}),{sideX:we,sideY:Pe}=ye.adaptiveOrigin||xp,Ye=Q?n:"fixed",Ze=v.useMemo(()=>{const it=C?{position:Ye,[we]:ze,[Pe]:Fe}:{position:Ye,...re};return Q||(it.opacity=0),it},[C,Ye,we,ze,Pe,Fe,re,Q]),bt=v.useRef(null);Ve(()=>{if(!S)return;const it=z.current,ft=typeof it=="function"?it():it,Pt=(CE(ft)?ft.current:ft)||null||null;Pt!==bt.current&&(Re.setPositionReference(Pt),bt.current=Pt)},[S,Re,F,z]),v.useEffect(()=>{if(!S)return;const it=z.current;typeof it!="function"&&CE(it)&&it.current!==bt.current&&(Re.setPositionReference(it.current),bt.current=it.current)},[S,Re,F,z]),v.useEffect(()=>{if(y&&S&&Me.reference&&Me.floating)return Lp(Me.reference,Me.floating,_e,xe)},[y,S,Me,_e,xe]);const Je=ti(ee),xt=QA(r,Je,K),St=Co(ee)||"center",nt=!!ye.hide?.referenceHidden;Ve(()=>{_&&S&&Q&&M(Je)},[_,S,Q,Je]);const rt=v.useMemo(()=>({position:"absolute",top:ye.arrow?.y,left:ye.arrow?.x}),[ye.arrow]),ct=ye.arrow?.centerOffset!==0;return v.useMemo(()=>({positionerStyles:Ze,arrowStyles:rt,arrowRef:oe,arrowUncentered:ct,side:xt,align:St,physicalSide:Je,anchorHidden:nt,refs:Re,context:fe,isPositioned:Q,update:_e}),[Ze,rt,oe,ct,xt,St,Je,nt,Re,fe,Q,_e])}function CE(e){return e!=null&&"current"in e}function Lh(e){return e==="starting"?kP:Bn}function Tx(e,t,{styles:n,transitionStatus:r,props:s,refs:a,hidden:l,inert:c=!1}){const f={...n};return c&&(f.pointerEvents="none"),bn("div",e,{state:t,ref:a,props:[{role:"presentation",hidden:l,style:f},Lh(r),s],stateAttributesMapping:Wc})}const m4=20;function g4(e,t,n,r){const[s,a]=v.useState(!1);Ve(()=>{if(!e||!t||n==null){a(!1);return}const l=Wt(n).documentElement.clientWidth,c=n.offsetWidth;a(l>0&&c>0&&c>=l-m4)},[e,t,n]),y3(e&&(!t||s),r)}let JA=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function eN(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:s,index:a}=e,{register:l,unregister:c,subscribeMapChange:f,elementsRef:d,labelsRef:h,nextIndexRef:m}=a4(),b=v.useRef(-1),[y,k]=v.useState(a??(s===JA.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&&(d.current[y]=T,h)){const E=t!==void 0;h.current[y]=E?t:r?.current?.textContent??T.textContent}},[y,d,h,t,r]);return Ve(()=>{if(a!=null)return;const T=S.current;if(T)return l(T,n),()=>{c(T)}},[a,l,c,n]),Ve(()=>{if(a==null)return f(T=>{const E=S.current?T.get(S.current)?.index:null;E!=null&&k(E)})},[a,f,k]),{ref:R,index:y}}const tN={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}},jh=tN.popup,b4=tN.positioner,y4={transition:`opacity var(--ui-floating-anchor-fade-duration) ${Zj["--cursor-easing-out-quint"]}`};function zh(...e){const t=zt(b4,...e);return{...t,style:{...t.style,...y4}}}const Ph={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}},lr={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}},nN=lr.positioner,Rx=[lr.surface,Ph.border],rN=[nN,lr.popupShadow,lr.popupRadius],v4=[nN,lr.tooltipShadow,lr.tooltipRadius],x4=[lr.tooltipRadius,lr.tooltipSurface],k4=lr.popupLayout,S4=lr.popupInset,iN=lr.previewCardInset,sN=[k4,S4],w4=lr.popupInteractive,oN=[lr.surface,Ph.border],E4=lr.popupSurfaceMd,T4=lr.popupPositioner,R4=[T4,lr.popupShadow,lr.popupRadius],xa={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}},C4=xa.list,_4=xa.row,A4=xa.popupFrame,N4=xa.rowFrame,O4=xa.rowInsetHighlight,I4=xa.rowSectionTrailing,M4=xa.rowSectionDescription,Pr={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}},D4=[oN,A4,Pr.popup],L4={sm:null,md:E4},j4=Pr.popupWidth,z4=Pr.popupDefaultWidth,P4=[C4,Pr.list],$4=[_4,N4,Pr.row,O4,Cs.root],B4=Pr.rowText,F4=Pr.rowLabel,U4=Pr.itemTextWithMeta,q4=Pr.rowTextWithDescription,H4=Pr.rowDescription,V4=Pr.rowMeta,Mb=Pr.rowSection,G4=Pr.rowSectionLeading,_E=I4,W4=Pr.rowSectionEnd,Db=M4;function sl(e,t,n){let r=n.initialDeps??[],s,a=!0;function l(){var c,f,d;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&&((f=n.debug)!=null&&f.call(n))&&(y=Date.now()),s=t(...m),n.key&&((d=n.debug)!=null&&d.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 AE(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const K4=(e,t)=>Math.abs(e-t)<1.01,Y4=(e,t,n)=>{let r;return function(...s){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,s),n)}},NE=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},X4=e=>e,Z4=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},Q4=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const s=l=>{const{width:c,height:f}=l;t({width:Math.round(c),height:Math.round(f)})};if(s(NE(n)),!r.ResizeObserver)return()=>{};const a=new r.ResizeObserver(l=>{const c=()=>{const f=l[0];if(f?.borderBoxSize){const d=f.borderBoxSize[0];if(d){s({width:d.inlineSize,height:d.blockSize});return}}s(NE(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},OE={passive:!0},IE=typeof window>"u"?!0:"onscrollend"in window,J4=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let s=0;const a=e.options.useScrollendEvent&&IE?()=>{}:Y4(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),f=l(!1);n.addEventListener("scroll",c,OE);const d=e.options.useScrollendEvent&&IE;return d&&n.addEventListener("scrollend",f,OE),()=>{n.removeEventListener("scroll",c),d&&n.removeEventListener("scrollend",f)}},eB=(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"]},tB=(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 nB{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,f=this.indexFromElement(c);if(!c.isConnected){this.observer.unobserve(c);return}this.shouldMeasureDuringScroll(f)&&this.resizeItem(f,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:X4,rangeExtractor:Z4,onChange:()=>{},measureElement:eB,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=sl(()=>(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 f=a.get(c.lane);if(f==null||c.end>f.end?a.set(c.lane,c):c.end<f.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=sl(()=>[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=sl(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:a,enabled:l,lanes:c},f)=>{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 d=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,d),m=new Array(c).fill(void 0);for(let b=0;b<d;b++){const y=h[b];y&&(m[y.lane]=b)}for(let b=d;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=f.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=sl(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,s,a)=>this.range=n.length>0&&r>0?rB({measurements:n,outerSize:r,scrollOffset:s,lanes:a}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=sl(()=>{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=sl(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let a=0,l=n.length;a<l;a++){const c=n[a],f=r[c];s.push(f)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return AE(r[aN(0,r.length-1,s=>AE(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,f=this.now();this.scrollState={index:n,align:c,behavior:s,startedAt:f,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&&K4(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 aN=(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 rB({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const s=e.length-1,a=f=>e[f].start;if(e.length<=r)return{startIndex:0,endIndex:s};let l=aN(0,s,a,n),c=l;if(r===1)for(;c<s&&e[c].end<n+t;)c++;else if(r>1){const f=Array(r).fill(0);for(;c<s&&f.some(h=>h<n+t);){const h=e[c];f[h.lane]=h.end,c++}const d=Array(r).fill(n+t);for(;l>=0&&d.some(h=>h>=n);){const h=e[l];d[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}}const ME=typeof document<"u"?v.useLayoutEffect:v.useEffect;function iB({useFlushSync:e=!0,...t}){const n=v.useReducer(()=>({}),{})[1],r={...t,onChange:(a,l)=>{var c;e&&l?Mi.flushSync(n):n(),(c=t.onChange)==null||c.call(t,a,l)}},[s]=v.useState(()=>new nB(r));return s.setOptions(r),ME(()=>s._didMount(),[]),ME(()=>s._willUpdate()),s}function lN(e){return iB({observeElementRect:Q4,observeElementOffset:J4,scrollToFn:tB,...e})}function sB(){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 uN(e){return typeof ResizeObserver>"u"?null:new ResizeObserver(e)}function Gy({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 oB="hover",aB=4,lB={kn1fP1:"ui-xqa2ke",kJcbqH:"ui-16fucec",$$css:!0};function uB(e){const{scrollTop:t,scrollHeight:n,clientHeight:r,threshold:s}=e;return{isAtTop:t<=s,isAtBottom:t+r>=n-s}}function cB(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 DE={maskGeometry:e=>[lB,{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 fB({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:[DE.maskGeometry(l.length),DE.mask(l.join(", "))]}const dB=20;class pB{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),f=Math.round(s);return this._trackSize===a&&this._viewportSize===l&&this._scrollSize===c&&this._scrollPosition===f?!1:(this._trackSize=a,this._viewportSize=l,this._scrollSize=c,this._scrollPosition=f,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(dB,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 vl=class vl{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 pB,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=uN(()=>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 f=(this.horizontal?c.clientX:c.clientY)-n,d=this.state.getScrollPositionFromThumbDelta(f,r);this.horizontal?this.viewport.scrollLeft=d:this.viewport.scrollTop=d},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=Gy({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},vl.WHEEL_GESTURE_RESET_MS),this.horizontalWheelAxisLock!=="x")return;if(r=Gy({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(vl.VERTICAL_THUMB_OFFSET_CSS_VAR),n=Number.parseFloat(t);return Number.isFinite(n)?Math.max(0,n):0}};vl.VERTICAL_THUMB_OFFSET_CSS_VAR="--scrollbar-thumb-top-offset",vl.WHEEL_GESTURE_RESET_MS=150;let Hp=vl;const hB={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}},Lb={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}},jb={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}},Ku={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}},zb={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 mB(){return hB.base}function gB({direction:e}){return[Lb.base,e==="horizontal"?Lb.horizontal:null,e==="both"?Lb.both:null]}function bB(e){return[jb.base,e==="horizontal"?jb.horizontal:null,e==="both"?jb.both:null]}function LE({direction:e,orientation:t,visibility:n}){return[Ku.base,t==="horizontal"?Ku.horizontal:null,e==="both"&&t==="vertical"?Ku.bothVertical:null,e==="both"&&t==="horizontal"?Ku.bothHorizontal:null,n==="never"?Ku.visibilityNever:null]}function jE(e,t){return[zb.base,e==="horizontal"?zb.horizontal:null,t?zb.hoverHidden:null]}const yB=1e4,Yu=5,Nl=v.forwardRef(function({children:t,height:n,maxHeight:r,width:s,className:a,viewportClassName:l,rootStyle:c,viewportStyle:f,allowScrollChaining:d=!1,contentStyle:h,scrollbarStyle:m,overlay:b,style:y,scrollbarVisibility:k=oB,isScrollbarRevealed:S=!1,direction:R="vertical",topFadeSize:T,bottomFadeSize:E,topFadeStartOpacity:C=0,bottomFadeStartOpacity:_=0,startFadeSize:D,endFadeSize:A,autoScrollToBottom:M=!1,scrollTrigger:B,autoScrollPauseTimeout:P=yB,onScrollStateChange:N,mapVerticalWheelToHorizontal:W=!1,scrollPadding:$=aB,scrollbarInset:F,onPointerEnter:z,onPointerLeave:U,...H},K){const q=v.useRef(null),Y=v.useRef(null),O=v.useRef(null),j=v.useRef(null),V=v.useRef(null),L=v.useRef(null),X=v.useRef(null),se=R!=="horizontal",ne=R!=="vertical",oe=W&&!se,[le,ce]=v.useState(!1),[Ee,be]=v.useState(!1),[ue,ge]=v.useState(!1),[Se,Ae]=v.useState(!1),[ke,xe]=v.useState(!1),Re=v.useRef(!1);Re.current=ke;const Me=v.useRef(0),ze=v.useRef(0),Fe=v.useRef(null),ye=v.useRef(null);v.useLayoutEffect(()=>{const De=Y.current,je=O.current;if(!De||!je)return;const Ie=[];if(se){const We=j.current,dt=V.current;We&&dt&&Ie.push(new Hp({viewport:De,content:je,scrollbar:We,thumb:dt,direction:"vertical",mapVerticalWheelToHorizontal:oe}))}if(ne){const We=L.current,dt=X.current;We&&dt&&Ie.push(new Hp({viewport:De,content:je,scrollbar:We,thumb:dt,direction:"horizontal",mapVerticalWheelToHorizontal:oe}))}if(Ie.length!==0){for(const We of Ie)We.attach();return()=>{for(const We of Ie)We.detach()}}},[se,ne,oe]);const _e=v.useCallback(()=>{const De=Y.current;return De?{scrollTop:De.scrollTop,scrollHeight:De.scrollHeight,clientHeight:De.clientHeight}:{scrollTop:0,scrollHeight:0,clientHeight:0}},[]),ee=v.useCallback((De=!1)=>{const je=Y.current;je&&je.scrollTo({top:je.scrollHeight,behavior:De?"smooth":"instant"})},[]),fe=v.useCallback((De=!1)=>{const je=Y.current;je&&je.scrollTo({top:0,behavior:De?"smooth":"instant"})},[]),Q=v.useCallback(()=>{ye.current===null&&(ye.current=requestAnimationFrame(()=>{ye.current=null,!Re.current&&ee(!1)}))},[ee]),re=v.useCallback(()=>{M&&(Re.current||Q())},[M,Q]);v.useImperativeHandle(K,()=>({scrollToBottom:ee,scrollToTop:fe,requestAutoScroll:re,getScrollPosition:_e,get rootElement(){return q.current},get viewportElement(){return Y.current}}),[ee,fe,re,_e]);const we=v.useCallback(()=>{const De=Y.current;if(!De)return;const{scrollTop:je,scrollHeight:Ie,clientHeight:We}=De,{isAtTop:dt,isAtBottom:Et}=uB({scrollTop:je,scrollHeight:Ie,clientHeight:We,threshold:Yu});ce(!dt),be(!Et);const{isAtStart:Ne,isAtEnd:Tt}=cB({scrollLeft:De.scrollLeft,scrollWidth:De.scrollWidth,clientWidth:De.clientWidth,threshold:Yu});ge(!Ne),Ae(!Tt),N?.({isAtBottom:Et,isAtTop:dt}),Et&&Re.current&&(xe(!1),Fe.current&&(clearTimeout(Fe.current),Fe.current=null));const Qt=Ie<ze.current-Yu,rn=Ie>ze.current+Yu,_n=je<Me.current-Yu;_n&&!Qt&&!Et&&M&&!Re.current&&(xe(!0),Fe.current&&clearTimeout(Fe.current),Fe.current=setTimeout(()=>{xe(!1),Fe.current=null},P)),rn&&M&&!Re.current&&!Et&&!_n&&Q(),Qt&&M&&!Re.current&&!Et&&Q(),Me.current=je,ze.current=Ie},[N,M,P,Q]),Pe=sB(),Ye=v.useCallback(()=>{Pe.request(we)},[Pe,we]);v.useEffect(()=>{const De=Y.current,je=O.current;if(!De)return;const Ie=()=>{Ye()};De.addEventListener("scroll",Ie,{passive:!0});const We=uN(we);return We!==null&&(We.observe(De),je&&We.observe(je)),()=>{De.removeEventListener("scroll",Ie),We?.disconnect(),Pe.dispose()}},[we,Ye,Pe]),v.useEffect(()=>{B!==void 0&&M&&(Re.current||Q())},[B,M,Q]),v.useEffect(()=>{if(!se)return;const De=Y.current;if(!De)return;const je=Ie=>{const We=Ie.deltaY;if(We===0)return;const dt=De.scrollHeight-De.clientHeight;if(dt<=0)return;const Et=De.scrollTop,Ne=Et<=0&&We<0,Tt=Et>=dt-.5&&We>0;Ne||Tt||Ie.stopPropagation()};return De.addEventListener("wheel",je,{passive:!0}),()=>De.removeEventListener("wheel",je)},[se]),v.useEffect(()=>{if(!ne)return;const De=Y.current;if(!De)return;const je=We=>{const dt=Gy({deltaX:We.deltaX,deltaY:We.deltaY,mapVerticalWheelToHorizontal:oe});if(dt===null)return;const Et=De.scrollWidth-De.clientWidth;if(Et<=0)return;const Ne=De.scrollLeft;if(!(dt<0&&Ne<=0)&&!(dt>0&&Ne>=Et-.5)){if(!oe){We.stopPropagation();return}We.preventDefault(),De.scrollLeft=Ne+dt}},Ie=oe?{passive:!1,capture:!0}:{passive:!0,capture:!0};return De.addEventListener("wheel",je,Ie),()=>De.removeEventListener("wheel",je,Ie)},[ne,oe]);const Ze=T!==void 0||E!==void 0,bt=D!==void 0||A!==void 0,Je=Ze||bt,xt=Ze?T??24:0,St=Ze?E??24:0,nt=bt?D??24:0,rt=bt?A??24:0,ct=k==="hover",[it,ft]=v.useState(!1);v.useLayoutEffect(()=>{ct&&ft(q.current?.matches(":hover")??!1)},[ct]);const Lt=v.useCallback(De=>{ft(!0),z?.(De)},[z]),Pt=v.useCallback(De=>{ft(!1),U?.(De)},[U]),At=ct&&!it&&!S;v.useEffect(()=>()=>{Fe.current&&clearTimeout(Fe.current),ye.current!==null&&(cancelAnimationFrame(ye.current),ye.current=null)},[]);const Z={"--scroll-area-scroll-padding":`${$}px`,...F!==void 0?{"--scrollbar-inset":`${F}px`}:void 0},me=Yt({rootClass:"ui-scroll-area",stylexStyles:[mB(),c],className:sn(Je&&"ui-scroll-area--masked",a),style:{height:n,maxHeight:r,width:s,...Z,...y}}),Le=Yt({rootClass:"ui-scroll-area__viewport",stylexStyles:[gB({direction:R}),f,Je?fB({topFadePx:le?xt:0,bottomFadePx:Ee?St:0,topFadeStartOpacity:C,bottomFadeStartOpacity:_,startFadePx:ue?nt:0,endFadePx:Se?rt:0}):null],className:l,style:d?{overscrollBehavior:"auto"}:void 0}),Xe=Yt({rootClass:"ui-scroll-area__content",stylexStyles:[bB(R),h]}),Ct=Yt({rootClass:"ui-scroll-area__scrollbar",stylexStyles:[LE({direction:R,orientation:"vertical",visibility:k}),m]}),lt=zt(jE("vertical",At)),He=Yt({rootClass:"ui-scroll-area__scrollbar",stylexStyles:[LE({direction:R,orientation:"horizontal",visibility:k}),m]}),qe=zt(jE("horizontal",At));return g.jsxs("div",{ref:q,className:me.className,style:me.style,"data-scroll-padding":$,"data-visibility":k,"data-direction":R,...H,onPointerEnter:ct?Lt:z,onPointerLeave:ct?Pt:U,children:[g.jsx("div",{ref:Y,className:Le.className,style:Le.style,"data-native-scrollbar":"none",children:g.jsx("div",{ref:O,className:Xe.className,style:Xe.style,children:t})}),b,se&&g.jsx("div",{ref:j,className:Ct.className,style:Ct.style,"data-orientation":"vertical","data-scrollable":"false",role:"presentation","aria-hidden":"true",children:g.jsx("div",{ref:V,className:lt.className,style:lt.style,"data-orientation":"vertical"})}),ne&&g.jsx("div",{ref:L,className:He.className,style:He.style,"data-orientation":"horizontal","data-scrollable":"false",role:"presentation","aria-hidden":"true",children:g.jsx("div",{ref:X,className:qe.className,style:qe.style,"data-orientation":"horizontal"})})]})}),Pb={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 vB({children:e,hidden:t=!1,ref:n}){return g.jsx(Nl,{ref:n,"data-component":"list-popup-scroll",maxHeight:"none",rootStyle:[Pb.root,t&&Pb.rootHidden],viewportStyle:Pb.viewport,children:e})}const $h="top",xB=300,Bh=100;function kB(e){const[t,n="center"]=e.split("-");return{side:t,align:n}}function SB(e){return typeof e=="number"?{sideOffset:e}:{sideOffset:e.mainAxis,alignOffset:e.alignmentAxis}}function wB(e,t){return{side:t,align:"shift",fallbackAxisSide:e?"none":"start"}}function Fh(e,t,n,r="flip"){const{side:s,align:a}=v.useMemo(()=>kB(e),[e]),{sideOffset:l,alignOffset:c}=v.useMemo(()=>SB(t),[t]),f=v.useMemo(()=>wB(n,r),[n,r]);return{side:s,align:a,sideOffset:l,alignOffset:c,collisionAvoidance:f,positionMethod:"fixed"}}const EB=v.forwardRef(function(t,n){const{render:r,className:s,id:a,name:l,value:c,disabled:f=!1,onValueChange:d,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:A,validation:M}=Dh(),{clearErrors:B}=BA(),P=R||f,N=S??l,W={...k,disabled:P},{labelId:$}=xx(),F=Sx({id:a});Ve(()=>{const O=c!=null;M.inputRef.current?.value||O&&c!==""?D(!0):O&&c===""&&D(!1)},[M.inputRef,D,c]);const z=v.useRef(null);Ve(()=>{m&&z.current===pr(Wt(z.current))&&_(!0)},[m,_]);const[U]=Al({controlled:c,default:h,name:"FieldControl",state:"value"}),H=c!==void 0,K=H?U:void 0,q=Ke(()=>M.inputRef.current?.value);return $A(M.inputRef,F,K,q,!P,l),bn("input",t,{ref:[n,z],state:W,props:[{id:F,disabled:P,name:N,ref:M.inputRef,"aria-labelledby":$,autoFocus:m,...H?{value:K}:{defaultValue:h},onChange(O){const j=O.currentTarget.value;d?.(j,Rt(Ni,O.nativeEvent)),E(j!==C.initialValue),D(j!==""),O.nativeEvent.defaultPrevented||(B(N),M.change(j))},onFocus(){_(!0)},onBlur(O){T(!0),_(!1),A==="onBlur"&&M.commit(O.currentTarget.value)},onKeyDown(O){O.currentTarget.tagName==="INPUT"&&O.key==="Enter"&&(T(!0),M.commit(O.currentTarget.value))}},y,O=>M.getValidationProps(P,O)],stateAttributesMapping:Zc})}),TB=v.forwardRef(function(t,n){return g.jsx(EB,{ref:n,...t})});var RB=["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] *)"],Vp=RB.join(","),cN=typeof Element>"u",Ol=cN?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Gp=!cN&&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},Wp=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]"):Wp(t.parentNode));return l},CB=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},fN=function(t,n,r){if(Wp(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(Vp));return n&&Ol.call(t,Vp)&&s.unshift(t),s=s.filter(r),s},Kp=function(t,n,r){for(var s=[],a=Array.from(t);a.length;){var l=a.shift();if(!Wp(l,!1))if(l.tagName==="SLOT"){var c=l.assignedElements(),f=c.length?c:l.children,d=Kp(f,!0,r);r.flatten?s.push.apply(s,d):s.push({scopeParent:l,candidates:d})}else{var h=Ol.call(l,Vp);h&&r.filter(l)&&(n||!t.includes(l))&&s.push(l);var m=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),b=!Wp(m,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(m&&b){var y=Kp(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},dN=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},pN=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||CB(t))&&!dN(t)?0:t.tabIndex},_B=function(t,n){var r=pN(t);return r<0&&n&&!dN(t)?0:r},AB=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},hN=function(t){return t.tagName==="INPUT"},NB=function(t){return hN(t)&&t.type==="hidden"},OB=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},IB=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},MB=function(t){if(!t.name)return!0;var n=t.form||Gp(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=IB(s,t.form);return!a||a===t},DB=function(t){return hN(t)&&t.type==="radio"},LB=function(t){return DB(t)&&!MB(t)},jB=function(t){var n,r=t&&Gp(t),s=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var l,c,f;for(a=!!((l=s)!==null&&l!==void 0&&(c=l.ownerDocument)!==null&&c!==void 0&&c.contains(s)||t!=null&&(f=t.ownerDocument)!==null&&f!==void 0&&f.contains(t));!a&&s;){var d,h,m;r=Gp(s),s=(d=r)===null||d===void 0?void 0:d.host,a=!!((h=s)!==null&&h!==void 0&&(m=h.ownerDocument)!==null&&m!==void 0&&m.contains(s))}}return a},zE=function(t){var n=t.getBoundingClientRect(),r=n.width,s=n.height;return r===0&&s===0},zB=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=Ol.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(Ol.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof s=="function"){for(var f=t;t;){var d=t.parentElement,h=Gp(t);if(d&&!d.shadowRoot&&s(d)===!0)return zE(t);t.assignedSlot?t=t.assignedSlot:!d&&h!==t.ownerDocument?t=h.host:t=d}t=f}if(jB(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return zE(t);return!1},PB=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 Ol.call(n,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}n=n.parentElement}return!1},Wy=function(t,n){return!(n.disabled||NB(n)||zB(n,t)||OB(n)||PB(n))},Ky=function(t,n){return!(LB(n)||pN(n)<0||!Wy(t,n))},$B=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},mN=function(t){var n=[],r=[];return t.forEach(function(s,a){var l=!!s.scopeParent,c=l?s.scopeParent:s,f=_B(c,l),d=l?mN(s.candidates):c;f===0?l?n.push.apply(n,d):n.push(c):r.push({documentOrder:a,tabIndex:f,item:s,isScope:l,content:d})}),r.sort(AB).reduce(function(s,a){return a.isScope?s.push.apply(s,a.content):s.push(a.content),s},[]).concat(n)},Uh=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Kp([t],n.includeContainer,{filter:Ky.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:$B}):r=fN(t,n.includeContainer,Ky.bind(null,n)),mN(r)},BB=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Kp([t],n.includeContainer,{filter:Wy.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=fN(t,n.includeContainer,Wy.bind(null,n)),r},gN=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Ol.call(t,Vp)===!1?!1:Ky(n,t)};function FB(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function bN(){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 UB(){return/apple/i.test(navigator.vendor)}function Yy(){const e=/android/i;return e.test(FB())||e.test(bN())}function qB(){return bN().includes("jsdom/")}const PE="data-floating-ui-focusable",HB="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",$b="ArrowLeft",Bb="ArrowRight",VB="ArrowUp",GB="ArrowDown";function po(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 xr(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&So(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ho(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Fb(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 WB(e){return e.matches("html,body")}function hr(e){return e?.ownerDocument||document}function yN(e){return Ft(e)&&e.matches(HB)}function Xy(e){return e?e.getAttribute("role")==="combobox"&&yN(e):!1}function Yp(e){return e?e.hasAttribute(PE)?e:e.querySelector("["+PE+"]")||e:null}function na(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,...na(e,s.id,n)])}function KB(e,t){let n,r=-1;function s(a,l){l>r&&(n=a,r=l),na(e,a).forEach(f=>{s(f.id,l+1)})}return s(t,0),e.find(a=>a.id===n)}function $E(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 ar(e){e.preventDefault(),e.stopPropagation()}function YB(e){return"nativeEvent"in e}function vN(e){return e.mozInputSource===0&&e.isTrusted?!0:Yy()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function xN(e){return qB()?!1:!Yy()&&e.width===0&&e.height===0||Yy()&&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 Cc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var XB=typeof document<"u",ZB=function(){},mn=XB?v.useLayoutEffect:ZB;const QB={...Pv};function er(e){const t=v.useRef(e);return mn(()=>{t.current=e}),t}const JB=QB.useInsertionEffect,e5=JB||(e=>e());function $n(e){const t=v.useRef(()=>{});return e5(()=>{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 zd(e,t,n){return Math.floor(e/t)!==n}function gc(e,t){return t<0||t>=e.current.length}function Ub(e,t){return dr(e,{disabledIndices:t})}function BE(e,t){return dr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function dr(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&&kp(e,l,s));return l}function t5(e,t){let{event:n,orientation:r,loop:s,rtl:a,cols:l,disabledIndices:c,minIndex:f,maxIndex:d,prevIndex:h,stopEvent:m=!1}=t,b=h;if(n.key===VB){if(m&&ar(n),h===-1)b=d;else if(b=dr(e,{startingIndex:b,amount:l,decrement:!0,disabledIndices:c}),s&&(h-l<f||b<0)){const y=h%l,k=d%l,S=d-(k-y);k===y?b=d:b=k>y?S:S-l}gc(e,b)&&(b=h)}if(n.key===GB&&(m&&ar(n),h===-1?b=f:(b=dr(e,{startingIndex:h,amount:l,disabledIndices:c}),s&&h+l>d&&(b=dr(e,{startingIndex:h%l-l,amount:l,disabledIndices:c}))),gc(e,b)&&(b=h)),r==="both"){const y=gl(h/l);n.key===(a?$b:Bb)&&(m&&ar(n),h%l!==l-1?(b=dr(e,{startingIndex:h,disabledIndices:c}),s&&zd(b,l,y)&&(b=dr(e,{startingIndex:h-h%l-1,disabledIndices:c}))):s&&(b=dr(e,{startingIndex:h-h%l-1,disabledIndices:c})),zd(b,l,y)&&(b=h)),n.key===(a?Bb:$b)&&(m&&ar(n),h%l!==0?(b=dr(e,{startingIndex:h,decrement:!0,disabledIndices:c}),s&&zd(b,l,y)&&(b=dr(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c}))):s&&(b=dr(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c})),zd(b,l,y)&&(b=h));const k=gl(d/l)===y;gc(e,b)&&(s&&k?b=n.key===(a?Bb:$b)?d:dr(e,{startingIndex:h-h%l-1,disabledIndices:c}):b=h)}return b}function n5(e,t,n){const r=[];let s=0;return e.forEach((a,l)=>{let{width:c,height:f}=a,d=!1;for(n&&(s=0);!d;){const h=[];for(let m=0;m<c;m++)for(let b=0;b<f;b++)h.push(s+m+b*t);s%t+c<=t&&h.every(m=>r[m]==null)?(h.forEach(m=>{r[m]=l}),d=!0):s++}}),[...r]}function r5(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 i5(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function kp(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 Qc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function kN(e,t){const n=Uh(e,Qc()),r=n.length;if(r===0)return;const s=po(hr(e)),a=n.indexOf(s),l=a===-1?t===1?0:r-1:a+t;return n[l]}function SN(e){return kN(hr(e).body,1)||e}function wN(e){return kN(hr(e).body,-1)||e}function bc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!xr(n,r)}function s5(e){Uh(e,Qc()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function FE(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 Jc(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 o5(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 EN=v.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function TN(e){const{children:t,elementsRef:n,labelsRef:r}=e,[s,a]=v.useState(()=>new Set),l=v.useCallback(d=>{a(h=>new Set(h).add(d))},[]),c=v.useCallback(d=>{a(h=>{const m=new Set(h);return m.delete(d),m})},[]),f=v.useMemo(()=>{const d=new Map;return Array.from(s.keys()).sort(o5).forEach((m,b)=>{d.set(m,b)}),d},[s]);return g.jsx(EN.Provider,{value:v.useMemo(()=>({register:l,unregister:c,map:f,elementsRef:n,labelsRef:r}),[l,c,f,n,r]),children:t})}function qh(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:s,elementsRef:a,labelsRef:l}=v.useContext(EN),[c,f]=v.useState(null),d=v.useRef(null),h=v.useCallback(m=>{if(d.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 mn(()=>{const m=d.current;if(m)return n(m),()=>{r(m)}},[n,r]),mn(()=>{const m=d.current?s.get(d.current):null;m!=null&&f(m)},[s]),v.useMemo(()=>({ref:h,index:c??-1}),[c,h])}const a5="data-floating-ui-focusable",UE="active",qE="selected",ef="ArrowLeft",tf="ArrowRight",RN="ArrowUp",Hh="ArrowDown",l5={...Pv};let HE=!1,u5=0;const VE=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+u5++;function c5(){const[e,t]=v.useState(()=>HE?VE():void 0);return mn(()=>{e==null&&t(VE())},[]),v.useEffect(()=>{HE=!0},[]),e}const f5=l5.useId,Vh=f5||c5;function CN(){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 _N=v.createContext(null),AN=v.createContext(null),Ao=()=>{var e;return((e=v.useContext(_N))==null?void 0:e.id)||null},No=()=>v.useContext(AN);function Cx(e){const t=Vh(),n=No(),s=Ao();return mn(()=>{if(!t)return;const a={id:t,parentId:s};return n?.addNode(a),()=>{n?.removeNode(a)}},[n,t,s]),t}function _x(e){const{children:t,id:n}=e,r=Ao();return g.jsx(_N.Provider,{value:v.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function d5(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(()=>CN());return g.jsx(AN.Provider,{value:v.useMemo(()=>({nodesRef:n,addNode:r,removeNode:s,events:a}),[r,s,a]),children:t})}function Il(e){return"data-floating-ui-"+e}function fr(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const GE=Il("safe-polygon");function qb(e,t,n){if(n&&!Cc(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 Hb(e){return typeof e=="function"?e():e}function NN(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,events:a,elements:l}=e,{enabled:c=!0,delay:f=0,handleClose:d=null,mouseOnly:h=!1,restMs:m=0,move:b=!0}=t,y=No(),k=Ao(),S=er(d),R=er(f),T=er(n),E=er(m),C=v.useRef(),_=v.useRef(-1),D=v.useRef(),A=v.useRef(-1),M=v.useRef(!0),B=v.useRef(!1),P=v.useRef(()=>{}),N=v.useRef(!1),W=$n(()=>{var K;const q=(K=s.current.openEvent)==null?void 0:K.type;return q?.includes("mouse")&&q!=="mousedown"});v.useEffect(()=>{if(!c)return;function K(q){let{open:Y}=q;Y||(fr(_),fr(A),M.current=!0,N.current=!1)}return a.on("openchange",K),()=>{a.off("openchange",K)}},[c,a]),v.useEffect(()=>{if(!c||!S.current||!n)return;function K(Y){W()&&r(!1,Y,"hover")}const q=hr(l.floating).documentElement;return q.addEventListener("mouseleave",K),()=>{q.removeEventListener("mouseleave",K)}},[l.floating,n,r,c,S,W]);const $=v.useCallback(function(K,q,Y){q===void 0&&(q=!0),Y===void 0&&(Y="hover");const O=qb(R.current,"close",C.current);O&&!D.current?(fr(_),_.current=window.setTimeout(()=>r(!1,K,Y),O)):q&&(fr(_),r(!1,K,Y))},[R,r]),F=$n(()=>{P.current(),D.current=void 0}),z=$n(()=>{if(B.current){const K=hr(l.floating).body;K.style.pointerEvents="",K.removeAttribute(GE),B.current=!1}}),U=$n(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);v.useEffect(()=>{if(!c)return;function K(V){if(fr(_),M.current=!1,h&&!Cc(C.current)||Hb(E.current)>0&&!qb(R.current,"open"))return;const L=qb(R.current,"open",C.current);L?_.current=window.setTimeout(()=>{T.current||r(!0,V,"hover")},L):n||r(!0,V,"hover")}function q(V){if(U()){z();return}P.current();const L=hr(l.floating);if(fr(A),N.current=!1,S.current&&s.current.floatingContext){n||fr(_),D.current=S.current({...s.current.floatingContext,tree:y,x:V.clientX,y:V.clientY,onClose(){z(),F(),U()||$(V,!0,"safe-polygon")}});const se=D.current;L.addEventListener("mousemove",se),P.current=()=>{L.removeEventListener("mousemove",se)};return}(C.current!=="touch"||!xr(l.floating,V.relatedTarget))&&$(V)}function Y(V){U()||s.current.floatingContext&&(S.current==null||S.current({...s.current.floatingContext,tree:y,x:V.clientX,y:V.clientY,onClose(){z(),F(),U()||$(V)}})(V))}function O(){fr(_)}function j(V){U()||$(V,!1)}if(gt(l.domReference)){const V=l.domReference,L=l.floating;return n&&V.addEventListener("mouseleave",Y),b&&V.addEventListener("mousemove",K,{once:!0}),V.addEventListener("mouseenter",K),V.addEventListener("mouseleave",q),L&&(L.addEventListener("mouseleave",Y),L.addEventListener("mouseenter",O),L.addEventListener("mouseleave",j)),()=>{n&&V.removeEventListener("mouseleave",Y),b&&V.removeEventListener("mousemove",K),V.removeEventListener("mouseenter",K),V.removeEventListener("mouseleave",q),L&&(L.removeEventListener("mouseleave",Y),L.removeEventListener("mouseenter",O),L.removeEventListener("mouseleave",j))}}},[l,c,e,h,b,$,F,z,r,n,T,y,R,S,s,U,E]),mn(()=>{var K;if(c&&n&&(K=S.current)!=null&&(K=K.__options)!=null&&K.blockPointerEvents&&W()){B.current=!0;const Y=l.floating;if(gt(l.domReference)&&Y){var q;const O=hr(l.floating).body;O.setAttribute(GE,"");const j=l.domReference,V=y==null||(q=y.nodesRef.current.find(L=>L.id===k))==null||(q=q.context)==null?void 0:q.elements.floating;return V&&(V.style.pointerEvents=""),O.style.pointerEvents="none",j.style.pointerEvents="auto",Y.style.pointerEvents="auto",()=>{O.style.pointerEvents="",j.style.pointerEvents="",Y.style.pointerEvents=""}}}},[c,n,k,l,y,S,W]),mn(()=>{n||(C.current=void 0,N.current=!1,F(),z())},[n,F,z]),v.useEffect(()=>()=>{F(),fr(_),fr(A),z()},[c,l.domReference,F,z]);const H=v.useMemo(()=>{function K(q){C.current=q.pointerType}return{onPointerDown:K,onPointerEnter:K,onMouseMove(q){const{nativeEvent:Y}=q;function O(){!M.current&&!T.current&&r(!0,Y,"hover")}h&&!Cc(C.current)||n||Hb(E.current)===0||N.current&&q.movementX**2+q.movementY**2<2||(fr(A),C.current==="touch"?O():(N.current=!0,A.current=window.setTimeout(O,Hb(E.current))))}}},[h,r,n,T,E]);return v.useMemo(()=>c?{reference:H}:{},[c,H])}let WE=0;function ea(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=t;r&&cancelAnimationFrame(WE);const a=()=>e?.focus({preventScroll:n});s?a():WE=requestAnimationFrame(a)}function Vb(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&So(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function p5(e){return"composedPath"in e?e.composedPath()[0]:e.target}function h5(e){return e?.ownerDocument||document}const kl={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function KE(e){return e==="inert"?kl.inert:e==="aria-hidden"?kl["aria-hidden"]:kl.none}let Pd=new WeakSet,$d={},Gb=0;const m5=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,ON=e=>e&&(e.host||ON(e.parentNode)),g5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=ON(n);return e.contains(r)?r:null}).filter(n=>n!=null);function b5(e,t,n,r){const s="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,l=g5(t,e),c=new Set,f=new Set(l),d=[];$d[s]||($d[s]=new WeakMap);const h=$d[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||f.has(y)||[].forEach.call(y.children,k=>{if(Qn(k)!=="script")if(c.has(k))b(k);else{const S=a?k.getAttribute(a):null,R=S!==null&&S!=="false",T=KE(a),E=(T.get(k)||0)+1,C=(h.get(k)||0)+1;T.set(k,E),h.set(k,C),d.push(k),E===1&&R&&Pd.add(k),C===1&&k.setAttribute(s,""),!R&&a&&k.setAttribute(a,a==="inert"?"":"true")}})}return Gb++,()=>{d.forEach(y=>{const k=KE(a),R=(k.get(y)||0)-1,T=(h.get(y)||0)-1;k.set(y,R),h.set(y,T),R||(!Pd.has(y)&&a&&y.removeAttribute(a),Pd.delete(y)),T||y.removeAttribute(s)}),Gb--,Gb||(kl.inert=new WeakMap,kl["aria-hidden"]=new WeakMap,kl.none=new WeakMap,Pd=new WeakSet,$d={})}}function YE(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=h5(e[0]).body;return b5(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const Gh={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},Xp=v.forwardRef(function(t,n){const[r,s]=v.useState();mn(()=>{UB()&&s("button")},[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Il("focus-guard")]:"",style:Gh};return g.jsx("span",{...t,...a})}),IN=v.createContext(null),XE=Il("portal");function y5(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Vh(),s=MN(),[a,l]=v.useState(null),c=v.useRef(null);return mn(()=>()=>{a?.remove(),queueMicrotask(()=>{c.current=null})},[a]),mn(()=>{if(!r||c.current)return;const f=t?document.getElementById(t):null;if(!f)return;const d=document.createElement("div");d.id=r,d.setAttribute(XE,""),f.appendChild(d),c.current=d,l(d)},[t,r]),mn(()=>{if(n===null||!r||c.current)return;let f=n||s?.portalNode;f&&!mh(f)&&(f=f.current),f=f||document.body;let d=null;t&&(d=document.createElement("div"),d.id=t,f.appendChild(d));const h=document.createElement("div");h.id=r,h.setAttribute(XE,""),f=d||f,f.appendChild(h),c.current=h,l(h)},[t,n,r,s]),a}function Ax(e){const{children:t,id:n,root:r,preserveTabOrder:s=!0}=e,a=y5({id:n,root:r}),[l,c]=v.useState(null),f=v.useRef(null),d=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&&bc(R)&&(R.type==="focusin"?FE:s5)(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||FE(a))},[y,a]),g.jsxs(IN.Provider,{value:v.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:f,afterOutsideRef:d,beforeInsideRef:h,afterInsideRef:m,portalNode:a,setFocusManagerState:c}),[s,a]),children:[k&&a&&g.jsx(Xp,{"data-type":"outside",ref:f,onFocus:S=>{if(bc(S,a)){var R;(R=h.current)==null||R.focus()}else{const T=l?l.domReference:null,E=wN(T);E?.focus()}}}),k&&a&&g.jsx("span",{"aria-owns":a.id,style:Gh}),a&&Mi.createPortal(t,a),k&&a&&g.jsx(Xp,{"data-type":"outside",ref:d,onFocus:S=>{if(bc(S,a)){var R;(R=m.current)==null||R.focus()}else{const T=l?l.domReference:null,E=SN(T);E?.focus(),l?.closeOnFocusOut&&l?.onOpenChange(!1,S.nativeEvent,"focus-out")}}})]})}const MN=()=>v.useContext(IN);function ZE(e){return v.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const v5=20;let go=[];function Nx(){go=go.filter(e=>e.isConnected)}function x5(e){Nx(),e&&Qn(e)!=="body"&&(go.push(e),go.length>v5&&(go=go.slice(-20)))}function QE(){return Nx(),go[go.length-1]}function k5(e){const t=Qc();return gN(e,t)?e:Uh(e,t)[0]||e}function JE(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Qc(),a=BB(e,r).filter(c=>{const f=c.getAttribute("data-tabindex")||"";return gN(c,r)||c.hasAttribute("data-tabindex")&&!f.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 S5=v.forwardRef(function(t,n){return g.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:Gh})});function Ox(e){const{context:t,children:n,disabled:r=!1,order:s=["content"],guards:a=!0,initialFocus:l=0,returnFocus:c=!0,restoreFocus:f=!1,modal:d=!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,_=$n(()=>{var ue;return(ue=T.current.floatingContext)==null?void 0:ue.nodeId}),D=$n(y),A=typeof l=="number"&&l<0,M=Xy(E)&&A,B=m5(),P=B?a:!0,N=!P||B&&b,W=er(s),$=er(l),F=er(c),z=No(),U=MN(),H=v.useRef(null),K=v.useRef(null),q=v.useRef(!1),Y=v.useRef(!1),O=v.useRef(-1),j=v.useRef(-1),V=U!=null,L=Yp(C),X=$n(function(ue){return ue===void 0&&(ue=L),ue?Uh(ue,Qc()):[]}),se=$n(ue=>{const ge=X(ue);return W.current.map(Se=>E&&Se==="reference"?E:L&&Se==="floating"?L:ge).filter(Boolean).flat()});v.useEffect(()=>{if(r||!d)return;function ue(Se){if(Se.key==="Tab"){xr(L,po(hr(L)))&&X().length===0&&!M&&ar(Se);const Ae=se(),ke=ho(Se);W.current[0]==="reference"&&ke===E&&(ar(Se),Se.shiftKey?ea(Ae[Ae.length-1]):ea(Ae[1])),W.current[1]==="floating"&&ke===L&&Se.shiftKey&&(ar(Se),ea(Ae[0]))}}const ge=hr(L);return ge.addEventListener("keydown",ue),()=>{ge.removeEventListener("keydown",ue)}},[r,E,L,d,W,M,X,se]),v.useEffect(()=>{if(r||!C)return;function ue(ge){const Se=ho(ge),ke=X().indexOf(Se);ke!==-1&&(O.current=ke)}return C.addEventListener("focusin",ue),()=>{C.removeEventListener("focusin",ue)}},[r,C,X]),v.useEffect(()=>{if(r||!m)return;function ue(){Y.current=!0,setTimeout(()=>{Y.current=!1})}function ge(ke){const xe=ke.relatedTarget,Re=ke.currentTarget,Me=ho(ke);queueMicrotask(()=>{const ze=_(),Fe=!(xr(E,xe)||xr(C,xe)||xr(xe,C)||xr(U?.portalNode,xe)||xe!=null&&xe.hasAttribute(Il("focus-guard"))||z&&(na(z.nodesRef.current,ze).find(ye=>{var _e,ee;return xr((_e=ye.context)==null?void 0:_e.elements.floating,xe)||xr((ee=ye.context)==null?void 0:ee.elements.domReference,xe)})||$E(z.nodesRef.current,ze).find(ye=>{var _e,ee,fe;return[(_e=ye.context)==null?void 0:_e.elements.floating,Yp((ee=ye.context)==null?void 0:ee.elements.floating)].includes(xe)||((fe=ye.context)==null?void 0:fe.elements.domReference)===xe})));if(Re===E&&L&&JE(L,W),f&&Re!==E&&!(Me!=null&&Me.isConnected)&&po(hr(L))===hr(L).body){Ft(L)&&L.focus();const ye=O.current,_e=X(),ee=_e[ye]||_e[_e.length-1]||L;Ft(ee)&&ee.focus()}if(T.current.insideReactTree){T.current.insideReactTree=!1;return}(M||!d)&&xe&&Fe&&!Y.current&&xe!==QE()&&(q.current=!0,S(!1,ke,"focus-out"))})}const Se=!!(!z&&U);function Ae(){fr(j),T.current.insideReactTree=!0,j.current=window.setTimeout(()=>{T.current.insideReactTree=!1})}if(C&&Ft(E))return E.addEventListener("focusout",ge),E.addEventListener("pointerdown",ue),C.addEventListener("focusout",ge),Se&&C.addEventListener("focusout",Ae,!0),()=>{E.removeEventListener("focusout",ge),E.removeEventListener("pointerdown",ue),C.removeEventListener("focusout",ge),Se&&C.removeEventListener("focusout",Ae,!0)}},[r,E,C,L,d,z,U,S,m,f,X,M,_,W,T]);const ne=v.useRef(null),oe=v.useRef(null),le=ZE([ne,U?.beforeInsideRef]),ce=ZE([oe,U?.afterInsideRef]);v.useEffect(()=>{var ue,ge;if(r||!C)return;const Se=Array.from((U==null||(ue=U.portalNode)==null?void 0:ue.querySelectorAll("["+Il("portal")+"]"))||[]),ke=(ge=(z?$E(z.nodesRef.current,_()):[]).find(Me=>{var ze;return Xy(((ze=Me.context)==null?void 0:ze.elements.domReference)||null)}))==null||(ge=ge.context)==null?void 0:ge.elements.domReference,xe=[C,ke,...Se,...D(),H.current,K.current,ne.current,oe.current,U?.beforeOutsideRef.current,U?.afterOutsideRef.current,W.current.includes("reference")||M?E:null].filter(Me=>Me!=null),Re=d||M?YE(xe,!N,N):YE(xe);return()=>{Re()}},[r,E,C,d,W,U,M,P,N,z,_,D]),mn(()=>{if(r||!Ft(L))return;const ue=hr(L),ge=po(ue);queueMicrotask(()=>{const Se=se(L),Ae=$.current,ke=(typeof Ae=="number"?Se[Ae]:Ae.current)||L,xe=xr(L,ge);!A&&!xe&&k&&ea(ke,{preventScroll:ke===L})})},[r,k,L,A,se,$]),mn(()=>{if(r||!L)return;const ue=hr(L),ge=po(ue);x5(ge);function Se(xe){let{reason:Re,event:Me,nested:ze}=xe;if(["hover","safe-polygon"].includes(Re)&&Me.type==="mouseleave"&&(q.current=!0),Re==="outside-press")if(ze)q.current=!1;else if(vN(Me)||xN(Me))q.current=!1;else{let Fe=!1;document.createElement("div").focus({get preventScroll(){return Fe=!0,!1}}),Fe?q.current=!1:q.current=!0}}R.on("openchange",Se);const Ae=ue.createElement("span");Ae.setAttribute("tabindex","-1"),Ae.setAttribute("aria-hidden","true"),Object.assign(Ae.style,Gh),V&&E&&E.insertAdjacentElement("afterend",Ae);function ke(){if(typeof F.current=="boolean"){const xe=E||QE();return xe&&xe.isConnected?xe:Ae}return F.current.current||Ae}return()=>{R.off("openchange",Se);const xe=po(ue),Re=xr(C,xe)||z&&na(z.nodesRef.current,_(),!1).some(ze=>{var Fe;return xr((Fe=ze.context)==null?void 0:Fe.elements.floating,xe)}),Me=ke();queueMicrotask(()=>{const ze=k5(Me);F.current&&!q.current&&Ft(ze)&&(!(ze!==xe&&xe!==ue.body)||Re)&&ze.focus({preventScroll:!0}),Ae.remove()})}},[r,C,L,F,T,R,z,V,E,_]),v.useEffect(()=>(queueMicrotask(()=>{q.current=!1}),()=>{queueMicrotask(Nx)}),[r]),mn(()=>{if(!r&&U)return U.setFocusManagerState({modal:d,closeOnFocusOut:m,open:k,onOpenChange:S,domReference:E}),()=>{U.setFocusManagerState(null)}},[r,U,d,k,S,m,E]),mn(()=>{r||L&&JE(L,W)},[r,L,W]);function Ee(ue){return r||!h||!d?null:g.jsx(S5,{ref:ue==="start"?H:K,onClick:ge=>S(!1,ge.nativeEvent),children:typeof h=="string"?h:"Dismiss"})}const be=!r&&P&&(d?!M:!0)&&(V||d);return g.jsxs(g.Fragment,{children:[be&&g.jsx(Xp,{"data-type":"inside",ref:le,onFocus:ue=>{if(d){const Se=se();ea(s[0]==="reference"?Se[0]:Se[Se.length-1])}else if(U!=null&&U.preserveTabOrder&&U.portalNode)if(q.current=!1,bc(ue,U.portalNode)){const Se=SN(E);Se?.focus()}else{var ge;(ge=U.beforeOutsideRef.current)==null||ge.focus()}}}),!M&&Ee("start"),n,Ee("end"),be&&g.jsx(Xp,{"data-type":"inside",ref:ce,onFocus:ue=>{if(d)ea(se()[0]);else if(U!=null&&U.preserveTabOrder&&U.portalNode)if(m&&(q.current=!0),bc(ue,U.portalNode)){const Se=wN(E);Se?.focus()}else{var ge;(ge=U.afterOutsideRef.current)==null||ge.focus()}}})]})}function eT(e){return Ft(e.target)&&e.target.tagName==="BUTTON"}function w5(e){return Ft(e.target)&&e.target.tagName==="A"}function tT(e){return yN(e)}function DN(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,elements:{domReference:a}}=e,{enabled:l=!0,event:c="click",toggle:f=!0,ignoreMouse:d=!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"&&(Cc(R,!0)&&d||(n&&f&&(!(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}Cc(R,!0)&&d||(n&&f&&(!(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||eT(S))&&(S.key===" "&&!tT(a)&&(S.preventDefault(),y.current=!0),!w5(S)&&S.key==="Enter"&&r(!(n&&f),S.nativeEvent,"click"))},onKeyUp(S){S.defaultPrevented||!h||eT(S)||tT(a)||S.key===" "&&y.current&&(y.current=!1,r(!(n&&f),S.nativeEvent,"click"))}}),[s,a,c,d,h,r,n,m,f]);return v.useMemo(()=>l?{reference:k}:{},[l,k])}const E5={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},T5={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},nT=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 LN(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:s,dataRef:a}=e,{enabled:l=!0,escapeKey:c=!0,outsidePress:f=!0,outsidePressEvent:d="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:b=!1,bubbles:y,capture:k}=t,S=No(),R=$n(typeof f=="function"?f:()=>!1),T=typeof f=="function"?R:f,E=v.useRef(!1),{escapeKey:C,outsidePress:_}=nT(y),{escapeKey:D,outsidePress:A}=nT(k),M=v.useRef(!1),B=$n(z=>{var U;if(!n||!l||!c||z.key!=="Escape"||M.current)return;const H=(U=a.current.floatingContext)==null?void 0:U.nodeId,K=S?na(S.nodesRef.current,H):[];if(!C&&(z.stopPropagation(),K.length>0)){let q=!0;if(K.forEach(Y=>{var O;if((O=Y.context)!=null&&O.open&&!Y.context.dataRef.current.__escapeKeyBubbles){q=!1;return}}),!q)return}r(!1,YB(z)?z.nativeEvent:z,"escape-key")}),P=$n(z=>{var U;const H=()=>{var K;B(z),(K=ho(z))==null||K.removeEventListener("keydown",H)};(U=ho(z))==null||U.addEventListener("keydown",H)}),N=$n(z=>{var U;const H=a.current.insideReactTree;a.current.insideReactTree=!1;const K=E.current;if(E.current=!1,d==="click"&&K||H||typeof T=="function"&&!T(z))return;const q=ho(z),Y="["+Il("inert")+"]",O=hr(s.floating).querySelectorAll(Y);let j=gt(q)?q:null;for(;j&&!_i(j);){const se=_s(j);if(_i(se)||!gt(se))break;j=se}if(O.length&>(q)&&!WB(q)&&!xr(q,s.floating)&&Array.from(O).every(se=>!xr(j,se)))return;if(Ft(q)&&F){const se=_i(q),ne=Tr(q),oe=/auto|scroll/,le=se||oe.test(ne.overflowX),ce=se||oe.test(ne.overflowY),Ee=le&&q.clientWidth>0&&q.scrollWidth>q.clientWidth,be=ce&&q.clientHeight>0&&q.scrollHeight>q.clientHeight,ue=ne.direction==="rtl",ge=be&&(ue?z.offsetX<=q.offsetWidth-q.clientWidth:z.offsetX>q.clientWidth),Se=Ee&&z.offsetY>q.clientHeight;if(ge||Se)return}const V=(U=a.current.floatingContext)==null?void 0:U.nodeId,L=S&&na(S.nodesRef.current,V).some(se=>{var ne;return Fb(z,(ne=se.context)==null?void 0:ne.elements.floating)});if(Fb(z,s.floating)||Fb(z,s.domReference)||L)return;const X=S?na(S.nodesRef.current,V):[];if(X.length>0){let se=!0;if(X.forEach(ne=>{var oe;if((oe=ne.context)!=null&&oe.open&&!ne.context.dataRef.current.__outsidePressBubbles){se=!1;return}}),!se)return}r(!1,z,"outside-press")}),W=$n(z=>{var U;const H=()=>{var K;N(z),(K=ho(z))==null||K.removeEventListener(d,H)};(U=ho(z))==null||U.addEventListener(d,H)});v.useEffect(()=>{if(!n||!l)return;a.current.__escapeKeyBubbles=C,a.current.__outsidePressBubbles=_;let z=-1;function U(O){r(!1,O,"ancestor-scroll")}function H(){window.clearTimeout(z),M.current=!0}function K(){z=window.setTimeout(()=>{M.current=!1},bh()?5:0)}const q=hr(s.floating);c&&(q.addEventListener("keydown",D?P:B,D),q.addEventListener("compositionstart",H),q.addEventListener("compositionend",K)),T&&q.addEventListener(d,A?W:N,A);let Y=[];return b&&(gt(s.domReference)&&(Y=bo(s.domReference)),gt(s.floating)&&(Y=Y.concat(bo(s.floating))),!gt(s.reference)&&s.reference&&s.reference.contextElement&&(Y=Y.concat(bo(s.reference.contextElement)))),Y=Y.filter(O=>{var j;return O!==((j=q.defaultView)==null?void 0:j.visualViewport)}),Y.forEach(O=>{O.addEventListener("scroll",U,{passive:!0})}),()=>{c&&(q.removeEventListener("keydown",D?P:B,D),q.removeEventListener("compositionstart",H),q.removeEventListener("compositionend",K)),T&&q.removeEventListener(d,A?W:N,A),Y.forEach(O=>{O.removeEventListener("scroll",U)}),window.clearTimeout(z)}},[a,s,c,T,d,n,r,b,l,C,_,B,D,P,N,A,W]),v.useEffect(()=>{a.current.insideReactTree=!1},[a,T,d]);const $=v.useMemo(()=>({onKeyDown:B,...h&&{[E5[m]]:z=>{r(!1,z.nativeEvent,"reference-press")},...m!=="click"&&{onClick(z){r(!1,z.nativeEvent,"reference-press")}}}}),[B,r,h,m]),F=v.useMemo(()=>({onKeyDown:B,onMouseDown(){E.current=!0},onMouseUp(){E.current=!0},[T5[d]]:()=>{a.current.insideReactTree=!0}}),[B,d,a]);return v.useMemo(()=>l?{reference:$,floating:F}:{},[l,$,F])}function R5(e){const{open:t=!1,onOpenChange:n,elements:r}=e,s=Vh(),a=v.useRef({}),[l]=v.useState(()=>CN()),c=Ao()!=null,[f,d]=v.useState(r.reference),h=$n((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:d}),[]),b=v.useMemo(()=>({reference:f||r.reference||null,floating:r.floating||null,domReference:r.reference}),[f,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 Ix(e){e===void 0&&(e={});const{nodeId:t}=e,n=R5({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,s=r.elements,[a,l]=v.useState(null),[c,f]=v.useState(null),h=s?.domReference||a,m=v.useRef(null),b=No();mn(()=>{h&&(m.current=h)},[h]);const y=Y_({...e,elements:{...s,...c&&{reference:c}}}),k=v.useCallback(C=>{const _=gt(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),getClientRects:()=>C.getClientRects(),contextElement:C}:C;f(_),y.refs.setReference(_)},[y.refs]),S=v.useCallback(C=>{(gt(C)||C===null)&&(m.current=C,l(C)),(gt(y.refs.reference.current)||y.refs.reference.current===null||C!==null&&!gt(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 mn(()=>{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 Wb(e,t,n){const r=new Map,s=n==="item";let a=e;if(s&&e){const{[UE]:l,[qE]:c,...f}=e;a=f}return{...n==="floating"&&{tabIndex:-1,[a5]:""},...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(f=>{let[d,h]=f;if(!(s&&[UE,qE].includes(d)))if(d.indexOf("on")===0){if(r.has(d)||r.set(d,[]),typeof h=="function"){var m;(m=r.get(d))==null||m.push(h),l[d]=function(){for(var b,y=arguments.length,k=new Array(y),S=0;S<y;S++)k[S]=arguments[S];return(b=r.get(d))==null?void 0:b.map(R=>R(...k)).find(R=>R!==void 0)}}}else l[d]=h}),l),{})}}function jN(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=>Wb(c,e,"reference"),t),a=v.useCallback(c=>Wb(c,e,"floating"),n),l=v.useCallback(c=>Wb(c,e,"item"),r);return v.useMemo(()=>({getReferenceProps:s,getFloatingProps:a,getItemProps:l}),[s,a,l])}const C5="Escape";function Wh(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Bd(e,t){return Wh(t,e===RN||e===Hh,e===ef||e===tf)}function Kb(e,t,n){return Wh(t,e===Hh,n?e===ef:e===tf)||e==="Enter"||e===" "||e===""}function rT(e,t,n){return Wh(t,n?e===ef:e===tf,e===Hh)}function iT(e,t,n,r){const s=n?e===tf:e===ef,a=e===RN;return t==="both"||t==="horizontal"&&r&&r>1?e===C5:Wh(t,s,a)}function zN(e,t){const{open:n,onOpenChange:r,elements:s,floatingId:a}=e,{listRef:l,activeIndex:c,onNavigate:f=()=>{},enabled:d=!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:A=1,scrollItemIntoView:M=!0,virtualItemRef:B,itemSizes:P,dense:N=!1}=t,W=Yp(s.floating),$=er(W),F=Ao(),z=No();mn(()=>{e.dataRef.current.orientation=_},[e,_]);const U=$n(()=>{f(q.current===-1?null:q.current)}),H=Xy(s.domReference),K=v.useRef(R),q=v.useRef(h??-1),Y=v.useRef(null),O=v.useRef(!0),j=v.useRef(U),V=v.useRef(!!s.floating),L=v.useRef(n),X=v.useRef(!1),se=v.useRef(!1),ne=er(C),oe=er(n),le=er(M),ce=er(h),[Ee,be]=v.useState(),[ue,ge]=v.useState(),Se=$n(()=>{function ye(Q){if(S){var re;(re=Q.id)!=null&&re.endsWith("-fui-option")&&(Q.id=a+"-"+Math.random().toString(16).slice(2,10)),be(Q.id),z?.events.emit("virtualfocus",Q),B&&(B.current=Q)}else ea(Q,{sync:X.current,preventScroll:!0})}const _e=l.current[q.current],ee=se.current;_e&&ye(_e),(X.current?Q=>Q():requestAnimationFrame)(()=>{const Q=l.current[q.current]||_e;if(!Q)return;_e||ye(Q);const re=le.current;re&&ke&&(ee||!O.current)&&(Q.scrollIntoView==null||Q.scrollIntoView(typeof re=="boolean"?{block:"nearest",inline:"nearest"}:re))})});mn(()=>{d&&(n&&s.floating?K.current&&h!=null&&(se.current=!0,q.current=h,U()):V.current&&(q.current=-1,j.current()))},[d,n,s.floating,h,U]),mn(()=>{if(d&&n&&s.floating)if(c==null){if(X.current=!1,ce.current!=null)return;if(V.current&&(q.current=-1,Se()),(!L.current||!V.current)&&K.current&&(Y.current!=null||K.current===!0&&Y.current==null)){let ye=0;const _e=()=>{l.current[0]==null?(ye<2&&(ye?requestAnimationFrame:queueMicrotask)(_e),ye++):(q.current=Y.current==null||Kb(Y.current,_,k)||y?Ub(l,ne.current):BE(l,ne.current),Y.current=null,U())};_e()}}else gc(l,c)||(q.current=c,Se(),se.current=!1)},[d,n,s.floating,c,ce,y,l,_,k,U,Se,ne]),mn(()=>{var ye;if(!d||s.floating||!z||S||!V.current)return;const _e=z.nodesRef.current,ee=(ye=_e.find(re=>re.id===F))==null||(ye=ye.context)==null?void 0:ye.elements.floating,fe=po(hr(s.floating)),Q=_e.some(re=>re.context&&xr(re.context.elements.floating,fe));ee&&!Q&&O.current&&ee.focus({preventScroll:!0})},[d,s.floating,z,F,S]),mn(()=>{if(!d||!z||!S||F)return;function ye(_e){ge(_e.id),B&&(B.current=_e)}return z.events.on("virtualfocus",ye),()=>{z.events.off("virtualfocus",ye)}},[d,z,S,F,B]),mn(()=>{j.current=U,L.current=n,V.current=!!s.floating}),mn(()=>{n||(Y.current=null,K.current=R)},[n,R]);const Ae=c!=null,ke=v.useMemo(()=>{function ye(ee){if(!oe.current)return;const fe=l.current.indexOf(ee);fe!==-1&&q.current!==fe&&(q.current=fe,U())}return{onFocus(ee){let{currentTarget:fe}=ee;X.current=!0,ye(fe)},onClick:ee=>{let{currentTarget:fe}=ee;return fe.focus({preventScroll:!0})},onMouseMove(ee){let{currentTarget:fe}=ee;X.current=!0,se.current=!1,T&&ye(fe)},onPointerLeave(ee){let{pointerType:fe}=ee;if(!(!O.current||fe==="touch")&&(X.current=!0,!!T&&(q.current=-1,U(),!S))){var Q;(Q=$.current)==null||Q.focus({preventScroll:!0})}}}},[oe,$,T,l,U,S]),xe=v.useCallback(()=>{var ye;return D??(z==null||(ye=z.nodesRef.current.find(_e=>_e.id===F))==null||(ye=ye.context)==null||(ye=ye.dataRef)==null?void 0:ye.current.orientation)},[F,z,D]),Re=$n(ye=>{if(O.current=!1,X.current=!0,ye.which===229||!oe.current&&ye.currentTarget===$.current)return;if(y&&iT(ye.key,_,k,A)){Bd(ye.key,xe())||ar(ye),r(!1,ye.nativeEvent,"list-navigation"),Ft(s.domReference)&&(S?z?.events.emit("virtualfocus",s.domReference):s.domReference.focus());return}const _e=q.current,ee=Ub(l,C),fe=BE(l,C);if(H||(ye.key==="Home"&&(ar(ye),q.current=ee,U()),ye.key==="End"&&(ar(ye),q.current=fe,U())),A>1){const Q=P||Array.from({length:l.current.length},()=>({width:1,height:1})),re=n5(Q,A,N),we=re.findIndex(Ze=>Ze!=null&&!kp(l,Ze,C)),Pe=re.reduce((Ze,bt,Je)=>bt!=null&&!kp(l,bt,C)?Je:Ze,-1),Ye=re[t5({current:re.map(Ze=>Ze!=null?l.current[Ze]:null)},{event:ye,orientation:_,loop:b,rtl:k,cols:A,disabledIndices:i5([...(typeof C!="function"?C:null)||l.current.map((Ze,bt)=>kp(l,bt,C)?bt:void 0),void 0],re),minIndex:we,maxIndex:Pe,prevIndex:r5(q.current>fe?ee:q.current,Q,re,A,ye.key===Hh?"bl":ye.key===(k?ef:tf)?"tr":"tl"),stopEvent:!0})];if(Ye!=null&&(q.current=Ye,U()),_==="both")return}if(Bd(ye.key,_)){if(ar(ye),n&&!S&&po(ye.currentTarget.ownerDocument)===ye.currentTarget){q.current=Kb(ye.key,_,k)?ee:fe,U();return}Kb(ye.key,_,k)?b?q.current=_e>=fe?m&&_e!==l.current.length?-1:ee:dr(l,{startingIndex:_e,disabledIndices:C}):q.current=Math.min(fe,dr(l,{startingIndex:_e,disabledIndices:C})):b?q.current=_e<=ee?m&&_e!==-1?l.current.length:fe:dr(l,{startingIndex:_e,decrement:!0,disabledIndices:C}):q.current=Math.max(ee,dr(l,{startingIndex:_e,decrement:!0,disabledIndices:C})),gc(l,q.current)&&(q.current=-1),U()}}),Me=v.useMemo(()=>S&&n&&Ae&&{"aria-activedescendant":ue||Ee},[S,n,Ae,ue,Ee]),ze=v.useMemo(()=>({"aria-orientation":_==="both"?void 0:_,...H?{}:Me,onKeyDown:Re,onPointerMove(){O.current=!0}}),[Me,Re,_,H]),Fe=v.useMemo(()=>{function ye(ee){R==="auto"&&vN(ee.nativeEvent)&&(K.current=!0)}function _e(ee){K.current=R,R==="auto"&&xN(ee.nativeEvent)&&(K.current=!0)}return{...Me,onKeyDown(ee){O.current=!1;const fe=ee.key.startsWith("Arrow"),Q=["Home","End"].includes(ee.key),re=fe||Q,we=rT(ee.key,_,k),Pe=iT(ee.key,_,k,A),Ye=rT(ee.key,xe(),k),Ze=Bd(ee.key,_),bt=(y?Ye:Ze)||ee.key==="Enter"||ee.key.trim()==="";if(S&&n){const nt=z?.nodesRef.current.find(ct=>ct.parentId==null),rt=z&&nt?KB(z.nodesRef.current,nt.id):null;if(re&&rt&&B){const ct=new KeyboardEvent("keydown",{key:ee.key,bubbles:!0});if(we||Pe){var Je,xt;const it=((Je=rt.context)==null?void 0:Je.elements.domReference)===ee.currentTarget,ft=Pe&&!it?(xt=rt.context)==null?void 0:xt.elements.domReference:we?l.current.find(Lt=>Lt?.id===Ee):null;ft&&(ar(ee),ft.dispatchEvent(ct),ge(void 0))}if((Ze||Q)&&rt.context&&rt.context.open&&rt.parentId&&ee.currentTarget!==rt.context.elements.domReference){var St;ar(ee),(St=rt.context.elements.domReference)==null||St.dispatchEvent(ct);return}}return Re(ee)}if(!(!n&&!E&&fe)){if(bt){const nt=Bd(ee.key,xe());Y.current=y&&nt?null:ee.key}if(y){Ye&&(ar(ee),n?(q.current=Ub(l,ne.current),U()):r(!0,ee.nativeEvent,"list-navigation"));return}Ze&&(h!=null&&(q.current=h),ar(ee),!n&&E?r(!0,ee.nativeEvent,"list-navigation"):Re(ee),n&&U())}},onFocus(){n&&!S&&(q.current=-1,U())},onPointerDown:_e,onPointerEnter:_e,onMouseDown:ye,onClick:ye}},[Ee,Me,A,Re,ne,R,l,y,U,r,n,E,_,xe,k,h,z,S,B]);return v.useMemo(()=>d?{reference:Fe,floating:ze,item:ke}:{},[d,Fe,ze,ke])}const _5=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function PN(e,t){var n,r;t===void 0&&(t={});const{open:s,elements:a,floatingId:l}=e,{enabled:c=!0,role:f="dialog"}=t,d=Vh(),h=((n=a.domReference)==null?void 0:n.id)||d,m=v.useMemo(()=>{var E;return((E=Yp(a.floating))==null?void 0:E.id)||l},[a.floating,l]),b=(r=_5.get(f))!=null?r:f,k=Ao()!=null,S=v.useMemo(()=>b==="tooltip"||f==="label"?{["aria-"+(f==="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"},...f==="select"&&{"aria-autocomplete":"none"},...f==="combobox"&&{"aria-autocomplete":"list"}},[b,m,k,s,h,f]),R=v.useMemo(()=>{const E={id:m,...b&&{role:b}};return b==="tooltip"||f==="label"?E:{...E,...b==="menu"&&{"aria-labelledby":h}}},[b,m,h,f]),T=v.useCallback(E=>{let{active:C,selected:_}=E;const D={role:"option",...C&&{id:m+"-fui-option"}};switch(f){case"select":case"combobox":return{...D,"aria-selected":_}}return{}},[m,f]);return v.useMemo(()=>c?{reference:S,floating:R,item:T}:{},[c,S,R,T])}const sT=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function ol(e,t){return typeof e=="function"?e(t):e}function A5(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 N5(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,f]=v.useState("unmounted"),d=A5(n,l);return!d&&c==="close"&&f("unmounted"),mn(()=>{if(r){if(n){f("initial");const h=requestAnimationFrame(()=>{Mi.flushSync(()=>{f("open")})});return()=>{cancelAnimationFrame(h)}}f("close")}},[n,r]),{isMounted:d,status:c}}function $N(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:s,common:a,duration:l=250}=t,c=e.placement,f=c.split("-")[0],d=v.useMemo(()=>({side:f,placement:c}),[f,c]),h=typeof l=="number",m=(h?l:l.open)||0,b=(h?l:l.close)||0,[y,k]=v.useState(()=>({...ol(a,d),...ol(n,d)})),{isMounted:S,status:R}=N5(e,{duration:l}),T=er(n),E=er(r),C=er(s),_=er(a);return mn(()=>{const D=ol(T.current,d),A=ol(C.current,d),M=ol(_.current,d),B=ol(E.current,d)||Object.keys(D).reduce((P,N)=>(P[N]="",P),{});if(R==="initial"&&k(P=>({transitionProperty:P.transitionProperty,...M,...D})),R==="open"&&k({transitionProperty:Object.keys(B).map(sT).join(","),transitionDuration:m+"ms",...M,...B}),R==="close"){const P=A||D;k({transitionProperty:Object.keys(P).map(sT).join(","),transitionDuration:b+"ms",...M,...P})}},[b,C,T,E,_,m,R,d]),{isMounted:S,styles:y}}function BN(e,t){var n;const{open:r,dataRef:s}=e,{listRef:a,activeIndex:l,onMatch:c,onTypingChange:f,enabled:d=!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=$n(c),C=$n(f),_=er(h),D=er(b);mn(()=>{r&&(fr(k),T.current=null,S.current="")},[r]),mn(()=>{if(r&&S.current===""){var N;R.current=(N=y??l)!=null?N:-1}},[r,y,l]);const A=$n(N=>{N?s.current.typing||(s.current.typing=N,C(N)):s.current.typing&&(s.current.typing=N,C(N))}),M=$n(N=>{function W(H,K,q){const Y=_.current?_.current(K,q):K.find(O=>O?.toLocaleLowerCase().indexOf(q.toLocaleLowerCase())===0);return Y?H.indexOf(Y):-1}const $=a.current;if(S.current.length>0&&S.current[0]!==" "&&(W($,$,S.current)===-1?A(!1):N.key===" "&&ar(N)),$==null||D.current.includes(N.key)||N.key.length!==1||N.ctrlKey||N.metaKey||N.altKey)return;r&&N.key!==" "&&(ar(N),A(!0)),$.every(H=>{var K,q;return H?((K=H[0])==null?void 0:K.toLocaleLowerCase())!==((q=H[1])==null?void 0:q.toLocaleLowerCase()):!0})&&S.current===N.key&&(S.current="",R.current=T.current),S.current+=N.key,fr(k),k.current=window.setTimeout(()=>{S.current="",R.current=T.current,A(!1)},m);const z=R.current,U=W($,[...$.slice((z||0)+1),...$.slice(0,(z||0)+1)],S.current);U!==-1?(E(U),T.current=U):N.key!==" "&&(S.current="",A(!1))}),B=v.useMemo(()=>({onKeyDown:M}),[M]),P=v.useMemo(()=>({onKeyDown:M,onKeyUp(N){N.key===" "&&A(!1)}}),[M,A]);return v.useMemo(()=>d?{reference:B,floating:P}:{},[d,B,P])}function FN(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,...FN(e,s.id,n)])}function oT(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[f,d]=t[l]||[0,0],[h,m]=t[c]||[0,0];d>=r!=m>=r&&n<=(h-f)*(r-d)/(m-d)+f&&(s=!s)}return s}function O5(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function UN(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,f=typeof performance<"u"?performance.now():0;function d(m,b){const y=performance.now(),k=y-f;if(l===null||c===null||k===0)return l=m,c=b,f=y,null;const S=m-l,R=b-c,E=Math.sqrt(S*S+R*R)/k;return l=m,c=b,f=y,E}const h=m=>{let{x:b,y,placement:k,elements:S,onClose:R,nodeId:T,tree:E}=m;return function(_){function D(){fr(s),R()}if(fr(s),!S.domReference||!S.floating||k==null||b==null||y==null)return;const{clientX:A,clientY:M}=_,B=[A,M],P=p5(_),N=_.type==="mouseleave",W=Vb(S.floating,P),$=Vb(S.domReference,P),F=S.domReference.getBoundingClientRect(),z=S.floating.getBoundingClientRect(),U=k.split("-")[0],H=b>z.right-z.width/2,K=y>z.bottom-z.height/2,q=O5(B,F),Y=z.width>F.width,O=z.height>F.height,j=(Y?F:z).left,V=(Y?F:z).right,L=(O?F:z).top,X=(O?F:z).bottom;if(W&&(a=!0,!N))return;if($&&(a=!1),$&&!N){a=!0;return}if(N&>(_.relatedTarget)&&Vb(S.floating,_.relatedTarget)||E&&FN(E.nodesRef.current,T).length)return;if(U==="top"&&y>=F.bottom-1||U==="bottom"&&y<=F.top+1||U==="left"&&b>=F.right-1||U==="right"&&b<=F.left+1)return D();let se=[];switch(U){case"top":se=[[j,F.top+1],[j,z.bottom-1],[V,z.bottom-1],[V,F.top+1]];break;case"bottom":se=[[j,z.top+1],[j,F.bottom-1],[V,F.bottom-1],[V,z.top+1]];break;case"left":se=[[z.right-1,X],[z.right-1,L],[F.left+1,L],[F.left+1,X]];break;case"right":se=[[F.right-1,X],[F.right-1,L],[z.left+1,L],[z.left+1,X]];break}function ne(oe){let[le,ce]=oe;switch(U){case"top":{const Ee=[Y?le+t/2:H?le+t*4:le-t*4,ce+t+1],be=[Y?le-t/2:H?le+t*4:le-t*4,ce+t+1],ue=[[z.left,H||Y?z.bottom-t:z.top],[z.right,H?Y?z.bottom-t:z.top:z.bottom-t]];return[Ee,be,...ue]}case"bottom":{const Ee=[Y?le+t/2:H?le+t*4:le-t*4,ce-t],be=[Y?le-t/2:H?le+t*4:le-t*4,ce-t],ue=[[z.left,H||Y?z.top+t:z.bottom],[z.right,H?Y?z.top+t:z.bottom:z.top+t]];return[Ee,be,...ue]}case"left":{const Ee=[le+t+1,O?ce+t/2:K?ce+t*4:ce-t*4],be=[le+t+1,O?ce-t/2:K?ce+t*4:ce-t*4];return[...[[K||O?z.right-t:z.left,z.top],[K?O?z.right-t:z.left:z.right-t,z.bottom]],Ee,be]}case"right":{const Ee=[le-t,O?ce+t/2:K?ce+t*4:ce-t*4],be=[le-t,O?ce-t/2:K?ce+t*4:ce-t*4],ue=[[K||O?z.left+t:z.right,z.top],[K?O?z.left+t:z.right:z.left+t,z.bottom]];return[Ee,be,...ue]}}}if(!oT([A,M],se)){if(a&&!q)return D();if(!N&&r){const oe=d(_.clientX,_.clientY);if(oe!==null&&oe<.1)return D()}oT([A,M],ne([b,y]))?!a&&r&&(s.current=window.setTimeout(D,40)):D()}}};return h.__options={blockPointerEvents:n},h}function qN(e){return bn(e.defaultTagName??"div",e,e)}const I5=v.createContext(void 0);function M5(){return v.useContext(I5)}const Yb={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 D5(e){return[Yb.base,e==="green"?Yb.colorGreen:Yb.colorBlue]}function L5({color:e="blue",className:t}){const n=Yt({rootClass:"ui-indicator-dot",stylexStyles:D5(e),className:t});return g.jsx("span",{"aria-hidden":!0,className:n.className,"data-color":e,style:n.style})}const j5={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",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}},Fd={sm:{kzqmXN:"ui-16bvwqk",$$css:!0},md:{kzqmXN:"ui-1eu7oa3",$$css:!0},lg:{kzqmXN:"ui-jst10v",$$css:!0},xl:{kzqmXN:"ui-mjrt60",$$css:!0}},z5={rounded:{kaIpWk:"ui-1i4c3av",$$css:!0}},P5={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}},Ud={root:[j5.root,PA.root],size:{sm:[Hi.sm,ws.sm,Fd.sm],md:[Hi.md,ws.md,Fd.md],lg:[Hi.lg,ws.lg,Fd.lg],xl:[Hi.xl,ws.xl,Fd.xl]},contentFrame:P5,rounded:z5.rounded},$5="md",B5="ghost",F5={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 HN(e){if(e!==void 0&&mx(e))return zt(F5.root,_A(e));const t={className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1oai4fc ui-higkf7 ui-1tachi3 ui-o5v014"};return e===void 0?t:{...t,style:{...t.style,"--icon-size":typeof e=="number"?`${e}px`:e}}}function U5({variant:e,rounded:t,frame:n,size:r,tone:s,indicatorDot:a}){return{"data-variant":e,"data-rounded":t||void 0,"data-frame":n,"data-size":r,"data-tone":s,"data-fg-channel":"icon","data-indicator-dot":a||void 0}}function VN({enforcedRootStyle:e,frame:t,indicatorDot:n,rootStyle:r,rounded:s,size:a,tone:l,variant:c}){const f=bx(c,l);return{dataAttrs:U5({frame:t,indicatorDot:n,rounded:s,size:a,tone:l,variant:c}),rootAttrs:zt(Ud.root,Ci.appearance,f.applyControlTone&&yx.foreground,f.applyControlTone&&l!==void 0&&IA[l],c==="ghost"&&(l==="secondary"||l==="tertiary")&&c6[l],f.applyFilledColors&&Ci.colors,f.applyNonFilledBackground&&la.background,(c==="outline"||c==="ghost")&&qp(l)&&MA[l],c==="outline"&&la.outline,c==="outline"&&qp(l)&&DA[l],c==="media"&&Ci.media,Ci.press,a!=="xs"&&Ud.size[a],s&&Ud.rounded,t==="content"&&a!=="xs"&&Ud.contentFrame[a],e,r)}}function GN({size:e,iconSize:t,disabled:n,variant:r,tone:s,enforced:a}){const l=e??a?.iconButtonSize??$5,c=r??a?.iconButtonVariant??B5,f=l==="xs"?void 0:LA[l];return{size:l,innerIconSize:t??a?.iconButtonIconSize??f,disabled:n??a?.disabled,variant:c,tone:NA(s??a?.iconButtonTone??(c==="primary"?OA:void 0))}}function br({icon:e,iconVariant:t="outline",variant:n,rounded:r,frame:s="container",size:a,iconSize:l,tone:c,className:f,style:d,rootStyle:h,iconStyle:m,disabled:b,indicatorDot:y=!1,indicatorDotColor:k="blue","aria-label":S,"aria-labelledby":R,...T}){const E=ya(),{size:C,innerIconSize:_,disabled:D,variant:A,tone:M}=GN({disabled:b,enforced:E,iconSize:l,size:a,tone:c,variant:n}),B=VN({enforcedRootStyle:E?.iconButtonRootStyle,frame:s,indicatorDot:y,rootStyle:h,rounded:r,size:C,tone:M,variant:A});return g.jsxs(gx,{...T,className:sn("ui-icon-button",B.rootAttrs.className,f),style:{...B.rootAttrs.style,...d},...B.dataAttrs,disabled:D,"aria-label":S,"aria-labelledby":R,children:[typeof e=="string"?g.jsx(qt,{name:e,rootStyle:[E?.iconButtonIconStyle,m],variant:t,size:_,"aria-hidden":"true"}):g.jsx("span",{...HN(_),"aria-hidden":"true",children:e}),y?g.jsx(L5,{color:k}):null]})}function q5(){return typeof navigator<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)}function Mx(e){if(!(q5()?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 qd={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 H5({className:e,disabled:t=!1,mono:n=!1,ref:r,rootStyle:s,style:a,onKeyDown:l,...c}){const f=Yt({rootClass:"ui-input-group__input",stylexStyles:[qd.base,t?qd.disabled:null,n?qd.mono:null,n?qd.monoInput:null,s],className:e,style:a}),d=v.useCallback(h=>{l?.(h),!h.defaultPrevented&&Mx(h)},[l]);return g.jsx("input",{ref:r,className:f.className,style:f.style,disabled:t,onKeyDown:d,...c})}const Er={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","--ui-input-group-stroke-rest":"ui-ja7v4d",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kB7OPa:"ui-9f619",kzqmXN:"ui-h8yej3",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-or0oem ui-9afaxg ui-4vz0kq",ke9TFa:"ui-1lun4ml",k8ry5P:"ui-18b5jzi",kBCPoo:"ui-2an0dy ui-jsivns ui-1n6ytmu",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-snjbj6 ui-illscj ui-1rfq9xa",k2ei4v:"ui-pilrb4",kVhnKS:"ui-1t7ytsu",kGJrpR:"ui-iui3t5 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:{"--ui-input-group-stroke-rest":"ui-l27skc",$$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}},Zo={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},autoSizeContent:{kOwNse:"ui-i3vqlg",kAzted:"ui-10fesj9 ui-1mcog50",kORKVm:"ui-10wlt62 ui-n0h0yx",$$css:!0},autoSizeContentMaxRows:{kskxy:"ui-17r4vdi",$$css:!0},autoSizeRows:(e,t)=>[{"--ui-input-group-textarea-min-rows":String(e)!=null?"ui-so4lmt":String(e),"--ui-input-group-textarea-max-rows":String(t)!=null?"ui-1554sew":String(t),$$css:!0},{"--x---ui-input-group-textarea-min-rows":String(e)!=null?String(e):void 0,"--x---ui-input-group-textarea-max-rows":String(t)!=null?String(t):void 0}],collapseBlur:{kskxy:"ui-1kxtfma ui-5u5ifr",kORKVm:"ui-10wlt62",$$css:!0}},Ml={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}},aT={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}},V5={md:Er.sizeMd,lg:Er.sizeLg,xl:Er.sizeXl},G5={md:Er.layoutTextareaMd,lg:Er.layoutTextareaLg,xl:null},W5={container:null,content:Er.frameContent},K5={default:Er.variantDefault,elevated:Er.variantElevated,ghost:Er.variantGhost,unfilled:Er.variantUnfilled},Y5={rounded:null,pill:Er.shapePill},WN=v.createContext(null);function ka(e){const t=v.useContext(WN);if(!t)throw new Error(`${e} must be used within InputGroup.Root`);return t}function X5(){return ka("InputGroup.useContext")}const Z5={md:"sm",lg:"base",xl:"lg"},Q5={md:"sm",lg:"sm",xl:"sm"},J5={md:"sm",lg:"sm",xl:"md"};function e9(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("field-sizing","content")}function lT({variant:e="default",frame:t="container",size:n="lg",shape:r="rounded",layout:s="default",mono:a=!1,disabled:l=!1,rootStyle:c,className:f,children:d}){const h=M5(),m=l||h?.disabled===!0,b=Yt({rootClass:"ui-input-group",stylexStyles:[Er.base,V5[n],s==="textarea"?Er.layoutTextarea:null,s==="textarea"?G5[n]:null,W5[t],K5[e],e==="unfilled"?Er.variantUnfilledSize:null,Y5[r],m?Er.disabled:null,c],className:f});return g.jsx(WN.Provider,{value:{disabled:m,layout:s,mono:a},children:g.jsx(Is,{iconSize:Z5[n],iconButtonSize:Q5[n],buttonSize:J5[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:d})})})}function t9({className:e,disabled:t,ref:n,rootStyle:r,style:s,...a}){const l=ka("InputGroup.Input"),c=l.disabled||t===!0;return g.jsx(TB,{...a,className:e,disabled:c,ref:n,render:g.jsx(H5,{mono:l.mono,rootStyle:r}),style:s})}function n9({className:e,disabled:t,ref:n,rootStyle:r,style:s,onKeyDown:a,onInput:l,onFocus:c,onBlur:f,minRows:d=1,maxRows:h,autoResize:m=!0,collapseToSingleLineWhenBlurred:b=!1,rows:y,value:k,placeholder:S,focusedPlaceholder:R,...T}){const E=ka("InputGroup.Textarea"),C=E.disabled||t===!0,_=d<1?1:d,D=h===void 0?void 0:h<_?_:h,A=m&&!b,M=Math.min(Math.max(y??_,_),D??Number.POSITIVE_INFINITY),B=Yt({rootClass:"ui-input-group__textarea",stylexStyles:[Zo.field,C?Zo.disabled:null,E.mono?Zo.mono:null,b?Zo.collapseBlur:null,A?Zo.autoSizeContent:null,A&&D!==void 0?Zo.autoSizeContentMaxRows:null,A?Zo.autoSizeRows(M,D??M):null,r],className:e,style:s}),P=v.useRef(null),N=Jc([P,n]),[W,$]=v.useState(!1),F=v.useCallback(()=>{if(!m)return;const O=P.current;if(!O||A&&O.style.height===""&&e9())return;if(D===_&&(y===void 0||y===_)){O.style.height="",O.style.overflowY="auto";return}O.style.height="auto";const j=window.getComputedStyle(O),V=Number.parseFloat(j.lineHeight),L=Number.parseFloat(j.paddingTop)||0,X=Number.parseFloat(j.paddingBottom)||0,se=Number.parseFloat(j.borderTopWidth)||0,ne=Number.parseFloat(j.borderBottomWidth)||0,oe=L+X+se+ne,le=Number.isFinite(V)&&V>0?oe+V*_:0,ce=D!==void 0&&Number.isFinite(V)&&V>0?oe+V*D:void 0,Ee=Math.max(O.scrollHeight,le),be=ce!==void 0?Math.min(Ee,ce):Ee;O.style.height=`${be}px`,O.style.overflowY=ce!==void 0&&O.scrollHeight>ce?"auto":"hidden"},[m,D,_,y,A]);v.useLayoutEffect(()=>{F()},[k,F]);const z=v.useCallback(O=>{a?.(O),!O.defaultPrevented&&Mx(O)},[a]),U=v.useCallback(O=>{l?.(O),O.defaultPrevented||F()},[l,F]),H=v.useCallback(O=>{$(!0),c?.(O)},[c]),K=v.useCallback(O=>{$(!1),f?.(O)},[f]),q=y??_,Y=W&&R!==void 0?R:S;return g.jsx("textarea",{ref:N,className:B.className,style:B.style,disabled:C,onKeyDown:z,rows:q,value:k,placeholder:Y,...T,"data-textarea-collapse-blur":b?"":void 0,onInput:U,onFocus:H,onBlur:K})}function r9({addonStyle:e,className:t,ref:n,...r}){const s=ka("InputGroup.Icon"),a=Yt({rootClass:"ui-input-group__addon",stylexStyles:[Ml.base,s.layout==="textarea"?Ml.textareaLayout:null,e],className:t});return g.jsx("span",{className:a.className,style:a.style,children:g.jsx(qt,{ref:n,...r})})}function i9({addonStyle:e,className:t,disabled:n,ref:r,...s}){const a=ka("InputGroup.IconButton"),l=a.disabled?!0:n,c=Yt({rootClass:"ui-input-group__addon",stylexStyles:[Ml.base,a.layout==="textarea"?Ml.textareaLayout:null,e],className:t});return g.jsx("span",{className:c.className,style:c.style,children:g.jsx(br,{ref:r,disabled:l,...s})})}function s9({addonStyle:e,className:t,disabled:n,ref:r,...s}){const a=ka("InputGroup.Button"),l=a.disabled?!0:n,c=Yt({rootClass:"ui-input-group__addon",stylexStyles:[Ml.base,a.layout==="textarea"?Ml.textareaLayout:null,e],className:t});return g.jsx("span",{className:c.className,style:c.style,children:g.jsx(vn,{ref:r,disabled:l,...s})})}function o9({className:e,children:t}){const n=ka("InputGroup.Span"),r=Yt({rootClass:"ui-input-group__span",stylexStyles:[aT.base,n.mono?aT.mono:null],className:e});return g.jsx("span",{className:r.className,style:r.style,children:t})}const Hd=Object.assign(lT,{Root:lT,Input:t9,Textarea:n9,Icon:r9,IconButton:i9,Button:s9,Span:o9,useContext:X5}),a9=v.createContext(void 0);function l9(e){return v.useContext(a9)}function KN(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=d_(),{ref:s,index:a}=eN(e),l=n===a,c=v.useRef(null),f=xo(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:f,index:a}}function u9(e){const{render:t,className:n,style:r,state:s=Bn,props:a=ko,refs:l=ko,metadata:c,stateAttributesMapping:f,tag:d="div",...h}=e,{compositeProps:m,compositeRef:b}=KN({metadata:c});return bn(d,e,{state:s,ref:[...l,b],props:[m,...a,h],stateAttributesMapping:f})}function c9(e){const[t,n]=v.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}function uT(e){const t=Tr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Ft(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:r;return(_l(n)!==a||_l(r)!==l)&&(n=a,r=l),{width:n,height:r}}function YN(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const XN=v.createContext(void 0);function nf(e){const t=v.useContext(XN);if(t===void 0&&!e)throw new Error(In(50));return t}const f9=600,ZN=300,d9={...hA,instantType:tt(e=>e.instantType),hasViewport:tt(e=>e.hasViewport)};class Kh extends cx{constructor(t,n,r=!1){const s=new Ah,a={...p9(),...t};a.floatingRootContext=dA(s,n,r),super(a,{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:s,closeDelayRef:{current:ZN},inlineRectCoordsRef:{current:void 0}},d9)}setOpen=(t,n)=>{const{inlineRectCoordsRef:r}=this.context;sA(this,t,n,{onBeforeDispatch(){const s=n.event;t&&n.reason===Sr&&n.trigger&&"clientX"in s&&"clientY"in s&&r.current?.element!==n.trigger&&Q_(r,n.trigger,s.clientX,s.clientY)}})};static useStore(t,n){return iA(t,(s,a)=>new Kh(n,s,a)).store}}function p9(){return{...fA(),instantType:void 0,hasViewport:!1}}function cT(e){const{open:t,defaultOpen:n=!1,onOpenChange:r,onOpenChangeComplete:s,actionsRef:a,handle:l,triggerId:c,defaultTriggerId:f=null,children:d}=e,h=Kh.useStore(l?.store,{open:n,openProp:t,activeTriggerId:f,triggerIdProp:c});oA(h,t,n,f),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");lA(h,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:S}=uA(m,h,()=>{h.context.inlineRectCoordsRef.current=void 0});Ve(()=>{m&&b==null&&h.set("payload",void 0)},[h,b,m]);const R=v.useCallback(()=>{h.setOpen(!1,Rt(_p))},[h]);v.useImperativeHandle(a,()=>({unmount:S,close:R}),[S,R]);const T=m||y;return g.jsxs(XN.Provider,{value:h,children:[T&&g.jsx(h9,{store:h}),typeof d=="function"?d({payload:k}):d]})}function h9({store:e}){const t=e.useState("floatingRootContext"),n=nx(t),r=n.reference??Bn,s=n.trigger??Bn,a=v.useMemo(()=>Gi(fx,n.floating),[n.floating]);return cA(e,{activeTriggerProps:r,inactiveTriggerProps:s,popupProps:a}),null}const QN=ux(function(t){return nf(!0)?g.jsx(cT,{...t}):g.jsx(NP,{children:g.jsx(cT,{...t})})}),JN=v.createContext(void 0);function m9(){const e=v.useContext(JN);if(e===void 0)throw new Error(In(48));return e}const eO=v.forwardRef(function(t,n){const{children:r,container:s,className:a,render:l,style:c,...f}=t,{portalNode:d,portalSubtree:h}=z_({container:s,ref:n,componentProps:t,elementProps:f});return!h&&!d?null:g.jsxs(v.Fragment,{children:[h,d&&Mi.createPortal(r,d)]})}),tO=v.forwardRef(function(t,n){const{keepMounted:r=!1,...s}=t;return nf().useState("mounted")||r?g.jsx(JN.Provider,{value:r,children:g.jsx(eO,{ref:n,...s})}):null}),nO=tA(function(t,n){const{render:r,className:s,delay:a,closeDelay:l,id:c,payload:f,handle:d,style:h,...m}=t,b=nf(!0),y=d?.store??b;if(!y)throw new Error(In(89));const k=Fl(c),S=y.useState("isTriggerActive",k),R=y.useState("isOpenedByTrigger",k),T=y.useState("floatingRootContext"),E=y.context.inlineRectCoordsRef,C=v.useRef(null),_=a??f9,D=l??ZN,{registerTrigger:A,isMountedByThisTrigger:M}=aA(k,C,y,{payload:f});Ve(()=>{M&&(y.context.closeDelayRef.current=D)},[y,M,D]);const B=vA(T,{mouseOnly:!0,move:!1,handleClose:xA(),delay:()=>({open:_,close:D}),triggerElementRef:C,isActiveTrigger:S,isClosing:()=>y.select("transitionStatus")==="ending"}),P=gA(T,{delay:_}),N={open:R},W=y.useState("triggerProps",M),$=T$(E,R);return bn("a",t,{state:N,ref:[n,A,C],props:[B,P.reference,W,$,{id:k},m],stateAttributesMapping:u_})}),rO=v.createContext(void 0);function g9(){const e=v.useContext(rO);if(e===void 0)throw new Error(In(49));return e}const iO=v.forwardRef(function(t,n){const{render:r,className:s,anchor:a,positionMethod:l="absolute",side:c="bottom",align:f="center",sideOffset:d=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:b=5,arrowPadding:y=5,sticky:k=!1,disableAnchorTracking:S=!1,collisionAvoidance:R=D_,style:T,...E}=t,C=nf(),_=m9(),D=_P(),A=C.useState("open"),M=C.useState("mounted"),B=C.useState("floatingRootContext"),P=C.useState("instantType"),N=C.useState("transitionStatus"),W=C.useState("hasViewport"),$=C.context.inlineRectCoordsRef,F=Ex({anchor:a,floatingRootContext:B,positionMethod:l,mounted:M,side:c,sideOffset:d,align:f,alignOffset:h,arrowPadding:y,collisionBoundary:m,collisionPadding:b,sticky:k,disableAnchorTracking:S,keepMounted:_,nodeId:D,collisionAvoidance:R,adaptiveOrigin:W?ZA:void 0,inline:R$($)}),z=F.update;Ve(()=>{A&&M&&z()},[A,M,z]);const U={open:A,side:F.side,align:F.align,anchorHidden:F.anchorHidden,instant:P},H=Tx(t,U,{styles:F.positionerStyles,transitionStatus:N,props:E,refs:[n,C.useStateSetter("positionerElement")],hidden:!M,inert:!A});return g.jsx(rO.Provider,{value:F,children:g.jsx(AP,{id:D,children:H})})}),b9={...Wc,...To},sO=v.forwardRef(function(t,n){const{className:r,render:s,style:a,...l}=t,c=nf(),{side:f,align:d}=g9(),h=c.useState("open"),m=c.useState("instantType"),b=c.useState("transitionStatus"),y=c.useState("popupProps"),k=c.useState("floatingRootContext");_o({open:h,ref:c.context.popupRef,onComplete(){h&&c.context.onOpenChangeComplete?.(!0)}});const S=Ke(()=>c.context.closeDelayRef.current);return yA(k,{closeDelay:S}),bn("div",t,{state:{open:h,side:f,align:d,instant:m,transitionStatus:b},ref:[n,c.context.popupRef,c.useStateSetter("popupElement")],props:[y,Lh(b),l],stateAttributesMapping:b9})});class y9{constructor(){this.store=new Kh}open(t){const n=t?this.store.context.triggerElements.getById(t):void 0;if(t&&!n)throw new Error(In(88,t));this.store.setOpen(!0,Rt(_p,void 0,n))}close(){this.store.setOpen(!1,Rt(_p,void 0,void 0))}get isOpen(){return this.store.select("open")}}function v9(){return new y9}function Dl(e,t,n,r){const[s,a]=v.useState(t),l=v.useRef(n),c=v.useRef(s),f=e!==void 0,d=v.useRef(f);v.useLayoutEffect(()=>{l.current=n},[n]),v.useEffect(()=>{c.current!==s&&l.current?.(s),c.current=s},[s]),v.useEffect(()=>{d.current,d.current=f},[r,f]);const h=f?e:s,m=v.useCallback(b=>{if(!f){a(b);return}const y=typeof b=="function"?b(e):b;y!==e&&l.current?.(y)},[e,f]);return[h,m]}const oO="never",aO=250,Xb={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)}]},x9={base:{kB7OPa:"ui-9f619",$$css:!0}};function k9({ariaLabel:e,close:t,content:n,contentStyle:r,isOpen:s,maxHeight:a,maxWidth:l,offset:c,placement:f,sameAxisOnly:d,scrollbarVisibility:h,surfaceClassName:m,surfaceStyle:b,width:y}){const{portalLayerStyles:k}=ql("tooltip",!0),{side:S,align:R,sideOffset:T,alignOffset:E,collisionAvoidance:C,positionMethod:_}=Fh(f??$h,c,d),D=zh(rN),A=zt(Rx,Xb.base,jh,Xb.width(y),l!==void 0&&Xb.maxWidth(l),b),M=zt(iN,x9.base,r);return g.jsx(iO,{align:R,alignOffset:E,className:D.className,collisionAvoidance:C,collisionPadding:8,positionMethod:_,side:S,sideOffset:T,style:{...D.style,...k},children:g.jsx(sO,{"aria-label":e,className:sn("ui-preview-card",m,A.className),"data-block-global-shortcuts":s?"Escape":void 0,role:"dialog",style:A.style,children:g.jsx(Nl,{maxHeight:a,scrollbarVisibility:h,children:g.jsx("div",{className:sn("ui-preview-card__content",M.className),style:M.style,children:typeof n=="function"?n(t):n})})})})}function lO({children:e,content:t,placement:n=$h,sameAxisOnly:r=!1,offset:s=8,openDelay:a=aO,closeDelay:l=Bh,disabled:c=!1,maxHeight:f=300,maxWidth:d,scrollbarVisibility:h=oO,width:m=280,className:b,surfaceStyle:y,contentStyle:k,"aria-label":S,ref:R,defaultOpen:T=!1,open:E,onOpenChange:C,onOpenChangeComplete:_,...D}){const A=v.useRef(null),[M,B]=Dl(E,T,void 0,"PreviewCard"),P=v.Children.only(e),N=v.isValidElement(P),W=v.useCallback(H=>{H!==null&&(A.current?.close(),E===void 0&&A.current?.unmount())},[E]),$=qN({defaultTagName:"span",props:D,ref:[R,W],render:N?P:void 0}),F=va(),z=v.useCallback((H,K)=>{if(c){H&&K.cancel();return}if(K.reason==="outside-press"||K.reason==="trigger-press"){K.cancel();return}C?.(H,K),K.isCanceled||B(H)},[c,C,B]),U=v.useCallback(()=>A.current?.close(),[]);return N?g.jsxs(QN,{actionsRef:A,defaultOpen:T,onOpenChange:z,onOpenChangeComplete:_,open:E,children:[c?$:g.jsx(nO,{...D,closeDelay:l,delay:a,ref:R,render:P}),c?null:g.jsx(tO,{container:F??void 0,children:g.jsx(k9,{ariaLabel:S,close:U,content:t,contentStyle:k,isOpen:M,maxHeight:f,maxWidth:d,offset:s,placement:n,sameAxisOnly:r,scrollbarVisibility:h,surfaceClassName:b,surfaceStyle:y,width:m})})]}):g.jsx(g.Fragment,{children:e})}function fT(e){const t=v.useRef(e);return v.useLayoutEffect(()=>{t.current=e},[e]),t}function uO(e,t){const n=fT(e),r=fT(t);return v.useCallback(s=>{if(s==null)return;const{ownerDocument:a}=s,l=c=>{const f=c.target,d=a.defaultView?.Element;if(d===void 0||!(f instanceof d))return;const h=r.current;if(h==null)return;const m=a.getElementById(h);m!=null&&f.contains(m)&&n.current.close()};return a.addEventListener("scroll",l,{capture:!0,passive:!0}),()=>{a.removeEventListener("scroll",l,!0)}},[n,r])}const Zp=v.createContext(!1);function cO({children:e,dismiss:t}){const n=v.use(Zp);return g.jsx(Zp.Provider,{value:n||t,children:e})}const fO=v.createContext(null),dO=v.createContext(null),pO=v.createContext(null);function hO(e){const t=v.use(fO);if(t===null)throw new Error(`${e} must be used within PreviewCardLayer`);return t}function S9(){const e=v.use(dO);if(e===null)throw new Error("PreviewCardLayer.Popup must be inside an open PreviewCardLayer");return e}function w9(){const e=v.use(pO);if(e===null)throw new Error("PreviewCardLayer.Popup must be inside an open PreviewCardLayer");return e}function E9({children:e}){const t=Cx();return Ix({nodeId:t,open:!0}),g.jsx(_x,{id:t,children:e})}function _c({children:e,placement:t=$h,offset:n=8,sameAxisOnly:r=!1,openDelay:s=aO,closeDelay:a=Bh,controlledTargetId:l}){const c=v.useMemo(()=>v9(),[]),f=v.useRef(null),d=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.useRef(null),T=v.use(Zp),E=Fh(t,n,r);v.useLayoutEffect(()=>{k||R.current?.unmount()},[k]);const C=v.useCallback(P=>{f.current===P&&(f.current=null,c.close())},[c]),_=v.useCallback(()=>{const P=y.current;if(P===void 0)return;const N=P===null?void 0:b.current.get(P);if(P===null||N===void 0||N.suppressed){f.current=null,c.close();return}f.current=N.triggerId,c.open(N.triggerId)},[c]),D=v.useCallback(()=>{const P=m.current;m.current=!1;const N=d.current;if(N===null)return;const W=h.current;W===null||W.id!==N||!W.isConnected||W.hasAttribute("data-preview-card-layer-trigger-suppressed")||!P&&W!==W.ownerDocument.activeElement&&!W.matches(":hover")||(f.current=N,c.open(N))},[c]),A=v.useCallback((P,N)=>(b.current.set(P,N),_(),()=>{b.current.get(P)===N&&(b.current.delete(P),_())}),[_]);v.useLayoutEffect(()=>{const P=y.current;if(P===void 0&&l!==void 0&&(d.current=f.current),y.current=l,l===void 0){P!==void 0&&D();return}P!==l&&(m.current=!1),_()},[l,_,D]);const M=v.useCallback((P,N)=>{if(y.current!==void 0&&N.reason!=="imperative-action"){P&&N.trigger!==void 0&&!N.trigger.hasAttribute("data-preview-card-layer-trigger-suppressed")?(d.current=N.trigger.id,h.current=N.trigger,m.current=!0):!P&&N.trigger?.id===d.current&&(d.current=null,h.current=null,m.current=!1),N.cancel(),_();return}if(P&&N.trigger?.hasAttribute("data-preview-card-layer-trigger-suppressed")){if(N.cancel(),y.current!==void 0){_();return}f.current=null,d.current=null,c.close();return}if(!P&&N.reason==="trigger-focus"&&N.event instanceof FocusEvent&&N.event.relatedTarget===null&&N.event.target instanceof Element&&N.event.target.matches(":hover")){N.cancel();return}!P&&N.reason!=="imperative-action"&&N.trigger?.id===d.current&&(d.current=null,h.current=null,m.current=!1),f.current=P?N.trigger?.id??f.current:null,y.current===void 0&&(d.current=f.current),S(P),y.current===void 0&&N.trigger!==void 0&&(h.current=P?N.trigger:null)},[c,_]),B=v.useMemo(()=>({handle:c,instantDismiss:T,openDelay:s,closeDelay:a,positioner:E,closeIfActive:C,registerTarget:A}),[a,C,c,T,s,E,A]);return g.jsxs(fO.Provider,{value:B,children:[e,g.jsx(QN,{actionsRef:R,handle:c,onOpenChange:M,children:({payload:P})=>!T&&k&&P!==void 0?g.jsx(dO.Provider,{value:P.triggerId,children:g.jsx(pO.Provider,{value:P.contentKey,children:g.jsx(E9,{children:P.content})})}):null})]})}function T9({children:e,content:t,targetId:n,contentKey:r,disabled:s=!1,openDelay:a,closeDelay:l}){const{handle:c,instantDismiss:f,openDelay:d,closeDelay:h,closeIfActive:m,registerTarget:b}=hO("PreviewCardLayer.Trigger"),y=v.useId(),k=e.props.id,S=typeof k=="string"?k:y,R=s||f,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(nO,{closeDelay:l??h,delay:a??d,handle:c,id:S,payload:T,"data-preview-card-layer-trigger-suppressed":R?"":void 0,render:e})}function R9({ariaLabel:e,children:t,maxHeight:n,surfaceClassName:r,surfaceStyle:s}){const{handle:a,positioner:l}=hO("PreviewCardLayer.Popup"),c=S9(),f=w9(),d=va(),h=uO(a,c),{portalLayerStyles:m}=ql("tooltip",!0),b=zh(rN),y=zt(Rx,sN,iN,jh,w4,s);return g.jsx(tO,{container:d??void 0,children:g.jsx(iO,{align:l.align,alignOffset:l.alignOffset,className:b.className,collisionAvoidance:l.collisionAvoidance,collisionPadding:8,positionMethod:l.positionMethod,side:l.side,sideOffset:l.sideOffset,style:{...b.style,...m},children:g.jsx(sO,{"aria-label":e,"data-component":"preview-card-layer-popup",className:sn("ui-preview-card-layer",r,y.className),ref:h,role:"dialog",style:y.style,children:n===void 0?t:g.jsx(Nl,{maxHeight:`min(${typeof n=="number"?`${n}px`:n}, var(--available-height, 100vh))`,scrollbarVisibility:oO,children:t})},f)})})}(function(e){e.Trigger=T9,e.Popup=R9})(_c||(_c={}));const mO="data-composite-item-active",C9=[];function _9(e){const{loopFocus:t=!0,orientation:n="both",grid:r,onLoop:s,direction:a,highlightedIndex:l,onHighlightedIndexChange:c,rootRef:f,enableHomeAndEndKeys:d=!1,stopEventPropagation:h=!1,disabledIndices:m,modifierKeys:b=C9}=e,[y,k]=v.useState(0),S=r!=null,R=v.useRef(null),T=xo(R,f),E=v.useRef([]),C=v.useRef(!1),_=l??y,D=Ke((N,W=!1)=>{if((c??k)(N),W){const $=E.current[N];uE(R.current,$,a,n)}}),A=Ke(N=>{if(N.size===0||C.current)return;C.current=!0;const W=Array.from(N.keys()),$=W.find(z=>z?.hasAttribute(mO))??null,F=$?W.indexOf($):-1;if(F!==-1)D(F);else if(Dp(W,_,m)){const z=Ss(W,{disabledIndices:m});cc(W,z)||D(z)}uE(R.current,$,a,n)});Ve(()=>{if(m==null||l!=null||!C.current)return;const N=E.current;if(Dp(N,_,m)){const W=Ss(N,{disabledIndices:m});cc(N,W)||D(W)}},[m,l,_,E,D]);const M=Ke((N,W,$)=>s?s(N,W,$,E):$),B=Ke(N=>{const W=d?EA:wA;if(!W.has(N.key)||A9(N,b)||!R.current)return;const F=a==="rtl",z=F?Bp:Fp,U={horizontal:z,vertical:hc,both:z}[n],H=F?Fp:Bp,K={horizontal:H,vertical:pc,both:H}[n],q=gr(N.nativeEvent);if(q!=null&&lE(q)&&!YN(q)){const se=q.selectionStart,ne=q.selectionEnd,oe=q.value??"";if(se==null||N.shiftKey||se!==ne||N.key!==K&&se<oe.length||N.key!==U&&se>0)return}let Y=_;const O=bp(E,m),j=$y(E,m);r!=null&&(Y=r({disabledIndices:m,elementsRef:E,event:N,highlightedIndex:_,loopFocus:t,maxIndex:j,minIndex:O,onLoop:M,orientation:n,rtl:F}));const V={horizontal:[z],vertical:[hc],both:[z,hc]}[n],L={horizontal:[H],vertical:[pc],both:[H,pc]}[n],X=S?W:{horizontal:d?n3:kA,vertical:d?r3:SA,both:W}[n];d&&(N.key===Oh?Y=O:N.key===Ih&&(Y=j)),Y===_&&(V.includes(N.key)||L.includes(N.key))&&(t&&Y===j&&V.includes(N.key)?(Y=O,s&&(Y=s(N,_,Y,E))):t&&Y===O&&L.includes(N.key)?(Y=j,s&&(Y=s(N,_,Y,E))):Y=Ss(E.current,{startingIndex:Y,decrement:L.includes(N.key),disabledIndices:m})),Y!==_&&!cc(E.current,Y)&&(h&&N.stopPropagation(),X.has(N.key)&&N.preventDefault(),D(Y,!0),queueMicrotask(()=>{E.current[Y]?.focus()}))});return{props:{ref:T,onFocus(N){const W=R.current,$=gr(N.nativeEvent);!W||$==null||!lE($)||$.setSelectionRange(0,$.value.length??0)},onKeyDown:B},highlightedIndex:_,onHighlightedIndexChange:D,elementsRef:E,disabledIndices:m,onMapChange:A,relayKeyboardEvent:B}}function A9(e,t){for(const n of l3.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function N9(e){const{render:t,className:n,style:r,refs:s=ko,props:a=ko,state:l=Bn,stateAttributesMapping:c,highlightedIndex:f,onHighlightedIndexChange:d,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",...A}=e,M=Di(),{props:B,highlightedIndex:P,onHighlightedIndexChange:N,elementsRef:W,onMapChange:$,relayKeyboardEvent:F}=_9({grid:m,loopFocus:b,onLoop:y,orientation:h,highlightedIndex:f,onHighlightedIndexChange:d,rootRef:T,stopEventPropagation:R,enableHomeAndEndKeys:k,direction:M,disabledIndices:E,modifierKeys:C}),z=bn(D,e,{state:l,ref:s,props:[B,...a,A],stateAttributesMapping:c}),U=v.useMemo(()=>({highlightedIndex:P,onHighlightedIndexChange:N,highlightItemOnHover:_,relayKeyboardEvent:F}),[P,N,_,F]);return g.jsx(f_.Provider,{value:U,children:g.jsx(wx,{elementsRef:W,onMapChange:H=>{S?.(H),$(H)},children:z})})}const O9=v.createContext(void 0);function I9(){const e=v.useContext(O9);if(e===void 0)throw new Error(In(63));return e}let dT=(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 M9={...Zc,checked(e){return e?{[dT.checked]:""}:{[dT.unchecked]:""}}},D9=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,c=I9();return bn("span",t,{state:c,ref:n,stateAttributesMapping:M9,props:l})}),L9="md",pT={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",kWkggS:"ui-59yu97 ui-fewc5l ui-dc3jbj",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-fewc5l ui-dc3jbj",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}},j9={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-1bbrhsv",$$css:!0}};function z9({interactive:e,size:t,variant:n}){const r=g.jsx("span",{className:"ui-1lliihq ui-h8yej3 ui-5yr21d ui-1i4c3av ui-hwtojv ui-10mbuw1 ui-10z6xd1 ui-19ule2h ui-1g0ag68 ui-3oybdh ui-27jcm2 ui-11xpdln ui-622pbu ui-99dd5c ui-sagj69 ui-6tor67"}),s=e?g.jsx(D9,{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",...zt(pT.root,pT[t],j9[n]),children:s})}function P9({checked:e,disabled:t,size:n=L9,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(z9,{interactive:!1,size:n,variant:r})})}const wn={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}},$9={xs:jA.root,sm:Ms.root,md:Cs.root,lg:zA.root,xl:p6.root,"2xl":h6.root,"3xl":m6.root,inherit:wn.sizeInherit},B9={regular:wn.weightRegular,medium:wn.weightMedium,semibold:wn.weightSemibold,bold:wn.weightBold},F9={primary:wn.colorPrimary,secondary:wn.colorSecondary,tertiary:wn.colorTertiary,quaternary:wn.colorQuaternary,active:wn.colorActive,focused:wn.colorFocused,red:wn.colorRed,"red-secondary":wn.colorRedSecondary,yellow:wn.colorYellow,"yellow-secondary":wn.colorYellowSecondary,green:wn.colorGreen,"green-secondary":wn.colorGreenSecondary,magenta:wn.colorMagenta,"magenta-secondary":wn.colorMagentaSecondary,cyan:wn.colorCyan,"cyan-secondary":wn.colorCyanSecondary,orange:wn.colorOrange,"orange-secondary":wn.colorOrangeSecondary};function U9({color:e,size:t,truncate:n,variant:r,weight:s}){return[wn.base,Mh.root,$9[t],B9[s],r==="code"?wn.variantCode:null,e?F9[e]:null,n==="start"?wn.truncateStart:null,n==="end"?Hl.root:null]}function Qp({as:e="span",variant:t="default",size:n="md",weight:r="regular",color:s,truncate:a,numeric:l,children:c,rootStyle:f,className:d,style:h,ref:m,...b}){const y=a===!0?"end":a===!1?void 0:a??void 0,{className:k,style:S}=zt(U9({color:s,size:n,truncate:y,variant:t,weight:r}),f);return g.jsx(e,{ref:m,className:sn("ui-text",k,d),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 gO={text:{kzqmXN:"ui-h8yej3",kHjlTd:"ui-j0a0fe",kN2L0X:"ui-1w2vvpw",$$css:!0}};function bO({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 yO({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 vO({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 xO({children:e}){return g.jsx(Qp,{as:"p",color:"primary","data-component":"empty-state-title",rootStyle:gO.text,size:"md",weight:"medium",children:e})}function kO({children:e}){return g.jsx(Qp,{as:"p",color:"secondary","data-component":"empty-state-description",rootStyle:gO.text,size:"md",weight:"regular",children:e})}function SO({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 q9({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(qt,{color:"tertiary",name:a,size:"lg"}):n;return g.jsxs(bO,{children:[l===void 0?null:g.jsx(yO,{variant:r,children:l}),g.jsxs(vO,{children:[s===void 0?null:g.jsx(xO,{children:s}),g.jsx(kO,{children:e})]}),t===void 0?null:g.jsx(SO,{children:g.jsx(vn,{disabled:t.disabled,onClick:t.onClick,size:"md",variant:"outline",children:t.label})})]})}const Ri=Object.assign(q9,{Root:bO,Icon:yO,Header:vO,Title:xO,Description:kO,Content:SO});function rf({className:e,variant:t="default",size:n="lg",ref:r,disabled:s,startIcon:a,endIcon:l,inputGroupRootStyle:c,...f}){return g.jsxs(Hd.Root,{className:e,rootStyle:c,variant:t,size:n,disabled:s,children:[a!=null&&g.jsx(Hd.Icon,{name:a}),g.jsx(Hd.Input,{ref:r,...f}),l!=null&&g.jsx(Hd.Icon,{name:l})]})}const xs=class xs{constructor(){this.data=null,this.listeners=new Set}static getInstance(){return xs.instance||(xs.instance=new xs),xs.instance}static subscribe(t){return xs.getInstance().subscribeToChanges(t)}static isDragActive(){return xs.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}};xs.instance=null;let gi=xs;const Zb={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)"}},H9={1:1,2:2},Zy={instant:50,fast:100,normal:150,slow:200,slower:300},wO={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)"},V9={"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},G9={none:0,xs:2,sm:4,base:6,lg:8,xl:12,"2xl":14,"3xl":16,"4xl":18,full:9999},W9={xs:20,sm:24,base:28,lg:32},K9={xs:11,sm:12,base:13,lg:14},Y9={xs:14,sm:16,base:18,lg:22},X9={xs:.07,sm:0,base:-.08,lg:-.15,xl:.08,"2xl":-.46,"3xl":-.26},Z9=.98,Q9=2,hT={open:Zy.fast,close:Zy.fast},J9=wO.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 eF(e){const{side:t,alignment:n}=EO(e);switch(t){case"top":return`${mT(n)} bottom`;case"right":return`left ${gT(n)}`;case"bottom":return`${mT(n)} top`;case"left":return`right ${gT(n)}`}}function tF(e,t={}){const{side:n}=EO(e),r=t.offset??Q9,s=t.scale??Z9;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 nF(e,t){return{opacity:0,transform:tF(e,t)}}function rF(e){return{transformOrigin:eF(e),transitionTimingFunction:J9}}function iF({closeDuration:e=hT.close,transform:t}={}){return{duration:{open:hT.open,close:e},initial:({placement:n})=>nF(n,t),common:({placement:n})=>rF(n)}}function mT(e){switch(e){case"start":return"left";case"end":return"right";case void 0:return"center"}}function gT(e){switch(e){case"start":return"top";case"end":return"bottom";case void 0:return"center"}}const Vl="data-ui-menu-item-region",TO=v.createContext("body");function Es({value:e,children:t}){return g.jsx(TO.Provider,{value:e,children:t})}function sf(){return v.useContext(TO)}const sF='[role="menuitem"]',bT=["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 CO(e,t){if(!(e===void 0||t===null||t<0))return`${e}-item-${t}`}function of(e,t){const n=CO(e,t);return n===void 0?{}:{id:n}}function _O(e){const{"aria-activedescendant":t,...n}=e;return n}function oF(e,t){if(t==null)return null;const n=e.current[t];return n instanceof HTMLElement?n:null}function aF(e,t){const n=e.current;for(let r=0;r<n.length;r++)if(n[r]?.getAttribute(Vl)===t)return r;return null}function AO(e,t,n){queueMicrotask(()=>{const r=aF(e,t);n(r??null)})}function NO(e,t){if(!(e instanceof Element))return null;const n=e.closest(sF);if(!n)return null;const r=t.current.indexOf(n);return r>=0?r:null}function lF(e,t){if(!e)return()=>{};for(const n of bT)e.addEventListener(n,t,{passive:!0});return()=>{for(const n of bT)e.removeEventListener(n,t)}}function uF({event:e,direction:t,activeIndex:n,listRef:r,restoreFocus:s}){const a=oF(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(e,t){return v.useCallback(n=>{const r=e(n);if(t)return r;const{onPointerLeave:s,...a}=r;return a},[e,t])}function IO(){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 cF=360,MO="--ui-menu-available-width",Dx="--ui-menu-available-height",fF=new Set(["none","auto","initial","inherit","unset","revert","revert-layer","min-content","max-content","fit-content","stretch"]);function DO(e){const t=`var(${Dx}, 100vh)`;return e==null||dF(e)?t:`min(${dl(e)}, ${t})`}function dF(e){return typeof e=="string"&&fF.has(e.trim().toLowerCase())}const pF="320px";function dl(e){return typeof e=="number"?`${e}px`:e}function Qb(e){return`min(${e}, var(${MO}, 100vw))`}function Lx(e){const{width:t,minWidth:n,maxWidth:r,clampToAvailableWidth:s=!1}=e,l=t===void 0&&(n!==void 0||r!==void 0)?"max-content":dl(t??"200px");return s?{width:l==="max-content"?l:Qb(l),...n!=null&&{minWidth:Qb(dl(n))},maxWidth:Qb(r!=null?dl(r):pF)}:{width:l,...n!=null&&{minWidth:dl(n)},...r!=null&&{maxWidth:dl(r)}}}const hF=50;function jx({isOpen:e,isPositioned:t}){return e&&!t?{opacity:0}:void 0}function mF(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 gF(){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 Yh(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 bF={open:0,close:0},yF={opacity:1,transform:"none"},zx=v.createContext(null);function Yi(e){const t=v.useContext(zx);if(!t)throw new Error(`${e} must be used within LegacyMenu`);return t}function LO(){return Yi("LegacyMenu.useContext")}function vF({children:e,open:t,defaultOpen:n=!1,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l="bottom-start",offset:c=4,flip:f=!0,closeOnSelect:d,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 A=Cx(),[M,B]=Dl(t,n,r,"LegacyMenu.Root (open)"),[P,N]=v.useState(""),W=v.useRef(null),[$,F]=v.useState(!1),[z,U]=v.useState(!1),[H,K]=Dl(s,null,a,"LegacyMenu.Root (activeIndex)"),{focusItemOnHoverEnabled:q,markKeyboardNavigation:Y,markPointerNavigation:O,resetFocusItemOnHover:j}=IO(),V=v.useRef([]),L=v.useRef([]),X=v.useRef(null),se=v.useCallback(Pe=>{B(Pe),Pe?(N(""),X.current=null):K(null),j()},[j,B,K]),ne=v.useRef(!1);v.useLayoutEffect(()=>{const Pe=ne.current;ne.current=M,!Pe&&M&&N(""),Pe!==M&&j()},[M,j]);const{refs:oe,floatingStyles:le,middlewareData:ce,context:Ee,update:be}=Ix({nodeId:A,open:M,onOpenChange:se,placement:l,strategy:_,middleware:[ix(c),...f?[ox()]:[],sx(),ax({padding:8,apply({availableHeight:Pe,elements:Ye}){Ye.floating.style.setProperty(Dx,`${Math.max(0,Math.floor(Pe))}px`)}}),gF()],whileElementsMounted:T?void 0:Lp,transform:!1}),ue=NN(Ee,{enabled:z,delay:{open:75},handleClose:UN({blockPointerEvents:!0,requireIntent:!1})}),ge=DN(Ee,{enabled:C&&!z}),Se=Yh(),Ae=v.useCallback(Pe=>D!==void 0&&!D(Pe)||R&&gi.getInstance().hasData()?!1:Se(Pe),[D,R,Se]),ke=LN(Ee,{ancestorScroll:E,outsidePressEvent:"click",outsidePress:Ae}),xe=PN(Ee,{role:"menu"}),Re=zN(Ee,{listRef:V,activeIndex:H,onNavigate:K,loop:!1,virtual:S||$,focusItemOnOpen:k,focusItemOnHover:q}),Me=BN(Ee,{listRef:L,activeIndex:H,onMatch:$?void 0:K,enabled:!$}),{getReferenceProps:ze,getFloatingProps:Fe,getItemProps:ye}=jN([ue,ge,ke,xe,Re,Me]),_e=OO(ye,M),ee=v.useCallback(Pe=>({..._O(ze(Pe)),ref:oe.setReference,"aria-haspopup":"menu","aria-expanded":M}),[ze,oe.setReference,M]),fe=m?{duration:bF,initial:yF}:iF(h?{closeDuration:0}:void 0),{isMounted:Q,styles:re}=$N(Ee,fe),we=v.useMemo(()=>({isOpen:M,isMounted:Q,setIsOpen:B,activeIndex:H,setActiveIndex:K,markKeyboardNavigation:Y,markPointerNavigation:O,virtualFocus:S,searchValue:P,setSearchValue:N,hasSearchInput:$,setHasSearchInput:F,enableHover:z,setHasHoverTrigger:U,closeOnSelect:d,returnFocusOnSelect:b,returnFocus:y,nodeId:A,activeDescendantIdPrefix:$?A:void 0,listRef:V,labelsRef:L,searchInputRef:W,refs:oe,floatingStyles:le,middlewareData:ce,transitionStyles:re,context:Ee,updateFloating:be,getReferenceProps:ze,getFloatingProps:Fe,getItemProps:_e,getTriggerProps:ee,dismissCauseRef:X,shouldAllowPointerInteraction:Ae}),[M,Q,B,H,K,Y,O,S,P,$,z,d,b,y,A,oe,le,ce,re,Ee,be,ze,Fe,_e,ee,Ae]);return g.jsx(_x,{id:A,children:g.jsx(zx.Provider,{value:we,children:e})})}function Xu(e,t){return n=>{e?.(n),n.defaultPrevented||t(n)}}function Gl(e,t){switch(e){case"ArrowLeft":return t==="rtl"?"end":"start";case"ArrowRight":return t==="rtl"?"start":"end";default:return null}}const xF=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),kF={_zod:{output:{}},safeParse:e=>xF(e)?{success:!0}:{success:!1,error:new TypeError("drag payload must be an object")}};function jO(e,t=()=>kF){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 SF=v.createContext(null);function wF(){return v.useContext(SF)}const EF=v.createContext("copy-with-plain-text");function TF(){return v.useContext(EF)}const RF="application/x-cursor-draggable",Vd=_F("ui-i9pz9s"),CF="data-no-drag";let ta=!1,yT=!1,vT=null;function xT(){return vT??=Object.assign(new Image(1,1),{src:"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}),vT}function _F(e){return e?.split(/\s+/).filter(Boolean)??[]}function Gd(e,t,n){for(const r of t)e.classList.toggle(r,n)}function AF(){if(yT||typeof document>"u")return;yT=!0,document.addEventListener("pointerdown",t=>{if(t.button!==0||!(t.target instanceof Element)){ta=!1;return}ta=t.target.closest(`[${CF}]`)!==null},{capture:!0});const e=()=>{ta=!1};document.addEventListener("pointerup",e,{capture:!0}),document.addEventListener("pointercancel",e,{capture:!0})}function NF({id:e,data:t,disabled:n=!1,dragImageOffset:r,hideNativeDragImage:s=!1,onDragStart:a,onDragEnd:l}){const c=wF(),f=TF(),d=v.useRef(null),h=v.useRef({onDragStart:a,onDragEnd:l});h.current={onDragStart:a,onDragEnd:l};const m=v.useRef(t);m.current=t;const b=v.useRef(r);b.current=r;const y=v.useRef(s);y.current=s,v.useEffect(()=>{s&&xT()},[s]);const k=v.useRef(c);k.current=c;const S=c?.activeDragId===e,R=v.useRef(S);return R.current=S,v.useEffect(()=>{const E=d.current;if(E)return Gd(E,Vd,!n&&S),()=>{Gd(E,Vd,!1)}},[n,S]),v.useEffect(()=>{const E=d.current;if(!E)return;if(n){E.removeAttribute("aria-grabbed");return}const C=S?"true":"false";E.getAttribute("aria-grabbed")!==C&&E.setAttribute("aria-grabbed",C)},[n,S]),{ref:v.useCallback(E=>{if(d.current=E,!E)return;Gd(E,Vd,!n&&R.current);const C=!n;if(E.draggable!==C&&(E.draggable=C),n)return;AF();const _=gi.getInstance(),D=M=>{if(ta){ta=!1,M.preventDefault(),M.stopPropagation();return}const B=m.current;_.setData(B);const P=E.ownerDocument,N=()=>{P.removeEventListener("dragend",N,!0),P.removeEventListener("drop",N,!0),P.removeEventListener("mousemove",N,!0),setTimeout(()=>{_.getData()===B&&(_.clearData(),ta=!1,k.current?.setDragging(null,null))},0)};if(P.addEventListener("dragend",N,!0),P.addEventListener("drop",N,!0),P.addEventListener("mousemove",N,!0),M.dataTransfer){const W=f==="copy-with-plain-text";M.dataTransfer.effectAllowed=W?"copyMove":"move",M.dataTransfer.setData(RF,B.type),W&&M.dataTransfer.setData("text/plain",B.type);const $=b.current;y.current?M.dataTransfer.setDragImage(xT(),0,0):$&&M.dataTransfer.setDragImage(E,$.x,$.y)}k.current?.setDragging(e,B,{x:M.clientX,y:M.clientY}),h.current.onDragStart?.(M)},A=M=>{_.clearData(),ta=!1,k.current?.setDragging(null,null),h.current.onDragEnd?.(M)};return E.addEventListener("dragstart",D),E.addEventListener("dragend",A),()=>{E.removeEventListener("dragstart",D),E.removeEventListener("dragend",A),Gd(E,Vd,!1)}},[e,n,f]),isDragging:S}}const Sp={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-s7jddj","--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",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}},OF={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}},vi={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}},$i={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}},Ki={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",k7Eaqz:"ui-euugli",$$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}},ra={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}},Jp={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}},IF={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}},MF={row:{kLKAdn:"ui-fs8kq3",kwRFfy:"ui-yupq46",kGO01o:"ui-b6dno7",kZCmMZ:"ui-1xc7y5k",$$css:!0}},Qy={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}},eh={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 DF(e,t=!1){return[oN,Sp.base,Cs.root,e==="md"&&Sp.sizeMd,t&&Sp.hasAttachment]}function LF(e=!1){return e&&Sp.dropIndicator}function jF(){return OF.base}function zF(){return vi.inner}function PF(){return vi.dropIndicatorSlot}function $F(e=!1){return[vi.layout,e&&vi.layoutCard,e&&Ph.border]}function BF(){return[vi.attachment,Ph.border]}function zO(){return vi.bodyScroll}function FF(){return vi.header}function UF(){return vi.footer}function qF(e=!1){return[vi.list,e&&vi.virtualizedList]}function HF(){return vi.virtualizedRow}function VF(){return vi.virtualizedScroller}function Px(e={}){return[$i.base,e.selected&&$i.selected,e.inSubmenu&&!e.disabled&&$i.submenuHover,e.focused&&$i.focused,e.expanded&&$i.expanded,e.disabled&&$i.disabled,e.disabled&&e.focused&&$i.disabledFocused,e.variant==="muted"&&$i.muted,e.variant==="muted"&&e.focused&&$i.mutedFocused,e.indent&&$i.indent]}const GF={disabled:{kkrTdU:"ui-1h6gzvc",$$css:!0}};function WF(){return GF.disabled}function KF(e={}){return[Ki.left,e.wideLeft&&Ki.leftWide]}function YF(){return Ki.content}function XF(e={}){return[Ki.right,e.disabled&&Ki.rightDisabled,e.trailingHidden&&Ki.rightHidden]}function ZF(){return Ki.submenuRight}function QF(){return Ki.wrapper}function JF(){return[Hl.root,Ki.title]}function eU(){return[Ms.root,Hl.root,Ki.description]}function tU(e){return[ra.wrapper,e&&ra.wrapperInline]}function nU(e){return[Hl.root,ra.title,e&&ra.titleInline]}function rU({inline:e,wrap:t}){return[Ms.root,Hl.root,ra.subtitle,e&&ra.subtitleInline,t&&ra.subtitleWrap]}function iU(){return MF.row}function sU(){return Jp.wrapper}function oU(e){return[Ms.root,Jp.title,e&&Jp.titleAction]}function aU(){return Jp.textAction}function lU(){return IF.divider}function $x(){return Qy.surface}function PO(e){switch(e){case"default":return;case"medium":return Qy.surfaceMedium;case"wide":return Qy.surfaceWide;default:return e}}function uU(e){return[Ms.root,eh.empty,e&&eh.emptyIndent]}function cU(){return[Cs.root,eh.loading]}function fU(){return eh.loadingSpinner}const $O=v.createContext(null);function af(e){const t=v.useContext($O);if(!t)throw new Error(`${e} must be used within LegacyMenu.Content or LegacyMenu.SubMenuContent`);return t}function BO({children:e,activeIndex:t,setIsOpen:n,getItemProps:r,searchValue:s,closeOnSelect:a,virtualFocus:l=!1,activeDescendantIdPrefix:c}){const f=v.useMemo(()=>({activeIndex:t,setIsOpen:n,getItemProps:r,searchValue:s,closeOnSelect:a,virtualFocus:l,activeDescendantIdPrefix:c}),[t,n,r,s,a,l,c]);return g.jsx($O.Provider,{value:f,children:e})}const FO=v.createContext(void 0);function Xh(e){const t=v.useContext(FO);if(t===void 0&&!e)throw new Error(In(72));return t}const dU={...hA,disabled:tt(e=>e.disabled),instantType:tt(e=>e.instantType),isInstantPhase:tt(e=>e.isInstantPhase),trackCursorAxis:tt(e=>e.trackCursorAxis),disableHoverablePopup:tt(e=>e.disableHoverablePopup),lastOpenChangeReason:tt(e=>e.openChangeReason),closeOnClick:tt(e=>e.closeOnClick),closeDelay:tt(e=>e.closeDelay),hasViewport:tt(e=>e.hasViewport)};class Bx extends cx{constructor(t,n,r=!1){const s=new Ah,a={...pU(),...t};a.floatingRootContext=dA(s,n,r),super(a,{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:s},dU)}setOpen=(t,n)=>{sA(this,t,n,{extraState:{openChangeReason:n.reason}})};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,Rt(Bl,t))}static useStore(t,n){return iA(t,(s,a)=>new Bx(n,s,a)).store}}function pU(){return{...fA(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}const hU=ux(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:s,disableHoverablePopup:a=!1,trackCursorAxis:l="none",actionsRef:c,onOpenChange:f,onOpenChangeComplete:d,handle:h,triggerId:m,defaultTriggerId:b=null,children:y}=t,k=Bx.useStore(h?.store,{open:r,openProp:s,activeTriggerId:b,triggerIdProp:m});oA(k,s,r,b),k.useControlledProp("openProp",s),k.useControlledProp("triggerIdProp",m),k.useContextCallback("onOpenChange",f),k.useContextCallback("onOpenChangeComplete",d);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),lA(k,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:_,transitionStatus:D}=uA(R,k),A=k.useState("isInstantPhase"),M=k.useState("instantType"),B=k.useState("lastOpenChangeReason"),P=v.useRef(null);Ve(()=>{S&&n&&k.setOpen(!1,Rt(p_))},[S,n,k]),Ve(()=>{D==="ending"&&B===Ni||D!=="ending"&&A?(M!=="delay"&&(P.current=M),k.set("instantType","delay")):P.current!==null&&(k.set("instantType",P.current),P.current=null)},[D,A,B,M,k]),Ve(()=>{R&&T==null&&k.set("payload",void 0)},[k,T,R]);const N=v.useCallback(()=>{k.setOpen(!1,Rt(_p))},[k]);v.useImperativeHandle(c,()=>({unmount:_,close:N}),[_,N]);const W=R||E||!n&&l!=="none";return g.jsxs(FO.Provider,{value:k,children:[W&&g.jsx(mU,{store:k,disabled:n,trackCursorAxis:l}),typeof y=="function"?y({payload:C}):y]})});function mU({store:e,disabled:t,trackCursorAxis:n}){const r=e.useState("floatingRootContext"),s=nx(r,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),a=jP(r,{enabled:!t&&n!=="none",axis:n==="none"?void 0:n}),l=v.useMemo(()=>Gi(a.reference,s.reference),[a.reference,s.reference]),c=v.useMemo(()=>Gi(a.trigger,s.trigger),[a.trigger,s.trigger]),f=v.useMemo(()=>Gi(fx,a.floating,s.floating),[a.floating,s.floating]);return cA(e,{activeTriggerProps:l,inactiveTriggerProps:c,popupProps:f}),null}const gU=v.createContext(void 0);function bU(){return v.useContext(gU)}let yU=(function(e){return e[e.popupOpen=Cp.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const vU=600,UO="data-base-ui-tooltip-trigger";function kT(e){if("composedPath"in e){const n=e.composedPath();for(let r=0;r<n.length;r+=1){const s=n[r];if(gt(s))return s}}const t=e.target;return gt(t)?t:null}function xU(e){let t=e;for(;t;){if(t.hasAttribute(UO))return t;const n=t.parentElement;if(n){t=n;continue}const r=t.getRootNode();t="host"in r&>(r.host)?r.host:null}return null}const kU=tA(function(t,n){const{render:r,className:s,style:a,handle:l,payload:c,disabled:f,delay:d,closeOnClick:h=!0,closeDelay:m,id:b,...y}=t,k=Xh(!0),S=l?.store??k;if(!S)throw new Error(In(82));const R=Fl(b),T=S.useState("isTriggerActive",R),E=S.useState("isOpenedByTrigger",R),C=S.useState("floatingRootContext"),_=v.useRef(null),D=d??vU,A=m??0,{registerTrigger:M,isMountedByThisTrigger:B}=aA(R,_,S,{payload:c,closeOnClick:h,closeDelay:A}),P=bU(),{delayRef:N,isInstantPhase:W,hasProvider:$}=Jz(C,{open:E}),F=hx(C);S.useSyncedValue("isInstantPhase",W);const z=S.useState("disabled"),U=f??z,H=On(U),K=S.useState("trackCursorAxis"),q=S.useState("disableHoverablePopup"),Y=v.useRef(!1),O=bi(),j=v.useRef(void 0);function V(){const ue=P?.delay,ge=typeof N.current=="object"?N.current.open:void 0;let Se=D;return $&&(ge!==0?Se=d??ue??D:Se=0),Se}function L(ue){const ge=_.current;if(!ge||!ue)return!1;const Se=xU(ue);return Se!==null&&Se!==ge&&ht(ge,Se)}function X(ue){const ge=L(ue);return Y.current=ge,ge&&(F.openChangeTimeout.clear(),F.restTimeout.clear(),F.restTimeoutPending=!1,O.clear()),ge}const se=vA(C,{enabled:!U,mouseOnly:!0,move:!1,handleClose:!q&&K!=="both"?xA():null,restMs:V,delay(){const ue=typeof N.current=="object"?N.current.close:void 0;let ge=A;return m==null&&$&&(ge=ue),{close:ge}},triggerElementRef:_,isActiveTrigger:T,isClosing:()=>S.select("transitionStatus")==="ending",shouldOpen(){return!Y.current}}),ne=gA(C,{enabled:!U}).reference,oe=ue=>{const ge=Y.current,Se=kT(ue),Ae=X(Se),ke=_.current,xe=ke&&Se&&ht(ke,Se);if(Ae&&S.select("open")&&S.select("lastOpenChangeReason")===Sr){S.setOpen(!1,Rt(Sr,ue));return}if(ge&&!Ae&&xe&&!H.current&&!S.select("open")&&ke&&oa(j.current)){const Re=()=>{!Y.current&&!H.current&&!S.select("open")&&S.setOpen(!0,Rt(Sr,ue,ke))},Me=V();Me===0?(O.clear(),Re()):O.start(Me,Re)}},le=S.useState("triggerProps",B);return bn("button",t,{state:{open:E},ref:[n,M,_],props:[se,ne,B||K!=="none"?le:void 0,{onMouseOver(ue){oe(ue.nativeEvent)},onFocus(ue){L(kT(ue.nativeEvent))&&ue.preventBaseUIHandler()},onMouseLeave(){Y.current=!1,O.clear(),j.current=void 0},onPointerEnter(ue){j.current=ue.pointerType},onPointerDown(ue){j.current=ue.pointerType,S.set("closeOnClick",h),h&&!S.select("open")&&S.cancelPendingOpen(ue.nativeEvent)},onClick(ue){h&&!S.select("open")&&S.cancelPendingOpen(ue.nativeEvent)},id:R,[yU.triggerDisabled]:U?"":void 0,[UO]:U?void 0:""},y],stateAttributesMapping:u_})}),qO=v.createContext(void 0);function SU(){const e=v.useContext(qO);if(e===void 0)throw new Error(In(70));return e}const wU=v.forwardRef(function(t,n){const{keepMounted:r=!1,...s}=t;return Xh().useState("mounted")||r?g.jsx(qO.Provider,{value:r,children:g.jsx(eO,{ref:n,...s})}):null}),HO=v.createContext(void 0);function EU(){const e=v.useContext(HO);if(e===void 0)throw new Error(In(71));return e}const TU=v.forwardRef(function(t,n){const{render:r,className:s,anchor:a,positionMethod:l="absolute",side:c="top",align:f="center",sideOffset:d=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:b=5,arrowPadding:y=5,sticky:k=!1,disableAnchorTracking:S=!1,collisionAvoidance:R=D_,style:T,...E}=t,C=Xh(),_=SU(),D=C.useState("open"),A=C.useState("mounted"),M=C.useState("trackCursorAxis"),B=C.useState("disableHoverablePopup"),P=C.useState("floatingRootContext"),N=C.useState("instantType"),W=C.useState("transitionStatus"),$=C.useState("hasViewport"),F=Ex({anchor:a,positionMethod:l,floatingRootContext:P,mounted:A,side:c,sideOffset:d,align:f,alignOffset:h,collisionBoundary:m,collisionPadding:b,sticky:k,arrowPadding:y,disableAnchorTracking:S,keepMounted:_,collisionAvoidance:R,adaptiveOrigin:$?ZA:void 0}),z=v.useMemo(()=>({open:D,side:F.side,align:F.align,anchorHidden:F.anchorHidden,instant:M!=="none"?"tracking-cursor":N}),[D,F.side,F.align,F.anchorHidden,M,N]),U=Tx(t,z,{styles:F.positionerStyles,transitionStatus:W,props:E,refs:[n,C.useStateSetter("positionerElement")],hidden:!A,inert:!D||M==="both"||B});return g.jsx(HO.Provider,{value:F,children:U})}),RU={...Wc,...To},CU=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,c=Xh(),{side:f,align:d}=EU(),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");_o({open:h,ref:c.context.popupRef,onComplete(){h&&c.context.onOpenChangeComplete?.(!0)}}),yA(k,{enabled:!S,closeDelay:R});const T=c.useStateSetter("popupElement");return bn("div",t,{state:{open:h,side:f,align:d,instant:m,transitionStatus:b},ref:[n,c.context.popupRef,T],props:[y,Lh(b),l],stateAttributesMapping:RU})}),_U=v.createContext(null),AU={base:{kfSwDN:"ui-87ps6o",kfzvcC:"ui-47corl",$$css:!0}},VO=v.createContext(null);function GO(e){const t=v.use(VO);if(t===null)throw new Error(`${e} must be used within Tooltip.Root`);return t}function WO({children:e,placement:t=$h,offset:n=8,openDelay:r=xB,closeDelay:s=Bh,disabled:a=!1,defaultOpen:l,open:c,sameAxisOnly:f=!1,onOpenChange:d,onOpenChangeComplete:h}){const m=v.use(_U),b=v.use(Zp),y=a||b,k=m?.open??r,S=m?.close??s,R=v.useRef(null),T=v.useMemo(()=>({close:()=>{R.current?.close()}}),[]),[E,C]=v.useState(),_=(A,M)=>{d?.(A,M),M.isCanceled||C(A?M.trigger?.id:void 0)},D=v.useMemo(()=>({disabled:y,instantDismiss:b,offset:n,openTriggerId:E,placement:t,sameAxisOnly:f,scrollDismissHandle:T,triggerCloseDelay:S,triggerDelay:k}),[y,b,n,E,t,f,T,S,k]);return g.jsx(VO.Provider,{value:D,children:g.jsx(hU,{actionsRef:R,defaultOpen:l,disabled:y,disableHoverablePopup:!0,onOpenChange:_,onOpenChangeComplete:h,open:c,children:e})})}function KO({children:e,ref:t,...n}){const{disabled:r,triggerCloseDelay:s,triggerDelay:a}=GO("Tooltip.Trigger"),l=e.props?.id;return g.jsx(kU,{...n,closeDelay:s,delay:a,disabled:r,id:l??n.id,ref:t,render:e})}function YO({content:e,anchor:t,ariaLabel:n,width:r,minWidth:s,maxWidth:a}){const{instantDismiss:l,offset:c,openTriggerId:f,placement:d,sameAxisOnly:h,scrollDismissHandle:m}=GO("Tooltip.Popup"),b=va(),y=uO(m,f),{side:k,align:S,sideOffset:R,alignOffset:T,collisionAvoidance:E,positionMethod:C}=Fh(d,c,h),_=zh(v4),D=zt(Rx,sN,x4,AU.base,jh);return l?null:g.jsx(wU,{container:b??void 0,children:g.jsx(TU,{align:S,alignOffset:T,anchor:t,className:_.className,collisionAvoidance:E,collisionPadding:8,positionMethod:C,side:k,sideOffset:R,style:_.style,children:g.jsx(CU,{"aria-label":n,className:D.className,"data-component":"tooltip-popup",ref:y,role:"tooltip",style:r===void 0&&s===void 0&&a===void 0?D.style:{...D.style,width:r,minWidth:s,maxWidth:a},children:typeof e=="function"?e():e})})})}function NU({children:e,anchor:t,"aria-label":n,width:r,minWidth:s,maxWidth:a}){return g.jsx(YO,{anchor:t,ariaLabel:n,content:e,maxWidth:a,minWidth:s,width:r})}function Jy({children:e,content:t,placement:n,offset:r,openDelay:s,closeDelay:a,disabled:l,defaultOpen:c,open:f,"aria-label":d,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(WO,{closeDelay:a,defaultOpen:c,disabled:l,offset:r,onOpenChange:k,onOpenChangeComplete:S,open:f,openDelay:s,placement:n,sameAxisOnly:y,children:[g.jsx(KO,{...T,ref:R,children:E}),g.jsx(YO,{ariaLabel:d,content:t,maxWidth:b,minWidth:m,width:h})]}):g.jsx(g.Fragment,{children:e})}(function(e){e.Root=WO,e.Trigger=KO,e.Popup=NU})(Jy||(Jy={}));const OU="ui-menu",Fx="ui-menu__backdrop",IU="ui-menu__list",MU="ui-menu__content",DU="ui-menu__drop-indicator-slot",LU="ui-menu__layout",XO="ui-menu__body-scroll",jU="ui-menu__header",zU="ui-menu__footer",PU="ui-menu__attachment",$U="ui-menu__row",BU="ui-menu__item-left",FU="ui-menu__item-content",UU="ui-menu__item-right",qU="ui-menu__item-wrapper",HU="ui-menu__item-title",VU="ui-menu__item-description",GU="ui-menu__text-wrapper",WU="ui-menu__title",KU="ui-menu__subtitle",YU="ui-menu__search-row",XU="ui-menu__section",ZU="ui-menu__section-title",QU="ui-menu__section-text-action",JU="ui-menu__virtualized-section-divider",e8="ui-menu__submenu-trigger",t8="ui-menu__submenu-right-section",n8="ui-menu__toggle-row",r8="ui-menu__tooltip",i8="ui-menu__empty",s8="ui-menu__loading",o8="ui-menu__loading-spinner",a8="ui-menu__virtualized-row",l8="ui-menu__virtualized-scroller";function tn(e,t,n={}){return Yt({rootClass:e,stylexStyles:t,className:n.className,style:n.style})}function Ux({className:e,hasDropIndicator:t=!1,size:n,style:r,hasAttachment:s=!1,surfaceStyle:a}){return a=[LF(t),a],tn(OU,[DF(n,s),a],{className:e,style:r})}function ZO(e){return tn(Fx,jF(),{style:e})}function qx(e=!1,t){return tn(IU,[qF(e),t],{className:e?"ui-menu__list--virtualized":void 0})}function Hx(e){return tn(MU,[zF(),e])}function u8(){return tn(DU,PF())}function Vx(e,t=!1,n){return tn(LU,[$F(t),n],{style:e})}function c8(){return tn(PU,BF())}function Gx(){return tn(jU,FF())}function Wx(){return tn(zU,UF())}function Kx(e={},t){return tn($U,[{"ui--default-marker":"ui--default-marker",$$css:!0},Px(e),t],{className:e.className})}function f8(e={},t){return tn(n8,[Px(e),e.disabled&&WF(),t],{className:e.className})}function d8(e={}){return tn(e8,Px(e),{className:e.className})}function p8(e={},t){return tn(BU,[KF(e),t])}function h8(e){return tn(FU,[YF(),e])}function m8(e={},t){return tn(UU,[XF(e),t])}function Yx(){return tn(qU,QF())}function Xx(){return tn(HU,JF())}function Zx(){return tn(VU,eU())}function g8(e){return tn(GU,tU(e))}function b8(e){return tn(WU,nU(e))}function y8({inline:e,wrap:t}){return tn(KU,rU({inline:e,wrap:t}))}function v8(e,t){return tn(YU,[iU(),t],{className:e})}function x8(e){return tn(XU,[sU(),e])}function QO(e,t){return tn(ZU,[oU(e),t])}function k8(){return tn(QU,aU())}function S8(){return tn(JU,lU())}function w8(){return tn(t8,ZF())}function E8(e,t){return tn(i8,[uU(e),t])}function T8(){return tn(s8,cU())}function R8(){return tn(a8,HF())}function C8(){return tn(l8,VF())}const _8=tn(o8,fU()).className,th="submenuOpenChange",Qx=v.createContext(null);function Jx(e){return Math.max(e,Bh)}function e0(){return v.use(Qx)}function t0({children:e,layerNodeId:t,placement:n="right-start"}){const r=No(),[s,a]=v.useState(new Set);v.useEffect(()=>{if(!r)return;const f=d=>{d.parentId===t&&a(h=>{const m=new Set(h);return d.isOpen?m.add(d.nodeId):m.delete(d.nodeId),m})};return r.events.on(th,f),()=>{r.events.off(th,f)}},[r,t]);const l=s.size>0,c=v.useMemo(()=>({hasOpenChild:l}),[l]);return g.jsx(Qx.Provider,{value:c,children:g.jsx(_c,{offset:6,placement:n,sameAxisOnly:!0,children:e})})}function A8({content:e,surfaceStyle:t}){return g.jsx(_c.Popup,{surfaceClassName:r8,surfaceStyle:[$x(),t],children:typeof e=="function"?e():e})}function JO({children:e,content:t,contentKey:n,disabled:r=!1,openDelay:s=0,closeDelay:a=0,surfaceStyle:l}){const c=v.use(Qx);return c==null?g.jsx(g.Fragment,{children:e}):g.jsx(_c.Trigger,{closeDelay:Jx(a),content:g.jsx(A8,{content:t,surfaceStyle:l}),contentKey:n,openDelay:s,disabled:r||c.hasOpenChild,children:e})}function N8(e,t){const n=No(),r=Ao();v.useEffect(()=>{if(!n||e===void 0)return;const s={nodeId:e,parentId:r,isOpen:t};return n.events.emit(th,s),()=>{t&&n.events.emit(th,{nodeId:e,parentId:r,isOpen:!1})}},[n,e,r,t])}function lf({children:e,content:t,contentKey:n,disabled:r=!1,openDelay:s=0,closeDelay:a=0,interactive:l=!0,surfaceStyle:c}){return e0()!=null?g.jsx(JO,{closeDelay:a,content:t,contentKey:n,disabled:r,openDelay:s,surfaceStyle:c,children:e}):l?g.jsx(lO,{closeDelay:Jx(a),content:t,disabled:r,offset:6,openDelay:s,placement:"right",sameAxisOnly:!0,surfaceStyle:[$x(),c],children:e}):g.jsx(Jy,{closeDelay:a,content:t,disabled:r,offset:6,openDelay:s,placement:"right",sameAxisOnly:!0,children:e})}function Ll({children:e,disabled:t=!1,leading:n,trailing:r,rightFallback:s,trailingAccessory:a,trailingHidden:l=!1,wideLeft:c=!1,leadingStyle:f,contentStyle:d,trailingStyle:h}){const m=r??s,b=m!=null||a!=null,y=p8({wideLeft:c},f),k=h8(d),S=m8({disabled:t,trailingHidden:l},h);return g.jsxs(Is,{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 eI=v.createContext(!1);function uf(){return v.useContext(eI)}const Zh=v.createContext(null);function Qh(e){const t=v.useContext(Zh);if(!t)throw new Error(`${e} must be used within LegacyMenu.SubMenu`);return t}function O8(){return Qh("LegacyMenu.SubMenu.useContext")}function n0(){const e=v.useContext(Zh),{setIsOpen:t,dismissCauseRef:n}=LO();return v.useCallback(r=>{n.current="selection",r(!1),e!=null&&t(!1)},[e,t,n])}function r0(e,t,n){const{searchValue:r}=af(n);return t||!r||!e?!0:e.toLowerCase().includes(r.toLowerCase())}const I8=jO("@@menu-item-noop"),M8=new I8({}),tI=v.createContext(null);function D8(){return v.useContext(tI)}function nI({children:e,label:t,ignoreSearch:n=!1,...r}){const s=t??(typeof e=="string"?e:"");return r0(s,n,"LegacyMenu.Item")?g.jsx(rI,{...r,contextPart:"LegacyMenu.Item",itemLabel:s,children:e}):null}function rI({children:e,"data-testid":t,"aria-haspopup":n,"aria-expanded":r,mentionMenuFlatIndex:s,disabled:a=!1,onMouseDown:l,onAuxClick:c,onSelect:f,onKeyDown:d,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:A,variant:M="default",trailingVisibility:B="always",selected:P=!1,radioChecked:N,indent:W=!1,wideLeftSection:$=!1,draggable:F,ref:z,itemLabel:U,referenceRef:H,itemPropsTransform:K,trailingAccessory:q,contextPart:Y}){const{activeIndex:O,setIsOpen:j,getItemProps:V,closeOnSelect:L,virtualFocus:X,activeDescendantIdPrefix:se}=af(Y),{shouldAllowPointerInteraction:ne}=Yi(Y),oe=uf(),le=n0(),ce=sf(),Ee=Di(),be=ce==="body",ue=T??L??!0,{ref:ge,index:Se}=qh({label:U||null}),Ae=O===Se,[ke,xe]=v.useState(!1);e0();const Re=v.useRef(null),Me=v.useId(),ze=F!=null,Fe=F?.mode==="pointer",ye=v.useSyncExternalStore(gi.subscribe,gi.isDragActive,gi.isDragActive),_e=v.useRef(null),ee=v.useRef(null),fe=v.useRef(null),Q=v.useRef(null),re=v.useRef(!1),[we,Pe]=v.useState(null),{ref:Ye,isDragging:Ze}=NF({id:F?.id??`menu-item-${Me}`,data:F?.data??M8,disabled:!ze||Fe||(F?.disabled??!1),dragImageOffset:F?.dragImageOffset,onDragStart:F?.onDragStart,onDragEnd:F?.onDragEnd}),bt=Jc([ge,H,z,ze&&!Fe?Ye:null]),Je=v.useCallback(Ne=>{Re.current=Ne},[]),xt=v.useMemo(()=>({setSubMenuOpen:xe,isSubMenuOpen:ke,registerSubMenuOpener:Je}),[ke,Je]),St=PO(R);v.useEffect(()=>()=>{_e.current?.(),fe.current!=null&&cancelAnimationFrame(fe.current)},[]);const nt=v.useCallback(()=>{fe.current=null;const Ne=ee.current,Tt=Q.current;!Ne||!Tt||(Ne.style.transform=`translate3d(${Tt.x+8}px, ${Tt.y+8}px, 0)`)},[]),rt=v.useCallback(Ne=>{Q.current=Ne,fe.current==null&&(fe.current=requestAnimationFrame(nt))},[nt]),ct=v.useCallback(Ne=>{ee.current=Ne,nt()},[nt]),it=()=>{if(a)return;const Ne={defaultPrevented:!1,preventDefault:()=>{Ne.defaultPrevented=!0}};f?.(Ne),ue&&!Ne.defaultPrevented&&le(j)},ft=Ne=>{if(re.current){re.current=!1,Ne.preventDefault(),Ne.stopPropagation();return}if(!ne(Ne.nativeEvent)){Ne.preventDefault(),Ne.stopPropagation();return}it()},Lt=v.useCallback(Ne=>{if(!ne(Ne.nativeEvent)){Ne.preventDefault(),Ne.stopPropagation();return}if(l?.(Ne),!Ne.defaultPrevented){if(Fe&&F!=null&&!F.disabled&&Ne.button===0){_e.current?.();const Tt=gi.getInstance(),Qt=Ne.currentTarget,rn={clientX:Ne.clientX,clientY:Ne.clientY,isDragging:!1},_n=()=>{document.removeEventListener("mousemove",Yn,!0),document.removeEventListener("mouseup",Br,!0),fe.current!=null&&(cancelAnimationFrame(fe.current),fe.current=null),Q.current=null,_e.current=null,Tt.clearData(),setTimeout(()=>{re.current=!1},0)},Yn=Fn=>{const ri=Fn.clientX-rn.clientX,Fr=Fn.clientY-rn.clientY;if(!(!rn.isDragging&&Math.hypot(ri,Fr)<4)){if(!rn.isDragging){rn.isDragging=!0,re.current=!0,Tt.setData(F.data);const tr=Qt.getBoundingClientRect().width;rt({x:Fn.clientX,y:Fn.clientY}),Pe(tr),F.onPointerDragStart?.(Fn)}Fn.preventDefault(),rt({x:Fn.clientX,y:Fn.clientY}),F.onPointerDragMove?.(Fn)}},Br=Fn=>{if(!rn.isDragging){_n();return}Fn.preventDefault(),Pe(null),F.onPointerDragEnd?.(Fn),_n()};_e.current=_n,document.addEventListener("mousemove",Yn,!0),document.addEventListener("mouseup",Br,!0)}X&&!ze&&Ne.preventDefault()}},[F,ze,Fe,l,rt,ne,X]),Pt=v.useCallback(Ne=>{if(!ne(Ne.nativeEvent)){Ne.preventDefault(),Ne.stopPropagation();return}c?.(Ne)},[c,ne]),At=Ne=>{a||(d?.(Ne),!Ne.defaultPrevented&&((Ne.key==="Enter"||Ne.key===" ")&&(Ne.preventDefault(),Ne.stopPropagation(),it()),Gl(Ne.key,Ee)==="end"&&Re.current&&(Ne.preventDefault(),Ne.stopPropagation(),Re.current())))},Z=V({...of(se,Se),onClick:ft,onKeyDown:At,onMouseDown:Lt,onAuxClick:Pt}),me=K?.(Z)??Z,Le=m!=null?g.jsx(tI.Provider,{value:xt,children:m}):void 0,Xe=Yx(),Ct=Xx(),lt=Zx(),He=E!=null?g.jsxs("div",{className:Xe.className,style:Xe.style,children:[g.jsx("div",{className:Ct.className,style:Ct.style,children:e}),g.jsx("div",{className:lt.className,style:lt.style,"data-component":"menu-item-description",children:E})]}):e,qe=y||ye||ke,De=B==="focused"&&(ye||!Ae),je=Kx({disabled:a,expanded:r===!0,focused:!ye&&Ae,indent:W,inSubmenu:oe,selected:P,variant:M},C),Ie={role:N===void 0?"menuitem":"menuitemradio",tabIndex:Ae?0:-1,...N!==void 0?{"aria-checked":N}:{},...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:Fe?!1:void 0,"data-disabled":a||void 0,"data-focused":!ye&&Ae?!0:void 0,"data-menu-draggable":ze||void 0,"data-selected":P||void 0,"data-has-description":E!=null||void 0,"data-variant":M!=="default"?M:void 0,"data-indent":W||void 0,"data-wide-left":$||void 0,"data-dragging":Ze||we!=null||void 0,...t?{"data-testid":t}:{},...s!==void 0?{"data-mention-menu-flat-index":String(s)}:{},[Vl]:ce,className:je.className,style:je.style,...me},We={className:"ui-u96u03 ui-47corl ui-ixxii4 ui-13vifvy ui-u1ixa1 ui-1so62im ui-18ivbjn"},dt=we!=null&&F?.preview!=null?Mi.createPortal(g.jsx("div",{"aria-hidden":"true",ref:ct,className:We.className,style:{...We.style,width:we},children:F.preview}),document.body):null,Et=be?g.jsxs("li",{ref:bt,...Ie,children:[g.jsx(Ll,{disabled:a,leading:h,trailing:Le,trailingAccessory:q,trailingHidden:De,wideLeft:$,leadingStyle:_,contentStyle:D,trailingStyle:A,children:He}),dt]}):g.jsxs("div",{ref:bt,...Ie,children:[g.jsx(Ll,{disabled:a,leading:h,trailing:Le,trailingAccessory:q,trailingHidden:De,wideLeft:$,leadingStyle:_,contentStyle:D,trailingStyle:A,children:He}),dt]});return b!=null?g.jsx(lf,{closeDelay:S,content:qe?null:b,disabled:qe,openDelay:k,surfaceStyle:St,children:Et}):Et}const iI=v.createContext(null);function sI(e){const t=v.useContext(iI);if(!t)throw new Error(`${e} must be used within LegacyMenu.ExpandableSection`);return t}function L8({children:e,defaultExpanded:t=!1,expanded:n,onExpandedChange:r}){const[s,a]=v.useState(t),l=n!==void 0,c=l?n:s,f=h=>{l||a(h),r?.(h)},d=()=>f(!c);return g.jsx(iI.Provider,{value:{expanded:c,setExpanded:f,toggle:d},children:e})}function j8({children:e,contentStyle:t,leading:n,leadingStyle:r,rootStyle:s,trailing:a,trailingStyle:l,label:c}){const{expanded:f,setExpanded:d,toggle:h}=sI("LegacyMenu.ExpandableSectionTrigger"),m=Di(),b=typeof n=="function"?n(f):n,y=k=>{const S=Gl(k.key,m);if(S==="end"&&!f){k.preventDefault(),k.stopPropagation(),d(!0);return}S==="start"&&f&&(k.preventDefault(),k.stopPropagation(),d(!1))};return g.jsx(nI,{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 z8({children:e}){const{expanded:t}=sI("LegacyMenu.ExpandableSectionContent");return t?g.jsx(g.Fragment,{children:e}):null}function P8({children:e,label:t,ignoreSearch:n,...r}){const s=t??(typeof e=="string"?e:"");return r0(s,n,"LegacyMenu.CheckboxItem")?g.jsx($8,{...r,itemLabel:s,children:e}):null}function $8({children:e,"data-testid":t,checked:n,defaultChecked:r=!1,onChange:s,disabled:a=!1,trailing:l,description:c,tooltip:f,tooltipOpenDelay:d=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:_,activeDescendantIdPrefix:D}=af("LegacyMenu.CheckboxItem"),{shouldAllowPointerInteraction:A}=Yi("LegacyMenu.CheckboxItem"),M=uf(),B=n0(),P=sf(),N=P==="body",W=b??_??!1,[$,F]=v.useState(r),z=n!==void 0,U=z?n:$,{ref:H,index:K}=qh({label:y||null}),q=T===K,Y=e0(),O=PO(m),j=v.useCallback(()=>{if(a)return;const ke=!U;z||F(ke);const xe={defaultPrevented:!1,preventDefault:()=>{xe.defaultPrevented=!0}};s?.(ke,xe),W&&!xe.defaultPrevented&&B(C)},[a,U,z,s,W,C,B]),V=v.useCallback(ke=>{if(!A(ke.nativeEvent)){ke.preventDefault(),ke.stopPropagation();return}ke.preventDefault(),ke.stopPropagation(),j()},[j,A]),L=v.useCallback(ke=>{a||(ke.key==="Enter"||ke.key===" ")&&(ke.preventDefault(),ke.stopPropagation(),j())},[a,j]),X=E({...of(D,K),onClick:V,onKeyDown:L}),se=c!=null,ne=Kx({disabled:a,focused:q,inSubmenu:M},k),oe={role:"menuitemcheckbox","aria-checked":U,tabIndex:q?0:-1,"aria-disabled":a||void 0,"data-checked":U||void 0,"data-component":"menu-row","data-disabled":a||void 0,"data-focused":q||void 0,"data-has-description":se||void 0,...t?{"data-testid":t}:{},[Vl]:P,className:ne.className,style:ne.style,...X},le=g.jsx(FA,{checked:U,disabled:a}),ce=Yx(),Ee=Xx(),be=Zx(),ue=se?g.jsxs("div",{className:ce.className,style:ce.style,children:[g.jsx("div",{className:Ee.className,style:Ee.style,children:e}),g.jsx("div",{className:be.className,style:be.style,"data-component":"menu-item-description",children:c})]}):e,ge=g.jsx(Ll,{disabled:a,leading:le,trailing:l,contentStyle:S,trailingStyle:R,children:ue}),Se=f!=null&&Y!=null,Ae=N?g.jsx("li",{ref:H,...oe,children:ge}):g.jsx("div",{ref:H,...oe,children:ge});return Se?g.jsx(JO,{closeDelay:h,content:f,openDelay:d,surfaceStyle:O,children:Ae}):f!=null?g.jsx(lO,{content:f,placement:"right",offset:6,openDelay:d,closeDelay:Jx(h),sameAxisOnly:!0,surfaceStyle:[$x(),O],children:Ae}):Ae}function Jb(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 B8(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 F8(e){const{accept:t,disabled:n=!1,acceptData:r,acceptNativeTypes:s,onDragEnter:a,onDragOver:l,onDragLeave:c,onDrop:f}=e,d=v.useRef(null),h=v.useRef(null),m=v.useRef(0),b=v.useRef(null),[y,k]=v.useState(!1),[S,R]=v.useState(!1),T=v.useRef(y);T.current=y;const E=v.useCallback(()=>{m.current=0,k(!1),R(!1)},[]),C=v.useCallback(()=>{b.current!==null&&(cancelAnimationFrame(b.current),b.current=null)},[]);v.useEffect(()=>{if(!y)return;const P=h.current?.ownerDocument??document,N=()=>{C(),E()};return P.addEventListener("mousemove",N,!0),()=>{P.removeEventListener("mousemove",N,!0)}},[y,C,E]);const _=v.useRef({onDragEnter:a,onDragOver:l,onDragLeave:c,onDrop:f});_.current={onDragEnter:a,onDragOver:l,onDragLeave:c,onDrop:f};const D=v.useRef(s);D.current=s;const A=v.useRef(Array.isArray(t)?t:[t]);A.current=Array.isArray(t)?t:[t];const M=v.useRef(r);M.current=r;const B=v.useCallback(P=>{if(h.current=P,d.current&&(d.current(),d.current=null),m.current=0,P!==null&&(k(!1),R(!1)),!P||n)return;const N=gi.getInstance(),W=()=>{if(n)return null;const j=N.getValidatedData(A.current);return j&&(M.current?.(j)??!0)?j:null},$=j=>{if(m.current++,m.current===1){k(!0);const V=W();R(V!==null||!n&&Jb(j,D.current)),_.current.onDragEnter?.(j,V)}},F=j=>{m.current=Math.max(0,m.current-1),m.current===0&&(C(),E(),_.current.onDragLeave?.(j))},z=j=>{const V=W(),L=V!==null,X=!L&&!n&&Jb(j,D.current);(L||X)&&(j.preventDefault(),j.dataTransfer&&(j.dataTransfer.dropEffect=L?"move":"copy"),m.current===0&&(m.current=1,k(!0),R(!0),_.current.onDragEnter?.(j,V)),_.current.onDragOver&&b.current===null&&(b.current=requestAnimationFrame(()=>{b.current=null,_.current.onDragOver?.(j,V)})))},U=j=>{j.preventDefault(),C(),E();const V=W();if(V){const{onDrop:L}=_.current;L&&(L(j,V),j.stopPropagation())}else if(Jb(j,D.current)){const{onDrop:L}=_.current;L&&(L(j,null),j.stopPropagation())}};P.addEventListener("dragenter",$),P.addEventListener("dragleave",F),P.addEventListener("dragover",z),P.addEventListener("drop",U);const H=P.ownerDocument,K=()=>{(m.current!==0||T.current)&&(C(),E())},q=()=>K(),Y=()=>K(),O=j=>{B8(j,H)&&K()};H.addEventListener("drop",q,!0),H.addEventListener("dragend",Y,!0),H.addEventListener("dragleave",O,!0),d.current=()=>{P.removeEventListener("dragenter",$),P.removeEventListener("dragleave",F),P.removeEventListener("dragover",z),P.removeEventListener("drop",U),H.removeEventListener("drop",q,!0),H.removeEventListener("dragend",Y,!0),H.removeEventListener("dragleave",O,!0),b.current!==null&&(cancelAnimationFrame(b.current),b.current=null)}},[n,E,C]);return v.useEffect(()=>()=>{d.current&&(d.current(),d.current=null)},[]),{ref:B,isOver:y,canDrop:S,isDropBlocked:y&&!S}}function U8(){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 q8=300,oI=v.createContext(null);function nh({children:e}){const[t,n]=v.useState(null),r=U8(),s=v.useCallback(c=>{r.cancel(),n(c)},[r]),a=v.useCallback(c=>{r.schedule(()=>{n(f=>f===c?null:f)},q8)},[r]),l=v.useMemo(()=>({activeId:t,markOpen:s,markClosed:a}),[t,s,a]);return g.jsx(oI.Provider,{value:l,children:e})}function H8(e,t){const n=v.useContext(oI),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 V8=jO("@@menu-content-noop");function G8({children:e,header:t,footer:n,attachment:r,"aria-label":s,popupRole:a="menu","data-testid":l,className:c,surfaceStyle:f,contentStyle:d,layoutStyle:h,listStyle:m,scrollAreaStyles:b,style:y,dropIndicatorTop:k,maxHeight:S,width:R,minWidth:T,maxWidth:E,tooltipPlacement:C,size:_,backdrop:D,adaptiveHeight:A=!0,returnFocus:M,onKeyDownCapture:B,onBodyPointerEnter:P,droppable:N,ref:W}){const $=ya(),{isOpen:F,isMounted:z,activeIndex:U,setActiveIndex:H,setIsOpen:K,markKeyboardNavigation:q,markPointerNavigation:Y,virtualFocus:O,searchValue:j,setSearchValue:V,hasSearchInput:L,searchInputRef:X,enableHover:se,closeOnSelect:ne,nodeId:oe,activeDescendantIdPrefix:le,listRef:ce,labelsRef:Ee,refs:be,floatingStyles:ue,middlewareData:ge,transitionStyles:Se,context:Ae,getFloatingProps:ke,getItemProps:xe,dismissCauseRef:Re,returnFocusOnSelect:Me,returnFocus:ze}=Yi("LegacyMenu.Content"),Fe=D??!se,[ye,_e]=v.useState(null),ee=O&&!L,fe=Yh(),Q=v.useSyncExternalStore(gi.subscribe,gi.isDragActive,gi.isDragActive),re=Ae.placement.startsWith("top"),we=re&&z?ge.bottomAnchor?.bottom??null:null,Pe=v.useRef(null),Ye=v.useRef(U),Ze=v.useRef(!1);v.useLayoutEffect(()=>{Ye.current=U},[U]),v.useLayoutEffect(()=>{if(!F){Ze.current=!1;return}const Ne=_n=>{RO(_n)&&(Ze.current=!0,q())},Tt=_n=>{const Yn=NO(_n,ce);Yn==null||Yn===Ye.current||H(Yn)},Qt=_n=>{const Yn=Ze.current;Ze.current=!1,Y(),Yn&&Tt(_n.target)};document.addEventListener("keydown",Ne,!0);const rn=lF(ye,Qt);return()=>{document.removeEventListener("keydown",Ne,!0),rn()}},[F,ce,q,Y,ye,H]),v.useLayoutEffect(()=>{if(!F){Pe.current=null;return}if(!O||U==null||Pe.current===U||(Pe.current=U,!Ze.current))return;const Ne=ce.current[U]??null;if(!Ne)return;const Tt=requestAnimationFrame(()=>{Ne.scrollIntoView({block:"nearest",inline:"nearest"})});return()=>cancelAnimationFrame(Tt)},[F,O,U,ce]);const bt=v.useCallback(Ne=>{if(Ne.key==="Escape"){Re.current="escape";return}if(Ne.ctrlKey&&!Ne.metaKey){const Qt=Ne.key.toLowerCase(),rn=Qt==="n"||Qt==="j";if(rn||(Qt==="p"||Qt==="k")){Ne.preventDefault();const Yn=ce.current,Br=Yn.length;if(Br===0)return;const Fn=Ye.current,ri=rn?1:-1;let Fr=Fn==null?rn?0:Br-1:Fn+ri;for(;Fr>=0&&Fr<Br;){if(Yn[Fr]!=null){H(Fr);return}Fr+=ri}return}}if(!L)return;if(Ne.key.length===1&&!Ne.ctrlKey&&!Ne.metaKey&&!Ne.altKey){if(document.activeElement===X.current)return;Ne.preventDefault(),Ne.stopPropagation(),X.current?.focus(),V(j+Ne.key),AO(ce,"body",H)}},[Re,L,ce,X,j,H,V]),Je=v.useCallback(Ne=>{fe(Ne.nativeEvent)&&(Re.current="backdrop",K(!1))},[Re,K,fe]),xt=v.useCallback(Ne=>{if(Ne.stopPropagation(),!fe(Ne.nativeEvent))return;Ne.preventDefault(),Re.current="backdrop",K(!1);const rn=document.elementsFromPoint(Ne.clientX,Ne.clientY).find(_n=>!_n.classList.contains(Fx));rn&&rn.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:Ne.clientX,clientY:Ne.clientY,screenX:Ne.screenX,screenY:Ne.screenY,button:Ne.button,buttons:Ne.buttons,ctrlKey:Ne.ctrlKey,shiftKey:Ne.shiftKey,altKey:Ne.altKey,metaKey:Ne.metaKey}))},[Re,K,fe]),St=N!=null,{ref:nt,isOver:rt,isDropBlocked:ct}=F8({accept:N?.accept??V8,disabled:!St||(N?.disabled??!1),onDragEnter:N?.onDragEnter,onDragOver:N?.onDragOver,onDragLeave:N?.onDragLeave,onDrop:N?.onDrop}),it=Jc([be.setFloating,_e,W,St?nt:null]),ft=va(),{zIndex:Lt,portalLayerStyles:Pt}=ql("popover",z);if(!z)return null;const At=_??$?.menuSize??"sm",Z={...ue,...Se,...Pt,...Lt!==null?{zIndex:Lt}:{},...y,...k!==void 0?{"--ui-menu-drop-indicator-top":`${k}px`}:{},...Lx({width:R,minWidth:T,maxWidth:E}),...re&&we!==null?{top:"auto",bottom:we}:{},...jx({isOpen:F,isPositioned:Ae.isPositioned})},me={...Pt,...Lt!==null?{zIndex:Lt-1}:{},pointerEvents:St&&Q?"none":void 0},Le=A?DO(S):S,Xe=r!=null,Ct=a==="dialog",lt=ZO(me),He=Ux({className:c,hasDropIndicator:k!==void 0,size:At,surfaceStyle:f,style:Xe&&Le!==void 0?{...Z,maxHeight:Le}:Z,hasAttachment:Xe}),qe=Vx(Xe||Le===void 0?void 0:{maxHeight:Le},Xe,h),De=Gx(),je=Hx(d),Ie=qx(!1,m),We=Wx(),dt=c8(),Et=u8();return g.jsxs(Ax,{...ft?{root:ft}:{},children:[Fe&&g.jsx("div",{className:lt.className,style:lt.style,"data-component":"menu-backdrop",onClick:Je,onContextMenu:xt,role:"none"}),g.jsx(Ox,{context:Ae,initialFocus:ee?-1:X,returnFocus:M??ze??(Re.current!=="backdrop"&&(Re.current!=="selection"||Me)),modal:!ee,children:g.jsxs("div",{ref:it,className:He.className,style:He.style,tabIndex:-1,"data-component":"menu-popup","data-size":At,"data-drop-active":St&&rt&&!ct?"":void 0,"data-drop-blocked":St&&ct?"":void 0,...l?{"data-testid":l}:{},...Xe?{"aria-label":s??"Menu"}:{},...ke({...Ct?{role:"dialog","aria-label":s??"Menu","aria-labelledby":void 0,"aria-orientation":void 0}:{},onKeyDown:bt,onKeyDownCapture:B,onMouseDown:O?Ne=>{Ne.stopPropagation()}:void 0}),children:[St&&N?.indicator!=null?g.jsx("div",{"aria-hidden":"true",className:Et.className,style:Et.style,children:N.indicator}):null,g.jsx(Is,{menuSize:At,children:g.jsx(cO,{dismiss:!F,children:g.jsx(t0,{layerNodeId:oe,placement:C,children:g.jsx(BO,{activeIndex:U,setIsOpen:K,getItemProps:xe,searchValue:j,closeOnSelect:ne,virtualFocus:O,activeDescendantIdPrefix:le,children:g.jsx(nh,{children:g.jsxs(TN,{elementsRef:ce,labelsRef:Ee,children:[g.jsxs("div",{className:qe.className,style:qe.style,"data-component":"menu-layout",...Xe||Ct?{}:{role:"menu","aria-label":s??"Menu"},children:[t!=null?g.jsx("div",{className:De.className,style:De.style,"data-component":"menu-header",children:g.jsx(Es,{value:"header",children:t})}):null,g.jsx(Nl,{className:XO,rootStyle:[zO(),b?.root],viewportStyle:b?.viewport,contentStyle:b?.content,maxHeight:"none","data-component":"menu-body-scroll",children:g.jsx("div",{className:je.className,style:je.style,"data-component":"menu-content",onPointerEnter:P,children:g.jsx("ul",{role:"presentation",className:Ie.className,style:Ie.style,"data-component":"menu-list",children:e})})}),n!=null?g.jsx("div",{className:We.className,style:We.style,"data-component":"menu-footer",children:g.jsx(Es,{value:"footer",children:n})}):null]}),r!=null?g.jsx("div",{className:dt.className,style:dt.style,"data-component":"menu-attachment",children:g.jsx("div",{className:je.className,style:je.style,"data-component":"menu-content",children:g.jsx(Es,{value:"footer",children:r})})}):null]})})})})})})]})})]})}function W8({children:e,indent:t=!1,rootStyle:n}){const r=E8(t,n);return g.jsx("div",{className:r.className,style:r.style,"data-component":"menu-empty","data-indent":t||void 0,children:e})}function aI(e){const t=v.useContext(Zh),n=v.useContext(zx),r=t??n;if(!r)throw new Error(`${e} must be used within LegacyMenu or LegacyMenu.SubMenu`);return r}function K8(){return aI("LegacyMenu.useLayerContext")}function Y8({children:e}){const t=T8();return g.jsxs("div",{className:t.className,style:t.style,role:"status","aria-live":"polite","aria-busy":"true",children:[g.jsx(qt,{name:"loading",size:"base",modifier:"spin",className:_8}),g.jsx("span",{children:e??"Loading..."})]})}function X8({placeholder:e="Search...","aria-label":t,className:n,rootStyle:r,inputGroupRootStyle:s,value:a,onValueChange:l,autoFocus:c=!1}){const d=sf()==="body",h=uf(),m=Di(),{searchValue:b,setSearchValue:y,searchInputRef:k,activeIndex:S,setActiveIndex:R,listRef:T,setHasSearchInput:E,activeDescendantIdPrefix:C}=aI("LegacyMenu.SearchInput"),_=v.useRef(null),D=a!==void 0&&l!==void 0,M=!D||c||h?k:_,B=D?a:b;v.useEffect(()=>{if(!D)return E(!0),()=>E(!1)},[D,E]),v.useLayoutEffect(()=>{if(D&&!c)return;const F=k.current;if(!F)return;F.focus({preventScroll:!0});const z=requestAnimationFrame(()=>{document.activeElement!==F&&F.focus({preventScroll:!0})});return()=>cancelAnimationFrame(z)},[D,c,k]);const P=F=>{D?l(F.target.value):(y(F.target.value),AO(T,"body",R),l?.(F.target.value))},N=F=>{if(Mx(F))return;if(F.ctrlKey&&!F.metaKey){const q=F.key.toLowerCase();if(q==="n"||q==="p"||q==="j"||q==="k"){F.preventDefault();return}}if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Tab","Escape"].includes(F.key)&&!F.metaKey&&!F.ctrlKey&&!F.altKey&&F.stopPropagation(),D&&F.key==="Enter"){F.preventDefault(),F.stopPropagation();return}if(!D&&F.key==="Enter"&&S!=null){F.preventDefault();const q=T.current[S];q&&(q.click(),k.current?.focus())}if(F.key!=="ArrowLeft"&&F.key!=="ArrowRight")return;const U=F.currentTarget,H=Gl(F.key,m)==="end"?U.value.length:0;if(!(U.selectionStart===H&&U.selectionEnd===H)){F.stopPropagation();return}uF({event:F,direction:F.key,activeIndex:S,listRef:T,restoreFocus:()=>k.current?.focus()})},W=v8(n,r),$=g.jsx(rf,{ref:M,type:"text",variant:"unfilled",size:"md",inputGroupRootStyle:s,value:B,onChange:P,onKeyDown:N,placeholder:e,"aria-label":t??"Search menu items","aria-activedescendant":CO(C,S)});return d?g.jsx("li",{className:W.className,style:W.style,"data-component":"menu-search-row",role:"none",children:$}):g.jsx("div",{className:W.className,style:W.style,"data-component":"menu-search-row",role:"none",children:$})}function Z8(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 Q8({children:e,title:t,dividerVisibility:n="default",trailingDividerVisibility:r="default",textAction:s,titleTrailing:a,tooltip:l,noDivider:c,rootStyle:f,titleStyle:d}){const h=v.useRef(null),m=Z8(h),b=x8(f),y=s!=null||a!=null,k=QO(y,d),S=k8(),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(lf,{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 lI({children:e,trigger:t="hover",placement:n,anchorRef:r,offset:s,keepHoverSubmenuInset:a=!1,closeOnSelect:l,open:c,defaultOpen:f=!1,onOpenChange:d,hoverOpenDelay:h,keepOpenOnHoverOut:m=!1,dismissOnReferenceScroll:b=!1,suppressSiblingPointerGuard:y=!1,virtualFocus:k=!1,focusItemOnOpen:S}){const R=Cx(),T=Di(),[E,C]=Dl(c,f,d,"LegacyMenu.SubMenu"),_=c!==void 0,D=t==="hover"&&(!_||r==null),[A,M]=v.useState(null),{focusItemOnHoverEnabled:B,markKeyboardNavigation:P,markPointerNavigation:N,resetFocusItemOnHover:W}=IO(),[$,F]=v.useState(""),[z,U]=v.useState(!1),H=v.useRef([]),K=v.useRef([]),q=v.useRef(null),Y=v.useId(),O=v.useRef(null),j=v.useRef(new Set);N8(R,E);const V=D8();v.useEffect(()=>{V&&V.setSubMenuOpen(E)},[E,V]);const L=v.useRef(E);v.useEffect(()=>{const rt=L.current;L.current=E,rt!==E&&(F(""),E||M(null),W())},[E,W]);const X=v.useCallback(rt=>{C(rt)},[C]);v.useEffect(()=>{if(V)return V.registerSubMenuOpener(()=>X(!0)),()=>{V.registerSubMenuOpener(null)}},[V,X]);const se=v.useCallback((rt,ct,it)=>{const ft=q.current;!rt&&t==="hover"&&(it==="hover"||it==="safe-polygon")&&(m||ft?.value&&ft.ownerDocument.activeElement===ft)||X(rt)},[m,X,t]),ne=v.useCallback(()=>{X(!1)},[X]),le=n??(t==="hover"?T==="rtl"?"left-start":"right-start":"bottom-start"),ce={mainAxis:-2,alignmentAxis:-2},ue=s??(a?ce:t==="hover"?ce:4),{refs:ge,floatingStyles:Se,context:Ae}=Ix({nodeId:R,open:E,onOpenChange:se,placement:le,middleware:[ix(ue),ox(),sx({crossAxis:le.startsWith("left")||le.startsWith("right")}),ax({padding:8,apply({availableWidth:rt,availableHeight:ct,elements:it}){it.floating.style.setProperty(MO,`${Math.max(0,Math.floor(rt))}px`),it.floating.style.setProperty(Dx,`${Math.max(0,Math.floor(ct))}px`)}})],whileElementsMounted:Lp,transform:!1});v.useLayoutEffect(()=>{const rt=r?.current;rt&&ge.setReference(rt)}),mF(D&&E&&!y,ge.domReference);const{activeId:ke}=H8(R,E),xe=ke!=null?0:h??75,Re=NN(Ae,{enabled:D,delay:{open:xe},handleClose:UN({blockPointerEvents:!1,requireIntent:!1})}),Me=DN(Ae,{enabled:t==="click"&&!_}),ze=Yh(),Fe=LN(Ae,{ancestorScroll:b,bubbles:!0,outsidePressEvent:"click",outsidePress:ze}),ye=PN(Ae,{role:"menu"}),_e=zN(Ae,{listRef:H,activeIndex:A,onNavigate:M,nested:!0,rtl:T==="rtl",loop:!0,focusItemOnOpen:k?!1:S??!0,virtual:z||k,focusItemOnHover:B&&!k}),ee=BN(Ae,{listRef:K,activeIndex:A,onMatch:z?void 0:M,enabled:!z&&!k}),{getReferenceProps:fe,getFloatingProps:Q,getItemProps:re}=jN([Re,Me,Fe,ye,_e,ee]),we=OO(re,E),Pe=v.useCallback(rt=>{const{role:ct,...it}=_O(fe(rt));return it},[fe]),Ye=v.useCallback(rt=>{const ct=j.current;return ct.add(rt),()=>{ct.delete(rt)}},[]),Ze=v.useCallback(()=>O.current!==null,[]),bt=v.useCallback(rt=>{O.current=rt;for(const ct of j.current)ct();r||ge.setReference(rt)},[r,ge.setReference]),Je=v.useCallback(()=>({...Pe(),id:Y,ref:bt,"aria-haspopup":"menu","aria-expanded":E}),[Pe,bt,Y,E]),{isMounted:xt,styles:St}=$N(Ae,{duration:{open:0,close:hF},initial:{opacity:0,transform:"scale(1)"}}),nt=v.useMemo(()=>({isOpen:E,isMounted:xt,setIsOpen:X,closeFromKeyboard:ne,activeIndex:A,setActiveIndex:M,markKeyboardNavigation:P,markPointerNavigation:N,trigger:t,closeOnSelect:l,nodeId:R,activeDescendantIdPrefix:z?R:void 0,listRef:H,labelsRef:K,searchInputRef:q,searchValue:$,setSearchValue:F,hasSearchInput:z,setHasSearchInput:U,triggerId:Y,subscribeTriggerElement:Ye,hasTriggerElement:Ze,refs:ge,floatingStyles:Se,transitionStyles:St,context:Ae,getReferenceProps:Pe,getFloatingProps:Q,getItemProps:we,getTriggerProps:Je,virtualFocus:k}),[E,xt,X,ne,A,t,P,N,l,R,$,z,Y,Ye,Ze,k,ge,Se,St,Ae,Pe,Q,we,Je]);return g.jsx(_x,{id:R,children:g.jsx(Zh.Provider,{value:nt,children:e})})}function J8({children:e,disabled:t=!1,label:n,leading:r,leadingStyle:s,trailing:a,contentStyle:l,trailingStyle:c}){const{activeIndex:f,getItemProps:d,activeDescendantIdPrefix:h}=af("LegacyMenu.SubMenuTrigger"),{shouldAllowPointerInteraction:m}=Yi("LegacyMenu.SubMenuTrigger"),b=Qh("LegacyMenu.SubMenuTrigger"),y=sf(),k=Di(),S=y==="body",R=n??(typeof e=="string"?e:""),{ref:T,index:E}=qh({label:R||null}),C=f===E,_=Jc([T,b.refs.setReference]),D=g.jsx(qt,{name:"chevron-right",color:"tertiary"}),A=d8({disabled:t,expanded:b.isOpen,focused:C}),M={role:"menuitem","aria-haspopup":"menu","aria-expanded":b.isOpen,"data-component":"menu-submenu-trigger","data-expanded":b.isOpen||void 0,tabIndex:C?0:-1,"aria-disabled":t||void 0,"data-disabled":t||void 0,"data-focused":C||void 0,[Vl]:y,className:A.className,style:A.style,...b.getReferenceProps(d({...of(h,E),onMouseDown(N){m(N.nativeEvent)||(N.preventDefault(),N.stopPropagation())},onClick(N){if(!m(N.nativeEvent)){N.preventDefault(),N.stopPropagation();return}!t&&b.trigger==="hover"&&b.setIsOpen(!0)},onKeyDown(N){(Gl(N.key,k)==="end"||N.key==="Enter"||N.key===" ")&&!t&&(N.preventDefault(),N.stopPropagation(),b.setIsOpen(!0))}}))},B=w8(),P=g.jsx(Ll,{disabled:t,leading:r,leadingStyle:s,contentStyle:l,trailing:a!=null?g.jsx("div",{className:B.className,style:B.style,"data-component":"menu-submenu-right-section",children:a}):void 0,rightFallback:D,trailingStyle:c,children:e});return S?g.jsx("li",{ref:_,...M,children:P}):g.jsx("div",{ref:_,...M,children:P})}function eq({children:e,label:t,showChevron:n=!0,onKeyDown:r,closeOnSelect:s,...a}){const l=Qh("LegacyMenu.SubMenuItem"),c=Di(),f=t??(typeof e=="string"?e:""),d=m=>{a.disabled||(r?.(m),!m.defaultPrevented&&Gl(m.key,c)==="end"&&(m.preventDefault(),m.stopPropagation(),l.setIsOpen(!0)))},h=n?g.jsx(qt,{name:"chevron-right",color:"tertiary"}):void 0;return g.jsx(rI,{...a,contextPart:"LegacyMenu.SubMenuItem",itemLabel:f,closeOnSelect:s??l.closeOnSelect,"aria-haspopup":"menu","aria-expanded":l.isOpen,referenceRef:l.refs.setReference,itemPropsTransform:l.getReferenceProps,onKeyDown:d,trailingAccessory:h,children:e})}function tq({children:e,header:t,footer:n,"aria-label":r,"data-testid":s,onPointerEnter:a,keepSearchFocus:l=!1,className:c,surfaceStyle:f,contentStyle:d,listStyle:h,width:m,minWidth:b,maxWidth:y,maxHeight:k,size:S,contentPadding:R}){const T=ya(),E=Qh("LegacyMenu.SubMenuContent"),C=Di(),_=va(),{portalLayerStyles:D}=ql("popover",E.isMounted),A=S??T?.menuSize??"sm",{virtualFocus:M}=E,B=v.useSyncExternalStore(E.subscribeTriggerElement,E.hasTriggerElement,()=>!1);if(!E.isMounted)return null;const P={...E.floatingStyles,...E.transitionStyles,...D,...Lx({width:m,minWidth:b,maxWidth:y,clampToAvailableWidth:!0}),...jx({isOpen:E.isOpen,isPositioned:E.context.isPositioned})},N=Ux({className:c,size:A,surfaceStyle:f,style:P}),W=Hx(d),$=qx(!1,h),F=DO(k),z=t!=null||n!=null,U=Vx(z?{maxHeight:F}:void 0),H=Gx(),K=Wx(),q=R===void 0?W.style:{...W.style,padding:R,scrollPaddingBlock:R},Y=V=>{V.stopPropagation()},O=B?E.triggerId:void 0,j=V=>{E.markPointerNavigation();const L=NO(V,E.listRef);if(L!=null&&L!==E.activeIndex&&E.setActiveIndex(L),!l||L==null)return;const X=E.searchInputRef.current;if(X==null)return;const se=X.ownerDocument.activeElement;se!==X&&(se instanceof HTMLInputElement||se instanceof HTMLTextAreaElement||X.focus({preventScroll:!0}))};return g.jsx(Ax,{..._?{root:_}:{},children:g.jsx(Ox,{context:E.context,disabled:M,initialFocus:E.hasSearchInput?E.searchInputRef:-1,returnFocus:!1,modal:!1,closeOnFocusOut:E.trigger==="click",children:g.jsx("div",{ref:E.refs.setFloating,className:N.className,style:N.style,"data-component":"menu-popup","data-submenu":"","data-size":A,...s?{"data-testid":s}:{},...E.getFloatingProps({...O===void 0?{}:{"aria-labelledby":O},onClick:Y,onPointerEnter:a,onMouseMove(V){j(V.target)},onPointerMove(V){j(V.target)},onKeyDown(V){if(RO(V)&&E.markKeyboardNavigation(),Gl(V.key,C)==="start"||V.key==="Escape"){V.preventDefault(),V.stopPropagation(),E.closeFromKeyboard();const L=E.refs.domReference.current;L instanceof HTMLElement&&L.focus()}}}),children:g.jsx(eI.Provider,{value:!0,children:g.jsx(Is,{menuSize:A,children:g.jsx(t0,{layerNodeId:E.nodeId,children:g.jsx(BO,{activeIndex:E.activeIndex,setIsOpen:E.setIsOpen,getItemProps:E.getItemProps,searchValue:E.searchValue,closeOnSelect:E.closeOnSelect,virtualFocus:M,activeDescendantIdPrefix:E.activeDescendantIdPrefix,children:g.jsx(TN,{elementsRef:E.listRef,labelsRef:E.labelsRef,children:z?g.jsxs("div",{className:U.className,style:U.style,role:"menu","aria-label":r??"Submenu","data-component":"menu-layout",children:[t!=null?g.jsx("div",{className:H.className,style:H.style,"data-component":"menu-header",children:g.jsx(Es,{value:"header",children:t})}):null,g.jsx(Nl,{className:XO,rootStyle:zO(),maxHeight:"none","data-component":"menu-body-scroll",children:g.jsx("div",{className:W.className,style:q,"data-component":"menu-content",children:g.jsx("ul",{role:"presentation",className:$.className,style:$.style,"data-component":"menu-list",children:g.jsx(Es,{value:"body",children:g.jsx(nh,{children:e})})})})}),n!=null?g.jsx("div",{className:K.className,style:K.style,"data-component":"menu-footer",children:g.jsx(Es,{value:"footer",children:n})}):null]}):g.jsx(Nl,{maxHeight:F,children:g.jsx("div",{className:W.className,style:q,"data-component":"menu-content",children:g.jsx("ul",{role:"menu","aria-label":r??"Submenu",className:$.className,style:$.style,"data-component":"menu-list",children:g.jsx(Es,{value:"body",children:g.jsx(nh,{children:e})})})})})})})})})})})})})}function nq({children:e,label:t,ignoreSearch:n,...r}){const s=t??(typeof e=="string"?e:"");return r0(s,n,"LegacyMenu.SwitchItem")?g.jsx(rq,{...r,itemLabel:s,children:e}):null}function rq({children:e,"data-testid":t,checked:n,defaultChecked:r=!1,onChange:s,disabled:a=!1,switchVariant:l,leading:c,leadingStyle:f,trailing:d,contentStyle:h,trailingStyle:m,rootStyle:b,tooltip:y,closeOnSelect:k,itemLabel:S}){const{activeIndex:R,getItemProps:T,setIsOpen:E,closeOnSelect:C,activeDescendantIdPrefix:_}=af("LegacyMenu.SwitchItem"),{shouldAllowPointerInteraction:D}=Yi("LegacyMenu.SwitchItem"),A=uf(),M=n0(),B=sf(),P=B==="body",N=k??C??!1,[W,$]=v.useState(r),F=n!==void 0,z=F?n:W,{ref:U,index:H}=qh({label:S||null}),K=R===H,q=v.useCallback(()=>{if(a)return;const ne=!z;F||$(ne);const oe={defaultPrevented:!1,preventDefault:()=>{oe.defaultPrevented=!0}};s?.(ne,oe),N&&!oe.defaultPrevented&&M(E)},[a,z,F,s,N,E,M]),Y=v.useCallback(ne=>{if(!D(ne.nativeEvent)){ne.preventDefault(),ne.stopPropagation();return}ne.preventDefault(),ne.stopPropagation(),q()},[q,D]),O=v.useCallback(ne=>{a||(ne.key==="Enter"||ne.key===" ")&&(ne.preventDefault(),ne.stopPropagation(),q())},[a,q]),j=T({...of(_,H),onClick:Y,onKeyDown:O}),V=f8({disabled:a,focused:K,inSubmenu:A},b),L={role:"menuitemcheckbox","aria-checked":z,tabIndex:K?0:-1,"aria-disabled":a||void 0,"data-checked":z||void 0,"data-component":"menu-toggle-row","data-disabled":a||void 0,"data-focused":K||void 0,...t?{"data-testid":t}:{},[Vl]:B,className:V.className,style:V.style,...j},X=g.jsx(Ll,{disabled:a,leading:c,leadingStyle:f,contentStyle:h,trailing:d,trailingStyle:m,trailingAccessory:g.jsx(P9,{checked:z,disabled:a,size:"sm",variant:l}),children:e}),se=P?g.jsx("li",{ref:U,...L,children:X}):g.jsx("div",{ref:U,...L,children:X});return y!=null?g.jsx(lf,{content:y,openDelay:0,closeDelay:0,children:se}):se}function iq({title:e,subtitle:t,inline:n=!1,wrapSubtitle:r=!1}){const s=g8(n),a=b8(n),l=y8({inline:n,wrap:r});return g.jsxs("div",{className:s.className,style:s.style,"data-inline":n||void 0,children:[g.jsx(Qp,{size:"md",weight:"regular",color:"primary",className:a.className,style:a.style,children:e}),t!=null?g.jsx(Qp,{size:"sm",weight:"regular",color:"tertiary",className:l.className,style:l.style,"data-wrap":r||void 0,children:t}):null]})}const sq={title:{kZKoxP:"ui-xk0z11",kB7OPa:"ui-9f619",kVQacm:"ui-b3r6kr",$$css:!0}};function oq({title:e,divider:t}){const n=QO(!1,sq.title),r=S8();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 Ac=typeof window<"u"?v.useLayoutEffect:v.useEffect;function ST(e){if(e!==void 0)switch(typeof e){case"number":return e;case"string":{if(e.endsWith("px"))return parseFloat(e);break}}}function aq({box:e,defaultHeight:t,defaultWidth:n,disabled:r,element:s,mode:a,style:l}){const{styleHeight:c,styleWidth:f}=v.useMemo(()=>({styleHeight:ST(l?.height),styleWidth:ST(l?.width)}),[l?.height,l?.width]),[d,h]=v.useState({height:t,width:n}),m=r||c!==void 0||a==="only-width"||c!==void 0&&f!==void 0;return Ac(()=>{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,f]),v.useMemo(()=>({height:c??d.height,width:f??d.width}),[d,c,f])}function lq(e){const t=v.useRef(()=>{throw new Error("Cannot call during render.")});return Ac(()=>{t.current=e},[e]),v.useCallback(n=>t.current?.(n),[t])}function ey({containerElement:e,direction:t,isRtl:n,scrollOffset:r}){return r}function yo(e,t="Assertion error"){if(!e)throw console.error(t),Error(t)}function yc(e,t){if(e===t)return!0;if(!!e!=!!t||(yo(e!==void 0),yo(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 uI({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);yo(r!==void 0,"Unexpected bounds cache miss");const s=(r.scrollOffset+r.size)/e.size;return t*s}}function uq({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=uI({cachedBounds:t,itemCount:r,itemSize:s}),f=t.get(n),d=Math.max(0,Math.min(c-l,f.scrollOffset)),h=Math.max(0,f.scrollOffset-l+f.size);switch(e==="smart"&&(a>=h&&a<=d?e="auto":e="center"),e){case"start":return d;case"end":return h;case"center":return f.scrollOffset<=l/2?0:f.scrollOffset+f.size/2>=c-l/2?c-l:f.scrollOffset+f.size/2-l/2;default:return a>=h&&a<=d?a:a<h?h:d}}function wT({cachedBounds:e,containerScrollOffset:t,containerSize:n,itemCount:r,overscanCount:s}){const a=r-1;let l=0,c=-1,f=0,d=-1,h=0;for(;h<a;){const m=e.get(h);if(m.scrollOffset+m.size>t)break;h++}for(l=h,f=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),d=Math.min(r-1,c+s),l<0&&(l=0,c=-1,f=0,d=-1),{startIndexVisible:l,stopIndexVisible:c,startIndexOverscan:f,stopIndexOverscan:d}}function cq({itemCount:e,itemProps:t,itemSize:n}){const r=new Map;return{get(s){for(yo(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 f=r.get(l-1);yo(f!==void 0,`Unexpected bounds cache miss for index ${s}`),r.set(l,{scrollOffset:f.scrollOffset+f.size,size:c})}}const a=r.get(s);return yo(a!==void 0,`Unexpected bounds cache miss for index ${s}`),a},set(s,a){r.set(s,a)},get size(){return r.size}}}function fq({itemCount:e,itemProps:t,itemSize:n}){return v.useMemo(()=>cq({itemCount:e,itemProps:t,itemSize:n}),[e,t,n])}function dq({containerSize:e,itemSize:t}){let n;return typeof t==="string"?(yo(t.endsWith("%"),`Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`),yo(e!==void 0,"Container size must be defined if a percentage item size is specified"),n=e*parseInt(t)/100):n=t,n}function pq({containerElement:e,containerStyle:t,defaultContainerSize:n=0,direction:r,isRtl:s=!1,itemCount:a,itemProps:l,itemSize:c,onResize:f,overscanCount:d}){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}=aq({defaultHeight:n,defaultWidth:void 0,element:e,mode:"only-height",style:t}),E=v.useRef({height:0,width:0}),C=R,_=dq({containerSize:C,itemSize:c});v.useLayoutEffect(()=>{if(typeof f=="function"){const N=E.current;(N.height!==R||N.width!==T)&&(f({height:R,width:T},{...N}),N.height=R,N.width=T)}},[R,f,T]);const D=fq({itemCount:a,itemProps:l,itemSize:_}),A=v.useCallback(N=>D.get(N),[D]),M=v.useCallback(()=>uI({cachedBounds:D,itemCount:a,itemSize:_}),[D,a,_]),B=v.useCallback(N=>{const W=ey({containerElement:e,direction:r,isRtl:s,scrollOffset:N});return wT({cachedBounds:D,containerScrollOffset:W,containerSize:C,itemCount:a,overscanCount:d})},[D,e,C,r,s,a,d]);Ac(()=>{const N=e?.scrollTop??0;m(B(N))},[e,r,B]),Ac(()=>{if(!e)return;const N=()=>{m(W=>{const{scrollLeft:$,scrollTop:F}=e,z=ey({containerElement:e,direction:r,isRtl:s,scrollOffset:F}),U=wT({cachedBounds:D,containerScrollOffset:z,containerSize:C,itemCount:a,overscanCount:d});return yc(U,W)?W:U})};return e.addEventListener("scroll",N),()=>{e.removeEventListener("scroll",N)}},[D,e,C,r,a,d]);const P=lq(({align:N="auto",containerScrollOffset:W,index:$})=>{let F=uq({align:N,cachedBounds:D,containerScrollOffset:W,containerSize:C,index:$,itemCount:a,itemSize:_});if(e){if(F=ey({containerElement:e,direction:r,isRtl:s,scrollOffset:F}),typeof e.scrollTo!="function"){const z=B(F);yc(h,z)||m(z)}return F}});return{getCellBounds:A,getEstimatedSize:M,scrollToIndex:P,startIndexOverscan:y,startIndexVisible:b,stopIndexOverscan:S,stopIndexVisible:k}}function hq(e){return v.useMemo(()=>e,Object.values(e))}function mq(e,t){const{ariaAttributes:n,style:r,...s}=e,{ariaAttributes:a,style:l,...c}=t;return yc(n,a)&&yc(r,l)&&yc(s,c)}function gq(e){return e!=null&&typeof e=="object"&&"getAverageRowHeight"in e&&typeof e.getAverageRowHeight=="function"}const bq="data-react-window-index";function yq({children:e,className:t,defaultHeight:n=0,listRef:r,onResize:s,onRowsRendered:a,overscanCount:l=3,rowComponent:c,rowCount:f,rowHeight:d,rowProps:h,tagName:m="div",style:b,...y}){const k=hq(h),S=v.useMemo(()=>v.memo(c,mq),[c]),[R,T]=v.useState(null),E=gq(d),C=v.useMemo(()=>E?F=>d.getRowHeight(F)??d.getAverageRowHeight():d,[E,d]),{getCellBounds:_,getEstimatedSize:D,scrollToIndex:A,startIndexOverscan:M,startIndexVisible:B,stopIndexOverscan:P,stopIndexVisible:N}=pq({containerElement:R,containerStyle:b,defaultContainerSize:n,direction:"vertical",itemCount:f,itemProps:k,itemSize:C,onResize:s,overscanCount:l});v.useImperativeHandle(r,()=>({get element(){return R},scrollToRow({align:F="auto",behavior:z="auto",index:U}){const H=A({align:F,containerScrollOffset:R?.scrollTop??0,index:U});typeof R?.scrollTo=="function"&&R.scrollTo({behavior:z,top:H})}}),[R,A]),Ac(()=>{if(!R)return;const F=Array.from(R.children).filter((z,U)=>{if(z.hasAttribute("aria-hidden"))return!1;const H=`${M+U}`;return z.setAttribute(bq,H),!0});if(E)return d.observeRowElements(F)},[R,E,d,M,P]),v.useEffect(()=>{M>=0&&P>=0&&a&&a({startIndex:B,stopIndex:N},{startIndex:M,stopIndex:P})},[a,M,B,P,N]);const W=v.useMemo(()=>{const F=[];if(f>0)for(let z=M;z<=P;z++){const U=_(z);F.push(v.createElement(S,{...k,ariaAttributes:{"aria-posinset":z+1,"aria-setsize":f,role:"listitem"},key:z,index:z,style:{position:"absolute",left:0,transform:`translateY(${U.scrollOffset}px)`,height:E?void 0:U.size,width:"100%"}}))}return F},[S,_,E,f,k,M,P]),$=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}},W,e,$)}const cI=v.createContext(null);function vq(e){const t=v.useContext(cI);if(!t)throw new Error(`${e} must be used within LegacyMenu.VirtualizedContent`);return t}function xq({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(cI.Provider,{value:c,children:e})}const kq=4,ET="ui-menu--virtualized";function Sq({index:e,style:t,items:n,activeIndex:r,renderItem:s,onMouseMove:a}){const l=n[e],c=r===e,f=R8();return g.jsx("div",{className:f.className,style:{...t,...f.style},onMouseMove:d=>a(e,d),children:s(l,e,c)})}function wq({items:e,itemHeight:t,renderItem:n,getItemLabel:r,header:s,footer:a,emptyState:l,"aria-label":c,className:f,style:d,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=ya(),{isOpen:A,isMounted:M,activeIndex:B,setActiveIndex:P,setIsOpen:N,virtualFocus:W,enableHover:$,nodeId:F,listRef:z,labelsRef:U,searchValue:H,refs:K,floatingStyles:q,middlewareData:Y,transitionStyles:O,context:j,getFloatingProps:V,getItemProps:L,dismissCauseRef:X,returnFocusOnSelect:se,returnFocus:ne}=Yi("LegacyMenu.VirtualizedContent"),oe=v.useRef(null),le=v.useRef(null),ce=v.useRef(B);ce.current=B;const Ee=v.useRef(null),[be,ue]=v.useState(null),[ge,Se]=v.useState(null),Ae=k??!$,ke=Yh(),{portalLayerStyles:xe}=ql("popover",M),Re=v.useRef(null),Me=v.useRef(void 0),ze=v.useRef(e),Fe=v.useRef(B),ye=v.useRef(null);v.useEffect(()=>{r?U.current=e.map(je=>r(je)):U.current=e.map(()=>null),z.current.length!==e.length&&(z.current.length=e.length)},[e,r,U,z]),v.useLayoutEffect(()=>{const je=ze.current!==e,Ie=Fe.current!==B;if(ze.current=e,Fe.current=B,T===void 0||B==null){Me.current=void 0;return}const We=Me.current;if(je&&!Ie&&We!==void 0){const Et=e.findIndex(Ne=>T(Ne)===We);if(Et>=0&&Et!==B){ye.current=Et,E===void 0?P(Et):E(Et);return}}const dt=e[B];Me.current=dt===void 0?void 0:T(dt)},[B,T,e,E,P]);const _e=j.placement.startsWith("top"),ee=_e&&M?Y.bottomAnchor?.bottom??null:null,fe=v.useRef(null);v.useLayoutEffect(()=>{if(!A){fe.current=null,Re.current=null;return}if(B==null||fe.current===B)return;fe.current=B;const je=ye.current===B;if(ye.current=null,je)return;const Ie=Re.current===B;Re.current=null,!Ie&&(B<0||B>=e.length||le.current?.scrollToRow({index:B,align:"smart",behavior:"instant"}))},[A,B,e.length]);const Q=v.useRef(H),re=v.useRef(A);v.useEffect(()=>{const je=Q.current,Ie=re.current;Q.current=H,re.current=A,!(!A||!Ie||je===H)&&(e.length>0&&le.current?.scrollToRow({index:0,align:"start",behavior:"instant"}),P(e.length>0?0:null))},[A,e.length,H,P]);const we=v.useCallback((je,Ie)=>{Ee.current=je,ue(We=>We===je?We:je),Se(We=>We===Ie?We:Ie)},[]);v.useLayoutEffect(()=>{if(!A||B==null||B<0||B>=e.length){we(null,null);return}const je=z.current[B];je!=null&&we(je,B)},[B,A,e.length,z,we]);const Pe=v.useCallback((je,Ie)=>{je===ce.current&&Ie!=null&&we(Ie,je)},[we]),Ye=v.useRef(null),Ze=v.useCallback((je,Ie)=>{const We=Ye.current;Ye.current={x:Ie.clientX,y:Ie.clientY},!(We!==null&&We.x===Ie.clientX&&We.y===Ie.clientY)&&B!==je&&(Re.current=je,P(je))},[B,P]),bt=v.useCallback(je=>{je.key==="Escape"&&(X.current="escape")},[X]),Je=v.useCallback(je=>{ke(je.nativeEvent)&&(X.current="backdrop",N(!1))},[X,N,ke]),xt=v.useCallback(je=>{if(!ke(je.nativeEvent))return;je.preventDefault(),X.current="backdrop",N(!1);const dt=document.elementsFromPoint(je.clientX,je.clientY).find(Et=>!Et.classList.contains(Fx));dt&&dt.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:je.clientX,clientY:je.clientY,screenX:je.screenX,screenY:je.screenY,button:je.button,buttons:je.buttons,ctrlKey:je.ctrlKey,shiftKey:je.shiftKey,altKey:je.altKey,metaKey:je.metaKey}))},[X,N,ke]),St=Jc([K.setFloating,oe,_]),nt=va();if(!M)return null;const rt=m??cF,ct=typeof t=="number"?e.length*t:e.reduce((je,Ie,We)=>je+t(We),0),it=Math.min(ct,Math.max(0,rt-kq*2)),ft=y??D?.menuSize??"sm",Lt={...q,...O,...d,...Lx({width:b}),...xe,..._e&&ee!==null?{top:"auto",bottom:ee}:{},...jx({isOpen:A,isPositioned:j.isPositioned})},Pt=ZO(xe),At=Ux({className:f?`${ET} ${f}`:ET,size:ft,style:Lt,surfaceStyle:h}),Z=Vx(),me=Gx(),Le=Hx(),Xe=qx(!0),Ct=C8(),lt=Wx(),He=A&&ge!=null&&ge>=0&&ge<e.length&&be!=null&&C!=null?C(ge,{rowElement:be,menuContentElement:oe.current}):null,qe=He!=null&&be!=null,De={items:e,activeIndex:B,renderItem:n,onMouseMove:Ze};return g.jsxs(Ax,{...nt?{root:nt}:{},children:[Ae&&g.jsx("div",{className:Pt.className,style:Pt.style,"data-component":"menu-backdrop",onClick:Je,onContextMenu:xt,role:"none"}),g.jsx(Ox,{context:j,initialFocus:-1,returnFocus:ne??(X.current!=="backdrop"&&(X.current!=="selection"||se)),modal:!W&&A,children:g.jsx("div",{ref:St,className:At.className,style:At.style,tabIndex:-1,"data-component":"menu-popup","data-virtualized":"","data-size":ft,...V({"aria-label":c??"Menu","aria-labelledby":void 0,onKeyDown:bt,onMouseDown:W?je=>{je.stopPropagation()}:void 0}),children:g.jsx(Is,{menuSize:ft,children:g.jsx("div",{className:Z.className,style:Z.style,"data-component":"menu-layout",role:"none",children:g.jsx(cO,{dismiss:!A,children:g.jsx(t0,{layerNodeId:F,children:g.jsx(xq,{activeIndex:B,setIsOpen:N,getItemProps:L,listRef:z,closeOnSelect:S,onRowElementChange:Pe,children:g.jsxs(nh,{children:[s!=null?g.jsx("div",{className:me.className,style:me.style,"data-component":"menu-header",children:g.jsx(Es,{value:"header",children:s})}):null,e.length>0?g.jsx("div",{className:Le.className,style:Le.style,"data-component":"menu-content",children:g.jsx("div",{className:Xe.className,style:Xe.style,"data-component":"menu-list",role:"presentation",children:g.jsx(yq,{listRef:le,className:Ct.className,role:"none",rowComponent:Sq,rowProps:De,rowCount:e.length,rowHeight:t,overscanCount:R,"data-native-scrollbar":"none",style:{height:it}})})}):l,a!=null?g.jsx("div",{className:lt.className,style:lt.style,"data-component":"menu-footer",children:g.jsx(Es,{value:"footer",children:a})}):null,C!=null?g.jsx(lI,{open:qe,placement:"right-start",anchorRef:Ee,offset:6,closeOnSelect:!1,virtualFocus:!0,children:qe?He:null}):null]})})})})})})})})]})}function Eq({index:e,children:t,disabled:n=!1,onSelect:r,onMouseDown:s,leading:a,leadingStyle:l,contentStyle:c,trailing:f,trailingStyle:d,wideLeftSection:h=!1,tooltip:m,tooltipContentKey:b,closeOnSelect:y,description:k,variant:S="default",checked:R,ref:T}){const{shouldAllowPointerInteraction:E,virtualFocus:C,activeDescendantIdPrefix:_}=Yi("LegacyMenu.VirtualizedItem"),D=uf(),{activeIndex:A,setIsOpen:M,getItemProps:B,listRef:P,closeOnSelect:N,onRowElementChange:W}=vq("LegacyMenu.VirtualizedItem"),$=y??N??!0,F=A===e,z=v.useCallback(be=>{P.current[e]=be,W?.(e,be),typeof T=="function"?T(be):T&&(T.current=be)},[e,P,W,T]),U=()=>{if(n)return;const be={defaultPrevented:!1,preventDefault:()=>{be.defaultPrevented=!0}};r?.(be),$&&!be.defaultPrevented&&M(!1)},H=be=>{if(!E(be.nativeEvent)){be.preventDefault(),be.stopPropagation();return}U()},K=be=>{n||(be.key==="Enter"||be.key===" ")&&(be.preventDefault(),U())},q=be=>{if(!E(be.nativeEvent)){be.preventDefault(),be.stopPropagation();return}s?.(be),!be.defaultPrevented&&C&&be.preventDefault()},{onMouseMove:Y,onPointerLeave:O,...j}=B({...of(_,e),onClick:H,onKeyDown:K,onMouseDown:q}),V=Yx(),L=Xx(),X=Zx(),se=k!=null?g.jsxs("div",{className:V.className,style:V.style,children:[g.jsx("div",{className:L.className,style:L.style,children:t}),g.jsx("div",{className:X.className,style:X.style,"data-component":"menu-item-description",children:k})]}):t,ne=Kx({disabled:n,focused:F,inSubmenu:D,variant:S}),oe=R!==void 0,le=oe&&a==null?g.jsx(FA,{checked:R,disabled:n}):a,ce=oe?{role:"menuitemcheckbox","aria-checked":R,"data-checked":R||void 0}:{role:"menuitem"},Ee=g.jsx("li",{ref:z,...ce,tabIndex:F?0:-1,"aria-disabled":n||void 0,"data-component":"menu-row","data-disabled":n||void 0,"data-focused":F||void 0,"data-has-description":k!=null||void 0,"data-variant":S!=="default"?S:void 0,"data-wide-left":h||void 0,[Vl]:"body",className:ne.className,style:ne.style,...j,children:g.jsx(Ll,{disabled:n,leading:le,leadingStyle:l,contentStyle:c,trailing:f,trailingStyle:d,wideLeft:h,children:se})});return m!=null?g.jsx(lf,{content:m,contentKey:b,children:Ee}):Ee}function TT({children:e,open:t,defaultOpen:n,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l,offset:c,flip:f,closeOnSelect:d,instantClose:h,instantTransitions:m,returnFocusOnSelect:b,returnFocus:y,focusItemOnOpen:k,virtualFocus:S,shouldKeepOpenDuringDrag:R,lockPositionWhileOpen:T,dismissOnReferenceScroll:E}){return g.jsx(vF,{open:t,defaultOpen:n,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l,offset:c,flip:f,closeOnSelect:d,instantClose:h,instantTransitions:m,returnFocusOnSelect:b,returnFocus:y,focusItemOnOpen:k,virtualFocus:S,shouldKeepOpenDuringDrag:R,lockPositionWhileOpen:T,dismissOnReferenceScroll:E,children:e})}function Tq(e){return Ao()===null?g.jsx(d5,{children:g.jsx(TT,{...e})}):g.jsx(TT,{...e})}function fI(e,t,n){const{ref:r,...s}=n,a=qN({defaultTagName:"button",props:s,ref:r,render:e});return t?e:a}function Rq({children:e,disabled:t=!1}){const{getTriggerProps:n}=Yi("LegacyMenu.Trigger");return fI(e,t,n())}function Cq({children:e,onClick:t,disabled:n=!1}){const{getTriggerProps:r,setHasHoverTrigger:s,setIsOpen:a}=Yi("LegacyMenu.HoverTrigger");v.useEffect(()=>{if(!n)return s(!0),()=>s(!1)},[n,s]);const l=r();return fI(e,n,{...l,onPointerDown:Xu(void 0,Xu(l.onPointerDown,c=>{c.button===2&&a(!1)})),onContextMenu:Xu(void 0,Xu(l.onContextMenu,c=>{a(!1),c.stopPropagation()})),onClick:Xu(t,c=>{l.onClick?.(c)})})}const _q=Object.assign(lI,{useContext:O8}),ei=Object.assign(Tq,{useContext:LO,useLayerContext:K8,Trigger:Rq,HoverTrigger:Cq,Content:G8,Item:nI,CheckboxItem:P8,TextItem:iq,SwitchItem:nq,Section:Q8,SearchInput:X8,EmptyState:W8,LoadingState:Y8,ExpandableSection:L8,ExpandableSectionTrigger:j8,ExpandableSectionContent:z8,SubMenu:_q,SubMenuItem:eq,SubMenuTrigger:J8,SubMenuContent:tq,VirtualizedContent:wq,VirtualizedItem:Eq,VirtualizedSectionHeader:oq}),dI=v.createContext(void 0);function i0(){const e=v.useContext(dI);if(e===void 0)throw new Error(In(64));return e}let Aq=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const Jh={tabActivationDirection:e=>({[Aq.activationDirection]:e})},pI=v.forwardRef(function(t,n){const{className:r,defaultValue:s=0,onValueChange:a,orientation:l="horizontal",render:c,value:f,style:d,...h}=t,m=t.defaultValue!==void 0,b=v.useRef([]),[y,k]=v.useState(()=>new Map),[S,R]=Al({controlled:f,default:s,name:"Tabs",state:"value"}),T=f!==void 0,[E,C]=v.useState(()=>new Map),_=v.useRef(void 0),D=v.useCallback(ce=>{if(ce===void 0)return null;for(const[Ee,be]of E.entries())if(be!=null&&ce===(be.value??be.index))return Ee;return null},[E]),[A,M]=v.useState(()=>({previousValue:S,tabActivationDirection:"none"})),{previousValue:B,tabActivationDirection:P}=A;let N=P,W=!1;B!==S&&(N=RT(B,S,l,E),W=B!=null&&S!=null&&D(S)==null);const $=W?B:S,F=B!==$||P!==N;Ve(()=>{F&&M({previousValue:$,tabActivationDirection:N})},[$,F,N]);const z=Ke((ce,Ee)=>{const be=RT(S,ce,l,E);Ee.activationDirection=be,a?.(ce,Ee),!Ee.isCanceled&&R(ce)}),U=Ke((ce,Ee)=>{a?.(ce,Rt(Ee,void 0,void 0,{activationDirection:"none"}))}),H=Ke((ce,Ee)=>{k(be=>{if(be.get(ce)===Ee)return be;const ue=new Map(be);return ue.set(ce,Ee),ue})}),K=Ke((ce,Ee)=>{k(be=>{if(!be.has(ce)||be.get(ce)!==Ee)return be;const ue=new Map(be);return ue.delete(ce),ue})}),q=v.useCallback(ce=>y.get(ce),[y]),Y=v.useCallback(ce=>{for(const Ee of E.values())if(ce===Ee?.value)return Ee?.id},[E]),O=v.useMemo(()=>({getTabElementBySelectedValue:D,getTabIdByPanelValue:Y,getTabPanelIdByValue:q,onValueChange:z,orientation:l,registerMountedTabPanel:H,setTabMap:C,unregisterMountedTabPanel:K,tabActivationDirection:N,value:S}),[D,Y,q,z,l,H,C,K,N,S]),j=v.useMemo(()=>{for(const ce of E.values())if(ce!=null&&ce.value===S)return ce},[E,S]),V=v.useMemo(()=>{for(const ce of E.values())if(ce!=null&&!ce.disabled)return ce.value},[E]),L=v.useRef(!m),X=v.useRef(s),se=v.useRef(m),ne=v.useRef(!1);Ve(()=>{if(T)return;function ce(ge,Se){R(ge),M(Ae=>Ae.previousValue===ge&&Ae.tabActivationDirection==="none"?Ae:{previousValue:ge,tabActivationDirection:"none"}),U(ge,Se),L.current=!1}if(E.size===0){ne.current&&S!==null&&!_.current?.isConnected&&ce(null,Aw);return}ne.current=!0,_.current=E.keys().next().value;const Ee=j?.disabled,be=j==null&&S!==null;if(!Ee&&S===X.current&&(se.current=!1),se.current&&Ee&&S===X.current)return;const ue=L.current;if(Ee||be){const ge=V??null;if(S===ge){L.current=!1;return}let Se=Aw;ue?Se=Nw:Ee&&(Se=p_),ce(ge,Se);return}ue&&j!=null&&(U(S,Nw),L.current=!1)},[V,T,U,j,R,E,S]);const le=bn("div",t,{state:{orientation:l,tabActivationDirection:N},ref:n,props:h,stateAttributesMapping:Jh});return g.jsx(dI.Provider,{value:O,children:g.jsx(wx,{elementsRef:b,children:le})})});function RT(e,t,n,r){if(e==null||t==null)return"none";let s=null,a=null;for(const[f,d]of r.entries()){if(d==null)continue;const h=d.value??d.index;if(e===h&&(s=f),t===h&&(a=f),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 hI=v.createContext(void 0);function mI(){const e=v.useContext(hI);if(e===void 0)throw new Error(In(65));return e}const gI=v.forwardRef(function(t,n){const{className:r,disabled:s=!1,render:a,value:l,id:c,nativeButton:f=!0,style:d,...h}=t,{value:m,getTabPanelIdByValue:b,orientation:y,tabActivationDirection:k}=i0(),{activateOnFocus:S,highlightedTabIndex:R,onTabActivation:T,registerTabResizeObserverElement:E,setHighlightedTabIndex:C,tabsListElement:_}=mI(),D=Fl(c),A=v.useMemo(()=>({disabled:s,id:D,value:l}),[s,D,l]),{compositeProps:M,compositeRef:B,index:P}=KN({metadata:A}),N=l===m,W=v.useRef(!1),$=v.useRef(null);Ve(()=>{const L=$.current;if(L)return E(L)},[E]),Ve(()=>{if(W.current){W.current=!1;return}if(!(N&&P>-1&&R!==P))return;const L=_;if(L!=null){const X=pr(Wt(L));if(X&&ht(L,X))return}s||C(P)},[N,P,R,C,s,_]);const{getButtonProps:F,buttonRef:z}=$l({disabled:s,native:f,focusableWhenDisabled:!0}),U=b(l),H=v.useRef(!1),K=v.useRef(!1);function q(L){N||s||T(l,Rt(Ni,L.nativeEvent,void 0,{activationDirection:"none"}))}function Y(L){N||(P>-1&&!s&&C(P),!s&&S&&(!H.current||H.current&&K.current)&&T(l,Rt(Ni,L.nativeEvent,void 0,{activationDirection:"none"})))}function O(L){if(N||s)return;H.current=!0;function X(){H.current=!1,K.current=!1}(!L.button||L.button===0)&&(K.current=!0,Wt(L.currentTarget).addEventListener("pointerup",X,{once:!0}))}return bn("button",t,{state:{disabled:s,active:N,orientation:y,tabActivationDirection:k},ref:[n,z,B,$],props:[M,{role:"tab","aria-controls":U,"aria-selected":N,id:D,onClick:q,onFocus:Y,onPointerDown:O,[mO]:N?"":void 0,onKeyDownCapture(){W.current=!0}},h,F],stateAttributesMapping:Jh})});function Nq(){return Zn}function Oq(){return!1}function Iq(){return!0}function Mq(){return lx.useSyncExternalStore(Nq,Oq,Iq)}const Dq='!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 al=(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 Lq=v.createContext(void 0),jq={disableStyleElements:!1};function bI(){return v.useContext(Lq)??jq}const zq={...Jh,activeTabPosition:()=>null,activeTabSize:()=>null},yI=v.forwardRef(function(t,n){const{className:r,render:s,renderBeforeHydration:a=!1,style:l,...c}=t,{nonce:f}=bI(),{getTabElementBySelectedValue:d,orientation:h,tabActivationDirection:m,value:b}=i0(),{tabsListElement:y,registerIndicatorUpdateListener:k}=mI(),S=Mq(),R=$$();v.useEffect(()=>k(R),[k,R]);let T=0,E=0,C=0,_=0,D=0,A=0,M=!1;if(b!=null&&y!=null){const z=d(b);if(z!=null){M=!0;const{width:U,height:H}=uT(z),{width:K,height:q}=uT(y),Y=z.getBoundingClientRect(),O=y.getBoundingClientRect(),j=K>0?O.width/K:1,V=q>0?O.height/q:1;if(Math.abs(j)>Number.EPSILON&&Math.abs(V)>Number.EPSILON){const X=Y.left-O.left,se=Y.top-O.top;T=X/j+y.scrollLeft-y.clientLeft,C=se/V+y.scrollTop-y.clientTop}else T=z.offsetLeft,C=z.offsetTop;D=U,A=H,E=y.scrollWidth-T-D,_=y.scrollHeight-C-A}}const B=M?{left:T,right:E,top:C,bottom:_}:null,P=M?{width:D,height:A}:null,N=M?{[al.activeTabLeft]:`${T}px`,[al.activeTabRight]:`${E}px`,[al.activeTabTop]:`${C}px`,[al.activeTabBottom]:`${_}px`,[al.activeTabWidth]:`${D}px`,[al.activeTabHeight]:`${A}px`}:void 0,W=M&&D>0&&A>0,F=bn("span",t,{state:{orientation:h,activeTabPosition:B,activeTabSize:P,tabActivationDirection:m},ref:n,props:[{role:"presentation",style:N,hidden:!W},c,{suppressHydrationWarning:!0}],stateAttributesMapping:zq});return b==null?null:g.jsxs(v.Fragment,{children:[F,S&&a&&g.jsx("script",{nonce:f,dangerouslySetInnerHTML:{__html:Dq},suppressHydrationWarning:!0})]})}),vI=v.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:s,loopFocus:a=!0,render:l,style:c,...f}=t,{onValueChange:d,orientation:h,value:m,setTabMap:b,tabActivationDirection:y}=i0(),[k,S]=v.useState(0),[R,T]=v.useState(null),E=v.useRef(new Set),C=v.useRef(new Set),_=v.useRef(null);Ve(()=>{if(typeof ResizeObserver>"u")return;const W=new ResizeObserver(()=>{E.current.forEach($=>{$()})});return _.current=W,R&&W.observe(R),C.current.forEach($=>{W.observe($)}),()=>{W.disconnect(),_.current=null}},[R]);const D=Ke(W=>(E.current.add(W),()=>{E.current.delete(W)})),A=Ke(W=>(C.current.add(W),_.current?.observe(W),()=>{C.current.delete(W),_.current?.unobserve(W)})),M=Ke((W,$)=>{W!==m&&d(W,$)}),B={orientation:h,tabActivationDirection:y},P={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},N=v.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:k,registerIndicatorUpdateListener:D,registerTabResizeObserverElement:A,onTabActivation:M,setHighlightedTabIndex:S,tabsListElement:R}),[r,k,D,A,M,S,R]);return g.jsx(hI.Provider,{value:N,children:g.jsx(N9,{render:l,className:s,style:c,state:B,refs:[n,T],props:[P,f],stateAttributesMapping:Jh,highlightedIndex:k,enableHomeAndEndKeys:!0,loopFocus:a,orientation:h,onHighlightedIndexChange:S,onMapChange:b,disabledIndices:ko})})}),Wd={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},padded:{kLKAdn:"ui-493x5y",kpe85a:"ui-14ndyrl",kGO01o:"ui-b6dno7",kE3dHu:"ui-1e7ydrk",$$css:!0},rounded:{kaIpWk:"ui-1i4c3av",$$css:!0}},Pq={sm:{kZKoxP:"ui-1e94bgo",$$css:!0},md:{kZKoxP:"ui-170hpbr",$$css:!0},lg:{kZKoxP:"ui-t8t6p",$$css:!0},xl:{kZKoxP:"ui-12tj2o0",$$css:!0}},$q={sm:{kZKoxP:"ui-jmh96e",$$css:!0},md:{kZKoxP:"ui-17n66dt",$$css:!0},lg:{kZKoxP:"ui-y8quj6",$$css:!0},xl:{kZKoxP:"ui-1wl7iu6",$$css:!0}},Bq={sm:{kaIpWk:"ui-1yjdzib",$$css:!0},md:{kaIpWk:"ui-17dxljr",$$css:!0},lg:{kaIpWk:"ui-172nrg4",$$css:!0},xl:{kaIpWk:"ui-1y34t1",$$css:!0}},Fq={sm:{kaIpWk:"ui-13mijux",$$css:!0},md:{kaIpWk:"ui-1k9pyrz",$$css:!0},lg:{kaIpWk:"ui-1fkry76",$$css:!0},xl:{kaIpWk:"ui-126z3em",$$css:!0}},CT={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},rounded:{kaIpWk:"ui-1i4c3av",$$css:!0}},Kd={base:{kysU6D:"ui-jyslct",kzQI83:"ui-1c4vz4f",kmuXW:"ui-2lah0s",kCS8Yb:"ui-dl72j9",kVAEAm:"ui-1n2onr6",kY2c9j:"ui-1vjfegm",kWkggS:"ui-jbqb8w",kMwMTN:"ui-19aaqeu ui-1qp4pc4 ui-1gfq6vl",k1ekBW:"ui-1gbuem2",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},fullWidth:{kzQI83:"ui-1iyjqo2",kCS8Yb:"ui-1r8uery",$$css:!0},compact:{kMwMTN:"ui-4b2ntj ui-1qp4pc4 ui-1gfq6vl",$$css:!0},rounded:{kaIpWk:"ui-1i4c3av",$$css:!0}};function xI(e,t){return e==="outline"?Fq[t]:Bq[t]}function Uq(e,t){return e==="outline"?$q[t]:Hi[t]}const kI=v.createContext(null);function qq(){const e=v.use(kI);if(e===null)throw new Error("SegmentedControl.Item must be used within SegmentedControl");return e}function Hq({value:e,defaultValue:t,onValueChange:n,variant:r="default",size:s="md",rounded:a=!1,disabled:l=!1,fullWidth:c=!1,children:f,"aria-label":d,"aria-labelledby":h,...m}){const b=v.useMemo(()=>({variant:r,size:s,rounded:a,disabled:l,fullWidth:c}),[l,c,a,s,r]);return g.jsx(kI.Provider,{value:b,children:g.jsx(pI,{...m,value:e,defaultValue:t,onValueChange:n,"data-component":"segmented-control","data-size":s,"data-variant":r,"data-rounded":a||void 0,...{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"}}[!!c<<0],children:g.jsxs(vI,{activateOnFocus:!0,"aria-label":d,"aria-labelledby":h,"data-component":"segmented-control-list","data-disabled":l||void 0,...zt(Wd.base,Wd.padded,Pq[s],r==="default"&&Wd.default,r==="outline"&&la.outline,a?Wd.rounded:ws[s]),children:[f,g.jsx(yI,{"data-component":"segmented-control-indicator",...zt(CT.base,a?CT.rounded:xI(r,s))})]})})})}function Vq({value:e,disabled:t=!1,children:n,...r}){const s=qq();return g.jsx(gI,{...r,value:e,disabled:s.disabled||t,"data-component":"segmented-control-item","data-size":s.size,"data-variant":s.variant,"data-rounded":s.rounded||void 0,...zt(vx.root,Ei.content,Mh.root,s.rounded?Kd.rounded:xI(s.variant,s.size),Uq(s.variant,s.size),Ei.size[s.size],s.size==="sm"?Ms.root:Ei.typography[s.size],Kd.base,s.variant==="compact"&&Kd.compact,s.fullWidth&&Kd.fullWidth),children:n})}const vc=Object.assign(Hq,{Item:Vq}),SI=v.createContext(null),wI=v.createContext(null);function Ds(){const e=v.useContext(SI);if(e===null)throw new Error(In(60));return e}function EI(){const e=v.useContext(wI);if(e===null)throw new Error(In(61));return e}const pt={id:tt(e=>e.id),labelId:tt(e=>e.labelId),modal:tt(e=>e.modal),multiple:tt(e=>e.multiple),items:tt(e=>e.items),itemToStringLabel:tt(e=>e.itemToStringLabel),itemToStringValue:tt(e=>e.itemToStringValue),isItemEqualToValue:tt(e=>e.isItemEqualToValue),value:tt(e=>e.value),hasSelectedValue:tt(e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Jo(t,r)!==""}),hasNullItemLabel:tt((e,t)=>t?r4(e.items):!1),open:tt(e=>e.open),mounted:tt(e=>e.mounted),forceMount:tt(e=>e.forceMount),transitionStatus:tt(e=>e.transitionStatus),openMethod:tt(e=>e.openMethod),activeIndex:tt(e=>e.activeIndex),selectedIndex:tt(e=>e.selectedIndex),isActive:tt((e,t)=>e.activeIndex===t),isSelected:tt((e,t)=>{const n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(s=>ua(t,s,n)):ua(t,r,n)}),isSelectedByFocus:tt((e,t)=>e.selectedIndex===t),popupProps:tt(e=>e.popupProps),triggerProps:tt(e=>e.triggerProps),triggerElement:tt(e=>e.triggerElement),positionerElement:tt(e=>e.positionerElement),listElement:tt(e=>e.listElement),popupSide:tt(e=>e.popupSide),scrollUpArrowVisible:tt(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:tt(e=>e.scrollDownArrowVisible),hasScrollArrows:tt(e=>e.hasScrollArrows)};function lc(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const vs=1;function TI(e,t){return Math.max(0,e-t)}function Gq(e,t){if(t<=0)return 0;const n=lc(e,0,t),r=n,s=t-n,a=r<=vs,l=s<=vs;return a&&l?r<=s?0:t:a?0:l?t:n}function Wq(e){const{id:t,value:n,defaultValue:r=null,onValueChange:s,open:a,defaultOpen:l=!1,onOpenChange:c,name:f,form:d,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:A=e4,highlightItemOnHover:M=!0,children:B}=e,{clearErrors:P}=BA(),{setDirty:N,setTouched:W,setFocused:$,validityData:F,setFilled:z,name:U,disabled:H,validation:K,validationMode:q}=Dh(),Y=Sx({id:t}),O=H||m,j=U??f,[V,L]=Al({controlled:n,default:C?r??ko:r,name:"Select",state:"value"}),[X,se]=Al({controlled:a,default:l,name:"Select",state:"open"}),ne=v.useRef([]),oe=v.useRef([]),le=v.useRef(null),ce=v.useRef(null),Ee=v.useRef(0),be=v.useRef(null),ue=v.useRef([]),ge=v.useRef(!1),Se=v.useRef(null),Ae=v.useRef(null),ke=v.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),xe=v.useRef(!1),{mounted:Re,setMounted:Me,transitionStatus:ze}=Yc(X),{openMethod:Fe,triggerProps:ye}=k3(X),_e=zr(()=>new nA({id:Y,labelId:void 0,modal:k,multiple:C,itemToStringLabel:_,itemToStringValue:D,isItemEqualToValue:A,value:V,open:X,mounted:Re,transitionStatus:ze,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=mt(_e,pt.activeIndex),fe=mt(_e,pt.selectedIndex),Q=mt(_e,pt.triggerElement),re=mt(_e,pt.positionerElement),we=c9(Fe),Pe=Fe??we??null,Ye=v.useMemo(()=>C?"":Jo(V,D),[C,V,D]),Ze=v.useMemo(()=>C&&Array.isArray(V)?V.map(Ie=>Jo(Ie,D)):Jo(V,D),[C,V,D]),bt=On(_e.state.triggerElement),Je=Ke(()=>Ze);$A(bt,Y,V,Je,!O,f);const xt=v.useRef(V),St=C?Array.isArray(V)&&V.length>0:V!=null&&Jo(V,D)!=="";Ve(()=>{V!==xt.current&&_e.set("forceMount",!0)},[_e,V]),Ve(()=>{z(St)},[St,z]),Ve(function(){const We=ue.current;let dt;if(C){const Et=Array.isArray(V)?V:[];if(Et.length===0)dt=null;else{const Ne=Et[Et.length-1],Tt=mc(We,Ne,A);dt=Tt===-1?null:Tt}}else{const Et=mc(We,V,A);dt=Et===-1?null:Et}dt===null&&(Ae.current=null),!X&&_e.set("selectedIndex",dt)},[St,C,X,V,ue,A,_e,Ae]);function nt(Ie){const We=F.initialValue;return Array.isArray(Ie)&&Array.isArray(We)?!z6(Ie,We,(dt,Et)=>ua(dt,Et,A)):Ie!==We}TA(V,()=>{P(j),N(nt(V)),K.change(V)});const rt=Ke((Ie,We)=>{c?.(Ie,We),!We.isCanceled&&(se(Ie),!Ie&&(We.reason===vh||We.reason===Vv)&&(W(!0),$(!1),q==="onBlur"&&K.commit(V)))}),ct=Ke(()=>{Me(!1),_e.update({activeIndex:null,openMethod:null}),T?.(!1)});_o({enabled:!S,open:X,ref:le,onComplete(){X||ct()}}),v.useImperativeHandle(S,()=>({unmount:ct}),[ct]);const it=Ke((Ie,We)=>{s?.(Ie,We),!We.isCanceled&&L(Ie)}),ft=Ke(()=>{const Ie=_e.state.listElement||le.current;if(!Ie)return;const We=TI(Ie.scrollHeight,Ie.clientHeight),dt=Gq(Ie.scrollTop,We),Et=dt>0,Ne=dt<We;_e.state.scrollUpArrowVisible!==Et&&_e.set("scrollUpArrowVisible",Et),_e.state.scrollDownArrowVisible!==Ne&&_e.set("scrollDownArrowVisible",Ne)}),Lt=mA({open:X,onOpenChange:rt,elements:{reference:Q,floating:re}}),Pt=DP(Lt,{enabled:!b&&!O,event:"mousedown"}),At=nx(Lt),Z=Q$(Lt,{enabled:!b&&!O,listRef:ne,activeIndex:ee,selectedIndex:fe,disabledIndices:ko,onNavigate(Ie){Ie===null&&!X||_e.set("activeIndex",Ie)},focusItemOnHover:M}),me=J$(Lt,{enabled:!b&&!O&&(X||!C),listRef:oe,activeIndex:ee,selectedIndex:fe,disabledIndices:Ie=>YN(ne.current[Ie]),onMatch(Ie){X?_e.set("activeIndex",Ie):it(ue.current[Ie],Rt("none"))},onTyping(Ie){ge.current=Ie}}),Le=v.useMemo(()=>{const Ie=Gi(me.reference,Z.reference,At.reference,Pt.reference,ye);return Y&&(Ie.id=Y),Ie},[Pt.reference,me.reference,Z.reference,At.reference,ye,Y]),Xe=v.useMemo(()=>Gi(fx,me.floating,Z.floating,At.floating),[me.floating,Z.floating,At.floating]),Ct=Z.item??Bn;J_(()=>{_e.update({popupProps:Xe,triggerProps:Le})}),Ve(()=>{_e.update({id:Y,modal:k,multiple:C,value:V,open:X,mounted:Re,transitionStatus:ze,popupProps:Xe,triggerProps:Le,items:E,itemToStringLabel:_,itemToStringValue:D,isItemEqualToValue:A,openMethod:Pe})},[_e,Y,k,C,V,X,Re,ze,Xe,Le,E,_,D,A,Pe]);const lt=v.useMemo(()=>({store:_e,name:j,required:y,disabled:O,readOnly:b,multiple:C,highlightItemOnHover:M,setValue:it,setOpen:rt,listRef:ne,popupRef:le,scrollHandlerRef:ce,handleScrollArrowVisibility:ft,scrollArrowsMountedCountRef:Ee,itemProps:Ct,valueRef:be,valuesRef:ue,labelsRef:oe,typingRef:ge,selectionRef:ke,firstItemTextRef:Se,selectedItemTextRef:Ae,validation:K,onOpenChangeComplete:T,alignItemWithTriggerActiveRef:xe,initialValueRef:xt}),[_e,j,y,O,b,C,M,it,rt,Ct,K,T,ft]),He=xo(R,K.inputRef),qe=C&&Array.isArray(V)&&V.length>0,De=C?void 0:j,je=v.useMemo(()=>!C||!Array.isArray(V)||!j?null:V.map(Ie=>{const We=Jo(Ie,D);return g.jsx("input",{type:"hidden",form:d,name:j,value:We,disabled:O},We)}),[C,V,d,j,D,O]);return g.jsx(SI.Provider,{value:lt,children:g.jsxs(wI.Provider,{value:Lt,children:[B,g.jsx("input",{...K.getValidationProps(O,{onFocus(){_e.state.triggerElement?.focus({focusVisible:!0})},onChange(Ie){if(Ie.nativeEvent.defaultPrevented||O||b)return;const We=Ie.currentTarget.value,dt=Rt(Ni,Ie.nativeEvent);function Et(){if(C)return;const Ne=We.toLowerCase();let Tt=ue.current.findIndex(rn=>Jo(rn,D).toLowerCase()===Ne||KA(rn,_).toLowerCase()===Ne);Tt===-1&&(Tt=ue.current.findIndex((rn,_n)=>{const Yn=oe.current[_n];return Yn!=null&&Yn.toLowerCase()===Ne}));const Qt=Tt===-1?void 0:ue.current[Tt];Qt!=null&&it(Qt,dt)}_e.set("forceMount",!0),queueMicrotask(Et)}}),id:Y&&De==null?`${Y}-hidden-input`:void 0,form:d,name:De,autoComplete:h,value:Ye,disabled:O,required:y&&!qe,readOnly:b,ref:He,style:j?nP:x_,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),je]})})}const Yd=2,Kq=400,Yq={...wz,...Zc,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},Xq=v.forwardRef(function(t,n){const{render:r,className:s,id:a,disabled:l=!1,nativeButton:c=!0,style:f,...d}=t,{setTouched:h,setFocused:m,validationMode:b,state:y,disabled:k}=Dh(),{labelId:S}=xx(),{store:R,setOpen:T,selectionRef:E,validation:C,readOnly:_,required:D,alignItemWithTriggerActiveRef:A,disabled:M}=Ds(),B=k||M||l,P=mt(R,pt.open),N=mt(R,pt.mounted),W=mt(R,pt.value),$=mt(R,pt.triggerProps),F=mt(R,pt.positionerElement),z=mt(R,pt.listElement),U=mt(R,pt.popupSide),H=mt(R,pt.id),K=mt(R,pt.labelId),q=mt(R,pt.hasSelectedValue),Y=N&&F?U:null,O=a??H,j=s4(S,K);Sx({id:O});const V=On(F),L=v.useRef(null),{getButtonProps:X,buttonRef:se}=$l({disabled:B,native:c}),ne=Ke(ge=>{R.set("triggerElement",ge)}),oe=bi(),le=bi(),ce=bi();v.useEffect(()=>{if(P)return ce.start(Kq,()=>{E.current.allowUnselectedMouseUp=!0,E.current.allowSelectedMouseUp=!0}),()=>{ce.clear()};E.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},le.clear()},[P,E,le,ce]);const Ee=Gi($,{id:O,role:"combobox","aria-expanded":P?"true":"false","aria-haspopup":"listbox","aria-controls":P?z?.id??Np(F)?.id:void 0,"aria-labelledby":j,"aria-readonly":_||void 0,"aria-required":D||void 0,tabIndex:B?-1:0,onFocus(ge){m(!0),P&&A.current&&T(!1,Rt(Ni,ge.nativeEvent)),oe.start(0,()=>{R.set("forceMount",!0)})},onBlur(ge){ht(F,ge.relatedTarget)||(h(!0),m(!1),b==="onBlur"&&C.commit(W))},onMouseDown(ge){if(P)return;const Se=Wt(ge.currentTarget);function Ae(ke){if(!L.current)return;const xe=ke.target;if(ht(L.current,xe)||ht(V.current,xe))return;const Re=o4(L.current);ke.clientX>=Re.left-Yd&&ke.clientX<=Re.right+Yd&&ke.clientY>=Re.top-Yd&&ke.clientY<=Re.bottom+Yd||T(!1,Rt(Dz,ke))}le.start(0,()=>{Se.addEventListener("mouseup",Ae,{once:!0})})}},d,X),be=C.getValidationProps(B,Ee);be.role="combobox";const ue={...y,open:P,disabled:B,value:W,readOnly:_,popupSide:Y,placeholder:!q};return bn("button",t,{ref:[n,L,se,ne],state:ue,stateAttributesMapping:Yq,props:be})}),Zq={value:()=>null},Qq=v.forwardRef(function(t,n){const{className:r,render:s,children:a,placeholder:l,style:c,...f}=t,{store:d,valueRef:h}=Ds(),m=mt(d,pt.value),b=mt(d,pt.items),y=mt(d,pt.itemToStringLabel),k=mt(d,pt.hasSelectedValue),S=!k&&l!=null&&a==null,R=mt(d,pt.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=i4(m,b,y):E=YA(m,b,y),bn("span",t,{state:T,ref:[n,h],props:[{children:E},f],stateAttributesMapping:Zq})}),Jq=v.createContext(void 0),e7=v.forwardRef(function(t,n){const{store:r}=Ds(),s=mt(r,pt.mounted),a=mt(r,pt.forceMount);return s||a?g.jsx(Jq.Provider,{value:!0,children:g.jsx(RP,{ref:n,...t})}):null}),t7={...Wc,...To},n7=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,{store:c}=Ds(),f=mt(c,pt.open),d=mt(c,pt.mounted),h=mt(c,pt.transitionStatus);return bn("div",t,{state:{open:f,transitionStatus:h},ref:n,props:[{role:"presentation",hidden:!d,style:{userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:t7})}),RI=v.createContext(void 0);function CI(){const e=v.useContext(RI);if(!e)throw new Error(In(59));return e}function rh(e,t){e&&Object.assign(e.style,t)}const _I={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},r7={position:"fixed"},i7=v.forwardRef(function(t,n){const{anchor:r,positionMethod:s="absolute",className:a,render:l,side:c="bottom",align:f="center",sideOffset:d=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:b,arrowPadding:y=5,sticky:k=!1,disableAnchorTracking:S,alignItemWithTrigger:R=!0,collisionAvoidance:T=wP,style:E,...C}=t,{store:_,listRef:D,labelsRef:A,alignItemWithTriggerActiveRef:M,selectedItemTextRef:B,valuesRef:P,initialValueRef:N,popupRef:W,setValue:$}=Ds(),F=EI(),z=mt(_,pt.open),U=mt(_,pt.mounted),H=mt(_,pt.modal),K=mt(_,pt.value),q=mt(_,pt.openMethod),Y=mt(_,pt.positionerElement),O=mt(_,pt.triggerElement),j=mt(_,pt.isItemEqualToValue),V=mt(_,pt.transitionStatus),L=v.useRef(null),X=v.useRef(null),[se,ne]=v.useState(R),oe=U&&se&&q!=="touch";!U&&se!==R&&ne(R),Ve(()=>{U||(pt.scrollUpArrowVisible(_.state)&&_.set("scrollUpArrowVisible",!1),pt.scrollDownArrowVisible(_.state)&&_.set("scrollDownArrowVisible",!1))},[_,U]),v.useImperativeHandle(M,()=>oe),g4((oe||H)&&z,q==="touch",Y,O);const le=Ex({anchor:r,floatingRootContext:F,positionMethod:s,mounted:U,side:c,sideOffset:d,align:f,alignOffset:h,arrowPadding:y,collisionBoundary:m,collisionPadding:b,sticky:k,disableAnchorTracking:S??oe,collisionAvoidance:T,keepMounted:!0}),ce=oe?"none":le.side,Ee=oe?r7:le.positionerStyles,be={open:z,side:ce,align:le.align,anchorHidden:le.anchorHidden};Ve(()=>{_.set("popupSide",le.side)},[_,le.side]);const ue=Ke(xe=>{_.set("positionerElement",xe)}),ge=Tx(t,be,{styles:Ee,transitionStatus:V,props:C,refs:[n,ue],hidden:!U,inert:!z}),Se=v.useRef(0),Ae=Ke(xe=>{if(xe.size===0&&Se.current===0||P.current.length===0)return;const Re=Se.current;if(Se.current=xe.size,xe.size===Re)return;const Me=Rt(Ni);if(Re!==0&&!_.state.multiple&&K!==null&&mc(P.current,K,j)===-1){const Fe=N.current,_e=Fe!=null&&mc(P.current,Fe,j)!==-1?Fe:null;$(_e,Me),_e===null&&(_.set("selectedIndex",null),B.current=null)}if(Re!==0&&_.state.multiple&&Array.isArray(K)){const ze=ye=>mc(P.current,ye,j)!==-1,Fe=K.filter(ye=>ze(ye));(Fe.length!==K.length||Fe.some(ye=>!t4(K,ye,j)))&&($(Fe,Me),Fe.length===0&&(_.set("selectedIndex",null),B.current=null))}if(z&&oe){_.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const ze={height:""};rh(Y,ze),rh(W.current,ze)}}),ke=v.useMemo(()=>({...le,side:ce,alignItemWithTriggerActive:oe,setControlledAlignItemWithTrigger:ne,scrollUpArrowRef:L,scrollDownArrowRef:X}),[le,ce,oe,ne]);return g.jsx(wx,{elementsRef:D,labelsRef:A,onMapChange:Ae,children:g.jsxs(RI.Provider,{value:ke,children:[U&&H&&g.jsx(f3,{inert:c3(!z),cutout:O}),ge]})})}),Xd="base-ui-disable-scrollbar",ev={className:Xd,getElement(e){return g.jsx("style",{nonce:e,href:Xd,precedence:"base-ui:low",children:`.${Xd}{scrollbar-width:none}.${Xd}::-webkit-scrollbar{display:none}`})}},s7={...Wc,...To},o7=v.forwardRef(function(t,n){const{render:r,className:s,style:a,finalFocus:l,...c}=t,{store:f,popupRef:d,onOpenChangeComplete:h,setOpen:m,valueRef:b,firstItemTextRef:y,selectedItemTextRef:k,multiple:S,handleScrollArrowVisibility:R,scrollHandlerRef:T,listRef:E,highlightItemOnHover:C}=Ds(),{side:_,align:D,alignItemWithTriggerActive:A,isPositioned:M,setControlledAlignItemWithTrigger:B}=CI(),P=l9()!=null,N=EI(),W=Di(),{nonce:$,disableStyleElements:F}=bI(),z=mt(f,pt.id),U=mt(f,pt.open),H=mt(f,pt.openMethod),K=mt(f,pt.mounted),q=mt(f,pt.popupProps),Y=mt(f,pt.transitionStatus),O=mt(f,pt.triggerElement),j=mt(f,pt.positionerElement),V=mt(f,pt.listElement),L=v.useRef(!1),X=v.useRef(!1),se=v.useRef({}),ne=Rl(),oe=Ke(be=>{if(!j||!d.current||!X.current)return;if(L.current||!A){R();return}const ue=j.style.top==="0px",ge=j.style.bottom==="0px";if(!ue&&!ge){R();return}const Se=AT(j),Ae=uc(j.getBoundingClientRect().height,"y",Se),ke=Wt(j),xe=xn(j),Re=xe.getComputedStyle(j),Me=parseFloat(Re.marginTop),ze=parseFloat(Re.marginBottom),Fe=_T(xe.getComputedStyle(d.current)),ye=Math.min(ke.documentElement.clientHeight-Me-ze,Fe),_e=be.scrollTop,ee=Zd(be);let fe=0,Q=null,re=!1,we=!1;const Pe=Je=>{j.style.height=`${Je}px`},Ye=(Je,xt)=>{const St=lc(Je,0,ye-Ae);St>0&&Pe(Ae+St),be.scrollTop=xt,ye-(Ae+St)<=vs&&(L.current=!0),R()},Ze=ue?ee-_e:_e,bt=Math.min(Ae+Ze,ye);if(fe=bt,Ze<=vs){Ye(Ze,ue?ee:0);return}if(ye-bt>vs)ue?we=!0:Q=0;else if(re=!0,ge&&_e<ee){const Je=Ae+Ze-ye;Q=_e-(Ze-Je)}if(fe=Math.ceil(fe),fe!==0&&Pe(fe),we||Q!=null){const Je=Zd(be),xt=we?Je:lc(Q,0,Je);Math.abs(be.scrollTop-xt)>vs&&(be.scrollTop=xt)}(re||fe>=ye-vs)&&(L.current=!0),R()});v.useImperativeHandle(T,()=>oe,[oe]),_o({open:U,ref:d,onComplete(){U&&h?.(!0)}});const le={open:U,transitionStatus:Y,side:_,align:D};Ve(()=>{!j||!d.current||Object.keys(se.current).length||(se.current={top:j.style.top||"0",left:j.style.left||"0",right:j.style.right,height:j.style.height,bottom:j.style.bottom,minHeight:j.style.minHeight,maxHeight:j.style.maxHeight,marginTop:j.style.marginTop,marginBottom:j.style.marginBottom})},[d,j]),Ve(()=>{U||A||(X.current=!1,L.current=!1,rh(j,se.current))},[U,A,j,d]),Ve(()=>{const be=d.current;if(!U||!O||!j||!be||A&&!M||f.state.transitionStatus==="ending")return;if(!A){X.current=!0,ne.request(R),be.style.removeProperty("--transform-origin");return}const ue=a7(be);be.style.removeProperty("--transform-origin");try{let ge=k.current;ge?.isConnected||(ge=!pt.hasSelectedValue(f.state)&&y.current?.isConnected?y.current:null);const Se=b.current,Ae=xn(j),ke=Ae.getComputedStyle(j),xe=Ae.getComputedStyle(be),Re=Wt(O),Me=AT(O),ze=Qd(O.getBoundingClientRect(),Me),Fe=Qd(j.getBoundingClientRect(),Me),ye=ze.height,_e=V||be,ee=_e.scrollHeight,fe=parseFloat(xe.borderBottomWidth),Q=parseFloat(ke.marginTop)||10,re=parseFloat(ke.marginBottom)||10,we=parseFloat(ke.minHeight)||100,Pe=_T(xe),Ye=5,Ze=5,bt=20,Je=Re.documentElement.clientHeight-Q-re,xt=Re.documentElement.clientWidth,St=Je-ze.bottom+ye;let nt,rt=W==="rtl"?ze.right-Fe.width:ze.left,ct=0;if(ge&&Se){const lt=Qd(Se.getBoundingClientRect(),Me);nt=Qd(ge.getBoundingClientRect(),Me),rt=Fe.left+(W==="rtl"?lt.right-nt.right:lt.left-nt.left);const He=lt.top-ze.top+lt.height/2;ct=nt.top-Fe.top+nt.height/2-He}const it=St+ct+re+fe;let ft=Math.min(Je,it);const Lt=Je-Q-re,Pt=it-ft,At=xt-Ze;j.style.left=`${lc(rt,Ye,At-Fe.width)}px`,j.style.height=`${ft}px`,j.style.maxHeight="none",j.style.marginTop=`${Q}px`,j.style.marginBottom=`${re}px`,be.style.height="100%";const Z=Zd(_e),me=Pt>=Z-vs;me&&(ft=Math.min(Je,Fe.height)-(Pt-Z));const Le=ze.top<bt||ze.bottom>Je-bt||Math.ceil(ft)+vs<Math.min(ee,we),Xe=(Ae.visualViewport?.scale??1)!==1&&Ro;if(Le||Xe){X.current=!0,rh(j,se.current),B(!1);return}const Ct=Math.max(we,ft);if(me){const lt=Math.max(0,Je-it);j.style.top=Fe.height>=Lt?"0":`${lt}px`,j.style.height=`${ft}px`,_e.scrollTop=Zd(_e)}else j.style.bottom="0",_e.scrollTop=Pt;if(nt){const lt=Fe.top,He=Fe.height,qe=nt.top+nt.height/2,De=He>0?(qe-lt)/He*100:50,je=lc(De,0,100);be.style.setProperty("--transform-origin",`50% ${je}%`)}(Ct===Je||ft>=Pe)&&(L.current=!0),R(),C&&f.state.selectedIndex===null&&f.state.activeIndex===null&&E.current[0]!=null&&f.set("activeIndex",0),X.current=!0}finally{ue()}},[f,U,j,O,b,y,k,d,R,A,B,ne,V,E,C,W,M]),v.useEffect(()=>{if(!A||!j||!U)return;const be=xn(j);function ue(ge){m(!1,Rt(Lz,ge))}return Dt(be,"resize",ue)},[m,A,j,U]);const ce={...V?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":S||void 0,id:`${z}-list`},onKeyDown(be){P&&EA.has(be.key)&&be.stopPropagation()},onScroll(be){V||oe(be.currentTarget)},...A&&{style:V?{height:"100%"}:_I}},Ee=bn("div",t,{ref:[n,d],state:le,stateAttributesMapping:s7,props:[q,ce,Lh(Y),{className:!V&&A?ev.className:void 0},c]});return g.jsxs(v.Fragment,{children:[!F&&ev.getElement($),g.jsx(MP,{context:N,modal:!1,disabled:!K,openInteractionType:H,returnFocus:l,restoreFocus:!0,children:Ee})]})});function _T(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function Zd(e){return TI(e.scrollHeight,e.clientHeight)}function AT(e){return G_.getScale(e)}function uc(e,t,n){return e/n[t]}function Qd(e,t){return Tc({x:uc(e.x,"x",t),y:uc(e.y,"y",t),width:uc(e.width,"x",t),height:uc(e.height,"y",t)})}const NT=[["transform","none"],["scale","1"],["translate","0 0"]];function a7(e){const{style:t}=e,n={};for(const[r,s]of NT)n[r]=t.getPropertyValue(r),t.setProperty(r,s,"important");return()=>{for(const[r]of NT){const s=n[r];s?t.setProperty(r,s):t.removeProperty(r)}}}const l7=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,{store:c,scrollHandlerRef:f}=Ds(),{alignItemWithTriggerActive:d}=CI(),h=mt(c,pt.hasScrollArrows),m=mt(c,pt.openMethod),b=mt(c,pt.multiple),k={id:`${mt(c,pt.id)}-list`,role:"listbox","aria-multiselectable":b||void 0,onScroll(R){f.current?.(R.currentTarget)},...d&&{style:_I},className:h&&m!=="touch"?ev.className:void 0},S=Ke(R=>{c.set("listElement",R)});return bn("div",t,{ref:[n,S],props:[k,l]})}),AI=v.createContext(void 0);function s0(){const e=v.useContext(AI);if(!e)throw new Error(In(57));return e}const u7=v.memo(v.forwardRef(function(t,n){const{render:r,className:s,style:a,value:l=null,label:c,disabled:f=!1,nativeButton:d=!1,...h}=t,m=v.useRef(null),b=eN({label:c,textRef:m,indexGuessBehavior:JA.GuessFromOrder}),{store:y,itemProps:k,setOpen:S,setValue:R,selectionRef:T,typingRef:E,valuesRef:C,multiple:_,selectedItemTextRef:D,disabled:A,readOnly:M}=Ds(),B=mt(y,pt.isActive,b.index),P=mt(y,pt.open),N=mt(y,pt.isSelected,l),W=mt(y,pt.isSelectedByFocus,b.index),$=mt(y,pt.isItemEqualToValue),F=b.index,z=F!==-1,U=v.useRef(null);Ve(()=>{if(!z)return;const oe=C.current;return oe[F]=l,()=>{delete oe[F]}},[z,F,l,C]),Ve(()=>{if(!z)return;const oe=y.state.value;let le=oe;_&&Array.isArray(oe)&&(le=oe.length>0?oe[oe.length-1]:void 0),le!==void 0&&ua(l,le,$)&&(y.set("selectedIndex",F),m.current&&(D.current=m.current))},[z,F,_,$,y,l,D]);const H=v.useRef(null),K=v.useRef("mouse"),q=v.useRef(!1),{getButtonProps:Y,buttonRef:O}=$l({disabled:f,focusableWhenDisabled:!0,native:d,composite:!0}),j={disabled:f,selected:N,highlighted:B};function V(oe){if(A||M)return;const le=y.state.value;if(_){const ce=Array.isArray(le)?le:[],Ee=N?n4(ce,l,$):[...ce,l];R(Ee,Rt(vb,oe))}else R(l,Rt(vb,oe)),S(!1,Rt(vb,oe))}function L(){T.current.dragY=0}const X={role:"option","aria-selected":N,tabIndex:P&&B?0:-1,onKeyDown(oe){H.current=oe.key,y.set("activeIndex",F),oe.key===" "&&E.current&&oe.preventDefault()},onClick(oe){const le=oe.type==="click"&&K.current!=="touch",ce=oe.nativeEvent.pointerType,Ee=le&&Yv(oe.nativeEvent)&&(ce!==void 0||B),be=le&&!Ee&&!q.current;q.current=!1,!(oe.type==="keydown"&&H.current===null)&&(f||oe.type==="keydown"&&H.current===" "&&E.current||be||(H.current=null,V(oe.nativeEvent)))},onPointerEnter(oe){K.current=oe.pointerType},onPointerMove(oe){if(oe.pointerType==="mouse"&&oe.buttons===1){const le=T.current;le.dragY+=oe.movementY,le.dragY**2>=64&&(le.allowUnselectedMouseUp=!0)}},onPointerDown(oe){K.current=oe.pointerType,q.current=!0,L()},onMouseUp(){if(L(),f||K.current==="touch"||q.current)return;const oe=!T.current.allowSelectedMouseUp&&N,le=!T.current.allowUnselectedMouseUp&&!N;oe||le||(q.current=!0,U.current?.click(),q.current=!1)}},se=bn("div",t,{ref:[O,n,b.ref,U],state:j,props:[k,X,h,Y]}),ne=v.useMemo(()=>({selected:N,index:F,textRef:m,selectedByFocus:W,hasRegistered:z}),[N,F,m,W,z]);return g.jsx(AI.Provider,{value:ne,children:se})})),OT=v.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:s}=s0();return r||s?g.jsx(c7,{...t,ref:n}):null}),c7=v.memo(v.forwardRef((e,t)=>{const{render:n,className:r,style:s,keepMounted:a,...l}=e,{selected:c}=s0(),f=v.useRef(null),{transitionStatus:d,setMounted:h}=Yc(c),b=bn("span",e,{ref:[t,f],state:{selected:c,transitionStatus:d},props:[{"aria-hidden":!0,children:"✔️"},l],stateAttributesMapping:To});return _o({open:c,ref:f,onComplete(){c||h(!1)}}),b})),f7=v.memo(v.forwardRef(function(t,n){const{index:r,textRef:s,selectedByFocus:a,hasRegistered:l}=s0(),{firstItemTextRef:c,selectedItemTextRef:f}=Ds(),{render:d,className:h,style:m,...b}=t,y=v.useCallback(S=>{S&&(l&&r===0&&(c.current=S),l&&a&&(f.current=S))},[c,f,r,a,l]);return bn("div",t,{ref:[y,n,s],props:b})})),NI="lg",OI="outline",d7={"ui--default-marker":"ui--default-marker",$$css:!0},Vi={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}},IT={base:{kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",k9WMMc:"ui-1yc453h",kMwMTN:"ui-15rks2t",$$css:!0},placeholder:{kMwMTN:"ui-4b2ntj ui-1s8h5yg",$$css:!0}},p7="sm",h7={md:Vi.sizeMd,lg:Vi.sizeLg},m7={md:Vi.frameContentMd,lg:Vi.frameContentLg},g7={md:Vi.frameContentHugFalseMd,lg:Vi.frameContentHugFalseLg};function b7({children:e,variant:t=OI,frame:n="container",shape:r="rounded",size:s=NI,hug:a=!0,className:l,style:c,rootStyle:f,labelStyle:d,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),A=k===void 0?E:k||void 0,M=bx(t,void 0),B=zt(vx.root,Vi.base,Cs.root,Hi[s],h7[s],Ci.appearance,M.applyControlTone&&yx.foreground,M.applyFilledColors&&Ci.colors,M.applyNonFilledBackground&&la.background,t==="outline"&&la.outline,D&&Ci.engaged,!a&&Vi.hugFalse,r==="pill"?Vi.shapePill:Vi.shapeRounded,n==="content"&&m7[s],n==="content"&&!a&&g7[s],f,d7),P=zt(Hl.root,Mh.root,IT.base,_&&IT.placeholder,d),N={className:"ui-78zum5 ui-6s0dn4 ui-2lah0s ui-1mh7f6w ui-1s8h5yg"},W={0:{className:"ui-2lah0s ui-1mh7f6w ui-1s8h5yg"},1:{className:"ui-2lah0s ui-7qsbfx"}}[!!D<<0];return g.jsxs(gx,{...C,ref:T,id:m,className:sn("ui-select-trigger",B.className,l),style:{...B.style,...c},"data-popup-open":A,"data-variant":t,"data-size":s,disabled:h,children:[b!=null&&g.jsx("span",{className:N.className,style:N.style,children:b}),g.jsx("span",{className:sn("ui-select-label",P.className),style:P.style,children:_?S:e}),y!=null&&g.jsx("span",{className:N.className,style:N.style,children:y}),R?null:g.jsx(qt,{name:"chevron-down",size:10,className:sn("ui-select-icon",W.className),style:W.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}]},II=v.createContext(null);function o0(){const e=v.useContext(II);if(!e)throw new Error("Select internals must be used within Select");return e}function y7(){const e=o0(),t=e.hasValue?g.jsx(Qq,{}):void 0;return g.jsx(Xq,{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(b7,{...n,className:sn(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 v7({children:e}){const t=o0(),n=va(),{zIndex:r,portalLayerStyles:s}=ql("popover",t.open),a=Fh(t.placement,t.offset,!1,t.collisionSide),l=t.matchAnchorWidth?"var(--anchor-width)":t.contentWidth;return g.jsxs(e7,{container:n??void 0,style:s,children:[g.jsx(n7,{"data-component":"select-backdrop",...zt(MT.backdrop,r!==null&&MT.backdropZIndex(r-1))}),g.jsx(i7,{align:a.align,alignItemWithTrigger:!1,alignOffset:a.alignOffset,collisionAvoidance:a.collisionAvoidance,"data-component":"select-positioner",positionMethod:a.positionMethod,side:a.side,sideOffset:a.sideOffset,...zh(R4),children:g.jsx(o7,{"data-block-global-shortcuts":t.open?"Escape":void 0,"data-component":"select-popup","data-size":t.menuSize,...zt(D4,jh,L4[t.menuSize],l!==void 0?j4(l):z4,t.contentStyle),children:g.jsx(Is,{menuSize:t.menuSize,children:g.jsx(vB,{children:g.jsx(l7,{"aria-label":t.ariaLabel??"Select an option",...zt(P4),children:e})})})})})]})}function x7({option:e}){o0();const t=e.description!==void 0,n=g.jsxs(u7,{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,...zt($4),children:[e.leading!=null?g.jsx("span",{...zt(Mb,G4,t&&Db),children:e.leading}):null,g.jsxs("span",{...zt(B4,t&&q4),children:[g.jsxs(f7,{...zt(e.labelMeta!=null&&U4),children:[g.jsx("span",{...zt(F4),children:e.label}),e.labelMeta!=null?g.jsx("span",{...zt(V4),children:e.labelMeta}):null]}),t?g.jsx("span",{"data-component":"select-item-description",...zt(H4,Ms.root),children:e.description}):null]}),e.trailing!=null?g.jsxs("span",{"data-component":"select-item-end",...zt(Mb,_E,W4,t&&Db),children:[e.trailing,g.jsx(OT,{"data-component":"select-item-indicator",children:g.jsx(qt,{color:"primary",name:"check","aria-hidden":!0})})]}):g.jsx(OT,{"data-component":"select-item-indicator",...zt(Mb,_E,t&&Db),children:g.jsx(qt,{color:"primary",name:"check","aria-hidden":!0})})]});return e.tooltip==null?n:g.jsx(lf,{closeDelay:e.tooltipCloseDelay,content:e.tooltip,openDelay:e.tooltipOpenDelay,children:n})}function k7({value:e,defaultValue:t,onValueChange:n,open:r,defaultOpen:s,onOpenChange:a,options:l,placeholder:c,variant:f=OI,frame:d="container",shape:h="rounded",size:m=NI,menuSize:b,contentWidth:y,matchAnchorWidth:k=!1,hug:S=!0,disabled:R=!1,className:T,renderTrigger:E,placement:C="bottom-start",offset:_=4,collisionSide:D="flip","aria-label":A,"aria-labelledby":M,id:B,leading:P,trailing:N,labelStyle:W,rootStyle:$,hideChevron:F=!1,contentStyle:z,...U}){const[H,K]=Dl(e,t,void 0,"Select.Root (value)"),q=H!=null&&l.some(ne=>ne.value===H),[Y,O]=Dl(r,s??!1,void 0,"Select.Root (open)"),j=b??"sm",V=v.useCallback((ne,oe)=>{n?.(ne,oe),!oe.isCanceled&&K(ne)},[n,K]),L=v.useCallback((ne,oe)=>{a?.(ne,oe),!oe.isCanceled&&O(ne)},[a,O]),X=v.useMemo(()=>({hasValue:q,variant:f,frame:d,shape:h,size:m,menuSize:j,hug:S,disabled:R,open:Y,placement:C,offset:_,collisionSide:D,id:B,ariaLabel:A,ariaLabelledBy:M,placeholder:c,leading:P,trailing:N,labelStyle:W,rootStyle:$,hideChevron:F,contentStyle:z,className:T,renderTrigger:E,contentWidth:y,matchAnchorWidth:k}),[A,M,T,D,z,y,R,d,S,q,F,B,Y,W,P,k,_,C,c,j,$,N,E,h,m,f]),se=l.map(ne=>({label:ne.label,value:ne.value}));return g.jsx(II.Provider,{value:X,children:g.jsx(Is,{iconSize:p7,children:g.jsxs(Wq,{...U,defaultOpen:s,defaultValue:t,disabled:R,id:B,items:se,onOpenChange:L,onValueChange:V,open:r,value:e,children:[g.jsx(y7,{}),g.jsx(v7,{children:l.map((ne,oe)=>g.jsx(x7,{option:ne},typeof ne.value=="string"||typeof ne.value=="number"?String(ne.value):oe))})]})})})}const S7=v.createContext(void 0);function w7(e=!0){const t=v.useContext(S7);if(t===void 0&&!e)throw new Error(In(7));return t}const E7=v.forwardRef(function(t,n){const{className:r,defaultPressed:s=!1,disabled:a=!1,form:l,onPressedChange:c,pressed:f,render:d,type:h,value:m,nativeButton:b=!0,style:y,...k}=t,S=Fl(m||void 0),R=w7(),T=R?.value??[],E=R?void 0:s,C=(a||R?.disabled)??!1,[_,D]=Al({controlled:R?S!==void 0&&T.indexOf(S)>-1:f,default:E,name:"Toggle",state:"pressed"}),{getButtonProps:A,buttonRef:M}=$l({disabled:C,native:b}),B={disabled:C,pressed:_},P=[M,n],N=[{"aria-pressed":_,onClick(F){const z=!_,U=Rt(Ni,F.nativeEvent);c?.(z,U),!U.isCanceled&&(S&&R?.setGroupValue?.(S,z,U),!U.isCanceled&&D(z))}},k,A],W=bn("button",t,{enabled:!R,state:B,ref:P,props:N}),$=v.useMemo(()=>({disabled:C,focusableWhenDisabled:!1}),[C]);return R?g.jsx(u9,{tag:"button",render:d,className:r,style:y,metadata:$,state:B,refs:P,props:N}):W});function DT(e,t,n,r){return typeof e=="string"?g.jsx(qt,{"aria-hidden":"true",name:e,rootStyle:r,size:n,variant:t}):g.jsx("span",{...HN(n),"aria-hidden":"true",children:e})}function T7({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:DT(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:DT(t,r,s,a)})]})}function R7({icon:e,pressedIcon:t=e,iconVariant:n="outline",variant:r,rounded:s,frame:a="container",size:l,iconSize:c,tone:f,rootStyle:d,iconStyle:h,disabled:m,"aria-label":b,"aria-labelledby":y,...k}){const S=ya(),{size:R,innerIconSize:T,disabled:E,variant:C,tone:_}=GN({disabled:m,enforced:S,iconSize:c,size:l,tone:f,variant:r}),D=VN({enforcedRootStyle:S?.iconButtonRootStyle,frame:a,rootStyle:d,rounded:s,size:R,tone:_,variant:C});return g.jsx(E7,{...k,className:sn("ui-icon-button",D.rootAttrs.className),style:D.rootAttrs.style,...D.dataAttrs,"aria-label":b,"aria-labelledby":y,"data-component":"toggle-icon-button",disabled:E,render:(A,M)=>g.jsx("button",{...A,"data-pressed":void 0,children:g.jsx(T7,{icon:e,iconSize:T,iconStyle:[S?.iconButtonIconStyle,h],iconVariant:n,pressed:M.pressed,pressedIcon:t})})})}function C7({pressed:e,...t}){return g.jsx(R7,{...t,pressed:e,variant:e?"secondary":"ghost"})}const LT=e=>{let t;const n=new Set,r=(d,h)=>{const m=typeof d=="function"?d(t):d;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:()=>f,subscribe:d=>(n.add(d),()=>n.delete(d))},f=t=e(r,s,c);return c},_7=(e=>e?LT(e):LT),A7=e=>e;function N7(e,t=A7){const n=sc.useSyncExternalStore(e.subscribe,sc.useCallback(()=>t(e.getState()),[e,t]),sc.useCallback(()=>t(e.getInitialState()),[e,t]));return sc.useDebugValue(n),n}const O7=/^\/internal\/agent-serve\/agents\/(asd_[0-9a-f]{32})\/engine(?:\/|$)/,I7=/^asd-([0-9a-f]{32})\.agents\.cursorusercontent\.com$/;function M7(e=window.location.pathname,t=window.location.hostname){const n=I7.exec(t.toLowerCase());if(n!==null)return{publicId:`asd_${n[1]}`,mountPath:""};const r=O7.exec(e);if(r===null)return null;const s=r[1];return{publicId:s,mountPath:`/internal/agent-serve/agents/${s}/engine`}}function D7(e=window.location.search){return new URLSearchParams(e).get("embed")==="1"}function MI(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 L7(e,t=window){const n=()=>{const r=MI(t.location,t.history);r!==""&&e(r)};return t.addEventListener("hashchange",n),()=>t.removeEventListener("hashchange",n)}function DI(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 LI(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:DI(e.data)??void 0,artifactId:typeof e.id=="string"&&e.id!==""?e.id:void 0,data:e.data}}function tv(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 j7(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 z7(e){return/\u0000|[\u0001-\u0008\u000b\u000e-\u001f]{4}/.test(e)}function P7(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 $7(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 B7(e){const t=e.title?.trim();return t!==void 0&&t!==""?t:`${e.kind} · ${e.id}`}function F7(e){const t=new Set;for(const n of e)t.add(n.kind);return[...t].sort((n,r)=>n.localeCompare(r))}function jT(e){const t=Date.parse(e.updatedAt);return Number.isNaN(t)?0:t}function jI(e){return[...e].sort((t,n)=>jT(n)-jT(t))}function U7(e,t){return t===null?e:e.filter(n=>n.kind===t)}function q7(e){const t=new Map,n=[];for(const s of jI(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 H7=["home","runs","evals","logs"],nv="section",V7="home",G7={agent:"home"};function W7(e){const t=e?.trim()??"";return t===""?null:H7.includes(t)?t:G7[t]??null}function K7(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=W7(s.searchParams.get(nv))}catch{return{sessionId:null,view:null,section:null}}return n==="logs"&&r===null&&(r="logs"),{sessionId:t,view:n,section:r}}function zI(e){try{const t=new URL(window.location.href);e===V7?t.searchParams.delete(nv):t.searchParams.set(nv,e);const n=t.toString();if(n===window.location.href)return;history.replaceState(null,"",n)}catch{}}const Y7="cursor-playground",X7=["https://cursor.com","https://www.cursor.com","https://prod.cursor.com","https://staging.cursor.com","http://localhost:4000","https://localhost:4000"];function Z7(e=document.referrer,t=window.parent!==window){if(!t||e==="")return null;let n;try{n=new URL(e).origin}catch{return null}return X7.includes(n)?n:null}function Q7(e,t,n=Z7(),r){if(n===null)return;const s={source:Y7,type:"state",view:e};t!==void 0&&(s.sessionId=t),r!==void 0&&(s.section=r),window.parent.postMessage(s,n)}const zT=e=>Number.isFinite(e)?e:0;function J7(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(zT(e*1e3)%1e3),nanoseconds:Math.trunc(zT(e*1e6)%1e3)}}function eH(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 tH(e){switch(typeof e){case"number":{if(Number.isFinite(e))return J7(e);break}case"bigint":return eH(e)}throw new TypeError("Expected a finite number or bigint")}const nH=e=>e===0||e===0n,rH=(e,t)=>t===1||t===1n?e:`${e}s`,iH=1e-7,sH=24n*60n*60n*1000n;function oH(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+iH);return(Math.round(b)/10**m).toFixed(m)},l=(h,m,b,y)=>{if(!((s.length===0||!t.colonNotation)&&nH(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?" "+rH(m,h):b;s.push(y)}},c=tH(e),f=BigInt(c.days);if(t.hideYearAndDays?l(BigInt(f)*24n+BigInt(c.hours),"hour","h"):(t.hideYear?l(f,"day","d"):(l(f/365n,"year","y"),l(f%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%sH):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 d=t.colonNotation?":":" ";return typeof t.unitCount=="number"&&(s=s.slice(0,Math.max(t.unitCount,1))),r+s.join(d)}var PI="en",a0={},rv={};function $I(){return PI}function BI(e){PI=e}function aH(e){return a0[e]}function FI(e){if(!e)throw new Error("No locale data passed");a0[e.locale]=e,rv[e.locale.toLowerCase()]=e.locale}function PT(e){if(a0[e])return e;if(rv[e.toLowerCase()])return rv[e.toLowerCase()]}function UI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.localeMatcher||"lookup";switch(n){case"lookup":return $T(e);case"best fit":return $T(e);default:throw new RangeError('Invalid "localeMatcher" option: '.concat(n))}}function $T(e){var t=PT(e);if(t)return t;for(var n=e.split("-");e.length>1;){n.pop(),e=n.join("-");var r=PT(e);if(r)return r}}var te={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),f=s.slice(-1),d=s.slice(-2);return a&&l==1&&c!=11||f==1&&d!=11?"one":a&&l>=2&&l<=4&&(c<12||c>14)||f>=2&&f<=4&&(d<12||d>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),f=r.slice(-2),d=r.slice(-1);return a&&l==0||c>=11&&c<=19||s==2&&f>=11&&f<=19?"zero":l==1&&c!=11||s==2&&d==1&&f!=11||s!=2&&d==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),f=s.slice(-1),d=s.slice(-2);return a&&l==1&&c!=11||f==1&&d!=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"}};te.as=te.am;te.az=te.af;te.bal=te.af;te.bg=te.af;te.bn=te.am;te.brx=te.af;te.ce=te.af;te.chr=te.af;te.csw=te.ak;te.cv=te.blo;te.de=te.ast;te.doi=te.am;te.ee=te.af;te.el=te.af;te.en=te.ast;te.eo=te.af;te.et=te.ast;te.eu=te.af;te.fa=te.am;te.fi=te.ast;te.fil=te.ceb;te.fo=te.af;te.fur=te.af;te.fy=te.ast;te.gl=te.ast;te.gu=te.am;te.ha=te.af;te.hi=te.am;te.hr=te.bs;te.hsb=te.dsb;te.hu=te.af;te.hy=te.ff;te.ia=te.ast;te.id=te.dz;te.ie=te.ast;te.ig=te.dz;te.ii=te.dz;te.it=te.ca;te.ja=te.dz;te.jgo=te.af;te.jv=te.dz;te.ka=te.af;te.kea=te.dz;te.kk=te.af;te.kl=te.af;te.km=te.dz;te.kn=te.am;te.ko=te.dz;te.kok=te.am;te.ks=te.af;te.ksh=te.blo;te.ku=te.af;te.ky=te.af;te.lb=te.af;te.lkt=te.dz;te.lld=te.ca;te.lo=te.dz;te.ml=te.af;te.mn=te.af;te.mr=te.af;te.ms=te.dz;te.my=te.dz;te.nb=te.af;te.ne=te.af;te.nl=te.ast;te.nn=te.af;te.no=te.af;te.nqo=te.dz;te.nso=te.ak;te.om=te.af;te.or=te.af;te.pa=te.ak;te.pcm=te.am;te.ps=te.af;te.rm=te.af;te.sah=te.dz;te.sc=te.ast;te.scn=te.ca;te.sd=te.af;te.sk=te.cs;te.so=te.af;te.sq=te.af;te.sr=te.bs;te.su=te.dz;te.sv=te.ast;te.sw=te.ast;te.syr=te.af;te.ta=te.af;te.te=te.af;te.th=te.dz;te.ti=te.ak;te.tk=te.af;te.tn=te.af;te.to=te.dz;te.tr=te.af;te.ug=te.af;te.uk=te.ru;te.ur=te.ast;te.uz=te.af;te.vec=te.ca;te.vi=te.dz;te.wae=te.af;te.wo=te.dz;te.xh=te.af;te.yi=te.ast;te.yo=te.dz;te.yue=te.dz;te.zh=te.dz;te.zu=te.am;function BT(e){return e==="pt-PT"?e:uH(e)}var lH=/^([a-z0-9]+)/i;function uH(e){var t=e.match(lH);if(!t)throw new TypeError("Invalid locale: ".concat(e));return t[1]}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 cH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FT(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,dH(r.key),r)}}function fH(e,t,n){return t&&FT(e.prototype,t),n&&FT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function dH(e){var t=pH(e,"string");return Nc(t)=="symbol"?t:t+""}function pH(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 String(e)}var iv=(function(){function e(t,n){cH(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.$=te[BT(r[0])]}return fH(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 te[BT(r)]})}}]),e})();function jl(e){"@babel/helpers - typeof";return jl=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},jl(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 qT(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){hH(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 hH(e,t,n){return(t=qI(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HT(e,t){return yH(e)||bH(e,t)||gH(e,t)||mH()}function mH(){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 gH(e,t){if(e){if(typeof e=="string")return VT(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)?VT(e,t):void 0}}function VT(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 bH(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,l,c=[],f=!0,d=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(f=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(h){d=!0,s=h}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw s}}return c}}function yH(e){if(Array.isArray(e))return e}function vH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xH(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,qI(r.key),r)}}function kH(e,t,n){return t&&xH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function qI(e){var t=SH(e,"string");return jl(t)=="symbol"?t:t+""}function SH(e,t){if(jl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var wH=["second","minute","hour","day","week","month","quarter","year"],EH=["auto","always"],TH=["long","short","narrow"],RH=["lookup","best fit"],Ns=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};vH(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(EH.indexOf(r)<0)throw new RangeError('Invalid "numeric" option: '.concat(r));this.numeric=r}if(s!==void 0){if(TH.indexOf(s)<0)throw new RangeError('Invalid "style" option: '.concat(s));this.style=s}if(a!==void 0){if(RH.indexOf(a)<0)throw new RangeError('Invalid "localeMatcher" option: '.concat(a));this.localeMatcher=a}if(typeof t=="string"&&(t=[t]),t.push($I()),this.locale=e.supportedLocalesOf(t,{localeMatcher:this.localeMatcher})[0],!this.locale)throw new Error("Unsupported locale");iv.supportedLocalesOf(this.locale).length>0?this.pluralRules=new iv(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=UI(this.locale,{localeMatcher:this.localeMatcher})}return kH(e,[{key:"format",value:function(){var n=GT(arguments),r=HT(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=GT(arguments),r=HT(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 f=[];return c>0&&f.push({type:"literal",value:l.slice(0,c)}),f=f.concat(this.formatNumberToParts(Math.abs(s)).map(function(d){return qT(qT({},d),{},{unit:a})})),c+3<l.length-1&&f.push({type:"literal",value:l.slice(c+3)}),f}},{key:"getRule",value:function(n,r){var s=aH(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[OH(n)?"past":"future"];if(typeof c=="string")return c;var f=this.pluralRules&&this.pluralRules.select(Math.abs(n))||"other";return c[f]||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})();Ns.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 UI(n,t)})};Ns.addLocale=FI;Ns.addDefaultLocale=function(e){FI(e),BI(e.locale)};Ns.setDefaultLocale=BI;Ns.getDefaultLocale=$I;Ns.PluralRules=iv;var ty='Invalid "unit" argument';function CH(e){if(jl(e)==="symbol")throw new TypeError(ty);if(typeof e!="string")throw new RangeError("".concat(ty,": ").concat(e));if(e[e.length-1]==="s"&&(e=e.slice(0,e.length-1)),wH.indexOf(e)<0)throw new RangeError("".concat(ty,": ").concat(e));return e}var _H='Invalid "number" argument';function AH(e){if(e=Number(e),Number.isFinite&&!Number.isFinite(e))throw new RangeError("".concat(_H,": ").concat(e));return e}function NH(e){return 1/e===-1/0}function OH(e){return e<0||e===0&&NH(e)}function GT(e){if(e.length<2)throw new TypeError('"unit" argument is required');return[AH(e[0]),CH(e[1])]}function ca(e){"@babel/helpers - typeof";return ca=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},ca(e)}function IH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MH(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,LH(r.key),r)}}function DH(e,t,n){return t&&MH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function LH(e){var t=jH(e,"string");return ca(t)=="symbol"?t:t+""}function jH(e,t){if(ca(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ca(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var WT=(function(){function e(){IH(this,e),this.cache={}}return DH(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 f=c[l];if(ca(n)!=="object")return;n=n[f]}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,f=0,d=r;f<d.length;f++){var h=d[f];ca(c[h])!=="object"&&(c[h]={}),c=c[h]}return c[l]=a}}]),e})();function sv(e){"@babel/helpers - typeof";return sv=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},sv(e)}function zH(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=PH(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 PH(e,t){if(e){if(typeof e=="string")return KT(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)?KT(e,t):void 0}}function KT(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 $H(e,t){for(var n=zH(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 BH(){var e=(typeof Intl>"u"?"undefined":sv(Intl))==="object";return e&&typeof Intl.DateTimeFormat=="function"}function ov(e){"@babel/helpers - typeof";return ov=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},ov(e)}function FH(e){return qH(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 UH={}.constructor;function qH(e){return ov(e)!==void 0&&e!==null&&e.constructor===UH}var ks=60,ih=60*ks,ia=24*ih,av=7*ia,lv=30.44*ia,HI=146097/400*ia;function Sl(e){switch(e){case"second":return 1;case"minute":return ks;case"hour":return ih;case"day":return ia;case"week":return av;case"month":return lv;case"year":return HI}}function VI(e){return e.factor!==void 0?e.factor:Sl(e.unit||e.formatAs)||1}function Oc(e){return e==="floor"?Math.floor:Math.round}function l0(e){return e==="floor"?1:.5}function uv(e){"@babel/helpers - typeof";return uv=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},uv(e)}function GI(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),uv(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(d,h){return YT(d,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=YT(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 YT(e,t,n){var r=n.round,s=Sl(e),a=Sl(t==="now"?e:t);if(s!==void 0&&a!==void 0)return s-a*(1-l0(r))}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 XT(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 HH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XT(Object(n),!0).forEach(function(r){VH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function VH(e,t,n){return(t=GH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GH(e){var t=WH(e,"string");return Ic(t)=="symbol"?t:t+""}function WH(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)}function KH(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.units;e=XH(e,l);var c=YH(e,t,{now:r,future:s,round:a});{if(c){var f=e[e.indexOf(c)-1],d=e[e.indexOf(c)+1];return[f,c,d]}return[void 0,void 0,e[0]]}}function YH(e,t,n){var r=n.now,s=n.future,a=n.round;if(e.length!==0){var l=WI(e,t,{now:r,future:s||t<0,round:a});if(l!==-1){var c=e[l];if(c.granularity){var f=Oc(a)(Math.abs(t)/VI(c)/c.granularity)*c.granularity;if(f===0&&l>0)return e[l-1]}return c}}}function WI(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=GI(e[r],HH({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:WI(e,t,n,r+1)}function XH(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 ZH(e,t,n){var r=n.now,s=n.round;if(Sl(e)){var a=Sl(e)*1e3,l=t>r,c=Math.abs(t-r),f=Oc(s)(c/a)*a;return l?f>0?c-f+JH(s,a):c-f+1:-(c-f)+QH(s,a)}}function QH(e,t){return l0(e)*t}function JH(e,t){return(1-l0(e))*t+1}var eV=365*24*60*60*1e3,KI=1e3*eV;function tV(e,t,n){var r=n.prevStep,s=n.nextStep,a=n.now,l=n.future,c=n.round,f=e.getTime?e.getTime():e,d=function(k){return ZH(k,f,{now:a,round:c})},h=rV(l?t:s,f,{future:l,now:a,round:c,prevStep:l?r:t});if(h!==void 0){var m;if(t&&(t.getTimeToNextUpdate&&(m=t.getTimeToNextUpdate(f,{getTimeToNextUpdateForUnit:d,getRoundFunction:Oc,now:a,future:l,round:c})),m===void 0)){var b=t.unit||t.formatAs;b&&(m=d(b))}return m===void 0?h:Math.min(m,h)}}function nV(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.prevStep,c=GI(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?KI:t+c*1e3}function rV(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.prevStep;if(e){var c=nV(e,t,{now:r,future:s,round:a,prevStep:l});return c===void 0?void 0:c-r}else return s?t-r+1:KI}var YI={};function bl(e){return YI[e]}function XI(e){if(!e)throw new Error("[javascript-time-ago] No locale data passed.");YI[e.locale]=e}const iV=[{formatAs:"now"},{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"}],cv={steps:iV,labels:"long"};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 ZT(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 QT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ZT(Object(n),!0).forEach(function(r){sV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sV(e,t,n){return(t=oV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oV(e){var t=aV(e,"string");return Mc(t)=="symbol"?t:t+""}function aV(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 fv=QT(QT({},cv),{},{steps:cv.steps.filter(function(e){return e.formatAs!=="second"})}),ZI=[{factor:1,unit:"now"},{threshold:1,threshold_for_now:45.5,factor:1,unit:"second"},{threshold:45.5,factor:ks,unit:"minute"},{threshold:2.5*ks,granularity:5,factor:ks,unit:"minute"},{threshold:22.5*ks,factor:.5*ih,unit:"half-hour"},{threshold:42.5*ks,threshold_for_minute:52.5*ks,factor:ih,unit:"hour"},{threshold:20.5/24*ia,factor:ia,unit:"day"},{threshold:5.5*ia,factor:av,unit:"week"},{threshold:3.5*av,factor:lv,unit:"month"},{threshold:10.5*lv,factor:HI,unit:"year"}],JT={gradation:ZI,flavour:"long",units:["now","minute","hour","day","week","month","year"]},lV={gradation:ZI,flavour:"long-time",units:["now","minute","hour","day","week","month","year"]};function QI(e){return e instanceof Date?e:new Date(e)}var dv=[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"}],qi={},uV={minTime:function(t,n){n.future;var r=n.getMinTimeForUnit;return r("day")},format:function(t,n){return qi[n]||(qi[n]={}),qi[n].dayMonth||(qi[n].dayMonth=new Intl.DateTimeFormat(n,{month:"short",day:"numeric"})),qi[n].dayMonth.format(QI(t))}},cV={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 qi[n]||(qi[n]={}),qi[n].dayMonthYear||(qi[n].dayMonthYear=new Intl.DateTimeFormat(n,{year:"numeric",month:"short",day:"numeric"})),qi[n].dayMonthYear.format(QI(t))}};BH()?dv.push(uV,cV):dv.push({formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"});const fa={steps:dv,labels:["mini","short-time","narrow","short"]};function Dc(e){"@babel/helpers - typeof";return Dc=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},Dc(e)}function eR(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 tR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eR(Object(n),!0).forEach(function(r){fV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fV(e,t,n){return(t=dV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dV(e){var t=pV(e,"string");return Dc(t)=="symbol"?t:t+""}function pV(e,t){if(Dc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Dc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const hV=tR(tR({},fa),{},{steps:[{formatAs:"now"}].concat(fa.steps)});function Lc(e){"@babel/helpers - typeof";return Lc=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},Lc(e)}function nR(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 rR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nR(Object(n),!0).forEach(function(r){mV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mV(e,t,n){return(t=gV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gV(e){var t=bV(e,"string");return Lc(t)=="symbol"?t:t+""}function bV(e,t){if(Lc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const pv=rR(rR({},fa),{},{steps:fa.steps.filter(function(e){return e.formatAs!=="second"})});function jc(e){"@babel/helpers - typeof";return jc=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},jc(e)}function iR(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 sR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iR(Object(n),!0).forEach(function(r){yV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yV(e,t,n){return(t=vV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vV(e){var t=xV(e,"string");return jc(t)=="symbol"?t:t+""}function xV(e,t){if(jc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const kV=sR(sR({},pv),{},{steps:[{formatAs:"now"}].concat(pv.steps)});function zc(e){"@babel/helpers - typeof";return zc=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},zc(e)}function oR(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 Jd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oR(Object(n),!0).forEach(function(r){SV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SV(e,t,n){return(t=wV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wV(e){var t=EV(e,"string");return zc(t)=="symbol"?t:t+""}function EV(e,t){if(zc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const TV=Jd(Jd({},fa),{},{steps:fa.steps.filter(function(e){return e.formatAs!=="second"}).map(function(e){return e.formatAs==="minute"?Jd(Jd({},e),{},{minTime:ks}):e})}),Pc={steps:[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"month"},{formatAs:"year"}],labels:["mini","short-time","narrow","short"]};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 aR(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 lR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aR(Object(n),!0).forEach(function(r){RV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RV(e,t,n){return(t=CV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CV(e){var t=_V(e,"string");return $c(t)=="symbol"?t:t+""}function _V(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 AV=lR(lR({},Pc),{},{steps:[{formatAs:"now"}].concat(Pc.steps)});function Bc(e){"@babel/helpers - typeof";return Bc=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},Bc(e)}function uR(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 cR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uR(Object(n),!0).forEach(function(r){NV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function NV(e,t,n){return(t=OV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OV(e){var t=IV(e,"string");return Bc(t)=="symbol"?t:t+""}function IV(e,t){if(Bc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const hv=cR(cR({},Pc),{},{steps:Pc.steps.filter(function(e){return e.formatAs!=="second"})});function Fc(e){"@babel/helpers - typeof";return Fc=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},Fc(e)}function fR(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 dR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fR(Object(n),!0).forEach(function(r){MV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function MV(e,t,n){return(t=DV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DV(e){var t=LV(e,"string");return Fc(t)=="symbol"?t:t+""}function LV(e,t){if(Fc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const jV=dR(dR({},hv),{},{steps:[{formatAs:"now"}].concat(hv.steps)});function zV(e){switch(e){case"default":case"round":return cv;case"round-minute":return fv;case"approximate":return JT;case"time":case"approximate-time":return lV;case"mini":return Pc;case"mini-now":return AV;case"mini-minute":return hv;case"mini-minute-now":return jV;case"twitter":return fa;case"twitter-now":return hV;case"twitter-minute":return pv;case"twitter-minute-now":return kV;case"twitter-first-minute":return TV;default:return JT}}function da(e){"@babel/helpers - typeof";return da=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},da(e)}function PV(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=JI(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 $V(e,t){return UV(e)||FV(e,t)||JI(e,t)||BV()}function BV(){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 JI(e,t){if(e){if(typeof e=="string")return pR(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)?pR(e,t):void 0}}function pR(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 FV(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,l,c=[],f=!0,d=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(f=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(h){d=!0,s=h}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw s}}return c}}function UV(e){if(Array.isArray(e))return e}function qV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HV(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,GV(r.key),r)}}function VV(e,t,n){return t&&HV(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function GV(e){var t=WV(e,"string");return da(t)=="symbol"?t:t+""}function WV(e,t){if(da(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(da(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var jr=(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;qV(this,e),typeof t=="string"&&(t=[t]),this.locale=$H(t.concat(e.getDefaultLocale()),bl),typeof Intl<"u"&&Intl.NumberFormat&&(this.numberFormat=new Intl.NumberFormat(this.locale)),r===!1?(this.IntlRelativeTimeFormat=Intl.RelativeTimeFormat,this.IntlPluralRules=Intl.PluralRules):(this.IntlRelativeTimeFormat=Ns,this.IntlPluralRules=Ns.PluralRules),this.relativeTimeFormatCache=new WT,this.pluralRulesCache=new WT}return VV(e,[{key:"format",value:function(n,r,s){var a=this;s||(r&&!QV(r)?(s=r,r=void 0):s={}),r||(r=fv),typeof r=="string"&&(r=zV(r));var l=KV(n),c=this.getLabels(r.flavour||r.labels),f=c.labels,d=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(A){var M=A.now,B=(M-l)/1e3,P=s.future||B<0,N=ZV(f,bl(a.locale).now,bl(a.locale).long,P);if(r.custom){var W=r.custom({now:M,date:new Date(l),time:l,elapsed:B,locale:a.locale});if(W!==void 0)return{getText:function(){return W},getTextRefreshDelay:function(){throw new Error('`getTimeToNextUpdate: true` feature is not supported by legacy "styles" that have a `custom` function')}}}var $=XV(r.units,f,N),F=KH(r.gradation||r.steps||fv.steps,B,{now:M,units:$,round:h,future:P}),z=$V(F,3),U=z[0],H=z[1],K=z[2],q=function(){return a.formatDateForStep(l,H,B,{labels:f,labelsType:d,nowLabel:N,now:M,future:P,round:h})||""},Y=function(){var j=tV(l,H,{nextStep:K,prevStep:U,now:M,future:P,round:h});if(typeof j=="number")return s.getTimeToNextUpdateUncapped?j:tM(j)};return{getText:q,getTextRefreshDelay:Y}},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 A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:T;E=JV(function(){var M=y({now:m+(Date.now()-b)}),B=M.getText,P=M.getTextRefreshDelay;s.refresh(B()),D(P())},A)};C(R());var _=function(){clearTimeout(E)};return[S(),_]}return S()}},{key:"formatDateForStep",value:function(n,r,s,a){var l=this,c=a.labels,f=a.labelsType,d=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 d;var k=Math.abs(s)/VI(r);r.granularity&&(k=Oc(b)(k/r.granularity)*r.granularity);var S=-1*Math.sign(s)*Oc(b)(k);switch(S===0&&(m?S=0:S=-0),f){case"long":case"short":case"narrow":return this.getFormatter(f).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",f=n[c]||n;if(typeof f=="string")return f;var d=this.getPluralRules().select(Math.abs(s));return f[d]||f.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=bl(this.locale),s=PV(n),a;!(a=s()).done;){var l=a.value;if(r[l])return{labelsType:l,labels:r[l]}}}}]),e})(),eM="en";jr.getDefaultLocale=function(){return eM};jr.setDefaultLocale=function(e){mv=!0,eM=e};jr.addDefaultLocale=function(e){mv&&jr.getDefaultLocale()!==e.locale&&console.warn(`[javascript-time-ago] You're adding "`.concat(e.locale,'" as the default locale but you have already added "').concat(jr.getDefaultLocale(),'" as the default locale. "').concat(e.locale,'" is the default locale now.')),mv=!0,jr.addLocale(e),jr.setDefaultLocale(e.locale)};var mv=!1;jr.addLocale=function(e){XI(e),Ns.addLocale(e)};jr.locale=jr.addLocale;jr.addLabels=function(e,t,n){var r=bl(e);r||(XI({locale:e}),r=bl(e)),r[t]=n};function KV(e){if(e.constructor===Date||YV(e))return e.getTime();if(typeof e=="number")return e;throw new Error("Unsupported relative time formatter input: ".concat(da(e),", ").concat(e))}function YV(e){return da(e)==="object"&&typeof e.getTime=="function"}function XV(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 ZV(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 QV(e){return typeof e=="string"||FH(e)}function JV(e,t){return setTimeout(e,tM(t))}function tM(e){return Math.min(e,eG)}var eG=2147483647;const nM={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"}}};jr.addLocale(nM);jr.addDefaultLocale(nM);const tG=new jr("en-US");function Pn(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 Jr(e,t){const n=String(e??"").replace(/\s+/g," ").trim();return n.length>t?`${n.slice(0,t-1)}…`:n}function nG(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 wl(e){if(!e)return null;const t=Date.parse(e);return Number.isNaN(t)?null:t}function Ii(e){return e==null||!Number.isFinite(e)?"—":oH(e)}function u0(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 rG=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3,hour12:!1});function hR(e){return e==null||!Number.isFinite(e)?"—":rG.format(e)}function gv(e,t=Date.now()){const n=wl(e);return n===null?null:tG.format(Math.min(n,t),"mini",{now:t})}function Eo(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 iG=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1});function sh(e){return e==null||!Number.isFinite(e)?"0":iG.format(e)}function c0(e){return e==null||!Number.isFinite(e)?"—":e===0?"$0.00":e>=.1?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`}function rM(e){if(e?.redacted===!0)return null;const t=e?.text;return typeof t=="string"&&t!==""?t:null}function bv(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}const sG=new Set(["review.cursor.com"]);function iM(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==="cursor.com"&&n[0]==="codebase"&&n.length>=5&&n[3]==="pull"||sG.has(t.hostname)&&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 oG(e){return typeof e=="string"?e:e&&typeof e=="object"&&typeof e.id=="string"?e.id:e?JSON.stringify(e):""}function sM(e){return e!=="http"}const aG=new Set(["chat","trace","raw","artifacts"]);function lG(e){if(!e.seeded||!e.embedded)return{action:"none"};const n=e.sessions.filter(s=>!e.knownIds.has(s.sessionId)&&sM(s.channelId)&&s.running===!0)[0];return n===void 0?{action:"none"}:e.currentSessionId===null&&aG.has(e.view)?{action:"select",sessionId:n.sessionId}:{action:"reveal",sessionId:n.sessionId}}function uG(e){return e.filter(t=>sM(t.channelId)&&t.running===!0).length}function mR(e,t){return typeof t.text=="string"?t.text:typeof t.delta=="string"?e+t.delta:e}const cG=new Set(["github","slack"]);function fG(e){return/^\s*\//.test(e)}function em(e){const t=[];for(const n of e??[])if(n.id!=="http"&&!(n.kind!==void 0&&cG.has(n.kind)))for(const r of n.routes??[]){const s=gG(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:oh(n.method)-oh(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 dG(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 pG(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(d=>d.method).join("|"),l=s.find(d=>d.description)?.description??"",c=f0(s[0]),f=aM(c);t.push(f?`- \`${r}\` (${a}) — ${l}${l?" ":""}${f}`:`- \`${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 hG(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=mG(l,a),f=f0(c),d=vG(a,f);if(!d.ok)return{ok:!1,error:d.error,commandName:s};const h=bG(f,d.value);return h.length>0?{ok:!1,error:`Missing required field${h.length>1?"s":""}: ${h.join(", ")}. ${aM(f)||""}`.trim(),commandName:s}:c.method==="GET"||c.method==="HEAD"?{ok:!0,command:c,query:SG(d.value)}:{ok:!0,command:c,body:d.value,query:c.querySchema!==void 0?wG(d.value,c.querySchema):void 0}}function mG(e,t){if(e.length===1)return e[0];const n=[...e].sort((a,l)=>oh(a.method)-oh(l.method)),r=lM(t);if(r!==null){let a=null,l=-1;for(const c of n){const f=f0(c),d=yG(f,r);d>l&&(l=d,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 gG(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 oh(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 f0(e){return e.method==="GET"||e.method==="HEAD"?e.querySchema:e.bodySchema??e.querySchema}function aM(e){if(e===void 0)return"";const t=tm(e);if(t===void 0)return"";const n=nm(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 tm(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 nm(e){return e===void 0||!Array.isArray(e.required)?new Set:new Set(e.required.filter(t=>typeof t=="string"))}function bG(e,t){const n=nm(e),r=[];for(const s of n){const a=t[s];(a==null||typeof a=="string"&&a.trim()==="")&&r.push(s)}return r}function yG(e,t){const n=tm(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 nm(e))s in t&&(r+=3);return r}function lM(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 vG(e,t){if(e==="")return{ok:!0,value:{}};const n=lM(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=tm(t),s={},a=[];for(const l of xG(e)){const c=l.indexOf("=");if(c>0){const f=l.slice(0,c),d=l.slice(c+1);s[f]=kG(d,r?.[f])}else a.push(l)}if(a.length>0){const l=[...nm(t)],c=(l.length>0?l:Object.keys(r??{})).filter(d=>{const h=r?.[d];return h===void 0||h.type==="string"||h.type===void 0}),f=c.find(d=>s[d]===void 0)??c[0];if(f===void 0)return{ok:!1,error:`Unexpected positional args: ${a.join(" ")}`};a.length===1?s[f]=a[0]:s[f]=a.join(" ")}return{ok:!0,value:s}}function xG(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 kG(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 SG(e){const t={};for(const[n,r]of Object.entries(e))r!=null&&(t[n]=typeof r=="string"?r:String(r));return t}function wG(e,t){const n=tm(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}class EG{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,f=!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,f=!0,await a.cancel().catch(()=>{});break}l.push(b),c+=b.length}}const d=new Uint8Array(c);let h=0;for(const m of l)d.set(m,h),h+=m.length;return{status:r.status,ok:!0,contentType:s,bytes:d,truncated:f}}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[f,d]of Object.entries(r.query))d!==""&&l.set(f,d);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`)}}const yt={infoRead:"info.read",sessionRead:"session.read",sessionStart:"session.start",sessionFollowUp:"session.followUp",sessionStop:"session.stop",sessionStream:"session.stream",eventRead:"event.read",sessionCost:"session.cost",approvalResolve:"approval.resolve",authResolve:"auth.resolve",logRead:"log.read",artifactRead:"artifact.read",artifactContent:"artifact.content",scheduleDispatch:"schedule.dispatch",evalRead:"eval.read",evalRun:"eval.run",evalCancel:"eval.cancel",channelInvoke:"channel.invoke"},TG=new Set(Object.values(yt));class RG{constructor(t){this.client=t,this.capabilities=TG,this.health=()=>this.client.health(),this.info=()=>this.client.info(),this.meta=()=>this.client.meta(),this.logs=n=>this.client.logs(n),this.sessions=()=>this.client.sessions(),this.createSession=n=>this.client.createSession(n),this.followUp=(n,r,s)=>this.client.followUp(n,r,s),this.stopSession=n=>this.client.stopSession(n),this.subscribeEvents=(n,r,s)=>this.client.streamFetch(n,r,s),this.eventsText=n=>this.client.eventsText(n),this.sessionCost=n=>this.client.sessionCost(n),this.resolveApproval=(n,r,s)=>this.client.resolveApproval(n,r,s),this.resolveAuth=(n,r,s)=>this.client.resolveAuth(n,r,s),this.artifacts=n=>this.client.artifacts(n),this.artifactContent=(n,r)=>this.client.artifactContent(n,r),this.dispatchSchedule=n=>this.client.dispatchSchedule(n),this.evalsList=()=>this.client.evalsList(),this.evalsListRuns=()=>this.client.evalsListRuns(),this.evalsStartRun=n=>this.client.evalsStartRun(n),this.evalsRunStatus=n=>this.client.evalsRunStatus(n),this.evalsCancelRun=n=>this.client.evalsCancelRun(n),this.channelRequest=(n,r,s)=>this.client.channelRequest(n,r,s),this.url=n=>this.client.url(n)}}const CG="agent-sdk-playground-boot";function _G(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function AG(e){const t=e.getElementById(CG);if(t===null)return{kind:"local"};let n;try{n=JSON.parse(t.textContent??"")}catch{throw new Error("Playground boot document is not valid JSON.")}if(!_G(n)||n.transport!=="hosted")throw new Error("Playground boot document has an unknown transport.");if(typeof n.teamId!="number"||!Number.isSafeInteger(n.teamId)||n.teamId<=0||typeof n.deploymentSlug!="string"||n.deploymentSlug.length===0||n.evals!==void 0&&typeof n.evals!="boolean")throw new Error("Playground hosted transport configuration is invalid.");return{kind:"hosted",teamId:n.teamId,deploymentSlug:n.deploymentSlug,evals:n.evals===!0}}const uM=new Set([yt.infoRead,yt.sessionRead,yt.sessionStart,yt.sessionFollowUp,yt.sessionStream,yt.eventRead,yt.logRead]),NG=new Set([...uM,yt.evalRead,yt.evalRun]),gR=18e4,OG=1e3,bR=500;function IG(e){return Math.min(100*2**e,OG)}const MG=2e4,DG=5e3,LG=100,jG=e=>new Promise(t=>globalThis.setTimeout(t,e));function gn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function zG(e){return!gn(e)||typeof e.slug!="string"?null:{slug:e.slug,cliVersion:typeof e.manifestCliVersion=="string"?e.manifestCliVersion:void 0}}function PG(e){if(!gn(e)||!Array.isArray(e.components))return null;const t=e.components.filter(n=>gn(n)&&typeof n.componentKey=="string"&&gn(n.info));return(t.find(n=>n.componentKey==="default")??t[0])?.info??null}function $G(e){return!gn(e)||typeof e.deliveryId!="string"||e.deliveryId===""||e.sessionId!==void 0&&(typeof e.sessionId!="string"||e.sessionId==="")?null:{deliveryId:e.deliveryId,sessionId:e.sessionId}}function BG(e){return gn(e)?e.status==="pending"?{status:"pending"}:e.status==="allocated"&&typeof e.sessionId=="string"&&e.sessionId!==""?{status:"allocated",sessionId:e.sessionId}:e.status==="skipped"||e.status==="failed"?{status:e.status}:null:null}function FG(e){switch(e){case"unbound":case"creating":case"active":case"hibernated":case"failed":case"deleting":return e;default:return null}}function UG(e){if(!gn(e))return null;const t=FG(e.phase);return t===null||typeof e.sessionId!="string"||typeof e.channelId!="string"||typeof e.mode!="string"||typeof e.createdAt!="string"||typeof e.lastActivityAt!="string"||e.lastError!==null&&typeof e.lastError!="string"||e.customer!==void 0&&typeof e.customer!="boolean"?null:{sessionId:e.sessionId,channelId:e.channelId,mode:e.mode,phase:t,createdAt:e.createdAt,lastActivityAt:e.lastActivityAt,lastError:e.lastError,customer:e.customer===!0}}function qG(e){if(!gn(e)||!Array.isArray(e.sessions))return null;const t=[];for(const n of e.sessions){const r=UG(n);if(r===null)return null;t.push(r)}return e.nextCursor===null?{sessions:t,nextCursor:null}:!gn(e.nextCursor)||typeof e.nextCursor.lastActivityAt!="string"||typeof e.nextCursor.id!="string"?null:{sessions:t,nextCursor:{lastActivityAt:e.nextCursor.lastActivityAt,id:e.nextCursor.id}}}function cM(e){return!gn(e)||typeof e.type!="string"||e.index!==void 0&&typeof e.index!="number"||e.at!==void 0&&typeof e.at!="string"||e.turnId!==void 0&&typeof e.turnId!="string"||e.sessionId!==void 0&&typeof e.sessionId!="string"||e.data!==void 0&&!gn(e.data)?null:{index:e.index,type:e.type,at:e.at,turnId:e.turnId,sessionId:e.sessionId,data:e.data,liveTruncated:e.liveTruncated===!0?!0:void 0}}function HG(e){if(!gn(e)||!Array.isArray(e.events))return null;const t=[];for(const n of e.events){const r=cM(n);if(r===null)return null;t.push(r)}return t}function VG(e){if(!gn(e)||!Array.isArray(e.events)||typeof e.unreadableChunks!="number")return null;const t=[];for(const r of e.events){const s=cM(r);if(s===null)return null;t.push(s)}let n=null;if(e.execution!==null){if(!gn(e.execution)||typeof e.execution.executionId!="string"||typeof e.execution.turnStatus!="string")return null;n={executionId:e.execution.executionId,turnStatus:e.execution.turnStatus}}return{events:t,execution:n,unreadableChunks:e.unreadableChunks}}function GG(e){if(!gn(e)||!Array.isArray(e.sessions))return null;const t=[];for(const n of e.sessions){if(!gn(n)||typeof n.sessionId!="string"||!Array.isArray(n.lines)||!n.lines.every(r=>typeof r=="string"))return null;t.push({sessionId:n.sessionId,channelId:typeof n.channelId=="string"?n.channelId:void 0,lines:n.lines})}return t}function WG(e,t){for(let n=Math.min(e.length,t.length);n>0;n--){const r=e.length-n;let s=0;for(;s<n&&t[s]===e[r+s];)s++;if(s===n)return t.slice(n)}return[...t]}function KG(e,t,n){e.delete(t),e.set(t,n);for(const r of e.keys()){if(e.size<=LG)return;e.delete(r)}}function YG(e){if(e.lastError!==null||e.phase==="failed")return"Failed";switch(e.phase){case"unbound":case"creating":return"Creating";case"active":return"Active";case"hibernated":return"Hibernated";case"deleting":return"Deleting"}}const XG=100;function ZG(e){if(!gn(e)||!gn(e.session))return null;const t=e.session;if(typeof t.sessionId!="string"||t.sessionId==="")return null;const n=typeof t.channelId=="string"?t.channelId:"http",r=typeof t.mode=="string"?t.mode:"chat";return{sessionId:t.sessionId,channelId:n,mode:r,followUpAllowed:!1,title:`${t.sessionId} · History`,running:t.running===!0,turnCount:typeof t.turnCount=="number"?t.turnCount:void 0,createdAt:typeof t.createdAt=="string"?t.createdAt:void 0,updatedAt:typeof t.updatedAt=="string"?t.updatedAt:void 0}}const fM=new Set(["creating","active"]);function QG(e,t){return{sessionId:e.sessionId,channelId:e.channelId,mode:e.mode,followUpAllowed:e.channelId==="http"&&!e.customer,title:`${e.sessionId} · ${YG(e)}`,running:fM.has(e.phase),turnCount:t,createdAt:e.createdAt,updatedAt:e.lastActivityAt}}function yR(e){return`${e.lastActivityAt}|${e.phase}`}const JG=3e4;function eW(e){if(!gn(e)||!gn(e.turnCounts))return null;const t=new Map;for(const[n,r]of Object.entries(e.turnCounts)){if(typeof r!="number")return null;t.set(n,r)}return t}const tW=new Set(["running","completed","failed","cancelled"]),nW=new Set(["pending","running","done"]);function rW(e){return!gn(e)||typeof e.id!="string"||typeof e.fileId!="string"?null:{id:e.id,fileId:e.fileId,description:typeof e.description=="string"?e.description:void 0,tags:Array.isArray(e.tags)?e.tags.filter(t=>typeof t=="string"):void 0}}function iW(e){if(!gn(e)||!Array.isArray(e.evals)||!gn(e.config))return null;const t=[];for(const n of e.evals){const r=rW(n);if(r===null)return null;t.push(r)}return{evals:t,config:e.config}}function yv(e){if(!gn(e)||typeof e.runId!="string"||!tW.has(e.status)||typeof e.startedAt!="string"||!gn(e.summary)||typeof e.summary.passed!="number"||typeof e.summary.failed!="number"||typeof e.summary.total!="number"||typeof e.summary.done!="number"||!Array.isArray(e.cases)||!gn(e.config))return null;for(const t of e.cases)if(!gn(t)||typeof t.id!="string"||typeof t.fileId!="string"||!nW.has(t.status))return null;return e}function sW(e){if(!gn(e)||!Array.isArray(e.runs)||e.activeRunId!==void 0&&typeof e.activeRunId!="string")return null;const t=[];for(const n of e.runs){const r=yv(n);if(r===null)return null;t.push(r)}return e.activeRunId===void 0?{runs:t}:{runs:t,activeRunId:e.activeRunId}}function co(){return Promise.resolve({status:501,ok:!1,body:null})}class oW{constructor(t,n,r={}){this.teamId=t,this.bootstrapRequest=null,this.composedSessionIds=new Set,this.writableSessionIds=new Set,this.logTails=new Map,this.logIndex=-1,this.logsReadAt=Number.NEGATIVE_INFINITY,this.logsReading=!1,this.turnCounts=new Map,this.turnCountsReading=!1,this.health=async()=>{const s=await this.bootstrap();return{status:s.status,ok:s.ok,body:s.ok?{ok:!0}:null}},this.meta=async()=>{const s=await this.bootstrap();return{status:s.status,ok:s.ok,body:s.body===null?null:{name:s.body.slug,dev:!1,basePath:"",version:s.body.cliVersion,readonly:!1}}},this.info=async()=>{const[s,a]=await Promise.all([this.bootstrap(),this.request("/info",PG).catch(()=>null)]);return{status:s.status,ok:s.ok,body:s.body===null?null:{...a?.body,name:s.body.slug,runtime:"cloud"}}},this.sessions=async()=>{const s=new URLSearchParams({limit:String(XG)}),a=await this.request(`/sessions?${s.toString()}`,qG);if(!a.ok||a.body===null)return{status:a.status,ok:!1,body:null};const l=a.body.sessions,c=l.map(f=>QG(f,this.turnCounts.get(f.sessionId)?.count));return this.writableSessionIds=new Set([...this.composedSessionIds,...c.filter(f=>f.followUpAllowed===!0).map(f=>f.sessionId)]),this.readTurnCounts(l),{status:200,ok:!0,body:{sessions:c}}},this.sessionById=async s=>{const a=await this.request(`/sessions/${encodeURIComponent(s)}`,ZG);return a.ok?{status:a.status,ok:!0,body:{session:a.body}}:{status:a.status,ok:!1,body:null}},this.eventsText=async s=>{const a=await this.request(`/sessions/${encodeURIComponent(s)}`,HG);if(!a.ok||a.body===null)return new Response(null,{status:a.status});const l=a.body.map(c=>JSON.stringify(c)).join(`
|
|
18
|
-
`);return new Response(l===""?"":`${l}
|
|
19
|
-
`,{status:a.status,headers:{"content-type":"application/x-ndjson"}})},this.subscribeEvents=async(s,a,l)=>{const c=await this.request(`/sessions/${encodeURIComponent(s)}/events?afterEventIndex=${a-1}&waitMs=${MG}`,VG,{signal:l});if(!c.ok||c.body===null)return new Response(null,{status:c.status});const f=c.body.events.map(d=>JSON.stringify(d)).join(`
|
|
20
|
-
`);return new Response(f===""?"":`${f}
|
|
21
|
-
`,{status:c.status,headers:{"content-type":"application/x-ndjson"}})},this.logs=async(s=-1)=>{const a=this.logsFailure===void 0?{status:200,ok:!0,body:{entries:[],nextAfter:this.logIndex}}:{status:this.logsFailure,ok:!1,body:null};if(this.logsReading)return a;if(s<this.logIndex)this.logTails.clear(),this.logSessionId=void 0,this.logIndex=s;else if(Date.now()-this.logsReadAt<DG)return a;this.logsReadAt=Date.now(),this.logsReading=!0;const l=await this.request("/logs",GG).finally(()=>{this.logsReading=!1});if(!l.ok||l.body===null)return this.logsFailure=l.status===404?501:l.status,{status:this.logsFailure,ok:!1,body:null};this.logsFailure=void 0;const c=[];for(const f of l.body){if(f.lines.length===0)continue;const d=WG(this.logTails.get(f.sessionId)??[],f.lines);if(KG(this.logTails,f.sessionId,f.lines),d.length!==0){if(this.logSessionId!==f.sessionId){this.logSessionId=f.sessionId;const h=f.channelId===void 0?"":` (${f.channelId})`;c.push({index:++this.logIndex,at:"",line:`==> ${f.sessionId}${h} <==`})}for(const h of d)c.push({index:++this.logIndex,at:"",line:h})}}return{status:200,ok:!0,body:{entries:c,nextAfter:this.logIndex}}},this.createSession=s=>this.startSession(s),this.followUp=(s,a)=>this.writableSessionIds.has(s)?this.startSession(a,s):Promise.resolve({status:409,ok:!1,body:{error:"session_not_writable"}}),this.stopSession=()=>co(),this.sessionCost=()=>co(),this.resolveApproval=()=>co(),this.resolveAuth=()=>co(),this.artifacts=()=>co(),this.artifactContent=()=>Promise.resolve({status:501,ok:!1,bytes:new Uint8Array(0),truncated:!1}),this.dispatchSchedule=()=>co(),this.evalsList=()=>this.evalRequest("/evals",iW),this.evalsListRuns=()=>this.evalRequest("/evals/runs",sW),this.evalsStartRun=(s={})=>this.evalRequest("/evals/runs",yv,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:this.teamId,...s})}),this.evalsRunStatus=s=>this.evalRequest(`/evals/runs/${encodeURIComponent(s)}`,yv),this.evalsCancelRun=()=>co(),this.channelRequest=()=>co(),this.url=s=>s,this.basePath=`/api/v2/agentsdk/deployments/${encodeURIComponent(n)}`,this.capabilities=r.evals===!0?NG:uM,this.waitForRetry=r.waitForRetry??jG}async fetchJson(t,n){const r=t.includes("?")?"&":"?",s=await fetch(`${this.basePath}${t}${r}teamId=${this.teamId}`,n);return{response:s,value:await s.json().catch(()=>null)}}async request(t,n,r={}){const{response:s,value:a}=await this.fetchJson(t,r),l=n(a);return{status:l===null&&s.ok?502:s.status,ok:s.ok&&l!==null,body:l}}async evalRequest(t,n,r={}){const{response:s,value:a}=await this.fetchJson(t,r);if(!s.ok)return{status:s.status,ok:!1,body:a};const l=n(a);return{status:l===null?502:s.status,ok:l!==null,body:l}}async bootstrap(){this.bootstrapRequest??=this.request("",zG);const t=this.bootstrapRequest;try{const n=await t;return!n.ok&&this.bootstrapRequest===t&&(this.bootstrapRequest=null),n}catch(n){throw this.bootstrapRequest===t&&(this.bootstrapRequest=null),n}}async readTurnCounts(t){if(this.turnCountsReading)return;const n=new Set(t.map(a=>a.sessionId));for(const a of this.turnCounts.keys())n.has(a)||this.turnCounts.delete(a);const r=Date.now(),s=t.filter(a=>!a.customer&&this.turnCountStale(a,r));if(s.length!==0){this.turnCountsReading=!0;try{const a=new URLSearchParams({sessionIds:s.map(c=>c.sessionId).join(",")}),l=await this.request(`/session-turn-counts?${a.toString()}`,eW).catch(()=>null);if(!l?.ok||l.body===null)return;for(const c of s){const f=this.turnCounts.get(c.sessionId)?.count,d=l.body.get(c.sessionId);this.turnCounts.set(c.sessionId,{activity:yR(c),count:d===void 0?f:Math.max(d,f??0),readAt:r})}}finally{this.turnCountsReading=!1}}}turnCountStale(t,n){const r=this.turnCounts.get(t.sessionId);return r===void 0||r.activity!==yR(t)?!0:fM.has(t.phase)&&n-r.readAt>=JG}async startSession(t,n){const r=await this.request("/sessions",$G,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:this.teamId,message:t,sessionId:n})});if(!r.ok||r.body===null)return{status:r.status,ok:!1,body:null};const s=r.body.sessionId??await this.waitForDeliveryBinding(r.body.deliveryId);return typeof s!="string"?s:(this.composedSessionIds.add(s),this.writableSessionIds.add(s),{status:r.status,ok:!0,body:{sessionId:s}})}async waitForDeliveryBinding(t){const n=Date.now();for(let r=0;r<bR;r++){const s=await this.request(`/session-deliveries/${encodeURIComponent(t)}`,BG);if(s.ok&&s.body?.status==="allocated")return s.body.sessionId;if(s.ok&&(s.body?.status==="skipped"||s.body?.status==="failed"))return{status:409,ok:!1,body:null};if(!(s.ok&&s.body?.status==="pending")&&s.status!==404)return{status:s.status,ok:!1,body:null};const a=Date.now()-n;if(a>=gR||r+1>=bR)break;await this.waitForRetry(Math.min(IG(r),gR-a))}return{status:504,ok:!1,body:null}}}function aW(e,t){const n=AG(document);switch(n.kind){case"local":return new RG(new EG(e,()=>t().authToken,()=>t().aliasToken));case"hosted":return new oW(n.teamId,n.deploymentSlug,{evals:n.evals})}}function ll(e,t,n){return e.has(t)?n.some(r=>e.has(r))?"enabled":"read-only":"disabled"}function dM(e){const t=n=>ll(e,yt.eventRead,[n]);return{composer:ll(e,yt.sessionRead,[yt.sessionStart,yt.sessionFollowUp]),stop:t(yt.sessionStop),approvals:t(yt.approvalResolve),auth:t(yt.authResolve),logs:e.has(yt.logRead)?"enabled":"disabled",evals:ll(e,yt.evalRead,[yt.evalRun]),artifacts:ll(e,yt.artifactRead,[yt.artifactContent]),schedules:ll(e,yt.infoRead,[yt.scheduleDispatch]),channelRoutes:ll(e,yt.infoRead,[yt.channelInvoke])}}const lW=new Set(["actions.requested","actions.completed","action.result","action.approval_requested","action.approval_resolved","action.auth_requested","action.auth_resolved","subagent.called","subagent.completed","artifact.tagged"]),uW=new Set(["message.received","turn.started","message.completed","reasoning.appended","reasoning.completed","actions.requested","actions.completed","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"]),cW=12e4,vR=1e3;function fW(e){return e===404||e>=500&&e<600}function pM(){const e=window.location.pathname,t=e.replace(/\/playground\/?$/,"");return t===e?"":t}function dW(){const e=M7()!==null,t=e?MI():"";return{meta:{name:"agent",dev:!1,basePath:pM()},capabilities:dM(new Set),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&&D7(),transcript:[],traceEvents:[],historyLoading:!1,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}}class pW{constructor(t,n){this.api=t,this.stateStore=n,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.streamRetry=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.turnClockStartedAt=null,this.pendingUserEchoes=[],this.pendingCreate=null,this.flushingQueue=!1,this.queueHeld=!1,this.knownSessionIds=new Set,this.sessionsSeeded=!1,this.subscribe=this.stateStore.subscribe,this.getState=()=>this.stateStore.getState(),this.getInitialState=()=>this.stateStore.getInitialState()}get historyOnly(){return this.state.meta.readonly===!0}get state(){return this.stateStore.getState()}hasCapability(t){return this.api.capabilities.has(t)}set(t){this.stateStore.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})}itemText(t){const n=this.itemIndex.get(t),r=n===void 0?void 0:this.items[n];return r!==void 0&&"text"in r?r.text:""}appendItemText(t,n){this.update(t,{text:mR(this.itemText(t),n)})}appendNestedText(t,n,r){this.updateSubagentChildren(t,s=>{const a=s.findIndex(f=>f.id===n),l=a<0?void 0:s[a];if(l===void 0||!("text"in l))return s;const c=s.slice();return c[a]={...l,text:mR(l.text,r)},c})}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.turnClockStartedAt=null,this.queueHeld=!1,this.pendingUserEchoes=[],this.pendingCreate=null}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(f=>f.kind==="tool"&&f.callId===n);if(c>=0){const f=l[c];if(f?.kind!=="tool")return l;const d=l.slice();return d[c]={...f,name:r||f.name,args:s??f.args},d}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 f=c.findIndex(b=>b.kind==="tool"&&b.callId===n),d=s==null?"(no output)":Pn(s,4e3);if(f<0)return c.push({kind:"tool",id:this.nextId("nested-tool"),callId:n,name:r,args:null,status:a?"error":"done",output:d,outputRaw:s,startedAt:l??Date.now(),endedAt:l??Date.now()}),c;const h=c[f];if(h?.kind!=="tool")return c;const m=c.slice();return m[f]={...h,name:r||h.name,status:a?"error":"done",output:d,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(f=>f.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;const n=this.nextId("user");return this.push(t===null?{kind:"user",id:n,text:"",hidden:!0}:{kind:"user",id:n,text:t}),n}pushUserEcho(t){const n=this.pushUser(t);return this.pendingUserEchoes.push({id:n,text:t}),this.commitTranscript(),n}consumeUserEcho(t){const n=this.pendingUserEchoes[0];return n===void 0||t!==null&&n.text!==t?!1:(this.pendingUserEchoes.shift(),this.assistantId=null,this.reasoningId=null,!0)}rollbackUserEcho(t){const n=this.pendingUserEchoes.some(s=>s.id===t);if(this.pendingUserEchoes=this.pendingUserEchoes.filter(s=>s.id!==t),!n)return;const r=this.itemIndex.get(t);r!==void 0&&(this.items.splice(r,1),this.itemIndex.clear(),this.items.forEach((s,a)=>this.itemIndex.set(s.id,a))),this.commitTranscript()}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)":Pn(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&&!lW.has(t.type)&&t.type!=="message.received"&&t.type!=="agent.bound")return;const n=t.data||{},r=wl(t.at)||Date.now();switch(t.type){case"message.received":{const s=rM(n);this.consumeUserEcho(s)||this.pushUser(s);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=wl(t.at),this.turnClockStartedAt??=this.activeTurnStartedAt,this.setRunning(!0);break;case"reasoning.appended":typeof n.parentCallId=="string"&&n.parentCallId!==""?this.appendNestedText(n.parentCallId,this.ensureNestedReasoning(n.parentCallId),n):this.appendItemText(this.ensureReasoning(),n);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":typeof n.parentCallId=="string"&&n.parentCallId!==""?this.appendNestedText(n.parentCallId,this.ensureNestedAssistant(n.parentCallId),n):this.appendItemText(this.ensureAssistant(),n);break;case"message.completed":{const s=t.liveTruncated===!0,a=l=>s&&l!==""?l:String(n.text??"");if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const l=n.parentCallId,c=this.ensureNestedAssistant(l);this.updateSubagentChildren(l,f=>{const d=f.findIndex(b=>b.id===c),h=d<0?void 0:f[d];if(h===void 0||!("text"in h))return f;const m=f.slice();return m[d]={...h,text:a(h.text),streaming:!1},m}),this.nestedAssistantIds.delete(l)}else{const l=this.ensureAssistant();this.update(l,{text:a(this.itemText(l)),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=LI(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.turnClockStartedAt=null,this.push({kind:"turn-end",id:this.nextId("turn"),ms:s!==null&&wl(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.turnClockStartedAt=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()})}beginLocalTurn(){this.activeTurnStartedAt=Date.now(),this.turnClockStartedAt=this.activeTurnStartedAt,this.setRunning(!0)}abandonLocalTurn(){this.turnClockStartedAt=null,this.setRunning(!1)}setRunning(t){this.set({running:t,turnStartedAt:t?this.turnClockStartedAt: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{}zI("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.hasCapability(yt.sessionStart)||(this.deselectSession(),this.setView("chat"))}async refreshSessions(){if(!this.hasCapability(yt.sessionRead))return;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=lG({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||!this.hasCapability(yt.sessionStream))return;this.stopStream();const r=new AbortController;this.streamAbort=r;const s=Date.now(),a=this.lastIndex;this.api.subscribeEvents(t,n,r.signal).then(async l=>{if(!l.ok||!l.body){this.handleStreamPollFailure(t,r,l.status);return}this.streamRetry=null;const c=l.body.getReader(),f=new TextDecoder;let d="";for(;;){const h=await c.read();if(h.done){const y=this.lastIndex>a,k=Date.now()-s;this.scheduleReconnect(t,r,y?0:Math.max(0,vR-k));return}d+=f.decode(h.value,{stream:!0});const m=d.split(`
|
|
22
|
-
`);d=m.pop()||"";const b=[];for(const y of m){if(r.signal.aborted)return;if(!y||!y.trim())continue;let k=null;try{k=JSON.parse(y)}catch{continue}k!==null&&b.push(k)}if(r.signal.aborted)return;for(const y of b)this.ingestStreamEvent(y);b.length>0&&this.flushStreamPaint()}}).catch(()=>{r.signal.aborted||this.scheduleReconnect(t,r)})}handleStreamPollFailure(t,n,r){if(fW(r)&&this.claimStreamRetryBudget(t)){this.scheduleReconnect(t,n);return}this.streamRetry=null,this.streamAbort===n&&(this.streamAbort=null),this.toast(`Stream failed (${r})`)}claimStreamRetryBudget(t){const n=Date.now();return this.streamRetry===null||this.streamRetry.sessionId!==t||this.listedRunning(t)?(this.streamRetry={sessionId:t,startedAt:n},!0):n-this.streamRetry.startedAt<cW}listedRunning(t){return this.state.sessions.some(n=>n.sessionId===t&&n.running===!0)}scheduleReconnect(t,n,r=vR){n.signal.aborted||this.historyOnly||this.isCurrent(t)&&setTimeout(()=>{!this.isCurrent(t)||this.streamAbort!==n||this.startStream(t,this.lastIndex+1)},r)}async refreshSessionCost(t){if(this.hasCapability(yt.sessionCost))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){if(this.isCurrent(t.sessionId)&&(this.streamAbort!==null||this.snapshotOpen)){this.set({chatPanelOpen:!0,evalNavReturn:!1}),this.showSelectedSession(t.sessionId);return}this.stopStream(),this.streamRetry=null,this.resetTranscript(),this.lastIndex=-1,this.state.traceEvents=[],this.set({localTrace:!1,current:{sessionId:t.sessionId,channelId:t.channelId,mode:t.mode,followUpAllowed:t.followUpAllowed,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.showSelectedSession(t.sessionId),this.refreshSessions(),this.refreshSessionCost(t.sessionId),this.loadEventsSnapshot(t.sessionId,!!t.running)}showSelectedSession(t){this.syncSessionUrl(t),(this.state.view==="evals"||this.state.view==="overview")&&(this.setView("chat"),this.set({evalNavReturn:!1}))}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){if(!this.hasCapability(yt.eventRead))return;const r=++this.snapshotToken;this.snapshotOpen=!0,this.set({historyLoading:!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(d=>d.sessionId===t),c=l!==void 0?l.running===!0:n;this.ingestEventsCompact(bv(a),c);const f=this.hasOpenTools()||c;this.setRunning(f),f&&!this.historyOnly&&this.startStream(t,this.lastIndex+1)}catch(s){if(r!==this.snapshotToken||!this.isCurrent(t))return;this.toast(`Trace load failed: ${ny(s)}`),this.historyOnly||this.startStream(t,0)}finally{r===this.snapshotToken&&(this.snapshotOpen=!1,this.set({historyLoading:!1}))}}ingestEventsCompact(t,n=!1){this.resetTranscript(),this.lastIndex=-1;for(const r of t){const s=uW.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.streamRetry=null,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=bv(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 em(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(fG(r))return this.hasCapability(yt.channelInvoke)?this.invokeSlashCommand(r):(this.toast("Channel commands are not available in this playground"),!1);if(s!==null&&(!this.hasCapability(yt.sessionFollowUp)||s.followUpAllowed===!1||s.channelId!=="http"||s.mode==="task"))return this.toast("This session is read-only in this playground"),!1;if(this.queueHeld=!1,s!==null&&this.state.running&&!n.force)return this.queueMessage(r),!0;if(s===null&&this.pendingCreate!==null)return this.queueMessage(r),!0;if(s===null){if(!this.hasCapability(yt.sessionStart))return this.toast("Starting new chats is not available in this playground"),!1;this.resetTranscript(),this.lastIndex=-1,this.beginLocalTurn();const l=this.pushUserEcho(r);this.set({localTrace:!1,barTitle:"Session",barId:"starting…",externalUrl:null,traceEvents:[]});const c={};this.pendingCreate=c;let f=!1,d=null,h=null;try{d=await this.api.createSession(r)}catch(m){h=m}finally{f=this.pendingCreate!==c,f||(this.pendingCreate=null)}return d===null?(f||(this.abandonLocalTurn(),this.rollbackUserEcho(l),this.set({barTitle:"No session",barId:""})),this.toast(`Create failed: ${ny(h)}`),f):f?(d.ok?this.refreshSessions():this.toast(`Create failed: ${Pn(d.body,160)}`),!0):!d.ok||!d.body?(this.abandonLocalTurn(),this.rollbackUserEcho(l),this.set({barTitle:"No session",barId:""}),this.toast(`Create failed: ${Pn(d.body,160)}`),!1):(this.set({current:{sessionId:d.body.sessionId,channelId:"http",mode:"chat",followUpAllowed:!0,continuationToken:d.body.continuationToken},barId:d.body.sessionId}),this.syncSessionUrl(d.body.sessionId),this.startStream(d.body.sessionId,0),this.refreshSessions(),!0)}this.beginLocalTurn();const a=this.pushUserEcho(r);return this.beginDiscardStaleTurnBody(),this.streamAbort===null&&this.startStream(s.sessionId,this.lastIndex+1),this.postFollowUp(s,r,!0,a)}async postFollowUp(t,n,r,s){let a;try{a=await this.api.followUp(t.sessionId,n,t.continuationToken)}catch(l){return this.abandonLocalTurn(),this.rollbackUserEcho(s),this.toast(`Send failed: ${ny(l)}`),!1}if(a.ok&&a.body)return this.set({current:{...t,continuationToken:a.body.continuationToken}}),!0;if(a.body?.error==="stale_continuation_token"&&r){await this.refreshSessions();const l=this.state.current??t;return this.postFollowUp(l,n,!1,s)}return this.abandonLocalTurn(),this.rollbackUserEcho(s),this.toast(`Send failed: ${Pn(a.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;if(this.pendingCreate!==null){this.toast("The session is still starting. Queued messages send once it is ready.");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;if(a===void 0)return;this.flushingQueue=!0,this.set({queued:l}),this.beginLocalTurn();const c=this.pushUserEcho(a.text);this.streamAbort===null&&this.startStream(s.sessionId,this.lastIndex+1),this.postFollowUp(s,a.text,!0,c).then(f=>{f||this.requeueFront(a)}).finally(()=>{this.flushingQueue=!1})}async stopTurn(){const t=this.state.current?.sessionId;if(!t||this.state.localTrace||this.historyOnly||!this.hasCapability(yt.sessionStop)||!this.state.running)return;this.state.queued.length>0&&(this.queueHeld=!0),this.beginDiscardStaleTurnBody(),this.stopStream(),this.abandonLocalTurn(),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: ${Pn(n.body,160)}`);return}this.refreshSessions()}async submitApproval(t,n){const r=this.state.current?.sessionId;if(!r||this.historyOnly||!this.hasCapability(yt.approvalResolve))return;const s=await this.api.resolveApproval(r,t,n);s.ok||this.toast(`Approval failed: ${Pn(s.body,160)}`)}async submitAuth(t,n){const r=this.state.current?.sessionId;if(!r||this.historyOnly||!this.hasCapability(yt.authResolve))return;const s=await this.api.resolveAuth(r,t,n);s.ok||this.toast(`Connect failed: ${Pn(s.body,160)}`)}async dispatchSchedule(t){if(this.historyOnly||!this.hasCapability(yt.scheduleDispatch))return;const n=await this.api.dispatchSchedule(t);if(!n.ok||!n.body){this.toast(`Dispatch failed: ${Pn(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(){if(!this.hasCapability(yt.evalRead))return;const t=await this.api.evalsList();if(!t.ok||!t.body){t.status!==0&&this.toast(`Could not list evals (${t.status}): ${Pn(t.body,120)}`);return}this.set({evalCases:t.body.evals??[],evalConfig:t.body.config??null})}async refreshEvalRuns(){if(!this.hasCapability(yt.evalRead))return;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(){if(this.hasCapability(yt.evalRead))return this.evalRestoreInFlight!==null?this.evalRestoreInFlight:(this.evalRestoreInFlight=this.doRestoreEvalRun().finally(()=>{this.evalRestoreInFlight=null}),this.evalRestoreInFlight)}async doRestoreEvalRun(){const t=++this.evalRestoreGeneration,n=gW();if(n!==null){const d=await this.api.evalsRunStatus(n);if(t!==this.evalRestoreGeneration)return;if(d.ok&&d.body){this.applyRestoredEvalRun(d.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 d=s.activeRunId,h=a.find(m=>m.runId===d)??await this.fetchEvalRunIfCurrent(t,d);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=mW(this.state.meta.basePath);if(c!==null){const d=await this.api.evalsRunStatus(c);if(t!==this.evalRestoreGeneration||this.state.evalRun!==null)return;if(d.ok&&d.body){this.applyRestoredEvalRun(d.body);return}}if(a===null)return;const f=a[0];f!==void 0&&this.state.evalRun===null&&this.applyRestoredEvalRun(f)}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),ep(this.state.meta.basePath,t.runId),bW(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||!this.hasCapability(yt.evalRun))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: ${Pn(n.body,160)}`);return}this.set({evalRun:n.body}),ep(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){if(this.historyOnly||!this.hasCapability(yt.evalCancel))return;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: ${Pn(r.body,160)}`);return}this.set({evalRun:r.body}),ep(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}),ep(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:f,total:d}=l.body.summary;this.toast(l.body.status==="failed"?`Eval run failed: ${l.body.error??"unknown error"}`:`Evals done — ${c} passed, ${f} failed, ${d} 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,f=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:f,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){if(!this.hasCapability(yt.channelInvoke))return!1;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:pG(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=hG(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"+hW(l.body)+"\n```",streaming:!1}),this.assistantId=null,this.commitTranscript(),!0):(this.setRunning(!1),this.update(a,{text:`Command failed (${l.status}): ${Pn(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.url(""),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);if(n){this.selectSession(n);return}this.selectSessionOutsideList(t)}async selectSessionOutsideList(t){if(this.api.sessionById!==void 0)try{const n=await this.api.sessionById(t);if(n.ok&&n.body?.session){this.state.current===null&&this.selectSession(n.body.session);return}}catch{}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=K7(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 oG(this.state.info?.model)}}function ny(e){return e instanceof Error?e.message:String(e)}function hW(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function hM(e){return`agent-serve:evalRunId:${e||"/"}`}function mW(e){try{const t=sessionStorage.getItem(hM(e));return t!==null&&t!==""?t:null}catch{return null}}function gW(){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 bW(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 ep(e,t){try{sessionStorage.setItem(hM(e),t)}catch{}}function yW(e){const t=_7(()=>dW()),n=e(t.getState);return t.setState({capabilities:dM(n.capabilities)}),new pW(n,t)}const Qe=yW(e=>aW(pM(),e));Qe.getState().aliasHosted&&L7(e=>Qe.acceptAliasTokenHandoff(e));let xR=Qe.getState().overviewSection;Qe.subscribe(e=>{e.overviewSection!==xR&&(xR=e.overviewSection,zI(e.overviewSection))});if(Qe.getState().embedded){let e=Qe.getState().view,t=Qe.getState().current?.sessionId??null,n=Qe.getState().overviewSection,r=t!==null;Qe.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,Q7(s.view,r?a:void 0,void 0,s.overviewSection))})}function Ue(e){return N7(Qe,e)}function vW(){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 f=await Qe.signInWithAliasToken(e);a(!1),f.ok||r(f.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(rf,{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(vn,{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:"bdk rotate-token <slug>"})," mints a replacement. The token stays in this tab only — refresh to sign in again."]})]})})}function xW(){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 kW=["noopener","noreferrer"];function d0(e){return e.trim()===""}function mM(e){const t=e.trim();if(d0(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 SW(e){if(e.hasAttribute("download"))return;const t=e.getAttribute("href");if(t===null||!mM(t))return;e.target="_blank";const n=new Set(e.rel.split(/\s+/).map(r=>r.toLowerCase()).filter(r=>r!==""));for(const r of kW)n.add(r);e.rel=[...n].join(" ")}function kR(e){const t=e.target;if(!(t instanceof Element))return;const n=t.closest("a");if(!(n instanceof HTMLAnchorElement))return;SW(n);const r=n.getAttribute("href");r!==null&&d0(r)&&!n.hasAttribute("download")&&e.preventDefault()}function wW(e=document){return e.addEventListener("click",kR,!0),()=>e.removeEventListener("click",kR,!0)}function pa({href:e,onClick:t,...n}){const s=e!==void 0&&d0(e)?a=>{a.preventDefault(),t?.(a)}:t;return e===void 0||!mM(e)?g.jsx("a",{href:e,...n,onClick:s}):g.jsx("a",{href:e,...n,onClick:s,target:"_blank",rel:"noopener noreferrer"})}const gM=512*1024,EW=64*1024*1024,TW=240;async function bM(e){if(!Qe.hasCapability(yt.artifactContent))return{phase:"absent"};try{const t=await Qe.api.artifactContent(e,gM);if(!t.ok)return t.status===404?{phase:"absent"}:{phase:"error",message:`HTTP ${t.status}`};let n=null;if(j7(t.contentType)){const r=new TextDecoder("utf-8",{fatal:!1}).decode(t.bytes);n=z7(r)?null:r}return{phase:"loaded",text:n,isDiff:n!==null&&P7(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 yM(e,t){if(Qe.hasCapability(yt.artifactContent))try{const n=await Qe.api.artifactContent(e,EW);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=CW(t,e,n.contentType),a.click(),URL.revokeObjectURL(s)}catch{}}const RW={"text/x-diff":".diff","text/x-patch":".patch","application/json":".json","text/markdown":".md","text/plain":".txt","text/html":".html","text/csv":".csv"};function CW(e,t,n){const r=(e??t).trim().replace(/[^\w.-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,80),s=n?.split(";")[0]?.trim().toLowerCase()??"",a=RW[s]??"",l=r===""?t:r;return l.includes(".")?l:`${l}${a}`}function _W({text:e,isDiff:t}){const n=v.useMemo(()=>t?e.split(`
|
|
23
|
-
`):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-${$7(r)}`,children:r},s))})}function vM({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=tv(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(qt,{name:"file",size:"sm",color:"tertiary"}),g.jsx("span",{className:"pg-artifact-file-meta",children:s||"file payload"}),g.jsx(vn,{variant:"ghost",size:"sm",onClick:()=>{yM(e,t)},children:"Download"})]}),n.text!==null?g.jsx(_W,{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 ",tv(gM)," — Download has the full payload."]}):null]})}function AW({data:e}){const[t,n]=v.useState(!1),r=v.useMemo(()=>Eo(e),[e]);if(r===""||r==="null")return null;const s=r.length>TW;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 NW=v.memo(function({artifactKind:t,title:n,url:r,artifactId:s,data:a}){const[l,c]=v.useState(!1),[f,d]=v.useState({phase:"idle"}),h=Ue(b=>b.capabilities.artifacts==="enabled"),m=b=>{c(b),!(!b||!h||s===void 0||f.phase!=="idle")&&(d({phase:"loading"}),bM(s).then(d))};return g.jsx("div",{className:"pg-artifact-card",children:g.jsx(yi,{action:"Artifact",details:g.jsxs("span",{className:"pg-artifact-head",children:[g.jsx(vo,{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(qt,{name:"bookmark",size:"sm",color:"secondary"}),open:l,onOpenChange:m,tone:"tertiary",children:g.jsxs("div",{className:"pg-artifact-body",children:[r!==void 0?g.jsx(pa,{className:"pg-artifact-link",href:r,children:r}):null,a!==void 0?g.jsx(AW,{data:a}):null,s!==void 0?h?g.jsx(vM,{artifactId:s,title:n,state:f}):g.jsx("div",{className:"pg-artifact-file-note",children:"File contents are not available in this playground"}):null]})})})}),SR=280,OW=8,ry=1e3;function IW({record:e}){const[t,n]=v.useState(!1),r=v.useMemo(()=>{const a=DI(e.data);return a!==null?{url:a,json:"",short:""}:{url:null,json:Eo(e.data),short:Pn(e.data,SR)}},[e.data]);if(r.url!==null)return g.jsx(pa,{className:"artifact-link",href:r.url,children:r.url});if(r.json==="")return null;const s=r.json.length>SR||r.json.split(`
|
|
24
|
-
`).length>OW;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 MW({record:e,contentAvailable:t}){const[n,r]=v.useState({phase:"idle"}),s=e.content;if(s===void 0)return null;if(!t)return g.jsxs("div",{className:"pg-artifact-file-head",children:[g.jsx(qt,{name:"file",size:"sm",color:"tertiary"}),g.jsx("span",{className:"pg-artifact-file-meta",children:"File contents are not available in this playground"})]});if(n.phase==="idle"){const a=[s.contentType,tv(s.size)].filter(l=>l!==void 0&&l!=="").join(" · ");return g.jsxs("div",{className:"pg-artifact-file-head",children:[g.jsx(qt,{name:"file",size:"sm",color:"tertiary"}),g.jsx("span",{className:"pg-artifact-file-meta",children:a||"file payload"}),g.jsx(vn,{variant:"ghost",size:"sm",onClick:()=>{r({phase:"loading"}),bM(e.id).then(r)},children:"View"}),g.jsx(vn,{variant:"ghost",size:"sm",onClick:()=>{yM(e.id,e.title)},children:"Download"})]})}return g.jsx(vM,{artifactId:e.id,title:e.title,state:n})}const wR=v.memo(function({record:t,contentAvailable:n}){return g.jsxs("div",{className:"artifact-row",children:[g.jsxs("div",{className:"artifact-row-head",children:[g.jsx("span",{className:"artifact-title",children:B7(t)}),g.jsx(vo,{variant:"accent",size:"sm",pill:!0,children:t.kind}),g.jsx(vo,{variant:t.source==="model"?"success":"neutral",size:"sm",pill:!0,children:t.source}),g.jsx("span",{className:"artifact-updated",title:`updated ${t.updatedAt}`,children:gv(t.updatedAt)??t.updatedAt})]}),g.jsx(IW,{record:t}),g.jsx(MW,{record:t,contentAvailable:n})]})});function DW({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:()=>{Qe.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 xM(){const e=Ue(P=>P.current),t=Ue(P=>P.sessions),n=Ue(P=>P.capabilities.artifacts),r=n!=="disabled",s=n==="enabled",[a,l]=v.useState(null),[c,f]=v.useState(null),[d,h]=v.useState(null),[m,b]=v.useState("all"),[y,k]=v.useState(0);e===null&&m==="session"&&b("all");const S=m==="session"&&e!==null?e.sessionId:null,R=a!==null&&a.scope===S?a.rows:null;v.useEffect(()=>{if(!r)return;let P=!1,N=!1;f(null);const W=async()=>{if(!N){N=!0;try{const F=await Qe.api.artifacts({sessionId:S??void 0,limit:ry});if(P)return;if(!F.ok||F.body===null){f(`Failed to load artifacts (${F.status})`);return}f(null),l({scope:S,rows:F.body.artifacts??[]})}catch(F){P||f(F instanceof Error?F.message:String(F))}finally{N=!1}}};W();const $=setInterval(()=>{W()},4e3);return()=>{P=!0,clearInterval($)}},[r,S,y]);const T=()=>k(P=>P+1),E=S!==null;if(!r)return g.jsx("div",{className:"pg-artifacts is-empty",children:g.jsx(Ri,{body:"Artifacts are not available in this playground."})});if(R===null)return g.jsx("div",{className:"pg-artifacts is-empty",children:c!==null?g.jsx(Ri,{body:c,cta:{label:"Retry",onClick:T}}):g.jsx(Ri,{body:"Loading artifacts…"})});const C=jI(R);if(C.length===0)return g.jsx("div",{className:"pg-artifacts is-empty",children:g.jsx(Ri,{body:E?"No artifacts tagged for this session.":"No artifacts tagged yet."})});const _=F7(C),D=d!==null&&_.includes(d)?d:null,A=U7(C,D),M=E?[]:q7(A),B=new Map(t.map(P=>[P.sessionId,P.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:[A.length," of ",C.length,C.length>=ry?` (newest ${ry})`:""]}),c!==null?g.jsx("span",{className:"pg-artifacts-toolbar-error",children:c}):null,g.jsx("span",{className:"grow"}),e!==null?g.jsxs(vc,{size:"sm",variant:"compact",value:m,onValueChange:P=>b(P==="session"?"session":"all"),"aria-label":"Artifact scope",children:[g.jsx(vc.Item,{value:"all",children:"All sessions"}),g.jsx(vc.Item,{value:"session",children:"This session"})]}):null,g.jsx(vn,{variant:"secondary",size:"sm",onClick:T,children:"Refresh"})]}),_.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${D===null?" active":""}`,onClick:()=>h(null),children:"All"}),_.map(P=>g.jsx("button",{type:"button",className:`artifact-kind-chip${D===P?" active":""}`,onClick:()=>h(D===P?null:P),children:P},P))]}):null,A.length===0?g.jsx(Ri,{body:"No artifacts match this kind filter."}):E?g.jsx("div",{className:"artifact-list",children:A.map(P=>g.jsx(wR,{record:P,contentAvailable:s},P.id))}):g.jsx("div",{className:"artifact-group-list",children:M.map(P=>g.jsxs("section",{className:"artifact-group",children:[g.jsx(DW,{sessionId:P.sessionId,count:P.artifacts.length,title:P.sessionId===null?void 0:B.get(P.sessionId)}),g.jsx("div",{className:"artifact-list",children:P.artifacts.map(N=>g.jsx(wR,{record:N,contentAvailable:s},N.id))})]},P.sessionId??"(none)"))})]})}function LW(e){const{localTrace:t,historyOnly:n,canStart:r,canFollowUp:s,current:a,running:l,slashNames:c}=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(a===null)return r?{disabled:!1,hint:c.length>0?`Slash commands: ${c.slice(0,4).join(", ")}${c.length>4?", …":""}, /help.`:""}:{disabled:!0,hint:"Starting new chats is not available in this playground."};if(!s)return{disabled:!0,hint:"This session is read-only in this playground."};if(a.followUpAllowed===!1||a.mode==="task"||a.channelId!=="http")return a.followUpAllowed===!1&&a.channelId==="http"?{disabled:!0,hint:"Customer sessions are read-only in this playground."}:a.mode==="task"?{disabled:!0,hint:"Task sessions (schedules) are fire-and-forget; watch only."}:a.channelId==="slack"?{disabled:!0,hint:`Slack thread — watch here, reply in Slack${a.externalUrl?" (Open in Slack above).":"."}`}:{disabled:!0,hint:`Sessions owned by the “${a.channelId}” channel take follow-ups through that channel; watch only here.`};if(!a.continuationToken&&a.followUpAllowed!==!0)return{disabled:!0,hint:"This session has no continuation token; watch only."};const d=c.length>0?` Channel commands (${c.slice(0,3).join(", ")}${c.length>3?", …":""}) also work from here.`:"";return{disabled:!1,hint:l?"Turn running — Enter queues the follow-up; ⌘Enter sends now and interrupts.":`Follow-ups reuse this session’s rotating continuation token.${d}`}}function jW(){const e=Ue(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:()=>Qe.editQueued(t.id),children:t.text}),g.jsxs("span",{className:"pg-queue-actions",children:[g.jsx(br,{icon:"arrow-up",size:"sm",variant:"ghost","aria-label":"Send now (interrupts the running turn)",onClick:()=>{Qe.sendQueuedNow(t.id)}}),g.jsx(br,{icon:"x",size:"sm",variant:"ghost","aria-label":"Remove queued message",onClick:()=>Qe.removeQueued(t.id)})]})]},t.id))})}function kM(){const[e,t]=v.useState(""),[n,r]=v.useState(0),s=v.useRef(null),a=Ue($=>$.localTrace),l=Ue($=>$.meta.readonly===!0),c=Ue($=>$.current),f=Ue($=>$.running),d=Ue($=>$.composerDraft),h=Ue($=>$.info),m=Ue($=>$.capabilities.composer),b=Ue($=>$.capabilities.stop),y=m==="enabled"&&Qe.hasCapability(yt.sessionStart),k=m==="enabled"&&Qe.hasCapability(yt.sessionFollowUp),S=b==="enabled",R=Qe.hasCapability(yt.channelInvoke);v.useEffect(()=>{d!==null&&(t($=>$.trim()?`${$} ${d}`:d),Qe.consumeComposerDraft(),s.current?.focus())},[d]);const T=v.useMemo(()=>R?em(h?.channels):[],[h,R]),E=v.useMemo(()=>oM(T),[T]),C=v.useMemo(()=>{if(a||l)return null;const $=e.replace(/^\s+/,"");return!$.startsWith("/")||/\s/.test($)?null:$},[e,a,l]),_=v.useMemo(()=>C===null?[]:dG(C,T),[C,T]),D=C!==null&&_.length>0,{disabled:A,hint:M}=LW({localTrace:a,historyOnly:l,canStart:y,canFollowUp:k,current:c,running:f,slashNames:E}),B=S&&f&&c!==null&&!a&&!l,P=async($=e,F=!1)=>{if(!$.trim())return;t(""),r(0),await Qe.sendMessage($,{force:F})||t(U=>U.trim()?U:$)},N=$=>{t(`${$} `),r(0)},W=$=>{if(D){if($.key==="ArrowDown"){$.preventDefault(),r(F=>(F+1)%_.length);return}if($.key==="ArrowUp"){$.preventDefault(),r(F=>(F-1+_.length)%_.length);return}if($.key==="Tab"||$.key==="Enter"&&!$.shiftKey){const F=_[n]??_[0];if(F!==void 0&&C!==F.name){$.preventDefault(),N(F.name);return}}if($.key==="Escape"){$.preventDefault(),t(""),r(0);return}}$.key==="Enter"&&!$.shiftKey&&($.preventDefault(),P(e,$.metaKey||$.ctrlKey))};return g.jsxs("div",{className:"pg-composer",children:[D?g.jsxs("ul",{className:"pg-slash-menu",role:"listbox","aria-label":"Slash commands",children:[_.map(($,F)=>g.jsx("li",{children:g.jsxs("button",{type:"button",role:"option","aria-selected":F===n,className:F===n?"pg-slash-item is-active":"pg-slash-item",onMouseDown:z=>{z.preventDefault(),N($.name)},onMouseEnter:()=>r(F),children:[g.jsx("code",{className:"pg-slash-name",children:$.name}),g.jsx("span",{className:"pg-slash-method",children:$.method}),$.description?g.jsx("span",{className:"pg-slash-desc",children:$.description}):null]})},`${$.name}:${$.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(jW,{}),g.jsxs("div",{className:A&&!B?"pg-prompt disabled":"pg-prompt",children:[g.jsx("textarea",{ref:s,className:"pg-prompt-input",rows:1,placeholder:E.length>0?`Message the agent, or ${E[0]} …`:"Message the agent...","aria-label":"Message the agent","aria-autocomplete":D?"list":void 0,"aria-expanded":D,value:e,onChange:$=>{t($.target.value),r(0)},onKeyDown:W,disabled:A,autoFocus:!0}),g.jsxs("div",{className:"pg-prompt-toolbar",children:[g.jsx("span",{className:"pg-prompt-hint",title:M,children:M}),B&&!e.trim()?g.jsx(br,{icon:"square",iconVariant:"filled",variant:"primary",tone:"monochrome",rounded:!0,size:"lg",className:"pg-prompt-stop","aria-label":"Stop the running turn",onClick:()=>{Qe.stopTurn()}}):g.jsx(br,{icon:"arrow-up",variant:"primary",tone:"monochrome",rounded:!0,size:"lg","aria-label":f?"Queue message (⌘Enter sends now)":"Send message",disabled:A,onClick:()=>{P()}})]})]})]})]})}function zW(e){return{filename:`${e.runId}.eval-results.json`,text:`${JSON.stringify(e,null,2)}
|
|
25
|
-
`}}function PW(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 pi(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 SM(e){const t=[];let n=null,r={};const s=new Map;let a=null,l="";const c=new Map;let f=null,d=1,h=0,m=0;function b(R){return n&&n.endedAt===null||(n={turnId:R?.turnId||`turn_${t.length+1}`,startedAt:R?.at?wl(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>d&&(d=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(pi({kind:"think",label:C?Jr(C,80):"thinking",body:C,ms:E,at:R,startAt:a})),E&&E>d&&(d=E),a=null,l=""}for(const R of e){const T=R.data||{},E=wl(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="",f=null;break;case"message.received":{const C=rM(T);y(pi({kind:"user",label:C===null?"Prompt hidden":Jr(C,140),body:C??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 A=_?.start??E,M=A!==null&&E!==null?Math.max(0,E-A):null;y(pi({kind:"think",label:Jr(D,80),body:D,ms:M,at:E,startAt:A,turnId:R.turnId,depth:1,parentCallId:C}))}break}k(E);break;case"message.appended":if(typeof T.parentCallId=="string"&&T.parentCallId!=="")break;f===null&&(f=E);break;case"message.completed":{if(typeof T.parentCallId=="string"&&T.parentCallId!==""){const D=T.parentCallId;y(pi({kind:"agent",label:Jr(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=f??E,_=C!==null&&E!==null?Math.max(0,E-C):null;y(pi({kind:"agent",label:Jr(T.text,160)||"(empty reply)",body:typeof T.text=="string"?T.text:void 0,at:E,startAt:C,ms:_,turnId:R.turnId})),_&&_>d&&(d=_),f=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}`,A=r[D];delete r[D];const M=A&&A.start!==null&&E!==null?E-A.start:null;h+=1,T.isError&&(m+=1);{const B=T.toolName||A?.name||"tool",P=A?.args;y(pi({kind:"tool",label:B+(P?` ${Jr(Pn(P,60),60)}`:""),toolName:B,callId:typeof C=="string"?C:String(C),toolArgs:P,toolOutput:T.output,body:typeof T.output=="string"?T.output:T.output!=null?Pn(T.output,4e3):void 0,ms:M,error:!!T.isError,at:E,startAt:A?.start??null,turnId:R.turnId,depth:_===void 0?0:1,parentCallId:_}))}M&&M>d&&(d=M);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(pi({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 A=D&&D.start!==null&&E!==null?E-D.start:null;h+=1;const M=s.get(C);s.delete(C);const B=M!==void 0?M.turn.rows[M.index]:void 0;B!==void 0&&B.kind==="tool"?(B.ms=A,B.at=E,A&&A>d&&(d=A)):y(pi({kind:"tool",label:D?.name||"subagent",toolName:D?.name||"subagent",callId:C,toolArgs:D?.args,ms:A,at:E,startAt:D?.start??null,turnId:R.turnId}));break}case"artifact.tagged":{const C=LI(T);y(pi({kind:"artifact",label:Jr(C.title===void 0?C.kind:`${C.kind} · ${C.title}`,120),body:T.data!=null?Pn(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;_>d&&(d=_),C.wallMs=_}if(k(E),f!==null&&E!==null){const _=Math.max(0,E-f);C.rows.push(pi({kind:"agent",label:"(streaming…)",ms:_,at:E,startAt:f})),f=null}for(const _ of Object.keys(r)){const D=r[_],A=D.start!==null&&E!==null?E-D.start:null;C.rows.push(pi({kind:"tool",label:`${D.name||"tool"} (no result)`,ms:A,error:!0,at:E,startAt:D.start,turnId:D.turnId})),A&&A>d&&(d=A)}r={},(R.type==="turn.completed"||R.type==="turn.failed")&&(n=null);break}}}for(const R of Object.keys(r)){const T=r[R];y(pi({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:d,totalTools:h,failedTools:m,eventCount:e.length,totalCostUsd:S}}function $W(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 BW({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 FW={},UW={};function qW(e){return/\/factory\/([^/]+)\/agent\/playground\//.exec(e)?.[1]}const wM=new Map;for(const[e,t]of Object.entries(UW)){if(t?.default==null)continue;const n=typeof t.agentName=="string"&&t.agentName.trim()!==""?t.agentName.trim():void 0,r=qW(e),s=new Set;n!==void 0&&s.add(n),r!==void 0&&s.add(r);for(const a of s)wM.set(a,t.default)}function HW(e){if(!(e===void 0||e.trim()===""))return wM.get(e.trim())}const VW={passed:"Pass",failed:"Fail",scored:"Scored",skipped:"Skipped"},GW={passed:"success",failed:"danger",scored:"warn",skipped:"neutral"};function WW(e){return e.verdict??(e.ok===!0?"passed":"failed")}function KW(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 YW({a:e}){return e.passed?g.jsx(qt,{name:"check-circle",variant:"filled",size:"sm",color:"green"}):e.severity==="soft"?g.jsx(qt,{name:"minus-circle",variant:"filled",size:"sm",color:"yellow"}):g.jsx(qt,{name:"x-circle",variant:"filled",size:"sm",color:"red"})}function EM(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 XW={user:"chat-bubble",agent:"sparkles",think:"brain-simple",tool:"wrench",artifact:"bookmark"},ZW={user:"User",agent:"Assistant",think:"Thinking",tool:"Tool call",artifact:"Artifact"},QW={user:"accent",agent:"green",think:"yellow",tool:"purple",artifact:"orange"};function JW({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=EM(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(qt,{name:XW[e.kind],size:"sm",color:e.error?"red":QW[e.kind]}),g.jsx("span",{className:"eval-step-kind-label",children:ZW[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:Ii(e.ms)}):null,r?g.jsx("span",{className:t?"eval-chevron open":"eval-chevron",children:g.jsx(qt,{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:Eo(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:Eo(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 eK({sessionId:e,live:t}){const[n,r]=v.useState([]),[s,a]=v.useState(null),[l,c]=v.useState(!0),[f,d]=v.useState(!1),h=v.useRef(null),m=Qe.hasCapability(yt.sessionStream),b=t&&m;v.useEffect(()=>{let k=!1;const S=new AbortController;return c(!0),a(null),r([]),d(!1),(async()=>{let R=-1;try{const T=await Qe.api.eventsText(e);if(k)return;if(T.ok){const E=await T.text();if(k)return;const C=bv(E);for(const _ of C)typeof _.index=="number"&&_.index>R&&(R=_.index);r(C)}}catch(T){k||a(T instanceof Error?T.message:String(T))}finally{k||c(!1)}if(!(!b||k)){d(!0);try{const T=await Qe.api.subscribeEvents(e,R+1,S.signal);if(!T.ok||!T.body){k||(a(`Stream failed (${T.status})`),d(!1));return}const E=T.body.getReader(),C=new TextDecoder;let _="";for(;;){const{done:D,value:A}=await E.read();if(D||k)break;_+=C.decode(A,{stream:!0});const M=_.split(`
|
|
26
|
-
`);_=M.pop()??"";const B=[];for(const P of M){const N=P.trim();if(N)try{const W=JSON.parse(N);B.push(W),typeof W.index=="number"&&W.index>R&&(R=W.index)}catch{}}B.length>0&&!k&&r(P=>[...P,...B])}}catch(T){!k&&!(T instanceof DOMException&&T.name==="AbortError")&&a(T instanceof Error?T.message:String(T))}finally{k||d(!1)}}})(),()=>{k=!0,S.abort()}},[e,b]),v.useEffect(()=>{b&&h.current&&h.current.scrollIntoView({block:"nearest"})},[n.length,b]);const y=v.useMemo(()=>SM(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}):y.turns.length===0?g.jsx("div",{className:"eval-trace",children:g.jsx("div",{className:"eval-trace-empty",children:b?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:[y.eventCount," events · ",y.totalTools," tool",y.totalTools===1?"":"s",y.failedTools>0?` · ${y.failedTools} failed`:"",b||f?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,y.turns.map((k,S)=>g.jsxs("div",{className:"eval-turn",children:[g.jsxs("div",{className:"eval-turn-head",children:["Turn ",S+1,k.failed?" · failed":"",k.wallMs!=null&&k.wallMs>0?` · ${Ii(k.wallMs)}`:""]}),k.rows.map((R,T)=>g.jsx(JW,{row:R},`${k.turnId}-${T}-${R.kind}`))]},k.turnId)),g.jsx("div",{ref:h})]})}function tK({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(qt,{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:Eo(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:Eo(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 nK({c:e,batchRunning:t,customization:n}){const[r,s]=v.useState(!1),[a,l]=v.useState(!1),c=r||a,f=EM(c),d=v.useRef({io:!1,expanded:!1});c&&(d.current={io:a,expanded:r});const h=c?a:d.current.io,m=c?r:d.current.expanded,b=WW(e),y=e.status==="pending"?"Queued":e.status==="running"?"Running":VW[b],k=e.status==="done"?GW[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(qt,{name:"chevron-right",size:10})}),g.jsx(vo,{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(vn,{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(vn,{variant:"ghost",size:"sm",onClick:()=>{Qe.openEvalCaseTrace(e.sessionId)},children:"Full trace"}),g.jsx(vn,{variant:"ghost",size:"sm",onClick:()=>{Qe.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(BW,{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 _=KW(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(YW,{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,f?g.jsxs("div",{className:c?"eval-collapse-clip":"eval-collapse-clip collapsed","aria-hidden":!c,inert:c?void 0:!0,children:[h?g.jsx(tK,{c:e}):null,m&&e.sessionId!==void 0?g.jsx(eK,{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"})," ",ER(e)?"Aggregating sibling cases…":"Waiting for session…"]}):ER(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 ER(e){return e.id==="overall"||e.id.endsWith("/overall")||(e.tags?.includes("summary")??!1)}function TM(){const e=Ue(S=>S.evalRun),t=Ue(S=>S.evalCases),n=Ue(S=>S.evalConfig),r=Ue(S=>S.meta.name),s=Ue(S=>S.meta.readonly===!0),a=Ue(S=>S.capabilities.evals),l=v.useMemo(()=>HW(r),[r]),c=e?.status==="running",f=!s&&a==="enabled"&&t.length>0,d=!s&&Qe.hasCapability(yt.evalCancel),h=l?.RunSummary;if(a==="disabled")return g.jsx("div",{className:"pg-evals",children:g.jsx("div",{className:"eval-empty",children:g.jsx("p",{children:"Evaluations are not available in this playground."})})});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}.`:""]}),f?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,f?g.jsx(vn,{variant:"secondary",size:"sm",disabled:c,onClick:()=>{Qe.startEvalRun()},children:"Run all"}):null]})});const{summary:m,status:b}=e,y=b==="failed"||b==="cancelled"?"danger":c?"accent":"success",k=b==="failed"?"Failed":b==="cancelled"?"Cancelled":c?"Running":"Completed";return g.jsxs("div",{className:"pg-evals",children:[g.jsxs("div",{className:"eval-summary",children:[g.jsx(vo,{variant:y,size:"sm",children:k}),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:[m.done,"/",m.total," done · ",m.passed," passed"]})," · ",m.failed," failed",m.scored!==void 0&&m.scored>0?g.jsxs("span",{className:"eval-summary-muted",children:[" · ",m.scored," scored"]}):null,m.skipped!==void 0&&m.skipped>0?g.jsxs("span",{className:"eval-summary-muted",children:[" · ",m.skipped," skipped"]}):null]}),h!==void 0?g.jsx(h,{run:e}):null,c?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(vn,{variant:"ghost",size:"sm",onClick:()=>{const S=zW(e);PW(S.filename,S.text)},title:"Download this eval run's results (assertions, metrics, I/O) as JSON",children:"Download run"}),c&&d?g.jsx(vn,{variant:"secondary",size:"sm",onClick:()=>{Qe.cancelEvalRun(e.runId)},children:"Cancel"}):null,f?g.jsx(vn,{variant:"secondary",size:"sm",disabled:c,onClick:()=>{Qe.startEvalRun()},children:"Run all"}):null]})]}),g.jsx("div",{className:"eval-case-list",children:e.cases.map(S=>g.jsx(nK,{c:S,batchRunning:c,customization:l},S.id))})]})}const RM=48;function rK(e){return e.scrollHeight-e.scrollTop-e.clientHeight}function iK(e,t=RM){return rK(e)<=t}function iy(e){e.scrollTop=e.scrollHeight}function CM(e){const{contentKey:t,latchKey:n,thresholdPx:r=RM}=e,s=v.useRef(null),a=v.useRef(!0);return v.useEffect(()=>{const l=s.current;if(!l)return;const c=()=>{a.current=iK(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&&iy(l)},[n]),v.useLayoutEffect(()=>{if(!a.current)return;const l=s.current;l&&iy(l)},[t]),v.useEffect(()=>{const l=s.current;if(!l)return;const c=()=>{a.current&&iy(l)};c();const f=new Set,d=new ResizeObserver(c),h=y=>{f.has(y)||(f.add(y),d.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}),()=>{d.disconnect(),b.disconnect()}},[t,n]),{scrollRef:s}}function p0({idle:e,empty:t}){const n=Ue(s=>s.current),r=Ue(s=>s.historyLoading);return n===null?g.jsx(Ri,{body:e}):r?g.jsx(Ri,{icon:g.jsx("span",{className:"spin"}),body:"Loading session…"}):g.jsx(Ri,{body:t})}function _M(){const e=Ue(a=>a.traceEvents),t=Ue(a=>a.current),n=e.length,{scrollRef:r}=CM({contentKey:n,latchKey:`${t?.sessionId??"none"}:${n}`}),s=lN({count:n,getScrollElement:()=>r.current,estimateSize:()=>18,overscan:24});return n===0?g.jsx("div",{className:"pg-raw",children:g.jsx(p0,{idle:"Select a session to see the raw event stream.",empty:"No events recorded for this session yet."})}):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:` ${Pn(l.data,240)}`})]},a.key)})})})]})}const sK={user:"chat-bubble",agent:"sparkles",think:"brain-simple",tool:"wrench",artifact:"bookmark"},oK={user:"User",agent:"Assistant",think:"Thinking",tool:"Tool call",artifact:"Artifact"},aK={user:"accent",agent:"green",think:"yellow",tool:"purple",artifact:"orange"};function lK(e,t){return t?"red":aK[e]}function AM({kind:e,error:t,showLabel:n=!0}){const r=lK(e,t),s=`${oK[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(qt,{name:sK[e],size:"sm",color:r}),n?g.jsx("span",{className:"wf-kind-label",children:s}):null]})}function uK(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 cK(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 fK(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,f=c===null||c===0,d=s*.012,h=f?d:Math.max(c,d),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:f}}function NM(e){return e===null?"—":e===0?"instant":Ii(e)}function gs({label:e,value:t}){return g.jsxs("div",{children:[g.jsx("dt",{children:e}),g.jsx("dd",{title:t,children:t})]})}function dK({span:e,onClose:t}){const{row:n,turnId:r,startMs:s,trueDurMs:a,wallMs:l}=e,c=a!=null?s+a:s,f=a!=null&&a>0&&l>0?`${(a/l*100).toFixed(1)}%`:"—",d=n.body?.trim()||"",h=n.toolArgs!=null?Eo(n.toolArgs):"",m=n.toolOutput!=null?Eo(n.toolOutput):n.kind==="tool"&&d?d:"";return g.jsxs("aside",{className:"trace-detail","aria-label":"Span details",children:[g.jsxs("div",{className:"trace-detail-head",children:[g.jsx(AM,{kind:n.kind,error:n.error}),g.jsx(br,{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(pa,{className:"artifact-link",href:n.url,children:n.url}):null,n.kind!=="tool"&&d?g.jsx("pre",{className:"trace-detail-body",children:d}):null,n.kind!=="tool"&&!d&&n.label?g.jsx("div",{className:"trace-detail-label",children:n.label}):null,g.jsxs("dl",{className:"trace-detail-meta",children:[g.jsx(gs,{label:"Turn",value:r}),n.error?g.jsx(gs,{label:"Status",value:"error"}):null,g.jsx(gs,{label:"Start +",value:Ii(s)}),g.jsx(gs,{label:"End +",value:Ii(c)}),g.jsx(gs,{label:"Duration",value:NM(a)}),g.jsx(gs,{label:"% of turn",value:f}),g.jsx(gs,{label:"Started",value:hR(n.startAt)}),g.jsx(gs,{label:"Ended",value:hR(n.at)}),n.callId?g.jsx(gs,{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 pK({span:e,selected:t,detailOpen:n,onSelect:r}){const{row:s}=e,a=`${s.kind}${s.error?" error":""}`,l=NM(e.trueDurMs),c=e.widthPct>=8,f=s.depth??0;return g.jsxs("button",{type:"button",className:`wf-row ${a}${t?" selected":""}${f>0?" nested":""}`,onClick:r,"aria-pressed":t,style:f>0?{paddingLeft:`${8+f*14}px`}:void 0,children:[g.jsx(AM,{kind:s.kind,error:s.error,showLabel:!n}),g.jsx("span",{className:"wf-name",title:s.label,children:f>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 hK({turn:e,index:t,selectedId:n,onSelect:r}){const s=uK(e),a=cK(e,s),l=v.useMemo(()=>e.rows.map((h,m)=>fK(h,m,e.turnId,s,a)),[e,s,a]),c=v.useMemo(()=>$W(a),[a]),f=[];e.wallMs!==void 0&&f.push(`Worked for ${u0(e.wallMs)}`),e.usage&&f.push(`in ${sh(e.usage.inputTokens)} · out ${sh(e.usage.outputTokens)}`);const d=e.cost?.totalUsd;return typeof d=="number"&&Number.isFinite(d)&&f.push(c0(d)),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(qt,{name:"x-circle",size:"sm",variant:"filled",color:"red","aria-hidden":"true"}),"Failed"]}):null]}),g.jsx("span",{className:"wall",children:f.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:Ii(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(pK,{span:h,selected:n===h.id,detailOpen:n!=null,onSelect:()=>r(n===h.id?null:h)},h.id))]})]})}function OM(){const e=Ue(c=>c.traceEvents),t=Ue(c=>c.sessionCostUsd),n=v.useMemo(()=>SM(e),[e]),[r,s]=v.useState(null);if(!e.length)return g.jsx("div",{className:"pg-trace",children:g.jsx(p0,{idle:"Select a session to see the timeline.",empty:"No events recorded for this session yet."})});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 ${c0(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,f)=>g.jsx(hK,{turn:c,index:f,selectedId:r?.id??null,onSelect:s},`${c.turnId||"turn"}-${f}`))}),r?g.jsx(dK,{span:r,onClose:()=>s(null)}):null]})]})})}function mK(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const gK=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bK=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yK={};function TR(e,t){return(yK.jsx?bK:gK).test(e)}const vK=/[ \t\n\f\r]/g;function xK(e){return typeof e=="object"?e.type==="text"?RR(e.value):!1:RR(e)}function RR(e){return e.replace(vK,"")===""}class cf{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}cf.prototype.normal={};cf.prototype.property={};cf.prototype.space=void 0;function IM(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new cf(n,r,t)}function vv(e){return e.toLowerCase()}class $r{constructor(t,n){this.attribute=n,this.property=t}}$r.prototype.attribute="";$r.prototype.booleanish=!1;$r.prototype.boolean=!1;$r.prototype.commaOrSpaceSeparated=!1;$r.prototype.commaSeparated=!1;$r.prototype.defined=!1;$r.prototype.mustUseProperty=!1;$r.prototype.number=!1;$r.prototype.overloadedBoolean=!1;$r.prototype.property="";$r.prototype.spaceSeparated=!1;$r.prototype.space=void 0;let kK=0;const Mt=Sa(),Kn=Sa(),xv=Sa(),Be=Sa(),En=Sa(),El=Sa(),Zr=Sa();function Sa(){return 2**++kK}const kv=Object.freeze(Object.defineProperty({__proto__:null,boolean:Mt,booleanish:Kn,commaOrSpaceSeparated:Zr,commaSeparated:El,number:Be,overloadedBoolean:xv,spaceSeparated:En},Symbol.toStringTag,{value:"Module"})),sy=Object.keys(kv);class h0 extends $r{constructor(t,n,r,s){let a=-1;if(super(t,n),CR(this,"space",s),typeof r=="number")for(;++a<sy.length;){const l=sy[a];CR(this,sy[a],(r&kv[l])===kv[l])}}}h0.prototype.defined=!0;function CR(e,t,n){n&&(e[t]=n)}function Wl(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new h0(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[vv(r)]=r,n[vv(a.attribute)]=r}return new cf(t,n,e.space)}const MM=Wl({properties:{ariaActiveDescendant:null,ariaAtomic:Kn,ariaAutoComplete:null,ariaBusy:Kn,ariaChecked:Kn,ariaColCount:Be,ariaColIndex:Be,ariaColSpan:Be,ariaControls:En,ariaCurrent:null,ariaDescribedBy:En,ariaDetails:null,ariaDisabled:Kn,ariaDropEffect:En,ariaErrorMessage:null,ariaExpanded:Kn,ariaFlowTo:En,ariaGrabbed:Kn,ariaHasPopup:null,ariaHidden:Kn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:En,ariaLevel:Be,ariaLive:null,ariaModal:Kn,ariaMultiLine:Kn,ariaMultiSelectable:Kn,ariaOrientation:null,ariaOwns:En,ariaPlaceholder:null,ariaPosInSet:Be,ariaPressed:Kn,ariaReadOnly:Kn,ariaRelevant:null,ariaRequired:Kn,ariaRoleDescription:En,ariaRowCount:Be,ariaRowIndex:Be,ariaRowSpan:Be,ariaSelected:Kn,ariaSetSize:Be,ariaSort:null,ariaValueMax:Be,ariaValueMin:Be,ariaValueNow:Be,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function DM(e,t){return t in e?e[t]:t}function LM(e,t){return DM(e,t.toLowerCase())}const SK=Wl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:El,acceptCharset:En,accessKey:En,action:null,allow:null,allowFullScreen:Mt,allowPaymentRequest:Mt,allowUserMedia:Mt,alt:null,as:null,async:Mt,autoCapitalize:null,autoComplete:En,autoFocus:Mt,autoPlay:Mt,blocking:En,capture:null,charSet:null,checked:Mt,cite:null,className:En,cols:Be,colSpan:null,content:null,contentEditable:Kn,controls:Mt,controlsList:En,coords:Be|El,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Mt,defer:Mt,dir:null,dirName:null,disabled:Mt,download:xv,draggable:Kn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Mt,formTarget:null,headers:En,height:Be,hidden:xv,high:Be,href:null,hrefLang:null,htmlFor:En,httpEquiv:En,id:null,imageSizes:null,imageSrcSet:null,inert:Mt,inputMode:null,integrity:null,is:null,isMap:Mt,itemId:null,itemProp:En,itemRef:En,itemScope:Mt,itemType:En,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Mt,low:Be,manifest:null,max:null,maxLength:Be,media:null,method:null,min:null,minLength:Be,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:Be,pattern:null,ping:En,placeholder:null,playsInline:Mt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Mt,referrerPolicy:null,rel:En,required:Mt,reversed:Mt,rows:Be,rowSpan:Be,sandbox:En,scope:null,scoped:Mt,seamless:Mt,selected:Mt,shadowRootClonable:Mt,shadowRootDelegatesFocus:Mt,shadowRootMode:null,shape:null,size:Be,sizes:null,slot:null,span:Be,spellCheck:Kn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Be,step:null,style:null,tabIndex:Be,target:null,title:null,translate:null,type:null,typeMustMatch:Mt,useMap:null,value:Kn,width:Be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:En,axis:null,background:null,bgColor:null,border:Be,borderColor:null,bottomMargin:Be,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:Be,leftMargin:Be,link:null,longDesc:null,lowSrc:null,marginHeight:Be,marginWidth:Be,noResize:Mt,noHref:Mt,noShade:Mt,noWrap:Mt,object:null,profile:null,prompt:null,rev:null,rightMargin:Be,rules:null,scheme:null,scrolling:Kn,standby:null,summary:null,text:null,topMargin:Be,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Be,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Mt,disableRemotePlayback:Mt,prefix:null,property:null,results:Be,security:null,unselectable:null},space:"html",transform:LM}),wK=Wl({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:Zr,accentHeight:Be,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Be,amplitude:Be,arabicForm:null,ascent:Be,attributeName:null,attributeType:null,azimuth:Be,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Be,by:null,calcMode:null,capHeight:Be,className:En,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:Be,diffuseConstant:Be,direction:null,display:null,dur:null,divisor:Be,dominantBaseline:null,download:Mt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Be,enableBackground:null,end:null,event:null,exponent:Be,externalResourcesRequired:null,fill:null,fillOpacity:Be,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:El,g2:El,glyphName:El,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Be,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Be,horizOriginX:Be,horizOriginY:Be,id:null,ideographic:Be,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Be,k:Be,k1:Be,k2:Be,k3:Be,k4:Be,kernelMatrix:Zr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Be,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:Be,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:Be,overlineThickness:Be,paintOrder:null,panose1:null,path:null,pathLength:Be,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:En,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Be,pointsAtY:Be,pointsAtZ:Be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Zr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Zr,rev:Zr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Zr,requiredFeatures:Zr,requiredFonts:Zr,requiredFormats:Zr,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:Be,specularExponent:Be,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Be,strikethroughThickness:Be,string:null,stroke:null,strokeDashArray:Zr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Be,strokeOpacity:Be,strokeWidth:null,style:null,surfaceScale:Be,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Zr,tabIndex:Be,tableValues:null,target:null,targetX:Be,targetY:Be,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Zr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Be,underlineThickness:Be,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Be,values:null,vAlphabetic:Be,vMathematical:Be,vectorEffect:null,vHanging:Be,vIdeographic:Be,version:null,vertAdvY:Be,vertOriginX:Be,vertOriginY:Be,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Be,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:DM}),jM=Wl({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()}}),zM=Wl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:LM}),PM=Wl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),EK={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"},TK=/[A-Z]/g,_R=/-[a-z]/g,RK=/^data[-\w.:]+$/i;function CK(e,t){const n=vv(t);let r=t,s=$r;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&RK.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(_R,AK);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!_R.test(a)){let l=a.replace(TK,_K);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}s=h0}return new s(r,t)}function _K(e){return"-"+e.toLowerCase()}function AK(e){return e.charAt(1).toUpperCase()}const NK=IM([MM,SK,jM,zM,PM],"html"),m0=IM([MM,wK,jM,zM,PM],"svg");function OK(e){return e.join(" ").trim()}var ul={},oy,AR;function IK(){if(AR)return oy;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,f=`
|
|
27
|
-
`,d="/",h="*",m="",b="comment",y="declaration";oy=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(F){var z=F.match(t);z&&(T+=z.length);var U=F.lastIndexOf(f);E=~U?F.length-U:E+F.length}function _(){var F={line:T,column:E};return function(z){return z.position=new D(F),B(),z}}function D(F){this.start=F,this.end={line:T,column:E},this.source=R.source}D.prototype.content=S;function A(F){var z=new Error(R.source+":"+T+":"+E+": "+F);if(z.reason=F,z.filename=R.source,z.line=T,z.column=E,z.source=S,!R.silent)throw z}function M(F){var z=F.exec(S);if(z){var U=z[0];return C(U),S=S.slice(U.length),z}}function B(){M(n)}function P(F){var z;for(F=F||[];z=N();)z!==!1&&F.push(z);return F}function N(){var F=_();if(!(d!=S.charAt(0)||h!=S.charAt(1))){for(var z=2;m!=S.charAt(z)&&(h!=S.charAt(z)||d!=S.charAt(z+1));)++z;if(z+=2,m===S.charAt(z-1))return A("End of comment missing");var U=S.slice(2,z-2);return E+=2,C(U),S=S.slice(z),E+=2,F({type:b,comment:U})}}function W(){var F=_(),z=M(r);if(z){if(N(),!M(s))return A("property missing ':'");var U=M(a),H=F({type:y,property:k(z[0].replace(e,m)),value:U?k(U[0].replace(e,m)):m});return M(l),H}}function $(){var F=[];P(F);for(var z;z=W();)z!==!1&&(F.push(z),P(F));return F}return B(),$()};function k(S){return S?S.replace(c,m):m}return oy}var NR;function MK(){if(NR)return ul;NR=1;var e=ul&&ul.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ul,"__esModule",{value:!0}),ul.default=n;var t=e(IK());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(f){if(f.type==="declaration"){var d=f.property,h=f.value;c?s(d,h,f):h&&(a=a||{},a[d]=h)}}),a}return ul}var DK=MK();const OR=Vc(DK),LK=OR.default||OR,jK=Object.freeze(Object.defineProperty({__proto__:null,default:LK},Symbol.toStringTag,{value:"Module"})),zK=Pj(jK);var Zu={},IR;function PK(){if(IR)return Zu;IR=1,Object.defineProperty(Zu,"__esModule",{value:!0}),Zu.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(d){return!d||n.test(d)||e.test(d)},l=function(d,h){return h.toUpperCase()},c=function(d,h){return"".concat(h,"-")},f=function(d,h){return h===void 0&&(h={}),a(d)?d:(d=d.toLowerCase(),h.reactCompat?d=d.replace(s,c):d=d.replace(r,c),d.replace(t,l))};return Zu.camelCase=f,Zu}var Qu,MR;function $K(){if(MR)return Qu;MR=1;var e=Qu&&Qu.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(zK),n=PK();function r(s,a){var l={};return!s||typeof s!="string"||(0,t.default)(s,function(c,f){c&&f&&(l[(0,n.camelCase)(c,a)]=f)}),l}return r.default=r,Qu=r,Qu}var BK=$K();const FK=Vc(BK),$M=BM("end"),g0=BM("start");function BM(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 UK(e){const t=g0(e),n=$M(e);if(t&&n)return{start:t,end:n}}function xc(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?Sv(e):""}function Sv(e){return LR(e&&e.line)+":"+LR(e&&e.column)}function DR(e){return Sv(e&&e.start)+"-"+Sv(e&&e.end)}function LR(e){return e&&typeof e=="number"?e:1}class yr 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 f=r.indexOf(":");f===-1?a.ruleId=r:(a.source=r.slice(0,f),a.ruleId=r.slice(f+1))}if(!a.place&&a.ancestors&&a.ancestors){const f=a.ancestors[a.ancestors.length-1];f&&(a.place=f.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=xc(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}}yr.prototype.file="";yr.prototype.name="";yr.prototype.reason="";yr.prototype.message="";yr.prototype.stack="";yr.prototype.column=void 0;yr.prototype.line=void 0;yr.prototype.ancestors=void 0;yr.prototype.cause=void 0;yr.prototype.fatal=void 0;yr.prototype.place=void 0;yr.prototype.ruleId=void 0;yr.prototype.source=void 0;const b0={}.hasOwnProperty,qK=new Map,HK=/[A-Z]/g,VK=new Set(["table","tbody","thead","tfoot","tr"]),GK=new Set(["td","th"]),FM="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function WK(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=tY(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=eY(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"?m0:NK,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=UM(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function UM(e,t,n){if(t.type==="element")return KK(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return YK(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ZK(e,t,n);if(t.type==="mdxjsEsm")return XK(e,t);if(t.type==="root")return QK(e,t,n);if(t.type==="text")return JK(e,t)}function KK(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=m0,e.schema=s),e.ancestors.push(t);const a=HM(e,t.tagName,!1),l=nY(e,t);let c=v0(e,t);return VK.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!xK(f):!0})),qM(e,l,a,t),y0(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function YK(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)}Uc(e,t.position)}function XK(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Uc(e,t.position)}function ZK(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=m0,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:HM(e,t.name,!0),l=rY(e,t),c=v0(e,t);return qM(e,l,a,t),y0(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function QK(e,t,n){const r={};return y0(r,v0(e,t)),e.create(t,e.Fragment,r,n)}function JK(e,t){return t.value}function qM(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function y0(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function eY(e,t,n){return r;function r(s,a,l,c){const d=Array.isArray(l.children)?n:t;return c?d(a,l,c):d(a,l)}}function tY(e,t){return n;function n(r,s,a,l){const c=Array.isArray(a.children),f=g0(r);return t(s,a,l,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function nY(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&b0.call(t.properties,s)){const a=iY(e,s,t.properties[s]);if(a){const[l,c]=a;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&GK.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 rY(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 Uc(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 Uc(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function v0(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:qK;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const f=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(f){const d=s.get(f)||0;l=f+"-"+d,s.set(f,d+1)}}const c=UM(e,a,l);c!==void 0&&n.push(c)}return n}function iY(e,t,n){const r=CK(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?mK(n):OK(n)),r.property==="style"){let s=typeof n=="object"?n:sY(e,String(n));return e.stylePropertyNameCase==="css"&&(s=oY(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?EK[r.property]||r.property:r.attribute,n]}}function sY(e,t){try{return FK(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new yr("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=FM+"#cannot-parse-style-attribute",s}}function HM(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=TR(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=TR(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return b0.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);Uc(e)}function Uc(e,t){const n=new yr("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=FM+"#cannot-handle-mdx-estrees-without-createevaluater",n}function oY(e){const t={};let n;for(n in e)b0.call(e,n)&&(t[aY(n)]=e[n]);return t}function aY(e){let t=e.replace(HK,lY);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function lY(e){return"-"+e.toLowerCase()}const ay={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"]},uY={};function x0(e,t){const n=uY,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return VM(e,r,s)}function VM(e,t,n){if(cY(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 jR(e.children,t,n)}return Array.isArray(e)?jR(e,t,n):""}function jR(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=VM(e[s],t,n);return r.join("")}function cY(e){return!!(e&&typeof e=="object")}const zR=document.createElement("i");function k0(e){const t="&"+e+";";zR.innerHTML=t;const n=zR.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ni(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 hi(e,t){return e.length>0?(ni(e,e.length,0,t),e):t}const PR={}.hasOwnProperty;function GM(e){const t={};let n=-1;for(;++n<e.length;)fY(t,e[n]);return t}function fY(e,t){let n;for(n in t){const s=(PR.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){PR.call(s,l)||(s[l]=[]);const c=a[l];dY(s[l],Array.isArray(c)?c:c?[c]:[])}}}function dY(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ni(e,0,0,r)}function WM(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 Ai(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const wr=Oo(/[A-Za-z]/),mr=Oo(/[\dA-Za-z]/),pY=Oo(/[#-'*+\--9=?A-Z^-~]/);function ah(e){return e!==null&&(e<32||e===127)}const wv=Oo(/\d/),hY=Oo(/[\dA-Fa-f]/),mY=Oo(/[!-/:-@[-`{-~]/);function vt(e){return e!==null&&e<-2}function kn(e){return e!==null&&(e<0||e===32)}function Ut(e){return e===-2||e===-1||e===32}const rm=Oo(new RegExp("\\p{P}|\\p{S}","u")),ha=Oo(/\s/);function Oo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Kl(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&mr(e.charCodeAt(n+1))&&mr(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(f){return Ut(f)?(e.enter(n),c(f)):t(f)}function c(f){return Ut(f)&&a++<s?(e.consume(f),c):(e.exit(n),t(f))}}const gY={tokenize:bY};function bY(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 f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return vt(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),l)}}const yY={tokenize:vY},$R={tokenize:xY};function vY(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,f,d)(C)}return d(C)}function f(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&E();const _=t.events.length;let D=_,A;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){A=t.events[D][1].end;break}T(r);let M=_;for(;M<t.events.length;)t.events[M][1].end={...A},M++;return ni(t.events,D+1,0,t.events.slice(_)),t.events.length=M,d(C)}return c(C)}function d(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($R,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($R,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 vt(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 A=s.events.length;for(;A--;)if(s.events[A][1].start.offset<l&&(!s.events[A][1].end||s.events[A][1].end.offset>l))return;const M=t.events.length;let B=M,P,N;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){if(P){N=t.events[B][1].end;break}P=!0}for(T(r),A=M;A<t.events.length;)t.events[A][1].end={...N},A++;ni(t.events,B+1,0,t.events.slice(M)),t.events.length=A}}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 xY(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 zl(e){if(e===null||kn(e)||ha(e))return 1;if(rm(e))return 2}function im(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 Ev={name:"attention",resolveAll:kY,tokenize:SY};function kY(e,t){let n=-1,r,s,a,l,c,f,d,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;f=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};BR(m,-f),BR(b,f),l={type:f>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},c={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},a={type:f>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:f>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[r][1].end={...l.start},e[n][1].start={...c.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=hi(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=hi(d,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",a,t]]),d=hi(d,im(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=hi(d,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,d=hi(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,ni(e,r-1,n-r+3,d),n=r+d.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function SY(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=zl(r);let a;return l;function l(f){return a=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===a)return e.consume(f),c;const d=e.exit("attentionSequence"),h=zl(f),m=!h||h===2&&s||n.includes(f),b=!s||s===2&&h||n.includes(r);return d._open=!!(a===42?m:m&&(s||!b)),d._close=!!(a===42?b:b&&(h||!m)),t(f)}}function BR(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const wY={name:"autolink",tokenize:EY};function EY(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 wr(y)?(e.consume(y),l):y===64?n(y):d(y)}function l(y){return y===43||y===45||y===46||mr(y)?(r=1,c(y)):d(y)}function c(y){return y===58?(e.consume(y),r=0,f):(y===43||y===45||y===46||mr(y))&&r++<32?(e.consume(y),c):(r=0,d(y))}function f(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||ah(y)?n(y):(e.consume(y),f)}function d(y){return y===64?(e.consume(y),h):pY(y)?(e.consume(y),d):n(y)}function h(y){return mr(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||mr(y))&&r++<63){const k=y===45?b:m;return e.consume(y),k}return n(y)}}const ff={partial:!0,tokenize:TY};function TY(e,t,n){return r;function r(a){return Ut(a)?Zt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||vt(a)?t(a):n(a)}}const KM={continuation:{tokenize:CY},exit:_Y,name:"blockQuote",tokenize:RY};function RY(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 CY(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(KM,t,n)(l)}}function _Y(e){e.exit("blockQuote")}const YM={name:"characterEscape",tokenize:AY};function AY(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 mY(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const XM={name:"characterReference",tokenize:NY};function NY(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"),f}function f(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),a=31,l=mr,h(m))}function d(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=hY,h):(e.enter("characterReferenceValue"),a=7,l=wv,h(m))}function h(m){if(m===59&&s){const b=e.exit("characterReferenceValue");return l===mr&&!k0(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 FR={partial:!0,tokenize:IY},UR={concrete:!0,name:"codeFenced",tokenize:OY};function OY(e,t,n){const r=this,s={partial:!0,tokenize:D};let a=0,l=0,c;return f;function f(A){return d(A)}function d(A){const M=r.events[r.events.length-1];return a=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,c=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(A)}function h(A){return A===c?(l++,e.consume(A),h):l<3?n(A):(e.exit("codeFencedFenceSequence"),Ut(A)?Zt(e,m,"whitespace")(A):m(A))}function m(A){return A===null||vt(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(FR,S,_)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===null||vt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(A)):Ut(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Zt(e,y,"whitespace")(A)):A===96&&A===c?n(A):(e.consume(A),b)}function y(A){return A===null||vt(A)?m(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(A))}function k(A){return A===null||vt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(A)):A===96&&A===c?n(A):(e.consume(A),k)}function S(A){return e.attempt(s,_,R)(A)}function R(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),T}function T(A){return a>0&&Ut(A)?Zt(e,E,"linePrefix",a+1)(A):E(A)}function E(A){return A===null||vt(A)?e.check(FR,S,_)(A):(e.enter("codeFlowValue"),C(A))}function C(A){return A===null||vt(A)?(e.exit("codeFlowValue"),E(A)):(e.consume(A),C)}function _(A){return e.exit("codeFenced"),t(A)}function D(A,M,B){let P=0;return N;function N(U){return A.enter("lineEnding"),A.consume(U),A.exit("lineEnding"),W}function W(U){return A.enter("codeFencedFence"),Ut(U)?Zt(A,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):$(U)}function $(U){return U===c?(A.enter("codeFencedFenceSequence"),F(U)):B(U)}function F(U){return U===c?(P++,A.consume(U),F):P>=l?(A.exit("codeFencedFenceSequence"),Ut(U)?Zt(A,z,"whitespace")(U):z(U)):B(U)}function z(U){return U===null||vt(U)?(A.exit("codeFencedFence"),M(U)):B(U)}}}function IY(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 ly={name:"codeIndented",tokenize:DY},MY={partial:!0,tokenize:LY};function DY(e,t,n){const r=this;return s;function s(d){return e.enter("codeIndented"),Zt(e,a,"linePrefix",5)(d)}function a(d){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(d):n(d)}function l(d){return d===null?f(d):vt(d)?e.attempt(MY,l,f)(d):(e.enter("codeFlowValue"),c(d))}function c(d){return d===null||vt(d)?(e.exit("codeFlowValue"),l(d)):(e.consume(d),c)}function f(d){return e.exit("codeIndented"),t(d)}}function LY(e,t,n){const r=this;return s;function s(l){return r.parser.lazy[r.now().line]?n(l):vt(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):vt(l)?s(l):n(l)}}const jY={name:"codeText",previous:PY,resolve:zY,tokenize:$Y};function zY(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 PY(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function $Y(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"),f(m))}function f(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),f):m===96?(a=e.enter("codeTextSequence"),s=0,h(m)):vt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("codeTextData"),d(m))}function d(m){return m===null||m===32||m===96||vt(m)?(e.exit("codeTextData"),f(m)):(e.consume(m),d)}function h(m){return m===96?(e.consume(m),s++,h):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",d(m))}}class BY{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&&Ju(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),Ju(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ju(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);Ju(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ju(this.left,n.reverse())}}}function Ju(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 ZM(e){const t={};let n=-1,r,s,a,l,c,f,d;const h=new BY(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"&&(f=r[1]._tokenizer.events,a=0,a<f.length&&f[a][1].type==="lineEndingBlank"&&(a+=2),a<f.length&&f[a][1].type==="content"))for(;++a<f.length&&f[a][1].type!=="content";)f[a][1].type==="chunkText"&&(f[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,FY(h,n)),n=t[n],d=!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 ni(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!d}function FY(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,f=[],d={};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();f.push([E,E+T.length-1]),e.splice(E,2,T)}for(f.reverse(),b=-1;++b<f.length;)d[k+f[b][0]]=k+f[b][1],k+=f[b][1]-f[b][0]-1;return d}const UY={resolve:HY,tokenize:VY},qY={partial:!0,tokenize:GY};function HY(e){return ZM(e),e}function VY(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):vt(c)?e.check(qY,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 GY(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||vt(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 QM(e,t,n,r,s,a,l,c,f){const d=f||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||ah(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||vt(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||kn(T))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(r),t(T)):h<d&&T===40?(e.consume(T),h++,S):T===41?(e.consume(T),h--,S):T===null||T===32||T===40||ah(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 JM(e,t,n,r,s,a){const l=this;let c=0,f;return d;function d(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&&!f||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):vt(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||vt(y)||c++>999?(e.exit("chunkString"),h(y)):(e.consume(y),f||(f=!Ut(y)),y===92?b:m)}function b(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function eD(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,f):n(b)}function f(b){return b===l?(e.enter(s),e.consume(b),e.exit(s),e.exit(r),t):(e.enter(a),d(b))}function d(b){return b===l?(e.exit(a),f(l)):b===null?n(b):vt(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Zt(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===l||b===null||vt(b)?(e.exit("chunkString"),d(b)):(e.consume(b),b===92?m:h)}function m(b){return b===l||b===92?(e.consume(b),h):h(b)}}function kc(e,t){let n;return r;function r(s){return vt(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 WY={name:"definition",tokenize:YY},KY={partial:!0,tokenize:XY};function YY(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),l(y)}function l(y){return JM.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=Ai(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),f):n(y)}function f(y){return kn(y)?kc(e,d)(y):d(y)}function d(y){return QM(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function h(y){return e.attempt(KY,m,m)(y)}function m(y){return Ut(y)?Zt(e,b,"whitespace")(y):b(y)}function b(y){return y===null||vt(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function XY(e,t,n){return r;function r(c){return kn(c)?kc(e,s)(c):n(c)}function s(c){return eD(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||vt(c)?t(c):n(c)}}const ZY={name:"hardBreakEscape",tokenize:QY};function QY(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return vt(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const JY={name:"headingAtx",resolve:eX,tokenize:tX};function eX(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"},ni(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function tX(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||kn(h)?(e.exit("atxHeadingSequence"),c(h)):n(h)}function c(h){return h===35?(e.enter("atxHeadingSequence"),f(h)):h===null||vt(h)?(e.exit("atxHeading"),t(h)):Ut(h)?Zt(e,c,"whitespace")(h):(e.enter("atxHeadingText"),d(h))}function f(h){return h===35?(e.consume(h),f):(e.exit("atxHeadingSequence"),c(h))}function d(h){return h===null||h===35||kn(h)?(e.exit("atxHeadingText"),c(h)):(e.consume(h),d)}}const nX=["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"],qR=["pre","script","style","textarea"],rX={concrete:!0,name:"htmlFlow",resolveTo:oX,tokenize:aX},iX={partial:!0,tokenize:uX},sX={partial:!0,tokenize:lX};function oX(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 aX(e,t,n){const r=this;let s,a,l,c,f;return d;function d(L){return h(L)}function h(L){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(L),m}function m(L){return L===33?(e.consume(L),b):L===47?(e.consume(L),a=!0,S):L===63?(e.consume(L),s=3,r.interrupt?t:O):wr(L)?(e.consume(L),l=String.fromCharCode(L),R):n(L)}function b(L){return L===45?(e.consume(L),s=2,y):L===91?(e.consume(L),s=5,c=0,k):wr(L)?(e.consume(L),s=4,r.interrupt?t:O):n(L)}function y(L){return L===45?(e.consume(L),r.interrupt?t:O):n(L)}function k(L){const X="CDATA[";return L===X.charCodeAt(c++)?(e.consume(L),c===X.length?r.interrupt?t:$:k):n(L)}function S(L){return wr(L)?(e.consume(L),l=String.fromCharCode(L),R):n(L)}function R(L){if(L===null||L===47||L===62||kn(L)){const X=L===47,se=l.toLowerCase();return!X&&!a&&qR.includes(se)?(s=1,r.interrupt?t(L):$(L)):nX.includes(l.toLowerCase())?(s=6,X?(e.consume(L),T):r.interrupt?t(L):$(L)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(L):a?E(L):C(L))}return L===45||mr(L)?(e.consume(L),l+=String.fromCharCode(L),R):n(L)}function T(L){return L===62?(e.consume(L),r.interrupt?t:$):n(L)}function E(L){return Ut(L)?(e.consume(L),E):N(L)}function C(L){return L===47?(e.consume(L),N):L===58||L===95||wr(L)?(e.consume(L),_):Ut(L)?(e.consume(L),C):N(L)}function _(L){return L===45||L===46||L===58||L===95||mr(L)?(e.consume(L),_):D(L)}function D(L){return L===61?(e.consume(L),A):Ut(L)?(e.consume(L),D):C(L)}function A(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),f=L,M):Ut(L)?(e.consume(L),A):B(L)}function M(L){return L===f?(e.consume(L),f=null,P):L===null||vt(L)?n(L):(e.consume(L),M)}function B(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||kn(L)?D(L):(e.consume(L),B)}function P(L){return L===47||L===62||Ut(L)?C(L):n(L)}function N(L){return L===62?(e.consume(L),W):n(L)}function W(L){return L===null||vt(L)?$(L):Ut(L)?(e.consume(L),W):n(L)}function $(L){return L===45&&s===2?(e.consume(L),H):L===60&&s===1?(e.consume(L),K):L===62&&s===4?(e.consume(L),j):L===63&&s===3?(e.consume(L),O):L===93&&s===5?(e.consume(L),Y):vt(L)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(iX,V,F)(L)):L===null||vt(L)?(e.exit("htmlFlowData"),F(L)):(e.consume(L),$)}function F(L){return e.check(sX,z,V)(L)}function z(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),U}function U(L){return L===null||vt(L)?F(L):(e.enter("htmlFlowData"),$(L))}function H(L){return L===45?(e.consume(L),O):$(L)}function K(L){return L===47?(e.consume(L),l="",q):$(L)}function q(L){if(L===62){const X=l.toLowerCase();return qR.includes(X)?(e.consume(L),j):$(L)}return wr(L)&&l.length<8?(e.consume(L),l+=String.fromCharCode(L),q):$(L)}function Y(L){return L===93?(e.consume(L),O):$(L)}function O(L){return L===62?(e.consume(L),j):L===45&&s===2?(e.consume(L),O):$(L)}function j(L){return L===null||vt(L)?(e.exit("htmlFlowData"),V(L)):(e.consume(L),j)}function V(L){return e.exit("htmlFlow"),t(L)}}function lX(e,t,n){const r=this;return s;function s(l){return vt(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 uX(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(ff,t,n)}}const cX={name:"htmlText",tokenize:fX};function fX(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),f}function f(O){return O===33?(e.consume(O),d):O===47?(e.consume(O),D):O===63?(e.consume(O),C):wr(O)?(e.consume(O),B):n(O)}function d(O){return O===45?(e.consume(O),h):O===91?(e.consume(O),a=0,k):wr(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):vt(O)?(l=m,K(O)):(e.consume(O),m)}function b(O){return O===45?(e.consume(O),y):m(O)}function y(O){return O===62?H(O):O===45?b(O):m(O)}function k(O){const j="CDATA[";return O===j.charCodeAt(a++)?(e.consume(O),a===j.length?S:k):n(O)}function S(O){return O===null?n(O):O===93?(e.consume(O),R):vt(O)?(l=S,K(O)):(e.consume(O),S)}function R(O){return O===93?(e.consume(O),T):S(O)}function T(O){return O===62?H(O):O===93?(e.consume(O),T):S(O)}function E(O){return O===null||O===62?H(O):vt(O)?(l=E,K(O)):(e.consume(O),E)}function C(O){return O===null?n(O):O===63?(e.consume(O),_):vt(O)?(l=C,K(O)):(e.consume(O),C)}function _(O){return O===62?H(O):C(O)}function D(O){return wr(O)?(e.consume(O),A):n(O)}function A(O){return O===45||mr(O)?(e.consume(O),A):M(O)}function M(O){return vt(O)?(l=M,K(O)):Ut(O)?(e.consume(O),M):H(O)}function B(O){return O===45||mr(O)?(e.consume(O),B):O===47||O===62||kn(O)?P(O):n(O)}function P(O){return O===47?(e.consume(O),H):O===58||O===95||wr(O)?(e.consume(O),N):vt(O)?(l=P,K(O)):Ut(O)?(e.consume(O),P):H(O)}function N(O){return O===45||O===46||O===58||O===95||mr(O)?(e.consume(O),N):W(O)}function W(O){return O===61?(e.consume(O),$):vt(O)?(l=W,K(O)):Ut(O)?(e.consume(O),W):P(O)}function $(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),s=O,F):vt(O)?(l=$,K(O)):Ut(O)?(e.consume(O),$):(e.consume(O),z)}function F(O){return O===s?(e.consume(O),s=void 0,U):O===null?n(O):vt(O)?(l=F,K(O)):(e.consume(O),F)}function z(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||kn(O)?P(O):(e.consume(O),z)}function U(O){return O===47||O===62||kn(O)?P(O):n(O)}function H(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function K(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),q}function q(O){return Ut(O)?Zt(e,Y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):Y(O)}function Y(O){return e.enter("htmlTextData"),l(O)}}const S0={name:"labelEnd",resolveAll:mX,resolveTo:gX,tokenize:bX},dX={tokenize:yX},pX={tokenize:vX},hX={tokenize:xX};function mX(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&&ni(e,0,e.length,n),e}function gX(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 f={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},d={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",f,t],["enter",d,t]],c=hi(c,e.slice(a+1,a+r+3)),c=hi(c,[["enter",h,t]]),c=hi(c,im(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),c=hi(c,[["exit",h,t],e[l-2],e[l-1],["exit",d,t]]),c=hi(c,e.slice(l+1)),c=hi(c,[["exit",f,t]]),ni(e,a,e.length,c),e}function bX(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(Ai(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),f):n(b)}function f(b){return b===40?e.attempt(dX,h,l?h:m)(b):b===91?e.attempt(pX,h,l?d:m)(b):l?h(b):m(b)}function d(b){return e.attempt(hX,h,m)(b)}function h(b){return t(b)}function m(b){return a._balanced=!0,n(b)}}function yX(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 kn(m)?kc(e,a)(m):a(m)}function a(m){return m===41?h(m):QM(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return kn(m)?kc(e,f)(m):h(m)}function c(m){return n(m)}function f(m){return m===34||m===39||m===40?eD(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):h(m)}function d(m){return kn(m)?kc(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 vX(e,t,n){const r=this;return s;function s(c){return JM.call(r,e,a,l,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(Ai(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function xX(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 kX={name:"labelStartImage",resolveAll:S0.resolveAll,tokenize:SX};function SX(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 wX={name:"labelStartLink",resolveAll:S0.resolveAll,tokenize:EX};function EX(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 uy={name:"lineEnding",tokenize:TX};function TX(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Zt(e,t,"linePrefix")}}const wp={name:"thematicBreak",tokenize:RX};function RX(e,t,n){let r=0,s;return a;function a(d){return e.enter("thematicBreak"),l(d)}function l(d){return s=d,c(d)}function c(d){return d===s?(e.enter("thematicBreakSequence"),f(d)):r>=3&&(d===null||vt(d))?(e.exit("thematicBreak"),t(d)):n(d)}function f(d){return d===s?(e.consume(d),r++,f):(e.exit("thematicBreakSequence"),Ut(d)?Zt(e,c,"whitespace")(d):c(d))}}const Dr={continuation:{tokenize:NX},exit:IX,name:"list",tokenize:AX},CX={partial:!0,tokenize:MX},_X={partial:!0,tokenize:OX};function AX(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:wv(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(wp,n,d)(y):d(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(y)}return n(y)}function f(y){return wv(y)&&++l<10?(e.consume(y),f):(!r.interrupt||l<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),d(y)):n(y)}function d(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(ff,r.interrupt?n:h,e.attempt(CX,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 NX(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ff,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(_X,t,l)(c))}function l(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Zt(e,e.attempt(Dr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function OX(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 IX(e){e.exit(this.containerState.type)}function MX(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 HR={name:"setextUnderline",resolveTo:DX,tokenize:LX};function DX(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 LX(e,t,n){const r=this;let s;return a;function a(d){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=d,l(d)):n(d)}function l(d){return e.enter("setextHeadingLineSequence"),c(d)}function c(d){return d===s?(e.consume(d),c):(e.exit("setextHeadingLineSequence"),Ut(d)?Zt(e,f,"lineSuffix")(d):f(d))}function f(d){return d===null||vt(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const jX={tokenize:zX};function zX(e){const t=this,n=e.attempt(ff,r,e.attempt(this.parser.constructs.flowInitial,s,Zt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(UY,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 PX={resolveAll:nD()},$X=tD("string"),BX=tD("text");function tD(e){return{resolveAll:nD(e==="text"?FX: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 d(h)?a(h):c(h)}function c(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),f}function f(h){return d(h)?(n.exit("data"),a(h)):(n.consume(h),f)}function d(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 nD(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 FX(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,f;for(;a--;){const d=s[a];if(typeof d=="string"){for(l=d.length;d.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(d===-2)f=!0,c++;else if(d!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const d={type:n===e.length||f||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={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}const UX={42:Dr,43:Dr,45:Dr,48:Dr,49:Dr,50:Dr,51:Dr,52:Dr,53:Dr,54:Dr,55:Dr,56:Dr,57:Dr,62:KM},qX={91:WY},HX={[-2]:ly,[-1]:ly,32:ly},VX={35:JY,42:wp,45:[HR,wp],60:rX,61:HR,95:wp,96:UR,126:UR},GX={38:XM,92:YM},WX={[-5]:uy,[-4]:uy,[-3]:uy,33:kX,38:XM,42:Ev,60:[wY,cX],91:wX,92:[ZY,YM],93:S0,95:Ev,96:jY},KX={null:[Ev,PX]},YX={null:[42,95]},XX={null:[]},ZX=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:YX,contentInitial:qX,disable:XX,document:UX,flow:VX,flowInitial:HX,insideSpan:KX,string:GX,text:WX},Symbol.toStringTag,{value:"Module"}));function QX(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 f={attempt:M(D),check:M(A),consume:E,enter:C,exit:_,interrupt:M(A,{interrupt:!0})},d={code:null,containerState:{},defineSkip:S,events:[],now:k,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:m};let h=t.tokenize.call(d,f);return t.resolveAll&&a.push(t),d;function m(W){return l=hi(l,W),R(),l[l.length-1]!==null?[]:(B(t,0),d.events=im(a,d.events,d),d.events)}function b(W,$){return eZ(y(W),$)}function y(W){return JX(l,W)}function k(){const{_bufferIndex:W,_index:$,line:F,column:z,offset:U}=r;return{_bufferIndex:W,_index:$,line:F,column:z,offset:U}}function S(W){s[W.line]=W.column,N()}function R(){let W;for(;r._index<l.length;){const $=l[r._index];if(typeof $=="string")for(W=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===W&&r._bufferIndex<$.length;)T($.charCodeAt(r._bufferIndex));else T($)}}function T(W){h=h(W)}function E(W){vt(W)?(r.line++,r.column=1,r.offset+=W===-3?2:1,N()):W!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=W}function C(W,$){const F=$||{};return F.type=W,F.start=k(),d.events.push(["enter",F,d]),c.push(F),F}function _(W){const $=c.pop();return $.end=k(),d.events.push(["exit",$,d]),$}function D(W,$){B(W,$.from)}function A(W,$){$.restore()}function M(W,$){return F;function F(z,U,H){let K,q,Y,O;return Array.isArray(z)?V(z):"tokenize"in z?V([z]):j(z);function j(ne){return oe;function oe(le){const ce=le!==null&&ne[le],Ee=le!==null&&ne.null,be=[...Array.isArray(ce)?ce:ce?[ce]:[],...Array.isArray(Ee)?Ee:Ee?[Ee]:[]];return V(be)(le)}}function V(ne){return K=ne,q=0,ne.length===0?H:L(ne[q])}function L(ne){return oe;function oe(le){return O=P(),Y=ne,ne.partial||(d.currentConstruct=ne),ne.name&&d.parser.constructs.disable.null.includes(ne.name)?se():ne.tokenize.call($?Object.assign(Object.create(d),$):d,f,X,se)(le)}}function X(ne){return W(Y,O),U}function se(ne){return O.restore(),++q<K.length?L(K[q]):H}}}function B(W,$){W.resolveAll&&!a.includes(W)&&a.push(W),W.resolve&&ni(d.events,$,d.events.length-$,W.resolve(d.events.slice($),d)),W.resolveTo&&(d.events=W.resolveTo(d.events,d))}function P(){const W=k(),$=d.previous,F=d.currentConstruct,z=d.events.length,U=Array.from(c);return{from:z,restore:H};function H(){r=W,d.previous=$,d.currentConstruct=F,d.events.length=z,c=U,N()}}function N(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function JX(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 eZ(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=`
|
|
28
|
-
`;break}case-3:{l=`\r
|
|
29
|
-
`;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 tZ(e){const r={constructs:GM([ZX,...(e||{}).extensions||[]]),content:s(gY),defined:[],document:s(yY),flow:s(jX),lazy:{},string:s($X),text:s(BX)};return r;function s(a){return l;function l(c){return QX(r,a,c)}}}function nZ(e){for(;!ZM(e););return e}const VR=/[\0\t\n\r]/g;function rZ(){let e=1,t="",n=!0,r;return s;function s(a,l,c){const f=[];let d,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(VR.lastIndex=m,d=VR.exec(a),b=d&&d.index!==void 0?d.index:a.length,y=a.charCodeAt(b),!d){t=a.slice(m);break}if(y===10&&m===b&&r)f.push(-3),r=void 0;else switch(r&&(f.push(-5),r=void 0),m<b&&(f.push(a.slice(m,b)),e+=b-m),y){case 0:{f.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,f.push(-2);e++<h;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:r=!0,e=1}m=b+1}return c&&(r&&f.push(-5),t&&f.push(t),f.push(null)),f}}const iZ=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function sZ(e){return e.replace(iZ,oZ)}function oZ(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return WM(n.slice(a?2:1),a?16:10)}return k0(n)||e}const rD={}.hasOwnProperty;function aZ(e,t,n){return typeof t!="string"&&(n=t,t=void 0),lZ(n)(nZ(tZ(n).document().write(rZ()(e,t,!0))))}function lZ(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Me),autolinkProtocol:P,autolinkEmail:P,atxHeading:a(Ae),blockQuote:a(Ee),characterEscape:P,characterReference:P,codeFenced:a(be),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(be,l),codeText:a(ue,l),codeTextData:P,data:P,codeFlowValue:P,definition:a(ge),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(Se),hardBreakEscape:a(ke),hardBreakTrailing:a(ke),htmlFlow:a(xe,l),htmlFlowData:P,htmlText:a(xe,l),htmlTextData:P,image:a(Re),label:l,link:a(Me),listItem:a(Fe),listItemValue:b,listOrdered:a(ze,m),listUnordered:a(ze),paragraph:a(ye),reference:L,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(Ae),strong:a(_e),thematicBreak:a(fe)},exit:{atxHeading:f(),atxHeadingSequence:D,autolink:f(),autolinkEmail:ce,autolinkProtocol:le,blockQuote:f(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:se,characterReferenceMarkerNumeric:se,characterReferenceValue:ne,characterReference:oe,codeFenced:f(R),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:k,codeFlowValue:N,codeIndented:f(T),codeText:f(U),codeTextData:N,data:N,definition:f(),definitionDestinationString:_,definitionLabelString:E,definitionTitleString:C,emphasis:f(),hardBreakEscape:f($),hardBreakTrailing:f($),htmlFlow:f(F),htmlFlowData:N,htmlText:f(z),htmlTextData:N,image:f(K),label:Y,labelText:q,lineEnding:W,link:f(H),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:X,resourceDestinationString:O,resourceTitleString:j,resource:V,setextHeading:f(B),setextHeadingLineSequence:M,setextHeadingText:A,strong:f(),thematicBreak:f()}};iD(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Q){let re={type:"root",children:[]};const we={stack:[re],tokenStack:[],config:t,enter:c,exit:d,buffer:l,resume:h,data:n},Pe=[];let Ye=-1;for(;++Ye<Q.length;)if(Q[Ye][1].type==="listOrdered"||Q[Ye][1].type==="listUnordered")if(Q[Ye][0]==="enter")Pe.push(Ye);else{const Ze=Pe.pop();Ye=s(Q,Ze,Ye)}for(Ye=-1;++Ye<Q.length;){const Ze=t[Q[Ye][0]];rD.call(Ze,Q[Ye][1].type)&&Ze[Q[Ye][1].type].call(Object.assign({sliceSerialize:Q[Ye][2].sliceSerialize},we),Q[Ye][1])}if(we.tokenStack.length>0){const Ze=we.tokenStack[we.tokenStack.length-1];(Ze[1]||GR).call(we,void 0,Ze[0])}for(re.position={start:fo(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:fo(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},Ye=-1;++Ye<t.transforms.length;)re=t.transforms[Ye](re)||re;return re}function s(Q,re,we){let Pe=re-1,Ye=-1,Ze=!1,bt,Je,xt,St;for(;++Pe<=we;){const nt=Q[Pe];switch(nt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{nt[0]==="enter"?Ye++:Ye--,St=void 0;break}case"lineEndingBlank":{nt[0]==="enter"&&(bt&&!St&&!Ye&&!xt&&(xt=Pe),St=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:St=void 0}if(!Ye&&nt[0]==="enter"&&nt[1].type==="listItemPrefix"||Ye===-1&&nt[0]==="exit"&&(nt[1].type==="listUnordered"||nt[1].type==="listOrdered")){if(bt){let rt=Pe;for(Je=void 0;rt--;){const ct=Q[rt];if(ct[1].type==="lineEnding"||ct[1].type==="lineEndingBlank"){if(ct[0]==="exit")continue;Je&&(Q[Je][1].type="lineEndingBlank",Ze=!0),ct[1].type="lineEnding",Je=rt}else if(!(ct[1].type==="linePrefix"||ct[1].type==="blockQuotePrefix"||ct[1].type==="blockQuotePrefixWhitespace"||ct[1].type==="blockQuoteMarker"||ct[1].type==="listItemIndent"))break}xt&&(!Je||xt<Je)&&(bt._spread=!0),bt.end=Object.assign({},Je?Q[Je][1].start:nt[1].end),Q.splice(Je||Pe,0,["exit",bt,nt[2]]),Pe++,we++}if(nt[1].type==="listItemPrefix"){const rt={type:"listItem",_spread:!1,start:Object.assign({},nt[1].start),end:void 0};bt=rt,Q.splice(Pe,0,["enter",rt,nt[2]]),Pe++,we++,xt=void 0,St=!0}}}return Q[re][1]._spread=Ze,we}function a(Q,re){return we;function we(Pe){c.call(this,Q(Pe),Pe),re&&re.call(this,Pe)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(Q,re,we){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([re,we||void 0]),Q.position={start:fo(re.start),end:void 0}}function f(Q){return re;function re(we){Q&&Q.call(this,we),d.call(this,we)}}function d(Q,re){const we=this.stack.pop(),Pe=this.tokenStack.pop();if(Pe)Pe[0].type!==Q.type&&(re?re.call(this,Q,Pe[0]):(Pe[1]||GR).call(this,Q,Pe[0]));else throw new Error("Cannot close `"+Q.type+"` ("+xc({start:Q.start,end:Q.end})+"): it’s not open");we.position.end=fo(Q.end)}function h(){return x0(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function b(Q){if(this.data.expectingFirstListItemValue){const re=this.stack[this.stack.length-2];re.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function y(){const Q=this.resume(),re=this.stack[this.stack.length-1];re.lang=Q}function k(){const Q=this.resume(),re=this.stack[this.stack.length-1];re.meta=Q}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function R(){const Q=this.resume(),re=this.stack[this.stack.length-1];re.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function T(){const Q=this.resume(),re=this.stack[this.stack.length-1];re.value=Q.replace(/(\r?\n|\r)$/g,"")}function E(Q){const re=this.resume(),we=this.stack[this.stack.length-1];we.label=re,we.identifier=Ai(this.sliceSerialize(Q)).toLowerCase()}function C(){const Q=this.resume(),re=this.stack[this.stack.length-1];re.title=Q}function _(){const Q=this.resume(),re=this.stack[this.stack.length-1];re.url=Q}function D(Q){const re=this.stack[this.stack.length-1];if(!re.depth){const we=this.sliceSerialize(Q).length;re.depth=we}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function M(Q){const re=this.stack[this.stack.length-1];re.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function B(){this.data.setextHeadingSlurpLineEnding=void 0}function P(Q){const we=this.stack[this.stack.length-1].children;let Pe=we[we.length-1];(!Pe||Pe.type!=="text")&&(Pe=ee(),Pe.position={start:fo(Q.start),end:void 0},we.push(Pe)),this.stack.push(Pe)}function N(Q){const re=this.stack.pop();re.value+=this.sliceSerialize(Q),re.position.end=fo(Q.end)}function W(Q){const re=this.stack[this.stack.length-1];if(this.data.atHardBreak){const we=re.children[re.children.length-1];we.position.end=fo(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(re.type)&&(P.call(this,Q),N.call(this,Q))}function $(){this.data.atHardBreak=!0}function F(){const Q=this.resume(),re=this.stack[this.stack.length-1];re.value=Q}function z(){const Q=this.resume(),re=this.stack[this.stack.length-1];re.value=Q}function U(){const Q=this.resume(),re=this.stack[this.stack.length-1];re.value=Q}function H(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=re,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function K(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=re,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function q(Q){const re=this.sliceSerialize(Q),we=this.stack[this.stack.length-2];we.label=sZ(re),we.identifier=Ai(re).toLowerCase()}function Y(){const Q=this.stack[this.stack.length-1],re=this.resume(),we=this.stack[this.stack.length-1];if(this.data.inReference=!0,we.type==="link"){const Pe=Q.children;we.children=Pe}else we.alt=re}function O(){const Q=this.resume(),re=this.stack[this.stack.length-1];re.url=Q}function j(){const Q=this.resume(),re=this.stack[this.stack.length-1];re.title=Q}function V(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function X(Q){const re=this.resume(),we=this.stack[this.stack.length-1];we.label=re,we.identifier=Ai(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function se(Q){this.data.characterReferenceType=Q.type}function ne(Q){const re=this.sliceSerialize(Q),we=this.data.characterReferenceType;let Pe;we?(Pe=WM(re,we==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Pe=k0(re);const Ye=this.stack[this.stack.length-1];Ye.value+=Pe}function oe(Q){const re=this.stack.pop();re.position.end=fo(Q.end)}function le(Q){N.call(this,Q);const re=this.stack[this.stack.length-1];re.url=this.sliceSerialize(Q)}function ce(Q){N.call(this,Q);const re=this.stack[this.stack.length-1];re.url="mailto:"+this.sliceSerialize(Q)}function Ee(){return{type:"blockquote",children:[]}}function be(){return{type:"code",lang:null,meta:null,value:""}}function ue(){return{type:"inlineCode",value:""}}function ge(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Se(){return{type:"emphasis",children:[]}}function Ae(){return{type:"heading",depth:0,children:[]}}function ke(){return{type:"break"}}function xe(){return{type:"html",value:""}}function Re(){return{type:"image",title:null,url:"",alt:null}}function Me(){return{type:"link",title:null,url:"",children:[]}}function ze(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function Fe(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function ye(){return{type:"paragraph",children:[]}}function _e(){return{type:"strong",children:[]}}function ee(){return{type:"text",value:""}}function fe(){return{type:"thematicBreak"}}}function fo(e){return{line:e.line,column:e.column,offset:e.offset}}function iD(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?iD(e,r):uZ(e,r)}}function uZ(e,t){let n;for(n in t)if(rD.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 GR(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+xc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+xc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+xc({start:t.start,end:t.end})+") is still open")}function cZ(e){const t=this;t.parser=n;function n(r){return aZ(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function fZ(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 dZ(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
30
|
-
`}]}function pZ(e,t){const n=t.value?t.value+`
|
|
31
|
-
`:"",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 hZ(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mZ(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gZ(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Kl(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 f={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,f);const d={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,d),e.applyData(t,d)}function bZ(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 yZ(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function sD(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 vZ(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return sD(e,t);const s={src:Kl(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 xZ(e,t){const n={src:Kl(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 kZ(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 SZ(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return sD(e,t);const s={href:Kl(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 wZ(e,t){const n={href:Kl(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 EZ(e,t,n){const r=e.all(t),s=n?TZ(n):oD(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:`
|
|
32
|
-
`}),h.type==="element"&&h.tagName==="p"&&!s?l.push(...h.children):l.push(h)}const f=r[r.length-1];f&&(s||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
|
|
33
|
-
`});const d={type:"element",tagName:"li",properties:a,children:l};return e.patch(t,d),e.applyData(t,d)}function TZ(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=oD(n[r])}return t}function oD(e){const t=e.spread;return t??e.children.length>1}function RZ(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 CZ(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _Z(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function AZ(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function NZ(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=g0(t.children[1]),f=$M(t.children[t.children.length-1]);c&&f&&(l.position={start:c,end:f}),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 OZ(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 f=-1;const d=[];for(;++f<c;){const m=t.children[f],b={},y=l?l[f]: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)),d.push(k)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,h),e.applyData(t,h)}function IZ(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const WR=9,KR=32;function MZ(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(YR(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(YR(t.slice(s),s>0,!1)),a.join("")}function YR(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===WR||a===KR;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===WR||a===KR;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function DZ(e,t){const n={type:"text",value:MZ(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function LZ(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const jZ={blockquote:fZ,break:dZ,code:pZ,delete:hZ,emphasis:mZ,footnoteReference:gZ,heading:bZ,html:yZ,imageReference:vZ,image:xZ,inlineCode:kZ,linkReference:SZ,link:wZ,listItem:EZ,list:RZ,paragraph:CZ,root:_Z,strong:AZ,table:NZ,tableCell:IZ,tableRow:OZ,text:DZ,thematicBreak:LZ,toml:tp,yaml:tp,definition:tp,footnoteDefinition:tp};function tp(){}const aD=-1,sm=0,Sc=1,lh=2,w0=3,E0=4,T0=5,R0=6,lD=7,uD=8,XR=typeof self=="object"?self:globalThis,zZ=(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 sm:case aD:return n(l,s);case Sc:{const c=n([],s);for(const f of l)c.push(r(f));return c}case lh:{const c=n({},s);for(const[f,d]of l)c[r(f)]=r(d);return c}case w0:return n(new Date(l),s);case E0:{const{source:c,flags:f}=l;return n(new RegExp(c,f),s)}case T0:{const c=n(new Map,s);for(const[f,d]of l)c.set(r(f),r(d));return c}case R0:{const c=n(new Set,s);for(const f of l)c.add(r(f));return c}case lD:{const{name:c,message:f}=l;return n(new XR[c](f),s)}case uD: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 XR[a](l),s)};return r},ZR=e=>zZ(new Map,e)(0),cl="",{toString:PZ}={},{keys:$Z}=Object,ec=e=>{const t=typeof e;if(t!=="object"||!e)return[sm,t];const n=PZ.call(e).slice(8,-1);switch(n){case"Array":return[Sc,cl];case"Object":return[lh,cl];case"Date":return[w0,cl];case"RegExp":return[E0,cl];case"Map":return[T0,cl];case"Set":return[R0,cl];case"DataView":return[Sc,n]}return n.includes("Array")?[Sc,n]:n.includes("Error")?[lD,n]:[lh,n]},np=([e,t])=>e===sm&&(t==="function"||t==="symbol"),BZ=(e,t,n,r)=>{const s=(l,c)=>{const f=r.push(l)-1;return n.set(c,f),f},a=l=>{if(n.has(l))return n.get(l);let[c,f]=ec(l);switch(c){case sm:{let h=l;switch(f){case"bigint":c=uD,h=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);h=null;break;case"undefined":return s([aD],l)}return s([c,h],l)}case Sc:{if(f){let b=l;return f==="DataView"?b=new Uint8Array(l.buffer):f==="ArrayBuffer"&&(b=new Uint8Array(l)),s([f,[...b]],l)}const h=[],m=s([c,h],l);for(const b of l)h.push(a(b));return m}case lh:{if(f)switch(f){case"BigInt":return s([f,l.toString()],l);case"Boolean":case"Number":case"String":return s([f,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const h=[],m=s([c,h],l);for(const b of $Z(l))(e||!np(ec(l[b])))&&h.push([a(b),a(l[b])]);return m}case w0:return s([c,l.toISOString()],l);case E0:{const{source:h,flags:m}=l;return s([c,{source:h,flags:m}],l)}case T0:{const h=[],m=s([c,h],l);for(const[b,y]of l)(e||!(np(ec(b))||np(ec(y))))&&h.push([a(b),a(y)]);return m}case R0:{const h=[],m=s([c,h],l);for(const b of l)(e||!np(ec(b)))&&h.push(a(b));return m}}const{message:d}=l;return s([c,{name:f,message:d}],l)};return a},QR=(e,{json:t,lossy:n}={})=>{const r=[];return BZ(!(t||n),!!t,new Map,r)(e),r},uh=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ZR(QR(e,t)):structuredClone(e):(e,t)=>ZR(QR(e,t));function FZ(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 UZ(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function qZ(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||FZ,r=e.options.footnoteBackLabel||UZ,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let f=-1;for(;++f<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[f]);if(!d)continue;const h=e.all(d),m=String(d.identifier).toUpperCase(),b=Kl(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(f,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(f,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(d,T),c.push(T)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...uh(l),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
34
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
35
|
-
`}]}}const df=(function(e){if(e==null)return WZ;if(typeof e=="function")return om(e);if(typeof e=="object")return Array.isArray(e)?HZ(e):VZ(e);if(typeof e=="string")return GZ(e);throw new Error("Expected function, string, or object as test")});function HZ(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=df(e[n]);return om(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function VZ(e){const t=e;return om(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function GZ(e){return om(t);function t(n){return n&&n.type===e}}function om(e){return t;function t(n,r,s){return!!(KZ(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function WZ(){return!0}function KZ(e){return e!==null&&typeof e=="object"&&"type"in e}const cD=[],YZ=!0,Tv=!1,XZ="skip";function fD(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=df(s),l=r?-1:1;c(e,void 0,[])();function c(f,d,h){const m=f&&typeof f=="object"?f:{};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 ("+(f.type+(y?"<"+y+">":""))+")"})}return b;function b(){let y=cD,k,S,R;if((!t||a(f,d,h[h.length-1]||void 0))&&(y=ZZ(n(f,h)),y[0]===Tv))return y;if("children"in f&&f.children){const T=f;if(T.children&&y[0]!==XZ)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]===Tv)return k;S=typeof k[1]=="number"?k[1]:S+l}}return y}}}function ZZ(e){return Array.isArray(e)?e:typeof e=="number"?[YZ,e]:e==null?cD:[e]}function am(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),fD(e,a,c,s);function c(f,d){const h=d[d.length-1],m=h?h.children.indexOf(f):void 0;return l(f,m,h)}}const Rv={}.hasOwnProperty,QZ={};function JZ(e,t){const n=t||QZ,r=new Map,s=new Map,a=new Map,l={...jZ,...n.handlers},c={all:d,applyData:tQ,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:l,one:f,options:n,patch:eQ,wrap:rQ};return am(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 f(h,m){const b=h.type,y=c.handlers[b];if(Rv.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=uh(R);return T.children=c.all(h),T}return uh(h)}return(c.options.unknownHandler||nQ)(c,h,m)}function d(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=JR(k.value)),!Array.isArray(k)&&k.type==="element")){const S=k.children[0];S&&S.type==="text"&&(S.value=JR(S.value))}Array.isArray(k)?m.push(...k):m.push(k)}}}return m}}function eQ(e,t){e.position&&(t.position=UK(e))}function tQ(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,uh(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function nQ(e,t){const n=t.data||{},r="value"in t&&!(Rv.call(n,"hProperties")||Rv.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 rQ(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
36
|
-
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
37
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
38
|
-
`}),n}function JR(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function eC(e,t){const n=JZ(e,t),r=n.one(e,void 0),s=qZ(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
|
|
39
|
-
`},s),a}function iQ(e,t){return e&&"run"in e?async function(n,r){const s=eC(n,{file:r,...t});await e.run(s,r)}:function(n,r){return eC(n,{file:r,...e||t})}}function tC(e){if(e)throw e}var cy,nC;function sQ(){if(nC)return cy;nC=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(d){return typeof Array.isArray=="function"?Array.isArray(d):t.call(d)==="[object Array]"},a=function(d){if(!d||t.call(d)!=="[object Object]")return!1;var h=e.call(d,"constructor"),m=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!h&&!m)return!1;var b;for(b in d);return typeof b>"u"||e.call(d,b)},l=function(d,h){n&&h.name==="__proto__"?n(d,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):d[h.name]=h.newValue},c=function(d,h){if(h==="__proto__")if(e.call(d,h)){if(r)return r(d,h).value}else return;return d[h]};return cy=function f(){var d,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(d=arguments[R],d!=null)for(h in d)m=c(S,h),b=c(d,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:f(E,k,b)})):typeof b<"u"&&l(S,{name:h,newValue:b}));return S},cy}var oQ=sQ();const fy=Vc(oQ);function Cv(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 aQ(){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(f,...d){const h=e[++a];let m=-1;if(f){l(f);return}for(;++m<s.length;)(d[m]===null||d[m]===void 0)&&(d[m]=s[m]);s=d,h?lQ(h,c)(...d):l(null,...d)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function lQ(e,t){let n;return r;function r(...l){const c=e.length>l.length;let f;c&&l.push(s);try{f=e.apply(this,l)}catch(d){const h=d;if(c&&n)throw h;return s(h)}c||(f&&f.then&&typeof f.then=="function"?f.then(a,s):f instanceof Error?s(f):a(f))}function s(l,...c){n||(n=!0,t(l,...c))}function a(l){s(null,l)}}const Fi={basename:uQ,dirname:cQ,extname:fQ,join:dQ,sep:"/"};function uQ(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');pf(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 cQ(e){if(pf(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 fQ(e){pf(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 dQ(...e){let t=-1,n;for(;++t<e.length;)pf(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":pQ(n)}function pQ(e){pf(e);const t=e.codePointAt(0)===47;let n=hQ(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function hQ(e,t){let n="",r=0,s=-1,a=0,l=-1,c,f;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(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",r=0):(n=n.slice(0,f),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 pf(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const mQ={cwd:gQ};function gQ(){return"/"}function _v(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function bQ(e){if(typeof e=="string")e=new URL(e);else if(!_v(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 yQ(e)}function yQ(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 dy=["history","path","basename","stem","extname","dirname"];class dD{constructor(t){let n;t?_v(t)?n={path:t}:typeof t=="string"||vQ(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":mQ.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<dy.length;){const a=dy[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)dy.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Fi.basename(this.path):void 0}set basename(t){hy(t,"basename"),py(t,"basename"),this.path=Fi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Fi.dirname(this.path):void 0}set dirname(t){rC(this.basename,"dirname"),this.path=Fi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Fi.extname(this.path):void 0}set extname(t){if(py(t,"extname"),rC(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=Fi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){_v(t)&&(t=bQ(t)),hy(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Fi.basename(this.path,this.extname):void 0}set stem(t){hy(t,"stem"),py(t,"stem"),this.path=Fi.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 yr(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 py(e,t){if(e&&e.includes(Fi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Fi.sep+"`")}function hy(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function rC(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function vQ(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const xQ=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),kQ={}.hasOwnProperty;class C0 extends xQ{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=aQ()}copy(){const t=new C0;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(fy(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(by("data",this.frozen),this.namespace[t]=n,this):kQ.call(this.namespace,t)&&this.namespace[t]||void 0:t?(by("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=rp(t),r=this.parser||this.Parser;return my("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),my("process",this.parser||this.Parser),gy("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,l){const c=rp(t),f=r.parse(c);r.run(f,c,function(h,m,b){if(h||!m||!b)return d(h);const y=m,k=r.stringify(y,b);EQ(k)?b.value=k:b.result=k,d(h,b)});function d(h,m){h||!m?l(h):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),my("processSync",this.parser||this.Parser),gy("processSync",this.compiler||this.Compiler),this.process(t,s),sC("processSync","process",n),r;function s(a,l){n=!0,tC(a),r=l}}run(t,n,r){iC(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 f=rp(n);s.run(t,f,d);function d(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),sC("runSync","run",r),s;function a(l,c){tC(l),s=c,r=!0}}stringify(t,n){this.freeze();const r=rp(n),s=this.compiler||this.Compiler;return gy("stringify",s),iC(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(by("use",this.frozen),t!=null)if(typeof t=="function")f(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(d){if(typeof d=="function")f(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[h,...m]=d;f(h,m)}else l(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function l(d){if(!("plugins"in d)&&!("settings"in d))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(d.plugins),d.settings&&(s.settings=fy(!0,s.settings,d.settings))}function c(d){let h=-1;if(d!=null)if(Array.isArray(d))for(;++h<d.length;){const m=d[h];a(m)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function f(d,h){let m=-1,b=-1;for(;++m<r.length;)if(r[m][0]===d){b=m;break}if(b===-1)r.push([d,...h]);else if(h.length>0){let[y,...k]=h;const S=r[b][1];Cv(S)&&Cv(y)&&(y=fy(!0,S,y)),r[b]=[d,y,...k]}}}}const SQ=new C0().freeze();function my(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function gy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function by(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 iC(e){if(!Cv(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function sC(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function rp(e){return wQ(e)?e:new dD(e)}function wQ(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function EQ(e){return typeof e=="string"||TQ(e)}function TQ(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const RQ="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",oC=[],aC={allowDangerousHtml:!0},CQ=/^(https?|ircs?|mailto|xmpp)$/i,_Q=[{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 AQ(e){const t=NQ(e),n=OQ(e);return IQ(t.runSync(t.parse(n),n),e)}function NQ(e){const t=e.rehypePlugins||oC,n=e.remarkPlugins||oC,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...aC}:aC;return SQ().use(cZ).use(n).use(iQ,r).use(t)}function OQ(e){const t=e.children||"",n=new dD;return typeof t=="string"&&(n.value=t),n}function IQ(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||MQ;for(const h of _Q)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+RQ+h.id,void 0);return am(e,d),WK(e,{Fragment:g.Fragment,components:s,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function d(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 ay)if(Object.hasOwn(ay,y)&&Object.hasOwn(h.properties,y)){const k=h.properties[y],S=ay[y];(S===null||S.includes(h.tagName))&&(h.properties[y]=f(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 MQ(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||CQ.test(e.slice(0,t))?e:""}const lC=(function(e,t,n){const r=df(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]}),wa=(function(e){if(e==null)return jQ;if(typeof e=="string")return LQ(e);if(typeof e=="object")return DQ(e);if(typeof e=="function")return _0(e);throw new Error("Expected function, string, or array as `test`")});function DQ(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=wa(e[n]);return _0(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function LQ(e){return _0(t);function t(n){return n.tagName===e}}function _0(e){return t;function t(n,r,s){return!!(zQ(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function jQ(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function zQ(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const uC=/\n/g,cC=/[\t ]+/g,Av=wa("br"),fC=wa(VQ),PQ=wa("p"),dC=wa("tr"),$Q=wa(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",HQ,GQ]),pD=wa(["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 BQ(e,t){const n=t||{},r="children"in e?e.children:[],s=pD(e),a=gD(e,{whitespace:n.whitespace||"normal"}),l=[];(e.type==="text"||e.type==="comment")&&l.push(...mD(e,{breakBefore:!0,breakAfter:!0}));let c=-1;for(;++c<r.length;)l.push(...hD(r[c],e,{whitespace:a,breakBefore:c?void 0:s,breakAfter:c<r.length-1?Av(r[c+1]):s}));const f=[];let d;for(c=-1;++c<l.length;){const h=l[c];typeof h=="number"?d!==void 0&&h>d&&(d=h):h&&(d!==void 0&&d>-1&&f.push(`
|
|
40
|
-
`.repeat(d)||" "),d=-1,f.push(h))}return f.join("")}function hD(e,t,n){return e.type==="element"?FQ(e,t,n):e.type==="text"?n.whitespace==="normal"?mD(e,n):UQ(e):[]}function FQ(e,t,n){const r=gD(e,n),s=e.children||[];let a=-1,l=[];if($Q(e))return l;let c,f;for(Av(e)||dC(e)&&lC(t,e,dC)?f=`
|
|
41
|
-
`:PQ(e)?(c=2,f=2):pD(e)&&(c=1,f=1);++a<s.length;)l=l.concat(hD(s[a],e,{whitespace:r,breakBefore:a?void 0:c,breakAfter:a<s.length-1?Av(s[a+1]):f}));return fC(e)&&lC(t,e,fC)&&l.push(" "),c&&l.unshift(c),f&&l.push(f),l}function mD(e,t){const n=String(e.value),r=[],s=[];let a=0;for(;a<=n.length;){uC.lastIndex=a;const f=uC.exec(n),d=f&&"index"in f?f.index:n.length;r.push(qQ(n.slice(a,d).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),a===0?t.breakBefore:!0,d===n.length?t.breakAfter:!0)),a=d+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 UQ(e){return[String(e.value)]}function qQ(e,t,n){const r=[];let s=0,a;for(;s<e.length;){cC.lastIndex=s;const l=cC.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 gD(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 HQ(e){return!!(e.properties||{}).hidden}function VQ(e){return e.tagName==="td"||e.tagName==="th"}function GQ(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function WQ(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"},d={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(d,{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*\(/))},A=[D,m,c,n,e.C_BLOCK_COMMENT_MODE,h,d],M={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:A.concat([{begin:/\(/,end:/\)/,keywords:_,contains:A.concat(["self"]),relevance:0}]),relevance:0},B={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:[d,h]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,d,h,c,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,d,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(M,B,D,A,[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 KQ(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=WQ(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 YQ(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 f={match:/\\"/},d={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,f,d,h,n]}}function XQ(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/}]},d={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(d,{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,d],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,d,h,c,{begin:/\(/,end:/\)/,keywords:R,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,d,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:d,keywords:R}}}function ZQ(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"},d={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(d,{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*\(/))},A=[D,m,c,n,e.C_BLOCK_COMMENT_MODE,h,d],M={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:A.concat([{begin:/\(/,end:/\)/,keywords:_,contains:A.concat(["self"]),relevance:0}]),relevance:0},B={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:[d,h]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,d,h,c,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,d,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(M,B,D,A,[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 QQ(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)*"}),f={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},d={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,f,e.C_BLOCK_COMMENT_MODE],y.contains=[R,k,m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const T={variants:[d,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,f,{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,f,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},_]}}const JQ=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_-]*/}}),eJ=["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"],tJ=["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"],nJ=[...eJ,...tJ],rJ=["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(),iJ=["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(),sJ=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),oJ=["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 aJ(e){const t=e.regex,n=JQ(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:":("+iJ.join("|")+")"},{begin:":(:)?("+sJ.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+oJ.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:rJ.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...c,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+nJ.join("|")+")\\b"}]}}function lJ(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 uJ(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 cJ(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 fJ(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},f=/[A-Za-z0-9_-]+/,d=/"(\\"|[^"])*"/,h=/'[^']*'/,m=t.either(f,d,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 pl="[0-9](_*[0-9])*",ip=`\\.(${pl})`,sp="[0-9a-fA-F](_*[0-9a-fA-F])*",pC={className:"number",variants:[{begin:`(\\b(${pl})((${ip})|\\.)?|(${ip}))[eE][+-]?(${pl})[fFdD]?\\b`},{begin:`\\b(${pl})((${ip})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ip})[fFdD]?\\b`},{begin:`\\b(${pl})[fFdD]\\b`},{begin:`\\b0[xX]((${sp})\\.?|(${sp})?\\.(${sp}))[pP][+-]?(${pl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${sp})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function bD(e,t,n){return n===-1?"":e.replace(t,r=>bD(e,t,n-1))}function dJ(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+bD("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),f={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"]},d={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},h={className:"params",begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:f,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:f,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,pC,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},pC,d]}}const hC="[A-Za-z$_][0-9A-Za-z$_]*",pJ=["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"],hJ=["true","false","null","undefined","NaN","Infinity"],yD=["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"],vD=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],xD=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],mJ=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],gJ=[].concat(xD,yD,vD);function bJ(e){const t=e.regex,n=(q,{after:Y})=>{const O="</"+q[0].slice(1);return q.input.indexOf(O,Y)!==-1},r=hC,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(q,Y)=>{const O=q[0].length+q.index,j=q.input[O];if(j==="<"||j===","){Y.ignoreMatch();return}j===">"&&(n(q,{after:O})||Y.ignoreMatch());let V;const L=q.input.substring(O);if(V=L.match(/^\s*=/)){Y.ignoreMatch();return}if((V=L.match(/^\s+extends\s+/))&&V.index===0){Y.ignoreMatch();return}}},c={$pattern:hC,keyword:pJ,literal:hJ,built_in:gJ,"variable.language":mJ},f="[0-9](_?[0-9])*",d=`\\.(${f})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${h})((${d})|\\.)?|(${d}))[eE][+-]?(${f})\\b`},{begin:`\\b(${h})\\b((${d})\\b|\\.)?|(${d})\\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(_)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:D},M={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"}}]},B={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:{_:[...yD,...vD]}},P={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},N={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},W={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function $(q){return t.concat("(?!",q.join("|"),")")}const F={match:t.concat(/\b/,$([...xD,"super","import"].map(q=>`${q}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},z={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},U={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},H="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",K={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(H)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:B},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),P,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,S,R,E,{match:/\$\d+/},m,B,{scope:"attr",match:r+t.lookahead(":"),relevance:0},K,{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:H,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"]}]}]},N,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},z,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},F,W,M,U,{match:/\$[(.]/}]}}function yJ(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 hl="[0-9](_*[0-9])*",op=`\\.(${hl})`,ap="[0-9a-fA-F](_*[0-9a-fA-F])*",vJ={className:"number",variants:[{begin:`(\\b(${hl})((${op})|\\.)?|(${op}))[eE][+-]?(${hl})[fFdD]?\\b`},{begin:`\\b(${hl})((${op})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${op})[fFdD]?\\b`},{begin:`\\b(${hl})[fFdD]\\b`},{begin:`\\b0[xX]((${ap})\\.?|(${ap})?\\.(${ap}))[pP][+-]?(${hl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${ap})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function xJ(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+")?"},f={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(l,{className:"string"}),"self"]}]},d=vJ,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,f,{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,f,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,f]},l,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
42
|
-
`},d]}}const kJ=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_-]*/}}),SJ=["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"],wJ=["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"],EJ=[...SJ,...wJ],TJ=["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(),kD=["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(),SD=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),RJ=["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(),CJ=kD.concat(SD).sort().reverse();function _J(e){const t=kJ(e),n=CJ,r="and or not only",s="[\\w-]+",a="("+s+"|@\\{"+s+"\\})",l=[],c=[],f=function(C){return{className:"string",begin:"~?"+C+".*?"+C}},d=function(C,_,D){return{className:C,begin:_,relevance:D}},h={$pattern:/[a-z-]+/,keyword:r,attribute:TJ.join(" ")},m={begin:"\\(",end:"\\)",contains:c,keywords:h,relevance:0};c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f("'"),f('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,m,d("variable","@@?"+s,10),d("variable","@\\{"+s+"\\}"),d("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("+RJ.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,d("keyword","all\\b"),d("variable","@\\{"+s+"\\}"),{begin:"\\b("+EJ.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,d("selector-tag",a,0),d("selector-id","#"+a),d("selector-class","\\."+a,0),d("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+kD.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+SD.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 AJ(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 NJ(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 OJ(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+.-]*/,f={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}]},d={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(d,{contains:[]}),b=e.inherit(h,{contains:[]});d.contains.push(b),h.contains.push(m);let y=[n,f];return[d,h,m,b].forEach(T=>{T.contains=T.contains.concat(y)}),y=y.concat(d,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,d,h,{className:"quote",begin:"^>\\s+",contains:y,end:"$"},s,r,f,l,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function IJ(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"]},f={$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:"("+f.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:f,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function MJ(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*\(.*?\))?/},f={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]},d={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,f],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=[f,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}]},d,{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,d]},{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 DJ(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:/\?>/}]},f={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},d=e.inherit(e.APOS_STRING_MODE,{illegal:null}),h=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(f)}),m={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(f),"on:begin":(z,U)=>{U.data._beginMatch=z[1]||z[2]},"on:end":(z,U)=>{U.data._beginMatch!==z[1]&&U.ignoreMatch()}},b=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),y=`[
|
|
43
|
-
]`,k={scope:"string",variants:[h,d,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:(z=>{const U=[];return z.forEach(H=>{U.push(H),H.toLowerCase()===H?U.push(H.toUpperCase()):U.push(H.toLowerCase())}),U})(R),built_in:E},D=z=>z.map(U=>U.replace(/\|\d+$/,"")),A={variants:[{match:[/new/,t.concat(y,"+"),t.concat("(?!",D(E).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},M=t.concat(r,"\\b(?!\\()"),B={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),M],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),M],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"}}]},P={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},N={relevance:0,begin:/\(/,end:/\)/,keywords:_,contains:[P,l,B,e.C_BLOCK_COMMENT_MODE,k,S,A]},W={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:[N]};N.contains.push(W);const $=[P,B,e.C_BLOCK_COMMENT_MODE,k,S,A],F={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",...$]},...$,{scope:"meta",variants:[{match:s},{match:a}]}]};return{case_insensitive:!1,keywords:_,contains:[F,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,W,B,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},A,{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",F,l,B,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 LJ(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 jJ(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function zJ(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"]},f={className:"meta",begin:/^(>>>|\.\.\.) /},d={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,f],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,f],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,f,h,d]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,f,h,d]},{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,d]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,h,d]},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",f,S,m,e.HASH_COMMENT_MODE]}]};return d.contains=[m,S,f],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:c,illegal:/(<\/|\?)|=>/,contains:[f,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 PJ(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function $J(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 BJ(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]+"},f={begin:"#<",end:">"},d=[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}]},A=[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(f,d),relevance:0}].concat(f,d);h.contains=A,S.contains=A;const N=[{begin:/^\s*=>/,starts:{end:"$",contains:A}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:l,contains:A}}];return d.unshift(f),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:l,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(N).concat(d).concat(A)}}function FJ(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"],f=["true","false","Some","None","Ok","Err"],d=["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:f,built_in:d},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:d,type:h}},{className:"punctuation",begin:"->"},a]}}const UJ=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_-]*/}}),qJ=["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"],HJ=["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"],VJ=[...qJ,...HJ],GJ=["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(),WJ=["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(),KJ=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),YJ=["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 XJ(e){const t=UJ(e),n=KJ,r=WJ,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("+VJ.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("+YJ.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:GJ.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 ZJ(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function QJ(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"],f=["add","asc","collation","desc","final","first","last","view"],d=["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=[...d,...f].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(A=>A.replace(/\s+/,"\\s+"))),/\b/)}const C={scope:"keyword",match:E(b),relevance:0};function _(D,{exceptions:A,when:M}={}){const B=M;return A=A||[],D.map(P=>P.match(/\|\d+$/)||A.includes(P)?P:B(P)?`${P}|0`:P)}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 wD(e){return e?typeof e=="string"?e:e.source:null}function tc(e){return hn("(?=",e,")")}function hn(...e){return e.map(n=>wD(n)).join("")}function JJ(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function kr(...e){return"("+(JJ(e).capture?"":"?:")+e.map(r=>wD(r)).join("|")+")"}const A0=e=>hn(/\b/,e,/\w$/.test(e)?/\b/:/\B/),eee=["Protocol","Type"].map(A0),mC=["init","self"].map(A0),tee=["Any","Self"],yy=["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"],gC=["false","nil","true"],nee=["assignment","associativity","higherThan","left","lowerThan","none","right"],ree=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],bC=["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"],ED=kr(/[/=\-+!*%<>&|^~?]/,/[\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]/),TD=kr(ED,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),vy=hn(ED,TD,"*"),RD=kr(/[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]/),ch=kr(RD,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Bi=hn(RD,ch,"*"),lp=hn(/[A-Z]/,ch,"*"),iee=["attached","autoclosure",hn(/convention\(/,kr("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",hn(/objc\(/,Bi,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],see=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function oee(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],s={match:[/\./,kr(...eee,...mC)],className:{2:"keyword"}},a={match:hn(/\./,kr(...yy)),relevance:0},l=yy.filter(ke=>typeof ke=="string").concat(["_|0"]),c=yy.filter(ke=>typeof ke!="string").concat(tee).map(A0),f={variants:[{className:"keyword",match:kr(...c,...mC)}]},d={$pattern:kr(/\b\w+/,/#\w+/),keyword:l.concat(ree),literal:gC},h=[s,a,f],m={match:hn(/\./,kr(...bC)),relevance:0},b={className:"built_in",match:hn(/\b/,kr(...bC),/(?=\()/)},y=[m,b],k={match:/->/,relevance:0},S={className:"operator",relevance:0,variants:[{match:vy},{match:`\\.(\\.|${TD})+`}]},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/}]},_=(ke="")=>({className:"subst",variants:[{match:hn(/\\/,ke,/[0\\tnr"']/)},{match:hn(/\\/,ke,/u\{[0-9a-fA-F]{1,8}\}/)}]}),D=(ke="")=>({className:"subst",match:hn(/\\/,ke,/[\t ]*(?:[\r\n]|\r\n)/)}),A=(ke="")=>({className:"subst",label:"interpol",begin:hn(/\\/,ke,/\(/),end:/\)/}),M=(ke="")=>({begin:hn(ke,/"""/),end:hn(/"""/,ke),contains:[_(ke),D(ke),A(ke)]}),B=(ke="")=>({begin:hn(ke,/"/),end:hn(/"/,ke),contains:[_(ke),A(ke)]}),P={className:"string",variants:[M(),M("#"),M("##"),M("###"),B(),B("#"),B("##"),B("###")]},N=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],W={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:N},$=ke=>{const xe=hn(ke,/\//),Re=hn(/\//,ke);return{begin:xe,end:Re,contains:[...N,{scope:"comment",begin:`#(?!.*${Re})`,end:/$/}]}},F={scope:"regexp",variants:[$("###"),$("##"),$("#"),W]},z={match:hn(/`/,Bi,/`/)},U={className:"variable",match:/\$\d+/},H={className:"variable",match:`\\$${ch}+`},K=[z,U,H],q={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:see,contains:[...R,C,P]}]}},Y={scope:"keyword",match:hn(/@/,kr(...iee),tc(kr(/\(/,/\s+/)))},O={scope:"meta",match:hn(/@/,Bi)},j=[q,Y,O],V={match:tc(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:hn(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,ch,"+")},{className:"type",match:lp,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:hn(/\s+&\s+/,tc(lp)),relevance:0}]},L={begin:/</,end:/>/,keywords:d,contains:[...r,...h,...j,k,V]};V.contains.push(L);const X={match:hn(Bi,/\s*:/),keywords:"_|0",relevance:0},se={begin:/\(/,end:/\)/,relevance:0,keywords:d,contains:["self",X,...r,F,...h,...y,...R,C,P,...K,...j,V]},ne={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,V]},oe={begin:kr(tc(hn(Bi,/\s*:/)),tc(hn(Bi,/\s+/,Bi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Bi}]},le={begin:/\(/,end:/\)/,keywords:d,contains:[oe,...r,...h,...R,C,P,...j,V,se],endsParent:!0,illegal:/["']/},ce={match:[/(func|macro)/,/\s+/,kr(z.match,Bi,vy)],className:{1:"keyword",3:"title.function"},contains:[ne,le,t],illegal:[/\[/,/%/]},Ee={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ne,le,t],illegal:/\[|%/},be={match:[/operator/,/\s+/,vy],className:{1:"keyword",3:"title"}},ue={begin:[/precedencegroup/,/\s+/,lp],className:{1:"keyword",3:"title"},contains:[V],keywords:[...nee,...gC],end:/}/},ge={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"}},Ae={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Bi,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:d,contains:[ne,...h,{begin:/:/,end:/\{/,keywords:d,contains:[{scope:"title.class.inherited",match:lp},...h],relevance:0}]};for(const ke of P.variants){const xe=ke.contains.find(Me=>Me.label==="interpol");xe.keywords=d;const Re=[...h,...y,...R,C,P,...K];xe.contains=[...Re,{begin:/\(/,end:/\)/,contains:["self",...Re]}]}return{name:"Swift",keywords:d,contains:[...r,ce,Ee,ge,Se,Ae,be,ue,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},F,...h,...y,...R,C,P,...K,...j,V,se]}}const fh="[A-Za-z$_][0-9A-Za-z$_]*",CD=["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"],_D=["true","false","null","undefined","NaN","Infinity"],AD=["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"],ND=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],OD=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],ID=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],MD=[].concat(OD,AD,ND);function aee(e){const t=e.regex,n=(q,{after:Y})=>{const O="</"+q[0].slice(1);return q.input.indexOf(O,Y)!==-1},r=fh,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(q,Y)=>{const O=q[0].length+q.index,j=q.input[O];if(j==="<"||j===","){Y.ignoreMatch();return}j===">"&&(n(q,{after:O})||Y.ignoreMatch());let V;const L=q.input.substring(O);if(V=L.match(/^\s*=/)){Y.ignoreMatch();return}if((V=L.match(/^\s+extends\s+/))&&V.index===0){Y.ignoreMatch();return}}},c={$pattern:fh,keyword:CD,literal:_D,built_in:MD,"variable.language":ID},f="[0-9](_?[0-9])*",d=`\\.(${f})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${h})((${d})|\\.)?|(${d}))[eE][+-]?(${f})\\b`},{begin:`\\b(${h})\\b((${d})\\b|\\.)?|(${d})\\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(_)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:D},M={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"}}]},B={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:{_:[...AD,...ND]}},P={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},N={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},W={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function $(q){return t.concat("(?!",q.join("|"),")")}const F={match:t.concat(/\b/,$([...OD,"super","import"].map(q=>`${q}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},z={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},U={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},H="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",K={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(H)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:B},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),P,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,S,R,E,{match:/\$\d+/},m,B,{scope:"attr",match:r+t.lookahead(":"),relevance:0},K,{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:H,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"]}]}]},N,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},z,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},F,W,M,U,{match:/\$[(.]/}]}}function lee(e){const t=e.regex,n=aee(e),r=fh,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['"]/},f=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],d={$pattern:fh,keyword:CD.concat(f),literal:_D,built_in:MD.concat(s),"variable.language":ID},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,d),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 uee(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}/,f={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),/ *#/)}]},d={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,f,d,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 cee(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/},f={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},d={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,f,d,c]}}function fee(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"}),f=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),d={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,f,c,l,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,l,f,c]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[f]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[d],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[d],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:d}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function dee(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 pee={arduino:KQ,bash:YQ,c:XQ,cpp:ZQ,csharp:QQ,css:aJ,diff:lJ,go:uJ,graphql:cJ,ini:fJ,java:dJ,javascript:bJ,json:yJ,kotlin:xJ,less:_J,lua:AJ,makefile:NJ,markdown:OJ,objectivec:IJ,perl:MJ,php:DJ,"php-template":LJ,plaintext:jJ,python:zJ,"python-repl":PJ,r:$J,ruby:BJ,rust:FJ,scss:XJ,shell:ZJ,sql:QJ,swift:oee,typescript:lee,vbnet:uee,wasm:cee,xml:fee,yaml:dee};var xy,yC;function hee(){if(yC)return xy;yC=1;function e(Z){return Z instanceof Map?Z.clear=Z.delete=Z.set=function(){throw new Error("map is read-only")}:Z instanceof Set&&(Z.add=Z.clear=Z.delete=function(){throw new Error("set is read-only")}),Object.freeze(Z),Object.getOwnPropertyNames(Z).forEach(me=>{const Le=Z[me],Xe=typeof Le;(Xe==="object"||Xe==="function")&&!Object.isFrozen(Le)&&e(Le)}),Z}class t{constructor(me){me.data===void 0&&(me.data={}),this.data=me.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(Z){return Z.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(Z,...me){const Le=Object.create(null);for(const Xe in Z)Le[Xe]=Z[Xe];return me.forEach(function(Xe){for(const Ct in Xe)Le[Ct]=Xe[Ct]}),Le}const s="</span>",a=Z=>!!Z.scope,l=(Z,{prefix:me})=>{if(Z.startsWith("language:"))return Z.replace("language:","language-");if(Z.includes(".")){const Le=Z.split(".");return[`${me}${Le.shift()}`,...Le.map((Xe,Ct)=>`${Xe}${"_".repeat(Ct+1)}`)].join(" ")}return`${me}${Z}`};class c{constructor(me,Le){this.buffer="",this.classPrefix=Le.classPrefix,me.walk(this)}addText(me){this.buffer+=n(me)}openNode(me){if(!a(me))return;const Le=l(me.scope,{prefix:this.classPrefix});this.span(Le)}closeNode(me){a(me)&&(this.buffer+=s)}value(){return this.buffer}span(me){this.buffer+=`<span class="${me}">`}}const f=(Z={})=>{const me={children:[]};return Object.assign(me,Z),me};class d{constructor(){this.rootNode=f(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(me){this.top.children.push(me)}openNode(me){const Le=f({scope:me});this.add(Le),this.stack.push(Le)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(me){return this.constructor._walk(me,this.rootNode)}static _walk(me,Le){return typeof Le=="string"?me.addText(Le):Le.children&&(me.openNode(Le),Le.children.forEach(Xe=>this._walk(me,Xe)),me.closeNode(Le)),me}static _collapse(me){typeof me!="string"&&me.children&&(me.children.every(Le=>typeof Le=="string")?me.children=[me.children.join("")]:me.children.forEach(Le=>{d._collapse(Le)}))}}class h extends d{constructor(me){super(),this.options=me}addText(me){me!==""&&this.add(me)}startScope(me){this.openNode(me)}endScope(){this.closeNode()}__addSublanguage(me,Le){const Xe=me.root;Le&&(Xe.scope=`language:${Le}`),this.add(Xe)}toHTML(){return new c(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function m(Z){return Z?typeof Z=="string"?Z:Z.source:null}function b(Z){return S("(?=",Z,")")}function y(Z){return S("(?:",Z,")*")}function k(Z){return S("(?:",Z,")?")}function S(...Z){return Z.map(Le=>m(Le)).join("")}function R(Z){const me=Z[Z.length-1];return typeof me=="object"&&me.constructor===Object?(Z.splice(Z.length-1,1),me):{}}function T(...Z){return"("+(R(Z).capture?"":"?:")+Z.map(Xe=>m(Xe)).join("|")+")"}function E(Z){return new RegExp(Z.toString()+"|").exec("").length-1}function C(Z,me){const Le=Z&&Z.exec(me);return Le&&Le.index===0}const _=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function D(Z,{joinWith:me}){let Le=0;return Z.map(Xe=>{Le+=1;const Ct=Le;let lt=m(Xe),He="";for(;lt.length>0;){const qe=_.exec(lt);if(!qe){He+=lt;break}He+=lt.substring(0,qe.index),lt=lt.substring(qe.index+qe[0].length),qe[0][0]==="\\"&&qe[1]?He+="\\"+String(Number(qe[1])+Ct):(He+=qe[0],qe[0]==="("&&Le++)}return He}).map(Xe=>`(${Xe})`).join(me)}const A=/\b\B/,M="[a-zA-Z]\\w*",B="[a-zA-Z_]\\w*",P="\\b\\d+(\\.\\d+)?",N="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",W="\\b(0b[01]+)",$="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",F=(Z={})=>{const me=/^#![ ]*\//;return Z.binary&&(Z.begin=S(me,/.*\b/,Z.binary,/\b.*/)),r({scope:"meta",begin:me,end:/$/,relevance:0,"on:begin":(Le,Xe)=>{Le.index!==0&&Xe.ignoreMatch()}},Z)},z={begin:"\\\\[\\s\\S]",relevance:0},U={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[z]},H={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[z]},K={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/},q=function(Z,me,Le={}){const Xe=r({scope:"comment",begin:Z,end:me,contains:[]},Le);Xe.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 Ct=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 Xe.contains.push({begin:S(/[ ]+/,"(",Ct,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Xe},Y=q("//","$"),O=q("/\\*","\\*/"),j=q("#","$"),V={scope:"number",begin:P,relevance:0},L={scope:"number",begin:N,relevance:0},X={scope:"number",begin:W,relevance:0},se={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[z,{begin:/\[/,end:/\]/,relevance:0,contains:[z]}]},ne={scope:"title",begin:M,relevance:0},oe={scope:"title",begin:B,relevance:0},le={begin:"\\.\\s*"+B,relevance:0};var Ee=Object.freeze({__proto__:null,APOS_STRING_MODE:U,BACKSLASH_ESCAPE:z,BINARY_NUMBER_MODE:X,BINARY_NUMBER_RE:W,COMMENT:q,C_BLOCK_COMMENT_MODE:O,C_LINE_COMMENT_MODE:Y,C_NUMBER_MODE:L,C_NUMBER_RE:N,END_SAME_AS_BEGIN:function(Z){return Object.assign(Z,{"on:begin":(me,Le)=>{Le.data._beginMatch=me[1]},"on:end":(me,Le)=>{Le.data._beginMatch!==me[1]&&Le.ignoreMatch()}})},HASH_COMMENT_MODE:j,IDENT_RE:M,MATCH_NOTHING_RE:A,METHOD_GUARD:le,NUMBER_MODE:V,NUMBER_RE:P,PHRASAL_WORDS_MODE:K,QUOTE_STRING_MODE:H,REGEXP_MODE:se,RE_STARTERS_RE:$,SHEBANG:F,TITLE_MODE:ne,UNDERSCORE_IDENT_RE:B,UNDERSCORE_TITLE_MODE:oe});function be(Z,me){Z.input[Z.index-1]==="."&&me.ignoreMatch()}function ue(Z,me){Z.className!==void 0&&(Z.scope=Z.className,delete Z.className)}function ge(Z,me){me&&Z.beginKeywords&&(Z.begin="\\b("+Z.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",Z.__beforeBegin=be,Z.keywords=Z.keywords||Z.beginKeywords,delete Z.beginKeywords,Z.relevance===void 0&&(Z.relevance=0))}function Se(Z,me){Array.isArray(Z.illegal)&&(Z.illegal=T(...Z.illegal))}function Ae(Z,me){if(Z.match){if(Z.begin||Z.end)throw new Error("begin & end are not supported with match");Z.begin=Z.match,delete Z.match}}function ke(Z,me){Z.relevance===void 0&&(Z.relevance=1)}const xe=(Z,me)=>{if(!Z.beforeMatch)return;if(Z.starts)throw new Error("beforeMatch cannot be used with starts");const Le=Object.assign({},Z);Object.keys(Z).forEach(Xe=>{delete Z[Xe]}),Z.keywords=Le.keywords,Z.begin=S(Le.beforeMatch,b(Le.begin)),Z.starts={relevance:0,contains:[Object.assign(Le,{endsParent:!0})]},Z.relevance=0,delete Le.beforeMatch},Re=["of","and","for","in","not","or","if","then","parent","list","value"],Me="keyword";function ze(Z,me,Le=Me){const Xe=Object.create(null);return typeof Z=="string"?Ct(Le,Z.split(" ")):Array.isArray(Z)?Ct(Le,Z):Object.keys(Z).forEach(function(lt){Object.assign(Xe,ze(Z[lt],me,lt))}),Xe;function Ct(lt,He){me&&(He=He.map(qe=>qe.toLowerCase())),He.forEach(function(qe){const De=qe.split("|");Xe[De[0]]=[lt,Fe(De[0],De[1])]})}}function Fe(Z,me){return me?Number(me):ye(Z)?0:1}function ye(Z){return Re.includes(Z.toLowerCase())}const _e={},ee=Z=>{console.error(Z)},fe=(Z,...me)=>{console.log(`WARN: ${Z}`,...me)},Q=(Z,me)=>{_e[`${Z}/${me}`]||(console.log(`Deprecated as of ${Z}. ${me}`),_e[`${Z}/${me}`]=!0)},re=new Error;function we(Z,me,{key:Le}){let Xe=0;const Ct=Z[Le],lt={},He={};for(let qe=1;qe<=me.length;qe++)He[qe+Xe]=Ct[qe],lt[qe+Xe]=!0,Xe+=E(me[qe-1]);Z[Le]=He,Z[Le]._emit=lt,Z[Le]._multi=!0}function Pe(Z){if(Array.isArray(Z.begin)){if(Z.skip||Z.excludeBegin||Z.returnBegin)throw ee("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),re;if(typeof Z.beginScope!="object"||Z.beginScope===null)throw ee("beginScope must be object"),re;we(Z,Z.begin,{key:"beginScope"}),Z.begin=D(Z.begin,{joinWith:""})}}function Ye(Z){if(Array.isArray(Z.end)){if(Z.skip||Z.excludeEnd||Z.returnEnd)throw ee("skip, excludeEnd, returnEnd not compatible with endScope: {}"),re;if(typeof Z.endScope!="object"||Z.endScope===null)throw ee("endScope must be object"),re;we(Z,Z.end,{key:"endScope"}),Z.end=D(Z.end,{joinWith:""})}}function Ze(Z){Z.scope&&typeof Z.scope=="object"&&Z.scope!==null&&(Z.beginScope=Z.scope,delete Z.scope)}function bt(Z){Ze(Z),typeof Z.beginScope=="string"&&(Z.beginScope={_wrap:Z.beginScope}),typeof Z.endScope=="string"&&(Z.endScope={_wrap:Z.endScope}),Pe(Z),Ye(Z)}function Je(Z){function me(He,qe){return new RegExp(m(He),"m"+(Z.case_insensitive?"i":"")+(Z.unicodeRegex?"u":"")+(qe?"g":""))}class Le{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(qe,De){De.position=this.position++,this.matchIndexes[this.matchAt]=De,this.regexes.push([De,qe]),this.matchAt+=E(qe)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const qe=this.regexes.map(De=>De[1]);this.matcherRe=me(D(qe,{joinWith:"|"}),!0),this.lastIndex=0}exec(qe){this.matcherRe.lastIndex=this.lastIndex;const De=this.matcherRe.exec(qe);if(!De)return null;const je=De.findIndex((We,dt)=>dt>0&&We!==void 0),Ie=this.matchIndexes[je];return De.splice(0,je),Object.assign(De,Ie)}}class Xe{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(qe){if(this.multiRegexes[qe])return this.multiRegexes[qe];const De=new Le;return this.rules.slice(qe).forEach(([je,Ie])=>De.addRule(je,Ie)),De.compile(),this.multiRegexes[qe]=De,De}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(qe,De){this.rules.push([qe,De]),De.type==="begin"&&this.count++}exec(qe){const De=this.getMatcher(this.regexIndex);De.lastIndex=this.lastIndex;let je=De.exec(qe);if(this.resumingScanAtSamePosition()&&!(je&&je.index===this.lastIndex)){const Ie=this.getMatcher(0);Ie.lastIndex=this.lastIndex+1,je=Ie.exec(qe)}return je&&(this.regexIndex+=je.position+1,this.regexIndex===this.count&&this.considerAll()),je}}function Ct(He){const qe=new Xe;return He.contains.forEach(De=>qe.addRule(De.begin,{rule:De,type:"begin"})),He.terminatorEnd&&qe.addRule(He.terminatorEnd,{type:"end"}),He.illegal&&qe.addRule(He.illegal,{type:"illegal"}),qe}function lt(He,qe){const De=He;if(He.isCompiled)return De;[ue,Ae,bt,xe].forEach(Ie=>Ie(He,qe)),Z.compilerExtensions.forEach(Ie=>Ie(He,qe)),He.__beforeBegin=null,[ge,Se,ke].forEach(Ie=>Ie(He,qe)),He.isCompiled=!0;let je=null;return typeof He.keywords=="object"&&He.keywords.$pattern&&(He.keywords=Object.assign({},He.keywords),je=He.keywords.$pattern,delete He.keywords.$pattern),je=je||/\w+/,He.keywords&&(He.keywords=ze(He.keywords,Z.case_insensitive)),De.keywordPatternRe=me(je,!0),qe&&(He.begin||(He.begin=/\B|\b/),De.beginRe=me(De.begin),!He.end&&!He.endsWithParent&&(He.end=/\B|\b/),He.end&&(De.endRe=me(De.end)),De.terminatorEnd=m(De.end)||"",He.endsWithParent&&qe.terminatorEnd&&(De.terminatorEnd+=(He.end?"|":"")+qe.terminatorEnd)),He.illegal&&(De.illegalRe=me(He.illegal)),He.contains||(He.contains=[]),He.contains=[].concat(...He.contains.map(function(Ie){return St(Ie==="self"?He:Ie)})),He.contains.forEach(function(Ie){lt(Ie,De)}),He.starts&<(He.starts,qe),De.matcher=Ct(De),De}if(Z.compilerExtensions||(Z.compilerExtensions=[]),Z.contains&&Z.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return Z.classNameAliases=r(Z.classNameAliases||{}),lt(Z)}function xt(Z){return Z?Z.endsWithParent||xt(Z.starts):!1}function St(Z){return Z.variants&&!Z.cachedVariants&&(Z.cachedVariants=Z.variants.map(function(me){return r(Z,{variants:null},me)})),Z.cachedVariants?Z.cachedVariants:xt(Z)?r(Z,{starts:Z.starts?r(Z.starts):null}):Object.isFrozen(Z)?r(Z):Z}var nt="11.11.1";class rt extends Error{constructor(me,Le){super(me),this.name="HTMLInjectionError",this.html=Le}}const ct=n,it=r,ft=Symbol("nomatch"),Lt=7,Pt=function(Z){const me=Object.create(null),Le=Object.create(null),Xe=[];let Ct=!0;const lt="Could not find the language '{}', did you forget to load/include a language module?",He={disableAutodetect:!0,name:"Plain text",contains:[]};let qe={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:h};function De($e){return qe.noHighlightRe.test($e)}function je($e){let at=$e.className+" ";at+=$e.parentNode?$e.parentNode.className:"";const jt=qe.languageDetectRe.exec(at);if(jt){const on=tr(jt[1]);return on||(fe(lt.replace("{}",jt[1])),fe("Falling back to no-highlight mode for this block.",$e)),on?jt[1]:"no-highlight"}return at.split(/\s+/).find(on=>De(on)||tr(on))}function Ie($e,at,jt){let on="",Ln="";typeof at=="object"?(on=$e,jt=at.ignoreIllegals,Ln=at.language):(Q("10.7.0","highlight(lang, code, ...args) has been deprecated."),Q("10.7.0",`Please use highlight(code, options) instead.
|
|
44
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),Ln=$e,on=at),jt===void 0&&(jt=!0);const ur={code:on,language:Ln};Io("before:highlight",ur);const Ur=ur.result?ur.result:We(ur.language,ur.code,jt);return Ur.code=ur.code,Io("after:highlight",Ur),Ur}function We($e,at,jt,on){const Ln=Object.create(null);function ur(Ge,st){return Ge.keywords[st]}function Ur(){if(!wt.keywords){qn.addText(an);return}let Ge=0;wt.keywordPatternRe.lastIndex=0;let st=wt.keywordPatternRe.exec(an),Nt="";for(;st;){Nt+=an.substring(Ge,st.index);const Ht=nr.case_insensitive?st[0].toLowerCase():st[0],An=ur(wt,Ht);if(An){const[ii,Ql]=An;if(qn.addText(Nt),Nt="",Ln[Ht]=(Ln[Ht]||0)+1,Ln[Ht]<=Lt&&(Ps+=Ql),ii.startsWith("_"))Nt+=st[0];else{const xf=nr.classNameAliases[ii]||ii;qr(st[0],xf)}}else Nt+=st[0];Ge=wt.keywordPatternRe.lastIndex,st=wt.keywordPatternRe.exec(an)}Nt+=an.substring(Ge),qn.addText(Nt)}function Rr(){if(an==="")return;let Ge=null;if(typeof wt.subLanguage=="string"){if(!me[wt.subLanguage]){qn.addText(an);return}Ge=We(wt.subLanguage,an,!0,vf[wt.subLanguage]),vf[wt.subLanguage]=Ge._top}else Ge=Et(an,wt.subLanguage.length?wt.subLanguage:null);wt.relevance>0&&(Ps+=Ge.relevance),qn.__addSublanguage(Ge._emitter,Ge.language)}function Sn(){wt.subLanguage!=null?Rr():Ur(),an=""}function qr(Ge,st){Ge!==""&&(qn.startScope(st),qn.addText(Ge),qn.endScope())}function bf(Ge,st){let Nt=1;const Ht=st.length-1;for(;Nt<=Ht;){if(!Ge._emit[Nt]){Nt++;continue}const An=nr.classNameAliases[Ge[Nt]]||Ge[Nt],ii=st[Nt];An?qr(ii,An):(an=ii,Ur(),an=""),Nt++}}function Ta(Ge,st){return Ge.scope&&typeof Ge.scope=="string"&&qn.openNode(nr.classNameAliases[Ge.scope]||Ge.scope),Ge.beginScope&&(Ge.beginScope._wrap?(qr(an,nr.classNameAliases[Ge.beginScope._wrap]||Ge.beginScope._wrap),an=""):Ge.beginScope._multi&&(bf(Ge.beginScope,st),an="")),wt=Object.create(Ge,{parent:{value:wt}}),wt}function Yl(Ge,st,Nt){let Ht=C(Ge.endRe,Nt);if(Ht){if(Ge["on:end"]){const An=new t(Ge);Ge["on:end"](st,An),An.isMatchIgnored&&(Ht=!1)}if(Ht){for(;Ge.endsParent&&Ge.parent;)Ge=Ge.parent;return Ge}}if(Ge.endsWithParent)return Yl(Ge.parent,st,Nt)}function Ra(Ge){return wt.matcher.regexIndex===0?(an+=Ge[0],1):($s=!0,0)}function um(Ge){const st=Ge[0],Nt=Ge.rule,Ht=new t(Nt),An=[Nt.__beforeBegin,Nt["on:begin"]];for(const ii of An)if(ii&&(ii(Ge,Ht),Ht.isMatchIgnored))return Ra(st);return Nt.skip?an+=st:(Nt.excludeBegin&&(an+=st),Sn(),!Nt.returnBegin&&!Nt.excludeBegin&&(an=st)),Ta(Nt,Ge),Nt.returnBegin?0:st.length}function Cr(Ge){const st=Ge[0],Nt=at.substring(Ge.index),Ht=Yl(wt,Ge,Nt);if(!Ht)return ft;const An=wt;wt.endScope&&wt.endScope._wrap?(Sn(),qr(st,wt.endScope._wrap)):wt.endScope&&wt.endScope._multi?(Sn(),bf(wt.endScope,Ge)):An.skip?an+=st:(An.returnEnd||An.excludeEnd||(an+=st),Sn(),An.excludeEnd&&(an=st));do wt.scope&&qn.closeNode(),!wt.skip&&!wt.subLanguage&&(Ps+=wt.relevance),wt=wt.parent;while(wt!==Ht.parent);return Ht.starts&&Ta(Ht.starts,Ge),An.returnEnd?0:st.length}function Xl(){const Ge=[];for(let st=wt;st!==nr;st=st.parent)st.scope&&Ge.unshift(st.scope);Ge.forEach(st=>qn.openNode(st))}let Mo={};function Ca(Ge,st){const Nt=st&&st[0];if(an+=Ge,Nt==null)return Sn(),0;if(Mo.type==="begin"&&st.type==="end"&&Mo.index===st.index&&Nt===""){if(an+=at.slice(st.index,st.index+1),!Ct){const Ht=new Error(`0 width match regex (${$e})`);throw Ht.languageName=$e,Ht.badRule=Mo.rule,Ht}return 1}if(Mo=st,st.type==="begin")return um(st);if(st.type==="illegal"&&!jt){const Ht=new Error('Illegal lexeme "'+Nt+'" for mode "'+(wt.scope||"<unnamed>")+'"');throw Ht.mode=wt,Ht}else if(st.type==="end"){const Ht=Cr(st);if(Ht!==ft)return Ht}if(st.type==="illegal"&&Nt==="")return an+=`
|
|
45
|
-
`,1;if(Zl>1e5&&Zl>st.index*3)throw new Error("potential infinite loop, way more iterations than matches");return an+=Nt,Nt.length}const nr=tr($e);if(!nr)throw ee(lt.replace("{}",$e)),new Error('Unknown language: "'+$e+'"');const yf=Je(nr);let _a="",wt=on||yf;const vf={},qn=new qe.__emitter(qe);Xl();let an="",Ps=0,Ji=0,Zl=0,$s=!1;try{if(nr.__emitTokens)nr.__emitTokens(at,qn);else{for(wt.matcher.considerAll();;){Zl++,$s?$s=!1:wt.matcher.considerAll(),wt.matcher.lastIndex=Ji;const Ge=wt.matcher.exec(at);if(!Ge)break;const st=at.substring(Ji,Ge.index),Nt=Ca(st,Ge);Ji=Ge.index+Nt}Ca(at.substring(Ji))}return qn.finalize(),_a=qn.toHTML(),{language:$e,value:_a,relevance:Ps,illegal:!1,_emitter:qn,_top:wt}}catch(Ge){if(Ge.message&&Ge.message.includes("Illegal"))return{language:$e,value:ct(at),illegal:!0,relevance:0,_illegalBy:{message:Ge.message,index:Ji,context:at.slice(Ji-100,Ji+100),mode:Ge.mode,resultSoFar:_a},_emitter:qn};if(Ct)return{language:$e,value:ct(at),illegal:!1,relevance:0,errorRaised:Ge,_emitter:qn,_top:wt};throw Ge}}function dt($e){const at={value:ct($e),illegal:!1,relevance:0,_top:He,_emitter:new qe.__emitter(qe)};return at._emitter.addText($e),at}function Et($e,at){at=at||qe.languages||Object.keys(me);const jt=dt($e),on=at.filter(tr).filter(js).map(Sn=>We(Sn,$e,!1));on.unshift(jt);const Ln=on.sort((Sn,qr)=>{if(Sn.relevance!==qr.relevance)return qr.relevance-Sn.relevance;if(Sn.language&&qr.language){if(tr(Sn.language).supersetOf===qr.language)return 1;if(tr(qr.language).supersetOf===Sn.language)return-1}return 0}),[ur,Ur]=Ln,Rr=ur;return Rr.secondBest=Ur,Rr}function Ne($e,at,jt){const on=at&&Le[at]||jt;$e.classList.add("hljs"),$e.classList.add(`language-${on}`)}function Tt($e){let at=null;const jt=je($e);if(De(jt))return;if(Io("before:highlightElement",{el:$e,language:jt}),$e.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",$e);return}if($e.children.length>0&&(qe.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($e)),qe.throwUnescapedHTML))throw new rt("One of your code blocks includes unescaped HTML.",$e.innerHTML);at=$e;const on=at.textContent,Ln=jt?Ie(on,{language:jt,ignoreIllegals:!0}):Et(on);$e.innerHTML=Ln.value,$e.dataset.highlighted="yes",Ne($e,jt,Ln.language),$e.result={language:Ln.language,re:Ln.relevance,relevance:Ln.relevance},Ln.secondBest&&($e.secondBest={language:Ln.secondBest.language,relevance:Ln.secondBest.relevance}),Io("after:highlightElement",{el:$e,result:Ln,text:on})}function Qt($e){qe=it(qe,$e)}const rn=()=>{Br(),Q("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function _n(){Br(),Q("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Yn=!1;function Br(){function $e(){Br()}if(document.readyState==="loading"){Yn||window.addEventListener("DOMContentLoaded",$e,!1),Yn=!0;return}document.querySelectorAll(qe.cssSelector).forEach(Tt)}function Fn($e,at){let jt=null;try{jt=at(Z)}catch(on){if(ee("Language definition for '{}' could not be registered.".replace("{}",$e)),Ct)ee(on);else throw on;jt=He}jt.name||(jt.name=$e),me[$e]=jt,jt.rawDefinition=at.bind(null,Z),jt.aliases&&Zi(jt.aliases,{languageName:$e})}function ri($e){delete me[$e];for(const at of Object.keys(Le))Le[at]===$e&&delete Le[at]}function Fr(){return Object.keys(me)}function tr($e){return $e=($e||"").toLowerCase(),me[$e]||me[Le[$e]]}function Zi($e,{languageName:at}){typeof $e=="string"&&($e=[$e]),$e.forEach(jt=>{Le[jt.toLowerCase()]=at})}function js($e){const at=tr($e);return at&&!at.disableAutodetect}function zs($e){$e["before:highlightBlock"]&&!$e["before:highlightElement"]&&($e["before:highlightElement"]=at=>{$e["before:highlightBlock"](Object.assign({block:at.el},at))}),$e["after:highlightBlock"]&&!$e["after:highlightElement"]&&($e["after:highlightElement"]=at=>{$e["after:highlightBlock"](Object.assign({block:at.el},at))})}function Un($e){zs($e),Xe.push($e)}function gf($e){const at=Xe.indexOf($e);at!==-1&&Xe.splice(at,1)}function Io($e,at){const jt=$e;Xe.forEach(function(on){on[jt]&&on[jt](at)})}function Qi($e){return Q("10.7.0","highlightBlock will be removed entirely in v12.0"),Q("10.7.0","Please use highlightElement now."),Tt($e)}Object.assign(Z,{highlight:Ie,highlightAuto:Et,highlightAll:Br,highlightElement:Tt,highlightBlock:Qi,configure:Qt,initHighlighting:rn,initHighlightingOnLoad:_n,registerLanguage:Fn,unregisterLanguage:ri,listLanguages:Fr,getLanguage:tr,registerAliases:Zi,autoDetection:js,inherit:it,addPlugin:Un,removePlugin:gf}),Z.debugMode=function(){Ct=!1},Z.safeMode=function(){Ct=!0},Z.versionString=nt,Z.regex={concat:S,lookahead:b,either:T,optional:k,anyNumberOfTimes:y};for(const $e in Ee)typeof Ee[$e]=="object"&&e(Ee[$e]);return Object.assign(Z,Ee),Z},At=Pt({});return At.newInstance=()=>Pt({}),xy=At,At.HighlightJS=At,At.default=At,xy}var mee=hee();const gee=Vc(mee),vC={},bee="hljs-";function yee(e){const t=gee.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:s,register:a,registerAlias:l,registered:c};function n(f,d,h){const m=h||vC,b=typeof m.prefix=="string"?m.prefix:bee;if(!t.getLanguage(f))throw new Error("Unknown language: `"+f+"` is not registered");t.configure({__emitter:vee,classPrefix:b});const y=t.highlight(d,{ignoreIllegals:!0,language:f});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(f,d){const m=(d||vC).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,f,d);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(f,d){if(typeof f=="string")t.registerLanguage(f,d);else{let h;for(h in f)Object.hasOwn(f,h)&&t.registerLanguage(h,f[h])}}function l(f,d){if(typeof f=="string")t.registerAliases(typeof d=="string"?d:[...d],{languageName:f});else{let h;for(h in f)if(Object.hasOwn(f,h)){const m=f[h];t.registerAliases(typeof m=="string"?m:[...m],{languageName:h})}}}function c(f){return!!t.getLanguage(f)}}class vee{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 xee={};function kee(e){const t=e||xee,n=t.aliases,r=t.detect||!1,s=t.languages||pee,a=t.plainText,l=t.prefix,c=t.subset;let f="hljs";const d=yee(s);if(n&&d.registerAlias(n),l){const h=l.indexOf("-");f=h===-1?l:l.slice(0,h)}return function(h,m){am(h,"element",function(b,y,k){if(b.tagName!=="code"||!k||k.type!=="element"||k.tagName!=="pre")return;const S=See(b);if(S===!1||!S&&!r||S&&a&&a.includes(S))return;Array.isArray(b.properties.className)||(b.properties.className=[]),b.properties.className.includes(f)||b.properties.className.unshift(f);const R=BQ(b,{whitespace:"pre"});let T;try{T=S?d.highlight(S,R,{prefix:l}):d.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 See(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 xC(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 wee(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Eee(e,t,n){const s=df((n||{}).ignore||[]),a=Tee(t);let l=-1;for(;++l<a.length;)fD(e,"text",c);function c(d,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 f(d,h)}function f(d,h){const m=h[h.length-1],b=a[l][0],y=a[l][1];let k=0;const R=m.children.indexOf(d);let T=!1,E=[];b.lastIndex=0;let C=b.exec(d.value);for(;C;){const _=C.index,D={index:C.index,input:C.input,stack:[...h,d]};let A=y(...C,D);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?b.lastIndex=_+1:(k!==_&&E.push({type:"text",value:d.value.slice(k,_)}),Array.isArray(A)?E.push(...A):A&&E.push(A),k=_+C[0].length,T=!0),!b.global)break;C=b.exec(d.value)}return T?(k<d.value.length&&E.push({type:"text",value:d.value.slice(k)}),m.children.splice(R,1,...E)):E=[d],R+E.length}}function Tee(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([Ree(s[0]),Cee(s[1])])}return t}function Ree(e){return typeof e=="string"?new RegExp(wee(e),"g"):e}function Cee(e){return typeof e=="function"?e:function(){return e}}const ky="phrasing",Sy=["autolink","link","image","label"];function _ee(){return{transforms:[Lee],enter:{literalAutolink:Nee,literalAutolinkEmail:wy,literalAutolinkHttp:wy,literalAutolinkWww:wy},exit:{literalAutolink:Dee,literalAutolinkEmail:Mee,literalAutolinkHttp:Oee,literalAutolinkWww:Iee}}}function Aee(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ky,notInConstruct:Sy},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ky,notInConstruct:Sy},{character:":",before:"[ps]",after:"\\/",inConstruct:ky,notInConstruct:Sy}]}}function Nee(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function wy(e){this.config.enter.autolinkProtocol.call(this,e)}function Oee(e){this.config.exit.autolinkProtocol.call(this,e)}function Iee(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 Mee(e){this.config.exit.autolinkEmail.call(this,e)}function Dee(e){this.exit(e)}function Lee(e){Eee(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,jee],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),zee]],{ignore:["link","linkReference"]})}function jee(e,t,n,r,s){let a="";if(!DD(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!Pee(n)))return!1;const l=$ee(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 zee(e,t,n,r){return!DD(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Pee(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 $ee(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=xC(e,"(");let a=xC(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 DD(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ha(n)||rm(n))&&(!t||n!==47)}LD.peek=Kee;function Bee(){this.buffer()}function Fee(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Uee(){this.buffer()}function qee(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Hee(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ai(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Vee(e){this.exit(e)}function Gee(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ai(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Wee(e){this.exit(e)}function Kee(){return"["}function LD(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 Yee(){return{enter:{gfmFootnoteCallString:Bee,gfmFootnoteCall:Fee,gfmFootnoteDefinitionLabelString:Uee,gfmFootnoteDefinition:qee},exit:{gfmFootnoteCallString:Hee,gfmFootnoteCall:Vee,gfmFootnoteDefinitionLabelString:Gee,gfmFootnoteDefinition:Wee}}}function Xee(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:LD},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,l){const c=a.createTracker(l);let f=c.move("[^");const d=a.enter("footnoteDefinition"),h=a.enter("label");return f+=c.move(a.safe(a.associationId(r),{before:f,after:"]"})),h(),f+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),f+=c.move((t?`
|
|
46
|
-
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?jD:Zee))),d(),f}}function Zee(e,t,n){return t===0?e:jD(e,t,n)}function jD(e,t,n){return(n?"":" ")+e}const Qee=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];zD.peek=rte;function Jee(){return{canContainEols:["delete"],enter:{strikethrough:tte},exit:{strikethrough:nte}}}function ete(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Qee}],handlers:{delete:zD}}}function tte(e){this.enter({type:"delete",children:[]},e)}function nte(e){this.exit(e)}function zD(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 rte(){return"~"}function ite(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||ote,s=[],a=[],l=[],c=[];let f=0,d=-1;for(;++d<e.length;){const k=[],S=[];let R=-1;for(e[d].length>f&&(f=e[d].length);++R<e[d].length;){const T=ste(e[d][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[d]=k,l[d]=S}let h=-1;if(typeof n=="object"&&"length"in n)for(;++h<f;)s[h]=kC(n[h]);else{const k=kC(n);for(;++h<f;)s[h]=k}h=-1;const m=[],b=[];for(;++h<f;){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),d=-1;const y=[];for(;++d<a.length;){const k=a[d],S=l[d];h=-1;const R=[];for(;++h<f;){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!==f-1)&&R.push("|")}y.push(t.delimiterEnd===!1?R.join("").replace(/ +$/,""):R.join(""))}return y.join(`
|
|
47
|
-
`)}function ste(e){return e==null?"":String(e)}function ote(e){return e.length}function kC(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 ate(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()),lte);return s(),l}function lte(e,t,n){return">"+(n?"":" ")+e}function ute(e,t){return SC(e,t.inConstruct,!0)&&!SC(e,t.notInConstruct,!1)}function SC(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 wC(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
48
|
-
`&&ute(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
49
|
-
`}function cte(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 fte(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 dte(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 pte(e,t,n,r){const s=dte(n),a=e.value||"",l=s==="`"?"GraveAccent":"Tilde";if(fte(e,n)){const m=n.enter("codeIndented"),b=n.indentLines(a,hte);return m(),b}const c=n.createTracker(r),f=s.repeat(Math.max(cte(a,s)+1,3)),d=n.enter("codeFenced");let h=c.move(f);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:`
|
|
50
|
-
`,encode:["`"],...c.current()})),m()}return h+=c.move(`
|
|
51
|
-
`),a&&(h+=c.move(a+`
|
|
52
|
-
`)),h+=c.move(f),d(),h}function hte(e,t,n){return(n?"":" ")+e}function N0(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 mte(e,t,n,r){const s=N0(n),a=s==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const f=n.createTracker(r);let d=f.move("[");return d+=f.move(n.safe(n.associationId(e),{before:d,after:"]",...f.current()})),d+=f.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=f.move("<"),d+=f.move(n.safe(e.url,{before:d,after:">",...f.current()})),d+=f.move(">")):(c=n.enter("destinationRaw"),d+=f.move(n.safe(e.url,{before:d,after:e.title?" ":`
|
|
53
|
-
`,...f.current()}))),c(),e.title&&(c=n.enter(`title${a}`),d+=f.move(" "+s),d+=f.move(n.safe(e.title,{before:d,after:s,...f.current()})),d+=f.move(s),c()),l(),d}function gte(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 qc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function dh(e,t,n){const r=zl(e),s=zl(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}}PD.peek=bte;function PD(e,t,n,r){const s=gte(n),a=n.enter("emphasis"),l=n.createTracker(r),c=l.move(s);let f=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const d=f.charCodeAt(0),h=dh(r.before.charCodeAt(r.before.length-1),d,s);h.inside&&(f=qc(d)+f.slice(1));const m=f.charCodeAt(f.length-1),b=dh(r.after.charCodeAt(0),m,s);b.inside&&(f=f.slice(0,-1)+qc(m));const y=l.move(s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:h.outside},c+f+y}function bte(e,t,n){return n.options.emphasis||"*"}function yte(e,t){let n=!1;return am(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Tv}),!!((!e.depth||e.depth<3)&&x0(e)&&(t.options.setext||n))}function vte(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(yte(e,n)){const h=n.enter("headingSetext"),m=n.enter("phrasing"),b=n.containerPhrasing(e,{...a.current(),before:`
|
|
54
|
-
`,after:`
|
|
55
|
-
`});return m(),h(),b+`
|
|
56
|
-
`+(s===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
57
|
-
`))+1))}const l="#".repeat(s),c=n.enter("headingAtx"),f=n.enter("phrasing");a.move(l+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
|
|
58
|
-
`,...a.current()});return/^[\t ]/.test(d)&&(d=qc(d.charCodeAt(0))+d.slice(1)),d=d?l+" "+d:l,n.options.closeAtx&&(d+=" "+l),f(),c(),d}$D.peek=xte;function $D(e){return e.value||""}function xte(){return"<"}BD.peek=kte;function BD(e,t,n,r){const s=N0(n),a=s==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const f=n.createTracker(r);let d=f.move("![");return d+=f.move(n.safe(e.alt,{before:d,after:"]",...f.current()})),d+=f.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=f.move("<"),d+=f.move(n.safe(e.url,{before:d,after:">",...f.current()})),d+=f.move(">")):(c=n.enter("destinationRaw"),d+=f.move(n.safe(e.url,{before:d,after:e.title?" ":")",...f.current()}))),c(),e.title&&(c=n.enter(`title${a}`),d+=f.move(" "+s),d+=f.move(n.safe(e.title,{before:d,after:s,...f.current()})),d+=f.move(s),c()),d+=f.move(")"),l(),d}function kte(){return"!"}FD.peek=Ste;function FD(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("![");const d=n.safe(e.alt,{before:f,after:"]",...c.current()});f+=c.move(d+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return l(),n.stack=h,a(),s==="full"||!d||d!==m?f+=c.move(m+"]"):s==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function Ste(){return"!"}UD.peek=wte;function UD(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 f;if(l.atBreak)for(;f=c.exec(r);){let d=f.index;r.charCodeAt(d)===10&&r.charCodeAt(d-1)===13&&d--,r=r.slice(0,d)+" "+r.slice(f.index+1)}}return s+r+s}function wte(){return"`"}function qD(e,t){const n=x0(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))}HD.peek=Ete;function HD(e,t,n,r){const s=N0(n),a=s==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,f;if(qD(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"),f=n.enter("label");let d=l.move("[");return d+=l.move(n.containerPhrasing(e,{before:d,after:"](",...l.current()})),d+=l.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),d+=l.move("<"),d+=l.move(n.safe(e.url,{before:d,after:">",...l.current()})),d+=l.move(">")):(f=n.enter("destinationRaw"),d+=l.move(n.safe(e.url,{before:d,after:e.title?" ":")",...l.current()}))),f(),e.title&&(f=n.enter(`title${a}`),d+=l.move(" "+s),d+=l.move(n.safe(e.title,{before:d,after:s,...l.current()})),d+=l.move(s),f()),d+=l.move(")"),c(),d}function Ete(e,t,n){return qD(e,n)?"<":"["}VD.peek=Tte;function VD(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("[");const d=n.containerPhrasing(e,{before:f,after:"]",...c.current()});f+=c.move(d+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return l(),n.stack=h,a(),s==="full"||!d||d!==m?f+=c.move(m+"]"):s==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function Tte(){return"["}function O0(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 Rte(e){const t=O0(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 Cte(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 GD(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 _te(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let l=e.ordered?Cte(n):O0(n);const c=e.ordered?l==="."?")":".":Rte(n);let f=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&&(f=!0),GD(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"){f=!0;break}}}}f&&(l=c),n.bulletCurrent=l;const d=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=a,s(),d}function Ate(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 Nte(e,t,n,r){const s=Ate(n);let a=n.bulletCurrent||O0(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 f=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,c.current()),h);return f(),d;function h(m,b,y){return b?(y?"":" ".repeat(l))+m:(y?a:a+" ".repeat(l-a.length))+m}}function Ote(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),l=n.containerPhrasing(e,r);return a(),s(),l}const Ite=df(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Mte(e,t,n,r){return(e.children.some(function(l){return Ite(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Dte(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}WD.peek=Lte;function WD(e,t,n,r){const s=Dte(n),a=n.enter("strong"),l=n.createTracker(r),c=l.move(s+s);let f=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const d=f.charCodeAt(0),h=dh(r.before.charCodeAt(r.before.length-1),d,s);h.inside&&(f=qc(d)+f.slice(1));const m=f.charCodeAt(f.length-1),b=dh(r.after.charCodeAt(0),m,s);b.inside&&(f=f.slice(0,-1)+qc(m));const y=l.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:h.outside},c+f+y}function Lte(e,t,n){return n.options.strong||"*"}function jte(e,t,n,r){return n.safe(e.value,r)}function zte(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 Pte(e,t,n){const r=(GD(n)+(n.options.ruleSpaces?" ":"")).repeat(zte(n));return n.options.ruleSpaces?r.slice(0,-1):r}const KD={blockquote:ate,break:wC,code:pte,definition:mte,emphasis:PD,hardBreak:wC,heading:vte,html:$D,image:BD,imageReference:FD,inlineCode:UD,link:HD,linkReference:VD,list:_te,listItem:Nte,paragraph:Ote,root:Mte,strong:WD,text:jte,thematicBreak:Pte};function $te(){return{enter:{table:Bte,tableData:EC,tableHeader:EC,tableRow:Ute},exit:{codeText:qte,table:Fte,tableData:Ey,tableHeader:Ey,tableRow:Ey}}}function Bte(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 Fte(e){this.exit(e),this.data.inTable=void 0}function Ute(e){this.enter({type:"tableRow",children:[]},e)}function Ey(e){this.exit(e)}function EC(e){this.enter({type:"tableCell",children:[]},e)}function qte(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Hte));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Hte(e,t){return t==="|"?t:e}function Vte(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
59
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:l,tableCell:f,tableRow:c}};function l(y,k,S,R){return d(h(y,S,R),y.align)}function c(y,k,S,R){const T=m(y,S,R),E=d([T]);return E.slice(0,E.indexOf(`
|
|
60
|
-
`))}function f(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 d(y,k){return ite(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]=f(R[T],y,k,S);return C(),E}function b(y,k,S){let R=KD.inlineCode(y,k,S);return S.stack.includes("tableCell")&&(R=R.replace(/\|/g,"\\$&")),R}}function Gte(){return{exit:{taskListCheckValueChecked:TC,taskListCheckValueUnchecked:TC,paragraph:Kte}}}function Wte(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Yte}}}function TC(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Kte(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 Yte(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 f=KD.listItem(e,t,n,{...r,...c.current()});return a&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),f;function d(h){return h+l}}function Xte(){return[_ee(),Yee(),Jee(),$te(),Gte()]}function Zte(e){return{extensions:[Aee(),Xee(e),ete(),Vte(e),Wte()]}}const Qte={tokenize:ine,partial:!0},YD={tokenize:sne,partial:!0},XD={tokenize:one,partial:!0},ZD={tokenize:ane,partial:!0},Jte={tokenize:lne,partial:!0},QD={name:"wwwAutolink",tokenize:nne,previous:e2},JD={name:"protocolAutolink",tokenize:rne,previous:t2},Ls={name:"emailAutolink",tokenize:tne,previous:n2},Xi={};function ene(){return{text:Xi}}let Qo=48;for(;Qo<123;)Xi[Qo]=Ls,Qo++,Qo===58?Qo=65:Qo===91&&(Qo=97);Xi[43]=Ls;Xi[45]=Ls;Xi[46]=Ls;Xi[95]=Ls;Xi[72]=[Ls,JD];Xi[104]=[Ls,JD];Xi[87]=[Ls,QD];Xi[119]=[Ls,QD];function tne(e,t,n){const r=this;let s,a;return l;function l(m){return!Nv(m)||!n2.call(r,r.previous)||I0(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return Nv(m)?(e.consume(m),c):m===64?(e.consume(m),f):n(m)}function f(m){return m===46?e.check(Jte,h,d)(m):m===45||m===95||mr(m)?(a=!0,e.consume(m),f):h(m)}function d(m){return e.consume(m),s=!0,f}function h(m){return a&&s&&wr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function nne(e,t,n){const r=this;return s;function s(l){return l!==87&&l!==119||!e2.call(r,r.previous)||I0(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Qte,e.attempt(YD,e.attempt(XD,a),n),n)(l))}function a(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function rne(e,t,n){const r=this;let s="",a=!1;return l;function l(m){return(m===72||m===104)&&t2.call(r,r.previous)&&!I0(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(wr(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),f}return n(m)}function f(m){return m===47?(e.consume(m),a?d:(a=!0,f)):n(m)}function d(m){return m===null||ah(m)||kn(m)||ha(m)||rm(m)?n(m):e.attempt(YD,e.attempt(XD,h),n)(m)}function h(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function ine(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 sne(e,t,n){let r,s,a;return l;function l(d){return d===46||d===95?e.check(ZD,f,c)(d):d===null||kn(d)||ha(d)||d!==45&&rm(d)?f(d):(a=!0,e.consume(d),l)}function c(d){return d===95?r=!0:(s=r,r=void 0),e.consume(d),l}function f(d){return s||r||!a?n(d):t(d)}}function one(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(ZD,t,a)(l):l===null||kn(l)||ha(l)?t(l):(e.consume(l),s)}function a(l){return l===41&&r++,e.consume(l),s}}function ane(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||kn(c)||ha(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||kn(c)||ha(c)?t(c):r(c)}function a(c){return wr(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),r):wr(c)?(e.consume(c),l):n(c)}}function lne(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return mr(a)?n(a):t(a)}}function e2(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||kn(e)}function t2(e){return!wr(e)}function n2(e){return!(e===47||Nv(e))}function Nv(e){return e===43||e===45||e===46||e===95||mr(e)}function I0(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 une={tokenize:bne,partial:!0};function cne(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:hne,continuation:{tokenize:mne},exit:gne}},text:{91:{name:"gfmFootnoteCall",tokenize:pne},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:fne,resolveTo:dne}}}}function fne(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;s--;){const f=r.events[s][1];if(f.type==="labelImage"){l=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return c;function c(f){if(!l||!l._balanced)return n(f);const d=Ai(r.sliceSerialize({start:l.end,end:r.now()}));return d.codePointAt(0)!==94||!a.includes(d.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function dne(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 pne(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"),f}function f(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(m){if(a>999||m===93&&!l||m===null||m===91||kn(m))return n(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(Ai(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return kn(m)||(l=!0),a++,e.consume(m),m===92?h:d}function h(m){return m===91||m===92||m===93?(e.consume(m),a++,d):d(m)}}function hne(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,c;return f;function f(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(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||kn(k))return n(k);if(k===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=Ai(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return kn(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 mne(e,t,n){return e.check(ff,t,e.attempt(une,t,n))}function gne(e){e.exit("gfmFootnoteDefinition")}function bne(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 yne(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 f=-1;for(;++f<l.length;)if(l[f][0]==="enter"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._close){let d=f;for(;d--;)if(l[d][0]==="exit"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._open&&l[f][1].end.offset-l[f][1].start.offset===l[d][1].end.offset-l[d][1].start.offset){l[f][1].type="strikethroughSequence",l[d][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},l[d][1].start),end:Object.assign({},l[f][1].end)},m={type:"strikethroughText",start:Object.assign({},l[d][1].end),end:Object.assign({},l[f][1].start)},b=[["enter",h,c],["enter",l[d][1],c],["exit",l[d][1],c],["enter",m,c]],y=c.parser.constructs.insideSpan.null;y&&ni(b,b.length,0,im(y,l.slice(d+1,f),c)),ni(b,b.length,0,[["exit",m,c],["enter",l[f][1],c],["exit",l[f][1],c],["exit",h,c]]),ni(l,d-1,f-d+3,b),f=d+b.length-2;break}}for(f=-1;++f<l.length;)l[f][1].type==="strikethroughSequenceTemporary"&&(l[f][1].type="data");return l}function a(l,c,f){const d=this.previous,h=this.events;let m=0;return b;function b(k){return d===126&&h[h.length-1][1].type!=="characterEscape"?f(k):(l.enter("strikethroughSequenceTemporary"),y(k))}function y(k){const S=zl(d);if(k===126)return m>1?f(k):(l.consume(k),m++,y);if(m<2&&!n)return f(k);const R=l.exit("strikethroughSequenceTemporary"),T=zl(k);return R._open=!T||T===2&&!!S,R._close=!S||S===2&&!!T,c(k)}}}class vne{constructor(){this.map=[]}add(t,n,r){xne(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 xne(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 kne(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 Sne(){return{flow:{null:{name:"table",tokenize:wne,resolveAll:Ene}}}}function wne(e,t,n){const r=this;let s=0,a=0,l;return c;function c(N){let W=r.events.length-1;for(;W>-1;){const z=r.events[W][1].type;if(z==="lineEnding"||z==="linePrefix")W--;else break}const $=W>-1?r.events[W][1].type:null,F=$==="tableHead"||$==="tableRow"?A:f;return F===A&&r.parser.lazy[r.now().line]?n(N):F(N)}function f(N){return e.enter("tableHead"),e.enter("tableRow"),d(N)}function d(N){return N===124||(l=!0,a+=1),h(N)}function h(N){return N===null?n(N):vt(N)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),y):n(N):Ut(N)?Zt(e,h,"whitespace")(N):(a+=1,l&&(l=!1,s+=1),N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),l=!0,h):(e.enter("data"),m(N)))}function m(N){return N===null||N===124||kn(N)?(e.exit("data"),h(N)):(e.consume(N),N===92?b:m)}function b(N){return N===92||N===124?(e.consume(N),m):m(N)}function y(N){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(N):(e.enter("tableDelimiterRow"),l=!1,Ut(N)?Zt(e,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):k(N))}function k(N){return N===45||N===58?R(N):N===124?(l=!0,e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),S):D(N)}function S(N){return Ut(N)?Zt(e,R,"whitespace")(N):R(N)}function R(N){return N===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),T):N===45?(a+=1,T(N)):N===null||vt(N)?_(N):D(N)}function T(N){return N===45?(e.enter("tableDelimiterFiller"),E(N)):D(N)}function E(N){return N===45?(e.consume(N),E):N===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(N))}function C(N){return Ut(N)?Zt(e,_,"whitespace")(N):_(N)}function _(N){return N===124?k(N):N===null||vt(N)?!l||s!==a?D(N):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(N)):D(N)}function D(N){return n(N)}function A(N){return e.enter("tableRow"),M(N)}function M(N){return N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),M):N===null||vt(N)?(e.exit("tableRow"),t(N)):Ut(N)?Zt(e,M,"whitespace")(N):(e.enter("data"),B(N))}function B(N){return N===null||N===124||kn(N)?(e.exit("data"),M(N)):(e.consume(N),N===92?P:B)}function P(N){return N===92||N===124?(e.consume(N),B):B(N)}}function Ene(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],l=[0,0,0,0],c=!1,f=0,d,h,m;const b=new vne;for(;++n<e.length;){const y=e[n],k=y[1];y[0]==="enter"?k.type==="tableHead"?(c=!1,f!==0&&(RC(b,t,f,d,h),h=void 0,f=0),d={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(n,0,[["enter",d,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=up(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=up(b,t,a,s,void 0,m)),a=l,l=[a[1],n,0,0])):k.type==="tableHead"?(c=!0,f=n):k.type==="tableRow"||k.type==="tableDelimiterRow"?(f=n,a[1]!==0?(l[0]=l[1],m=up(b,t,a,s,n,m)):l[1]!==0&&(m=up(b,t,l,s,n,m)),s=0):s&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(l[3]=n)}for(f!==0&&RC(b,t,f,d,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=kne(t.events,n))}return e}function up(e,t,n,r,s,a){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},ml(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const f=ml(t.events,n[1]);if(a={type:l,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const d=ml(t.events,n[2]),h=ml(t.events,n[3]),m={type:c,start:Object.assign({},d),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({},ml(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function RC(e,t,n,r,s){const a=[],l=ml(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 ml(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Tne={name:"tasklistCheck",tokenize:Cne};function Rne(){return{text:{91:Tne}}}function Cne(e,t,n){const r=this;return s;function s(f){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),a)}function a(f){return kn(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),l):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),l):n(f)}function l(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(f)}function c(f){return vt(f)?t(f):Ut(f)?e.check({tokenize:_ne},t,n)(f):n(f)}}function _ne(e,t,n){return Zt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function Ane(e){return GM([ene(),cne(),yne(e),Sne(),Rne()])}const Nne={};function One(e){const t=this,n=e||Nne,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(Ane(n)),a.push(Xte()),l.push(Zte(n))}function Ine(e){return g.jsx("div",{className:"md-table-wrap",children:g.jsx("table",{...e})})}function r2(e){return g.jsx("span",{className:"md-cell",children:e})}function Mne({children:e,...t}){return g.jsx("th",{...t,children:r2(e)})}function Dne({children:e,...t}){return g.jsx("td",{...t,children:r2(e)})}function Ov(e){return e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(Ov).join(""):v.isValidElement(e)?Ov(e.props.children):""}function Lne({children:e,...t}){const[n,r]=v.useState(!1),s=v.useRef(void 0),a=v.useCallback(()=>{navigator.clipboard.writeText(Ov(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(br,{icon:n?"check":"copy",size:"sm",variant:"ghost","aria-label":n?"Copied":"Copy code",onClick:a})})]})}const jne={table:Ine,th:Mne,td:Dne,pre:Lne,a:pa},Pl=v.memo(function({text:t,className:n}){return g.jsx("div",{className:n?`md ${n}`:"md",children:g.jsx(AQ,{remarkPlugins:[One],rehypePlugins:[[kee,{detect:!1}]],components:jne,children:t??""})})});function zne(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 hf(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 Ea({status:e}){const t=zne(e);return g.jsx(qt,{name:t.name,color:t.color,...t.modifier?{modifier:t.modifier}:{}})}function Pne({callId:e}){return g.jsxs("div",{className:"approval-bar",children:[g.jsx("span",{children:"Awaiting human approval"}),g.jsx(vn,{variant:"secondary",tone:"success",size:"sm",onClick:()=>{Qe.submitApproval(e,"approve")},children:"Approve"}),g.jsx(vn,{variant:"secondary",tone:"danger",size:"sm",onClick:()=>{Qe.submitApproval(e,"deny")},children:"Deny"})]})}function $ne({callId:e,authUrl:t,connection:n}){return g.jsxs("div",{className:"approval-bar",children:[g.jsxs("span",{children:["Connect ",n]}),g.jsx(vn,{variant:"secondary",tone:"success",size:"sm",onClick:()=>window.open(t,"_blank","noopener,noreferrer"),children:"Connect"}),g.jsx(vn,{variant:"secondary",size:"sm",onClick:()=>{Qe.submitAuth(e,"approve")},children:"Connected"}),g.jsx(vn,{variant:"secondary",tone:"danger",size:"sm",onClick:()=>{Qe.submitAuth(e,"deny")},children:"Cancel"})]})}function mf({item:e}){const t=Ue(r=>r.capabilities.approvals),n=Ue(r=>r.capabilities.auth);return e.status!=="awaiting"?null:e.gate!=="auth"?t!=="enabled"?g.jsx("div",{className:"approval-bar",children:g.jsx("span",{children:"Awaiting approval outside this playground"})}):g.jsx(Pne,{callId:e.callId}):n!=="enabled"?g.jsx("div",{className:"approval-bar",children:g.jsx("span",{children:"Awaiting connection outside this playground"})}):e.authUrl===void 0||e.connection===void 0?null:g.jsx($ne,{callId:e.callId,authUrl:e.authUrl,connection:e.connection})}function M0(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function Tl(e,...t){if(!e)return"";for(const n of t){const r=e[n];if(typeof r=="string"&&r.trim()!=="")return r}return""}const i2=new Map;for(const[e,t]of Object.entries(FW)){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&&i2.set(s,t.default)}function Bne(e){return e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.command=="string"?e.command:typeof e=="string"?e:""}function CC(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 Fne(e){const t=CC(e.outputRaw);if(t)return t;if(e.output)try{return CC(JSON.parse(e.output))}catch{}return null}function _C(e){return e.replace(/[\s\uFEFF\u00A0]+$/,"")}const Une=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=hf(t),a=Bne(t.args),l=Fne(t),c=_C(l?.stdout??""),f=_C(l?.stderr??""),d=l?.exitCode!=null&&l.exitCode!==0,h=t.status==="done"&&d?"error":t.status,m=[a?Jr(a,80):"shell"];return d&&m.push(`exit ${l?.exitCode}`),m.push(Ii(s)),g.jsxs("div",{className:`pg-tool pg-shell ${h}`,children:[g.jsxs(yi,{action:"shell",details:m.join(" · "),leadingIcon:g.jsx(Ea,{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,f?g.jsx("pre",{className:"shell-std shell-err",children:f}):null,!c&&!f?g.jsx("div",{className:"shell-empty",children:l?`Exited ${l.exitCode??0} with no output.`:t.output??"running…"}):null]}),g.jsx(mf,{item:t})]})}),qne=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=hf(t),a=Tl(M0(t.args),"path"),l=Hne(t),c=[a?nG(a,80):"read",Ii(s)];return g.jsxs("div",{className:`pg-tool pg-read ${t.status}`,children:[g.jsxs(yi,{action:"read",details:c.join(" · "),leadingIcon:g.jsx(Ea,{status:t.status}),open:n,onOpenChange:f=>r(f),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(mf,{item:t})]})});function Hne(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 Vne=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=hf(t),a=M0(t.args),l=Tl(a,"glob_pattern","globPattern"),c=Tl(a,"target_directory","targetDirectory"),f=Gne(t),d=[l?Jr(l,80):"glob",Ii(s)];return g.jsxs("div",{className:`pg-tool pg-glob ${t.status}`,children:[g.jsxs(yi,{action:"glob",details:d.join(" · "),leadingIcon:g.jsx(Ea,{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,f!=null?f.length>0?g.jsx("pre",{className:"tool-body",children:f.join(`
|
|
61
|
-
`)}):g.jsx("div",{className:"tool-empty",children:"(no matches)"}):g.jsx("div",{className:"out",children:t.output??"running…"})]}),g.jsx(mf,{item:t})]})});function Gne(e){const t=NC(e.outputRaw);if(t!=null)return t;if(e.output)try{return NC(JSON.parse(e.output))}catch{}return null}function NC(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 Wne=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=hf(t),a=M0(t.args),l=Tl(a,"pattern"),c=Tl(a,"path"),f=Tl(a,"glob"),d=[l?Jr(l,80):"grep",Ii(s)],h=[c,f?`glob ${f}`:""].filter(Boolean).join(`
|
|
62
|
-
`);return g.jsxs("div",{className:`pg-tool pg-grep ${t.status}`,children:[g.jsxs(yi,{action:"grep",details:d.join(" · "),leadingIcon:g.jsx(Ea,{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(mf,{item:t})]})}),Kne=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(yi,{action:"Thinking",loading:!0,open:!r,onOpenChange:a=>s(!a),tone:"muted",children:g.jsx(Pl,{text:t,className:"body"})})}):g.jsx("div",{className:"pg-subagent-reasoning",children:g.jsx(yi,{action:"Thought",defaultOpen:!1,tone:"muted",children:g.jsx(Pl,{text:t,className:"body"})})})}),Yne=v.memo(function({child:t}){if(t.kind==="assistant")return g.jsx("div",{className:`pg-subagent-msg${t.streaming?" streaming":""}`,children:g.jsx(Pl,{text:t.text||"…",className:"body"})});if(t.kind==="reasoning")return g.jsx(Kne,{text:t.text,open:t.open});const n=t.args==null?"":Pn(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(Ea,{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 Xne(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 Zne=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?"":Pn(t.args,100),f=t.status==="running",d=c?Jr(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(Ea,{status:t.status})}),g.jsxs("span",{className:"pg-subagent-titles",children:[g.jsx("span",{className:f?"pg-subagent-title shimmer":"pg-subagent-title",children:d}),g.jsxs("span",{className:"pg-subagent-subtitle",children:[Xne(t,n)," · ",l]})]}),g.jsx("span",{className:s?"pg-subagent-chevron open":"pg-subagent-chevron",children:g.jsx(qt,{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(Yne,{child:h},h.id)):g.jsx("div",{className:"pg-subagent-empty",children:t.output??"running…"})})})]})});function Qne(e){if(e==null)return"";if(typeof e=="string")return Jr(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 Jr(n,80)}}return Pn(e,120)}const Jne=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=hf(t),a=Qne(t.args),l=Ii(s);return g.jsxs("div",{className:`pg-tool ${t.status}`,children:[g.jsx(yi,{action:t.name,details:a?`${a} · ${l}`:l,leadingIcon:g.jsx(Ea,{status:t.status}),open:n,onOpenChange:c=>r(c),tabularNums:!0,children:g.jsx("div",{className:"out",children:t.output??"running…"})}),g.jsx(mf,{item:t})]})}),ere={shell:e=>g.jsx(Une,{item:e}),read:e=>g.jsx(qne,{item:e}),glob:e=>g.jsx(Vne,{item:e}),grep:e=>g.jsx(Wne,{item:e})};function tre(e){return e.name.startsWith("subagent:")}const nre=v.memo(function({item:t}){if(tre(t))return g.jsx(Zne,{item:t});const n=i2.get(t.name);if(n)return g.jsx(n,{item:t});const r=ere[t.name];return r?r(t):g.jsx(Jne,{item:t})}),OC=120,rre=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>OC)};m();const b=new ResizeObserver(m);return b.observe(h),()=>b.disconnect()},[t]);const c=s&&!n,f=()=>{s&&r(h=>!h)},d=h=>{s&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),f())};return g.jsx("div",{className:"msg user",children:g.jsx("div",{ref:l,className:c?"bubble furled":s?"bubble expandable":"bubble",style:c?{maxHeight:OC}: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?f:void 0,onKeyDown:s?d:void 0,children:t})})});function ire(){return g.jsx("div",{className:"msg user",children:g.jsx("div",{className:"bubble withheld",children:"Prompt hidden"})})}const sre=v.memo(function({text:t,streaming:n}){return g.jsx("div",{className:"msg assistant",children:g.jsx(Pl,{text:t,className:n?"bubble streaming":"bubble"})})}),ore=v.memo(function({text:t,open:n}){const[r,s]=v.useState(!1);return n?g.jsx("div",{className:"pg-reasoning",children:g.jsx(yi,{action:"Thinking",loading:!0,open:!r,onOpenChange:a=>s(!a),tone:"muted",children:g.jsx(Pl,{text:t,className:"body"})})}):g.jsx("div",{className:"pg-reasoning",children:g.jsx(yi,{action:"Thought",defaultOpen:!1,tone:"muted",children:g.jsx(Pl,{text:t,className:"body"})})})}),are=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(pa,{href:r,children:r})]}):null]})});function wc(e){switch(e.kind){case"user":return e.hidden===!0?g.jsx(ire,{},e.id):g.jsx(rre,{text:e.text},e.id);case"assistant":return g.jsx(sre,{text:e.text,streaming:e.streaming},e.id);case"reasoning":return g.jsx(ore,{text:e.text,open:e.open},e.id);case"tool":return g.jsx(nre,{item:e},e.id);case"divider":return g.jsx(are,{text:e.text,fail:e.fail,url:e.url},e.id);case"artifact":return g.jsx(NW,{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 IC(e){return e.kind==="tool"&&e.name.startsWith("subagent:")}function lre({steps:e,cards:t,final:n,marker:r,isLatest:s}){const[a,l]=v.useState(void 0),c=a??s,f=[];(r.inTokens!==void 0||r.outTokens!==void 0)&&f.push(`${sh(r.inTokens)} in · ${sh(r.outTokens)} out tokens`),r.costUsd!==void 0&&f.push(c0(r.costUsd));const d=f.length>0?f.join(" · "):void 0;return g.jsxs(g.Fragment,{children:[e.length>0?g.jsx("div",{className:"pg-turn-group",title:d,children:g.jsx(yi,{action:"Worked",details:r.ms!==null?`for ${u0(r.ms)}`:void 0,open:c,onOpenChange:l,tabularNums:!0,tone:"tertiary",children:g.jsx("div",{className:"pg-turn-group-content",children:e.map(wc)})})}):null,t.map(wc),n?wc(n):null]})}function ure({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(yi,{action:"Working",details:`for ${u0(Math.max(0,t-e))}`,expandable:!1,tabularNums:!0,tone:"tertiary"})})}function cre(e,t){const n=e.findLast(l=>l.kind==="turn-end")?.id,r=[];let s=[];const a=()=>{for(const l of s)r.push(wc(l));s=[]};for(const l of e)switch(l.kind){case"user":case"divider":a(),r.push(wc(l));break;case"turn-end":{const c=s[s.length-1],f=c!==void 0&&c.kind==="assistant"&&!c.streaming?c:null,d=f===null?s:s.slice(0,-1),h=d.filter(b=>!IC(b)),m=d.filter(IC);r.push(g.jsx(lre,{steps:h,cards:m,final:f,marker:l,isLatest:l.id===n},l.id)),s=[];break}default:s.push(l);break}return t!==null&&r.push(g.jsx(ure,{startMs:t},"working")),a(),r}function s2(){const e=Ue(h=>h.transcript),t=Ue(h=>h.current),n=Ue(h=>h.localTrace),r=Ue(h=>h.running),s=Ue(h=>h.turnStartedAt),a=e.length===0&&(r?s:null)===null&&(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??"",f=`${t?.sessionId??"none"}:${c}:${e.length}`,{scrollRef:d}=CM({contentKey:l,latchKey:f});return g.jsx("div",{ref:d,className:a?"pg-transcript is-empty":"pg-transcript",children:a?g.jsx(p0,{idle:"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.",empty:"No messages in this session yet."}):cre(e,r?s:null)})}const MC=["accent","blue","magenta","orange","purple"];function o2(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return MC[t%MC.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 fre(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 f=[...n.slice(0,c),s];if(DC(f,t,r)<=a)return c}return 0}const dre="Send a message below to start a new HTTP session. Use the Trace tab for a timeline with tool timings.",pre="This agent is stopped. Pick a session from the Runs tab to inspect its chat and trace.",LC="... More";function hre({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=fre({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 f=Math.min(l.visibleCount,e.length),d=e.slice(0,f),h=e.slice(f);return g.jsxs("div",{ref:n,className:"pg-panel-empty__evals",children:[d.map(m=>g.jsx("button",{type:"button",className:"pg-panel-empty__eval","data-measure":"",title:m.description||`Run ${m.id}`,disabled:t,onClick:()=>{Qe.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:LC}),h.length>0?g.jsxs(ei,{placement:"bottom",children:[g.jsx(ei.Trigger,{disabled:t,children:g.jsx("button",{type:"button",className:"pg-panel-empty__eval",disabled:t,"aria-label":`Show ${h.length} more evaluations`,children:LC})}),g.jsx(ei.Content,{"aria-label":"More evaluations",size:"sm",children:h.map(m=>g.jsx(ei.Item,{disabled:t,onSelect:()=>{Qe.startEvalRun([m.id])},children:m.id},m.id))})]}):null]})}function mre(){const e=Ue(f=>f.meta),t=Ue(f=>f.info),n=Ue(f=>f.evalCases),r=Ue(f=>f.evalRun?.status==="running"),s=e.name||t?.name||"Agent",a=e.readonly===!0,l=o2(s),c=a?pre:t?.description||dre;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(qt,{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(hre,{cases:n,disabled:r}):null]})}const Ty={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}},gre={sm:{kOIVth:"ui-137clkk",$$css:!0},md:{kOIVth:"ui-pkkfsy",$$css:!0}},bre={sm:{kOIVth:"ui-1oot3zn",$$css:!0},md:{kOIVth:"ui-1jlwbde",$$css:!0}};function yre(e,t){return e==="filter"||e==="underline"&&t==="lg"?"md":"sm"}const jC={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}},vre={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}},xre={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}},a2=v.createContext(null);function l2(e){const t=v.use(a2);if(t===null)throw new Error(`${e} must be used within Tabs.Root`);return t}function kre({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(a2.Provider,{value:c,children:g.jsx(pI,{...l,value:e,defaultValue:t,onValueChange:n,"data-component":"tabs-root","data-size":r,"data-variant":s,className:"ui-jp7ctv",children:a})})}function Sre({activateOnFocus:e,spacing:t,wrap:n=!1,children:r,...s}){const a=l2("Tabs.List"),l=t??yre(a.variant,a.size),c=n&&a.variant!=="underline";return g.jsxs(vI,{...s,activateOnFocus:e,"data-component":"tabs-list","data-variant":a.variant,"data-wrap":c?"true":void 0,...zt(Ty.base,a.variant==="underline"&&Ty.underline,a.variant==="underline"?bre[l]:gre[l],c&&Ty.wrap),children:[r,a.variant==="underline"?g.jsx(yI,{"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 wre({value:e,secondaryLabel:t,href:n,children:r,...s}){const a=l2("Tabs.Item");return g.jsxs(gI,{...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,...zt(jC.base,a.size==="sm"?Ms.root:Cs.root,a.variant==="underline"?xre[a.size]:vre[a.size],jC[a.variant],a.variant==="filter"&&jA.root),children:[r,t!=null?g.jsx("span",{className:"ui-2lah0s ui-4b2ntj",children:t}):null]})}const Ry={Root:kre,List:Sre,Item:wre};function Ere(e,t){return t===null?!0:e!=="artifacts"||t.artifacts!==void 0}function u2(e,t,n){return e.filter(r=>r.value===n||Ere(r.value,t))}const Tre=[{value:"chat",label:"Chat"},{value:"trace",label:"Trace"},{value:"raw",label:"Raw"},{value:"evals",label:"Evals"},{value:"artifacts",label:"Artifacts"}];function D0(e){return e==="overview"?"chat":e}function Rre({size:e="lg"}){const t=Ue(f=>f.view),n=Ue(f=>f.evalNavReturn),r=Ue(f=>f.info),s=Ue(f=>f.capabilities),a=Tre.filter(f=>(f.value!=="evals"||s.evals!=="disabled")&&(f.value!=="artifacts"||s.artifacts!=="disabled")),l=n||t==="evals"?a:a.filter(f=>f.value!=="evals"),c=u2(l,r,t);return g.jsx(Ry.Root,{value:D0(t),onValueChange:f=>Qe.setView(f),size:e,children:g.jsx(Ry.List,{"aria-label":"Visualization mode",wrap:!0,children:c.map(f=>g.jsx(Ry.Item,{value:f.value,children:f.label},f.value))})})}function c2(){const e=Ue(s=>s.view),t=Ue(s=>s.current),n=Ue(s=>s.transcript.length===0),r=t===null&&n;return g.jsxs(g.Fragment,{children:[D0(e)==="chat"?g.jsxs(g.Fragment,{children:[r?g.jsx(mre,{}):g.jsx(s2,{}),g.jsx(kM,{})]}):null,e==="trace"?g.jsx(OM,{}):null,e==="raw"?g.jsx(_M,{}):null,e==="evals"?g.jsx(TM,{}):null,e==="artifacts"?g.jsx(xM,{}):null]})}function Cre({className:e,labeled:t=!1}){const n=Ue(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(rf,{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=>Qe.setAuthToken(r.target.value),title:"Sent as Authorization: Bearer ... on API calls"})]})}function _re(){return Ue(t=>t.aliasHosted)?null:g.jsxs(ei,{placement:"bottom-end",children:[g.jsx(ei.Trigger,{children:g.jsx(br,{icon:"dots-3-horizontal",size:"lg","aria-label":"More actions"})}),g.jsx(ei.Content,{"aria-label":"More actions",className:"pg-detail-more",size:"sm",width:240,footer:g.jsx(Cre,{className:"pg-detail-more__token",labeled:!0}),children:null})]})}function f2({variant:e}){const t=Ue(l=>l.barTitle),n=Ue(l=>l.barId),r=Ue(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(br,{icon:"arrow-left",size:"lg","aria-label":"Back to overview",onClick:()=>Qe.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(Rre,{}),g.jsxs("div",{className:"pg-detail__head-end",children:[g.jsx(_re,{}),s?g.jsx(br,{icon:"x",size:"lg","aria-label":"Close chat panel",onClick:()=>Qe.setChatPanelOpen(!1)}):null]})]})}function Are(){return g.jsxs("div",{className:"pg-detail",children:[g.jsx(f2,{variant:"page"}),g.jsx("div",{className:"pg-transcript-wrap",children:g.jsx(c2,{})})]})}const Nre="agent-serve.playground.try.";function d2(e,t){return`${Nre}${e}:${t}`}function zC(e,t){try{const n=localStorage.getItem(d2(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 Ore(e,t,n){try{localStorage.setItem(d2(e,t),JSON.stringify(n))}catch{}}function PC(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 $C({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 p2(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 cp(e){return`'${e.replace(/'/g,"'\\''")}'`}function Ire(e){const t=["curl","-sS","-X",e.method],n=e.token.trim();if(n!==""&&t.push("-H",cp(`Authorization: Bearer ${n}`)),e.hasBody){t.push("-H",cp("Content-Type: application/json"));const r=e.bodyText.trim()===""?"{}":e.bodyText.trim();t.push("--data-binary",cp(r))}return t.push(cp(e.absoluteUrl)),t.join(" ")}function Mre(e,t,n){let r=Qe.api.url(e);if(n){const s=p2(t,"Query");if(!s.ok)return s;const a=new URLSearchParams;for(const[c,f]of Object.entries(s.value)){if(f==null)continue;const d=typeof f=="string"?f:String(f);d!==""&&a.set(c,d)}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 h2({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=Ue(M=>M.authToken),[c,f]=v.useState(()=>{const M=zC(r,t.url);return M?.query!==void 0&&M.query.trim()!==""?M.query:PC(t.querySchema)}),[d,h]=v.useState(()=>{const M=zC(r,t.url);return M?.body!==void 0&&M.body.trim()!==""?M.body:PC(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 M=B=>{B.key==="Escape"&&n()};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[n]);const C=M=>{const B={};s&&(B.body=M.body??d),a&&(B.query=M.query??c),Ore(r,t.url,B)},_=()=>{C({body:d,query:c}),n()},D=async()=>{if(R(null),k(!1),s&&d.trim()!=="")try{JSON.parse(d)}catch(P){R(`Body: ${P instanceof Error?P.message:String(P)}`);return}const M=Mre(t.url,c,a);if(!M.ok){R(M.error);return}const B=Ire({method:r,absoluteUrl:M.url,token:l,hasBody:s,bodyText:d});try{await navigator.clipboard.writeText(B),k(!0),Qe.toast("Copied curl to clipboard"),window.setTimeout(()=>k(!1),1500)}catch(P){R(`Copy failed: ${P instanceof Error?P.message:String(P)}`)}},A=async()=>{R(null),E(null);let M;if(a){const P=p2(c,"Query");if(!P.ok){R(P.error);return}M={};for(const[N,W]of Object.entries(P.value))W!=null&&(M[N]=typeof W=="string"?W:String(W))}let B;if(s){const P=d.trim();if(P==="")B={};else try{B=JSON.parse(P)}catch(N){R(`Body: ${N instanceof Error?N.message:String(N)}`);return}}C({body:d,query:c}),b(!0);try{const P=await Qe.api.channelRequest(r,t.url,{body:s?B:void 0,query:M});if(P.ok&&P.body&&await Qe.openSessionFromChannelResponse(e,P.body)){n();return}E({status:P.status,body:P.body})}catch(P){R(P instanceof Error?P.message:String(P))}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:M=>M.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($C,{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:M=>f(M.target.value),spellCheck:!1,rows:6})]})]}):null,s?g.jsxs(g.Fragment,{children:[g.jsx($C,{label:"Body",schema:t.bodySchema}),g.jsxs("label",{className:"pg-try-field",children:[g.jsx("span",{children:"Body (JSON)"}),g.jsx("textarea",{value:d,onChange:M=>h(M.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(vn,{variant:"secondary",size:"sm",onClick:()=>{D()},children:y?"Copied":"Copy curl"}),g.jsx("div",{className:"pg-try-foot-spacer"}),g.jsx(vn,{variant:"secondary",size:"sm",onClick:_,children:"Cancel"}),g.jsx(vn,{variant:"primary",size:"sm",disabled:m,onClick:()=>{A()},children:m?"Sending…":"Send"})]})]})})}const m2="agent-serve.playground.drawerWidth",Cy=340,Iv=280,Mv=720;function Ep(e){return Math.min(Mv,Math.max(Iv,e))}function Dre(){try{const e=localStorage.getItem(m2);if(e===null)return Cy;const t=Number.parseInt(e,10);return Number.isFinite(t)?Ep(t):Cy}catch{return Cy}}function fl({title:e,children:t}){return g.jsxs(g.Fragment,{children:[g.jsx("h4",{children:e}),t]})}function nc({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 Lre(){const e=Ue(E=>E.drawerOpen),t=Ue(E=>E.info),[n,r]=v.useState(null),[s,a]=v.useState(Dre),[l,c]=v.useState(!1),f=v.useRef(s);f.current=s,v.useEffect(()=>{try{localStorage.setItem(m2,String(s))}catch{}},[s]);const d=v.useCallback(E=>{E.preventDefault();const C=E.currentTarget,_=E.clientX,D=f.current;C.setPointerCapture(E.pointerId),c(!0),document.body.classList.add("pg-resizing-drawer");const A=B=>{a(Ep(D+(B.clientX-_)))},M=B=>{C.releasePointerCapture(B.pointerId),C.removeEventListener("pointermove",A),C.removeEventListener("pointerup",M),C.removeEventListener("pointercancel",M),c(!1),document.body.classList.remove("pg-resizing-drawer")};C.addEventListener("pointermove",A),C.addEventListener("pointerup",M),C.addEventListener("pointercancel",M)},[]),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 em(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":Iv,"aria-valuemax":Mv,tabIndex:0,onPointerDown:d,onKeyDown:E=>{E.key==="ArrowLeft"?(E.preventDefault(),a(C=>Ep(C-16))):E.key==="ArrowRight"?(E.preventDefault(),a(C=>Ep(C+16))):E.key==="Home"?(E.preventDefault(),a(Iv)):E.key==="End"&&(E.preventDefault(),a(Mv))}}),g.jsxs("div",{className:"head",children:[g.jsx("span",{children:"Agent surface"}),g.jsx("button",{type:"button",className:"link-btn",onClick:()=>Qe.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(fl,{title:"Tools",children:h.map(E=>g.jsx(nc,{name:E.name,detail:E.description},E.name))}):null,m.length?g.jsx(fl,{title:"Skills",children:m.map(E=>g.jsx(nc,{name:E.name,detail:E.description},E.name))}):null,b.length?g.jsx(fl,{title:"Subagents",children:b.map(E=>g.jsx(nc,{name:E.name,detail:E.description},E.name))}):null,y.length?g.jsx(fl,{title:"MCP Connections",children:y.map(E=>g.jsx(nc,{name:E.name,detail:E.transport},E.name))}):null,k.length?g.jsx(fl,{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}`,A=R.get(`${C.method.toUpperCase()}:${C.url}`);return _?g.jsxs("div",{className:"channel-route",children:[g.jsx("code",{children:D}),A?g.jsx("code",{className:"channel-slash",title:"Composer slash command",children:A}):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(fl,{title:"Hooks",children:S.map(E=>g.jsx(nc,{name:E},E))}):null]})]}),n?g.jsx(h2,{channelId:n.channelId,route:n.route,onClose:()=>r(null)}):null]})}const jre=/^turn_(\d+)$/;function zre(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n?.type!=="turn.started")continue;const r=Number(jre.exec(n.turnId??"")?.[1]);if(Number.isSafeInteger(r))return r}}function Pre(e,t,n){return t===null||n===void 0?e:e.map(r=>r.sessionId===t&&n>(r.turnCount??0)?{...r,turnCount:n}:r)}const BC="Logs are not available in this playground.";function $re(){const e=Ue(h=>h.meta.readonly===!0),t=Ue(h=>h.capabilities.logs!=="disabled"),[n,r]=v.useState([]),[s,a]=v.useState(null),l=v.useRef(-1),c=v.useRef(null),f=n.length,d=lN({count:f,getScrollElement:()=>c.current,estimateSize:()=>18,overscan:24});return v.useEffect(()=>{if(!t)return;let h=!1;const m=async()=>{const y=await Qe.api.logs(l.current);if(h)return;if(!y.ok||y.body===null){a(y.status===501?BC:`logs failed (${y.status})`);return}a(null);const k=y.body.entries??[];k.length>0&&(l.current=y.body.nextAfter,r(S=>{const R=S.concat(k);return R.length>2e3?R.slice(R.length-2e3):R}))};if(m(),e)return()=>{h=!0};const b=window.setInterval(()=>{m()},1e3);return()=>{h=!0,window.clearInterval(b)}},[t,e]),v.useEffect(()=>{f>0&&d.scrollToIndex(f-1,{align:"end"})},[f,d]),t?s!==null&&f===0?g.jsx("div",{className:"pg-raw",children:g.jsx(Ri,{body:s})}):f===0?g.jsx("div",{className:"pg-raw",children:g.jsx(Ri,{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:c,children:g.jsx("div",{style:{height:d.getTotalSize(),position:"relative",width:"100%"},children:d.getVirtualItems().map(h=>{const m=n[h.index];if(m===void 0)return null;const b=m.at.slice(11,19);return g.jsxs("div",{"data-index":h.index,ref:d.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${h.start}px)`},children:[g.jsxs("span",{className:"elog-time",children:[b," "]}),g.jsx("span",{children:m.line})]},h.key)})})})]}):g.jsx("div",{className:"pg-raw",children:g.jsx(Ri,{body:BC})})}const L0={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 Bre(){return L0.root}function Fre(){return L0.controls}function Ure(){return L0.status}function qre({currentPage:e,totalPages:t,totalItems:n,pageSize:r,onPageChange:s,isLoading:a=!1,leading:l,rootStyle:c,className:f}){const d=Math.min(Math.max(1,e),t),h=n===0?0:Math.min(n,(d-1)*r+1),m=Math.min(n,d*r),b=R=>{R<1||R>t||R===d||a||s(R)},y=Yt({rootClass:"ui-pagination-footer",stylexStyles:[Bre(),c],className:["pagination-footer",f].filter(Boolean).join(" ")}),k=Yt({rootClass:"ui-pagination-footer__controls",stylexStyles:Fre(),className:"pagination-footer__controls"}),S=Yt({rootClass:"ui-pagination-footer__status",stylexStyles:Ure(),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(br,{"aria-label":"Previous page",disabled:d<=1||a,icon:"chevron-left",onClick:()=>b(d-1),size:"sm",variant:"ghost"}),g.jsxs("span",{className:S.className,style:S.style,children:[d.toLocaleString()," / ",t.toLocaleString()]}),g.jsx(br,{"aria-label":"Next page",disabled:d>=t||a,icon:"chevron-right",onClick:()=>b(d+1),size:"sm",variant:"ghost"})]})]})}const Hre={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}},g2={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}},Vre={base:{kjj79g:"ui-13a6bvl",k9WMMc:"ui-1hr2gdg",$$css:!0}},Gre={base:{kMwMTN:"ui-1wd3ewq",$$css:!0}},Wre={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}},Kre={base:{kjj79g:"ui-13a6bvl",k9WMMc:"ui-1hr2gdg",$$css:!0}},Yre={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}},Xre={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}},Zre={base:{kkrTdU:"ui-1ypdohk",$$css:!0}},Qre={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}},FC={base:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kGuDYH:"ui-4z9k3i",kLWn49:"ui-1fc57z9",$$css:!0}},Jre={base:{kjj79g:"ui-l56j7k",k9WMMc:"ui-2b8uid",$$css:!0}},eie={base:{kMwMTN:"ui-1e4uaio",$$css:!0}},tie={base:{kMwMTN:"ui-19aaqeu",$$css:!0}},nie={base:{kMwMTN:"ui-4b2ntj",$$css:!0}},rie={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}},iie={base:{kMwMTN:"ui-4b2ntj",kGuDYH:"ui-4z9k3i",kLWn49:"ui-d4r4e8",$$css:!0}},sie={base:{kMwMTN:"ui-19aaqeu",kGuDYH:"ui-4z9k3i",k63SB2:"ui-20ajya",kLWn49:"ui-d4r4e8",$$css:!0}},oie={base:{kjj79g:"ui-l56j7k",k9WMMc:"ui-2b8uid",$$css:!0}},UC={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}},aie={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}},lie={base:{kzqmXN:"ui-3hqpx7",$$css:!0}},uie={base:{kzqmXN:"ui-1iy3nof",$$css:!0}},cie={base:{kzqmXN:"ui-g0jo4d",$$css:!0}},fie={base:{k1xSpc:"ui-78zum5",kzqmXN:"ui-h8yej3",k7Eaqz:"ui-euugli",kXwgrk:"ui-dt5ytf",$$css:!0}},die={base:{keoZOQ:"ui-1e66mq1",kLKAdn:"ui-f6zju3",kpe85a:"ui-1yxiud8",kGO01o:"ui-cnij5n",kE3dHu:"ui-yab65l",$$css:!0}},qC=[{identityClass:"automations-run-history-table__skeleton--wide",style:cie.base},{identityClass:"automations-run-history-table__skeleton--medium",style:lie.base},{identityClass:"automations-run-history-table__skeleton--short",style:uie.base}];function pie(e){return typeof e=="number"?`${e}px`:e}function hie(e){if(e.fixedWidth!==void 0)return{flexValue:`0 0 ${pie(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 j0(e){const t=hie(e),n={flex:t.flexValue};return t.minWidth!==void 0&&(n.minWidth=t.minWidth),t.maxWidth!==void 0&&(n.maxWidth=t.maxWidth),n}const z0={identityClass:"",style:null};function b2(e){switch(e){case"right":return{identityClass:"automations-run-history-table__cell--align-right",style:Vre.base};case"center":return{identityClass:"automations-run-history-table__cell--align-center",style:Jre.base};default:return z0}}function mie(e){switch(e){case"right":return{identityClass:"automations-run-history-table__header--align-right",style:Kre.base};case"center":return{identityClass:"automations-run-history-table__header--align-center",style:oie.base};default:return z0}}function gie(e){switch(e){case"primary":return{identityClass:"automations-run-history-table__cell--tint-primary",style:Gre.base};case"secondary":return{identityClass:"automations-run-history-table__cell--tint-secondary",style:tie.base};case"tertiary":return{identityClass:"automations-run-history-table__cell--tint-tertiary",style:nie.base};case"quaternary":return{identityClass:"automations-run-history-table__cell--tint-quaternary",style:eie.base};default:return z0}}function bie(e){return!e.defaultPrevented&&e.button===0&&!e.metaKey&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.currentTarget.target!=="_blank"}function Hc(...e){return e.filter(Boolean).join(" ")}function y2(e){return sn(Yt({rootClass:"ui-automations-run-history-table__row",stylexStyles:[Xre.base,e&&Zre.base],className:Hc("automations-run-history-table__row",e&&"automations-run-history-table__row--linked")}).className,"ui--default-marker")}function v2(){return g.jsx("div",{className:Yt({rootClass:"ui-automations-run-history-table__row-divider",stylexStyles:Qre.base,className:"automations-run-history-table__row-divider"}).className,"data-run-history-row-divider":""})}function yie({columns:e}){return g.jsx("div",{className:Yt({rootClass:"ui-automations-run-history-table__header-row",stylexStyles:Yre.base,className:"automations-run-history-table__header-row"}).className,children:e.map(t=>{const n=mie(t.align);return g.jsx("div",{className:Yt({rootClass:"ui-automations-run-history-table__header",stylexStyles:[Wre.base,n.style],className:Hc("automations-run-history-table__header",n.identityClass)}).className,style:j0(t),children:t.header},`header-${t.key}`)})})}function HC({row:e,column:t}){const n=b2(t.align),r=gie(t.tintColor);return g.jsx("div",{className:Yt({rootClass:"ui-automations-run-history-table__cell",stylexStyles:[g2.base,n.style,r.style],className:Hc("automations-run-history-table__cell",n.identityClass,r.identityClass)}).className,style:j0(t),children:t.render(e)})}function vie({columns:e,rowIndex:t}){const n=qC[t%qC.length];return g.jsxs("div",{className:y2(!1),"data-run-history-row":"",children:[g.jsx(v2,{}),e.map(r=>{const s=b2(r.align);return g.jsx("div",{className:Yt({rootClass:"ui-automations-run-history-table__cell",stylexStyles:[g2.base,s.style],className:Hc("automations-run-history-table__cell",s.identityClass)}).className,style:j0(r),children:r.header!==""&&r.header!=null&&g.jsx("span",{className:Yt({rootClass:"ui-automations-run-history-table__skeleton",stylexStyles:[aie.base,n.style],className:Hc("automations-run-history-table__skeleton",n.identityClass)}).className})},`skeleton-${r.key}`)})]})}function x2({data:e,columns:t,isLoading:n=!1,skeletonRowCount:r=3,emptyState:s,onRowClick:a,getRowHref:l,pagination:c,ariaLabel:f="Run history"}){const{linkColumns:d,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:Yt({rootClass:"ui-automations-run-history-table__wrapper",stylexStyles:fie.base,className:"automations-run-history-table__wrapper"}).className,"data-vr":"all-runs",children:[g.jsxs("section",{"aria-busy":n,"aria-label":f,className:Yt({rootClass:"ui-automations-run-history-table",stylexStyles:Hre.base,className:"automations-run-history-table"}).className,children:[g.jsx(yie,{columns:t}),b?g.jsx("div",{className:Yt({rootClass:"ui-automations-run-history-table__rows",stylexStyles:FC.base,className:"automations-run-history-table__rows"}).className,children:Array.from({length:r},(S,R)=>g.jsx(vie,{columns:t,rowIndex:R},`skeleton-row-${R.toString()}`))}):y?g.jsx("div",{"aria-live":"polite",className:Yt({rootClass:"ui-automations-run-history-table__empty",stylexStyles:rie.base,className:"automations-run-history-table__empty"}).className,role:"status",children:s??g.jsxs(g.Fragment,{children:[g.jsx("span",{className:Yt({rootClass:"ui-automations-run-history-table__empty-title",stylexStyles:sie.base,className:"automations-run-history-table__empty-title"}).className,children:"No Results"}),g.jsx("span",{className:Yt({rootClass:"ui-automations-run-history-table__empty-description",stylexStyles:iie.base,className:"automations-run-history-table__empty-description"}).className,children:"Try different filters"})]})}):g.jsx("div",{className:Yt({rootClass:"ui-automations-run-history-table__rows",stylexStyles:FC.base,className:"automations-run-history-table__rows"}).className,children:e.map(S=>{const R=l?.(S),T=R!==void 0&&R!==""&&d.length>0,E=T||a!==void 0&&d.length>0,C=()=>d.map(_=>g.jsx(HC,{column:_,row:S},`cell-${S.id}-${_.key}`));return g.jsx(v.Fragment,{children:g.jsxs("div",{className:y2(E),"data-run-history-row":"",children:[g.jsx(v2,{}),T?g.jsx("a",{className:Yt({rootClass:"ui-automations-run-history-table__row-link",stylexStyles:UC.base,className:"automations-run-history-table__row-link"}).className,"data-run-history-row-link":"",href:R,onClick:_=>{a!==void 0&&bie(_)&&(_.preventDefault(),a(S))},children:C()}):a!==void 0&&d.length>0?g.jsx("button",{className:Yt({rootClass:"ui-automations-run-history-table__row-link",stylexStyles:UC.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(HC,{column:_,row:S},`cell-${S.id}-${_.key}`))]})},S.id)})})]}),k&&c!==void 0&&g.jsx(qre,{currentPage:c.currentPage,onPageChange:c.onPageChange,pageSize:c.pageSize,rootStyle:die.base,totalItems:c.totalItems,totalPages:c.totalPages})]})}function lm(e,...t){const n=e.trim().toLowerCase();return n===""?!0:t.filter(r=>r!=null&&r!=="").join(" ").toLowerCase().includes(n)}function k2({title:e,count:t,singularLabel:n,pluralLabel:r,search:s,searchPlaceholder:a,onSearchChange:l,actions:c,children:f}){const d=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," ",d]}),g.jsxs("div",{className:"pg-list-section__toolbar-end",children:[g.jsx("div",{className:"pg-list-section__search",children:g.jsx(rf,{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]})]}),f]})}function xie(e){return e==="running"?"Running":e==="cancelled"?"Cancelled":e==="failed"?"Failed":"Completed"}function kie(e){return e==="running"?"accent":e==="failed"?"danger":"neutral"}function Sie(e,t){return lm(t,e.id,e.description,e.verdict,e.error,e.sessionId)}function wie(e,t){return lm(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=>Sie(n,t))}function Eie(e,t){return lm(t,e.title,e.sessionId,e.channelId,e.mode)}function VC({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 Tie({sessions:e,runs:t,currentSessionId:n,currentEvalRunId:r,readOnly:s=!1,onSelectSession:a,onOpenEvalRun:l}){const[c,f]=v.useState(""),d=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(()=>d.filter(k=>k.kind==="session"?Eie(k.session,c):wie(k.run,c)),[d,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(VC,{running:k.session.running,active:k.active,children:k.session.title||k.session.sessionId}):g.jsx(VC,{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(vo,{variant:kie(S),size:"sm",children:"Eval"}),g.jsxs("span",{className:"pg-eval-run__meta",children:[xie(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===void 0?"—":`${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(qt,{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(qt,{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?gv(k.session.updatedAt)??"—":"—":gv(k.run.finishedAt??k.run.startedAt)??"—"}],[]),y=d.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(k2,{count:h.length,singularLabel:"run",pluralLabel:"runs",search:c,searchPlaceholder:"Search runs",onSearchChange:f,children:g.jsx(x2,{data:m,columns:b,ariaLabel:"Agent runs",emptyState:y,onRowClick:k=>{if(k.kind==="session"){a(k.session);return}l(k.run.runId)}})})}function Rie(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 Cie({cases:e,latestRun:t,running:n,onRun:r,onRunAll:s,readOnly:a=!1}){const[l,c]=v.useState(""),f=v.useMemo(()=>e.filter(b=>lm(l,b.id,b.description,b.fileId,b.tags?.join(" "))),[e,l]),d=v.useMemo(()=>f.map(b=>{const y=Rie(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)}}),[f,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(qt,{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(br,{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(k2,{count:f.length,singularLabel:"evaluation",pluralLabel:"evaluations",search:l,searchPlaceholder:"Search evaluations",onSearchChange:c,actions:!a&&e.length>0?g.jsx(vn,{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(x2,{data:d,columns:h,ariaLabel:"Evaluations",emptyState:m})})}function rc({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 _y(){return g.jsx("span",{className:"pg-meta-table__empty",children:"—"})}function _ie(e,t){return t?"History":e?"Development":"Production"}function Aie(e,t){return t?"neutral":e?"warn":"neutral"}function Nie(e,t){return t&&e!=="bad"?"Stopped":e==="ok"?"Healthy":e==="bad"?"Unhealthy":"Unknown"}function Oie(e,t){return t&&e!=="bad"?"neutral":e==="ok"?"success":e==="bad"?"danger":"neutral"}function Iie(e,t){return t&&t.trim()!==""?t:e&&e.trim()!==""?e.charAt(0).toUpperCase()+e.slice(1):null}function Mie({dev:e=!1,health:t="unknown",model:n,runtime:r,sourcePath:s,version:a,readOnly:l=!1}){const c=Iie(r,s),f=n&&n.trim()!==""?n:null,d=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(rc,{label:"Mode",children:g.jsxs(vo,{variant:Aie(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,_ie(e,l)]})}),g.jsx(rc,{label:"Status",children:g.jsxs(vo,{variant:Oie(t,l),size:"sm",pill:!0,children:[g.jsx(qt,{name:h?"pause-circle":m?"check-circle":"x-circle",variant:"filled",size:12,color:m?"green":t==="bad"?"red":"secondary","aria-hidden":!0}),Nie(t,l)]})}),g.jsx(rc,{label:"Model",children:f?g.jsx("span",{className:"pg-meta-table__text",children:f}):g.jsx(_y,{})}),g.jsx(rc,{label:"Source",children:c?g.jsx("span",{className:"pg-meta-table__text",title:c,children:c}):g.jsx(_y,{})}),g.jsx(rc,{label:"BDK",children:d?g.jsx("span",{className:"pg-meta-table__text",children:d}):g.jsx(_y,{})})]})]})}function Die({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(vn,{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 fp(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 dp(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 Lie({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(qt,{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 jie({info:e,onTryRoute:t,readOnly:n=!1}){const[r,s]=v.useState(null),[a,l]=v.useState(new Set),c=e?.tools??[],f=e?.skills??[],d=e?.subagents??[],h=e?.connections??[],m=e?.channels??[],b=e?.hooks??[],y=v.useMemo(()=>{const T=new Map;for(const E of em(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:fp(c),details:dp(c.map(T=>({name:T.name,detail:T.description})))},{id:"skills",label:"Skills",empty:f.length===0,summary:fp(f),details:dp(f.map(T=>({name:T.name,detail:T.description})))},{id:"subagents",label:"Subagents",empty:d.length===0,summary:fp(d),details:dp(d.map(T=>({name:T.name,detail:T.description})))},{id:"connections",label:"MCP Connections",empty:h.length===0,summary:fp(h),details:dp(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(Lie,{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(h2,{channelId:r.channelId,route:r.route,onClose:()=>s(null)}):null]})}function GC(){const e=Ue($=>$.meta),t=Ue($=>$.capabilities),n=Ue($=>$.info),r=Ue($=>$.health),s=Ue($=>$.sessions),a=Ue($=>$.current),l=Ue($=>zre($.traceEvents)),c=Ue($=>$.view),f=Ue($=>$.evalCases),d=Ue($=>$.evalRuns),h=Ue($=>$.evalRun),m=Ue($=>$.evalNavReturn),b=Ue($=>$.overviewSection),y=Ue($=>$.surfaceFocusNonce),k=v.useRef(null);v.useEffect(()=>{y!==0&&k.current?.scrollIntoView({behavior:"smooth",block:"start"})},[y]);const S=e.name||n?.name||"Agent",R=o2(S),T=h??d?.[0]??null,E=h?.status==="running",C=Qe.modelLabel(),_=a?.sessionId??null,D=v.useMemo(()=>{const $=h===null?d:[h,...d],F=new Set($.flatMap(z=>z.cases.flatMap(U=>U.sessionId===void 0?[]:[U.sessionId])));return Pre(s.filter(z=>!F.has(z.sessionId)),_,l)},[s,d,h,_,l]),A=uG(D),M=D0(c),B=m||M==="evals",P=B?null:a?.sessionId??null,N=B?h?.runId??null:null,W=[{id:"home",label:"Agent"},{id:"runs",label:A>0?`Runs (${A})`:"Runs"},...t.evals==="disabled"?[]:[{id:"evals",label:"Evaluations"}],...t.logs==="disabled"?[]:[{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":R,"aria-hidden":"true",children:g.jsx(qt,{name:"robot",variant:"filled",size:24,color:R})}),g.jsxs("div",{className:"pg-overview-identity__text",children:[g.jsx("h1",{className:"pg-overview-identity__name",children:S}),n?.description?g.jsx("p",{className:"pg-overview-identity__description",children:n.description}):null]})]}),g.jsx("div",{className:"pg-tabs",role:"tablist","aria-label":"Overview sections",children:W.map($=>g.jsx("button",{type:"button",role:"tab","aria-selected":b===$.id,className:b===$.id?"pg-tab pg-tab--active":"pg-tab",onClick:()=>Qe.setOverviewSection($.id),children:$.label},$.id))}),b==="home"?g.jsxs(g.Fragment,{children:[g.jsx(Mie,{dev:e.dev,health:r,model:C||void 0,runtime:n?.runtime,sourcePath:n?.local?.cwd,version:e.version,readOnly:e.readonly===!0}),g.jsx(Die,{schedules:n?.schedules??[],dev:e.dev&&e.readonly!==!0&&t.schedules==="enabled",onDispatch:$=>Qe.dispatchSchedule($)}),g.jsx("div",{ref:k,children:g.jsx(jie,{info:n,readOnly:e.readonly===!0||t.channelRoutes!=="enabled"})})]}):null,b==="runs"?g.jsx(Tie,{sessions:D,runs:d,currentSessionId:P,currentEvalRunId:N,readOnly:e.readonly===!0,onSelectSession:$=>Qe.selectSession($),onOpenEvalRun:$=>{Qe.selectEvalRun($)}}):null,b==="evals"?g.jsx(Cie,{cases:f,latestRun:T,running:E,readOnly:e.readonly===!0||t.evals!=="enabled",onRun:$=>{Qe.startEvalRun([$])},onRunAll:()=>{Qe.startEvalRun()}}):null,b==="logs"?g.jsx("div",{className:"pg-overview-logs",children:g.jsx($re,{})}):null]})}const S2="agent-serve.playground.chatPanelWidth.v2",ph=320,zie=.5,Pie=.8;function ic(e){const t=e?.parentElement;return t&&t.clientWidth>0?t.clientWidth:typeof window<"u"?window.innerWidth:1200}function Dv(e){return Math.max(ph,Math.floor(e*Pie))}function yl(e,t){return Math.min(Dv(t),Math.max(ph,Math.round(e)))}function Ay(e){return yl(e*zie,e)}function WC(e){try{const t=localStorage.getItem(S2);if(t===null)return Ay(e);const n=Number.parseInt(t,10);return Number.isFinite(n)?yl(n,e):Ay(e)}catch{return Ay(e)}}function $ie(){const e=Ue(h=>h.chatPanelOpen),t=v.useRef(null),[n,r]=v.useState(()=>WC(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(WC(ic(t.current)));const m=()=>{const y=ic(t.current);r(k=>yl(k,y))},b=new ResizeObserver(m);return b.observe(h),()=>b.disconnect()},[]),v.useEffect(()=>{try{localStorage.setItem(S2,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=ic(t.current);r(yl(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 f=ic(t.current),d=Dv(f);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":ph,"aria-valuemax":d,tabIndex:0,onPointerDown:c,onKeyDown:h=>{const m=ic(t.current);h.key==="ArrowLeft"?(h.preventDefault(),r(b=>yl(b+16,m))):h.key==="ArrowRight"?(h.preventDefault(),r(b=>yl(b-16,m))):h.key==="Home"?(h.preventDefault(),r(ph)):h.key==="End"&&(h.preventDefault(),r(Dv(m)))}}),g.jsx(f2,{variant:"panel"}),g.jsx("div",{className:"pg-transcript-wrap",children:g.jsx(c2,{})})]})}function Bie(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 w2(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 Fie(e){const t=Math.round(Math.min(1,Math.max(0,e.a))*255).toString(16).padStart(2,"0");return`${w2(e)}${t}`.toUpperCase()}const Uie=/^oklch\(\s*([^\s/]+)\s+([^\s/]+)\s+([^\s/)]+?)(?:\s*\/\s*([^)]+?))?\s*\)$/i,qie=/^rgba?\(\s*([0-9.]+)\s*,\s*([0-9.]+)\s*,\s*([0-9.]+)(?:\s*,\s*([0-9.]+))?\s*\)$/i,E2=.5/255;function pp(e,t,n){return Math.min(n,Math.max(t,e))}function Ny(e){const t=Math.abs(e);return t<=.04045?e/12.92:(e<0?-1:1)*((t+.055)/1.055)**2.4}function Oy(e){const t=Math.abs(e);return t<=.0031308?e*12.92:(e<0?-1:1)*(1.055*t**(1/2.4)-.055)}function Hie(e){const t=Ny(e.r/255),n=Ny(e.g/255),r=Ny(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),f=Math.cbrt(a),d=Math.cbrt(l),h=.2104542553*c+.793617785*f-.0040720468*d,m=1.9779984951*c-2.428592205*f+.4505937099*d,b=.0259040371*c+.7827717662*f-.808675766*d,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 Vie(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,f=a*a*a,d=l*l*l,h=4.0767416621*c-3.3077115913*f+.2309699292*d,m=-1.2684380046*c+2.6097574011*f-.3413193965*d,b=-.0041960863*c-.7034186147*f+1.707614701*d;return{r:Math.round(pp(Oy(h),0,1)*255),g:Math.round(pp(Oy(m),0,1)*255),b:Math.round(pp(Oy(b),0,1)*255),a:pp(e.a,0,1)}}function hp(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 T2(e){const t=hp(e.l,3),n=hp(e.c,3),r=n==="0"?"0":hp(e.h,3);return e.a<1-E2?`oklch(${t} ${n} ${r} / ${hp(e.a,3)})`:`oklch(${t} ${n} ${r})`}function mp(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 R2(e){const t=Uie.exec(e.trim());if(t===null)throw new Error(`Invalid oklch: ${e}`);const n=mp(t[1],1),r=mp(t[2],.4),s=mp(t[3],1),a=t[4]===void 0?1:mp(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 Gie(e){const t=qie.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 C2(e){const t=e.trim();if(t.startsWith("#"))return Bie(t);if(t.toLowerCase().startsWith("oklch("))return Vie(R2(t));if(/^rgba?\(/i.test(t))return Gie(t);throw new Error(`Unsupported CSS color: ${e}`)}function Wie(e){return T2(Hie(e))}function Kie(e){const t=e.trim();return t.toLowerCase().startsWith("oklch(")?T2(R2(t)):Wie(C2(t))}function Yie(e){const t=C2(e);return t.a<1-E2?Fie(t):w2(t)}function Xie(e,t){const n=Object.keys(e).sort((l,c)=>l.localeCompare(c)),r=n.map(l=>`${t}--cursor-${l}: ${Yie(e[l])};`),s=`${t} `,a=n.map(l=>`${s}--cursor-${l}: ${Kie(e[l])};`);return[...r,`${t}@supports (color: oklch(0 0 0)) {`,...a,`${t}}`]}const Zie={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)"},Qie={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)"},_2=["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 Jie(e){const t={};for(const n of _2){const r=e[n],s=Xc(n);t[s]=r}return t}function ese(e){return e.highContrast?e.appearance==="light"?"lightHighContrast":"darkHighContrast":e.appearance}const tse={light:{text:{primary:100,secondary:84,tertiary:72,quaternary:52},icon:{primary:92,secondary:70,tertiary:52,quaternary:32},bg:{primary:100,secondary:20,tertiary:18,quaternary:10,quinary:8},border:{primary:92,secondary:56,tertiary:42,quaternary:12}},dark:{text:{primary:100,secondary:78,tertiary:60,quaternary:40},icon:{primary:92,secondary:70,tertiary:52,quaternary:32},bg:{primary:100,secondary:20,tertiary:16,quaternary:8,quinary:8},border:{primary:92,secondary:56,tertiary:42,quaternary:28}}};function nse(e,t,n){const r=tse[n];if(e==="bg")return r.bg[t];if(t==="quinary")throw new Error("mixOpacityPercent: quinary is a bg-only level");return r[e][t]}const rse={red:"red",orange:"orange",yellow:"yellow",green:"green",cyan:"cyan",blue:"blue",magenta:"magenta",purple:"violet"};function ise(e){return Object.keys(e)}const sse=ise(rse),ose=["added","modified","removed","untracked"],ase=["danger","success","warning"],lse={danger:"danger",success:"success",warning:"warn"},P0=["primary","secondary","tertiary","quaternary"];function ma(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Nn(e,t,n,r){return{key:e,hue:t,role:n,level:r}}function use(){return sse.flatMap(e=>{const t=ma(e);return[...P0.flatMap(n=>{const r=ma(n);return[Nn(`text${t}${r}`,e,"text",n),Nn(`icon${t}${r}`,e,"icon",n),Nn(`bg${t}${r}`,e,"bg",n),Nn(`stroke${t}${r}`,e,"border",n)]}),Nn(`bg${t}Quinary`,e,"bg","quinary")]})}function cse(){return ose.flatMap(e=>{const t=ma(e);return[...P0.flatMap(n=>{const r=ma(n);return[Nn(`textGit${t}${r}`,e,"text",n),Nn(`iconGit${t}${r}`,e,"icon",n),Nn(`bgGit${t}${r}`,e,"bg",n)]}),Nn(`strokeGit${t}`,e,"border","primary"),Nn(`strokeGit${t}Secondary`,e,"border","secondary")]})}function fse(){return[...["secondary","tertiary","quaternary"].flatMap(t=>{const n=ma(t);return[Nn(`textAccent${n}`,"accent","text",t),Nn(`iconAccent${n}`,"accent","icon",t),Nn(`bgAccent${n}`,"accent","bg",t),Nn(`strokeAccent${n}`,"accent","border",t)]}),Nn("bgAccentQuinary","accent","bg","quinary"),Nn("strokeAccent","accent","border","primary")]}function dse(){return ase.flatMap(e=>{const t=ma(e);return[...P0.flatMap(n=>{const r=ma(n);return[Nn(`text${t}${r}`,e,"text",n),Nn(`icon${t}${r}`,e,"icon",n)]}),Nn(`bg${t}Primary`,e,"bg","primary"),Nn(`bg${t}Secondary`,e,"bg","secondary"),Nn(`bg${t}Tertiary`,e,"bg","tertiary"),Nn(`bg${t}Quaternary`,e,"bg","quaternary"),Nn(`bg${t}Quinary`,e,"bg","quinary")]})}const A2=[...use(),...cse(),...fse(),...dse()];function pse(e){switch(e){case"accent":return"accent";case"added":case"modified":case"removed":case"untracked":return"git";case"danger":case"success":case"warning":return"status";default:return"hue"}}const KC={all:{border:{primary:56,secondary:32,tertiary:20,quaternary:12}},hue:{text:{primary:100,secondary:78,tertiary:64,quaternary:40},icon:{primary:100,secondary:70,tertiary:56,quaternary:32},bg:{primary:100,secondary:12,tertiary:8,quaternary:6,quinary:4}},git:{text:{primary:100,secondary:78,tertiary:64,quaternary:40},icon:{primary:100,secondary:70,tertiary:56,quaternary:32},bg:{primary:100,secondary:24,tertiary:12,quaternary:8}},accent:{text:{secondary:78,tertiary:64,quaternary:40},icon:{secondary:70,tertiary:56,quaternary:32},bg:{secondary:24,tertiary:12,quaternary:8,quinary:4}},status:{text:{primary:100,secondary:78,tertiary:64,quaternary:40},icon:{primary:100,secondary:70,tertiary:56,quaternary:32},bg:{primary:100,secondary:20,tertiary:18,quaternary:10,quinary:8}}};function hse(e,t,n,r){return KC[pse(e)][t]?.[n]??KC.all[t]?.[n]??nse(t,n,r)}function mse(e){return e==="danger"||e==="success"||e==="warning"?lse[e]:e}function gse(e,t,n,r){const s=hse(e,t,n,r),a=mse(e);return s>=100?{op:"ref",ref:a}:{op:"mixTransparent",ref:a,percent:s}}function bse(e){return e==="dark"||e==="darkHighContrast"?"dark":"light"}function yse(e,t){return JSON.stringify(e)===JSON.stringify(t)}function Lv(e){const t=bse(e);return Object.fromEntries(A2.map(n=>[n.key,gse(n.hue,n.role,n.level,t)]))}function vse(e){return Lv(e)}function Iy(e){const t=Lv("light"),n=Lv(e);return Object.fromEntries(A2.flatMap(r=>{const s=n[r.key];return s===void 0||yse(t[r.key]??s,s)?[]:[[r.key,s]]}))}new Set(_2);const xse=vse("light"),kse={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"},...xse,textAccent:{op:"ref",ref:"accent"},textLink:{op:"ref",ref:"textBluePrimary"},bgLinkHover:{op:"ref",ref:"bgBlueSecondary"},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},iconAccentPrimary:{op:"ref",ref:"accent"},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"},bgGitAddedHover:{op:"mixTwo",k1:"base",p1:10,k2:"added"},bgGitModifiedHover:{op:"mixTwo",k1:"base",p1:10,k2:"modified"},bgGitRemovedHover:{op:"mixTwo",k1:"base",p1:10,k2:"removed"},bgGitUntrackedHover:{op:"mixTwo",k1:"base",p1:10,k2:"untracked"},bgActive:{op:"mixTransparent",ref:"base",percent:16},bgFocused:{op:"mixTransparent",ref:"base",percent:22},bgAccent:{op:"ref",ref:"accent"},bgAccentHover:{op:"mixTwo",k1:"base",p1:10,k2:"accent"},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},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"}]},buttonDangerBackground:{op:"ref",ref:"bgDangerPrimary"},buttonDangerForeground:{op:"ref",ref:"textInvert"},buttonDangerHoverBackground:{op:"mixBlackRef",ref:"danger",colorPercent:85},buttonDangerActiveBackground:{op:"ref",ref:"buttonDangerHoverBackground"},buttonDangerSoftBackground:{op:"ref",ref:"bgDangerQuaternary"},buttonDangerSoftHoverBackground:{op:"ref",ref:"bgDangerTertiary"},controlDisabledBackground:{op:"ref",ref:"bgQuinary"},controlDisabledBorder:{op:"ref",ref:"strokeTertiary"},controlDisabledForeground:{op:"ref",ref:"textQuaternary"},buttonPrimaryBackground:{op:"ref",ref:"bgAccent"},buttonPrimaryForeground:{op:"ref",ref:"actionLabel"},buttonPrimaryHoverBackground:{op:"ref",ref:"bgAccentHover"},buttonPrimaryActiveBackground:{op:"ref",ref:"buttonPrimaryHoverBackground"},buttonSecondaryBackground:{op:"ref",ref:"bgTertiary"},buttonSecondaryForeground:{op:"ref",ref:"textPrimary"},buttonSecondaryHoverBackground:{op:"ref",ref:"bgSecondary"},buttonSuccessBackground:{op:"ref",ref:"bgSuccessPrimary"},buttonSuccessForeground:{op:"ref",ref:"textInvert"},buttonSuccessHoverBackground:{op:"mixWhiteRef",ref:"success",colorPercent:85},buttonSuccessActiveBackground:{op:"ref",ref:"buttonSuccessHoverBackground"},buttonSuccessSoftBackground:{op:"ref",ref:"bgSuccessQuaternary"},buttonSuccessSoftHoverBackground:{op:"ref",ref:"bgSuccessTertiary"},buttonWarningBackground:{op:"ref",ref:"bgWarningPrimary"},buttonWarningForeground:{op:"ref",ref:"textInvert"},buttonWarningHoverBackground:{op:"mixTwoOklab",k1:"base",p1:10,k2:"warn"},buttonWarningActiveBackground:{op:"ref",ref:"buttonWarningHoverBackground"},buttonWarningSoftBackground:{op:"ref",ref:"bgWarningQuaternary"},buttonWarningSoftHoverBackground:{op:"ref",ref:"bgWarningTertiary"},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},bgSearchMatch:{op:"mixTransparentOverlay",ref:"yellow",percent:22},bgSearchMatchCurrent:{op:"mixTransparentOverlay",ref:"yellow",percent:32},textCodeBlockBackground:{op:"ref",ref:"bgElevated"},textLinkActive:{op:"ref",ref:"accent"}},YC={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},textAccentSecondary:{op:"mixTransparent",ref:"accent",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},strokeAccentSecondary:{op:"mixTransparent",ref:"accent",percent:56},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},textRedTertiary:{op:"mixTransparent",ref:"red",percent:76},textOrangeTertiary:{op:"mixTransparent",ref:"orange",percent:76},textYellowTertiary:{op:"mixTransparent",ref:"yellow",percent:76},textGreenTertiary:{op:"mixTransparent",ref:"green",percent:76},textCyanTertiary:{op:"mixTransparent",ref:"cyan",percent:76},textBlueTertiary:{op:"mixTransparent",ref:"blue",percent:76},textMagentaTertiary:{op:"mixTransparent",ref:"magenta",percent:76},textPurpleTertiary:{op:"mixTransparent",ref:"purple",percent:76},textAccentTertiary:{op:"mixTransparent",ref:"accent",percent:76},textRedQuaternary:{op:"mixTransparent",ref:"red",percent:64},textOrangeQuaternary:{op:"mixTransparent",ref:"orange",percent:64},textYellowQuaternary:{op:"mixTransparent",ref:"yellow",percent:64},textGreenQuaternary:{op:"mixTransparent",ref:"green",percent:64},textCyanQuaternary:{op:"mixTransparent",ref:"cyan",percent:64},textBlueQuaternary:{op:"mixTransparent",ref:"blue",percent:64},textMagentaQuaternary:{op:"mixTransparent",ref:"magenta",percent:64},textPurpleQuaternary:{op:"mixTransparent",ref:"purple",percent:64},textAccentQuaternary:{op:"mixTransparent",ref:"accent",percent:64},iconRedTertiary:{op:"mixTransparent",ref:"red",percent:68},iconOrangeTertiary:{op:"mixTransparent",ref:"orange",percent:68},iconYellowTertiary:{op:"mixTransparent",ref:"yellow",percent:68},iconGreenTertiary:{op:"mixTransparent",ref:"green",percent:68},iconCyanTertiary:{op:"mixTransparent",ref:"cyan",percent:68},iconBlueTertiary:{op:"mixTransparent",ref:"blue",percent:68},iconMagentaTertiary:{op:"mixTransparent",ref:"magenta",percent:68},iconPurpleTertiary:{op:"mixTransparent",ref:"purple",percent:68},iconAccentTertiary:{op:"mixTransparent",ref:"accent",percent:68},iconRedQuaternary:{op:"mixTransparent",ref:"red",percent:56},iconOrangeQuaternary:{op:"mixTransparent",ref:"orange",percent:56},iconYellowQuaternary:{op:"mixTransparent",ref:"yellow",percent:56},iconGreenQuaternary:{op:"mixTransparent",ref:"green",percent:56},iconCyanQuaternary:{op:"mixTransparent",ref:"cyan",percent:56},iconBlueQuaternary:{op:"mixTransparent",ref:"blue",percent:56},iconMagentaQuaternary:{op:"mixTransparent",ref:"magenta",percent:56},iconPurpleQuaternary:{op:"mixTransparent",ref:"purple",percent:56},iconAccentQuaternary:{op:"mixTransparent",ref:"accent",percent:56},strokePurplePrimary:{op:"mixTransparent",ref:"purple",percent:80},strokePurpleSecondary:{op:"mixTransparent",ref:"purple",percent:56},strokeRedTertiary:{op:"mixTransparent",ref:"red",percent:40},strokeOrangeTertiary:{op:"mixTransparent",ref:"orange",percent:40},strokeYellowTertiary:{op:"mixTransparent",ref:"yellow",percent:40},strokeGreenTertiary:{op:"mixTransparent",ref:"green",percent:40},strokeCyanTertiary:{op:"mixTransparent",ref:"cyan",percent:40},strokeBlueTertiary:{op:"mixTransparent",ref:"blue",percent:40},strokeMagentaTertiary:{op:"mixTransparent",ref:"magenta",percent:40},strokePurpleTertiary:{op:"mixTransparent",ref:"purple",percent:40},strokeAccentTertiary:{op:"mixTransparent",ref:"accent",percent:40},strokeRedQuaternary:{op:"mixTransparent",ref:"red",percent:28},strokeOrangeQuaternary:{op:"mixTransparent",ref:"orange",percent:28},strokeYellowQuaternary:{op:"mixTransparent",ref:"yellow",percent:28},strokeGreenQuaternary:{op:"mixTransparent",ref:"green",percent:28},strokeCyanQuaternary:{op:"mixTransparent",ref:"cyan",percent:28},strokeBlueQuaternary:{op:"mixTransparent",ref:"blue",percent:28},strokeMagentaQuaternary:{op:"mixTransparent",ref:"magenta",percent:28},strokePurpleQuaternary:{op:"mixTransparent",ref:"purple",percent:28},strokeAccentQuaternary:{op:"mixTransparent",ref:"accent",percent:28}},Sse={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:{...Iy("dark")},lightHighContrast:{...Iy("lightHighContrast"),...YC},darkHighContrast:{...Iy("darkHighContrast"),...YC}};function Qr(e){return`var(--cursor-${Xc(e)})`}function wse(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} ${Qr(e.shadowToken)}`:`${t}${n} color-mix(in srgb, ${Qr("shadowPrimary")} ${e.primaryMixPercent}%, transparent)`}function Ese(e){return e.map(t=>wse(t)).join(", ")}function Tse(e){switch(e.op){case"mixTransparent":case"mixTransparentOverlay":return`color-mix(in srgb, ${Qr(e.ref)} ${e.percent}%, transparent)`;case"mixTwo":return`color-mix(in srgb, ${Qr(e.k1)} ${e.p1}%, ${Qr(e.k2)})`;case"mixTwoOklab":return`color-mix(in oklab, ${Qr(e.k1)} ${e.p1}%, ${Qr(e.k2)})`;case"mixWhiteRef":return`color-mix(in srgb, ${Qr(e.ref)} ${e.colorPercent}%, white)`;case"mixBlackRef":return`color-mix(in srgb, ${Qr(e.ref)} ${e.colorPercent}%, black)`;case"mixBlackChrome":return`color-mix(in srgb, oklch(0 0 0) ${e.blackPercent}%, ${Qr("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, ${Qr(e.ref)} ${e.fadePercent}%, transparent)`:Qr(e.ref);case"shadow":return Ese(e.candidates);case"mixTransparentAlpha":return`color-mix(in srgb, ${Qr(e.key)} ${e.percent}%, transparent)`;default:return e}}function Rse(e){const t=Sse[e];return Object.entries(kse).map(([n,r])=>({name:Xc(n),expr:t[n]??r}))}function Cse(e){const t=Rse(e),n=[];for(const{name:r,expr:s}of t)n.push(` --cursor-${r}: ${Tse(s)};`);return n}function _se(e){const t=Jie(e),n=Xie(t," "),r=ese(e),s=Cse(r).join(`
|
|
63
|
-
`);return`:root {
|
|
64
|
-
${n.join(`
|
|
65
|
-
`)}
|
|
66
|
-
}
|
|
67
|
-
:root {
|
|
68
|
-
${s}
|
|
69
|
-
}`}const jv={fontFamily:Zb.fontFamily,scrollbar:Zb.scrollbar,syntax:Zb.syntax},Ase=[{key:"fontFamily",cssMid:"font-family"},{key:"scrollbar",cssMid:"scrollbar"},{key:"syntax",cssMid:"syntax"}];function Nse(e,t){const n=Xc(t.replace(/\./g,"-"));return`--cursor-${e}-${n}`}function bs(e,t,n,r=""){for(const[s,a]of Object.entries(t)){const l=typeof a=="number"?`${a}${r}`:a;n.push(` ${Nse(e,s)}: ${l};`)}}function Ose(e={}){const t=e.selector??":root",n=e.theme??jv,r=[`${t} {`];for(const{key:s,cssMid:a}of Ase)for(const[l,c]of Object.entries(n[s]))r.push(` --cursor-${a}-${Xc(l)}: ${c};`);return bs("duration",Zy,r,"ms"),bs("easing",wO,r),bs("spacing",V9,r,"px"),bs("radius",G9,r,"px"),bs("height",W9,r,"px"),bs("font-size",K9,r,"px"),bs("line-height",Y9,r,"px"),bs("letter-spacing",X9,r,"px"),bs("elevation",H9,r),r.push("}"),r.join(`
|
|
70
|
-
`)}function Ise(e){const t=_se(e.core),n=Ose(e.nonColor);return`${t}
|
|
71
|
-
${n}`}function Mse(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 Dse(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 Lse(e,t){const n=`${e} ${t}`.toLowerCase();return n.includes("mac")?"mac":n.includes("win")?"windows":"linux"}function jse(e){return Dse(e.platform,Mse(e.locale))}function zse(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 XC="agent-serve-cursor-theme",N2="agent-serve.playground.theme";function O2(){try{return localStorage.getItem(N2)}catch{return null}}function Pse(){return typeof window>"u"||typeof window.matchMedia!="function"?!0:window.matchMedia("(prefers-color-scheme: dark)").matches}function $se(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:O2();return r==="light"||r==="dark"?r:(t.prefersDark!==void 0?t.prefersDark:Pse())?"dark":"light"}function zv(e){const t=document.documentElement;t.dataset.theme=e==="light"?"cursor-light":"cursor-dark",t.style.colorScheme=e;const n=Lse(navigator.userAgent,navigator.platform),r=Ise({core:e==="light"?Qie:Zie,nonColor:{theme:{...jv,fontFamily:{...jv.fontFamily,sans:jse({platform:n,locale:navigator.language}),mono:zse(n)}}}});let s=document.getElementById(XC);s==null&&(s=document.createElement("style"),s.id=XC,document.head.appendChild(s)),s.textContent=r}function Bse(){return document.documentElement.dataset.theme==="cursor-light"?"light":"dark"}function Fse(e){try{localStorage.setItem(N2,e)}catch{}try{const t=new URL(window.location.href);t.searchParams.set("theme",e),history.replaceState(null,"",t.toString())}catch{}zv(e)}function Use(e=window.location.search){if(zv($se(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=O2();s==="light"||s==="dark"||zv(t.matches?"dark":"light")};return t.addEventListener("change",n),()=>t.removeEventListener("change",n)}function qse(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>t.disconnect()}function Hse(){return v.useSyncExternalStore(qse,Bse,()=>"dark")}function ZC({title:e="Playground",onNewChat:t}){const n=Hse(),r=Ue(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(br,{icon:n==="dark"?"sun":"moon",size:"lg","aria-label":n==="dark"?"Switch to light theme":"Switch to dark theme",onClick:()=>Fse(n==="dark"?"light":"dark")})]}),g.jsxs("div",{className:"pg-overview-header__actions",children:[t?g.jsx(vn,{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(C7,{icon:"layout-sidebar-right",size:"lg","aria-label":r?"Close chat panel":"Open chat panel",pressed:r,onPressedChange:s=>Qe.setChatPanelOpen(s)})})]})]})}function Vse(){const e=Ue(t=>t.toast);return e?g.jsx("div",{className:"pg-toast",role:"status","aria-live":"polite",children:e}):null}const Gse=/\b([\w.-]+)\/([\w.-]+)#(\d+)\b/,Wse=/https?:\/\/(?:www\.)?github\.com\/([\w.-]+)\/([\w.-]+)\/pull\/(\d+)/i;function Kse(e){const t=Xse(e.externalUrl),n=QC(e.prUrl)??QC(e.externalUrl)??Yse(e.title);return{slack:t,github:n!==void 0&&n!==t?n:void 0}}function Yse(e){const n=e.match(Wse)??e.match(Gse);if(n!==null)return`https://github.com/${n[1]}/${n[2]}/pull/${n[3]}`}function Xse(e){if(!(e===null||e===""||!Qse(e)||iM(e)))return Zse(e)?e:void 0}function QC(e){if(!(e==null||e===""))return iM(e)?e:void 0}function Zse(e){try{const t=new URL(e).hostname.toLowerCase();return t==="slack.com"||t.endsWith(".slack.com")}catch{return!1}}function Qse(e){return e.startsWith("https://")||e.startsWith("http://")}const Jse=[{value:"overview",label:"Overview"},{value:"chat",label:"Chat"},{value:"trace",label:"Trace"},{value:"raw",label:"Raw"},{value:"evals",label:"Evals"},{value:"artifacts",label:"Artifacts"}],I2="(max-width: 640px)";function eoe(e){const t=window.matchMedia(I2);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function toe(){return v.useSyncExternalStore(eoe,()=>window.matchMedia(I2).matches)}function noe(){const e=Ue(_=>_.barTitle),t=Ue(_=>_.barId),n=Ue(_=>_.externalUrl),r=Ue(_=>_.current),s=Ue(_=>_.view),a=Ue(_=>_.authToken),l=Ue(_=>_.aliasHosted),c=Ue(_=>_.embedded),f=Ue(_=>_.evalNavReturn),d=Ue(_=>_.evalRun),h=Ue(_=>_.info),m=toe(),b=u2(Jse,h,s),y=r?.sessionId??null,k=f&&s!=="evals"&&d!==null,S=Kse({title:e,externalUrl:n,prUrl:r?.prUrl}),R=S.slack,T=S.github,E=async()=>{if(y)try{const _=await Qe.api.eventsText(y);if(!_.ok){Qe.toast(`Download failed (${_.status})`);return}const D=await _.blob(),A=URL.createObjectURL(D),M=document.createElement("a");M.href=A,M.download=`${y}.events.ndjson`,M.target="_self",document.body.appendChild(M),M.click(),M.remove(),URL.revokeObjectURL(A)}catch(_){Qe.toast(`Download failed: ${_ instanceof Error?_.message:String(_)}`)}},C=m?g.jsx(k7,{size:"md","aria-label":"Visualization mode",value:s,onValueChange:_=>Qe.setView(_??"overview"),options:b}):g.jsx(vc,{size:"sm",variant:"compact",value:s,onValueChange:_=>Qe.setView(_),"aria-label":"Visualization mode",children:b.map(_=>g.jsx(vc.Item,{value:_.value,children:_.label},_.value))});return g.jsxs("div",{className:"pg-topbar",children:[g.jsx(br,{icon:"arrow-left",size:"sm","aria-label":"Back to overview",onClick:()=>Qe.backToOverview()}),k?g.jsx(vn,{variant:"secondary",size:"sm",onClick:()=>Qe.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(pa,{className:"tlink",href:R,title:"Open the Slack thread",children:"Open in Slack"}):null,T!==void 0?g.jsx(pa,{className:"tlink",href:T,title:"Open the GitHub pull request",children:"Open in GitHub"}):null,y?g.jsx(vn,{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(ei,{children:[g.jsx(ei.Trigger,{children:g.jsx(br,{icon:"dots-3-horizontal",size:"sm","aria-label":"More actions"})}),g.jsxs(ei.Content,{"aria-label":"Session actions",size:"sm",children:[R!==void 0?g.jsx(ei.Item,{onSelect:()=>window.open(R,"_blank","noopener,noreferrer"),children:"Open in Slack"}):null,T!==void 0?g.jsx(ei.Item,{onSelect:()=>window.open(T,"_blank","noopener,noreferrer"),children:"Open in GitHub"}):null,y!==null?g.jsx(ei.Item,{onSelect:()=>{E()},children:"Download event log"}):null]})]}):null,l?null:g.jsx("div",{className:"pg-token",children:g.jsx(rf,{type:"password",size:"md","aria-label":"Bearer token",placeholder:"Bearer token (optional)",value:a,onChange:_=>Qe.setAuthToken(_.target.value),title:"Sent as Authorization: Bearer ... on API calls"})})]})}const M2="(min-width: 1201px)";function roe(e){const t=window.matchMedia(M2);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function ioe(){return window.matchMedia(M2).matches}function soe(){return!0}function ooe(){return v.useSyncExternalStore(roe,ioe,soe)}function aoe(){const e=Ue(h=>h.view),t=Ue(h=>h.drawerOpen),n=Ue(h=>h.aliasHosted),r=Ue(h=>h.aliasToken),s=Ue(h=>h.embedded),a=Ue(h=>h.meta.readonly===!0),c=Ue(h=>h.capabilities.composer)==="enabled"&&Qe.hasCapability(yt.sessionStart),f=ooe();if(v.useEffect(()=>{Qe.boot()},[]),n&&r.trim()==="")return s?g.jsx(xW,{}):g.jsx(vW,{});const d=f||s;return g.jsxs("div",{className:"pg-app",children:[g.jsx("div",{className:"pg-main",children:d?g.jsxs("div",{className:"pg-overview-layout",children:[g.jsxs("div",{className:"pg-overview-main",children:[g.jsx(ZC,{onNewChat:a||!c?void 0:()=>Qe.newChat()}),g.jsx("div",{className:"pg-overview-scroll",children:g.jsx(GC,{})})]}),g.jsx($ie,{})]}):e==="overview"?g.jsxs("div",{className:"pg-overview-main",children:[g.jsx(ZC,{onNewChat:a||!c?void 0:()=>Qe.newChat()}),g.jsx("div",{className:"pg-overview-scroll",children:g.jsx(GC,{})})]}):s?g.jsxs(g.Fragment,{children:[g.jsx(noe,{}),g.jsxs("div",{className:"pg-columns",children:[e==="chat"?g.jsxs("div",{className:"pg-transcript-wrap",children:[g.jsx(s2,{}),g.jsx(kM,{})]}):null,e==="trace"?g.jsx(OM,{}):null,e==="raw"?g.jsx(_M,{}):null,e==="evals"?g.jsx(TM,{}):null,e==="artifacts"?g.jsx(xM,{}):null]})]}):g.jsx(Are,{})}),t?g.jsx("button",{type:"button","aria-label":"Close agent surface",className:"pg-drawer-backdrop",onClick:()=>Qe.setDrawerOpen(!1)}):null,g.jsx(Lre,{}),g.jsx(Vse,{})]})}Use();wW();const D2=document.getElementById("root");if(D2===null)throw new Error("Playground bootstrap failed: #root element is missing.");Wj.createRoot(D2).render(g.jsx(v.StrictMode,{children:g.jsx(Is,{menuSize:"md",children:g.jsx(aoe,{})})}));
|