@cursor/bdk 0.2.18 → 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/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.CJ-XZTK5.js → app.BzgJFr_T.js} +4 -4
- package/dist/docs/assets/chunks/@localSearchIndexroot.gGwBYU3d.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.CpbYgURZ.js → VPLocalSearchBox.Bn5QyUDM.js} +1 -1
- package/dist/docs/assets/chunks/{arc.B081PemO.js → arc.D734Gm5d.js} +1 -1
- package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.DPaT_hi-.js → architectureDiagram-Q4EWVU46.NX1jj-YX.js} +1 -1
- package/dist/docs/assets/chunks/{baseUniq.Buu61NLg.js → baseUniq.nd8dxdeO.js} +1 -1
- package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.C6t63owh.js → blockDiagram-DXYQGD6D.DG8faTim.js} +1 -1
- package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.BtKabdXR.js → c4Diagram-AHTNJAMY.zD31AJ3b.js} +1 -1
- package/dist/docs/assets/chunks/channel.DQLJQMi3.js +1 -0
- package/dist/docs/assets/chunks/{chunk-4BX2VUAB.DQpNaR8N.js → chunk-4BX2VUAB.BHQj6Rko.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-4TB4RGXK.DrhL-6Rv.js → chunk-4TB4RGXK.Cs38Yh16.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-55IACEB6.DRLIBfNR.js → chunk-55IACEB6.CFUR21JO.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-EDXVE4YY.kuUuFkIg.js → chunk-EDXVE4YY.C80-Sneg.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-FMBD7UC4.BlrVxprw.js → chunk-FMBD7UC4.CdT1MGza.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-OYMX7WX6.CZCfYeQA.js → chunk-OYMX7WX6.BctEzab0.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-QZHKN3VN.C7rwVEMV.js → chunk-QZHKN3VN.DTneeX3k.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-YZCP3GAM.CGseJtT_.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.BWlczAK4.js → cose-bilkent-S5V4N54A.BPYgB-_O.js} +1 -1
- package/dist/docs/assets/chunks/{dagre-KV5264BT.Cw0tT0bB.js → dagre-KV5264BT.Cu6hECod.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-5BDNPKRD.Cm96ah9V.js → diagram-5BDNPKRD.BMgp95Tz.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.Cl0AoWYM.js → diagram-G4DWMVQ6.towWdhDi.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-MMDJMWI5.Bp7mlzKs.js → diagram-MMDJMWI5.D9IfOvE9.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-TYMM5635.ClVeqpcW.js → diagram-TYMM5635.NTX57RPu.js} +1 -1
- package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.Bi8dojF9.js → erDiagram-SMLLAGMA.DIQLqDqu.js} +1 -1
- package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.Bb4urpfG.js → flowDiagram-DWJPFMVM.DhqpItRe.js} +1 -1
- package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.whR4wFze.js → ganttDiagram-T4ZO3ILL.B998R3Ps.js} +1 -1
- package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.6oVMi6-3.js → gitGraphDiagram-UUTBAWPF.B45nTn8-.js} +1 -1
- package/dist/docs/assets/chunks/{graph.D8AJDOFK.js → graph.DPseWzzM.js} +1 -1
- package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.nTpsf5Vk.js → infoDiagram-42DDH7IO._GhhBBai.js} +1 -1
- package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.DhYDOwyB.js → ishikawaDiagram-UXIWVN3A.CTUMcaMM.js} +1 -1
- package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.Bg7Rudw3.js → journeyDiagram-VCZTEJTY.DkJBUddC.js} +1 -1
- package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.D80D_ZAR.js → kanban-definition-6JOO6SKY.B5Q3uwhy.js} +1 -1
- package/dist/docs/assets/chunks/{layout.e9hmuC-K.js → layout.CDY13IKh.js} +1 -1
- package/dist/docs/assets/chunks/{linear.D6hEyqVB.js → linear.BPd1ql9p.js} +1 -1
- package/dist/docs/assets/chunks/{min.BPAdvB9D.js → min.dlGuqIBP.js} +1 -1
- package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.tm2Sov2Q.js → mindmap-definition-QFDTVHPH.Cp7zCtmb.js} +1 -1
- package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.BKHZ497m.js → pieDiagram-DEJITSTG.CRH034nu.js} +1 -1
- package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.CPj7gSp6.js → quadrantDiagram-34T5L4WZ.BspgZ-pX.js} +1 -1
- package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E._U68yVUd.js → requirementDiagram-MS252O5E.CQZqZ0nZ.js} +1 -1
- package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6._6jrIQPb.js → sankeyDiagram-XADWPNL6.DllwFU3k.js} +1 -1
- package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.D9UlmB6F.js → sequenceDiagram-FGHM5R23.B5fTXycf.js} +1 -1
- package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.BQSaiJCe.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.25ZC61Iy.js → theme.BgocqONV.js} +2 -2
- package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.d-17NZ3L.js → timeline-definition-GMOUNBTQ.DXKUL5rH.js} +1 -1
- package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.DE9AGEjG.js → vennDiagram-DHZGUBPP.BrsjYCjp.js} +1 -1
- package/dist/docs/assets/chunks/{wardley-RL74JXVD.BcY0KddE.js → wardley-RL74JXVD.DZDndEXQ.js} +1 -1
- package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.D9SDNipV.js → wardleyDiagram-NUSXRM2D.C4oM69gv.js} +1 -1
- package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.DM1sIMf8.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/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/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} +15 -23
- package/dist/internal/event-log.d.ts +2 -2
- package/dist/internal/event-log.js +2 -2
- package/dist/internal/http-channel.js +1 -1
- package/dist/internal/init-scaffold.d.ts.map +1 -1
- package/dist/internal/init-scaffold.js +3 -4
- 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/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +5 -13
- 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 +22 -40
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +62 -109
- 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/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 +17 -26
- 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 +4 -3
- package/templates/agentic-owners/bot/lib/owners/matching.ts +57 -2
- package/dist/docs/assets/chunks/@localSearchIndexroot.ylB4B_Ud.js +0 -1
- package/dist/docs/assets/chunks/channel.BgjgeSqp.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CIVv63wE.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CIVv63wE.js +0 -1
- package/dist/docs/assets/chunks/clone.HcW7h-70.js +0 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.B5d7jT7E.js +0 -1
- 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-DBmD_cqy.woff2 +0 -0
- package/dist/playground/assets/index-BDPd0Sec.css +0 -1
- package/dist/playground/assets/index-BrXDwbrN.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
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
function Fj(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 qc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Bj(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 db={exports:{}},Fu={};var gw;function Uj(){if(gw)return Fu;gw=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 Fu.Fragment=t,Fu.jsx=n,Fu.jsxs=n,Fu}var bw;function Hj(){return bw||(bw=1,db.exports=Uj()),db.exports}var g=Hj(),pb={exports:{}},At={};var yw;function qj(){if(yw)return At;yw=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),b=Symbol.iterator;function y(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,T={};function R(j,V,L){this.props=j,this.context=V,this.refs=T,this.updater=L||k}R.prototype.isReactComponent={},R.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")},R.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function E(){}E.prototype=R.prototype;function _(j,V,L){this.props=j,this.context=V,this.refs=T,this.updater=L||k}var C=_.prototype=new E;C.constructor=_,S(C,R.prototype),C.isPureReactComponent=!0;var D=Array.isArray;function N(){}var M={H:null,A:null,T:null,S:null},B=Object.prototype.hasOwnProperty;function P(j,V,L){var Z=L.ref;return{$$typeof:e,type:j,key:V,ref:Z!==void 0?Z:null,props:L}}function A(j,V){return P(j.type,V,j.props)}function K(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(N,N):(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 q(j,V,L,Z,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,q(oe(j._payload),V,L,Z,se)}}if(oe)return se=se(j),oe=Z===""?"."+z(j,0):Z,D(se)?(L="",oe!=null&&(L=oe.replace(F,"$&/")+"/"),q(se,V,L,"",function(we){return we})):se!=null&&(K(se)&&(se=A(se,L+(se.key==null||j&&j.key===se.key?"":(""+se.key).replace(F,"$&/")+"/")+oe)),V.push(se)),1;oe=0;var ae=Z===""?".":Z+":";if(D(j))for(var ue=0;ue<j.length;ue++)Z=j[ue],ne=ae+z(Z,ue),oe+=q(Z,V,L,ne,se);else if(ue=y(j),typeof ue=="function")for(j=ue.call(j),ue=0;!(Z=j.next()).done;)Z=Z.value,ne=ae+z(Z,ue++),oe+=q(Z,V,L,ne,se);else if(ne==="object"){if(typeof j.then=="function")return q(U(j),V,L,Z,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 W(j,V,L){if(j==null)return j;var Z=[],se=0;return q(j,Z,"","",function(ne){return V.call(L,ne,se++)}),Z}function H(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:W,forEach:function(j,V,L){W(j,function(){V.apply(this,arguments)},L)},count:function(j){var V=0;return W(j,function(){V++}),V},toArray:function(j){return W(j,function(V){return V})||[]},only:function(j){if(!K(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return At.Activity=m,At.Children=O,At.Component=R,At.Fragment=n,At.Profiler=s,At.PureComponent=_,At.StrictMode=r,At.Suspense=d,At.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,At.__COMPILER_RUNTIME={__proto__:null,c:function(j){return M.H.useMemoCache(j)}},At.cache=function(j){return function(){return j.apply(null,arguments)}},At.cacheSignal=function(){return null},At.cloneElement=function(j,V,L){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var Z=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||(Z[ne]=V[ne]);var ne=arguments.length-2;if(ne===1)Z.children=L;else if(1<ne){for(var oe=Array(ne),ae=0;ae<ne;ae++)oe[ae]=arguments[ae+2];Z.children=oe}return P(j.type,se,Z)},At.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},At.createElement=function(j,V,L){var Z,se={},ne=null;if(V!=null)for(Z in V.key!==void 0&&(ne=""+V.key),V)B.call(V,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(se[Z]=V[Z]);var oe=arguments.length-2;if(oe===1)se.children=L;else if(1<oe){for(var ae=Array(oe),ue=0;ue<oe;ue++)ae[ue]=arguments[ue+2];se.children=ae}if(j&&j.defaultProps)for(Z in oe=j.defaultProps,oe)se[Z]===void 0&&(se[Z]=oe[Z]);return P(j,ne,se)},At.createRef=function(){return{current:null}},At.forwardRef=function(j){return{$$typeof:c,render:j}},At.isValidElement=K,At.lazy=function(j){return{$$typeof:h,_payload:{_status:-1,_result:j},_init:H}},At.memo=function(j,V){return{$$typeof:f,type:j,compare:V===void 0?null:V}},At.startTransition=function(j){var V=M.T,L={};M.T=L;try{var Z=j(),se=M.S;se!==null&&se(L,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(N,Y)}catch(ne){Y(ne)}finally{V!==null&&L.types!==null&&(V.types=L.types),M.T=V}},At.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},At.use=function(j){return M.H.use(j)},At.useActionState=function(j,V,L){return M.H.useActionState(j,V,L)},At.useCallback=function(j,V){return M.H.useCallback(j,V)},At.useContext=function(j){return M.H.useContext(j)},At.useDebugValue=function(){},At.useDeferredValue=function(j,V){return M.H.useDeferredValue(j,V)},At.useEffect=function(j,V){return M.H.useEffect(j,V)},At.useEffectEvent=function(j){return M.H.useEffectEvent(j)},At.useId=function(){return M.H.useId()},At.useImperativeHandle=function(j,V,L){return M.H.useImperativeHandle(j,V,L)},At.useInsertionEffect=function(j,V){return M.H.useInsertionEffect(j,V)},At.useLayoutEffect=function(j,V){return M.H.useLayoutEffect(j,V)},At.useMemo=function(j,V){return M.H.useMemo(j,V)},At.useOptimistic=function(j,V){return M.H.useOptimistic(j,V)},At.useReducer=function(j,V,L){return M.H.useReducer(j,V,L)},At.useRef=function(j){return M.H.useRef(j)},At.useState=function(j){return M.H.useState(j)},At.useSyncExternalStore=function(j,V,L){return M.H.useSyncExternalStore(j,V,L)},At.useTransition=function(){return M.H.useTransition()},At.version="19.2.6",At}var vw;function Vc(){return vw||(vw=1,pb.exports=qj()),pb.exports}var v=Vc();const ic=qc(v),Bv=Fj({__proto__:null,default:ic},[v]);var hb={exports:{}},Bu={},mb={exports:{}},gb={};var xw;function Vj(){return xw||(xw=1,(function(e){function t(q,W){var H=q.length;q.push(W);e:for(;0<H;){var Y=H-1>>>1,O=q[Y];if(0<s(O,W))q[Y]=W,q[H]=O,H=Y;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var W=q[0],H=q.pop();if(H!==W){q[0]=H;e:for(var Y=0,O=q.length,j=O>>>1;Y<j;){var V=2*(Y+1)-1,L=q[V],Z=V+1,se=q[Z];if(0>s(L,H))Z<O&&0>s(se,L)?(q[Y]=se,q[Z]=H,Y=Z):(q[Y]=L,q[V]=H,Y=V);else if(Z<O&&0>s(se,H))q[Y]=se,q[Z]=H,Y=Z;else break e}}return W}function s(q,W){var H=q.sortIndex-W.sortIndex;return H!==0?H:q.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],f=[],h=1,m=null,b=3,y=!1,k=!1,S=!1,T=!1,R=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function C(q){for(var W=n(f);W!==null;){if(W.callback===null)r(f);else if(W.startTime<=q)r(f),W.sortIndex=W.expirationTime,t(d,W);else break;W=n(f)}}function D(q){if(S=!1,C(q),!k)if(n(d)!==null)k=!0,N||(N=!0,$());else{var W=n(f);W!==null&&U(D,W.startTime-q)}}var N=!1,M=-1,B=5,P=-1;function A(){return T?!0:!(e.unstable_now()-P<B)}function K(){if(T=!1,N){var q=e.unstable_now();P=q;var W=!0;try{e:{k=!1,S&&(S=!1,E(M),M=-1),y=!0;var H=b;try{t:{for(C(q),m=n(d);m!==null&&!(m.expirationTime>q&&A());){var Y=m.callback;if(typeof Y=="function"){m.callback=null,b=m.priorityLevel;var O=Y(m.expirationTime<=q);if(q=e.unstable_now(),typeof O=="function"){m.callback=O,C(q),W=!0;break t}m===n(d)&&r(d),C(q)}else r(d);m=n(d)}if(m!==null)W=!0;else{var j=n(f);j!==null&&U(D,j.startTime-q),W=!1}}break e}finally{m=null,b=H,y=!1}W=void 0}}finally{W?$():N=!1}}}var $;if(typeof _=="function")$=function(){_(K)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,z=F.port2;F.port1.onmessage=K,$=function(){z.postMessage(null)}}else $=function(){R(K,0)};function U(q,W){M=R(function(){q(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(q){switch(b){case 1:case 2:case 3:var W=3;break;default:W=b}var H=b;b=W;try{return q()}finally{b=H}},e.unstable_requestPaint=function(){T=!0},e.unstable_runWithPriority=function(q,W){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var H=b;b=q;try{return W()}finally{b=H}},e.unstable_scheduleCallback=function(q,W,H){var Y=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?Y+H:Y):H=Y,q){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=H+O,q={id:h++,callback:W,priorityLevel:q,startTime:H,expirationTime:O,sortIndex:-1},H>Y?(q.sortIndex=H,t(f,q),n(d)===null&&q===n(f)&&(S?(E(M),M=-1):S=!0,U(D,H-Y))):(q.sortIndex=O,t(d,q),k||y||(k=!0,N||(N=!0,$()))),q},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(q){var W=b;return function(){var H=b;b=W;try{return q.apply(this,arguments)}finally{b=H}}}})(gb)),gb}var kw;function Gj(){return kw||(kw=1,mb.exports=Vj()),mb.exports}var bb={exports:{}},dr={};var Sw;function Wj(){if(Sw)return dr;Sw=1;var e=Vc();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)f+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function a(d,f,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:m==null?null:""+m,children:d,containerInfo:f,implementation:h}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return dr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,dr.createPortal=function(d,f){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return a(d,f,null,h)},dr.flushSync=function(d){var f=l.T,h=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=h,r.d.f()}},dr.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},dr.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},dr.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var h=f.as,m=c(h,f.crossOrigin),b=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;h==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:m,integrity:b,fetchPriority:y}):h==="script"&&r.d.X(d,{crossOrigin:m,integrity:b,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},dr.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=c(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},dr.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,m=c(h,f.crossOrigin);r.d.L(d,h,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},dr.preloadModule=function(d,f){if(typeof d=="string")if(f){var h=c(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},dr.requestFormReset=function(d){r.d.r(d)},dr.unstable_batchedUpdates=function(d,f){return d(f)},dr.useFormState=function(d,f,h){return l.H.useFormState(d,f,h)},dr.useFormStatus=function(){return l.H.useHostTransitionStatus()},dr.version="19.2.6",dr}var ww;function e_(){if(ww)return bb.exports;ww=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(),bb.exports=Wj(),bb.exports}var Ew;function Kj(){if(Ew)return Bu;Ew=1;var e=Gj(),t=Vc(),n=e_();function r(i){var o="https://react.dev/errors/"+i;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)o+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function a(i){var o=i,u=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(u=o.return),i=o.return;while(i)}return o.tag===3?u:null}function l(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function c(i){if(i.tag===31){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function d(i){if(a(i)!==i)throw Error(r(188))}function f(i){var o=i.alternate;if(!o){if(o=a(i),o===null)throw Error(r(188));return o!==i?null:i}for(var u=i,p=o;;){var x=u.return;if(x===null)break;var w=x.alternate;if(w===null){if(p=x.return,p!==null){u=p;continue}break}if(x.child===w.child){for(w=x.child;w;){if(w===u)return d(x),i;if(w===p)return d(x),o;w=w.sibling}throw Error(r(188))}if(u.return!==p.return)u=x,p=w;else{for(var 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"),T=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),_=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),A=Symbol.for("react.memo_cache_sentinel"),K=Symbol.iterator;function $(i){return i===null||typeof i!="object"?null:(i=K&&i[K]||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 R:return"Profiler";case T:return"StrictMode";case D:return"Suspense";case N:return"SuspenseList";case P:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case k:return"Portal";case _:return i.displayName||"Context";case E:return(i._context.displayName||"Context")+".Consumer";case C: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,q=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={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 Z=j(null),se=j(null),ne=j(null),oe=j(null);function ae(i,o){switch(L(ne,o),L(se,i),L(Z,null),o.nodeType){case 9:case 11:i=(i=o.documentElement)&&(i=i.namespaceURI)?$S(i):0;break;default:if(i=o.tagName,o=o.namespaceURI)o=$S(o),i=FS(o,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}V(Z),L(Z,i)}function ue(){V(Z),V(se),V(ne)}function we(i){i.memoizedState!==null&&L(oe,i);var o=Z.current,u=FS(o,i.type);o!==u&&(L(se,i),L(Z,u))}function me(i){se.current===i&&(V(Z),V(se)),oe.current===i&&(V(oe),ju._currentValue=H)}var ce,be;function ve(i){if(ce===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);ce=o&&o[1]||"",be=-1<u.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+ce+i+be}var Re=!1;function Se(i,o){if(!i||Re)return"";Re=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(o){var Ne=function(){throw Error()};if(Object.defineProperty(Ne.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ne,[])}catch(ye){var ge=ye}Reflect.construct(i,[],Ne)}else{try{Ne.call()}catch(ye){ge=ye}i.call(Ne.prototype)}}else{try{throw Error()}catch(ye){ge=ye}(Ne=i())&&typeof Ne.catch=="function"&&Ne.catch(function(){})}}catch(ye){if(ye&&ge&&typeof ye.stack=="string")return[ye.stack,ge.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 Q=I.split(`
|
|
4
|
+
`),pe=G.split(`
|
|
5
|
+
`);for(x=p=0;p<Q.length&&!Q[p].includes("DetermineComponentFrameRoot");)p++;for(;x<pe.length&&!pe[x].includes("DetermineComponentFrameRoot");)x++;if(p===Q.length||x===pe.length)for(p=Q.length-1,x=pe.length-1;1<=p&&0<=x&&Q[p]!==pe[x];)x--;for(;1<=p&&0<=x;p--,x--)if(Q[p]!==pe[x]){if(p!==1||x!==1)do if(p--,x--,0>x||Q[p]!==pe[x]){var Ee=`
|
|
6
|
+
`+Q[p].replace(" at new "," at ");return i.displayName&&Ee.includes("<anonymous>")&&(Ee=Ee.replace("<anonymous>",i.displayName)),Ee}while(1<=p&&0<=x);break}}}finally{Re=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?ve(u):""}function ke(i,o){switch(i.tag){case 26:case 27:case 5:return ve(i.type);case 16:return ve("Lazy");case 13:return i.child!==o&&o!==null?ve("Suspense Fallback"):ve("Suspense");case 19:return ve("SuspenseList");case 0:case 15:return Se(i.type,!1);case 11:return Se(i.type.render,!1);case 1:return Se(i.type,!0);case 31:return ve("Activity");default:return""}}function Ae(i){try{var o="",u=null;do o+=ke(i,u),u=i,i=i.return;while(i);return o}catch(p){return`
|
|
7
|
+
Error generating stack: `+p.message+`
|
|
8
|
+
`+p.stack}}var Oe=Object.prototype.hasOwnProperty,Me=e.unstable_scheduleCallback,Ue=e.unstable_cancelCallback,xe=e.unstable_shouldYield,_e=e.unstable_requestPaint,ee=e.unstable_now,fe=e.unstable_getCurrentPriorityLevel,J=e.unstable_ImmediatePriority,re=e.unstable_UserBlockingPriority,Te=e.unstable_NormalPriority,Le=e.unstable_LowPriority,Ke=e.unstable_IdlePriority,Qe=e.log,gt=e.unstable_setDisableYieldValue,Je=null,xt=null;function Rt(i){if(typeof Qe=="function"&>(i),xt&&typeof xt.setStrictMode=="function")try{xt.setStrictMode(Je,i)}catch{}}var rt=Math.clz32?Math.clz32:He,et=Math.log,ze=Math.LN2;function He(i){return i>>>=0,i===0?32:31-(et(i)/ze|0)|0}var Ze=256,ft=262144,Tt=4194304;function ot(i){var o=i&42;if(o!==0)return o;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function X(i,o,u){var p=i.pendingLanes;if(p===0)return 0;var x=0,w=i.suspendedLanes,I=i.pingedLanes;i=i.warmLanes;var G=p&134217727;return G!==0?(p=G&~w,p!==0?x=ot(p):(I&=G,I!==0?x=ot(I):u||(u=G&~i,u!==0&&(x=ot(u))))):(G=p&~w,G!==0?x=ot(G):I!==0?x=ot(I):u||(u=p&~i,u!==0&&(x=ot(u)))),x===0?0:o!==0&&o!==x&&(o&w)===0&&(w=x&-x,u=o&-o,w>=u||w===32&&(u&4194048)!==0)?o:x}function he(i,o){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&o)===0}function Ie(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 tt(){var i=Tt;return Tt<<=1,(Tt&62914560)===0&&(Tt=4194304),i}function _t(i){for(var o=[],u=0;31>u;u++)o.push(i);return o}function dt(i,o){i.pendingLanes|=o,o!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function Ve(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,Q=i.expirationTimes,pe=i.hiddenUpdates;for(u=I&~u;0<u;){var Ee=31-rt(u),Ne=1<<Ee;G[Ee]=0,Q[Ee]=-1;var ge=pe[Ee];if(ge!==null)for(pe[Ee]=null,Ee=0;Ee<ge.length;Ee++){var ye=ge[Ee];ye!==null&&(ye.lane&=-536870913)}u&=~Ne}p!==0&&Be(i,p,0),w!==0&&x===0&&i.tag!==0&&(i.suspendedLanes|=w&~(I&~o))}function Be(i,o,u){i.pendingLanes|=o,i.suspendedLanes&=~o;var p=31-rt(o);i.entangledLanes|=o,i.entanglements[p]=i.entanglements[p]|1073741824|u&261930}function nt(i,o){var u=i.entangledLanes|=o;for(i=i.entanglements;u;){var p=31-rt(u),x=1<<p;x&o|i[p]&o&&(i[p]|=o),u&=~x}}function Ge(i,o){var u=o&-o;return u=(u&42)!==0?1:Pe(u),(u&(i.suspendedLanes|o))!==0?0:u}function Pe(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 ct(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Pt(){var i=W.p;return i!==0?i:(i=window.event,i===void 0?32:uw(i.type))}function qt(i,o){var u=W.p;try{return W.p=i,o()}finally{W.p=u}}var Xe=Math.random().toString(36).slice(2),It="__reactFiber$"+Xe,ut="__reactProps$"+Xe,kn="__reactContainer$"+Xe,Yn="__reactEvents$"+Xe,Xn="__reactListeners$"+Xe,tr="__reactHandles$"+Xe,Sn="__reactResources$"+Xe,Hr="__reactMarker$"+Xe;function ji(i){delete i[It],delete i[ut],delete i[Yn],delete i[Xn],delete i[tr]}function Bn(i){var o=i[It];if(o)return o;for(var u=i.parentNode;u;){if(o=u[kn]||u[It]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(i=WS(i);i!==null;){if(u=i[It])return u;i=WS(i)}return o}i=u,u=i.parentNode}return null}function kr(i){if(i=i[It]||i[kn]){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[Sn];return o||(o=i[Sn]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Un(i){i[Hr]=!0}var mf=new Set,Io={};function Qi(i,o){De(i,o),De(i+"Capture",o)}function De(i,o){for(Io[i]=o,i=0;i<o.length;i++)mf.add(o[i])}var pt=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={},sn={};function Ln(i){return Oe.call(sn,i)?!0:Oe.call(jt,i)?!1:pt.test(i)?sn[i]=!0:(jt[i]=!0,!1)}function fr(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 qr(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 Ar(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 wn(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Vr(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function gf(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 Ra(i){if(!i._valueTracker){var o=Vr(i)?"checked":"value";i._valueTracker=gf(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=Vr(i)?i.checked?"true":"false":i.value),i=p,i!==u?(o.setValue(i),!0):!1}function Ca(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 fm=/[\n"\\]/g;function Nr(i){return i.replace(fm,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=""+wn(o)):i.value!==""+wn(o)&&(i.value=""+wn(o)):I!=="submit"&&I!=="reset"||i.removeAttribute("value"),o!=null?_a(i,I,wn(o)):u!=null?_a(i,I,wn(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=""+wn(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)){Ra(i);return}u=u!=null?""+wn(u):"",o=o!=null?""+wn(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),Ra(i)}function _a(i,o,u){o==="number"&&Ca(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function ir(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=""+wn(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 bf(i,o,u){if(o!=null&&(o=""+wn(o),o!==i.value&&(i.value=o),u==null)){i.defaultValue!==o&&(i.defaultValue=o);return}i.defaultValue=u!=null?""+wn(u):""}function Aa(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=wn(o),i.defaultValue=u,p=i.textContent,p===u&&p!==""&&p!==null&&(i.value=p),Ra(i)}function Et(i,o){if(o){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=o;return}}i.textContent=o}var yf=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 Hn(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||yf.has(o)?o==="float"?i.cssFloat=u:i[o]=(""+u).trim():i[o]=u+"px"}function on(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&&Hn(i,x,p)}else for(var w in o)o.hasOwnProperty(w)&&Hn(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 qe(){}var at=null;function Nt(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Vt=null,An=null;function si(i){var o=kr(i);if(o&&(i=o.stateNode)){var u=i[ut]||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="'+Nr(""+o)+'"][type="radio"]'),o=0;o<u.length;o++){var p=u[o];if(p!==i&&p.form===i.form){var x=p[ut]||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":bf(i,u.value,u.defaultValue);break e;case"select":o=u.value,o!=null&&ir(i,!!u.multiple,o,!1)}}}var Ql=!1;function vf(i,o,u){if(Ql)return i(o,u);Ql=!0;try{var p=i(o);return p}finally{if(Ql=!1,(Vt!==null||An!==null)&&(od(),Vt&&(o=Vt,i=An,An=Vt=null,si(o),i)))for(o=0;o<i.length;o++)si(i[o])}}function Jl(i,o){var u=i.stateNode;if(u===null)return null;var p=u[ut]||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"),dm=!1;if(es)try{var eu={};Object.defineProperty(eu,"passive",{get:function(){dm=!0}}),window.addEventListener("test",eu,eu),window.removeEventListener("test",eu,eu)}catch{dm=!1}var Fs=null,pm=null,xf=null;function Fx(){if(xf)return xf;var i,o=pm,u=o.length,p,x="value"in Fs?Fs.value:Fs.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 xf=x.slice(i,1<p?1-p:void 0)}function kf(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 Sf(){return!0}function Bx(){return!1}function Or(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)?Sf:Bx,this.isPropagationStopped=Bx,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=Sf)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Sf)},persist:function(){},isPersistent:Sf}),o}var Do={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wf=Or(Do),tu=m({},Do,{view:0,detail:0}),PD=Or(tu),hm,mm,nu,Ef=m({},tu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bm,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"?(hm=i.screenX-nu.screenX,mm=i.screenY-nu.screenY):mm=hm=0,nu=i),hm)},movementY:function(i){return"movementY"in i?i.movementY:mm}}),Ux=Or(Ef),$D=m({},Ef,{dataTransfer:0}),FD=Or($D),BD=m({},tu,{relatedTarget:0}),gm=Or(BD),UD=m({},Do,{animationName:0,elapsedTime:0,pseudoElement:0}),HD=Or(UD),qD=m({},Do,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),VD=Or(qD),GD=m({},Do,{data:0}),Hx=Or(GD),WD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},KD={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"},YD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function XD(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=YD[i])?!!o[i]:!1}function bm(){return XD}var ZD=m({},tu,{key:function(i){if(i.key){var o=WD[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=kf(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?KD[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bm,charCode:function(i){return i.type==="keypress"?kf(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?kf(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),QD=Or(ZD),JD=m({},Ef,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qx=Or(JD),eL=m({},tu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bm}),tL=Or(eL),nL=m({},Do,{propertyName:0,elapsedTime:0,pseudoElement:0}),rL=Or(nL),iL=m({},Ef,{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}),sL=Or(iL),oL=m({},Do,{newState:0,oldState:0}),aL=Or(oL),lL=[9,13,27,32],ym=es&&"CompositionEvent"in window,ru=null;es&&"documentMode"in document&&(ru=document.documentMode);var uL=es&&"TextEvent"in window&&!ru,Vx=es&&(!ym||ru&&8<ru&&11>=ru),Gx=" ",Wx=!1;function Kx(i,o){switch(i){case"keyup":return lL.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yx(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Na=!1;function cL(i,o){switch(i){case"compositionend":return Yx(o);case"keypress":return o.which!==32?null:(Wx=!0,Gx);case"textInput":return i=o.data,i===Gx&&Wx?null:i;default:return null}}function fL(i,o){if(Na)return i==="compositionend"||!ym&&Kx(i,o)?(i=Fx(),xf=pm=Fs=null,Na=!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 Vx&&o.locale!=="ko"?null:o.data;default:return null}}var dL={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 Xx(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!dL[i.type]:o==="textarea"}function Zx(i,o,u,p){Vt?An?An.push(p):An=[p]:Vt=p,o=pd(o,"onChange"),0<o.length&&(u=new wf("onChange","change",null,u,p),i.push({event:u,listeners:o}))}var iu=null,su=null;function pL(i){MS(i,0)}function Tf(i){var o=js(i);if(Yl(o))return i}function Qx(i,o){if(i==="change")return o}var Jx=!1;if(es){var vm;if(es){var xm="oninput"in document;if(!xm){var ek=document.createElement("div");ek.setAttribute("oninput","return;"),xm=typeof ek.oninput=="function"}vm=xm}else vm=!1;Jx=vm&&(!document.documentMode||9<document.documentMode)}function tk(){iu&&(iu.detachEvent("onpropertychange",nk),su=iu=null)}function nk(i){if(i.propertyName==="value"&&Tf(su)){var o=[];Zx(o,su,i,Nt(i)),vf(pL,o)}}function hL(i,o,u){i==="focusin"?(tk(),iu=o,su=u,iu.attachEvent("onpropertychange",nk)):i==="focusout"&&tk()}function mL(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Tf(su)}function gL(i,o){if(i==="click")return Tf(o)}function bL(i,o){if(i==="input"||i==="change")return Tf(o)}function yL(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var Gr=typeof Object.is=="function"?Object.is:yL;function ou(i,o){if(Gr(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(!Oe.call(o,x)||!Gr(i[x],o[x]))return!1}return!0}function rk(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function ik(i,o){var u=rk(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=rk(u)}}function sk(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?sk(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function ok(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var o=Ca(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=Ca(i.document)}return o}function km(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 vL=es&&"documentMode"in document&&11>=document.documentMode,Oa=null,Sm=null,au=null,wm=!1;function ak(i,o,u){var p=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;wm||Oa==null||Oa!==Ca(p)||(p=Oa,"selectionStart"in p&&km(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=pd(Sm,"onSelect"),0<p.length&&(o=new wf("onSelect","select",null,o,u),i.push({event:o,listeners:p}),o.target=Oa)))}function Lo(i,o){var u={};return u[i.toLowerCase()]=o.toLowerCase(),u["Webkit"+i]="webkit"+o,u["Moz"+i]="moz"+o,u}var Ia={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")},Em={},lk={};es&&(lk=document.createElement("div").style,"AnimationEvent"in window||(delete Ia.animationend.animation,delete Ia.animationiteration.animation,delete Ia.animationstart.animation),"TransitionEvent"in window||delete Ia.transitionend.transition);function jo(i){if(Em[i])return Em[i];if(!Ia[i])return i;var o=Ia[i],u;for(u in o)if(o.hasOwnProperty(u)&&u in lk)return Em[i]=o[u];return i}var uk=jo("animationend"),ck=jo("animationiteration"),fk=jo("animationstart"),xL=jo("transitionrun"),kL=jo("transitionstart"),SL=jo("transitioncancel"),dk=jo("transitionend"),pk=new Map,Tm="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(" ");Tm.push("scrollEnd");function ki(i,o){pk.set(i,o),Qi(o,[i])}var Rf=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)},oi=[],Ma=0,Rm=0;function Cf(){for(var i=Ma,o=Rm=Ma=0;o<i;){var u=oi[o];oi[o++]=null;var p=oi[o];oi[o++]=null;var x=oi[o];oi[o++]=null;var w=oi[o];if(oi[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&&hk(u,x,w)}}function _f(i,o,u,p){oi[Ma++]=i,oi[Ma++]=o,oi[Ma++]=u,oi[Ma++]=p,Rm|=p,i.lanes|=p,i=i.alternate,i!==null&&(i.lanes|=p)}function Cm(i,o,u,p){return _f(i,o,u,p),Af(i)}function zo(i,o){return _f(i,null,null,o),Af(i)}function hk(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-rt(u),i=w.hiddenUpdates,p=i[x],p===null?i[x]=[o]:p.push(o),o.lane=u|536870912),w):null}function Af(i){if(50<Au)throw Au=0,jg=null,Error(r(185));for(var o=i.return;o!==null;)i=o,o=i.return;return i.tag===3?i.stateNode:null}var Da={};function wL(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 Wr(i,o,u,p){return new wL(i,o,u,p)}function _m(i){return i=i.prototype,!(!i||!i.isReactComponent)}function ts(i,o){var u=i.alternate;return u===null?(u=Wr(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 mk(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 Nf(i,o,u,p,x,w){var I=0;if(p=i,typeof i=="function")_m(i)&&(I=1);else if(typeof i=="string")I=_j(i,u,Z.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case P:return i=Wr(31,u,o,x),i.elementType=P,i.lanes=w,i;case S:return Po(u.children,x,w,o);case T:I=8,x|=24;break;case R:return i=Wr(12,u,o,x|2),i.elementType=R,i.lanes=w,i;case D:return i=Wr(13,u,o,x),i.elementType=D,i.lanes=w,i;case N:return i=Wr(19,u,o,x),i.elementType=N,i.lanes=w,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case _:I=10;break e;case E:I=9;break e;case C: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=Wr(I,u,o,x),o.elementType=i,o.type=p,o.lanes=w,o}function Po(i,o,u,p){return i=Wr(7,i,p,o),i.lanes=u,i}function Am(i,o,u){return i=Wr(6,i,null,o),i.lanes=u,i}function gk(i){var o=Wr(18,null,null,0);return o.stateNode=i,o}function Nm(i,o,u){return o=Wr(4,i.children!==null?i.children:[],i.key,o),o.lanes=u,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}var bk=new WeakMap;function ai(i,o){if(typeof i=="object"&&i!==null){var u=bk.get(i);return u!==void 0?u:(o={value:i,source:o,stack:Ae(o)},bk.set(i,o),o)}return{value:i,source:o,stack:Ae(o)}}var La=[],ja=0,Of=null,lu=0,li=[],ui=0,Bs=null,zi=1,Pi="";function ns(i,o){La[ja++]=lu,La[ja++]=Of,Of=i,lu=o}function yk(i,o,u){li[ui++]=zi,li[ui++]=Pi,li[ui++]=Bs,Bs=i;var p=zi;i=Pi;var x=32-rt(p)-1;p&=~(1<<x),u+=1;var w=32-rt(o)+x;if(30<w){var I=x-x%5;w=(p&(1<<I)-1).toString(32),p>>=I,x-=I,zi=1<<32-rt(o)+x|u<<x|p,Pi=w+i}else zi=1<<w|u<<x|p,Pi=i}function Om(i){i.return!==null&&(ns(i,1),yk(i,1,0))}function Im(i){for(;i===Of;)Of=La[--ja],La[ja]=null,lu=La[--ja],La[ja]=null;for(;i===Bs;)Bs=li[--ui],li[ui]=null,Pi=li[--ui],li[ui]=null,zi=li[--ui],li[ui]=null}function vk(i,o){li[ui++]=zi,li[ui++]=Pi,li[ui++]=Bs,zi=o.id,Pi=o.overflow,Bs=i}var sr=null,Rn=null,Yt=!1,Us=null,ci=!1,Mm=Error(r(519));function Hs(i){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw uu(ai(o,i)),Mm}function xk(i){var o=i.stateNode,u=i.type,p=i.memoizedProps;switch(o[It]=i,o[ut]=p,u){case"dialog":Ft("cancel",o),Ft("close",o);break;case"iframe":case"object":case"embed":Ft("load",o);break;case"video":case"audio":for(u=0;u<Ou.length;u++)Ft(Ou[u],o);break;case"source":Ft("error",o);break;case"img":case"image":case"link":Ft("error",o),Ft("load",o);break;case"details":Ft("toggle",o);break;case"input":Ft("invalid",o),Mo(o,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":Ft("invalid",o);break;case"textarea":Ft("invalid",o),Aa(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||zS(o.textContent,u)?(p.popover!=null&&(Ft("beforetoggle",o),Ft("toggle",o)),p.onScroll!=null&&Ft("scroll",o),p.onScrollEnd!=null&&Ft("scrollend",o),p.onClick!=null&&(o.onclick=qe),o=!0):o=!1,o||Hs(i,!0)}function kk(i){for(sr=i.return;sr;)switch(sr.tag){case 5:case 31:case 13:ci=!1;return;case 27:case 3:ci=!0;return;default:sr=sr.return}}function za(i){if(i!==sr)return!1;if(!Yt)return kk(i),Yt=!0,!1;var o=i.tag,u;if((u=o!==3&&o!==27)&&((u=o===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||Zg(i.type,i.memoizedProps)),u=!u),u&&Rn&&Hs(i),kk(i),o===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Rn=GS(i)}else if(o===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Rn=GS(i)}else o===27?(o=Rn,ro(i.type)?(i=nb,nb=null,Rn=i):Rn=o):Rn=sr?di(i.stateNode.nextSibling):null;return!0}function $o(){Rn=sr=null,Yt=!1}function Dm(){var i=Us;return i!==null&&(Lr===null?Lr=i:Lr.push.apply(Lr,i),Us=null),i}function uu(i){Us===null?Us=[i]:Us.push(i)}var Lm=j(null),Fo=null,rs=null;function qs(i,o,u){L(Lm,o._currentValue),o._currentValue=u}function is(i){i._currentValue=Lm.current,V(Lm)}function jm(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 zm(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 Q=0;Q<o.length;Q++)if(G.context===o[Q]){w.lanes|=u,G=w.alternate,G!==null&&(G.lanes|=u),jm(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),jm(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 Pa(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;Gr(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&&zm(o,i,u,p),o.flags|=262144}function If(i){for(i=i.firstContext;i!==null;){if(!Gr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Bo(i){Fo=i,rs=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function or(i){return Sk(Fo,i)}function Mf(i,o){return Fo===null&&Bo(i),Sk(i,o)}function Sk(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 EL=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()})}},TL=e.unstable_scheduleCallback,RL=e.unstable_NormalPriority,qn={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Pm(){return{controller:new EL,data:new Map,refCount:0}}function cu(i){i.refCount--,i.refCount===0&&TL(RL,function(){i.controller.abort()})}var fu=null,$m=0,$a=0,Fa=null;function CL(i,o){if(fu===null){var u=fu=[];$m=0,$a=Ug(),Fa={status:"pending",value:void 0,then:function(p){u.push(p)}}}return $m++,o.then(wk,wk),o}function wk(){if(--$m===0&&fu!==null){Fa!==null&&(Fa.status="fulfilled");var i=fu;fu=null,$a=0,Fa=null;for(var o=0;o<i.length;o++)(0,i[o])()}}function _L(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 Ek=q.S;q.S=function(i,o){aS=ee(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&CL(i,o),Ek!==null&&Ek(i,o)};var Uo=j(null);function Fm(){var i=Uo.current;return i!==null?i:bn.pooledCache}function Df(i,o){o===null?L(Uo,Uo.current):L(Uo,o.pool)}function Tk(){var i=Fm();return i===null?null:{parent:qn._currentValue,pool:i}}var Ba=Error(r(460)),Bm=Error(r(474)),Lf=Error(r(542)),jf={then:function(){}};function Rk(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Ck(i,o,u){switch(u=i[u],u===void 0?i.push(o):u!==o&&(o.then(qe,qe),o=u),o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,Ak(i),i;default:if(typeof o.status=="string")o.then(qe,qe);else{if(i=bn,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,Ak(i),i}throw qo=o,Ba}}function Ho(i){try{var o=i._init;return o(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(qo=u,Ba):u}}var qo=null;function _k(){if(qo===null)throw Error(r(459));var i=qo;return qo=null,i}function Ak(i){if(i===Ba||i===Lf)throw Error(r(483))}var Ua=null,du=0;function zf(i){var o=du;return du+=1,Ua===null&&(Ua=[]),Ck(Ua,i,o)}function pu(i,o){o=o.props.ref,i.ref=o!==void 0?o:null}function Pf(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 Nk(i){function o(le,ie){if(i){var de=le.deletions;de===null?(le.deletions=[ie],le.flags|=16):de.push(ie)}}function u(le,ie){if(!i)return null;for(;ie!==null;)o(le,ie),ie=ie.sibling;return null}function p(le){for(var ie=new Map;le!==null;)le.key!==null?ie.set(le.key,le):ie.set(le.index,le),le=le.sibling;return ie}function x(le,ie){return le=ts(le,ie),le.index=0,le.sibling=null,le}function w(le,ie,de){return le.index=de,i?(de=le.alternate,de!==null?(de=de.index,de<ie?(le.flags|=67108866,ie):de):(le.flags|=67108866,ie)):(le.flags|=1048576,ie)}function I(le){return i&&le.alternate===null&&(le.flags|=67108866),le}function G(le,ie,de,Ce){return ie===null||ie.tag!==6?(ie=Am(de,le.mode,Ce),ie.return=le,ie):(ie=x(ie,de),ie.return=le,ie)}function Q(le,ie,de,Ce){var ht=de.type;return ht===S?Ee(le,ie,de.props.children,Ce,de.key):ie!==null&&(ie.elementType===ht||typeof ht=="object"&&ht!==null&&ht.$$typeof===B&&Ho(ht)===ie.type)?(ie=x(ie,de.props),pu(ie,de),ie.return=le,ie):(ie=Nf(de.type,de.key,de.props,null,le.mode,Ce),pu(ie,de),ie.return=le,ie)}function pe(le,ie,de,Ce){return ie===null||ie.tag!==4||ie.stateNode.containerInfo!==de.containerInfo||ie.stateNode.implementation!==de.implementation?(ie=Nm(de,le.mode,Ce),ie.return=le,ie):(ie=x(ie,de.children||[]),ie.return=le,ie)}function Ee(le,ie,de,Ce,ht){return ie===null||ie.tag!==7?(ie=Po(de,le.mode,Ce,ht),ie.return=le,ie):(ie=x(ie,de),ie.return=le,ie)}function Ne(le,ie,de){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return ie=Am(""+ie,le.mode,de),ie.return=le,ie;if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case y:return de=Nf(ie.type,ie.key,ie.props,null,le.mode,de),pu(de,ie),de.return=le,de;case k:return ie=Nm(ie,le.mode,de),ie.return=le,ie;case B:return ie=Ho(ie),Ne(le,ie,de)}if(U(ie)||$(ie))return ie=Po(ie,le.mode,de,null),ie.return=le,ie;if(typeof ie.then=="function")return Ne(le,zf(ie),de);if(ie.$$typeof===_)return Ne(le,Mf(le,ie),de);Pf(le,ie)}return null}function ge(le,ie,de,Ce){var ht=ie!==null?ie.key:null;if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return ht!==null?null:G(le,ie,""+de,Ce);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case y:return de.key===ht?Q(le,ie,de,Ce):null;case k:return de.key===ht?pe(le,ie,de,Ce):null;case B:return de=Ho(de),ge(le,ie,de,Ce)}if(U(de)||$(de))return ht!==null?null:Ee(le,ie,de,Ce,null);if(typeof de.then=="function")return ge(le,ie,zf(de),Ce);if(de.$$typeof===_)return ge(le,ie,Mf(le,de),Ce);Pf(le,de)}return null}function ye(le,ie,de,Ce,ht){if(typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint")return le=le.get(de)||null,G(ie,le,""+Ce,ht);if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case y:return le=le.get(Ce.key===null?de:Ce.key)||null,Q(ie,le,Ce,ht);case k:return le=le.get(Ce.key===null?de:Ce.key)||null,pe(ie,le,Ce,ht);case B:return Ce=Ho(Ce),ye(le,ie,de,Ce,ht)}if(U(Ce)||$(Ce))return le=le.get(de)||null,Ee(ie,le,Ce,ht,null);if(typeof Ce.then=="function")return ye(le,ie,de,zf(Ce),ht);if(Ce.$$typeof===_)return ye(le,ie,de,Mf(ie,Ce),ht);Pf(ie,Ce)}return null}function it(le,ie,de,Ce){for(var ht=null,Jt=null,lt=ie,Mt=ie=0,Wt=null;lt!==null&&Mt<de.length;Mt++){lt.index>Mt?(Wt=lt,lt=null):Wt=lt.sibling;var en=ge(le,lt,de[Mt],Ce);if(en===null){lt===null&&(lt=Wt);break}i&<&&en.alternate===null&&o(le,lt),ie=w(en,ie,Mt),Jt===null?ht=en:Jt.sibling=en,Jt=en,lt=Wt}if(Mt===de.length)return u(le,lt),Yt&&ns(le,Mt),ht;if(lt===null){for(;Mt<de.length;Mt++)lt=Ne(le,de[Mt],Ce),lt!==null&&(ie=w(lt,ie,Mt),Jt===null?ht=lt:Jt.sibling=lt,Jt=lt);return Yt&&ns(le,Mt),ht}for(lt=p(lt);Mt<de.length;Mt++)Wt=ye(lt,le,Mt,de[Mt],Ce),Wt!==null&&(i&&Wt.alternate!==null&<.delete(Wt.key===null?Mt:Wt.key),ie=w(Wt,ie,Mt),Jt===null?ht=Wt:Jt.sibling=Wt,Jt=Wt);return i&<.forEach(function(lo){return o(le,lo)}),Yt&&ns(le,Mt),ht}function wt(le,ie,de,Ce){if(de==null)throw Error(r(151));for(var ht=null,Jt=null,lt=ie,Mt=ie=0,Wt=null,en=de.next();lt!==null&&!en.done;Mt++,en=de.next()){lt.index>Mt?(Wt=lt,lt=null):Wt=lt.sibling;var lo=ge(le,lt,en.value,Ce);if(lo===null){lt===null&&(lt=Wt);break}i&<&&lo.alternate===null&&o(le,lt),ie=w(lo,ie,Mt),Jt===null?ht=lo:Jt.sibling=lo,Jt=lo,lt=Wt}if(en.done)return u(le,lt),Yt&&ns(le,Mt),ht;if(lt===null){for(;!en.done;Mt++,en=de.next())en=Ne(le,en.value,Ce),en!==null&&(ie=w(en,ie,Mt),Jt===null?ht=en:Jt.sibling=en,Jt=en);return Yt&&ns(le,Mt),ht}for(lt=p(lt);!en.done;Mt++,en=de.next())en=ye(lt,le,Mt,en.value,Ce),en!==null&&(i&&en.alternate!==null&<.delete(en.key===null?Mt:en.key),ie=w(en,ie,Mt),Jt===null?ht=en:Jt.sibling=en,Jt=en);return i&<.forEach(function($j){return o(le,$j)}),Yt&&ns(le,Mt),ht}function fn(le,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 ht=de.key;ie!==null;){if(ie.key===ht){if(ht=de.type,ht===S){if(ie.tag===7){u(le,ie.sibling),Ce=x(ie,de.props.children),Ce.return=le,le=Ce;break e}}else if(ie.elementType===ht||typeof ht=="object"&&ht!==null&&ht.$$typeof===B&&Ho(ht)===ie.type){u(le,ie.sibling),Ce=x(ie,de.props),pu(Ce,de),Ce.return=le,le=Ce;break e}u(le,ie);break}else o(le,ie);ie=ie.sibling}de.type===S?(Ce=Po(de.props.children,le.mode,Ce,de.key),Ce.return=le,le=Ce):(Ce=Nf(de.type,de.key,de.props,null,le.mode,Ce),pu(Ce,de),Ce.return=le,le=Ce)}return I(le);case k:e:{for(ht=de.key;ie!==null;){if(ie.key===ht)if(ie.tag===4&&ie.stateNode.containerInfo===de.containerInfo&&ie.stateNode.implementation===de.implementation){u(le,ie.sibling),Ce=x(ie,de.children||[]),Ce.return=le,le=Ce;break e}else{u(le,ie);break}else o(le,ie);ie=ie.sibling}Ce=Nm(de,le.mode,Ce),Ce.return=le,le=Ce}return I(le);case B:return de=Ho(de),fn(le,ie,de,Ce)}if(U(de))return it(le,ie,de,Ce);if($(de)){if(ht=$(de),typeof ht!="function")throw Error(r(150));return de=ht.call(de),wt(le,ie,de,Ce)}if(typeof de.then=="function")return fn(le,ie,zf(de),Ce);if(de.$$typeof===_)return fn(le,ie,Mf(le,de),Ce);Pf(le,de)}return typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint"?(de=""+de,ie!==null&&ie.tag===6?(u(le,ie.sibling),Ce=x(ie,de),Ce.return=le,le=Ce):(u(le,ie),Ce=Am(de,le.mode,Ce),Ce.return=le,le=Ce),I(le)):u(le,ie)}return function(le,ie,de,Ce){try{du=0;var ht=fn(le,ie,de,Ce);return Ua=null,ht}catch(lt){if(lt===Ba||lt===Lf)throw lt;var Jt=Wr(29,lt,null,le.mode);return Jt.lanes=Ce,Jt.return=le,Jt}}}var Vo=Nk(!0),Ok=Nk(!1),Vs=!1;function Um(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hm(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=Af(i),hk(i,null,u),o}return _f(i,p,o,u),Af(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,nt(i,u)}}function qm(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 Vm=!1;function mu(){if(Vm){var i=Fa;if(i!==null)throw i}}function gu(i,o,u,p){Vm=!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 Q=G,pe=Q.next;Q.next=null,I===null?w=pe:I.next=pe,I=Q;var Ee=i.alternate;Ee!==null&&(Ee=Ee.updateQueue,G=Ee.lastBaseUpdate,G!==I&&(G===null?Ee.firstBaseUpdate=pe:G.next=pe,Ee.lastBaseUpdate=Q))}if(w!==null){var Ne=x.baseState;I=0,Ee=pe=Q=null,G=w;do{var ge=G.lane&-536870913,ye=ge!==G.lane;if(ye?(Gt&ge)===ge:(p&ge)===ge){ge!==0&&ge===$a&&(Vm=!0),Ee!==null&&(Ee=Ee.next={lane:0,tag:G.tag,payload:G.payload,callback:null,next:null});e:{var it=i,wt=G;ge=o;var fn=u;switch(wt.tag){case 1:if(it=wt.payload,typeof it=="function"){Ne=it.call(fn,Ne,ge);break e}Ne=it;break e;case 3:it.flags=it.flags&-65537|128;case 0:if(it=wt.payload,ge=typeof it=="function"?it.call(fn,Ne,ge):it,ge==null)break e;Ne=m({},Ne,ge);break e;case 2:Vs=!0}}ge=G.callback,ge!==null&&(i.flags|=64,ye&&(i.flags|=8192),ye=x.callbacks,ye===null?x.callbacks=[ge]:ye.push(ge))}else ye={lane:ge,tag:G.tag,payload:G.payload,callback:G.callback,next:null},Ee===null?(pe=Ee=ye,Q=Ne):Ee=Ee.next=ye,I|=ge;if(G=G.next,G===null){if(G=x.shared.pending,G===null)break;ye=G,G=ye.next,ye.next=null,x.lastBaseUpdate=ye,x.shared.pending=null}}while(!0);Ee===null&&(Q=Ne),x.baseState=Q,x.firstBaseUpdate=pe,x.lastBaseUpdate=Ee,w===null&&(x.shared.lanes=0),Qs|=I,i.lanes=I,i.memoizedState=Ne}}function Ik(i,o){if(typeof i!="function")throw Error(r(191,i));i.call(o)}function Mk(i,o){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)Ik(u[i],o)}var Ha=j(null),$f=j(0);function Dk(i,o){i=ps,L($f,i),L(Ha,o),ps=i|o.baseLanes}function Gm(){L($f,ps),L(Ha,Ha.current)}function Wm(){ps=$f.current,V(Ha),V($f)}var Kr=j(null),fi=null;function Ks(i){var o=i.alternate;L(jn,jn.current&1),L(Kr,i),fi===null&&(o===null||Ha.current!==null||o.memoizedState!==null)&&(fi=i)}function Km(i){L(jn,jn.current),L(Kr,i),fi===null&&(fi=i)}function Lk(i){i.tag===22?(L(jn,jn.current),L(Kr,i),fi===null&&(fi=i)):Ys()}function Ys(){L(jn,jn.current),L(Kr,Kr.current)}function Yr(i){V(Kr),fi===i&&(fi=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||eb(u)||tb(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,un=null,Vn=null,Bf=!1,qa=!1,Go=!1,Uf=0,bu=0,Va=null,AL=0;function Mn(){throw Error(r(321))}function Ym(i,o){if(o===null)return!1;for(var u=0;u<o.length&&u<i.length;u++)if(!Gr(i[u],o[u]))return!1;return!0}function Xm(i,o,u,p,x,w){return ss=w,Ot=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,q.H=i===null||i.memoizedState===null?y1:fg,Go=!1,w=u(p,x),Go=!1,qa&&(w=zk(o,u,p,x)),jk(i),w}function jk(i){q.H=xu;var o=un!==null&&un.next!==null;if(ss=0,Vn=un=Ot=null,Bf=!1,bu=0,Va=null,o)throw Error(r(300));i===null||Gn||(i=i.dependencies,i!==null&&If(i)&&(Gn=!0))}function zk(i,o,u,p){Ot=i;var x=0;do{if(qa&&(Va=null),bu=0,qa=!1,25<=x)throw Error(r(301));if(x+=1,Vn=un=null,i.updateQueue!=null){var w=i.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}q.H=v1,w=o(u,p)}while(qa);return w}function NL(){var i=q.H,o=i.useState()[0];return o=typeof o.then=="function"?yu(o):o,i=i.useState()[0],(un!==null?un.memoizedState:null)!==i&&(Ot.flags|=1024),o}function Zm(){var i=Uf!==0;return Uf=0,i}function Qm(i,o,u){o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~u}function Jm(i){if(Bf){for(i=i.memoizedState;i!==null;){var o=i.queue;o!==null&&(o.pending=null),i=i.next}Bf=!1}ss=0,Vn=un=Ot=null,qa=!1,bu=Uf=0,Va=null}function Sr(){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(un===null){var i=Ot.alternate;i=i!==null?i.memoizedState:null}else i=un.next;var o=Vn===null?Ot.memoizedState:Vn.next;if(o!==null)Vn=o,un=i;else{if(i===null)throw Ot.alternate===null?Error(r(467)):Error(r(310));un=i,i={memoizedState:un.memoizedState,baseState:un.baseState,baseQueue:un.baseQueue,queue:un.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,Va===null&&(Va=[]),i=Ck(Va,i,o),o=Ot,(Vn===null?o.memoizedState:Vn.next)===null&&(o=o.alternate,q.H=o===null||o.memoizedState===null?y1:fg),i}function qf(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return yu(i);if(i.$$typeof===_)return or(i)}throw Error(r(438,String(i)))}function eg(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]=A;return o.index++,u}function os(i,o){return typeof o=="function"?o(i):o}function Vf(i){var o=zn();return tg(o,un,i)}function tg(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,Q=null,pe=o,Ee=!1;do{var Ne=pe.lane&-536870913;if(Ne!==pe.lane?(Gt&Ne)===Ne:(ss&Ne)===Ne){var ge=pe.revertLane;if(ge===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null}),Ne===$a&&(Ee=!0);else if((ss&ge)===ge){pe=pe.next,ge===$a&&(Ee=!0);continue}else Ne={lane:0,revertLane:pe.revertLane,gesture:null,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null},Q===null?(G=Q=Ne,I=w):Q=Q.next=Ne,Ot.lanes|=ge,Qs|=ge;Ne=pe.action,Go&&u(w,Ne),w=pe.hasEagerState?pe.eagerState:u(w,Ne)}else ge={lane:Ne,revertLane:pe.revertLane,gesture:pe.gesture,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null},Q===null?(G=Q=ge,I=w):Q=Q.next=ge,Ot.lanes|=Ne,Qs|=Ne;pe=pe.next}while(pe!==null&&pe!==o);if(Q===null?I=w:Q.next=G,!Gr(w,i.memoizedState)&&(Gn=!0,Ee&&(u=Fa,u!==null)))throw u;i.memoizedState=w,i.baseState=I,i.baseQueue=Q,p.lastRenderedState=w}return x===null&&(p.lanes=0),[i.memoizedState,p.dispatch]}function ng(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);Gr(w,o.memoizedState)||(Gn=!0),o.memoizedState=w,o.baseQueue===null&&(o.baseState=w),u.lastRenderedState=w}return[w,p]}function Pk(i,o,u){var p=Ot,x=zn(),w=Yt;if(w){if(u===void 0)throw Error(r(407));u=u()}else u=o();var I=!Gr((un||x).memoizedState,u);if(I&&(x.memoizedState=u,Gn=!0),x=x.queue,sg(Bk.bind(null,p,x,i),[i]),x.getSnapshot!==o||I||Vn!==null&&Vn.memoizedState.tag&1){if(p.flags|=2048,Ga(9,{destroy:void 0},Fk.bind(null,p,x,u,o),null),bn===null)throw Error(r(349));w||(ss&127)!==0||$k(p,o,u)}return u}function $k(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 Fk(i,o,u,p){o.value=u,o.getSnapshot=p,Uk(o)&&Hk(i)}function Bk(i,o,u){return u(function(){Uk(o)&&Hk(i)})}function Uk(i){var o=i.getSnapshot;i=i.value;try{var u=o();return!Gr(i,u)}catch{return!0}}function Hk(i){var o=zo(i,2);o!==null&&jr(o,i,2)}function rg(i){var o=Sr();if(typeof i=="function"){var u=i;if(i=u(),Go){Rt(!0);try{u()}finally{Rt(!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,tg(i,un,typeof p=="function"?p:os)}function OL(i,o,u,p,x){if(Kf(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)}};q.T!==null?u(!0):w.isTransition=!1,p(w),u=o.pending,u===null?(w.next=o.pending=w,Vk(o,w)):(w.next=u.next,o.pending=u.next=w)}}function Vk(i,o){var u=o.action,p=o.payload,x=i.state;if(o.isTransition){var w=q.T,I={};q.T=I;try{var G=u(x,p),Q=q.S;Q!==null&&Q(I,G),Gk(i,o,G)}catch(pe){ig(i,o,pe)}finally{w!==null&&I.types!==null&&(w.types=I.types),q.T=w}}else try{w=u(x,p),Gk(i,o,w)}catch(pe){ig(i,o,pe)}}function Gk(i,o,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(p){Wk(i,o,p)},function(p){return ig(i,o,p)}):Wk(i,o,u)}function Wk(i,o,u){o.status="fulfilled",o.value=u,Kk(o),i.state=u,o=i.pending,o!==null&&(u=o.next,u===o?i.pending=null:(u=u.next,o.next=u,Vk(i,u)))}function ig(i,o,u){var p=i.pending;if(i.pending=null,p!==null){p=p.next;do o.status="rejected",o.reason=u,Kk(o),o=o.next;while(o!==p)}i.action=null}function Kk(i){i=i.listeners;for(var o=0;o<i.length;o++)(0,i[o])()}function Yk(i,o){return o}function Xk(i,o){if(Yt){var u=bn.formState;if(u!==null){e:{var p=Ot;if(Yt){if(Rn){t:{for(var x=Rn,w=ci;x.nodeType!==8;){if(!w){x=null;break t}if(x=di(x.nextSibling),x===null){x=null;break t}}w=x.data,x=w==="F!"||w==="F"?x:null}if(x){Rn=di(x.nextSibling),p=x.data==="F!";break e}}Hs(p)}p=!1}p&&(o=u[0])}}return u=Sr(),u.memoizedState=u.baseState=o,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yk,lastRenderedState:o},u.queue=p,u=m1.bind(null,Ot,p),p.dispatch=u,p=rg(!1),w=cg.bind(null,Ot,!1,p.queue),p=Sr(),x={state:o,dispatch:null,action:i,pending:null},p.queue=x,u=OL.bind(null,Ot,x,w,u),x.dispatch=u,p.memoizedState=i,[o,u,!1]}function Zk(i){var o=zn();return Qk(o,un,i)}function Qk(i,o,u){if(o=tg(i,o,Yk)[0],i=Vf(os)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var p=yu(o)}catch(I){throw I===Ba?Lf:I}else p=o;o=zn();var x=o.queue,w=x.dispatch;return u!==o.memoizedState&&(Ot.flags|=2048,Ga(9,{destroy:void 0},IL.bind(null,x,u),null)),[p,w,i]}function IL(i,o){i.action=o}function Jk(i){var o=zn(),u=un;if(u!==null)return Qk(o,u,i);zn(),o=o.memoizedState,u=zn();var p=u.queue.dispatch;return u.memoizedState=i,[o,p,!1]}function Ga(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 e1(){return zn().memoizedState}function Gf(i,o,u,p){var x=Sr();Ot.flags|=i,x.memoizedState=Ga(1|o,{destroy:void 0},u,p===void 0?null:p)}function Wf(i,o,u,p){var x=zn();p=p===void 0?null:p;var w=x.memoizedState.inst;un!==null&&p!==null&&Ym(p,un.memoizedState.deps)?x.memoizedState=Ga(o,w,u,p):(Ot.flags|=i,x.memoizedState=Ga(1|o,w,u,p))}function t1(i,o){Gf(8390656,8,i,o)}function sg(i,o){Wf(2048,8,i,o)}function ML(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 n1(i){var o=zn().memoizedState;return ML({ref:o,nextImpl:i}),function(){if((nn&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function r1(i,o){return Wf(4,2,i,o)}function i1(i,o){return Wf(4,4,i,o)}function s1(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 o1(i,o,u){u=u!=null?u.concat([i]):null,Wf(4,4,s1.bind(null,o,i),u)}function og(){}function a1(i,o){var u=zn();o=o===void 0?null:o;var p=u.memoizedState;return o!==null&&Ym(o,p[1])?p[0]:(u.memoizedState=[i,o],i)}function l1(i,o){var u=zn();o=o===void 0?null:o;var p=u.memoizedState;if(o!==null&&Ym(o,p[1]))return p[0];if(p=i(),Go){Rt(!0);try{i()}finally{Rt(!1)}}return u.memoizedState=[p,o],p}function ag(i,o,u){return u===void 0||(ss&1073741824)!==0&&(Gt&261930)===0?i.memoizedState=o:(i.memoizedState=u,i=uS(),Ot.lanes|=i,Qs|=i,u)}function u1(i,o,u,p){return Gr(u,o)?u:Ha.current!==null?(i=ag(i,u,p),Gr(i,o)||(Gn=!0),i):(ss&42)===0||(ss&1073741824)!==0&&(Gt&261930)===0?(Gn=!0,i.memoizedState=u):(i=uS(),Ot.lanes|=i,Qs|=i,o)}function c1(i,o,u,p,x){var w=W.p;W.p=w!==0&&8>w?w:8;var I=q.T,G={};q.T=G,cg(i,!1,o,u);try{var Q=x(),pe=q.S;if(pe!==null&&pe(G,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var Ee=_L(Q,p);vu(i,o,Ee,Qr(i))}else vu(i,o,p,Qr(i))}catch(Ne){vu(i,o,{then:function(){},status:"rejected",reason:Ne},Qr())}finally{W.p=w,I!==null&&G.types!==null&&(I.types=G.types),q.T=I}}function DL(){}function lg(i,o,u,p){if(i.tag!==5)throw Error(r(476));var x=f1(i).queue;c1(i,x,o,H,u===null?DL:function(){return d1(i),u(p)})}function f1(i){var o=i.memoizedState;if(o!==null)return o;o={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:os,lastRenderedState:H},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 d1(i){var o=f1(i);o.next===null&&(o=i.alternate.memoizedState),vu(i,o.next.queue,{},Qr())}function ug(){return or(ju)}function p1(){return zn().memoizedState}function h1(){return zn().memoizedState}function LL(i){for(var o=i.return;o!==null;){switch(o.tag){case 24:case 3:var u=Qr();i=Gs(u);var p=Ws(o,i,u);p!==null&&(jr(p,o,u),hu(p,o,u)),o={cache:Pm()},i.payload=o;return}o=o.return}}function jL(i,o,u){var p=Qr();u={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Kf(i)?g1(o,u):(u=Cm(i,o,u,p),u!==null&&(jr(u,i,p),b1(u,o,p)))}function m1(i,o,u){var p=Qr();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(Kf(i))g1(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,Gr(G,I))return _f(i,o,x,0),bn===null&&Cf(),!1}catch{}if(u=Cm(i,o,x,p),u!==null)return jr(u,i,p),b1(u,o,p),!0}return!1}function cg(i,o,u,p){if(p={lane:2,revertLane:Ug(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Kf(i)){if(o)throw Error(r(479))}else o=Cm(i,u,p,2),o!==null&&jr(o,i,2)}function Kf(i){var o=i.alternate;return i===Ot||o!==null&&o===Ot}function g1(i,o){qa=Bf=!0;var u=i.pending;u===null?o.next=o:(o.next=u.next,u.next=o),i.pending=o}function b1(i,o,u){if((u&4194048)!==0){var p=o.lanes;p&=i.pendingLanes,u|=p,o.lanes=u,nt(i,u)}}var xu={readContext:or,use:qf,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 y1={readContext:or,use:qf,useCallback:function(i,o){return Sr().memoizedState=[i,o===void 0?null:o],i},useContext:or,useEffect:t1,useImperativeHandle:function(i,o,u){u=u!=null?u.concat([i]):null,Gf(4194308,4,s1.bind(null,o,i),u)},useLayoutEffect:function(i,o){return Gf(4194308,4,i,o)},useInsertionEffect:function(i,o){Gf(4,2,i,o)},useMemo:function(i,o){var u=Sr();o=o===void 0?null:o;var p=i();if(Go){Rt(!0);try{i()}finally{Rt(!1)}}return u.memoizedState=[p,o],p},useReducer:function(i,o,u){var p=Sr();if(u!==void 0){var x=u(o);if(Go){Rt(!0);try{u(o)}finally{Rt(!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=jL.bind(null,Ot,i),[p.memoizedState,i]},useRef:function(i){var o=Sr();return i={current:i},o.memoizedState=i},useState:function(i){i=rg(i);var o=i.queue,u=m1.bind(null,Ot,o);return o.dispatch=u,[i.memoizedState,u]},useDebugValue:og,useDeferredValue:function(i,o){var u=Sr();return ag(u,i,o)},useTransition:function(){var i=rg(!1);return i=c1.bind(null,Ot,i.queue,!0,!1),Sr().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,o,u){var p=Ot,x=Sr();if(Yt){if(u===void 0)throw Error(r(407));u=u()}else{if(u=o(),bn===null)throw Error(r(349));(Gt&127)!==0||$k(p,o,u)}x.memoizedState=u;var w={value:u,getSnapshot:o};return x.queue=w,t1(Bk.bind(null,p,w,i),[i]),p.flags|=2048,Ga(9,{destroy:void 0},Fk.bind(null,p,w,u,o),null),u},useId:function(){var i=Sr(),o=bn.identifierPrefix;if(Yt){var u=Pi,p=zi;u=(p&~(1<<32-rt(p)-1)).toString(32)+u,o="_"+o+"R_"+u,u=Uf++,0<u&&(o+="H"+u.toString(32)),o+="_"}else u=AL++,o="_"+o+"r_"+u.toString(32)+"_";return i.memoizedState=o},useHostTransitionStatus:ug,useFormState:Xk,useActionState:Xk,useOptimistic:function(i){var o=Sr();o.memoizedState=o.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=u,o=cg.bind(null,Ot,!0,u),u.dispatch=o,[i,o]},useMemoCache:eg,useCacheRefresh:function(){return Sr().memoizedState=LL.bind(null,Ot)},useEffectEvent:function(i){var o=Sr(),u={impl:i};return o.memoizedState=u,function(){if((nn&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},fg={readContext:or,use:qf,useCallback:a1,useContext:or,useEffect:sg,useImperativeHandle:o1,useInsertionEffect:r1,useLayoutEffect:i1,useMemo:l1,useReducer:Vf,useRef:e1,useState:function(){return Vf(os)},useDebugValue:og,useDeferredValue:function(i,o){var u=zn();return u1(u,un.memoizedState,i,o)},useTransition:function(){var i=Vf(os)[0],o=zn().memoizedState;return[typeof i=="boolean"?i:yu(i),o]},useSyncExternalStore:Pk,useId:p1,useHostTransitionStatus:ug,useFormState:Zk,useActionState:Zk,useOptimistic:function(i,o){var u=zn();return qk(u,un,i,o)},useMemoCache:eg,useCacheRefresh:h1};fg.useEffectEvent=n1;var v1={readContext:or,use:qf,useCallback:a1,useContext:or,useEffect:sg,useImperativeHandle:o1,useInsertionEffect:r1,useLayoutEffect:i1,useMemo:l1,useReducer:ng,useRef:e1,useState:function(){return ng(os)},useDebugValue:og,useDeferredValue:function(i,o){var u=zn();return un===null?ag(u,i,o):u1(u,un.memoizedState,i,o)},useTransition:function(){var i=ng(os)[0],o=zn().memoizedState;return[typeof i=="boolean"?i:yu(i),o]},useSyncExternalStore:Pk,useId:p1,useHostTransitionStatus:ug,useFormState:Jk,useActionState:Jk,useOptimistic:function(i,o){var u=zn();return un!==null?qk(u,un,i,o):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:eg,useCacheRefresh:h1};v1.useEffectEvent=n1;function dg(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 pg={enqueueSetState:function(i,o,u){i=i._reactInternals;var p=Qr(),x=Gs(p);x.payload=o,u!=null&&(x.callback=u),o=Ws(i,x,p),o!==null&&(jr(o,i,p),hu(o,i,p))},enqueueReplaceState:function(i,o,u){i=i._reactInternals;var p=Qr(),x=Gs(p);x.tag=1,x.payload=o,u!=null&&(x.callback=u),o=Ws(i,x,p),o!==null&&(jr(o,i,p),hu(o,i,p))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var u=Qr(),p=Gs(u);p.tag=2,o!=null&&(p.callback=o),o=Ws(i,p,u),o!==null&&(jr(o,i,u),hu(o,i,u))}};function x1(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 k1(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&&pg.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 S1(i){Rf(i)}function w1(i){console.error(i)}function E1(i){Rf(i)}function Yf(i,o){try{var u=i.onUncaughtError;u(o.value,{componentStack:o.stack})}catch(p){setTimeout(function(){throw p})}}function T1(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 hg(i,o,u){return u=Gs(u),u.tag=3,u.payload={element:null},u.callback=function(){Yf(i,o)},u}function R1(i){return i=Gs(i),i.tag=3,i}function C1(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(){T1(o,u,p)}}var I=u.stateNode;I!==null&&typeof I.componentDidCatch=="function"&&(i.callback=function(){T1(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 zL(i,o,u,p,x){if(u.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(o=u.alternate,o!==null&&Pa(o,u,x,!0),u=Kr.current,u!==null){switch(u.tag){case 31:case 13:return fi===null?ad():u.alternate===null&&Dn===0&&(Dn=3),u.flags&=-257,u.flags|=65536,u.lanes=x,p===jf?u.flags|=16384:(o=u.updateQueue,o===null?u.updateQueue=new Set([p]):o.add(p),$g(i,p,x)),!1;case 22:return u.flags|=65536,p===jf?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)),$g(i,p,x)),!1}throw Error(r(435,u.tag))}return $g(i,p,x),ad(),!1}if(Yt)return o=Kr.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=x,p!==Mm&&(i=Error(r(422),{cause:p}),uu(ai(i,u)))):(p!==Mm&&(o=Error(r(423),{cause:p}),uu(ai(o,u))),i=i.current.alternate,i.flags|=65536,x&=-x,i.lanes|=x,p=ai(p,u),x=hg(i.stateNode,p,x),qm(i,x),Dn!==4&&(Dn=2)),!1;var w=Error(r(520),{cause:p});if(w=ai(w,u),_u===null?_u=[w]:_u.push(w),Dn!==4&&(Dn=2),o===null)return!0;p=ai(p,u),u=o;do{switch(u.tag){case 3:return u.flags|=65536,i=x&-x,u.lanes|=i,i=hg(u.stateNode,p,i),qm(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=R1(x),C1(x,i,u,p),qm(u,x),!1}u=u.return}while(u!==null);return!1}var mg=Error(r(461)),Gn=!1;function ar(i,o,u,p){o.child=i===null?Ok(o,null,u,p):Vo(o,i.child,u,p)}function _1(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 Bo(o),p=Xm(i,o,u,I,w,x),G=Zm(),i!==null&&!Gn?(Qm(i,o,x),as(i,o,x)):(Yt&&G&&Om(o),o.flags|=1,ar(i,o,p,x),o.child)}function A1(i,o,u,p,x){if(i===null){var w=u.type;return typeof w=="function"&&!_m(w)&&w.defaultProps===void 0&&u.compare===null?(o.tag=15,o.type=w,N1(i,o,w,p,x)):(i=Nf(u.type,null,p,o,o.mode,x),i.ref=o.ref,i.return=o,o.child=i)}if(w=i.child,!wg(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 N1(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,wg(i,x))(i.flags&131072)!==0&&(Gn=!0);else return o.lanes=i.lanes,as(i,o,x)}return gg(i,o,u,p,x)}function O1(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 I1(i,o,w,u,p)}if((u&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},i!==null&&Df(o,w!==null?w.cachePool:null),w!==null?Dk(o,w):Gm(),Lk(o);else return p=o.lanes=536870912,I1(i,o,w!==null?w.baseLanes|u:u,u,p)}else w!==null?(Df(o,w.cachePool),Dk(o,w),Ys(),o.memoizedState=null):(i!==null&&Df(o,null),Gm(),Ys());return ar(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 I1(i,o,u,p,x){var w=Fm();return w=w===null?null:{parent:qn._currentValue,pool:w},o.memoizedState={baseLanes:u,cachePool:w},i!==null&&Df(o,null),Gm(),Lk(o),i!==null&&Pa(i,o,p,!0),o.childLanes=x,null}function Xf(i,o){return o=Qf({mode:o.mode,children:o.children},i.mode),o.ref=i.ref,i.child=o,o.return=i,o}function M1(i,o,u){return Vo(o,i.child,null,u),i=Xf(o,o.pendingProps),i.flags|=2,Yr(o),o.memoizedState=null,i}function PL(i,o,u){var p=o.pendingProps,x=(o.flags&128)!==0;if(o.flags&=-129,i===null){if(Yt){if(p.mode==="hidden")return i=Xf(o,p),o.lanes=536870912,ku(null,i);if(Km(o),(i=Rn)?(i=VS(i,ci),i=i!==null&&i.data==="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:Bs!==null?{id:zi,overflow:Pi}:null,retryLane:536870912,hydrationErrors:null},u=gk(i),u.return=o,o.child=u,sr=o,Rn=null)):i=null,i===null)throw Hs(o);return o.lanes=536870912,null}return Xf(o,p)}var w=i.memoizedState;if(w!==null){var I=w.dehydrated;if(Km(o),x)if(o.flags&256)o.flags&=-257,o=M1(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||Pa(i,o,u,!1),x=(u&i.childLanes)!==0,Gn||x){if(p=bn,p!==null&&(I=Ge(p,u),I!==0&&I!==w.retryLane))throw w.retryLane=I,zo(i,I),jr(p,i,I),mg;ad(),o=M1(i,o,u)}else i=w.treeContext,Rn=di(I.nextSibling),sr=o,Yt=!0,Us=null,ci=!1,i!==null&&vk(o,i),o=Xf(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 Zf(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 gg(i,o,u,p,x){return Bo(o),u=Xm(i,o,u,p,void 0,x),p=Zm(),i!==null&&!Gn?(Qm(i,o,x),as(i,o,x)):(Yt&&p&&Om(o),o.flags|=1,ar(i,o,u,x),o.child)}function D1(i,o,u,p,x,w){return Bo(o),o.updateQueue=null,u=zk(o,p,u,x),jk(i),p=Zm(),i!==null&&!Gn?(Qm(i,o,w),as(i,o,w)):(Yt&&p&&Om(o),o.flags|=1,ar(i,o,u,w),o.child)}function L1(i,o,u,p,x){if(Bo(o),o.stateNode===null){var w=Da,I=u.contextType;typeof I=="object"&&I!==null&&(w=or(I)),w=new u(p,w),o.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=pg,o.stateNode=w,w._reactInternals=o,w=o.stateNode,w.props=p,w.state=o.memoizedState,w.refs={},Um(o),I=u.contextType,w.context=typeof I=="object"&&I!==null?or(I):Da,w.state=o.memoizedState,I=u.getDerivedStateFromProps,typeof I=="function"&&(dg(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&&pg.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,Q=Wo(u,G);w.props=Q;var pe=w.context,Ee=u.contextType;I=Da,typeof Ee=="object"&&Ee!==null&&(I=or(Ee));var Ne=u.getDerivedStateFromProps;Ee=typeof Ne=="function"||typeof w.getSnapshotBeforeUpdate=="function",G=o.pendingProps!==G,Ee||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(G||pe!==I)&&k1(o,w,p,I),Vs=!1;var ge=o.memoizedState;w.state=ge,gu(o,p,w,x),mu(),pe=o.memoizedState,G||ge!==pe||Vs?(typeof Ne=="function"&&(dg(o,u,Ne,p),pe=o.memoizedState),(Q=Vs||x1(o,u,Q,p,ge,pe,I))?(Ee||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=Q):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),p=!1)}else{w=o.stateNode,Hm(i,o),I=o.memoizedProps,Ee=Wo(u,I),w.props=Ee,Ne=o.pendingProps,ge=w.context,pe=u.contextType,Q=Da,typeof pe=="object"&&pe!==null&&(Q=or(pe)),G=u.getDerivedStateFromProps,(pe=typeof G=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(I!==Ne||ge!==Q)&&k1(o,w,p,Q),Vs=!1,ge=o.memoizedState,w.state=ge,gu(o,p,w,x),mu();var ye=o.memoizedState;I!==Ne||ge!==ye||Vs||i!==null&&i.dependencies!==null&&If(i.dependencies)?(typeof G=="function"&&(dg(o,u,G,p),ye=o.memoizedState),(Ee=Vs||x1(o,u,Ee,p,ge,ye,Q)||i!==null&&i.dependencies!==null&&If(i.dependencies))?(pe||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(p,ye,Q),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(p,ye,Q)),typeof w.componentDidUpdate=="function"&&(o.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof w.componentDidUpdate!="function"||I===i.memoizedProps&&ge===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&ge===i.memoizedState||(o.flags|=1024),o.memoizedProps=p,o.memoizedState=ye),w.props=p,w.state=ye,w.context=Q,p=Ee):(typeof w.componentDidUpdate!="function"||I===i.memoizedProps&&ge===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&ge===i.memoizedState||(o.flags|=1024),p=!1)}return w=p,Zf(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)):ar(i,o,u,x),o.memoizedState=w.state,i=o.child):i=as(i,o,x),i}function j1(i,o,u,p){return $o(),o.flags|=256,ar(i,o,u,p),o.child}var bg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function yg(i){return{baseLanes:i,cachePool:Tk()}}function vg(i,o,u){return i=i!==null?i.childLanes&~u:0,o&&(i|=Zr),i}function z1(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(Yt){if(x?Ks(o):Ys(),(i=Rn)?(i=VS(i,ci),i=i!==null&&i.data!=="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:Bs!==null?{id:zi,overflow:Pi}:null,retryLane:536870912,hydrationErrors:null},u=gk(i),u.return=o,o.child=u,sr=o,Rn=null)):i=null,i===null)throw Hs(o);return tb(i)?o.lanes=32:o.lanes=536870912,null}var G=p.children;return p=p.fallback,x?(Ys(),x=o.mode,G=Qf({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=yg(u),p.childLanes=vg(i,I,u),o.memoizedState=bg,ku(null,p)):(Ks(o),xg(o,G))}var Q=i.memoizedState;if(Q!==null&&(G=Q.dehydrated,G!==null)){if(w)o.flags&256?(Ks(o),o.flags&=-257,o=kg(i,o,u)):o.memoizedState!==null?(Ys(),o.child=i.child,o.flags|=128,o=null):(Ys(),G=p.fallback,x=o.mode,p=Qf({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=yg(u),p.childLanes=vg(i,I,u),o.memoizedState=bg,o=ku(null,p));else if(Ks(o),tb(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=kg(i,o,u)}else if(Gn||Pa(i,o,u,!1),I=(u&i.childLanes)!==0,Gn||I){if(I=bn,I!==null&&(p=Ge(I,u),p!==0&&p!==Q.retryLane))throw Q.retryLane=p,zo(i,p),jr(I,i,p),mg;eb(G)||ad(),o=kg(i,o,u)}else eb(G)?(o.flags|=192,o.child=i.child,o=null):(i=Q.treeContext,Rn=di(G.nextSibling),sr=o,Yt=!0,Us=null,ci=!1,i!==null&&vk(o,i),o=xg(o,p.children),o.flags|=4096);return o}return x?(Ys(),G=p.fallback,x=o.mode,Q=i.child,pe=Q.sibling,p=ts(Q,{mode:"hidden",children:p.children}),p.subtreeFlags=Q.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=yg(u):(x=G.cachePool,x!==null?(Q=qn._currentValue,x=x.parent!==Q?{parent:Q,pool:Q}:x):x=Tk(),G={baseLanes:G.baseLanes|u,cachePool:x}),p.memoizedState=G,p.childLanes=vg(i,I,u),o.memoizedState=bg,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 xg(i,o){return o=Qf({mode:"visible",children:o},i.mode),o.return=i,i.child=o}function Qf(i,o){return i=Wr(22,i,null,o),i.lanes=0,i}function kg(i,o,u){return Vo(o,i.child,null,u),i=xg(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function P1(i,o,u){i.lanes|=o;var p=i.alternate;p!==null&&(p.lanes|=o),jm(i.return,o,u)}function Sg(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 $1(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),ar(i,o,p,u),p=Yt?lu:0,!G&&i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&P1(i,u,o);else if(i.tag===19)P1(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),Sg(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}Sg(o,!0,u,null,w,p);break;case"together":Sg(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(Pa(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 wg(i,o){return(i.lanes&o)!==0?!0:(i=i.dependencies,!!(i!==null&&If(i)))}function $L(i,o,u){switch(o.tag){case 3:ae(o,o.stateNode.containerInfo),qs(o,qn,i.memoizedState.cache),$o();break;case 27:case 5:we(o);break;case 4:ae(o,o.stateNode.containerInfo);break;case 10:qs(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,Km(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?z1(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||(Pa(i,o,u,!1),p=(u&o.childLanes)!==0),x){if(p)return $1(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,O1(i,o,u,o.pendingProps);case 24:qs(o,qn,i.memoizedState.cache)}return as(i,o,u)}function F1(i,o,u){if(i!==null)if(i.memoizedProps!==o.pendingProps)Gn=!0;else{if(!wg(i,u)&&(o.flags&128)===0)return Gn=!1,$L(i,o,u);Gn=(i.flags&131072)!==0}else Gn=!1,Yt&&(o.flags&1048576)!==0&&yk(o,lu,o.index);switch(o.lanes=0,o.tag){case 16:e:{var p=o.pendingProps;if(i=Ho(o.elementType),o.type=i,typeof i=="function")_m(i)?(p=Wo(i,p),o.tag=1,o=L1(null,o,i,p,u)):(o.tag=0,o=gg(null,o,i,p,u));else{if(i!=null){var x=i.$$typeof;if(x===C){o.tag=11,o=_1(null,o,i,p,u);break e}else if(x===M){o.tag=14,o=A1(null,o,i,p,u);break e}}throw o=z(i)||i,Error(r(306,o,""))}}return o;case 0:return gg(i,o,o.type,o.pendingProps,u);case 1:return p=o.type,x=Wo(p,o.pendingProps),L1(i,o,p,x,u);case 3:e:{if(ae(o,o.stateNode.containerInfo),i===null)throw Error(r(387));p=o.pendingProps;var w=o.memoizedState;x=w.element,Hm(i,o),gu(o,p,null,u);var I=o.memoizedState;if(p=I.cache,qs(o,qn,p),p!==w.cache&&zm(o,[qn],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=j1(i,o,p,u);break e}else if(p!==x){x=ai(Error(r(424)),o),uu(x),o=j1(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,Rn=di(i.firstChild),sr=o,Yt=!0,Us=null,ci=!0,u=Ok(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}ar(i,o,p,u)}o=o.child}return o;case 26:return Zf(i,o),i===null?(u=ZS(o.type,null,o.pendingProps,null))?o.memoizedState=u:Yt||(u=o.type,i=o.pendingProps,p=hd(ne.current).createElement(u),p[It]=o,p[ut]=i,lr(p,u,i),Un(p),o.stateNode=p):o.memoizedState=ZS(o.type,i.memoizedProps,o.pendingProps,i.memoizedState),null;case 27:return we(o),i===null&&Yt&&(p=o.stateNode=KS(o.type,o.pendingProps,ne.current),sr=o,ci=!0,x=Rn,ro(o.type)?(nb=x,Rn=di(p.firstChild)):Rn=x),ar(i,o,o.pendingProps.children,u),Zf(i,o),i===null&&(o.flags|=4194304),o.child;case 5:return i===null&&Yt&&((x=p=Rn)&&(p=mj(p,o.type,o.pendingProps,ci),p!==null?(o.stateNode=p,sr=o,Rn=di(p.firstChild),ci=!1,x=!0):x=!1),x||Hs(o)),we(o),x=o.type,w=o.pendingProps,I=i!==null?i.memoizedProps:null,p=w.children,Zg(x,w)?p=null:I!==null&&Zg(x,I)&&(o.flags|=32),o.memoizedState!==null&&(x=Xm(i,o,NL,null,null,u),ju._currentValue=x),Zf(i,o),ar(i,o,p,u),o.child;case 6:return i===null&&Yt&&((i=u=Rn)&&(u=gj(u,o.pendingProps,ci),u!==null?(o.stateNode=u,sr=o,Rn=null,i=!0):i=!1),i||Hs(o)),null;case 13:return z1(i,o,u);case 4:return ae(o,o.stateNode.containerInfo),p=o.pendingProps,i===null?o.child=Vo(o,null,p,u):ar(i,o,p,u),o.child;case 11:return _1(i,o,o.type,o.pendingProps,u);case 7:return ar(i,o,o.pendingProps,u),o.child;case 8:return ar(i,o,o.pendingProps.children,u),o.child;case 12:return ar(i,o,o.pendingProps.children,u),o.child;case 10:return p=o.pendingProps,qs(o,o.type,p.value),ar(i,o,p.children,u),o.child;case 9:return x=o.type._context,p=o.pendingProps.children,Bo(o),x=or(x),p=p(x),o.flags|=1,ar(i,o,p,u),o.child;case 14:return A1(i,o,o.type,o.pendingProps,u);case 15:return N1(i,o,o.type,o.pendingProps,u);case 19:return $1(i,o,u);case 31:return PL(i,o,u);case 22:return O1(i,o,u,o.pendingProps);case 24:return Bo(o),p=or(qn),i===null?(x=Fm(),x===null&&(x=bn,w=Pm(),x.pooledCache=w,w.refCount++,w!==null&&(x.pooledCacheLanes|=u),x=w),o.memoizedState={parent:p,cache:x},Um(o),qs(o,qn,x)):((i.lanes&u)!==0&&(Hm(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),qs(o,qn,p)):(p=w.cache,qs(o,qn,p),p!==x.cache&&zm(o,[qn],u,!0))),ar(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 Eg(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(pS())i.flags|=8192;else throw qo=jf,Bm}else i.flags&=-16777217}function B1(i,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!nw(o))if(pS())i.flags|=8192;else throw qo=jf,Bm}function Jf(i,o){o!==null&&(i.flags|=4),i.flags&16384&&(o=i.tag!==22?tt():536870912,i.lanes|=o,Xa|=o)}function Su(i,o){if(!Yt)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 Cn(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 FL(i,o,u){var p=o.pendingProps;switch(Im(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Cn(o),null;case 1:return Cn(o),null;case 3:return u=o.stateNode,p=null,i!==null&&(p=i.memoizedState.cache),o.memoizedState.cache!==p&&(o.flags|=2048),is(qn),ue(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(za(o)?ls(o):i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Dm())),Cn(o),null;case 26:var x=o.type,w=o.memoizedState;return i===null?(ls(o),w!==null?(Cn(o),B1(o,w)):(Cn(o),Eg(o,x,null,p,u))):w?w!==i.memoizedState?(ls(o),Cn(o),B1(o,w)):(Cn(o),o.flags&=-16777217):(i=i.memoizedProps,i!==p&&ls(o),Cn(o),Eg(o,x,i,p,u)),null;case 27:if(me(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 Cn(o),null}i=Z.current,za(o)?xk(o):(i=KS(x,p,u),o.stateNode=i,ls(o))}return Cn(o),null;case 5:if(me(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 Cn(o),null}if(w=Z.current,za(o))xk(o);else{var I=hd(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[It]=o,w[ut]=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(lr(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 Cn(o),Eg(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,za(o)){if(i=o.stateNode,u=o.memoizedProps,p=null,x=sr,x!==null)switch(x.tag){case 27:case 5:p=x.memoizedProps}i[It]=o,i=!!(i.nodeValue===u||p!==null&&p.suppressHydrationWarning===!0||zS(i.nodeValue,u)),i||Hs(o,!0)}else i=hd(i).createTextNode(p),i[It]=o,o.stateNode=i}return Cn(o),null;case 31:if(u=o.memoizedState,i===null||i.memoizedState!==null){if(p=za(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[It]=o}else $o(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Cn(o),i=!1}else u=Dm(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return o.flags&256?(Yr(o),o):(Yr(o),null);if((o.flags&128)!==0)throw Error(r(558))}return Cn(o),null;case 13:if(p=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(x=za(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[It]=o}else $o(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Cn(o),x=!1}else x=Dm(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=x),x=!0;if(!x)return o.flags&256?(Yr(o),o):(Yr(o),null)}return Yr(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),Jf(o,o.updateQueue),Cn(o),null);case 4:return ue(),i===null&&Gg(o.stateNode.containerInfo),Cn(o),null;case 10:return is(o.type),Cn(o),null;case 19:if(V(jn),p=o.memoizedState,p===null)return Cn(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,Jf(o,i),o.subtreeFlags=0,i=u,u=o.child;u!==null;)mk(u,i),u=u.sibling;return L(jn,jn.current&1|2),Yt&&ns(o,p.treeForkCount),o.child}i=i.sibling}p.tail!==null&&ee()>id&&(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,Jf(o,i),Su(p,!0),p.tail===null&&p.tailMode==="hidden"&&!w.alternate&&!Yt)return Cn(o),null}else 2*ee()-p.renderingStartTime>id&&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),Yt&&ns(o,p.treeForkCount),i):(Cn(o),null);case 22:case 23:return Yr(o),Wm(),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&&(Cn(o),o.subtreeFlags&6&&(o.flags|=8192)):Cn(o),u=o.updateQueue,u!==null&&Jf(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(qn),Cn(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function BL(i,o){switch(Im(o),o.tag){case 1:return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return is(qn),ue(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 26:case 27:case 5:return me(o),null;case 31:if(o.memoizedState!==null){if(Yr(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(Yr(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 ue(),null;case 10:return is(o.type),null;case 22:case 23:return Yr(o),Wm(),i!==null&&V(Uo),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 24:return is(qn),null;case 25:return null;default:return null}}function U1(i,o){switch(Im(o),o.tag){case 3:is(qn),ue();break;case 26:case 27:case 5:me(o);break;case 4:ue();break;case 31:o.memoizedState!==null&&Yr(o);break;case 13:Yr(o);break;case 19:V(jn);break;case 10:is(o.type);break;case 22:case 23:Yr(o),Wm(),i!==null&&V(Uo);break;case 24:is(qn)}}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){ln(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 Q=u,pe=G;try{pe()}catch(Ee){ln(x,Q,Ee)}}}p=p.next}while(p!==w)}}catch(Ee){ln(o,o.return,Ee)}}function H1(i){var o=i.updateQueue;if(o!==null){var u=i.stateNode;try{Mk(o,u)}catch(p){ln(i,i.return,p)}}}function q1(i,o,u){u.props=Wo(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(p){ln(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){ln(i,o,x)}}function $i(i,o){var u=i.ref,p=i.refCleanup;if(u!==null)if(typeof p=="function")try{p()}catch(x){ln(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){ln(i,o,x)}else u.current=null}function V1(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){ln(i,i.return,x)}}function Tg(i,o,u){try{var p=i.stateNode;uj(p,i.type,u,o),p[ut]=o}catch(x){ln(i,i.return,x)}}function G1(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&ro(i.type)||i.tag===4}function Rg(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||G1(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 Cg(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=qe));else if(p!==4&&(p===27&&ro(i.type)&&(u=i.stateNode,o=null),i=i.child,i!==null))for(Cg(i,o,u),i=i.sibling;i!==null;)Cg(i,o,u),i=i.sibling}function ed(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(ed(i,o,u),i=i.sibling;i!==null;)ed(i,o,u),i=i.sibling}function W1(i){var o=i.stateNode,u=i.memoizedProps;try{for(var p=i.type,x=o.attributes;x.length;)o.removeAttributeNode(x[0]);lr(o,p,u),o[It]=i,o[ut]=u}catch(w){ln(i,i.return,w)}}var us=!1,Wn=!1,_g=!1,K1=typeof WeakSet=="function"?WeakSet:Set,nr=null;function UL(i,o){if(i=i.containerInfo,Yg=kd,i=ok(i),km(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,Q=-1,pe=0,Ee=0,Ne=i,ge=null;t:for(;;){for(var ye;Ne!==u||x!==0&&Ne.nodeType!==3||(G=I+x),Ne!==w||p!==0&&Ne.nodeType!==3||(Q=I+p),Ne.nodeType===3&&(I+=Ne.nodeValue.length),(ye=Ne.firstChild)!==null;)ge=Ne,Ne=ye;for(;;){if(Ne===i)break t;if(ge===u&&++pe===x&&(G=I),ge===w&&++Ee===p&&(Q=I),(ye=Ne.nextSibling)!==null)break;Ne=ge,ge=Ne.parentNode}Ne=ye}u=G===-1||Q===-1?null:{start:G,end:Q}}else u=null}u=u||{start:0,end:0}}else u=null;for(Xg={focusedElem:i,selectionRange:u},kd=!1,nr=o;nr!==null;)if(o=nr,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,nr=i;else for(;nr!==null;){switch(o=nr,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 it=Wo(u.type,x);i=p.getSnapshotBeforeUpdate(it,w),p.__reactInternalSnapshotBeforeUpdate=i}catch(wt){ln(u,u.return,wt)}}break;case 3:if((i&1024)!==0){if(i=o.stateNode.containerInfo,u=i.nodeType,u===9)Jg(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Jg(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,nr=i;break}nr=o.return}}function Y1(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){ln(u,u.return,I)}else{var x=Wo(u.type,o.memoizedProps);o=o.memoizedState;try{i.componentDidUpdate(x,o,i.__reactInternalSnapshotBeforeUpdate)}catch(I){ln(u,u.return,I)}}p&64&&H1(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{Mk(i,o)}catch(I){ln(u,u.return,I)}}break;case 27:o===null&&p&4&&W1(u);case 26:case 5:fs(i,u),o===null&&p&4&&V1(u),p&512&&Eu(u,u.return);break;case 12:fs(i,u);break;case 31:fs(i,u),p&4&&Q1(i,u);break;case 13:fs(i,u),p&4&&J1(i,u),p&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=ZL.bind(null,u),bj(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 X1(i){var o=i.alternate;o!==null&&(i.alternate=null,X1(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&ji(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 _n=null,Ir=!1;function cs(i,o,u){for(u=u.child;u!==null;)Z1(i,o,u),u=u.sibling}function Z1(i,o,u){if(xt&&typeof xt.onCommitFiberUnmount=="function")try{xt.onCommitFiberUnmount(Je,u)}catch{}switch(u.tag){case 26:Wn||$i(u,o),cs(i,o,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Wn||$i(u,o);var p=_n,x=Ir;ro(u.type)&&(_n=u.stateNode,Ir=!1),cs(i,o,u),Mu(u.stateNode),_n=p,Ir=x;break;case 5:Wn||$i(u,o);case 6:if(p=_n,x=Ir,_n=null,cs(i,o,u),_n=p,Ir=x,_n!==null)if(Ir)try{(_n.nodeType===9?_n.body:_n.nodeName==="HTML"?_n.ownerDocument.body:_n).removeChild(u.stateNode)}catch(w){ln(u,o,w)}else try{_n.removeChild(u.stateNode)}catch(w){ln(u,o,w)}break;case 18:_n!==null&&(Ir?(i=_n,HS(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),il(i)):HS(_n,u.stateNode));break;case 4:p=_n,x=Ir,_n=u.stateNode.containerInfo,Ir=!0,cs(i,o,u),_n=p,Ir=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||($i(u,o),p=u.stateNode,typeof p.componentWillUnmount=="function"&&q1(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 Q1(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{il(i)}catch(u){ln(o,o.return,u)}}}function J1(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{il(i)}catch(u){ln(o,o.return,u)}}function HL(i){switch(i.tag){case 31:case 13:case 19:var o=i.stateNode;return o===null&&(o=i.stateNode=new K1),o;case 22:return i=i.stateNode,o=i._retryCache,o===null&&(o=i._retryCache=new K1),o;default:throw Error(r(435,i.tag))}}function td(i,o){var u=HL(i);o.forEach(function(p){if(!u.has(p)){u.add(p);var x=QL.bind(null,i,p);p.then(x,x)}})}function Mr(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)){_n=G.stateNode,Ir=!1;break e}break;case 5:_n=G.stateNode,Ir=!1;break e;case 3:case 4:_n=G.stateNode.containerInfo,Ir=!0;break e}G=G.return}if(_n===null)throw Error(r(160));Z1(w,I,x),_n=null,Ir=!1,w=x.alternate,w!==null&&(w.return=null),x.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)eS(o,i),o=o.sibling}var Si=null;function eS(i,o){var u=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Mr(o,i),Dr(i),p&4&&(Xs(3,i,i.return),wu(3,i),Xs(5,i,i.return));break;case 1:Mr(o,i),Dr(i),p&512&&(Wn||u===null||$i(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=Si;if(Mr(o,i),Dr(i),p&512&&(Wn||u===null||$i(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[Hr]||w[It]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=x.createElement(p),x.head.insertBefore(w,x.querySelector("head > title"))),lr(w,p,u),w[It]=i,Un(w),p=w;break e;case"link":var I=ew("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),lr(w,p,u),x.head.appendChild(w);break;case"meta":if(I=ew("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),lr(w,p,u),x.head.appendChild(w);break;default:throw Error(r(468,p))}w[It]=i,Un(w),p=w}i.stateNode=p}else tw(x,i.type,i.stateNode);else i.stateNode=JS(x,p,i.memoizedProps);else w!==p?(w===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):w.count--,p===null?tw(x,i.type,i.stateNode):JS(x,p,i.memoizedProps)):p===null&&i.stateNode!==null&&Tg(i,i.memoizedProps,u.memoizedProps)}break;case 27:Mr(o,i),Dr(i),p&512&&(Wn||u===null||$i(u,u.return)),u!==null&&p&4&&Tg(i,i.memoizedProps,u.memoizedProps);break;case 5:if(Mr(o,i),Dr(i),p&512&&(Wn||u===null||$i(u,u.return)),i.flags&32){x=i.stateNode;try{Et(x,"")}catch(it){ln(i,i.return,it)}}p&4&&i.stateNode!=null&&(x=i.memoizedProps,Tg(i,x,u!==null?u.memoizedProps:x)),p&1024&&(_g=!0);break;case 6:if(Mr(o,i),Dr(i),p&4){if(i.stateNode===null)throw Error(r(162));p=i.memoizedProps,u=i.stateNode;try{u.nodeValue=p}catch(it){ln(i,i.return,it)}}break;case 3:if(bd=null,x=Si,Si=md(o.containerInfo),Mr(o,i),Si=x,Dr(i),p&4&&u!==null&&u.memoizedState.isDehydrated)try{il(o.containerInfo)}catch(it){ln(i,i.return,it)}_g&&(_g=!1,tS(i));break;case 4:p=Si,Si=md(i.stateNode.containerInfo),Mr(o,i),Dr(i),Si=p;break;case 12:Mr(o,i),Dr(i);break;case 31:Mr(o,i),Dr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,td(i,p)));break;case 13:Mr(o,i),Dr(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(rd=ee()),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,td(i,p)));break;case 22:x=i.memoizedState!==null;var Q=u!==null&&u.memoizedState!==null,pe=us,Ee=Wn;if(us=pe||x,Wn=Ee||Q,Mr(o,i),Wn=Ee,us=pe,Dr(i),p&8192)e:for(o=i.stateNode,o._visibility=x?o._visibility&-2:o._visibility|1,x&&(u===null||Q||us||Wn||Ko(i)),u=null,o=i;;){if(o.tag===5||o.tag===26){if(u===null){Q=u=o;try{if(w=Q.stateNode,x)I=w.style,typeof I.setProperty=="function"?I.setProperty("display","none","important"):I.display="none";else{G=Q.stateNode;var Ne=Q.memoizedProps.style,ge=Ne!=null&&Ne.hasOwnProperty("display")?Ne.display:null;G.style.display=ge==null||typeof ge=="boolean"?"":(""+ge).trim()}}catch(it){ln(Q,Q.return,it)}}}else if(o.tag===6){if(u===null){Q=o;try{Q.stateNode.nodeValue=x?"":Q.memoizedProps}catch(it){ln(Q,Q.return,it)}}}else if(o.tag===18){if(u===null){Q=o;try{var ye=Q.stateNode;x?qS(ye,!0):qS(Q.stateNode,!1)}catch(it){ln(Q,Q.return,it)}}}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,td(i,u))));break;case 19:Mr(o,i),Dr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,td(i,p)));break;case 30:break;case 21:break;default:Mr(o,i),Dr(i)}}function Dr(i){var o=i.flags;if(o&2){try{for(var u,p=i.return;p!==null;){if(G1(p)){u=p;break}p=p.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var x=u.stateNode,w=Rg(i);ed(i,w,x);break;case 5:var I=u.stateNode;u.flags&32&&(Et(I,""),u.flags&=-33);var G=Rg(i);ed(i,G,I);break;case 3:case 4:var Q=u.stateNode.containerInfo,pe=Rg(i);Cg(i,pe,Q);break;default:throw Error(r(161))}}catch(Ee){ln(i,i.return,Ee)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function tS(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var o=i;tS(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;)Y1(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:$i(o,o.return);var u=o.stateNode;typeof u.componentWillUnmount=="function"&&q1(o,o.return,u),Ko(o);break;case 27:Mu(o.stateNode);case 26:case 5:$i(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){ln(p,p.return,pe)}if(p=w,x=p.updateQueue,x!==null){var G=p.stateNode;try{var Q=x.shared.hiddenCallbacks;if(Q!==null)for(x.shared.hiddenCallbacks=null,x=0;x<Q.length;x++)Ik(Q[x],G)}catch(pe){ln(p,p.return,pe)}}u&&I&64&&H1(w),Eu(w,w.return);break;case 27:W1(w);case 26:case 5:ds(x,w,u),u&&p===null&&I&4&&V1(w),Eu(w,w.return);break;case 12:ds(x,w,u);break;case 31:ds(x,w,u),u&&I&4&&Q1(x,w);break;case 13:ds(x,w,u),u&&I&4&&J1(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 Ag(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 Ng(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 wi(i,o,u,p){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)nS(i,o,u,p),o=o.sibling}function nS(i,o,u,p){var x=o.flags;switch(o.tag){case 0:case 11:case 15:wi(i,o,u,p),x&2048&&wu(9,o);break;case 1:wi(i,o,u,p);break;case 3:wi(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){wi(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(Q){ln(o,o.return,Q)}}else wi(i,o,u,p);break;case 31:wi(i,o,u,p);break;case 13:wi(i,o,u,p);break;case 23:break;case 22:w=o.stateNode,I=o.alternate,o.memoizedState!==null?w._visibility&2?wi(i,o,u,p):Tu(i,o):w._visibility&2?wi(i,o,u,p):(w._visibility|=2,Wa(i,o,u,p,(o.subtreeFlags&10256)!==0||!1)),x&2048&&Ag(I,o);break;case 24:wi(i,o,u,p),x&2048&&Ng(o.alternate,o);break;default:wi(i,o,u,p)}}function Wa(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,Q=p,pe=I.flags;switch(I.tag){case 0:case 11:case 15:Wa(w,I,G,Q,x),wu(8,I);break;case 23:break;case 22:var Ee=I.stateNode;I.memoizedState!==null?Ee._visibility&2?Wa(w,I,G,Q,x):Tu(w,I):(Ee._visibility|=2,Wa(w,I,G,Q,x)),x&&pe&2048&&Ag(I.alternate,I);break;case 24:Wa(w,I,G,Q,x),x&&pe&2048&&Ng(I.alternate,I);break;default:Wa(w,I,G,Q,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&&Ag(p.alternate,p);break;case 24:Tu(u,p),x&2048&&Ng(p.alternate,p);break;default:Tu(u,p)}o=o.sibling}}var Ru=8192;function Ka(i,o,u){if(i.subtreeFlags&Ru)for(i=i.child;i!==null;)rS(i,o,u),i=i.sibling}function rS(i,o,u){switch(i.tag){case 26:Ka(i,o,u),i.flags&Ru&&i.memoizedState!==null&&Aj(u,Si,i.memoizedState,i.memoizedProps);break;case 5:Ka(i,o,u);break;case 3:case 4:var p=Si;Si=md(i.stateNode.containerInfo),Ka(i,o,u),Si=p;break;case 22:i.memoizedState===null&&(p=i.alternate,p!==null&&p.memoizedState!==null?(p=Ru,Ru=16777216,Ka(i,o,u),Ru=p):Ka(i,o,u));break;default:Ka(i,o,u)}}function iS(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];nr=p,oS(p,i)}iS(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)sS(i),i=i.sibling}function sS(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,nd(i)):Cu(i);break;default:Cu(i)}}function nd(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];nr=p,oS(p,i)}iS(i)}for(i=i.child;i!==null;){switch(o=i,o.tag){case 0:case 11:case 15:Xs(8,o,o.return),nd(o);break;case 22:u=o.stateNode,u._visibility&2&&(u._visibility&=-3,nd(o));break;default:nd(o)}i=i.sibling}}function oS(i,o){for(;nr!==null;){var u=nr;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,nr=p;else e:for(u=i;nr!==null;){p=nr;var x=p.sibling,w=p.return;if(X1(p),p===u){nr=null;break e}if(x!==null){x.return=w,nr=x;break e}nr=w}}}var qL={getCacheForType:function(i){var o=or(qn),u=o.data.get(i);return u===void 0&&(u=i(),o.data.set(i,u)),u},cacheSignal:function(){return or(qn).controller.signal}},VL=typeof WeakMap=="function"?WeakMap:Map,nn=0,bn=null,$t=null,Gt=0,an=0,Xr=null,Zs=!1,Ya=!1,Og=!1,ps=0,Dn=0,Qs=0,Yo=0,Ig=0,Zr=0,Xa=0,_u=null,Lr=null,Mg=!1,rd=0,aS=0,id=1/0,sd=null,Js=null,Zn=0,eo=null,Za=null,hs=0,Dg=0,Lg=null,lS=null,Au=0,jg=null;function Qr(){return(nn&2)!==0&&Gt!==0?Gt&-Gt:q.T!==null?Ug():Pt()}function uS(){if(Zr===0)if((Gt&536870912)===0||Yt){var i=ft;ft<<=1,(ft&3932160)===0&&(ft=262144),Zr=i}else Zr=536870912;return i=Kr.current,i!==null&&(i.flags|=32),Zr}function jr(i,o,u){(i===bn&&(an===2||an===9)||i.cancelPendingCommit!==null)&&(Qa(i,0),to(i,Gt,Zr,!1)),dt(i,u),((nn&2)===0||i!==bn)&&(i===bn&&((nn&2)===0&&(Yo|=u),Dn===4&&to(i,Gt,Zr,!1)),Fi(i))}function cS(i,o,u){if((nn&6)!==0)throw Error(r(327));var p=!u&&(o&127)===0&&(o&i.expiredLanes)===0||he(i,o),x=p?KL(i,o):Pg(i,o,!0),w=p;do{if(x===0){Ya&&!p&&to(i,o,0,!1);break}else{if(u=i.current.alternate,w&&!GL(u)){x=Pg(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 Q=G.current.memoizedState.isDehydrated;if(Q&&(Qa(G,I).flags|=256),I=Pg(G,I,!1),I!==2){if(Og&&!Q){G.errorRecoveryDisabledLanes|=w,Yo|=w,x=4;break e}w=Lr,Lr=x,w!==null&&(Lr===null?Lr=w:Lr.push.apply(Lr,w))}x=I}if(w=!1,x!==2)continue}}if(x===1){Qa(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,Zr,!Zs);break e;case 2:Lr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((o&62914560)===o&&(x=rd+300-ee(),10<x)){if(to(p,o,Zr,!Zs),X(p,0,!0)!==0)break e;hs=o,p.timeoutHandle=BS(fS.bind(null,p,u,Lr,sd,Mg,o,Zr,Yo,Xa,Zs,w,"Throttled",-0,0),x);break e}fS(p,u,Lr,sd,Mg,o,Zr,Yo,Xa,Zs,w,null,-0,0)}}break}while(!0);Fi(i)}function fS(i,o,u,p,x,w,I,G,Q,pe,Ee,Ne,ge,ye){if(i.timeoutHandle=-1,Ne=o.subtreeFlags,Ne&8192||(Ne&16785408)===16785408){Ne={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:qe},rS(o,w,Ne);var it=(w&62914560)===w?rd-ee():(w&4194048)===w?aS-ee():0;if(it=Nj(Ne,it),it!==null){hs=w,i.cancelPendingCommit=it(vS.bind(null,i,o,w,u,p,x,I,G,Q,Ee,Ne,null,ge,ye)),to(i,w,I,!pe);return}}vS(i,o,w,u,p,x,I,G,Q)}function GL(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(!Gr(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&=~Ig,o&=~Yo,i.suspendedLanes|=o,i.pingedLanes&=~o,p&&(i.warmLanes|=o),p=i.expirationTimes;for(var x=o;0<x;){var w=31-rt(x),I=1<<w;p[w]=-1,x&=~I}u!==0&&Be(i,u,o)}function od(){return(nn&6)===0?(Nu(0),!1):!0}function zg(){if($t!==null){if(an===0)var i=$t.return;else i=$t,rs=Fo=null,Jm(i),Ua=null,du=0,i=$t;for(;i!==null;)U1(i.alternate,i),i=i.return;$t=null}}function Qa(i,o){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,dj(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),hs=0,zg(),bn=i,$t=u=ts(i.current,null),Gt=o,an=0,Xr=null,Zs=!1,Ya=he(i,o),Og=!1,Xa=Zr=Ig=Yo=Qs=Dn=0,Lr=_u=null,Mg=!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-rt(p),w=1<<x;o|=i[x],p&=~w}return ps=o,Cf(),u}function dS(i,o){Ot=null,q.H=xu,o===Ba||o===Lf?(o=_k(),an=3):o===Bm?(o=_k(),an=4):an=o===mg?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Xr=o,$t===null&&(Dn=1,Yf(i,ai(o,i.current)))}function pS(){var i=Kr.current;return i===null?!0:(Gt&4194048)===Gt?fi===null:(Gt&62914560)===Gt||(Gt&536870912)!==0?i===fi:!1}function hS(){var i=q.H;return q.H=xu,i===null?xu:i}function mS(){var i=q.A;return q.A=qL,i}function ad(){Dn=4,Zs||(Gt&4194048)!==Gt&&Kr.current!==null||(Ya=!0),(Qs&134217727)===0&&(Yo&134217727)===0||bn===null||to(bn,Gt,Zr,!1)}function Pg(i,o,u){var p=nn;nn|=2;var x=hS(),w=mS();(bn!==i||Gt!==o)&&(sd=null,Qa(i,o)),o=!1;var I=Dn;e:do try{if(an!==0&&$t!==null){var G=$t,Q=Xr;switch(an){case 8:zg(),I=6;break e;case 3:case 2:case 9:case 6:Kr.current===null&&(o=!0);var pe=an;if(an=0,Xr=null,Ja(i,G,Q,pe),u&&Ya){I=0;break e}break;default:pe=an,an=0,Xr=null,Ja(i,G,Q,pe)}}WL(),I=Dn;break}catch(Ee){dS(i,Ee)}while(!0);return o&&i.shellSuspendCounter++,rs=Fo=null,nn=p,q.H=x,q.A=w,$t===null&&(bn=null,Gt=0,Cf()),I}function WL(){for(;$t!==null;)gS($t)}function KL(i,o){var u=nn;nn|=2;var p=hS(),x=mS();bn!==i||Gt!==o?(sd=null,id=ee()+500,Qa(i,o)):Ya=he(i,o);e:do try{if(an!==0&&$t!==null){o=$t;var w=Xr;t:switch(an){case 1:an=0,Xr=null,Ja(i,o,w,1);break;case 2:case 9:if(Rk(w)){an=0,Xr=null,bS(o);break}o=function(){an!==2&&an!==9||bn!==i||(an=7),Fi(i)},w.then(o,o);break e;case 3:an=7;break e;case 4:an=5;break e;case 7:Rk(w)?(an=0,Xr=null,bS(o)):(an=0,Xr=null,Ja(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?nw(I):G.stateNode.complete){an=0,Xr=null;var Q=G.sibling;if(Q!==null)$t=Q;else{var pe=G.return;pe!==null?($t=pe,ld(pe)):$t=null}break t}}an=0,Xr=null,Ja(i,o,w,5);break;case 6:an=0,Xr=null,Ja(i,o,w,6);break;case 8:zg(),Dn=6;break e;default:throw Error(r(462))}}YL();break}catch(Ee){dS(i,Ee)}while(!0);return rs=Fo=null,q.H=p,q.A=x,nn=u,$t!==null?0:(bn=null,Gt=0,Cf(),Dn)}function YL(){for(;$t!==null&&!xe();)gS($t)}function gS(i){var o=F1(i.alternate,i,ps);i.memoizedProps=i.pendingProps,o===null?ld(i):$t=o}function bS(i){var o=i,u=o.alternate;switch(o.tag){case 15:case 0:o=D1(u,o,o.pendingProps,o.type,void 0,Gt);break;case 11:o=D1(u,o,o.pendingProps,o.type.render,o.ref,Gt);break;case 5:Jm(o);default:U1(u,o),o=$t=mk(o,ps),o=F1(u,o,ps)}i.memoizedProps=i.pendingProps,o===null?ld(i):$t=o}function Ja(i,o,u,p){rs=Fo=null,Jm(o),Ua=null,du=0;var x=o.return;try{if(zL(i,x,o,u,Gt)){Dn=1,Yf(i,ai(u,i.current)),$t=null;return}}catch(w){if(x!==null)throw $t=x,w;Dn=1,Yf(i,ai(u,i.current)),$t=null;return}o.flags&32768?(Yt||p===1?i=!0:Ya||(Gt&536870912)!==0?i=!1:(Zs=i=!0,(p===2||p===9||p===3||p===6)&&(p=Kr.current,p!==null&&p.tag===13&&(p.flags|=16384))),yS(o,i)):ld(o)}function ld(i){var o=i;do{if((o.flags&32768)!==0){yS(o,Zs);return}i=o.return;var u=FL(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 yS(i,o){do{var u=BL(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 vS(i,o,u,p,x,w,I,G,Q){i.cancelPendingCommit=null;do ud();while(Zn!==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|=Rm,Ve(i,u,w,I,G,Q),i===bn&&($t=bn=null,Gt=0),Za=o,eo=i,hs=u,Dg=w,Lg=x,lS=p,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,JL(Te,function(){return ES(),null})):(i.callbackNode=null,i.callbackPriority=0),p=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||p){p=q.T,q.T=null,x=W.p,W.p=2,I=nn,nn|=4;try{UL(i,o,u)}finally{nn=I,W.p=x,q.T=p}}Zn=1,xS(),kS(),SS()}}function xS(){if(Zn===1){Zn=0;var i=eo,o=Za,u=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||u){u=q.T,q.T=null;var p=W.p;W.p=2;var x=nn;nn|=4;try{eS(o,i);var w=Xg,I=ok(i.containerInfo),G=w.focusedElem,Q=w.selectionRange;if(I!==G&&G&&G.ownerDocument&&sk(G.ownerDocument.documentElement,G)){if(Q!==null&&km(G)){var pe=Q.start,Ee=Q.end;if(Ee===void 0&&(Ee=pe),"selectionStart"in G)G.selectionStart=pe,G.selectionEnd=Math.min(Ee,G.value.length);else{var Ne=G.ownerDocument||document,ge=Ne&&Ne.defaultView||window;if(ge.getSelection){var ye=ge.getSelection(),it=G.textContent.length,wt=Math.min(Q.start,it),fn=Q.end===void 0?wt:Math.min(Q.end,it);!ye.extend&&wt>fn&&(I=fn,fn=wt,wt=I);var le=ik(G,wt),ie=ik(G,fn);if(le&&ie&&(ye.rangeCount!==1||ye.anchorNode!==le.node||ye.anchorOffset!==le.offset||ye.focusNode!==ie.node||ye.focusOffset!==ie.offset)){var de=Ne.createRange();de.setStart(le.node,le.offset),ye.removeAllRanges(),wt>fn?(ye.addRange(de),ye.extend(ie.node,ie.offset)):(de.setEnd(ie.node,ie.offset),ye.addRange(de))}}}}for(Ne=[],ye=G;ye=ye.parentNode;)ye.nodeType===1&&Ne.push({element:ye,left:ye.scrollLeft,top:ye.scrollTop});for(typeof G.focus=="function"&&G.focus(),G=0;G<Ne.length;G++){var Ce=Ne[G];Ce.element.scrollLeft=Ce.left,Ce.element.scrollTop=Ce.top}}kd=!!Yg,Xg=Yg=null}finally{nn=x,W.p=p,q.T=u}}i.current=o,Zn=2}}function kS(){if(Zn===2){Zn=0;var i=eo,o=Za,u=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||u){u=q.T,q.T=null;var p=W.p;W.p=2;var x=nn;nn|=4;try{Y1(i,o.alternate,o)}finally{nn=x,W.p=p,q.T=u}}Zn=3}}function SS(){if(Zn===4||Zn===3){Zn=0,_e();var i=eo,o=Za,u=hs,p=lS;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Zn=5:(Zn=0,Za=eo=null,wS(i,i.pendingLanes));var x=i.pendingLanes;if(x===0&&(Js=null),ct(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=q.T,x=W.p,W.p=2,q.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{q.T=o,W.p=x}}(hs&3)!==0&&ud(),Fi(i),x=i.pendingLanes,(u&261930)!==0&&(x&42)!==0?i===jg?Au++:(Au=0,jg=i):Au=0,Nu(0)}}function wS(i,o){(i.pooledCacheLanes&=o)===0&&(o=i.pooledCache,o!=null&&(i.pooledCache=null,cu(o)))}function ud(){return xS(),kS(),SS(),ES()}function ES(){if(Zn!==5)return!1;var i=eo,o=Dg;Dg=0;var u=ct(hs),p=q.T,x=W.p;try{W.p=32>u?32:u,q.T=null,u=Lg,Lg=null;var w=eo,I=hs;if(Zn=0,Za=eo=null,hs=0,(nn&6)!==0)throw Error(r(331));var G=nn;if(nn|=4,sS(w.current),nS(w,w.current,I,u),nn=G,Nu(0,!1),xt&&typeof xt.onPostCommitFiberRoot=="function")try{xt.onPostCommitFiberRoot(Je,w)}catch{}return!0}finally{W.p=x,q.T=p,wS(i,o)}}function TS(i,o,u){o=ai(u,o),o=hg(i.stateNode,o,2),i=Ws(i,o,2),i!==null&&(dt(i,2),Fi(i))}function ln(i,o,u){if(i.tag===3)TS(i,i,u);else for(;o!==null;){if(o.tag===3){TS(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=ai(u,i),u=R1(2),p=Ws(o,u,2),p!==null&&(C1(u,p,o,i),dt(p,2),Fi(p));break}}o=o.return}}function $g(i,o,u){var p=i.pingCache;if(p===null){p=i.pingCache=new VL;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)||(Og=!0,x.add(u),i=XL.bind(null,i,o,u),o.then(i,i))}function XL(i,o,u){var p=i.pingCache;p!==null&&p.delete(o),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,bn===i&&(Gt&u)===u&&(Dn===4||Dn===3&&(Gt&62914560)===Gt&&300>ee()-rd?(nn&2)===0&&Qa(i,0):Ig|=u,Xa===Gt&&(Xa=0)),Fi(i)}function RS(i,o){o===0&&(o=tt()),i=zo(i,o),i!==null&&(dt(i,o),Fi(i))}function ZL(i){var o=i.memoizedState,u=0;o!==null&&(u=o.retryLane),RS(i,u)}function QL(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),RS(i,u)}function JL(i,o){return Me(i,o)}var cd=null,el=null,Fg=!1,fd=!1,Bg=!1,no=0;function Fi(i){i!==el&&i.next===null&&(el===null?cd=el=i:el=el.next=i),fd=!0,Fg||(Fg=!0,tj())}function Nu(i,o){if(!Bg&&fd){Bg=!0;do for(var u=!1,p=cd;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-rt(42|i)+1)-1,w&=x&~(I&~G),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(u=!0,NS(p,w))}else w=Gt,w=X(p,p===bn?w:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(w&3)===0||he(p,w)||(u=!0,NS(p,w));p=p.next}while(u);Bg=!1}}function ej(){CS()}function CS(){fd=Fg=!1;var i=0;no!==0&&fj()&&(i=no);for(var o=ee(),u=null,p=cd;p!==null;){var x=p.next,w=_S(p,o);w===0?(p.next=null,u===null?cd=x:u.next=x,x===null&&(el=u)):(u=p,(i!==0||(w&3)!==0)&&(fd=!0)),p=x}Zn!==0&&Zn!==5||Nu(i),no!==0&&(no=0)}function _S(i,o){for(var u=i.suspendedLanes,p=i.pingedLanes,x=i.expirationTimes,w=i.pendingLanes&-62914561;0<w;){var I=31-rt(w),G=1<<I,Q=x[I];Q===-1?((G&u)===0||(G&p)!==0)&&(x[I]=Ie(G,o)):Q<=o&&(i.expiredLanes|=G),w&=~G}if(o=bn,u=Gt,u=X(i,i===o?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p=i.callbackNode,u===0||i===o&&(an===2||an===9)||i.cancelPendingCommit!==null)return p!==null&&p!==null&&Ue(p),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||he(i,u)){if(o=u&-u,o===i.callbackPriority)return o;switch(p!==null&&Ue(p),ct(u)){case 2:case 8:u=re;break;case 32:u=Te;break;case 268435456:u=Ke;break;default:u=Te}return p=AS.bind(null,i),u=Me(u,p),i.callbackPriority=o,i.callbackNode=u,o}return p!==null&&p!==null&&Ue(p),i.callbackPriority=2,i.callbackNode=null,2}function AS(i,o){if(Zn!==0&&Zn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(ud()&&i.callbackNode!==u)return null;var p=Gt;return p=X(i,i===bn?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p===0?null:(cS(i,p,o),_S(i,ee()),i.callbackNode!=null&&i.callbackNode===u?AS.bind(null,i):null)}function NS(i,o){if(ud())return null;cS(i,o,!0)}function tj(){pj(function(){(nn&6)!==0?Me(J,ej):CS()})}function Ug(){if(no===0){var i=$a;i===0&&(i=Ze,Ze<<=1,(Ze&261888)===0&&(Ze=256)),no=i}return no}function OS(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:$s(""+i)}function IS(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 nj(i,o,u,p,x){if(o==="submit"&&u&&u.stateNode===x){var w=OS((x[ut]||null).action),I=p.submitter;I&&(o=(o=I[ut]||null)?OS(o.formAction):I.getAttribute("formAction"),o!==null&&(w=o,I=null));var G=new wf("action","action",null,p,x);i.push({event:G,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(no!==0){var Q=I?IS(x,I):new FormData(x);lg(u,{pending:!0,data:Q,method:x.method,action:w},null,Q)}}else typeof w=="function"&&(G.preventDefault(),Q=I?IS(x,I):new FormData(x),lg(u,{pending:!0,data:Q,method:x.method,action:w},w,Q))},currentTarget:x}]})}}for(var Hg=0;Hg<Tm.length;Hg++){var qg=Tm[Hg],rj=qg.toLowerCase(),ij=qg[0].toUpperCase()+qg.slice(1);ki(rj,"on"+ij)}ki(uk,"onAnimationEnd"),ki(ck,"onAnimationIteration"),ki(fk,"onAnimationStart"),ki("dblclick","onDoubleClick"),ki("focusin","onFocus"),ki("focusout","onBlur"),ki(xL,"onTransitionRun"),ki(kL,"onTransitionStart"),ki(SL,"onTransitionCancel"),ki(dk,"onTransitionEnd"),De("onMouseEnter",["mouseout","mouseover"]),De("onMouseLeave",["mouseout","mouseover"]),De("onPointerEnter",["pointerout","pointerover"]),De("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(" "),sj=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ou));function MS(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],Q=G.instance,pe=G.currentTarget;if(G=G.listener,Q!==w&&x.isPropagationStopped())break e;w=G,x.currentTarget=pe;try{w(x)}catch(Ee){Rf(Ee)}x.currentTarget=null,w=Q}else for(I=0;I<p.length;I++){if(G=p[I],Q=G.instance,pe=G.currentTarget,G=G.listener,Q!==w&&x.isPropagationStopped())break e;w=G,x.currentTarget=pe;try{w(x)}catch(Ee){Rf(Ee)}x.currentTarget=null,w=Q}}}}function Ft(i,o){var u=o[Yn];u===void 0&&(u=o[Yn]=new Set);var p=i+"__bubble";u.has(p)||(DS(o,i,2,!1),u.add(p))}function Vg(i,o,u){var p=0;o&&(p|=4),DS(u,i,p,o)}var dd="_reactListening"+Math.random().toString(36).slice(2);function Gg(i){if(!i[dd]){i[dd]=!0,mf.forEach(function(u){u!=="selectionchange"&&(sj.has(u)||Vg(u,!1,i),Vg(u,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[dd]||(o[dd]=!0,Vg("selectionchange",!1,o))}}function DS(i,o,u,p){switch(uw(o)){case 2:var x=Mj;break;case 8:x=Dj;break;default:x=ab}u=x.bind(null,o,u,i),x=void 0,!dm||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 Wg(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 Q=I.tag;if((Q===3||Q===4)&&I.stateNode.containerInfo===x)return;I=I.return}for(;G!==null;){if(I=Bn(G),I===null)return;if(Q=I.tag,Q===5||Q===6||Q===26||Q===27){p=w=I;continue e}G=G.parentNode}}p=p.return}vf(function(){var pe=w,Ee=Nt(u),Ne=[];e:{var ge=pk.get(i);if(ge!==void 0){var ye=wf,it=i;switch(i){case"keypress":if(kf(u)===0)break e;case"keydown":case"keyup":ye=QD;break;case"focusin":it="focus",ye=gm;break;case"focusout":it="blur",ye=gm;break;case"beforeblur":case"afterblur":ye=gm;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":ye=Ux;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ye=FD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ye=tL;break;case uk:case ck:case fk:ye=HD;break;case dk:ye=rL;break;case"scroll":case"scrollend":ye=PD;break;case"wheel":ye=sL;break;case"copy":case"cut":case"paste":ye=VD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ye=qx;break;case"toggle":case"beforetoggle":ye=aL}var wt=(o&4)!==0,fn=!wt&&(i==="scroll"||i==="scrollend"),le=wt?ge!==null?ge+"Capture":null:ge;wt=[];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||le===null||(Ce=Jl(ie,le),Ce!=null&&wt.push(Iu(ie,Ce,de))),fn)break;ie=ie.return}0<wt.length&&(ge=new ye(ge,it,null,u,Ee),Ne.push({event:ge,listeners:wt}))}}if((o&7)===0){e:{if(ge=i==="mouseover"||i==="pointerover",ye=i==="mouseout"||i==="pointerout",ge&&u!==at&&(it=u.relatedTarget||u.fromElement)&&(Bn(it)||it[kn]))break e;if((ye||ge)&&(ge=Ee.window===Ee?Ee:(ge=Ee.ownerDocument)?ge.defaultView||ge.parentWindow:window,ye?(it=u.relatedTarget||u.toElement,ye=pe,it=it?Bn(it):null,it!==null&&(fn=a(it),wt=it.tag,it!==fn||wt!==5&&wt!==27&&wt!==6)&&(it=null)):(ye=null,it=pe),ye!==it)){if(wt=Ux,Ce="onMouseLeave",le="onMouseEnter",ie="mouse",(i==="pointerout"||i==="pointerover")&&(wt=qx,Ce="onPointerLeave",le="onPointerEnter",ie="pointer"),fn=ye==null?ge:js(ye),de=it==null?ge:js(it),ge=new wt(Ce,ie+"leave",ye,u,Ee),ge.target=fn,ge.relatedTarget=de,Ce=null,Bn(Ee)===pe&&(wt=new wt(le,ie+"enter",it,u,Ee),wt.target=de,wt.relatedTarget=fn,Ce=wt),fn=Ce,ye&&it)t:{for(wt=oj,le=ye,ie=it,de=0,Ce=le;Ce;Ce=wt(Ce))de++;Ce=0;for(var ht=ie;ht;ht=wt(ht))Ce++;for(;0<de-Ce;)le=wt(le),de--;for(;0<Ce-de;)ie=wt(ie),Ce--;for(;de--;){if(le===ie||ie!==null&&le===ie.alternate){wt=le;break t}le=wt(le),ie=wt(ie)}wt=null}else wt=null;ye!==null&&LS(Ne,ge,ye,wt,!1),it!==null&&fn!==null&&LS(Ne,fn,it,wt,!0)}}e:{if(ge=pe?js(pe):window,ye=ge.nodeName&&ge.nodeName.toLowerCase(),ye==="select"||ye==="input"&&ge.type==="file")var Jt=Qx;else if(Xx(ge))if(Jx)Jt=bL;else{Jt=mL;var lt=hL}else ye=ge.nodeName,!ye||ye.toLowerCase()!=="input"||ge.type!=="checkbox"&&ge.type!=="radio"?pe&&Ps(pe.elementType)&&(Jt=Qx):Jt=gL;if(Jt&&(Jt=Jt(i,pe))){Zx(Ne,Jt,u,Ee);break e}lt&<(i,ge,pe),i==="focusout"&&pe&&ge.type==="number"&&pe.memoizedProps.value!=null&&_a(ge,"number",ge.value)}switch(lt=pe?js(pe):window,i){case"focusin":(Xx(lt)||lt.contentEditable==="true")&&(Oa=lt,Sm=pe,au=null);break;case"focusout":au=Sm=Oa=null;break;case"mousedown":wm=!0;break;case"contextmenu":case"mouseup":case"dragend":wm=!1,ak(Ne,u,Ee);break;case"selectionchange":if(vL)break;case"keydown":case"keyup":ak(Ne,u,Ee)}var Mt;if(ym)e:{switch(i){case"compositionstart":var Wt="onCompositionStart";break e;case"compositionend":Wt="onCompositionEnd";break e;case"compositionupdate":Wt="onCompositionUpdate";break e}Wt=void 0}else Na?Kx(i,u)&&(Wt="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(Wt="onCompositionStart");Wt&&(Vx&&u.locale!=="ko"&&(Na||Wt!=="onCompositionStart"?Wt==="onCompositionEnd"&&Na&&(Mt=Fx()):(Fs=Ee,pm="value"in Fs?Fs.value:Fs.textContent,Na=!0)),lt=pd(pe,Wt),0<lt.length&&(Wt=new Hx(Wt,i,null,u,Ee),Ne.push({event:Wt,listeners:lt}),Mt?Wt.data=Mt:(Mt=Yx(u),Mt!==null&&(Wt.data=Mt)))),(Mt=uL?cL(i,u):fL(i,u))&&(Wt=pd(pe,"onBeforeInput"),0<Wt.length&&(lt=new Hx("onBeforeInput","beforeinput",null,u,Ee),Ne.push({event:lt,listeners:Wt}),lt.data=Mt)),nj(Ne,i,pe,u,Ee)}MS(Ne,o)})}function Iu(i,o,u){return{instance:i,listener:o,currentTarget:u}}function pd(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 oj(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function LS(i,o,u,p,x){for(var w=o._reactName,I=[];u!==null&&u!==p;){var G=u,Q=G.alternate,pe=G.stateNode;if(G=G.tag,Q!==null&&Q===p)break;G!==5&&G!==26&&G!==27||pe===null||(Q=pe,x?(pe=Jl(u,w),pe!=null&&I.unshift(Iu(u,pe,Q))):x||(pe=Jl(u,w),pe!=null&&I.push(Iu(u,pe,Q)))),u=u.return}I.length!==0&&i.push({event:o,listeners:I})}var aj=/\r\n?/g,lj=/\u0000|\uFFFD/g;function jS(i){return(typeof i=="string"?i:""+i).replace(aj,`
|
|
9
|
+
`).replace(lj,"")}function zS(i,o){return o=jS(o),jS(i)===o}function cn(i,o,u,p,x,w){switch(u){case"children":typeof p=="string"?o==="body"||o==="textarea"&&p===""||Et(i,p):(typeof p=="number"||typeof p=="bigint")&&o!=="body"&&Et(i,""+p);break;case"className":qr(i,"class",p);break;case"tabIndex":qr(i,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":qr(i,u,p);break;case"style":on(i,p,w);break;case"data":if(o!=="object"){qr(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"&&cn(i,o,"name",x.name,x,null),cn(i,o,"formEncType",x.formEncType,x,null),cn(i,o,"formMethod",x.formMethod,x,null),cn(i,o,"formTarget",x.formTarget,x,null)):(cn(i,o,"encType",x.encType,x,null),cn(i,o,"method",x.method,x,null),cn(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=qe);break;case"onScroll":p!=null&&Ft("scroll",i);break;case"onScrollEnd":p!=null&&Ft("scrollend",i);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(u=p.__html,u!=null){if(x.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"multiple":i.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":i.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){i.removeAttribute("xlink:href");break}u=$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":Ft("beforetoggle",i),Ft("toggle",i),fr(i,"popover",p);break;case"xlinkActuate":Ar(i,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":Ar(i,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":Ar(i,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":Ar(i,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":Ar(i,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":Ar(i,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":Ar(i,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":Ar(i,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":Ar(i,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":fr(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,fr(i,u,p))}}function Kg(i,o,u,p,x,w){switch(u){case"style":on(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"?Et(i,p):(typeof p=="number"||typeof p=="bigint")&&Et(i,""+p);break;case"onScroll":p!=null&&Ft("scroll",i);break;case"onScrollEnd":p!=null&&Ft("scrollend",i);break;case"onClick":p!=null&&(i.onclick=qe);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[ut]||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,""):fr(i,u,p)}}}function lr(i,o,u){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ft("error",i),Ft("load",i);var p=!1,x=!1,w;for(w in u)if(u.hasOwnProperty(w)){var 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:cn(i,o,w,I,u,null)}}x&&cn(i,o,"srcSet",u.srcSet,u,null),p&&cn(i,o,"src",u.src,u,null);return;case"input":Ft("invalid",i);var G=w=I=x=null,Q=null,pe=null;for(p in u)if(u.hasOwnProperty(p)){var Ee=u[p];if(Ee!=null)switch(p){case"name":x=Ee;break;case"type":I=Ee;break;case"checked":Q=Ee;break;case"defaultChecked":pe=Ee;break;case"value":w=Ee;break;case"defaultValue":G=Ee;break;case"children":case"dangerouslySetInnerHTML":if(Ee!=null)throw Error(r(137,o));break;default:cn(i,o,p,Ee,u,null)}}Mo(i,w,G,Q,pe,I,x,!1);return;case"select":Ft("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:cn(i,o,x,G,u,null)}o=w,u=I,i.multiple=!!p,o!=null?ir(i,!!p,o,!1):u!=null&&ir(i,!!p,u,!0);return;case"textarea":Ft("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:cn(i,o,I,G,u,null)}Aa(i,p,x,w);return;case"option":for(Q in u)u.hasOwnProperty(Q)&&(p=u[Q],p!=null)&&(Q==="selected"?i.selected=p&&typeof p!="function"&&typeof p!="symbol":cn(i,o,Q,p,u,null));return;case"dialog":Ft("beforetoggle",i),Ft("toggle",i),Ft("cancel",i),Ft("close",i);break;case"iframe":case"object":Ft("load",i);break;case"video":case"audio":for(p=0;p<Ou.length;p++)Ft(Ou[p],i);break;case"image":Ft("error",i),Ft("load",i);break;case"details":Ft("toggle",i);break;case"embed":case"source":case"link":Ft("error",i),Ft("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(pe in u)if(u.hasOwnProperty(pe)&&(p=u[pe],p!=null))switch(pe){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:cn(i,o,pe,p,u,null)}return;default:if(Ps(o)){for(Ee in u)u.hasOwnProperty(Ee)&&(p=u[Ee],p!==void 0&&Kg(i,o,Ee,p,u,void 0));return}}for(G in u)u.hasOwnProperty(G)&&(p=u[G],p!=null&&cn(i,o,G,p,u,null))}function uj(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,Q=null,pe=null,Ee=null;for(ye in u){var Ne=u[ye];if(u.hasOwnProperty(ye)&&Ne!=null)switch(ye){case"checked":break;case"value":break;case"defaultValue":Q=Ne;default:p.hasOwnProperty(ye)||cn(i,o,ye,null,p,Ne)}}for(var ge in p){var ye=p[ge];if(Ne=u[ge],p.hasOwnProperty(ge)&&(ye!=null||Ne!=null))switch(ge){case"type":w=ye;break;case"name":x=ye;break;case"checked":pe=ye;break;case"defaultChecked":Ee=ye;break;case"value":I=ye;break;case"defaultValue":G=ye;break;case"children":case"dangerouslySetInnerHTML":if(ye!=null)throw Error(r(137,o));break;default:ye!==Ne&&cn(i,o,ge,ye,p,Ne)}}Xl(i,I,G,Q,pe,Ee,w,x);return;case"select":ye=I=G=ge=null;for(w in u)if(Q=u[w],u.hasOwnProperty(w)&&Q!=null)switch(w){case"value":break;case"multiple":ye=Q;default:p.hasOwnProperty(w)||cn(i,o,w,null,p,Q)}for(x in p)if(w=p[x],Q=u[x],p.hasOwnProperty(x)&&(w!=null||Q!=null))switch(x){case"value":ge=w;break;case"defaultValue":G=w;break;case"multiple":I=w;default:w!==Q&&cn(i,o,x,w,p,Q)}o=G,u=I,p=ye,ge!=null?ir(i,!!u,ge,!1):!!p!=!!u&&(o!=null?ir(i,!!u,o,!0):ir(i,!!u,u?[]:"",!1));return;case"textarea":ye=ge=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:cn(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":ge=x;break;case"defaultValue":ye=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:x!==w&&cn(i,o,I,x,p,w)}bf(i,ge,ye);return;case"option":for(var it in u)ge=u[it],u.hasOwnProperty(it)&&ge!=null&&!p.hasOwnProperty(it)&&(it==="selected"?i.selected=!1:cn(i,o,it,null,p,ge));for(Q in p)ge=p[Q],ye=u[Q],p.hasOwnProperty(Q)&&ge!==ye&&(ge!=null||ye!=null)&&(Q==="selected"?i.selected=ge&&typeof ge!="function"&&typeof ge!="symbol":cn(i,o,Q,ge,p,ye));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 wt in u)ge=u[wt],u.hasOwnProperty(wt)&&ge!=null&&!p.hasOwnProperty(wt)&&cn(i,o,wt,null,p,ge);for(pe in p)if(ge=p[pe],ye=u[pe],p.hasOwnProperty(pe)&&ge!==ye&&(ge!=null||ye!=null))switch(pe){case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(r(137,o));break;default:cn(i,o,pe,ge,p,ye)}return;default:if(Ps(o)){for(var fn in u)ge=u[fn],u.hasOwnProperty(fn)&&ge!==void 0&&!p.hasOwnProperty(fn)&&Kg(i,o,fn,void 0,p,ge);for(Ee in p)ge=p[Ee],ye=u[Ee],!p.hasOwnProperty(Ee)||ge===ye||ge===void 0&&ye===void 0||Kg(i,o,Ee,ge,p,ye);return}}for(var le in u)ge=u[le],u.hasOwnProperty(le)&&ge!=null&&!p.hasOwnProperty(le)&&cn(i,o,le,null,p,ge);for(Ne in p)ge=p[Ne],ye=u[Ne],!p.hasOwnProperty(Ne)||ge===ye||ge==null&&ye==null||cn(i,o,Ne,ge,p,ye)}function PS(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function cj(){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&&PS(I)){for(I=0,G=x.responseEnd,p+=1;p<u.length;p++){var Q=u[p],pe=Q.startTime;if(pe>G)break;var Ee=Q.transferSize,Ne=Q.initiatorType;Ee&&PS(Ne)&&(Q=Q.responseEnd,I+=Ee*(Q<G?1:(G-pe)/(Q-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 Yg=null,Xg=null;function hd(i){return i.nodeType===9?i:i.ownerDocument}function $S(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 FS(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 Zg(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 Qg=null;function fj(){var i=window.event;return i&&i.type==="popstate"?i===Qg?!1:(Qg=i,!0):(Qg=null,!1)}var BS=typeof setTimeout=="function"?setTimeout:void 0,dj=typeof clearTimeout=="function"?clearTimeout:void 0,US=typeof Promise=="function"?Promise:void 0,pj=typeof queueMicrotask=="function"?queueMicrotask:typeof US<"u"?function(i){return US.resolve(null).then(i).catch(hj)}:BS;function hj(i){setTimeout(function(){throw i})}function ro(i){return i==="head"}function HS(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),il(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[Hr]||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);il(o)}function qS(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 Jg(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":Jg(u),ji(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function mj(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[Hr])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=di(i.nextSibling),i===null)break}return null}function gj(i,o,u){if(o==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=di(i.nextSibling),i===null))return null;return i}function VS(i,o){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!o||(i=di(i.nextSibling),i===null))return null;return i}function eb(i){return i.data==="$?"||i.data==="$~"}function tb(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function bj(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 di(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 nb=null;function GS(i){i=i.nextSibling;for(var o=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(o===0)return di(i.nextSibling);o--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||o++}i=i.nextSibling}return null}function WS(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 KS(i,o,u){switch(o=hd(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]);ji(i)}var pi=new Map,YS=new Set;function md(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var ms=W.d;W.d={f:yj,r:vj,D:xj,C:kj,L:Sj,m:wj,X:Tj,S:Ej,M:Rj};function yj(){var i=ms.f(),o=od();return i||o}function vj(i){var o=kr(i);o!==null&&o.tag===5&&o.type==="form"?d1(o):ms.r(i)}var tl=typeof document>"u"?null:document;function XS(i,o,u){var p=tl;if(p&&typeof o=="string"&&o){var x=Nr(o);x='link[rel="'+i+'"][href="'+x+'"]',typeof u=="string"&&(x+='[crossorigin="'+u+'"]'),YS.has(x)||(YS.add(x),i={rel:i,crossOrigin:u,href:o},p.querySelector(x)===null&&(o=p.createElement("link"),lr(o,"link",i),Un(o),p.head.appendChild(o)))}}function xj(i){ms.D(i),XS("dns-prefetch",i,null)}function kj(i,o){ms.C(i,o),XS("preconnect",i,o)}function Sj(i,o,u){ms.L(i,o,u);var p=tl;if(p&&i&&o){var x='link[rel="preload"][as="'+Nr(o)+'"]';o==="image"&&u&&u.imageSrcSet?(x+='[imagesrcset="'+Nr(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(x+='[imagesizes="'+Nr(u.imageSizes)+'"]')):x+='[href="'+Nr(i)+'"]';var w=x;switch(o){case"style":w=nl(i);break;case"script":w=rl(i)}pi.has(w)||(i=m({rel:"preload",href:o==="image"&&u&&u.imageSrcSet?void 0:i,as:o},u),pi.set(w,i),p.querySelector(x)!==null||o==="style"&&p.querySelector(Du(w))||o==="script"&&p.querySelector(Lu(w))||(o=p.createElement("link"),lr(o,"link",i),Un(o),p.head.appendChild(o)))}}function wj(i,o){ms.m(i,o);var u=tl;if(u&&i){var p=o&&typeof o.as=="string"?o.as:"script",x='link[rel="modulepreload"][as="'+Nr(p)+'"][href="'+Nr(i)+'"]',w=x;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=rl(i)}if(!pi.has(w)&&(i=m({rel:"modulepreload",href:i},o),pi.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"),lr(p,"link",i),Un(p),u.head.appendChild(p)}}}function Ej(i,o,u){ms.S(i,o,u);var p=tl;if(p&&i){var x=zs(p).hoistableStyles,w=nl(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=pi.get(w))&&rb(i,u);var Q=I=p.createElement("link");Un(Q),lr(Q,"link",i),Q._p=new Promise(function(pe,Ee){Q.onload=pe,Q.onerror=Ee}),Q.addEventListener("load",function(){G.loading|=1}),Q.addEventListener("error",function(){G.loading|=2}),G.loading|=4,gd(I,o,p)}I={type:"stylesheet",instance:I,count:1,state:G},x.set(w,I)}}}function Tj(i,o){ms.X(i,o);var u=tl;if(u&&i){var p=zs(u).hoistableScripts,x=rl(i),w=p.get(x);w||(w=u.querySelector(Lu(x)),w||(i=m({src:i,async:!0},o),(o=pi.get(x))&&ib(i,o),w=u.createElement("script"),Un(w),lr(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},p.set(x,w))}}function Rj(i,o){ms.M(i,o);var u=tl;if(u&&i){var p=zs(u).hoistableScripts,x=rl(i),w=p.get(x);w||(w=u.querySelector(Lu(x)),w||(i=m({src:i,async:!0,type:"module"},o),(o=pi.get(x))&&ib(i,o),w=u.createElement("script"),Un(w),lr(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},p.set(x,w))}}function ZS(i,o,u,p){var x=(x=ne.current)?md(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=nl(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=nl(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),pi.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},pi.set(i,u),w||Cj(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=rl(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 nl(i){return'href="'+Nr(i)+'"'}function Du(i){return'link[rel="stylesheet"]['+i+"]"}function QS(i){return m({},i,{"data-precedence":i.precedence,precedence:null})}function Cj(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}),lr(o,"link",u),Un(o),i.head.appendChild(o))}function rl(i){return'[src="'+Nr(i)+'"]'}function Lu(i){return"script[async]"+i}function JS(i,o,u){if(o.count++,o.instance===null)switch(o.type){case"style":var p=i.querySelector('style[data-href~="'+Nr(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),lr(p,"style",x),gd(p,u.precedence,i),o.instance=p;case"stylesheet":x=nl(u.href);var w=i.querySelector(Du(x));if(w)return o.state.loading|=4,o.instance=w,Un(w),w;p=QS(u),(x=pi.get(x))&&rb(p,x),w=(i.ownerDocument||i).createElement("link"),Un(w);var I=w;return I._p=new Promise(function(G,Q){I.onload=G,I.onerror=Q}),lr(w,"link",p),o.state.loading|=4,gd(w,u.precedence,i),o.instance=w;case"script":return w=rl(u.src),(x=i.querySelector(Lu(w)))?(o.instance=x,Un(x),x):(p=u,(x=pi.get(w))&&(p=m({},u),ib(p,x)),i=i.ownerDocument||i,x=i.createElement("script"),Un(x),lr(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,gd(p,u.precedence,i));return o.instance}function gd(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 rb(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.title==null&&(i.title=o.title)}function ib(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.integrity==null&&(i.integrity=o.integrity)}var bd=null;function ew(i,o,u){if(bd===null){var p=new Map,x=bd=new Map;x.set(u,p)}else x=bd,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[Hr]||w[It]||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 tw(i,o,u){i=i.ownerDocument||i,i.head.insertBefore(u,o==="title"?i.querySelector("head > title"):null)}function _j(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 nw(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function Aj(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=nl(p.href),w=o.querySelector(Du(x));if(w){o=w._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(i.count++,i=yd.bind(i),o.then(i,i)),u.state.loading|=4,u.instance=w,Un(w);return}w=o.ownerDocument||o,p=QS(p),(x=pi.get(x))&&rb(p,x),w=w.createElement("link"),Un(w);var I=w;I._p=new Promise(function(G,Q){I.onload=G,I.onerror=Q}),lr(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=yd.bind(i),o.addEventListener("load",u),o.addEventListener("error",u))}}var sb=0;function Nj(i,o){return i.stylesheets&&i.count===0&&xd(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var p=setTimeout(function(){if(i.stylesheets&&xd(i,i.stylesheets),i.unsuspend){var w=i.unsuspend;i.unsuspend=null,w()}},6e4+o);0<i.imgBytes&&sb===0&&(sb=62500*cj());var x=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&xd(i,i.stylesheets),i.unsuspend)){var w=i.unsuspend;i.unsuspend=null,w()}},(i.imgBytes>sb?50:800)+o);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(p),clearTimeout(x)}}:null}function yd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xd(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var vd=null;function xd(i,o){i.stylesheets=null,i.unsuspend!==null&&(i.count++,vd=new Map,o.forEach(Oj,i),vd=null,yd.call(i))}function Oj(i,o){if(!(o.state.loading&4)){var u=vd.get(i);if(u)var p=u.get(null);else{u=new Map,vd.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=yd.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:_,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function Ij(i,o,u,p,x,w,I,G,Q){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=_t(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_t(0),this.hiddenUpdates=_t(null),this.identifierPrefix=p,this.onUncaughtError=x,this.onCaughtError=w,this.onRecoverableError=I,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function rw(i,o,u,p,x,w,I,G,Q,pe,Ee,Ne){return i=new Ij(i,o,u,I,Q,pe,Ee,Ne,G),o=1,w===!0&&(o|=24),w=Wr(3,null,null,o),i.current=w,w.stateNode=i,o=Pm(),o.refCount++,i.pooledCache=o,o.refCount++,w.memoizedState={element:p,isDehydrated:u,cache:o},Um(w),i}function iw(i){return i?(i=Da,i):Da}function sw(i,o,u,p,x,w){x=iw(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&&(jr(u,i,o),hu(u,i,o))}function ow(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<o?u:o}}function ob(i,o){ow(i,o),(i=i.alternate)&&ow(i,o)}function aw(i){if(i.tag===13||i.tag===31){var o=zo(i,67108864);o!==null&&jr(o,i,67108864),ob(i,67108864)}}function lw(i){if(i.tag===13||i.tag===31){var o=Qr();o=Pe(o);var u=zo(i,o);u!==null&&jr(u,i,o),ob(i,o)}}var kd=!0;function Mj(i,o,u,p){var x=q.T;q.T=null;var w=W.p;try{W.p=2,ab(i,o,u,p)}finally{W.p=w,q.T=x}}function Dj(i,o,u,p){var x=q.T;q.T=null;var w=W.p;try{W.p=8,ab(i,o,u,p)}finally{W.p=w,q.T=x}}function ab(i,o,u,p){if(kd){var x=lb(p);if(x===null)Wg(i,o,p,Sd,u),cw(i,p);else if(jj(x,i,o,u,p))p.stopPropagation();else if(cw(i,p),o&4&&-1<Lj.indexOf(i)){for(;x!==null;){var w=kr(x);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var I=ot(w.pendingLanes);if(I!==0){var G=w;for(G.pendingLanes|=2,G.entangledLanes|=2;I;){var Q=1<<31-rt(I);G.entanglements[1]|=Q,I&=~Q}Fi(w),(nn&6)===0&&(id=ee()+500,Nu(0))}}break;case 31:case 13:G=zo(w,2),G!==null&&jr(G,w,2),od(),ob(w,2)}if(w=lb(p),w===null&&Wg(i,o,p,Sd,u),w===x)break;x=w}x!==null&&p.stopPropagation()}else Wg(i,o,p,null,u)}}function lb(i){return i=Nt(i),ub(i)}var Sd=null;function ub(i){if(Sd=null,i=Bn(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 Sd=i,null}function uw(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 J:return 2;case re:return 8;case Te:case Le:return 32;case Ke:return 268435456;default:return 32}default:return 32}}var cb=!1,io=null,so=null,oo=null,zu=new Map,Pu=new Map,ao=[],Lj="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 cw(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=kr(o),o!==null&&aw(o)),i):(i.eventSystemFlags|=p,o=i.targetContainers,x!==null&&o.indexOf(x)===-1&&o.push(x),i)}function jj(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 fw(i){var o=Bn(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,qt(i.priority,function(){lw(u)});return}}else if(o===31){if(o=c(u),o!==null){i.blockedOn=o,qt(i.priority,function(){lw(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 wd(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var u=lb(i.nativeEvent);if(u===null){u=i.nativeEvent;var p=new u.constructor(u.type,u);at=p,u.target.dispatchEvent(p),at=null}else return o=kr(u),o!==null&&aw(o),i.blockedOn=u,!1;o.shift()}return!0}function dw(i,o,u){wd(i)&&u.delete(o)}function zj(){cb=!1,io!==null&&wd(io)&&(io=null),so!==null&&wd(so)&&(so=null),oo!==null&&wd(oo)&&(oo=null),zu.forEach(dw),Pu.forEach(dw)}function Ed(i,o){i.blockedOn===o&&(i.blockedOn=null,cb||(cb=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,zj)))}var Td=null;function pw(i){Td!==i&&(Td=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Td===i&&(Td=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(ub(p||u)===null)continue;break}var w=kr(u);w!==null&&(i.splice(o,3),o-=3,lg(w,{pending:!0,data:x,method:u.method,action:p},p,x))}}))}function il(i){function o(Q){return Ed(Q,i)}io!==null&&Ed(io,i),so!==null&&Ed(so,i),oo!==null&&Ed(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);)fw(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[ut]||null;if(typeof w=="function")I||pw(u);else if(I){var G=null;if(w&&w.hasAttribute("formAction")){if(x=w,I=w[ut]||null)G=I.formAction;else if(ub(x)!==null)continue}else G=I.action;typeof G=="function"?u[p+1]=G:(u.splice(p,3),p-=3),pw(u)}}}function hw(){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 fb(i){this._internalRoot=i}Rd.prototype.render=fb.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(r(409));var u=o.current,p=Qr();sw(u,p,i,o,null,null)},Rd.prototype.unmount=fb.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;sw(i.current,2,null,i,null,null),od(),o[kn]=null}};function Rd(i){this._internalRoot=i}Rd.prototype.unstable_scheduleHydration=function(i){if(i){var o=Pt();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&&fw(i)}};var mw=t.version;if(mw!=="19.2.6")throw Error(r(527,mw,"19.2.6"));W.findDOMNode=function(i){var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=f(o),i=i!==null?h(i):null,i=i===null?null:i.stateNode,i};var Pj={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Cd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Cd.isDisabled&&Cd.supportsFiber)try{Je=Cd.inject(Pj),xt=Cd}catch{}}return Bu.createRoot=function(i,o){if(!s(i))throw Error(r(299));var u=!1,p="",x=S1,w=w1,I=E1;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=rw(i,1,!1,null,null,u,p,null,x,w,I,hw),i[kn]=o.current,Gg(i),new fb(o)},Bu.hydrateRoot=function(i,o,u){if(!s(i))throw Error(r(299));var p=!1,x="",w=S1,I=w1,G=E1,Q=null;return u!=null&&(u.unstable_strictMode===!0&&(p=!0),u.identifierPrefix!==void 0&&(x=u.identifierPrefix),u.onUncaughtError!==void 0&&(w=u.onUncaughtError),u.onCaughtError!==void 0&&(I=u.onCaughtError),u.onRecoverableError!==void 0&&(G=u.onRecoverableError),u.formState!==void 0&&(Q=u.formState)),o=rw(i,1,!0,o,u??null,p,x,Q,w,I,G,hw),o.context=iw(null),u=o.current,p=Qr(),p=Pe(p),x=Gs(p),x.callback=null,Ws(u,x,p),u=p,o.current.lanes=u,dt(o,u),Fi(o),i[kn]=o.current,Gg(i),new Rd(o)},Bu.version="19.2.6",Bu}var Tw;function Yj(){if(Tw)return hb.exports;Tw=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(),hb.exports=Kj(),hb.exports}var Xj=Yj(),Uu={},Rw;function Zj(){if(Rw)return Uu;Rw=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 f=[],h="",m=null,b="",y=a?null:e,k=new Array(arguments.length),S=0;S<arguments.length;S++)k[S]=arguments[S];for(;k.length>0;){var T=k.pop();if(!(T==null||T===!1)){if(Array.isArray(T)){for(var R=0;R<T.length;R++)k.push(T[R]);continue}var E=c!=null?c(T):T;if(E.$$css!=null){var _="";if(y!=null&&y.has(E)){var C=y.get(E);C!=null&&(_=C[0],b=C[2],f.push.apply(f,C[1]),y=C[3])}else{var D=[];for(var N in E){var M=E[N];if(N===t){var B=E[N];B!==!0&&(b=b?B+"; "+b:B);continue}typeof M=="string"||M===null?f.includes(N)||(f.push(N),y!=null&&D.push(N),typeof M=="string"&&(_+=_?" "+M:M)):console.error("styleq: ".concat(N," typeof ").concat(String(M),' is not "string" or "null".'))}if(y!=null){var P=new WeakMap;y.set(E,[_,D,b,P]),y=P}}_&&(h=h?_+" "+h:_)}else if(l)m==null&&(m={}),m=Object.assign({},E,m);else{var A=null;for(var K in E){var $=E[K];$!==void 0&&(f.includes(K)||($!=null&&(m==null&&(m={}),A==null&&(A={}),A[K]=$),f.push(K),y=null))}A!=null&&(m=Object.assign(A,m))}}}var F=[h,m,b];return F}}var r=Uu.styleq=n();return r.factory=n,Uu}var Qj=Zj();function zt(...e){const[t,n,r]=Qj.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 t_(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=t_(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Jj(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=t_(e))&&(r&&(r+=" "),r+=t);return r}function rn(...e){return Jj(e)}function Xt({rootClass:e,stylexStyles:t,className:n,style:r}){const s=zt(t);return{className:rn(e,s.className,n),style:{...s.style,...r}}}const ez={"--cursor-easing-out-quint":"var(--cursor-easing-out-quint)"},Ri={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 tz({pill:e,size:t,variant:n}){return[Ri.base,t==="sm"?Ri.sizeSm:Ri.sizeMd,e?[Ri.pill,t==="sm"?Ri.pillSizeSm:Ri.pillSizeMd]:null,nz(n)]}function nz(e){switch(e){case"accent":return Ri.variantAccent;case"neutral":return Ri.variantNeutral;case"success":return Ri.variantSuccess;case"warn":return Ri.variantWarn;case"danger":return Ri.variantDanger}}function vo({children:e,variant:t="neutral",size:n="md",pill:r=!1,as:s="span",className:a,style:l,...c}){const d=Xt({rootClass:"ui-status-badge",stylexStyles:tz({pill:r,size:n,variant:t}),className:a,style:l});return g.jsx(s,{className:d.className,style:d.style,"data-variant":t,"data-size":n,"data-pill":r||void 0,...c,children:e})}function rz(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=rz("https://base-ui.com/production-error","Base UI"),Cw={};function Fr(e,t){const n=v.useRef(Cw);return n.current===Cw&&(n.current=e(t)),n}function xo(e,t,n,r){const s=Fr(n_).current;return sz(s,e,t,n,r)&&r_(s,[e,t,n,r]),s.callback}function iz(e){const t=Fr(n_).current;return oz(t,e)&&r_(t,e),t.callback}function n_(){return{callback:null,cleanup:null,refs:[]}}function sz(e,t,n,r,s){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==s}function oz(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function r_(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 az=parseInt(v.version,10);function Uv(e){return az>=e}function _w(e){if(!v.isValidElement(e))return null;const t=e,n=t.props;return(Uv(19)?n?.ref:t.ref)??null}function jy(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Jn(){}const ko=Object.freeze([]),Fn=Object.freeze({});function lz(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 uz(e,t){return typeof e=="function"?e(t):e}function i_(e,t){return typeof e=="function"?e(t):e}const Hv={};function Ki(e,t,n,r,s){if(!n&&!r&&!s&&!e)return Rp(t);let a=Rp(e);return t&&(a=sc(a,t)),n&&(a=sc(a,n)),r&&(a=sc(a,r)),s&&(a=sc(a,s)),a}function cz(e){if(e.length===0)return Hv;if(e.length===1)return Rp(e[0]);let t=Rp(e[0]);for(let n=1;n<e.length;n+=1)t=sc(t,e[n]);return t}function Rp(e){return qv(e)?{...o_(e,Hv)}:fz(e)}function sc(e,t){return qv(t)?o_(t,e):dz(e,t)}function fz(e){const t={...e};for(const n in t){const r=t[n];s_(n,r)&&(t[n]=a_(r))}return t}function dz(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=jy(e.style,r);break}case"className":{e[n]=l_(e.className,r);break}default:s_(n,r)?e[n]=pz(e[n],r):e[n]=r}}return e}function s_(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 qv(e){return typeof e=="function"}function o_(e,t){return qv(e)?e(t):e??Hv}function pz(e,t){return t?e?(...n)=>{const r=n[0];if(u_(r)){const a=r;Cp(a);const l=t(...n);return a.baseUIHandlerPrevented||e?.(...n),l}const s=t(...n);return e?.(...n),s}:a_(t):e}function a_(e){return e&&((...t)=>{const n=t[0];return u_(n)&&Cp(n),e(...t)})}function Cp(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function l_(e,t){return t?e?t+" "+e:t:e}function u_(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function gn(e,t,n={}){const r=t.render,s=hz(t,n);if(n.enabled===!1)return null;const a=n.state??Fn;return bz(e,r,s,a)}function hz(e,t={}){const{className:n,style:r,render:s}=e,{state:a=Fn,ref:l,props:c,stateAttributesMapping:d,enabled:f=!0}=t,h=f?uz(n,a):void 0,m=f?i_(r,a):void 0,b=f?lz(a,d):Fn,y=f&&c?mz(c):void 0,k=f?jy(b,y)??{}:Fn;return typeof document<"u"&&(f?Array.isArray(l)?k.ref=iz([k.ref,_w(s),...l]):k.ref=xo(k.ref,_w(s),l):xo(null,null)),f?(h!==void 0&&(k.className=l_(k.className,h)),m!==void 0&&(k.style=jy(k.style,m)),k):Fn}function mz(e){return Array.isArray(e)?cz(e):Ki(void 0,e)}const gz=Symbol.for("react.lazy");function bz(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const s=Ki(n,t.props);s.ref=n.ref;let a=t;return a?.$$typeof===gz&&(a=v.Children.toArray(t)[0]),v.cloneElement(a,s)}if(e&&typeof e=="string")return yz(e,n);throw new Error(In(8))}function yz(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 vz={[sa.startingStyle]:""},xz={[sa.endingStyle]:""},To={transitionStatus(e){return e==="starting"?vz:e==="ending"?xz:null}};let Vv=(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})({}),_p=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const kz={[_p.popupOpen]:""},Sz={[_p.popupOpen]:"",[_p.pressed]:""},wz={[Vv.open]:""},Ez={[Vv.closed]:""},Tz={[Vv.anchorHidden]:""},c_={open(e){return e?kz:null}},Rz={open(e){return e?Sz:null}},Gc={open(e){return e?wz:Ez},anchorHidden(e){return e?Tz:null}};function mh(){return typeof window<"u"}function er(e){return gh(e)?(e.nodeName||"").toLowerCase():"#document"}function vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Os(e){var t;return(t=(gh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gh(e){return mh()?e instanceof Node||e instanceof vn(e).Node:!1}function vt(e){return mh()?e instanceof Element||e instanceof vn(e).Element:!1}function Bt(e){return mh()?e instanceof HTMLElement||e instanceof vn(e).HTMLElement:!1}function So(e){return!mh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof vn(e).ShadowRoot}function ga(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=_r(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function Cz(e){return/^(table|td|th)$/.test(er(e))}function bh(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const _z=/transform|translate|scale|rotate|perspective|filter/,Az=/paint|layout|strict|content/,Xo=e=>!!e&&e!=="none";let yb;function Gv(e){const t=vt(e)?_r(e):e;return Xo(t.transform)||Xo(t.translate)||Xo(t.scale)||Xo(t.rotate)||Xo(t.perspective)||!yh()&&(Xo(t.backdropFilter)||Xo(t.filter))||_z.test(t.willChange||"")||Az.test(t.contain||"")}function Nz(e){let t=_s(e);for(;Bt(t)&&!Ai(t);){if(Gv(t))return t;if(bh(t))return null;t=_s(t)}return null}function yh(){return yb==null&&(yb=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),yb}function Ai(e){return/^(html|body|#document)$/.test(er(e))}function _r(e){return vn(e).getComputedStyle(e)}function vh(e){return vt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _s(e){if(er(e)==="html")return e;const t=e.assignedSlot||e.parentNode||So(e)&&e.host||Os(e);return So(t)?t.host:t}function f_(e){const t=_s(e);return Ai(t)?(e.ownerDocument||e).body:Bt(t)&&ga(t)?t:f_(t)}function bo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=f_(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),l=vn(s);if(a){const c=zy(l);return t.concat(l,l.visualViewport||[],ga(s)?s:[],c&&n?bo(c):[])}else return t.concat(s,bo(s,[],n))}function zy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Wv={...Bv},vb=Wv.useInsertionEffect,Oz=vb&&vb!==Wv.useLayoutEffect?vb:e=>e();function We(e){const t=Fr(Iz).current;return t.next=e,Oz(t.effect),t.trampoline}function Iz(){const e={next:void 0,callback:Mz,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Mz(){}const Dz=()=>{},Fe=typeof document<"u"?v.useLayoutEffect:Dz,d_=v.createContext(void 0);function p_(e=!1){const t=v.useContext(d_);if(t===void 0&&!e)throw new Error(In(16));return t}function Lz(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:s=0,isNativeButton:a}=e,l=r&&t!==!1,c=r&&t===!1;return{props:v.useMemo(()=>{const f={onKeyDown(h){n&&t&&h.key!=="Tab"&&h.preventDefault()}};return r||(f.tabIndex=s,!a&&n&&(f.tabIndex=t?s:-1)),(a&&(t||l)||!a&&n)&&(f["aria-disabled"]=n),a&&(!t||c)&&(f.disabled=n),f},[r,n,t,l,c,a,s])}}function $l(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:s=!0,composite:a}=e,l=v.useRef(null),c=p_(!0),d=a??c!==void 0,{props:f}=Lz({focusableWhenDisabled:n,disabled:t,composite:d,tabIndex:r,isNativeButton:s}),h=v.useCallback(()=>{const y=l.current;xb(y)&&d&&t&&f.disabled===void 0&&y.disabled&&(y.disabled=!1)},[t,f.disabled,d]);Fe(h,[h]);const m=v.useCallback((y={})=>{const{onClick:k,onMouseDown:S,onKeyUp:T,onKeyDown:R,onPointerDown:E,..._}=y;return Ki({onClick(C){if(t){C.preventDefault();return}k?.(C)},onMouseDown(C){t||S?.(C)},onKeyDown(C){if(t||(Cp(C),R?.(C),C.baseUIHandlerPrevented))return;const D=C.target===C.currentTarget,N=C.currentTarget,M=xb(N),B=!s&&jz(N),P=D&&(s?M:!B),A=C.key==="Enter",K=C.key===" ",$=N.getAttribute("role"),F=$?.startsWith("menuitem")||$==="option"||$==="gridcell";if(D&&d&&K){if(C.defaultPrevented&&F)return;C.preventDefault(),B||s&&M?(N.click(),C.preventBaseUIHandler()):P&&(k?.(C),C.preventBaseUIHandler());return}P&&(!s&&(K||A)&&C.preventDefault(),!s&&A&&k?.(C))},onKeyUp(C){if(!t){if(Cp(C),T?.(C),C.target===C.currentTarget&&s&&d&&xb(C.currentTarget)&&C.key===" "){C.preventDefault();return}C.baseUIHandlerPrevented||C.target===C.currentTarget&&!s&&!d&&C.key===" "&&k?.(C)}},onPointerDown(C){if(t){C.preventDefault();return}E?.(C)}},s?{type:"button"}:{role:"button"},f,_)},[t,f,d,s]),b=We(y=>{l.current=y,h()});return{getButtonProps:m,buttonRef:b}}function xb(e){return Bt(e)&&e.tagName==="BUTTON"}function jz(e){return!!(e?.tagName==="A"&&e?.href)}const Oi="none",Fl="trigger-press",Tr="trigger-hover",bp="trigger-focus",Kv="outside-press",kb="item-press",xh="focus-out",Yv="escape-key",Aw="list-navigation",zz="cancel-open",h_="disabled",Nw="missing",Ow="initial",Ap="imperative-action",Pz="window-resize";function Ct(e,t,n,r){let s=!1,a=!1;const l=r??Fn;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 Iw=0;function $z(e,t="mui"){const[n,r]=v.useState(e),s=e||n;return v.useEffect(()=>{n==null&&(Iw+=1,r(`${t}-${Iw}`))},[n,t]),s}const Mw=Wv.useId;function Wc(e,t){if(Mw!==void 0){const n=Mw();return e??(t?`${t}-${n}`:n)}return $z(e,t)}function Bl(e){return Wc(e,"base-ui")}const Fz=[];function Xv(e){v.useEffect(e,Fz)}const Hu=0;class Ii{static create(){return new Ii}currentId=Hu;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Hu,n()},t)}isStarted(){return this.currentId!==Hu}clear=()=>{this.currentId!==Hu&&(clearTimeout(this.currentId),this.currentId=Hu)};disposeEffect=()=>this.clear}function yi(){const e=Fr(Ii.create).current;return Xv(e.disposeEffect),e}function Bz(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:Uz,platform:Hz,maxTouchPoints:qz}=Bz(),kh=Uz.toLowerCase(),wc=Hz.toLowerCase(),Sh=/^i(os$|p)/.test(wc)||wc==="macintel"&&qz>1,Dw="android",Py=wc===Dw||kh.includes(Dw),m_=!Sh&&wc.startsWith("mac");wc.startsWith("win");const Vz=m_||Sh,Ro=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!Ro&&kh.includes("firefox");!Ro&&kh.includes("chrom");const Gz=Vz,Zv=/jsdom|happydom/.test(kh);function qi(e){e.preventDefault(),e.stopPropagation()}function Wz(e){return"nativeEvent"in e}function Qv(e){return e.pointerType===""&&e.isTrusted?!0:Py&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function g_(e){return Zv?!1:!Py&&e.width===0&&e.height===0||Py&&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 Kz(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const $y="data-base-ui-focusable",b_="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",wh="ArrowLeft",Eh="ArrowRight",y_="ArrowUp",Jv="ArrowDown";function mr(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function bt(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 yr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Np(e,t){if(!vt(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(bt(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function Sb(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 Yz(e){return e.matches("html,body")}function Th(e){return Bt(e)&&e.matches(b_)}function Xz(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${b_}`)!=null}function Fy(e){return e?e.getAttribute("role")==="combobox"&&Th(e):!1}function Zz(e){if(!e||Zv)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Op(e){return e?e.hasAttribute($y)?e:e.querySelector(`[${$y}]`)||e:null}function Qz(e,t){return t!=null&&!oa(t)?0:typeof e=="function"?e():e}function Ip(e,t,n){const r=Qz(e,n);return typeof r=="number"?r:r?.[t]}function Lw(e){return typeof e=="function"?e():e}function v_(e,t){return t||e==="click"||e==="mousedown"}function Jz(e){return e?.includes("mouse")&&e!=="mousedown"}const eP=v.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ii,currentIdRef:{current:null},currentContextRef:{current:null}});function tP(e,t){e.current=t.current}function nP(e,t={open:!1}){const{open:n}=t,r="rootStore"in e?e.rootStore:e,s=r.useState("floatingId"),a=v.useContext(eP),{currentIdRef:l,delayRef:c,timeoutMs:d,initialDelayRef:f,currentContextRef:h,hasProvider:m,timeout:b}=a,[y,k]=v.useState(!1),S=v.useRef(n),T=v.useRef(!1);return Fe(()=>{S.current=n},[n]),Fe(()=>()=>{T.current=!0},[]),Fe(()=>{function R(){T.current||k(!1),h.current?.setIsInstantPhase(!1),l.current=null,h.current=null,c.current=f.current,b.clear()}if(l.current&&!n&&l.current===s){if(k(!1),d){const E=s;return b.start(d,()=>{r.select("open")||l.current&&l.current!==E||R()}),()=>{(S.current||l.current!==E)&&b.clear()}}R()}},[n,s,l,c,d,f,h,b,r]),Fe(()=>{if(!n)return;const R=h.current,E=l.current;b.clear(),h.current={onOpenChange:r.setOpen,setIsInstantPhase:k},l.current=s,c.current={open:0,close:Ip(f.current,"close")},E!==null&&E!==s?(k(!0),R?.setIsInstantPhase(!0),R?.onOpenChange(!1,Ct(Oi))):(k(!1),R?.setIsInstantPhase(!1))},[n,s,r,l,c,f,h,b]),Fe(()=>()=>{if(l.current===s){if(h.current=null,!S.current)return;l.current=null,tP(c,f),b.clear()}},[h,l,c,s,f,b]),v.useMemo(()=>({hasProvider:m,delayRef:c,isInstantPhase:y}),[m,c,y])}function Lt(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Yi(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function On(e){const t=Fr(rP,e).current;return t.next=e,Fe(t.effect),t}function rP(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const _d=null;class iP{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 Ad=new iP;class Pr{static create(){return new Pr}static request(t){return Ad.request(t)}static cancel(t){return Ad.cancel(t)}currentId=_d;request(t){this.cancel(),this.currentId=Ad.request(()=>{this.currentId=_d,t()})}cancel=()=>{this.currentId!==_d&&(Ad.cancel(this.currentId),this.currentId=_d)};disposeEffect=()=>this.cancel}function Rl(){const e=Fr(Pr.create).current;return Xv(e.disposeEffect),e}function Kt(e){return e?.ownerDocument||document}const x_={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},k_={...x_,position:"fixed",top:0,left:0},sP={...x_,position:"absolute"},Mp=v.forwardRef(function(t,n){const[r,s]=v.useState();Fe(()=>{Gz&&Ro&&s("button")},[]);const a={tabIndex:0,role:r};return g.jsx("span",{...t,ref:n,style:k_,"aria-hidden":r?void 0:!0,...a,"data-base-ui-focus-guard":""})}),oP=["top","right","bottom","left"],Cl=Math.min,Ts=Math.max,_l=Math.round,bl=Math.floor,Rs=e=>({x:e,y:e}),aP={left:"right",right:"left",bottom:"top",top:"bottom"};function S_(e,t,n){return Ts(e,Cl(t,n))}function As(e,t){return typeof e=="function"?e(t):e}function ri(e){return e.split("-")[0]}function Co(e){return e.split("-")[1]}function e0(e){return e==="x"?"y":"x"}function t0(e){return e==="y"?"height":"width"}function gi(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function n0(e){return e0(gi(e))}function lP(e,t,n){n===void 0&&(n=!1);const r=Co(e),s=n0(e),a=t0(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=Dp(l)),[l,Dp(l)]}function uP(e){const t=Dp(e);return[By(e),t,By(t)]}function By(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const jw=["left","right"],zw=["right","left"],cP=["top","bottom"],fP=["bottom","top"];function dP(e,t,n){switch(e){case"top":case"bottom":return n?t?zw:jw:t?jw:zw;case"left":case"right":return t?cP:fP;default:return[]}}function pP(e,t,n,r){const s=Co(e);let a=dP(ri(e),n==="start",r);return s&&(a=a.map(l=>l+"-"+s),t&&(a=a.concat(a.map(By)))),a}function Dp(e){const t=ri(e);return aP[t]+e.slice(t.length)}function hP(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 w_(e){return typeof e!="number"?hP(e):{top:e,right:e,bottom:e,left:e}}function Ec(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 uc(e,t){return t<0||t>=e.length}function yp(e,t){return Ss(e.current,{disabledIndices:t})}function Uy(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&&Lp(e,a,r));return a}function Lp(e,t,n){if(typeof n=="function"?n(t):n?.includes(t)??!1)return!0;const s=e[t];return s?Rh(s)?!n&&(s.hasAttribute("disabled")||s.getAttribute("aria-disabled")==="true"):!0:!1}function mP(e){return e.visibility==="hidden"||e.visibility==="collapse"}function Rh(e,t=e?_r(e):null){return!e||!e.isConnected||!t||mP(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const gP='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function bP(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 Hy(e){for(const t of Array.from(e.children))if(er(t)==="summary")return t;return null}function yP(e,t){const n=Hy(t);return!!n&&(e===n||bt(n,e))}function E_(e){const t=e?er(e):"";return e!=null&&e.matches(gP)&&(t!=="summary"||e.parentElement!=null&&er(e.parentElement)==="details"&&Hy(e.parentElement)===e)&&(t!=="details"||Hy(e)==null)&&(t!=="input"||e.type!=="hidden")}function T_(e){if(!E_(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=bP(t)){const n=t!==e,r=er(t)==="slot";if(t.hasAttribute("inert")||n&&er(t)==="details"&&!t.open&&!yP(e,t)||t.hasAttribute("hidden")||!r&&!vP(t,n))return!1}return!0}function vP(e,t){const n=_r(e);return t?n.display!=="none":Rh(e,n)}function R_(e){const t=e.tabIndex;if(t<0){const n=er(e);if(n==="details"||n==="audio"||n==="video"||Bt(e)&&e.isContentEditable)return 0}return t}function wb(e){if(er(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function xP(e,t){const n=wb(e);if(!n)return!0;const r=t.find(s=>{const a=wb(s);return a?.name===n.name&&a.form===n.form&&a.checked});return r?r===n:t.find(s=>{const a=wb(s);return a?.name===n.name&&a.form===n.form})===n}function C_(e){if(Bt(e)&&er(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Bt(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function __(e,t){C_(e).forEach(n=>{E_(n)&&t.push(n),__(n,t)})}function A_(e,t,n){C_(e).forEach(r=>{Bt(r)&&r.matches(t)&&n.push(r),A_(r,t,n)})}function r0(e){return T_(e)&&R_(e)>=0}function N_(e){const t=[];return __(e,t),t.filter(T_)}function Ch(e){const t=N_(e);return t.filter(n=>R_(n)>=0&&xP(n,t))}function O_(e,t){const n=Ch(e),r=n.length;if(r===0)return;const s=mr(Kt(e)),a=n.indexOf(s),l=a===-1?t===1?0:r-1:a+t;return n[l]}function I_(e){return O_(Kt(e).body,1)||e}function M_(e){return O_(Kt(e).body,-1)||e}function cc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!bt(n,r)}function kP(e){Ch(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Pw(e){const t=[];A_(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 $w(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 Tc(e){return`data-base-ui-${e}`}let Nd=0;function vp(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:s}=t;cancelAnimationFrame(Nd);function a(){s&&!s()||e?.focus({preventScroll:n})}if(r)return a(),Jn;const l=requestAnimationFrame(a);return Nd=l,()=>{Nd===l&&(cancelAnimationFrame(l),Nd=0)}}const Eb={inert:new WeakMap,"aria-hidden":new WeakMap},Fw="data-base-ui-inert",qy={inert:new WeakSet,"aria-hidden":new WeakSet};let qu=new WeakMap,Tb=0;function SP(e){return qy[e]}function D_(e){return e?So(e)?e.host:D_(e.parentNode):null}const Bw=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=D_(n);return e.contains(r)?r:null}).filter(n=>n!=null),Uw=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},Hw=(e,t,n)=>{const r=[],s=a=>{!a||n.has(a)||Array.from(a.children).forEach(l=>{er(l)!=="script"&&(t.has(l)?s(l):r.push(l))})};return s(e),r};function wP(e,t,n,r,{mark:s=!0}){let a=null;r?a="inert":n&&(a="aria-hidden");let l=null,c=null;const d=Bw(t,e),f=s?Hw(t,Uw(d),new Set(d)):[],h=[],m=[];if(a){const b=Eb[a],y=SP(a);c=y,l=b;const k=Bw(t,Array.from(t.querySelectorAll("[aria-live]"))),S=d.concat(k);Hw(t,Uw(S),new Set(S)).forEach(R=>{const E=R.getAttribute(a),_=E!==null&&E!=="false",C=(b.get(R)||0)+1;b.set(R,C),h.push(R),C===1&&_&&y.add(R),_||R.setAttribute(a,a==="inert"?"":"true")})}return s&&f.forEach(b=>{const y=(qu.get(b)||0)+1;qu.set(b,y),m.push(b),y===1&&b.setAttribute(Fw,"")}),Tb+=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=(qu.get(b)||0)-1;qu.set(b,y),y||b.removeAttribute(Fw)}),Tb-=1,Tb||(Eb.inert=new WeakMap,Eb["aria-hidden"]=new WeakMap,qy.inert=new WeakSet,qy["aria-hidden"]=new WeakSet,qu=new WeakMap)}}function qw(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:s=!0}=t,a=Kt(e[0]).body;return wP(e,a,n,r,{mark:s})}var Di=e_();const EP={style:{transition:"none"}},TP="data-base-ui-click-trigger",RP={fallbackAxisSide:"none"},L_={fallbackAxisSide:"end"},CP={clipPath:"inset(50%)",position:"fixed",top:0,left:0},j_=v.createContext(null),z_=()=>v.useContext(j_),_P=Tc("portal");function P_(e={}){const{ref:t,container:n,componentProps:r=Fn,elementProps:s}=e,a=Wc(),c=z_()?.portalNode,[d,f]=v.useState(null),[h,m]=v.useState(null),b=We(T=>{T!==null&&m(T)}),y=v.useRef(null);Fe(()=>{if(n===null){y.current&&(y.current=null,m(null),f(null));return}if(a==null)return;const T=(n&&(gh(n)?n:n.current))??c??document.body;if(T==null){y.current&&(y.current=null,m(null),f(null));return}y.current!==T&&(y.current=T,m(null),f(T))},[n,c,a]);const k=gn("div",r,{ref:[t,b],props:[{id:a,[_P]:""},s]});return{portalNode:h,portalSubtree:d&&k?Di.createPortal(k,d):null}}const AP=v.forwardRef(function(t,n){const{render:r,className:s,style:a,children:l,container:c,renderGuards:d,...f}=t,{portalNode:h,portalSubtree:m}=P_({container:c,ref:n,componentProps:t,elementProps:f}),b=v.useRef(null),y=v.useRef(null),k=v.useRef(null),S=v.useRef(null),[T,R]=v.useState(null),E=v.useRef(!1),_=T?.modal,C=T?.open,D=typeof d=="boolean"?d:!!T&&!T.modal&&T.open&&!!h;v.useEffect(()=>{if(!h||_)return;function M(B){h&&B.relatedTarget&&cc(B)&&(B.type==="focusin"?E.current&&(Pw(h),E.current=!1):(kP(h),E.current=!0))}return Yi(Lt(h,"focusin",M,!0),Lt(h,"focusout",M,!0))},[h,_]),Fe(()=>{!h||C!==!0||!E.current||(Pw(h),E.current=!1)},[C,h]);const N=v.useMemo(()=>({beforeOutsideRef:b,afterOutsideRef:y,beforeInsideRef:k,afterInsideRef:S,portalNode:h,setFocusManagerState:R}),[h]);return g.jsxs(v.Fragment,{children:[m,g.jsxs(j_.Provider,{value:N,children:[D&&h&&g.jsx(Mp,{"data-type":"outside",ref:b,onFocus:M=>{if(cc(M,h))k.current?.focus();else{const B=T?T.domReference:null;M_(B)?.focus()}}}),D&&h&&g.jsx("span",{"aria-owns":h.id,style:CP}),h&&Di.createPortal(l,h),D&&h&&g.jsx(Mp,{"data-type":"outside",ref:y,onFocus:M=>{if(cc(M,h))S.current?.focus();else{const B=T?T.domReference:null;I_(B)?.focus(),T?.closeOnFocusOut&&T?.onOpenChange(!1,Ct(xh,M.nativeEvent))}}})]})]})});function $_(){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 NP{nodesRef={current:[]};events=$_();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 F_=v.createContext(null),B_=v.createContext(null),Ul=()=>v.useContext(F_)?.id||null,ba=e=>{const t=v.useContext(B_);return e??t};function OP(e){const t=Wc(),n=ba(e),r=Ul();return Fe(()=>{if(!t)return;const s={id:t,parentId:r};return n?.addNode(s),()=>{n?.removeNode(s)}},[n,t,r]),t}function IP(e){const{children:t,id:n}=e,r=Ul();return g.jsx(F_.Provider,{value:v.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function MP(e){const{children:t,externalTree:n}=e,r=Fr(()=>n??new NP).current;return g.jsx(B_.Provider,{value:r,children:t})}function ys(e){return e==null?e:"current"in e?e.current:e}function DP(e,t){const n=vn(yr(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 Vw=20;let mo=[];function i0(){mo=mo.filter(e=>e.deref()?.isConnected)}function Gw(e){i0(),e&&er(e)!=="body"&&(mo.push(new WeakRef(e)),mo.length>Vw&&(mo=mo.slice(-Vw)))}function Ww(){return i0(),mo[mo.length-1]?.deref()}function LP(e){return e?r0(e)?e:Ch(e)[0]||e:null}function Kw(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const n=N_(e).filter(s=>{const a=s.getAttribute("data-tabindex")||"";return r0(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 jP(e){const{context:t,children:n,disabled:r=!1,initialFocus:s=!0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,closeOnFocusOut:d=!0,openInteractionType:f="",nextFocusableElement:h,previousFocusableElement:m,beforeContentFocusGuardRef:b,externalTree:y,getInsideElements:k}=e,S="rootStore"in t?t.rootStore:t,T=S.useState("open"),R=S.useState("domReferenceElement"),E=S.useState("floatingElement"),{events:_,dataRef:C}=S.context,D=We(()=>C.current.floatingContext?.nodeId),N=s===!1,M=Fy(R)&&N,B=On(s),P=On(a),A=On(f),K=On(T),$=ba(y),F=z_(),z=v.useRef(!1),U=v.useRef(!1),q=v.useRef(!1),W=v.useRef(null),H=v.useRef(""),Y=v.useRef(""),O=v.useRef(null),j=v.useRef(null),V=xo(O,b,F?.beforeInsideRef),L=xo(j,F?.afterInsideRef),Z=yi(),se=yi(),ne=Rl(),oe=F!=null,ae=Op(E),ue=We((ce=ae)=>ce?Ch(ce):[]),we=We(()=>k?.().filter(ce=>ce!=null)??[]);v.useEffect(()=>{if(r||!c)return;function ce(ve){ve.key==="Tab"&&bt(ae,mr(Kt(ae)))&&ue().length===0&&!M&&qi(ve)}const be=Kt(ae);return Lt(be,"keydown",ce)},[r,ae,c,M,ue]),v.useEffect(()=>{if(r||!T)return;const ce=Kt(ae);function be(){q.current=!1}function ve(Se){const ke=yr(Se),Ae=we(),Oe=bt(E,ke)||bt(R,ke)||bt(F?.portalNode,ke)||Ae.some(Me=>Me===ke||bt(Me,ke));q.current=!Oe,Y.current=Se.pointerType||"keyboard",ke?.closest(`[${TP}]`)&&(U.current=!0,se.start(0,()=>{U.current=!1}))}function Re(){Y.current="keyboard"}return Yi(Lt(ce,"pointerdown",ve,!0),Lt(ce,"pointerup",be,!0),Lt(ce,"pointercancel",be,!0),Lt(ce,"keydown",Re,!0),be)},[r,E,R,ae,T,F,se,we]),v.useEffect(()=>{if(r||!d)return;const ce=Kt(ae);function be(){U.current=!0,se.start(0,()=>{U.current=!1})}function ve(Ae){const Oe=yr(Ae);r0(Oe)&&(W.current=Oe)}function Re(Ae){const Oe=Ae.relatedTarget,Me=Ae.currentTarget,Ue=yr(Ae);c&&Oe==null&&Ue!=null&&bt(E,Ue)&&Gw(Ue),queueMicrotask(()=>{const xe=D(),_e=S.context.triggerElements,ee=we(),fe=Oe?.hasAttribute(Tc("focus-guard"))&&[O.current,j.current,F?.beforeInsideRef.current,F?.afterInsideRef.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,ys(m),ys(h)].includes(Oe),J=!(bt(R,Oe)||bt(E,Oe)||bt(Oe,E)||bt(F?.portalNode,Oe)||ee.some(re=>re===Oe||bt(re,Oe))||Oe!=null&&_e.hasElement(Oe)||_e.hasMatchingElement(re=>bt(re,Oe))||fe||$&&(wo($.nodesRef.current,xe).find(re=>bt(re.context?.elements.floating,Oe)||bt(re.context?.elements.domReference,Oe))||$w($.nodesRef.current,xe).find(re=>[re.context?.elements.floating,Op(re.context?.elements.floating)].includes(Oe)||re.context?.elements.domReference===Oe)));if(Me===R&&ae&&Kw(ae),l&&Me!==R&&!Rh(Ue)&&mr(ce)===ce.body){if(Bt(ae)&&(ae.focus(),l==="popup")){ne.request(()=>{ae.focus()});return}const re=ue(),Te=W.current,Le=(Te&&re.includes(Te)?Te:null)||re[re.length-1]||ae;Bt(Le)&&Le.focus()}if(C.current.insideReactTree){C.current.insideReactTree=!1;return}(M||!c)&&Oe&&J&&!U.current&&(M||Oe!==Ww())&&(z.current=!0,S.setOpen(!1,Ct(xh,Ae)))})}function Se(){q.current||(C.current.insideReactTree=!0,Z.start(0,()=>{C.current.insideReactTree=!1}))}const ke=Bt(R)?R:null;if(!(!E&&!ke))return Yi(ke&&Lt(ke,"focusout",Re),ke&&Lt(ke,"pointerdown",be),E&&Lt(E,"focusin",ve),E&&Lt(E,"focusout",Re),E&&F&&Lt(E,"focusout",Se,!0))},[r,R,E,ae,c,$,F,S,d,l,ue,M,D,C,Z,se,ne,h,m,we]),v.useEffect(()=>{if(r||!E||!T)return;const ce=Array.from(F?.portalNode?.querySelectorAll(`[${Tc("portal")}]`)||[]),ve=($?$w($.nodesRef.current,D()):[]).find(Me=>Fy(Me.context?.elements.domReference||null))?.context?.elements.domReference,Se=[...[E,...ce,O.current,j.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,...we()],ve,ys(m),ys(h),M?R:null].filter(Me=>Me!=null),ke=qw(Se,{ariaHidden:c||M,mark:!1}),Ae=[E,...ce].filter(Me=>Me!=null),Oe=qw(Ae);return()=>{Oe(),ke()}},[T,r,R,E,c,F,M,$,D,h,m,we]),Fe(()=>{if(!T||r||!Bt(ae))return;const ce=Kt(ae),be=mr(ce);queueMicrotask(()=>{const ve=B.current,Re=typeof ve=="function"?ve(A.current||""):ve;if(Re===void 0||Re===!1||bt(ae,be))return;let ke=null;const Ae=()=>(ke==null&&(ke=ue(ae)),ke[0]||ae);let Oe;Re===!0||Re===null?Oe=Ae():Oe=ys(Re),Oe=Oe||Ae();const Me=bt(ae,mr(ce));vp(Oe,{preventScroll:Oe===ae,shouldFocus(){if(!K.current)return!1;if(Me)return!0;const Ue=mr(ce);return!(Ue!==Oe&&bt(ae,Ue))}})})},[r,T,ae,ue,B,A,K]),Fe(()=>{if(r||!ae)return;const ce=Kt(ae),be=mr(ce),ve=A.current==null;Gw(be);function Re(ke){if(ke.open||(H.current=DP(ke.nativeEvent,Y.current)),ke.reason===Tr&&ke.nativeEvent.type==="mouseleave"&&(z.current=!0),ke.reason===Kv)if(ke.nested)z.current=!1;else if(Qv(ke.nativeEvent)||g_(ke.nativeEvent))z.current=!1;else{let Ae=!1;Kt(ae).createElement("div").focus({get preventScroll(){return Ae=!0,!1}}),Ae?z.current=!1:z.current=!0}}_.on("openchange",Re);function Se(){const ke=P.current;let Ae=typeof ke=="function"?ke(H.current):ke;if(Ae===void 0||Ae===!1)return null;Ae===null&&(Ae=!0);const Oe=R?.isConnected?R:null,Me=be?.isConnected&&er(be)!=="body"?be:null;let Ue=ve?Me||Oe:Oe||Me;return Ue||(Ue=Ww()||null),typeof Ae=="boolean"?Ue:ys(Ae)||Ue||null}return()=>{_.off("openchange",Re);const ke=mr(ce),Ae=we(),Oe=bt(E,ke)||Ae.some(xe=>xe===ke||bt(xe,ke))||$&&wo($.nodesRef.current,D(),!1).some(xe=>bt(xe.context?.elements.floating,ke)),Me=P.current,Ue=Se();queueMicrotask(()=>{const xe=LP(Ue),_e=typeof Me!="boolean";Me&&!z.current&&Bt(xe)&&(!(!_e&&xe!==ke&&ke!==ce.body)||Oe)&&xe.focus({preventScroll:!0}),z.current=!1})}},[r,E,ae,P,A,_,$,R,D,we]),Fe(()=>{if(!Ro||T||!E)return;const ce=mr(Kt(E));!Bt(ce)||!Th(ce)||bt(E,ce)&&ce.blur()},[T,E]),Fe(()=>{if(!(r||!F))return F.setFocusManagerState({modal:c,closeOnFocusOut:d,open:T,onOpenChange:S.setOpen,domReference:R}),()=>{F.setFocusManagerState(null)}},[r,F,c,T,S,d,R]),Fe(()=>{if(!(r||!ae))return Kw(ae),()=>{queueMicrotask(i0)}},[r,ae]);const me=!r&&(c?!M:!0)&&(oe||c);return g.jsxs(v.Fragment,{children:[me&&g.jsx(Mp,{"data-type":"inside",ref:V,onFocus:ce=>{if(c){const be=ue();vp(be[be.length-1])}else F?.portalNode&&(z.current=!1,cc(ce,F.portalNode)?I_(R)?.focus():ys(m??F.beforeOutsideRef)?.focus())}}),n,me&&g.jsx(Mp,{"data-type":"inside",ref:L,onFocus:ce=>{c?vp(ue()[0]):F?.portalNode&&(d&&(z.current=!0),cc(ce,F.portalNode)?M_(R)?.focus():ys(h??F.afterOutsideRef)?.focus())}})]})}function zP(e,t={}){const{enabled:n=!0,event:r="click",toggle:s=!0,ignoreMouse:a=!1,stickIfOpen:l=!0,touchOpenDelay:c=0,reason:d=Fl}=t,f="rootStore"in e?e.rootStore:e,h=f.context.dataRef,m=v.useRef(void 0),b=Rl(),y=yi(),k=v.useMemo(()=>{function S(R,E,_,C){const D=Ct(d,E,_);R&&C==="touch"&&c>0?y.start(c,()=>{f.setOpen(!0,D)}):f.setOpen(R,D)}function T(R,E,_){const C=h.current.openEvent,D=f.select("domReferenceElement")!==E;return R&&D||!R||!s?!0:C&&l?!_(C.type):!1}return{onPointerDown(R){m.current=R.pointerType},onMouseDown(R){const E=m.current,_=R.nativeEvent,C=f.select("open");if(R.button!==0||r==="click"||oa(E,!0)&&a)return;const D=T(C,R.currentTarget,B=>B==="click"||B==="mousedown"),N=yr(_);if(Th(N)){S(D,_,N,E);return}const M=R.currentTarget;b.request(()=>{S(D,_,M,E)})},onClick(R){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 _=f.select("open"),C=T(_,R.currentTarget,D=>D==="click"||D==="mousedown"||D==="keydown"||D==="keyup");S(C,R.nativeEvent,R.currentTarget,E)},onKeyDown(){m.current=void 0}}},[h,r,a,d,f,l,s,b,y,c]);return v.useMemo(()=>n?{reference:k}:Fn,[n,k])}function PP(e,t){let n=null,r=null,s=!1;return{contextElement:e||void 0,getBoundingClientRect(){const a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},l=t.axis==="x"||t.axis==="both",c=t.axis==="y"||t.axis==="both",d=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let f=a.width,h=a.height,m=a.x,b=a.y;return n==null&&t.x&&l&&(n=a.x-t.x),r==null&&t.y&&c&&(r=a.y-t.y),m-=n||0,b-=r||0,f=0,h=0,!s||d?(f=t.axis==="y"?a.width:0,h=t.axis==="x"?a.height:0,m=l&&t.x!=null?t.x:m,b=c&&t.y!=null?t.y:b):s&&!d&&(h=t.axis==="x"?a.height:h,f=t.axis==="y"?a.width:f),s=!0,{width:f,height:h,x:m,y:b,top:b,right:m+f,bottom:b+h,left:m}}}}function Yw(e){return e!=null&&e.clientX!=null}function $P(e,t={}){const{enabled:n=!0,axis:r="both"}=t,s="rootStore"in e?e.rootStore:e,a=s.useState("open"),l=s.useState("floatingElement"),c=s.useState("domReferenceElement"),d=s.context.dataRef,f=v.useRef(!1),h=v.useRef(null),[m,b]=v.useState(),[y,k]=v.useState([]),S=We(C=>{s.set("positionReference",C)}),T=We((C,D,N)=>{f.current||d.current.openEvent&&!Yw(d.current.openEvent)||s.set("positionReference",PP(N??c,{x:C,y:D,axis:r,dataRef:d,pointerType:m}))}),R=We(C=>{a?h.current||(T(C.clientX,C.clientY,C.currentTarget),k([])):T(C.clientX,C.clientY,C.currentTarget)}),E=oa(m)?l:a;v.useEffect(()=>{if(!n){S(c);return}if(!E)return;function C(){h.current?.(),h.current=null}const D=vn(l);function N(M){const B=yr(M);bt(l,B)?C():T(M.clientX,M.clientY)}return!d.current.openEvent||Yw(d.current.openEvent)?h.current=Lt(D,"mousemove",N):S(c),C},[E,n,l,d,c,s,T,S,y]),v.useEffect(()=>()=>{s.set("positionReference",null)},[s]),v.useEffect(()=>{n&&!l&&(f.current=!1)},[n,l]),v.useEffect(()=>{!n&&a&&(f.current=!0)},[n,a]);const _=v.useMemo(()=>{function C(D){b(D.pointerType)}return{onPointerDown:C,onPointerEnter:C,onMouseMove:R,onMouseEnter:R}},[R]);return v.useMemo(()=>n?{reference:_,trigger:_}:{},[n,_])}function FP(){return!1}function BP(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function s0(e,t={}){const{enabled:n=!0,escapeKey:r=!0,outsidePress:s=!0,outsidePressEvent:a="sloppy",referencePress:l=FP,bubbles:c,externalTree:d}=t,f="rootStore"in e?e.rootStore:e,h=f.useState("open"),m=f.useState("floatingElement"),{dataRef:b}=f.context,y=ba(d),k=We(typeof s=="function"?s:()=>!1),S=typeof s=="function"?k:s,T=S!==!1,R=We(()=>a),{escapeKey:E,outsidePress:_}=BP(c),C=v.useRef(!1),D=v.useRef(!1),N=v.useRef(!1),M=v.useRef(!1),B=v.useRef(""),P=v.useRef(null),A=yi(),K=yi(),$=We(()=>{K.clear(),b.current.insideReactTree=!1}),F=We(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=We(V=>Sb(V,f.select("floatingElement"))||Sb(V,f.select("domReferenceElement"))),U=We(V=>{l()&&f.setOpen(!1,Ct(Fl,V.nativeEvent))}),q=We(V=>{if(!h||!n||!r||V.key!=="Escape"||M.current||!E&&F("__escapeKeyBubbles"))return;const L=Wz(V)?V.nativeEvent:V,Z=Ct(Yv,L);f.setOpen(!1,Z),Z.isCanceled||V.preventDefault(),!E&&!Z.isPropagationAllowed&&V.stopPropagation()}),W=We(()=>{b.current.insideReactTree=!0,K.start(0,$)}),H=We(V=>{if(!h||!n||V.button!==0)return;const L=yr(V.nativeEvent);bt(f.select("floatingElement"),L)&&(C.current||(C.current=!0,D.current=!1))}),Y=We(V=>{!h||!n||(V.defaultPrevented||V.nativeEvent.defaultPrevented)&&C.current&&(D.current=!0)});v.useEffect(()=>{if(!h||!n)return;b.current.__escapeKeyBubbles=E,b.current.__outsidePressBubbles=_;const V=new Ii,L=new Ii;function Z(){V.clear(),M.current=!0}function se(){V.start(Ro?5:0,()=>{M.current=!1})}function ne(){N.current=!0,L.start(0,()=>{N.current=!1})}function oe(){C.current=!1,D.current=!1}function ae(){const ee=B.current,fe=ee==="pen"||!ee?"mouse":ee,J=R(),re=typeof J=="function"?J():J;return typeof re=="string"?re:re[fe]}function ue(ee){const fe=ae();return fe==="intentional"&&ee.type!=="click"||fe==="sloppy"&&ee.type==="click"}function we(ee){const fe=b.current.floatingContext?.nodeId,J=y&&wo(y.nodesRef.current,fe).some(re=>Sb(ee,re.context?.elements.floating));return z(ee)||J}function me(ee){if(ue(ee)){ee.type!=="click"&&!z(ee)&&(L.clear(),N.current=!1),$();return}if(b.current.insideReactTree){$();return}const fe=yr(ee),J=`[${Tc("inert")}]`,re=vt(fe)?fe.getRootNode():null,Te=Array.from((So(re)?re:Kt(f.select("floatingElement"))).querySelectorAll(J)),Le=f.context.triggerElements;if(fe&&(Le.hasElement(fe)||Le.hasMatchingElement(Qe=>bt(Qe,fe))))return;let Ke=vt(fe)?fe:null;for(;Ke&&!Ai(Ke);){const Qe=_s(Ke);if(Ai(Qe)||!vt(Qe))break;Ke=Qe}if(!(Te.length&&vt(fe)&&!Yz(fe)&&!bt(fe,f.select("floatingElement"))&&Te.every(Qe=>!bt(Ke,Qe)))){if(Bt(fe)&&!("touches"in ee)){const Qe=Ai(fe),gt=_r(fe),Je=/auto|scroll/,xt=Qe||Je.test(gt.overflowX),Rt=Qe||Je.test(gt.overflowY),rt=xt&&fe.clientWidth>0&&fe.scrollWidth>fe.clientWidth,et=Rt&&fe.clientHeight>0&&fe.scrollHeight>fe.clientHeight,ze=gt.direction==="rtl",He=et&&(ze?ee.offsetX<=fe.offsetWidth-fe.clientWidth:ee.offsetX>fe.clientWidth),Ze=rt&&ee.offsetY>fe.clientHeight;if(He||Ze)return}if(!we(ee)){if(ae()==="intentional"&&N.current){L.clear(),N.current=!1;return}typeof S=="function"&&!S(ee)||F("__outsidePressBubbles")||(f.setOpen(!1,Ct(Kv,ee)),$())}}}function ce(ee){ae()!=="sloppy"||ee.pointerType==="touch"||!f.select("open")||!n||z(ee)||me(ee)}function be(ee){if(ae()!=="sloppy"||!f.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},A.start(1e3,()=>{P.current&&(P.current.dismissOnTouchEnd=!1,P.current.dismissOnMouseDown=!1)}))}function ve(ee,fe){const J=yr(ee);if(!J)return;const re=Lt(J,ee.type,()=>{fe(ee),re()})}function Re(ee){B.current="touch",ve(ee,be)}function Se(ee){A.clear(),ee.type==="pointerdown"&&(B.current=ee.pointerType),!(ee.type==="mousedown"&&P.current&&!P.current.dismissOnMouseDown)&&ve(ee,fe=>{fe.type==="pointerdown"?ce(fe):me(fe)})}function ke(ee){if(!C.current)return;const fe=D.current;if(oe(),ae()==="intentional"){if(ee.type==="pointercancel"){fe&&ne();return}if(!we(ee)){if(fe){ne();return}typeof S=="function"&&!S(ee)||(L.clear(),N.current=!0,$())}}}function Ae(ee){if(ae()!=="sloppy"||!P.current||z(ee))return;const fe=ee.touches[0];if(!fe)return;const J=Math.abs(fe.clientX-P.current.startX),re=Math.abs(fe.clientY-P.current.startY),Te=Math.sqrt(J*J+re*re);Te>5&&(P.current.dismissOnTouchEnd=!0),Te>10&&(me(ee),A.clear(),P.current=null)}function Oe(ee){ve(ee,Ae)}function Me(ee){ae()!=="sloppy"||!P.current||z(ee)||(P.current.dismissOnTouchEnd&&me(ee),A.clear(),P.current=null)}function Ue(ee){ve(ee,Me)}const xe=Kt(m),_e=Yi(r&&Yi(Lt(xe,"keydown",q),Lt(xe,"compositionstart",Z),Lt(xe,"compositionend",se)),T&&Yi(Lt(xe,"click",Se,!0),Lt(xe,"pointerdown",Se,!0),Lt(xe,"pointerup",ke,!0),Lt(xe,"pointercancel",ke,!0),Lt(xe,"mousedown",Se,!0),Lt(xe,"mouseup",ke,!0),Lt(xe,"touchstart",Re,!0),Lt(xe,"touchmove",Oe,!0),Lt(xe,"touchend",Ue,!0)));return()=>{_e(),V.clear(),L.clear(),oe(),N.current=!1}},[b,m,r,T,S,h,n,E,_,q,$,R,F,z,y,f,A]),v.useEffect($,[S,$]);const O=v.useMemo(()=>({onKeyDown:q,onPointerDown:U,onClick:U}),[q,U]),j=v.useMemo(()=>({onKeyDown:q,onPointerDown:Y,onMouseDown:Y,onClickCapture:W,onMouseDownCapture(V){W(),H(V)},onPointerDownCapture(V){W(),H(V)},onMouseUpCapture:W,onTouchEndCapture:W,onTouchMoveCapture:W}),[q,W,H,Y]);return v.useMemo(()=>n?{reference:O,floating:j,trigger:O}:{},[n,O,j])}function Xw(e,t,n){let{reference:r,floating:s}=e;const a=gi(t),l=n0(t),c=t0(l),d=ri(t),f=a==="y",h=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,b=r[c]/2-s[c]/2;let y;switch(d){case"top":y={x:h,y:r.y-s.height};break;case"bottom":y={x:h,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-s.width,y:m};break;default:y={x:r.x,y:r.y}}const k=Co(t);return k&&(y[l]+=b*(k==="end"?1:-1)*(n&&f?-1:1)),y}async function UP(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:l,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:m="floating",altBoundary:b=!1,padding:y=0}=As(t,e),k=w_(y),T=c[b?m==="floating"?"reference":"floating":m],R=Ec(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(T)))==null||n?T:T.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:h,strategy:d})),E=m==="floating"?{x:r,y:s,width:l.floating.width,height:l.floating.height}:l.reference,_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),C=await(a.isElement==null?void 0:a.isElement(_))&&await(a.getScale==null?void 0:a.getScale(_))||{x:1,y:1},D=Ec(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:E,offsetParent:_,strategy:d}):E);return{top:(R.top-D.top+k.top)/C.y,bottom:(D.bottom-R.bottom+k.bottom)/C.y,left:(R.left-D.left+k.left)/C.x,right:(D.right-R.right+k.right)/C.x}}const HP=50,qP=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:UP},d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:m}=Xw(f,r,d),b=r,y=0;const k={};for(let S=0;S<a.length;S++){const T=a[S];if(!T)continue;const{name:R,fn:E}=T,{x:_,y:C,data:D,reset:N}=await E({x:h,y:m,initialPlacement:r,placement:b,strategy:s,middlewareData:k,rects:f,platform:c,elements:{reference:e,floating:t}});h=_??h,m=C??m,k[R]={...k[R],...D},N&&y<HP&&(y++,typeof N=="object"&&(N.placement&&(b=N.placement),N.rects&&(f=N.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):N.rects),{x:h,y:m}=Xw(f,b,d)),S=-1)}return{x:h,y:m,placement:b,strategy:s,middlewareData:k}},VP=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:a,rects:l,initialPlacement:c,platform:d,elements:f}=t,{mainAxis:h=!0,crossAxis:m=!0,fallbackPlacements:b,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:S=!0,...T}=As(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const R=ri(s),E=gi(c),_=ri(c)===c,C=await(d.isRTL==null?void 0:d.isRTL(f.floating)),D=b||(_||!S?[Dp(c)]:uP(c)),N=k!=="none";!b&&N&&D.push(...pP(c,S,k,C));const M=[c,...D],B=await d.detectOverflow(t,T),P=[];let A=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&P.push(B[R]),m){const z=lP(s,l,C);P.push(B[z[0]],B[z[1]])}if(A=[...A,{placement:s,overflows:P}],!P.every(z=>z<=0)){var K,$;const z=(((K=a.flip)==null?void 0:K.index)||0)+1,U=M[z];if(U&&(!(m==="alignment"?E!==gi(U):!1)||A.every(H=>gi(H.placement)===E?H.overflows[0]>0:!0)))return{data:{index:z,overflows:A},reset:{placement:U}};let q=($=A.filter(W=>W.overflows[0]<=0).sort((W,H)=>W.overflows[1]-H.overflows[1])[0])==null?void 0:$.placement;if(!q)switch(y){case"bestFit":{var F;const W=(F=A.filter(H=>{if(N){const Y=gi(H.placement);return Y===E||Y==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(Y=>Y>0).reduce((Y,O)=>Y+O,0)]).sort((H,Y)=>H[1]-Y[1])[0])==null?void 0:F[0];W&&(q=W);break}case"initialPlacement":q=c;break}if(s!==q)return{reset:{placement:q}}}return{}}}};function Zw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qw(e){return oP.some(t=>e[t]>=0)}const GP=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=Zw(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Qw(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...a,altBoundary:!0}),c=Zw(l,n.floating);return{data:{escapedOffsets:c,escaped:Qw(c)}}}default:return{}}}}},U_=new Set(["left","top"]);async function WP(e,t){const{placement:n,platform:r,elements:s}=e,a=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=ri(n),c=Co(n),d=gi(n)==="y",f=U_.has(l)?-1:1,h=a&&d?-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),d?{x:y*h,y:b*f}:{x:b*f,y:y*h}}const KP=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:a,placement:l,middlewareData:c}=t,d=await WP(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:s+d.x,y:a+d.y,data:{...d,placement:l}}}}},YP=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s,platform:a}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:d={fn:E=>{let{x:_,y:C}=E;return{x:_,y:C}}},...f}=As(e,t),h={x:n,y:r},m=await a.detectOverflow(t,f),b=gi(s),y=e0(b);let k=h[y],S=h[b];const T=(E,_)=>S_(_+m[E==="y"?"top":"left"],_,_-m[E==="y"?"bottom":"right"]);l&&(k=T(y,k)),c&&(S=T(b,S));const R=d.fn({...t,[y]:k,[b]:S});return{...R,data:{x:R.x-n,y:R.y-r,enabled:{[y]:l,[b]:c}}}}}},XP=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:s,y:a,placement:l,rects:c,middlewareData:d}=t,{offset:f=0,mainAxis:h=!0,crossAxis:m=!0}=As(e,t),b={x:s,y:a},y=gi(l),k=e0(y);let S=b[k],T=b[y];const R=As(f,t),E=typeof R=="number"?{mainAxis:R,crossAxis:0}:{mainAxis:(n=R.mainAxis)!=null?n:0,crossAxis:(r=R.crossAxis)!=null?r:0};if(h){const D=k==="y"?"height":"width",N=c.reference[k]-c.floating[D]+E.mainAxis,M=c.reference[k]+c.reference[D]-E.mainAxis;S<N?S=N:S>M&&(S=M)}if(m){var _,C;const D=k==="y"?"width":"height",N=U_.has(ri(l)),M=c.reference[y]-c.floating[D]+(N&&((_=d.offset)==null?void 0:_[y])||0)+(N?0:E.crossAxis),B=c.reference[y]+c.reference[D]+(N?0:((C=d.offset)==null?void 0:C[y])||0)-(N?E.crossAxis:0);T<M?T=M:T>B&&(T=B)}return{[k]:S,[y]:T}}}},ZP=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),d=await s.detectOverflow(t,c),f=ri(n),h=Co(n),m=gi(n)==="y",{width:b,height:y}=r.floating;let k,S;f==="top"||f==="bottom"?(k=f,S=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(S=f,k=h==="end"?"top":"bottom");const T=y-d.top-d.bottom,R=b-d.left-d.right,E=Cl(y-d[k],T),_=Cl(b-d[S],R),C=t.middlewareData.shift,D=!C;let N=E,M=_;C!=null&&C.enabled.x&&(M=R),C!=null&&C.enabled.y&&(N=T),D&&!h&&(m?M=b-2*Ts(d.left,d.right):N=y-2*Ts(d.top,d.bottom)),await l({...t,availableWidth:M,availableHeight:N});const B=await s.getDimensions(a.floating);return b!==B.width||y!==B.height?{reset:{rects:!0}}:{}}}};function H_(e){const t=_r(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Bt(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 o0(e){return vt(e)?e:e.contextElement}function xl(e){const t=o0(e);if(!Bt(t))return Rs(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=H_(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 QP=Rs(0);function q_(e){const t=vn(e);return!yh()||!t.visualViewport?QP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function JP(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===vn(e)}function aa(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=o0(e);let l=Rs(1);t&&(r?vt(r)&&(l=xl(r)):l=xl(e));const c=JP(a,n,r)?q_(a):Rs(0);let d=(s.left+c.x)/l.x,f=(s.top+c.y)/l.y,h=s.width/l.x,m=s.height/l.y;if(a&&r){const b=vn(a),y=vt(r)?vn(r):r;let k=b,S=zy(k);for(;S&&y!==k;){const T=xl(S),R=S.getBoundingClientRect(),E=_r(S),_=R.left+(S.clientLeft+parseFloat(E.paddingLeft))*T.x,C=R.top+(S.clientTop+parseFloat(E.paddingTop))*T.y;d*=T.x,f*=T.y,h*=T.x,m*=T.y,d+=_,f+=C,k=vn(S),S=zy(k)}}return Ec({width:h,height:m,x:d,y:f})}function _h(e,t){const n=vh(e).scrollLeft;return t?t.left+n:aa(Os(e)).left+n}function V_(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-_h(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function e6(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",l=Os(r),c=t?bh(t.floating):!1;if(r===l||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Rs(1);const h=Rs(0),m=Bt(r);if((m||!a)&&((er(r)!=="body"||ga(l))&&(d=vh(r)),m)){const y=aa(r);f=xl(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const b=l&&!m&&!a?V_(l,d):Rs(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+h.x+b.x,y:n.y*f.y-d.scrollTop*f.y+h.y+b.y}}function t6(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function n6(e){const t=vh(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+_h(e);const l=-t.scrollTop;return _r(n).direction==="rtl"&&(a+=Ts(e.clientWidth,n.clientWidth)-r),{width:r,height:s,x:a,y:l}}const r6=25;function i6(e,t,n){n===void 0&&(n="viewport");const r=n==="layoutViewport",s=vn(e),a=Os(e),l=s.visualViewport;let c=a.clientWidth,d=a.clientHeight,f=0,h=0;if(l){const b=!yh()||t==="fixed";r?b||(f=-l.offsetLeft,h=-l.offsetTop):(c=l.width,d=l.height,b&&(f=l.offsetLeft,h=l.offsetTop))}if(_h(a)<=0){const b=a.ownerDocument,y=b.body,k=getComputedStyle(y),S=b.compatMode==="CSS1Compat"&&parseFloat(k.marginLeft)+parseFloat(k.marginRight)||0,T=Math.abs(a.clientWidth-y.clientWidth-S),R=getComputedStyle(a).scrollbarGutter==="stable both-edges"?T/2:T;R<=r6&&(c-=R)}return{width:c,height:d,x:f,y:h}}function s6(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,d=s*a.x,f=r*a.y;return{width:l,height:c,x:d,y:f}}function Jw(e,t,n){let r;if(t==="viewport"||t==="layoutViewport")r=i6(e,n,t);else if(t==="document")r=n6(Os(e));else if(vt(t))r=s6(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 Ec(r)}function o6(e,t){const n=t.get(e);if(n)return n;let r=bo(e,[],!1).filter(c=>vt(c)&&er(c)!=="body"),s=null;const a=_r(e).position==="fixed";let l=a?_s(e):e;for(;vt(l)&&!Ai(l);){const c=_r(l),d=Gv(l),f=s?s.position:a?"fixed":"";!d&&(f==="fixed"||f==="absolute"&&c.position==="static")?r=r.filter(m=>m!==l):s=c,l=_s(l)}return t.set(e,r),r}function a6(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?bh(t)?[]:o6(t,this._c):[].concat(n),r],c=Jw(t,l[0],s);let d=c.top,f=c.right,h=c.bottom,m=c.left;for(let b=1;b<l.length;b++){const y=Jw(t,l[b],s);d=Ts(y.top,d),f=Cl(y.right,f),h=Cl(y.bottom,h),m=Ts(y.left,m)}return{width:f-m,height:h-d,x:m,y:d}}function l6(e){const{width:t,height:n}=H_(e);return{width:t,height:n}}function u6(e,t,n){const r=Bt(t),s=Os(t),a=n==="fixed",l=aa(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Rs(0);if((r||!a)&&((er(t)!=="body"||ga(s))&&(c=vh(t)),r)){const b=aa(t,!0,a,t);d.x=b.x+t.clientLeft,d.y=b.y+t.clientTop}!r&&s&&(d.x=_h(s));const f=s&&!r&&!a?V_(s,c):Rs(0),h=l.left+c.scrollLeft-d.x-f.x,m=l.top+c.scrollTop-d.y-f.y;return{x:h,y:m,width:l.width,height:l.height}}function Rb(e){return _r(e).position==="static"}function eE(e,t){if(!Bt(e)||_r(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Os(e)===n&&(n=n.ownerDocument.body),n}function G_(e,t){const n=vn(e);if(bh(e))return n;if(!Bt(e)){let s=_s(e);for(;s&&!Ai(s);){if(vt(s)&&!Rb(s))return s;s=_s(s)}return n}let r=eE(e,t);for(;r&&Cz(r)&&Rb(r);)r=eE(r,t);return r&&Ai(r)&&Rb(r)&&!Gv(r)?n:r||Nz(e)||n}const c6=async function(e){const t=this.getOffsetParent||G_,n=this.getDimensions,r=await n(e.floating);return{reference:u6(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function f6(e){return _r(e).direction==="rtl"}const W_={convertOffsetParentRelativeRectToViewportRelativeRect:e6,getDocumentElement:Os,getClippingRect:a6,getOffsetParent:G_,getElementRects:c6,getClientRects:t6,getDimensions:l6,getScale:xl,isElement:vt,isRTL:f6};function K_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function d6(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:T}=b;if(h||t(),!S||!T)return;const R=bl(k),E=bl(a.clientWidth-(y+S)),_=bl(a.clientHeight-(k+T)),C=bl(y),N={rootMargin:-R+"px "+-E+"px "+-_+"px "+-C+"px",threshold:Ts(0,Cl(1,m))||1};let M=!0;function B(P){const A=P[0].intersectionRatio;if(!K_(b,e.getBoundingClientRect()))return c();if(A!==m){if(!M)return c();A?c(!1,A):s=setTimeout(()=>{c(!1,1e-7)},1e3)}M=!1}try{r=new IntersectionObserver(B,{...N,root:a.ownerDocument})}catch{r=new IntersectionObserver(B,N)}r.observe(e)}const d=vn(e),f=()=>c(n);return d.addEventListener("resize",f),c(!0),()=>{d.removeEventListener("resize",f),l()}}function jp(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=o0(e),h=s||a?[...f?bo(f):[],...t?bo(t):[]]:[];h.forEach(R=>{s&&R.addEventListener("scroll",n),a&&R.addEventListener("resize",n)});const m=f&&c?d6(f,n,a):null;let b=-1,y=null;l&&(y=new ResizeObserver(R=>{let[E]=R;E&&E.target===f&&y&&t&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var _;(_=y)==null||_.observe(t)})),n()}),f&&!d&&y.observe(f),t&&y.observe(t));let k,S=d?aa(e):null;d&&T();function T(){const R=aa(e);S&&!K_(S,R)&&n(),S=R,k=requestAnimationFrame(T)}return n(),()=>{var R;h.forEach(E=>{s&&E.removeEventListener("scroll",n),a&&E.removeEventListener("resize",n)}),m?.(),(R=y)==null||R.disconnect(),y=null,d&&cancelAnimationFrame(k)}}const p6=KP,h6=YP,m6=VP,g6=ZP,b6=GP,y6=XP,v6=(e,t,n)=>{const r=new Map,s=n??{},a={...W_,...s.platform,_c:r};return qP(e,t,{...s,platform:a})};var x6=typeof document<"u",k6=function(){},xp=x6?v.useLayoutEffect:k6;function zp(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(!zp(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)&&!zp(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Y_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tE(e,t){const n=Y_(e);return Math.round(t*n)/n}function Cb(e){const t=v.useRef(e);return xp(()=>{t.current=e}),t}function X_(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:d,open:f}=e,[h,m]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,y]=v.useState(r);zp(b,r)||y(r);const[k,S]=v.useState(null),[T,R]=v.useState(null),E=v.useCallback(H=>{H!==N.current&&(N.current=H,S(H))},[]),_=v.useCallback(H=>{H!==M.current&&(M.current=H,R(H))},[]),C=a||k,D=l||T,N=v.useRef(null),M=v.useRef(null),B=v.useRef(h),P=d!=null,A=Cb(d),K=Cb(s),$=Cb(f),F=v.useCallback(()=>{if(!N.current||!M.current)return;const H={placement:t,strategy:n,middleware:b};K.current&&(H.platform=K.current),v6(N.current,M.current,H).then(Y=>{const O={...Y,isPositioned:$.current!==!1};z.current&&!zp(B.current,O)&&(B.current=O,Di.flushSync(()=>{m(O)}))})},[b,t,n,K,$]);xp(()=>{f===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,m(H=>({...H,isPositioned:!1})))},[f]);const z=v.useRef(!1);xp(()=>(z.current=!0,()=>{z.current=!1}),[]),xp(()=>{if(C&&(N.current=C),D&&(M.current=D),C&&D){if(A.current)return A.current(C,D,F);F()}},[C,D,F,A,P]);const U=v.useMemo(()=>({reference:N,floating:M,setReference:E,setFloating:_}),[E,_]),q=v.useMemo(()=>({reference:C,floating:D}),[C,D]),W=v.useMemo(()=>{const H={position:n,left:0,top:0};if(!q.floating)return H;const Y=tE(q.floating,h.x),O=tE(q.floating,h.y);return c?{...H,transform:"translate("+Y+"px, "+O+"px)",...Y_(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Y,top:O}},[n,c,q.floating,h.x,h.y]);return v.useMemo(()=>({...h,update:F,refs:U,elements:q,floatingStyles:W}),[h,F,U,q,W])}const a0=(e,t)=>{const n=p6(e);return{name:n.name,fn:n.fn,options:[e,t]}},l0=(e,t)=>{const n=h6(e);return{name:n.name,fn:n.fn,options:[e,t]}},S6=(e,t)=>({fn:y6(e).fn,options:[e,t]}),u0=(e,t)=>{const n=m6(e);return{name:n.name,fn:n.fn,options:[e,t]}},c0=(e,t)=>{const n=g6(e);return{name:n.name,fn:n.fn,options:[e,t]}},w6=(e,t)=>{const n=b6(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Pp(e,t,n,r){return{left:e,top:t,right:n,bottom:r,x:e,y:t,width:n-e,height:r-t}}function E6(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function Z_(e){const t=[];let n,r=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY;for(const c of Array.from(e).sort((d,f)=>d.top-f.top)){if(r=Math.min(r,c.left),s=Math.min(s,c.top),a=Math.max(a,c.right),l=Math.max(l,c.bottom),!n||c.top-n.top>n.height/2)t.push(E6(c));else{const d=t[t.length-1];d.left=Math.min(d.left,c.left),d.right=Math.max(d.right,c.right),d.bottom=Math.max(d.bottom,c.bottom),d.width=d.right-d.left,d.height=d.bottom-d.top}n=c}return{lines:t,fallback:Pp(r,s,a,l)}}function Q_(e,t,n){return e.findIndex(r=>t>r.left-2&&t<r.right+2&&n>r.top-2&&n<r.bottom+2)}function nE(e){return Pp(e.left,e.top,e.right,e.bottom)}function T6(e,t,n){const{lines:r}=Z_(e.getClientRects());if(r.length<2)return;const s=Q_(r,t,n);return{x:t,y:n,lineIndex:s===-1?void 0:s,element:e}}function R6(e,t,n){const{lines:r,fallback:s}=Z_(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 nE(r[n.lineIndex]);if(a!=null&&l!=null){const k=Q_(r,a,l);if(k!==-1)return nE(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],T=c==="t"?k:S;return Pp(T.left,k.top,T.right,S.bottom)}const d=c==="l";let f=r[0].left,h=r[0].right,m=d?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY,b=r[0],y=r[0];for(const k of r){f=Math.min(f,k.left),h=Math.max(h,k.right);const S=d?k.left:k.right;d&&S<m||!d&&S>m?(m=S,b=k,y=k):S===m&&(y=k)}return Pp(f,b.top,h,y.bottom)}function C6(e){return"contextElement"in e&&e.contextElement?e.contextElement:vt(e)?e:void 0}function _6(e,t){function n(s){J_(e,s.currentTarget,s.clientX,s.clientY)}function r(s){t||n(s)}return{onFocus(){e.current=void 0},onMouseEnter:r,onMouseMove:r}}function J_(e,t,n,r){const s=T6(t,n,r);return e.current=s,s}function A6(e){return{name:"inline",async fn(t){const n=t.elements.reference;if(typeof n?.getClientRects!="function")return{};const r=C6(n),s=e.current,a=s?.element===n||s?.element===r?s:void 0,l=R6(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 eA(e){const t=v.useRef(!0);t.current&&(t.current=!1,e())}const st=(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 _b={exports:{}},Ab={};var rE;function N6(){if(rE)return Ab;rE=1;var e=Vc();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,T=k[1];return a(function(){S.value=y,S.getSnapshot=b,d(S)&&T({inst:S})},[m,y,b]),s(function(){return d(S)&&T({inst:S}),m(function(){d(S)&&T({inst:S})})},[m]),l(y),y}function d(m){var b=m.getSnapshot;m=m.value;try{var y=b();return!n(m,y)}catch{return!0}}function f(m,b){return b()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return Ab.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,Ab}var iE;function tA(){return iE||(iE=1,_b.exports=N6()),_b.exports}var f0=tA(),Nb={exports:{}},Ob={};var sE;function O6(){if(sE)return Ob;sE=1;var e=Vc(),t=tA();function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:n,s=t.useSyncExternalStore,a=e.useRef,l=e.useEffect,c=e.useMemo,d=e.useDebugValue;return Ob.useSyncExternalStoreWithSelector=function(f,h,m,b,y){var k=a(null);if(k.current===null){var S={hasValue:!1,value:null};k.current=S}else S=k.current;k=c(function(){function R(N){if(!E){if(E=!0,_=N,N=b(N),y!==void 0&&S.hasValue){var M=S.value;if(y(M,N))return C=M}return C=N}if(M=C,r(_,N))return M;var B=b(N);return y!==void 0&&y(M,B)?(_=N,M):(_=N,C=B)}var E=!1,_,C,D=m===void 0?null:m;return[function(){return R(h())},D===null?void 0:function(){return R(D())}]},[h,m,b,y]);var T=s(f,k[0],k[1]);return l(function(){S.hasValue=!0,S.value=T},[T]),d(T),T},Ob}var oE;function I6(){return oE||(oE=1,Nb.exports=O6()),Nb.exports}var M6=I6();const Vy=[];let Gy;function D6(){return Gy}function L6(e){Vy.push(e)}function d0(e){const t=(n,r)=>{const s=Fr(j6).current;let a;try{Gy=s;for(const l of Vy)l.before(s);a=e(n,r);for(const l of Vy)l.after(s);s.didInitialize=!0}finally{Gy=void 0}return a};return t.displayName=e.displayName||e.name,t}function nA(e){return v.forwardRef(d0(e))}function j6(){return{didInitialize:!1}}const z6=Uv(19),P6=z6?F6:B6;function yt(e,t,n,r,s){return P6(e,t,n,r,s)}function $6(e,t,n,r,s){const a=v.useCallback(()=>t(e.getSnapshot(),n,r,s),[e,t,n,r,s]);return f0.useSyncExternalStore(e.subscribe,a,a)}L6({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()}}),f0.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function F6(e,t,n,r,s){const a=D6();if(!a)return $6(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 B6(e,t,n,r,s){return M6.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a=>t(a,n,r,s))}class rA{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 yt(this,t,n,r,s)}}class p0 extends rA{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){v.useDebugValue(t);const r=this;Fe(()=>{r.state[t]!==n&&r.set(t,n)},[r,t,n])}useSyncedValueWithCleanup(t,n){const r=this;Fe(()=>(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);Fe(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){v.useDebugValue(t);const r=this,s=n!==void 0;Fe(()=>{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),yt(this,this.selectors[t],n,r,s)}useContextCallback(t,n){v.useDebugValue(t);const r=We(n??Jn);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 U6(){const[,e]=v.useState({});return v.useCallback(()=>{e({})},[])}const H6={open:st(e=>e.open),transitionStatus:st(e=>e.transitionStatus),domReferenceElement:st(e=>e.domReferenceElement),referenceElement:st(e=>e.positionReference??e.referenceElement),floatingElement:st(e=>e.floatingElement),floatingId:st(e=>e.floatingId)};class Ah extends p0{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:$_(),nested:r,triggerElements:a},H6),this.syncOnly=n}syncOpenEvent=(t,n)=>{(!t||!this.state.open||n!=null&&Kz(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 q6(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:s,nested:a,onOpenChange:l}=e,c=t.useState("open"),d=t.useState("activeTriggerElement"),f=t.useState(n?"popupElement":"positionerElement"),h=t.context.triggerElements,m=l,b=v.useRef(null);r===void 0&&b.current===null&&(b.current=new Ah({open:c,transitionStatus:void 0,referenceElement:d,floatingElement:f,triggerElements:h,onOpenChange:m,floatingId:s,syncOnly:!0,nested:a}));const y=r??b.current;return t.useSyncedValue("floatingId",s),Fe(()=>{const k={open:c,floatingId:s,referenceElement:d,floatingElement:f};vt(d)&&(k.domReferenceElement=d),y.state.positionReference===y.state.referenceElement&&(k.positionReference=d),y.update(k)},[c,s,d,f,y]),y.context.onOpenChange=m,y.context.nested=a,y}function Kc(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),Fe(()=>{if(!e&&a&&r!=="ending"&&n){const c=Pr.request(()=>{s("ending")});return()=>{Pr.cancel(c)}}},[e,a,r,n]),Fe(()=>{if(!e||t)return;const c=Pr.request(()=>{s(void 0)});return()=>{Pr.cancel(c)}},[t,e]),Fe(()=>{if(!e||!t)return;e&&a&&r!=="idle"&&s("starting");const c=Pr.request(()=>{s("idle")});return()=>{Pr.cancel(c)}},[t,e,a,r]),{mounted:a,setMounted:l,transitionStatus:r}}function iA(e,t=!1,n=!0){const r=Rl();return We((s,a=null)=>{r.cancel();const l=ys(e);if(l==null)return;const c=l,d=()=>{Di.flushSync(s)};if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){s();return}function f(){Promise.all(c.getAnimations().map(h=>h.finished)).then(()=>{a?.aborted||d()}).catch(()=>{if(n){a?.aborted||d();return}const h=c.getAnimations();!a?.aborted&&h.length>0&&h.some(m=>m.pending||m.playState!=="finished")&&f()})}if(t){const h=sa.startingStyle;if(!c.hasAttribute(h)){r.request(f);return}const m=new MutationObserver(()=>{c.hasAttribute(h)||(m.disconnect(),f())});m.observe(c,{attributes:!0,attributeFilter:[h]}),a?.addEventListener("abort",()=>m.disconnect(),{once:!0});return}r.request(f)})}function _o(e){const{enabled:t=!0,open:n,ref:r,onComplete:s}=e,a=We(s),l=iA(r,n,!1);v.useEffect(()=>{if(!t)return;const c=new AbortController;return l(a,c.signal),()=>{c.abort()}},[t,n,a,l])}const h0={tabIndex:-1,[$y]:""};function sA(e,t,n=!1){const r=Wc(),s=Ul()!=null,a=v.useRef(null);e===void 0&&a.current===null&&(a.current=t(r,s));const l=e??a.current;return q6({popupStore:l,treatPopupAsFloatingElement:n,floatingRootContext:l.state.floatingRootContext,floatingId:r,nested:s,onOpenChange:l.setOpen}),{store:l,internalStore:a.current}}function V6(e,t){const n=v.useRef(null),r=v.useRef(null);return v.useCallback(s=>{if(e===void 0)return;let a=!1;if(n.current!==null){const l=n.current,c=r.current,d=t.context.triggerElements.getById(l);c&&d===c&&(t.context.triggerElements.delete(l),a=!0),n.current=null,r.current=null}if(s!==null&&(n.current=e,r.current=s,t.context.triggerElements.add(e,s),a=!0),a){const l=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==l&&t.set("triggerCount",l)}},[t,e])}function G6(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 W6(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function oA(e,t,n,r={}){const s=n.reason,a=s===Tr,l=t&&s===bp,c=!t&&(s===Fl||s===Yv),d=W6(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);const f=()=>{const h={...r.extraState,open:t};l?h.instantType="focus":c?h.instantType="dismiss":a&&(h.instantType=void 0),G6(h,t,n.trigger,d()),e.update(h)};a?Di.flushSync(f):f()}function aA(e,t,n,r){eA(()=>{t===void 0&&e.state.open===!1&&n&&(e.state={...e.state,open:!0,activeTriggerId:r,preventUnmountingOnClose:!1})})}function lA(e,t,n,r){const s=n.useState("isMountedByTrigger",e),a=V6(e,n),l=We(c=>{if(a(c),!c)return;const d=n.select("open"),f=n.select("activeTriggerId");if(f===e){n.update({activeTriggerElement:c,...d?r:null});return}f==null&&d&&n.update({activeTriggerId:e,activeTriggerElement:c,...r})});return Fe(()=>{s&&n.update({activeTriggerElement:t.current,...r})},[s,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:s}}function uA(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState("open"),s=e.useState("triggerCount");Fe(()=>{if(!r){e.state.triggerCount!==0&&e.set("triggerCount",0);return}const a=e.context.triggerElements.size,l={};e.state.triggerCount!==a&&(l.triggerCount=a);const c=e.select("activeTriggerId");let d=null;if(c){const f=e.context.triggerElements.getById(c);f?f!==e.state.activeTriggerElement&&(l.activeTriggerElement=f):d=c}if(!d&&!c&&a===1){const f=e.context.triggerElements.entries().next();if(!f.done){const[h,m]=f.value;l.activeTriggerId=h,l.activeTriggerElement=m}}(l.triggerCount!==void 0||l.activeTriggerId!==void 0||l.activeTriggerElement!==void 0)&&e.update(l),d&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===d&&!e.context.triggerElements.getById(d)){const f=Ct(Oi);e.setOpen(!1,f),f.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,s,n])}function cA(e,t,n){const{mounted:r,setMounted:s,transitionStatus:a}=Kc(e),l=t.useState("preventUnmountingOnClose"),c=e?!1:l;t.useSyncedValues({mounted:r,transitionStatus:a,preventUnmountingOnClose:c});const d=We(()=>{s(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return _o({enabled:r&&!e&&!c,open:e,ref:t.context.popupRef,onComplete(){e||d()}}),{forceUnmount:d,transitionStatus:a}}function fA(e,t){e.useSyncedValues(t),Fe(()=>()=>{e.update({activeTriggerProps:Fn,inactiveTriggerProps:Fn,popupProps:Fn})},[e])}class Nh{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 K6(){return new Ah({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Nh,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function dA(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:K6(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Fn,inactiveTriggerProps:Fn,popupProps:Fn}}function pA(e,t,n=!1){return new Ah({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}const fc=st(e=>e.triggerIdProp??e.activeTriggerId),m0=st(e=>e.openProp??e.open),aE=st(e=>(e.popupElement?.id??e.floatingId)||void 0);function hA(e,t){return t!==void 0&&m0(e)&&fc(e)===t}function Y6(e,t){return hA(e,t)?!0:t!==void 0&&m0(e)&&fc(e)==null&&e.triggerCount===1}const mA={open:m0,mounted:st(e=>e.mounted),transitionStatus:st(e=>e.transitionStatus),floatingRootContext:st(e=>e.floatingRootContext),triggerCount:st(e=>e.triggerCount),preventUnmountingOnClose:st(e=>e.preventUnmountingOnClose),payload:st(e=>e.payload),activeTriggerId:fc,activeTriggerElement:st(e=>e.mounted?e.activeTriggerElement:null),popupId:aE,isTriggerActive:st((e,t)=>t!==void 0&&fc(e)===t),isOpenedByTrigger:st((e,t)=>hA(e,t)),isMountedByTrigger:st((e,t)=>t!==void 0&&fc(e)===t&&e.mounted),triggerProps:st((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:st((e,t)=>Y6(e,t)?aE(e):void 0),popupProps:st(e=>e.popupProps),popupElement:st(e=>e.popupElement),positionerElement:st(e=>e.positionerElement)};function gA(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,s=Wc(),a=Ul()!=null,l=Fr(()=>new Ah({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Nh,floatingId:s,syncOnly:!1,nested:a})).current;return Fe(()=>{const c={open:t,floatingId:s};r.reference!==void 0&&(c.referenceElement=r.reference,c.domReferenceElement=vt(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 X6(e={}){const{nodeId:t,externalTree:n}=e,r=gA(e),s=e.rootContext||r,a=s.useState("referenceElement"),l=s.useState("floatingElement"),c=s.useState("domReferenceElement"),d=s.useState("open"),f=s.useState("floatingId"),[h,m]=v.useState(null),[b,y]=v.useState(void 0),[k,S]=v.useState(void 0),T=v.useRef(null),R=ba(n),E=v.useMemo(()=>({reference:a,floating:l,domReference:c}),[a,l,c]),_=X_({...e,elements:{...E,...h&&{reference:h}}}),C=vt(b)?b:null,D=k===void 0?s.state.floatingElement:k;s.useSyncedValue("referenceElement",b??null),s.useSyncedValue("domReferenceElement",b===void 0?c:C),s.useSyncedValue("floatingElement",D);const N=v.useCallback($=>{const F=vt($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),getClientRects:()=>$.getClientRects(),contextElement:$}:$;m(F),_.refs.setReference(F)},[_.refs]),M=v.useCallback($=>{(vt($)||$===null)&&(T.current=$,y($)),(vt(_.refs.reference.current)||_.refs.reference.current===null||$!==null&&!vt($))&&_.refs.setReference($)},[_.refs,y]),B=v.useCallback($=>{S($),_.refs.setFloating($)},[_.refs]),P=v.useMemo(()=>({..._.refs,setReference:M,setFloating:B,setPositionReference:N,domReference:T}),[_.refs,M,B,N]),A=v.useMemo(()=>({..._.elements,domReference:c}),[_.elements,c]),K=v.useMemo(()=>({..._,dataRef:s.context.dataRef,open:d,onOpenChange:s.setOpen,events:s.context.events,floatingId:f,refs:P,elements:A,nodeId:t,rootStore:s}),[_,P,A,t,s,d,f]);return Fe(()=>{c&&(T.current=c)},[c]),Fe(()=>{s.context.dataRef.current.floatingContext=K;const $=R?.nodesRef.current.find(F=>F.id===t);$&&($.context=K)}),v.useMemo(()=>({..._,context:K,refs:P,elements:A,rootStore:s}),[_,P,A,K,s])}const Ib=m_&&Ro;function bA(e,t={}){const{enabled:n=!0,delay:r}=t,s="rootStore"in e?e.rootStore:e,{events:a,dataRef:l}=s.context,c=v.useRef(!1),d=v.useRef(null),f=v.useRef(!0),h=yi();v.useEffect(()=>{const b=s.select("domReferenceElement");if(!n)return;const y=vn(b);function k(){const R=s.select("domReferenceElement");!s.select("open")&&Bt(R)&&R===mr(Kt(R))&&(c.current=!0)}function S(){f.current=!0}function T(){f.current=!1}return Yi(Lt(y,"blur",k),Ib&&Lt(y,"keydown",S,!0),Ib&&Lt(y,"pointerdown",T,!0))},[s,n]),v.useEffect(()=>{if(!n)return;function b(y){if(y.reason===Fl||y.reason===Yv){const k=s.select("domReferenceElement");vt(k)&&(d.current=k,c.current=!0)}}return a.on("openchange",b),()=>{a.off("openchange",b)}},[a,n,s]);const m=v.useMemo(()=>{function b(){c.current=!1,d.current=null}return{onMouseLeave(){b()},onFocus(y){const k=y.currentTarget;if(c.current){if(d.current===k)return;b()}const S=yr(y.nativeEvent);if(vt(S)){if(Ib&&!y.relatedTarget){if(!f.current&&!Th(S))return}else if(!Zz(S))return}const T=Np(y.relatedTarget,s.context.triggerElements),{nativeEvent:R,currentTarget:E}=y,_=typeof r=="function"?r():r;if(s.select("open")&&T||_===0||_===void 0){s.setOpen(!0,Ct(bp,R,E));return}h.start(_,()=>{c.current||s.setOpen(!0,Ct(bp,R,E))})},onBlur(y){b();const k=y.relatedTarget,S=y.nativeEvent,T=vt(k)&&k.hasAttribute(Tc("focus-guard"))&&k.getAttribute("data-type")==="outside";h.start(0,()=>{const R=s.select("domReferenceElement"),E=mr(Kt(R));!k&&E===R||bt(l.current.floatingContext?.refs.floating.current,E)||bt(R,E)||T||Np(k??E,s.context.triggerElements)||s.setOpen(!1,Ct(bp,S))})}}},[l,r,s,h]);return v.useMemo(()=>n?{reference:m,trigger:m}:{},[n,m])}class g0{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 Ii,this.restTimeout=new Ii,this.handleCloseOptions=void 0}static create(){return new g0}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const $p=new WeakMap;function Fp(e){if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&$p.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),$p.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function yA(e,t){const{scopeElement:n,referenceElement:r,floatingElement:s}=t,a=$p.get(n);a&&a!==e&&Fp(a),Fp(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=s,$p.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",s.style.pointerEvents="auto"}function b0(e){const t=e.context.dataRef.current,n=Fr(()=>t.hoverInteractionState??g0.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=n),Xv(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function vA(e,t={}){const{enabled:n=!0,closeDelay:r=0,nodeId:s}=t,a="rootStore"in e?e.rootStore:e,l=a.useState("open"),c=a.useState("floatingElement"),d=a.useState("domReferenceElement"),{dataRef:f}=a.context,h=ba(),m=Ul(),b=b0(a),y=yi(),k=We(()=>v_(f.current.openEvent?.type,b.interactedInside)),S=We(()=>Jz(f.current.openEvent?.type)),T=We(()=>{Fp(b)});Fe(()=>{l||(b.pointerType=void 0,b.restTimeoutPending=!1,b.interactedInside=!1,T())},[l,b,T]),v.useEffect(()=>T,[T]),Fe(()=>{if(n&&l&&b.handleCloseOptions?.blockPointerEvents&&S()&&vt(d)&&c){const R=d,E=c,_=Kt(c),C=h?.nodesRef.current.find(B=>B.id===m)?.context?.elements.floating;C&&(C.style.pointerEvents="");const D=b.pointerEventsScopeElement!==E?b.pointerEventsScopeElement:null,N=C!==E?C:null,M=b.handleCloseOptions?.getScope?.()??D??N??R.closest("[data-rootownerid]")??_.body;return yA(b,{scopeElement:M,referenceElement:R,floatingElement:E}),()=>{T()}}},[n,l,d,c,b,S,h,m,T]),v.useEffect(()=>{if(!n)return;function R(){return!!(h&&m&&wo(h.nodesRef.current,m).length>0)}function E(B){const P=Ip(r,"close",b.pointerType),A=()=>{a.setOpen(!1,Ct(Tr,B)),h?.events.emit("floating.closed",B)};P?b.openChangeTimeout.start(P,A):(b.openChangeTimeout.clear(),A())}function _(B){const P=yr(B);if(!Xz(P)){b.interactedInside=!1;return}b.interactedInside=P?.closest("[aria-haspopup]")!=null}function C(){b.openChangeTimeout.clear(),y.clear(),h?.events.off("floating.closed",N),T()}function D(B){if(R()&&h){h.events.on("floating.closed",N);return}if(Np(B.relatedTarget,a.context.triggerElements))return;const P=f.current.floatingContext?.nodeId??s,A=B.relatedTarget;if(!(h&&P&&vt(A)&&wo(h.nodesRef.current,P,!1).some($=>bt($.context?.elements.floating,A)))){if(b.handler){b.handler(B);return}T(),S()&&!k()&&E(B)}}function N(B){!h||!m||R()||y.start(0,()=>{h.events.off("floating.closed",N),a.setOpen(!1,Ct(Tr,B)),h.events.emit("floating.closed",B)})}const M=c;return Yi(M&&Lt(M,"mouseenter",C),M&&Lt(M,"mouseleave",D),M&&Lt(M,"pointerdown",_,!0),()=>{h?.events.off("floating.closed",N)})},[n,c,a,f,r,s,S,k,T,b,h,m,y])}const Z6={current:null};function xA(e,t={}){const{enabled:n=!0,delay:r=0,handleClose:s=null,mouseOnly:a=!1,restMs:l=0,move:c=!0,triggerElementRef:d=Z6,externalTree:f,isActiveTrigger:h=!0,getHandleCloseContext:m,isClosing:b,shouldOpen:y}=t,k="rootStore"in e?e.rootStore:e,{dataRef:S,events:T}=k.context,R=ba(f),E=b0(k),_=v.useRef(!1),C=On(s),D=On(r),N=On(l),M=On(n),B=On(y),P=On(b),A=We(()=>v_(S.current.openEvent?.type,E.interactedInside)),K=We(()=>B.current?.()!==!1),$=We((U,q,W)=>{const H=k.context.triggerElements;if(H.hasElement(q))return!U||!bt(U,q);if(!vt(W))return!1;const Y=W;return H.hasMatchingElement(O=>bt(O,Y))&&(!U||!bt(U,Y))}),F=We(()=>{if(!E.handler)return;Kt(k.select("domReferenceElement")).removeEventListener("mousemove",E.handler),E.handler=void 0}),z=We(()=>{Fp(E)});return h&&(E.handleCloseOptions=C.current?.__options),v.useEffect(()=>F,[F]),v.useEffect(()=>{if(!n)return;function U(q){q.open?_.current=!1:(_.current=q.reason===Tr,F(),E.openChangeTimeout.clear(),E.restTimeout.clear(),E.blockMouseMove=!0,E.restTimeoutPending=!1)}return T.on("openchange",U),()=>{T.off("openchange",U)}},[n,T,E,F]),v.useEffect(()=>{if(!n)return;function U(Y,O=!0){const j=Ip(D.current,"close",E.pointerType);j?E.openChangeTimeout.start(j,()=>{k.setOpen(!1,Ct(Tr,Y)),R?.events.emit("floating.closed",Y)}):O&&(E.openChangeTimeout.clear(),k.setOpen(!1,Ct(Tr,Y)),R?.events.emit("floating.closed",Y))}const q=d.current??(h?k.select("domReferenceElement"):null);if(!vt(q))return;function W(Y){if(E.openChangeTimeout.clear(),E.blockMouseMove=!1,a&&!oa(E.pointerType))return;const O=Lw(N.current),j=Ip(D.current,"open",E.pointerType),V=yr(Y),L=Y.currentTarget??null,Z=k.select("domReferenceElement");let se=L;if(vt(V)&&!k.context.triggerElements.hasElement(V)){for(const ve of k.context.triggerElements.elements())if(bt(ve,V)){se=ve;break}}vt(L)&&vt(Z)&&!k.context.triggerElements.hasElement(L)&&bt(L,Z)&&(se=Z);const ne=se==null?!1:$(Z,se,V),oe=k.select("open"),ae=P.current?.()??k.select("transitionStatus")==="ending",ue=!oe&&ae&&_.current,we=!ne&&vt(se)&&vt(Z)&&bt(Z,se)&&ue,me=O>0&&!j,ce=ne&&(oe||ue)||we,be=!oe||ne;if(ce){K()&&k.setOpen(!0,Ct(Tr,Y,se));return}me||(j?E.openChangeTimeout.start(j,()=>{be&&K()&&k.setOpen(!0,Ct(Tr,Y,se))}):be&&K()&&k.setOpen(!0,Ct(Tr,Y,se)))}function H(Y){if(A()){z();return}F();const O=k.select("domReferenceElement"),j=Kt(O);E.restTimeout.clear(),E.restTimeoutPending=!1;const V=S.current.floatingContext??m?.();if(Np(Y.relatedTarget,k.context.triggerElements))return;if(C.current&&V){k.select("open")||E.openChangeTimeout.clear();const Z=d.current;E.handler=C.current({...V,tree:R,x:Y.clientX,y:Y.clientY,onClose(){z(),F(),M.current&&!A()&&Z===k.select("domReferenceElement")&&U(Y,!0)}}),j.addEventListener("mousemove",E.handler),E.handler(Y);return}(E.pointerType!=="touch"||!bt(k.select("floatingElement"),Y.relatedTarget))&&U(Y)}return c?Yi(Lt(q,"mousemove",W,{once:!0}),Lt(q,"mouseenter",W),Lt(q,"mouseleave",H)):Yi(Lt(q,"mouseenter",W),Lt(q,"mouseleave",H))},[F,z,S,D,k,n,C,E,h,$,A,a,c,N,d,R,M,m,P,K]),v.useMemo(()=>{if(!n)return;function U(q){E.pointerType=q.pointerType}return{onPointerDown:U,onPointerEnter:U,onMouseMove(q){const{nativeEvent:W}=q,H=q.currentTarget,Y=k.select("domReferenceElement"),O=k.select("open"),j=$(Y,H,q.target);if(a&&!oa(E.pointerType))return;if(O&&j&&E.handleCloseOptions?.blockPointerEvents){const Z=k.select("floatingElement");if(Z){const se=E.handleCloseOptions?.getScope?.()??H.ownerDocument.body;yA(E,{scopeElement:se,referenceElement:H,floatingElement:Z})}}const V=Lw(N.current);if(O&&!j||V===0||!j&&E.restTimeoutPending&&q.movementX**2+q.movementY**2<2)return;E.restTimeout.clear();function L(){if(E.restTimeoutPending=!1,A())return;const Z=k.select("open");!E.blockMouseMove&&(!Z||j)&&K()&&k.setOpen(!0,Ct(Tr,W,H))}E.pointerType==="touch"?Di.flushSync(()=>{L()}):j&&O?L():(E.restTimeoutPending=!0,E.restTimeout.start(V,L))}}},[n,E,A,$,a,k,N,K])}const Q6="Escape";function Oh(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Od(e,t){return Oh(t,e===y_||e===Jv,e===wh||e===Eh)}function Mb(e,t,n){return Oh(t,e===Jv,n?e===wh:e===Eh)||e==="Enter"||e===" "||e===""}function J6(e,t,n){return Oh(t,n?e===wh:e===Eh,e===Jv)}function e$(e,t,n,r){const s=n?e===Eh:e===wh,a=e===y_;return t==="both"||t==="horizontal"&&r?e===Q6:Oh(t,s,a)}function t$(e,t){const{listRef:n,activeIndex:r,onNavigate:s=()=>{},enabled:a=!0,selectedIndex:l=null,allowEscape:c=!1,loopFocus:d=!1,nested:f=!1,rtl:h=!1,virtual:m=!1,focusItemOnOpen:b="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:k=!0,disabledIndices:S=void 0,orientation:T="vertical",parentOrientation:R,id:E,resetOnPointerLeave:_=!0,externalTree:C,grid:D}=t,N=D!=null,M="rootStore"in e?e.rootStore:e,B=M.useState("open"),P=M.useState("floatingElement"),A=M.useState("domReferenceElement"),K=M.context.dataRef,$=Op(P),F=Fy(A),z=On($),U=Ul(),q=ba(C),W=v.useRef(b),H=v.useRef(l??-1),Y=v.useRef(null),O=v.useRef(!0),j=We(ee=>{s(H.current===-1?null:H.current,ee)}),V=v.useRef(!!P),L=v.useRef(B),Z=v.useRef(!1),se=v.useRef(!1),ne=v.useRef(null),oe=On(S),ae=On(B),ue=On(l),we=On(_),me=Rl(),ce=Rl(),be=We(()=>{function ee(Te){m?q?.events.emit("virtualfocus",Te):ne.current=vp(Te,{sync:Z.current,preventScroll:!0})}const fe=n.current[H.current],J=se.current;fe&&ee(fe),(Z.current?Te=>Te():Te=>me.request(Te))(()=>{const Te=n.current[H.current]||fe;if(!Te)return;fe||ee(Te),Oe&&(J||!O.current)&&Te.scrollIntoView?.({block:"nearest",inline:"nearest"})})});Fe(()=>{K.current.orientation=T},[K,T]),Fe(()=>{a&&(B&&P?(H.current=l??-1,W.current&&l!=null&&(se.current=!0,j())):V.current&&(H.current=-1,j()))},[a,B,P,l,j]),Fe(()=>{if(a){if(!B){Z.current=!1;return}if(P)if(r==null){if(Z.current=!1,ue.current!=null)return;if(V.current&&(H.current=-1,be()),(!L.current||!V.current)&&W.current&&(Y.current!=null||W.current===!0&&Y.current==null)){let ee=0;const fe=()=>{n.current[0]==null?(ee<2&&(ee?re=>ce.request(re):queueMicrotask)(fe),ee+=1):(H.current=Y.current==null||Mb(Y.current,T,h)||f?yp(n):Uy(n),Y.current=null,j())};fe()}}else uc(n.current,r)||(H.current=r,be(),se.current=!1)}},[a,B,P,r,ue,f,n,T,h,j,be,ce]),Fe(()=>{if(!a||P||!q||m||!V.current)return;const ee=q.nodesRef.current,fe=ee.find(Te=>Te.id===U)?.context?.elements.floating,J=mr(Kt(A??fe??null)),re=ee.some(Te=>Te.context&&bt(Te.context.elements.floating,J));fe&&!re&&O.current&&fe.focus({preventScroll:!0})},[a,P,A,q,U,m]),Fe(()=>{L.current=B,V.current=!!P}),Fe(()=>{B||(Y.current=null,W.current=b)},[B,b]);const ve=r!=null,Re=We(ee=>{if(!ae.current)return;const fe=n.current.indexOf(ee.currentTarget);fe!==-1&&(H.current!==fe||r!==fe)&&(H.current=fe,j(ee))}),Se=We(()=>R??q?.nodesRef.current.find(ee=>ee.id===U)?.context?.dataRef?.current.orientation),ke=We(()=>yp(n,oe.current)),Ae=We(ee=>{if(O.current=!1,Z.current=!0,ee.which===229||!ae.current&&ee.currentTarget===z.current)return;if(f&&e$(ee.key,T,h,N)){Od(ee.key,Se())||qi(ee),M.setOpen(!1,Ct(Aw,ee.nativeEvent)),Bt(A)&&(m?q?.events.emit("virtualfocus",A):A.focus());return}const fe=H.current,J=yp(n,S),re=Uy(n,S);if(F||(ee.key==="Home"&&(qi(ee),H.current=J,j(ee)),ee.key==="End"&&(qi(ee),H.current=re,j(ee))),D!=null){const Te=D(ee,H.current,n,T,d,h,S,J,re);if(Te!=null&&(H.current=Te,j(ee)),T==="both")return}if(Od(ee.key,T)){if(qi(ee),B&&!m&&mr(ee.currentTarget.ownerDocument)===ee.currentTarget){H.current=Mb(ee.key,T,h)?J:re,j(ee);return}Mb(ee.key,T,h)?d?fe>=re?c&&fe!==n.current.length?H.current=-1:(Z.current=!1,H.current=J):H.current=Ss(n.current,{startingIndex:fe,disabledIndices:S}):H.current=Math.min(re,Ss(n.current,{startingIndex:fe,disabledIndices:S})):d?fe<=J?c&&fe!==-1?H.current=n.current.length:(Z.current=!1,H.current=re):H.current=Ss(n.current,{startingIndex:fe,decrement:!0,disabledIndices:S}):H.current=Math.max(J,Ss(n.current,{startingIndex:fe,decrement:!0,disabledIndices:S})),uc(n.current,H.current)&&(H.current=-1),j(ee)}}),Oe=v.useMemo(()=>({onFocus(fe){Z.current=!0,Re(fe)},onClick:({currentTarget:fe})=>fe.focus({preventScroll:!0}),onMouseMove(fe){Z.current=!0,se.current=!1,y&&Re(fe)},onPointerLeave(fe){if(!ae.current||!O.current||fe.pointerType==="touch")return;Z.current=!0;const J=fe.relatedTarget;if(!(!y||n.current.includes(J))&&we.current&&(ne.current?.(),ne.current=null,H.current=-1,j(fe),!m)){const re=z.current,Te=mr(Kt(re));re&&bt(re,Te)&&re.focus({preventScroll:!0})}}}),[Re,ae,z,y,n,j,we,m]),Me=v.useMemo(()=>m&&B&&ve&&{"aria-activedescendant":`${E}-${r}`},[m,B,ve,E,r]),Ue=v.useMemo(()=>({"aria-orientation":T==="both"?void 0:T,...F?{}:Me,onKeyDown(ee){if(ee.key==="Tab"&&ee.shiftKey&&B&&!m){const fe=yr(ee.nativeEvent);if(fe&&!bt(z.current,fe))return;qi(ee),M.setOpen(!1,Ct(xh,ee.nativeEvent)),Bt(A)&&A.focus();return}Ae(ee)},onPointerMove(){O.current=!0}}),[Me,Ae,z,T,F,M,B,m,A]),xe=v.useMemo(()=>{function ee(re){M.setOpen(!0,Ct(Aw,re.nativeEvent,re.currentTarget))}function fe(re){b==="auto"&&Qv(re.nativeEvent)&&(W.current=!m)}function J(re){W.current=b,b==="auto"&&g_(re.nativeEvent)&&(W.current=!0)}return{onKeyDown(re){const Te=M.select("open");O.current=!1;const Le=re.key.startsWith("Arrow"),Ke=J6(re.key,Se(),h),Qe=Od(re.key,T),gt=(f?Ke:Qe)||re.key==="Enter"||re.key.trim()==="";if(m&&Te)return Ae(re);if(!(!Te&&!k&&Le)){if(gt){const Je=Od(re.key,Se());Y.current=f&&Je?null:re.key}if(f){Ke&&(qi(re),Te?(H.current=ke(),j(re)):ee(re));return}Qe&&(ue.current!=null&&(H.current=ue.current),qi(re),!Te&&k?ee(re):Ae(re),Te&&j(re))}},onFocus(re){M.select("open")&&!m&&(H.current=-1,j(re))},onPointerDown:J,onPointerEnter:J,onMouseDown:fe,onClick:fe}},[Ae,b,ke,f,j,M,k,T,Se,h,ue,m]),_e=v.useMemo(()=>({...Me,...xe}),[Me,xe]);return v.useMemo(()=>a?{reference:_e,floating:Ue,item:Oe,trigger:xe}:{},[a,_e,Ue,xe,Oe])}function n$(e,t){const{listRef:n,elementsRef:r,activeIndex:s,onMatch:a,disabledIndices:l,onTyping:c,enabled:d=!0,resetMs:f=750,selectedIndex:h=null}=t,m="rootStore"in e?e.rootStore:e,b=m.useState("open"),y=yi(),k=v.useRef(""),S=v.useRef(h??s??-1),T=v.useRef(null),R=We(C=>{function D(z){const U=r?.current[z];return!U||Rh(U)}function N(z){return D(z)?l==null||!Lp(ko,z,l):!1}function M(z,U,q=0){if(z.length===0)return-1;const W=(q%z.length+z.length)%z.length,H=U.toLowerCase();for(let Y=0;Y<z.length;Y+=1){const O=(W+Y)%z.length;if(!(!z[O]?.toLowerCase().startsWith(H)||!N(O)))return O}return-1}const B=n.current;if(k.current.length>0&&C.key===" "&&(qi(C),c?.(!0)),k.current.length>0&&k.current[0]!==" "&&M(B,k.current)===-1&&C.key!==" "&&c?.(!1),B==null||C.key.length!==1||C.ctrlKey||C.metaKey||C.altKey)return;b&&C.key!==" "&&(qi(C),c?.(!0));const P=k.current==="";P&&(S.current=h??s??-1),B.every((z,U)=>z&&N(U)?z[0]?.toLowerCase()!==z[1]?.toLowerCase():!0)&&k.current===C.key&&(k.current="",S.current=T.current),k.current+=C.key,y.start(f,()=>{k.current="",S.current=T.current,c?.(!1)});const $=((P?h??s??-1:S.current)??0)+1,F=M(B,k.current,$);F!==-1?(a?.(F),T.current=F):C.key!==" "&&(k.current="",c?.(!1))}),E=We(C=>{const D=C.relatedTarget,N=m.select("domReferenceElement"),M=m.select("floatingElement");bt(N,D)||bt(M,D)||(y.clear(),k.current="",S.current=T.current,c?.(!1))});Fe(()=>{!b&&h!==null||(y.clear(),T.current=null,k.current!==""&&(k.current=""))},[b,h,y]),Fe(()=>{b&&k.current===""&&(S.current=h??s??-1)},[b,h,s]);const _=v.useMemo(()=>({onKeyDown:R,onBlur:E}),[R,E]);return v.useMemo(()=>d?{reference:_,floating:_}:{},[d,_])}const lE=.1,r$=lE*lE,dn=.5;function Id(e,t,n,r,s,a){return r>=t!=a>=t&&e<=(s-n)*(t-r)/(a-r)+n}function Md(e,t,n,r,s,a,l,c,d,f){let h=!1;return Id(e,t,n,r,s,a)&&(h=!h),Id(e,t,s,a,l,c)&&(h=!h),Id(e,t,l,c,d,f)&&(h=!h),Id(e,t,d,f,n,r)&&(h=!h),h}function i$(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Dd(e,t,n,r,s,a){const l=Math.min(n,s),c=Math.max(n,s),d=Math.min(r,a),f=Math.max(r,a);return e>=l&&e<=c&&t>=d&&t<=f}function kA(e={}){const{blockPointerEvents:t=!1}=e,n=new Ii,r=({x:s,y:a,placement:l,elements:c,onClose:d,nodeId:f,tree:h})=>{const m=l?.split("-")[0];let b=!1,y=null,k=null,S=typeof performance<"u"?performance.now():0;function T(E,_){const C=performance.now(),D=C-S;if(y===null||k===null||D===0)return y=E,k=_,S=C,!1;const N=E-y,M=_-k,B=N*N+M*M,P=D*D*r$;return y=E,k=_,S=C,B<P}function R(){n.clear(),d()}return function(_){n.clear();const C=c.domReference,D=c.floating;if(!C||!D||m==null||s==null||a==null)return;const{clientX:N,clientY:M}=_,B=yr(_),P=_.type==="mouseleave",A=bt(D,B),K=bt(C,B);if(A&&(b=!0,!P))return;if(K&&(b=!1,!P)){b=!0;return}if(P&&vt(_.relatedTarget)&&bt(D,_.relatedTarget))return;function $(){return!!(h&&wo(h.nodesRef.current,f).length>0)}function F(){$()||R()}if($())return;const z=C.getBoundingClientRect(),U=D.getBoundingClientRect(),q=s>U.right-U.width/2,W=a>U.bottom-U.height/2,H=U.width>z.width,Y=U.height>z.height,O=(H?z:U).left,j=(H?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 Z=!1;switch(m){case"top":Z=Dd(N,M,O,z.top+1,j,U.bottom-1);break;case"bottom":Z=Dd(N,M,O,U.top+1,j,z.bottom-1);break;case"left":Z=Dd(N,M,U.right-1,L,z.left+1,V);break;case"right":Z=Dd(N,M,z.right-1,L,U.left+1,V);break}if(Z)return;if(b&&!i$(N,M,z)){F();return}if(!P&&T(N,M)){F();return}let se=!1;switch(m){case"top":{const ne=H?dn/2:dn*4,oe=H||q?s+ne:s-ne,ae=H?s-ne:q?s+ne:s-ne,ue=a+dn+1,we=q||H?U.bottom-dn:U.top,me=q?H?U.bottom-dn:U.top:U.bottom-dn;se=Md(N,M,oe,ue,ae,ue,U.left,we,U.right,me);break}case"bottom":{const ne=H?dn/2:dn*4,oe=H||q?s+ne:s-ne,ae=H?s-ne:q?s+ne:s-ne,ue=a-dn,we=q||H?U.top+dn:U.bottom,me=q?H?U.top+dn:U.bottom:U.top+dn;se=Md(N,M,oe,ue,ae,ue,U.left,we,U.right,me);break}case"left":{const ne=Y?dn/2:dn*4,oe=Y||W?a+ne:a-ne,ae=Y?a-ne:W?a+ne:a-ne,ue=s+dn+1,we=W||Y?U.right-dn:U.left,me=W?Y?U.right-dn:U.left:U.right-dn;se=Md(N,M,we,U.top,me,U.bottom,ue,oe,ue,ae);break}case"right":{const ne=Y?dn/2:dn*4,oe=Y||W?a+ne:a-ne,ae=Y?a-ne:W?a+ne:a-ne,ue=s-dn,we=W||Y?U.left+dn:U.right,me=W?Y?U.left+dn:U.right:U.left+dn;se=Md(N,M,ue,oe,ue,ae,we,U.top,me,U.bottom);break}}se?b||n.start(40,F):F()}};return r.__options={...e,blockPointerEvents:t},r}const dc="ArrowUp",pc="ArrowDown",Bp="ArrowLeft",Up="ArrowRight",Ih="Home",Mh="End",SA=new Set([Bp,Up]),s$=new Set([Bp,Up,Ih,Mh]),wA=new Set([dc,pc]),o$=new Set([dc,pc,Ih,Mh]),EA=new Set([...SA,...wA]),TA=new Set([...EA,Ih,Mh]),a$="Shift",l$="Control",u$="Alt",c$="Meta",f$=new Set([a$,l$,u$,c$]);function d$(e){return Bt(e)&&e.tagName==="INPUT"}function uE(e){return!!(d$(e)&&e.selectionStart!=null||Bt(e)&&e.tagName==="TEXTAREA")}function cE(e,t,n,r){if(!e||!t||!t.scrollTo)return;let s=e.scrollLeft,a=e.scrollTop;const l=e.clientWidth<e.scrollWidth,c=e.clientHeight<e.scrollHeight;if(l&&r!=="vertical"){const d=fE(e,t,"left"),f=Ld(e),h=Ld(t);n==="ltr"&&(d+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-f.scrollPaddingRight?s=d+t.offsetWidth+h.scrollMarginRight-e.clientWidth+f.scrollPaddingRight:d-h.scrollMarginLeft<e.scrollLeft+f.scrollPaddingLeft&&(s=d-h.scrollMarginLeft-f.scrollPaddingLeft)),n==="rtl"&&(d-h.scrollMarginRight<e.scrollLeft+f.scrollPaddingLeft?s=d-h.scrollMarginLeft-f.scrollPaddingLeft:d+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-f.scrollPaddingRight&&(s=d+t.offsetWidth+h.scrollMarginRight-e.clientWidth+f.scrollPaddingRight))}if(c&&r!=="horizontal"){const d=fE(e,t,"top"),f=Ld(e),h=Ld(t);d-h.scrollMarginTop<e.scrollTop+f.scrollPaddingTop?a=d-h.scrollMarginTop-f.scrollPaddingTop:d+t.offsetHeight+h.scrollMarginBottom>e.scrollTop+e.clientHeight-f.scrollPaddingBottom&&(a=d+t.offsetHeight+h.scrollMarginBottom-e.clientHeight+f.scrollPaddingBottom)}e.scrollTo({left:s,top:a,behavior:"auto"})}function fE(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 Ld(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 p$(e){return Uv(19)?e:e?"true":void 0}const h$=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 dE={},pE={},hE="";function m$(e){if(typeof document>"u")return!1;const t=Kt(e);return vn(t).innerWidth-t.documentElement.clientWidth>0}function g$(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Kt(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 d=a.offsetWidth;a.style.overflowY="hidden";const f=a.offsetWidth;return a.style.overflowY=l,r.style.scrollbarGutter=c,d===f}function b$(e){const t=Kt(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 y$(e){const t=Kt(e),n=t.documentElement,r=t.body,s=vn(n);let a=0,l=0,c=!1;const d=Pr.create();if(Ro&&(s.visualViewport?.scale??1)!==1)return()=>{};function f(){const y=s.getComputedStyle(n),k=s.getComputedStyle(r),R=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";a=n.scrollTop,l=n.scrollLeft,dE={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},hE=n.style.scrollBehavior,pE={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,_=n.scrollWidth>n.clientWidth,C=y.overflowY==="scroll"||k.overflowY==="scroll",D=y.overflowX==="scroll"||k.overflowX==="scroll",N=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),A=ga(n)?n:r;if(c=g$(e),c){n.style.scrollbarGutter=R,A.style.overflowY="hidden",A.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:R,overflowY:"hidden",overflowX:"hidden"}),(E||C)&&(n.style.overflowY="scroll"),(_||D)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:B||M?`calc(100dvh - ${B+M}px)`:"100dvh",width:P||N?`calc(100vw - ${P+N}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=a,r.scrollLeft=l,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function h(){Object.assign(n.style,dE),Object.assign(r.style,pE),c||(n.scrollTop=a,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=hE)}function m(){h(),d.request(f)}f();const b=Lt(s,"resize",m);return()=>{d.cancel(),h(),typeof s.removeEventListener=="function"&&b()}}class v${lockCount=0;restore=null;timeoutLock=Ii.create();timeoutUnlock=Ii.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=Kt(t).documentElement,s=vn(r).getComputedStyle(r).overflowY;if(s==="hidden"||s==="clip"){this.restore=Jn;return}const a=Sh||!m$(t);this.restore=a?b$(t):y$(t)}}const x$=new v$;function k$(e=!0,t=null){Fe(()=>{if(e)return x$.acquire(t)},[e,t])}function S$(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 RA(e,t){const n=v.useRef(e),r=We(t);Fe(()=>{n.current!==e&&r(n.current)},[e,r]),Fe(()=>{n.current=e},[e])}function w$(e,t){const n=We((a,l)=>{(typeof e=="function"?e():e)||t(l||(Sh?"touch":""))}),{onClick:r,onPointerDown:s}=S$(n);return v.useMemo(()=>({onClick:r,onPointerDown:s}),[r,s])}function E$(e){const[t,n]=v.useState(null),r=w$(e,n);return RA(e,s=>{s&&!e&&n(null)}),v.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}const T$=v.createContext(void 0);function Li(){return v.useContext(T$)?.direction??"ltr"}const R$="0account 1dd 1gent 5-circle 6square 5s 6-swarm 1larm-clock 2ert 1rchive 2my-base 2row-bend-up-left eright 7lock-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 dlus g-center 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 6laptop 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",C$="1ajd -8p 1wz t 1 1 -w ah -273 18 1wb a9 3 -6 -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 1k2 1 -oa 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 25i -25h 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",_$="01070e0f0g0h0i0j0k0l0r0w0x0y0z11161718191a1b1c1h1i1j1k1l1m1n1o1t1x2c2d2q2t2v2w2y2z323c3d3f3n3r3u3x3y3z444547484a4b4c4d4e4j4k4l4m4n4o4p4q4r4s4t4u5556585b5c5d5e5m5n5o5p5q5r5u5x606162636b6e6g6i6j6l6m6n6s6u6w6x7071727375767778797a7b7c7f7g7m7p7s7u7x7y828388898c8e8f8n8o8p8q8r8s8t8u8v8w8x8y8z909192939495969798999a9b9c9d9e9f9g9h9i9j9k9l9m9n9o9p9q9r9s9t9u9v9w9x9y9za0a1a2a3a4a5a6a7a8a9aaabacadaeafagahaiajakalamanaoapaqarasatauavawaxazb1b6b7b9bgbpbqbsbtbubvbxbybzc0c1c2c3c4c5c8cdcecjcncoctcucvcyd0d1d3d5dadbdcdgdkdldndqdsdvdze3e4e5e7ecegeheiejf5f7f8fbfcfdfffhfjfofrftfufwfxg1g2gagbgcgeggghgigjgkgpgth0h2h4h5h7h9hehghhhjhkhohxhyhzi5ibieifihijiminioiqirisitiyizj0j1j3j5j7jcjdjejgjhjkjljnjqjrjsjtjujvjwjyk0k1k2k5k7kakbkckdkekfkgkjkkknkokqkrkukvkxl4l5l7l8lblclllnlolrlsltlulzm2m4m6m8m9mambmcmdme",A$="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",mE=2;function N$(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 CA(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 Hp=N$(R$);function O$(){const e=CA(C$),t={};for(let n=0;n<Hp.length;n++)t[Hp[n]]=e[n];return t}function I$(){const e=CA(A$),t={};for(let n=0;n<e.length;n++){const r=Number.parseInt(_$.slice(n*mE,(n+1)*mE),36);t[Hp[r]]=e[n]}return t}const _A=O$(),M$=I$(),D$={..._A,...M$};function L$(e,t="outline"){return t==="filled"?D$[e]:_A[e]}const j$={root:{km0Bbg:"ui-ngwomw",$$css:!0}},z$=new Set(["ui-progress-spin","cursor-icon-spin"]);function P$(e){if(!(!e||typeof CSSAnimation>"u"))for(const t of e.getAnimations({subtree:!0}))t instanceof CSSAnimation&&z$.has(t.animationName)&&(t.startTime=0)}const Wy=v.createContext(void 0);function Is({iconSize:e,iconButtonSize:t,iconButtonVariant:n,iconButtonTone:r,iconButtonRootStyle:s,iconButtonIconStyle:a,iconButtonIconSize:l,buttonSize:c,buttonRootStyle:d,buttonVariant:f,buttonTone:h,buttonPrimaryTone:m,buttonIconSize:b,buttonRounded:y,buttonFullWidth:k,menuSize:S,disabled:T,children:R}){const E=v.useContext(Wy),_=v.useMemo(()=>({iconSize:e??E?.iconSize,iconButtonSize:t??E?.iconButtonSize,iconButtonVariant:n??E?.iconButtonVariant,iconButtonTone:r??E?.iconButtonTone,iconButtonRootStyle:s??E?.iconButtonRootStyle,iconButtonIconStyle:a??E?.iconButtonIconStyle,iconButtonIconSize:l??E?.iconButtonIconSize,buttonSize:c??E?.buttonSize,buttonRootStyle:d??E?.buttonRootStyle,buttonVariant:f??E?.buttonVariant,buttonTone:h??E?.buttonTone,buttonPrimaryTone:m??E?.buttonPrimaryTone,buttonIconSize:b??E?.buttonIconSize,buttonRounded:y??E?.buttonRounded,buttonFullWidth:k??E?.buttonFullWidth,menuSize:S??E?.menuSize,disabled:T??E?.disabled}),[k,m,h,b,d,y,c,f,T,l,a,r,s,t,n,e,S,E]);return g.jsx(Wy.Provider,{value:_,children:R})}function ya(){return v.useContext(Wy)}const $$="sm",F$=/(^|-)(left|right)(-|$)/,B$=new Set(["history","link-external","list-bullets","list-ordered","quote","redo","return"]),U$=new Set(Hp.filter(e=>F$.test(e)||B$.has(e))),Zt={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 H$(e,t,n){return[Zt.base,AA(e),q$(t),V$(n)]}function y0(e){return typeof e=="string"&&!e.startsWith("var(")}function AA(e){if(!y0(e))return Zt.noPresetSize;switch(e){case"xs":return Zt.sizeXs;case"sm":return Zt.sizeSm;case"base":return Zt.sizeBase;case"lg":return Zt.sizeLg;case"xl":return Zt.sizeXl;case"2xl":return Zt.size2xl}}function q$(e){switch(e){case"primary":return Zt.colorPrimary;case"secondary":return Zt.colorSecondary;case"tertiary":return Zt.colorTertiary;case"quaternary":return Zt.colorQuaternary;case"git-added":return Zt.colorGitAdded;case"git-modified":return Zt.colorGitModified;case"git-removed":return Zt.colorGitRemoved;case"git-untracked":return Zt.colorGitUntracked;case"cyan":return Zt.colorCyan;case"blue":return Zt.colorBlue;case"red":return Zt.colorRed;case"green":return Zt.colorGreen;case"success":return Zt.colorSuccess;case"danger":return Zt.colorDanger;case"yellow":return Zt.colorYellow;case"magenta":return Zt.colorMagenta;case"orange":return Zt.colorOrange;case"purple":return Zt.colorPurple;case"accent":return Zt.colorAccent;case"brand":return Zt.colorBrand;case void 0:return Zt.noColor}}function V$(e){switch(e){case"spin":return Zt.modifierSpin;case"disabled":return Zt.modifierDisabled;case"hidden":return Zt.modifierHidden;case void 0:return Zt.noModifier}}function G$(e){if(!(typeof e!="string"||e.length===0))return`"${e}"`}function Ht({name:e,modifier:t,syncSpin:n=!0,variant:r="outline",size:s,color:a,capTrim:l=!1,className:c,rootStyle:d,style:f,title:h,"aria-label":m,"aria-hidden":b,ref:y}){const k=ya(),S=v.useCallback(N=>{typeof y=="function"?y(N):y&&(y.current=N),N&&t==="spin"&&n&&P$(N)},[y,t,n]),T=s??k?.iconSize??$$,R=y0(T),E=Li()==="rtl"&&U$.has(e),_=G$(L$(e,r)),C={..._?{"--cursor-icon-content":_}:{},...R?{}:{"--icon-size":typeof T=="number"?`${T}px`:T},...f},D=Xt({rootClass:"ui-icon",stylexStyles:[H$(T,a,t),E&&j$.root,l&&Zt.capTrim,d],className:rn("cursor-icon",c),style:C});return g.jsx("i",{ref:S,className:D.className,"data-icon-name":e,"data-size":R?T:void 0,"data-color":a,style:D.style,title:h??m,"aria-hidden":b??(m?void 0:!0)})}const W$=v.createContext({root:null});function va(){return v.useContext(W$).root}const K$={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"},Y$={},X$=3e3,Z$=10;let gE=X$;function Q$(){const e=gE;return gE+=Z$,{zIndex:e,release:()=>{}}}const J$=v.createContext(null);function e3(){return v.useContext(J$)}function Hl(e,t){const n=e3(),[r,s]=v.useState(null);v.useLayoutEffect(()=>{if(!t){s(null);return}const l=n?.claimZIndex()??Q$();return s(l.zIndex),()=>{l.release()}},[t,n]);const a=v.useMemo(()=>r===null?Y$:{[K$[e]]:String(r)},[r,e]);return v.useMemo(()=>({zIndex:r,portalLayerStyles:a}),[r,a])}const v0=v.forwardRef(function(t,n){const{render:r,className:s,disabled:a=!1,focusableWhenDisabled:l=!1,nativeButton:c=!0,style:d,...f}=t,{getButtonProps:h,buttonRef:m}=$l({disabled:a,focusableWhenDisabled:l,native:c});return gn("button",t,{state:{disabled:a},ref:[n,m],props:[f,h]})}),t3=["secondary","tertiary","accent","monochrome","success","warning","danger"],n3=["accent","monochrome","success","danger","warning"],NA={plan:"warning","git-added":"success","git-modified":"warning","git-removed":"danger"},r3=["accent","success","warning","danger"];new Set(t3);new Set(n3);const i3=new Set(r3);function s3(e){return e!==void 0&&Object.hasOwn(NA,e)}function o3(e){return e!==void 0&&i3.has(e)}function OA(e){if(e!==void 0)return s3(e)?NA[e]:e}const IA="accent",a3=["primary","secondary","media"],l3=["outline","ghost","text"],u3=new Set(a3),c3=new Set(l3);function f3(e){return u3.has(e)}function d3(e){return c3.has(e)}function x0(e,t){const n=e==="secondary"&&t!==void 0&&!o3(t);return{applyControlTone:e!=="secondary"||n,applyFilledColors:f3(e)&&!n,applyNonFilledBackground:d3(e)||n}}const k0={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}},MA={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}},p3={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}},_i={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}},h3=["accent","success","warning","danger"],m3=new Set(h3);function qp(e){return e!==void 0&&m3.has(e)}const DA={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}},LA={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}},jA={sm:"sm",md:"sm",lg:"base",xl:"lg"},zA={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}},PA={root:{kGuDYH:"ui-fc7y3v",kLWn49:"ui-1yxxptd",kb6lSQ:"ui-1bignsj",$$css:!0}},g3={root:{kGuDYH:"ui-19d36u7",kLWn49:"ui-dod15v",kb6lSQ:"ui-k22nv0",$$css:!0}},b3={root:{kGuDYH:"ui-wsyq91",kLWn49:"ui-19v9tvf",kb6lSQ:"ui-1h56xvc",$$css:!0}},y3={root:{kGuDYH:"ui-1i1m3gp",kLWn49:"ui-eqr9p9",kb6lSQ:"ui-qhv51x",$$css:!0}},ql={root:{kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",$$css:!0}},Dh={root:{khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0}},bE={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}},v3={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}},x3={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}},Ti={content:bE.content,pill:bE.pill,size:v3,pillSize:x3,typography:{sm:Cs.root,md:Cs.root,lg:Cs.root,xl:PA.root}},$A={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}},k3={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}},S0={root:[k3.root,$A.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}},Gi={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}},yE={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}},Ei={root:[S0.root,Ti.content,Vu.markdownHover,Vu.primaryWeight],fontSmoothing:Dh.root,align:{center:null,left:Vu.alignLeft},fullWidth:Vu.fullWidth,frame:{container:null,content:Vu.frameContent},shape:{pill:Ti.pill},size:{sm:[Gi.sm,ws.sm,Ti.size.sm],md:[Gi.md,ws.md,Ti.size.md],lg:[Gi.lg,ws.lg,Ti.size.lg],xl:[Gi.xl,ws.xl,Ti.size.xl]},pillSize:Ti.pillSize,typography:Ti.typography,labelGroup:yE.labelGroup,kbs:[Ms.root,yE.kbs]};function S3({rounded:e,variant:t,enforcedRounded:n}){return e!==void 0?e:t==="text"?!1:n===!0}const w3="md",E3="secondary",T3={"ui--default-marker":"ui--default-marker",$$css:!0};function vE(e,t){if(e==null)return null;const n=typeof e=="string"?{name:e}:e;return g.jsx(Ht,{"aria-hidden":"true",modifier:n.modifier,name:n.name,size:t,variant:n.variant})}function yn({variant:e,tone:t,size:n,rounded:r,frame:s="container",align:a,fullWidth:l,disabled:c,children:d,leadingIcon:f,trailingIcon:h,kbs:m,pressed:b,className:y,style:k,rootStyle:S,"aria-expanded":T,"aria-pressed":R,"aria-busy":E,..._}){const C=ya(),D=e??C?.buttonVariant??E3,N=n??C?.buttonSize??w3,M=S3({enforcedRounded:C?.buttonRounded,rounded:r,variant:D}),B=l??C?.buttonFullWidth??!1,P=c??C?.disabled,A=t??(D==="primary"?C?.buttonPrimaryTone??C?.buttonTone:D==="ghost"?C?.buttonTone:void 0),K=OA(A??(D==="primary"?IA:void 0)),$=C?.buttonIconSize??jA[N],F=_["data-pressed"],z=x0(D,K),U=zt(Ei.root,Ei.fontSmoothing,_i.appearance,z.applyControlTone&&k0.foreground,z.applyControlTone&&K!==void 0&&MA[K],z.applyFilledColors&&_i.colors,z.applyNonFilledBackground&&la.background,(D==="outline"||D==="ghost")&&qp(K)&&DA[K],D==="outline"&&la.outline,D==="outline"&&qp(K)&&LA[K],D==="media"&&_i.media,b===!0&&_i.engaged,Ei.size[N],Ei.typography[N],Ei.align[a??"center"],B&&Ei.fullWidth,M&&Ei.shape.pill,M&&Ei.pillSize[N],Ei.frame[s],C?.buttonRootStyle,S,T3),q=vE(f,$),W=vE(h,$);let H=d;if(m!=null){const Y=zt(Ei.labelGroup),O=zt(Ei.kbs);H=g.jsxs("span",{className:rn("ui-button__label-group",Y.className),style:Y.style,children:[q,d,W,g.jsx("span",{className:rn("ui-button__kbs",O.className),style:O.style,children:m})]})}else(q!=null||W!=null)&&(H=g.jsxs(g.Fragment,{children:[q,d,W]}));return g.jsx(v0,{..._,"aria-busy":E,"aria-expanded":T,"aria-pressed":T===void 0&&b!==void 0?b:R,className:rn("ui-button",U.className,y),style:{...U.style,...k},"data-variant":D,"data-size":N,"data-rounded":M||void 0,"data-frame":s!=="container"?s:void 0,"data-tone":K,"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:H})})}function Yc(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,d=v.useCallback(f=>{s||l(f)},[]);return[c,d]}let xE=(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})({}),kE=(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 R3={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},oc={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},C3={disabled:!1,...oc},Xc={valid(e){return e===null?null:e?{[kE.valid]:""}:{[kE.invalid]:""}}};function _3(e){return v.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[xE.checked]:""}:{[xE.unchecked]:""}},...Xc}),[e.indeterminate])}const A3={invalid:void 0,name:void 0,validityData:{state:R3,errors:[],error:"",value:"",initialValue:null},setValidityData:Jn,disabled:void 0,touched:oc.touched,setTouched:Jn,dirty:oc.dirty,setDirty:Jn,filled:oc.filled,setFilled:Jn,focused:oc.focused,setFocused:Jn,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:C3,markedDirtyRef:{current:!1},registerFieldControl:Jn,validation:{getValidationProps:(e,t=Fn)=>t,inputRef:{current:null},registerInput:Jn,commit:async()=>{},change:Jn}},N3=v.createContext(A3);function Lh(e=!0){const t=v.useContext(N3);if(t.setValidityData===Jn&&!e)throw new Error(In(28));return t}function FA(e,t,n,r,s=!0,a){const{registerFieldControl:l}=Lh(),c=v.useRef(null);c.current||(c.current=Symbol()),Fe(()=>{const d=c.current;return!d||!s?void 0:(l(d,{controlRef:e,getValue:r,id:t,name:a,value:n}),()=>{l(d,void 0)})},[e,s,r,t,a,l,n])}const O3=v.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Jn,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function BA(){return v.useContext(O3)}const I3=v.createContext({controlId:void 0,registerControlId:Jn,labelId:void 0,setLabelId:Jn,messageIds:[],setMessageIds:Jn,getDescriptionProps:e=>e});function w0(){return v.useContext(I3)}const M3=v.createContext(void 0);function D3(){const e=v.useContext(M3);if(e===void 0)throw new Error(In(14));return e}const L3=v.forwardRef(function(t,n){const{render:r,className:s,style:a,keepMounted:l=!1,...c}=t,d=D3(),f=d.checked||d.indeterminate,{mounted:h,transitionStatus:m,setMounted:b}=Kc(f),y=v.useRef(null),k={...d,transitionStatus:m};_o({open:f,ref:y,onComplete(){f||b(!1)}});const T={..._3(d),...To,...Xc},R=l||h,E=gn("span",t,{ref:[n,y],state:k,stateAttributesMapping:T,props:c});return R?E:null}),j3="md",SE={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}},z3={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}},P3={sm:9,md:10,lg:11},wE={"--icon-weight":"700"};function $3({indeterminate:e,interactive:t,size:n,variant:r}){const s=zt(SE.root,SE[n],z3[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=P3[n];return g.jsx("span",{"aria-hidden":"true",className:rn("ui-checkbox__box",s.className),style:s.style,children:t?g.jsx(L3,{className:rn("ui-checkbox__icon",a.className),keepMounted:!0,render:(c,d)=>g.jsx("span",{...c,children:g.jsx(Ht,{capTrim:!0,name:d.indeterminate?"minus":"check",size:l,style:wE})}),style:a.style}):g.jsx("span",{className:rn("ui-checkbox__icon",a.className),style:a.style,children:g.jsx(Ht,{capTrim:!0,name:e?"minus":"check",size:l,style:wE})})})}function UA({checked:e,disabled:t,indeterminate:n=!1,size:r=j3,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:rn("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($3,{indeterminate:n,interactive:!1,size:r,variant:s})})}function F3(e,t,n=(r,s)=>r===s){return e.length===t.length&&e.every((r,s)=>n(r,t[s]))}function B3(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:d,transitionStatus:f}=Kc(a,!0,!0),h=Bl(),[m,b]=v.useState(),y=m??h,k=We(S=>{const T=!a,R=Ct(Fl,S.nativeEvent);r(T,R),!R.isCanceled&&l(T)});return v.useMemo(()=>({disabled:s,handleTrigger:k,mounted:c,open:a,panelId:y,setMounted:d,setOpen:l,setPanelIdState:b,transitionStatus:f}),[s,k,c,a,y,d,l,b,f])}const HA=v.createContext(void 0);function qA(){const e=v.useContext(HA);if(e===void 0)throw new Error(In(15));return e}let E0=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=sa.startingStyle]="startingStyle",e[e.endingStyle=sa.endingStyle]="endingStyle",e})({}),U3=(function(e){return e.panelOpen="data-panel-open",e})({});const H3={[E0.open]:""},q3={[E0.closed]:""},V3={open(e){return e?{[U3.panelOpen]:""}:null}},G3={open(e){return e?H3:q3}},VA={...G3,...To},W3=v.forwardRef(function(t,n){const{render:r,className:s,defaultOpen:a=!1,disabled:l=!1,onOpenChange:c,open:d,style:f,...h}=t,m=We(c),b=B3({open:d,defaultOpen:a,onOpenChange:m,disabled:l}),y=v.useMemo(()=>({open:b.open,disabled:b.disabled,transitionStatus:b.transitionStatus}),[b.open,b.disabled,b.transitionStatus]),k=v.useMemo(()=>({...b,onOpenChange:m,state:y}),[b,m,y]),S=gn("div",t,{state:y,ref:n,props:h,stateAttributesMapping:VA});return g.jsx(HA.Provider,{value:k,children:S})}),K3={...V3,...To},EE=v.forwardRef(function(t,n){const{panelId:r,open:s,handleTrigger:a,state:l,disabled:c}=qA(),{className:d,disabled:f=c,render:h,nativeButton:m=!0,style:b,...y}=t,{getButtonProps:k,buttonRef:S}=$l({disabled:f,focusableWhenDisabled:!0,native:m});return gn("button",t,{state:l,ref:[n,S],props:[{"aria-controls":s?r:void 0,"aria-expanded":s,onClick:a},y,k],stateAttributesMapping:K3})}),Gu={height:void 0,width:void 0};function Y3(e){const{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:s,mounted:a,onOpenChange:l,open:c,setMounted:d,setOpen:f,transitionStatus:h}=e,m=v.useRef(null),b=v.useRef(null),[y,k]=v.useState(Gu),S=v.useRef(Gu),T=v.useRef(!1),R=v.useRef(c),E=v.useRef(!1),[_,C]=v.useState(!1),D=v.useRef(null),N=xo(t,m),M=On({mounted:a,open:c}),B=iA(m,!1,!1),P=!c&&!a,A=_?"idle":h,K=c&&(R.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=We((Y,O=!0)=>{O&&(S.current=Y),k(Y)}),U=We(()=>{D.current?.(),D.current=null}),q=We(Y=>{U(),D.current=()=>{D.current=null,Y()}}),W=We(()=>{c&&a&&b.current==="css-animation"&&(E.current=!0)});Fe(()=>{!_||h==="starting"||C(!1)},[_,h]),v.useEffect(()=>()=>{W(),U()},[W,U]),Fe(()=>{const Y=m.current;if(!Y)return;!c&&D.current&&U();const O=X3(Y,K);if(b.current=O,c&&h==="idle"&&R.current&&O==="css-animation"){S.current=sl(Y);return}if(c&&h==="starting"){const L=T.current;if(T.current=!1,O==="none"){z(sl(Y)),C(!0);return}if(O==="css-transition"){const Z=Z3(Y);if(z(sl(Y)),!L)return Z;const se=Wu(Y,"transition-duration","0s");return q(se),C(!0),Z}if(O==="css-animation"){if(z(sl(Y)),!L){Wu(Y,"animation-name","none")();return}const Z=Wu(Y,"animation-name","none"),se=Wu(Y,"animation-duration","0s");Z(),q(se),C(!0);return}}if(!c&&a&&(h==="idle"||h==="starting")){if(R.current=!1,E.current=!1,O==="none"){z(Gu,!1),d(!1);return}z(sl(Y));return}if(h!=="ending")return;if(O==="none"){d(!1);return}const j=sl(Y);if(!((j.height??0)>0||(j.width??0)>0)){d(!1);return}z(j),O==="css-animation"&&Wu(Y,"animation-name","none")()},[a,c,U,z,d,q,K,h]),_o({enabled:c&&a&&A==="idle",open:!0,ref:m,onComplete(){c&&z(Gu,!1)}}),v.useEffect(()=>{if(c||!a||A!=="ending"||!m.current)return;const O=new AbortController;let j=-1;function V(){M.current.open||(d(!1),z(Gu,!1))}return j=Pr.request(()=>{O.signal.aborted||B(V,O.signal)}),()=>{Pr.cancel(j),O.abort()}},[M,a,c,A,B,z,d]),Fe(()=>{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=Ct(Oi,V);l(!0,L),!L.isCanceled&&(T.current=!0,f(!0))}return Lt(O,"beforematch",j)},[l,f]);const H=s||n||a||c;return{height:$.height,props:{...F?{[E0.startingStyle]:""}:void 0,hidden:P,id:r},ref:N,shouldPreventOpenAnimation:K,shouldRender:H,transitionStatus:A,width:$.width}}function sl(e){return{height:e.scrollHeight,width:e.scrollWidth}}function X3(e,t=!1){const n=vn(e).getComputedStyle(e),r=(n.animationName.split(",").map(a=>a.trim()).some(a=>a!==""&&a!=="none")||t)&&TE(n.animationDuration),s=TE(n.transitionDuration);return r&&s||s?"css-transition":r?"css-animation":"none"}function TE(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 Z3(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=Pr.request(n);return()=>{Pr.cancel(r),n()}}let RE=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});const Q3=v.forwardRef(function(t,n){const{className:r,hiddenUntilFound:s,keepMounted:a,render:l,id:c,style:d,...f}=t,{mounted:h,onOpenChange:m,open:b,panelId:y,setMounted:k,setPanelIdState:S,setOpen:T,state:R,transitionStatus:E}=qA(),_=s??!1,C=a??!1;Fe(()=>{if(c)return S(c),()=>{S(void 0)}},[c,S]);const{height:D,props:N,ref:M,shouldPreventOpenAnimation:B,shouldRender:P,transitionStatus:A,width:K}=Y3({externalRef:n,hiddenUntilFound:_,id:y,keepMounted:C,mounted:h,onOpenChange:m,open:b,setMounted:k,setOpen:T,transitionStatus:E}),$={...R,transitionStatus:A},F=i_(d,$),z=gn("div",{...t,style:void 0},{state:$,ref:M,props:[N,{style:{[RE.collapsiblePanelHeight]:D===void 0?"auto":`${D}px`,[RE.collapsiblePanelWidth]:K===void 0?"auto":`${K}px`}},f,F?{style:F}:void 0,B?{style:{animationName:"none"}}:void 0],stateAttributesMapping:VA});return P?z:null}),J3={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}},e4={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 GA(e){return[J3.root,e4[e]]}const t4={"ui--default-marker":"ui--default-marker",$$css:!0};function WA(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}},Db={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 n4({action:e,chevronRef:t,details:n,detailsRef:r,leadingIcon:s,loading:a,shimmerDetails:l,showChevron:c,tabularNums:d,tone:f}){const h=zt(Db.base,(f==="muted"||f==="tertiary")&&Db.muted,d&&Db.tabularNums,a&&!l&&GA(WA(f))),m={0:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-4b2ntj ui-qdr9cq ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1"},2:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1e4uaio ui-116yoyw"},1:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-4b2ntj ui-qdr9cq ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-ss6m8b"},3:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1e4uaio ui-116yoyw ui-ss6m8b"}}[(f==="muted")<<1|!!d<<0],b={className:"ui-2lah0s ui-fdlg0y ui-1urst0s ui-1lbmi28 ui-18tq7xr ui-g01cxk ui-bthccv ui-7p49u4 ui-1tty4wy ui-p33vsb ui-4f0zl0 ui-93pzih ui-1bt1wk1"},y={className:"ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui-14ju556 ui-1urst0s"};return g.jsxs(g.Fragment,{children:[s!=null&&g.jsx("span",{className:rn("ui-collapsible-leading-icon",y.className),style:y.style,children:s}),e!=null&&g.jsx("span",{className:rn("ui-collapsible-action",h.className),style:h.style,children:e}),n&&g.jsx("span",{ref:r,className:rn("ui-collapsible-details",m.className),style:m.style,children:n}),c&&g.jsx(Ht,{ref:t,name:"chevron-right",className:rn("ui-collapsible-chevron",b.className),style:b.style,size:"sm"})]})}function vi({action:e,details:t,onDetailsClick:n,detailsButtonStyle:r,headerStyle:s,leadingIcon:a,disabled:l=!1,expandable:c=!0,loading:d=!1,shimmerDetails:f=!0,tabularNums:h=!1,tone:m="default",children:b,headerRef:y,detailsRef:k,chevronRef:S,className:T,contentClassName:R,open:E,defaultOpen:_,onOpenChange:C,...D}){const N=n!==void 0,M=c&&N,B=E!==void 0,[P,A]=v.useState(()=>_??!1),K=B?!!E:P,$=(Z,se)=>{B||A(Z),C?.(Z,se)},F=N?g.jsx("button",{type:"button",...zt(uo.buttonReset,uo.detailsButton,d&&f&&uo.detailsButtonShimmer,r),disabled:l,onClick:Z=>{Z.stopPropagation(),n(Z)},children:t}):t,z=c&&b!=null&&typeof b!="boolean",U={className:"ui-78zum5 ui-dt5ytf"},q=zt(uo.base,c&&!N?uo.buttonReset:uo.presentational,c&&!l&&uo.clickable,l&&uo.disabled,d&&f&&GA(WA(m)),t4,s),W={0:{className:"ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui--default-marker"},1:{className:"ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-1ypdohk ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui--default-marker"}}[!l<<0],H={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:rn("ui-collapsible-header",q.className),style:q.style},L=g.jsx(n4,{action:e,chevronRef:S,details:F,detailsRef:k,leadingIcon:a,loading:d,shimmerDetails:f,showChevron:c&&!N,tabularNums:h,tone:m});return g.jsxs(W3,{...D,open:M?K:E,defaultOpen:M?void 0:_,onOpenChange:M?$:C,disabled:l,"data-expandable":c?"":void 0,"data-loading":d?"":void 0,"data-tone":m,className:rn("ui-collapsible",U.className,T),style:U.style,children:[M?g.jsxs("div",{...V,ref:y,onClick:()=>{l||$(!K)},children:[L,g.jsx(EE,{"data-component":"collapsible-header","aria-label":typeof t=="string"?`Toggle ${t}`:"Toggle details",className:W.className,style:W.style,...z?null:{"aria-controls":void 0},onClick:Z=>{l||Z.stopPropagation()},children:g.jsx(Ht,{ref:S,name:"chevron-right",className:rn("ui-collapsible-chevron",H.className),style:H.style,size:"sm"})})]}):c?g.jsx(EE,{...V,ref:y,...z?null:{"aria-controls":void 0},onClick:Z=>{l||Z.stopPropagation()},children:L}):g.jsx("div",{...V,ref:y,children:L}),z&&g.jsx(Q3,{keepMounted:!0,className:rn("ui-collapsible-content-view",Y.className),style:Y.style,children:g.jsx("div",{className:O.className,style:O.style,children:g.jsx("div",{className:rn("ui-collapsible-content",j.className,R),style:j.style,children:b})})})]})}const r4=(e,t)=>Object.is(e,t);function ua(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function i4(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:ua(t,r,n))}function hc(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:ua(r,t,n))}function s4(e,t,n){return e.filter(r=>!ua(t,r,n))}function Ky(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function KA(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function o4(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(KA(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 YA(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 Ky(e)}function Jo(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Ky(e.value):Ky(e)}function XA(e,t,n){function r(){return YA(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=KA(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 a4(e,t,n){return e.reduce((r,s,a)=>(a>0&&r.push(", "),r.push(g.jsx(v.Fragment,{children:XA(s,t,n)},a)),r),[])}function T0(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:s,registerControlId:a}=w0(),l=Bl(t),c=n?s:void 0,d=Fr(()=>Symbol("labelable-control")),f=v.useRef(!1),h=v.useRef(t!=null),m=We(()=>{!f.current||a===Jn||(f.current=!1,a(d.current,void 0))});return Fe(()=>{if(a===Jn)return;let b;if(n){const y=r?.current;vt(y)&&y.closest("label")!=null?b=t??null:b=c??l}else if(t!=null)h.current=!0,b=t;else if(h.current)b=l;else{m();return}if(b===void 0){m();return}f.current=!0,a(d.current,b)},[t,r,c,a,n,l,d,m]),v.useEffect(()=>m,[m]),s??l}function l4(e,t){return e??t}function u4(e){const t=e.getBoundingClientRect(),n=vn(e);if(Zv)return t;const r=n.getComputedStyle(e,"::before"),s=n.getComputedStyle(e,"::after");if(!(r.content!=="none"||s.content!=="none"))return t;const l=parseFloat(r.width)||0,c=parseFloat(r.height)||0,d=parseFloat(s.width)||0,f=parseFloat(s.height)||0,h=Math.max(t.width,l,d),m=Math.max(t.height,c,f),b=h-t.width,y=m-t.height;return{left:t.left-b/2,right:t.right+b/2,top:t.top-y/2,bottom:t.bottom+y/2}}const ZA=v.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function c4(){return v.useContext(ZA)}function R0(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:s}=e,a=We(s),l=v.useRef(0),c=Fr(d4).current,d=Fr(f4).current,[f,h]=v.useState(0),m=v.useRef(f),b=We((R,E)=>{d.set(R,E??null),m.current+=1,h(m.current)}),y=We(R=>{d.delete(R),m.current+=1,h(m.current)}),k=v.useMemo(()=>{const R=new Map;return Array.from(d.keys()).filter(_=>_.isConnected).sort(p4).forEach((_,C)=>{const D=d.get(_)??{};R.set(_,{...D,index:C})}),R},[d,f]);Fe(()=>{if(typeof MutationObserver!="function"||k.size===0)return;const R=new MutationObserver(E=>{const _=new Set,C=D=>_.has(D)?_.delete(D):_.add(D);E.forEach(D=>{D.removedNodes.forEach(C),D.addedNodes.forEach(C)}),_.size===0&&(m.current+=1,h(m.current))});return k.forEach((E,_)=>{_.parentElement&&R.observe(_.parentElement,{childList:!0})}),()=>{R.disconnect()}},[k]),Fe(()=>{m.current===f&&(n.current.length!==k.size&&(n.current.length=k.size),r&&r.current.length!==k.size&&(r.current.length=k.size),l.current=k.size),a(k)},[a,k,n,r,f]),Fe(()=>()=>{n.current=[]},[n]),Fe(()=>()=>{r&&(r.current=[])},[r]);const S=We(R=>(c.add(R),()=>{c.delete(R)}));Fe(()=>{c.forEach(R=>R(k))},[c,k]);const T=v.useMemo(()=>({register:b,unregister:y,subscribeMapChange:S,elementsRef:n,labelsRef:r,nextIndexRef:l}),[b,y,S,n,r,l]);return g.jsx(ZA.Provider,{value:T,children:t})}function f4(){return new Map}function d4(){return new Set}function p4(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 h4=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:a,platform:l,elements:c,middlewareData:d}=t,{element:f,padding:h=0,offsetParent:m="real"}=As(e,t)||{};if(f==null)return{};const b=w_(h),y={x:n,y:r},k=n0(s),S=t0(k),T=await l.getDimensions(f),R=k==="y",E=R?"top":"left",_=R?"bottom":"right",C=R?"clientHeight":"clientWidth",D=a.reference[S]+a.reference[k]-y[k]-a.floating[S],N=y[k]-a.reference[k],M=m==="real"?await l.getOffsetParent?.(f):c.floating;let B=c.floating[C]||a.floating[S];(!B||!await l.isElement?.(M))&&(B=c.floating[C]||a.floating[S]);const P=D/2-N/2,A=B/2-T[S]/2-1,K=Math.min(b[E],A),$=Math.min(b[_],A),F=K,z=B-T[S]-$,U=B/2-T[S]/2+P,q=S_(F,U,z),W=!d.arrow&&Co(s)!=null&&U!==q&&a.reference[S]/2-(U<F?K:$)-T[S]/2<0,H=W?U<F?U-F:U-z:0;return{[k]:y[k]+H,data:{[k]:q,centerOffset:U-q-H,...W&&{alignmentOffset:H}},reset:W}}}),m4=(e,t)=>({...h4(e),options:[e,t]}),g4=w6().fn,b4={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 g4(e)).data?.referenceHidden||a}}}},kp={sideX:"left",sideY:"top"},QA={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:s},platform:a,strategy:l,placement:c}=e,d=vn(s),f=d.getComputedStyle(s);if(!(f.transitionDuration!=="0s"&&f.transitionDuration!==""))return{x:t,y:n,data:kp};const m=await a.getOffsetParent?.(s);let b={width:0,height:0};if(l==="fixed"&&d?.visualViewport)b={width:d.visualViewport.width,height:d.visualViewport.height};else if(m===d){const E=Kt(s);b={width:E.documentElement.clientWidth,height:E.documentElement.clientHeight}}else await a.isElement?.(m)&&(b=await a.getDimensions(m));const y=ri(c);let k=t,S=n;y==="left"&&(k=b.width-(t+r.width)),y==="top"&&(S=b.height-(n+r.height));const T=y==="left"?"right":kp.sideX,R=y==="top"?"bottom":kp.sideY;return{x:k,y:S,data:{sideX:T,sideY:R}}}};function JA(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 CE(e,t,n){const{rects:r,placement:s}=e;return{side:JA(t,ri(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 C0(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:s=0,align:a="center",alignOffset:l=0,collisionBoundary:c,collisionPadding:d=5,sticky:f=!1,arrowPadding:h=5,disableAnchorTracking:m=!1,inline:b,keepMounted:y=!1,floatingRootContext:k,mounted:S,collisionAvoidance:T,shiftCrossAxis:R=!1,nodeId:E,adaptiveOrigin:_,lazyFlip:C=!1,externalTree:D}=e,[N,M]=v.useState(null);!S&&N!==null&&M(null);const B=T.side||"flip",P=T.align||"flip",A=T.fallbackAxisSide||"end",K=typeof t=="function"?t:void 0,$=We(K),F=K?$:t,z=On(t),U=On(S),W=Li()==="rtl",H=N||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":W?"left":"right","inline-start":W?"right":"left"}[r],Y=a==="center"?H:`${H}-${a}`;let O=d;const j=1,V=r==="bottom"?j:0,L=r==="top"?j:0,Z=r==="right"?j:0,se=r==="left"?j:0;typeof O=="number"?O={top:O+V,right:O+se,bottom:O+L,left:O+Z}:O&&(O={top:(O.top||0)+V,right:(O.right||0)+se,bottom:(O.bottom||0)+L,left:(O.left||0)+Z});const ne={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:O},oe=v.useRef(null),ae=On(s),ue=On(l),we=typeof s!="function"?s:0,me=typeof l!="function"?l:0,ce=[];b&&ce.push(b),ce.push(a0(He=>{const Ze=CE(He,r,W),ft=typeof ae.current=="function"?ae.current(Ze):ae.current,Tt=typeof ue.current=="function"?ue.current(Ze):ue.current;return{mainAxis:ft,crossAxis:Tt,alignmentAxis:Tt}},[we,me,W,r]));const be=P==="none"&&B!=="shift",ve=!be&&(f||R||B==="shift"),Re=B==="none"?null:u0({...ne,padding:{top:O.top+j,right:O.right+j,bottom:O.bottom+j,left:O.left+j},mainAxis:!R&&B==="flip",crossAxis:P==="flip"?"alignment":!1,fallbackAxisSideDirection:A}),Se=be?null:l0(He=>{const Ze=Kt(He.elements.floating).documentElement;return{...ne,rootBoundary:R?{x:0,y:0,width:Ze.clientWidth,height:Ze.clientHeight}:void 0,mainAxis:P!=="none",crossAxis:ve,limiter:f||R?void 0:S6(ft=>{if(!oe.current)return{};const{width:Tt,height:ot}=oe.current.getBoundingClientRect(),X=gi(ri(ft.placement)),he=X==="y"?Tt:ot,Ie=X==="y"?O.left+O.right:O.top+O.bottom;return{offset:he/2+Ie/2}})}},[ne,f,R,O,P]);B==="shift"||P==="shift"||a==="center"?ce.push(Se,Re):ce.push(Re,Se),ce.push(c0({...ne,apply({elements:{floating:He},availableWidth:Ze,availableHeight:ft,rects:Tt}){if(!U.current)return;const ot=He.style;ot.setProperty("--available-width",`${Ze}px`),ot.setProperty("--available-height",`${ft}px`);const X=vn(He).devicePixelRatio||1,{x:he,y:Ie,width:tt,height:_t}=Tt.reference,dt=(Math.round((he+tt)*X)-Math.round(he*X))/X,Ve=(Math.round((Ie+_t)*X)-Math.round(Ie*X))/X;ot.setProperty("--anchor-width",`${dt}px`),ot.setProperty("--anchor-height",`${Ve}px`)}}),m4(He=>({element:oe.current||Kt(He.elements.floating).createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(He){const{elements:Ze,middlewareData:ft,placement:Tt,rects:ot,y:X}=He,he=ri(Tt),Ie=gi(he),tt=oe.current,_t=ft.arrow?.x||0,dt=ft.arrow?.y||0,Ve=tt?.clientWidth||0,Be=tt?.clientHeight||0,nt=_t+Ve/2,Ge=dt+Be/2,Pe=Math.abs(ft.shift?.y||0),ct=ot.reference.height/2,Pt=typeof s=="function"?s(CE(He,r,W)):s,qt=Pe>Pt,Xe={top:`${nt}px calc(100% + ${Pt}px)`,bottom:`${nt}px ${-Pt}px`,left:`calc(100% + ${Pt}px) ${Ge}px`,right:`${-Pt}px ${Ge}px`}[he],It=`${nt}px ${ot.reference.y+ct-X}px`;return Ze.floating.style.setProperty("--transform-origin",ve&&Ie==="y"&&qt?It:Xe),{}}},b4,_),Fe(()=>{!S&&k&&k.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[S,k]);const ke=v.useMemo(()=>({elementResize:!m&&typeof ResizeObserver<"u",layoutShift:!m&&typeof IntersectionObserver<"u"}),[m]),{refs:Ae,elements:Oe,x:Me,y:Ue,middlewareData:xe,update:_e,placement:ee,context:fe,isPositioned:J,floatingStyles:re}=X6({rootContext:k,open:y?S:void 0,placement:Y,middleware:ce,strategy:n,whileElementsMounted:y?void 0:(...He)=>jp(...He,ke),nodeId:E,externalTree:D}),{sideX:Te,sideY:Le}=xe.adaptiveOrigin||kp,Ke=J?n:"fixed",Qe=v.useMemo(()=>{const He=_?{position:Ke,[Te]:Me,[Le]:Ue}:{position:Ke,...re};return J||(He.opacity=0),He},[_,Ke,Te,Me,Le,Ue,re,J]),gt=v.useRef(null);Fe(()=>{if(!S)return;const He=z.current,Ze=typeof He=="function"?He():He,Tt=(_E(Ze)?Ze.current:Ze)||null||null;Tt!==gt.current&&(Ae.setPositionReference(Tt),gt.current=Tt)},[S,Ae,F,z]),v.useEffect(()=>{if(!S)return;const He=z.current;typeof He!="function"&&_E(He)&&He.current!==gt.current&&(Ae.setPositionReference(He.current),gt.current=He.current)},[S,Ae,F,z]),v.useEffect(()=>{if(y&&S&&Oe.reference&&Oe.floating)return jp(Oe.reference,Oe.floating,_e,ke)},[y,S,Oe,_e,ke]);const Je=ri(ee),xt=JA(r,Je,W),Rt=Co(ee)||"center",rt=!!xe.hide?.referenceHidden;Fe(()=>{C&&S&&J&&M(Je)},[C,S,J,Je]);const et=v.useMemo(()=>({position:"absolute",top:xe.arrow?.y,left:xe.arrow?.x}),[xe.arrow]),ze=xe.arrow?.centerOffset!==0;return v.useMemo(()=>({positionerStyles:Qe,arrowStyles:et,arrowRef:oe,arrowUncentered:ze,side:xt,align:Rt,physicalSide:Je,anchorHidden:rt,refs:Ae,context:fe,isPositioned:J,update:_e}),[Qe,et,oe,ze,xt,Rt,Je,rt,Ae,fe,J,_e])}function _E(e){return e!=null&&"current"in e}function jh(e){return e==="starting"?EP:Fn}function _0(e,t,{styles:n,transitionStatus:r,props:s,refs:a,hidden:l,inert:c=!1}){const d={...n};return c&&(d.pointerEvents="none"),gn("div",e,{state:t,ref:a,props:[{role:"presentation",hidden:l,style:d},jh(r),s],stateAttributesMapping:Gc})}const y4=20;function v4(e,t,n,r){const[s,a]=v.useState(!1);Fe(()=>{if(!e||!t||n==null){a(!1);return}const l=Kt(n).documentElement.clientWidth,c=n.offsetWidth;a(l>0&&c>0&&c>=l-y4)},[e,t,n]),k$(e&&(!t||s),r)}let eN=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function tN(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:s,index:a}=e,{register:l,unregister:c,subscribeMapChange:d,elementsRef:f,labelsRef:h,nextIndexRef:m}=c4(),b=v.useRef(-1),[y,k]=v.useState(a??(s===eN.GuessFromOrder?()=>{if(b.current===-1){const R=m.current;m.current+=1,b.current=R}return b.current}:-1)),S=v.useRef(null),T=v.useCallback(R=>{if(S.current=R,y!==-1&&R!==null&&(f.current[y]=R,h)){const E=t!==void 0;h.current[y]=E?t:r?.current?.textContent??R.textContent}},[y,f,h,t,r]);return Fe(()=>{if(a!=null)return;const R=S.current;if(R)return l(R,n),()=>{c(R)}},[a,l,c,n]),Fe(()=>{if(a==null)return d(R=>{const E=S.current?R.get(S.current)?.index:null;E!=null&&k(E)})},[a,d,k]),{ref:T,index:y}}const nN={popup:{"--ui-floating-anchor-offset-x":"ui-1j6m33m ui-ionq63 ui-l7rd01","--ui-floating-anchor-offset-y":"ui-14hk5xf ui-wyo6tf ui-17dzj2r",k6sLGO:"ui-1so62im",k3nNDw:"ui-ctpfpq",kKVMdj:"ui-1yjmni4",kyAemX:"ui-1hr7t8a",k44tkh:"ui-ykr0s4 ui-p0ivey ui-1s1fvk8",k1ekBW:"ui-11xpdln",kAMwcw:"ui-19frgs0",kIyJzY:"ui-7pq1vu ui-1fdgx8g ui-sagj69",k3aq6I:"ui-1c071of ui-dv15d5",$$css:!0},positioner:{"--ui-floating-anchor-fade-duration":"ui-1kwwprx ui-5ece57 ui-4rr00i",kSiTet:"ui-1hc1fzr ui-4itv7f ui-fwszop",$$css:!0}},zh=nN.popup,x4=nN.positioner,k4={transition:`opacity var(--ui-floating-anchor-fade-duration) ${ez["--cursor-easing-out-quint"]}`};function Ph(...e){const t=zt(x4,...e);return{...t,style:{...t.style,...k4}}}const $h={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}},cr={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}},rN=cr.positioner,A0=[cr.surface,$h.border],iN=[rN,cr.popupShadow,cr.popupRadius],S4=[rN,cr.tooltipShadow,cr.tooltipRadius],w4=[cr.tooltipRadius,cr.tooltipSurface],E4=cr.popupLayout,T4=cr.popupInset,sN=cr.previewCardInset,oN=[E4,T4],R4=cr.popupInteractive,aN=[cr.surface,$h.border],C4=cr.popupSurfaceMd,_4=cr.popupPositioner,A4=[_4,cr.popupShadow,cr.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:{kOEVvA:"ui-i4tjbf",k5uj8I:"ui-66jpid",kq4gsV:"ui-1kn4tos",k4ymXE:"ui-1h1qzfg",kF4oUt:"ui-15ommkv",kPsB8K:"ui-6o5ikd",keQWX6:"ui-vv2yia",kqNwI3:"ui-1prubpf",kSJm4H:"ui-1hezt85",kVBs6H:"ui-1isuopv",$$css:!0},rowSectionTrailing:{keTefX:"ui-kiyga0",$$css:!0},rowSectionDescription:{kSGwAc:"ui-qcrz7y",keoZOQ:"ui-1k5org8",$$css:!0}},N4=xa.list,O4=xa.row,I4=xa.popupFrame,M4=xa.rowFrame,D4=xa.rowInsetHighlight,L4=xa.rowSectionTrailing,j4=xa.rowSectionDescription,Br={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}},z4=[aN,I4,Br.popup],P4={sm:null,md:C4},$4=Br.popupWidth,F4=Br.popupDefaultWidth,B4=[N4,Br.list],U4=[O4,M4,Br.row,D4,Cs.root],H4=Br.rowText,q4=Br.rowLabel,V4=Br.itemTextWithMeta,G4=Br.rowTextWithDescription,W4=Br.rowDescription,K4=Br.rowMeta,Lb=Br.rowSection,Y4=Br.rowSectionLeading,AE=L4,X4=Br.rowSectionEnd,jb=j4;function ol(e,t,n){let r=n.initialDeps??[],s,a=!0;function l(){var c,d,f;let h;n.key&&((c=n.debug)!=null&&c.call(n))&&(h=Date.now());const m=e();if(!(m.length!==r.length||m.some((k,S)=>r[S]!==k)))return s;r=m;let y;if(n.key&&((d=n.debug)!=null&&d.call(n))&&(y=Date.now()),s=t(...m),n.key&&((f=n.debug)!=null&&f.call(n))){const k=Math.round((Date.now()-h)*100)/100,S=Math.round((Date.now()-y)*100)/100,T=S/16,R=(E,_)=>{for(E=String(E);E.length<_;)E=" "+E;return E};console.info(`%c⏱ ${R(S,5)} /${R(k,5)} ms`,`
|
|
10
|
+
font-size: .6rem;
|
|
11
|
+
font-weight: bold;
|
|
12
|
+
color: hsl(${Math.max(0,Math.min(120-120*T,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 NE(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Z4=(e,t)=>Math.abs(e-t)<1.01,Q4=(e,t,n)=>{let r;return function(...s){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,s),n)}},OE=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},J4=e=>e,eF=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},tF=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const s=l=>{const{width:c,height:d}=l;t({width:Math.round(c),height:Math.round(d)})};if(s(OE(n)),!r.ResizeObserver)return()=>{};const a=new r.ResizeObserver(l=>{const c=()=>{const d=l[0];if(d?.borderBoxSize){const f=d.borderBoxSize[0];if(f){s({width:f.inlineSize,height:f.blockSize});return}}s(OE(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},IE={passive:!0},ME=typeof window>"u"?!0:"onscrollend"in window,nF=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let s=0;const a=e.options.useScrollendEvent&&ME?()=>{}:Q4(r,()=>{t(s,!1)},e.options.isScrollingResetDelay),l=h=>()=>{const{horizontal:m,isRtl:b}=e.options;s=m?n.scrollLeft*(b&&-1||1):n.scrollTop,a(),t(s,h)},c=l(!0),d=l(!1);n.addEventListener("scroll",c,IE);const f=e.options.useScrollendEvent&&ME;return f&&n.addEventListener("scrollend",d,IE),()=>{n.removeEventListener("scroll",c),f&&n.removeEventListener("scrollend",d)}},rF=(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"]},iF=(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 sF{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var n,r,s;return((s=(r=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:r.now)==null?void 0:s.call(r))??Date.now()},this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(a=>{const l=()=>{const c=a.target,d=this.indexFromElement(c);if(!c.isConnected){this.observer.unobserve(c);return}this.shouldMeasureDuringScroll(d)&&this.resizeItem(d,this.options.measureElement(c,a,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()})}));return{disconnect:()=>{var s;(s=r())==null||s.disconnect(),n=null},observe:s=>{var a;return(a=r())==null?void 0:a.observe(s,{box:"border-box"})},unobserve:s=>{var a;return(a=r())==null?void 0:a.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,s])=>{typeof s>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:J4,rangeExtractor:eF,onChange:()=>{},measureElement:rF,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=ol(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=a,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const s=new Map,a=new Map;for(let l=r-1;l>=0;l--){const c=n[l];if(s.has(c.lane))continue;const d=a.get(c.lane);if(d==null||c.end>d.end?a.set(c.lane,c):c.end<d.end&&s.set(c.lane,!0),s.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((l,c)=>l.end===c.end?l.index-c.index:l.end-c.end)[0]:void 0},this.getMeasurementOptions=ol(()=>[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=ol(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:a,enabled:l,lanes:c},d)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const b of this.laneAssignments.keys())b>=n&&this.laneAssignments.delete(b);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(b=>{this.itemSizeCache.set(b.key,b.size)}));const f=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const h=this.measurementsCache.slice(0,f),m=new Array(c).fill(void 0);for(let b=0;b<f;b++){const y=h[b];y&&(m[y.lane]=b)}for(let b=f;b<n;b++){const y=a(b),k=this.laneAssignments.get(b);let S,T;if(k!==void 0&&this.options.lanes>1){S=k;const C=m[S],D=C!==void 0?h[C]:void 0;T=D?D.end+this.options.gap:r+s}else{const C=this.options.lanes===1?h[b-1]:this.getFurthestMeasurement(h,b);T=C?C.end+this.options.gap:r+s,S=C?C.lane:b%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(b,S)}const R=d.get(y),E=typeof R=="number"?R:this.options.estimateSize(b),_=T+E;h[b]={index:b,start:T,size:E,end:_,key:y,lane:S},m[S]=b}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=ol(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,s,a)=>this.range=n.length>0&&r>0?oF({measurements:n,outerSize:r,scrollOffset:s,lanes:a}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=ol(()=>{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.options.debug&&console.info("correction",c),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=ol(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let a=0,l=n.length;a<l;a++){const c=n[a],d=r[c];s.push(d)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return NE(r[lN(0,r.length-1,s=>NE(r[s]).start,n)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(n,r,s=0)=>{if(!this.scrollElement)return 0;const a=this.getSize(),l=this.getScrollOffset();r==="auto"&&(r=n>=l+a?"end":"start"),r==="center"?n+=(s-a)/2:r==="end"&&(n-=a);const c=this.getMaxScrollOffset();return Math.max(Math.min(c,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.getSize(),a=this.getScrollOffset(),l=this.measurementsCache[n];if(!l)return;if(r==="auto")if(l.end>=a+s-this.options.scrollPaddingEnd)r="end";else if(l.start<=a+this.options.scrollPaddingStart)r="start";else return[a,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];const c=r==="end"?l.end+this.options.scrollPaddingEnd:l.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(c,r,l.size),r]},this.scrollToOffset=(n,{align:r="start",behavior:s="auto"}={})=>{const a=this.getOffsetForAlignment(n,r),l=this.now();this.scrollState={index:null,align:r,behavior:s,startedAt:l,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:r="auto",behavior:s="auto"}={})=>{n=Math.max(0,Math.min(n,this.options.count-1));const a=this.getOffsetForIndex(n,r);if(!a)return;const[l,c]=a,d=this.now();this.scrollState={index:n,align:c,behavior:s,startedAt:d,lastTargetOffset:l,stableFrames:0},this._scrollToOffset(l,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:r="auto"}={})=>{const s=this.getScrollOffset()+n,a=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:a,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let s;if(r.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=r[r.length-1])==null?void 0:n.end)??0;else{const a=Array(this.options.lanes).fill(null);let l=r.length-1;for(;l>=0&&a.some(c=>c===null);){const c=r[l];a[c.lane]===null&&(a[c.lane]=c.end),l--}s=Math.max(...a.filter(c=>c!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.invalidateMeasurements=()=>{this.itemSizeCache=new Map(this.itemSizeCache),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&&Z4(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 lN=(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 oF({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const s=e.length-1,a=d=>e[d].start;if(e.length<=r)return{startIndex:0,endIndex:s};let l=lN(0,s,a,n),c=l;if(r===1)for(;c<s&&e[c].end<n+t;)c++;else if(r>1){const d=Array(r).fill(0);for(;c<s&&d.some(h=>h<n+t);){const h=e[c];d[h.lane]=h.end,c++}const f=Array(r).fill(n+t);for(;l>=0&&f.some(h=>h>=n);){const h=e[l];f[h.lane]=h.start,l--}l=Math.max(0,l-l%r),c=Math.min(s,c+(r-1-c%r))}return{startIndex:l,endIndex:c}}const DE=typeof document<"u"?v.useLayoutEffect:v.useEffect;function aF({useFlushSync:e=!0,...t}){const n=v.useReducer(()=>({}),{})[1],r={...t,onChange:(a,l)=>{var c;e&&l?Di.flushSync(n):n(),(c=t.onChange)==null||c.call(t,a,l)}},[s]=v.useState(()=>new sF(r));return s.setOptions(r),DE(()=>s._didMount(),[]),DE(()=>s._willUpdate()),s}function uN(e){return aF({observeElementRect:tF,observeElementOffset:nF,scrollToFn:iF,...e})}function lF(){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 cN(e){return typeof ResizeObserver>"u"?null:new ResizeObserver(e)}function Yy({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 uF="hover",cF=4,jd=24,LE=5;function fN(e){const{scrollTop:t,scrollHeight:n,clientHeight:r,threshold:s}=e;return{isAtTop:t<=s,isAtBottom:t+r>=n-s}}function fF(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 dF=["mask-image","-webkit-mask-image","mask-size","mask-repeat","mask-composite","-webkit-mask-composite"];function zb(e,t,n){const r=e.style,s=[];if(t.top||t.bottom||t.start||t.end){if(n.block){const l=t.top?"var(--scroll-fade-top-size)":"0px",c=t.bottom?"var(--scroll-fade-bottom-size)":"0px";s.push(`linear-gradient(to bottom, rgba(0, 0, 0, var(--scroll-fade-top-start-opacity)) 0px, black ${l}, black calc(100% - ${c}), rgba(0, 0, 0, var(--scroll-fade-bottom-start-opacity)) 100%)`)}if(n.inline){const l=t.start?"var(--scroll-fade-start-size)":"0px",c=t.end?"var(--scroll-fade-end-size)":"0px";s.push(`linear-gradient(to right, transparent 0px, black ${l}, black calc(100% - ${c}), transparent 100%)`)}}if(s.length===0){for(const l of dF)r.removeProperty(l);return}const a=s.join(", ");r.setProperty("mask-image",a),r.setProperty("-webkit-mask-image",a),r.setProperty("mask-size",s.map(()=>"100% 100%").join(", ")),r.setProperty("mask-repeat","no-repeat"),s.length>1&&(r.setProperty("mask-composite","intersect"),r.setProperty("-webkit-mask-composite","source-in"))}function pF({block:e,inline:t}){return{...e&&{"--scroll-fade-top-size":`${e.topPx}px`,"--scroll-fade-bottom-size":`${e.bottomPx}px`,"--scroll-fade-top-start-opacity":String(e.topStartOpacity),"--scroll-fade-bottom-start-opacity":String(e.bottomStartOpacity)},...t&&{"--scroll-fade-start-size":`${t.startPx}px`,"--scroll-fade-end-size":`${t.endPx}px`}}}const hF=20;class mF{constructor(){this._trackSize=0,this._viewportSize=0,this._scrollSize=0,this._scrollPosition=0,this._isScrollable=!1,this._thumbSize=0,this._thumbPosition=0,this._thumbRatio=0}setDimensions(t,n,r,s){const a=Math.round(t),l=Math.round(n),c=Math.round(r),d=Math.round(s);return this._trackSize===a&&this._viewportSize===l&&this._scrollSize===c&&this._scrollPosition===d?!1:(this._trackSize=a,this._viewportSize=l,this._scrollSize=c,this._scrollPosition=d,this._recompute(),!0)}setScrollPosition(t){const n=Math.round(t);return this._scrollPosition===n?!1:(this._scrollPosition=n,this._thumbPosition=this._computeThumbPosition(),!0)}_recompute(){if(this._isScrollable=this._scrollSize>0&&this._viewportSize>0&&this._scrollSize>this._viewportSize,!this._isScrollable||this._trackSize<=0){this._thumbSize=0,this._thumbPosition=0,this._thumbRatio=0;return}const t=Math.floor(this._trackSize*this._viewportSize/this._scrollSize);this._thumbSize=Math.min(this._trackSize,Math.max(hF,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}getScrollMetrics(){return{viewportSize:this._viewportSize,scrollSize:this._scrollSize,scrollPosition:this._scrollPosition}}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 Qn=class Qn{constructor(t){this.fadeEdges=[!1,!1],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.viewport=t.viewport,this.content=t.content,this.scrollbar=t.scrollbar,this.thumb=t.thumb,this.state=new mF,this.direction=t.direction,this.mapVerticalWheelToHorizontal=t.mapVerticalWheelToHorizontal??!1,this.onFadeEdgesChange=t.onFadeEdgesChange}static flushThumbSyncs(){Qn.thumbSyncFrame=null;const t=[...Qn.pendingThumbSyncs];Qn.pendingThumbSyncs.clear();const n=t.filter(r=>r.measureThumb());for(const r of n)r.applyThumbStyle(),r.applyFadeEdges()}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();const t=Qn.pendingThumbSyncs;t.delete(this),t.size===0&&Qn.thumbSyncFrame!==null&&(cancelAnimationFrame(Qn.thumbSyncFrame),Qn.thumbSyncFrame=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),this.applyFadeEdges()}}attachResizeObserver(){this.resizeObserver=cN(()=>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(){Qn.pendingThumbSyncs.add(this),Qn.thumbSyncFrame===null&&(Qn.thumbSyncFrame=requestAnimationFrame(Qn.flushThumbSyncs))}measureThumb(){this.thumbInsetStart=this.getThumbInsetStart();const t=this.readDimensions();return this.state.setDimensions(t.trackSize,t.viewportSize,t.scrollSize,t.scrollPos)}applyFadeEdges(){if(!this.onFadeEdgesChange)return;const{viewportSize:t,scrollSize:n,scrollPosition:r}=this.state.getScrollMetrics();let s,a;if(this.horizontal){const{isAtStart:l,isAtEnd:c}=fF({scrollLeft:r,scrollWidth:n,clientWidth:t,threshold:LE});s=!l,a=!c}else{const{isAtTop:l,isAtBottom:c}=fN({scrollTop:r,scrollHeight:n,clientHeight:t,threshold:LE});s=!l,a=!c}s===this.fadeEdges[0]&&a===this.fadeEdges[1]||(this.fadeEdges=[s,a],this.onFadeEdgesChange(s,a))}readDimensions(){const t=Math.max(0,this.scrollbar.clientHeight-this.thumbInsetStart);return{trackSize:this.horizontal?this.scrollbar.clientWidth:t,viewportSize:this.horizontal?this.viewport.clientWidth:this.viewport.clientHeight,scrollSize:this.horizontal?this.viewport.scrollWidth:this.viewport.scrollHeight,scrollPos:this.horizontal?this.viewport.scrollLeft:this.viewport.scrollTop}}applyThumbStyle(){const t=this.state.getThumbSize(),n=this.state.getThumbPosition();this.horizontal?(this.thumb.style.width=`${t}px`,this.thumb.style.height="",this.thumb.style.transform=this.getThumbTransform(n)):(this.thumb.style.height=`${t}px`,this.thumb.style.width="",this.thumb.style.transform=this.getThumbTransform(n)),this.scrollbar.dataset.scrollable=this.state.isScrollable()?"true":"false"}attachPointerEvents(){this.boundOnThumbDown=this.handleThumbDown.bind(this),this.boundOnTrackDown=this.handleTrackDown.bind(this),this.thumb.addEventListener("pointerdown",this.boundOnThumbDown),this.scrollbar.addEventListener("pointerdown",this.boundOnTrackDown)}detachPointerEvents(){this.boundOnThumbDown&&(this.thumb.removeEventListener("pointerdown",this.boundOnThumbDown),this.boundOnThumbDown=null),this.boundOnTrackDown&&(this.scrollbar.removeEventListener("pointerdown",this.boundOnTrackDown),this.boundOnTrackDown=null),this.dragCleanup?.(),this.dragCleanup=null}handleThumbDown(t){if(t.button!==0)return;t.preventDefault();const n=this.horizontal?t.clientX:t.clientY,r=this.horizontal?this.viewport.scrollLeft:this.viewport.scrollTop,s=t.pointerId;this.thumb.setPointerCapture(s),this.thumb.classList.add("ui-scroll-area__thumb--active");const a=c=>{const d=(this.horizontal?c.clientX:c.clientY)-n,f=this.state.getScrollPositionFromThumbDelta(d,r);this.horizontal?this.viewport.scrollLeft=f:this.viewport.scrollTop=f},l=()=>{this.thumb.classList.remove("ui-scroll-area__thumb--active");try{this.thumb.releasePointerCapture(s)}catch{}this.thumb.removeEventListener("pointermove",a),this.thumb.removeEventListener("pointerup",l),this.thumb.removeEventListener("pointercancel",l),this.dragCleanup=null};this.thumb.addEventListener("pointermove",a),this.thumb.addEventListener("pointerup",l),this.thumb.addEventListener("pointercancel",l),this.dragCleanup=l}handleTrackDown(t){if(t.button!==0||t.target===this.thumb)return;const n=this.scrollbar.getBoundingClientRect();if(!this.horizontal){this.viewport.scrollTop=this.state.getScrollPositionFromTrackOffset(t.clientY-n.top-this.thumbInsetStart);return}const r=getComputedStyle(this.viewport).direction==="rtl",s=r?n.right-t.clientX:t.clientX-n.left,a=this.state.getScrollPositionFromTrackOffset(s);this.viewport.scrollLeft=r?-a:a}attachWheelForwarding(){this.boundOnWheel=t=>{if(this.horizontal){const n=this.viewport.scrollWidth-this.viewport.clientWidth;if(n<=0)return;let r=null;if(this.mapVerticalWheelToHorizontal)r=Yy({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},Qn.WHEEL_GESTURE_RESET_MS),this.horizontalWheelAxisLock!=="x")return;if(r=Yy({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(Qn.VERTICAL_THUMB_OFFSET_CSS_VAR),n=Number.parseFloat(t);return Number.isFinite(n)?Math.max(0,n):0}};Qn.VERTICAL_THUMB_OFFSET_CSS_VAR="--scrollbar-thumb-top-offset",Qn.WHEEL_GESTURE_RESET_MS=150,Qn.pendingThumbSyncs=new Set,Qn.thumbSyncFrame=null;let Vp=Qn;const gF={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}},Pb={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}},$b={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}},Fb={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 bF(){return gF.base}function yF({direction:e}){return[Pb.base,e==="horizontal"?Pb.horizontal:null,e==="both"?Pb.both:null]}function vF(e){return[$b.base,e==="horizontal"?$b.horizontal:null,e==="both"?$b.both:null]}function jE({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 zE(e,t){return[Fb.base,e==="horizontal"?Fb.horizontal:null,t?Fb.hoverHidden:null]}const xF=1e4,zd=5,Nl=v.forwardRef(function({children:t,height:n,maxHeight:r,width:s,className:a,viewportClassName:l,rootStyle:c,viewportStyle:d,allowScrollChaining:f=!1,contentStyle:h,scrollbarStyle:m,overlay:b,style:y,scrollbarVisibility:k=uF,isScrollbarRevealed:S=!1,direction:T="vertical",topFadeSize:R,bottomFadeSize:E,topFadeStartOpacity:_=0,bottomFadeStartOpacity:C=0,startFadeSize:D,endFadeSize:N,autoScrollToBottom:M=!1,scrollTrigger:B,autoScrollPauseTimeout:P=xF,onScrollStateChange:A,mapVerticalWheelToHorizontal:K=!1,scrollPadding:$=cF,scrollbarInset:F,onPointerEnter:z,onPointerLeave:U,...q},W){const H=v.useRef(null),Y=v.useRef(null),O=v.useRef(null),j=v.useRef(null),V=v.useRef(null),L=v.useRef(null),Z=v.useRef(null),se=T!=="horizontal",ne=T!=="vertical",oe=K&&!se,ae=R!==void 0||E!==void 0,ue=D!==void 0||N!==void 0,we=ae||ue,me=v.useRef(!1),ce=v.useRef(0),be=v.useRef(0),ve=v.useRef(null),Re=v.useRef(null);v.useLayoutEffect(()=>{const ze=Y.current,He=O.current;if(!ze||!He)return;const Ze=[],ft={top:!1,bottom:!1,start:!1,end:!1},Tt={block:ae,inline:ue};if(se){const ot=j.current,X=V.current;ot&&X&&Ze.push(new Vp({viewport:ze,content:He,scrollbar:ot,thumb:X,direction:"vertical",mapVerticalWheelToHorizontal:oe,onFadeEdgesChange:ae?(he,Ie)=>{ft.top=he,ft.bottom=Ie,zb(ze,ft,Tt)}:void 0}))}if(ne){const ot=L.current,X=Z.current;ot&&X&&Ze.push(new Vp({viewport:ze,content:He,scrollbar:ot,thumb:X,direction:"horizontal",mapVerticalWheelToHorizontal:oe,onFadeEdgesChange:ue?(he,Ie)=>{ft.start=he,ft.end=Ie,zb(ze,ft,Tt)}:void 0}))}if(Ze.length!==0){for(const ot of Ze)ot.attach();return()=>{for(const ot of Ze)ot.detach();zb(ze,{top:!1,bottom:!1,start:!1,end:!1},Tt)}}},[se,ne,oe,ae,ue]);const Se=v.useCallback(()=>{const ze=Y.current;return ze?{scrollTop:ze.scrollTop,scrollHeight:ze.scrollHeight,clientHeight:ze.clientHeight}:{scrollTop:0,scrollHeight:0,clientHeight:0}},[]),ke=v.useCallback((ze=!1)=>{const He=Y.current;He&&He.scrollTo({top:He.scrollHeight,behavior:ze?"smooth":"instant"})},[]),Ae=v.useCallback((ze=!1)=>{const He=Y.current;He&&He.scrollTo({top:0,behavior:ze?"smooth":"instant"})},[]),Oe=v.useCallback(()=>{Re.current===null&&(Re.current=requestAnimationFrame(()=>{Re.current=null,!me.current&&ke(!1)}))},[ke]),Me=v.useCallback(()=>{M&&(me.current||Oe())},[M,Oe]);v.useImperativeHandle(W,()=>({scrollToBottom:ke,scrollToTop:Ae,requestAutoScroll:Me,getScrollPosition:Se,get rootElement(){return H.current},get viewportElement(){return Y.current}}),[ke,Ae,Me,Se]);const Ue=M||A!==void 0,xe=v.useEffectEvent(()=>{const ze=Y.current;if(!ze)return;const{scrollTop:He,scrollHeight:Ze,clientHeight:ft}=ze,{isAtTop:Tt,isAtBottom:ot}=fN({scrollTop:He,scrollHeight:Ze,clientHeight:ft,threshold:zd});A?.({isAtBottom:ot,isAtTop:Tt}),ot&&me.current&&(me.current=!1,ve.current&&(clearTimeout(ve.current),ve.current=null));const X=Ze<be.current-zd,he=Ze>be.current+zd,Ie=He<ce.current-zd;Ie&&!X&&!ot&&M&&!me.current&&(me.current=!0,ve.current&&clearTimeout(ve.current),ve.current=setTimeout(()=>{me.current=!1,ve.current=null},P)),he&&M&&!me.current&&!ot&&!Ie&&Oe(),X&&M&&!me.current&&!ot&&Oe(),ce.current=He,be.current=Ze}),_e=lF();v.useEffect(()=>{if(!Ue)return;const ze=Y.current,He=O.current;if(!ze)return;const Ze=()=>{_e.request(()=>xe())};ze.addEventListener("scroll",Ze,{passive:!0});const ft=cN(()=>xe());return ft!==null&&(ft.observe(ze),He&&ft.observe(He)),()=>{ze.removeEventListener("scroll",Ze),ft?.disconnect(),_e.dispose()}},[Ue,_e]),v.useEffect(()=>{B!==void 0&&M&&(me.current||Oe())},[B,M,Oe]),v.useEffect(()=>{if(!se)return;const ze=Y.current;if(!ze)return;const He=Ze=>{const ft=Ze.deltaY;if(ft===0)return;const Tt=ze.scrollHeight-ze.clientHeight;if(Tt<=0)return;const ot=ze.scrollTop,X=ot<=0&&ft<0,he=ot>=Tt-.5&&ft>0;X||he||Ze.stopPropagation()};return ze.addEventListener("wheel",He,{passive:!0}),()=>ze.removeEventListener("wheel",He)},[se]),v.useEffect(()=>{if(!ne)return;const ze=Y.current;if(!ze)return;const He=ft=>{const Tt=Yy({deltaX:ft.deltaX,deltaY:ft.deltaY,mapVerticalWheelToHorizontal:oe});if(Tt===null)return;const ot=ze.scrollWidth-ze.clientWidth;if(ot<=0)return;const X=ze.scrollLeft;if(!(Tt<0&&X<=0)&&!(Tt>0&&X>=ot-.5)){if(!oe){ft.stopPropagation();return}ft.preventDefault(),ze.scrollLeft=X+Tt}},Ze=oe?{passive:!1,capture:!0}:{passive:!0,capture:!0};return ze.addEventListener("wheel",He,Ze),()=>ze.removeEventListener("wheel",He,Ze)},[ne,oe]);const ee=k==="hover",[fe,J]=v.useState(!1);v.useLayoutEffect(()=>{ee&&J(H.current?.matches(":hover")??!1)},[ee]);const re=v.useCallback(ze=>{J(!0),z?.(ze)},[z]),Te=v.useCallback(ze=>{J(!1),U?.(ze)},[U]),Le=ee&&!fe&&!S;v.useEffect(()=>()=>{ve.current&&clearTimeout(ve.current),Re.current!==null&&(cancelAnimationFrame(Re.current),Re.current=null)},[]);const Ke={"--scroll-area-scroll-padding":`${$}px`,...F!==void 0?{"--scrollbar-inset":`${F}px`}:void 0},Qe=Xt({rootClass:"ui-scroll-area",stylexStyles:[bF(),c],className:rn(we&&"ui-scroll-area--masked",a),style:{height:n,maxHeight:r,width:s,...Ke,...y}}),gt=Xt({rootClass:"ui-scroll-area__viewport",stylexStyles:[yF({direction:T}),d],className:l,style:{...pF({block:ae?{topPx:R??jd,bottomPx:E??jd,topStartOpacity:_,bottomStartOpacity:C}:void 0,inline:ue?{startPx:D??jd,endPx:N??jd}:void 0}),...f?{overscrollBehavior:"auto"}:void 0}}),Je=Xt({rootClass:"ui-scroll-area__content",stylexStyles:[vF(T),h]}),xt=Xt({rootClass:"ui-scroll-area__scrollbar",stylexStyles:[jE({direction:T,orientation:"vertical",visibility:k}),m]}),Rt=zt(zE("vertical",Le)),rt=Xt({rootClass:"ui-scroll-area__scrollbar",stylexStyles:[jE({direction:T,orientation:"horizontal",visibility:k}),m]}),et=zt(zE("horizontal",Le));return g.jsxs("div",{ref:H,className:Qe.className,style:Qe.style,"data-scroll-padding":$,"data-visibility":k,"data-direction":T,...q,onPointerEnter:ee?re:z,onPointerLeave:ee?Te:U,children:[g.jsx("div",{ref:Y,className:gt.className,style:gt.style,"data-native-scrollbar":"none",children:g.jsx("div",{ref:O,className:Je.className,style:Je.style,children:t})}),b,se&&g.jsx("div",{ref:j,className:xt.className,style:xt.style,"data-orientation":"vertical","data-scrollable":"false",role:"presentation","aria-hidden":"true",children:g.jsx("div",{ref:V,className:Rt.className,style:Rt.style,"data-orientation":"vertical"})}),ne&&g.jsx("div",{ref:L,className:rt.className,style:rt.style,"data-orientation":"horizontal","data-scrollable":"false",role:"presentation","aria-hidden":"true",children:g.jsx("div",{ref:Z,className:et.className,style:et.style,"data-orientation":"horizontal"})})]})}),Bb={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 kF({children:e,hidden:t=!1,ref:n}){return g.jsx(Nl,{ref:n,"data-component":"list-popup-scroll",maxHeight:"none",rootStyle:[Bb.root,t&&Bb.rootHidden],viewportStyle:Bb.viewport,children:e})}const Fh="top",SF=300,Bh=100;function wF(e){const[t,n="center"]=e.split("-");return{side:t,align:n}}function EF(e){return typeof e=="number"?{sideOffset:e}:{sideOffset:e.mainAxis,alignOffset:e.alignmentAxis}}function TF(e,t){return{side:t,align:"shift",fallbackAxisSide:e?"none":"start"}}function Uh(e,t,n,r="flip"){const{side:s,align:a}=v.useMemo(()=>wF(e),[e]),{sideOffset:l,alignOffset:c}=v.useMemo(()=>EF(t),[t]),d=v.useMemo(()=>TF(n,r),[n,r]);return{side:s,align:a,sideOffset:l,alignOffset:c,collisionAvoidance:d,positionMethod:"fixed"}}const RF=v.forwardRef(function(t,n){const{render:r,className:s,id:a,name:l,value:c,disabled:d=!1,onValueChange:f,defaultValue:h,autoFocus:m=!1,style:b,...y}=t,{state:k,name:S,disabled:T,setTouched:R,setDirty:E,validityData:_,setFocused:C,setFilled:D,validationMode:N,validation:M}=Lh(),{clearErrors:B}=BA(),P=T||d,A=S??l,K={...k,disabled:P},{labelId:$}=w0(),F=T0({id:a});Fe(()=>{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);Fe(()=>{m&&z.current===mr(Kt(z.current))&&C(!0)},[m,C]);const[U]=Al({controlled:c,default:h,name:"FieldControl",state:"value"}),q=c!==void 0,W=q?U:void 0,H=We(()=>M.inputRef.current?.value);return FA(M.inputRef,F,W,H,!P,l),gn("input",t,{ref:[n,z],state:K,props:[{id:F,disabled:P,name:A,ref:M.inputRef,"aria-labelledby":$,autoFocus:m,...q?{value:W}:{defaultValue:h},onChange(O){const j=O.currentTarget.value;f?.(j,Ct(Oi,O.nativeEvent)),E(j!==_.initialValue),D(j!==""),O.nativeEvent.defaultPrevented||(B(A),M.change(j))},onFocus(){C(!0)},onBlur(O){R(!0),C(!1),N==="onBlur"&&M.commit(O.currentTarget.value)},onKeyDown(O){O.currentTarget.tagName==="INPUT"&&O.key==="Enter"&&(R(!0),M.commit(O.currentTarget.value))}},y,O=>M.getValidationProps(P,O)],stateAttributesMapping:Xc})}),CF=v.forwardRef(function(t,n){return g.jsx(RF,{ref:n,...t})});var _F=["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] *)"],Gp=_F.join(","),dN=typeof Element>"u",Ol=dN?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Wp=!dN&&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},Kp=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]"):Kp(t.parentNode));return l},AF=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},pN=function(t,n,r){if(Kp(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(Gp));return n&&Ol.call(t,Gp)&&s.unshift(t),s=s.filter(r),s},Yp=function(t,n,r){for(var s=[],a=Array.from(t);a.length;){var l=a.shift();if(!Kp(l,!1))if(l.tagName==="SLOT"){var c=l.assignedElements(),d=c.length?c:l.children,f=Yp(d,!0,r);r.flatten?s.push.apply(s,f):s.push({scopeParent:l,candidates:f})}else{var h=Ol.call(l,Gp);h&&r.filter(l)&&(n||!t.includes(l))&&s.push(l);var m=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),b=!Kp(m,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(m&&b){var y=Yp(m===!0?l.children:m.children,!0,r);r.flatten?s.push.apply(s,y):s.push({scopeParent:l,candidates:y})}else a.unshift.apply(a,l.children)}}return s},hN=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},mN=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||AF(t))&&!hN(t)?0:t.tabIndex},NF=function(t,n){var r=mN(t);return r<0&&n&&!hN(t)?0:r},OF=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},gN=function(t){return t.tagName==="INPUT"},IF=function(t){return gN(t)&&t.type==="hidden"},MF=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},DF=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},LF=function(t){if(!t.name)return!0;var n=t.form||Wp(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=DF(s,t.form);return!a||a===t},jF=function(t){return gN(t)&&t.type==="radio"},zF=function(t){return jF(t)&&!LF(t)},PF=function(t){var n,r=t&&Wp(t),s=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var l,c,d;for(a=!!((l=s)!==null&&l!==void 0&&(c=l.ownerDocument)!==null&&c!==void 0&&c.contains(s)||t!=null&&(d=t.ownerDocument)!==null&&d!==void 0&&d.contains(t));!a&&s;){var f,h,m;r=Wp(s),s=(f=r)===null||f===void 0?void 0:f.host,a=!!((h=s)!==null&&h!==void 0&&(m=h.ownerDocument)!==null&&m!==void 0&&m.contains(s))}}return a},PE=function(t){var n=t.getBoundingClientRect(),r=n.width,s=n.height;return r===0&&s===0},$F=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 d=t;t;){var f=t.parentElement,h=Wp(t);if(f&&!f.shadowRoot&&s(f)===!0)return PE(t);t.assignedSlot?t=t.assignedSlot:!f&&h!==t.ownerDocument?t=h.host:t=f}t=d}if(PF(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return PE(t);return!1},FF=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},Xy=function(t,n){return!(n.disabled||IF(n)||$F(n,t)||MF(n)||FF(n))},Zy=function(t,n){return!(zF(n)||mN(n)<0||!Xy(t,n))},BF=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},bN=function(t){var n=[],r=[];return t.forEach(function(s,a){var l=!!s.scopeParent,c=l?s.scopeParent:s,d=NF(c,l),f=l?bN(s.candidates):c;d===0?l?n.push.apply(n,f):n.push(c):r.push({documentOrder:a,tabIndex:d,item:s,isScope:l,content:f})}),r.sort(OF).reduce(function(s,a){return a.isScope?s.push.apply(s,a.content):s.push(a.content),s},[]).concat(n)},Hh=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Yp([t],n.includeContainer,{filter:Zy.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:BF}):r=pN(t,n.includeContainer,Zy.bind(null,n)),bN(r)},UF=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Yp([t],n.includeContainer,{filter:Xy.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=pN(t,n.includeContainer,Xy.bind(null,n)),r},yN=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Ol.call(t,Gp)===!1?!1:Zy(n,t)};function HF(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function vN(){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 qF(){return/apple/i.test(navigator.vendor)}function Qy(){const e=/android/i;return e.test(HF())||e.test(vN())}function VF(){return vN().includes("jsdom/")}const $E="data-floating-ui-focusable",GF="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Ub="ArrowLeft",Hb="ArrowRight",WF="ArrowUp",KF="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 wr(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 qb(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 YF(e){return e.matches("html,body")}function gr(e){return e?.ownerDocument||document}function xN(e){return Bt(e)&&e.matches(GF)}function Jy(e){return e?e.getAttribute("role")==="combobox"&&xN(e):!1}function Xp(e){return e?e.hasAttribute($E)?e:e.querySelector("["+$E+"]")||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 XF(e,t){let n,r=-1;function s(a,l){l>r&&(n=a,r=l),na(e,a).forEach(d=>{s(d.id,l+1)})}return s(t,0),e.find(a=>a.id===n)}function FE(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 ur(e){e.preventDefault(),e.stopPropagation()}function ZF(e){return"nativeEvent"in e}function kN(e){return e.mozInputSource===0&&e.isTrusted?!0:Qy()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function SN(e){return VF()?!1:!Qy()&&e.width===0&&e.height===0||Qy()&&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 Rc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var QF=typeof document<"u",JF=function(){},hn=QF?v.useLayoutEffect:JF;const e5={...Bv};function rr(e){const t=v.useRef(e);return hn(()=>{t.current=e}),t}const t5=e5.useInsertionEffect,n5=t5||(e=>e());function $n(e){const t=v.useRef(()=>{});return n5(()=>{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 Pd(e,t,n){return Math.floor(e/t)!==n}function mc(e,t){return t<0||t>=e.current.length}function Vb(e,t){return hr(e,{disabledIndices:t})}function BE(e,t){return hr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function hr(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&&Sp(e,l,s));return l}function r5(e,t){let{event:n,orientation:r,loop:s,rtl:a,cols:l,disabledIndices:c,minIndex:d,maxIndex:f,prevIndex:h,stopEvent:m=!1}=t,b=h;if(n.key===WF){if(m&&ur(n),h===-1)b=f;else if(b=hr(e,{startingIndex:b,amount:l,decrement:!0,disabledIndices:c}),s&&(h-l<d||b<0)){const y=h%l,k=f%l,S=f-(k-y);k===y?b=f:b=k>y?S:S-l}mc(e,b)&&(b=h)}if(n.key===KF&&(m&&ur(n),h===-1?b=d:(b=hr(e,{startingIndex:h,amount:l,disabledIndices:c}),s&&h+l>f&&(b=hr(e,{startingIndex:h%l-l,amount:l,disabledIndices:c}))),mc(e,b)&&(b=h)),r==="both"){const y=bl(h/l);n.key===(a?Ub:Hb)&&(m&&ur(n),h%l!==l-1?(b=hr(e,{startingIndex:h,disabledIndices:c}),s&&Pd(b,l,y)&&(b=hr(e,{startingIndex:h-h%l-1,disabledIndices:c}))):s&&(b=hr(e,{startingIndex:h-h%l-1,disabledIndices:c})),Pd(b,l,y)&&(b=h)),n.key===(a?Hb:Ub)&&(m&&ur(n),h%l!==0?(b=hr(e,{startingIndex:h,decrement:!0,disabledIndices:c}),s&&Pd(b,l,y)&&(b=hr(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c}))):s&&(b=hr(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c})),Pd(b,l,y)&&(b=h));const k=bl(f/l)===y;mc(e,b)&&(s&&k?b=n.key===(a?Hb:Ub)?f:hr(e,{startingIndex:h-h%l-1,disabledIndices:c}):b=h)}return b}function i5(e,t,n){const r=[];let s=0;return e.forEach((a,l)=>{let{width:c,height:d}=a,f=!1;for(n&&(s=0);!f;){const h=[];for(let m=0;m<c;m++)for(let b=0;b<d;b++)h.push(s+m+b*t);s%t+c<=t&&h.every(m=>r[m]==null)?(h.forEach(m=>{r[m]=l}),f=!0):s++}}),[...r]}function s5(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 o5(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Sp(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 Zc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function wN(e,t){const n=Hh(e,Zc()),r=n.length;if(r===0)return;const s=po(gr(e)),a=n.indexOf(s),l=a===-1?t===1?0:r-1:a+t;return n[l]}function EN(e){return wN(gr(e).body,1)||e}function TN(e){return wN(gr(e).body,-1)||e}function gc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!wr(n,r)}function a5(e){Hh(e,Zc()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function UE(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 Qc(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 l5(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 RN=v.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function CN(e){const{children:t,elementsRef:n,labelsRef:r}=e,[s,a]=v.useState(()=>new Set),l=v.useCallback(f=>{a(h=>new Set(h).add(f))},[]),c=v.useCallback(f=>{a(h=>{const m=new Set(h);return m.delete(f),m})},[]),d=v.useMemo(()=>{const f=new Map;return Array.from(s.keys()).sort(l5).forEach((m,b)=>{f.set(m,b)}),f},[s]);return g.jsx(RN.Provider,{value:v.useMemo(()=>({register:l,unregister:c,map:d,elementsRef:n,labelsRef:r}),[l,c,d,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(RN),[c,d]=v.useState(null),f=v.useRef(null),h=v.useCallback(m=>{if(f.current=m,c!==null&&(a.current[c]=m,l)){var b;const y=t!==void 0;l.current[c]=y?t:(b=m?.textContent)!=null?b:null}},[c,a,l,t]);return hn(()=>{const m=f.current;if(m)return n(m),()=>{r(m)}},[n,r]),hn(()=>{const m=f.current?s.get(f.current):null;m!=null&&d(m)},[s]),v.useMemo(()=>({ref:h,index:c??-1}),[c,h])}const u5="data-floating-ui-focusable",HE="active",qE="selected",Jc="ArrowLeft",ef="ArrowRight",_N="ArrowUp",Vh="ArrowDown",c5={...Bv};let VE=!1,f5=0;const GE=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+f5++;function d5(){const[e,t]=v.useState(()=>VE?GE():void 0);return hn(()=>{e==null&&t(GE())},[]),v.useEffect(()=>{VE=!0},[]),e}const p5=c5.useId,Gh=p5||d5;function AN(){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 NN=v.createContext(null),ON=v.createContext(null),Ao=()=>{var e;return((e=v.useContext(NN))==null?void 0:e.id)||null},No=()=>v.useContext(ON);function N0(e){const t=Gh(),n=No(),s=Ao();return hn(()=>{if(!t)return;const a={id:t,parentId:s};return n?.addNode(a),()=>{n?.removeNode(a)}},[n,t,s]),t}function O0(e){const{children:t,id:n}=e,r=Ao();return g.jsx(NN.Provider,{value:v.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function h5(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(()=>AN());return g.jsx(ON.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 pr(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const WE=Il("safe-polygon");function Gb(e,t,n){if(n&&!Rc(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 Wb(e){return typeof e=="function"?e():e}function IN(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,events:a,elements:l}=e,{enabled:c=!0,delay:d=0,handleClose:f=null,mouseOnly:h=!1,restMs:m=0,move:b=!0}=t,y=No(),k=Ao(),S=rr(f),T=rr(d),R=rr(n),E=rr(m),_=v.useRef(),C=v.useRef(-1),D=v.useRef(),N=v.useRef(-1),M=v.useRef(!0),B=v.useRef(!1),P=v.useRef(()=>{}),A=v.useRef(!1),K=$n(()=>{var W;const H=(W=s.current.openEvent)==null?void 0:W.type;return H?.includes("mouse")&&H!=="mousedown"});v.useEffect(()=>{if(!c)return;function W(H){let{open:Y}=H;Y||(pr(C),pr(N),M.current=!0,A.current=!1)}return a.on("openchange",W),()=>{a.off("openchange",W)}},[c,a]),v.useEffect(()=>{if(!c||!S.current||!n)return;function W(Y){K()&&r(!1,Y,"hover")}const H=gr(l.floating).documentElement;return H.addEventListener("mouseleave",W),()=>{H.removeEventListener("mouseleave",W)}},[l.floating,n,r,c,S,K]);const $=v.useCallback(function(W,H,Y){H===void 0&&(H=!0),Y===void 0&&(Y="hover");const O=Gb(T.current,"close",_.current);O&&!D.current?(pr(C),C.current=window.setTimeout(()=>r(!1,W,Y),O)):H&&(pr(C),r(!1,W,Y))},[T,r]),F=$n(()=>{P.current(),D.current=void 0}),z=$n(()=>{if(B.current){const W=gr(l.floating).body;W.style.pointerEvents="",W.removeAttribute(WE),B.current=!1}}),U=$n(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);v.useEffect(()=>{if(!c)return;function W(V){if(pr(C),M.current=!1,h&&!Rc(_.current)||Wb(E.current)>0&&!Gb(T.current,"open"))return;const L=Gb(T.current,"open",_.current);L?C.current=window.setTimeout(()=>{R.current||r(!0,V,"hover")},L):n||r(!0,V,"hover")}function H(V){if(U()){z();return}P.current();const L=gr(l.floating);if(pr(N),A.current=!1,S.current&&s.current.floatingContext){n||pr(C),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}(_.current!=="touch"||!wr(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(){pr(C)}function j(V){U()||$(V,!1)}if(vt(l.domReference)){const V=l.domReference,L=l.floating;return n&&V.addEventListener("mouseleave",Y),b&&V.addEventListener("mousemove",W,{once:!0}),V.addEventListener("mouseenter",W),V.addEventListener("mouseleave",H),L&&(L.addEventListener("mouseleave",Y),L.addEventListener("mouseenter",O),L.addEventListener("mouseleave",j)),()=>{n&&V.removeEventListener("mouseleave",Y),b&&V.removeEventListener("mousemove",W),V.removeEventListener("mouseenter",W),V.removeEventListener("mouseleave",H),L&&(L.removeEventListener("mouseleave",Y),L.removeEventListener("mouseenter",O),L.removeEventListener("mouseleave",j))}}},[l,c,e,h,b,$,F,z,r,n,R,y,T,S,s,U,E]),hn(()=>{var W;if(c&&n&&(W=S.current)!=null&&(W=W.__options)!=null&&W.blockPointerEvents&&K()){B.current=!0;const Y=l.floating;if(vt(l.domReference)&&Y){var H;const O=gr(l.floating).body;O.setAttribute(WE,"");const j=l.domReference,V=y==null||(H=y.nodesRef.current.find(L=>L.id===k))==null||(H=H.context)==null?void 0:H.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,K]),hn(()=>{n||(_.current=void 0,A.current=!1,F(),z())},[n,F,z]),v.useEffect(()=>()=>{F(),pr(C),pr(N),z()},[c,l.domReference,F,z]);const q=v.useMemo(()=>{function W(H){_.current=H.pointerType}return{onPointerDown:W,onPointerEnter:W,onMouseMove(H){const{nativeEvent:Y}=H;function O(){!M.current&&!R.current&&r(!0,Y,"hover")}h&&!Rc(_.current)||n||Wb(E.current)===0||A.current&&H.movementX**2+H.movementY**2<2||(pr(N),_.current==="touch"?O():(A.current=!0,N.current=window.setTimeout(O,Wb(E.current))))}}},[h,r,n,R,E]);return v.useMemo(()=>c?{reference:q}:{},[c,q])}let KE=0;function ea(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=t;r&&cancelAnimationFrame(KE);const a=()=>e?.focus({preventScroll:n});s?a():KE=requestAnimationFrame(a)}function Kb(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 m5(e){return"composedPath"in e?e.composedPath()[0]:e.target}function g5(e){return e?.ownerDocument||document}const kl={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function YE(e){return e==="inert"?kl.inert:e==="aria-hidden"?kl["aria-hidden"]:kl.none}let $d=new WeakSet,Fd={},Yb=0;const b5=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,MN=e=>e&&(e.host||MN(e.parentNode)),y5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=MN(n);return e.contains(r)?r:null}).filter(n=>n!=null);function v5(e,t,n,r){const s="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,l=y5(t,e),c=new Set,d=new Set(l),f=[];Fd[s]||(Fd[s]=new WeakMap);const h=Fd[s];l.forEach(m),b(t),c.clear();function m(y){!y||c.has(y)||(c.add(y),y.parentNode&&m(y.parentNode))}function b(y){!y||d.has(y)||[].forEach.call(y.children,k=>{if(er(k)!=="script")if(c.has(k))b(k);else{const S=a?k.getAttribute(a):null,T=S!==null&&S!=="false",R=YE(a),E=(R.get(k)||0)+1,_=(h.get(k)||0)+1;R.set(k,E),h.set(k,_),f.push(k),E===1&&T&&$d.add(k),_===1&&k.setAttribute(s,""),!T&&a&&k.setAttribute(a,a==="inert"?"":"true")}})}return Yb++,()=>{f.forEach(y=>{const k=YE(a),T=(k.get(y)||0)-1,R=(h.get(y)||0)-1;k.set(y,T),h.set(y,R),T||(!$d.has(y)&&a&&y.removeAttribute(a),$d.delete(y)),R||y.removeAttribute(s)}),Yb--,Yb||(kl.inert=new WeakMap,kl["aria-hidden"]=new WeakMap,kl.none=new WeakMap,$d=new WeakSet,Fd={})}}function XE(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=g5(e[0]).body;return v5(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const Wh={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},Zp=v.forwardRef(function(t,n){const[r,s]=v.useState();hn(()=>{qF()&&s("button")},[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Il("focus-guard")]:"",style:Wh};return g.jsx("span",{...t,...a})}),DN=v.createContext(null),ZE=Il("portal");function x5(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Gh(),s=LN(),[a,l]=v.useState(null),c=v.useRef(null);return hn(()=>()=>{a?.remove(),queueMicrotask(()=>{c.current=null})},[a]),hn(()=>{if(!r||c.current)return;const d=t?document.getElementById(t):null;if(!d)return;const f=document.createElement("div");f.id=r,f.setAttribute(ZE,""),d.appendChild(f),c.current=f,l(f)},[t,r]),hn(()=>{if(n===null||!r||c.current)return;let d=n||s?.portalNode;d&&!gh(d)&&(d=d.current),d=d||document.body;let f=null;t&&(f=document.createElement("div"),f.id=t,d.appendChild(f));const h=document.createElement("div");h.id=r,h.setAttribute(ZE,""),d=f||d,d.appendChild(h),c.current=h,l(h)},[t,n,r,s]),a}function I0(e){const{children:t,id:n,root:r,preserveTabOrder:s=!0}=e,a=x5({id:n,root:r}),[l,c]=v.useState(null),d=v.useRef(null),f=v.useRef(null),h=v.useRef(null),m=v.useRef(null),b=l?.modal,y=l?.open,k=!!l&&!l.modal&&l.open&&s&&!!(r||a);return v.useEffect(()=>{if(!a||!s||b)return;function S(T){a&&gc(T)&&(T.type==="focusin"?UE:a5)(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||UE(a))},[y,a]),g.jsxs(DN.Provider,{value:v.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:h,afterInsideRef:m,portalNode:a,setFocusManagerState:c}),[s,a]),children:[k&&a&&g.jsx(Zp,{"data-type":"outside",ref:d,onFocus:S=>{if(gc(S,a)){var T;(T=h.current)==null||T.focus()}else{const R=l?l.domReference:null,E=TN(R);E?.focus()}}}),k&&a&&g.jsx("span",{"aria-owns":a.id,style:Wh}),a&&Di.createPortal(t,a),k&&a&&g.jsx(Zp,{"data-type":"outside",ref:f,onFocus:S=>{if(gc(S,a)){var T;(T=m.current)==null||T.focus()}else{const R=l?l.domReference:null,E=EN(R);E?.focus(),l?.closeOnFocusOut&&l?.onOpenChange(!1,S.nativeEvent,"focus-out")}}})]})}const LN=()=>v.useContext(DN);function QE(e){return v.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const k5=20;let go=[];function M0(){go=go.filter(e=>e.isConnected)}function S5(e){M0(),e&&er(e)!=="body"&&(go.push(e),go.length>k5&&(go=go.slice(-20)))}function JE(){return M0(),go[go.length-1]}function w5(e){const t=Zc();return yN(e,t)?e:Hh(e,t)[0]||e}function eT(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Zc(),a=UF(e,r).filter(c=>{const d=c.getAttribute("data-tabindex")||"";return yN(c,r)||c.hasAttribute("data-tabindex")&&!d.startsWith("-")}),l=e.getAttribute("tabindex");t.current.includes("floating")||a.length===0?l!=="0"&&e.setAttribute("tabindex","0"):(l!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const E5=v.forwardRef(function(t,n){return g.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:Wh})});function D0(e){const{context:t,children:n,disabled:r=!1,order:s=["content"],guards:a=!0,initialFocus:l=0,returnFocus:c=!0,restoreFocus:d=!1,modal:f=!0,visuallyHiddenDismiss:h=!1,closeOnFocusOut:m=!0,outsideElementsInert:b=!1,getInsideElements:y=()=>[]}=e,{open:k,onOpenChange:S,events:T,dataRef:R,elements:{domReference:E,floating:_}}=t,C=$n(()=>{var ce;return(ce=R.current.floatingContext)==null?void 0:ce.nodeId}),D=$n(y),N=typeof l=="number"&&l<0,M=Jy(E)&&N,B=b5(),P=B?a:!0,A=!P||B&&b,K=rr(s),$=rr(l),F=rr(c),z=No(),U=LN(),q=v.useRef(null),W=v.useRef(null),H=v.useRef(!1),Y=v.useRef(!1),O=v.useRef(-1),j=v.useRef(-1),V=U!=null,L=Xp(_),Z=$n(function(ce){return ce===void 0&&(ce=L),ce?Hh(ce,Zc()):[]}),se=$n(ce=>{const be=Z(ce);return K.current.map(ve=>E&&ve==="reference"?E:L&&ve==="floating"?L:be).filter(Boolean).flat()});v.useEffect(()=>{if(r||!f)return;function ce(ve){if(ve.key==="Tab"){wr(L,po(gr(L)))&&Z().length===0&&!M&&ur(ve);const Re=se(),Se=ho(ve);K.current[0]==="reference"&&Se===E&&(ur(ve),ve.shiftKey?ea(Re[Re.length-1]):ea(Re[1])),K.current[1]==="floating"&&Se===L&&ve.shiftKey&&(ur(ve),ea(Re[0]))}}const be=gr(L);return be.addEventListener("keydown",ce),()=>{be.removeEventListener("keydown",ce)}},[r,E,L,f,K,M,Z,se]),v.useEffect(()=>{if(r||!_)return;function ce(be){const ve=ho(be),Se=Z().indexOf(ve);Se!==-1&&(O.current=Se)}return _.addEventListener("focusin",ce),()=>{_.removeEventListener("focusin",ce)}},[r,_,Z]),v.useEffect(()=>{if(r||!m)return;function ce(){Y.current=!0,setTimeout(()=>{Y.current=!1})}function be(Se){const ke=Se.relatedTarget,Ae=Se.currentTarget,Oe=ho(Se);queueMicrotask(()=>{const Me=C(),Ue=!(wr(E,ke)||wr(_,ke)||wr(ke,_)||wr(U?.portalNode,ke)||ke!=null&&ke.hasAttribute(Il("focus-guard"))||z&&(na(z.nodesRef.current,Me).find(xe=>{var _e,ee;return wr((_e=xe.context)==null?void 0:_e.elements.floating,ke)||wr((ee=xe.context)==null?void 0:ee.elements.domReference,ke)})||FE(z.nodesRef.current,Me).find(xe=>{var _e,ee,fe;return[(_e=xe.context)==null?void 0:_e.elements.floating,Xp((ee=xe.context)==null?void 0:ee.elements.floating)].includes(ke)||((fe=xe.context)==null?void 0:fe.elements.domReference)===ke})));if(Ae===E&&L&&eT(L,K),d&&Ae!==E&&!(Oe!=null&&Oe.isConnected)&&po(gr(L))===gr(L).body){Bt(L)&&L.focus();const xe=O.current,_e=Z(),ee=_e[xe]||_e[_e.length-1]||L;Bt(ee)&&ee.focus()}if(R.current.insideReactTree){R.current.insideReactTree=!1;return}(M||!f)&&ke&&Ue&&!Y.current&&ke!==JE()&&(H.current=!0,S(!1,Se,"focus-out"))})}const ve=!!(!z&&U);function Re(){pr(j),R.current.insideReactTree=!0,j.current=window.setTimeout(()=>{R.current.insideReactTree=!1})}if(_&&Bt(E))return E.addEventListener("focusout",be),E.addEventListener("pointerdown",ce),_.addEventListener("focusout",be),ve&&_.addEventListener("focusout",Re,!0),()=>{E.removeEventListener("focusout",be),E.removeEventListener("pointerdown",ce),_.removeEventListener("focusout",be),ve&&_.removeEventListener("focusout",Re,!0)}},[r,E,_,L,f,z,U,S,m,d,Z,M,C,K,R]);const ne=v.useRef(null),oe=v.useRef(null),ae=QE([ne,U?.beforeInsideRef]),ue=QE([oe,U?.afterInsideRef]);v.useEffect(()=>{var ce,be;if(r||!_)return;const ve=Array.from((U==null||(ce=U.portalNode)==null?void 0:ce.querySelectorAll("["+Il("portal")+"]"))||[]),Se=(be=(z?FE(z.nodesRef.current,C()):[]).find(Oe=>{var Me;return Jy(((Me=Oe.context)==null?void 0:Me.elements.domReference)||null)}))==null||(be=be.context)==null?void 0:be.elements.domReference,ke=[_,Se,...ve,...D(),q.current,W.current,ne.current,oe.current,U?.beforeOutsideRef.current,U?.afterOutsideRef.current,K.current.includes("reference")||M?E:null].filter(Oe=>Oe!=null),Ae=f||M?XE(ke,!A,A):XE(ke);return()=>{Ae()}},[r,E,_,f,K,U,M,P,A,z,C,D]),hn(()=>{if(r||!Bt(L))return;const ce=gr(L),be=po(ce);queueMicrotask(()=>{const ve=se(L),Re=$.current,Se=(typeof Re=="number"?ve[Re]:Re.current)||L,ke=wr(L,be);!N&&!ke&&k&&ea(Se,{preventScroll:Se===L})})},[r,k,L,N,se,$]),hn(()=>{if(r||!L)return;const ce=gr(L),be=po(ce);S5(be);function ve(ke){let{reason:Ae,event:Oe,nested:Me}=ke;if(["hover","safe-polygon"].includes(Ae)&&Oe.type==="mouseleave"&&(H.current=!0),Ae==="outside-press")if(Me)H.current=!1;else if(kN(Oe)||SN(Oe))H.current=!1;else{let Ue=!1;document.createElement("div").focus({get preventScroll(){return Ue=!0,!1}}),Ue?H.current=!1:H.current=!0}}T.on("openchange",ve);const Re=ce.createElement("span");Re.setAttribute("tabindex","-1"),Re.setAttribute("aria-hidden","true"),Object.assign(Re.style,Wh),V&&E&&E.insertAdjacentElement("afterend",Re);function Se(){if(typeof F.current=="boolean"){const ke=E||JE();return ke&&ke.isConnected?ke:Re}return F.current.current||Re}return()=>{T.off("openchange",ve);const ke=po(ce),Ae=wr(_,ke)||z&&na(z.nodesRef.current,C(),!1).some(Me=>{var Ue;return wr((Ue=Me.context)==null?void 0:Ue.elements.floating,ke)}),Oe=Se();queueMicrotask(()=>{const Me=w5(Oe);F.current&&!H.current&&Bt(Me)&&(!(Me!==ke&&ke!==ce.body)||Ae)&&Me.focus({preventScroll:!0}),Re.remove()})}},[r,_,L,F,R,T,z,V,E,C]),v.useEffect(()=>(queueMicrotask(()=>{H.current=!1}),()=>{queueMicrotask(M0)}),[r]),hn(()=>{if(!r&&U)return U.setFocusManagerState({modal:f,closeOnFocusOut:m,open:k,onOpenChange:S,domReference:E}),()=>{U.setFocusManagerState(null)}},[r,U,f,k,S,m,E]),hn(()=>{r||L&&eT(L,K)},[r,L,K]);function we(ce){return r||!h||!f?null:g.jsx(E5,{ref:ce==="start"?q:W,onClick:be=>S(!1,be.nativeEvent),children:typeof h=="string"?h:"Dismiss"})}const me=!r&&P&&(f?!M:!0)&&(V||f);return g.jsxs(g.Fragment,{children:[me&&g.jsx(Zp,{"data-type":"inside",ref:ae,onFocus:ce=>{if(f){const ve=se();ea(s[0]==="reference"?ve[0]:ve[ve.length-1])}else if(U!=null&&U.preserveTabOrder&&U.portalNode)if(H.current=!1,gc(ce,U.portalNode)){const ve=EN(E);ve?.focus()}else{var be;(be=U.beforeOutsideRef.current)==null||be.focus()}}}),!M&&we("start"),n,we("end"),me&&g.jsx(Zp,{"data-type":"inside",ref:ue,onFocus:ce=>{if(f)ea(se()[0]);else if(U!=null&&U.preserveTabOrder&&U.portalNode)if(m&&(H.current=!0),gc(ce,U.portalNode)){const ve=TN(E);ve?.focus()}else{var be;(be=U.afterOutsideRef.current)==null||be.focus()}}})]})}function tT(e){return Bt(e.target)&&e.target.tagName==="BUTTON"}function T5(e){return Bt(e.target)&&e.target.tagName==="A"}function nT(e){return xN(e)}function jN(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,elements:{domReference:a}}=e,{enabled:l=!0,event:c="click",toggle:d=!0,ignoreMouse:f=!1,keyboardHandlers:h=!0,stickIfOpen:m=!0}=t,b=v.useRef(),y=v.useRef(!1),k=v.useMemo(()=>({onPointerDown(S){b.current=S.pointerType},onMouseDown(S){const T=b.current;S.button===0&&c!=="click"&&(Rc(T,!0)&&f||(n&&d&&(!(s.current.openEvent&&m)||s.current.openEvent.type==="mousedown")?r(!1,S.nativeEvent,"click"):(S.preventDefault(),r(!0,S.nativeEvent,"click"))))},onClick(S){const T=b.current;if(c==="mousedown"&&b.current){b.current=void 0;return}Rc(T,!0)&&f||(n&&d&&(!(s.current.openEvent&&m)||s.current.openEvent.type==="click")?r(!1,S.nativeEvent,"click"):r(!0,S.nativeEvent,"click"))},onKeyDown(S){b.current=void 0,!(S.defaultPrevented||!h||tT(S))&&(S.key===" "&&!nT(a)&&(S.preventDefault(),y.current=!0),!T5(S)&&S.key==="Enter"&&r(!(n&&d),S.nativeEvent,"click"))},onKeyUp(S){S.defaultPrevented||!h||tT(S)||nT(a)||S.key===" "&&y.current&&(y.current=!1,r(!(n&&d),S.nativeEvent,"click"))}}),[s,a,c,f,h,r,n,m,d]);return v.useMemo(()=>l?{reference:k}:{},[l,k])}const R5={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},C5={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},rT=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 zN(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:s,dataRef:a}=e,{enabled:l=!0,escapeKey:c=!0,outsidePress:d=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:b=!1,bubbles:y,capture:k}=t,S=No(),T=$n(typeof d=="function"?d:()=>!1),R=typeof d=="function"?T:d,E=v.useRef(!1),{escapeKey:_,outsidePress:C}=rT(y),{escapeKey:D,outsidePress:N}=rT(k),M=v.useRef(!1),B=$n(z=>{var U;if(!n||!l||!c||z.key!=="Escape"||M.current)return;const q=(U=a.current.floatingContext)==null?void 0:U.nodeId,W=S?na(S.nodesRef.current,q):[];if(!_&&(z.stopPropagation(),W.length>0)){let H=!0;if(W.forEach(Y=>{var O;if((O=Y.context)!=null&&O.open&&!Y.context.dataRef.current.__escapeKeyBubbles){H=!1;return}}),!H)return}r(!1,ZF(z)?z.nativeEvent:z,"escape-key")}),P=$n(z=>{var U;const q=()=>{var W;B(z),(W=ho(z))==null||W.removeEventListener("keydown",q)};(U=ho(z))==null||U.addEventListener("keydown",q)}),A=$n(z=>{var U;const q=a.current.insideReactTree;a.current.insideReactTree=!1;const W=E.current;if(E.current=!1,f==="click"&&W||q||typeof R=="function"&&!R(z))return;const H=ho(z),Y="["+Il("inert")+"]",O=gr(s.floating).querySelectorAll(Y);let j=vt(H)?H:null;for(;j&&!Ai(j);){const se=_s(j);if(Ai(se)||!vt(se))break;j=se}if(O.length&&vt(H)&&!YF(H)&&!wr(H,s.floating)&&Array.from(O).every(se=>!wr(j,se)))return;if(Bt(H)&&F){const se=Ai(H),ne=_r(H),oe=/auto|scroll/,ae=se||oe.test(ne.overflowX),ue=se||oe.test(ne.overflowY),we=ae&&H.clientWidth>0&&H.scrollWidth>H.clientWidth,me=ue&&H.clientHeight>0&&H.scrollHeight>H.clientHeight,ce=ne.direction==="rtl",be=me&&(ce?z.offsetX<=H.offsetWidth-H.clientWidth:z.offsetX>H.clientWidth),ve=we&&z.offsetY>H.clientHeight;if(be||ve)return}const V=(U=a.current.floatingContext)==null?void 0:U.nodeId,L=S&&na(S.nodesRef.current,V).some(se=>{var ne;return qb(z,(ne=se.context)==null?void 0:ne.elements.floating)});if(qb(z,s.floating)||qb(z,s.domReference)||L)return;const Z=S?na(S.nodesRef.current,V):[];if(Z.length>0){let se=!0;if(Z.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")}),K=$n(z=>{var U;const q=()=>{var W;A(z),(W=ho(z))==null||W.removeEventListener(f,q)};(U=ho(z))==null||U.addEventListener(f,q)});v.useEffect(()=>{if(!n||!l)return;a.current.__escapeKeyBubbles=_,a.current.__outsidePressBubbles=C;let z=-1;function U(O){r(!1,O,"ancestor-scroll")}function q(){window.clearTimeout(z),M.current=!0}function W(){z=window.setTimeout(()=>{M.current=!1},yh()?5:0)}const H=gr(s.floating);c&&(H.addEventListener("keydown",D?P:B,D),H.addEventListener("compositionstart",q),H.addEventListener("compositionend",W)),R&&H.addEventListener(f,N?K:A,N);let Y=[];return b&&(vt(s.domReference)&&(Y=bo(s.domReference)),vt(s.floating)&&(Y=Y.concat(bo(s.floating))),!vt(s.reference)&&s.reference&&s.reference.contextElement&&(Y=Y.concat(bo(s.reference.contextElement)))),Y=Y.filter(O=>{var j;return O!==((j=H.defaultView)==null?void 0:j.visualViewport)}),Y.forEach(O=>{O.addEventListener("scroll",U,{passive:!0})}),()=>{c&&(H.removeEventListener("keydown",D?P:B,D),H.removeEventListener("compositionstart",q),H.removeEventListener("compositionend",W)),R&&H.removeEventListener(f,N?K:A,N),Y.forEach(O=>{O.removeEventListener("scroll",U)}),window.clearTimeout(z)}},[a,s,c,R,f,n,r,b,l,_,C,B,D,P,A,N,K]),v.useEffect(()=>{a.current.insideReactTree=!1},[a,R,f]);const $=v.useMemo(()=>({onKeyDown:B,...h&&{[R5[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},[C5[f]]:()=>{a.current.insideReactTree=!0}}),[B,f,a]);return v.useMemo(()=>l?{reference:$,floating:F}:{},[l,$,F])}function _5(e){const{open:t=!1,onOpenChange:n,elements:r}=e,s=Gh(),a=v.useRef({}),[l]=v.useState(()=>AN()),c=Ao()!=null,[d,f]=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:f}),[]),b=v.useMemo(()=>({reference:d||r.reference||null,floating:r.floating||null,domReference:r.reference}),[d,r.reference,r.floating]);return v.useMemo(()=>({dataRef:a,open:t,onOpenChange:h,elements:b,events:l,floatingId:s,refs:m}),[t,h,b,l,s,m])}function L0(e){e===void 0&&(e={});const{nodeId:t}=e,n=_5({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,s=r.elements,[a,l]=v.useState(null),[c,d]=v.useState(null),h=s?.domReference||a,m=v.useRef(null),b=No();hn(()=>{h&&(m.current=h)},[h]);const y=X_({...e,elements:{...s,...c&&{reference:c}}}),k=v.useCallback(_=>{const C=vt(_)?{getBoundingClientRect:()=>_.getBoundingClientRect(),getClientRects:()=>_.getClientRects(),contextElement:_}:_;d(C),y.refs.setReference(C)},[y.refs]),S=v.useCallback(_=>{(vt(_)||_===null)&&(m.current=_,l(_)),(vt(y.refs.reference.current)||y.refs.reference.current===null||_!==null&&!vt(_))&&y.refs.setReference(_)},[y.refs]),T=v.useMemo(()=>({...y.refs,setReference:S,setPositionReference:k,domReference:m}),[y.refs,S,k]),R=v.useMemo(()=>({...y.elements,domReference:h}),[y.elements,h]),E=v.useMemo(()=>({...y,...r,refs:T,elements:R,nodeId:t}),[y,T,R,t,r]);return hn(()=>{r.dataRef.current.floatingContext=E;const _=b?.nodesRef.current.find(C=>C.id===t);_&&(_.context=E)}),v.useMemo(()=>({...y,context:E,refs:T,elements:R}),[y,T,R,E])}function Xb(e,t,n){const r=new Map,s=n==="item";let a=e;if(s&&e){const{[HE]:l,[qE]:c,...d}=e;a=d}return{...n==="floating"&&{tabIndex:-1,[u5]:""},...a,...t.map(l=>{const c=l?l[n]:null;return typeof c=="function"?e?c(e):null:c}).concat(e).reduce((l,c)=>(c&&Object.entries(c).forEach(d=>{let[f,h]=d;if(!(s&&[HE,qE].includes(f)))if(f.indexOf("on")===0){if(r.has(f)||r.set(f,[]),typeof h=="function"){var m;(m=r.get(f))==null||m.push(h),l[f]=function(){for(var b,y=arguments.length,k=new Array(y),S=0;S<y;S++)k[S]=arguments[S];return(b=r.get(f))==null?void 0:b.map(T=>T(...k)).find(T=>T!==void 0)}}}else l[f]=h}),l),{})}}function PN(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=>Xb(c,e,"reference"),t),a=v.useCallback(c=>Xb(c,e,"floating"),n),l=v.useCallback(c=>Xb(c,e,"item"),r);return v.useMemo(()=>({getReferenceProps:s,getFloatingProps:a,getItemProps:l}),[s,a,l])}const A5="Escape";function Kh(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Bd(e,t){return Kh(t,e===_N||e===Vh,e===Jc||e===ef)}function Zb(e,t,n){return Kh(t,e===Vh,n?e===Jc:e===ef)||e==="Enter"||e===" "||e===""}function iT(e,t,n){return Kh(t,n?e===Jc:e===ef,e===Vh)}function sT(e,t,n,r){const s=n?e===ef:e===Jc,a=e===_N;return t==="both"||t==="horizontal"&&r&&r>1?e===A5:Kh(t,s,a)}function $N(e,t){const{open:n,onOpenChange:r,elements:s,floatingId:a}=e,{listRef:l,activeIndex:c,onNavigate:d=()=>{},enabled:f=!0,selectedIndex:h=null,allowEscape:m=!1,loop:b=!1,nested:y=!1,rtl:k=!1,virtual:S=!1,focusItemOnOpen:T="auto",focusItemOnHover:R=!0,openOnArrowKeyDown:E=!0,disabledIndices:_=void 0,orientation:C="vertical",parentOrientation:D,cols:N=1,scrollItemIntoView:M=!0,virtualItemRef:B,itemSizes:P,dense:A=!1}=t,K=Xp(s.floating),$=rr(K),F=Ao(),z=No();hn(()=>{e.dataRef.current.orientation=C},[e,C]);const U=$n(()=>{d(H.current===-1?null:H.current)}),q=Jy(s.domReference),W=v.useRef(T),H=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),Z=v.useRef(!1),se=v.useRef(!1),ne=rr(_),oe=rr(n),ae=rr(M),ue=rr(h),[we,me]=v.useState(),[ce,be]=v.useState(),ve=$n(()=>{function xe(J){if(S){var re;(re=J.id)!=null&&re.endsWith("-fui-option")&&(J.id=a+"-"+Math.random().toString(16).slice(2,10)),me(J.id),z?.events.emit("virtualfocus",J),B&&(B.current=J)}else ea(J,{sync:Z.current,preventScroll:!0})}const _e=l.current[H.current],ee=se.current;_e&&xe(_e),(Z.current?J=>J():requestAnimationFrame)(()=>{const J=l.current[H.current]||_e;if(!J)return;_e||xe(J);const re=ae.current;re&&Se&&(ee||!O.current)&&(J.scrollIntoView==null||J.scrollIntoView(typeof re=="boolean"?{block:"nearest",inline:"nearest"}:re))})});hn(()=>{f&&(n&&s.floating?W.current&&h!=null&&(se.current=!0,H.current=h,U()):V.current&&(H.current=-1,j.current()))},[f,n,s.floating,h,U]),hn(()=>{if(f&&n&&s.floating)if(c==null){if(Z.current=!1,ue.current!=null)return;if(V.current&&(H.current=-1,ve()),(!L.current||!V.current)&&W.current&&(Y.current!=null||W.current===!0&&Y.current==null)){let xe=0;const _e=()=>{l.current[0]==null?(xe<2&&(xe?requestAnimationFrame:queueMicrotask)(_e),xe++):(H.current=Y.current==null||Zb(Y.current,C,k)||y?Vb(l,ne.current):BE(l,ne.current),Y.current=null,U())};_e()}}else mc(l,c)||(H.current=c,ve(),se.current=!1)},[f,n,s.floating,c,ue,y,l,C,k,U,ve,ne]),hn(()=>{var xe;if(!f||s.floating||!z||S||!V.current)return;const _e=z.nodesRef.current,ee=(xe=_e.find(re=>re.id===F))==null||(xe=xe.context)==null?void 0:xe.elements.floating,fe=po(gr(s.floating)),J=_e.some(re=>re.context&&wr(re.context.elements.floating,fe));ee&&!J&&O.current&&ee.focus({preventScroll:!0})},[f,s.floating,z,F,S]),hn(()=>{if(!f||!z||!S||F)return;function xe(_e){be(_e.id),B&&(B.current=_e)}return z.events.on("virtualfocus",xe),()=>{z.events.off("virtualfocus",xe)}},[f,z,S,F,B]),hn(()=>{j.current=U,L.current=n,V.current=!!s.floating}),hn(()=>{n||(Y.current=null,W.current=T)},[n,T]);const Re=c!=null,Se=v.useMemo(()=>{function xe(ee){if(!oe.current)return;const fe=l.current.indexOf(ee);fe!==-1&&H.current!==fe&&(H.current=fe,U())}return{onFocus(ee){let{currentTarget:fe}=ee;Z.current=!0,xe(fe)},onClick:ee=>{let{currentTarget:fe}=ee;return fe.focus({preventScroll:!0})},onMouseMove(ee){let{currentTarget:fe}=ee;Z.current=!0,se.current=!1,R&&xe(fe)},onPointerLeave(ee){let{pointerType:fe}=ee;if(!(!O.current||fe==="touch")&&(Z.current=!0,!!R&&(H.current=-1,U(),!S))){var J;(J=$.current)==null||J.focus({preventScroll:!0})}}}},[oe,$,R,l,U,S]),ke=v.useCallback(()=>{var xe;return D??(z==null||(xe=z.nodesRef.current.find(_e=>_e.id===F))==null||(xe=xe.context)==null||(xe=xe.dataRef)==null?void 0:xe.current.orientation)},[F,z,D]),Ae=$n(xe=>{if(O.current=!1,Z.current=!0,xe.which===229||!oe.current&&xe.currentTarget===$.current)return;if(y&&sT(xe.key,C,k,N)){Bd(xe.key,ke())||ur(xe),r(!1,xe.nativeEvent,"list-navigation"),Bt(s.domReference)&&(S?z?.events.emit("virtualfocus",s.domReference):s.domReference.focus());return}const _e=H.current,ee=Vb(l,_),fe=BE(l,_);if(q||(xe.key==="Home"&&(ur(xe),H.current=ee,U()),xe.key==="End"&&(ur(xe),H.current=fe,U())),N>1){const J=P||Array.from({length:l.current.length},()=>({width:1,height:1})),re=i5(J,N,A),Te=re.findIndex(Qe=>Qe!=null&&!Sp(l,Qe,_)),Le=re.reduce((Qe,gt,Je)=>gt!=null&&!Sp(l,gt,_)?Je:Qe,-1),Ke=re[r5({current:re.map(Qe=>Qe!=null?l.current[Qe]:null)},{event:xe,orientation:C,loop:b,rtl:k,cols:N,disabledIndices:o5([...(typeof _!="function"?_:null)||l.current.map((Qe,gt)=>Sp(l,gt,_)?gt:void 0),void 0],re),minIndex:Te,maxIndex:Le,prevIndex:s5(H.current>fe?ee:H.current,J,re,N,xe.key===Vh?"bl":xe.key===(k?Jc:ef)?"tr":"tl"),stopEvent:!0})];if(Ke!=null&&(H.current=Ke,U()),C==="both")return}if(Bd(xe.key,C)){if(ur(xe),n&&!S&&po(xe.currentTarget.ownerDocument)===xe.currentTarget){H.current=Zb(xe.key,C,k)?ee:fe,U();return}Zb(xe.key,C,k)?b?H.current=_e>=fe?m&&_e!==l.current.length?-1:ee:hr(l,{startingIndex:_e,disabledIndices:_}):H.current=Math.min(fe,hr(l,{startingIndex:_e,disabledIndices:_})):b?H.current=_e<=ee?m&&_e!==-1?l.current.length:fe:hr(l,{startingIndex:_e,decrement:!0,disabledIndices:_}):H.current=Math.max(ee,hr(l,{startingIndex:_e,decrement:!0,disabledIndices:_})),mc(l,H.current)&&(H.current=-1),U()}}),Oe=v.useMemo(()=>S&&n&&Re&&{"aria-activedescendant":ce||we},[S,n,Re,ce,we]),Me=v.useMemo(()=>({"aria-orientation":C==="both"?void 0:C,...q?{}:Oe,onKeyDown:Ae,onPointerMove(){O.current=!0}}),[Oe,Ae,C,q]),Ue=v.useMemo(()=>{function xe(ee){T==="auto"&&kN(ee.nativeEvent)&&(W.current=!0)}function _e(ee){W.current=T,T==="auto"&&SN(ee.nativeEvent)&&(W.current=!0)}return{...Oe,onKeyDown(ee){O.current=!1;const fe=ee.key.startsWith("Arrow"),J=["Home","End"].includes(ee.key),re=fe||J,Te=iT(ee.key,C,k),Le=sT(ee.key,C,k,N),Ke=iT(ee.key,ke(),k),Qe=Bd(ee.key,C),gt=(y?Ke:Qe)||ee.key==="Enter"||ee.key.trim()==="";if(S&&n){const rt=z?.nodesRef.current.find(ze=>ze.parentId==null),et=z&&rt?XF(z.nodesRef.current,rt.id):null;if(re&&et&&B){const ze=new KeyboardEvent("keydown",{key:ee.key,bubbles:!0});if(Te||Le){var Je,xt;const He=((Je=et.context)==null?void 0:Je.elements.domReference)===ee.currentTarget,Ze=Le&&!He?(xt=et.context)==null?void 0:xt.elements.domReference:Te?l.current.find(ft=>ft?.id===we):null;Ze&&(ur(ee),Ze.dispatchEvent(ze),be(void 0))}if((Qe||J)&&et.context&&et.context.open&&et.parentId&&ee.currentTarget!==et.context.elements.domReference){var Rt;ur(ee),(Rt=et.context.elements.domReference)==null||Rt.dispatchEvent(ze);return}}return Ae(ee)}if(!(!n&&!E&&fe)){if(gt){const rt=Bd(ee.key,ke());Y.current=y&&rt?null:ee.key}if(y){Ke&&(ur(ee),n?(H.current=Vb(l,ne.current),U()):r(!0,ee.nativeEvent,"list-navigation"));return}Qe&&(h!=null&&(H.current=h),ur(ee),!n&&E?r(!0,ee.nativeEvent,"list-navigation"):Ae(ee),n&&U())}},onFocus(){n&&!S&&(H.current=-1,U())},onPointerDown:_e,onPointerEnter:_e,onMouseDown:xe,onClick:xe}},[we,Oe,N,Ae,ne,T,l,y,U,r,n,E,C,ke,k,h,z,S,B]);return v.useMemo(()=>f?{reference:Ue,floating:Me,item:Se}:{},[f,Ue,Me,Se])}const N5=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function FN(e,t){var n,r;t===void 0&&(t={});const{open:s,elements:a,floatingId:l}=e,{enabled:c=!0,role:d="dialog"}=t,f=Gh(),h=((n=a.domReference)==null?void 0:n.id)||f,m=v.useMemo(()=>{var E;return((E=Xp(a.floating))==null?void 0:E.id)||l},[a.floating,l]),b=(r=N5.get(d))!=null?r:d,k=Ao()!=null,S=v.useMemo(()=>b==="tooltip"||d==="label"?{["aria-"+(d==="label"?"labelledby":"describedby")]:s?m:void 0}:{"aria-expanded":s?"true":"false","aria-haspopup":b==="alertdialog"?"dialog":b,"aria-controls":s?m:void 0,...b==="listbox"&&{role:"combobox"},...b==="menu"&&{id:h},...b==="menu"&&k&&{role:"menuitem"},...d==="select"&&{"aria-autocomplete":"none"},...d==="combobox"&&{"aria-autocomplete":"list"}},[b,m,k,s,h,d]),T=v.useMemo(()=>{const E={id:m,...b&&{role:b}};return b==="tooltip"||d==="label"?E:{...E,...b==="menu"&&{"aria-labelledby":h}}},[b,m,h,d]),R=v.useCallback(E=>{let{active:_,selected:C}=E;const D={role:"option",..._&&{id:m+"-fui-option"}};switch(d){case"select":case"combobox":return{...D,"aria-selected":C}}return{}},[m,d]);return v.useMemo(()=>c?{reference:S,floating:T,item:R}:{},[c,S,T,R])}const oT=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function al(e,t){return typeof e=="function"?e(t):e}function O5(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 I5(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:s=250}=t,l=(typeof s=="number"?s:s.close)||0,[c,d]=v.useState("unmounted"),f=O5(n,l);return!f&&c==="close"&&d("unmounted"),hn(()=>{if(r){if(n){d("initial");const h=requestAnimationFrame(()=>{Di.flushSync(()=>{d("open")})});return()=>{cancelAnimationFrame(h)}}d("close")}},[n,r]),{isMounted:f,status:c}}function BN(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:s,common:a,duration:l=250}=t,c=e.placement,d=c.split("-")[0],f=v.useMemo(()=>({side:d,placement:c}),[d,c]),h=typeof l=="number",m=(h?l:l.open)||0,b=(h?l:l.close)||0,[y,k]=v.useState(()=>({...al(a,f),...al(n,f)})),{isMounted:S,status:T}=I5(e,{duration:l}),R=rr(n),E=rr(r),_=rr(s),C=rr(a);return hn(()=>{const D=al(R.current,f),N=al(_.current,f),M=al(C.current,f),B=al(E.current,f)||Object.keys(D).reduce((P,A)=>(P[A]="",P),{});if(T==="initial"&&k(P=>({transitionProperty:P.transitionProperty,...M,...D})),T==="open"&&k({transitionProperty:Object.keys(B).map(oT).join(","),transitionDuration:m+"ms",...M,...B}),T==="close"){const P=N||D;k({transitionProperty:Object.keys(P).map(oT).join(","),transitionDuration:b+"ms",...M,...P})}},[b,_,R,E,C,m,T,f]),{isMounted:S,styles:y}}function UN(e,t){var n;const{open:r,dataRef:s}=e,{listRef:a,activeIndex:l,onMatch:c,onTypingChange:d,enabled:f=!0,findMatch:h=null,resetMs:m=750,ignoreKeys:b=[],selectedIndex:y=null}=t,k=v.useRef(-1),S=v.useRef(""),T=v.useRef((n=y??l)!=null?n:-1),R=v.useRef(null),E=$n(c),_=$n(d),C=rr(h),D=rr(b);hn(()=>{r&&(pr(k),R.current=null,S.current="")},[r]),hn(()=>{if(r&&S.current===""){var A;T.current=(A=y??l)!=null?A:-1}},[r,y,l]);const N=$n(A=>{A?s.current.typing||(s.current.typing=A,_(A)):s.current.typing&&(s.current.typing=A,_(A))}),M=$n(A=>{function K(q,W,H){const Y=C.current?C.current(W,H):W.find(O=>O?.toLocaleLowerCase().indexOf(H.toLocaleLowerCase())===0);return Y?q.indexOf(Y):-1}const $=a.current;if(S.current.length>0&&S.current[0]!==" "&&(K($,$,S.current)===-1?N(!1):A.key===" "&&ur(A)),$==null||D.current.includes(A.key)||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;r&&A.key!==" "&&(ur(A),N(!0)),$.every(q=>{var W,H;return q?((W=q[0])==null?void 0:W.toLocaleLowerCase())!==((H=q[1])==null?void 0:H.toLocaleLowerCase()):!0})&&S.current===A.key&&(S.current="",T.current=R.current),S.current+=A.key,pr(k),k.current=window.setTimeout(()=>{S.current="",T.current=R.current,N(!1)},m);const z=T.current,U=K($,[...$.slice((z||0)+1),...$.slice(0,(z||0)+1)],S.current);U!==-1?(E(U),R.current=U):A.key!==" "&&(S.current="",N(!1))}),B=v.useMemo(()=>({onKeyDown:M}),[M]),P=v.useMemo(()=>({onKeyDown:M,onKeyUp(A){A.key===" "&&N(!1)}}),[M,N]);return v.useMemo(()=>f?{reference:B,floating:P}:{},[f,B,P])}function HN(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,...HN(e,s.id,n)])}function aT(e,t){const[n,r]=e;let s=!1;const a=t.length;for(let l=0,c=a-1;l<a;c=l++){const[d,f]=t[l]||[0,0],[h,m]=t[c]||[0,0];f>=r!=m>=r&&n<=(h-d)*(r-f)/(m-f)+d&&(s=!s)}return s}function M5(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function qN(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,s={current:-1};let a=!1,l=null,c=null,d=typeof performance<"u"?performance.now():0;function f(m,b){const y=performance.now(),k=y-d;if(l===null||c===null||k===0)return l=m,c=b,d=y,null;const S=m-l,T=b-c,E=Math.sqrt(S*S+T*T)/k;return l=m,c=b,d=y,E}const h=m=>{let{x:b,y,placement:k,elements:S,onClose:T,nodeId:R,tree:E}=m;return function(C){function D(){pr(s),T()}if(pr(s),!S.domReference||!S.floating||k==null||b==null||y==null)return;const{clientX:N,clientY:M}=C,B=[N,M],P=m5(C),A=C.type==="mouseleave",K=Kb(S.floating,P),$=Kb(S.domReference,P),F=S.domReference.getBoundingClientRect(),z=S.floating.getBoundingClientRect(),U=k.split("-")[0],q=b>z.right-z.width/2,W=y>z.bottom-z.height/2,H=M5(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,Z=(O?F:z).bottom;if(K&&(a=!0,!A))return;if($&&(a=!1),$&&!A){a=!0;return}if(A&&vt(C.relatedTarget)&&Kb(S.floating,C.relatedTarget)||E&&HN(E.nodesRef.current,R).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,Z],[z.right-1,L],[F.left+1,L],[F.left+1,Z]];break;case"right":se=[[F.right-1,Z],[F.right-1,L],[z.left+1,L],[z.left+1,Z]];break}function ne(oe){let[ae,ue]=oe;switch(U){case"top":{const we=[Y?ae+t/2:q?ae+t*4:ae-t*4,ue+t+1],me=[Y?ae-t/2:q?ae+t*4:ae-t*4,ue+t+1],ce=[[z.left,q||Y?z.bottom-t:z.top],[z.right,q?Y?z.bottom-t:z.top:z.bottom-t]];return[we,me,...ce]}case"bottom":{const we=[Y?ae+t/2:q?ae+t*4:ae-t*4,ue-t],me=[Y?ae-t/2:q?ae+t*4:ae-t*4,ue-t],ce=[[z.left,q||Y?z.top+t:z.bottom],[z.right,q?Y?z.top+t:z.bottom:z.top+t]];return[we,me,...ce]}case"left":{const we=[ae+t+1,O?ue+t/2:W?ue+t*4:ue-t*4],me=[ae+t+1,O?ue-t/2:W?ue+t*4:ue-t*4];return[...[[W||O?z.right-t:z.left,z.top],[W?O?z.right-t:z.left:z.right-t,z.bottom]],we,me]}case"right":{const we=[ae-t,O?ue+t/2:W?ue+t*4:ue-t*4],me=[ae-t,O?ue-t/2:W?ue+t*4:ue-t*4],ce=[[W||O?z.left+t:z.right,z.top],[W?O?z.left+t:z.right:z.left+t,z.bottom]];return[we,me,...ce]}}}if(!aT([N,M],se)){if(a&&!H)return D();if(!A&&r){const oe=f(C.clientX,C.clientY);if(oe!==null&&oe<.1)return D()}aT([N,M],ne([b,y]))?!a&&r&&(s.current=window.setTimeout(D,40)):D()}}};return h.__options={blockPointerEvents:n},h}function VN(e){return gn(e.defaultTagName??"div",e,e)}const D5=v.createContext(void 0);function L5(){return v.useContext(D5)}const Qb={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 j5(e){return[Qb.base,e==="green"?Qb.colorGreen:Qb.colorBlue]}function z5({color:e="blue",className:t}){const n=Xt({rootClass:"ui-indicator-dot",stylexStyles:j5(e),className:t});return g.jsx("span",{"aria-hidden":!0,className:n.className,"data-color":e,style:n.style})}const P5={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}},Ud={sm:{kzqmXN:"ui-16bvwqk",$$css:!0},md:{kzqmXN:"ui-1eu7oa3",$$css:!0},lg:{kzqmXN:"ui-jst10v",$$css:!0},xl:{kzqmXN:"ui-mjrt60",$$css:!0}},$5={rounded:{kaIpWk:"ui-1i4c3av",$$css:!0}},F5={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}},Hd={root:[P5.root,$A.root],size:{sm:[Gi.sm,ws.sm,Ud.sm],md:[Gi.md,ws.md,Ud.md],lg:[Gi.lg,ws.lg,Ud.lg],xl:[Gi.xl,ws.xl,Ud.xl]},contentFrame:F5,rounded:$5.rounded},B5="md",U5="ghost",H5={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 GN(e){if(e!==void 0&&y0(e))return zt(H5.root,AA(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 q5({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 WN({enforcedRootStyle:e,frame:t,indicatorDot:n,rootStyle:r,rounded:s,size:a,tone:l,variant:c}){const d=x0(c,l);return{dataAttrs:q5({frame:t,indicatorDot:n,rounded:s,size:a,tone:l,variant:c}),rootAttrs:zt(Hd.root,_i.appearance,d.applyControlTone&&k0.foreground,d.applyControlTone&&l!==void 0&&MA[l],c==="ghost"&&(l==="secondary"||l==="tertiary")&&p3[l],d.applyFilledColors&&_i.colors,d.applyNonFilledBackground&&la.background,(c==="outline"||c==="ghost")&&qp(l)&&DA[l],c==="outline"&&la.outline,c==="outline"&&qp(l)&&LA[l],c==="media"&&_i.media,_i.press,a!=="xs"&&Hd.size[a],s&&Hd.rounded,t==="content"&&a!=="xs"&&Hd.contentFrame[a],e,r)}}function KN({size:e,iconSize:t,disabled:n,variant:r,tone:s,enforced:a}){const l=e??a?.iconButtonSize??B5,c=r??a?.iconButtonVariant??U5,d=l==="xs"?void 0:jA[l];return{size:l,innerIconSize:t??a?.iconButtonIconSize??d,disabled:n??a?.disabled,variant:c,tone:OA(s??a?.iconButtonTone??(c==="primary"?IA:void 0))}}function vr({icon:e,iconVariant:t="outline",variant:n,rounded:r,frame:s="container",size:a,iconSize:l,tone:c,className:d,style:f,rootStyle:h,iconStyle:m,disabled:b,indicatorDot:y=!1,indicatorDotColor:k="blue","aria-label":S,"aria-labelledby":T,...R}){const E=ya(),{size:_,innerIconSize:C,disabled:D,variant:N,tone:M}=KN({disabled:b,enforced:E,iconSize:l,size:a,tone:c,variant:n}),B=WN({enforcedRootStyle:E?.iconButtonRootStyle,frame:s,indicatorDot:y,rootStyle:h,rounded:r,size:_,tone:M,variant:N});return g.jsxs(v0,{...R,className:rn("ui-icon-button",B.rootAttrs.className,d),style:{...B.rootAttrs.style,...f},...B.dataAttrs,disabled:D,"aria-label":S,"aria-labelledby":T,children:[typeof e=="string"?g.jsx(Ht,{name:e,rootStyle:[E?.iconButtonIconStyle,m],variant:t,size:C,"aria-hidden":"true"}):g.jsx("span",{...GN(C),"aria-hidden":"true",children:e}),y?g.jsx(z5,{color:k}):null]})}function V5(){return typeof navigator<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)}function j0(e){if(!(V5()?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 G5({className:e,disabled:t=!1,mono:n=!1,ref:r,rootStyle:s,style:a,onKeyDown:l,...c}){const d=Xt({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}),f=v.useCallback(h=>{l?.(h),!h.defaultPrevented&&j0(h)},[l]);return g.jsx("input",{ref:r,className:d.className,style:d.style,disabled:t,onKeyDown:f,...c})}const Cr={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}},lT={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}},W5={md:Cr.sizeMd,lg:Cr.sizeLg,xl:Cr.sizeXl},K5={md:Cr.layoutTextareaMd,lg:Cr.layoutTextareaLg,xl:null},Y5={container:null,content:Cr.frameContent},X5={default:Cr.variantDefault,elevated:Cr.variantElevated,ghost:Cr.variantGhost,unfilled:Cr.variantUnfilled},Z5={rounded:null,pill:Cr.shapePill},YN=v.createContext(null);function ka(e){const t=v.useContext(YN);if(!t)throw new Error(`${e} must be used within InputGroup.Root`);return t}function Q5(){return ka("InputGroup.useContext")}const J5={md:"sm",lg:"base",xl:"lg"},e9={md:"sm",lg:"sm",xl:"sm"},t9={md:"sm",lg:"sm",xl:"md"};function n9(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("field-sizing","content")}function uT({variant:e="default",frame:t="container",size:n="lg",shape:r="rounded",layout:s="default",mono:a=!1,disabled:l=!1,rootStyle:c,className:d,children:f}){const h=L5(),m=l||h?.disabled===!0,b=Xt({rootClass:"ui-input-group",stylexStyles:[Cr.base,W5[n],s==="textarea"?Cr.layoutTextarea:null,s==="textarea"?K5[n]:null,Y5[t],X5[e],e==="unfilled"?Cr.variantUnfilledSize:null,Z5[r],m?Cr.disabled:null,c],className:d});return g.jsx(YN.Provider,{value:{disabled:m,layout:s,mono:a},children:g.jsx(Is,{iconSize:J5[n],iconButtonSize:e9[n],buttonSize:t9[n],disabled:m||void 0,children:g.jsx("div",{className:b.className,style:b.style,"data-variant":e,"data-frame":t,"data-size":n,"data-shape":r!=="rounded"?r:void 0,"data-layout":s==="textarea"?"textarea":void 0,"data-mono":a||void 0,"data-disabled":m||void 0,children:f})})})}function r9({className:e,disabled:t,ref:n,rootStyle:r,style:s,...a}){const l=ka("InputGroup.Input"),c=l.disabled||t===!0;return g.jsx(CF,{...a,className:e,disabled:c,ref:n,render:g.jsx(G5,{mono:l.mono,rootStyle:r}),style:s})}function i9({className:e,disabled:t,ref:n,rootStyle:r,style:s,onKeyDown:a,onInput:l,onFocus:c,onBlur:d,minRows:f=1,maxRows:h,autoResize:m=!0,collapseToSingleLineWhenBlurred:b=!1,rows:y,value:k,placeholder:S,focusedPlaceholder:T,...R}){const E=ka("InputGroup.Textarea"),_=E.disabled||t===!0,C=f<1?1:f,D=h===void 0?void 0:h<C?C:h,N=m&&!b,M=Math.min(Math.max(y??C,C),D??Number.POSITIVE_INFINITY),B=Xt({rootClass:"ui-input-group__textarea",stylexStyles:[Zo.field,_?Zo.disabled:null,E.mono?Zo.mono:null,b?Zo.collapseBlur:null,N?Zo.autoSizeContent:null,N&&D!==void 0?Zo.autoSizeContentMaxRows:null,N?Zo.autoSizeRows(M,D??M):null,r],className:e,style:s}),P=v.useRef(null),A=Qc([P,n]),[K,$]=v.useState(!1),F=v.useCallback(()=>{if(!m)return;const O=P.current;if(!O||N&&O.style.height===""&&n9())return;if(D===C&&(y===void 0||y===C)){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,Z=Number.parseFloat(j.paddingBottom)||0,se=Number.parseFloat(j.borderTopWidth)||0,ne=Number.parseFloat(j.borderBottomWidth)||0,oe=L+Z+se+ne,ae=Number.isFinite(V)&&V>0?oe+V*C:0,ue=D!==void 0&&Number.isFinite(V)&&V>0?oe+V*D:void 0,we=Math.max(O.scrollHeight,ae),me=ue!==void 0?Math.min(we,ue):we;O.style.height=`${me}px`,O.style.overflowY=ue!==void 0&&O.scrollHeight>ue?"auto":"hidden"},[m,D,C,y,N]);v.useLayoutEffect(()=>{F()},[k,F]);const z=v.useCallback(O=>{a?.(O),!O.defaultPrevented&&j0(O)},[a]),U=v.useCallback(O=>{l?.(O),O.defaultPrevented||F()},[l,F]),q=v.useCallback(O=>{$(!0),c?.(O)},[c]),W=v.useCallback(O=>{$(!1),d?.(O)},[d]),H=y??C,Y=K&&T!==void 0?T:S;return g.jsx("textarea",{ref:A,className:B.className,style:B.style,disabled:_,onKeyDown:z,rows:H,value:k,placeholder:Y,...R,"data-textarea-collapse-blur":b?"":void 0,onInput:U,onFocus:q,onBlur:W})}function s9({addonStyle:e,className:t,ref:n,...r}){const s=ka("InputGroup.Icon"),a=Xt({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(Ht,{ref:n,...r})})}function o9({addonStyle:e,className:t,disabled:n,ref:r,...s}){const a=ka("InputGroup.IconButton"),l=a.disabled?!0:n,c=Xt({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(vr,{ref:r,disabled:l,...s})})}function a9({addonStyle:e,className:t,disabled:n,ref:r,...s}){const a=ka("InputGroup.Button"),l=a.disabled?!0:n,c=Xt({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(yn,{ref:r,disabled:l,...s})})}function l9({className:e,children:t}){const n=ka("InputGroup.Span"),r=Xt({rootClass:"ui-input-group__span",stylexStyles:[lT.base,n.mono?lT.mono:null],className:e});return g.jsx("span",{className:r.className,style:r.style,children:t})}const Vd=Object.assign(uT,{Root:uT,Input:r9,Textarea:i9,Icon:s9,IconButton:o9,Button:a9,Span:l9,useContext:Q5}),u9=v.createContext(void 0);function c9(e){return v.useContext(u9)}function XN(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=p_(),{ref:s,index:a}=tN(e),l=n===a,c=v.useRef(null),d=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:d,index:a}}function f9(e){const{render:t,className:n,style:r,state:s=Fn,props:a=ko,refs:l=ko,metadata:c,stateAttributesMapping:d,tag:f="div",...h}=e,{compositeProps:m,compositeRef:b}=XN({metadata:c});return gn(f,e,{state:s,ref:[...l,b],props:[m,...a,h],stateAttributesMapping:d})}function d9(e){const[t,n]=v.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}function cT(e){const t=_r(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Bt(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 ZN(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const QN=v.createContext(void 0);function tf(e){const t=v.useContext(QN);if(t===void 0&&!e)throw new Error(In(50));return t}const p9=600,JN=300,h9={...mA,instantType:st(e=>e.instantType),hasViewport:st(e=>e.hasViewport)};class Yh extends p0{constructor(t,n,r=!1){const s=new Nh,a={...m9(),...t};a.floatingRootContext=pA(s,n,r),super(a,{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:s,closeDelayRef:{current:JN},inlineRectCoordsRef:{current:void 0}},h9)}setOpen=(t,n)=>{const{inlineRectCoordsRef:r}=this.context;oA(this,t,n,{onBeforeDispatch(){const s=n.event;t&&n.reason===Tr&&n.trigger&&"clientX"in s&&"clientY"in s&&r.current?.element!==n.trigger&&J_(r,n.trigger,s.clientX,s.clientY)}})};static useStore(t,n){return sA(t,(s,a)=>new Yh(n,s,a)).store}}function m9(){return{...dA(),instantType:void 0,hasViewport:!1}}function fT(e){const{open:t,defaultOpen:n=!1,onOpenChange:r,onOpenChangeComplete:s,actionsRef:a,handle:l,triggerId:c,defaultTriggerId:d=null,children:f}=e,h=Yh.useStore(l?.store,{open:n,openProp:t,activeTriggerId:d,triggerIdProp:c});aA(h,t,n,d),h.useControlledProp("openProp",t),h.useControlledProp("triggerIdProp",c),h.useContextCallback("onOpenChange",r),h.useContextCallback("onOpenChangeComplete",s);const m=h.useState("open"),b=h.useState("activeTriggerId"),y=h.useState("mounted"),k=h.useState("payload");uA(h,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:S}=cA(m,h,()=>{h.context.inlineRectCoordsRef.current=void 0});Fe(()=>{m&&b==null&&h.set("payload",void 0)},[h,b,m]);const T=v.useCallback(()=>{h.setOpen(!1,Ct(Ap))},[h]);v.useImperativeHandle(a,()=>({unmount:S,close:T}),[S,T]);const R=m||y;return g.jsxs(QN.Provider,{value:h,children:[R&&g.jsx(g9,{store:h}),typeof f=="function"?f({payload:k}):f]})}function g9({store:e}){const t=e.useState("floatingRootContext"),n=s0(t),r=n.reference??Fn,s=n.trigger??Fn,a=v.useMemo(()=>Ki(h0,n.floating),[n.floating]);return fA(e,{activeTriggerProps:r,inactiveTriggerProps:s,popupProps:a}),null}const eO=d0(function(t){return tf(!0)?g.jsx(fT,{...t}):g.jsx(MP,{children:g.jsx(fT,{...t})})}),tO=v.createContext(void 0);function b9(){const e=v.useContext(tO);if(e===void 0)throw new Error(In(48));return e}const nO=v.forwardRef(function(t,n){const{children:r,container:s,className:a,render:l,style:c,...d}=t,{portalNode:f,portalSubtree:h}=P_({container:s,ref:n,componentProps:t,elementProps:d});return!h&&!f?null:g.jsxs(v.Fragment,{children:[h,f&&Di.createPortal(r,f)]})}),rO=v.forwardRef(function(t,n){const{keepMounted:r=!1,...s}=t;return tf().useState("mounted")||r?g.jsx(tO.Provider,{value:r,children:g.jsx(nO,{ref:n,...s})}):null}),iO=nA(function(t,n){const{render:r,className:s,delay:a,closeDelay:l,id:c,payload:d,handle:f,style:h,...m}=t,b=tf(!0),y=f?.store??b;if(!y)throw new Error(In(89));const k=Bl(c),S=y.useState("isTriggerActive",k),T=y.useState("isOpenedByTrigger",k),R=y.useState("floatingRootContext"),E=y.context.inlineRectCoordsRef,_=v.useRef(null),C=a??p9,D=l??JN,{registerTrigger:N,isMountedByThisTrigger:M}=lA(k,_,y,{payload:d});Fe(()=>{M&&(y.context.closeDelayRef.current=D)},[y,M,D]);const B=xA(R,{mouseOnly:!0,move:!1,handleClose:kA(),delay:()=>({open:C,close:D}),triggerElementRef:_,isActiveTrigger:S,isClosing:()=>y.select("transitionStatus")==="ending"}),P=bA(R,{delay:C}),A={open:T},K=y.useState("triggerProps",M),$=_6(E,T);return gn("a",t,{state:A,ref:[n,N,_],props:[B,P.reference,K,$,{id:k},m],stateAttributesMapping:c_})}),sO=v.createContext(void 0);function y9(){const e=v.useContext(sO);if(e===void 0)throw new Error(In(49));return e}const oO=v.forwardRef(function(t,n){const{render:r,className:s,anchor:a,positionMethod:l="absolute",side:c="bottom",align:d="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:b=5,arrowPadding:y=5,sticky:k=!1,disableAnchorTracking:S=!1,collisionAvoidance:T=L_,style:R,...E}=t,_=tf(),C=b9(),D=OP(),N=_.useState("open"),M=_.useState("mounted"),B=_.useState("floatingRootContext"),P=_.useState("instantType"),A=_.useState("transitionStatus"),K=_.useState("hasViewport"),$=_.context.inlineRectCoordsRef,F=C0({anchor:a,floatingRootContext:B,positionMethod:l,mounted:M,side:c,sideOffset:f,align:d,alignOffset:h,arrowPadding:y,collisionBoundary:m,collisionPadding:b,sticky:k,disableAnchorTracking:S,keepMounted:C,nodeId:D,collisionAvoidance:T,adaptiveOrigin:K?QA:void 0,inline:A6($)}),z=F.update;Fe(()=>{N&&M&&z()},[N,M,z]);const U={open:N,side:F.side,align:F.align,anchorHidden:F.anchorHidden,instant:P},q=_0(t,U,{styles:F.positionerStyles,transitionStatus:A,props:E,refs:[n,_.useStateSetter("positionerElement")],hidden:!M,inert:!N});return g.jsx(sO.Provider,{value:F,children:g.jsx(IP,{id:D,children:q})})}),v9={...Gc,...To},aO=v.forwardRef(function(t,n){const{className:r,render:s,style:a,...l}=t,c=tf(),{side:d,align:f}=y9(),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=We(()=>c.context.closeDelayRef.current);return vA(k,{closeDelay:S}),gn("div",t,{state:{open:h,side:d,align:f,instant:m,transitionStatus:b},ref:[n,c.context.popupRef,c.useStateSetter("popupElement")],props:[y,jh(b),l],stateAttributesMapping:v9})});class x9{constructor(){this.store=new Yh}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,Ct(Ap,void 0,n))}close(){this.store.setOpen(!1,Ct(Ap,void 0,void 0))}get isOpen(){return this.store.select("open")}}function k9(){return new x9}function Dl(e,t,n,r){const[s,a]=v.useState(t),l=v.useRef(n),c=v.useRef(s),d=e!==void 0,f=v.useRef(d);v.useLayoutEffect(()=>{l.current=n},[n]),v.useEffect(()=>{c.current!==s&&l.current?.(s),c.current=s},[s]),v.useEffect(()=>{f.current,f.current=d},[r,d]);const h=d?e:s,m=v.useCallback(b=>{if(!d){a(b);return}const y=typeof b=="function"?b(e):b;y!==e&&l.current?.(y)},[e,d]);return[h,m]}const lO="never",uO=250,Jb={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)}]},S9={base:{kB7OPa:"ui-9f619",$$css:!0}};function w9({ariaLabel:e,close:t,content:n,contentStyle:r,isOpen:s,maxHeight:a,maxWidth:l,offset:c,placement:d,sameAxisOnly:f,scrollbarVisibility:h,surfaceClassName:m,surfaceStyle:b,width:y}){const{portalLayerStyles:k}=Hl("tooltip",!0),{side:S,align:T,sideOffset:R,alignOffset:E,collisionAvoidance:_,positionMethod:C}=Uh(d??Fh,c,f),D=Ph(iN),N=zt(A0,Jb.base,zh,Jb.width(y),l!==void 0&&Jb.maxWidth(l),b),M=zt(sN,S9.base,r);return g.jsx(oO,{align:T,alignOffset:E,className:D.className,collisionAvoidance:_,collisionPadding:8,positionMethod:C,side:S,sideOffset:R,style:{...D.style,...k},children:g.jsx(aO,{"aria-label":e,className:rn("ui-preview-card",m,N.className),"data-block-global-shortcuts":s?"Escape":void 0,role:"dialog",style:N.style,children:g.jsx(Nl,{maxHeight:a,scrollbarVisibility:h,children:g.jsx("div",{className:rn("ui-preview-card__content",M.className),style:M.style,children:typeof n=="function"?n(t):n})})})})}function cO({children:e,content:t,placement:n=Fh,sameAxisOnly:r=!1,offset:s=8,openDelay:a=uO,closeDelay:l=Bh,disabled:c=!1,maxHeight:d=300,maxWidth:f,scrollbarVisibility:h=lO,width:m=280,className:b,surfaceStyle:y,contentStyle:k,"aria-label":S,ref:T,defaultOpen:R=!1,open:E,onOpenChange:_,onOpenChangeComplete:C,...D}){const N=v.useRef(null),[M,B]=Dl(E,R,void 0,"PreviewCard"),P=v.Children.only(e),A=v.isValidElement(P),K=v.useCallback(q=>{q!==null&&(N.current?.close(),E===void 0&&N.current?.unmount())},[E]),$=VN({defaultTagName:"span",props:D,ref:[T,K],render:A?P:void 0}),F=va(),z=v.useCallback((q,W)=>{if(c){q&&W.cancel();return}if(W.reason==="outside-press"||W.reason==="trigger-press"){W.cancel();return}_?.(q,W),W.isCanceled||B(q)},[c,_,B]),U=v.useCallback(()=>N.current?.close(),[]);return A?g.jsxs(eO,{actionsRef:N,defaultOpen:R,onOpenChange:z,onOpenChangeComplete:C,open:E,children:[c?$:g.jsx(iO,{...D,closeDelay:l,delay:a,ref:T,render:P}),c?null:g.jsx(rO,{container:F??void 0,children:g.jsx(w9,{ariaLabel:S,close:U,content:t,contentStyle:k,isOpen:M,maxHeight:d,maxWidth:f,offset:s,placement:n,sameAxisOnly:r,scrollbarVisibility:h,surfaceClassName:b,surfaceStyle:y,width:m})})]}):g.jsx(g.Fragment,{children:e})}function dT(e){const t=v.useRef(e);return v.useLayoutEffect(()=>{t.current=e},[e]),t}function fO(e,t){const n=dT(e),r=dT(t);return v.useCallback(s=>{if(s==null)return;const{ownerDocument:a}=s,l=c=>{const d=c.target,f=a.defaultView?.Element;if(f===void 0||!(d instanceof f))return;const h=r.current;if(h==null)return;const m=a.getElementById(h);m!=null&&d.contains(m)&&n.current.close()};return a.addEventListener("scroll",l,{capture:!0,passive:!0}),()=>{a.removeEventListener("scroll",l,!0)}},[n,r])}const Qp=v.createContext(!1);function dO({children:e,dismiss:t}){const n=v.use(Qp);return g.jsx(Qp.Provider,{value:n||t,children:e})}const pO=v.createContext(null),hO=v.createContext(null),mO=v.createContext(null);function gO(e){const t=v.use(pO);if(t===null)throw new Error(`${e} must be used within PreviewCardLayer`);return t}function E9(){const e=v.use(hO);if(e===null)throw new Error("PreviewCardLayer.Popup must be inside an open PreviewCardLayer");return e}function T9(){const e=v.use(mO);if(e===null)throw new Error("PreviewCardLayer.Popup must be inside an open PreviewCardLayer");return e}function R9({children:e}){const t=N0();return L0({nodeId:t,open:!0}),g.jsx(O0,{id:t,children:e})}function Cc({children:e,placement:t=Fh,offset:n=8,sameAxisOnly:r=!1,openDelay:s=uO,closeDelay:a=Bh,controlledTargetId:l}){const c=v.useMemo(()=>k9(),[]),d=v.useRef(null),f=v.useRef(null),h=v.useRef(null),m=v.useRef(!1),b=v.useRef(new Map),y=v.useRef(l),[k,S]=v.useState(!1),T=v.useRef(null),R=v.use(Qp),E=Uh(t,n,r);v.useLayoutEffect(()=>{k||T.current?.unmount()},[k]);const _=v.useCallback(P=>{d.current===P&&(d.current=null,c.close())},[c]),C=v.useCallback(()=>{const P=y.current;if(P===void 0)return;const A=P===null?void 0:b.current.get(P);if(P===null||A===void 0||A.suppressed){d.current=null,c.close();return}d.current=A.triggerId,c.open(A.triggerId)},[c]),D=v.useCallback(()=>{const P=m.current;m.current=!1;const A=f.current;if(A===null)return;const K=h.current;K===null||K.id!==A||!K.isConnected||K.hasAttribute("data-preview-card-layer-trigger-suppressed")||!P&&K!==K.ownerDocument.activeElement&&!K.matches(":hover")||(d.current=A,c.open(A))},[c]),N=v.useCallback((P,A)=>(b.current.set(P,A),C(),()=>{b.current.get(P)===A&&(b.current.delete(P),C())}),[C]);v.useLayoutEffect(()=>{const P=y.current;if(P===void 0&&l!==void 0&&(f.current=d.current),y.current=l,l===void 0){P!==void 0&&D();return}P!==l&&(m.current=!1),C()},[l,C,D]);const M=v.useCallback((P,A)=>{if(y.current!==void 0&&A.reason!=="imperative-action"){P&&A.trigger!==void 0&&!A.trigger.hasAttribute("data-preview-card-layer-trigger-suppressed")?(f.current=A.trigger.id,h.current=A.trigger,m.current=!0):!P&&A.trigger?.id===f.current&&(f.current=null,h.current=null,m.current=!1),A.cancel(),C();return}if(P&&A.trigger?.hasAttribute("data-preview-card-layer-trigger-suppressed")){if(A.cancel(),y.current!==void 0){C();return}d.current=null,f.current=null,c.close();return}if(!P&&A.reason==="trigger-focus"&&A.event instanceof FocusEvent&&A.event.relatedTarget===null&&A.event.target instanceof Element&&A.event.target.matches(":hover")){A.cancel();return}!P&&A.reason!=="imperative-action"&&A.trigger?.id===f.current&&(f.current=null,h.current=null,m.current=!1),d.current=P?A.trigger?.id??d.current:null,y.current===void 0&&(f.current=d.current),S(P),y.current===void 0&&A.trigger!==void 0&&(h.current=P?A.trigger:null)},[c,C]),B=v.useMemo(()=>({handle:c,instantDismiss:R,openDelay:s,closeDelay:a,positioner:E,closeIfActive:_,registerTarget:N}),[a,_,c,R,s,E,N]);return g.jsxs(pO.Provider,{value:B,children:[e,g.jsx(eO,{actionsRef:T,handle:c,onOpenChange:M,children:({payload:P})=>!R&&k&&P!==void 0?g.jsx(hO.Provider,{value:P.triggerId,children:g.jsx(mO.Provider,{value:P.contentKey,children:g.jsx(R9,{children:P.content})})}):null})]})}function C9({children:e,content:t,targetId:n,contentKey:r,disabled:s=!1,openDelay:a,closeDelay:l}){const{handle:c,instantDismiss:d,openDelay:f,closeDelay:h,closeIfActive:m,registerTarget:b}=gO("PreviewCardLayer.Trigger"),y=v.useId(),k=e.props.id,S=typeof k=="string"?k:y,T=s||d,R=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:T});return T&&m(S),()=>{E?.(),m(S)}},[m,b,T,n,S]),g.jsx(iO,{closeDelay:l??h,delay:a??f,handle:c,id:S,payload:R,"data-preview-card-layer-trigger-suppressed":T?"":void 0,render:e})}function _9({ariaLabel:e,children:t,maxHeight:n,surfaceClassName:r,surfaceStyle:s}){const{handle:a,positioner:l}=gO("PreviewCardLayer.Popup"),c=E9(),d=T9(),f=va(),h=fO(a,c),{portalLayerStyles:m}=Hl("tooltip",!0),b=Ph(iN),y=zt(A0,oN,sN,zh,R4,s);return g.jsx(rO,{container:f??void 0,children:g.jsx(oO,{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(aO,{"aria-label":e,"data-component":"preview-card-layer-popup",className:rn("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:lO,children:t})},d)})})}(function(e){e.Trigger=C9,e.Popup=_9})(Cc||(Cc={}));const bO="data-composite-item-active",A9=[];function N9(e){const{loopFocus:t=!0,orientation:n="both",grid:r,onLoop:s,direction:a,highlightedIndex:l,onHighlightedIndexChange:c,rootRef:d,enableHomeAndEndKeys:f=!1,stopEventPropagation:h=!1,disabledIndices:m,modifierKeys:b=A9}=e,[y,k]=v.useState(0),S=r!=null,T=v.useRef(null),R=xo(T,d),E=v.useRef([]),_=v.useRef(!1),C=l??y,D=We((A,K=!1)=>{if((c??k)(A),K){const $=E.current[A];cE(T.current,$,a,n)}}),N=We(A=>{if(A.size===0||_.current)return;_.current=!0;const K=Array.from(A.keys()),$=K.find(z=>z?.hasAttribute(bO))??null,F=$?K.indexOf($):-1;if(F!==-1)D(F);else if(Lp(K,C,m)){const z=Ss(K,{disabledIndices:m});uc(K,z)||D(z)}cE(T.current,$,a,n)});Fe(()=>{if(m==null||l!=null||!_.current)return;const A=E.current;if(Lp(A,C,m)){const K=Ss(A,{disabledIndices:m});uc(A,K)||D(K)}},[m,l,C,E,D]);const M=We((A,K,$)=>s?s(A,K,$,E):$),B=We(A=>{const K=f?TA:EA;if(!K.has(A.key)||O9(A,b)||!T.current)return;const F=a==="rtl",z=F?Bp:Up,U={horizontal:z,vertical:pc,both:z}[n],q=F?Up:Bp,W={horizontal:q,vertical:dc,both:q}[n],H=yr(A.nativeEvent);if(H!=null&&uE(H)&&!ZN(H)){const se=H.selectionStart,ne=H.selectionEnd,oe=H.value??"";if(se==null||A.shiftKey||se!==ne||A.key!==W&&se<oe.length||A.key!==U&&se>0)return}let Y=C;const O=yp(E,m),j=Uy(E,m);r!=null&&(Y=r({disabledIndices:m,elementsRef:E,event:A,highlightedIndex:C,loopFocus:t,maxIndex:j,minIndex:O,onLoop:M,orientation:n,rtl:F}));const V={horizontal:[z],vertical:[pc],both:[z,pc]}[n],L={horizontal:[q],vertical:[dc],both:[q,dc]}[n],Z=S?K:{horizontal:f?s$:SA,vertical:f?o$:wA,both:K}[n];f&&(A.key===Ih?Y=O:A.key===Mh&&(Y=j)),Y===C&&(V.includes(A.key)||L.includes(A.key))&&(t&&Y===j&&V.includes(A.key)?(Y=O,s&&(Y=s(A,C,Y,E))):t&&Y===O&&L.includes(A.key)?(Y=j,s&&(Y=s(A,C,Y,E))):Y=Ss(E.current,{startingIndex:Y,decrement:L.includes(A.key),disabledIndices:m})),Y!==C&&!uc(E.current,Y)&&(h&&A.stopPropagation(),Z.has(A.key)&&A.preventDefault(),D(Y,!0),queueMicrotask(()=>{E.current[Y]?.focus()}))});return{props:{ref:R,onFocus(A){const K=T.current,$=yr(A.nativeEvent);!K||$==null||!uE($)||$.setSelectionRange(0,$.value.length??0)},onKeyDown:B},highlightedIndex:C,onHighlightedIndexChange:D,elementsRef:E,disabledIndices:m,onMapChange:N,relayKeyboardEvent:B}}function O9(e,t){for(const n of f$.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function I9(e){const{render:t,className:n,style:r,refs:s=ko,props:a=ko,state:l=Fn,stateAttributesMapping:c,highlightedIndex:d,onHighlightedIndexChange:f,orientation:h,grid:m,loopFocus:b,onLoop:y,enableHomeAndEndKeys:k,onMapChange:S,stopEventPropagation:T=!0,rootRef:R,disabledIndices:E,modifierKeys:_,highlightItemOnHover:C=!1,tag:D="div",...N}=e,M=Li(),{props:B,highlightedIndex:P,onHighlightedIndexChange:A,elementsRef:K,onMapChange:$,relayKeyboardEvent:F}=N9({grid:m,loopFocus:b,onLoop:y,orientation:h,highlightedIndex:d,onHighlightedIndexChange:f,rootRef:R,stopEventPropagation:T,enableHomeAndEndKeys:k,direction:M,disabledIndices:E,modifierKeys:_}),z=gn(D,e,{state:l,ref:s,props:[B,...a,N],stateAttributesMapping:c}),U=v.useMemo(()=>({highlightedIndex:P,onHighlightedIndexChange:A,highlightItemOnHover:C,relayKeyboardEvent:F}),[P,A,C,F]);return g.jsx(d_.Provider,{value:U,children:g.jsx(R0,{elementsRef:K,onMapChange:q=>{S?.(q),$(q)},children:z})})}const M9=v.createContext(void 0);function D9(){const e=v.useContext(M9);if(e===void 0)throw new Error(In(63));return e}let pT=(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 L9={...Xc,checked(e){return e?{[pT.checked]:""}:{[pT.unchecked]:""}}},j9=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,c=D9();return gn("span",t,{state:c,ref:n,stateAttributesMapping:L9,props:l})}),z9="md",hT={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}},P9={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 $9({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(j9,{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(hT.root,hT[t],P9[n]),children:s})}function F9({checked:e,disabled:t,size:n=z9,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($9,{interactive:!1,size:n,variant:r})})}const En={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}},B9={xs:zA.root,sm:Ms.root,md:Cs.root,lg:PA.root,xl:g3.root,"2xl":b3.root,"3xl":y3.root,inherit:En.sizeInherit},U9={regular:En.weightRegular,medium:En.weightMedium,semibold:En.weightSemibold,bold:En.weightBold},H9={primary:En.colorPrimary,secondary:En.colorSecondary,tertiary:En.colorTertiary,quaternary:En.colorQuaternary,active:En.colorActive,focused:En.colorFocused,red:En.colorRed,"red-secondary":En.colorRedSecondary,yellow:En.colorYellow,"yellow-secondary":En.colorYellowSecondary,green:En.colorGreen,"green-secondary":En.colorGreenSecondary,magenta:En.colorMagenta,"magenta-secondary":En.colorMagentaSecondary,cyan:En.colorCyan,"cyan-secondary":En.colorCyanSecondary,orange:En.colorOrange,"orange-secondary":En.colorOrangeSecondary};function q9({color:e,size:t,truncate:n,variant:r,weight:s}){return[En.base,Dh.root,B9[t],U9[s],r==="code"?En.variantCode:null,e?H9[e]:null,n==="start"?En.truncateStart:null,n==="end"?ql.root:null]}function Jp({as:e="span",variant:t="default",size:n="md",weight:r="regular",color:s,truncate:a,numeric:l,children:c,rootStyle:d,className:f,style:h,ref:m,...b}){const y=a===!0?"end":a===!1?void 0:a??void 0,{className:k,style:S}=zt(q9({color:s,size:n,truncate:y,variant:t,weight:r}),d);return g.jsx(e,{ref:m,className:rn("ui-text",k,f),style:{...S,...h},"data-variant":t,"data-size":n,"data-weight":r,"data-color":s,"data-truncate":y,"data-numeric":l||void 0,...b,children:y==="start"?g.jsxs(g.Fragment,{children:["",c,""]}):c})}const yO={text:{kzqmXN:"ui-h8yej3",kHjlTd:"ui-j0a0fe",kN2L0X:"ui-1w2vvpw",$$css:!0}};function vO({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 xO({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 kO({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 SO({children:e}){return g.jsx(Jp,{as:"p",color:"primary","data-component":"empty-state-title",rootStyle:yO.text,size:"md",weight:"medium",children:e})}function wO({children:e}){return g.jsx(Jp,{as:"p",color:"secondary","data-component":"empty-state-description",rootStyle:yO.text,size:"md",weight:"regular",children:e})}function EO({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 V9({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(Ht,{color:"tertiary",name:a,size:"lg"}):n;return g.jsxs(vO,{children:[l===void 0?null:g.jsx(xO,{variant:r,children:l}),g.jsxs(kO,{children:[s===void 0?null:g.jsx(SO,{children:s}),g.jsx(wO,{children:e})]}),t===void 0?null:g.jsx(EO,{children:g.jsx(yn,{disabled:t.disabled,onClick:t.onClick,size:"md",variant:"outline",children:t.label})})]})}const Ci=Object.assign(V9,{Root:vO,Icon:xO,Header:kO,Title:SO,Description:wO,Content:EO});function nf({className:e,variant:t="default",size:n="lg",ref:r,disabled:s,startIcon:a,endIcon:l,inputGroupRootStyle:c,...d}){return g.jsxs(Vd.Root,{className:e,rootStyle:c,variant:t,size:n,disabled:s,children:[a!=null&&g.jsx(Vd.Icon,{name:a}),g.jsx(Vd.Input,{ref:r,...d}),l!=null&&g.jsx(Vd.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 bi=xs;const ey={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)"}},G9={1:1,2:2},ev={instant:50,fast:100,normal:150,slow:200,slower:300},TO={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)"},W9={"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},K9={none:0,xs:2,sm:4,base:6,lg:8,xl:12,"2xl":14,"3xl":16,"4xl":18,full:9999},Y9={xs:20,sm:24,base:28,lg:32},X9={xs:11,sm:12,base:13,lg:14},Z9={xs:14,sm:16,base:18,lg:22},Q9={xs:.07,sm:0,base:-.08,lg:-.15,xl:.08,"2xl":-.46,"3xl":-.26},J9=.98,eB=2,mT={open:ev.fast,close:ev.fast},tB=TO.outQuint;function RO(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 nB(e){const{side:t,alignment:n}=RO(e);switch(t){case"top":return`${gT(n)} bottom`;case"right":return`left ${bT(n)}`;case"bottom":return`${gT(n)} top`;case"left":return`right ${bT(n)}`}}function rB(e,t={}){const{side:n}=RO(e),r=t.offset??eB,s=t.scale??J9;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 iB(e,t){return{opacity:0,transform:rB(e,t)}}function sB(e){return{transformOrigin:nB(e),transitionTimingFunction:tB}}function oB({closeDuration:e=mT.close,transform:t}={}){return{duration:{open:mT.open,close:e},initial:({placement:n})=>iB(n,t),common:({placement:n})=>sB(n)}}function gT(e){switch(e){case"start":return"left";case"end":return"right";case void 0:return"center"}}function bT(e){switch(e){case"start":return"top";case"end":return"bottom";case void 0:return"center"}}const Vl="data-ui-menu-item-region",CO=v.createContext("body");function Es({value:e,children:t}){return g.jsx(CO.Provider,{value:e,children:t})}function rf(){return v.useContext(CO)}const aB='[role="menuitem"]',yT=["pointermove","mousemove"];function _O(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 AO(e,t){if(!(e===void 0||t===null||t<0))return`${e}-item-${t}`}function sf(e,t){const n=AO(e,t);return n===void 0?{}:{id:n}}function NO(e){const{"aria-activedescendant":t,...n}=e;return n}function lB(e,t){if(t==null)return null;const n=e.current[t];return n instanceof HTMLElement?n:null}function uB(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 OO(e,t,n){queueMicrotask(()=>{const r=uB(e,t);n(r??null)})}function IO(e,t){if(!(e instanceof Element))return null;const n=e.closest(aB);if(!n)return null;const r=t.current.indexOf(n);return r>=0?r:null}function cB(e,t){if(!e)return()=>{};for(const n of yT)e.addEventListener(n,t,{passive:!0});return()=>{for(const n of yT)e.removeEventListener(n,t)}}function fB({event:e,direction:t,activeIndex:n,listRef:r,restoreFocus:s}){const a=lB(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 MO(e,t){return v.useCallback(n=>{const r=e(n);if(t)return r;const{onPointerLeave:s,...a}=r;return a},[e,t])}function DO(){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 dB=360,LO="--ui-menu-available-width",z0="--ui-menu-available-height",pB=new Set(["none","auto","initial","inherit","unset","revert","revert-layer","min-content","max-content","fit-content","stretch"]);function jO(e){const t=`var(${z0}, 100vh)`;return e==null||hB(e)?t:`min(${pl(e)}, ${t})`}function hB(e){return typeof e=="string"&&pB.has(e.trim().toLowerCase())}const mB="320px";function pl(e){return typeof e=="number"?`${e}px`:e}function ty(e){return`min(${e}, var(${LO}, 100vw))`}function P0(e){const{width:t,minWidth:n,maxWidth:r,clampToAvailableWidth:s=!1}=e,l=t===void 0&&(n!==void 0||r!==void 0)?"max-content":pl(t??"200px");return s?{width:l==="max-content"?l:ty(l),...n!=null&&{minWidth:ty(pl(n))},maxWidth:ty(r!=null?pl(r):mB)}:{width:l,...n!=null&&{minWidth:pl(n)},...r!=null&&{maxWidth:pl(r)}}}const gB=50;function $0({isOpen:e,isPositioned:t}){return e&&!t?{opacity:0}:void 0}function bB(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 yB(){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 Xh(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 vB={open:0,close:0},xB={opacity:1,transform:"none"},F0=v.createContext(null);function Sa(e){const t=v.useContext(F0);if(!t)throw new Error(`${e} must be used within LegacyMenu`);return t}function zO(){return Sa("LegacyMenu.useContext")}function kB({children:e,open:t,defaultOpen:n=!1,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l="bottom-start",offset:c=4,flip:d=!0,closeOnSelect:f,instantClose:h=!1,instantTransitions:m=!1,returnFocusOnSelect:b=!0,returnFocus:y,focusItemOnOpen:k=!1,virtualFocus:S=!1,shouldKeepOpenDuringDrag:T=!1,lockPositionWhileOpen:R=!1,dismissOnReferenceScroll:E=!1,enableClick:_=!0,strategy:C,shouldDismissOutsidePress:D}){const N=N0(),[M,B]=Dl(t,n,r,"LegacyMenu.Root (open)"),[P,A]=v.useState(""),K=v.useRef(null),[$,F]=v.useState(!1),[z,U]=v.useState(!1),[q,W]=Dl(s,null,a,"LegacyMenu.Root (activeIndex)"),{focusItemOnHoverEnabled:H,markKeyboardNavigation:Y,markPointerNavigation:O,resetFocusItemOnHover:j}=DO(),V=v.useRef([]),L=v.useRef([]),Z=v.useRef(null),se=v.useCallback(Le=>{B(Le),Le?(A(""),Z.current=null):W(null),j()},[j,B,W]),ne=v.useRef(!1);v.useLayoutEffect(()=>{const Le=ne.current;ne.current=M,!Le&&M&&A(""),Le!==M&&j()},[M,j]);const{refs:oe,floatingStyles:ae,middlewareData:ue,context:we,update:me}=L0({nodeId:N,open:M,onOpenChange:se,placement:l,strategy:C,middleware:[a0(c),...d?[u0()]:[],l0(),c0({padding:8,apply({availableHeight:Le,elements:Ke}){Ke.floating.style.setProperty(z0,`${Math.max(0,Math.floor(Le))}px`)}}),yB()],whileElementsMounted:R?void 0:jp,transform:!1}),ce=IN(we,{enabled:z,delay:{open:75},handleClose:qN({blockPointerEvents:!0,requireIntent:!1})}),be=jN(we,{enabled:_&&!z}),ve=Xh(),Re=v.useCallback(Le=>D!==void 0&&!D(Le)||T&&bi.getInstance().hasData()?!1:ve(Le),[D,T,ve]),Se=zN(we,{ancestorScroll:E,outsidePressEvent:"click",outsidePress:Re}),ke=FN(we,{role:"menu"}),Ae=$N(we,{listRef:V,activeIndex:q,onNavigate:W,loop:!1,virtual:S||$,focusItemOnOpen:k,focusItemOnHover:H}),Oe=UN(we,{listRef:L,activeIndex:q,onMatch:$?void 0:W,enabled:!$}),{getReferenceProps:Me,getFloatingProps:Ue,getItemProps:xe}=PN([ce,be,Se,ke,Ae,Oe]),_e=MO(xe,M),ee=v.useCallback(Le=>({...NO(Me(Le)),ref:oe.setReference,"aria-haspopup":"menu","aria-expanded":M}),[Me,oe.setReference,M]),fe=m?{duration:vB,initial:xB}:oB(h?{closeDuration:0}:void 0),{isMounted:J,styles:re}=BN(we,fe),Te=v.useMemo(()=>({isOpen:M,isMounted:J,setIsOpen:B,activeIndex:q,setActiveIndex:W,markKeyboardNavigation:Y,markPointerNavigation:O,virtualFocus:S,searchValue:P,setSearchValue:A,hasSearchInput:$,setHasSearchInput:F,enableHover:z,setHasHoverTrigger:U,closeOnSelect:f,returnFocusOnSelect:b,returnFocus:y,nodeId:N,activeDescendantIdPrefix:$?N:void 0,listRef:V,labelsRef:L,searchInputRef:K,refs:oe,floatingStyles:ae,middlewareData:ue,transitionStyles:re,context:we,updateFloating:me,getReferenceProps:Me,getFloatingProps:Ue,getItemProps:_e,getTriggerProps:ee,dismissCauseRef:Z,shouldAllowPointerInteraction:Re}),[M,J,B,q,W,Y,O,S,P,$,z,f,b,y,N,oe,ae,ue,re,we,me,Me,Ue,_e,ee,Re]);return g.jsx(O0,{id:N,children:g.jsx(F0.Provider,{value:Te,children:e})})}function Yu(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 SB=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),wB={_zod:{output:{}},safeParse:e=>SB(e)?{success:!0}:{success:!1,error:new TypeError("drag payload must be an object")}};function PO(e,t=()=>wB){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 EB=v.createContext(null);function TB(){return v.useContext(EB)}const RB=v.createContext("copy-with-plain-text");function CB(){return v.useContext(RB)}const _B="application/x-cursor-draggable",Gd=NB("ui-i9pz9s"),AB="data-no-drag";let ta=!1,vT=!1,xT=null;function kT(){return xT??=Object.assign(new Image(1,1),{src:"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}),xT}function NB(e){return e?.split(/\s+/).filter(Boolean)??[]}function Wd(e,t,n){for(const r of t)e.classList.toggle(r,n)}function OB(){if(vT||typeof document>"u")return;vT=!0,document.addEventListener("pointerdown",t=>{if(t.button!==0||!(t.target instanceof Element)){ta=!1;return}ta=t.target.closest(`[${AB}]`)!==null},{capture:!0});const e=()=>{ta=!1};document.addEventListener("pointerup",e,{capture:!0}),document.addEventListener("pointercancel",e,{capture:!0})}function IB({id:e,data:t,disabled:n=!1,dragImageOffset:r,hideNativeDragImage:s=!1,onDragStart:a,onDragEnd:l}){const c=TB(),d=CB(),f=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&&kT()},[s]);const k=v.useRef(c);k.current=c;const S=c?.activeDragId===e,T=v.useRef(S);return T.current=S,v.useEffect(()=>{const E=f.current;if(E)return Wd(E,Gd,!n&&S),()=>{Wd(E,Gd,!1)}},[n,S]),v.useEffect(()=>{const E=f.current;if(!E)return;if(n){E.removeAttribute("aria-grabbed");return}const _=S?"true":"false";E.getAttribute("aria-grabbed")!==_&&E.setAttribute("aria-grabbed",_)},[n,S]),{ref:v.useCallback(E=>{if(f.current=E,!E)return;Wd(E,Gd,!n&&T.current);const _=!n;if(E.draggable!==_&&(E.draggable=_),n)return;OB();const C=bi.getInstance(),D=M=>{if(ta){ta=!1,M.preventDefault(),M.stopPropagation();return}const B=m.current;C.setData(B);const P=E.ownerDocument,A=()=>{P.removeEventListener("dragend",A,!0),P.removeEventListener("drop",A,!0),P.removeEventListener("mousemove",A,!0),setTimeout(()=>{C.getData()===B&&(C.clearData(),ta=!1,k.current?.setDragging(null,null))},0)};if(P.addEventListener("dragend",A,!0),P.addEventListener("drop",A,!0),P.addEventListener("mousemove",A,!0),M.dataTransfer){const K=d==="copy-with-plain-text";M.dataTransfer.effectAllowed=K?"copyMove":"move",M.dataTransfer.setData(_B,B.type),K&&M.dataTransfer.setData("text/plain",B.type);const $=b.current;y.current?M.dataTransfer.setDragImage(kT(),0,0):$&&M.dataTransfer.setDragImage(E,$.x,$.y)}k.current?.setDragging(e,B,{x:M.clientX,y:M.clientY}),h.current.onDragStart?.(M)},N=M=>{C.clearData(),ta=!1,k.current?.setDragging(null,null),h.current.onDragEnd?.(M)};return E.addEventListener("dragstart",D),E.addEventListener("dragend",N),()=>{E.removeEventListener("dragstart",D),E.removeEventListener("dragend",N),Wd(E,Gd,!1)}},[e,n,d]),isDragging:S}}const wp={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}},MB={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}},xi={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}},Bi={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}},Xi={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}},eh={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}},DB={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}},LB={row:{kLKAdn:"ui-fs8kq3",kwRFfy:"ui-yupq46",kGO01o:"ui-b6dno7",kZCmMZ:"ui-1xc7y5k",$$css:!0}},tv={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}},th={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 jB(e,t=!1){return[aN,wp.base,Cs.root,e==="md"&&wp.sizeMd,t&&wp.hasAttachment]}function zB(e=!1){return e&&wp.dropIndicator}function PB(){return MB.base}function $B(){return xi.inner}function FB(){return xi.dropIndicatorSlot}function BB(e=!1){return[xi.layout,e&&xi.layoutCard,e&&$h.border]}function UB(){return[xi.attachment,$h.border]}function $O(){return xi.bodyScroll}function HB(){return xi.header}function qB(){return xi.footer}function VB(e=!1){return[xi.list,e&&xi.virtualizedList]}function GB(){return xi.virtualizedRow}function WB(){return xi.virtualizedScroller}function B0(e={}){return[Bi.base,e.selected&&Bi.selected,e.inSubmenu&&!e.disabled&&Bi.submenuHover,e.focused&&Bi.focused,e.expanded&&Bi.expanded,e.disabled&&Bi.disabled,e.disabled&&e.focused&&Bi.disabledFocused,e.variant==="muted"&&Bi.muted,e.variant==="muted"&&e.focused&&Bi.mutedFocused,e.indent&&Bi.indent]}const KB={disabled:{kkrTdU:"ui-1h6gzvc",$$css:!0}};function YB(){return KB.disabled}function XB(e={}){return[Xi.left,e.wideLeft&&Xi.leftWide]}function ZB(){return Xi.content}function QB(e={}){return[Xi.right,e.disabled&&Xi.rightDisabled,e.trailingHidden&&Xi.rightHidden]}function JB(){return Xi.submenuRight}function e8(){return Xi.wrapper}function t8(){return[ql.root,Xi.title]}function n8(){return[Ms.root,ql.root,Xi.description]}function r8(e){return[ra.wrapper,e&&ra.wrapperInline]}function i8(e){return[ql.root,ra.title,e&&ra.titleInline]}function s8({inline:e,wrap:t}){return[Ms.root,ql.root,ra.subtitle,e&&ra.subtitleInline,t&&ra.subtitleWrap]}function o8(){return LB.row}function a8(){return eh.wrapper}function l8(e){return[Ms.root,eh.title,e&&eh.titleAction]}function u8(){return eh.textAction}function c8(){return DB.divider}function U0(){return tv.surface}function FO(e){switch(e){case"default":return;case"medium":return tv.surfaceMedium;case"wide":return tv.surfaceWide;default:return e}}function f8(e){return[Ms.root,th.empty,e&&th.emptyIndent]}function d8(){return[Cs.root,th.loading]}function p8(){return th.loadingSpinner}function h8(e){let t=e;const n=new Set;return{get:()=>t,set:r=>{if(r!==t){t=r;for(const s of n)s()}},subscribe:r=>(n.add(r),()=>{n.delete(r)})}}const BO=v.createContext(null);function of(e){const t=v.useContext(BO);if(!t)throw new Error(`${e} must be used within LegacyMenu.Content or LegacyMenu.SubMenuContent`);return t}function Zh(e,t){const n=()=>e.get()===t;return v.useSyncExternalStore(e.subscribe,n,n)}function UO({children:e,activeIndex:t,setIsOpen:n,getItemProps:r,searchValue:s,closeOnSelect:a,virtualFocus:l=!1,activeDescendantIdPrefix:c,shouldAllowPointerInteraction:d,closeMenuLayersOnSelect:f}){const[h]=v.useState(()=>h8(t));v.useLayoutEffect(()=>{h.set(t)},[h,t]);const m=v.useMemo(()=>({activeIndexStore:h,setIsOpen:n,getItemProps:r,searchValue:s,closeOnSelect:a,virtualFocus:l,activeDescendantIdPrefix:c,shouldAllowPointerInteraction:d,closeMenuLayersOnSelect:f}),[h,n,r,s,a,l,c,d,f]);return g.jsx(BO.Provider,{value:m,children:e})}const HO=v.createContext(void 0);function Qh(e){const t=v.useContext(HO);if(t===void 0&&!e)throw new Error(In(72));return t}const m8={...mA,disabled:st(e=>e.disabled),instantType:st(e=>e.instantType),isInstantPhase:st(e=>e.isInstantPhase),trackCursorAxis:st(e=>e.trackCursorAxis),disableHoverablePopup:st(e=>e.disableHoverablePopup),lastOpenChangeReason:st(e=>e.openChangeReason),closeOnClick:st(e=>e.closeOnClick),closeDelay:st(e=>e.closeDelay),hasViewport:st(e=>e.hasViewport)};class H0 extends p0{constructor(t,n,r=!1){const s=new Nh,a={...g8(),...t};a.floatingRootContext=pA(s,n,r),super(a,{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:s},m8)}setOpen=(t,n)=>{oA(this,t,n,{extraState:{openChangeReason:n.reason}})};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,Ct(Fl,t))}static useStore(t,n){return sA(t,(s,a)=>new H0(n,s,a)).store}}function g8(){return{...dA(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}const b8=d0(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:s,disableHoverablePopup:a=!1,trackCursorAxis:l="none",actionsRef:c,onOpenChange:d,onOpenChangeComplete:f,handle:h,triggerId:m,defaultTriggerId:b=null,children:y}=t,k=H0.useStore(h?.store,{open:r,openProp:s,activeTriggerId:b,triggerIdProp:m});aA(k,s,r,b),k.useControlledProp("openProp",s),k.useControlledProp("triggerIdProp",m),k.useContextCallback("onOpenChange",d),k.useContextCallback("onOpenChangeComplete",f);const S=k.useState("open"),T=!n&&S,R=k.useState("activeTriggerId"),E=k.useState("mounted"),_=k.useState("payload");k.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:a}),k.useSyncedValue("disabled",n),uA(k,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:C,transitionStatus:D}=cA(T,k),N=k.useState("isInstantPhase"),M=k.useState("instantType"),B=k.useState("lastOpenChangeReason"),P=v.useRef(null);Fe(()=>{S&&n&&k.setOpen(!1,Ct(h_))},[S,n,k]),Fe(()=>{D==="ending"&&B===Oi||D!=="ending"&&N?(M!=="delay"&&(P.current=M),k.set("instantType","delay")):P.current!==null&&(k.set("instantType",P.current),P.current=null)},[D,N,B,M,k]),Fe(()=>{T&&R==null&&k.set("payload",void 0)},[k,R,T]);const A=v.useCallback(()=>{k.setOpen(!1,Ct(Ap))},[k]);v.useImperativeHandle(c,()=>({unmount:C,close:A}),[C,A]);const K=T||E||!n&&l!=="none";return g.jsxs(HO.Provider,{value:k,children:[K&&g.jsx(y8,{store:k,disabled:n,trackCursorAxis:l}),typeof y=="function"?y({payload:_}):y]})});function y8({store:e,disabled:t,trackCursorAxis:n}){const r=e.useState("floatingRootContext"),s=s0(r,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),a=$P(r,{enabled:!t&&n!=="none",axis:n==="none"?void 0:n}),l=v.useMemo(()=>Ki(a.reference,s.reference),[a.reference,s.reference]),c=v.useMemo(()=>Ki(a.trigger,s.trigger),[a.trigger,s.trigger]),d=v.useMemo(()=>Ki(h0,a.floating,s.floating),[a.floating,s.floating]);return fA(e,{activeTriggerProps:l,inactiveTriggerProps:c,popupProps:d}),null}const v8=v.createContext(void 0);function x8(){return v.useContext(v8)}let k8=(function(e){return e[e.popupOpen=_p.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const S8=600,qO="data-base-ui-tooltip-trigger";function ST(e){if("composedPath"in e){const n=e.composedPath();for(let r=0;r<n.length;r+=1){const s=n[r];if(vt(s))return s}}const t=e.target;return vt(t)?t:null}function w8(e){let t=e;for(;t;){if(t.hasAttribute(qO))return t;const n=t.parentElement;if(n){t=n;continue}const r=t.getRootNode();t="host"in r&&vt(r.host)?r.host:null}return null}const E8=nA(function(t,n){const{render:r,className:s,style:a,handle:l,payload:c,disabled:d,delay:f,closeOnClick:h=!0,closeDelay:m,id:b,...y}=t,k=Qh(!0),S=l?.store??k;if(!S)throw new Error(In(82));const T=Bl(b),R=S.useState("isTriggerActive",T),E=S.useState("isOpenedByTrigger",T),_=S.useState("floatingRootContext"),C=v.useRef(null),D=f??S8,N=m??0,{registerTrigger:M,isMountedByThisTrigger:B}=lA(T,C,S,{payload:c,closeOnClick:h,closeDelay:N}),P=x8(),{delayRef:A,isInstantPhase:K,hasProvider:$}=nP(_,{open:E}),F=b0(_);S.useSyncedValue("isInstantPhase",K);const z=S.useState("disabled"),U=d??z,q=On(U),W=S.useState("trackCursorAxis"),H=S.useState("disableHoverablePopup"),Y=v.useRef(!1),O=yi(),j=v.useRef(void 0);function V(){const ce=P?.delay,be=typeof A.current=="object"?A.current.open:void 0;let ve=D;return $&&(be!==0?ve=f??ce??D:ve=0),ve}function L(ce){const be=C.current;if(!be||!ce)return!1;const ve=w8(ce);return ve!==null&&ve!==be&&bt(be,ve)}function Z(ce){const be=L(ce);return Y.current=be,be&&(F.openChangeTimeout.clear(),F.restTimeout.clear(),F.restTimeoutPending=!1,O.clear()),be}const se=xA(_,{enabled:!U,mouseOnly:!0,move:!1,handleClose:!H&&W!=="both"?kA():null,restMs:V,delay(){const ce=typeof A.current=="object"?A.current.close:void 0;let be=N;return m==null&&$&&(be=ce),{close:be}},triggerElementRef:C,isActiveTrigger:R,isClosing:()=>S.select("transitionStatus")==="ending",shouldOpen(){return!Y.current}}),ne=bA(_,{enabled:!U}).reference,oe=ce=>{const be=Y.current,ve=ST(ce),Re=Z(ve),Se=C.current,ke=Se&&ve&&bt(Se,ve);if(Re&&S.select("open")&&S.select("lastOpenChangeReason")===Tr){S.setOpen(!1,Ct(Tr,ce));return}if(be&&!Re&&ke&&!q.current&&!S.select("open")&&Se&&oa(j.current)){const Ae=()=>{!Y.current&&!q.current&&!S.select("open")&&S.setOpen(!0,Ct(Tr,ce,Se))},Oe=V();Oe===0?(O.clear(),Ae()):O.start(Oe,Ae)}},ae=S.useState("triggerProps",B);return gn("button",t,{state:{open:E},ref:[n,M,C],props:[se,ne,B||W!=="none"?ae:void 0,{onMouseOver(ce){oe(ce.nativeEvent)},onFocus(ce){L(ST(ce.nativeEvent))&&ce.preventBaseUIHandler()},onMouseLeave(){Y.current=!1,O.clear(),j.current=void 0},onPointerEnter(ce){j.current=ce.pointerType},onPointerDown(ce){j.current=ce.pointerType,S.set("closeOnClick",h),h&&!S.select("open")&&S.cancelPendingOpen(ce.nativeEvent)},onClick(ce){h&&!S.select("open")&&S.cancelPendingOpen(ce.nativeEvent)},id:T,[k8.triggerDisabled]:U?"":void 0,[qO]:U?void 0:""},y],stateAttributesMapping:c_})}),VO=v.createContext(void 0);function T8(){const e=v.useContext(VO);if(e===void 0)throw new Error(In(70));return e}const R8=v.forwardRef(function(t,n){const{keepMounted:r=!1,...s}=t;return Qh().useState("mounted")||r?g.jsx(VO.Provider,{value:r,children:g.jsx(nO,{ref:n,...s})}):null}),GO=v.createContext(void 0);function C8(){const e=v.useContext(GO);if(e===void 0)throw new Error(In(71));return e}const _8=v.forwardRef(function(t,n){const{render:r,className:s,anchor:a,positionMethod:l="absolute",side:c="top",align:d="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:b=5,arrowPadding:y=5,sticky:k=!1,disableAnchorTracking:S=!1,collisionAvoidance:T=L_,style:R,...E}=t,_=Qh(),C=T8(),D=_.useState("open"),N=_.useState("mounted"),M=_.useState("trackCursorAxis"),B=_.useState("disableHoverablePopup"),P=_.useState("floatingRootContext"),A=_.useState("instantType"),K=_.useState("transitionStatus"),$=_.useState("hasViewport"),F=C0({anchor:a,positionMethod:l,floatingRootContext:P,mounted:N,side:c,sideOffset:f,align:d,alignOffset:h,collisionBoundary:m,collisionPadding:b,sticky:k,arrowPadding:y,disableAnchorTracking:S,keepMounted:C,collisionAvoidance:T,adaptiveOrigin:$?QA:void 0}),z=v.useMemo(()=>({open:D,side:F.side,align:F.align,anchorHidden:F.anchorHidden,instant:M!=="none"?"tracking-cursor":A}),[D,F.side,F.align,F.anchorHidden,M,A]),U=_0(t,z,{styles:F.positionerStyles,transitionStatus:K,props:E,refs:[n,_.useStateSetter("positionerElement")],hidden:!N,inert:!D||M==="both"||B});return g.jsx(GO.Provider,{value:F,children:U})}),A8={...Gc,...To},N8=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,c=Qh(),{side:d,align:f}=C8(),h=c.useState("open"),m=c.useState("instantType"),b=c.useState("transitionStatus"),y=c.useState("popupProps"),k=c.useState("floatingRootContext"),S=c.useState("disabled"),T=c.useState("closeDelay");_o({open:h,ref:c.context.popupRef,onComplete(){h&&c.context.onOpenChangeComplete?.(!0)}}),vA(k,{enabled:!S,closeDelay:T});const R=c.useStateSetter("popupElement");return gn("div",t,{state:{open:h,side:d,align:f,instant:m,transitionStatus:b},ref:[n,c.context.popupRef,R],props:[y,jh(b),l],stateAttributesMapping:A8})}),O8=v.createContext(null),I8={base:{kfSwDN:"ui-87ps6o",kfzvcC:"ui-47corl",$$css:!0}},WO=v.createContext(null);function KO(e){const t=v.use(WO);if(t===null)throw new Error(`${e} must be used within Tooltip.Root`);return t}function YO({children:e,placement:t=Fh,offset:n=8,openDelay:r=SF,closeDelay:s=Bh,disabled:a=!1,defaultOpen:l,open:c,sameAxisOnly:d=!1,onOpenChange:f,onOpenChangeComplete:h}){const m=v.use(O8),b=v.use(Qp),y=a||b,k=m?.open??r,S=m?.close??s,T=v.useRef(null),R=v.useMemo(()=>({close:()=>{T.current?.close()}}),[]),[E,_]=v.useState(),C=(N,M)=>{f?.(N,M),M.isCanceled||_(N?M.trigger?.id:void 0)},D=v.useMemo(()=>({disabled:y,instantDismiss:b,offset:n,openTriggerId:E,placement:t,sameAxisOnly:d,scrollDismissHandle:R,triggerCloseDelay:S,triggerDelay:k}),[y,b,n,E,t,d,R,S,k]);return g.jsx(WO.Provider,{value:D,children:g.jsx(b8,{actionsRef:T,defaultOpen:l,disabled:y,disableHoverablePopup:!0,onOpenChange:C,onOpenChangeComplete:h,open:c,children:e})})}function XO({children:e,ref:t,...n}){const{disabled:r,triggerCloseDelay:s,triggerDelay:a}=KO("Tooltip.Trigger"),l=e.props?.id;return g.jsx(E8,{...n,closeDelay:s,delay:a,disabled:r,id:l??n.id,ref:t,render:e})}function ZO({content:e,anchor:t,ariaLabel:n,width:r,minWidth:s,maxWidth:a}){const{instantDismiss:l,offset:c,openTriggerId:d,placement:f,sameAxisOnly:h,scrollDismissHandle:m}=KO("Tooltip.Popup"),b=va(),y=fO(m,d),{side:k,align:S,sideOffset:T,alignOffset:R,collisionAvoidance:E,positionMethod:_}=Uh(f,c,h),C=Ph(S4),D=zt(A0,oN,w4,I8.base,zh);return l?null:g.jsx(R8,{container:b??void 0,children:g.jsx(_8,{align:S,alignOffset:R,anchor:t,className:C.className,collisionAvoidance:E,collisionPadding:8,positionMethod:_,side:k,sideOffset:T,style:C.style,children:g.jsx(N8,{"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 M8({children:e,anchor:t,"aria-label":n,width:r,minWidth:s,maxWidth:a}){return g.jsx(ZO,{anchor:t,ariaLabel:n,content:e,maxWidth:a,minWidth:s,width:r})}function nv({children:e,content:t,placement:n,offset:r,openDelay:s,closeDelay:a,disabled:l,defaultOpen:c,open:d,"aria-label":f,width:h,minWidth:m,maxWidth:b,sameAxisOnly:y,onOpenChange:k,onOpenChangeComplete:S,ref:T,...R}){const E=v.Children.only(e);return v.isValidElement(E)?g.jsxs(YO,{closeDelay:a,defaultOpen:c,disabled:l,offset:r,onOpenChange:k,onOpenChangeComplete:S,open:d,openDelay:s,placement:n,sameAxisOnly:y,children:[g.jsx(XO,{...R,ref:T,children:E}),g.jsx(ZO,{ariaLabel:f,content:t,maxWidth:b,minWidth:m,width:h})]}):g.jsx(g.Fragment,{children:e})}(function(e){e.Root=YO,e.Trigger=XO,e.Popup=M8})(nv||(nv={}));const D8="ui-menu",q0="ui-menu__backdrop",L8="ui-menu__list",j8="ui-menu__content",z8="ui-menu__drop-indicator-slot",P8="ui-menu__layout",QO="ui-menu__body-scroll",$8="ui-menu__header",F8="ui-menu__footer",B8="ui-menu__attachment",U8="ui-menu__row",H8="ui-menu__item-left",q8="ui-menu__item-content",V8="ui-menu__item-right",G8="ui-menu__item-wrapper",W8="ui-menu__item-title",K8="ui-menu__item-description",Y8="ui-menu__text-wrapper",X8="ui-menu__title",Z8="ui-menu__subtitle",Q8="ui-menu__search-row",J8="ui-menu__section",e7="ui-menu__section-title",t7="ui-menu__section-text-action",n7="ui-menu__virtualized-section-divider",r7="ui-menu__submenu-trigger",i7="ui-menu__submenu-right-section",s7="ui-menu__toggle-row",o7="ui-menu__tooltip",a7="ui-menu__empty",l7="ui-menu__loading",u7="ui-menu__loading-spinner",c7="ui-menu__virtualized-row",f7="ui-menu__virtualized-scroller";function tn(e,t,n={}){return Xt({rootClass:e,stylexStyles:t,className:n.className,style:n.style})}function V0({className:e,hasDropIndicator:t=!1,size:n,style:r,hasAttachment:s=!1,surfaceStyle:a}){return a=[zB(t),a],tn(D8,[jB(n,s),a],{className:e,style:r})}function JO(e){return tn(q0,PB(),{style:e})}function G0(e=!1,t){return tn(L8,[VB(e),t],{className:e?"ui-menu__list--virtualized":void 0})}function W0(e){return tn(j8,[$B(),e])}function d7(){return tn(z8,FB())}function K0(e,t=!1,n){return tn(P8,[BB(t),n],{style:e})}function p7(){return tn(B8,UB())}function Y0(){return tn($8,HB())}function X0(){return tn(F8,qB())}function Z0(e={},t){return tn(U8,[{"ui--default-marker":"ui--default-marker",$$css:!0},B0(e),t],{className:e.className})}function h7(e={},t){return tn(s7,[B0(e),e.disabled&&YB(),t],{className:e.className})}function m7(e={}){return tn(r7,B0(e),{className:e.className})}function g7(e={},t){return tn(H8,[XB(e),t])}function b7(e){return tn(q8,[ZB(),e])}function y7(e={},t){return tn(V8,[QB(e),t])}function Q0(){return tn(G8,e8())}function J0(){return tn(W8,t8())}function ex(){return tn(K8,n8())}function v7(e){return tn(Y8,r8(e))}function x7(e){return tn(X8,i8(e))}function k7({inline:e,wrap:t}){return tn(Z8,s8({inline:e,wrap:t}))}function S7(e,t){return tn(Q8,[o8(),t],{className:e})}function w7(e){return tn(J8,[a8(),e])}function eI(e,t){return tn(e7,[l8(e),t])}function E7(){return tn(t7,u8())}function T7(){return tn(n7,c8())}function R7(){return tn(i7,JB())}function C7(e,t){return tn(a7,[f8(e),t])}function _7(){return tn(l7,d8())}function A7(){return tn(c7,GB())}function N7(){return tn(f7,WB())}const O7=tn(u7,p8()).className,nh="submenuOpenChange",tx=v.createContext(null);function nx(e){return Math.max(e,Bh)}function rx(){return v.use(tx)}function ix({children:e,layerNodeId:t,placement:n="right-start"}){const r=No(),[s,a]=v.useState(new Set);v.useEffect(()=>{if(!r)return;const d=f=>{f.parentId===t&&a(h=>{const m=new Set(h);return f.isOpen?m.add(f.nodeId):m.delete(f.nodeId),m})};return r.events.on(nh,d),()=>{r.events.off(nh,d)}},[r,t]);const l=s.size>0,c=v.useMemo(()=>({hasOpenChild:l}),[l]);return g.jsx(tx.Provider,{value:c,children:g.jsx(Cc,{offset:6,placement:n,sameAxisOnly:!0,children:e})})}function I7({content:e,surfaceStyle:t}){return g.jsx(Cc.Popup,{surfaceClassName:o7,surfaceStyle:[U0(),t],children:typeof e=="function"?e():e})}function tI({children:e,content:t,contentKey:n,disabled:r=!1,openDelay:s=0,closeDelay:a=0,surfaceStyle:l}){const c=v.use(tx);return c==null?g.jsx(g.Fragment,{children:e}):g.jsx(Cc.Trigger,{closeDelay:nx(a),content:g.jsx(I7,{content:t,surfaceStyle:l}),contentKey:n,openDelay:s,disabled:r||c.hasOpenChild,children:e})}function M7(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(nh,s),()=>{t&&n.events.emit(nh,{nodeId:e,parentId:r,isOpen:!1})}},[n,e,r,t])}function af({children:e,content:t,contentKey:n,disabled:r=!1,openDelay:s=0,closeDelay:a=0,interactive:l=!0,surfaceStyle:c}){return rx()!=null?g.jsx(tI,{closeDelay:a,content:t,contentKey:n,disabled:r,openDelay:s,surfaceStyle:c,children:e}):l?g.jsx(cO,{closeDelay:nx(a),content:t,disabled:r,offset:6,openDelay:s,placement:"right",sameAxisOnly:!0,surfaceStyle:[U0(),c],children:e}):g.jsx(nv,{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:d,contentStyle:f,trailingStyle:h}){const m=r??s,b=m!=null||a!=null,y=g7({wideLeft:c},d),k=b7(f),S=y7({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 nI=v.createContext(!1);function lf(){return v.useContext(nI)}function sx(e,t,n){const{searchValue:r}=of(n);return t||!r||!e?!0:e.toLowerCase().includes(r.toLowerCase())}const D7=PO("@@menu-item-noop"),L7=new D7({}),rI=v.createContext(null);function j7(){return v.useContext(rI)}function iI({children:e,label:t,ignoreSearch:n=!1,...r}){const s=t??(typeof e=="string"?e:"");return sx(s,n,"LegacyMenu.Item")?g.jsx(sI,{...r,contextPart:"LegacyMenu.Item",itemLabel:s,children:e}):null}function sI({children:e,"data-testid":t,"aria-haspopup":n,"aria-expanded":r,mentionMenuFlatIndex:s,disabled:a=!1,onMouseDown:l,onAuxClick:c,onSelect:d,onKeyDown:f,leading:h,trailing:m,tooltip:b,tooltipDisabled:y=!1,tooltipOpenDelay:k=0,tooltipCloseDelay:S=0,tooltipSurface:T="default",closeOnSelect:R,description:E,rootStyle:_,leadingStyle:C,contentStyle:D,trailingStyle:N,variant:M="default",trailingVisibility:B="always",selected:P=!1,radioChecked:A,indent:K=!1,wideLeftSection:$=!1,draggable:F,ref:z,itemLabel:U,referenceRef:q,itemPropsTransform:W,trailingAccessory:H,contextPart:Y}){const{activeIndexStore:O,shouldAllowPointerInteraction:j,closeMenuLayersOnSelect:V,setIsOpen:L,getItemProps:Z,closeOnSelect:se,virtualFocus:ne,activeDescendantIdPrefix:oe}=of(Y),ae=lf(),ue=rf(),we=Li(),me=ue==="body",ce=R??se??!0,{ref:be,index:ve}=qh({label:U||null}),Re=Zh(O,ve),[Se,ke]=v.useState(!1);rx();const Ae=v.useRef(null),Oe=v.useId(),Me=F!=null,Ue=F?.mode==="pointer",xe=v.useSyncExternalStore(bi.subscribe,bi.isDragActive,bi.isDragActive),_e=v.useRef(null),ee=v.useRef(null),fe=v.useRef(null),J=v.useRef(null),re=v.useRef(!1),[Te,Le]=v.useState(null),{ref:Ke,isDragging:Qe}=IB({id:F?.id??`menu-item-${Oe}`,data:F?.data??L7,disabled:!Me||Ue||(F?.disabled??!1),dragImageOffset:F?.dragImageOffset,onDragStart:F?.onDragStart,onDragEnd:F?.onDragEnd}),gt=Qc([be,q,z,Me&&!Ue?Ke:null]),Je=v.useCallback(Xe=>{Ae.current=Xe},[]),xt=v.useMemo(()=>({setSubMenuOpen:ke,isSubMenuOpen:Se,registerSubMenuOpener:Je}),[Se,Je]),Rt=FO(T);v.useEffect(()=>()=>{_e.current?.(),fe.current!=null&&cancelAnimationFrame(fe.current)},[]);const rt=v.useCallback(()=>{fe.current=null;const Xe=ee.current,It=J.current;!Xe||!It||(Xe.style.transform=`translate3d(${It.x+8}px, ${It.y+8}px, 0)`)},[]),et=v.useCallback(Xe=>{J.current=Xe,fe.current==null&&(fe.current=requestAnimationFrame(rt))},[rt]),ze=v.useCallback(Xe=>{ee.current=Xe,rt()},[rt]),He=()=>{if(a)return;const Xe={defaultPrevented:!1,preventDefault:()=>{Xe.defaultPrevented=!0}};d?.(Xe),ce&&!Xe.defaultPrevented&&V(L)},Ze=Xe=>{if(re.current){re.current=!1,Xe.preventDefault(),Xe.stopPropagation();return}if(!j(Xe.nativeEvent)){Xe.preventDefault(),Xe.stopPropagation();return}He()},ft=v.useCallback(Xe=>{if(!j(Xe.nativeEvent)){Xe.preventDefault(),Xe.stopPropagation();return}if(l?.(Xe),!Xe.defaultPrevented){if(Ue&&F!=null&&!F.disabled&&Xe.button===0){_e.current?.();const It=bi.getInstance(),ut=Xe.currentTarget,kn={clientX:Xe.clientX,clientY:Xe.clientY,isDragging:!1},Yn=()=>{document.removeEventListener("mousemove",Xn,!0),document.removeEventListener("mouseup",tr,!0),fe.current!=null&&(cancelAnimationFrame(fe.current),fe.current=null),J.current=null,_e.current=null,It.clearData(),setTimeout(()=>{re.current=!1},0)},Xn=Sn=>{const Hr=Sn.clientX-kn.clientX,ji=Sn.clientY-kn.clientY;if(!(!kn.isDragging&&Math.hypot(Hr,ji)<4)){if(!kn.isDragging){kn.isDragging=!0,re.current=!0,It.setData(F.data);const Bn=ut.getBoundingClientRect().width;et({x:Sn.clientX,y:Sn.clientY}),Le(Bn),F.onPointerDragStart?.(Sn)}Sn.preventDefault(),et({x:Sn.clientX,y:Sn.clientY}),F.onPointerDragMove?.(Sn)}},tr=Sn=>{if(!kn.isDragging){Yn();return}Sn.preventDefault(),Le(null),F.onPointerDragEnd?.(Sn),Yn()};_e.current=Yn,document.addEventListener("mousemove",Xn,!0),document.addEventListener("mouseup",tr,!0)}ne&&!Me&&Xe.preventDefault()}},[F,Me,Ue,l,et,j,ne]),Tt=v.useCallback(Xe=>{if(!j(Xe.nativeEvent)){Xe.preventDefault(),Xe.stopPropagation();return}c?.(Xe)},[c,j]),ot=Xe=>{a||(f?.(Xe),!Xe.defaultPrevented&&((Xe.key==="Enter"||Xe.key===" ")&&(Xe.preventDefault(),Xe.stopPropagation(),He()),Gl(Xe.key,we)==="end"&&Ae.current&&(Xe.preventDefault(),Xe.stopPropagation(),Ae.current())))},X=Z({...sf(oe,ve),onClick:Ze,onKeyDown:ot,onMouseDown:ft,onAuxClick:Tt}),he=W?.(X)??X,Ie=m!=null?g.jsx(rI.Provider,{value:xt,children:m}):void 0,tt=Q0(),_t=J0(),dt=ex(),Ve=E!=null?g.jsxs("div",{className:tt.className,style:tt.style,children:[g.jsx("div",{className:_t.className,style:_t.style,children:e}),g.jsx("div",{className:dt.className,style:dt.style,"data-component":"menu-item-description",children:E})]}):e,Be=y||xe||Se,nt=B==="focused"&&(xe||!Re),Ge=Z0({disabled:a,expanded:r===!0,focused:!xe&&Re,indent:K,inSubmenu:ae,selected:P,variant:M},_),Pe={role:A===void 0?"menuitem":"menuitemradio",tabIndex:Re?0:-1,...A!==void 0?{"aria-checked":A}:{},...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:Ue?!1:void 0,"data-disabled":a||void 0,"data-focused":!xe&&Re?!0:void 0,"data-menu-draggable":Me||void 0,"data-selected":P||void 0,"data-has-description":E!=null||void 0,"data-variant":M!=="default"?M:void 0,"data-indent":K||void 0,"data-wide-left":$||void 0,"data-dragging":Qe||Te!=null||void 0,...t?{"data-testid":t}:{},...s!==void 0?{"data-mention-menu-flat-index":String(s)}:{},[Vl]:ue,className:Ge.className,style:Ge.style,...he},ct={className:"ui-u96u03 ui-47corl ui-ixxii4 ui-13vifvy ui-u1ixa1 ui-1so62im ui-18ivbjn"},Pt=Te!=null&&F?.preview!=null?Di.createPortal(g.jsx("div",{"aria-hidden":"true",ref:ze,className:ct.className,style:{...ct.style,width:Te},children:F.preview}),document.body):null,qt=me?g.jsxs("li",{ref:gt,...Pe,children:[g.jsx(Ll,{disabled:a,leading:h,trailing:Ie,trailingAccessory:H,trailingHidden:nt,wideLeft:$,leadingStyle:C,contentStyle:D,trailingStyle:N,children:Ve}),Pt]}):g.jsxs("div",{ref:gt,...Pe,children:[g.jsx(Ll,{disabled:a,leading:h,trailing:Ie,trailingAccessory:H,trailingHidden:nt,wideLeft:$,leadingStyle:C,contentStyle:D,trailingStyle:N,children:Ve}),Pt]});return b!=null?g.jsx(af,{closeDelay:S,content:Be?null:b,disabled:Be,openDelay:k,surfaceStyle:Rt,children:qt}):qt}const oI=v.createContext(null);function aI(e){const t=v.useContext(oI);if(!t)throw new Error(`${e} must be used within LegacyMenu.ExpandableSection`);return t}function z7({children:e,defaultExpanded:t=!1,expanded:n,onExpandedChange:r}){const[s,a]=v.useState(t),l=n!==void 0,c=l?n:s,d=h=>{l||a(h),r?.(h)},f=()=>d(!c);return g.jsx(oI.Provider,{value:{expanded:c,setExpanded:d,toggle:f},children:e})}function P7({children:e,contentStyle:t,leading:n,leadingStyle:r,rootStyle:s,trailing:a,trailingStyle:l,label:c}){const{expanded:d,setExpanded:f,toggle:h}=aI("LegacyMenu.ExpandableSectionTrigger"),m=Li(),b=typeof n=="function"?n(d):n,y=k=>{const S=Gl(k.key,m);if(S==="end"&&!d){k.preventDefault(),k.stopPropagation(),f(!0);return}S==="start"&&d&&(k.preventDefault(),k.stopPropagation(),f(!1))};return g.jsx(iI,{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 $7({children:e}){const{expanded:t}=aI("LegacyMenu.ExpandableSectionContent");return t?g.jsx(g.Fragment,{children:e}):null}function F7({children:e,label:t,ignoreSearch:n,...r}){const s=t??(typeof e=="string"?e:"");return sx(s,n,"LegacyMenu.CheckboxItem")?g.jsx(B7,{...r,itemLabel:s,children:e}):null}function B7({children:e,"data-testid":t,checked:n,defaultChecked:r=!1,onChange:s,disabled:a=!1,trailing:l,description:c,tooltip:d,tooltipOpenDelay:f=0,tooltipCloseDelay:h=0,tooltipSurface:m="default",closeOnSelect:b,itemLabel:y,rootStyle:k,contentStyle:S,trailingStyle:T}){const{activeIndexStore:R,shouldAllowPointerInteraction:E,closeMenuLayersOnSelect:_,getItemProps:C,setIsOpen:D,closeOnSelect:N,activeDescendantIdPrefix:M}=of("LegacyMenu.CheckboxItem"),B=lf(),P=rf(),A=P==="body",K=b??N??!1,[$,F]=v.useState(r),z=n!==void 0,U=z?n:$,{ref:q,index:W}=qh({label:y||null}),H=Zh(R,W),Y=rx(),O=FO(m),j=v.useCallback(()=>{if(a)return;const Se=!U;z||F(Se);const ke={defaultPrevented:!1,preventDefault:()=>{ke.defaultPrevented=!0}};s?.(Se,ke),K&&!ke.defaultPrevented&&_(D)},[a,U,z,s,K,D,_]),V=v.useCallback(Se=>{if(!E(Se.nativeEvent)){Se.preventDefault(),Se.stopPropagation();return}Se.preventDefault(),Se.stopPropagation(),j()},[j,E]),L=v.useCallback(Se=>{a||(Se.key==="Enter"||Se.key===" ")&&(Se.preventDefault(),Se.stopPropagation(),j())},[a,j]),Z=C({...sf(M,W),onClick:V,onKeyDown:L}),se=c!=null,ne=Z0({disabled:a,focused:H,inSubmenu:B},k),oe={role:"menuitemcheckbox","aria-checked":U,tabIndex:H?0:-1,"aria-disabled":a||void 0,"data-checked":U||void 0,"data-component":"menu-row","data-disabled":a||void 0,"data-focused":H||void 0,"data-has-description":se||void 0,...t?{"data-testid":t}:{},[Vl]:P,className:ne.className,style:ne.style,...Z},ae=g.jsx(UA,{checked:U,disabled:a}),ue=Q0(),we=J0(),me=ex(),ce=se?g.jsxs("div",{className:ue.className,style:ue.style,children:[g.jsx("div",{className:we.className,style:we.style,children:e}),g.jsx("div",{className:me.className,style:me.style,"data-component":"menu-item-description",children:c})]}):e,be=g.jsx(Ll,{disabled:a,leading:ae,trailing:l,contentStyle:S,trailingStyle:T,children:ce}),ve=d!=null&&Y!=null,Re=A?g.jsx("li",{ref:q,...oe,children:be}):g.jsx("div",{ref:q,...oe,children:be});return ve?g.jsx(tI,{closeDelay:h,content:d,openDelay:f,surfaceStyle:O,children:Re}):d!=null?g.jsx(cO,{content:d,placement:"right",offset:6,openDelay:f,closeDelay:nx(h),sameAxisOnly:!0,surfaceStyle:[U0(),O],children:Re}):Re}function ny(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 U7(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 H7(e){const{accept:t,disabled:n=!1,acceptData:r,acceptNativeTypes:s,onDragEnter:a,onDragOver:l,onDragLeave:c,onDrop:d}=e,f=v.useRef(null),h=v.useRef(null),m=v.useRef(0),b=v.useRef(null),[y,k]=v.useState(!1),[S,T]=v.useState(!1),R=v.useRef(y);R.current=y;const E=v.useCallback(()=>{m.current=0,k(!1),T(!1)},[]),_=v.useCallback(()=>{b.current!==null&&(cancelAnimationFrame(b.current),b.current=null)},[]);v.useEffect(()=>{if(!y)return;const P=h.current?.ownerDocument??document,A=()=>{_(),E()};return P.addEventListener("mousemove",A,!0),()=>{P.removeEventListener("mousemove",A,!0)}},[y,_,E]);const C=v.useRef({onDragEnter:a,onDragOver:l,onDragLeave:c,onDrop:d});C.current={onDragEnter:a,onDragOver:l,onDragLeave:c,onDrop:d};const D=v.useRef(s);D.current=s;const N=v.useRef(Array.isArray(t)?t:[t]);N.current=Array.isArray(t)?t:[t];const M=v.useRef(r);M.current=r;const B=v.useCallback(P=>{if(h.current=P,f.current&&(f.current(),f.current=null),m.current=0,P!==null&&(k(!1),T(!1)),!P||n)return;const A=bi.getInstance(),K=()=>{if(n)return null;const j=A.getValidatedData(N.current);return j&&(M.current?.(j)??!0)?j:null},$=j=>{if(m.current++,m.current===1){k(!0);const V=K();T(V!==null||!n&&ny(j,D.current)),C.current.onDragEnter?.(j,V)}},F=j=>{m.current=Math.max(0,m.current-1),m.current===0&&(_(),E(),C.current.onDragLeave?.(j))},z=j=>{const V=K(),L=V!==null,Z=!L&&!n&&ny(j,D.current);(L||Z)&&(j.preventDefault(),j.dataTransfer&&(j.dataTransfer.dropEffect=L?"move":"copy"),m.current===0&&(m.current=1,k(!0),T(!0),C.current.onDragEnter?.(j,V)),C.current.onDragOver&&b.current===null&&(b.current=requestAnimationFrame(()=>{b.current=null,C.current.onDragOver?.(j,V)})))},U=j=>{j.preventDefault(),_(),E();const V=K();if(V){const{onDrop:L}=C.current;L&&(L(j,V),j.stopPropagation())}else if(ny(j,D.current)){const{onDrop:L}=C.current;L&&(L(j,null),j.stopPropagation())}};P.addEventListener("dragenter",$),P.addEventListener("dragleave",F),P.addEventListener("dragover",z),P.addEventListener("drop",U);const q=P.ownerDocument,W=()=>{(m.current!==0||R.current)&&(_(),E())},H=()=>W(),Y=()=>W(),O=j=>{U7(j,q)&&W()};q.addEventListener("drop",H,!0),q.addEventListener("dragend",Y,!0),q.addEventListener("dragleave",O,!0),f.current=()=>{P.removeEventListener("dragenter",$),P.removeEventListener("dragleave",F),P.removeEventListener("dragover",z),P.removeEventListener("drop",U),q.removeEventListener("drop",H,!0),q.removeEventListener("dragend",Y,!0),q.removeEventListener("dragleave",O,!0),b.current!==null&&(cancelAnimationFrame(b.current),b.current=null)}},[n,E,_]);return v.useEffect(()=>()=>{f.current&&(f.current(),f.current=null)},[]),{ref:B,isOver:y,canDrop:S,isDropBlocked:y&&!S}}function q7(){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 V7=300,lI=v.createContext(null);function rh({children:e}){const[t,n]=v.useState(null),r=q7(),s=v.useCallback(c=>{r.cancel(),n(c)},[r]),a=v.useCallback(c=>{r.schedule(()=>{n(d=>d===c?null:d)},V7)},[r]),l=v.useMemo(()=>({activeId:t,markOpen:s,markClosed:a}),[t,s,a]);return g.jsx(lI.Provider,{value:l,children:e})}function G7(e,t){const n=v.useContext(lI),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 Jh=v.createContext(null);function em(e){const t=v.useContext(Jh);if(!t)throw new Error(`${e} must be used within LegacyMenu.SubMenu`);return t}function W7(){return em("LegacyMenu.SubMenu.useContext")}function uI(){const e=v.useContext(Jh)!=null,{setIsOpen:t,dismissCauseRef:n}=zO();return v.useCallback(r=>{n.current="selection",r(!1),e&&t(!1)},[e,t,n])}const K7=PO("@@menu-content-noop");function Y7({children:e,header:t,footer:n,attachment:r,"aria-label":s,popupRole:a="menu","data-testid":l,className:c,surfaceStyle:d,contentStyle:f,layoutStyle:h,listStyle:m,scrollAreaStyles:b,style:y,dropIndicatorTop:k,maxHeight:S,width:T,minWidth:R,maxWidth:E,tooltipPlacement:_,size:C,backdrop:D,adaptiveHeight:N=!0,returnFocus:M,onKeyDownCapture:B,onBodyPointerEnter:P,droppable:A,ref:K}){const $=ya(),{isOpen:F,isMounted:z,activeIndex:U,setActiveIndex:q,setIsOpen:W,markKeyboardNavigation:H,markPointerNavigation:Y,virtualFocus:O,searchValue:j,setSearchValue:V,hasSearchInput:L,searchInputRef:Z,enableHover:se,closeOnSelect:ne,nodeId:oe,activeDescendantIdPrefix:ae,listRef:ue,labelsRef:we,refs:me,floatingStyles:ce,middlewareData:be,transitionStyles:ve,context:Re,getFloatingProps:Se,getItemProps:ke,dismissCauseRef:Ae,returnFocusOnSelect:Oe,returnFocus:Me,shouldAllowPointerInteraction:Ue}=Sa("LegacyMenu.Content"),xe=uI(),_e=D??!se,[ee,fe]=v.useState(null),J=O&&!L,re=Xh(),Te=v.useSyncExternalStore(bi.subscribe,bi.isDragActive,bi.isDragActive),Le=Re.placement.startsWith("top"),Ke=Le&&z?be.bottomAnchor?.bottom??null:null,Qe=v.useRef(null),gt=v.useRef(U),Je=v.useRef(!1);v.useLayoutEffect(()=>{gt.current=U},[U]),v.useLayoutEffect(()=>{if(!F){Je.current=!1;return}const ut=tr=>{_O(tr)&&(Je.current=!0,H())},kn=tr=>{const Sn=IO(tr,ue);Sn==null||Sn===gt.current||q(Sn)},Yn=tr=>{const Sn=Je.current;Je.current=!1,Y(),Sn&&kn(tr.target)};document.addEventListener("keydown",ut,!0);const Xn=cB(ee,Yn);return()=>{document.removeEventListener("keydown",ut,!0),Xn()}},[F,ue,H,Y,ee,q]),v.useLayoutEffect(()=>{if(!F){Qe.current=null;return}if(!O||U==null||Qe.current===U||(Qe.current=U,!Je.current))return;const ut=ue.current[U]??null;if(!ut)return;const kn=requestAnimationFrame(()=>{ut.scrollIntoView({block:"nearest",inline:"nearest"})});return()=>cancelAnimationFrame(kn)},[F,O,U,ue]);const xt=v.useCallback(ut=>{if(ut.key==="Escape"){Ae.current="escape";return}if(ut.ctrlKey&&!ut.metaKey){const Yn=ut.key.toLowerCase(),Xn=Yn==="n"||Yn==="j";if(Xn||(Yn==="p"||Yn==="k")){ut.preventDefault();const Sn=ue.current,Hr=Sn.length;if(Hr===0)return;const ji=gt.current,Bn=Xn?1:-1;let kr=ji==null?Xn?0:Hr-1:ji+Bn;for(;kr>=0&&kr<Hr;){if(Sn[kr]!=null){q(kr);return}kr+=Bn}return}}if(!L)return;if(ut.key.length===1&&!ut.ctrlKey&&!ut.metaKey&&!ut.altKey){if(document.activeElement===Z.current)return;ut.preventDefault(),ut.stopPropagation(),Z.current?.focus(),V(j+ut.key),OO(ue,"body",q)}},[Ae,L,ue,Z,j,q,V]),Rt=v.useCallback(ut=>{re(ut.nativeEvent)&&(Ae.current="backdrop",W(!1))},[Ae,W,re]),rt=v.useCallback(ut=>{if(ut.stopPropagation(),!re(ut.nativeEvent))return;ut.preventDefault(),Ae.current="backdrop",W(!1);const Xn=document.elementsFromPoint(ut.clientX,ut.clientY).find(tr=>!tr.classList.contains(q0));Xn&&Xn.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:ut.clientX,clientY:ut.clientY,screenX:ut.screenX,screenY:ut.screenY,button:ut.button,buttons:ut.buttons,ctrlKey:ut.ctrlKey,shiftKey:ut.shiftKey,altKey:ut.altKey,metaKey:ut.metaKey}))},[Ae,W,re]),et=A!=null,{ref:ze,isOver:He,isDropBlocked:Ze}=H7({accept:A?.accept??K7,disabled:!et||(A?.disabled??!1),onDragEnter:A?.onDragEnter,onDragOver:A?.onDragOver,onDragLeave:A?.onDragLeave,onDrop:A?.onDrop}),ft=Qc([me.setFloating,fe,K,et?ze:null]),Tt=va(),{zIndex:ot,portalLayerStyles:X}=Hl("popover",z);if(!z)return null;const he=C??$?.menuSize??"sm",Ie={...ce,...ve,...X,...ot!==null?{zIndex:ot}:{},...y,...k!==void 0?{"--ui-menu-drop-indicator-top":`${k}px`}:{},...P0({width:T,minWidth:R,maxWidth:E}),...Le&&Ke!==null?{top:"auto",bottom:Ke}:{},...$0({isOpen:F,isPositioned:Re.isPositioned})},tt={...X,...ot!==null?{zIndex:ot-1}:{},pointerEvents:et&&Te?"none":void 0},_t=N?jO(S):S,dt=r!=null,Ve=a==="dialog",Be=JO(tt),nt=V0({className:c,hasDropIndicator:k!==void 0,size:he,surfaceStyle:d,style:dt&&_t!==void 0?{...Ie,maxHeight:_t}:Ie,hasAttachment:dt}),Ge=K0(dt||_t===void 0?void 0:{maxHeight:_t},dt,h),Pe=Y0(),ct=W0(f),Pt=G0(!1,m),qt=X0(),Xe=p7(),It=d7();return g.jsxs(I0,{...Tt?{root:Tt}:{},children:[_e&&g.jsx("div",{className:Be.className,style:Be.style,"data-component":"menu-backdrop",onClick:Rt,onContextMenu:rt,role:"none"}),g.jsx(D0,{context:Re,initialFocus:J?-1:Z,returnFocus:M??Me??(Ae.current!=="backdrop"&&(Ae.current!=="selection"||Oe)),modal:!J,children:g.jsxs("div",{ref:ft,className:nt.className,style:nt.style,tabIndex:-1,"data-component":"menu-popup","data-size":he,"data-drop-active":et&&He&&!Ze?"":void 0,"data-drop-blocked":et&&Ze?"":void 0,...l?{"data-testid":l}:{},...dt?{"aria-label":s??"Menu"}:{},...Se({...Ve?{role:"dialog","aria-label":s??"Menu","aria-labelledby":void 0,"aria-orientation":void 0}:{},onKeyDown:xt,onKeyDownCapture:B,onMouseDown:O?ut=>{ut.stopPropagation()}:void 0}),children:[et&&A?.indicator!=null?g.jsx("div",{"aria-hidden":"true",className:It.className,style:It.style,children:A.indicator}):null,g.jsx(Is,{menuSize:he,children:g.jsx(dO,{dismiss:!F,children:g.jsx(ix,{layerNodeId:oe,placement:_,children:g.jsx(UO,{activeIndex:U,setIsOpen:W,getItemProps:ke,searchValue:j,closeOnSelect:ne,virtualFocus:O,activeDescendantIdPrefix:ae,shouldAllowPointerInteraction:Ue,closeMenuLayersOnSelect:xe,children:g.jsx(rh,{children:g.jsxs(CN,{elementsRef:ue,labelsRef:we,children:[g.jsxs("div",{className:Ge.className,style:Ge.style,"data-component":"menu-layout",...dt||Ve?{}:{role:"menu","aria-label":s??"Menu"},children:[t!=null?g.jsx("div",{className:Pe.className,style:Pe.style,"data-component":"menu-header",children:g.jsx(Es,{value:"header",children:t})}):null,g.jsx(Nl,{className:QO,rootStyle:[$O(),b?.root],viewportStyle:b?.viewport,contentStyle:b?.content,maxHeight:"none","data-component":"menu-body-scroll",children:g.jsx("div",{className:ct.className,style:ct.style,"data-component":"menu-content",onPointerEnter:P,children:g.jsx("ul",{role:"presentation",className:Pt.className,style:Pt.style,"data-component":"menu-list",children:e})})}),n!=null?g.jsx("div",{className:qt.className,style:qt.style,"data-component":"menu-footer",children:g.jsx(Es,{value:"footer",children:n})}):null]}),r!=null?g.jsx("div",{className:Xe.className,style:Xe.style,"data-component":"menu-attachment",children:g.jsx("div",{className:ct.className,style:ct.style,"data-component":"menu-content",children:g.jsx(Es,{value:"footer",children:r})})}):null]})})})})})})]})})]})}function X7({children:e,indent:t=!1,rootStyle:n}){const r=C7(t,n);return g.jsx("div",{className:r.className,style:r.style,"data-component":"menu-empty","data-indent":t||void 0,children:e})}function cI(e){const t=v.useContext(Jh),n=v.useContext(F0),r=t??n;if(!r)throw new Error(`${e} must be used within LegacyMenu or LegacyMenu.SubMenu`);return r}function Z7(){return cI("LegacyMenu.useLayerContext")}function Q7({children:e}){const t=_7();return g.jsxs("div",{className:t.className,style:t.style,role:"status","aria-live":"polite","aria-busy":"true",children:[g.jsx(Ht,{name:"loading",size:"base",modifier:"spin",className:O7}),g.jsx("span",{children:e??"Loading..."})]})}function J7({placeholder:e="Search...","aria-label":t,className:n,rootStyle:r,inputGroupRootStyle:s,value:a,onValueChange:l,autoFocus:c=!1}){const f=rf()==="body",h=lf(),m=Li(),{searchValue:b,setSearchValue:y,searchInputRef:k,activeIndex:S,setActiveIndex:T,listRef:R,setHasSearchInput:E,activeDescendantIdPrefix:_}=cI("LegacyMenu.SearchInput"),C=v.useRef(null),D=a!==void 0&&l!==void 0,M=!D||c||h?k:C,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),OO(R,"body",T),l?.(F.target.value))},A=F=>{if(j0(F))return;if(F.ctrlKey&&!F.metaKey){const H=F.key.toLowerCase();if(H==="n"||H==="p"||H==="j"||H==="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 H=R.current[S];H&&(H.click(),k.current?.focus())}if(F.key!=="ArrowLeft"&&F.key!=="ArrowRight")return;const U=F.currentTarget,q=Gl(F.key,m)==="end"?U.value.length:0;if(!(U.selectionStart===q&&U.selectionEnd===q)){F.stopPropagation();return}fB({event:F,direction:F.key,activeIndex:S,listRef:R,restoreFocus:()=>k.current?.focus()})},K=S7(n,r),$=g.jsx(nf,{ref:M,type:"text",variant:"unfilled",size:"md",inputGroupRootStyle:s,value:B,onChange:P,onKeyDown:A,placeholder:e,"aria-label":t??"Search menu items","aria-activedescendant":AO(_,S)});return f?g.jsx("li",{className:K.className,style:K.style,"data-component":"menu-search-row",role:"none",children:$}):g.jsx("div",{className:K.className,style:K.style,"data-component":"menu-search-row",role:"none",children:$})}function eU(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 tU({children:e,title:t,dividerVisibility:n="default",trailingDividerVisibility:r="default",textAction:s,titleTrailing:a,tooltip:l,noDivider:c,rootStyle:d,titleStyle:f}){const h=v.useRef(null),m=eU(h),b=w7(d),y=s!=null||a!=null,k=eI(y,f),S=E7(),T=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,R=T!=null&&l!=null?g.jsx(af,{content:l,openDelay:0,closeDelay:0,children:T}):T;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:[R,e]})}function fI({children:e,trigger:t="hover",placement:n,anchorRef:r,offset:s,keepHoverSubmenuInset:a=!1,closeOnSelect:l,open:c,defaultOpen:d=!1,onOpenChange:f,hoverOpenDelay:h,keepOpenOnHoverOut:m=!1,dismissOnReferenceScroll:b=!1,suppressSiblingPointerGuard:y=!1,virtualFocus:k=!1,focusItemOnOpen:S}){const T=N0(),R=Li(),[E,_]=Dl(c,d,f,"LegacyMenu.SubMenu"),C=c!==void 0,D=t==="hover"&&(!C||r==null),[N,M]=v.useState(null),{focusItemOnHoverEnabled:B,markKeyboardNavigation:P,markPointerNavigation:A,resetFocusItemOnHover:K}=DO(),[$,F]=v.useState(""),[z,U]=v.useState(!1),q=v.useRef([]),W=v.useRef([]),H=v.useRef(null),Y=v.useId(),O=v.useRef(null),j=v.useRef(new Set);M7(T,E);const V=j7();v.useEffect(()=>{V&&V.setSubMenuOpen(E)},[E,V]);const L=v.useRef(E);v.useEffect(()=>{const et=L.current;L.current=E,et!==E&&(F(""),E||M(null),K())},[E,K]);const Z=v.useCallback(et=>{_(et)},[_]);v.useEffect(()=>{if(V)return V.registerSubMenuOpener(()=>Z(!0)),()=>{V.registerSubMenuOpener(null)}},[V,Z]);const se=v.useCallback((et,ze,He)=>{const Ze=H.current;!et&&t==="hover"&&(He==="hover"||He==="safe-polygon")&&(m||Ze?.value&&Ze.ownerDocument.activeElement===Ze)||Z(et)},[m,Z,t]),ne=v.useCallback(()=>{Z(!1)},[Z]),ae=n??(t==="hover"?R==="rtl"?"left-start":"right-start":"bottom-start"),ue={mainAxis:-2,alignmentAxis:-2},ce=s??(a?ue:t==="hover"?ue:4),{refs:be,floatingStyles:ve,context:Re}=L0({nodeId:T,open:E,onOpenChange:se,placement:ae,middleware:[a0(ce),u0(),l0({crossAxis:ae.startsWith("left")||ae.startsWith("right")}),c0({padding:8,apply({availableWidth:et,availableHeight:ze,elements:He}){He.floating.style.setProperty(LO,`${Math.max(0,Math.floor(et))}px`),He.floating.style.setProperty(z0,`${Math.max(0,Math.floor(ze))}px`)}})],whileElementsMounted:jp,transform:!1});v.useLayoutEffect(()=>{const et=r?.current;et&&be.setReference(et)}),bB(D&&E&&!y,be.domReference);const{activeId:Se}=G7(T,E),ke=Se!=null?0:h??75,Ae=IN(Re,{enabled:D,delay:{open:ke},handleClose:qN({blockPointerEvents:!1,requireIntent:!1})}),Oe=jN(Re,{enabled:t==="click"&&!C}),Me=Xh(),Ue=zN(Re,{ancestorScroll:b,bubbles:!0,outsidePressEvent:"click",outsidePress:Me}),xe=FN(Re,{role:"menu"}),_e=$N(Re,{listRef:q,activeIndex:N,onNavigate:M,nested:!0,rtl:R==="rtl",loop:!0,focusItemOnOpen:k?!1:S??!0,virtual:z||k,focusItemOnHover:B&&!k}),ee=UN(Re,{listRef:W,activeIndex:N,onMatch:z?void 0:M,enabled:!z&&!k}),{getReferenceProps:fe,getFloatingProps:J,getItemProps:re}=PN([Ae,Oe,Ue,xe,_e,ee]),Te=MO(re,E),Le=v.useCallback(et=>{const{role:ze,...He}=NO(fe(et));return He},[fe]),Ke=v.useCallback(et=>{const ze=j.current;return ze.add(et),()=>{ze.delete(et)}},[]),Qe=v.useCallback(()=>O.current!==null,[]),gt=v.useCallback(et=>{O.current=et;for(const ze of j.current)ze();r||be.setReference(et)},[r,be.setReference]),Je=v.useCallback(()=>({...Le(),id:Y,ref:gt,"aria-haspopup":"menu","aria-expanded":E}),[Le,gt,Y,E]),{isMounted:xt,styles:Rt}=BN(Re,{duration:{open:0,close:gB},initial:{opacity:0,transform:"scale(1)"}}),rt=v.useMemo(()=>({isOpen:E,isMounted:xt,setIsOpen:Z,closeFromKeyboard:ne,activeIndex:N,setActiveIndex:M,markKeyboardNavigation:P,markPointerNavigation:A,trigger:t,closeOnSelect:l,nodeId:T,activeDescendantIdPrefix:z?T:void 0,listRef:q,labelsRef:W,searchInputRef:H,searchValue:$,setSearchValue:F,hasSearchInput:z,setHasSearchInput:U,triggerId:Y,subscribeTriggerElement:Ke,hasTriggerElement:Qe,refs:be,floatingStyles:ve,transitionStyles:Rt,context:Re,getReferenceProps:Le,getFloatingProps:J,getItemProps:Te,getTriggerProps:Je,virtualFocus:k}),[E,xt,Z,ne,N,t,P,A,l,T,$,z,Y,Ke,Qe,k,be,ve,Rt,Re,Le,J,Te,Je]);return g.jsx(O0,{id:T,children:g.jsx(Jh.Provider,{value:rt,children:e})})}function nU({children:e,disabled:t=!1,label:n,leading:r,leadingStyle:s,trailing:a,contentStyle:l,trailingStyle:c}){const{activeIndexStore:d,getItemProps:f,activeDescendantIdPrefix:h,shouldAllowPointerInteraction:m}=of("LegacyMenu.SubMenuTrigger"),b=em("LegacyMenu.SubMenuTrigger"),y=rf(),k=Li(),S=y==="body",T=n??(typeof e=="string"?e:""),{ref:R,index:E}=qh({label:T||null}),_=Zh(d,E),C=Qc([R,b.refs.setReference]),D=g.jsx(Ht,{name:"chevron-right",color:"tertiary"}),N=m7({disabled:t,expanded:b.isOpen,focused:_}),M={role:"menuitem","aria-haspopup":"menu","aria-expanded":b.isOpen,"data-component":"menu-submenu-trigger","data-expanded":b.isOpen||void 0,tabIndex:_?0:-1,"aria-disabled":t||void 0,"data-disabled":t||void 0,"data-focused":_||void 0,[Vl]:y,className:N.className,style:N.style,...b.getReferenceProps(f({...sf(h,E),onMouseDown(A){m(A.nativeEvent)||(A.preventDefault(),A.stopPropagation())},onClick(A){if(!m(A.nativeEvent)){A.preventDefault(),A.stopPropagation();return}!t&&b.trigger==="hover"&&b.setIsOpen(!0)},onKeyDown(A){(Gl(A.key,k)==="end"||A.key==="Enter"||A.key===" ")&&!t&&(A.preventDefault(),A.stopPropagation(),b.setIsOpen(!0))}}))},B=R7(),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:C,...M,children:P}):g.jsx("div",{ref:C,...M,children:P})}function rU({children:e,label:t,showChevron:n=!0,onKeyDown:r,closeOnSelect:s,...a}){const l=em("LegacyMenu.SubMenuItem"),c=Li(),d=t??(typeof e=="string"?e:""),f=m=>{a.disabled||(r?.(m),!m.defaultPrevented&&Gl(m.key,c)==="end"&&(m.preventDefault(),m.stopPropagation(),l.setIsOpen(!0)))},h=n?g.jsx(Ht,{name:"chevron-right",color:"tertiary"}):void 0;return g.jsx(sI,{...a,contextPart:"LegacyMenu.SubMenuItem",itemLabel:d,closeOnSelect:s??l.closeOnSelect,"aria-haspopup":"menu","aria-expanded":l.isOpen,referenceRef:l.refs.setReference,itemPropsTransform:l.getReferenceProps,onKeyDown:f,trailingAccessory:h,children:e})}function iU({children:e,header:t,footer:n,"aria-label":r,"data-testid":s,onPointerEnter:a,keepSearchFocus:l=!1,className:c,surfaceStyle:d,contentStyle:f,listStyle:h,width:m,minWidth:b,maxWidth:y,maxHeight:k,size:S,contentPadding:T}){const R=ya(),E=em("LegacyMenu.SubMenuContent"),{shouldAllowPointerInteraction:_}=Sa("LegacyMenu.SubMenuContent"),C=uI(),D=Li(),N=va(),{portalLayerStyles:M}=Hl("popover",E.isMounted),B=S??R?.menuSize??"sm",{virtualFocus:P}=E,A=v.useSyncExternalStore(E.subscribeTriggerElement,E.hasTriggerElement,()=>!1);if(!E.isMounted)return null;const K={...E.floatingStyles,...E.transitionStyles,...M,...P0({width:m,minWidth:b,maxWidth:y,clampToAvailableWidth:!0}),...$0({isOpen:E.isOpen,isPositioned:E.context.isPositioned})},$=V0({className:c,size:B,surfaceStyle:d,style:K}),F=W0(f),z=G0(!1,h),U=jO(k),q=t!=null||n!=null,W=K0(q?{maxHeight:U}:void 0),H=Y0(),Y=X0(),O=T===void 0?F.style:{...F.style,padding:T,scrollPaddingBlock:T},j=Z=>{Z.stopPropagation()},V=A?E.triggerId:void 0,L=Z=>{E.markPointerNavigation();const se=IO(Z,E.listRef);if(se!=null&&se!==E.activeIndex&&E.setActiveIndex(se),!l||se==null)return;const ne=E.searchInputRef.current;if(ne==null)return;const oe=ne.ownerDocument.activeElement;oe!==ne&&(oe instanceof HTMLInputElement||oe instanceof HTMLTextAreaElement||ne.focus({preventScroll:!0}))};return g.jsx(I0,{...N?{root:N}:{},children:g.jsx(D0,{context:E.context,disabled:P,initialFocus:E.hasSearchInput?E.searchInputRef:-1,returnFocus:!1,modal:!1,closeOnFocusOut:E.trigger==="click",children:g.jsx("div",{ref:E.refs.setFloating,className:$.className,style:$.style,"data-component":"menu-popup","data-submenu":"","data-size":B,...s?{"data-testid":s}:{},...E.getFloatingProps({...V===void 0?{}:{"aria-labelledby":V},onClick:j,onPointerEnter:a,onMouseMove(Z){L(Z.target)},onPointerMove(Z){L(Z.target)},onKeyDown(Z){if(_O(Z)&&E.markKeyboardNavigation(),Gl(Z.key,D)==="start"||Z.key==="Escape"){Z.preventDefault(),Z.stopPropagation(),E.closeFromKeyboard();const se=E.refs.domReference.current;se instanceof HTMLElement&&se.focus()}}}),children:g.jsx(nI.Provider,{value:!0,children:g.jsx(Is,{menuSize:B,children:g.jsx(ix,{layerNodeId:E.nodeId,children:g.jsx(UO,{activeIndex:E.activeIndex,setIsOpen:E.setIsOpen,getItemProps:E.getItemProps,searchValue:E.searchValue,closeOnSelect:E.closeOnSelect,virtualFocus:P,activeDescendantIdPrefix:E.activeDescendantIdPrefix,shouldAllowPointerInteraction:_,closeMenuLayersOnSelect:C,children:g.jsx(CN,{elementsRef:E.listRef,labelsRef:E.labelsRef,children:q?g.jsxs("div",{className:W.className,style:W.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:QO,rootStyle:$O(),maxHeight:"none","data-component":"menu-body-scroll",children:g.jsx("div",{className:F.className,style:O,"data-component":"menu-content",children:g.jsx("ul",{role:"presentation",className:z.className,style:z.style,"data-component":"menu-list",children:g.jsx(Es,{value:"body",children:g.jsx(rh,{children:e})})})})}),n!=null?g.jsx("div",{className:Y.className,style:Y.style,"data-component":"menu-footer",children:g.jsx(Es,{value:"footer",children:n})}):null]}):g.jsx(Nl,{maxHeight:U,children:g.jsx("div",{className:F.className,style:O,"data-component":"menu-content",children:g.jsx("ul",{role:"menu","aria-label":r??"Submenu",className:z.className,style:z.style,"data-component":"menu-list",children:g.jsx(Es,{value:"body",children:g.jsx(rh,{children:e})})})})})})})})})})})})})}function sU({children:e,label:t,ignoreSearch:n,...r}){const s=t??(typeof e=="string"?e:"");return sx(s,n,"LegacyMenu.SwitchItem")?g.jsx(oU,{...r,itemLabel:s,children:e}):null}function oU({children:e,"data-testid":t,checked:n,defaultChecked:r=!1,onChange:s,disabled:a=!1,switchVariant:l,leading:c,leadingStyle:d,trailing:f,contentStyle:h,trailingStyle:m,rootStyle:b,tooltip:y,closeOnSelect:k,itemLabel:S}){const{activeIndexStore:T,shouldAllowPointerInteraction:R,closeMenuLayersOnSelect:E,getItemProps:_,setIsOpen:C,closeOnSelect:D,activeDescendantIdPrefix:N}=of("LegacyMenu.SwitchItem"),M=lf(),B=rf(),P=B==="body",A=k??D??!1,[K,$]=v.useState(r),F=n!==void 0,z=F?n:K,{ref:U,index:q}=qh({label:S||null}),W=Zh(T,q),H=v.useCallback(()=>{if(a)return;const ne=!z;F||$(ne);const oe={defaultPrevented:!1,preventDefault:()=>{oe.defaultPrevented=!0}};s?.(ne,oe),A&&!oe.defaultPrevented&&E(C)},[a,z,F,s,A,C,E]),Y=v.useCallback(ne=>{if(!R(ne.nativeEvent)){ne.preventDefault(),ne.stopPropagation();return}ne.preventDefault(),ne.stopPropagation(),H()},[H,R]),O=v.useCallback(ne=>{a||(ne.key==="Enter"||ne.key===" ")&&(ne.preventDefault(),ne.stopPropagation(),H())},[a,H]),j=_({...sf(N,q),onClick:Y,onKeyDown:O}),V=h7({disabled:a,focused:W,inSubmenu:M},b),L={role:"menuitemcheckbox","aria-checked":z,tabIndex:W?0:-1,"aria-disabled":a||void 0,"data-checked":z||void 0,"data-component":"menu-toggle-row","data-disabled":a||void 0,"data-focused":W||void 0,...t?{"data-testid":t}:{},[Vl]:B,className:V.className,style:V.style,...j},Z=g.jsx(Ll,{disabled:a,leading:c,leadingStyle:d,contentStyle:h,trailing:f,trailingStyle:m,trailingAccessory:g.jsx(F9,{checked:z,disabled:a,size:"sm",variant:l}),children:e}),se=P?g.jsx("li",{ref:U,...L,children:Z}):g.jsx("div",{ref:U,...L,children:Z});return y!=null?g.jsx(af,{content:y,openDelay:0,closeDelay:0,children:se}):se}function aU({title:e,subtitle:t,inline:n=!1,wrapSubtitle:r=!1}){const s=v7(n),a=x7(n),l=k7({inline:n,wrap:r});return g.jsxs("div",{className:s.className,style:s.style,"data-inline":n||void 0,children:[g.jsx(Jp,{size:"md",weight:"regular",color:"primary",className:a.className,style:a.style,children:e}),t!=null?g.jsx(Jp,{size:"sm",weight:"regular",color:"tertiary",className:l.className,style:l.style,"data-wrap":r||void 0,children:t}):null]})}const lU={title:{kZKoxP:"ui-xk0z11",kB7OPa:"ui-9f619",kVQacm:"ui-b3r6kr",$$css:!0}};function uU({title:e,divider:t}){const n=eI(!1,lU.title),r=T7();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 _c=typeof window<"u"?v.useLayoutEffect:v.useEffect;function wT(e){if(e!==void 0)switch(typeof e){case"number":return e;case"string":{if(e.endsWith("px"))return parseFloat(e);break}}}function cU({box:e,defaultHeight:t,defaultWidth:n,disabled:r,element:s,mode:a,style:l}){const{styleHeight:c,styleWidth:d}=v.useMemo(()=>({styleHeight:wT(l?.height),styleWidth:wT(l?.width)}),[l?.height,l?.width]),[f,h]=v.useState({height:t,width:n}),m=r||c!==void 0||a==="only-width"||c!==void 0&&d!==void 0;return _c(()=>{if(s===null||m)return;const b=new ResizeObserver(y=>{for(const k of y){const{contentRect:S,target:T}=k;s===T&&h(R=>R.height===S.height&&R.width===S.width?R:{height:S.height,width:S.width})}});return b.observe(s,{box:e}),()=>{b?.unobserve(s)}},[e,m,s,c,d]),v.useMemo(()=>({height:c??f.height,width:d??f.width}),[f,c,d])}function fU(e){const t=v.useRef(()=>{throw new Error("Cannot call during render.")});return _c(()=>{t.current=e},[e]),v.useCallback(n=>t.current?.(n),[t])}function ry({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 bc(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 dI({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 dU({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=dI({cachedBounds:t,itemCount:r,itemSize:s}),d=t.get(n),f=Math.max(0,Math.min(c-l,d.scrollOffset)),h=Math.max(0,d.scrollOffset-l+d.size);switch(e==="smart"&&(a>=h&&a<=f?e="auto":e="center"),e){case"start":return f;case"end":return h;case"center":return d.scrollOffset<=l/2?0:d.scrollOffset+d.size/2>=c-l/2?c-l:d.scrollOffset+d.size/2-l/2;default:return a>=h&&a<=f?a:a<h?h:f}}function ET({cachedBounds:e,containerScrollOffset:t,containerSize:n,itemCount:r,overscanCount:s}){const a=r-1;let l=0,c=-1,d=0,f=-1,h=0;for(;h<a;){const m=e.get(h);if(m.scrollOffset+m.size>t)break;h++}for(l=h,d=Math.max(0,l-s);h<a;){const m=e.get(h);if(m.scrollOffset+m.size>=t+n)break;h++}return c=Math.min(a,h),f=Math.min(r-1,c+s),l<0&&(l=0,c=-1,d=0,f=-1),{startIndexVisible:l,stopIndexVisible:c,startIndexOverscan:d,stopIndexOverscan:f}}function pU({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 d=r.get(l-1);yo(d!==void 0,`Unexpected bounds cache miss for index ${s}`),r.set(l,{scrollOffset:d.scrollOffset+d.size,size:c})}}const a=r.get(s);return 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 hU({itemCount:e,itemProps:t,itemSize:n}){return v.useMemo(()=>pU({itemCount:e,itemProps:t,itemSize:n}),[e,t,n])}function mU({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 gU({containerElement:e,containerStyle:t,defaultContainerSize:n=0,direction:r,isRtl:s=!1,itemCount:a,itemProps:l,itemSize:c,onResize:d,overscanCount:f}){const[h,m]=v.useState({startIndexVisible:0,startIndexOverscan:0,stopIndexVisible:-1,stopIndexOverscan:-1}),{startIndexVisible:b,startIndexOverscan:y,stopIndexVisible:k,stopIndexOverscan:S}={startIndexVisible:Math.min(a-1,h.startIndexVisible),startIndexOverscan:Math.min(a-1,h.startIndexOverscan),stopIndexVisible:Math.min(a-1,h.stopIndexVisible),stopIndexOverscan:Math.min(a-1,h.stopIndexOverscan)},{height:T=n,width:R=n}=cU({defaultHeight:n,defaultWidth:void 0,element:e,mode:"only-height",style:t}),E=v.useRef({height:0,width:0}),_=T,C=mU({containerSize:_,itemSize:c});v.useLayoutEffect(()=>{if(typeof d=="function"){const A=E.current;(A.height!==T||A.width!==R)&&(d({height:T,width:R},{...A}),A.height=T,A.width=R)}},[T,d,R]);const D=hU({itemCount:a,itemProps:l,itemSize:C}),N=v.useCallback(A=>D.get(A),[D]),M=v.useCallback(()=>dI({cachedBounds:D,itemCount:a,itemSize:C}),[D,a,C]),B=v.useCallback(A=>{const K=ry({containerElement:e,direction:r,isRtl:s,scrollOffset:A});return ET({cachedBounds:D,containerScrollOffset:K,containerSize:_,itemCount:a,overscanCount:f})},[D,e,_,r,s,a,f]);_c(()=>{const A=e?.scrollTop??0;m(B(A))},[e,r,B]),_c(()=>{if(!e)return;const A=()=>{m(K=>{const{scrollLeft:$,scrollTop:F}=e,z=ry({containerElement:e,direction:r,isRtl:s,scrollOffset:F}),U=ET({cachedBounds:D,containerScrollOffset:z,containerSize:_,itemCount:a,overscanCount:f});return bc(U,K)?K:U})};return e.addEventListener("scroll",A),()=>{e.removeEventListener("scroll",A)}},[D,e,_,r,a,f]);const P=fU(({align:A="auto",containerScrollOffset:K,index:$})=>{let F=dU({align:A,cachedBounds:D,containerScrollOffset:K,containerSize:_,index:$,itemCount:a,itemSize:C});if(e){if(F=ry({containerElement:e,direction:r,isRtl:s,scrollOffset:F}),typeof e.scrollTo!="function"){const z=B(F);bc(h,z)||m(z)}return F}});return{getCellBounds:N,getEstimatedSize:M,scrollToIndex:P,startIndexOverscan:y,startIndexVisible:b,stopIndexOverscan:S,stopIndexVisible:k}}function bU(e){return v.useMemo(()=>e,Object.values(e))}function yU(e,t){const{ariaAttributes:n,style:r,...s}=e,{ariaAttributes:a,style:l,...c}=t;return bc(n,a)&&bc(r,l)&&bc(s,c)}function vU(e){return e!=null&&typeof e=="object"&&"getAverageRowHeight"in e&&typeof e.getAverageRowHeight=="function"}const xU="data-react-window-index";function kU({children:e,className:t,defaultHeight:n=0,listRef:r,onResize:s,onRowsRendered:a,overscanCount:l=3,rowComponent:c,rowCount:d,rowHeight:f,rowProps:h,tagName:m="div",style:b,...y}){const k=bU(h),S=v.useMemo(()=>v.memo(c,yU),[c]),[T,R]=v.useState(null),E=vU(f),_=v.useMemo(()=>E?F=>f.getRowHeight(F)??f.getAverageRowHeight():f,[E,f]),{getCellBounds:C,getEstimatedSize:D,scrollToIndex:N,startIndexOverscan:M,startIndexVisible:B,stopIndexOverscan:P,stopIndexVisible:A}=gU({containerElement:T,containerStyle:b,defaultContainerSize:n,direction:"vertical",itemCount:d,itemProps:k,itemSize:_,onResize:s,overscanCount:l});v.useImperativeHandle(r,()=>({get element(){return T},scrollToRow({align:F="auto",behavior:z="auto",index:U}){const q=N({align:F,containerScrollOffset:T?.scrollTop??0,index:U});typeof T?.scrollTo=="function"&&T.scrollTo({behavior:z,top:q})}}),[T,N]),_c(()=>{if(!T)return;const F=Array.from(T.children).filter((z,U)=>{if(z.hasAttribute("aria-hidden"))return!1;const q=`${M+U}`;return z.setAttribute(xU,q),!0});if(E)return f.observeRowElements(F)},[T,E,f,M,P]),v.useEffect(()=>{M>=0&&P>=0&&a&&a({startIndex:B,stopIndex:A},{startIndex:M,stopIndex:P})},[a,M,B,P,A]);const K=v.useMemo(()=>{const F=[];if(d>0)for(let z=M;z<=P;z++){const U=C(z);F.push(v.createElement(S,{...k,ariaAttributes:{"aria-posinset":z+1,"aria-setsize":d,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,C,E,d,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:R,style:{position:"relative",maxHeight:"100%",flexGrow:1,overflowY:"auto",...b}},K,e,$)}const pI=v.createContext(null);function SU(e){const t=v.useContext(pI);if(!t)throw new Error(`${e} must be used within LegacyMenu.VirtualizedContent`);return t}function wU({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(pI.Provider,{value:c,children:e})}const EU=4,TT="ui-menu--virtualized";function TU({index:e,style:t,items:n,activeIndex:r,renderItem:s,onMouseMove:a}){const l=n[e],c=r===e,d=A7();return g.jsx("div",{className:d.className,style:{...t,...d.style},onMouseMove:f=>a(e,f),children:s(l,e,c)})}function RU({items:e,itemHeight:t,renderItem:n,getItemLabel:r,header:s,footer:a,emptyState:l,"aria-label":c,className:d,style:f,surfaceStyle:h,maxHeight:m,width:b="200px",size:y,backdrop:k,closeOnSelect:S=!0,overscanCount:T=5,getItemKey:R,onPreserveActiveIndex:E,renderActivePreview:_,ref:C}){const D=ya(),{isOpen:N,isMounted:M,activeIndex:B,setActiveIndex:P,setIsOpen:A,virtualFocus:K,enableHover:$,nodeId:F,listRef:z,labelsRef:U,searchValue:q,refs:W,floatingStyles:H,middlewareData:Y,transitionStyles:O,context:j,getFloatingProps:V,getItemProps:L,dismissCauseRef:Z,returnFocusOnSelect:se,returnFocus:ne}=Sa("LegacyMenu.VirtualizedContent"),oe=v.useRef(null),ae=v.useRef(null),ue=v.useRef(B);ue.current=B;const we=v.useRef(null),[me,ce]=v.useState(null),[be,ve]=v.useState(null),Re=k??!$,Se=Xh(),{portalLayerStyles:ke}=Hl("popover",M),Ae=v.useRef(null),Oe=v.useRef(void 0),Me=v.useRef(e),Ue=v.useRef(B),xe=v.useRef(null);v.useEffect(()=>{r?U.current=e.map(Ge=>r(Ge)):U.current=e.map(()=>null),z.current.length!==e.length&&(z.current.length=e.length)},[e,r,U,z]),v.useLayoutEffect(()=>{const Ge=Me.current!==e,Pe=Ue.current!==B;if(Me.current=e,Ue.current=B,R===void 0||B==null){Oe.current=void 0;return}const ct=Oe.current;if(Ge&&!Pe&&ct!==void 0){const qt=e.findIndex(Xe=>R(Xe)===ct);if(qt>=0&&qt!==B){xe.current=qt,E===void 0?P(qt):E(qt);return}}const Pt=e[B];Oe.current=Pt===void 0?void 0:R(Pt)},[B,R,e,E,P]);const _e=j.placement.startsWith("top"),ee=_e&&M?Y.bottomAnchor?.bottom??null:null,fe=v.useRef(null);v.useLayoutEffect(()=>{if(!N){fe.current=null,Ae.current=null;return}if(B==null||fe.current===B)return;fe.current=B;const Ge=xe.current===B;if(xe.current=null,Ge)return;const Pe=Ae.current===B;Ae.current=null,!Pe&&(B<0||B>=e.length||ae.current?.scrollToRow({index:B,align:"smart",behavior:"instant"}))},[N,B,e.length]);const J=v.useRef(q),re=v.useRef(N);v.useEffect(()=>{const Ge=J.current,Pe=re.current;J.current=q,re.current=N,!(!N||!Pe||Ge===q)&&(e.length>0&&ae.current?.scrollToRow({index:0,align:"start",behavior:"instant"}),P(e.length>0?0:null))},[N,e.length,q,P]);const Te=v.useCallback((Ge,Pe)=>{we.current=Ge,ce(ct=>ct===Ge?ct:Ge),ve(ct=>ct===Pe?ct:Pe)},[]);v.useLayoutEffect(()=>{if(!N||B==null||B<0||B>=e.length){Te(null,null);return}const Ge=z.current[B];Ge!=null&&Te(Ge,B)},[B,N,e.length,z,Te]);const Le=v.useCallback((Ge,Pe)=>{Ge===ue.current&&Pe!=null&&Te(Pe,Ge)},[Te]),Ke=v.useRef(null),Qe=v.useCallback((Ge,Pe)=>{const ct=Ke.current;Ke.current={x:Pe.clientX,y:Pe.clientY},!(ct!==null&&ct.x===Pe.clientX&&ct.y===Pe.clientY)&&B!==Ge&&(Ae.current=Ge,P(Ge))},[B,P]),gt=v.useCallback(Ge=>{Ge.key==="Escape"&&(Z.current="escape")},[Z]),Je=v.useCallback(Ge=>{Se(Ge.nativeEvent)&&(Z.current="backdrop",A(!1))},[Z,A,Se]),xt=v.useCallback(Ge=>{if(!Se(Ge.nativeEvent))return;Ge.preventDefault(),Z.current="backdrop",A(!1);const Pt=document.elementsFromPoint(Ge.clientX,Ge.clientY).find(qt=>!qt.classList.contains(q0));Pt&&Pt.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:Ge.clientX,clientY:Ge.clientY,screenX:Ge.screenX,screenY:Ge.screenY,button:Ge.button,buttons:Ge.buttons,ctrlKey:Ge.ctrlKey,shiftKey:Ge.shiftKey,altKey:Ge.altKey,metaKey:Ge.metaKey}))},[Z,A,Se]),Rt=Qc([W.setFloating,oe,C]),rt=va();if(!M)return null;const et=m??dB,ze=typeof t=="number"?e.length*t:e.reduce((Ge,Pe,ct)=>Ge+t(ct),0),He=Math.min(ze,Math.max(0,et-EU*2)),Ze=y??D?.menuSize??"sm",ft={...H,...O,...f,...P0({width:b}),...ke,..._e&&ee!==null?{top:"auto",bottom:ee}:{},...$0({isOpen:N,isPositioned:j.isPositioned})},Tt=JO(ke),ot=V0({className:d?`${TT} ${d}`:TT,size:Ze,style:ft,surfaceStyle:h}),X=K0(),he=Y0(),Ie=W0(),tt=G0(!0),_t=N7(),dt=X0(),Ve=N&&be!=null&&be>=0&&be<e.length&&me!=null&&_!=null?_(be,{rowElement:me,menuContentElement:oe.current}):null,Be=Ve!=null&&me!=null,nt={items:e,activeIndex:B,renderItem:n,onMouseMove:Qe};return g.jsxs(I0,{...rt?{root:rt}:{},children:[Re&&g.jsx("div",{className:Tt.className,style:Tt.style,"data-component":"menu-backdrop",onClick:Je,onContextMenu:xt,role:"none"}),g.jsx(D0,{context:j,initialFocus:-1,returnFocus:ne??(Z.current!=="backdrop"&&(Z.current!=="selection"||se)),modal:!K&&N,children:g.jsx("div",{ref:Rt,className:ot.className,style:ot.style,tabIndex:-1,"data-component":"menu-popup","data-virtualized":"","data-size":Ze,...V({"aria-label":c??"Menu","aria-labelledby":void 0,onKeyDown:gt,onMouseDown:K?Ge=>{Ge.stopPropagation()}:void 0}),children:g.jsx(Is,{menuSize:Ze,children:g.jsx("div",{className:X.className,style:X.style,"data-component":"menu-layout",role:"none",children:g.jsx(dO,{dismiss:!N,children:g.jsx(ix,{layerNodeId:F,children:g.jsx(wU,{activeIndex:B,setIsOpen:A,getItemProps:L,listRef:z,closeOnSelect:S,onRowElementChange:Le,children:g.jsxs(rh,{children:[s!=null?g.jsx("div",{className:he.className,style:he.style,"data-component":"menu-header",children:g.jsx(Es,{value:"header",children:s})}):null,e.length>0?g.jsx("div",{className:Ie.className,style:Ie.style,"data-component":"menu-content",children:g.jsx("div",{className:tt.className,style:tt.style,"data-component":"menu-list",role:"presentation",children:g.jsx(kU,{listRef:ae,className:_t.className,role:"none",rowComponent:TU,rowProps:nt,rowCount:e.length,rowHeight:t,overscanCount:T,"data-native-scrollbar":"none",style:{height:He}})})}):l,a!=null?g.jsx("div",{className:dt.className,style:dt.style,"data-component":"menu-footer",children:g.jsx(Es,{value:"footer",children:a})}):null,_!=null?g.jsx(fI,{open:Be,placement:"right-start",anchorRef:we,offset:6,closeOnSelect:!1,virtualFocus:!0,children:Be?Ve:null}):null]})})})})})})})})]})}function CU({index:e,children:t,disabled:n=!1,onSelect:r,onMouseDown:s,leading:a,leadingStyle:l,contentStyle:c,trailing:d,trailingStyle:f,wideLeftSection:h=!1,tooltip:m,tooltipContentKey:b,closeOnSelect:y,description:k,variant:S="default",checked:T,ref:R}){const{shouldAllowPointerInteraction:E,virtualFocus:_,activeDescendantIdPrefix:C}=Sa("LegacyMenu.VirtualizedItem"),D=lf(),{activeIndex:N,setIsOpen:M,getItemProps:B,listRef:P,closeOnSelect:A,onRowElementChange:K}=SU("LegacyMenu.VirtualizedItem"),$=y??A??!0,F=N===e,z=v.useCallback(me=>{P.current[e]=me,K?.(e,me),typeof R=="function"?R(me):R&&(R.current=me)},[e,P,K,R]),U=()=>{if(n)return;const me={defaultPrevented:!1,preventDefault:()=>{me.defaultPrevented=!0}};r?.(me),$&&!me.defaultPrevented&&M(!1)},q=me=>{if(!E(me.nativeEvent)){me.preventDefault(),me.stopPropagation();return}U()},W=me=>{n||(me.key==="Enter"||me.key===" ")&&(me.preventDefault(),U())},H=me=>{if(!E(me.nativeEvent)){me.preventDefault(),me.stopPropagation();return}s?.(me),!me.defaultPrevented&&_&&me.preventDefault()},{onMouseMove:Y,onPointerLeave:O,...j}=B({...sf(C,e),onClick:q,onKeyDown:W,onMouseDown:H}),V=Q0(),L=J0(),Z=ex(),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:Z.className,style:Z.style,"data-component":"menu-item-description",children:k})]}):t,ne=Z0({disabled:n,focused:F,inSubmenu:D,variant:S}),oe=T!==void 0,ae=oe&&a==null?g.jsx(UA,{checked:T,disabled:n}):a,ue=oe?{role:"menuitemcheckbox","aria-checked":T,"data-checked":T||void 0}:{role:"menuitem"},we=g.jsx("li",{ref:z,...ue,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:ae,leadingStyle:l,contentStyle:c,trailing:d,trailingStyle:f,wideLeft:h,children:se})});return m!=null?g.jsx(af,{content:m,contentKey:b,children:we}):we}function RT({children:e,open:t,defaultOpen:n,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l,offset:c,flip:d,closeOnSelect:f,instantClose:h,instantTransitions:m,returnFocusOnSelect:b,returnFocus:y,focusItemOnOpen:k,virtualFocus:S,shouldKeepOpenDuringDrag:T,lockPositionWhileOpen:R,dismissOnReferenceScroll:E}){return g.jsx(kB,{open:t,defaultOpen:n,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l,offset:c,flip:d,closeOnSelect:f,instantClose:h,instantTransitions:m,returnFocusOnSelect:b,returnFocus:y,focusItemOnOpen:k,virtualFocus:S,shouldKeepOpenDuringDrag:T,lockPositionWhileOpen:R,dismissOnReferenceScroll:E,children:e})}function _U(e){return Ao()===null?g.jsx(h5,{children:g.jsx(RT,{...e})}):g.jsx(RT,{...e})}function hI(e,t,n){const{ref:r,...s}=n,a=VN({defaultTagName:"button",props:s,ref:r,render:e});return t?e:a}function AU({children:e,disabled:t=!1}){const{getTriggerProps:n}=Sa("LegacyMenu.Trigger");return hI(e,t,n())}function NU({children:e,onClick:t,disabled:n=!1}){const{getTriggerProps:r,setHasHoverTrigger:s,setIsOpen:a}=Sa("LegacyMenu.HoverTrigger");v.useEffect(()=>{if(!n)return s(!0),()=>s(!1)},[n,s]);const l=r();return hI(e,n,{...l,onPointerDown:Yu(void 0,Yu(l.onPointerDown,c=>{c.button===2&&a(!1)})),onContextMenu:Yu(void 0,Yu(l.onContextMenu,c=>{a(!1),c.stopPropagation()})),onClick:Yu(t,c=>{l.onClick?.(c)})})}const OU=Object.assign(fI,{useContext:W7}),ni=Object.assign(_U,{useContext:zO,useLayerContext:Z7,Trigger:AU,HoverTrigger:NU,Content:Y7,Item:iI,CheckboxItem:F7,TextItem:aU,SwitchItem:sU,Section:tU,SearchInput:J7,EmptyState:X7,LoadingState:Q7,ExpandableSection:z7,ExpandableSectionTrigger:P7,ExpandableSectionContent:$7,SubMenu:OU,SubMenuItem:rU,SubMenuTrigger:nU,SubMenuContent:iU,VirtualizedContent:RU,VirtualizedItem:CU,VirtualizedSectionHeader:uU}),mI=v.createContext(void 0);function ox(){const e=v.useContext(mI);if(e===void 0)throw new Error(In(64));return e}let IU=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const tm={tabActivationDirection:e=>({[IU.activationDirection]:e})},gI=v.forwardRef(function(t,n){const{className:r,defaultValue:s=0,onValueChange:a,orientation:l="horizontal",render:c,value:d,style:f,...h}=t,m=t.defaultValue!==void 0,b=v.useRef([]),[y,k]=v.useState(()=>new Map),[S,T]=Al({controlled:d,default:s,name:"Tabs",state:"value"}),R=d!==void 0,[E,_]=v.useState(()=>new Map),C=v.useRef(void 0),D=v.useCallback(ue=>{if(ue===void 0)return null;for(const[we,me]of E.entries())if(me!=null&&ue===(me.value??me.index))return we;return null},[E]),[N,M]=v.useState(()=>({previousValue:S,tabActivationDirection:"none"})),{previousValue:B,tabActivationDirection:P}=N;let A=P,K=!1;B!==S&&(A=CT(B,S,l,E),K=B!=null&&S!=null&&D(S)==null);const $=K?B:S,F=B!==$||P!==A;Fe(()=>{F&&M({previousValue:$,tabActivationDirection:A})},[$,F,A]);const z=We((ue,we)=>{const me=CT(S,ue,l,E);we.activationDirection=me,a?.(ue,we),!we.isCanceled&&T(ue)}),U=We((ue,we)=>{a?.(ue,Ct(we,void 0,void 0,{activationDirection:"none"}))}),q=We((ue,we)=>{k(me=>{if(me.get(ue)===we)return me;const ce=new Map(me);return ce.set(ue,we),ce})}),W=We((ue,we)=>{k(me=>{if(!me.has(ue)||me.get(ue)!==we)return me;const ce=new Map(me);return ce.delete(ue),ce})}),H=v.useCallback(ue=>y.get(ue),[y]),Y=v.useCallback(ue=>{for(const we of E.values())if(ue===we?.value)return we?.id},[E]),O=v.useMemo(()=>({getTabElementBySelectedValue:D,getTabIdByPanelValue:Y,getTabPanelIdByValue:H,onValueChange:z,orientation:l,registerMountedTabPanel:q,setTabMap:_,unregisterMountedTabPanel:W,tabActivationDirection:A,value:S}),[D,Y,H,z,l,q,_,W,A,S]),j=v.useMemo(()=>{for(const ue of E.values())if(ue!=null&&ue.value===S)return ue},[E,S]),V=v.useMemo(()=>{for(const ue of E.values())if(ue!=null&&!ue.disabled)return ue.value},[E]),L=v.useRef(!m),Z=v.useRef(s),se=v.useRef(m),ne=v.useRef(!1);Fe(()=>{if(R)return;function ue(be,ve){T(be),M(Re=>Re.previousValue===be&&Re.tabActivationDirection==="none"?Re:{previousValue:be,tabActivationDirection:"none"}),U(be,ve),L.current=!1}if(E.size===0){ne.current&&S!==null&&!C.current?.isConnected&&ue(null,Nw);return}ne.current=!0,C.current=E.keys().next().value;const we=j?.disabled,me=j==null&&S!==null;if(!we&&S===Z.current&&(se.current=!1),se.current&&we&&S===Z.current)return;const ce=L.current;if(we||me){const be=V??null;if(S===be){L.current=!1;return}let ve=Nw;ce?ve=Ow:we&&(ve=h_),ue(be,ve);return}ce&&j!=null&&(U(S,Ow),L.current=!1)},[V,R,U,j,T,E,S]);const ae=gn("div",t,{state:{orientation:l,tabActivationDirection:A},ref:n,props:h,stateAttributesMapping:tm});return g.jsx(mI.Provider,{value:O,children:g.jsx(R0,{elementsRef:b,children:ae})})});function CT(e,t,n,r){if(e==null||t==null)return"none";let s=null,a=null;for(const[d,f]of r.entries()){if(f==null)continue;const h=f.value??f.index;if(e===h&&(s=d),t===h&&(a=d),s!=null&&a!=null)break}if(s==null||a==null)return s!==a&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof t?n==="horizontal"?t>e?"right":"left":t>e?"down":"up":"none";const l=s.getBoundingClientRect(),c=a.getBoundingClientRect();if(n==="horizontal"){if(c.left<l.left)return"left";if(c.left>l.left)return"right"}else{if(c.top<l.top)return"up";if(c.top>l.top)return"down"}return"none"}const bI=v.createContext(void 0);function yI(){const e=v.useContext(bI);if(e===void 0)throw new Error(In(65));return e}const vI=v.forwardRef(function(t,n){const{className:r,disabled:s=!1,render:a,value:l,id:c,nativeButton:d=!0,style:f,...h}=t,{value:m,getTabPanelIdByValue:b,orientation:y,tabActivationDirection:k}=ox(),{activateOnFocus:S,highlightedTabIndex:T,onTabActivation:R,registerTabResizeObserverElement:E,setHighlightedTabIndex:_,tabsListElement:C}=yI(),D=Bl(c),N=v.useMemo(()=>({disabled:s,id:D,value:l}),[s,D,l]),{compositeProps:M,compositeRef:B,index:P}=XN({metadata:N}),A=l===m,K=v.useRef(!1),$=v.useRef(null);Fe(()=>{const L=$.current;if(L)return E(L)},[E]),Fe(()=>{if(K.current){K.current=!1;return}if(!(A&&P>-1&&T!==P))return;const L=C;if(L!=null){const Z=mr(Kt(L));if(Z&&bt(L,Z))return}s||_(P)},[A,P,T,_,s,C]);const{getButtonProps:F,buttonRef:z}=$l({disabled:s,native:d,focusableWhenDisabled:!0}),U=b(l),q=v.useRef(!1),W=v.useRef(!1);function H(L){A||s||R(l,Ct(Oi,L.nativeEvent,void 0,{activationDirection:"none"}))}function Y(L){A||(P>-1&&!s&&_(P),!s&&S&&(!q.current||q.current&&W.current)&&R(l,Ct(Oi,L.nativeEvent,void 0,{activationDirection:"none"})))}function O(L){if(A||s)return;q.current=!0;function Z(){q.current=!1,W.current=!1}(!L.button||L.button===0)&&(W.current=!0,Kt(L.currentTarget).addEventListener("pointerup",Z,{once:!0}))}return gn("button",t,{state:{disabled:s,active:A,orientation:y,tabActivationDirection:k},ref:[n,z,B,$],props:[M,{role:"tab","aria-controls":U,"aria-selected":A,id:D,onClick:H,onFocus:Y,onPointerDown:O,[bO]:A?"":void 0,onKeyDownCapture(){K.current=!0}},h,F],stateAttributesMapping:tm})});function MU(){return Jn}function DU(){return!1}function LU(){return!0}function jU(){return f0.useSyncExternalStore(MU,DU,LU)}const zU='!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 ll=(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 PU=v.createContext(void 0),$U={disableStyleElements:!1};function xI(){return v.useContext(PU)??$U}const FU={...tm,activeTabPosition:()=>null,activeTabSize:()=>null},kI=v.forwardRef(function(t,n){const{className:r,render:s,renderBeforeHydration:a=!1,style:l,...c}=t,{nonce:d}=xI(),{getTabElementBySelectedValue:f,orientation:h,tabActivationDirection:m,value:b}=ox(),{tabsListElement:y,registerIndicatorUpdateListener:k}=yI(),S=jU(),T=U6();v.useEffect(()=>k(T),[k,T]);let R=0,E=0,_=0,C=0,D=0,N=0,M=!1;if(b!=null&&y!=null){const z=f(b);if(z!=null){M=!0;const{width:U,height:q}=cT(z),{width:W,height:H}=cT(y),Y=z.getBoundingClientRect(),O=y.getBoundingClientRect(),j=W>0?O.width/W:1,V=H>0?O.height/H:1;if(Math.abs(j)>Number.EPSILON&&Math.abs(V)>Number.EPSILON){const Z=Y.left-O.left,se=Y.top-O.top;R=Z/j+y.scrollLeft-y.clientLeft,_=se/V+y.scrollTop-y.clientTop}else R=z.offsetLeft,_=z.offsetTop;D=U,N=q,E=y.scrollWidth-R-D,C=y.scrollHeight-_-N}}const B=M?{left:R,right:E,top:_,bottom:C}:null,P=M?{width:D,height:N}:null,A=M?{[ll.activeTabLeft]:`${R}px`,[ll.activeTabRight]:`${E}px`,[ll.activeTabTop]:`${_}px`,[ll.activeTabBottom]:`${C}px`,[ll.activeTabWidth]:`${D}px`,[ll.activeTabHeight]:`${N}px`}:void 0,K=M&&D>0&&N>0,F=gn("span",t,{state:{orientation:h,activeTabPosition:B,activeTabSize:P,tabActivationDirection:m},ref:n,props:[{role:"presentation",style:A,hidden:!K},c,{suppressHydrationWarning:!0}],stateAttributesMapping:FU});return b==null?null:g.jsxs(v.Fragment,{children:[F,S&&a&&g.jsx("script",{nonce:d,dangerouslySetInnerHTML:{__html:zU},suppressHydrationWarning:!0})]})}),SI=v.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:s,loopFocus:a=!0,render:l,style:c,...d}=t,{onValueChange:f,orientation:h,value:m,setTabMap:b,tabActivationDirection:y}=ox(),[k,S]=v.useState(0),[T,R]=v.useState(null),E=v.useRef(new Set),_=v.useRef(new Set),C=v.useRef(null);Fe(()=>{if(typeof ResizeObserver>"u")return;const K=new ResizeObserver(()=>{E.current.forEach($=>{$()})});return C.current=K,T&&K.observe(T),_.current.forEach($=>{K.observe($)}),()=>{K.disconnect(),C.current=null}},[T]);const D=We(K=>(E.current.add(K),()=>{E.current.delete(K)})),N=We(K=>(_.current.add(K),C.current?.observe(K),()=>{_.current.delete(K),C.current?.unobserve(K)})),M=We((K,$)=>{K!==m&&f(K,$)}),B={orientation:h,tabActivationDirection:y},P={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},A=v.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:k,registerIndicatorUpdateListener:D,registerTabResizeObserverElement:N,onTabActivation:M,setHighlightedTabIndex:S,tabsListElement:T}),[r,k,D,N,M,S,T]);return g.jsx(bI.Provider,{value:A,children:g.jsx(I9,{render:l,className:s,style:c,state:B,refs:[n,R],props:[P,d],stateAttributesMapping:tm,highlightedIndex:k,enableHomeAndEndKeys:!0,loopFocus:a,orientation:h,onHighlightedIndexChange:S,onMapChange:b,disabledIndices:ko})})}),Kd={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}},BU={sm:{kZKoxP:"ui-1e94bgo",$$css:!0},md:{kZKoxP:"ui-170hpbr",$$css:!0},lg:{kZKoxP:"ui-t8t6p",$$css:!0},xl:{kZKoxP:"ui-12tj2o0",$$css:!0}},UU={sm:{kZKoxP:"ui-jmh96e",$$css:!0},md:{kZKoxP:"ui-17n66dt",$$css:!0},lg:{kZKoxP:"ui-y8quj6",$$css:!0},xl:{kZKoxP:"ui-1wl7iu6",$$css:!0}},HU={sm:{kaIpWk:"ui-1yjdzib",$$css:!0},md:{kaIpWk:"ui-17dxljr",$$css:!0},lg:{kaIpWk:"ui-172nrg4",$$css:!0},xl:{kaIpWk:"ui-1y34t1",$$css:!0}},qU={sm:{kaIpWk:"ui-13mijux",$$css:!0},md:{kaIpWk:"ui-1k9pyrz",$$css:!0},lg:{kaIpWk:"ui-1fkry76",$$css:!0},xl:{kaIpWk:"ui-126z3em",$$css:!0}},_T={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}},Yd={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 wI(e,t){return e==="outline"?qU[t]:HU[t]}function VU(e,t){return e==="outline"?UU[t]:Gi[t]}const EI=v.createContext(null);function GU(){const e=v.use(EI);if(e===null)throw new Error("SegmentedControl.Item must be used within SegmentedControl");return e}function WU({value:e,defaultValue:t,onValueChange:n,variant:r="default",size:s="md",rounded:a=!1,disabled:l=!1,fullWidth:c=!1,children:d,"aria-label":f,"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(EI.Provider,{value:b,children:g.jsx(gI,{...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(SI,{activateOnFocus:!0,"aria-label":f,"aria-labelledby":h,"data-component":"segmented-control-list","data-disabled":l||void 0,...zt(Kd.base,Kd.padded,BU[s],r==="default"&&Kd.default,r==="outline"&&la.outline,a?Kd.rounded:ws[s]),children:[d,g.jsx(kI,{"data-component":"segmented-control-indicator",...zt(_T.base,a?_T.rounded:wI(r,s))})]})})})}function KU({value:e,disabled:t=!1,children:n,...r}){const s=GU();return g.jsx(vI,{...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(S0.root,Ti.content,Dh.root,s.rounded?Yd.rounded:wI(s.variant,s.size),VU(s.variant,s.size),Ti.size[s.size],s.size==="sm"?Ms.root:Ti.typography[s.size],Yd.base,s.variant==="compact"&&Yd.compact,s.fullWidth&&Yd.fullWidth),children:n})}const yc=Object.assign(WU,{Item:KU}),TI=v.createContext(null),RI=v.createContext(null);function Ds(){const e=v.useContext(TI);if(e===null)throw new Error(In(60));return e}function CI(){const e=v.useContext(RI);if(e===null)throw new Error(In(61));return e}const mt={id:st(e=>e.id),labelId:st(e=>e.labelId),modal:st(e=>e.modal),multiple:st(e=>e.multiple),items:st(e=>e.items),itemToStringLabel:st(e=>e.itemToStringLabel),itemToStringValue:st(e=>e.itemToStringValue),isItemEqualToValue:st(e=>e.isItemEqualToValue),value:st(e=>e.value),hasSelectedValue:st(e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Jo(t,r)!==""}),hasNullItemLabel:st((e,t)=>t?o4(e.items):!1),open:st(e=>e.open),mounted:st(e=>e.mounted),forceMount:st(e=>e.forceMount),transitionStatus:st(e=>e.transitionStatus),openMethod:st(e=>e.openMethod),activeIndex:st(e=>e.activeIndex),selectedIndex:st(e=>e.selectedIndex),isActive:st((e,t)=>e.activeIndex===t),isSelected:st((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:st((e,t)=>e.selectedIndex===t),popupProps:st(e=>e.popupProps),triggerProps:st(e=>e.triggerProps),triggerElement:st(e=>e.triggerElement),positionerElement:st(e=>e.positionerElement),listElement:st(e=>e.listElement),popupSide:st(e=>e.popupSide),scrollUpArrowVisible:st(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:st(e=>e.scrollDownArrowVisible),hasScrollArrows:st(e=>e.hasScrollArrows)};function ac(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const vs=1;function _I(e,t){return Math.max(0,e-t)}function YU(e,t){if(t<=0)return 0;const n=ac(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 XU(e){const{id:t,value:n,defaultValue:r=null,onValueChange:s,open:a,defaultOpen:l=!1,onOpenChange:c,name:d,form:f,autoComplete:h,disabled:m=!1,readOnly:b=!1,required:y=!1,modal:k=!0,actionsRef:S,inputRef:T,onOpenChangeComplete:R,items:E,multiple:_=!1,itemToStringLabel:C,itemToStringValue:D,isItemEqualToValue:N=r4,highlightItemOnHover:M=!0,children:B}=e,{clearErrors:P}=BA(),{setDirty:A,setTouched:K,setFocused:$,validityData:F,setFilled:z,name:U,disabled:q,validation:W,validationMode:H}=Lh(),Y=T0({id:t}),O=q||m,j=U??d,[V,L]=Al({controlled:n,default:_?r??ko:r,name:"Select",state:"value"}),[Z,se]=Al({controlled:a,default:l,name:"Select",state:"open"}),ne=v.useRef([]),oe=v.useRef([]),ae=v.useRef(null),ue=v.useRef(null),we=v.useRef(0),me=v.useRef(null),ce=v.useRef([]),be=v.useRef(!1),ve=v.useRef(null),Re=v.useRef(null),Se=v.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),ke=v.useRef(!1),{mounted:Ae,setMounted:Oe,transitionStatus:Me}=Kc(Z),{openMethod:Ue,triggerProps:xe}=E$(Z),_e=Fr(()=>new rA({id:Y,labelId:void 0,modal:k,multiple:_,itemToStringLabel:C,itemToStringValue:D,isItemEqualToValue:N,value:V,open:Z,mounted:Ae,transitionStatus:Me,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=yt(_e,mt.activeIndex),fe=yt(_e,mt.selectedIndex),J=yt(_e,mt.triggerElement),re=yt(_e,mt.positionerElement),Te=d9(Ue),Le=Ue??Te??null,Ke=v.useMemo(()=>_?"":Jo(V,D),[_,V,D]),Qe=v.useMemo(()=>_&&Array.isArray(V)?V.map(Pe=>Jo(Pe,D)):Jo(V,D),[_,V,D]),gt=On(_e.state.triggerElement),Je=We(()=>Qe);FA(gt,Y,V,Je,!O,d);const xt=v.useRef(V),Rt=_?Array.isArray(V)&&V.length>0:V!=null&&Jo(V,D)!=="";Fe(()=>{V!==xt.current&&_e.set("forceMount",!0)},[_e,V]),Fe(()=>{z(Rt)},[Rt,z]),Fe(function(){const ct=ce.current;let Pt;if(_){const qt=Array.isArray(V)?V:[];if(qt.length===0)Pt=null;else{const Xe=qt[qt.length-1],It=hc(ct,Xe,N);Pt=It===-1?null:It}}else{const qt=hc(ct,V,N);Pt=qt===-1?null:qt}Pt===null&&(Re.current=null),!Z&&_e.set("selectedIndex",Pt)},[Rt,_,Z,V,ce,N,_e,Re]);function rt(Pe){const ct=F.initialValue;return Array.isArray(Pe)&&Array.isArray(ct)?!F3(Pe,ct,(Pt,qt)=>ua(Pt,qt,N)):Pe!==ct}RA(V,()=>{P(j),A(rt(V)),W.change(V)});const et=We((Pe,ct)=>{c?.(Pe,ct),!ct.isCanceled&&(se(Pe),!Pe&&(ct.reason===xh||ct.reason===Kv)&&(K(!0),$(!1),H==="onBlur"&&W.commit(V)))}),ze=We(()=>{Oe(!1),_e.update({activeIndex:null,openMethod:null}),R?.(!1)});_o({enabled:!S,open:Z,ref:ae,onComplete(){Z||ze()}}),v.useImperativeHandle(S,()=>({unmount:ze}),[ze]);const He=We((Pe,ct)=>{s?.(Pe,ct),!ct.isCanceled&&L(Pe)}),Ze=We(()=>{const Pe=_e.state.listElement||ae.current;if(!Pe)return;const ct=_I(Pe.scrollHeight,Pe.clientHeight),Pt=YU(Pe.scrollTop,ct),qt=Pt>0,Xe=Pt<ct;_e.state.scrollUpArrowVisible!==qt&&_e.set("scrollUpArrowVisible",qt),_e.state.scrollDownArrowVisible!==Xe&&_e.set("scrollDownArrowVisible",Xe)}),ft=gA({open:Z,onOpenChange:et,elements:{reference:J,floating:re}}),Tt=zP(ft,{enabled:!b&&!O,event:"mousedown"}),ot=s0(ft),X=t$(ft,{enabled:!b&&!O,listRef:ne,activeIndex:ee,selectedIndex:fe,disabledIndices:ko,onNavigate(Pe){Pe===null&&!Z||_e.set("activeIndex",Pe)},focusItemOnHover:M}),he=n$(ft,{enabled:!b&&!O&&(Z||!_),listRef:oe,activeIndex:ee,selectedIndex:fe,disabledIndices:Pe=>ZN(ne.current[Pe]),onMatch(Pe){Z?_e.set("activeIndex",Pe):He(ce.current[Pe],Ct("none"))},onTyping(Pe){be.current=Pe}}),Ie=v.useMemo(()=>{const Pe=Ki(he.reference,X.reference,ot.reference,Tt.reference,xe);return Y&&(Pe.id=Y),Pe},[Tt.reference,he.reference,X.reference,ot.reference,xe,Y]),tt=v.useMemo(()=>Ki(h0,he.floating,X.floating,ot.floating),[he.floating,X.floating,ot.floating]),_t=X.item??Fn;eA(()=>{_e.update({popupProps:tt,triggerProps:Ie})}),Fe(()=>{_e.update({id:Y,modal:k,multiple:_,value:V,open:Z,mounted:Ae,transitionStatus:Me,popupProps:tt,triggerProps:Ie,items:E,itemToStringLabel:C,itemToStringValue:D,isItemEqualToValue:N,openMethod:Le})},[_e,Y,k,_,V,Z,Ae,Me,tt,Ie,E,C,D,N,Le]);const dt=v.useMemo(()=>({store:_e,name:j,required:y,disabled:O,readOnly:b,multiple:_,highlightItemOnHover:M,setValue:He,setOpen:et,listRef:ne,popupRef:ae,scrollHandlerRef:ue,handleScrollArrowVisibility:Ze,scrollArrowsMountedCountRef:we,itemProps:_t,valueRef:me,valuesRef:ce,labelsRef:oe,typingRef:be,selectionRef:Se,firstItemTextRef:ve,selectedItemTextRef:Re,validation:W,onOpenChangeComplete:R,alignItemWithTriggerActiveRef:ke,initialValueRef:xt}),[_e,j,y,O,b,_,M,He,et,_t,W,R,Ze]),Ve=xo(T,W.inputRef),Be=_&&Array.isArray(V)&&V.length>0,nt=_?void 0:j,Ge=v.useMemo(()=>!_||!Array.isArray(V)||!j?null:V.map(Pe=>{const ct=Jo(Pe,D);return g.jsx("input",{type:"hidden",form:f,name:j,value:ct,disabled:O},ct)}),[_,V,f,j,D,O]);return g.jsx(TI.Provider,{value:dt,children:g.jsxs(RI.Provider,{value:ft,children:[B,g.jsx("input",{...W.getValidationProps(O,{onFocus(){_e.state.triggerElement?.focus({focusVisible:!0})},onChange(Pe){if(Pe.nativeEvent.defaultPrevented||O||b)return;const ct=Pe.currentTarget.value,Pt=Ct(Oi,Pe.nativeEvent);function qt(){if(_)return;const Xe=ct.toLowerCase();let It=ce.current.findIndex(kn=>Jo(kn,D).toLowerCase()===Xe||YA(kn,C).toLowerCase()===Xe);It===-1&&(It=ce.current.findIndex((kn,Yn)=>{const Xn=oe.current[Yn];return Xn!=null&&Xn.toLowerCase()===Xe}));const ut=It===-1?void 0:ce.current[It];ut!=null&&He(ut,Pt)}_e.set("forceMount",!0),queueMicrotask(qt)}}),id:Y&&nt==null?`${Y}-hidden-input`:void 0,form:f,name:nt,autoComplete:h,value:Ke,disabled:O,required:y&&!Be,readOnly:b,ref:Ve,style:j?sP:k_,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Ge]})})}const Xd=2,ZU=400,QU={...Rz,...Xc,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},JU=v.forwardRef(function(t,n){const{render:r,className:s,id:a,disabled:l=!1,nativeButton:c=!0,style:d,...f}=t,{setTouched:h,setFocused:m,validationMode:b,state:y,disabled:k}=Lh(),{labelId:S}=w0(),{store:T,setOpen:R,selectionRef:E,validation:_,readOnly:C,required:D,alignItemWithTriggerActiveRef:N,disabled:M}=Ds(),B=k||M||l,P=yt(T,mt.open),A=yt(T,mt.mounted),K=yt(T,mt.value),$=yt(T,mt.triggerProps),F=yt(T,mt.positionerElement),z=yt(T,mt.listElement),U=yt(T,mt.popupSide),q=yt(T,mt.id),W=yt(T,mt.labelId),H=yt(T,mt.hasSelectedValue),Y=A&&F?U:null,O=a??q,j=l4(S,W);T0({id:O});const V=On(F),L=v.useRef(null),{getButtonProps:Z,buttonRef:se}=$l({disabled:B,native:c}),ne=We(be=>{T.set("triggerElement",be)}),oe=yi(),ae=yi(),ue=yi();v.useEffect(()=>{if(P)return ue.start(ZU,()=>{E.current.allowUnselectedMouseUp=!0,E.current.allowSelectedMouseUp=!0}),()=>{ue.clear()};E.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},ae.clear()},[P,E,ae,ue]);const we=Ki($,{id:O,role:"combobox","aria-expanded":P?"true":"false","aria-haspopup":"listbox","aria-controls":P?z?.id??Op(F)?.id:void 0,"aria-labelledby":j,"aria-readonly":C||void 0,"aria-required":D||void 0,tabIndex:B?-1:0,onFocus(be){m(!0),P&&N.current&&R(!1,Ct(Oi,be.nativeEvent)),oe.start(0,()=>{T.set("forceMount",!0)})},onBlur(be){bt(F,be.relatedTarget)||(h(!0),m(!1),b==="onBlur"&&_.commit(K))},onMouseDown(be){if(P)return;const ve=Kt(be.currentTarget);function Re(Se){if(!L.current)return;const ke=Se.target;if(bt(L.current,ke)||bt(V.current,ke))return;const Ae=u4(L.current);Se.clientX>=Ae.left-Xd&&Se.clientX<=Ae.right+Xd&&Se.clientY>=Ae.top-Xd&&Se.clientY<=Ae.bottom+Xd||R(!1,Ct(zz,Se))}ae.start(0,()=>{ve.addEventListener("mouseup",Re,{once:!0})})}},f,Z),me=_.getValidationProps(B,we);me.role="combobox";const ce={...y,open:P,disabled:B,value:K,readOnly:C,popupSide:Y,placeholder:!H};return gn("button",t,{ref:[n,L,se,ne],state:ce,stateAttributesMapping:QU,props:me})}),eH={value:()=>null},tH=v.forwardRef(function(t,n){const{className:r,render:s,children:a,placeholder:l,style:c,...d}=t,{store:f,valueRef:h}=Ds(),m=yt(f,mt.value),b=yt(f,mt.items),y=yt(f,mt.itemToStringLabel),k=yt(f,mt.hasSelectedValue),S=!k&&l!=null&&a==null,T=yt(f,mt.hasNullItemLabel,S),R={value:m,placeholder:!k};let E=null;return typeof a=="function"?E=a(m):a!=null?E=a:!k&&l!=null&&!T?E=l:Array.isArray(m)?E=a4(m,b,y):E=XA(m,b,y),gn("span",t,{state:R,ref:[n,h],props:[{children:E},d],stateAttributesMapping:eH})}),nH=v.createContext(void 0),rH=v.forwardRef(function(t,n){const{store:r}=Ds(),s=yt(r,mt.mounted),a=yt(r,mt.forceMount);return s||a?g.jsx(nH.Provider,{value:!0,children:g.jsx(AP,{ref:n,...t})}):null}),iH={...Gc,...To},sH=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,{store:c}=Ds(),d=yt(c,mt.open),f=yt(c,mt.mounted),h=yt(c,mt.transitionStatus);return gn("div",t,{state:{open:d,transitionStatus:h},ref:n,props:[{role:"presentation",hidden:!f,style:{userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:iH})}),AI=v.createContext(void 0);function NI(){const e=v.useContext(AI);if(!e)throw new Error(In(59));return e}function ih(e,t){e&&Object.assign(e.style,t)}const OI={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},oH={position:"fixed"},aH=v.forwardRef(function(t,n){const{anchor:r,positionMethod:s="absolute",className:a,render:l,side:c="bottom",align:d="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:b,arrowPadding:y=5,sticky:k=!1,disableAnchorTracking:S,alignItemWithTrigger:T=!0,collisionAvoidance:R=RP,style:E,..._}=t,{store:C,listRef:D,labelsRef:N,alignItemWithTriggerActiveRef:M,selectedItemTextRef:B,valuesRef:P,initialValueRef:A,popupRef:K,setValue:$}=Ds(),F=CI(),z=yt(C,mt.open),U=yt(C,mt.mounted),q=yt(C,mt.modal),W=yt(C,mt.value),H=yt(C,mt.openMethod),Y=yt(C,mt.positionerElement),O=yt(C,mt.triggerElement),j=yt(C,mt.isItemEqualToValue),V=yt(C,mt.transitionStatus),L=v.useRef(null),Z=v.useRef(null),[se,ne]=v.useState(T),oe=U&&se&&H!=="touch";!U&&se!==T&&ne(T),Fe(()=>{U||(mt.scrollUpArrowVisible(C.state)&&C.set("scrollUpArrowVisible",!1),mt.scrollDownArrowVisible(C.state)&&C.set("scrollDownArrowVisible",!1))},[C,U]),v.useImperativeHandle(M,()=>oe),v4((oe||q)&&z,H==="touch",Y,O);const ae=C0({anchor:r,floatingRootContext:F,positionMethod:s,mounted:U,side:c,sideOffset:f,align:d,alignOffset:h,arrowPadding:y,collisionBoundary:m,collisionPadding:b,sticky:k,disableAnchorTracking:S??oe,collisionAvoidance:R,keepMounted:!0}),ue=oe?"none":ae.side,we=oe?oH:ae.positionerStyles,me={open:z,side:ue,align:ae.align,anchorHidden:ae.anchorHidden};Fe(()=>{C.set("popupSide",ae.side)},[C,ae.side]);const ce=We(ke=>{C.set("positionerElement",ke)}),be=_0(t,me,{styles:we,transitionStatus:V,props:_,refs:[n,ce],hidden:!U,inert:!z}),ve=v.useRef(0),Re=We(ke=>{if(ke.size===0&&ve.current===0||P.current.length===0)return;const Ae=ve.current;if(ve.current=ke.size,ke.size===Ae)return;const Oe=Ct(Oi);if(Ae!==0&&!C.state.multiple&&W!==null&&hc(P.current,W,j)===-1){const Ue=A.current,_e=Ue!=null&&hc(P.current,Ue,j)!==-1?Ue:null;$(_e,Oe),_e===null&&(C.set("selectedIndex",null),B.current=null)}if(Ae!==0&&C.state.multiple&&Array.isArray(W)){const Me=xe=>hc(P.current,xe,j)!==-1,Ue=W.filter(xe=>Me(xe));(Ue.length!==W.length||Ue.some(xe=>!i4(W,xe,j)))&&($(Ue,Oe),Ue.length===0&&(C.set("selectedIndex",null),B.current=null))}if(z&&oe){C.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const Me={height:""};ih(Y,Me),ih(K.current,Me)}}),Se=v.useMemo(()=>({...ae,side:ue,alignItemWithTriggerActive:oe,setControlledAlignItemWithTrigger:ne,scrollUpArrowRef:L,scrollDownArrowRef:Z}),[ae,ue,oe,ne]);return g.jsx(R0,{elementsRef:D,labelsRef:N,onMapChange:Re,children:g.jsxs(AI.Provider,{value:Se,children:[U&&q&&g.jsx(h$,{inert:p$(!z),cutout:O}),be]})})}),Zd="base-ui-disable-scrollbar",rv={className:Zd,getElement(e){return g.jsx("style",{nonce:e,href:Zd,precedence:"base-ui:low",children:`.${Zd}{scrollbar-width:none}.${Zd}::-webkit-scrollbar{display:none}`})}},lH={...Gc,...To},uH=v.forwardRef(function(t,n){const{render:r,className:s,style:a,finalFocus:l,...c}=t,{store:d,popupRef:f,onOpenChangeComplete:h,setOpen:m,valueRef:b,firstItemTextRef:y,selectedItemTextRef:k,multiple:S,handleScrollArrowVisibility:T,scrollHandlerRef:R,listRef:E,highlightItemOnHover:_}=Ds(),{side:C,align:D,alignItemWithTriggerActive:N,isPositioned:M,setControlledAlignItemWithTrigger:B}=NI(),P=c9()!=null,A=CI(),K=Li(),{nonce:$,disableStyleElements:F}=xI(),z=yt(d,mt.id),U=yt(d,mt.open),q=yt(d,mt.openMethod),W=yt(d,mt.mounted),H=yt(d,mt.popupProps),Y=yt(d,mt.transitionStatus),O=yt(d,mt.triggerElement),j=yt(d,mt.positionerElement),V=yt(d,mt.listElement),L=v.useRef(!1),Z=v.useRef(!1),se=v.useRef({}),ne=Rl(),oe=We(me=>{if(!j||!f.current||!Z.current)return;if(L.current||!N){T();return}const ce=j.style.top==="0px",be=j.style.bottom==="0px";if(!ce&&!be){T();return}const ve=NT(j),Re=lc(j.getBoundingClientRect().height,"y",ve),Se=Kt(j),ke=vn(j),Ae=ke.getComputedStyle(j),Oe=parseFloat(Ae.marginTop),Me=parseFloat(Ae.marginBottom),Ue=AT(ke.getComputedStyle(f.current)),xe=Math.min(Se.documentElement.clientHeight-Oe-Me,Ue),_e=me.scrollTop,ee=Qd(me);let fe=0,J=null,re=!1,Te=!1;const Le=Je=>{j.style.height=`${Je}px`},Ke=(Je,xt)=>{const Rt=ac(Je,0,xe-Re);Rt>0&&Le(Re+Rt),me.scrollTop=xt,xe-(Re+Rt)<=vs&&(L.current=!0),T()},Qe=ce?ee-_e:_e,gt=Math.min(Re+Qe,xe);if(fe=gt,Qe<=vs){Ke(Qe,ce?ee:0);return}if(xe-gt>vs)ce?Te=!0:J=0;else if(re=!0,be&&_e<ee){const Je=Re+Qe-xe;J=_e-(Qe-Je)}if(fe=Math.ceil(fe),fe!==0&&Le(fe),Te||J!=null){const Je=Qd(me),xt=Te?Je:ac(J,0,Je);Math.abs(me.scrollTop-xt)>vs&&(me.scrollTop=xt)}(re||fe>=xe-vs)&&(L.current=!0),T()});v.useImperativeHandle(R,()=>oe,[oe]),_o({open:U,ref:f,onComplete(){U&&h?.(!0)}});const ae={open:U,transitionStatus:Y,side:C,align:D};Fe(()=>{!j||!f.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})},[f,j]),Fe(()=>{U||N||(Z.current=!1,L.current=!1,ih(j,se.current))},[U,N,j,f]),Fe(()=>{const me=f.current;if(!U||!O||!j||!me||N&&!M||d.state.transitionStatus==="ending")return;if(!N){Z.current=!0,ne.request(T),me.style.removeProperty("--transform-origin");return}const ce=cH(me);me.style.removeProperty("--transform-origin");try{let be=k.current;be?.isConnected||(be=!mt.hasSelectedValue(d.state)&&y.current?.isConnected?y.current:null);const ve=b.current,Re=vn(j),Se=Re.getComputedStyle(j),ke=Re.getComputedStyle(me),Ae=Kt(O),Oe=NT(O),Me=Jd(O.getBoundingClientRect(),Oe),Ue=Jd(j.getBoundingClientRect(),Oe),xe=Me.height,_e=V||me,ee=_e.scrollHeight,fe=parseFloat(ke.borderBottomWidth),J=parseFloat(Se.marginTop)||10,re=parseFloat(Se.marginBottom)||10,Te=parseFloat(Se.minHeight)||100,Le=AT(ke),Ke=5,Qe=5,gt=20,Je=Ae.documentElement.clientHeight-J-re,xt=Ae.documentElement.clientWidth,Rt=Je-Me.bottom+xe;let rt,et=K==="rtl"?Me.right-Ue.width:Me.left,ze=0;if(be&&ve){const dt=Jd(ve.getBoundingClientRect(),Oe);rt=Jd(be.getBoundingClientRect(),Oe),et=Ue.left+(K==="rtl"?dt.right-rt.right:dt.left-rt.left);const Ve=dt.top-Me.top+dt.height/2;ze=rt.top-Ue.top+rt.height/2-Ve}const He=Rt+ze+re+fe;let Ze=Math.min(Je,He);const ft=Je-J-re,Tt=He-Ze,ot=xt-Qe;j.style.left=`${ac(et,Ke,ot-Ue.width)}px`,j.style.height=`${Ze}px`,j.style.maxHeight="none",j.style.marginTop=`${J}px`,j.style.marginBottom=`${re}px`,me.style.height="100%";const X=Qd(_e),he=Tt>=X-vs;he&&(Ze=Math.min(Je,Ue.height)-(Tt-X));const Ie=Me.top<gt||Me.bottom>Je-gt||Math.ceil(Ze)+vs<Math.min(ee,Te),tt=(Re.visualViewport?.scale??1)!==1&&Ro;if(Ie||tt){Z.current=!0,ih(j,se.current),B(!1);return}const _t=Math.max(Te,Ze);if(he){const dt=Math.max(0,Je-He);j.style.top=Ue.height>=ft?"0":`${dt}px`,j.style.height=`${Ze}px`,_e.scrollTop=Qd(_e)}else j.style.bottom="0",_e.scrollTop=Tt;if(rt){const dt=Ue.top,Ve=Ue.height,Be=rt.top+rt.height/2,nt=Ve>0?(Be-dt)/Ve*100:50,Ge=ac(nt,0,100);me.style.setProperty("--transform-origin",`50% ${Ge}%`)}(_t===Je||Ze>=Le)&&(L.current=!0),T(),_&&d.state.selectedIndex===null&&d.state.activeIndex===null&&E.current[0]!=null&&d.set("activeIndex",0),Z.current=!0}finally{ce()}},[d,U,j,O,b,y,k,f,T,N,B,ne,V,E,_,K,M]),v.useEffect(()=>{if(!N||!j||!U)return;const me=vn(j);function ce(be){m(!1,Ct(Pz,be))}return Lt(me,"resize",ce)},[m,N,j,U]);const ue={...V?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":S||void 0,id:`${z}-list`},onKeyDown(me){P&&TA.has(me.key)&&me.stopPropagation()},onScroll(me){V||oe(me.currentTarget)},...N&&{style:V?{height:"100%"}:OI}},we=gn("div",t,{ref:[n,f],state:ae,stateAttributesMapping:lH,props:[H,ue,jh(Y),{className:!V&&N?rv.className:void 0},c]});return g.jsxs(v.Fragment,{children:[!F&&rv.getElement($),g.jsx(jP,{context:A,modal:!1,disabled:!W,openInteractionType:q,returnFocus:l,restoreFocus:!0,children:we})]})});function AT(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function Qd(e){return _I(e.scrollHeight,e.clientHeight)}function NT(e){return W_.getScale(e)}function lc(e,t,n){return e/n[t]}function Jd(e,t){return Ec({x:lc(e.x,"x",t),y:lc(e.y,"y",t),width:lc(e.width,"x",t),height:lc(e.height,"y",t)})}const OT=[["transform","none"],["scale","1"],["translate","0 0"]];function cH(e){const{style:t}=e,n={};for(const[r,s]of OT)n[r]=t.getPropertyValue(r),t.setProperty(r,s,"important");return()=>{for(const[r]of OT){const s=n[r];s?t.setProperty(r,s):t.removeProperty(r)}}}const fH=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,{store:c,scrollHandlerRef:d}=Ds(),{alignItemWithTriggerActive:f}=NI(),h=yt(c,mt.hasScrollArrows),m=yt(c,mt.openMethod),b=yt(c,mt.multiple),k={id:`${yt(c,mt.id)}-list`,role:"listbox","aria-multiselectable":b||void 0,onScroll(T){d.current?.(T.currentTarget)},...f&&{style:OI},className:h&&m!=="touch"?rv.className:void 0},S=We(T=>{c.set("listElement",T)});return gn("div",t,{ref:[n,S],props:[k,l]})}),II=v.createContext(void 0);function ax(){const e=v.useContext(II);if(!e)throw new Error(In(57));return e}const dH=v.memo(v.forwardRef(function(t,n){const{render:r,className:s,style:a,value:l=null,label:c,disabled:d=!1,nativeButton:f=!1,...h}=t,m=v.useRef(null),b=tN({label:c,textRef:m,indexGuessBehavior:eN.GuessFromOrder}),{store:y,itemProps:k,setOpen:S,setValue:T,selectionRef:R,typingRef:E,valuesRef:_,multiple:C,selectedItemTextRef:D,disabled:N,readOnly:M}=Ds(),B=yt(y,mt.isActive,b.index),P=yt(y,mt.open),A=yt(y,mt.isSelected,l),K=yt(y,mt.isSelectedByFocus,b.index),$=yt(y,mt.isItemEqualToValue),F=b.index,z=F!==-1,U=v.useRef(null);Fe(()=>{if(!z)return;const oe=_.current;return oe[F]=l,()=>{delete oe[F]}},[z,F,l,_]),Fe(()=>{if(!z)return;const oe=y.state.value;let ae=oe;C&&Array.isArray(oe)&&(ae=oe.length>0?oe[oe.length-1]:void 0),ae!==void 0&&ua(l,ae,$)&&(y.set("selectedIndex",F),m.current&&(D.current=m.current))},[z,F,C,$,y,l,D]);const q=v.useRef(null),W=v.useRef("mouse"),H=v.useRef(!1),{getButtonProps:Y,buttonRef:O}=$l({disabled:d,focusableWhenDisabled:!0,native:f,composite:!0}),j={disabled:d,selected:A,highlighted:B};function V(oe){if(N||M)return;const ae=y.state.value;if(C){const ue=Array.isArray(ae)?ae:[],we=A?s4(ue,l,$):[...ue,l];T(we,Ct(kb,oe))}else T(l,Ct(kb,oe)),S(!1,Ct(kb,oe))}function L(){R.current.dragY=0}const Z={role:"option","aria-selected":A,tabIndex:P&&B?0:-1,onKeyDown(oe){q.current=oe.key,y.set("activeIndex",F),oe.key===" "&&E.current&&oe.preventDefault()},onClick(oe){const ae=oe.type==="click"&&W.current!=="touch",ue=oe.nativeEvent.pointerType,we=ae&&Qv(oe.nativeEvent)&&(ue!==void 0||B),me=ae&&!we&&!H.current;H.current=!1,!(oe.type==="keydown"&&q.current===null)&&(d||oe.type==="keydown"&&q.current===" "&&E.current||me||(q.current=null,V(oe.nativeEvent)))},onPointerEnter(oe){W.current=oe.pointerType},onPointerMove(oe){if(oe.pointerType==="mouse"&&oe.buttons===1){const ae=R.current;ae.dragY+=oe.movementY,ae.dragY**2>=64&&(ae.allowUnselectedMouseUp=!0)}},onPointerDown(oe){W.current=oe.pointerType,H.current=!0,L()},onMouseUp(){if(L(),d||W.current==="touch"||H.current)return;const oe=!R.current.allowSelectedMouseUp&&A,ae=!R.current.allowUnselectedMouseUp&&!A;oe||ae||(H.current=!0,U.current?.click(),H.current=!1)}},se=gn("div",t,{ref:[O,n,b.ref,U],state:j,props:[k,Z,h,Y]}),ne=v.useMemo(()=>({selected:A,index:F,textRef:m,selectedByFocus:K,hasRegistered:z}),[A,F,m,K,z]);return g.jsx(II.Provider,{value:ne,children:se})})),IT=v.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:s}=ax();return r||s?g.jsx(pH,{...t,ref:n}):null}),pH=v.memo(v.forwardRef((e,t)=>{const{render:n,className:r,style:s,keepMounted:a,...l}=e,{selected:c}=ax(),d=v.useRef(null),{transitionStatus:f,setMounted:h}=Kc(c),b=gn("span",e,{ref:[t,d],state:{selected:c,transitionStatus:f},props:[{"aria-hidden":!0,children:"✔️"},l],stateAttributesMapping:To});return _o({open:c,ref:d,onComplete(){c||h(!1)}}),b})),hH=v.memo(v.forwardRef(function(t,n){const{index:r,textRef:s,selectedByFocus:a,hasRegistered:l}=ax(),{firstItemTextRef:c,selectedItemTextRef:d}=Ds(),{render:f,className:h,style:m,...b}=t,y=v.useCallback(S=>{S&&(l&&r===0&&(c.current=S),l&&a&&(d.current=S))},[c,d,r,a,l]);return gn("div",t,{ref:[y,n,s],props:b})})),MI="lg",DI="outline",mH={"ui--default-marker":"ui--default-marker",$$css:!0},Wi={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}},MT={base:{kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",k9WMMc:"ui-1yc453h",kMwMTN:"ui-15rks2t",$$css:!0},placeholder:{kMwMTN:"ui-4b2ntj ui-1s8h5yg",$$css:!0}},gH="sm",bH={md:Wi.sizeMd,lg:Wi.sizeLg},yH={md:Wi.frameContentMd,lg:Wi.frameContentLg},vH={md:Wi.frameContentHugFalseMd,lg:Wi.frameContentHugFalseLg};function xH({children:e,variant:t=DI,frame:n="container",shape:r="rounded",size:s=MI,hug:a=!0,className:l,style:c,rootStyle:d,labelStyle:f,disabled:h=!1,id:m,leading:b,trailing:y,open:k,placeholder:S,hideChevron:T=!1,ref:R,"data-popup-open":E,..._}){const C=e==null&&S!=null,D=k??(E!==void 0&&E!==!1),N=k===void 0?E:k||void 0,M=x0(t,void 0),B=zt(S0.root,Wi.base,Cs.root,Gi[s],bH[s],_i.appearance,M.applyControlTone&&k0.foreground,M.applyFilledColors&&_i.colors,M.applyNonFilledBackground&&la.background,t==="outline"&&la.outline,D&&_i.engaged,!a&&Wi.hugFalse,r==="pill"?Wi.shapePill:Wi.shapeRounded,n==="content"&&yH[s],n==="content"&&!a&&vH[s],d,mH),P=zt(ql.root,Dh.root,MT.base,C&&MT.placeholder,f),A={className:"ui-78zum5 ui-6s0dn4 ui-2lah0s ui-1mh7f6w ui-1s8h5yg"},K={0:{className:"ui-2lah0s ui-1mh7f6w ui-1s8h5yg"},1:{className:"ui-2lah0s ui-7qsbfx"}}[!!D<<0];return g.jsxs(v0,{..._,ref:R,id:m,className:rn("ui-select-trigger",B.className,l),style:{...B.style,...c},"data-popup-open":N,"data-variant":t,"data-size":s,disabled:h,children:[b!=null&&g.jsx("span",{className:A.className,style:A.style,children:b}),g.jsx("span",{className:rn("ui-select-label",P.className),style:P.style,children:C?S:e}),y!=null&&g.jsx("span",{className:A.className,style:A.style,children:y}),T?null:g.jsx(Ht,{name:"chevron-down",size:10,className:rn("ui-select-icon",K.className),style:K.style})]})}const DT={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}]},LI=v.createContext(null);function lx(){const e=v.useContext(LI);if(!e)throw new Error("Select internals must be used within Select");return e}function kH(){const e=lx(),t=e.hasValue?g.jsx(tH,{}):void 0;return g.jsx(JU,{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(xH,{...n,className:rn(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 SH({children:e}){const t=lx(),n=va(),{zIndex:r,portalLayerStyles:s}=Hl("popover",t.open),a=Uh(t.placement,t.offset,!1,t.collisionSide),l=t.matchAnchorWidth?"var(--anchor-width)":t.contentWidth;return g.jsxs(rH,{container:n??void 0,style:s,children:[g.jsx(sH,{"data-component":"select-backdrop",...zt(DT.backdrop,r!==null&&DT.backdropZIndex(r-1))}),g.jsx(aH,{align:a.align,alignItemWithTrigger:!1,alignOffset:a.alignOffset,collisionAvoidance:a.collisionAvoidance,"data-component":"select-positioner",positionMethod:a.positionMethod,side:a.side,sideOffset:a.sideOffset,...Ph(A4),children:g.jsx(uH,{"data-block-global-shortcuts":t.open?"Escape":void 0,"data-component":"select-popup","data-size":t.menuSize,...zt(z4,zh,P4[t.menuSize],l!==void 0?$4(l):F4,t.contentStyle),children:g.jsx(Is,{menuSize:t.menuSize,children:g.jsx(kF,{children:g.jsx(fH,{"aria-label":t.ariaLabel??"Select an option",...zt(B4),children:e})})})})})]})}function wH({option:e}){lx();const t=e.description!==void 0,n=g.jsxs(dH,{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(U4),children:[e.leading!=null?g.jsx("span",{...zt(Lb,Y4,t&&jb),children:e.leading}):null,g.jsxs("span",{...zt(H4,t&&G4),children:[g.jsxs(hH,{...zt(e.labelMeta!=null&&V4),children:[g.jsx("span",{...zt(q4),children:e.label}),e.labelMeta!=null?g.jsx("span",{...zt(K4),children:e.labelMeta}):null]}),t?g.jsx("span",{"data-component":"select-item-description",...zt(W4,Ms.root),children:e.description}):null]}),e.trailing!=null?g.jsxs("span",{"data-component":"select-item-end",...zt(Lb,AE,X4,t&&jb),children:[e.trailing,g.jsx(IT,{"data-component":"select-item-indicator",children:g.jsx(Ht,{color:"primary",name:"check","aria-hidden":!0})})]}):g.jsx(IT,{"data-component":"select-item-indicator",...zt(Lb,AE,t&&jb),children:g.jsx(Ht,{color:"primary",name:"check","aria-hidden":!0})})]});return e.tooltip==null?n:g.jsx(af,{closeDelay:e.tooltipCloseDelay,content:e.tooltip,openDelay:e.tooltipOpenDelay,children:n})}function EH({value:e,defaultValue:t,onValueChange:n,open:r,defaultOpen:s,onOpenChange:a,options:l,placeholder:c,variant:d=DI,frame:f="container",shape:h="rounded",size:m=MI,menuSize:b,contentWidth:y,matchAnchorWidth:k=!1,hug:S=!0,disabled:T=!1,className:R,renderTrigger:E,placement:_="bottom-start",offset:C=4,collisionSide:D="flip","aria-label":N,"aria-labelledby":M,id:B,leading:P,trailing:A,labelStyle:K,rootStyle:$,hideChevron:F=!1,contentStyle:z,...U}){const[q,W]=Dl(e,t,void 0,"Select.Root (value)"),H=q!=null&&l.some(ne=>ne.value===q),[Y,O]=Dl(r,s??!1,void 0,"Select.Root (open)"),j=b??"sm",V=v.useCallback((ne,oe)=>{n?.(ne,oe),!oe.isCanceled&&W(ne)},[n,W]),L=v.useCallback((ne,oe)=>{a?.(ne,oe),!oe.isCanceled&&O(ne)},[a,O]),Z=v.useMemo(()=>({hasValue:H,variant:d,frame:f,shape:h,size:m,menuSize:j,hug:S,disabled:T,open:Y,placement:_,offset:C,collisionSide:D,id:B,ariaLabel:N,ariaLabelledBy:M,placeholder:c,leading:P,trailing:A,labelStyle:K,rootStyle:$,hideChevron:F,contentStyle:z,className:R,renderTrigger:E,contentWidth:y,matchAnchorWidth:k}),[N,M,R,D,z,y,T,f,S,H,F,B,Y,K,P,k,C,_,c,j,$,A,E,h,m,d]),se=l.map(ne=>({label:ne.label,value:ne.value}));return g.jsx(LI.Provider,{value:Z,children:g.jsx(Is,{iconSize:gH,children:g.jsxs(XU,{...U,defaultOpen:s,defaultValue:t,disabled:T,id:B,items:se,onOpenChange:L,onValueChange:V,open:r,value:e,children:[g.jsx(kH,{}),g.jsx(SH,{children:l.map((ne,oe)=>g.jsx(wH,{option:ne},typeof ne.value=="string"||typeof ne.value=="number"?String(ne.value):oe))})]})})})}const TH=v.createContext(void 0);function RH(e=!0){const t=v.useContext(TH);if(t===void 0&&!e)throw new Error(In(7));return t}const CH=v.forwardRef(function(t,n){const{className:r,defaultPressed:s=!1,disabled:a=!1,form:l,onPressedChange:c,pressed:d,render:f,type:h,value:m,nativeButton:b=!0,style:y,...k}=t,S=Bl(m||void 0),T=RH(),R=T?.value??[],E=T?void 0:s,_=(a||T?.disabled)??!1,[C,D]=Al({controlled:T?S!==void 0&&R.indexOf(S)>-1:d,default:E,name:"Toggle",state:"pressed"}),{getButtonProps:N,buttonRef:M}=$l({disabled:_,native:b}),B={disabled:_,pressed:C},P=[M,n],A=[{"aria-pressed":C,onClick(F){const z=!C,U=Ct(Oi,F.nativeEvent);c?.(z,U),!U.isCanceled&&(S&&T?.setGroupValue?.(S,z,U),!U.isCanceled&&D(z))}},k,N],K=gn("button",t,{enabled:!T,state:B,ref:P,props:A}),$=v.useMemo(()=>({disabled:_,focusableWhenDisabled:!1}),[_]);return T?g.jsx(f9,{tag:"button",render:f,className:r,style:y,metadata:$,state:B,refs:P,props:A}):K});function LT(e,t,n,r){return typeof e=="string"?g.jsx(Ht,{"aria-hidden":"true",name:e,rootStyle:r,size:n,variant:t}):g.jsx("span",{...GN(n),"aria-hidden":"true",children:e})}function _H({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:LT(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:LT(t,r,s,a)})]})}function AH({icon:e,pressedIcon:t=e,iconVariant:n="outline",variant:r,rounded:s,frame:a="container",size:l,iconSize:c,tone:d,rootStyle:f,iconStyle:h,disabled:m,"aria-label":b,"aria-labelledby":y,...k}){const S=ya(),{size:T,innerIconSize:R,disabled:E,variant:_,tone:C}=KN({disabled:m,enforced:S,iconSize:c,size:l,tone:d,variant:r}),D=WN({enforcedRootStyle:S?.iconButtonRootStyle,frame:a,rootStyle:f,rounded:s,size:T,tone:C,variant:_});return g.jsx(CH,{...k,className:rn("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:(N,M)=>g.jsx("button",{...N,"data-pressed":void 0,children:g.jsx(_H,{icon:e,iconSize:R,iconStyle:[S?.iconButtonIconStyle,h],iconVariant:n,pressed:M.pressed,pressedIcon:t})})})}function NH({pressed:e,...t}){return g.jsx(AH,{...t,pressed:e,variant:e?"secondary":"ghost"})}const jT=e=>{let t;const n=new Set,r=(f,h)=>{const m=typeof f=="function"?f(t):f;if(!Object.is(m,t)){const b=t;t=h??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(y=>y(t,b))}},s=()=>t,c={setState:r,getState:s,getInitialState:()=>d,subscribe:f=>(n.add(f),()=>n.delete(f))},d=t=e(r,s,c);return c},OH=(e=>e?jT(e):jT),IH=e=>e;function MH(e,t=IH){const n=ic.useSyncExternalStore(e.subscribe,ic.useCallback(()=>t(e.getState()),[e,t]),ic.useCallback(()=>t(e.getInitialState()),[e,t]));return ic.useDebugValue(n),n}const DH=/^\/internal\/agent-serve\/agents\/(asd_[0-9a-f]{32})\/engine(?:\/|$)/,LH=/^asd-([0-9a-f]{32})\.agents\.cursorusercontent\.com$/;function jH(e=window.location.pathname,t=window.location.hostname){const n=LH.exec(t.toLowerCase());if(n!==null)return{publicId:`asd_${n[1]}`,mountPath:""};const r=DH.exec(e);if(r===null)return null;const s=r[1];return{publicId:s,mountPath:`/internal/agent-serve/agents/${s}/engine`}}function zH(e=window.location.search){return new URLSearchParams(e).get("embed")==="1"}function jI(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 PH(e,t=window){const n=()=>{const r=jI(t.location,t.history);r!==""&&e(r)};return t.addEventListener("hashchange",n),()=>t.removeEventListener("hashchange",n)}function zI(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 PI(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:zI(e.data)??void 0,artifactId:typeof e.id=="string"&&e.id!==""?e.id:void 0,data:e.data}}function iv(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 $H(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 FH(e){return/\u0000|[\u0001-\u0008\u000b\u000e-\u001f]{4}/.test(e)}function BH(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 UH(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 HH(e){const t=e.title?.trim();return t!==void 0&&t!==""?t:`${e.kind} · ${e.id}`}function qH(e){const t=new Set;for(const n of e)t.add(n.kind);return[...t].sort((n,r)=>n.localeCompare(r))}function zT(e){const t=Date.parse(e.updatedAt);return Number.isNaN(t)?0:t}function $I(e){return[...e].sort((t,n)=>zT(n)-zT(t))}function VH(e,t){return t===null?e:e.filter(n=>n.kind===t)}function GH(e){const t=new Map,n=[];for(const s of $I(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 WH=["home","runs","evals","logs"],sv="section",KH="home",YH={agent:"home"};function XH(e){const t=e?.trim()??"";return t===""?null:WH.includes(t)?t:YH[t]??null}function ZH(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=XH(s.searchParams.get(sv))}catch{return{sessionId:null,view:null,section:null}}return n==="logs"&&r===null&&(r="logs"),{sessionId:t,view:n,section:r}}function FI(e){try{const t=new URL(window.location.href);e===KH?t.searchParams.delete(sv):t.searchParams.set(sv,e);const n=t.toString();if(n===window.location.href)return;history.replaceState(null,"",n)}catch{}}const QH="cursor-playground",JH=["https://cursor.com","https://www.cursor.com","https://prod.cursor.com","https://staging.cursor.com","http://localhost:4000","https://localhost:4000"];function eq(e=document.referrer,t=window.parent!==window){if(!t||e==="")return null;let n;try{n=new URL(e).origin}catch{return null}return JH.includes(n)?n:null}function tq(e,t,n=eq(),r){if(n===null)return;const s={source:QH,type:"state",view:e};t!==void 0&&(s.sessionId=t),r!==void 0&&(s.section=r),window.parent.postMessage(s,n)}const PT=e=>Number.isFinite(e)?e:0;function nq(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(PT(e*1e3)%1e3),nanoseconds:Math.trunc(PT(e*1e6)%1e3)}}function rq(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 iq(e){switch(typeof e){case"number":{if(Number.isFinite(e))return nq(e);break}case"bigint":return rq(e)}throw new TypeError("Expected a finite number or bigint")}const sq=e=>e===0||e===0n,oq=(e,t)=>t===1||t===1n?e:`${e}s`,aq=1e-7,lq=24n*60n*60n*1000n;function uq(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+aq);return(Math.round(b)/10**m).toFixed(m)},l=(h,m,b,y)=>{if(!((s.length===0||!t.colonNotation)&&sq(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?" "+oq(m,h):b;s.push(y)}},c=iq(e),d=BigInt(c.days);if(t.hideYearAndDays?l(BigInt(d)*24n+BigInt(c.hours),"hour","h"):(t.hideYear?l(d,"day","d"):(l(d/365n,"year","y"),l(d%365n,"day","d")),l(Number(c.hours),"hour","h")),l(Number(c.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3){const h=Number(c.seconds),m=Number(c.milliseconds),b=Number(c.microseconds),y=Number(c.nanoseconds);if(l(h,"second","s"),t.formatSubMilliseconds)l(m,"millisecond","ms"),l(b,"microsecond","µs"),l(y,"nanosecond","ns");else{const k=m+b/1e3+y/1e6,S=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,T=k>=1?Math.round(k):Math.ceil(k),R=S?k.toFixed(S):T;l(Number.parseFloat(R),"millisecond","ms",R)}}else{const h=(n?Number(e%lq):e)/1e3%60,m=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,b=a(h,m),y=t.keepDecimalsOnWholeSeconds?b:b.replace(/\.0+$/,"");l(Number.parseFloat(y),"second","s",y)}if(s.length===0)return r+"0"+(t.verbose?" milliseconds":"ms");const f=t.colonNotation?":":" ";return typeof t.unitCount=="number"&&(s=s.slice(0,Math.max(t.unitCount,1))),r+s.join(f)}var BI="en",ux={},ov={};function UI(){return BI}function HI(e){BI=e}function cq(e){return ux[e]}function qI(e){if(!e)throw new Error("No locale data passed");ux[e.locale]=e,ov[e.locale.toLowerCase()]=e.locale}function $T(e){if(ux[e])return e;if(ov[e.toLowerCase()])return ov[e.toLowerCase()]}function VI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.localeMatcher||"lookup";switch(n){case"lookup":return FT(e);case"best fit":return FT(e);default:throw new RangeError('Invalid "localeMatcher" option: '.concat(n))}}function FT(e){var t=$T(e);if(t)return t;for(var n=e.split("-");e.length>1;){n.pop(),e=n.join("-");var r=$T(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),d=s.slice(-1),f=s.slice(-2);return a&&l==1&&c!=11||d==1&&f!=11?"one":a&&l>=2&&l<=4&&(c<12||c>14)||d>=2&&d<=4&&(f<12||f>14)?"few":"other"},ca:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return t==1&&a?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ceb:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-1),c=s.slice(-1);return a&&(r==1||r==2||r==3)||a&&l!=4&&l!=6&&l!=9||!a&&c!=4&&c!=6&&c!=9?"one":"other"},cs:function(t){var n=String(t).split("."),r=n[0],s=!n[1];return t==1&&s?"one":r>=2&&r<=4&&s?"few":s?"other":"many"},cy:function(t){return t==0?"zero":t==1?"one":t==2?"two":t==3?"few":t==6?"many":"other"},da:function(t){var n=String(t).split("."),r=n[0],s=Number(n[0])==t;return t==1||!s&&(r==0||r==1)?"one":"other"},dsb:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-2),c=s.slice(-2);return a&&l==1||c==1?"one":a&&l==2||c==2?"two":a&&(l==3||l==4)||c==3||c==4?"few":"other"},dz:function(t){return"other"},es:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return t==1?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ff:function(t){return t>=0&&t<2?"one":"other"},fr:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return t>=0&&t<2?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ga:function(t){var n=String(t).split("."),r=Number(n[0])==t;return t==1?"one":t==2?"two":r&&t>=3&&t<=6?"few":r&&t>=7&&t<=10?"many":"other"},gd:function(t){var n=String(t).split("."),r=Number(n[0])==t;return t==1||t==11?"one":t==2||t==12?"two":r&&t>=3&&t<=10||r&&t>=13&&t<=19?"few":"other"},he:function(t){var n=String(t).split("."),r=n[0],s=!n[1];return r==1&&s||r==0&&!s?"one":r==2&&s?"two":"other"},is:function(t){var n=String(t).split("."),r=n[0],s=(n[1]||"").replace(/0+$/,""),a=Number(n[0])==t,l=r.slice(-1),c=r.slice(-2);return a&&l==1&&c!=11||s%10==1&&s%100!=11?"one":"other"},lt:function(t){var n=String(t).split("."),r=n[1]||"",s=Number(n[0])==t,a=s&&n[0].slice(-1),l=s&&n[0].slice(-2);return a==1&&(l<11||l>19)?"one":a>=2&&a<=9&&(l<11||l>19)?"few":r!=0?"many":"other"},lv:function(t){var n=String(t).split("."),r=n[1]||"",s=r.length,a=Number(n[0])==t,l=a&&n[0].slice(-1),c=a&&n[0].slice(-2),d=r.slice(-2),f=r.slice(-1);return a&&l==0||c>=11&&c<=19||s==2&&d>=11&&d<=19?"zero":l==1&&c!=11||s==2&&f==1&&d!=11||s!=2&&f==1?"one":"other"},mk:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-1),c=r.slice(-2),d=s.slice(-1),f=s.slice(-2);return a&&l==1&&c!=11||d==1&&f!=11?"one":"other"},mt:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return t==1?"one":t==2?"two":t==0||s>=3&&s<=10?"few":s>=11&&s<=19?"many":"other"},pl:function(t){var n=String(t).split("."),r=n[0],s=!n[1],a=r.slice(-1),l=r.slice(-2);return t==1&&s?"one":s&&a>=2&&a<=4&&(l<12||l>14)?"few":s&&r!=1&&(a==0||a==1)||s&&a>=5&&a<=9||s&&l>=12&&l<=14?"many":"other"},pt:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return s==0||s==1?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ro:function(t){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,a=s&&n[0].slice(-2);return t==1&&r?"one":!r||t==0||t!=1&&a>=1&&a<=19?"few":"other"},ru:function(t){var n=String(t).split("."),r=n[0],s=!n[1],a=r.slice(-1),l=r.slice(-2);return s&&a==1&&l!=11?"one":s&&a>=2&&a<=4&&(l<12||l>14)?"few":s&&a==0||s&&a>=5&&a<=9||s&&l>=11&&l<=14?"many":"other"},se:function(t){return t==1?"one":t==2?"two":"other"},si:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"";return t==0||t==1||r==0&&s==1?"one":"other"},sl:function(t){var n=String(t).split("."),r=n[0],s=!n[1],a=r.slice(-2);return s&&a==1?"one":s&&a==2?"two":s&&(a==3||a==4)||!s?"few":"other"}};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:dq(e)}var fq=/^([a-z0-9]+)/i;function dq(e){var t=e.match(fq);if(!t)throw new TypeError("Invalid locale: ".concat(e));return t[1]}function Ac(e){"@babel/helpers - typeof";return Ac=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},Ac(e)}function pq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UT(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,mq(r.key),r)}}function hq(e,t,n){return t&&UT(e.prototype,t),n&&UT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function mq(e){var t=gq(e,"string");return Ac(t)=="symbol"?t:t+""}function gq(e,t){if(Ac(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ac(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var av=(function(){function e(t,n){pq(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 hq(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 HT(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?HT(Object(n),!0).forEach(function(r){bq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bq(e,t,n){return(t=GI(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VT(e,t){return kq(e)||xq(e,t)||vq(e,t)||yq()}function yq(){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 vq(e,t){if(e){if(typeof e=="string")return GT(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)?GT(e,t):void 0}}function GT(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 xq(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,l,c=[],d=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(d=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(h){f=!0,s=h}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw s}}return c}}function kq(e){if(Array.isArray(e))return e}function Sq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wq(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,GI(r.key),r)}}function Eq(e,t,n){return t&&wq(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function GI(e){var t=Tq(e,"string");return jl(t)=="symbol"?t:t+""}function Tq(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 Rq=["second","minute","hour","day","week","month","quarter","year"],Cq=["auto","always"],_q=["long","short","narrow"],Aq=["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]:{};Sq(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(Cq.indexOf(r)<0)throw new RangeError('Invalid "numeric" option: '.concat(r));this.numeric=r}if(s!==void 0){if(_q.indexOf(s)<0)throw new RangeError('Invalid "style" option: '.concat(s));this.style=s}if(a!==void 0){if(Aq.indexOf(a)<0)throw new RangeError('Invalid "localeMatcher" option: '.concat(a));this.localeMatcher=a}if(typeof t=="string"&&(t=[t]),t.push(UI()),this.locale=e.supportedLocalesOf(t,{localeMatcher:this.localeMatcher})[0],!this.locale)throw new Error("Unsupported locale");av.supportedLocalesOf(this.locale).length>0?this.pluralRules=new av(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=VI(this.locale,{localeMatcher:this.localeMatcher})}return Eq(e,[{key:"format",value:function(){var n=WT(arguments),r=VT(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=WT(arguments),r=VT(n,2),s=r[0],a=r[1],l=this.getRule(s,a),c=l.indexOf("{0}");if(c<0)return[{type:"literal",value:l}];var d=[];return c>0&&d.push({type:"literal",value:l.slice(0,c)}),d=d.concat(this.formatNumberToParts(Math.abs(s)).map(function(f){return qT(qT({},f),{},{unit:a})})),c+3<l.length-1&&d.push({type:"literal",value:l.slice(c+3)}),d}},{key:"getRule",value:function(n,r){var s=cq(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[Dq(n)?"past":"future"];if(typeof c=="string")return c;var d=this.pluralRules&&this.pluralRules.select(Math.abs(n))||"other";return c[d]||c.other}},{key:"formatNumber",value:function(n){return this.numberFormat?this.numberFormat.format(n):String(n)}},{key:"formatNumberToParts",value:function(n){return this.numberFormat&&this.numberFormat.formatToParts?this.numberFormat.formatToParts(n):[{type:"integer",value:this.formatNumber(n)}]}},{key:"resolvedOptions",value:function(){return{locale:this.locale,style:this.style,numeric:this.numeric,numberingSystem:this.numberingSystem}}}]),e})();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 VI(n,t)})};Ns.addLocale=qI;Ns.addDefaultLocale=function(e){qI(e),HI(e.locale)};Ns.setDefaultLocale=HI;Ns.getDefaultLocale=UI;Ns.PluralRules=av;var iy='Invalid "unit" argument';function Nq(e){if(jl(e)==="symbol")throw new TypeError(iy);if(typeof e!="string")throw new RangeError("".concat(iy,": ").concat(e));if(e[e.length-1]==="s"&&(e=e.slice(0,e.length-1)),Rq.indexOf(e)<0)throw new RangeError("".concat(iy,": ").concat(e));return e}var Oq='Invalid "number" argument';function Iq(e){if(e=Number(e),Number.isFinite&&!Number.isFinite(e))throw new RangeError("".concat(Oq,": ").concat(e));return e}function Mq(e){return 1/e===-1/0}function Dq(e){return e<0||e===0&&Mq(e)}function WT(e){if(e.length<2)throw new TypeError('"unit" argument is required');return[Iq(e[0]),Nq(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 Lq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jq(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,Pq(r.key),r)}}function zq(e,t,n){return t&&jq(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pq(e){var t=$q(e,"string");return ca(t)=="symbol"?t:t+""}function $q(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 KT=(function(){function e(){Lq(this,e),this.cache={}}return zq(e,[{key:"get",value:function(){for(var n=this.cache,r=arguments.length,s=new Array(r),a=0;a<r;a++)s[a]=arguments[a];for(var l=0,c=s;l<c.length;l++){var d=c[l];if(ca(n)!=="object")return;n=n[d]}return n}},{key:"put",value:function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];for(var a=r.pop(),l=r.pop(),c=this.cache,d=0,f=r;d<f.length;d++){var h=f[d];ca(c[h])!=="object"&&(c[h]={}),c=c[h]}return c[l]=a}}]),e})();function lv(e){"@babel/helpers - typeof";return lv=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},lv(e)}function Fq(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=Bq(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 Bq(e,t){if(e){if(typeof e=="string")return YT(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?YT(e,t):void 0}}function YT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Uq(e,t){for(var n=Fq(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 Hq(){var e=(typeof Intl>"u"?"undefined":lv(Intl))==="object";return e&&typeof Intl.DateTimeFormat=="function"}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 qq(e){return Gq(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 Vq={}.constructor;function Gq(e){return uv(e)!==void 0&&e!==null&&e.constructor===Vq}var ks=60,sh=60*ks,ia=24*sh,cv=7*ia,fv=30.44*ia,WI=146097/400*ia;function Sl(e){switch(e){case"second":return 1;case"minute":return ks;case"hour":return sh;case"day":return ia;case"week":return cv;case"month":return fv;case"year":return WI}}function KI(e){return e.factor!==void 0?e.factor:Sl(e.unit||e.formatAs)||1}function Nc(e){return e==="floor"?Math.floor:Math.round}function cx(e){return e==="floor"?1:.5}function dv(e){"@babel/helpers - typeof";return dv=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},dv(e)}function YI(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),dv(c)==="object"&&(n&&n.id&&c[n.id]!==void 0?c=c[n.id]:c=c.default),typeof c=="function"&&(c=c(r,{future:a,getMinTimeForUnit:function(f,h){return XT(f,h||n&&n.formatAs,{round:l})}})),c===void 0&&e.test&&(e.test(r,{now:s,future:a})?c=0:c=9007199254740991),c===void 0&&(n?e.formatAs&&n.formatAs&&(c=XT(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 XT(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-cx(r))}function Oc(e){"@babel/helpers - typeof";return Oc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oc(e)}function 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 Wq(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){Kq(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 Kq(e,t,n){return(t=Yq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yq(e){var t=Xq(e,"string");return Oc(t)=="symbol"?t:t+""}function Xq(e,t){if(Oc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Oc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zq(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.units;e=Jq(e,l);var c=Qq(e,t,{now:r,future:s,round:a});{if(c){var d=e[e.indexOf(c)-1],f=e[e.indexOf(c)+1];return[d,c,f]}return[void 0,void 0,e[0]]}}function Qq(e,t,n){var r=n.now,s=n.future,a=n.round;if(e.length!==0){var l=XI(e,t,{now:r,future:s||t<0,round:a});if(l!==-1){var c=e[l];if(c.granularity){var d=Nc(a)(Math.abs(t)/KI(c)/c.granularity)*c.granularity;if(d===0&&l>0)return e[l-1]}return c}}}function XI(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=YI(e[r],Wq({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:XI(e,t,n,r+1)}function Jq(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 eV(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),d=Nc(s)(c/a)*a;return l?d>0?c-d+nV(s,a):c-d+1:-(c-d)+tV(s,a)}}function tV(e,t){return cx(e)*t}function nV(e,t){return(1-cx(e))*t+1}var rV=365*24*60*60*1e3,ZI=1e3*rV;function iV(e,t,n){var r=n.prevStep,s=n.nextStep,a=n.now,l=n.future,c=n.round,d=e.getTime?e.getTime():e,f=function(k){return eV(k,d,{now:a,round:c})},h=oV(l?t:s,d,{future:l,now:a,round:c,prevStep:l?r:t});if(h!==void 0){var m;if(t&&(t.getTimeToNextUpdate&&(m=t.getTimeToNextUpdate(d,{getTimeToNextUpdateForUnit:f,getRoundFunction:Nc,now:a,future:l,round:c})),m===void 0)){var b=t.unit||t.formatAs;b&&(m=f(b))}return m===void 0?h:Math.min(m,h)}}function sV(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.prevStep,c=YI(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?ZI:t+c*1e3}function oV(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.prevStep;if(e){var c=sV(e,t,{now:r,future:s,round:a,prevStep:l});return c===void 0?void 0:c-r}else return s?t-r+1:ZI}var QI={};function yl(e){return QI[e]}function JI(e){if(!e)throw new Error("[javascript-time-ago] No locale data passed.");QI[e.locale]=e}const aV=[{formatAs:"now"},{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"}],pv={steps:aV,labels:"long"};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 QT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function JT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QT(Object(n),!0).forEach(function(r){lV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lV(e,t,n){return(t=uV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uV(e){var t=cV(e,"string");return Ic(t)=="symbol"?t:t+""}function cV(e,t){if(Ic(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ic(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const hv=JT(JT({},pv),{},{steps:pv.steps.filter(function(e){return e.formatAs!=="second"})}),eM=[{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*sh,unit:"half-hour"},{threshold:42.5*ks,threshold_for_minute:52.5*ks,factor:sh,unit:"hour"},{threshold:20.5/24*ia,factor:ia,unit:"day"},{threshold:5.5*ia,factor:cv,unit:"week"},{threshold:3.5*cv,factor:fv,unit:"month"},{threshold:10.5*fv,factor:WI,unit:"year"}],eR={gradation:eM,flavour:"long",units:["now","minute","hour","day","week","month","year"]},fV={gradation:eM,flavour:"long-time",units:["now","minute","hour","day","week","month","year"]};function tM(e){return e instanceof Date?e:new Date(e)}var mv=[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"}],Vi={},dV={minTime:function(t,n){n.future;var r=n.getMinTimeForUnit;return r("day")},format:function(t,n){return Vi[n]||(Vi[n]={}),Vi[n].dayMonth||(Vi[n].dayMonth=new Intl.DateTimeFormat(n,{month:"short",day:"numeric"})),Vi[n].dayMonth.format(tM(t))}},pV={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 Vi[n]||(Vi[n]={}),Vi[n].dayMonthYear||(Vi[n].dayMonthYear=new Intl.DateTimeFormat(n,{year:"numeric",month:"short",day:"numeric"})),Vi[n].dayMonthYear.format(tM(t))}};Hq()?mv.push(dV,pV):mv.push({formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"});const fa={steps:mv,labels:["mini","short-time","narrow","short"]};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 tR(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 nR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tR(Object(n),!0).forEach(function(r){hV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hV(e,t,n){return(t=mV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mV(e){var t=gV(e,"string");return Mc(t)=="symbol"?t:t+""}function gV(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 bV=nR(nR({},fa),{},{steps:[{formatAs:"now"}].concat(fa.steps)});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 rR(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 iR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rR(Object(n),!0).forEach(function(r){yV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rR(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 Dc(t)=="symbol"?t:t+""}function xV(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 gv=iR(iR({},fa),{},{steps:fa.steps.filter(function(e){return e.formatAs!=="second"})});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 sR(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 oR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sR(Object(n),!0).forEach(function(r){kV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kV(e,t,n){return(t=SV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SV(e){var t=wV(e,"string");return Lc(t)=="symbol"?t:t+""}function wV(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 EV=oR(oR({},gv),{},{steps:[{formatAs:"now"}].concat(gv.steps)});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 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 ep(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){TV(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 TV(e,t,n){return(t=RV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RV(e){var t=CV(e,"string");return jc(t)=="symbol"?t:t+""}function CV(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 _V=ep(ep({},fa),{},{steps:fa.steps.filter(function(e){return e.formatAs!=="second"}).map(function(e){return e.formatAs==="minute"?ep(ep({},e),{},{minTime:ks}):e})}),zc={steps:[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"month"},{formatAs:"year"}],labels:["mini","short-time","narrow","short"]};function Pc(e){"@babel/helpers - typeof";return Pc=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},Pc(e)}function lR(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 uR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lR(Object(n),!0).forEach(function(r){AV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function AV(e,t,n){return(t=NV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NV(e){var t=OV(e,"string");return Pc(t)=="symbol"?t:t+""}function OV(e,t){if(Pc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const IV=uR(uR({},zc),{},{steps:[{formatAs:"now"}].concat(zc.steps)});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 cR(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 fR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cR(Object(n),!0).forEach(function(r){MV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cR(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 $c(t)=="symbol"?t:t+""}function LV(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 bv=fR(fR({},zc),{},{steps:zc.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 dR(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 pR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dR(Object(n),!0).forEach(function(r){jV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jV(e,t,n){return(t=zV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zV(e){var t=PV(e,"string");return Fc(t)=="symbol"?t:t+""}function PV(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 $V=pR(pR({},bv),{},{steps:[{formatAs:"now"}].concat(bv.steps)});function FV(e){switch(e){case"default":case"round":return pv;case"round-minute":return hv;case"approximate":return eR;case"time":case"approximate-time":return fV;case"mini":return zc;case"mini-now":return IV;case"mini-minute":return bv;case"mini-minute-now":return $V;case"twitter":return fa;case"twitter-now":return bV;case"twitter-minute":return gv;case"twitter-minute-now":return EV;case"twitter-first-minute":return _V;default:return eR}}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 BV(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=nM(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 UV(e,t){return VV(e)||qV(e,t)||nM(e,t)||HV()}function HV(){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 nM(e,t){if(e){if(typeof e=="string")return hR(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)?hR(e,t):void 0}}function hR(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 qV(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,l,c=[],d=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(d=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(h){f=!0,s=h}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw s}}return c}}function VV(e){if(Array.isArray(e))return e}function GV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WV(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,YV(r.key),r)}}function KV(e,t,n){return t&&WV(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function YV(e){var t=XV(e,"string");return da(t)=="symbol"?t:t+""}function XV(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 $r=(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;GV(this,e),typeof t=="string"&&(t=[t]),this.locale=Uq(t.concat(e.getDefaultLocale()),yl),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 KT,this.pluralRulesCache=new KT}return KV(e,[{key:"format",value:function(n,r,s){var a=this;s||(r&&!tG(r)?(s=r,r=void 0):s={}),r||(r=hv),typeof r=="string"&&(r=FV(r));var l=ZV(n),c=this.getLabels(r.flavour||r.labels),d=c.labels,f=c.labelsType,h=s.round||r.round,m,b=Date.now();r.now!==void 0&&(m=r.now),m===void 0&&s.now!==void 0&&(m=s.now),m===void 0&&(m=b);var y=function(N){var M=N.now,B=(M-l)/1e3,P=s.future||B<0,A=eG(d,yl(a.locale).now,yl(a.locale).long,P);if(r.custom){var K=r.custom({now:M,date:new Date(l),time:l,elapsed:B,locale:a.locale});if(K!==void 0)return{getText:function(){return K},getTextRefreshDelay:function(){throw new Error('`getTimeToNextUpdate: true` feature is not supported by legacy "styles" that have a `custom` function')}}}var $=JV(r.units,d,A),F=Zq(r.gradation||r.steps||hv.steps,B,{now:M,units:$,round:h,future:P}),z=UV(F,3),U=z[0],q=z[1],W=z[2],H=function(){return a.formatDateForStep(l,q,B,{labels:d,labelsType:f,nowLabel:A,now:M,future:P,round:h})||""},Y=function(){var j=iV(l,q,{nextStep:W,prevStep:U,now:M,future:P,round:h});if(typeof j=="number")return s.getTimeToNextUpdateUncapped?j:iM(j)};return{getText:H,getTextRefreshDelay:Y}},k=y({now:m}),S=k.getText,T=k.getTextRefreshDelay;if(s.getTimeToNextUpdate)return[S(),T()];if(s.refresh){var R=6e4,E,_=function D(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:R;E=nG(function(){var M=y({now:m+(Date.now()-b)}),B=M.getText,P=M.getTextRefreshDelay;s.refresh(B()),D(P())},N)};_(T());var C=function(){clearTimeout(E)};return[S(),C]}return S()}},{key:"formatDateForStep",value:function(n,r,s,a){var l=this,c=a.labels,d=a.labelsType,f=a.nowLabel,h=a.now,m=a.future,b=a.round;if(r){if(r.format)return r.format(n,this.locale,{formatAs:function(R,E){return l.formatValue(E,R,{labels:c,future:m})},now:h,future:m});var y=r.unit||r.formatAs;if(!y)throw new Error("[javascript-time-ago] Each step must define either `formatAs` or `format()`. Step: ".concat(JSON.stringify(r)));if(y==="now")return f;var k=Math.abs(s)/KI(r);r.granularity&&(k=Nc(b)(k/r.granularity)*r.granularity);var S=-1*Math.sign(s)*Nc(b)(k);switch(S===0&&(m?S=0:S=-0),d){case"long":case"short":case"narrow":return this.getFormatter(d).format(S,y);default:return this.formatValue(S,y,{labels:c,future:m})}}}},{key:"formatValue",value:function(n,r,s){var a=s.labels,l=s.future;return this.getFormattingRule(a,r,n,{future:l}).replace("{0}",this.formatNumber(Math.abs(n)))}},{key:"getFormattingRule",value:function(n,r,s,a){var l=a.future;if(this.locale,n=n[r],typeof n=="string")return n;var c=s===0?l?"future":"past":s<0?"past":"future",d=n[c]||n;if(typeof d=="string")return d;var f=this.getPluralRules().select(Math.abs(s));return d[f]||d.other}},{key:"formatNumber",value:function(n){return this.numberFormat?this.numberFormat.format(n):String(n)}},{key:"getFormatter",value:function(n){return this.relativeTimeFormatCache.get(this.locale,n)||this.relativeTimeFormatCache.put(this.locale,n,new this.IntlRelativeTimeFormat(this.locale,{style:n}))}},{key:"getPluralRules",value:function(){return this.pluralRulesCache.get(this.locale)||this.pluralRulesCache.put(this.locale,new this.IntlPluralRules(this.locale))}},{key:"getLabels",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];typeof n=="string"&&(n=[n]),n=n.map(function(c){switch(c){case"tiny":case"mini-time":return"mini";default:return c}}),n=n.concat("long");for(var r=yl(this.locale),s=BV(n),a;!(a=s()).done;){var l=a.value;if(r[l])return{labelsType:l,labels:r[l]}}}}]),e})(),rM="en";$r.getDefaultLocale=function(){return rM};$r.setDefaultLocale=function(e){yv=!0,rM=e};$r.addDefaultLocale=function(e){yv&&$r.getDefaultLocale()!==e.locale&&console.warn(`[javascript-time-ago] You're adding "`.concat(e.locale,'" as the default locale but you have already added "').concat($r.getDefaultLocale(),'" as the default locale. "').concat(e.locale,'" is the default locale now.')),yv=!0,$r.addLocale(e),$r.setDefaultLocale(e.locale)};var yv=!1;$r.addLocale=function(e){JI(e),Ns.addLocale(e)};$r.locale=$r.addLocale;$r.addLabels=function(e,t,n){var r=yl(e);r||(JI({locale:e}),r=yl(e)),r[t]=n};function ZV(e){if(e.constructor===Date||QV(e))return e.getTime();if(typeof e=="number")return e;throw new Error("Unsupported relative time formatter input: ".concat(da(e),", ").concat(e))}function QV(e){return da(e)==="object"&&typeof e.getTime=="function"}function JV(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 eG(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 tG(e){return typeof e=="string"||qq(e)}function nG(e,t){return setTimeout(e,iM(t))}function iM(e){return Math.min(e,rG)}var rG=2147483647;const sM={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"}}};$r.addLocale(sM);$r.addDefaultLocale(sM);const iG=new $r("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 ti(e,t){const n=String(e??"").replace(/\s+/g," ").trim();return n.length>t?`${n.slice(0,t-1)}…`:n}function sG(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 Mi(e){return e==null||!Number.isFinite(e)?"—":uq(e)}function fx(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 oG=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3,hour12:!1});function mR(e){return e==null||!Number.isFinite(e)?"—":oG.format(e)}function vv(e,t=Date.now()){const n=wl(e);return n===null?null:iG.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 aG=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1});function oh(e){return e==null||!Number.isFinite(e)?"0":aG.format(e)}function lG(e){return e==null||!Number.isFinite(e)?"—":e===0?"$0.00":e>=.1?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`}function oM(e){if(e?.redacted===!0)return null;const t=e?.text;return typeof t=="string"&&t!==""?t:null}function xv(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 uG=new Set(["review.cursor.com"]);function aM(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"||uG.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 cG(e){return typeof e=="string"?e:e&&typeof e=="object"&&typeof e.id=="string"?e.id:e?JSON.stringify(e):""}function lM(e){return e!=="http"}const fG=new Set(["chat","trace","raw","artifacts"]);function dG(e){if(!e.seeded||!e.embedded)return{action:"none"};const n=e.sessions.filter(s=>!e.knownIds.has(s.sessionId)&&lM(s.channelId)&&s.running===!0)[0];return n===void 0?{action:"none"}:e.currentSessionId===null&&fG.has(e.view)?{action:"select",sessionId:n.sessionId}:{action:"reveal",sessionId:n.sessionId}}function pG(e){return e.filter(t=>lM(t.channelId)&&t.running===!0).length}function gR(e,t){return typeof t.text=="string"?t.text:typeof t.delta=="string"?e+t.delta:e}const hG=new Set(["github","slack"]);function mG(e){return/^\s*\//.test(e)}function nm(e){const t=[];for(const n of e??[])if(n.id!=="http"&&!(n.kind!==void 0&&hG.has(n.kind)))for(const r of n.routes??[]){const s=xG(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:ah(n.method)-ah(r.method)}),t}function uM(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 gG(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 bG(e){if(e.length===0)return"No channel slash commands on this agent. Send a normal message to chat on http.";const t=["Channel slash commands (from `/v1/info` routes):",""],n=new Map;for(const r of e){const s=n.get(r.name)??[];s.push(r),n.set(r.name,s)}for(const[r,s]of n){const a=s.map(f=>f.method).join("|"),l=s.find(f=>f.description)?.description??"",c=dx(s[0]),d=cM(c);t.push(d?`- \`${r}\` (${a}) — ${l}${l?" ":""}${d}`:`- \`${r}\` (${a})${l?` — ${l}`:""}`)}return t.push("","Args: JSON object, `key=value` flags, or a positional value for the first required string field."),t.join(`
|
|
17
|
+
`)}function yG(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=uM(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=vG(l,a),d=dx(c),f=wG(a,d);if(!f.ok)return{ok:!1,error:f.error,commandName:s};const h=kG(d,f.value);return h.length>0?{ok:!1,error:`Missing required field${h.length>1?"s":""}: ${h.join(", ")}. ${cM(d)||""}`.trim(),commandName:s}:c.method==="GET"||c.method==="HEAD"?{ok:!0,command:c,query:RG(f.value)}:{ok:!0,command:c,body:f.value,query:c.querySchema!==void 0?CG(f.value,c.querySchema):void 0}}function vG(e,t){if(e.length===1)return e[0];const n=[...e].sort((a,l)=>ah(a.method)-ah(l.method)),r=fM(t);if(r!==null){let a=null,l=-1;for(const c of n){const d=dx(c),f=SG(d,r);f>l&&(l=f,a=c)}if(a!==null&&l>0)return a}const s=n.find(a=>a.method==="GET");return s!==void 0?s:n[0]}function xG(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 ah(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 dx(e){return e.method==="GET"||e.method==="HEAD"?e.querySchema:e.bodySchema??e.querySchema}function cM(e){if(e===void 0)return"";const t=rm(e);if(t===void 0)return"";const n=im(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 rm(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 im(e){return e===void 0||!Array.isArray(e.required)?new Set:new Set(e.required.filter(t=>typeof t=="string"))}function kG(e,t){const n=im(e),r=[];for(const s of n){const a=t[s];(a==null||typeof a=="string"&&a.trim()==="")&&r.push(s)}return r}function SG(e,t){const n=rm(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 im(e))s in t&&(r+=3);return r}function fM(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 wG(e,t){if(e==="")return{ok:!0,value:{}};const n=fM(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=rm(t),s={},a=[];for(const l of EG(e)){const c=l.indexOf("=");if(c>0){const d=l.slice(0,c),f=l.slice(c+1);s[d]=TG(f,r?.[d])}else a.push(l)}if(a.length>0){const l=[...im(t)],c=(l.length>0?l:Object.keys(r??{})).filter(f=>{const h=r?.[f];return h===void 0||h.type==="string"||h.type===void 0}),d=c.find(f=>s[f]===void 0)??c[0];if(d===void 0)return{ok:!1,error:`Unexpected positional args: ${a.join(" ")}`};a.length===1?s[d]=a[0]:s[d]=a.join(" ")}return{ok:!0,value:s}}function EG(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 TG(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 RG(e){const t={};for(const[n,r]of Object.entries(e))r!=null&&(t[n]=typeof r=="string"?r:String(r));return t}function CG(e,t){const n=rm(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 _G{constructor(t,n,r=()=>""){this.basePath=t,this.getToken=n,this.getAliasToken=r}url(t){return(this.basePath||"")+t}headers(t){const n={...t},r=this.getToken().trim();r&&(n.authorization=`Bearer ${r}`);const s=this.getAliasToken().trim();return s&&(n["x-agent-alias-token"]=s),n}async request(t,n={}){const r=await fetch(this.url(t),{...n,headers:this.headers(n.headers)}),s=await r.text();let a=null;try{a=s?JSON.parse(s):null}catch{a=null}return{status:r.status,ok:r.ok,body:a}}postJson(t,n){return this.request(t,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)})}health(){return this.request("/v1/health")}info(){return this.request("/v1/info")}logs(t=-1){const n=t<0?"":`?after=${t}`;return this.request(`/v1/logs${n}`)}meta(){return this.request("/v1/meta")}sessions(){return this.request("/v1/sessions")}artifacts(t={}){const n=new URLSearchParams;t.sessionId!==void 0&&t.sessionId!==""&&n.set("sessionId",t.sessionId),t.limit!==void 0&&n.set("limit",String(t.limit));const r=n.toString();return this.request(`/v1/artifacts${r===""?"":`?${r}`}`)}async artifactContent(t,n){const r=await fetch(this.url(`/v1/artifacts/${encodeURIComponent(t)}/content`),{headers:this.headers()}),s=r.headers.get("content-type")??void 0;if(!r.ok||r.body===null)return await r.body?.cancel().catch(()=>{}),{status:r.status,ok:!1,contentType:s,bytes:new Uint8Array(0),truncated:!1};const a=r.body.getReader(),l=[];let c=0,d=!1;for(;;){const{done:m,value:b}=await a.read();if(m)break;if(b!==void 0){if(c+b.length>n){l.push(b.slice(0,n-c)),c=n,d=!0,await a.cancel().catch(()=>{});break}l.push(b),c+=b.length}}const f=new Uint8Array(c);let h=0;for(const m of l)f.set(m,h),h+=m.length;return{status:r.status,ok:!0,contentType:s,bytes:f,truncated:d}}createSession(t){return this.postJson("/v1/session",{message:t})}followUp(t,n,r){return this.postJson(`/v1/session/${encodeURIComponent(t)}`,{message:n,continuationToken:r})}stopSession(t){return this.postJson(`/v1/session/${encodeURIComponent(t)}/stop`,{})}resolveApproval(t,n,r){return this.postJson(`/v1/session/${encodeURIComponent(t)}/approvals/${encodeURIComponent(n)}`,{decision:r})}resolveAuth(t,n,r){return this.postJson(`/v1/session/${encodeURIComponent(t)}/auths/${encodeURIComponent(n)}`,{decision:r})}dispatchSchedule(t){return this.request(`/v1/dev/schedules/${encodeURIComponent(t)}`,{method:"POST"})}evalsList(){return this.request("/v1/dev/evals")}evalsListRuns(){return this.request("/v1/dev/evals/runs")}evalsStartRun(t={}){return this.postJson("/v1/dev/evals/runs",t)}evalsRunStatus(t){return this.request(`/v1/dev/evals/runs/${encodeURIComponent(t)}`)}evalsCancelRun(t){return this.postJson(`/v1/dev/evals/runs/${encodeURIComponent(t)}/cancel`,{})}channelRequest(t,n,r={}){let s=n;if(r.query!==void 0){const l=new URLSearchParams;for(const[d,f]of Object.entries(r.query))f!==""&&l.set(d,f);const c=l.toString();c!==""&&(s=`${n}?${c}`)}const a={method:t.toUpperCase()};return r.body!==void 0&&(a.headers={"content-type":"application/json"},a.body=JSON.stringify(r.body)),this.request(s,a)}streamFetch(t,n,r){return fetch(this.url(`/v1/session/${encodeURIComponent(t)}/stream?startIndex=${n}`),{signal:r,headers:this.headers()})}eventsText(t){return fetch(this.url(`/v1/session/${encodeURIComponent(t)}/events`),{headers:this.headers()})}sessionCost(t){return this.request(`/v1/session/${encodeURIComponent(t)}/cost`)}}const kt={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"},AG=new Set(Object.values(kt));class NG{constructor(t){this.client=t,this.capabilities=AG,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 OG="agent-sdk-playground-boot";function IG(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function MG(e){const t=e.getElementById(OG);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(!IG(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 dM=new Set([kt.infoRead,kt.sessionRead,kt.sessionStart,kt.sessionFollowUp,kt.sessionStream,kt.eventRead,kt.logRead]),DG=new Set([...dM,kt.evalRead,kt.evalRun]),bR=18e4,LG=1e3,yR=500;function jG(e){return Math.min(100*2**e,LG)}const zG=2e4,PG=5e3,$G=100,FG=e=>new Promise(t=>globalThis.setTimeout(t,e));function mn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function BG(e){return!mn(e)||typeof e.slug!="string"?null:{slug:e.slug,cliVersion:typeof e.manifestCliVersion=="string"?e.manifestCliVersion:void 0}}function UG(e){if(!mn(e)||!Array.isArray(e.components))return null;const t=e.components.filter(n=>mn(n)&&typeof n.componentKey=="string"&&mn(n.info));return(t.find(n=>n.componentKey==="default")??t[0])?.info??null}function HG(e){return!mn(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 qG(e){return mn(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 VG(e){switch(e){case"unbound":case"creating":case"active":case"hibernated":case"failed":case"deleting":return e;default:return null}}function GG(e){if(!mn(e))return null;const t=VG(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 WG(e){if(!mn(e)||!Array.isArray(e.sessions))return null;const t=[];for(const n of e.sessions){const r=GG(n);if(r===null)return null;t.push(r)}return e.nextCursor===null?{sessions:t,nextCursor:null}:!mn(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 pM(e){return!mn(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&&!mn(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 KG(e){if(!mn(e)||!Array.isArray(e.events))return null;const t=[];for(const n of e.events){const r=pM(n);if(r===null)return null;t.push(r)}return t}function YG(e){if(!mn(e)||!Array.isArray(e.events)||typeof e.unreadableChunks!="number")return null;const t=[];for(const r of e.events){const s=pM(r);if(s===null)return null;t.push(s)}let n=null;if(e.execution!==null){if(!mn(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 XG(e){if(!mn(e)||!Array.isArray(e.sessions))return null;const t=[];for(const n of e.sessions){if(!mn(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 ZG(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 QG(e,t,n){e.delete(t),e.set(t,n);for(const r of e.keys()){if(e.size<=$G)return;e.delete(r)}}function JG(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 eW=100;function tW(e){if(!mn(e)||!mn(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 hM=new Set(["creating","active"]);function nW(e,t){return{sessionId:e.sessionId,channelId:e.channelId,mode:e.mode,followUpAllowed:e.channelId==="http"&&!e.customer,title:`${e.sessionId} · ${JG(e)}`,running:hM.has(e.phase),turnCount:t,createdAt:e.createdAt,updatedAt:e.lastActivityAt}}function vR(e){return`${e.lastActivityAt}|${e.phase}`}const rW=3e4;function iW(e){if(!mn(e)||!mn(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 sW=new Set(["running","completed","failed","cancelled"]),oW=new Set(["pending","running","done"]);function aW(e){return!mn(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 lW(e){if(!mn(e)||!Array.isArray(e.evals)||!mn(e.config))return null;const t=[];for(const n of e.evals){const r=aW(n);if(r===null)return null;t.push(r)}return{evals:t,config:e.config}}function kv(e){if(!mn(e)||typeof e.runId!="string"||!sW.has(e.status)||typeof e.startedAt!="string"||!mn(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)||!mn(e.config))return null;for(const t of e.cases)if(!mn(t)||typeof t.id!="string"||typeof t.fileId!="string"||!oW.has(t.status))return null;return e}function uW(e){if(!mn(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=kv(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 cW{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",UG).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(eW)}),a=await this.request(`/sessions?${s.toString()}`,WG);if(!a.ok||a.body===null)return{status:a.status,ok:!1,body:null};const l=a.body.sessions,c=l.map(d=>nW(d,this.turnCounts.get(d.sessionId)?.count));return this.writableSessionIds=new Set([...this.composedSessionIds,...c.filter(d=>d.followUpAllowed===!0).map(d=>d.sessionId)]),this.readTurnCounts(l),{status:200,ok:!0,body:{sessions:c}}},this.sessionById=async s=>{const a=await this.request(`/sessions/${encodeURIComponent(s)}`,tW);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)}`,KG);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=${zG}`,YG,{signal:l});if(!c.ok||c.body===null)return new Response(null,{status:c.status});const d=c.body.events.map(f=>JSON.stringify(f)).join(`
|
|
20
|
+
`);return new Response(d===""?"":`${d}
|
|
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<PG)return a;this.logsReadAt=Date.now(),this.logsReading=!0;const l=await this.request("/logs",XG).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 d of l.body){if(d.lines.length===0)continue;const f=ZG(this.logTails.get(d.sessionId)??[],d.lines);if(QG(this.logTails,d.sessionId,d.lines),f.length!==0){if(this.logSessionId!==d.sessionId){this.logSessionId=d.sessionId;const h=d.channelId===void 0?"":` (${d.channelId})`;c.push({index:++this.logIndex,at:"",line:`==> ${d.sessionId}${h} <==`})}for(const h of f)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",lW),this.evalsListRuns=()=>this.evalRequest("/evals/runs",uW),this.evalsStartRun=(s={})=>this.evalRequest("/evals/runs",kv,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:this.teamId,...s})}),this.evalsRunStatus=s=>this.evalRequest(`/evals/runs/${encodeURIComponent(s)}`,kv),this.evalsCancelRun=()=>co(),this.channelRequest=()=>co(),this.url=s=>s,this.basePath=`/api/v2/agentsdk/deployments/${encodeURIComponent(n)}`,this.capabilities=r.evals===!0?DG:dM,this.waitForRetry=r.waitForRetry??FG}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("",BG);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()}`,iW).catch(()=>null);if(!l?.ok||l.body===null)return;for(const c of s){const d=this.turnCounts.get(c.sessionId)?.count,f=l.body.get(c.sessionId);this.turnCounts.set(c.sessionId,{activity:vR(c),count:f===void 0?d:Math.max(f,d??0),readAt:r})}}finally{this.turnCountsReading=!1}}}turnCountStale(t,n){const r=this.turnCounts.get(t.sessionId);return r===void 0||r.activity!==vR(t)?!0:hM.has(t.phase)&&n-r.readAt>=rW}async startSession(t,n){const r=await this.request("/sessions",HG,{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<yR;r++){const s=await this.request(`/session-deliveries/${encodeURIComponent(t)}`,qG);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>=bR||r+1>=yR)break;await this.waitForRetry(Math.min(jG(r),bR-a))}return{status:504,ok:!1,body:null}}}function fW(e,t){const n=MG(document);switch(n.kind){case"local":return new NG(new _G(e,()=>t().authToken,()=>t().aliasToken));case"hosted":return new cW(n.teamId,n.deploymentSlug,{evals:n.evals})}}function ul(e,t,n){return e.has(t)?n.some(r=>e.has(r))?"enabled":"read-only":"disabled"}function mM(e){const t=n=>ul(e,kt.eventRead,[n]);return{composer:ul(e,kt.sessionRead,[kt.sessionStart,kt.sessionFollowUp]),stop:t(kt.sessionStop),approvals:t(kt.approvalResolve),auth:t(kt.authResolve),logs:e.has(kt.logRead)?"enabled":"disabled",evals:ul(e,kt.evalRead,[kt.evalRun]),artifacts:ul(e,kt.artifactRead,[kt.artifactContent]),schedules:ul(e,kt.infoRead,[kt.scheduleDispatch]),channelRoutes:ul(e,kt.infoRead,[kt.channelInvoke])}}const dW=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"]),pW=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"]),hW=12e4,xR=1e3;function mW(e){return e===404||e>=500&&e<600}function gM(){const e=window.location.pathname,t=e.replace(/\/playground\/?$/,"");return t===e?"":t}function gW(){const e=jH()!==null,t=e?jI():"";return{meta:{name:"agent",dev:!1,basePath:gM()},capabilities:mM(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&&zH(),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 bW{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:gR(this.itemText(t),n)})}appendNestedText(t,n,r){this.updateSubagentChildren(t,s=>{const a=s.findIndex(d=>d.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:gR(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(d=>d.kind==="tool"&&d.callId===n);if(c>=0){const d=l[c];if(d?.kind!=="tool")return l;const f=l.slice();return f[c]={...d,name:r||d.name,args:s??d.args},f}return l.push({kind:"tool",id:this.nextId("nested-tool"),callId:n,name:r,args:s??null,status:"running",output:null,startedAt:a??Date.now(),endedAt:null}),l},a)}finishNestedTool(t,n,r,s,a,l){this.updateSubagentChildren(t,c=>{const d=c.findIndex(b=>b.kind==="tool"&&b.callId===n),f=s==null?"(no output)":Pn(s,4e3);if(d<0)return c.push({kind:"tool",id:this.nextId("nested-tool"),callId:n,name:r,args:null,status:a?"error":"done",output:f,outputRaw:s,startedAt:l??Date.now(),endedAt:l??Date.now()}),c;const h=c[d];if(h?.kind!=="tool")return c;const m=c.slice();return m[d]={...h,name:r||h.name,status:a?"error":"done",output:f,outputRaw:s,endedAt:l??Date.now()},m},l)}ensureNestedAssistant(t){const n=this.nestedAssistantIds.get(t);if(n)return n;const r=this.nextId("nested-asst");return this.nestedAssistantIds.set(t,r),this.updateSubagentChildren(t,s=>(s.push({kind:"assistant",id:r,text:"",streaming:!0}),s)),r}ensureNestedReasoning(t){const n=this.nestedReasoningIds.get(t);if(n)return n;const r=this.nextId("nested-think");return this.nestedReasoningIds.set(t,r),this.updateSubagentChildren(t,s=>(s.push({kind:"reasoning",id:r,text:"",open:!0}),s)),r}updateNestedChild(t,n,r){this.updateSubagentChildren(t,s=>{const a=s.findIndex(d=>d.id===n);if(a<0)return s;const l=s[a];if(l===void 0)return s;const c=s.slice();return c[a]={...l,...r},c})}pushUser(t){this.assistantId=null,this.reasoningId=null;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&&!dW.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=oM(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,d=>{const f=d.findIndex(b=>b.id===c),h=f<0?void 0:d[f];if(h===void 0||!("text"in h))return d;const m=d.slice();return m[f]={...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=PI(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}),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(),this.refreshCurrentSessionCost();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(),this.refreshCurrentSessionCost();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{}FI("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(kt.sessionStart)||(this.deselectSession(),this.setView("chat"))}async refreshSessions(){if(!this.hasCapability(kt.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=dG({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(kt.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(),d=new TextDecoder;let f="";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,xR-k));return}f+=d.decode(h.value,{stream:!0});const m=f.split(`
|
|
22
|
+
`);f=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(mW(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<hW}listedRunning(t){return this.state.sessions.some(n=>n.sessionId===t&&n.running===!0)}scheduleReconnect(t,n,r=xR){n.signal.aborted||this.historyOnly||this.isCurrent(t)&&setTimeout(()=>{!this.isCurrent(t)||this.streamAbort!==n||this.startStream(t,this.lastIndex+1)},r)}refreshCurrentSessionCost(){const t=this.state.current?.sessionId;t&&this.refreshSessionCost(t)}async refreshSessionCost(t){if(this.hasCapability(kt.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(kt.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(f=>f.sessionId===t),c=l!==void 0?l.running===!0:n;this.ingestEventsCompact(xv(a),c);const d=this.hasOpenTools()||c;this.setRunning(d),d&&!this.historyOnly&&this.startStream(t,this.lastIndex+1)}catch(s){if(r!==this.snapshotToken||!this.isCurrent(t))return;this.toast(`Trace load failed: ${sy(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=pW.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=xv(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 nm(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(mG(r))return this.hasCapability(kt.channelInvoke)?this.invokeSlashCommand(r):(this.toast("Channel commands are not available in this playground"),!1);if(s!==null&&(!this.hasCapability(kt.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(kt.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 d=!1,f=null,h=null;try{f=await this.api.createSession(r)}catch(m){h=m}finally{d=this.pendingCreate!==c,d||(this.pendingCreate=null)}return f===null?(d||(this.abandonLocalTurn(),this.rollbackUserEcho(l),this.set({barTitle:"No session",barId:""})),this.toast(`Create failed: ${sy(h)}`),d):d?(f.ok?this.refreshSessions():this.toast(`Create failed: ${Pn(f.body,160)}`),!0):!f.ok||!f.body?(this.abandonLocalTurn(),this.rollbackUserEcho(l),this.set({barTitle:"No session",barId:""}),this.toast(`Create failed: ${Pn(f.body,160)}`),!1):(this.set({current:{sessionId:f.body.sessionId,channelId:"http",mode:"chat",followUpAllowed:!0,continuationToken:f.body.continuationToken},barId:f.body.sessionId}),this.syncSessionUrl(f.body.sessionId),this.startStream(f.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: ${sy(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(d=>{d||this.requeueFront(a)}).finally(()=>{this.flushingQueue=!1})}async stopTurn(){const t=this.state.current?.sessionId;if(!t||this.state.localTrace||this.historyOnly||!this.hasCapability(kt.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(kt.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(kt.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(kt.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(kt.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(kt.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(kt.evalRead))return this.evalRestoreInFlight!==null?this.evalRestoreInFlight:(this.evalRestoreInFlight=this.doRestoreEvalRun().finally(()=>{this.evalRestoreInFlight=null}),this.evalRestoreInFlight)}async doRestoreEvalRun(){const t=++this.evalRestoreGeneration,n=xW();if(n!==null){const f=await this.api.evalsRunStatus(n);if(t!==this.evalRestoreGeneration)return;if(f.ok&&f.body){this.applyRestoredEvalRun(f.body),this.refreshEvalRuns();return}}const r=await this.api.evalsListRuns();if(t!==this.evalRestoreGeneration)return;const s=r.ok?r.body:null,a=Array.isArray(s?.runs)?s.runs:null;if(a!==null&&this.set({evalRuns:a}),s?.activeRunId!==void 0&&a!==null){const f=s.activeRunId,h=a.find(m=>m.runId===f)??await this.fetchEvalRunIfCurrent(t,f);if(t!==this.evalRestoreGeneration)return;if(h!==void 0){this.state.evalRun?.runId===h.runId?(this.set({evalRun:h}),h.status==="running"&&this.evalPollTimer===null&&this.startEvalRunPoll(h.runId)):this.applyRestoredEvalRun(h);return}}const l=this.state.evalRun;if(l!==null){l.status==="running"&&this.evalPollTimer===null&&this.startEvalRunPoll(l.runId);return}const c=vW(this.state.meta.basePath);if(c!==null){const f=await this.api.evalsRunStatus(c);if(t!==this.evalRestoreGeneration||this.state.evalRun!==null)return;if(f.ok&&f.body){this.applyRestoredEvalRun(f.body);return}}if(a===null)return;const d=a[0];d!==void 0&&this.state.evalRun===null&&this.applyRestoredEvalRun(d)}async fetchEvalRunIfCurrent(t,n){const r=await this.api.evalsRunStatus(n);if(t===this.evalRestoreGeneration)return r.ok&&r.body?r.body:void 0}applyRestoredEvalRun(t){this.set({evalRun:t}),this.mergeEvalRunIntoList(t),tp(this.state.meta.basePath,t.runId),kW(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(kt.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}),tp(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(kt.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}),tp(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}),tp(this.state.meta.basePath,l.body.runId),this.mergeEvalRunIntoList(l.body),l.body.status!=="running"){if(this.stopEvalRunPoll(),this.refreshSessions(),this.refreshEvalRuns(),s||n!==this.evalPollGeneration)return;s=!0;const{passed:c,failed:d,total:f}=l.body.summary;this.toast(l.body.status==="failed"?`Eval run failed: ${l.body.error??"unknown error"}`:`Evals done — ${c} passed, ${d} failed, ${f} total`)}}finally{r=!1}}};a(),this.evalPollTimer=setInterval(()=>{a()},1500)}async attachEvalCaseSessionForView(t){const r=(this.state.evalRun??this.state.evalRuns[0]??null)?.cases.find(a=>a.sessionId!==void 0)?.sessionId;if(r===void 0||(await this.refreshSessions(),this.state.current!==null||this.state.view!==t))return;const s=this.state.sessions.find(a=>a.sessionId===r);s!==void 0?this.selectSession({...s,running:s.running===!0}):this.selectSession({sessionId:r,channelId:"http",mode:"conversation",title:"Eval session",turnCount:0,running:!1}),this.set({evalNavReturn:!0}),this.setView(t)}async openEvalCaseSession(t){await this.refreshSessions();const n=this.state.sessions.find(r=>r.sessionId===t);n!==void 0?this.selectSession({...n,running:n.running===!0}):this.selectSession({sessionId:t,channelId:"http",mode:"conversation",title:"Eval session",turnCount:0,running:!1}),this.set({evalNavReturn:!0}),this.setView("chat")}async openEvalCaseTrace(t){await this.refreshSessions();const n=this.state.sessions.find(r=>r.sessionId===t);n!==void 0?this.selectSession({...n,running:n.running===!0}):this.selectSession({sessionId:t,channelId:"http",mode:"conversation",title:"Eval session",turnCount:0,running:!1}),this.set({evalNavReturn:!0}),this.setView("trace")}async openSessionFromChannelResponse(t,n){const r=typeof n?.sessionId=="string"&&n.sessionId.trim()!==""?n.sessionId:null;if(r===null)return!1;await this.refreshSessions();const s=this.state.sessions.find(c=>c.sessionId===r),a=typeof n.status=="string"?n.status:void 0,l=a===void 0||a==="started"||a==="running";if(s!==void 0)this.selectSession({...s,running:l?!0:!!s.running});else{const c=typeof n.continuationToken=="string"?n.continuationToken:typeof n.key=="string"?n.key:void 0,d=typeof n.pr=="string"?n.pr:typeof n.title=="string"?n.title:"Session";this.selectSession({sessionId:r,channelId:t,mode:typeof n.mode=="string"?n.mode:"task",title:d,turnCount:0,running:l,continuationToken:c,externalUrl:typeof n.agentUrl=="string"?n.agentUrl:null})}return this.setView("chat"),this.setDrawerOpen(!1),!0}async openSessionById(t){const n=t.trim();if(n==="")return;await this.refreshSessions();const r=this.state.sessions.find(s=>s.sessionId===n);r!==void 0?this.selectSession(r):this.selectSession({sessionId:n,channelId:"http",mode:"conversation",title:"Session",turnCount:0,running:!1}),this.setView("chat")}async invokeSlashCommand(t){if(!this.hasCapability(kt.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:bG(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=yG(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"+yW(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=ZH(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 cG(this.state.info?.model)}}function sy(e){return e instanceof Error?e.message:String(e)}function yW(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function bM(e){return`agent-serve:evalRunId:${e||"/"}`}function vW(e){try{const t=sessionStorage.getItem(bM(e));return t!==null&&t!==""?t:null}catch{return null}}function xW(){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 kW(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 tp(e,t){try{sessionStorage.setItem(bM(e),t)}catch{}}function SW(e){const t=OH(()=>gW()),n=e(t.getState);return t.setState({capabilities:mM(n.capabilities)}),new bW(n,t)}const Ye=SW(e=>fW(gM(),e));Ye.getState().aliasHosted&&PH(e=>Ye.acceptAliasTokenHandoff(e));let kR=Ye.getState().overviewSection;Ye.subscribe(e=>{e.overviewSection!==kR&&(kR=e.overviewSection,FI(e.overviewSection))});if(Ye.getState().embedded){let e=Ye.getState().view,t=Ye.getState().current?.sessionId??null,n=Ye.getState().overviewSection,r=t!==null;Ye.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,tq(s.view,r?a:void 0,void 0,s.overviewSection))})}function $e(e){return MH(Ye,e)}function wW(){const[e,t]=v.useState(""),[n,r]=v.useState(null),[s,a]=v.useState(!1);async function l(c){c.preventDefault(),a(!0),r(null);const d=await Ye.signInWithAliasToken(e);a(!1),d.ok||r(d.error)}return g.jsx("div",{className:"pg-alias-signin",children:g.jsxs("div",{className:"pg-alias-signin-box",children:[g.jsx("h1",{children:"agent-serve playground"}),g.jsx("p",{children:"This deployment requires its alias token."}),n!==null?g.jsx("div",{className:"pg-alias-signin-error",children:n}):null,g.jsxs("form",{onSubmit:c=>{l(c)},children:[g.jsx(nf,{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(yn,{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 EW(){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 TW=["noopener","noreferrer"];function px(e){return e.trim()===""}function yM(e){const t=e.trim();if(px(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 RW(e){if(e.hasAttribute("download"))return;const t=e.getAttribute("href");if(t===null||!yM(t))return;e.target="_blank";const n=new Set(e.rel.split(/\s+/).map(r=>r.toLowerCase()).filter(r=>r!==""));for(const r of TW)n.add(r);e.rel=[...n].join(" ")}function SR(e){const t=e.target;if(!(t instanceof Element))return;const n=t.closest("a");if(!(n instanceof HTMLAnchorElement))return;RW(n);const r=n.getAttribute("href");r!==null&&px(r)&&!n.hasAttribute("download")&&e.preventDefault()}function CW(e=document){return e.addEventListener("click",SR,!0),()=>e.removeEventListener("click",SR,!0)}function pa({href:e,onClick:t,...n}){const s=e!==void 0&&px(e)?a=>{a.preventDefault(),t?.(a)}:t;return e===void 0||!yM(e)?g.jsx("a",{href:e,...n,onClick:s}):g.jsx("a",{href:e,...n,onClick:s,target:"_blank",rel:"noopener noreferrer"})}const vM=512*1024,_W=64*1024*1024,AW=240;async function xM(e){if(!Ye.hasCapability(kt.artifactContent))return{phase:"absent"};try{const t=await Ye.api.artifactContent(e,vM);if(!t.ok)return t.status===404?{phase:"absent"}:{phase:"error",message:`HTTP ${t.status}`};let n=null;if($H(t.contentType)){const r=new TextDecoder("utf-8",{fatal:!1}).decode(t.bytes);n=FH(r)?null:r}return{phase:"loaded",text:n,isDiff:n!==null&&BH(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 kM(e,t){if(Ye.hasCapability(kt.artifactContent))try{const n=await Ye.api.artifactContent(e,_W);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=OW(t,e,n.contentType),a.click(),URL.revokeObjectURL(s)}catch{}}const NW={"text/x-diff":".diff","text/x-patch":".patch","application/json":".json","text/markdown":".md","text/plain":".txt","text/html":".html","text/csv":".csv"};function OW(e,t,n){const r=(e??t).trim().replace(/[^\w.-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,80),s=n?.split(";")[0]?.trim().toLowerCase()??"",a=NW[s]??"",l=r===""?t:r;return l.includes(".")?l:`${l}${a}`}function IW({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-${UH(r)}`,children:r},s))})}function SM({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=iv(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(Ht,{name:"file",size:"sm",color:"tertiary"}),g.jsx("span",{className:"pg-artifact-file-meta",children:s||"file payload"}),g.jsx(yn,{variant:"ghost",size:"sm",onClick:()=>{kM(e,t)},children:"Download"})]}),n.text!==null?g.jsx(IW,{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 ",iv(vM)," — Download has the full payload."]}):null]})}function MW({data:e}){const[t,n]=v.useState(!1),r=v.useMemo(()=>Eo(e),[e]);if(r===""||r==="null")return null;const s=r.length>AW;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 DW=v.memo(function({artifactKind:t,title:n,url:r,artifactId:s,data:a}){const[l,c]=v.useState(!1),[d,f]=v.useState({phase:"idle"}),h=$e(b=>b.capabilities.artifacts==="enabled"),m=b=>{c(b),!(!b||!h||s===void 0||d.phase!=="idle")&&(f({phase:"loading"}),xM(s).then(f))};return g.jsx("div",{className:"pg-artifact-card",children:g.jsx(vi,{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(Ht,{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(MW,{data:a}):null,s!==void 0?h?g.jsx(SM,{artifactId:s,title:n,state:d}):g.jsx("div",{className:"pg-artifact-file-note",children:"File contents are not available in this playground"}):null]})})})}),wR=280,LW=8,oy=1e3;function jW({record:e}){const[t,n]=v.useState(!1),r=v.useMemo(()=>{const a=zI(e.data);return a!==null?{url:a,json:"",short:""}:{url:null,json:Eo(e.data),short:Pn(e.data,wR)}},[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>wR||r.json.split(`
|
|
24
|
+
`).length>LW;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 zW({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(Ht,{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,iv(s.size)].filter(l=>l!==void 0&&l!=="").join(" · ");return g.jsxs("div",{className:"pg-artifact-file-head",children:[g.jsx(Ht,{name:"file",size:"sm",color:"tertiary"}),g.jsx("span",{className:"pg-artifact-file-meta",children:a||"file payload"}),g.jsx(yn,{variant:"ghost",size:"sm",onClick:()=>{r({phase:"loading"}),xM(e.id).then(r)},children:"View"}),g.jsx(yn,{variant:"ghost",size:"sm",onClick:()=>{kM(e.id,e.title)},children:"Download"})]})}return g.jsx(SM,{artifactId:e.id,title:e.title,state:n})}const ER=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:HH(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:vv(t.updatedAt)??t.updatedAt})]}),g.jsx(jW,{record:t}),g.jsx(zW,{record:t,contentAvailable:n})]})});function PW({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:()=>{Ye.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 wM(){const e=$e(P=>P.current),t=$e(P=>P.sessions),n=$e(P=>P.capabilities.artifacts),r=n!=="disabled",s=n==="enabled",[a,l]=v.useState(null),[c,d]=v.useState(null),[f,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,T=a!==null&&a.scope===S?a.rows:null;v.useEffect(()=>{if(!r)return;let P=!1,A=!1;d(null);const K=async()=>{if(!A){A=!0;try{const F=await Ye.api.artifacts({sessionId:S??void 0,limit:oy});if(P)return;if(!F.ok||F.body===null){d(`Failed to load artifacts (${F.status})`);return}d(null),l({scope:S,rows:F.body.artifacts??[]})}catch(F){P||d(F instanceof Error?F.message:String(F))}finally{A=!1}}};K();const $=setInterval(()=>{K()},4e3);return()=>{P=!0,clearInterval($)}},[r,S,y]);const R=()=>k(P=>P+1),E=S!==null;if(!r)return g.jsx("div",{className:"pg-artifacts is-empty",children:g.jsx(Ci,{body:"Artifacts are not available in this playground."})});if(T===null)return g.jsx("div",{className:"pg-artifacts is-empty",children:c!==null?g.jsx(Ci,{body:c,cta:{label:"Retry",onClick:R}}):g.jsx(Ci,{body:"Loading artifacts…"})});const _=$I(T);if(_.length===0)return g.jsx("div",{className:"pg-artifacts is-empty",children:g.jsx(Ci,{body:E?"No artifacts tagged for this session.":"No artifacts tagged yet."})});const C=qH(_),D=f!==null&&C.includes(f)?f:null,N=VH(_,D),M=E?[]:GH(N),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:[N.length," of ",_.length,_.length>=oy?` (newest ${oy})`:""]}),c!==null?g.jsx("span",{className:"pg-artifacts-toolbar-error",children:c}):null,g.jsx("span",{className:"grow"}),e!==null?g.jsxs(yc,{size:"sm",variant:"compact",value:m,onValueChange:P=>b(P==="session"?"session":"all"),"aria-label":"Artifact scope",children:[g.jsx(yc.Item,{value:"all",children:"All sessions"}),g.jsx(yc.Item,{value:"session",children:"This session"})]}):null,g.jsx(yn,{variant:"secondary",size:"sm",onClick:R,children:"Refresh"})]}),C.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"}),C.map(P=>g.jsx("button",{type:"button",className:`artifact-kind-chip${D===P?" active":""}`,onClick:()=>h(D===P?null:P),children:P},P))]}):null,N.length===0?g.jsx(Ci,{body:"No artifacts match this kind filter."}):E?g.jsx("div",{className:"artifact-list",children:N.map(P=>g.jsx(ER,{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(PW,{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(A=>g.jsx(ER,{record:A,contentAvailable:s},A.id))})]},P.sessionId??"(none)"))})]})}function $W(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 f=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.${f}`}}function FW(){const e=$e(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:()=>Ye.editQueued(t.id),children:t.text}),g.jsxs("span",{className:"pg-queue-actions",children:[g.jsx(vr,{icon:"arrow-up",size:"sm",variant:"ghost","aria-label":"Send now (interrupts the running turn)",onClick:()=>{Ye.sendQueuedNow(t.id)}}),g.jsx(vr,{icon:"x",size:"sm",variant:"ghost","aria-label":"Remove queued message",onClick:()=>Ye.removeQueued(t.id)})]})]},t.id))})}function EM(){const[e,t]=v.useState(""),[n,r]=v.useState(0),s=v.useRef(null),a=$e($=>$.localTrace),l=$e($=>$.meta.readonly===!0),c=$e($=>$.current),d=$e($=>$.running),f=$e($=>$.composerDraft),h=$e($=>$.info),m=$e($=>$.capabilities.composer),b=$e($=>$.capabilities.stop),y=m==="enabled"&&Ye.hasCapability(kt.sessionStart),k=m==="enabled"&&Ye.hasCapability(kt.sessionFollowUp),S=b==="enabled",T=Ye.hasCapability(kt.channelInvoke);v.useEffect(()=>{f!==null&&(t($=>$.trim()?`${$} ${f}`:f),Ye.consumeComposerDraft(),s.current?.focus())},[f]);const R=v.useMemo(()=>T?nm(h?.channels):[],[h,T]),E=v.useMemo(()=>uM(R),[R]),_=v.useMemo(()=>{if(a||l)return null;const $=e.replace(/^\s+/,"");return!$.startsWith("/")||/\s/.test($)?null:$},[e,a,l]),C=v.useMemo(()=>_===null?[]:gG(_,R),[_,R]),D=_!==null&&C.length>0,{disabled:N,hint:M}=$W({localTrace:a,historyOnly:l,canStart:y,canFollowUp:k,current:c,running:d,slashNames:E}),B=S&&d&&c!==null&&!a&&!l,P=async($=e,F=!1)=>{if(!$.trim())return;t(""),r(0),await Ye.sendMessage($,{force:F})||t(U=>U.trim()?U:$)},A=$=>{t(`${$} `),r(0)},K=$=>{if(D){if($.key==="ArrowDown"){$.preventDefault(),r(F=>(F+1)%C.length);return}if($.key==="ArrowUp"){$.preventDefault(),r(F=>(F-1+C.length)%C.length);return}if($.key==="Tab"||$.key==="Enter"&&!$.shiftKey){const F=C[n]??C[0];if(F!==void 0&&_!==F.name){$.preventDefault(),A(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:[C.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(),A($.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(FW,{}),g.jsxs("div",{className:N&&!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:K,disabled:N,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(vr,{icon:"square",iconVariant:"filled",variant:"primary",tone:"monochrome",rounded:!0,size:"lg",className:"pg-prompt-stop","aria-label":"Stop the running turn",onClick:()=>{Ye.stopTurn()}}):g.jsx(vr,{icon:"arrow-up",variant:"primary",tone:"monochrome",rounded:!0,size:"lg","aria-label":d?"Queue message (⌘Enter sends now)":"Send message",disabled:N,onClick:()=>{P()}})]})]})]})]})}function BW(e){return{filename:`${e.runId}.eval-results.json`,text:`${JSON.stringify(e,null,2)}
|
|
25
|
+
`}}function UW(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 hi(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 TM(e){const t=[];let n=null,r={};const s=new Map;let a=null,l="";const c=new Map;let d=null,f=1,h=0,m=0;function b(S){return n&&n.endedAt===null||(n={turnId:S?.turnId||`turn_${t.length+1}`,startedAt:S?.at?wl(S.at):null,endedAt:null,usage:null,rows:[],provisional:!0},t.push(n)),n}function y(S){b({turnId:S.turnId,at:null}).rows.push(S),S.ms&&S.ms>f&&(f=S.ms)}function k(S){if(a===null)return;const T=b(),R=S!==null&&a!==null?Math.max(0,S-a):null,E=l.trim()||void 0;T.rows.push(hi({kind:"think",label:E?ti(E,80):"thinking",body:E,ms:R,at:S,startAt:a})),R&&R>f&&(f=R),a=null,l=""}for(const S of e){const T=S.data||{},R=wl(S.at);switch(S.type){case"turn.started":n&&n.provisional&&n.endedAt===null?(n.turnId=S.turnId||n.turnId,n.startedAt=R,n.provisional=!1):(n={turnId:S.turnId||`turn_${t.length+1}`,startedAt:R,endedAt:null,usage:null,rows:[],provisional:!1},t.push(n)),a=null,l="",d=null;break;case"message.received":{const E=oM(T);y(hi({kind:"user",label:E===null?"Prompt hidden":ti(E,140),body:E??void 0,at:R,startAt:R,ms:0,turnId:S.turnId}));break}case"reasoning.appended":if(typeof T.parentCallId=="string"&&T.parentCallId!==""){const E=c.get(T.parentCallId)??{start:R,text:""};E.start===null&&(E.start=R),typeof T.text=="string"&&(E.text=T.text),c.set(T.parentCallId,E);break}a===null&&(a=R),typeof T.text=="string"&&(l=T.text);break;case"reasoning.completed":if(typeof T.parentCallId=="string"&&T.parentCallId!==""){const E=T.parentCallId,_=c.get(E);c.delete(E);const C=_?.text.trim()||void 0;if(C!==void 0){const D=_?.start??R,N=D!==null&&R!==null?Math.max(0,R-D):null;y(hi({kind:"think",label:ti(C,80),body:C,ms:N,at:R,startAt:D,turnId:S.turnId,depth:1,parentCallId:E}))}break}k(R);break;case"message.appended":if(typeof T.parentCallId=="string"&&T.parentCallId!=="")break;d===null&&(d=R);break;case"message.completed":{if(typeof T.parentCallId=="string"&&T.parentCallId!==""){const C=T.parentCallId;y(hi({kind:"agent",label:ti(T.text,160)||"(empty reply)",body:typeof T.text=="string"?T.text:void 0,at:R,startAt:R,ms:0,turnId:S.turnId,depth:1,parentCallId:C}));break}const E=d??R,_=E!==null&&R!==null?Math.max(0,R-E):null;y(hi({kind:"agent",label:ti(T.text,160)||"(empty reply)",body:typeof T.text=="string"?T.text:void 0,at:R,startAt:E,ms:_,turnId:S.turnId})),_&&_>f&&(f=_),d=null;break}case"actions.requested":for(const E of T.calls||[]){const _=typeof E.parentCallId=="string"&&E.parentCallId!==""?E.parentCallId:typeof T.parentCallId=="string"&&T.parentCallId!==""?T.parentCallId:void 0;if(_===void 0&&E.toolName==="task")continue;const C=_===void 0?E.callId:`${_}:${E.callId}`;r[C]={name:E.toolName,args:E.args,start:R,turnId:S.turnId,parentCallId:_}}break;case"action.result":{const E=T.callId;if(E==null)break;const _=typeof T.parentCallId=="string"&&T.parentCallId!==""?T.parentCallId:void 0;if(_===void 0&&T.toolName==="task"){delete r[E];break}const C=_===void 0?E:`${_}:${E}`,D=r[C];delete r[C];const N=D&&D.start!==null&&R!==null?R-D.start:null;h+=1,T.isError&&(m+=1);{const M=T.toolName||D?.name||"tool",B=D?.args;y(hi({kind:"tool",label:M+(B?` ${ti(Pn(B,60),60)}`:""),toolName:M,callId:typeof E=="string"?E:String(E),toolArgs:B,toolOutput:T.output,body:typeof T.output=="string"?T.output:T.output!=null?Pn(T.output,4e3):void 0,ms:N,error:!!T.isError,at:R,startAt:D?.start??null,turnId:S.turnId,depth:_===void 0?0:1,parentCallId:_}))}N&&N>f&&(f=N);break}case"subagent.called":{const E=`task:${T.name||"subagent"}`,_=typeof T.callId=="string"?T.callId:String(T.callId);r[`sub:${_}`]={name:E,args:T.description,start:R,turnId:S.turnId};const C=b(S);C.rows.push(hi({kind:"tool",label:E,toolName:E,callId:_,toolArgs:T.description,ms:null,at:R,startAt:R,turnId:S.turnId,depth:0})),s.set(_,{turn:C,index:C.rows.length-1});break}case"subagent.completed":{const E=typeof T.callId=="string"?T.callId:String(T.callId),_=`sub:${E}`,C=r[_];delete r[_];const D=C&&C.start!==null&&R!==null?R-C.start:null;h+=1;const N=s.get(E);s.delete(E);const M=N!==void 0?N.turn.rows[N.index]:void 0;M!==void 0&&M.kind==="tool"?(M.ms=D,M.at=R,D&&D>f&&(f=D)):y(hi({kind:"tool",label:C?.name||"subagent",toolName:C?.name||"subagent",callId:E,toolArgs:C?.args,ms:D,at:R,startAt:C?.start??null,turnId:S.turnId}));break}case"artifact.tagged":{const E=PI(T);y(hi({kind:"artifact",label:ti(E.title===void 0?E.kind:`${E.kind} · ${E.title}`,120),body:T.data!=null?Pn(T.data,4e3):void 0,url:E.url,at:R,startAt:R,ms:0,turnId:S.turnId}));break}case"turn.completed":case"turn.failed":case"session.waiting":{if(S.type==="session.waiting"&&(n===null||n.endedAt!==null))break;const E=b(S);if((S.type==="turn.completed"||S.type==="turn.failed")&&(E.endedAt=R,E.usage=T.usage||null,E.failed=S.type==="turn.failed",E.error=T.message,E.startedAt!==null&&E.endedAt!==null)){const _=E.endedAt-E.startedAt;_>f&&(f=_),E.wallMs=_}if(k(R),d!==null&&R!==null){const _=Math.max(0,R-d);E.rows.push(hi({kind:"agent",label:"(streaming…)",ms:_,at:R,startAt:d})),d=null}for(const _ of Object.keys(r)){const C=r[_],D=C.start!==null&&R!==null?R-C.start:null;E.rows.push(hi({kind:"tool",label:`${C.name||"tool"} (no result)`,ms:D,error:!0,at:R,startAt:C.start,turnId:C.turnId})),D&&D>f&&(f=D)}r={},(S.type==="turn.completed"||S.type==="turn.failed")&&(n=null);break}}}for(const S of Object.keys(r)){const T=r[S];y(hi({kind:"tool",label:`${T.name||"tool"} (running…)`,ms:null,at:T.start,startAt:T.start,turnId:T.turnId}))}return{turns:t,maxWallMs:f,totalTools:h,failedTools:m,eventCount:e.length}}function HW(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 qW({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 VW={},GW={};function WW(e){return/\/factory\/([^/]+)\/agent\/playground\//.exec(e)?.[1]}const RM=new Map;for(const[e,t]of Object.entries(GW)){if(t?.default==null)continue;const n=typeof t.agentName=="string"&&t.agentName.trim()!==""?t.agentName.trim():void 0,r=WW(e),s=new Set;n!==void 0&&s.add(n),r!==void 0&&s.add(r);for(const a of s)RM.set(a,t.default)}function KW(e){if(!(e===void 0||e.trim()===""))return RM.get(e.trim())}const YW={passed:"Pass",failed:"Fail",scored:"Scored",skipped:"Skipped"},XW={passed:"success",failed:"danger",scored:"warn",skipped:"neutral"};function ZW(e){return e.verdict??(e.ok===!0?"passed":"failed")}function QW(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 JW({a:e}){return e.passed?g.jsx(Ht,{name:"check-circle",variant:"filled",size:"sm",color:"green"}):e.severity==="soft"?g.jsx(Ht,{name:"minus-circle",variant:"filled",size:"sm",color:"yellow"}):g.jsx(Ht,{name:"x-circle",variant:"filled",size:"sm",color:"red"})}function CM(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 eK={user:"chat-bubble",agent:"sparkles",think:"brain-simple",tool:"wrench",artifact:"bookmark"},tK={user:"User",agent:"Assistant",think:"Thinking",tool:"Tool call",artifact:"Artifact"},nK={user:"accent",agent:"green",think:"yellow",tool:"purple",artifact:"orange"};function rK({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=CM(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(Ht,{name:eK[e.kind],size:"sm",color:e.error?"red":nK[e.kind]}),g.jsx("span",{className:"eval-step-kind-label",children:tK[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:Mi(e.ms)}):null,r?g.jsx("span",{className:t?"eval-chevron open":"eval-chevron",children:g.jsx(Ht,{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 iK({sessionId:e,live:t}){const[n,r]=v.useState([]),[s,a]=v.useState(null),[l,c]=v.useState(!0),[d,f]=v.useState(!1),h=v.useRef(null),m=Ye.hasCapability(kt.sessionStream),b=t&&m;v.useEffect(()=>{let k=!1;const S=new AbortController;return c(!0),a(null),r([]),f(!1),(async()=>{let T=-1;try{const R=await Ye.api.eventsText(e);if(k)return;if(R.ok){const E=await R.text();if(k)return;const _=xv(E);for(const C of _)typeof C.index=="number"&&C.index>T&&(T=C.index);r(_)}}catch(R){k||a(R instanceof Error?R.message:String(R))}finally{k||c(!1)}if(!(!b||k)){f(!0);try{const R=await Ye.api.subscribeEvents(e,T+1,S.signal);if(!R.ok||!R.body){k||(a(`Stream failed (${R.status})`),f(!1));return}const E=R.body.getReader(),_=new TextDecoder;let C="";for(;;){const{done:D,value:N}=await E.read();if(D||k)break;C+=_.decode(N,{stream:!0});const M=C.split(`
|
|
26
|
+
`);C=M.pop()??"";const B=[];for(const P of M){const A=P.trim();if(A)try{const K=JSON.parse(A);B.push(K),typeof K.index=="number"&&K.index>T&&(T=K.index)}catch{}}B.length>0&&!k&&r(P=>[...P,...B])}}catch(R){!k&&!(R instanceof DOMException&&R.name==="AbortError")&&a(R instanceof Error?R.message:String(R))}finally{k||f(!1)}}})(),()=>{k=!0,S.abort()}},[e,b]),v.useEffect(()=>{b&&h.current&&h.current.scrollIntoView({block:"nearest"})},[n.length,b]);const y=v.useMemo(()=>TM(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||d?g.jsxs(g.Fragment,{children:[" · ",g.jsxs("span",{className:"eval-live",children:[g.jsx("span",{className:"spin"})," live"]})]}):null]}),s!==null?g.jsx("div",{className:"eval-error",children:s}):null,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?` · ${Mi(k.wallMs)}`:""]}),k.rows.map((T,R)=>g.jsx(rK,{row:T},`${k.turnId}-${R}-${T.kind}`))]},k.turnId)),g.jsx("div",{ref:h})]})}function sK({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(Ht,{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 oK({c:e,batchRunning:t,customization:n}){const[r,s]=v.useState(!1),[a,l]=v.useState(!1),c=r||a,d=CM(c),f=v.useRef({io:!1,expanded:!1});c&&(f.current={io:a,expanded:r});const h=c?a:f.current.io,m=c?r:f.current.expanded,b=ZW(e),y=e.status==="pending"?"Queued":e.status==="running"?"Running":YW[b],k=e.status==="done"?XW[b]:e.status==="running"?"accent":"neutral",S=e.sessionId!==void 0||e.status==="done"||e.status==="running",T=e.status==="done"||e.status==="running"||e.inputs!==void 0&&e.inputs.length>0||e.finalText!==void 0,R=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(_=>!_),children:[g.jsx("span",{className:r?"eval-chevron open":"eval-chevron",children:g.jsx(Ht,{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,T?g.jsx(yn,{variant:a?"secondary":"ghost",size:"sm",onClick:()=>l(_=>!_),title:"View eval inputs, tool results, and final output",children:"I/O"}):null,e.sessionId!==void 0?g.jsxs(g.Fragment,{children:[g.jsx(yn,{variant:"ghost",size:"sm",onClick:()=>{Ye.openEvalCaseTrace(e.sessionId)},children:"Full trace"}),g.jsx(yn,{variant:"ghost",size:"sm",onClick:()=>{Ye.openEvalCaseSession(e.sessionId)},children:"Chat"})]}):null]})]}),e.description!==void 0?g.jsx("div",{className:"eval-desc",children:e.description}):null,R!==void 0?g.jsx(R,{case:e,batchRunning:t}):g.jsx(qW,{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(_=>{const C=QW(_);return g.jsxs("div",{className:_.passed||_.severity==="soft"?"eval-assertion":"eval-assertion fail",children:[g.jsx("span",{className:"eval-assertion-icon",children:g.jsx(JW,{a:_})}),g.jsxs("span",{className:"eval-assertion-text",children:[g.jsx("span",{className:"eval-assertion-name",children:_.name}),C!==void 0?g.jsx("span",{className:"eval-assertion-detail",children:C}):null]})]},`${_.name}-${_.passed}-${_.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}:${_}`))}):null,d?g.jsxs("div",{className:c?"eval-collapse-clip":"eval-collapse-clip collapsed","aria-hidden":!c,inert:c?void 0:!0,children:[h?g.jsx(sK,{c:e}):null,m&&e.sessionId!==void 0?g.jsx(iK,{sessionId:e.sessionId,live:e.status==="running"&&t},e.sessionId):null,m&&e.sessionId===void 0?g.jsx("div",{className:"eval-trace-empty",children:e.status==="running"?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"spin"})," ",TR(e)?"Aggregating sibling cases…":"Waiting for session…"]}):TR(e)?g.jsxs(g.Fragment,{children:["Suite summary (no agent session)",e.finalText!==void 0?g.jsx("pre",{className:"eval-final-text",children:e.finalText}):null]}):g.jsxs(g.Fragment,{children:["No session for this case",e.finalText!==void 0?g.jsx("pre",{className:"eval-final-text",children:e.finalText}):null]})}):null]}):null]})}function TR(e){return e.id==="overall"||e.id.endsWith("/overall")||(e.tags?.includes("summary")??!1)}function _M(){const e=$e(S=>S.evalRun),t=$e(S=>S.evalCases),n=$e(S=>S.evalConfig),r=$e(S=>S.meta.name),s=$e(S=>S.meta.readonly===!0),a=$e(S=>S.capabilities.evals),l=v.useMemo(()=>KW(r),[r]),c=e?.status==="running",d=!s&&a==="enabled"&&t.length>0,f=!s&&Ye.hasCapability(kt.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}.`:""]}),d?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,d?g.jsx(yn,{variant:"secondary",size:"sm",disabled:c,onClick:()=>{Ye.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(yn,{variant:"ghost",size:"sm",onClick:()=>{const S=BW(e);UW(S.filename,S.text)},title:"Download this eval run's results (assertions, metrics, I/O) as JSON",children:"Download run"}),c&&f?g.jsx(yn,{variant:"secondary",size:"sm",onClick:()=>{Ye.cancelEvalRun(e.runId)},children:"Cancel"}):null,d?g.jsx(yn,{variant:"secondary",size:"sm",disabled:c,onClick:()=>{Ye.startEvalRun()},children:"Run all"}):null]})]}),g.jsx("div",{className:"eval-case-list",children:e.cases.map(S=>g.jsx(oK,{c:S,batchRunning:c,customization:l},S.id))})]})}const AM=48;function aK(e){return e.scrollHeight-e.scrollTop-e.clientHeight}function lK(e,t=AM){return aK(e)<=t}function ay(e){e.scrollTop=e.scrollHeight}function NM(e){const{contentKey:t,latchKey:n,thresholdPx:r=AM}=e,s=v.useRef(null),a=v.useRef(!0);return v.useEffect(()=>{const l=s.current;if(!l)return;const c=()=>{a.current=lK(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&&ay(l)},[n]),v.useLayoutEffect(()=>{if(!a.current)return;const l=s.current;l&&ay(l)},[t]),v.useEffect(()=>{const l=s.current;if(!l)return;const c=()=>{a.current&&ay(l)};c();const d=new Set,f=new ResizeObserver(c),h=y=>{d.has(y)||(d.add(y),f.observe(y))},m=y=>{h(y);for(const k of y.children)m(k)};m(l);const b=new MutationObserver(y=>{for(const k of y)k.addedNodes.forEach(S=>{S instanceof Element&&m(S)});c()});return b.observe(l,{childList:!0,subtree:!0}),()=>{f.disconnect(),b.disconnect()}},[t,n]),{scrollRef:s}}function hx({idle:e,empty:t}){const n=$e(s=>s.current),r=$e(s=>s.historyLoading);return n===null?g.jsx(Ci,{body:e}):r?g.jsx(Ci,{icon:g.jsx("span",{className:"spin"}),body:"Loading session…"}):g.jsx(Ci,{body:t})}function OM(){const e=$e(a=>a.traceEvents),t=$e(a=>a.current),n=e.length,{scrollRef:r}=NM({contentKey:n,latchKey:`${t?.sessionId??"none"}:${n}`}),s=uN({count:n,getScrollElement:()=>r.current,estimateSize:()=>18,overscan:24});return n===0?g.jsx("div",{className:"pg-raw",children:g.jsx(hx,{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 uK={user:"chat-bubble",agent:"sparkles",think:"brain-simple",tool:"wrench",artifact:"bookmark"},cK={user:"User",agent:"Assistant",think:"Thinking",tool:"Tool call",artifact:"Artifact"},fK={user:"accent",agent:"green",think:"yellow",tool:"purple",artifact:"orange"};function dK(e,t){return t?"red":fK[e]}function IM({kind:e,error:t,showLabel:n=!0}){const r=dK(e,t),s=`${cK[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(Ht,{name:uK[e],size:"sm",color:r}),n?g.jsx("span",{className:"wf-kind-label",children:s}):null]})}function pK(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 hK(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 mK(e,t,n,r,s){const a=e.startAt??e.at??r,l=Math.max(0,a-r),c=e.ms!=null&&e.ms>0?e.ms:e.ms===0?0:null,d=c===null||c===0,f=s*.012,h=d?f:Math.max(c,f),m=Math.max(0,Math.min(100,l/s*100)),b=Math.max(.9,Math.min(100-m,h/s*100));return{id:`${n}-${t}`,row:e,turnId:n,wallMs:s,startMs:l,durMs:h,trueDurMs:c,leftPct:m,widthPct:b,instant:d}}function MM(e){return e===null?"—":e===0?"instant":Mi(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 gK({span:e,onClose:t}){const{row:n,turnId:r,startMs:s,trueDurMs:a,wallMs:l}=e,c=a!=null?s+a:s,d=a!=null&&a>0&&l>0?`${(a/l*100).toFixed(1)}%`:"—",f=n.body?.trim()||"",h=n.toolArgs!=null?Eo(n.toolArgs):"",m=n.toolOutput!=null?Eo(n.toolOutput):n.kind==="tool"&&f?f:"";return g.jsxs("aside",{className:"trace-detail","aria-label":"Span details",children:[g.jsxs("div",{className:"trace-detail-head",children:[g.jsx(IM,{kind:n.kind,error:n.error}),g.jsx(vr,{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"&&f?g.jsx("pre",{className:"trace-detail-body",children:f}):null,n.kind!=="tool"&&!f&&n.label?g.jsx("div",{className:"trace-detail-label",children:n.label}):null,g.jsxs("dl",{className:"trace-detail-meta",children:[g.jsx(gs,{label:"Turn",value:r}),n.error?g.jsx(gs,{label:"Status",value:"error"}):null,g.jsx(gs,{label:"Start +",value:Mi(s)}),g.jsx(gs,{label:"End +",value:Mi(c)}),g.jsx(gs,{label:"Duration",value:MM(a)}),g.jsx(gs,{label:"% of turn",value:d}),g.jsx(gs,{label:"Started",value:mR(n.startAt)}),g.jsx(gs,{label:"Ended",value:mR(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 bK({span:e,selected:t,detailOpen:n,onSelect:r}){const{row:s}=e,a=`${s.kind}${s.error?" error":""}`,l=MM(e.trueDurMs),c=e.widthPct>=8,d=s.depth??0;return g.jsxs("button",{type:"button",className:`wf-row ${a}${t?" selected":""}${d>0?" nested":""}`,onClick:r,"aria-pressed":t,style:d>0?{paddingLeft:`${8+d*14}px`}:void 0,children:[g.jsx(IM,{kind:s.kind,error:s.error,showLabel:!n}),g.jsx("span",{className:"wf-name",title:s.label,children:d>0?`↳ ${s.label||"—"}`:s.label||"—"}),g.jsx("span",{className:"wf-track","aria-hidden":"true",children:g.jsx("span",{className:`wf-bar ${a}${e.instant?" instant":""}`,style:{left:`${e.leftPct}%`,width:`${e.widthPct}%`},children:c?g.jsx("span",{className:"wf-bar-label",children:l}):null})}),g.jsx("span",{className:"wf-dur",children:l})]})}function yK({turn:e,index:t,selectedId:n,onSelect:r}){const s=pK(e),a=hK(e,s),l=v.useMemo(()=>e.rows.map((f,h)=>mK(f,h,e.turnId,s,a)),[e,s,a]),c=v.useMemo(()=>HW(a),[a]),d=[];return e.wallMs!==void 0&&d.push(`Worked for ${fx(e.wallMs)}`),e.usage&&d.push(`in ${oh(e.usage.inputTokens)} · out ${oh(e.usage.outputTokens)}`),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(Ht,{name:"x-circle",size:"sm",variant:"filled",color:"red","aria-hidden":"true"}),"Failed"]}):null]}),g.jsx("span",{className:"wall",children:d.join(" · ")||"In progress"})]}),g.jsxs("div",{className:"wf",children:[g.jsxs("div",{className:"wf-ruler","aria-hidden":"true",children:[g.jsx("span",{className:"wf-kind"}),g.jsx("span",{className:"wf-name"}),g.jsx("span",{className:"wf-track wf-ruler-track",children:c.map(f=>g.jsxs("span",{className:"wf-tick",style:{left:`${f/a*100}%`},children:[g.jsx("span",{className:"wf-tick-line"}),g.jsx("span",{className:"wf-tick-label",children:Mi(f)})]},f))}),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(f=>g.jsx(bK,{span:f,selected:n===f.id,detailOpen:n!=null,onSelect:()=>r(n===f.id?null:f)},f.id))]})]})}function DM(){const e=$e(l=>l.traceEvents),t=$e(l=>l.sessionCostUsd),n=v.useMemo(()=>TM(e),[e]),[r,s]=v.useState(null);if(!e.length)return g.jsx("div",{className:"pg-trace",children:g.jsx(hx,{idle:"Select a session to see the timeline.",empty:"No events recorded for this session yet."})});const a=[`${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,t!==null?`cost ${lG(t)}`: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:a}),g.jsxs("div",{className:`trace-layout${r?" has-detail":""}`,children:[g.jsx("div",{className:"trace-main",children:n.turns.map((l,c)=>g.jsx(yK,{turn:l,index:c,selectedId:r?.id??null,onSelect:s},`${l.turnId||"turn"}-${c}`))}),r?g.jsx(gK,{span:r,onClose:()=>s(null)}):null]})]})})}function vK(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const xK=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kK=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,SK={};function RR(e,t){return(SK.jsx?kK:xK).test(e)}const wK=/[ \t\n\f\r]/g;function EK(e){return typeof e=="object"?e.type==="text"?CR(e.value):!1:CR(e)}function CR(e){return e.replace(wK,"")===""}class uf{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}uf.prototype.normal={};uf.prototype.property={};uf.prototype.space=void 0;function LM(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new uf(n,r,t)}function Sv(e){return e.toLowerCase()}class Ur{constructor(t,n){this.attribute=n,this.property=t}}Ur.prototype.attribute="";Ur.prototype.booleanish=!1;Ur.prototype.boolean=!1;Ur.prototype.commaOrSpaceSeparated=!1;Ur.prototype.commaSeparated=!1;Ur.prototype.defined=!1;Ur.prototype.mustUseProperty=!1;Ur.prototype.number=!1;Ur.prototype.overloadedBoolean=!1;Ur.prototype.property="";Ur.prototype.spaceSeparated=!1;Ur.prototype.space=void 0;let TK=0;const Dt=wa(),Kn=wa(),wv=wa(),je=wa(),Tn=wa(),El=wa(),Jr=wa();function wa(){return 2**++TK}const Ev=Object.freeze(Object.defineProperty({__proto__:null,boolean:Dt,booleanish:Kn,commaOrSpaceSeparated:Jr,commaSeparated:El,number:je,overloadedBoolean:wv,spaceSeparated:Tn},Symbol.toStringTag,{value:"Module"})),ly=Object.keys(Ev);class mx extends Ur{constructor(t,n,r,s){let a=-1;if(super(t,n),_R(this,"space",s),typeof r=="number")for(;++a<ly.length;){const l=ly[a];_R(this,ly[a],(r&Ev[l])===Ev[l])}}}mx.prototype.defined=!0;function _R(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 mx(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Sv(r)]=r,n[Sv(a.attribute)]=r}return new uf(t,n,e.space)}const jM=Wl({properties:{ariaActiveDescendant:null,ariaAtomic:Kn,ariaAutoComplete:null,ariaBusy:Kn,ariaChecked:Kn,ariaColCount:je,ariaColIndex:je,ariaColSpan:je,ariaControls:Tn,ariaCurrent:null,ariaDescribedBy:Tn,ariaDetails:null,ariaDisabled:Kn,ariaDropEffect:Tn,ariaErrorMessage:null,ariaExpanded:Kn,ariaFlowTo:Tn,ariaGrabbed:Kn,ariaHasPopup:null,ariaHidden:Kn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Tn,ariaLevel:je,ariaLive:null,ariaModal:Kn,ariaMultiLine:Kn,ariaMultiSelectable:Kn,ariaOrientation:null,ariaOwns:Tn,ariaPlaceholder:null,ariaPosInSet:je,ariaPressed:Kn,ariaReadOnly:Kn,ariaRelevant:null,ariaRequired:Kn,ariaRoleDescription:Tn,ariaRowCount:je,ariaRowIndex:je,ariaRowSpan:je,ariaSelected:Kn,ariaSetSize:je,ariaSort:null,ariaValueMax:je,ariaValueMin:je,ariaValueNow:je,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function zM(e,t){return t in e?e[t]:t}function PM(e,t){return zM(e,t.toLowerCase())}const RK=Wl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:El,acceptCharset:Tn,accessKey:Tn,action:null,allow:null,allowFullScreen:Dt,allowPaymentRequest:Dt,allowUserMedia:Dt,alt:null,as:null,async:Dt,autoCapitalize:null,autoComplete:Tn,autoFocus:Dt,autoPlay:Dt,blocking:Tn,capture:null,charSet:null,checked:Dt,cite:null,className:Tn,cols:je,colSpan:null,content:null,contentEditable:Kn,controls:Dt,controlsList:Tn,coords:je|El,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Dt,defer:Dt,dir:null,dirName:null,disabled:Dt,download:wv,draggable:Kn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Dt,formTarget:null,headers:Tn,height:je,hidden:wv,high:je,href:null,hrefLang:null,htmlFor:Tn,httpEquiv:Tn,id:null,imageSizes:null,imageSrcSet:null,inert:Dt,inputMode:null,integrity:null,is:null,isMap:Dt,itemId:null,itemProp:Tn,itemRef:Tn,itemScope:Dt,itemType:Tn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Dt,low:je,manifest:null,max:null,maxLength:je,media:null,method:null,min:null,minLength:je,multiple:Dt,muted:Dt,name:null,nonce:null,noModule:Dt,noValidate:Dt,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:Dt,optimum:je,pattern:null,ping:Tn,placeholder:null,playsInline:Dt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Dt,referrerPolicy:null,rel:Tn,required:Dt,reversed:Dt,rows:je,rowSpan:je,sandbox:Tn,scope:null,scoped:Dt,seamless:Dt,selected:Dt,shadowRootClonable:Dt,shadowRootDelegatesFocus:Dt,shadowRootMode:null,shape:null,size:je,sizes:null,slot:null,span:je,spellCheck:Kn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:je,step:null,style:null,tabIndex:je,target:null,title:null,translate:null,type:null,typeMustMatch:Dt,useMap:null,value:Kn,width:je,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Tn,axis:null,background:null,bgColor:null,border:je,borderColor:null,bottomMargin:je,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Dt,declare:Dt,event:null,face:null,frame:null,frameBorder:null,hSpace:je,leftMargin:je,link:null,longDesc:null,lowSrc:null,marginHeight:je,marginWidth:je,noResize:Dt,noHref:Dt,noShade:Dt,noWrap:Dt,object:null,profile:null,prompt:null,rev:null,rightMargin:je,rules:null,scheme:null,scrolling:Kn,standby:null,summary:null,text:null,topMargin:je,valueType:null,version:null,vAlign:null,vLink:null,vSpace:je,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Dt,disableRemotePlayback:Dt,prefix:null,property:null,results:je,security:null,unselectable:null},space:"html",transform:PM}),CK=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:Jr,accentHeight:je,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:je,amplitude:je,arabicForm:null,ascent:je,attributeName:null,attributeType:null,azimuth:je,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:je,by:null,calcMode:null,capHeight:je,className:Tn,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:je,diffuseConstant:je,direction:null,display:null,dur:null,divisor:je,dominantBaseline:null,download:Dt,dx:null,dy:null,edgeMode:null,editable:null,elevation:je,enableBackground:null,end:null,event:null,exponent:je,externalResourcesRequired:null,fill:null,fillOpacity:je,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:je,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:je,horizOriginX:je,horizOriginY:je,id:null,ideographic:je,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:je,k:je,k1:je,k2:je,k3:je,k4:je,kernelMatrix:Jr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:je,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:je,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:je,overlineThickness:je,paintOrder:null,panose1:null,path:null,pathLength:je,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Tn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:je,pointsAtY:je,pointsAtZ:je,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Jr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Jr,rev:Jr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Jr,requiredFeatures:Jr,requiredFonts:Jr,requiredFormats:Jr,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:je,specularExponent:je,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:je,strikethroughThickness:je,string:null,stroke:null,strokeDashArray:Jr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:je,strokeOpacity:je,strokeWidth:null,style:null,surfaceScale:je,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Jr,tabIndex:je,tableValues:null,target:null,targetX:je,targetY:je,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Jr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:je,underlineThickness:je,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:je,values:null,vAlphabetic:je,vMathematical:je,vectorEffect:null,vHanging:je,vIdeographic:je,version:null,vertAdvY:je,vertOriginX:je,vertOriginY:je,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:je,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:zM}),$M=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()}}),FM=Wl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:PM}),BM=Wl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),_K={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"},AK=/[A-Z]/g,AR=/-[a-z]/g,NK=/^data[-\w.:]+$/i;function OK(e,t){const n=Sv(t);let r=t,s=Ur;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&NK.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(AR,MK);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!AR.test(a)){let l=a.replace(AK,IK);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}s=mx}return new s(r,t)}function IK(e){return"-"+e.toLowerCase()}function MK(e){return e.charAt(1).toUpperCase()}const DK=LM([jM,RK,$M,FM,BM],"html"),gx=LM([jM,CK,$M,FM,BM],"svg");function LK(e){return e.join(" ").trim()}var cl={},uy,NR;function jK(){if(NR)return uy;NR=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
27
|
+
`,f="/",h="*",m="",b="comment",y="declaration";uy=function(S,T){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];T=T||{};var R=1,E=1;function _(F){var z=F.match(t);z&&(R+=z.length);var U=F.lastIndexOf(d);E=~U?F.length-U:E+F.length}function C(){var F={line:R,column:E};return function(z){return z.position=new D(F),B(),z}}function D(F){this.start=F,this.end={line:R,column:E},this.source=T.source}D.prototype.content=S;function N(F){var z=new Error(T.source+":"+R+":"+E+": "+F);if(z.reason=F,z.filename=T.source,z.line=R,z.column=E,z.source=S,!T.silent)throw z}function M(F){var z=F.exec(S);if(z){var U=z[0];return _(U),S=S.slice(U.length),z}}function B(){M(n)}function P(F){var z;for(F=F||[];z=A();)z!==!1&&F.push(z);return F}function A(){var F=C();if(!(f!=S.charAt(0)||h!=S.charAt(1))){for(var z=2;m!=S.charAt(z)&&(h!=S.charAt(z)||f!=S.charAt(z+1));)++z;if(z+=2,m===S.charAt(z-1))return N("End of comment missing");var U=S.slice(2,z-2);return E+=2,_(U),S=S.slice(z),E+=2,F({type:b,comment:U})}}function K(){var F=C(),z=M(r);if(z){if(A(),!M(s))return N("property missing ':'");var U=M(a),q=F({type:y,property:k(z[0].replace(e,m)),value:U?k(U[0].replace(e,m)):m});return M(l),q}}function $(){var F=[];P(F);for(var z;z=K();)z!==!1&&(F.push(z),P(F));return F}return B(),$()};function k(S){return S?S.replace(c,m):m}return uy}var OR;function zK(){if(OR)return cl;OR=1;var e=cl&&cl.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(cl,"__esModule",{value:!0}),cl.default=n;var t=e(jK());function n(r,s){var a=null;if(!r||typeof r!="string")return a;var l=(0,t.default)(r),c=typeof s=="function";return l.forEach(function(d){if(d.type==="declaration"){var f=d.property,h=d.value;c?s(f,h,d):h&&(a=a||{},a[f]=h)}}),a}return cl}var PK=zK();const IR=qc(PK),$K=IR.default||IR,FK=Object.freeze(Object.defineProperty({__proto__:null,default:$K},Symbol.toStringTag,{value:"Module"})),BK=Bj(FK);var Xu={},MR;function UK(){if(MR)return Xu;MR=1,Object.defineProperty(Xu,"__esModule",{value:!0}),Xu.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},l=function(f,h){return h.toUpperCase()},c=function(f,h){return"".concat(h,"-")},d=function(f,h){return h===void 0&&(h={}),a(f)?f:(f=f.toLowerCase(),h.reactCompat?f=f.replace(s,c):f=f.replace(r,c),f.replace(t,l))};return Xu.camelCase=d,Xu}var Zu,DR;function HK(){if(DR)return Zu;DR=1;var e=Zu&&Zu.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(BK),n=UK();function r(s,a){var l={};return!s||typeof s!="string"||(0,t.default)(s,function(c,d){c&&d&&(l[(0,n.camelCase)(c,a)]=d)}),l}return r.default=r,Zu=r,Zu}var qK=HK();const VK=qc(qK),UM=HM("end"),bx=HM("start");function HM(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 GK(e){const t=bx(e),n=UM(e);if(t&&n)return{start:t,end:n}}function vc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?LR(e.position):"start"in e||"end"in e?LR(e):"line"in e||"column"in e?Tv(e):""}function Tv(e){return jR(e&&e.line)+":"+jR(e&&e.column)}function LR(e){return Tv(e&&e.start)+"-"+Tv(e&&e.end)}function jR(e){return e&&typeof e=="number"?e:1}class xr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",a={},l=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?s=t:!a.cause&&t&&(l=!0,s=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=s,this.line=c?c.line:void 0,this.name=vc(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}}xr.prototype.file="";xr.prototype.name="";xr.prototype.reason="";xr.prototype.message="";xr.prototype.stack="";xr.prototype.column=void 0;xr.prototype.line=void 0;xr.prototype.ancestors=void 0;xr.prototype.cause=void 0;xr.prototype.fatal=void 0;xr.prototype.place=void 0;xr.prototype.ruleId=void 0;xr.prototype.source=void 0;const yx={}.hasOwnProperty,WK=new Map,KK=/[A-Z]/g,YK=new Set(["table","tbody","thead","tfoot","tr"]),XK=new Set(["td","th"]),qM="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ZK(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=sY(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=iY(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"?gx:DK,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=VM(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function VM(e,t,n){if(t.type==="element")return QK(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return JK(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return tY(e,t,n);if(t.type==="mdxjsEsm")return eY(e,t);if(t.type==="root")return nY(e,t,n);if(t.type==="text")return rY(e,t)}function QK(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=gx,e.schema=s),e.ancestors.push(t);const a=WM(e,t.tagName,!1),l=oY(e,t);let c=xx(e,t);return YK.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!EK(d):!0})),GM(e,l,a,t),vx(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function JK(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)}Bc(e,t.position)}function eY(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Bc(e,t.position)}function tY(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=gx,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:WM(e,t.name,!0),l=aY(e,t),c=xx(e,t);return GM(e,l,a,t),vx(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function nY(e,t,n){const r={};return vx(r,xx(e,t)),e.create(t,e.Fragment,r,n)}function rY(e,t){return t.value}function GM(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function vx(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function iY(e,t,n){return r;function r(s,a,l,c){const f=Array.isArray(l.children)?n:t;return c?f(a,l,c):f(a,l)}}function sY(e,t){return n;function n(r,s,a,l){const c=Array.isArray(a.children),d=bx(r);return t(s,a,l,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function oY(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&yx.call(t.properties,s)){const a=lY(e,s,t.properties[s]);if(a){const[l,c]=a;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&XK.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 aY(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 Bc(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 Bc(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function xx(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:WK;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=s.get(d)||0;l=d+"-"+f,s.set(d,f+1)}}const c=VM(e,a,l);c!==void 0&&n.push(c)}return n}function lY(e,t,n){const r=OK(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?vK(n):LK(n)),r.property==="style"){let s=typeof n=="object"?n:uY(e,String(n));return e.stylePropertyNameCase==="css"&&(s=cY(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?_K[r.property]||r.property:r.attribute,n]}}function uY(e,t){try{return VK(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new xr("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=qM+"#cannot-parse-style-attribute",s}}function WM(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,l;for(;++a<s.length;){const c=RR(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=l}else r=RR(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return yx.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);Bc(e)}function Bc(e,t){const n=new xr("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=qM+"#cannot-handle-mdx-estrees-without-createevaluater",n}function cY(e){const t={};let n;for(n in e)yx.call(e,n)&&(t[fY(n)]=e[n]);return t}function fY(e){let t=e.replace(KK,dY);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function dY(e){return"-"+e.toLowerCase()}const cy={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"]},pY={};function kx(e,t){const n=pY,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return KM(e,r,s)}function KM(e,t,n){if(hY(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 zR(e.children,t,n)}return Array.isArray(e)?zR(e,t,n):""}function zR(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=KM(e[s],t,n);return r.join("")}function hY(e){return!!(e&&typeof e=="object")}const PR=document.createElement("i");function Sx(e){const t="&"+e+";";PR.innerHTML=t;const n=PR.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ii(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 mi(e,t){return e.length>0?(ii(e,e.length,0,t),e):t}const $R={}.hasOwnProperty;function YM(e){const t={};let n=-1;for(;++n<e.length;)mY(t,e[n]);return t}function mY(e,t){let n;for(n in t){const s=($R.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){$R.call(s,l)||(s[l]=[]);const c=a[l];gY(s[l],Array.isArray(c)?c:c?[c]:[])}}}function gY(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ii(e,0,0,r)}function XM(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 Ni(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Rr=Oo(/[A-Za-z]/),br=Oo(/[\dA-Za-z]/),bY=Oo(/[#-'*+\--9=?A-Z^-~]/);function lh(e){return e!==null&&(e<32||e===127)}const Rv=Oo(/\d/),yY=Oo(/[\dA-Fa-f]/),vY=Oo(/[!-/:-@[-`{-~]/);function St(e){return e!==null&&e<-2}function xn(e){return e!==null&&(e<0||e===32)}function Ut(e){return e===-2||e===-1||e===32}const sm=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&&br(e.charCodeAt(n+1))&&br(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 Qt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(d){return Ut(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ut(d)&&a++<s?(e.consume(d),c):(e.exit(n),t(d))}}const xY={tokenize:kY};function kY(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"),Qt(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return St(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),l)}}const SY={tokenize:wY},FR={tokenize:EY};function wY(e){const t=this,n=[];let r=0,s,a,l;return c;function c(_){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,d,f)(_)}return f(_)}function d(_){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&E();const C=t.events.length;let D=C,N;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){N=t.events[D][1].end;break}R(r);let M=C;for(;M<t.events.length;)t.events[M][1].end={...N},M++;return ii(t.events,D+1,0,t.events.slice(C)),t.events.length=M,f(_)}return c(_)}function f(_){if(r===n.length){if(!s)return b(_);if(s.currentConstruct&&s.currentConstruct.concrete)return k(_);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(FR,h,m)(_)}function h(_){return s&&E(),R(r),b(_)}function m(_){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,k(_)}function b(_){return t.containerState={},e.attempt(FR,y,k)(_)}function y(_){return r++,n.push([t.currentConstruct,t.containerState]),b(_)}function k(_){if(_===null){s&&E(),R(0),e.consume(_);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),S(_)}function S(_){if(_===null){T(e.exit("chunkFlow"),!0),R(0),e.consume(_);return}return St(_)?(e.consume(_),T(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(_),S)}function T(_,C){const D=t.sliceStream(_);if(C&&D.push(null),_.previous=a,a&&(a.next=_),a=_,s.defineSkip(_.start),s.write(D),t.parser.lazy[_.start.line]){let N=s.events.length;for(;N--;)if(s.events[N][1].start.offset<l&&(!s.events[N][1].end||s.events[N][1].end.offset>l))return;const M=t.events.length;let B=M,P,A;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){if(P){A=t.events[B][1].end;break}P=!0}for(R(r),N=M;N<t.events.length;)t.events[N][1].end={...A},N++;ii(t.events,B+1,0,t.events.slice(M)),t.events.length=N}}function R(_){let C=n.length;for(;C-- >_;){const D=n[C];t.containerState=D[1],D[0].exit.call(t,e)}n.length=_}function E(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function EY(e,t,n){return Qt(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||xn(e)||ha(e))return 1;if(sm(e))return 2}function om(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 Cv={name:"attention",resolveAll:TY,tokenize:RY};function TY(e,t){let n=-1,r,s,a,l,c,d,f,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[r][1].end},b={...e[n][1].start};BR(m,-d),BR(b,d),l={type:d>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},a={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:d>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[r][1].end={...l.start},e[n][1].start={...c.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=mi(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=mi(f,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",a,t]]),f=mi(f,om(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=mi(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,f=mi(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,ii(e,r-1,n-r+3,f),n=r+f.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function RY(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=zl(r);let a;return l;function l(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const f=e.exit("attentionSequence"),h=zl(d),m=!h||h===2&&s||n.includes(d),b=!s||s===2&&h||n.includes(r);return f._open=!!(a===42?m:m&&(s||!b)),f._close=!!(a===42?b:b&&(h||!m)),t(d)}}function BR(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const CY={name:"autolink",tokenize:_Y};function _Y(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 Rr(y)?(e.consume(y),l):y===64?n(y):f(y)}function l(y){return y===43||y===45||y===46||br(y)?(r=1,c(y)):f(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||br(y))&&r++<32?(e.consume(y),c):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||lh(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),h):bY(y)?(e.consume(y),f):n(y)}function h(y){return br(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||br(y))&&r++<63){const k=y===45?b:m;return e.consume(y),k}return n(y)}}const cf={partial:!0,tokenize:AY};function AY(e,t,n){return r;function r(a){return Ut(a)?Qt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||St(a)?t(a):n(a)}}const ZM={continuation:{tokenize:OY},exit:IY,name:"blockQuote",tokenize:NY};function NY(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 OY(e,t,n){const r=this;return s;function s(l){return Ut(l)?Qt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(ZM,t,n)(l)}}function IY(e){e.exit("blockQuote")}const QM={name:"characterEscape",tokenize:MY};function MY(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 vY(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const JM={name:"characterReference",tokenize:DY};function DY(e,t,n){const r=this;let s=0,a,l;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,l=br,h(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=yY,h):(e.enter("characterReferenceValue"),a=7,l=Rv,h(m))}function h(m){if(m===59&&s){const b=e.exit("characterReferenceValue");return l===br&&!Sx(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 UR={partial:!0,tokenize:jY},HR={concrete:!0,name:"codeFenced",tokenize:LY};function LY(e,t,n){const r=this,s={partial:!0,tokenize:D};let a=0,l=0,c;return d;function d(N){return f(N)}function f(N){const M=r.events[r.events.length-1];return a=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,c=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(N)}function h(N){return N===c?(l++,e.consume(N),h):l<3?n(N):(e.exit("codeFencedFenceSequence"),Ut(N)?Qt(e,m,"whitespace")(N):m(N))}function m(N){return N===null||St(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(UR,S,C)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(N))}function b(N){return N===null||St(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(N)):Ut(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Qt(e,y,"whitespace")(N)):N===96&&N===c?n(N):(e.consume(N),b)}function y(N){return N===null||St(N)?m(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(N))}function k(N){return N===null||St(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(N)):N===96&&N===c?n(N):(e.consume(N),k)}function S(N){return e.attempt(s,C,T)(N)}function T(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),R}function R(N){return a>0&&Ut(N)?Qt(e,E,"linePrefix",a+1)(N):E(N)}function E(N){return N===null||St(N)?e.check(UR,S,C)(N):(e.enter("codeFlowValue"),_(N))}function _(N){return N===null||St(N)?(e.exit("codeFlowValue"),E(N)):(e.consume(N),_)}function C(N){return e.exit("codeFenced"),t(N)}function D(N,M,B){let P=0;return A;function A(U){return N.enter("lineEnding"),N.consume(U),N.exit("lineEnding"),K}function K(U){return N.enter("codeFencedFence"),Ut(U)?Qt(N,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):$(U)}function $(U){return U===c?(N.enter("codeFencedFenceSequence"),F(U)):B(U)}function F(U){return U===c?(P++,N.consume(U),F):P>=l?(N.exit("codeFencedFenceSequence"),Ut(U)?Qt(N,z,"whitespace")(U):z(U)):B(U)}function z(U){return U===null||St(U)?(N.exit("codeFencedFence"),M(U)):B(U)}}}function jY(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 fy={name:"codeIndented",tokenize:PY},zY={partial:!0,tokenize:$Y};function PY(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),Qt(e,a,"linePrefix",5)(f)}function a(f){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(f):n(f)}function l(f){return f===null?d(f):St(f)?e.attempt(zY,l,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||St(f)?(e.exit("codeFlowValue"),l(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function $Y(e,t,n){const r=this;return s;function s(l){return r.parser.lazy[r.now().line]?n(l):St(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):Qt(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):St(l)?s(l):n(l)}}const FY={name:"codeText",previous:UY,resolve:BY,tokenize:HY};function BY(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 UY(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function HY(e,t,n){let r=0,s,a;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),r++,c):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),s=0,h(m)):St(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||St(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function h(m){return m===96?(e.consume(m),s++,h):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class qY{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&&Qu(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),Qu(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Qu(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);Qu(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Qu(this.left,n.reverse())}}}function Qu(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 e2(e){const t={};let n=-1,r,s,a,l,c,d,f;const h=new qY(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,VY(h,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(l=h.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(s&&(h.get(s)[1].type="lineEndingBlank"),l[1].type="lineEnding",s=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;s&&(r[1].end={...h.get(s)[1].start},c=h.slice(s,n),c.unshift(r),h.splice(s,n-s+1,c))}}return ii(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!f}function VY(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const a=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,d=[],f={};let h,m,b=-1,y=n,k=0,S=0;const T=[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,T.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):T.pop(),b=T.length;b--;){const R=c.slice(T[b],T[b+1]),E=a.pop();d.push([E,E+R.length-1]),e.splice(E,2,R)}for(d.reverse(),b=-1;++b<d.length;)f[k+d[b][0]]=k+d[b][1],k+=d[b][1]-d[b][0]-1;return f}const GY={resolve:KY,tokenize:YY},WY={partial:!0,tokenize:XY};function KY(e){return e2(e),e}function YY(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):St(c)?e.check(WY,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 XY(e,t,n){const r=this;return s;function s(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Qt(e,a,"linePrefix")}function a(l){if(l===null||St(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 t2(e,t,n,r,s,a,l,c,d){const f=d||Number.POSITIVE_INFINITY;let h=0;return m;function m(R){return R===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(R),e.exit(a),b):R===null||R===32||R===41||lh(R)?n(R):(e.enter(r),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(R))}function b(R){return R===62?(e.enter(a),e.consume(R),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(R))}function y(R){return R===62?(e.exit("chunkString"),e.exit(c),b(R)):R===null||R===60||St(R)?n(R):(e.consume(R),R===92?k:y)}function k(R){return R===60||R===62||R===92?(e.consume(R),y):y(R)}function S(R){return!h&&(R===null||R===41||xn(R))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(r),t(R)):h<f&&R===40?(e.consume(R),h++,S):R===41?(e.consume(R),h--,S):R===null||R===32||R===40||lh(R)?n(R):(e.consume(R),R===92?T:S)}function T(R){return R===40||R===41||R===92?(e.consume(R),S):S(R)}}function n2(e,t,n,r,s,a){const l=this;let c=0,d;return f;function f(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),e.enter(a),h}function h(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(y):y===93?(e.exit(a),e.enter(s),e.consume(y),e.exit(s),e.exit(r),t):St(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||St(y)||c++>999?(e.exit("chunkString"),h(y)):(e.consume(y),d||(d=!Ut(y)),y===92?b:m)}function b(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function r2(e,t,n,r,s,a){let l;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(s),e.consume(b),e.exit(s),l=b===40?41:b,d):n(b)}function d(b){return b===l?(e.enter(s),e.consume(b),e.exit(s),e.exit(r),t):(e.enter(a),f(b))}function f(b){return b===l?(e.exit(a),d(l)):b===null?n(b):St(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Qt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===l||b===null||St(b)?(e.exit("chunkString"),f(b)):(e.consume(b),b===92?m:h)}function m(b){return b===l||b===92?(e.consume(b),h):h(b)}}function xc(e,t){let n;return r;function r(s){return St(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):Ut(s)?Qt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const ZY={name:"definition",tokenize:JY},QY={partial:!0,tokenize:eX};function JY(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),l(y)}function l(y){return n2.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=Ni(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return xn(y)?xc(e,f)(y):f(y)}function f(y){return t2(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function h(y){return e.attempt(QY,m,m)(y)}function m(y){return Ut(y)?Qt(e,b,"whitespace")(y):b(y)}function b(y){return y===null||St(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function eX(e,t,n){return r;function r(c){return xn(c)?xc(e,s)(c):n(c)}function s(c){return r2(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ut(c)?Qt(e,l,"whitespace")(c):l(c)}function l(c){return c===null||St(c)?t(c):n(c)}}const tX={name:"hardBreakEscape",tokenize:nX};function nX(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return St(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const rX={name:"headingAtx",resolve:iX,tokenize:sX};function iX(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"},ii(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function sX(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||xn(h)?(e.exit("atxHeadingSequence"),c(h)):n(h)}function c(h){return h===35?(e.enter("atxHeadingSequence"),d(h)):h===null||St(h)?(e.exit("atxHeading"),t(h)):Ut(h)?Qt(e,c,"whitespace")(h):(e.enter("atxHeadingText"),f(h))}function d(h){return h===35?(e.consume(h),d):(e.exit("atxHeadingSequence"),c(h))}function f(h){return h===null||h===35||xn(h)?(e.exit("atxHeadingText"),c(h)):(e.consume(h),f)}}const oX=["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"],aX={concrete:!0,name:"htmlFlow",resolveTo:cX,tokenize:fX},lX={partial:!0,tokenize:pX},uX={partial:!0,tokenize:dX};function cX(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 fX(e,t,n){const r=this;let s,a,l,c,d;return f;function f(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):Rr(L)?(e.consume(L),l=String.fromCharCode(L),T):n(L)}function b(L){return L===45?(e.consume(L),s=2,y):L===91?(e.consume(L),s=5,c=0,k):Rr(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 Z="CDATA[";return L===Z.charCodeAt(c++)?(e.consume(L),c===Z.length?r.interrupt?t:$:k):n(L)}function S(L){return Rr(L)?(e.consume(L),l=String.fromCharCode(L),T):n(L)}function T(L){if(L===null||L===47||L===62||xn(L)){const Z=L===47,se=l.toLowerCase();return!Z&&!a&&qR.includes(se)?(s=1,r.interrupt?t(L):$(L)):oX.includes(l.toLowerCase())?(s=6,Z?(e.consume(L),R):r.interrupt?t(L):$(L)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(L):a?E(L):_(L))}return L===45||br(L)?(e.consume(L),l+=String.fromCharCode(L),T):n(L)}function R(L){return L===62?(e.consume(L),r.interrupt?t:$):n(L)}function E(L){return Ut(L)?(e.consume(L),E):A(L)}function _(L){return L===47?(e.consume(L),A):L===58||L===95||Rr(L)?(e.consume(L),C):Ut(L)?(e.consume(L),_):A(L)}function C(L){return L===45||L===46||L===58||L===95||br(L)?(e.consume(L),C):D(L)}function D(L){return L===61?(e.consume(L),N):Ut(L)?(e.consume(L),D):_(L)}function N(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),d=L,M):Ut(L)?(e.consume(L),N):B(L)}function M(L){return L===d?(e.consume(L),d=null,P):L===null||St(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||xn(L)?D(L):(e.consume(L),B)}function P(L){return L===47||L===62||Ut(L)?_(L):n(L)}function A(L){return L===62?(e.consume(L),K):n(L)}function K(L){return L===null||St(L)?$(L):Ut(L)?(e.consume(L),K):n(L)}function $(L){return L===45&&s===2?(e.consume(L),q):L===60&&s===1?(e.consume(L),W):L===62&&s===4?(e.consume(L),j):L===63&&s===3?(e.consume(L),O):L===93&&s===5?(e.consume(L),Y):St(L)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(lX,V,F)(L)):L===null||St(L)?(e.exit("htmlFlowData"),F(L)):(e.consume(L),$)}function F(L){return e.check(uX,z,V)(L)}function z(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),U}function U(L){return L===null||St(L)?F(L):(e.enter("htmlFlowData"),$(L))}function q(L){return L===45?(e.consume(L),O):$(L)}function W(L){return L===47?(e.consume(L),l="",H):$(L)}function H(L){if(L===62){const Z=l.toLowerCase();return qR.includes(Z)?(e.consume(L),j):$(L)}return Rr(L)&&l.length<8?(e.consume(L),l+=String.fromCharCode(L),H):$(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||St(L)?(e.exit("htmlFlowData"),V(L)):(e.consume(L),j)}function V(L){return e.exit("htmlFlow"),t(L)}}function dX(e,t,n){const r=this;return s;function s(l){return St(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 pX(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(cf,t,n)}}const hX={name:"htmlText",tokenize:mX};function mX(e,t,n){const r=this;let s,a,l;return c;function c(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),d}function d(O){return O===33?(e.consume(O),f):O===47?(e.consume(O),D):O===63?(e.consume(O),_):Rr(O)?(e.consume(O),B):n(O)}function f(O){return O===45?(e.consume(O),h):O===91?(e.consume(O),a=0,k):Rr(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):St(O)?(l=m,W(O)):(e.consume(O),m)}function b(O){return O===45?(e.consume(O),y):m(O)}function y(O){return O===62?q(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),T):St(O)?(l=S,W(O)):(e.consume(O),S)}function T(O){return O===93?(e.consume(O),R):S(O)}function R(O){return O===62?q(O):O===93?(e.consume(O),R):S(O)}function E(O){return O===null||O===62?q(O):St(O)?(l=E,W(O)):(e.consume(O),E)}function _(O){return O===null?n(O):O===63?(e.consume(O),C):St(O)?(l=_,W(O)):(e.consume(O),_)}function C(O){return O===62?q(O):_(O)}function D(O){return Rr(O)?(e.consume(O),N):n(O)}function N(O){return O===45||br(O)?(e.consume(O),N):M(O)}function M(O){return St(O)?(l=M,W(O)):Ut(O)?(e.consume(O),M):q(O)}function B(O){return O===45||br(O)?(e.consume(O),B):O===47||O===62||xn(O)?P(O):n(O)}function P(O){return O===47?(e.consume(O),q):O===58||O===95||Rr(O)?(e.consume(O),A):St(O)?(l=P,W(O)):Ut(O)?(e.consume(O),P):q(O)}function A(O){return O===45||O===46||O===58||O===95||br(O)?(e.consume(O),A):K(O)}function K(O){return O===61?(e.consume(O),$):St(O)?(l=K,W(O)):Ut(O)?(e.consume(O),K):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):St(O)?(l=$,W(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):St(O)?(l=F,W(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||xn(O)?P(O):(e.consume(O),z)}function U(O){return O===47||O===62||xn(O)?P(O):n(O)}function q(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function W(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),H}function H(O){return Ut(O)?Qt(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 wx={name:"labelEnd",resolveAll:vX,resolveTo:xX,tokenize:kX},gX={tokenize:SX},bX={tokenize:wX},yX={tokenize:EX};function vX(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&&ii(e,0,e.length,n),e}function xX(e,t){let n=e.length,r=0,s,a,l,c;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(l=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[l-2][1].start}};return c=[["enter",d,t],["enter",f,t]],c=mi(c,e.slice(a+1,a+r+3)),c=mi(c,[["enter",h,t]]),c=mi(c,om(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),c=mi(c,[["exit",h,t],e[l-2],e[l-1],["exit",f,t]]),c=mi(c,e.slice(l+1)),c=mi(c,[["exit",d,t]]),ii(e,a,e.length,c),e}function kX(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(Ni(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(gX,h,l?h:m)(b):b===91?e.attempt(bX,h,l?f:m)(b):l?h(b):m(b)}function f(b){return e.attempt(yX,h,m)(b)}function h(b){return t(b)}function m(b){return a._balanced=!0,n(b)}}function SX(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 xn(m)?xc(e,a)(m):a(m)}function a(m){return m===41?h(m):t2(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return xn(m)?xc(e,d)(m):h(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?r2(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):h(m)}function f(m){return xn(m)?xc(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 wX(e,t,n){const r=this;return s;function s(c){return n2.call(r,e,a,l,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(Ni(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function EX(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 TX={name:"labelStartImage",resolveAll:wx.resolveAll,tokenize:RX};function RX(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 CX={name:"labelStartLink",resolveAll:wx.resolveAll,tokenize:_X};function _X(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 dy={name:"lineEnding",tokenize:AX};function AX(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Qt(e,t,"linePrefix")}}const Ep={name:"thematicBreak",tokenize:NX};function NX(e,t,n){let r=0,s;return a;function a(f){return e.enter("thematicBreak"),l(f)}function l(f){return s=f,c(f)}function c(f){return f===s?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||St(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ut(f)?Qt(e,c,"whitespace")(f):c(f))}}const zr={continuation:{tokenize:DX},exit:jX,name:"list",tokenize:MX},OX={partial:!0,tokenize:zX},IX={partial:!0,tokenize:LX};function MX(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:Rv(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(Ep,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return Rv(y)&&++l<10?(e.consume(y),d):(!r.interrupt||l<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(cf,r.interrupt?n:h,e.attempt(OX,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 DX(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(cf,s,a);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Qt(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(IX,t,l)(c))}function l(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Qt(e,e.attempt(zr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function LX(e,t,n){const r=this;return Qt(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 jX(e){e.exit(this.containerState.type)}function zX(e,t,n){const r=this;return Qt(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 VR={name:"setextUnderline",resolveTo:PX,tokenize:$X};function PX(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 $X(e,t,n){const r=this;let s;return a;function a(f){let h=r.events.length,m;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){m=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),s=f,l(f)):n(f)}function l(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===s?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),Ut(f)?Qt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||St(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const FX={tokenize:BX};function BX(e){const t=this,n=e.attempt(cf,r,e.attempt(this.parser.constructs.flowInitial,s,Qt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(GY,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 UX={resolveAll:s2()},HX=i2("string"),qX=i2("text");function i2(e){return{resolveAll:s2(e==="text"?VX:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,l,c);return l;function l(h){return f(h)?a(h):c(h)}function c(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),d}function d(h){return f(h)?(n.exit("data"),a(h)):(n.consume(h),d)}function f(h){if(h===null)return!0;const m=s[h];let b=-1;if(m)for(;++b<m.length;){const y=m[b];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function s2(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 VX(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let a=s.length,l=-1,c=0,d;for(;a--;){const f=s[a];if(typeof f=="string"){for(l=f.length;f.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(f===-2)d=!0,c++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const GX={42:zr,43:zr,45:zr,48:zr,49:zr,50:zr,51:zr,52:zr,53:zr,54:zr,55:zr,56:zr,57:zr,62:ZM},WX={91:ZY},KX={[-2]:fy,[-1]:fy,32:fy},YX={35:rX,42:Ep,45:[VR,Ep],60:aX,61:VR,95:Ep,96:HR,126:HR},XX={38:JM,92:QM},ZX={[-5]:dy,[-4]:dy,[-3]:dy,33:TX,38:JM,42:Cv,60:[CY,hX],91:CX,92:[tX,QM],93:wx,95:Cv,96:FY},QX={null:[Cv,UX]},JX={null:[42,95]},eZ={null:[]},tZ=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:JX,contentInitial:WX,disable:eZ,document:GX,flow:YX,flowInitial:KX,insideSpan:QX,string:XX,text:ZX},Symbol.toStringTag,{value:"Module"}));function nZ(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},a=[];let l=[],c=[];const d={attempt:M(D),check:M(N),consume:E,enter:_,exit:C,interrupt:M(N,{interrupt:!0})},f={code:null,containerState:{},defineSkip:S,events:[],now:k,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:m};let h=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(K){return l=mi(l,K),T(),l[l.length-1]!==null?[]:(B(t,0),f.events=om(a,f.events,f),f.events)}function b(K,$){return iZ(y(K),$)}function y(K){return rZ(l,K)}function k(){const{_bufferIndex:K,_index:$,line:F,column:z,offset:U}=r;return{_bufferIndex:K,_index:$,line:F,column:z,offset:U}}function S(K){s[K.line]=K.column,A()}function T(){let K;for(;r._index<l.length;){const $=l[r._index];if(typeof $=="string")for(K=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===K&&r._bufferIndex<$.length;)R($.charCodeAt(r._bufferIndex));else R($)}}function R(K){h=h(K)}function E(K){St(K)?(r.line++,r.column=1,r.offset+=K===-3?2:1,A()):K!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=K}function _(K,$){const F=$||{};return F.type=K,F.start=k(),f.events.push(["enter",F,f]),c.push(F),F}function C(K){const $=c.pop();return $.end=k(),f.events.push(["exit",$,f]),$}function D(K,$){B(K,$.from)}function N(K,$){$.restore()}function M(K,$){return F;function F(z,U,q){let W,H,Y,O;return Array.isArray(z)?V(z):"tokenize"in z?V([z]):j(z);function j(ne){return oe;function oe(ae){const ue=ae!==null&&ne[ae],we=ae!==null&&ne.null,me=[...Array.isArray(ue)?ue:ue?[ue]:[],...Array.isArray(we)?we:we?[we]:[]];return V(me)(ae)}}function V(ne){return W=ne,H=0,ne.length===0?q:L(ne[H])}function L(ne){return oe;function oe(ae){return O=P(),Y=ne,ne.partial||(f.currentConstruct=ne),ne.name&&f.parser.constructs.disable.null.includes(ne.name)?se():ne.tokenize.call($?Object.assign(Object.create(f),$):f,d,Z,se)(ae)}}function Z(ne){return K(Y,O),U}function se(ne){return O.restore(),++H<W.length?L(W[H]):q}}}function B(K,$){K.resolveAll&&!a.includes(K)&&a.push(K),K.resolve&&ii(f.events,$,f.events.length-$,K.resolve(f.events.slice($),f)),K.resolveTo&&(f.events=K.resolveTo(f.events,f))}function P(){const K=k(),$=f.previous,F=f.currentConstruct,z=f.events.length,U=Array.from(c);return{from:z,restore:q};function q(){r=K,f.previous=$,f.currentConstruct=F,f.events.length=z,c=U,A()}}function A(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function rZ(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 iZ(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 sZ(e){const r={constructs:YM([tZ,...(e||{}).extensions||[]]),content:s(xY),defined:[],document:s(SY),flow:s(FX),lazy:{},string:s(HX),text:s(qX)};return r;function s(a){return l;function l(c){return nZ(r,a,c)}}}function oZ(e){for(;!e2(e););return e}const GR=/[\0\t\n\r]/g;function aZ(){let e=1,t="",n=!0,r;return s;function s(a,l,c){const d=[];let f,h,m,b,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(GR.lastIndex=m,f=GR.exec(a),b=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(b),!f){t=a.slice(m);break}if(y===10&&m===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<b&&(d.push(a.slice(m,b)),e+=b-m),y){case 0:{d.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,d.push(-2);e++<h;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=b+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const lZ=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function uZ(e){return e.replace(lZ,cZ)}function cZ(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return XM(n.slice(a?2:1),a?16:10)}return Sx(n)||e}const o2={}.hasOwnProperty;function fZ(e,t,n){return typeof t!="string"&&(n=t,t=void 0),dZ(n)(oZ(sZ(n).document().write(aZ()(e,t,!0))))}function dZ(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Oe),autolinkProtocol:P,autolinkEmail:P,atxHeading:a(Re),blockQuote:a(we),characterEscape:P,characterReference:P,codeFenced:a(me),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(me,l),codeText:a(ce,l),codeTextData:P,data:P,codeFlowValue:P,definition:a(be),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(ve),hardBreakEscape:a(Se),hardBreakTrailing:a(Se),htmlFlow:a(ke,l),htmlFlowData:P,htmlText:a(ke,l),htmlTextData:P,image:a(Ae),label:l,link:a(Oe),listItem:a(Ue),listItemValue:b,listOrdered:a(Me,m),listUnordered:a(Me),paragraph:a(xe),reference:L,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(Re),strong:a(_e),thematicBreak:a(fe)},exit:{atxHeading:d(),atxHeadingSequence:D,autolink:d(),autolinkEmail:ue,autolinkProtocol:ae,blockQuote:d(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:se,characterReferenceMarkerNumeric:se,characterReferenceValue:ne,characterReference:oe,codeFenced:d(T),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:k,codeFlowValue:A,codeIndented:d(R),codeText:d(U),codeTextData:A,data:A,definition:d(),definitionDestinationString:C,definitionLabelString:E,definitionTitleString:_,emphasis:d(),hardBreakEscape:d($),hardBreakTrailing:d($),htmlFlow:d(F),htmlFlowData:A,htmlText:d(z),htmlTextData:A,image:d(W),label:Y,labelText:H,lineEnding:K,link:d(q),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Z,resourceDestinationString:O,resourceTitleString:j,resource:V,setextHeading:d(B),setextHeadingLineSequence:M,setextHeadingText:N,strong:d(),thematicBreak:d()}};a2(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let re={type:"root",children:[]};const Te={stack:[re],tokenStack:[],config:t,enter:c,exit:f,buffer:l,resume:h,data:n},Le=[];let Ke=-1;for(;++Ke<J.length;)if(J[Ke][1].type==="listOrdered"||J[Ke][1].type==="listUnordered")if(J[Ke][0]==="enter")Le.push(Ke);else{const Qe=Le.pop();Ke=s(J,Qe,Ke)}for(Ke=-1;++Ke<J.length;){const Qe=t[J[Ke][0]];o2.call(Qe,J[Ke][1].type)&&Qe[J[Ke][1].type].call(Object.assign({sliceSerialize:J[Ke][2].sliceSerialize},Te),J[Ke][1])}if(Te.tokenStack.length>0){const Qe=Te.tokenStack[Te.tokenStack.length-1];(Qe[1]||WR).call(Te,void 0,Qe[0])}for(re.position={start:fo(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:fo(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Ke=-1;++Ke<t.transforms.length;)re=t.transforms[Ke](re)||re;return re}function s(J,re,Te){let Le=re-1,Ke=-1,Qe=!1,gt,Je,xt,Rt;for(;++Le<=Te;){const rt=J[Le];switch(rt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{rt[0]==="enter"?Ke++:Ke--,Rt=void 0;break}case"lineEndingBlank":{rt[0]==="enter"&&(gt&&!Rt&&!Ke&&!xt&&(xt=Le),Rt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Rt=void 0}if(!Ke&&rt[0]==="enter"&&rt[1].type==="listItemPrefix"||Ke===-1&&rt[0]==="exit"&&(rt[1].type==="listUnordered"||rt[1].type==="listOrdered")){if(gt){let et=Le;for(Je=void 0;et--;){const ze=J[et];if(ze[1].type==="lineEnding"||ze[1].type==="lineEndingBlank"){if(ze[0]==="exit")continue;Je&&(J[Je][1].type="lineEndingBlank",Qe=!0),ze[1].type="lineEnding",Je=et}else if(!(ze[1].type==="linePrefix"||ze[1].type==="blockQuotePrefix"||ze[1].type==="blockQuotePrefixWhitespace"||ze[1].type==="blockQuoteMarker"||ze[1].type==="listItemIndent"))break}xt&&(!Je||xt<Je)&&(gt._spread=!0),gt.end=Object.assign({},Je?J[Je][1].start:rt[1].end),J.splice(Je||Le,0,["exit",gt,rt[2]]),Le++,Te++}if(rt[1].type==="listItemPrefix"){const et={type:"listItem",_spread:!1,start:Object.assign({},rt[1].start),end:void 0};gt=et,J.splice(Le,0,["enter",et,rt[2]]),Le++,Te++,xt=void 0,Rt=!0}}}return J[re][1]._spread=Qe,Te}function a(J,re){return Te;function Te(Le){c.call(this,J(Le),Le),re&&re.call(this,Le)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(J,re,Te){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([re,Te||void 0]),J.position={start:fo(re.start),end:void 0}}function d(J){return re;function re(Te){J&&J.call(this,Te),f.call(this,Te)}}function f(J,re){const Te=this.stack.pop(),Le=this.tokenStack.pop();if(Le)Le[0].type!==J.type&&(re?re.call(this,J,Le[0]):(Le[1]||WR).call(this,J,Le[0]));else throw new Error("Cannot close `"+J.type+"` ("+vc({start:J.start,end:J.end})+"): it’s not open");Te.position.end=fo(J.end)}function h(){return kx(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function b(J){if(this.data.expectingFirstListItemValue){const re=this.stack[this.stack.length-2];re.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function y(){const J=this.resume(),re=this.stack[this.stack.length-1];re.lang=J}function k(){const J=this.resume(),re=this.stack[this.stack.length-1];re.meta=J}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const J=this.resume(),re=this.stack[this.stack.length-1];re.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function R(){const J=this.resume(),re=this.stack[this.stack.length-1];re.value=J.replace(/(\r?\n|\r)$/g,"")}function E(J){const re=this.resume(),Te=this.stack[this.stack.length-1];Te.label=re,Te.identifier=Ni(this.sliceSerialize(J)).toLowerCase()}function _(){const J=this.resume(),re=this.stack[this.stack.length-1];re.title=J}function C(){const J=this.resume(),re=this.stack[this.stack.length-1];re.url=J}function D(J){const re=this.stack[this.stack.length-1];if(!re.depth){const Te=this.sliceSerialize(J).length;re.depth=Te}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function M(J){const re=this.stack[this.stack.length-1];re.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function B(){this.data.setextHeadingSlurpLineEnding=void 0}function P(J){const Te=this.stack[this.stack.length-1].children;let Le=Te[Te.length-1];(!Le||Le.type!=="text")&&(Le=ee(),Le.position={start:fo(J.start),end:void 0},Te.push(Le)),this.stack.push(Le)}function A(J){const re=this.stack.pop();re.value+=this.sliceSerialize(J),re.position.end=fo(J.end)}function K(J){const re=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Te=re.children[re.children.length-1];Te.position.end=fo(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(re.type)&&(P.call(this,J),A.call(this,J))}function $(){this.data.atHardBreak=!0}function F(){const J=this.resume(),re=this.stack[this.stack.length-1];re.value=J}function z(){const J=this.resume(),re=this.stack[this.stack.length-1];re.value=J}function U(){const J=this.resume(),re=this.stack[this.stack.length-1];re.value=J}function q(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=re,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function W(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=re,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function H(J){const re=this.sliceSerialize(J),Te=this.stack[this.stack.length-2];Te.label=uZ(re),Te.identifier=Ni(re).toLowerCase()}function Y(){const J=this.stack[this.stack.length-1],re=this.resume(),Te=this.stack[this.stack.length-1];if(this.data.inReference=!0,Te.type==="link"){const Le=J.children;Te.children=Le}else Te.alt=re}function O(){const J=this.resume(),re=this.stack[this.stack.length-1];re.url=J}function j(){const J=this.resume(),re=this.stack[this.stack.length-1];re.title=J}function V(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function Z(J){const re=this.resume(),Te=this.stack[this.stack.length-1];Te.label=re,Te.identifier=Ni(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function se(J){this.data.characterReferenceType=J.type}function ne(J){const re=this.sliceSerialize(J),Te=this.data.characterReferenceType;let Le;Te?(Le=XM(re,Te==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Le=Sx(re);const Ke=this.stack[this.stack.length-1];Ke.value+=Le}function oe(J){const re=this.stack.pop();re.position.end=fo(J.end)}function ae(J){A.call(this,J);const re=this.stack[this.stack.length-1];re.url=this.sliceSerialize(J)}function ue(J){A.call(this,J);const re=this.stack[this.stack.length-1];re.url="mailto:"+this.sliceSerialize(J)}function we(){return{type:"blockquote",children:[]}}function me(){return{type:"code",lang:null,meta:null,value:""}}function ce(){return{type:"inlineCode",value:""}}function be(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ve(){return{type:"emphasis",children:[]}}function Re(){return{type:"heading",depth:0,children:[]}}function Se(){return{type:"break"}}function ke(){return{type:"html",value:""}}function Ae(){return{type:"image",title:null,url:"",alt:null}}function Oe(){return{type:"link",title:null,url:"",children:[]}}function Me(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function Ue(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function xe(){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 a2(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?a2(e,r):pZ(e,r)}}function pZ(e,t){let n;for(n in t)if(o2.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 WR(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+vc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+vc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+vc({start:t.start,end:t.end})+") is still open")}function hZ(e){const t=this;t.parser=n;function n(r){return fZ(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function mZ(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 gZ(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
30
|
+
`}]}function bZ(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 yZ(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vZ(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xZ(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 d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function kZ(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 SZ(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function l2(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 wZ(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return l2(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 EZ(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 TZ(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 RZ(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return l2(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 CZ(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 _Z(e,t,n){const r=e.all(t),s=n?AZ(n):u2(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 d=r[r.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
|
|
33
|
+
`});const f={type:"element",tagName:"li",properties:a,children:l};return e.patch(t,f),e.applyData(t,f)}function AZ(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=u2(n[r])}return t}function u2(e){const t=e.spread;return t??e.children.length>1}function NZ(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 OZ(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function IZ(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function MZ(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function DZ(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=bx(t.children[1]),d=UM(t.children[t.children.length-1]);c&&d&&(l.position={start:c,end:d}),s.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function LZ(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let d=-1;const f=[];for(;++d<c;){const m=t.children[d],b={},y=l?l[d]:void 0;y&&(b.align=y);let k={type:"element",tagName:a,properties:b,children:[]};m&&(k.children=e.all(m),e.patch(m,k),k=e.applyData(m,k)),f.push(k)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,h),e.applyData(t,h)}function jZ(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const KR=9,YR=32;function zZ(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(XR(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(XR(t.slice(s),s>0,!1)),a.join("")}function XR(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===KR||a===YR;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===KR||a===YR;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function PZ(e,t){const n={type:"text",value:zZ(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function $Z(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const FZ={blockquote:mZ,break:gZ,code:bZ,delete:yZ,emphasis:vZ,footnoteReference:xZ,heading:kZ,html:SZ,imageReference:wZ,image:EZ,inlineCode:TZ,linkReference:RZ,link:CZ,listItem:_Z,list:NZ,paragraph:OZ,root:IZ,strong:MZ,table:DZ,tableCell:jZ,tableRow:LZ,text:PZ,thematicBreak:$Z,toml:np,yaml:np,definition:np,footnoteDefinition:np};function np(){}const c2=-1,am=0,kc=1,uh=2,Ex=3,Tx=4,Rx=5,Cx=6,f2=7,d2=8,ZR=typeof self=="object"?self:globalThis,BZ=(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 am:case c2:return n(l,s);case kc:{const c=n([],s);for(const d of l)c.push(r(d));return c}case uh:{const c=n({},s);for(const[d,f]of l)c[r(d)]=r(f);return c}case Ex:return n(new Date(l),s);case Tx:{const{source:c,flags:d}=l;return n(new RegExp(c,d),s)}case Rx:{const c=n(new Map,s);for(const[d,f]of l)c.set(r(d),r(f));return c}case Cx:{const c=n(new Set,s);for(const d of l)c.add(r(d));return c}case f2:{const{name:c,message:d}=l;return n(new ZR[c](d),s)}case d2: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 ZR[a](l),s)};return r},QR=e=>BZ(new Map,e)(0),fl="",{toString:UZ}={},{keys:HZ}=Object,Ju=e=>{const t=typeof e;if(t!=="object"||!e)return[am,t];const n=UZ.call(e).slice(8,-1);switch(n){case"Array":return[kc,fl];case"Object":return[uh,fl];case"Date":return[Ex,fl];case"RegExp":return[Tx,fl];case"Map":return[Rx,fl];case"Set":return[Cx,fl];case"DataView":return[kc,n]}return n.includes("Array")?[kc,n]:n.includes("Error")?[f2,n]:[uh,n]},rp=([e,t])=>e===am&&(t==="function"||t==="symbol"),qZ=(e,t,n,r)=>{const s=(l,c)=>{const d=r.push(l)-1;return n.set(c,d),d},a=l=>{if(n.has(l))return n.get(l);let[c,d]=Ju(l);switch(c){case am:{let h=l;switch(d){case"bigint":c=d2,h=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);h=null;break;case"undefined":return s([c2],l)}return s([c,h],l)}case kc:{if(d){let b=l;return d==="DataView"?b=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(l)),s([d,[...b]],l)}const h=[],m=s([c,h],l);for(const b of l)h.push(a(b));return m}case uh:{if(d)switch(d){case"BigInt":return s([d,l.toString()],l);case"Boolean":case"Number":case"String":return s([d,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const h=[],m=s([c,h],l);for(const b of HZ(l))(e||!rp(Ju(l[b])))&&h.push([a(b),a(l[b])]);return m}case Ex:return s([c,l.toISOString()],l);case Tx:{const{source:h,flags:m}=l;return s([c,{source:h,flags:m}],l)}case Rx:{const h=[],m=s([c,h],l);for(const[b,y]of l)(e||!(rp(Ju(b))||rp(Ju(y))))&&h.push([a(b),a(y)]);return m}case Cx:{const h=[],m=s([c,h],l);for(const b of l)(e||!rp(Ju(b)))&&h.push(a(b));return m}}const{message:f}=l;return s([c,{name:d,message:f}],l)};return a},JR=(e,{json:t,lossy:n}={})=>{const r=[];return qZ(!(t||n),!!t,new Map,r)(e),r},ch=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?QR(JR(e,t)):structuredClone(e):(e,t)=>QR(JR(e,t));function VZ(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 GZ(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function WZ(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||VZ,r=e.options.footnoteBackLabel||GZ,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const h=e.all(f),m=String(f.identifier).toUpperCase(),b=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(d,y);typeof E=="string"&&(E={type:"text",value:E}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}const T=h[h.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const E=T.children[T.children.length-1];E&&E.type==="text"?E.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...k)}else h.push(...k);const R={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(h,!0)};e.patch(f,R),c.push(R)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...ch(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 ff=(function(e){if(e==null)return ZZ;if(typeof e=="function")return lm(e);if(typeof e=="object")return Array.isArray(e)?KZ(e):YZ(e);if(typeof e=="string")return XZ(e);throw new Error("Expected function, string, or object as test")});function KZ(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ff(e[n]);return lm(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function YZ(e){const t=e;return lm(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function XZ(e){return lm(t);function t(n){return n&&n.type===e}}function lm(e){return t;function t(n,r,s){return!!(QZ(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function ZZ(){return!0}function QZ(e){return e!==null&&typeof e=="object"&&"type"in e}const p2=[],JZ=!0,_v=!1,eQ="skip";function h2(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=ff(s),l=r?-1:1;c(e,void 0,[])();function c(d,f,h){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return b;function b(){let y=p2,k,S,T;if((!t||a(d,f,h[h.length-1]||void 0))&&(y=tQ(n(d,h)),y[0]===_v))return y;if("children"in d&&d.children){const R=d;if(R.children&&y[0]!==eQ)for(S=(r?R.children.length:-1)+l,T=h.concat(R);S>-1&&S<R.children.length;){const E=R.children[S];if(k=c(E,S,T)(),k[0]===_v)return k;S=typeof k[1]=="number"?k[1]:S+l}}return y}}}function tQ(e){return Array.isArray(e)?e:typeof e=="number"?[JZ,e]:e==null?p2:[e]}function um(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),h2(e,a,c,s);function c(d,f){const h=f[f.length-1],m=h?h.children.indexOf(d):void 0;return l(d,m,h)}}const Av={}.hasOwnProperty,nQ={};function rQ(e,t){const n=t||nQ,r=new Map,s=new Map,a=new Map,l={...FZ,...n.handlers},c={all:f,applyData:sQ,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:l,one:d,options:n,patch:iQ,wrap:aQ};return um(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const m=h.type==="definition"?r:s,b=String(h.identifier).toUpperCase();m.has(b)||m.set(b,h)}}),c;function d(h,m){const b=h.type,y=c.handlers[b];if(Av.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,...T}=h,R=ch(T);return R.children=c.all(h),R}return ch(h)}return(c.options.unknownHandler||oQ)(c,h,m)}function f(h){const m=[];if("children"in h){const b=h.children;let y=-1;for(;++y<b.length;){const k=c.one(b[y],h);if(k){if(y&&b[y-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=eC(k.value)),!Array.isArray(k)&&k.type==="element")){const S=k.children[0];S&&S.type==="text"&&(S.value=eC(S.value))}Array.isArray(k)?m.push(...k):m.push(k)}}}return m}}function iQ(e,t){e.position&&(t.position=GK(e))}function sQ(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,ch(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function oQ(e,t){const n=t.data||{},r="value"in t&&!(Av.call(n,"hProperties")||Av.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 aQ(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 eC(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function tC(e,t){const n=rQ(e,t),r=n.one(e,void 0),s=WZ(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 lQ(e,t){return e&&"run"in e?async function(n,r){const s=tC(n,{file:r,...t});await e.run(s,r)}:function(n,r){return tC(n,{file:r,...e||t})}}function nC(e){if(e)throw e}var py,rC;function uQ(){if(rC)return py;rC=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var h=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!h&&!m)return!1;var b;for(b in f);return typeof b>"u"||e.call(f,b)},l=function(f,h){n&&h.name==="__proto__"?n(f,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):f[h.name]=h.newValue},c=function(f,h){if(h==="__proto__")if(e.call(f,h)){if(r)return r(f,h).value}else return;return f[h]};return py=function d(){var f,h,m,b,y,k,S=arguments[0],T=1,R=arguments.length,E=!1;for(typeof S=="boolean"&&(E=S,S=arguments[1]||{},T=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});T<R;++T)if(f=arguments[T],f!=null)for(h in f)m=c(S,h),b=c(f,h),S!==b&&(E&&b&&(a(b)||(y=s(b)))?(y?(y=!1,k=m&&s(m)?m:[]):k=m&&a(m)?m:{},l(S,{name:h,newValue:d(E,k,b)})):typeof b<"u"&&l(S,{name:h,newValue:b}));return S},py}var cQ=uQ();const hy=qc(cQ);function Nv(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 fQ(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const l=s.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...s);function c(d,...f){const h=e[++a];let m=-1;if(d){l(d);return}for(;++m<s.length;)(f[m]===null||f[m]===void 0)&&(f[m]=s[m]);s=f,h?dQ(h,c)(...f):l(null,...f)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function dQ(e,t){let n;return r;function r(...l){const c=e.length>l.length;let d;c&&l.push(s);try{d=e.apply(this,l)}catch(f){const h=f;if(c&&n)throw h;return s(h)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(l,...c){n||(n=!0,t(l,...c))}function a(l){s(null,l)}}const Hi={basename:pQ,dirname:hQ,extname:mQ,join:gQ,sep:"/"};function pQ(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');df(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 hQ(e){if(df(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 mQ(e){df(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 gQ(...e){let t=-1,n;for(;++t<e.length;)df(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":bQ(n)}function bQ(e){df(e);const t=e.codePointAt(0)===47;let n=yQ(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function yQ(e,t){let n="",r=0,s=-1,a=0,l=-1,c,d;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(s===l-1||a===1))if(s!==l-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),s=l,a=0;continue}}else if(n.length>0){n="",r=0,s=l,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,l):n=e.slice(s+1,l),r=l-s-1;s=l,a=0}else c===46&&a>-1?a++:a=-1}return n}function df(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const vQ={cwd:xQ};function xQ(){return"/"}function Ov(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function kQ(e){if(typeof e=="string")e=new URL(e);else if(!Ov(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 SQ(e)}function SQ(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 my=["history","path","basename","stem","extname","dirname"];class m2{constructor(t){let n;t?Ov(t)?n={path:t}:typeof t=="string"||wQ(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":vQ.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<my.length;){const a=my[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)my.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Hi.basename(this.path):void 0}set basename(t){by(t,"basename"),gy(t,"basename"),this.path=Hi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Hi.dirname(this.path):void 0}set dirname(t){iC(this.basename,"dirname"),this.path=Hi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Hi.extname(this.path):void 0}set extname(t){if(gy(t,"extname"),iC(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=Hi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ov(t)&&(t=kQ(t)),by(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Hi.basename(this.path,this.extname):void 0}set stem(t){by(t,"stem"),gy(t,"stem"),this.path=Hi.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 xr(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 gy(e,t){if(e&&e.includes(Hi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Hi.sep+"`")}function by(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function iC(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function wQ(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const EQ=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),TQ={}.hasOwnProperty;class _x extends EQ{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=fQ()}copy(){const t=new _x;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(hy(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(xy("data",this.frozen),this.namespace[t]=n,this):TQ.call(this.namespace,t)&&this.namespace[t]||void 0:t?(xy("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=ip(t),r=this.parser||this.Parser;return yy("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),yy("process",this.parser||this.Parser),vy("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,l){const c=ip(t),d=r.parse(c);r.run(d,c,function(h,m,b){if(h||!m||!b)return f(h);const y=m,k=r.stringify(y,b);_Q(k)?b.value=k:b.result=k,f(h,b)});function f(h,m){h||!m?l(h):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),yy("processSync",this.parser||this.Parser),vy("processSync",this.compiler||this.Compiler),this.process(t,s),oC("processSync","process",n),r;function s(a,l){n=!0,nC(a),r=l}}run(t,n,r){sC(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(l,c){const d=ip(n);s.run(t,d,f);function f(h,m,b){const y=m||t;h?c(h):l?l(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),oC("runSync","run",r),s;function a(l,c){nC(l),s=c,r=!0}}stringify(t,n){this.freeze();const r=ip(n),s=this.compiler||this.Compiler;return vy("stringify",s),sC(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(xy("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[h,...m]=f;d(h,m)}else l(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function l(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(f.plugins),f.settings&&(s.settings=hy(!0,s.settings,f.settings))}function c(f){let h=-1;if(f!=null)if(Array.isArray(f))for(;++h<f.length;){const m=f[h];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,h){let m=-1,b=-1;for(;++m<r.length;)if(r[m][0]===f){b=m;break}if(b===-1)r.push([f,...h]);else if(h.length>0){let[y,...k]=h;const S=r[b][1];Nv(S)&&Nv(y)&&(y=hy(!0,S,y)),r[b]=[f,y,...k]}}}}const RQ=new _x().freeze();function yy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function vy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function xy(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 sC(e){if(!Nv(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function oC(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ip(e){return CQ(e)?e:new m2(e)}function CQ(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function _Q(e){return typeof e=="string"||AQ(e)}function AQ(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const NQ="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",aC=[],lC={allowDangerousHtml:!0},OQ=/^(https?|ircs?|mailto|xmpp)$/i,IQ=[{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 MQ(e){const t=DQ(e),n=LQ(e);return jQ(t.runSync(t.parse(n),n),e)}function DQ(e){const t=e.rehypePlugins||aC,n=e.remarkPlugins||aC,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...lC}:lC;return RQ().use(hZ).use(n).use(lQ,r).use(t)}function LQ(e){const t=e.children||"",n=new m2;return typeof t=="string"&&(n.value=t),n}function jQ(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||zQ;for(const h of IQ)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+NQ+h.id,void 0);return um(e,f),ZK(e,{Fragment:g.Fragment,components:s,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function f(h,m,b){if(h.type==="raw"&&b&&typeof m=="number")return l?b.children.splice(m,1):b.children[m]={type:"text",value:h.value},m;if(h.type==="element"){let y;for(y in cy)if(Object.hasOwn(cy,y)&&Object.hasOwn(h.properties,y)){const k=h.properties[y],S=cy[y];(S===null||S.includes(h.tagName))&&(h.properties[y]=d(String(k||""),y,h))}}if(h.type==="element"){let y=n?!n.includes(h.tagName):a?a.includes(h.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(h,m,b)),y&&b&&typeof m=="number")return c&&h.children?b.children.splice(m,1,...h.children):b.children.splice(m,1),m}}}function zQ(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||OQ.test(e.slice(0,t))?e:""}const uC=(function(e,t,n){const r=ff(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]}),Ea=(function(e){if(e==null)return FQ;if(typeof e=="string")return $Q(e);if(typeof e=="object")return PQ(e);if(typeof e=="function")return Ax(e);throw new Error("Expected function, string, or array as `test`")});function PQ(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ea(e[n]);return Ax(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function $Q(e){return Ax(t);function t(n){return n.tagName===e}}function Ax(e){return t;function t(n,r,s){return!!(BQ(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function FQ(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function BQ(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const cC=/\n/g,fC=/[\t ]+/g,Iv=Ea("br"),dC=Ea(YQ),UQ=Ea("p"),pC=Ea("tr"),HQ=Ea(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",KQ,XQ]),g2=Ea(["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 qQ(e,t){const n=t||{},r="children"in e?e.children:[],s=g2(e),a=v2(e,{whitespace:n.whitespace||"normal"}),l=[];(e.type==="text"||e.type==="comment")&&l.push(...y2(e,{breakBefore:!0,breakAfter:!0}));let c=-1;for(;++c<r.length;)l.push(...b2(r[c],e,{whitespace:a,breakBefore:c?void 0:s,breakAfter:c<r.length-1?Iv(r[c+1]):s}));const d=[];let f;for(c=-1;++c<l.length;){const h=l[c];typeof h=="number"?f!==void 0&&h>f&&(f=h):h&&(f!==void 0&&f>-1&&d.push(`
|
|
40
|
+
`.repeat(f)||" "),f=-1,d.push(h))}return d.join("")}function b2(e,t,n){return e.type==="element"?VQ(e,t,n):e.type==="text"?n.whitespace==="normal"?y2(e,n):GQ(e):[]}function VQ(e,t,n){const r=v2(e,n),s=e.children||[];let a=-1,l=[];if(HQ(e))return l;let c,d;for(Iv(e)||pC(e)&&uC(t,e,pC)?d=`
|
|
41
|
+
`:UQ(e)?(c=2,d=2):g2(e)&&(c=1,d=1);++a<s.length;)l=l.concat(b2(s[a],e,{whitespace:r,breakBefore:a?void 0:c,breakAfter:a<s.length-1?Iv(s[a+1]):d}));return dC(e)&&uC(t,e,dC)&&l.push(" "),c&&l.unshift(c),d&&l.push(d),l}function y2(e,t){const n=String(e.value),r=[],s=[];let a=0;for(;a<=n.length;){cC.lastIndex=a;const d=cC.exec(n),f=d&&"index"in d?d.index:n.length;r.push(WQ(n.slice(a,f).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),a===0?t.breakBefore:!0,f===n.length?t.breakAfter:!0)),a=f+1}let l=-1,c;for(;++l<r.length;)r[l].charCodeAt(r[l].length-1)===8203||l<r.length-1&&r[l+1].charCodeAt(0)===8203?(s.push(r[l]),c=void 0):r[l]?(typeof c=="number"&&s.push(c),s.push(r[l]),c=0):(l===0||l===r.length-1)&&s.push(0);return s}function GQ(e){return[String(e.value)]}function WQ(e,t,n){const r=[];let s=0,a;for(;s<e.length;){fC.lastIndex=s;const l=fC.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 v2(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 KQ(e){return!!(e.properties||{}).hidden}function YQ(e){return e.tagName==="td"||e.tagName==="th"}function XQ(e){return e.tagName==="dialog"&&!(e.properties||{}).open}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"},f={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},h={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(f,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},b={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},y=t.optional(s)+e.IDENT_RE+"\\s*\\(",k=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],S=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],T=["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"],R=["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"],C={type:S,keyword:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:T},D={className:"function.dispatch",relevance:0,keywords:{_hint:R},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[D,m,c,n,e.C_BLOCK_COMMENT_MODE,h,f],M={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:N.concat([{begin:/\(/,end:/\)/,keywords:C,contains:N.concat(["self"]),relevance:0}]),relevance:0},B={className:"function",begin:"("+l+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:C,relevance:0},{begin:y,returnBegin:!0,contains:[b],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[f,h]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,h,c,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,h,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:C,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(M,B,D,N,[m,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:C,contains:["self",c]},{begin:e.IDENT_RE+"::",keywords:C},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function QQ(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=ZQ(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 JQ(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),l={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,s]};s.contains.push(c);const d={match:/\\"/},f={className:"string",begin:/'/,end:/'/},h={match:/\\'/},m={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},b=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],y=e.SHEBANG({binary:`(${b.join("|")})`,relevance:10}),k={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},S=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],T=["true","false"],R={match:/(\/[a-z._-]+)+/},E=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],_=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],C=["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:T,built_in:[...E,..._,"set","shopt",...C,...D]},contains:[y,e.SHEBANG(),k,m,a,l,R,c,d,f,h,n]}}function eJ(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",l="("+r+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",c={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},f={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},h={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(f,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},b={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},y=t.optional(s)+e.IDENT_RE+"\\s*\\(",T={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"},R=[m,c,n,e.C_BLOCK_COMMENT_MODE,h,f],E={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:T,contains:R.concat([{begin:/\(/,end:/\)/,keywords:T,contains:R.concat(["self"]),relevance:0}]),relevance:0},_={begin:"("+l+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:T,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:T,relevance:0},{begin:y,returnBegin:!0,contains:[e.inherit(b,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,h,c,{begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,h,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C",aliases:["h"],keywords:T,disableAutodetect:!0,illegal:"</",contains:[].concat(E,_,R,[m,{begin:e.IDENT_RE+"::",keywords:T},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:m,strings:f,keywords:T}}}function tJ(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",l="(?!struct)("+r+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",c={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},f={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},h={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(f,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},b={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},y=t.optional(s)+e.IDENT_RE+"\\s*\\(",k=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],S=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],T=["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"],R=["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"],C={type:S,keyword:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:T},D={className:"function.dispatch",relevance:0,keywords:{_hint:R},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[D,m,c,n,e.C_BLOCK_COMMENT_MODE,h,f],M={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:N.concat([{begin:/\(/,end:/\)/,keywords:C,contains:N.concat(["self"]),relevance:0}]),relevance:0},B={className:"function",begin:"("+l+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:C,relevance:0},{begin:y,returnBegin:!0,contains:[b],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[f,h]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,h,c,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,h,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:C,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(M,B,D,N,[m,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:C,contains:["self",c]},{begin:e.IDENT_RE+"::",keywords:C},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function nJ(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],s=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],a=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],l={keyword:s.concat(a),built_in:t,literal:r},c=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),d={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},f={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},h={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},m=e.inherit(h,{illegal:/\n/}),b={className:"subst",begin:/\{/,end:/\}/,keywords:l},y=e.inherit(b,{illegal:/\n/}),k={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,y]},S={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},b]},T=e.inherit(S,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]});b.contains=[S,k,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.C_BLOCK_COMMENT_MODE],y.contains=[T,k,m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const R={variants:[f,S,k,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},E={begin:"<",end:">",contains:[{beginKeywords:"in out"},c]},_=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",C={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"}},R,d,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},c,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[c,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[c,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+_+"\\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:[R,d,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},C]}}const rJ=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_-]*/}}),iJ=["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"],sJ=["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"],oJ=[...iJ,...sJ],aJ=["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(),lJ=["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(),uJ=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),cJ=["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 fJ(e){const t=e.regex,n=rJ(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:":("+lJ.join("|")+")"},{begin:":(:)?("+uJ.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+cJ.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:aJ.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...c,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+oJ.join("|")+")\\b"}]}}function dJ(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 pJ(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 hJ(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 mJ(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const s={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},a={className:"literal",begin:/\bon|off|true|false|yes|no\b/},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},c={begin:/\[/,end:/\]/,contains:[r,a,s,l,n,"self"],relevance:0},d=/[A-Za-z0-9_-]+/,f=/"(\\"|[^"])*"/,h=/'[^']*'/,m=t.either(d,f,h),b=t.concat(m,"(\\s*\\.\\s*",m,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:b,className:"attr",starts:{end:/$/,contains:[r,c,a,s,l,n]}}]}}var hl="[0-9](_*[0-9])*",sp=`\\.(${hl})`,op="[0-9a-fA-F](_*[0-9a-fA-F])*",hC={className:"number",variants:[{begin:`(\\b(${hl})((${sp})|\\.)?|(${sp}))[eE][+-]?(${hl})[fFdD]?\\b`},{begin:`\\b(${hl})((${sp})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${sp})[fFdD]?\\b`},{begin:`\\b(${hl})[fFdD]\\b`},{begin:`\\b0[xX]((${op})\\.?|(${op})?\\.(${op}))[pP][+-]?(${hl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${op})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function x2(e,t,n){return n===-1?"":e.replace(t,r=>x2(e,t,n-1))}function gJ(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+x2("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),d={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},f={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},h={className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:d,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:d,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[f,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,hC,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},hC,f]}}const mC="[A-Za-z$_][0-9A-Za-z$_]*",bJ=["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"],yJ=["true","false","null","undefined","NaN","Infinity"],k2=["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"],S2=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],w2=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],vJ=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],xJ=[].concat(w2,k2,S2);function kJ(e){const t=e.regex,n=(H,{after:Y})=>{const O="</"+H[0].slice(1);return H.input.indexOf(O,Y)!==-1},r=mC,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(H,Y)=>{const O=H[0].length+H.index,j=H.input[O];if(j==="<"||j===","){Y.ignoreMatch();return}j===">"&&(n(H,{after:O})||Y.ignoreMatch());let V;const L=H.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:mC,keyword:bJ,literal:yJ,built_in:xJ,"variable.language":vJ},d="[0-9](_?[0-9])*",f=`\\.(${d})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${h})((${f})|\\.)?|(${f}))[eE][+-]?(${d})\\b`},{begin:`\\b(${h})\\b((${f})\\b|\\.)?|(${f})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},b={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},y={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"xml"}},k={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"css"}},S={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"graphql"}},T={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]},_=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,S,T,{match:/\$\d+/},m];b.contains=_.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(_)});const C=[].concat(E,b.contains),D=C.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(C)}]),N={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:{_:[...k2,...S2]}},P={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},A={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},K={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function $(H){return t.concat("(?!",H.join("|"),")")}const F={match:t.concat(/\b/,$([...w2,"super","import"].map(H=>`${H}\\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:/\(\)/},N]},q="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",W={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(q)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE: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,T,E,{match:/\$\d+/},m,B,{scope:"attr",match:r+t.lookahead(":"),relevance:0},W,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[E,e.REGEXP_MODE,{className:"function",begin:q,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"]}]}]},A,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},z,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},F,K,M,U,{match:/\$[(.]/}]}}function SJ(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 ml="[0-9](_*[0-9])*",ap=`\\.(${ml})`,lp="[0-9a-fA-F](_*[0-9a-fA-F])*",wJ={className:"number",variants:[{begin:`(\\b(${ml})((${ap})|\\.)?|(${ap}))[eE][+-]?(${ml})[fFdD]?\\b`},{begin:`\\b(${ml})((${ap})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ap})[fFdD]?\\b`},{begin:`\\b(${ml})[fFdD]\\b`},{begin:`\\b0[xX]((${lp})\\.?|(${lp})?\\.(${lp}))[pP][+-]?(${ml})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${lp})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function EJ(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},l={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[a,s]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,s]}]};s.contains.push(l);const c={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},d={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(l,{className:"string"}),"self"]}]},f=wJ,h=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),m={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},b=m;return b.variants[1].contains=[m],m.variants[1].contains=[b],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,h,n,r,c,d,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[m,e.C_LINE_COMMENT_MODE,h],relevance:0},e.C_LINE_COMMENT_MODE,h,c,d,l,e.C_NUMBER_MODE]},h]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},c,d]},l,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
42
|
+
`},f]}}const TJ=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_-]*/}}),RJ=["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"],CJ=["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"],_J=[...RJ,...CJ],AJ=["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(),E2=["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(),T2=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),NJ=["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(),OJ=E2.concat(T2).sort().reverse();function IJ(e){const t=TJ(e),n=OJ,r="and or not only",s="[\\w-]+",a="("+s+"|@\\{"+s+"\\})",l=[],c=[],d=function(_){return{className:"string",begin:"~?"+_+".*?"+_}},f=function(_,C,D){return{className:_,begin:C,relevance:D}},h={$pattern:/[a-z-]+/,keyword:r,attribute:AJ.join(" ")},m={begin:"\\(",end:"\\)",contains:c,keywords:h,relevance:0};c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d("'"),d('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,m,f("variable","@@?"+s,10),f("variable","@\\{"+s+"\\}"),f("built_in","~?`[^`]*?`"),{className:"attribute",begin:s+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const b=c.concat({begin:/\{/,end:/\}/,contains:l}),y={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(c)},k={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+NJ.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}},T={className:"variable",variants:[{begin:"@"+s+"\\s*:",relevance:15},{begin:"@"+s}],starts:{end:"[;}]",returnEnd:!0,contains:b}},R={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:a,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,y,f("keyword","all\\b"),f("variable","@\\{"+s+"\\}"),{begin:"\\b("+_J.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,f("selector-tag",a,0),f("selector-id","#"+a),f("selector-class","\\."+a,0),f("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+E2.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+T2.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:b},{begin:"!important"},t.FUNCTION_DISPATCH]},E={begin:s+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[R]};return l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,S,T,E,k,R,y,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:l}}function MJ(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 DJ(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 LJ(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},s={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},a={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},l={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},c=/[A-Za-z][A-Za-z0-9+.-]*/,d={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,c,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},f={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},h={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},m=e.inherit(f,{contains:[]}),b=e.inherit(h,{contains:[]});f.contains.push(b),h.contains.push(m);let y=[n,d];return[f,h,m,b].forEach(R=>{R.contains=R.contains.concat(y)}),y=y.concat(f,h),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:y},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:y}]}]},n,a,f,h,{className:"quote",begin:"^>\\s+",contains:y,end:"$"},s,r,d,l,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function jJ(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,c={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},d={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:c,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+d.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:d,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function zJ(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,s={$pattern:/[\w.]+/,keyword:n.join(" ")},a={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:s},l={begin:/->\{/,end:/\}/},c={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},d={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[c]},f={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},h=[e.BACKSLASH_ESCAPE,a,d],m=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],b=(S,T,R="\\1")=>{const E=R==="\\1"?R:t.concat(R,T);return t.concat(t.concat("(?:",S,")"),T,/(?:\\.|[^\\\/])*?/,E,/(?:\\.|[^\\\/])*?/,R,r)},y=(S,T,R)=>t.concat(t.concat("(?:",S,")"),T,/(?:\\.|[^\\\/])*?/,R,r),k=[d,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),l,{className:"string",contains:h,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},f,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:b("s|tr|y",t.either(...m,{capture:!0}))},{begin:b("s|tr|y","\\(","\\)")},{begin:b("s|tr|y","\\[","\\]")},{begin:b("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:y("(?:m|qr)?",/\//,/\//)},{begin:y("m|qr",t.either(...m,{capture:!0}),/\1/)},{begin:y("m|qr",/\(/,/\)/)},{begin:y("m|qr",/\[/,/\]/)},{begin:y("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,c]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,c,f]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return a.contains=k,l.contains=k,{name:"Perl",aliases:["pl","pm"],keywords:s,contains:k}}function PJ(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),s=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),a=t.concat(/[A-Z]+/,n),l={scope:"variable",match:"\\$+"+r},c={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},d={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},f=e.inherit(e.APOS_STRING_MODE,{illegal:null}),h=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(d)}),m={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(d),"on:begin":(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,f,m,b]},S={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},T=["false","null","true"],R=["__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"],C={keyword:R,literal:(z=>{const U=[];return z.forEach(q=>{U.push(q),q.toLowerCase()===q?U.push(q.toUpperCase()):U.push(q.toLowerCase())}),U})(T),built_in:E},D=z=>z.map(U=>U.replace(/\|\d+$/,"")),N={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(/(?!::)/))},A={relevance:0,begin:/\(/,end:/\)/,keywords:C,contains:[P,l,B,e.C_BLOCK_COMMENT_MODE,k,S,N]},K={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",D(R).join("\\b|"),"|",D(E).join("\\b|"),"\\b)"),r,t.concat(y,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[A]};A.contains.push(K);const $=[P,B,e.C_BLOCK_COMMENT_MODE,k,S,N],F={begin:t.concat(/#\[\s*\\?/,t.either(s,a)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:T,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:T,keyword:["new","array"]},contains:["self",...$]},...$,{scope:"meta",variants:[{match:s},{match:a}]}]};return{case_insensitive:!1,keywords:C,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,K,B,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},N,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:C,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 $J(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 FJ(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function BJ(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],c={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},d={className:"meta",begin:/^(>>>|\.\.\.) /},f={className:"subst",begin:/\{/,end:/\}/,keywords:c,illegal:/#/},h={begin:/\{\{/,relevance:0},m={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d,h,f]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d,h,f]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,h,f]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,h,f]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},b="[0-9](_?[0-9])*",y=`(\\b(${b}))?\\.(${b})|\\b(${b})\\.`,k=`\\b|${r.join("|")}`,S={className:"number",relevance:0,variants:[{begin:`(\\b(${b})|(${y}))[eE][+-]?(${b})[jJ]?(?=${k})`},{begin:`(${y})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${k})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${k})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${k})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${k})`},{begin:`\\b(${b})[jJ](?=${k})`}]},T={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:c,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},R={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:["self",d,S,m,e.HASH_COMMENT_MODE]}]};return f.contains=[m,S,d],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:c,illegal:/(<\/|\?)|=>/,contains:[d,S,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},m,T,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[R]},{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,R,m]}]}}function UJ(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function HJ(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 qJ(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),s=t.concat(r,/(::\w+)*/),l={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},c={className:"doctag",begin:"@[A-Za-z]+"},d={begin:"#<",end:">"},f=[e.COMMENT("#","$",{contains:[c]}),e.COMMENT("^=begin","^=end",{contains:[c],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],h={className:"subst",begin:/#\{/,end:/\}/,keywords:l},m={className:"string",contains:[e.BACKSLASH_ESCAPE,h],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,h]})]}]},b="[1-9](_?[0-9])*|0",y="[0-9](_?[0-9])*",k={className:"number",relevance:0,variants:[{begin:`\\b(${b})(\\.(${y}))?([eE][+-]?(${y})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},S={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:l}]},N=[m,{variants:[{match:[/class\s+/,s,/\s+<\s+/,s]},{match:[/\b(class|module)\s+/,s]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:l},{match:[/(include|extend)\s+/,s],scope:{2:"title.class"},keywords:l},{relevance:0,match:[s,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[S]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[m,{begin:n}],relevance:0},k,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:l},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,h],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(d,f),relevance:0}].concat(d,f);h.contains=N,S.contains=N;const A=[{begin:/^\s*=>/,starts:{end:"$",contains:N}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:l,contains:N}}];return f.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:l,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(A).concat(f).concat(N)}}function VJ(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),s=t.concat(n,e.IDENT_RE),a={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,s,t.lookahead(/\s*\(/))},l="([ui](8|16|32|64|128|size)|f(32|64))?",c=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],d=["true","false","Some","None","Ok","Err"],f=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],h=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:h,keyword:c,literal:d,built_in:f},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+l},{begin:"\\b0o([0-7_]+)"+l},{begin:"\\b0x([A-Fa-f0-9_]+)"+l},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+l}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:f,type:h}},{className:"punctuation",begin:"->"},a]}}const GJ=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_-]*/}}),WJ=["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"],KJ=["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"],YJ=[...WJ,...KJ],XJ=["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(),ZJ=["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(),QJ=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),JJ=["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 eee(e){const t=GJ(e),n=QJ,r=ZJ,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("+YJ.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("+JJ.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:XJ.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 tee(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function nee(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},a=["true","false","unknown"],l=["double precision","large object","with timezone","without timezone"],c=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],d=["add","asc","collation","desc","final","first","last","view"],f=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],h=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],m=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],b=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],y=h,k=[...f,...d].filter(D=>!h.includes(D)),S={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},T={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},R={match:t.concat(/\b/,t.either(...y),/\s*\(/),relevance:0,keywords:{built_in:y}};function E(D){return t.concat(/\b/,t.either(...D.map(N=>N.replace(/\s+/,"\\s+"))),/\b/)}const _={scope:"keyword",match:E(b),relevance:0};function C(D,{exceptions:N,when:M}={}){const B=M;return N=N||[],D.map(P=>P.match(/\|\d+$/)||N.includes(P)?P:B(P)?`${P}|0`:P)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:C(k,{when:D=>D.length<3}),literal:a,type:c,built_in:m},contains:[{scope:"type",match:E(l)},_,R,S,r,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,T]}}function R2(e){return e?typeof e=="string"?e:e.source:null}function ec(e){return pn("(?=",e,")")}function pn(...e){return e.map(n=>R2(n)).join("")}function ree(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Er(...e){return"("+(ree(e).capture?"":"?:")+e.map(r=>R2(r)).join("|")+")"}const Nx=e=>pn(/\b/,e,/\w$/.test(e)?/\b/:/\B/),iee=["Protocol","Type"].map(Nx),gC=["init","self"].map(Nx),see=["Any","Self"],ky=["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"],bC=["false","nil","true"],oee=["assignment","associativity","higherThan","left","lowerThan","none","right"],aee=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],yC=["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"],C2=Er(/[/=\-+!*%<>&|^~?]/,/[\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]/),_2=Er(C2,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Sy=pn(C2,_2,"*"),A2=Er(/[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]/),fh=Er(A2,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Ui=pn(A2,fh,"*"),up=pn(/[A-Z]/,fh,"*"),lee=["attached","autoclosure",pn(/convention\(/,Er("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",pn(/objc\(/,Ui,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],uee=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function cee(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],s={match:[/\./,Er(...iee,...gC)],className:{2:"keyword"}},a={match:pn(/\./,Er(...ky)),relevance:0},l=ky.filter(Se=>typeof Se=="string").concat(["_|0"]),c=ky.filter(Se=>typeof Se!="string").concat(see).map(Nx),d={variants:[{className:"keyword",match:Er(...c,...gC)}]},f={$pattern:Er(/\b\w+/,/#\w+/),keyword:l.concat(aee),literal:bC},h=[s,a,d],m={match:pn(/\./,Er(...yC)),relevance:0},b={className:"built_in",match:pn(/\b/,Er(...yC),/(?=\()/)},y=[m,b],k={match:/->/,relevance:0},S={className:"operator",relevance:0,variants:[{match:Sy},{match:`\\.(\\.|${_2})+`}]},T=[k,S],R="([0-9]_*)+",E="([0-9a-fA-F]_*)+",_={className:"number",relevance:0,variants:[{match:`\\b(${R})(\\.(${R}))?([eE][+-]?(${R}))?\\b`},{match:`\\b0x(${E})(\\.(${E}))?([pP][+-]?(${R}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},C=(Se="")=>({className:"subst",variants:[{match:pn(/\\/,Se,/[0\\tnr"']/)},{match:pn(/\\/,Se,/u\{[0-9a-fA-F]{1,8}\}/)}]}),D=(Se="")=>({className:"subst",match:pn(/\\/,Se,/[\t ]*(?:[\r\n]|\r\n)/)}),N=(Se="")=>({className:"subst",label:"interpol",begin:pn(/\\/,Se,/\(/),end:/\)/}),M=(Se="")=>({begin:pn(Se,/"""/),end:pn(/"""/,Se),contains:[C(Se),D(Se),N(Se)]}),B=(Se="")=>({begin:pn(Se,/"/),end:pn(/"/,Se),contains:[C(Se),N(Se)]}),P={className:"string",variants:[M(),M("#"),M("##"),M("###"),B(),B("#"),B("##"),B("###")]},A=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],K={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:A},$=Se=>{const ke=pn(Se,/\//),Ae=pn(/\//,Se);return{begin:ke,end:Ae,contains:[...A,{scope:"comment",begin:`#(?!.*${Ae})`,end:/$/}]}},F={scope:"regexp",variants:[$("###"),$("##"),$("#"),K]},z={match:pn(/`/,Ui,/`/)},U={className:"variable",match:/\$\d+/},q={className:"variable",match:`\\$${fh}+`},W=[z,U,q],H={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:uee,contains:[...T,_,P]}]}},Y={scope:"keyword",match:pn(/@/,Er(...lee),ec(Er(/\(/,/\s+/)))},O={scope:"meta",match:pn(/@/,Ui)},j=[H,Y,O],V={match:ec(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:pn(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,fh,"+")},{className:"type",match:up,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:pn(/\s+&\s+/,ec(up)),relevance:0}]},L={begin:/</,end:/>/,keywords:f,contains:[...r,...h,...j,k,V]};V.contains.push(L);const Z={match:pn(Ui,/\s*:/),keywords:"_|0",relevance:0},se={begin:/\(/,end:/\)/,relevance:0,keywords:f,contains:["self",Z,...r,F,...h,...y,...T,_,P,...W,...j,V]},ne={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,V]},oe={begin:Er(ec(pn(Ui,/\s*:/)),ec(pn(Ui,/\s+/,Ui,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Ui}]},ae={begin:/\(/,end:/\)/,keywords:f,contains:[oe,...r,...h,...T,_,P,...j,V,se],endsParent:!0,illegal:/["']/},ue={match:[/(func|macro)/,/\s+/,Er(z.match,Ui,Sy)],className:{1:"keyword",3:"title.function"},contains:[ne,ae,t],illegal:[/\[/,/%/]},we={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ne,ae,t],illegal:/\[|%/},me={match:[/operator/,/\s+/,Sy],className:{1:"keyword",3:"title"}},ce={begin:[/precedencegroup/,/\s+/,up],className:{1:"keyword",3:"title"},contains:[V],keywords:[...oee,...bC],end:/}/},be={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},ve={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Re={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Ui,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:f,contains:[ne,...h,{begin:/:/,end:/\{/,keywords:f,contains:[{scope:"title.class.inherited",match:up},...h],relevance:0}]};for(const Se of P.variants){const ke=Se.contains.find(Oe=>Oe.label==="interpol");ke.keywords=f;const Ae=[...h,...y,...T,_,P,...W];ke.contains=[...Ae,{begin:/\(/,end:/\)/,contains:["self",...Ae]}]}return{name:"Swift",keywords:f,contains:[...r,ue,we,be,ve,Re,me,ce,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},F,...h,...y,...T,_,P,...W,...j,V,se]}}const dh="[A-Za-z$_][0-9A-Za-z$_]*",N2=["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"],O2=["true","false","null","undefined","NaN","Infinity"],I2=["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"],M2=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],D2=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],L2=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],j2=[].concat(D2,I2,M2);function fee(e){const t=e.regex,n=(H,{after:Y})=>{const O="</"+H[0].slice(1);return H.input.indexOf(O,Y)!==-1},r=dh,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(H,Y)=>{const O=H[0].length+H.index,j=H.input[O];if(j==="<"||j===","){Y.ignoreMatch();return}j===">"&&(n(H,{after:O})||Y.ignoreMatch());let V;const L=H.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:dh,keyword:N2,literal:O2,built_in:j2,"variable.language":L2},d="[0-9](_?[0-9])*",f=`\\.(${d})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${h})((${f})|\\.)?|(${f}))[eE][+-]?(${d})\\b`},{begin:`\\b(${h})\\b((${f})\\b|\\.)?|(${f})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},b={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},y={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"xml"}},k={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"css"}},S={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"graphql"}},T={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]},_=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,S,T,{match:/\$\d+/},m];b.contains=_.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(_)});const C=[].concat(E,b.contains),D=C.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(C)}]),N={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:{_:[...I2,...M2]}},P={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},A={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},K={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function $(H){return t.concat("(?!",H.join("|"),")")}const F={match:t.concat(/\b/,$([...D2,"super","import"].map(H=>`${H}\\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:/\(\)/},N]},q="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",W={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(q)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE: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,T,E,{match:/\$\d+/},m,B,{scope:"attr",match:r+t.lookahead(":"),relevance:0},W,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[E,e.REGEXP_MODE,{className:"function",begin:q,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"]}]}]},A,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},z,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},F,K,M,U,{match:/\$[(.]/}]}}function dee(e){const t=e.regex,n=fee(e),r=dh,s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},l={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[n.exports.CLASS_REFERENCE]},c={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},d=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],f={$pattern:dh,keyword:N2.concat(d),literal:O2,built_in:j2.concat(s),"variable.language":L2},h={className:"meta",begin:"@"+r},m=(S,T,R)=>{const E=S.contains.findIndex(_=>_.label===T);if(E===-1)throw new Error("can not find mode to replace");S.contains.splice(E,1,R)};Object.assign(n.keywords,f),n.exports.PARAMS_CONTAINS.push(h);const b=n.contains.find(S=>S.scope==="attr"),y=Object.assign({},b,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,b,y]),n.contains=n.contains.concat([h,a,l,y]),m(n,"shebang",e.SHEBANG()),m(n,"use_strict",c);const k=n.contains.find(S=>S.label==="func.def");return k.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function pee(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,l=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,c=/\d{1,2}(:\d{1,2}){1,2}/,d={className:"literal",variants:[{begin:t.concat(/# */,t.either(a,s),/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,t.either(a,s),/ +/,t.either(l,c),/ *#/)}]},f={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},h={className:"label",begin:/^\w+:/},m=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),b=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,d,f,h,m,b,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[b]}]}}function hee(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],s={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},a={className:"variable",begin:/\$[\w_]+/},l={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},c={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},d={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},f={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},a,l,s,e.QUOTE_STRING_MODE,d,f,c]}}function mee(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},l=e.inherit(a,{begin:/\(/,end:/\)/}),c=e.inherit(e.APOS_STRING_MODE,{className:"string"}),d=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),f={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,d,c,l,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,l,d,c]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[d]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[f],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[f],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:f}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function gee(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},T=[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],R=[...T];return R.pop(),R.push(c),y.contains=R,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:T}}const bee={arduino:QQ,bash:JQ,c:eJ,cpp:tJ,csharp:nJ,css:fJ,diff:dJ,go:pJ,graphql:hJ,ini:mJ,java:gJ,javascript:kJ,json:SJ,kotlin:EJ,less:IJ,lua:MJ,makefile:DJ,markdown:LJ,objectivec:jJ,perl:zJ,php:PJ,"php-template":$J,plaintext:FJ,python:BJ,"python-repl":UJ,r:HJ,ruby:qJ,rust:VJ,scss:eee,shell:tee,sql:nee,swift:cee,typescript:dee,vbnet:pee,wasm:hee,xml:mee,yaml:gee};var wy,vC;function yee(){if(vC)return wy;vC=1;function e(X){return X instanceof Map?X.clear=X.delete=X.set=function(){throw new Error("map is read-only")}:X instanceof Set&&(X.add=X.clear=X.delete=function(){throw new Error("set is read-only")}),Object.freeze(X),Object.getOwnPropertyNames(X).forEach(he=>{const Ie=X[he],tt=typeof Ie;(tt==="object"||tt==="function")&&!Object.isFrozen(Ie)&&e(Ie)}),X}class t{constructor(he){he.data===void 0&&(he.data={}),this.data=he.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(X){return X.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(X,...he){const Ie=Object.create(null);for(const tt in X)Ie[tt]=X[tt];return he.forEach(function(tt){for(const _t in tt)Ie[_t]=tt[_t]}),Ie}const s="</span>",a=X=>!!X.scope,l=(X,{prefix:he})=>{if(X.startsWith("language:"))return X.replace("language:","language-");if(X.includes(".")){const Ie=X.split(".");return[`${he}${Ie.shift()}`,...Ie.map((tt,_t)=>`${tt}${"_".repeat(_t+1)}`)].join(" ")}return`${he}${X}`};class c{constructor(he,Ie){this.buffer="",this.classPrefix=Ie.classPrefix,he.walk(this)}addText(he){this.buffer+=n(he)}openNode(he){if(!a(he))return;const Ie=l(he.scope,{prefix:this.classPrefix});this.span(Ie)}closeNode(he){a(he)&&(this.buffer+=s)}value(){return this.buffer}span(he){this.buffer+=`<span class="${he}">`}}const d=(X={})=>{const he={children:[]};return Object.assign(he,X),he};class f{constructor(){this.rootNode=d(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(he){this.top.children.push(he)}openNode(he){const Ie=d({scope:he});this.add(Ie),this.stack.push(Ie)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(he){return this.constructor._walk(he,this.rootNode)}static _walk(he,Ie){return typeof Ie=="string"?he.addText(Ie):Ie.children&&(he.openNode(Ie),Ie.children.forEach(tt=>this._walk(he,tt)),he.closeNode(Ie)),he}static _collapse(he){typeof he!="string"&&he.children&&(he.children.every(Ie=>typeof Ie=="string")?he.children=[he.children.join("")]:he.children.forEach(Ie=>{f._collapse(Ie)}))}}class h extends f{constructor(he){super(),this.options=he}addText(he){he!==""&&this.add(he)}startScope(he){this.openNode(he)}endScope(){this.closeNode()}__addSublanguage(he,Ie){const tt=he.root;Ie&&(tt.scope=`language:${Ie}`),this.add(tt)}toHTML(){return new c(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function m(X){return X?typeof X=="string"?X:X.source:null}function b(X){return S("(?=",X,")")}function y(X){return S("(?:",X,")*")}function k(X){return S("(?:",X,")?")}function S(...X){return X.map(Ie=>m(Ie)).join("")}function T(X){const he=X[X.length-1];return typeof he=="object"&&he.constructor===Object?(X.splice(X.length-1,1),he):{}}function R(...X){return"("+(T(X).capture?"":"?:")+X.map(tt=>m(tt)).join("|")+")"}function E(X){return new RegExp(X.toString()+"|").exec("").length-1}function _(X,he){const Ie=X&&X.exec(he);return Ie&&Ie.index===0}const C=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function D(X,{joinWith:he}){let Ie=0;return X.map(tt=>{Ie+=1;const _t=Ie;let dt=m(tt),Ve="";for(;dt.length>0;){const Be=C.exec(dt);if(!Be){Ve+=dt;break}Ve+=dt.substring(0,Be.index),dt=dt.substring(Be.index+Be[0].length),Be[0][0]==="\\"&&Be[1]?Ve+="\\"+String(Number(Be[1])+_t):(Ve+=Be[0],Be[0]==="("&&Ie++)}return Ve}).map(tt=>`(${tt})`).join(he)}const N=/\b\B/,M="[a-zA-Z]\\w*",B="[a-zA-Z_]\\w*",P="\\b\\d+(\\.\\d+)?",A="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",K="\\b(0b[01]+)",$="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",F=(X={})=>{const he=/^#![ ]*\//;return X.binary&&(X.begin=S(he,/.*\b/,X.binary,/\b.*/)),r({scope:"meta",begin:he,end:/$/,relevance:0,"on:begin":(Ie,tt)=>{Ie.index!==0&&tt.ignoreMatch()}},X)},z={begin:"\\\\[\\s\\S]",relevance:0},U={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[z]},q={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[z]},W={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},H=function(X,he,Ie={}){const tt=r({scope:"comment",begin:X,end:he,contains:[]},Ie);tt.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 _t=R("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 tt.contains.push({begin:S(/[ ]+/,"(",_t,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),tt},Y=H("//","$"),O=H("/\\*","\\*/"),j=H("#","$"),V={scope:"number",begin:P,relevance:0},L={scope:"number",begin:A,relevance:0},Z={scope:"number",begin:K,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},ae={begin:"\\.\\s*"+B,relevance:0};var we=Object.freeze({__proto__:null,APOS_STRING_MODE:U,BACKSLASH_ESCAPE:z,BINARY_NUMBER_MODE:Z,BINARY_NUMBER_RE:K,COMMENT:H,C_BLOCK_COMMENT_MODE:O,C_LINE_COMMENT_MODE:Y,C_NUMBER_MODE:L,C_NUMBER_RE:A,END_SAME_AS_BEGIN:function(X){return Object.assign(X,{"on:begin":(he,Ie)=>{Ie.data._beginMatch=he[1]},"on:end":(he,Ie)=>{Ie.data._beginMatch!==he[1]&&Ie.ignoreMatch()}})},HASH_COMMENT_MODE:j,IDENT_RE:M,MATCH_NOTHING_RE:N,METHOD_GUARD:ae,NUMBER_MODE:V,NUMBER_RE:P,PHRASAL_WORDS_MODE:W,QUOTE_STRING_MODE:q,REGEXP_MODE:se,RE_STARTERS_RE:$,SHEBANG:F,TITLE_MODE:ne,UNDERSCORE_IDENT_RE:B,UNDERSCORE_TITLE_MODE:oe});function me(X,he){X.input[X.index-1]==="."&&he.ignoreMatch()}function ce(X,he){X.className!==void 0&&(X.scope=X.className,delete X.className)}function be(X,he){he&&X.beginKeywords&&(X.begin="\\b("+X.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",X.__beforeBegin=me,X.keywords=X.keywords||X.beginKeywords,delete X.beginKeywords,X.relevance===void 0&&(X.relevance=0))}function ve(X,he){Array.isArray(X.illegal)&&(X.illegal=R(...X.illegal))}function Re(X,he){if(X.match){if(X.begin||X.end)throw new Error("begin & end are not supported with match");X.begin=X.match,delete X.match}}function Se(X,he){X.relevance===void 0&&(X.relevance=1)}const ke=(X,he)=>{if(!X.beforeMatch)return;if(X.starts)throw new Error("beforeMatch cannot be used with starts");const Ie=Object.assign({},X);Object.keys(X).forEach(tt=>{delete X[tt]}),X.keywords=Ie.keywords,X.begin=S(Ie.beforeMatch,b(Ie.begin)),X.starts={relevance:0,contains:[Object.assign(Ie,{endsParent:!0})]},X.relevance=0,delete Ie.beforeMatch},Ae=["of","and","for","in","not","or","if","then","parent","list","value"],Oe="keyword";function Me(X,he,Ie=Oe){const tt=Object.create(null);return typeof X=="string"?_t(Ie,X.split(" ")):Array.isArray(X)?_t(Ie,X):Object.keys(X).forEach(function(dt){Object.assign(tt,Me(X[dt],he,dt))}),tt;function _t(dt,Ve){he&&(Ve=Ve.map(Be=>Be.toLowerCase())),Ve.forEach(function(Be){const nt=Be.split("|");tt[nt[0]]=[dt,Ue(nt[0],nt[1])]})}}function Ue(X,he){return he?Number(he):xe(X)?0:1}function xe(X){return Ae.includes(X.toLowerCase())}const _e={},ee=X=>{console.error(X)},fe=(X,...he)=>{console.log(`WARN: ${X}`,...he)},J=(X,he)=>{_e[`${X}/${he}`]||(console.log(`Deprecated as of ${X}. ${he}`),_e[`${X}/${he}`]=!0)},re=new Error;function Te(X,he,{key:Ie}){let tt=0;const _t=X[Ie],dt={},Ve={};for(let Be=1;Be<=he.length;Be++)Ve[Be+tt]=_t[Be],dt[Be+tt]=!0,tt+=E(he[Be-1]);X[Ie]=Ve,X[Ie]._emit=dt,X[Ie]._multi=!0}function Le(X){if(Array.isArray(X.begin)){if(X.skip||X.excludeBegin||X.returnBegin)throw ee("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),re;if(typeof X.beginScope!="object"||X.beginScope===null)throw ee("beginScope must be object"),re;Te(X,X.begin,{key:"beginScope"}),X.begin=D(X.begin,{joinWith:""})}}function Ke(X){if(Array.isArray(X.end)){if(X.skip||X.excludeEnd||X.returnEnd)throw ee("skip, excludeEnd, returnEnd not compatible with endScope: {}"),re;if(typeof X.endScope!="object"||X.endScope===null)throw ee("endScope must be object"),re;Te(X,X.end,{key:"endScope"}),X.end=D(X.end,{joinWith:""})}}function Qe(X){X.scope&&typeof X.scope=="object"&&X.scope!==null&&(X.beginScope=X.scope,delete X.scope)}function gt(X){Qe(X),typeof X.beginScope=="string"&&(X.beginScope={_wrap:X.beginScope}),typeof X.endScope=="string"&&(X.endScope={_wrap:X.endScope}),Le(X),Ke(X)}function Je(X){function he(Ve,Be){return new RegExp(m(Ve),"m"+(X.case_insensitive?"i":"")+(X.unicodeRegex?"u":"")+(Be?"g":""))}class Ie{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Be,nt){nt.position=this.position++,this.matchIndexes[this.matchAt]=nt,this.regexes.push([nt,Be]),this.matchAt+=E(Be)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Be=this.regexes.map(nt=>nt[1]);this.matcherRe=he(D(Be,{joinWith:"|"}),!0),this.lastIndex=0}exec(Be){this.matcherRe.lastIndex=this.lastIndex;const nt=this.matcherRe.exec(Be);if(!nt)return null;const Ge=nt.findIndex((ct,Pt)=>Pt>0&&ct!==void 0),Pe=this.matchIndexes[Ge];return nt.splice(0,Ge),Object.assign(nt,Pe)}}class tt{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Be){if(this.multiRegexes[Be])return this.multiRegexes[Be];const nt=new Ie;return this.rules.slice(Be).forEach(([Ge,Pe])=>nt.addRule(Ge,Pe)),nt.compile(),this.multiRegexes[Be]=nt,nt}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Be,nt){this.rules.push([Be,nt]),nt.type==="begin"&&this.count++}exec(Be){const nt=this.getMatcher(this.regexIndex);nt.lastIndex=this.lastIndex;let Ge=nt.exec(Be);if(this.resumingScanAtSamePosition()&&!(Ge&&Ge.index===this.lastIndex)){const Pe=this.getMatcher(0);Pe.lastIndex=this.lastIndex+1,Ge=Pe.exec(Be)}return Ge&&(this.regexIndex+=Ge.position+1,this.regexIndex===this.count&&this.considerAll()),Ge}}function _t(Ve){const Be=new tt;return Ve.contains.forEach(nt=>Be.addRule(nt.begin,{rule:nt,type:"begin"})),Ve.terminatorEnd&&Be.addRule(Ve.terminatorEnd,{type:"end"}),Ve.illegal&&Be.addRule(Ve.illegal,{type:"illegal"}),Be}function dt(Ve,Be){const nt=Ve;if(Ve.isCompiled)return nt;[ce,Re,gt,ke].forEach(Pe=>Pe(Ve,Be)),X.compilerExtensions.forEach(Pe=>Pe(Ve,Be)),Ve.__beforeBegin=null,[be,ve,Se].forEach(Pe=>Pe(Ve,Be)),Ve.isCompiled=!0;let Ge=null;return typeof Ve.keywords=="object"&&Ve.keywords.$pattern&&(Ve.keywords=Object.assign({},Ve.keywords),Ge=Ve.keywords.$pattern,delete Ve.keywords.$pattern),Ge=Ge||/\w+/,Ve.keywords&&(Ve.keywords=Me(Ve.keywords,X.case_insensitive)),nt.keywordPatternRe=he(Ge,!0),Be&&(Ve.begin||(Ve.begin=/\B|\b/),nt.beginRe=he(nt.begin),!Ve.end&&!Ve.endsWithParent&&(Ve.end=/\B|\b/),Ve.end&&(nt.endRe=he(nt.end)),nt.terminatorEnd=m(nt.end)||"",Ve.endsWithParent&&Be.terminatorEnd&&(nt.terminatorEnd+=(Ve.end?"|":"")+Be.terminatorEnd)),Ve.illegal&&(nt.illegalRe=he(Ve.illegal)),Ve.contains||(Ve.contains=[]),Ve.contains=[].concat(...Ve.contains.map(function(Pe){return Rt(Pe==="self"?Ve:Pe)})),Ve.contains.forEach(function(Pe){dt(Pe,nt)}),Ve.starts&&dt(Ve.starts,Be),nt.matcher=_t(nt),nt}if(X.compilerExtensions||(X.compilerExtensions=[]),X.contains&&X.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return X.classNameAliases=r(X.classNameAliases||{}),dt(X)}function xt(X){return X?X.endsWithParent||xt(X.starts):!1}function Rt(X){return X.variants&&!X.cachedVariants&&(X.cachedVariants=X.variants.map(function(he){return r(X,{variants:null},he)})),X.cachedVariants?X.cachedVariants:xt(X)?r(X,{starts:X.starts?r(X.starts):null}):Object.isFrozen(X)?r(X):X}var rt="11.11.1";class et extends Error{constructor(he,Ie){super(he),this.name="HTMLInjectionError",this.html=Ie}}const ze=n,He=r,Ze=Symbol("nomatch"),ft=7,Tt=function(X){const he=Object.create(null),Ie=Object.create(null),tt=[];let _t=!0;const dt="Could not find the language '{}', did you forget to load/include a language module?",Ve={disableAutodetect:!0,name:"Plain text",contains:[]};let Be={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:h};function nt(De){return Be.noHighlightRe.test(De)}function Ge(De){let pt=De.className+" ";pt+=De.parentNode?De.parentNode.className:"";const jt=Be.languageDetectRe.exec(pt);if(jt){const sn=Bn(jt[1]);return sn||(fe(dt.replace("{}",jt[1])),fe("Falling back to no-highlight mode for this block.",De)),sn?jt[1]:"no-highlight"}return pt.split(/\s+/).find(sn=>nt(sn)||Bn(sn))}function Pe(De,pt,jt){let sn="",Ln="";typeof pt=="object"?(sn=De,jt=pt.ignoreIllegals,Ln=pt.language):(J("10.7.0","highlight(lang, code, ...args) has been deprecated."),J("10.7.0",`Please use highlight(code, options) instead.
|
|
44
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Ln=De,sn=pt),jt===void 0&&(jt=!0);const fr={code:sn,language:Ln};Io("before:highlight",fr);const qr=fr.result?fr.result:ct(fr.language,fr.code,jt);return qr.code=fr.code,Io("after:highlight",qr),qr}function ct(De,pt,jt,sn){const Ln=Object.create(null);function fr(qe,at){return qe.keywords[at]}function qr(){if(!Et.keywords){Hn.addText(on);return}let qe=0;Et.keywordPatternRe.lastIndex=0;let at=Et.keywordPatternRe.exec(on),Nt="";for(;at;){Nt+=on.substring(qe,at.index);const Vt=ir.case_insensitive?at[0].toLowerCase():at[0],An=fr(Et,Vt);if(An){const[si,Ql]=An;if(Hn.addText(Nt),Nt="",Ln[Vt]=(Ln[Vt]||0)+1,Ln[Vt]<=ft&&(Ps+=Ql),si.startsWith("_"))Nt+=at[0];else{const vf=ir.classNameAliases[si]||si;Vr(at[0],vf)}}else Nt+=at[0];qe=Et.keywordPatternRe.lastIndex,at=Et.keywordPatternRe.exec(on)}Nt+=on.substring(qe),Hn.addText(Nt)}function Ar(){if(on==="")return;let qe=null;if(typeof Et.subLanguage=="string"){if(!he[Et.subLanguage]){Hn.addText(on);return}qe=ct(Et.subLanguage,on,!0,yf[Et.subLanguage]),yf[Et.subLanguage]=qe._top}else qe=qt(on,Et.subLanguage.length?Et.subLanguage:null);Et.relevance>0&&(Ps+=qe.relevance),Hn.__addSublanguage(qe._emitter,qe.language)}function wn(){Et.subLanguage!=null?Ar():qr(),on=""}function Vr(qe,at){qe!==""&&(Hn.startScope(at),Hn.addText(qe),Hn.endScope())}function gf(qe,at){let Nt=1;const Vt=at.length-1;for(;Nt<=Vt;){if(!qe._emit[Nt]){Nt++;continue}const An=ir.classNameAliases[qe[Nt]]||qe[Nt],si=at[Nt];An?Vr(si,An):(on=si,qr(),on=""),Nt++}}function Ra(qe,at){return qe.scope&&typeof qe.scope=="string"&&Hn.openNode(ir.classNameAliases[qe.scope]||qe.scope),qe.beginScope&&(qe.beginScope._wrap?(Vr(on,ir.classNameAliases[qe.beginScope._wrap]||qe.beginScope._wrap),on=""):qe.beginScope._multi&&(gf(qe.beginScope,at),on="")),Et=Object.create(qe,{parent:{value:Et}}),Et}function Yl(qe,at,Nt){let Vt=_(qe.endRe,Nt);if(Vt){if(qe["on:end"]){const An=new t(qe);qe["on:end"](at,An),An.isMatchIgnored&&(Vt=!1)}if(Vt){for(;qe.endsParent&&qe.parent;)qe=qe.parent;return qe}}if(qe.endsWithParent)return Yl(qe.parent,at,Nt)}function Ca(qe){return Et.matcher.regexIndex===0?(on+=qe[0],1):($s=!0,0)}function fm(qe){const at=qe[0],Nt=qe.rule,Vt=new t(Nt),An=[Nt.__beforeBegin,Nt["on:begin"]];for(const si of An)if(si&&(si(qe,Vt),Vt.isMatchIgnored))return Ca(at);return Nt.skip?on+=at:(Nt.excludeBegin&&(on+=at),wn(),!Nt.returnBegin&&!Nt.excludeBegin&&(on=at)),Ra(Nt,qe),Nt.returnBegin?0:at.length}function Nr(qe){const at=qe[0],Nt=pt.substring(qe.index),Vt=Yl(Et,qe,Nt);if(!Vt)return Ze;const An=Et;Et.endScope&&Et.endScope._wrap?(wn(),Vr(at,Et.endScope._wrap)):Et.endScope&&Et.endScope._multi?(wn(),gf(Et.endScope,qe)):An.skip?on+=at:(An.returnEnd||An.excludeEnd||(on+=at),wn(),An.excludeEnd&&(on=at));do Et.scope&&Hn.closeNode(),!Et.skip&&!Et.subLanguage&&(Ps+=Et.relevance),Et=Et.parent;while(Et!==Vt.parent);return Vt.starts&&Ra(Vt.starts,qe),An.returnEnd?0:at.length}function Xl(){const qe=[];for(let at=Et;at!==ir;at=at.parent)at.scope&&qe.unshift(at.scope);qe.forEach(at=>Hn.openNode(at))}let Mo={};function _a(qe,at){const Nt=at&&at[0];if(on+=qe,Nt==null)return wn(),0;if(Mo.type==="begin"&&at.type==="end"&&Mo.index===at.index&&Nt===""){if(on+=pt.slice(at.index,at.index+1),!_t){const Vt=new Error(`0 width match regex (${De})`);throw Vt.languageName=De,Vt.badRule=Mo.rule,Vt}return 1}if(Mo=at,at.type==="begin")return fm(at);if(at.type==="illegal"&&!jt){const Vt=new Error('Illegal lexeme "'+Nt+'" for mode "'+(Et.scope||"<unnamed>")+'"');throw Vt.mode=Et,Vt}else if(at.type==="end"){const Vt=Nr(at);if(Vt!==Ze)return Vt}if(at.type==="illegal"&&Nt==="")return on+=`
|
|
45
|
+
`,1;if(Zl>1e5&&Zl>at.index*3)throw new Error("potential infinite loop, way more iterations than matches");return on+=Nt,Nt.length}const ir=Bn(De);if(!ir)throw ee(dt.replace("{}",De)),new Error('Unknown language: "'+De+'"');const bf=Je(ir);let Aa="",Et=sn||bf;const yf={},Hn=new Be.__emitter(Be);Xl();let on="",Ps=0,Ji=0,Zl=0,$s=!1;try{if(ir.__emitTokens)ir.__emitTokens(pt,Hn);else{for(Et.matcher.considerAll();;){Zl++,$s?$s=!1:Et.matcher.considerAll(),Et.matcher.lastIndex=Ji;const qe=Et.matcher.exec(pt);if(!qe)break;const at=pt.substring(Ji,qe.index),Nt=_a(at,qe);Ji=qe.index+Nt}_a(pt.substring(Ji))}return Hn.finalize(),Aa=Hn.toHTML(),{language:De,value:Aa,relevance:Ps,illegal:!1,_emitter:Hn,_top:Et}}catch(qe){if(qe.message&&qe.message.includes("Illegal"))return{language:De,value:ze(pt),illegal:!0,relevance:0,_illegalBy:{message:qe.message,index:Ji,context:pt.slice(Ji-100,Ji+100),mode:qe.mode,resultSoFar:Aa},_emitter:Hn};if(_t)return{language:De,value:ze(pt),illegal:!1,relevance:0,errorRaised:qe,_emitter:Hn,_top:Et};throw qe}}function Pt(De){const pt={value:ze(De),illegal:!1,relevance:0,_top:Ve,_emitter:new Be.__emitter(Be)};return pt._emitter.addText(De),pt}function qt(De,pt){pt=pt||Be.languages||Object.keys(he);const jt=Pt(De),sn=pt.filter(Bn).filter(js).map(wn=>ct(wn,De,!1));sn.unshift(jt);const Ln=sn.sort((wn,Vr)=>{if(wn.relevance!==Vr.relevance)return Vr.relevance-wn.relevance;if(wn.language&&Vr.language){if(Bn(wn.language).supersetOf===Vr.language)return 1;if(Bn(Vr.language).supersetOf===wn.language)return-1}return 0}),[fr,qr]=Ln,Ar=fr;return Ar.secondBest=qr,Ar}function Xe(De,pt,jt){const sn=pt&&Ie[pt]||jt;De.classList.add("hljs"),De.classList.add(`language-${sn}`)}function It(De){let pt=null;const jt=Ge(De);if(nt(jt))return;if(Io("before:highlightElement",{el:De,language:jt}),De.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",De);return}if(De.children.length>0&&(Be.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(De)),Be.throwUnescapedHTML))throw new et("One of your code blocks includes unescaped HTML.",De.innerHTML);pt=De;const sn=pt.textContent,Ln=jt?Pe(sn,{language:jt,ignoreIllegals:!0}):qt(sn);De.innerHTML=Ln.value,De.dataset.highlighted="yes",Xe(De,jt,Ln.language),De.result={language:Ln.language,re:Ln.relevance,relevance:Ln.relevance},Ln.secondBest&&(De.secondBest={language:Ln.secondBest.language,relevance:Ln.secondBest.relevance}),Io("after:highlightElement",{el:De,result:Ln,text:sn})}function ut(De){Be=He(Be,De)}const kn=()=>{tr(),J("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Yn(){tr(),J("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Xn=!1;function tr(){function De(){tr()}if(document.readyState==="loading"){Xn||window.addEventListener("DOMContentLoaded",De,!1),Xn=!0;return}document.querySelectorAll(Be.cssSelector).forEach(It)}function Sn(De,pt){let jt=null;try{jt=pt(X)}catch(sn){if(ee("Language definition for '{}' could not be registered.".replace("{}",De)),_t)ee(sn);else throw sn;jt=Ve}jt.name||(jt.name=De),he[De]=jt,jt.rawDefinition=pt.bind(null,X),jt.aliases&&kr(jt.aliases,{languageName:De})}function Hr(De){delete he[De];for(const pt of Object.keys(Ie))Ie[pt]===De&&delete Ie[pt]}function ji(){return Object.keys(he)}function Bn(De){return De=(De||"").toLowerCase(),he[De]||he[Ie[De]]}function kr(De,{languageName:pt}){typeof De=="string"&&(De=[De]),De.forEach(jt=>{Ie[jt.toLowerCase()]=pt})}function js(De){const pt=Bn(De);return pt&&!pt.disableAutodetect}function zs(De){De["before:highlightBlock"]&&!De["before:highlightElement"]&&(De["before:highlightElement"]=pt=>{De["before:highlightBlock"](Object.assign({block:pt.el},pt))}),De["after:highlightBlock"]&&!De["after:highlightElement"]&&(De["after:highlightElement"]=pt=>{De["after:highlightBlock"](Object.assign({block:pt.el},pt))})}function Un(De){zs(De),tt.push(De)}function mf(De){const pt=tt.indexOf(De);pt!==-1&&tt.splice(pt,1)}function Io(De,pt){const jt=De;tt.forEach(function(sn){sn[jt]&&sn[jt](pt)})}function Qi(De){return J("10.7.0","highlightBlock will be removed entirely in v12.0"),J("10.7.0","Please use highlightElement now."),It(De)}Object.assign(X,{highlight:Pe,highlightAuto:qt,highlightAll:tr,highlightElement:It,highlightBlock:Qi,configure:ut,initHighlighting:kn,initHighlightingOnLoad:Yn,registerLanguage:Sn,unregisterLanguage:Hr,listLanguages:ji,getLanguage:Bn,registerAliases:kr,autoDetection:js,inherit:He,addPlugin:Un,removePlugin:mf}),X.debugMode=function(){_t=!1},X.safeMode=function(){_t=!0},X.versionString=rt,X.regex={concat:S,lookahead:b,either:R,optional:k,anyNumberOfTimes:y};for(const De in we)typeof we[De]=="object"&&e(we[De]);return Object.assign(X,we),X},ot=Tt({});return ot.newInstance=()=>Tt({}),wy=ot,ot.HighlightJS=ot,ot.default=ot,wy}var vee=yee();const xee=qc(vee),xC={},kee="hljs-";function See(e){const t=xee.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:s,register:a,registerAlias:l,registered:c};function n(d,f,h){const m=h||xC,b=typeof m.prefix=="string"?m.prefix:kee;if(!t.getLanguage(d))throw new Error("Unknown language: `"+d+"` is not registered");t.configure({__emitter:wee,classPrefix:b});const y=t.highlight(f,{ignoreIllegals:!0,language:d});if(y.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:y.errorRaised});const k=y._emitter.root,S=k.data;return S.language=y.language,S.relevance=y.relevance,k}function r(d,f){const m=(f||xC).subset||s();let b=-1,y=0,k;for(;++b<m.length;){const S=m[b];if(!t.getLanguage(S))continue;const T=n(S,d,f);T.data&&T.data.relevance!==void 0&&T.data.relevance>y&&(y=T.data.relevance,k=T)}return k||{type:"root",children:[],data:{language:void 0,relevance:y}}}function s(){return t.listLanguages()}function a(d,f){if(typeof d=="string")t.registerLanguage(d,f);else{let h;for(h in d)Object.hasOwn(d,h)&&t.registerLanguage(h,d[h])}}function l(d,f){if(typeof d=="string")t.registerAliases(typeof f=="string"?f:[...f],{languageName:d});else{let h;for(h in d)if(Object.hasOwn(d,h)){const m=d[h];t.registerAliases(typeof m=="string"?m:[...m],{languageName:h})}}}function c(d){return!!t.getLanguage(d)}}class wee{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 Eee={};function Tee(e){const t=e||Eee,n=t.aliases,r=t.detect||!1,s=t.languages||bee,a=t.plainText,l=t.prefix,c=t.subset;let d="hljs";const f=See(s);if(n&&f.registerAlias(n),l){const h=l.indexOf("-");d=h===-1?l:l.slice(0,h)}return function(h,m){um(h,"element",function(b,y,k){if(b.tagName!=="code"||!k||k.type!=="element"||k.tagName!=="pre")return;const S=Ree(b);if(S===!1||!S&&!r||S&&a&&a.includes(S))return;Array.isArray(b.properties.className)||(b.properties.className=[]),b.properties.className.includes(d)||b.properties.className.unshift(d);const T=qQ(b,{whitespace:"pre"});let R;try{R=S?f.highlight(S,T,{prefix:l}):f.highlightAuto(T,{prefix:l,subset:c})}catch(E){const _=E;if(S&&/Unknown language/.test(_.message)){m.message("Cannot highlight as `"+S+"`, it’s not registered",{ancestors:[k,b],cause:_,place:b.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw _}!S&&R.data&&R.data.language&&b.properties.className.push("language-"+R.data.language),R.children.length>0&&(b.children=R.children)})}}function Ree(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 kC(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 Cee(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function _ee(e,t,n){const s=ff((n||{}).ignore||[]),a=Aee(t);let l=-1;for(;++l<a.length;)h2(e,"text",c);function c(f,h){let m=-1,b;for(;++m<h.length;){const y=h[m],k=b?b.children:void 0;if(s(y,k?k.indexOf(y):void 0,b))return;b=y}if(b)return d(f,h)}function d(f,h){const m=h[h.length-1],b=a[l][0],y=a[l][1];let k=0;const T=m.children.indexOf(f);let R=!1,E=[];b.lastIndex=0;let _=b.exec(f.value);for(;_;){const C=_.index,D={index:_.index,input:_.input,stack:[...h,f]};let N=y(..._,D);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?b.lastIndex=C+1:(k!==C&&E.push({type:"text",value:f.value.slice(k,C)}),Array.isArray(N)?E.push(...N):N&&E.push(N),k=C+_[0].length,R=!0),!b.global)break;_=b.exec(f.value)}return R?(k<f.value.length&&E.push({type:"text",value:f.value.slice(k)}),m.children.splice(T,1,...E)):E=[f],T+E.length}}function Aee(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([Nee(s[0]),Oee(s[1])])}return t}function Nee(e){return typeof e=="string"?new RegExp(Cee(e),"g"):e}function Oee(e){return typeof e=="function"?e:function(){return e}}const Ey="phrasing",Ty=["autolink","link","image","label"];function Iee(){return{transforms:[$ee],enter:{literalAutolink:Dee,literalAutolinkEmail:Ry,literalAutolinkHttp:Ry,literalAutolinkWww:Ry},exit:{literalAutolink:Pee,literalAutolinkEmail:zee,literalAutolinkHttp:Lee,literalAutolinkWww:jee}}}function Mee(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ey,notInConstruct:Ty},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ey,notInConstruct:Ty},{character:":",before:"[ps]",after:"\\/",inConstruct:Ey,notInConstruct:Ty}]}}function Dee(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ry(e){this.config.enter.autolinkProtocol.call(this,e)}function Lee(e){this.config.exit.autolinkProtocol.call(this,e)}function jee(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 zee(e){this.config.exit.autolinkEmail.call(this,e)}function Pee(e){this.exit(e)}function $ee(e){_ee(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Fee],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Bee]],{ignore:["link","linkReference"]})}function Fee(e,t,n,r,s){let a="";if(!z2(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!Uee(n)))return!1;const l=Hee(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 Bee(e,t,n,r){return!z2(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Uee(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 Hee(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=kC(e,"(");let a=kC(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 z2(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ha(n)||sm(n))&&(!t||n!==47)}P2.peek=Qee;function qee(){this.buffer()}function Vee(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Gee(){this.buffer()}function Wee(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Kee(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ni(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Yee(e){this.exit(e)}function Xee(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ni(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Zee(e){this.exit(e)}function Qee(){return"["}function P2(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 Jee(){return{enter:{gfmFootnoteCallString:qee,gfmFootnoteCall:Vee,gfmFootnoteDefinitionLabelString:Gee,gfmFootnoteDefinition:Wee},exit:{gfmFootnoteCallString:Kee,gfmFootnoteCall:Yee,gfmFootnoteDefinitionLabelString:Xee,gfmFootnoteDefinition:Zee}}}function ete(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:P2},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,l){const c=a.createTracker(l);let d=c.move("[^");const f=a.enter("footnoteDefinition"),h=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),h(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
46
|
+
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?$2:tte))),f(),d}}function tte(e,t,n){return t===0?e:$2(e,t,n)}function $2(e,t,n){return(n?"":" ")+e}const nte=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];F2.peek=ate;function rte(){return{canContainEols:["delete"],enter:{strikethrough:ste},exit:{strikethrough:ote}}}function ite(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:nte}],handlers:{delete:F2}}}function ste(e){this.enter({type:"delete",children:[]},e)}function ote(e){this.exit(e)}function F2(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 ate(){return"~"}function lte(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||cte,s=[],a=[],l=[],c=[];let d=0,f=-1;for(;++f<e.length;){const k=[],S=[];let T=-1;for(e[f].length>d&&(d=e[f].length);++T<e[f].length;){const R=ute(e[f][T]);if(t.alignDelimiters!==!1){const E=r(R);S[T]=E,(c[T]===void 0||E>c[T])&&(c[T]=E)}k.push(R)}a[f]=k,l[f]=S}let h=-1;if(typeof n=="object"&&"length"in n)for(;++h<d;)s[h]=SC(n[h]);else{const k=SC(n);for(;++h<d;)s[h]=k}h=-1;const m=[],b=[];for(;++h<d;){const k=s[h];let S="",T="";k===99?(S=":",T=":"):k===108?S=":":k===114&&(T=":");let R=t.alignDelimiters===!1?1:Math.max(1,c[h]-S.length-T.length);const E=S+"-".repeat(R)+T;t.alignDelimiters!==!1&&(R=S.length+R+T.length,R>c[h]&&(c[h]=R),b[h]=R),m[h]=E}a.splice(1,0,m),l.splice(1,0,b),f=-1;const y=[];for(;++f<a.length;){const k=a[f],S=l[f];h=-1;const T=[];for(;++h<d;){const R=k[h]||"";let E="",_="";if(t.alignDelimiters!==!1){const C=c[h]-(S[h]||0),D=s[h];D===114?E=" ".repeat(C):D===99?C%2?(E=" ".repeat(C/2+.5),_=" ".repeat(C/2-.5)):(E=" ".repeat(C/2),_=E):_=" ".repeat(C)}t.delimiterStart!==!1&&!h&&T.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&R==="")&&(t.delimiterStart!==!1||h)&&T.push(" "),t.alignDelimiters!==!1&&T.push(E),T.push(R),t.alignDelimiters!==!1&&T.push(_),t.padding!==!1&&T.push(" "),(t.delimiterEnd!==!1||h!==d-1)&&T.push("|")}y.push(t.delimiterEnd===!1?T.join("").replace(/ +$/,""):T.join(""))}return y.join(`
|
|
47
|
+
`)}function ute(e){return e==null?"":String(e)}function cte(e){return e.length}function SC(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 fte(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()),dte);return s(),l}function dte(e,t,n){return">"+(n?"":" ")+e}function pte(e,t){return wC(e,t.inConstruct,!0)&&!wC(e,t.notInConstruct,!1)}function wC(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 EC(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
48
|
+
`&&pte(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
49
|
+
`}function hte(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 mte(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 gte(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 bte(e,t,n,r){const s=gte(n),a=e.value||"",l=s==="`"?"GraveAccent":"Tilde";if(mte(e,n)){const m=n.enter("codeIndented"),b=n.indentLines(a,yte);return m(),b}const c=n.createTracker(r),d=s.repeat(Math.max(hte(a,s)+1,3)),f=n.enter("codeFenced");let h=c.move(d);if(e.lang){const m=n.enter(`codeFencedLang${l}`);h+=c.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...c.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${l}`);h+=c.move(" "),h+=c.move(n.safe(e.meta,{before:h,after:`
|
|
50
|
+
`,encode:["`"],...c.current()})),m()}return h+=c.move(`
|
|
51
|
+
`),a&&(h+=c.move(a+`
|
|
52
|
+
`)),h+=c.move(d),f(),h}function yte(e,t,n){return(n?"":" ")+e}function Ox(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 vte(e,t,n,r){const s=Ox(n),a=s==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),{before:f,after:"]",...d.current()})),f+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":`
|
|
53
|
+
`,...d.current()}))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,{before:f,after:s,...d.current()})),f+=d.move(s),c()),l(),f}function xte(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 Uc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ph(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}}B2.peek=kte;function B2(e,t,n,r){const s=xte(n),a=n.enter("emphasis"),l=n.createTracker(r),c=l.move(s);let d=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const f=d.charCodeAt(0),h=ph(r.before.charCodeAt(r.before.length-1),f,s);h.inside&&(d=Uc(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=ph(r.after.charCodeAt(0),m,s);b.inside&&(d=d.slice(0,-1)+Uc(m));const y=l.move(s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:h.outside},c+d+y}function kte(e,t,n){return n.options.emphasis||"*"}function Ste(e,t){let n=!1;return um(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,_v}),!!((!e.depth||e.depth<3)&&kx(e)&&(t.options.setext||n))}function wte(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Ste(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"),d=n.enter("phrasing");a.move(l+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
|
|
58
|
+
`,...a.current()});return/^[\t ]/.test(f)&&(f=Uc(f.charCodeAt(0))+f.slice(1)),f=f?l+" "+f:l,n.options.closeAtx&&(f+=" "+l),d(),c(),f}U2.peek=Ete;function U2(e){return e.value||""}function Ete(){return"<"}H2.peek=Tte;function H2(e,t,n,r){const s=Ox(n),a=s==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,{before:f,after:"]",...d.current()})),f+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":")",...d.current()}))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,{before:f,after:s,...d.current()})),f+=d.move(s),c()),f+=d.move(")"),l(),f}function Tte(){return"!"}q2.peek=Rte;function q2(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const f=n.safe(e.alt,{before:d,after:"]",...c.current()});d+=c.move(f+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return l(),n.stack=h,a(),s==="full"||!f||f!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function Rte(){return"!"}V2.peek=Cte;function V2(e,t,n){let r=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const l=n.unsafe[a],c=n.compilePattern(l);let d;if(l.atBreak)for(;d=c.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return s+r+s}function Cte(){return"`"}function G2(e,t){const n=kx(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))}W2.peek=_te;function W2(e,t,n,r){const s=Ox(n),a=s==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,d;if(G2(e,n)){const h=n.stack;n.stack=[],c=n.enter("autolink");let m=l.move("<");return m+=l.move(n.containerPhrasing(e,{before:m,after:">",...l.current()})),m+=l.move(">"),c(),n.stack=h,m}c=n.enter("link"),d=n.enter("label");let f=l.move("[");return f+=l.move(n.containerPhrasing(e,{before:f,after:"](",...l.current()})),f+=l.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=l.move("<"),f+=l.move(n.safe(e.url,{before:f,after:">",...l.current()})),f+=l.move(">")):(d=n.enter("destinationRaw"),f+=l.move(n.safe(e.url,{before:f,after:e.title?" ":")",...l.current()}))),d(),e.title&&(d=n.enter(`title${a}`),f+=l.move(" "+s),f+=l.move(n.safe(e.title,{before:f,after:s,...l.current()})),f+=l.move(s),d()),f+=l.move(")"),c(),f}function _te(e,t,n){return G2(e,n)?"<":"["}K2.peek=Ate;function K2(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const f=n.containerPhrasing(e,{before:d,after:"]",...c.current()});d+=c.move(f+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return l(),n.stack=h,a(),s==="full"||!f||f!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function Ate(){return"["}function Ix(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 Nte(e){const t=Ix(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 Ote(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 Y2(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 Ite(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let l=e.ordered?Ote(n):Ix(n);const c=e.ordered?l==="."?")":".":Nte(n);let d=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),Y2(n)===l&&h){let m=-1;for(;++m<e.children.length;){const b=e.children[m];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(l=c),n.bulletCurrent=l;const f=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=a,s(),f}function Mte(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 Dte(e,t,n,r){const s=Mte(n);let a=n.bulletCurrent||Ix(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let l=a.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(l-a.length)),c.shift(l);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.current()),h);return d(),f;function h(m,b,y){return b?(y?"":" ".repeat(l))+m:(y?a:a+" ".repeat(l-a.length))+m}}function Lte(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),l=n.containerPhrasing(e,r);return a(),s(),l}const jte=ff(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function zte(e,t,n,r){return(e.children.some(function(l){return jte(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Pte(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}X2.peek=$te;function X2(e,t,n,r){const s=Pte(n),a=n.enter("strong"),l=n.createTracker(r),c=l.move(s+s);let d=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const f=d.charCodeAt(0),h=ph(r.before.charCodeAt(r.before.length-1),f,s);h.inside&&(d=Uc(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=ph(r.after.charCodeAt(0),m,s);b.inside&&(d=d.slice(0,-1)+Uc(m));const y=l.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:h.outside},c+d+y}function $te(e,t,n){return n.options.strong||"*"}function Fte(e,t,n,r){return n.safe(e.value,r)}function Bte(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 Ute(e,t,n){const r=(Y2(n)+(n.options.ruleSpaces?" ":"")).repeat(Bte(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Z2={blockquote:fte,break:EC,code:bte,definition:vte,emphasis:B2,hardBreak:EC,heading:wte,html:U2,image:H2,imageReference:q2,inlineCode:V2,link:W2,linkReference:K2,list:Ite,listItem:Dte,paragraph:Lte,root:zte,strong:X2,text:Fte,thematicBreak:Ute};function Hte(){return{enter:{table:qte,tableData:TC,tableHeader:TC,tableRow:Gte},exit:{codeText:Wte,table:Vte,tableData:Cy,tableHeader:Cy,tableRow:Cy}}}function qte(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 Vte(e){this.exit(e),this.data.inTable=void 0}function Gte(e){this.enter({type:"tableRow",children:[]},e)}function Cy(e){this.exit(e)}function TC(e){this.enter({type:"tableCell",children:[]},e)}function Wte(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Kte));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Kte(e,t){return t==="|"?t:e}function Yte(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:d,tableRow:c}};function l(y,k,S,T){return f(h(y,S,T),y.align)}function c(y,k,S,T){const R=m(y,S,T),E=f([R]);return E.slice(0,E.indexOf(`
|
|
60
|
+
`))}function d(y,k,S,T){const R=S.enter("tableCell"),E=S.enter("phrasing"),_=S.containerPhrasing(y,{...T,before:a,after:a});return E(),R(),_}function f(y,k){return lte(y,{align:k,alignDelimiters:r,padding:n,stringLength:s})}function h(y,k,S){const T=y.children;let R=-1;const E=[],_=k.enter("table");for(;++R<T.length;)E[R]=m(T[R],k,S);return _(),E}function m(y,k,S){const T=y.children;let R=-1;const E=[],_=k.enter("tableRow");for(;++R<T.length;)E[R]=d(T[R],y,k,S);return _(),E}function b(y,k,S){let T=Z2.inlineCode(y,k,S);return S.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function Xte(){return{exit:{taskListCheckValueChecked:RC,taskListCheckValueUnchecked:RC,paragraph:Qte}}}function Zte(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Jte}}}function RC(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Qte(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 Jte(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(l);let d=Z2.listItem(e,t,n,{...r,...c.current()});return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(h){return h+l}}function ene(){return[Iee(),Jee(),rte(),Hte(),Xte()]}function tne(e){return{extensions:[Mee(),ete(e),ite(),Yte(e),Zte()]}}const nne={tokenize:lne,partial:!0},Q2={tokenize:une,partial:!0},J2={tokenize:cne,partial:!0},eD={tokenize:fne,partial:!0},rne={tokenize:dne,partial:!0},tD={name:"wwwAutolink",tokenize:one,previous:rD},nD={name:"protocolAutolink",tokenize:ane,previous:iD},Ls={name:"emailAutolink",tokenize:sne,previous:sD},Zi={};function ine(){return{text:Zi}}let Qo=48;for(;Qo<123;)Zi[Qo]=Ls,Qo++,Qo===58?Qo=65:Qo===91&&(Qo=97);Zi[43]=Ls;Zi[45]=Ls;Zi[46]=Ls;Zi[95]=Ls;Zi[72]=[Ls,nD];Zi[104]=[Ls,nD];Zi[87]=[Ls,tD];Zi[119]=[Ls,tD];function sne(e,t,n){const r=this;let s,a;return l;function l(m){return!Mv(m)||!sD.call(r,r.previous)||Mx(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return Mv(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(rne,h,f)(m):m===45||m===95||br(m)?(a=!0,e.consume(m),d):h(m)}function f(m){return e.consume(m),s=!0,d}function h(m){return a&&s&&Rr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function one(e,t,n){const r=this;return s;function s(l){return l!==87&&l!==119||!rD.call(r,r.previous)||Mx(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(nne,e.attempt(Q2,e.attempt(J2,a),n),n)(l))}function a(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function ane(e,t,n){const r=this;let s="",a=!1;return l;function l(m){return(m===72||m===104)&&iD.call(r,r.previous)&&!Mx(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(Rr(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const b=s.toLowerCase();if(b==="http"||b==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),a?f:(a=!0,d)):n(m)}function f(m){return m===null||lh(m)||xn(m)||ha(m)||sm(m)?n(m):e.attempt(Q2,e.attempt(J2,h),n)(m)}function h(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function lne(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 une(e,t,n){let r,s,a;return l;function l(f){return f===46||f===95?e.check(eD,d,c)(f):f===null||xn(f)||ha(f)||f!==45&&sm(f)?d(f):(a=!0,e.consume(f),l)}function c(f){return f===95?r=!0:(s=r,r=void 0),e.consume(f),l}function d(f){return s||r||!a?n(f):t(f)}}function cne(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(eD,t,a)(l):l===null||xn(l)||ha(l)?t(l):(e.consume(l),s)}function a(l){return l===41&&r++,e.consume(l),s}}function fne(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||xn(c)||ha(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||xn(c)||ha(c)?t(c):r(c)}function a(c){return Rr(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),r):Rr(c)?(e.consume(c),l):n(c)}}function dne(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return br(a)?n(a):t(a)}}function rD(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||xn(e)}function iD(e){return!Rr(e)}function sD(e){return!(e===47||Mv(e))}function Mv(e){return e===43||e===45||e===46||e===95||br(e)}function Mx(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 pne={tokenize:kne,partial:!0};function hne(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:yne,continuation:{tokenize:vne},exit:xne}},text:{91:{name:"gfmFootnoteCall",tokenize:bne},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:mne,resolveTo:gne}}}}function mne(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;s--;){const d=r.events[s][1];if(d.type==="labelImage"){l=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!l||!l._balanced)return n(d);const f=Ni(r.sliceSerialize({start:l.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function gne(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 bne(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,l;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!l||m===null||m===91||xn(m))return n(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(Ni(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return xn(m)||(l=!0),a++,e.consume(m),m===92?h:f}function h(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function yne(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,c;return d;function d(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(k)}function h(k){if(l>999||k===93&&!c||k===null||k===91||xn(k))return n(k);if(k===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=Ni(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return xn(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),Qt(e,y,"gfmFootnoteDefinitionWhitespace")):n(k)}function y(k){return t(k)}}function vne(e,t,n){return e.check(cf,t,e.attempt(pne,t,n))}function xne(e){e.exit("gfmFootnoteDefinition")}function kne(e,t,n){const r=this;return Qt(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 Sne(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(l,c){let d=-1;for(;++d<l.length;)if(l[d][0]==="enter"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._close){let f=d;for(;f--;)if(l[f][0]==="exit"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._open&&l[d][1].end.offset-l[d][1].start.offset===l[f][1].end.offset-l[f][1].start.offset){l[d][1].type="strikethroughSequence",l[f][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},l[f][1].start),end:Object.assign({},l[d][1].end)},m={type:"strikethroughText",start:Object.assign({},l[f][1].end),end:Object.assign({},l[d][1].start)},b=[["enter",h,c],["enter",l[f][1],c],["exit",l[f][1],c],["enter",m,c]],y=c.parser.constructs.insideSpan.null;y&&ii(b,b.length,0,om(y,l.slice(f+1,d),c)),ii(b,b.length,0,[["exit",m,c],["enter",l[d][1],c],["exit",l[d][1],c],["exit",h,c]]),ii(l,f-1,d-f+3,b),d=f+b.length-2;break}}for(d=-1;++d<l.length;)l[d][1].type==="strikethroughSequenceTemporary"&&(l[d][1].type="data");return l}function a(l,c,d){const f=this.previous,h=this.events;let m=0;return b;function b(k){return f===126&&h[h.length-1][1].type!=="characterEscape"?d(k):(l.enter("strikethroughSequenceTemporary"),y(k))}function y(k){const S=zl(f);if(k===126)return m>1?d(k):(l.consume(k),m++,y);if(m<2&&!n)return d(k);const T=l.exit("strikethroughSequenceTemporary"),R=zl(k);return T._open=!R||R===2&&!!S,T._close=!S||S===2&&!!R,c(k)}}}class wne{constructor(){this.map=[]}add(t,n,r){Ene(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 Ene(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 Tne(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 Rne(){return{flow:{null:{name:"table",tokenize:Cne,resolveAll:_ne}}}}function Cne(e,t,n){const r=this;let s=0,a=0,l;return c;function c(A){let K=r.events.length-1;for(;K>-1;){const z=r.events[K][1].type;if(z==="lineEnding"||z==="linePrefix")K--;else break}const $=K>-1?r.events[K][1].type:null,F=$==="tableHead"||$==="tableRow"?N:d;return F===N&&r.parser.lazy[r.now().line]?n(A):F(A)}function d(A){return e.enter("tableHead"),e.enter("tableRow"),f(A)}function f(A){return A===124||(l=!0,a+=1),h(A)}function h(A){return A===null?n(A):St(A)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),y):n(A):Ut(A)?Qt(e,h,"whitespace")(A):(a+=1,l&&(l=!1,s+=1),A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),l=!0,h):(e.enter("data"),m(A)))}function m(A){return A===null||A===124||xn(A)?(e.exit("data"),h(A)):(e.consume(A),A===92?b:m)}function b(A){return A===92||A===124?(e.consume(A),m):m(A)}function y(A){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(A):(e.enter("tableDelimiterRow"),l=!1,Ut(A)?Qt(e,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):k(A))}function k(A){return A===45||A===58?T(A):A===124?(l=!0,e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),S):D(A)}function S(A){return Ut(A)?Qt(e,T,"whitespace")(A):T(A)}function T(A){return A===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),R):A===45?(a+=1,R(A)):A===null||St(A)?C(A):D(A)}function R(A){return A===45?(e.enter("tableDelimiterFiller"),E(A)):D(A)}function E(A){return A===45?(e.consume(A),E):A===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),_):(e.exit("tableDelimiterFiller"),_(A))}function _(A){return Ut(A)?Qt(e,C,"whitespace")(A):C(A)}function C(A){return A===124?k(A):A===null||St(A)?!l||s!==a?D(A):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(A)):D(A)}function D(A){return n(A)}function N(A){return e.enter("tableRow"),M(A)}function M(A){return A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),M):A===null||St(A)?(e.exit("tableRow"),t(A)):Ut(A)?Qt(e,M,"whitespace")(A):(e.enter("data"),B(A))}function B(A){return A===null||A===124||xn(A)?(e.exit("data"),M(A)):(e.consume(A),A===92?P:B)}function P(A){return A===92||A===124?(e.consume(A),B):B(A)}}function _ne(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],l=[0,0,0,0],c=!1,d=0,f,h,m;const b=new wne;for(;++n<e.length;){const y=e[n],k=y[1];y[0]==="enter"?k.type==="tableHead"?(c=!1,d!==0&&(CC(b,t,d,f,h),h=void 0,d=0),f={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(n,0,[["enter",f,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,h={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(n,0,[["enter",h,t]])),s=k.type==="tableDelimiterRow"?2:h?3:1):s&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(a[1]!==0&&(l[0]=l[1],m=cp(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=cp(b,t,a,s,void 0,m)),a=l,l=[a[1],n,0,0])):k.type==="tableHead"?(c=!0,d=n):k.type==="tableRow"||k.type==="tableDelimiterRow"?(d=n,a[1]!==0?(l[0]=l[1],m=cp(b,t,a,s,n,m)):l[1]!==0&&(m=cp(b,t,l,s,n,m)),s=0):s&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(l[3]=n)}for(d!==0&&CC(b,t,d,f,h),b.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=Tne(t.events,n))}return e}function cp(e,t,n,r,s,a){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},gl(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=gl(t.events,n[1]);if(a={type:l,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=gl(t.events,n[2]),h=gl(t.events,n[3]),m={type:c,start:Object.assign({},f),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const b=t.events[n[2]],y=t.events[n[3]];if(b[1].end=Object.assign({},y[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const k=n[2]+1,S=n[3]-n[2]-1;e.add(k,S,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},gl(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function CC(e,t,n,r,s){const a=[],l=gl(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 gl(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Ane={name:"tasklistCheck",tokenize:One};function Nne(){return{text:{91:Ane}}}function One(e,t,n){const r=this;return s;function s(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return xn(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return St(d)?t(d):Ut(d)?e.check({tokenize:Ine},t,n)(d):n(d)}}function Ine(e,t,n){return Qt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function Mne(e){return YM([ine(),hne(),Sne(e),Rne(),Nne()])}const Dne={};function Lne(e){const t=this,n=e||Dne,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(Mne(n)),a.push(ene()),l.push(tne(n))}function jne(e){return g.jsx("div",{className:"md-table-wrap",children:g.jsx("table",{...e})})}function oD(e){return g.jsx("span",{className:"md-cell",children:e})}function zne({children:e,...t}){return g.jsx("th",{...t,children:oD(e)})}function Pne({children:e,...t}){return g.jsx("td",{...t,children:oD(e)})}function Dv(e){return e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(Dv).join(""):v.isValidElement(e)?Dv(e.props.children):""}function $ne({children:e,...t}){const[n,r]=v.useState(!1),s=v.useRef(void 0),a=v.useCallback(()=>{navigator.clipboard.writeText(Dv(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(vr,{icon:n?"check":"copy",size:"sm",variant:"ghost","aria-label":n?"Copied":"Copy code",onClick:a})})]})}const Fne={table:jne,th:zne,td:Pne,pre:$ne,a:pa},Pl=v.memo(function({text:t,className:n}){return g.jsx("div",{className:n?`md ${n}`:"md",children:g.jsx(MQ,{remarkPlugins:[Lne],rehypePlugins:[[Tee,{detect:!1}]],components:Fne,children:t??""})})});function Bne(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 pf(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 Ta({status:e}){const t=Bne(e);return g.jsx(Ht,{name:t.name,color:t.color,...t.modifier?{modifier:t.modifier}:{}})}function Une({callId:e}){return g.jsxs("div",{className:"approval-bar",children:[g.jsx("span",{children:"Awaiting human approval"}),g.jsx(yn,{variant:"secondary",tone:"success",size:"sm",onClick:()=>{Ye.submitApproval(e,"approve")},children:"Approve"}),g.jsx(yn,{variant:"secondary",tone:"danger",size:"sm",onClick:()=>{Ye.submitApproval(e,"deny")},children:"Deny"})]})}function Hne({callId:e,authUrl:t,connection:n}){return g.jsxs("div",{className:"approval-bar",children:[g.jsxs("span",{children:["Connect ",n]}),g.jsx(yn,{variant:"secondary",tone:"success",size:"sm",onClick:()=>window.open(t,"_blank","noopener,noreferrer"),children:"Connect"}),g.jsx(yn,{variant:"secondary",size:"sm",onClick:()=>{Ye.submitAuth(e,"approve")},children:"Connected"}),g.jsx(yn,{variant:"secondary",tone:"danger",size:"sm",onClick:()=>{Ye.submitAuth(e,"deny")},children:"Cancel"})]})}function hf({item:e}){const t=$e(r=>r.capabilities.approvals),n=$e(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(Une,{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(Hne,{callId:e.callId,authUrl:e.authUrl,connection:e.connection})}function Dx(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 aD=new Map;for(const[e,t]of Object.entries(VW)){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&&aD.set(s,t.default)}function qne(e){return e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.command=="string"?e.command:typeof e=="string"?e:""}function _C(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 Vne(e){const t=_C(e.outputRaw);if(t)return t;if(e.output)try{return _C(JSON.parse(e.output))}catch{}return null}function AC(e){return e.replace(/[\s\uFEFF\u00A0]+$/,"")}const Gne=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=pf(t),a=qne(t.args),l=Vne(t),c=AC(l?.stdout??""),d=AC(l?.stderr??""),f=l?.exitCode!=null&&l.exitCode!==0,h=t.status==="done"&&f?"error":t.status,m=[a?ti(a,80):"shell"];return f&&m.push(`exit ${l?.exitCode}`),m.push(Mi(s)),g.jsxs("div",{className:`pg-tool pg-shell ${h}`,children:[g.jsxs(vi,{action:"shell",details:m.join(" · "),leadingIcon:g.jsx(Ta,{status:h}),open:n,onOpenChange:b=>r(b),tabularNums:!0,children:[a?g.jsx("pre",{className:"shell-cmd",children:a}):null,c?g.jsx("pre",{className:"shell-std",children:c}):null,d?g.jsx("pre",{className:"shell-std shell-err",children:d}):null,!c&&!d?g.jsx("div",{className:"shell-empty",children:l?`Exited ${l.exitCode??0} with no output.`:t.output??"running…"}):null]}),g.jsx(hf,{item:t})]})}),Wne=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=pf(t),a=Tl(Dx(t.args),"path"),l=Kne(t),c=[a?sG(a,80):"read",Mi(s)];return g.jsxs("div",{className:`pg-tool pg-read ${t.status}`,children:[g.jsxs(vi,{action:"read",details:c.join(" · "),leadingIcon:g.jsx(Ta,{status:t.status}),open:n,onOpenChange:d=>r(d),tabularNums:!0,children:[a?g.jsx("pre",{className:"tool-primary",children:a}):null,l!=null?l?g.jsx("pre",{className:"tool-body",children:l}):g.jsx("div",{className:"tool-empty",children:"(empty file)"}):g.jsx("div",{className:"out",children:t.output??"running…"})]}),g.jsx(hf,{item:t})]})});function Kne(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){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 Yne=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=pf(t),a=Dx(t.args),l=Tl(a,"glob_pattern","globPattern"),c=Tl(a,"target_directory","targetDirectory"),d=Xne(t),f=[l?ti(l,80):"glob",Mi(s)];return g.jsxs("div",{className:`pg-tool pg-glob ${t.status}`,children:[g.jsxs(vi,{action:"glob",details:f.join(" · "),leadingIcon:g.jsx(Ta,{status:t.status}),open:n,onOpenChange:h=>r(h),tabularNums:!0,children:[l?g.jsx("pre",{className:"tool-primary",children:l}):null,c?g.jsx("pre",{className:"tool-meta",children:c}):null,d!=null?d.length>0?g.jsx("pre",{className:"tool-body",children:d.join(`
|
|
61
|
+
`)}):g.jsx("div",{className:"tool-empty",children:"(no matches)"}):g.jsx("div",{className:"out",children:t.output??"running…"})]}),g.jsx(hf,{item:t})]})});function Xne(e){const t=OC(e.outputRaw);if(t!=null)return t;if(e.output)try{return OC(JSON.parse(e.output))}catch{}return null}function OC(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 Zne=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=pf(t),a=Dx(t.args),l=Tl(a,"pattern"),c=Tl(a,"path"),d=Tl(a,"glob"),f=[l?ti(l,80):"grep",Mi(s)],h=[c,d?`glob ${d}`:""].filter(Boolean).join(`
|
|
62
|
+
`);return g.jsxs("div",{className:`pg-tool pg-grep ${t.status}`,children:[g.jsxs(vi,{action:"grep",details:f.join(" · "),leadingIcon:g.jsx(Ta,{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(hf,{item:t})]})}),Qne=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(vi,{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(vi,{action:"Thought",defaultOpen:!1,tone:"muted",children:g.jsx(Pl,{text:t,className:"body"})})})}),Jne=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(Qne,{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(Ta,{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 ere(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 tre=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),d=t.status==="running",f=c?ti(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(Ta,{status:t.status})}),g.jsxs("span",{className:"pg-subagent-titles",children:[g.jsx("span",{className:d?"pg-subagent-title shimmer":"pg-subagent-title",children:f}),g.jsxs("span",{className:"pg-subagent-subtitle",children:[ere(t,n)," · ",l]})]}),g.jsx("span",{className:s?"pg-subagent-chevron open":"pg-subagent-chevron",children:g.jsx(Ht,{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(Jne,{child:h},h.id)):g.jsx("div",{className:"pg-subagent-empty",children:t.output??"running…"})})})]})});function nre(e){if(e==null)return"";if(typeof e=="string")return ti(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 ti(n,80)}}return Pn(e,120)}const rre=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=pf(t),a=nre(t.args),l=Mi(s);return g.jsxs("div",{className:`pg-tool ${t.status}`,children:[g.jsx(vi,{action:t.name,details:a?`${a} · ${l}`:l,leadingIcon:g.jsx(Ta,{status:t.status}),open:n,onOpenChange:c=>r(c),tabularNums:!0,children:g.jsx("div",{className:"out",children:t.output??"running…"})}),g.jsx(hf,{item:t})]})}),ire={shell:e=>g.jsx(Gne,{item:e}),read:e=>g.jsx(Wne,{item:e}),glob:e=>g.jsx(Yne,{item:e}),grep:e=>g.jsx(Zne,{item:e})};function sre(e){return e.name.startsWith("subagent:")}const ore=v.memo(function({item:t}){if(sre(t))return g.jsx(tre,{item:t});const n=aD.get(t.name);if(n)return g.jsx(n,{item:t});const r=ire[t.name];return r?r(t):g.jsx(rre,{item:t})}),IC=120,are=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>IC)};m();const b=new ResizeObserver(m);return b.observe(h),()=>b.disconnect()},[t]);const c=s&&!n,d=()=>{s&&r(h=>!h)},f=h=>{s&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),d())};return g.jsx("div",{className:"msg user",children:g.jsx("div",{ref:l,className:c?"bubble furled":s?"bubble expandable":"bubble",style:c?{maxHeight:IC}:void 0,role:s?"button":void 0,tabIndex:s?0:void 0,"aria-expanded":s?n:void 0,"aria-label":s?n?"Collapse message":"Expand message":void 0,onClick:s?d:void 0,onKeyDown:s?f:void 0,children:t})})});function lre(){return g.jsx("div",{className:"msg user",children:g.jsx("div",{className:"bubble withheld",children:"Prompt hidden"})})}const ure=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"})})}),cre=v.memo(function({text:t,open:n}){const[r,s]=v.useState(!1);return n?g.jsx("div",{className:"pg-reasoning",children:g.jsx(vi,{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(vi,{action:"Thought",defaultOpen:!1,tone:"muted",children:g.jsx(Pl,{text:t,className:"body"})})})}),fre=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 Sc(e){switch(e.kind){case"user":return e.hidden===!0?g.jsx(lre,{},e.id):g.jsx(are,{text:e.text},e.id);case"assistant":return g.jsx(ure,{text:e.text,streaming:e.streaming},e.id);case"reasoning":return g.jsx(cre,{text:e.text,open:e.open},e.id);case"tool":return g.jsx(ore,{item:e},e.id);case"divider":return g.jsx(fre,{text:e.text,fail:e.fail,url:e.url},e.id);case"artifact":return g.jsx(DW,{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 MC(e){return e.kind==="tool"&&e.name.startsWith("subagent:")}function dre({steps:e,cards:t,final:n,marker:r,isLatest:s}){const[a,l]=v.useState(void 0),c=a??s,d=[];(r.inTokens!==void 0||r.outTokens!==void 0)&&d.push(`${oh(r.inTokens)} in · ${oh(r.outTokens)} out tokens`);const f=d.length>0?d.join(" · "):void 0;return g.jsxs(g.Fragment,{children:[e.length>0?g.jsx("div",{className:"pg-turn-group",title:f,children:g.jsx(vi,{action:"Worked",details:r.ms!==null?`for ${fx(r.ms)}`:void 0,open:c,onOpenChange:l,tabularNums:!0,tone:"tertiary",children:g.jsx("div",{className:"pg-turn-group-content",children:e.map(Sc)})})}):null,t.map(Sc),n?Sc(n):null]})}function pre({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(vi,{action:"Working",details:`for ${fx(Math.max(0,t-e))}`,expandable:!1,tabularNums:!0,tone:"tertiary"})})}function hre(e,t){const n=e.findLast(l=>l.kind==="turn-end")?.id,r=[];let s=[];const a=()=>{for(const l of s)r.push(Sc(l));s=[]};for(const l of e)switch(l.kind){case"user":case"divider":a(),r.push(Sc(l));break;case"turn-end":{const c=s[s.length-1],d=c!==void 0&&c.kind==="assistant"&&!c.streaming?c:null,f=d===null?s:s.slice(0,-1),h=f.filter(b=>!MC(b)),m=f.filter(MC);r.push(g.jsx(dre,{steps:h,cards:m,final:d,marker:l,isLatest:l.id===n},l.id)),s=[];break}default:s.push(l);break}return t!==null&&r.push(g.jsx(pre,{startMs:t},"working")),a(),r}function lD(){const e=$e(h=>h.transcript),t=$e(h=>h.current),n=$e(h=>h.localTrace),r=$e(h=>h.running),s=$e(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??"",d=`${t?.sessionId??"none"}:${c}:${e.length}`,{scrollRef:f}=NM({contentKey:l,latchKey:d});return g.jsx("div",{ref:f,className:a?"pg-transcript is-empty":"pg-transcript",children:a?g.jsx(hx,{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."}):hre(e,r?s:null)})}const DC=["accent","blue","magenta","orange","purple"];function uD(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return DC[t%DC.length]}function LC(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 mre(e){const{availableWidth:t,itemWidths:n,gap:r,triggerWidth:s,maxLines:a=2}=e,l=n.length;if(l===0)return 0;if(LC(n,t,r)<=a)return l;for(let c=l-1;c>=0;c-=1){const d=[...n.slice(0,c),s];if(LC(d,t,r)<=a)return c}return 0}const gre="Send a message below to start a new HTTP session. Use the Trace tab for a timeline with tool timings.",bre="This agent is stopped. Pick a session from the Runs tab to inspect its chat and trace.",jC="... More";function yre({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 T=getComputedStyle(m);s.current={key:a,widths:S.map(R=>R.offsetWidth),gap:parseFloat(T.gap)||0,triggerWidth:r.current?.offsetWidth??0}}const b=()=>{const S=s.current;if(!S)return;const T=mre({availableWidth:m.clientWidth,itemWidths:S.widths,gap:S.gap,triggerWidth:S.triggerWidth});c(R=>R.visibleCount===T?R:{...R,visibleCount:T})};b();let y;const k=new ResizeObserver(()=>{y!==void 0&&cancelAnimationFrame(y),y=requestAnimationFrame(()=>{y=void 0,b()})});return k.observe(m),()=>{k.disconnect(),y!==void 0&&cancelAnimationFrame(y)}},[e.length,a]);const d=Math.min(l.visibleCount,e.length),f=e.slice(0,d),h=e.slice(d);return g.jsxs("div",{ref:n,className:"pg-panel-empty__evals",children:[f.map(m=>g.jsx("button",{type:"button",className:"pg-panel-empty__eval","data-measure":"",title:m.description||`Run ${m.id}`,disabled:t,onClick:()=>{Ye.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:jC}),h.length>0?g.jsxs(ni,{placement:"bottom",children:[g.jsx(ni.Trigger,{disabled:t,children:g.jsx("button",{type:"button",className:"pg-panel-empty__eval",disabled:t,"aria-label":`Show ${h.length} more evaluations`,children:jC})}),g.jsx(ni.Content,{"aria-label":"More evaluations",size:"sm",children:h.map(m=>g.jsx(ni.Item,{disabled:t,onSelect:()=>{Ye.startEvalRun([m.id])},children:m.id},m.id))})]}):null]})}function vre(){const e=$e(d=>d.meta),t=$e(d=>d.info),n=$e(d=>d.evalCases),r=$e(d=>d.evalRun?.status==="running"),s=e.name||t?.name||"Agent",a=e.readonly===!0,l=uD(s),c=a?bre:t?.description||gre;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(Ht,{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(yre,{cases:n,disabled:r}):null]})}const _y={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}},xre={sm:{kOIVth:"ui-137clkk",$$css:!0},md:{kOIVth:"ui-pkkfsy",$$css:!0}},kre={sm:{kOIVth:"ui-1oot3zn",$$css:!0},md:{kOIVth:"ui-1jlwbde",$$css:!0}};function Sre(e,t){return e==="filter"||e==="underline"&&t==="lg"?"md":"sm"}const zC={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}},wre={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}},Ere={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}},cD=v.createContext(null);function fD(e){const t=v.use(cD);if(t===null)throw new Error(`${e} must be used within Tabs.Root`);return t}function Tre({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(cD.Provider,{value:c,children:g.jsx(gI,{...l,value:e,defaultValue:t,onValueChange:n,"data-component":"tabs-root","data-size":r,"data-variant":s,className:"ui-jp7ctv",children:a})})}function Rre({activateOnFocus:e,spacing:t,wrap:n=!1,children:r,...s}){const a=fD("Tabs.List"),l=t??Sre(a.variant,a.size),c=n&&a.variant!=="underline";return g.jsxs(SI,{...s,activateOnFocus:e,"data-component":"tabs-list","data-variant":a.variant,"data-wrap":c?"true":void 0,...zt(_y.base,a.variant==="underline"&&_y.underline,a.variant==="underline"?kre[l]:xre[l],c&&_y.wrap),children:[r,a.variant==="underline"?g.jsx(kI,{"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 Cre({value:e,secondaryLabel:t,href:n,children:r,...s}){const a=fD("Tabs.Item");return g.jsxs(vI,{...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(zC.base,a.size==="sm"?Ms.root:Cs.root,a.variant==="underline"?Ere[a.size]:wre[a.size],zC[a.variant],a.variant==="filter"&&zA.root),children:[r,t!=null?g.jsx("span",{className:"ui-2lah0s ui-4b2ntj",children:t}):null]})}const Ay={Root:Tre,List:Rre,Item:Cre};function _re(e,t){return t===null?!0:e!=="artifacts"||t.artifacts!==void 0}function dD(e,t,n){return e.filter(r=>r.value===n||_re(r.value,t))}const Are=[{value:"chat",label:"Chat"},{value:"trace",label:"Trace"},{value:"raw",label:"Raw"},{value:"evals",label:"Evals"},{value:"artifacts",label:"Artifacts"}];function Lx(e){return e==="overview"?"chat":e}function Nre({size:e="lg"}){const t=$e(d=>d.view),n=$e(d=>d.evalNavReturn),r=$e(d=>d.info),s=$e(d=>d.capabilities),a=Are.filter(d=>(d.value!=="evals"||s.evals!=="disabled")&&(d.value!=="artifacts"||s.artifacts!=="disabled")),l=n||t==="evals"?a:a.filter(d=>d.value!=="evals"),c=dD(l,r,t);return g.jsx(Ay.Root,{value:Lx(t),onValueChange:d=>Ye.setView(d),size:e,children:g.jsx(Ay.List,{"aria-label":"Visualization mode",wrap:!0,children:c.map(d=>g.jsx(Ay.Item,{value:d.value,children:d.label},d.value))})})}function pD(){const e=$e(s=>s.view),t=$e(s=>s.current),n=$e(s=>s.transcript.length===0),r=t===null&&n;return g.jsxs(g.Fragment,{children:[Lx(e)==="chat"?g.jsxs(g.Fragment,{children:[r?g.jsx(vre,{}):g.jsx(lD,{}),g.jsx(EM,{})]}):null,e==="trace"?g.jsx(DM,{}):null,e==="raw"?g.jsx(OM,{}):null,e==="evals"?g.jsx(_M,{}):null,e==="artifacts"?g.jsx(wM,{}):null]})}function Ore({className:e,labeled:t=!1}){const n=$e(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(nf,{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=>Ye.setAuthToken(r.target.value),title:"Sent as Authorization: Bearer ... on API calls"})]})}function Ire(){return $e(t=>t.aliasHosted)?null:g.jsxs(ni,{placement:"bottom-end",children:[g.jsx(ni.Trigger,{children:g.jsx(vr,{icon:"dots-3-horizontal",size:"lg","aria-label":"More actions"})}),g.jsx(ni.Content,{"aria-label":"More actions",className:"pg-detail-more",size:"sm",width:240,footer:g.jsx(Ore,{className:"pg-detail-more__token",labeled:!0}),children:null})]})}function hD({variant:e}){const t=$e(l=>l.barTitle),n=$e(l=>l.barId),r=$e(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(vr,{icon:"arrow-left",size:"lg","aria-label":"Back to overview",onClick:()=>Ye.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(Nre,{}),g.jsxs("div",{className:"pg-detail__head-end",children:[g.jsx(Ire,{}),s?g.jsx(vr,{icon:"x",size:"lg","aria-label":"Close chat panel",onClick:()=>Ye.setChatPanelOpen(!1)}):null]})]})}function Mre(){return g.jsxs("div",{className:"pg-detail",children:[g.jsx(hD,{variant:"page"}),g.jsx("div",{className:"pg-transcript-wrap",children:g.jsx(pD,{})})]})}const Dre="agent-serve.playground.try.";function mD(e,t){return`${Dre}${e}:${t}`}function PC(e,t){try{const n=localStorage.getItem(mD(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 Lre(e,t,n){try{localStorage.setItem(mD(e,t),JSON.stringify(n))}catch{}}function $C(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 FC({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 gD(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 fp(e){return`'${e.replace(/'/g,"'\\''")}'`}function jre(e){const t=["curl","-sS","-X",e.method],n=e.token.trim();if(n!==""&&t.push("-H",fp(`Authorization: Bearer ${n}`)),e.hasBody){t.push("-H",fp("Content-Type: application/json"));const r=e.bodyText.trim()===""?"{}":e.bodyText.trim();t.push("--data-binary",fp(r))}return t.push(fp(e.absoluteUrl)),t.join(" ")}function zre(e,t,n){let r=Ye.api.url(e);if(n){const s=gD(t,"Query");if(!s.ok)return s;const a=new URLSearchParams;for(const[c,d]of Object.entries(s.value)){if(d==null)continue;const f=typeof d=="string"?d:String(d);f!==""&&a.set(c,f)}const l=a.toString();l!==""&&(r=`${r}?${l}`)}try{return{ok:!0,url:new URL(r,window.location.origin).toString()}}catch(s){return{ok:!1,error:`URL: ${s instanceof Error?s.message:String(s)}`}}}function bD({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=$e(M=>M.authToken),[c,d]=v.useState(()=>{const M=PC(r,t.url);return M?.query!==void 0&&M.query.trim()!==""?M.query:$C(t.querySchema)}),[f,h]=v.useState(()=>{const M=PC(r,t.url);return M?.body!==void 0&&M.body.trim()!==""?M.body:$C(t.bodySchema)}),[m,b]=v.useState(!1),[y,k]=v.useState(!1),[S,T]=v.useState(null),[R,E]=v.useState(null);v.useEffect(()=>{const M=B=>{B.key==="Escape"&&n()};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[n]);const _=M=>{const B={};s&&(B.body=M.body??f),a&&(B.query=M.query??c),Lre(r,t.url,B)},C=()=>{_({body:f,query:c}),n()},D=async()=>{if(T(null),k(!1),s&&f.trim()!=="")try{JSON.parse(f)}catch(P){T(`Body: ${P instanceof Error?P.message:String(P)}`);return}const M=zre(t.url,c,a);if(!M.ok){T(M.error);return}const B=jre({method:r,absoluteUrl:M.url,token:l,hasBody:s,bodyText:f});try{await navigator.clipboard.writeText(B),k(!0),Ye.toast("Copied curl to clipboard"),window.setTimeout(()=>k(!1),1500)}catch(P){T(`Copy failed: ${P instanceof Error?P.message:String(P)}`)}},N=async()=>{T(null),E(null);let M;if(a){const P=gD(c,"Query");if(!P.ok){T(P.error);return}M={};for(const[A,K]of Object.entries(P.value))K!=null&&(M[A]=typeof K=="string"?K:String(K))}let B;if(s){const P=f.trim();if(P==="")B={};else try{B=JSON.parse(P)}catch(A){T(`Body: ${A instanceof Error?A.message:String(A)}`);return}}_({body:f,query:c}),b(!0);try{const P=await Ye.api.channelRequest(r,t.url,{body:s?B:void 0,query:M});if(P.ok&&P.body&&await Ye.openSessionFromChannelResponse(e,P.body)){n();return}E({status:P.status,body:P.body})}catch(P){T(P instanceof Error?P.message:String(P))}finally{b(!1)}};return g.jsx("div",{className:"pg-try-backdrop",role:"presentation",onClick:C,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:C,children:"Close"})]}),g.jsxs("div",{className:"pg-try-body",children:[a?g.jsxs(g.Fragment,{children:[g.jsx(FC,{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=>d(M.target.value),spellCheck:!1,rows:6})]})]}):null,s?g.jsxs(g.Fragment,{children:[g.jsx(FC,{label:"Body",schema:t.bodySchema}),g.jsxs("label",{className:"pg-try-field",children:[g.jsx("span",{children:"Body (JSON)"}),g.jsx("textarea",{value:f,onChange:M=>h(M.target.value),spellCheck:!1,rows:10})]})]}):null,S?g.jsx("div",{className:"pg-try-error",children:S}):null,R?g.jsxs("div",{className:"pg-try-result",children:[g.jsxs("div",{className:"pg-try-status",children:["Status ",g.jsx("code",{children:R.status})]}),g.jsx("pre",{children:JSON.stringify(R.body,null,2)})]}):null]}),g.jsxs("div",{className:"pg-try-foot",children:[g.jsx(yn,{variant:"secondary",size:"sm",onClick:()=>{D()},children:y?"Copied":"Copy curl"}),g.jsx("div",{className:"pg-try-foot-spacer"}),g.jsx(yn,{variant:"secondary",size:"sm",onClick:C,children:"Cancel"}),g.jsx(yn,{variant:"primary",size:"sm",disabled:m,onClick:()=>{N()},children:m?"Sending…":"Send"})]})]})})}const yD="agent-serve.playground.drawerWidth",Ny=340,Lv=280,jv=720;function Tp(e){return Math.min(jv,Math.max(Lv,e))}function Pre(){try{const e=localStorage.getItem(yD);if(e===null)return Ny;const t=Number.parseInt(e,10);return Number.isFinite(t)?Tp(t):Ny}catch{return Ny}}function dl({title:e,children:t}){return g.jsxs(g.Fragment,{children:[g.jsx("h4",{children:e}),t]})}function tc({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 $re(){const e=$e(E=>E.drawerOpen),t=$e(E=>E.info),[n,r]=v.useState(null),[s,a]=v.useState(Pre),[l,c]=v.useState(!1),d=v.useRef(s);d.current=s,v.useEffect(()=>{try{localStorage.setItem(yD,String(s))}catch{}},[s]);const f=v.useCallback(E=>{E.preventDefault();const _=E.currentTarget,C=E.clientX,D=d.current;_.setPointerCapture(E.pointerId),c(!0),document.body.classList.add("pg-resizing-drawer");const N=B=>{a(Tp(D+(B.clientX-C)))},M=B=>{_.releasePointerCapture(B.pointerId),_.removeEventListener("pointermove",N),_.removeEventListener("pointerup",M),_.removeEventListener("pointercancel",M),c(!1),document.body.classList.remove("pg-resizing-drawer")};_.addEventListener("pointermove",N),_.addEventListener("pointerup",M),_.addEventListener("pointercancel",M)},[]),h=t?.tools??[],m=t?.skills??[],b=t?.subagents??[],y=t?.connections??[],k=t?.channels??[],S=t?.hooks??[],T=v.useMemo(()=>{const E=new Map;for(const _ of nm(k))E.set(`${_.method}:${_.url}`,_.name);return E},[k]),R=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":Lv,"aria-valuemax":jv,tabIndex:0,onPointerDown:f,onKeyDown:E=>{E.key==="ArrowLeft"?(E.preventDefault(),a(_=>Tp(_-16))):E.key==="ArrowRight"?(E.preventDefault(),a(_=>Tp(_+16))):E.key==="Home"?(E.preventDefault(),a(Lv)):E.key==="End"&&(E.preventDefault(),a(jv))}}),g.jsxs("div",{className:"head",children:[g.jsx("span",{children:"Agent surface"}),g.jsx("button",{type:"button",className:"link-btn",onClick:()=>Ye.setDrawerOpen(!1),children:"Close"})]}),g.jsxs("div",{className:"body",children:[t===null?g.jsx("div",{className:"drawer-empty",children:"Loading…"}):null,R?g.jsx("div",{className:"drawer-empty",children:"No surface to show for this agent."}):null,h.length?g.jsx(dl,{title:"Tools",children:h.map(E=>g.jsx(tc,{name:E.name,detail:E.description},E.name))}):null,m.length?g.jsx(dl,{title:"Skills",children:m.map(E=>g.jsx(tc,{name:E.name,detail:E.description},E.name))}):null,b.length?g.jsx(dl,{title:"Subagents",children:b.map(E=>g.jsx(tc,{name:E.name,detail:E.description},E.name))}):null,y.length?g.jsx(dl,{title:"MCP Connections",children:y.map(E=>g.jsx(tc,{name:E.name,detail:E.transport},E.name))}):null,k.length?g.jsx(dl,{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(_=>{const C=E.id!=="http",D=`${_.method} ${_.url}`,N=T.get(`${_.method.toUpperCase()}:${_.url}`);return C?g.jsxs("div",{className:"channel-route",children:[g.jsx("code",{children:D}),N?g.jsx("code",{className:"channel-slash",title:"Composer slash command",children:N}):null,g.jsx("button",{type:"button",className:"link-btn",onClick:()=>r({channelId:E.id,route:_}),children:"Try"})]},D):g.jsx("div",{className:"channel-route",children:g.jsx("code",{children:D})},D)})})]},E.id))}):null,S.length?g.jsx(dl,{title:"Hooks",children:S.map(E=>g.jsx(tc,{name:E},E))}):null]})]}),n?g.jsx(bD,{channelId:n.channelId,route:n.route,onClose:()=>r(null)}):null]})}const Fre=/^turn_(\d+)$/;function Bre(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n?.type!=="turn.started")continue;const r=Number(Fre.exec(n.turnId??"")?.[1]);if(Number.isSafeInteger(r))return r}}function Ure(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 Hre(){const e=$e(h=>h.meta.readonly===!0),t=$e(h=>h.capabilities.logs!=="disabled"),[n,r]=v.useState([]),[s,a]=v.useState(null),l=v.useRef(-1),c=v.useRef(null),d=n.length,f=uN({count:d,getScrollElement:()=>c.current,estimateSize:()=>18,overscan:24});return v.useEffect(()=>{if(!t)return;let h=!1;const m=async()=>{const y=await Ye.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 T=S.concat(k);return T.length>2e3?T.slice(T.length-2e3):T}))};if(m(),e)return()=>{h=!0};const b=window.setInterval(()=>{m()},1e3);return()=>{h=!0,window.clearInterval(b)}},[t,e]),v.useEffect(()=>{d>0&&f.scrollToIndex(d-1,{align:"end"})},[d,f]),t?s!==null&&d===0?g.jsx("div",{className:"pg-raw",children:g.jsx(Ci,{body:s})}):d===0?g.jsx("div",{className:"pg-raw",children:g.jsx(Ci,{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:f.getTotalSize(),position:"relative",width:"100%"},children:f.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:f.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(Ci,{body:BC})})}const jx={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 qre(){return jx.root}function Vre(){return jx.controls}function Gre(){return jx.status}function Wre({currentPage:e,totalPages:t,totalItems:n,pageSize:r,onPageChange:s,isLoading:a=!1,leading:l,rootStyle:c,className:d}){const f=Math.min(Math.max(1,e),t),h=n===0?0:Math.min(n,(f-1)*r+1),m=Math.min(n,f*r),b=T=>{T<1||T>t||T===f||a||s(T)},y=Xt({rootClass:"ui-pagination-footer",stylexStyles:[qre(),c],className:["pagination-footer",d].filter(Boolean).join(" ")}),k=Xt({rootClass:"ui-pagination-footer__controls",stylexStyles:Vre(),className:"pagination-footer__controls"}),S=Xt({rootClass:"ui-pagination-footer__status",stylexStyles:Gre(),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(vr,{"aria-label":"Previous page",disabled:f<=1||a,icon:"chevron-left",onClick:()=>b(f-1),size:"sm",variant:"ghost"}),g.jsxs("span",{className:S.className,style:S.style,children:[f.toLocaleString()," / ",t.toLocaleString()]}),g.jsx(vr,{"aria-label":"Next page",disabled:f>=t||a,icon:"chevron-right",onClick:()=>b(f+1),size:"sm",variant:"ghost"})]})]})}const Kre={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}},vD={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}},Yre={base:{kjj79g:"ui-13a6bvl",k9WMMc:"ui-1hr2gdg",$$css:!0}},Xre={base:{kMwMTN:"ui-1wd3ewq",$$css:!0}},Zre={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}},Qre={base:{kjj79g:"ui-13a6bvl",k9WMMc:"ui-1hr2gdg",$$css:!0}},Jre={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}},eie={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}},tie={base:{kkrTdU:"ui-1ypdohk",$$css:!0}},nie={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}},UC={base:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kGuDYH:"ui-4z9k3i",kLWn49:"ui-1fc57z9",$$css:!0}},rie={base:{kjj79g:"ui-l56j7k",k9WMMc:"ui-2b8uid",$$css:!0}},iie={base:{kMwMTN:"ui-1e4uaio",$$css:!0}},sie={base:{kMwMTN:"ui-19aaqeu",$$css:!0}},oie={base:{kMwMTN:"ui-4b2ntj",$$css:!0}},aie={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}},lie={base:{kMwMTN:"ui-4b2ntj",kGuDYH:"ui-4z9k3i",kLWn49:"ui-d4r4e8",$$css:!0}},uie={base:{kMwMTN:"ui-19aaqeu",kGuDYH:"ui-4z9k3i",k63SB2:"ui-20ajya",kLWn49:"ui-d4r4e8",$$css:!0}},cie={base:{kjj79g:"ui-l56j7k",k9WMMc:"ui-2b8uid",$$css:!0}},HC={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}},fie={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}},die={base:{kzqmXN:"ui-3hqpx7",$$css:!0}},pie={base:{kzqmXN:"ui-1iy3nof",$$css:!0}},hie={base:{kzqmXN:"ui-g0jo4d",$$css:!0}},mie={base:{k1xSpc:"ui-78zum5",kzqmXN:"ui-h8yej3",k7Eaqz:"ui-euugli",kXwgrk:"ui-dt5ytf",$$css:!0}},gie={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:hie.base},{identityClass:"automations-run-history-table__skeleton--medium",style:die.base},{identityClass:"automations-run-history-table__skeleton--short",style:pie.base}];function bie(e){return typeof e=="number"?`${e}px`:e}function yie(e){if(e.fixedWidth!==void 0)return{flexValue:`0 0 ${bie(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 zx(e){const t=yie(e),n={flex:t.flexValue};return t.minWidth!==void 0&&(n.minWidth=t.minWidth),t.maxWidth!==void 0&&(n.maxWidth=t.maxWidth),n}const Px={identityClass:"",style:null};function xD(e){switch(e){case"right":return{identityClass:"automations-run-history-table__cell--align-right",style:Yre.base};case"center":return{identityClass:"automations-run-history-table__cell--align-center",style:rie.base};default:return Px}}function vie(e){switch(e){case"right":return{identityClass:"automations-run-history-table__header--align-right",style:Qre.base};case"center":return{identityClass:"automations-run-history-table__header--align-center",style:cie.base};default:return Px}}function xie(e){switch(e){case"primary":return{identityClass:"automations-run-history-table__cell--tint-primary",style:Xre.base};case"secondary":return{identityClass:"automations-run-history-table__cell--tint-secondary",style:sie.base};case"tertiary":return{identityClass:"automations-run-history-table__cell--tint-tertiary",style:oie.base};case"quaternary":return{identityClass:"automations-run-history-table__cell--tint-quaternary",style:iie.base};default:return Px}}function kie(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 kD(e){return rn(Xt({rootClass:"ui-automations-run-history-table__row",stylexStyles:[eie.base,e&&tie.base],className:Hc("automations-run-history-table__row",e&&"automations-run-history-table__row--linked")}).className,"ui--default-marker")}function SD(){return g.jsx("div",{className:Xt({rootClass:"ui-automations-run-history-table__row-divider",stylexStyles:nie.base,className:"automations-run-history-table__row-divider"}).className,"data-run-history-row-divider":""})}function Sie({columns:e}){return g.jsx("div",{className:Xt({rootClass:"ui-automations-run-history-table__header-row",stylexStyles:Jre.base,className:"automations-run-history-table__header-row"}).className,children:e.map(t=>{const n=vie(t.align);return g.jsx("div",{className:Xt({rootClass:"ui-automations-run-history-table__header",stylexStyles:[Zre.base,n.style],className:Hc("automations-run-history-table__header",n.identityClass)}).className,style:zx(t),children:t.header},`header-${t.key}`)})})}function VC({row:e,column:t}){const n=xD(t.align),r=xie(t.tintColor);return g.jsx("div",{className:Xt({rootClass:"ui-automations-run-history-table__cell",stylexStyles:[vD.base,n.style,r.style],className:Hc("automations-run-history-table__cell",n.identityClass,r.identityClass)}).className,style:zx(t),children:t.render(e)})}function wie({columns:e,rowIndex:t}){const n=qC[t%qC.length];return g.jsxs("div",{className:kD(!1),"data-run-history-row":"",children:[g.jsx(SD,{}),e.map(r=>{const s=xD(r.align);return g.jsx("div",{className:Xt({rootClass:"ui-automations-run-history-table__cell",stylexStyles:[vD.base,s.style],className:Hc("automations-run-history-table__cell",s.identityClass)}).className,style:zx(r),children:r.header!==""&&r.header!=null&&g.jsx("span",{className:Xt({rootClass:"ui-automations-run-history-table__skeleton",stylexStyles:[fie.base,n.style],className:Hc("automations-run-history-table__skeleton",n.identityClass)}).className})},`skeleton-${r.key}`)})]})}function wD({data:e,columns:t,isLoading:n=!1,skeletonRowCount:r=3,emptyState:s,onRowClick:a,getRowHref:l,pagination:c,ariaLabel:d="Run history"}){const{linkColumns:f,excludedColumns:h,hasExcludedColumns:m}=v.useMemo(()=>{const S=[],T=[];for(const R of t)R.excludeFromRowLink===!0?T.push(R):S.push(R);return{linkColumns:S,excludedColumns:T,hasExcludedColumns:T.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:Xt({rootClass:"ui-automations-run-history-table__wrapper",stylexStyles:mie.base,className:"automations-run-history-table__wrapper"}).className,"data-vr":"all-runs",children:[g.jsxs("section",{"aria-busy":n,"aria-label":d,className:Xt({rootClass:"ui-automations-run-history-table",stylexStyles:Kre.base,className:"automations-run-history-table"}).className,children:[g.jsx(Sie,{columns:t}),b?g.jsx("div",{className:Xt({rootClass:"ui-automations-run-history-table__rows",stylexStyles:UC.base,className:"automations-run-history-table__rows"}).className,children:Array.from({length:r},(S,T)=>g.jsx(wie,{columns:t,rowIndex:T},`skeleton-row-${T.toString()}`))}):y?g.jsx("div",{"aria-live":"polite",className:Xt({rootClass:"ui-automations-run-history-table__empty",stylexStyles:aie.base,className:"automations-run-history-table__empty"}).className,role:"status",children:s??g.jsxs(g.Fragment,{children:[g.jsx("span",{className:Xt({rootClass:"ui-automations-run-history-table__empty-title",stylexStyles:uie.base,className:"automations-run-history-table__empty-title"}).className,children:"No Results"}),g.jsx("span",{className:Xt({rootClass:"ui-automations-run-history-table__empty-description",stylexStyles:lie.base,className:"automations-run-history-table__empty-description"}).className,children:"Try different filters"})]})}):g.jsx("div",{className:Xt({rootClass:"ui-automations-run-history-table__rows",stylexStyles:UC.base,className:"automations-run-history-table__rows"}).className,children:e.map(S=>{const T=l?.(S),R=T!==void 0&&T!==""&&f.length>0,E=R||a!==void 0&&f.length>0,_=()=>f.map(C=>g.jsx(VC,{column:C,row:S},`cell-${S.id}-${C.key}`));return g.jsx(v.Fragment,{children:g.jsxs("div",{className:kD(E),"data-run-history-row":"",children:[g.jsx(SD,{}),R?g.jsx("a",{className:Xt({rootClass:"ui-automations-run-history-table__row-link",stylexStyles:HC.base,className:"automations-run-history-table__row-link"}).className,"data-run-history-row-link":"",href:T,onClick:C=>{a!==void 0&&kie(C)&&(C.preventDefault(),a(S))},children:_()}):a!==void 0&&f.length>0?g.jsx("button",{className:Xt({rootClass:"ui-automations-run-history-table__row-link",stylexStyles:HC.base,className:"automations-run-history-table__row-link"}).className,"data-run-history-row-link":"",onClick:()=>a(S),type:"button",children:_()}):_(),m&&h.map(C=>g.jsx(VC,{column:C,row:S},`cell-${S.id}-${C.key}`))]})},S.id)})})]}),k&&c!==void 0&&g.jsx(Wre,{currentPage:c.currentPage,onPageChange:c.onPageChange,pageSize:c.pageSize,rootStyle:gie.base,totalItems:c.totalItems,totalPages:c.totalPages})]})}function cm(e,...t){const n=e.trim().toLowerCase();return n===""?!0:t.filter(r=>r!=null&&r!=="").join(" ").toLowerCase().includes(n)}function ED({title:e,count:t,singularLabel:n,pluralLabel:r,search:s,searchPlaceholder:a,onSearchChange:l,actions:c,children:d}){const f=t===1?n:r;return g.jsxs("section",{className:"pg-list-section",children:[e!==void 0?g.jsxs("header",{className:"pg-list-section__header",children:[g.jsx("h1",{className:"pg-list-section__title",children:e}),c?g.jsx("div",{className:"pg-list-section__actions",children:c}):null]}):null,g.jsxs("div",{className:"pg-list-section__toolbar",children:[g.jsxs("p",{className:"pg-list-section__count",children:[t," ",f]}),g.jsxs("div",{className:"pg-list-section__toolbar-end",children:[g.jsx("div",{className:"pg-list-section__search",children:g.jsx(nf,{type:"search",size:"lg",startIcon:"search",value:s,onChange:h=>l(h.target.value),placeholder:a,"aria-label":a,autoComplete:"off"})}),e===void 0&&c?g.jsx("div",{className:"pg-list-section__actions",children:c}):null]})]}),d]})}function Eie(e){return e==="running"?"Running":e==="cancelled"?"Cancelled":e==="failed"?"Failed":"Completed"}function Tie(e){return e==="running"?"accent":e==="failed"?"danger":"neutral"}function Rie(e,t){return cm(t,e.id,e.description,e.verdict,e.error,e.sessionId)}function Cie(e,t){return cm(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=>Rie(n,t))}function _ie(e,t){return cm(t,e.title,e.sessionId,e.channelId,e.mode)}function GC({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 Aie({sessions:e,runs:t,currentSessionId:n,currentEvalRunId:r,readOnly:s=!1,onSelectSession:a,onOpenEvalRun:l}){const[c,d]=v.useState(""),f=v.useMemo(()=>[...e.map(S=>({kind:"session",at:S.updatedAt??S.createdAt??"",session:S})),...t.map(S=>({kind:"evalRun",at:S.finishedAt??S.startedAt,run:S}))].sort((S,T)=>T.at.localeCompare(S.at)),[e,t]),h=v.useMemo(()=>f.filter(k=>k.kind==="session"?_ie(k.session,c):Cie(k.run,c)),[f,c]),m=v.useMemo(()=>h.map(k=>k.kind==="session"?{id:`session:${k.session.sessionId}`,kind:"session",session:k.session,active:k.session.sessionId===n}:{id:`eval:${k.run.runId}`,kind:"evalRun",run:k.run,active:k.run.runId===r}),[h,n,r]),b=v.useMemo(()=>[{key:"run",header:"Run",flexWidth:{minWidth:160,grow:2},tintColor:"primary",render:k=>k.kind==="session"?g.jsx(GC,{running:k.session.running,active:k.active,children:k.session.title||k.session.sessionId}):g.jsx(GC,{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:T}=k.run;return g.jsxs("span",{className:"pg-agent-run__type",children:[g.jsx(vo,{variant:Tie(S),size:"sm",children:"Eval"}),g.jsxs("span",{className:"pg-eval-run__meta",children:[Eie(S),S==="running"?` · ${T.done}/${T.total} done`:""]})]})}},{key:"details",header:"Details",flexWidth:{minWidth:160,grow:1.5},render:k=>{if(k.kind==="session"){const T=k.session.turnCount;return T===void 0?"—":`${T} ${T===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(Ht,{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(Ht,{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?vv(k.session.updatedAt)??"—":"—":vv(k.run.finishedAt??k.run.startedAt)??"—"}],[]),y=f.length===0?g.jsx("span",{children:s?"No stored runs for this stopped agent.":"No runs yet — start a chat."}):g.jsx("span",{children:"No runs match your search."});return g.jsx(ED,{count:h.length,singularLabel:"run",pluralLabel:"runs",search:c,searchPlaceholder:"Search runs",onSearchChange:d,children:g.jsx(wD,{data:m,columns:b,ariaLabel:"Agent runs",emptyState:y,onRowClick:k=>{if(k.kind==="session"){a(k.session);return}l(k.run.runId)}})})}function Nie(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 Oie({cases:e,latestRun:t,running:n,onRun:r,onRunAll:s,readOnly:a=!1}){const[l,c]=v.useState(""),d=v.useMemo(()=>e.filter(b=>cm(l,b.id,b.description,b.fileId,b.tags?.join(" "))),[e,l]),f=v.useMemo(()=>d.map(b=>{const y=Nie(t,b.id);return{id:b.id,evalCase:b,verdictLabel:y.label,verdictClassName:y.className,verdictIcon:y.icon,isSummary:b.id.endsWith("/overall")||(b.tags?.includes("summary")??!1)}}),[d,t]),h=v.useMemo(()=>{const b=[{key:"case",header:"Case",flexWidth:{minWidth:160,grow:1.4},tintColor:"primary",render:y=>g.jsx("span",{className:"pg-agent-run__primary-text",children:y.evalCase.id})},{key:"description",header:"Description",flexWidth:{minWidth:180,grow:2.4},render:y=>g.jsx("span",{className:"pg-agent-run__primary-text",children:y.evalCase.description||"—"})},{key:"tags",header:"Tags",flexWidth:{minWidth:100,grow:1},render:y=>y.evalCase.tags?.join(", ")||"—"},{key:"latest",header:"Latest",flexWidth:{minWidth:80,grow:1},render:y=>g.jsxs("span",{className:y.verdictClassName?`pg-eval-run__stat ${y.verdictClassName}`:"pg-eval-run__stat",children:[y.verdictIcon!==void 0?g.jsx(Ht,{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(vr,{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(ED,{count:d.length,singularLabel:"evaluation",pluralLabel:"evaluations",search:l,searchPlaceholder:"Search evaluations",onSearchChange:c,actions:!a&&e.length>0?g.jsx(yn,{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(wD,{data:f,columns:h,ariaLabel:"Evaluations",emptyState:m})})}function nc({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 Oy(){return g.jsx("span",{className:"pg-meta-table__empty",children:"—"})}function Iie(e,t){return t?"History":e?"Development":"Production"}function Mie(e,t){return t?"neutral":e?"warn":"neutral"}function Die(e,t){return t&&e!=="bad"?"Stopped":e==="ok"?"Healthy":e==="bad"?"Unhealthy":"Unknown"}function Lie(e,t){return t&&e!=="bad"?"neutral":e==="ok"?"success":e==="bad"?"danger":"neutral"}function jie(e,t){return t&&t.trim()!==""?t:e&&e.trim()!==""?e.charAt(0).toUpperCase()+e.slice(1):null}function zie({dev:e=!1,health:t="unknown",model:n,runtime:r,sourcePath:s,version:a,readOnly:l=!1}){const c=jie(r,s),d=n&&n.trim()!==""?n:null,f=a&&a.trim()!==""?a.trim():null,h=l&&t!=="bad",m=!h&&t==="ok";return g.jsxs("section",{className:"pg-meta-table","aria-labelledby":"pg-overview-title",children:[g.jsx("h2",{id:"pg-overview-title",className:"pg-section-title",children:"Overview"}),g.jsxs("div",{className:"pg-meta-table__card",children:[g.jsx(nc,{label:"Mode",children:g.jsxs(vo,{variant:Mie(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,Iie(e,l)]})}),g.jsx(nc,{label:"Status",children:g.jsxs(vo,{variant:Lie(t,l),size:"sm",pill:!0,children:[g.jsx(Ht,{name:h?"pause-circle":m?"check-circle":"x-circle",variant:"filled",size:12,color:m?"green":t==="bad"?"red":"secondary","aria-hidden":!0}),Die(t,l)]})}),g.jsx(nc,{label:"Model",children:d?g.jsx("span",{className:"pg-meta-table__text",children:d}):g.jsx(Oy,{})}),g.jsx(nc,{label:"Source",children:c?g.jsx("span",{className:"pg-meta-table__text",title:c,children:c}):g.jsx(Oy,{})}),g.jsx(nc,{label:"BDK",children:f?g.jsx("span",{className:"pg-meta-table__text",children:f}):g.jsx(Oy,{})})]})]})}function Pie({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(yn,{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 dp(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 pp(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 $ie({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(Ht,{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 Fie({info:e,onTryRoute:t,readOnly:n=!1}){const[r,s]=v.useState(null),[a,l]=v.useState(new Set),c=e?.tools??[],d=e?.skills??[],f=e?.subagents??[],h=e?.connections??[],m=e?.channels??[],b=e?.hooks??[],y=v.useMemo(()=>{const R=new Map;for(const E of nm(m))R.set(`${E.method}:${E.url}`,E.name);return R},[m]),k=(R,E)=>{if(t){t(R,E);return}s({channelId:R,route:E})},S=m.map(R=>g.jsxs("div",{className:"pg-surface-detail",children:[g.jsx("div",{className:"pg-surface-detail__name",children:R.id}),(R.routes??[]).length===0?g.jsx("div",{className:"pg-surface-detail__desc",children:"(events only)"}):g.jsx("div",{className:"pg-surface-channel__routes",children:(R.routes??[]).map(E=>{const _=!n&&R.id!=="http",C=`${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:C}),D?g.jsx("code",{className:"pg-surface-channel__slash",title:"Composer slash command",children:D}):null,_?g.jsx("button",{type:"button",className:"link-btn",onClick:()=>k(R.id,E),children:"Try"}):null]},C)})})]},R.id)),T=[{id:"tools",label:"Tools",empty:c.length===0,summary:dp(c),details:pp(c.map(R=>({name:R.name,detail:R.description})))},{id:"skills",label:"Skills",empty:d.length===0,summary:dp(d),details:pp(d.map(R=>({name:R.name,detail:R.description})))},{id:"subagents",label:"Subagents",empty:f.length===0,summary:dp(f),details:pp(f.map(R=>({name:R.name,detail:R.description})))},{id:"connections",label:"MCP Connections",empty:h.length===0,summary:dp(h),details:pp(h.map(R=>({name:R.name,detail:R.transport})))},{id:"channels",label:"Channels",empty:m.length===0,summary:g.jsx("span",{className:"pg-surface-field__text",children:m.map(R=>R.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:T.map(R=>g.jsx($ie,{field:R,expanded:a.has(R.id),onToggle:()=>{l(E=>{const _=new Set(E);return _.has(R.id)?_.delete(R.id):_.add(R.id),_})}},R.id))}),r?g.jsx(bD,{channelId:r.channelId,route:r.route,onClose:()=>s(null)}):null]})}function WC(){const e=$e($=>$.meta),t=$e($=>$.capabilities),n=$e($=>$.info),r=$e($=>$.health),s=$e($=>$.sessions),a=$e($=>$.current),l=$e($=>Bre($.traceEvents)),c=$e($=>$.view),d=$e($=>$.evalCases),f=$e($=>$.evalRuns),h=$e($=>$.evalRun),m=$e($=>$.evalNavReturn),b=$e($=>$.overviewSection),y=$e($=>$.surfaceFocusNonce),k=v.useRef(null);v.useEffect(()=>{y!==0&&k.current?.scrollIntoView({behavior:"smooth",block:"start"})},[y]);const S=e.name||n?.name||"Agent",T=uD(S),R=h??f?.[0]??null,E=h?.status==="running",_=Ye.modelLabel(),C=a?.sessionId??null,D=v.useMemo(()=>{const $=h===null?f:[h,...f],F=new Set($.flatMap(z=>z.cases.flatMap(U=>U.sessionId===void 0?[]:[U.sessionId])));return Ure(s.filter(z=>!F.has(z.sessionId)),C,l)},[s,f,h,C,l]),N=pG(D),M=Lx(c),B=m||M==="evals",P=B?null:a?.sessionId??null,A=B?h?.runId??null:null,K=[{id:"home",label:"Agent"},{id:"runs",label:N>0?`Runs (${N})`:"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":T,"aria-hidden":"true",children:g.jsx(Ht,{name:"robot",variant:"filled",size:24,color:T})}),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:K.map($=>g.jsx("button",{type:"button",role:"tab","aria-selected":b===$.id,className:b===$.id?"pg-tab pg-tab--active":"pg-tab",onClick:()=>Ye.setOverviewSection($.id),children:$.label},$.id))}),b==="home"?g.jsxs(g.Fragment,{children:[g.jsx(zie,{dev:e.dev,health:r,model:_||void 0,runtime:n?.runtime,sourcePath:n?.local?.cwd,version:e.version,readOnly:e.readonly===!0}),g.jsx(Pie,{schedules:n?.schedules??[],dev:e.dev&&e.readonly!==!0&&t.schedules==="enabled",onDispatch:$=>Ye.dispatchSchedule($)}),g.jsx("div",{ref:k,children:g.jsx(Fie,{info:n,readOnly:e.readonly===!0||t.channelRoutes!=="enabled"})})]}):null,b==="runs"?g.jsx(Aie,{sessions:D,runs:f,currentSessionId:P,currentEvalRunId:A,readOnly:e.readonly===!0,onSelectSession:$=>Ye.selectSession($),onOpenEvalRun:$=>{Ye.selectEvalRun($)}}):null,b==="evals"?g.jsx(Oie,{cases:d,latestRun:R,running:E,readOnly:e.readonly===!0||t.evals!=="enabled",onRun:$=>{Ye.startEvalRun([$])},onRunAll:()=>{Ye.startEvalRun()}}):null,b==="logs"?g.jsx("div",{className:"pg-overview-logs",children:g.jsx(Hre,{})}):null]})}const TD="agent-serve.playground.chatPanelWidth.v2",hh=320,Bie=.5,Uie=.8;function rc(e){const t=e?.parentElement;return t&&t.clientWidth>0?t.clientWidth:typeof window<"u"?window.innerWidth:1200}function zv(e){return Math.max(hh,Math.floor(e*Uie))}function vl(e,t){return Math.min(zv(t),Math.max(hh,Math.round(e)))}function Iy(e){return vl(e*Bie,e)}function KC(e){try{const t=localStorage.getItem(TD);if(t===null)return Iy(e);const n=Number.parseInt(t,10);return Number.isFinite(n)?vl(n,e):Iy(e)}catch{return Iy(e)}}function Hie(){const e=$e(h=>h.chatPanelOpen),t=v.useRef(null),[n,r]=v.useState(()=>KC(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(KC(rc(t.current)));const m=()=>{const y=rc(t.current);r(k=>vl(k,y))},b=new ResizeObserver(m);return b.observe(h),()=>b.disconnect()},[]),v.useEffect(()=>{try{localStorage.setItem(TD,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=T=>{const R=rc(t.current);r(vl(y-(T.clientX-b),R))},S=T=>{m.releasePointerCapture(T.pointerId),m.removeEventListener("pointermove",k),m.removeEventListener("pointerup",S),m.removeEventListener("pointercancel",S),a(!1),document.body.classList.remove("pg-resizing-chat-panel")};m.addEventListener("pointermove",k),m.addEventListener("pointerup",S),m.addEventListener("pointercancel",S)},[]);if(!e)return null;const d=rc(t.current),f=zv(d);return g.jsxs("aside",{ref:t,className:s?"pg-chat-panel pg-chat-panel--resizing":"pg-chat-panel",style:{width:n},children:[g.jsx("div",{className:s?"pg-chat-panel__resizer dragging":"pg-chat-panel__resizer",role:"separator","aria-orientation":"vertical","aria-label":"Resize chat panel","aria-valuenow":n,"aria-valuemin":hh,"aria-valuemax":f,tabIndex:0,onPointerDown:c,onKeyDown:h=>{const m=rc(t.current);h.key==="ArrowLeft"?(h.preventDefault(),r(b=>vl(b+16,m))):h.key==="ArrowRight"?(h.preventDefault(),r(b=>vl(b-16,m))):h.key==="Home"?(h.preventDefault(),r(hh)):h.key==="End"&&(h.preventDefault(),r(zv(m)))}}),g.jsx(hD,{variant:"panel"}),g.jsx("div",{className:"pg-transcript-wrap",children:g.jsx(pD,{})})]})}function qie(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 RD(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 Vie(e){const t=Math.round(Math.min(1,Math.max(0,e.a))*255).toString(16).padStart(2,"0");return`${RD(e)}${t}`.toUpperCase()}const Gie=/^oklch\(\s*([^\s/]+)\s+([^\s/]+)\s+([^\s/)]+?)(?:\s*\/\s*([^)]+?))?\s*\)$/i,Wie=/^rgba?\(\s*([0-9.]+)\s*,\s*([0-9.]+)\s*,\s*([0-9.]+)(?:\s*,\s*([0-9.]+))?\s*\)$/i,CD=.5/255;function hp(e,t,n){return Math.min(n,Math.max(t,e))}function My(e){const t=Math.abs(e);return t<=.04045?e/12.92:(e<0?-1:1)*((t+.055)/1.055)**2.4}function Dy(e){const t=Math.abs(e);return t<=.0031308?e*12.92:(e<0?-1:1)*(1.055*t**(1/2.4)-.055)}function Kie(e){const t=My(e.r/255),n=My(e.g/255),r=My(e.b/255),s=.4122214708*t+.5363325363*n+.0514459929*r,a=.2119034982*t+.6806995451*n+.1073969566*r,l=.0883024619*t+.2817188376*n+.6299787005*r,c=Math.cbrt(s),d=Math.cbrt(a),f=Math.cbrt(l),h=.2104542553*c+.793617785*d-.0040720468*f,m=1.9779984951*c-2.428592205*d+.4505937099*f,b=.0259040371*c+.7827717662*d-.808675766*f,y=Math.sqrt(m*m+b*b);let k=Math.atan2(b,m)*180/Math.PI;return k<0&&(k+=360),{l:h,c:y,h:y<5e-4?0:k,a:e.a}}function Yie(e){const t=e.h*Math.PI/180,n=e.c*Math.cos(t),r=e.c*Math.sin(t),s=e.l+.3963377774*n+.2158037573*r,a=e.l-.1055613458*n-.0638541728*r,l=e.l-.0894841775*n-1.291485548*r,c=s*s*s,d=a*a*a,f=l*l*l,h=4.0767416621*c-3.3077115913*d+.2309699292*f,m=-1.2684380046*c+2.6097574011*d-.3413193965*f,b=-.0041960863*c-.7034186147*d+1.707614701*f;return{r:Math.round(hp(Dy(h),0,1)*255),g:Math.round(hp(Dy(m),0,1)*255),b:Math.round(hp(Dy(b),0,1)*255),a:hp(e.a,0,1)}}function mp(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 _D(e){const t=mp(e.l,3),n=mp(e.c,3),r=n==="0"?"0":mp(e.h,3);return e.a<1-CD?`oklch(${t} ${n} ${r} / ${mp(e.a,3)})`:`oklch(${t} ${n} ${r})`}function gp(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 AD(e){const t=Gie.exec(e.trim());if(t===null)throw new Error(`Invalid oklch: ${e}`);const n=gp(t[1],1),r=gp(t[2],.4),s=gp(t[3],1),a=t[4]===void 0?1:gp(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 Xie(e){const t=Wie.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 ND(e){const t=e.trim();if(t.startsWith("#"))return qie(t);if(t.toLowerCase().startsWith("oklch("))return Yie(AD(t));if(/^rgba?\(/i.test(t))return Xie(t);throw new Error(`Unsupported CSS color: ${e}`)}function Zie(e){return _D(Kie(e))}function Qie(e){const t=e.trim();return t.toLowerCase().startsWith("oklch(")?_D(AD(t)):Zie(ND(t))}function Jie(e){const t=ND(e);return t.a<1-CD?Vie(t):RD(t)}function ese(e,t){const n=Object.keys(e).sort((l,c)=>l.localeCompare(c)),r=n.map(l=>`${t}--cursor-${l}: ${Jie(e[l])};`),s=`${t} `,a=n.map(l=>`${s}--cursor-${l}: ${Qie(e[l])};`);return[...r,`${t}@supports (color: oklch(0 0 0)) {`,...a,`${t}}`]}const tse={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)",onPrimary:"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)",successFill:"oklch(0.638 0.129 153.739)",successFillHover:"oklch(0.638 0.129 153.739)",successFillPressed:"oklch(0.638 0.129 153.739)",successFillBright:"oklch(0.638 0.129 153.739)",successForeground:"oklch(0.638 0.129 153.739)",successForegroundHover:"oklch(0.638 0.129 153.739)",successForegroundBright:"oklch(0.638 0.129 153.739)",warn:"oklch(0.811 0.118 71.255)",warnFill:"oklch(0.811 0.118 71.255)",warnFillHover:"oklch(0.811 0.118 71.255)",warnFillPressed:"oklch(0.811 0.118 71.255)",warnFillBright:"oklch(0.811 0.118 71.255)",warnForeground:"oklch(0.811 0.118 71.255)",warnForegroundHover:"oklch(0.811 0.118 71.255)",warnForegroundBright:"oklch(0.811 0.118 71.255)",danger:"oklch(0.628 0.194 8.387)",dangerFill:"oklch(0.628 0.194 8.387)",dangerFillHover:"oklch(0.628 0.194 8.387)",dangerFillPressed:"oklch(0.628 0.194 8.387)",dangerFillBright:"oklch(0.628 0.194 8.387)",dangerForeground:"oklch(0.628 0.194 8.387)",dangerForegroundHover:"oklch(0.628 0.194 8.387)",dangerForegroundBright:"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)",redFill:"oklch(0.712 0.177 12.651)",redFillHover:"oklch(0.712 0.177 12.651)",redFillPressed:"oklch(0.712 0.177 12.651)",redFillBright:"oklch(0.712 0.177 12.651)",redForeground:"oklch(0.712 0.177 12.651)",redForegroundHover:"oklch(0.712 0.177 12.651)",redForegroundBright:"oklch(0.712 0.177 12.651)",orange:"oklch(0.693 0.096 38.241)",orangeFill:"oklch(0.693 0.096 38.241)",orangeFillHover:"oklch(0.693 0.096 38.241)",orangeFillPressed:"oklch(0.693 0.096 38.241)",orangeFillBright:"oklch(0.693 0.096 38.241)",orangeForeground:"oklch(0.693 0.096 38.241)",orangeForegroundHover:"oklch(0.693 0.096 38.241)",orangeForegroundBright:"oklch(0.693 0.096 38.241)",yellow:"oklch(0.811 0.118 71.255)",yellowFill:"oklch(0.811 0.118 71.255)",yellowFillHover:"oklch(0.811 0.118 71.255)",yellowFillPressed:"oklch(0.811 0.118 71.255)",yellowFillBright:"oklch(0.811 0.118 71.255)",yellowForeground:"oklch(0.811 0.118 71.255)",yellowForegroundHover:"oklch(0.811 0.118 71.255)",yellowForegroundBright:"oklch(0.811 0.118 71.255)",green:"oklch(0.638 0.129 153.739)",greenFill:"oklch(0.638 0.129 153.739)",greenFillHover:"oklch(0.638 0.129 153.739)",greenFillPressed:"oklch(0.638 0.129 153.739)",greenFillBright:"oklch(0.638 0.129 153.739)",greenForeground:"oklch(0.638 0.129 153.739)",greenForegroundHover:"oklch(0.638 0.129 153.739)",greenForegroundBright:"oklch(0.638 0.129 153.739)",cyan:"oklch(0.697 0.059 248.687)",cyanFill:"oklch(0.697 0.059 248.687)",cyanFillHover:"oklch(0.697 0.059 248.687)",cyanFillPressed:"oklch(0.697 0.059 248.687)",cyanFillBright:"oklch(0.697 0.059 248.687)",cyanForeground:"oklch(0.697 0.059 248.687)",cyanForegroundHover:"oklch(0.697 0.059 248.687)",cyanForegroundBright:"oklch(0.697 0.059 248.687)",blue:"oklch(0.74 0.101 251.884)",blueFill:"oklch(0.74 0.101 251.884)",blueFillHover:"oklch(0.74 0.101 251.884)",blueFillPressed:"oklch(0.74 0.101 251.884)",blueFillBright:"oklch(0.74 0.101 251.884)",blueForeground:"oklch(0.74 0.101 251.884)",blueForegroundHover:"oklch(0.74 0.101 251.884)",blueForegroundBright:"oklch(0.74 0.101 251.884)",magenta:"oklch(0.692 0.062 332.665)",magentaFill:"oklch(0.692 0.062 332.665)",magentaFillHover:"oklch(0.692 0.062 332.665)",magentaFillPressed:"oklch(0.692 0.062 332.665)",magentaFillBright:"oklch(0.692 0.062 332.665)",magentaForeground:"oklch(0.692 0.062 332.665)",magentaForegroundHover:"oklch(0.692 0.062 332.665)",magentaForegroundBright:"oklch(0.692 0.062 332.665)",purple:"oklch(0.679 0.156 286.998)",purpleFill:"oklch(0.679 0.156 286.998)",purpleFillHover:"oklch(0.679 0.156 286.998)",purpleFillPressed:"oklch(0.679 0.156 286.998)",purpleFillBright:"oklch(0.679 0.156 286.998)",purpleForeground:"oklch(0.679 0.156 286.998)",purpleForegroundHover:"oklch(0.679 0.156 286.998)",purpleForegroundBright:"oklch(0.679 0.156 286.998)",brown:"oklch(0.657 0.065 63.061)",brownFill:"oklch(0.657 0.065 63.061)",brownFillHover:"oklch(0.657 0.065 63.061)",brownFillPressed:"oklch(0.657 0.065 63.061)",brownFillBright:"oklch(0.657 0.065 63.061)",brownForeground:"oklch(0.657 0.065 63.061)",brownForegroundHover:"oklch(0.657 0.065 63.061)",brownForegroundBright:"oklch(0.657 0.065 63.061)",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)"},nse={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)",onPrimary:"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)",successFill:"oklch(0.479 0.116 156.327)",successFillHover:"oklch(0.479 0.116 156.327)",successFillPressed:"oklch(0.479 0.116 156.327)",successFillBright:"oklch(0.479 0.116 156.327)",successForeground:"oklch(0.479 0.116 156.327)",successForegroundHover:"oklch(0.479 0.116 156.327)",successForegroundBright:"oklch(0.479 0.116 156.327)",warn:"oklch(0.567 0.123 69.543)",warnFill:"oklch(0.567 0.123 69.543)",warnFillHover:"oklch(0.567 0.123 69.543)",warnFillPressed:"oklch(0.567 0.123 69.543)",warnFillBright:"oklch(0.567 0.123 69.543)",warnForeground:"oklch(0.567 0.123 69.543)",warnForegroundHover:"oklch(0.567 0.123 69.543)",warnForegroundBright:"oklch(0.567 0.123 69.543)",danger:"oklch(0.518 0.196 14.313)",dangerFill:"oklch(0.518 0.196 14.313)",dangerFillHover:"oklch(0.518 0.196 14.313)",dangerFillPressed:"oklch(0.518 0.196 14.313)",dangerFillBright:"oklch(0.518 0.196 14.313)",dangerForeground:"oklch(0.518 0.196 14.313)",dangerForegroundHover:"oklch(0.518 0.196 14.313)",dangerForegroundBright:"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)",redFill:"oklch(0.518 0.196 14.313)",redFillHover:"oklch(0.518 0.196 14.313)",redFillPressed:"oklch(0.518 0.196 14.313)",redFillBright:"oklch(0.518 0.196 14.313)",redForeground:"oklch(0.518 0.196 14.313)",redForegroundHover:"oklch(0.518 0.196 14.313)",redForegroundBright:"oklch(0.518 0.196 14.313)",orange:"oklch(0.576 0.183 39.534)",orangeFill:"oklch(0.576 0.183 39.534)",orangeFillHover:"oklch(0.576 0.183 39.534)",orangeFillPressed:"oklch(0.576 0.183 39.534)",orangeFillBright:"oklch(0.576 0.183 39.534)",orangeForeground:"oklch(0.576 0.183 39.534)",orangeForegroundHover:"oklch(0.576 0.183 39.534)",orangeForegroundBright:"oklch(0.576 0.183 39.534)",yellow:"oklch(0.567 0.123 69.543)",yellowFill:"oklch(0.567 0.123 69.543)",yellowFillHover:"oklch(0.567 0.123 69.543)",yellowFillPressed:"oklch(0.567 0.123 69.543)",yellowFillBright:"oklch(0.567 0.123 69.543)",yellowForeground:"oklch(0.567 0.123 69.543)",yellowForegroundHover:"oklch(0.567 0.123 69.543)",yellowForegroundBright:"oklch(0.567 0.123 69.543)",green:"oklch(0.479 0.116 156.327)",greenFill:"oklch(0.479 0.116 156.327)",greenFillHover:"oklch(0.479 0.116 156.327)",greenFillPressed:"oklch(0.479 0.116 156.327)",greenFillBright:"oklch(0.479 0.116 156.327)",greenForeground:"oklch(0.479 0.116 156.327)",greenForegroundHover:"oklch(0.479 0.116 156.327)",greenForegroundBright:"oklch(0.479 0.116 156.327)",cyan:"oklch(0.487 0.077 204.607)",cyanFill:"oklch(0.487 0.077 204.607)",cyanFillHover:"oklch(0.487 0.077 204.607)",cyanFillPressed:"oklch(0.487 0.077 204.607)",cyanFillBright:"oklch(0.487 0.077 204.607)",cyanForeground:"oklch(0.487 0.077 204.607)",cyanForegroundHover:"oklch(0.487 0.077 204.607)",cyanForegroundBright:"oklch(0.487 0.077 204.607)",blue:"oklch(0.561 0.137 249.943)",blueFill:"oklch(0.561 0.137 249.943)",blueFillHover:"oklch(0.561 0.137 249.943)",blueFillPressed:"oklch(0.561 0.137 249.943)",blueFillBright:"oklch(0.561 0.137 249.943)",blueForeground:"oklch(0.561 0.137 249.943)",blueForegroundHover:"oklch(0.561 0.137 249.943)",blueForegroundBright:"oklch(0.561 0.137 249.943)",magenta:"oklch(0.449 0.176 345.345)",magentaFill:"oklch(0.449 0.176 345.345)",magentaFillHover:"oklch(0.449 0.176 345.345)",magentaFillPressed:"oklch(0.449 0.176 345.345)",magentaFillBright:"oklch(0.449 0.176 345.345)",magentaForeground:"oklch(0.449 0.176 345.345)",magentaForegroundHover:"oklch(0.449 0.176 345.345)",magentaForegroundBright:"oklch(0.449 0.176 345.345)",purple:"oklch(0.572 0.154 287.656)",purpleFill:"oklch(0.572 0.154 287.656)",purpleFillHover:"oklch(0.572 0.154 287.656)",purpleFillPressed:"oklch(0.572 0.154 287.656)",purpleFillBright:"oklch(0.572 0.154 287.656)",purpleForeground:"oklch(0.572 0.154 287.656)",purpleForegroundHover:"oklch(0.572 0.154 287.656)",purpleForegroundBright:"oklch(0.572 0.154 287.656)",brown:"oklch(0.459 0.068 62.329)",brownFill:"oklch(0.459 0.068 62.329)",brownFillHover:"oklch(0.459 0.068 62.329)",brownFillPressed:"oklch(0.459 0.068 62.329)",brownFillBright:"oklch(0.459 0.068 62.329)",brownForeground:"oklch(0.459 0.068 62.329)",brownForegroundHover:"oklch(0.459 0.068 62.329)",brownForegroundBright:"oklch(0.459 0.068 62.329)",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)"},OD=["sidebar","chrome","editor","base","accent","onPrimary","brand","focus","success","successFill","successFillHover","successFillPressed","successFillBright","successForeground","successForegroundHover","successForegroundBright","warn","warnFill","warnFillHover","warnFillPressed","warnFillBright","warnForeground","warnForegroundHover","warnForegroundBright","danger","dangerFill","dangerFillHover","dangerFillPressed","dangerFillBright","dangerForeground","dangerForegroundHover","dangerForegroundBright","added","modified","removed","untracked","terminalAnsiBlack","terminalAnsiRed","terminalAnsiYellow","terminalAnsiGreen","terminalAnsiCyan","terminalAnsiBlue","terminalAnsiMagenta","terminalAnsiWhite","terminalAnsiBrightBlack","terminalAnsiBrightRed","terminalAnsiBrightYellow","terminalAnsiBrightGreen","terminalAnsiBrightCyan","terminalAnsiBrightBlue","terminalAnsiBrightMagenta","terminalAnsiBrightWhite","red","redFill","redFillHover","redFillPressed","redFillBright","redForeground","redForegroundHover","redForegroundBright","orange","orangeFill","orangeFillHover","orangeFillPressed","orangeFillBright","orangeForeground","orangeForegroundHover","orangeForegroundBright","yellow","yellowFill","yellowFillHover","yellowFillPressed","yellowFillBright","yellowForeground","yellowForegroundHover","yellowForegroundBright","green","greenFill","greenFillHover","greenFillPressed","greenFillBright","greenForeground","greenForegroundHover","greenForegroundBright","cyan","cyanFill","cyanFillHover","cyanFillPressed","cyanFillBright","cyanForeground","cyanForegroundHover","cyanForegroundBright","blue","blueFill","blueFillHover","blueFillPressed","blueFillBright","blueForeground","blueForegroundHover","blueForegroundBright","magenta","magentaFill","magentaFillHover","magentaFillPressed","magentaFillBright","magentaForeground","magentaForegroundHover","magentaForegroundBright","purple","purpleFill","purpleFillHover","purpleFillPressed","purpleFillBright","purpleForeground","purpleForegroundHover","purpleForegroundBright","brown","brownFill","brownFillHover","brownFillPressed","brownFillBright","brownForeground","brownForegroundHover","brownForegroundBright","diffAddedLineBackground","diffAddedTextBackground","diffRemovedLineBackground","diffRemovedTextBackground"];function rse(e){const t={};for(const n of OD){const r=e[n],s=Yc(n);t[s]=r}return t}function ise(e){return e.highContrast?e.appearance==="light"?"lightHighContrast":"darkHighContrast":e.appearance}const sse={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 ose(e,t,n){const r=sse[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 ase={red:"red",orange:"orange",yellow:"yellow",green:"green",cyan:"cyan",blue:"blue",magenta:"magenta",purple:"violet"};function lse(e){return Object.keys(e)}const use=lse(ase),cse=["added","modified","removed","untracked"],fse=["danger","success","warning"],dse={danger:"danger",success:"success",warning:"warn"},$x=["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 pse(){return use.flatMap(e=>{const t=ma(e);return[...$x.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 hse(){return cse.flatMap(e=>{const t=ma(e);return[...$x.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 mse(){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 gse(){return fse.flatMap(e=>{const t=ma(e);return[...$x.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 ID=[...pse(),...hse(),...mse(),...gse()];function bse(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 YC={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 yse(e,t,n,r){return YC[bse(e)][t]?.[n]??YC.all[t]?.[n]??ose(t,n,r)}function vse(e){return e==="danger"||e==="success"||e==="warning"?dse[e]:e}function xse(e,t,n,r){const s=yse(e,t,n,r),a=vse(e);return s>=100?{op:"ref",ref:a}:{op:"mixTransparent",ref:a,percent:s}}function kse(e){return e==="dark"||e==="darkHighContrast"?"dark":"light"}function Sse(e,t){return JSON.stringify(e)===JSON.stringify(t)}function Pv(e){const t=kse(e);return Object.fromEntries(ID.map(n=>[n.key,xse(n.hue,n.role,n.level,t)]))}function wse(e){return Pv(e)}function Ly(e){const t=Pv("light"),n=Pv(e);return Object.fromEntries(ID.flatMap(r=>{const s=n[r.key];return s===void 0||Sse(t[r.key]??s,s)?[]:[[r.key,s]]}))}new Set(OD);const Ese=wse("light"),Tse={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"},textOnPrimary:{op:"ref",ref:"onPrimary"},textOnPrimarySecondary:{op:"mixTransparent",ref:"onPrimary",percent:74},...Ese,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"},iconOnPrimary:{op:"ref",ref:"onPrimary"},iconOnPrimarySecondary:{op:"mixTransparent",ref:"onPrimary",percent:66},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:"textOnPrimary"},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"}},XC={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}},Rse={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:{...Ly("dark")},lightHighContrast:{...Ly("lightHighContrast"),...XC},darkHighContrast:{...Ly("darkHighContrast"),...XC}};function ei(e){return`var(--cursor-${Yc(e)})`}function Cse(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} ${ei(e.shadowToken)}`:`${t}${n} color-mix(in srgb, ${ei("shadowPrimary")} ${e.primaryMixPercent}%, transparent)`}function _se(e){return e.map(t=>Cse(t)).join(", ")}function Ase(e){switch(e.op){case"mixTransparent":case"mixTransparentOverlay":return`color-mix(in srgb, ${ei(e.ref)} ${e.percent}%, transparent)`;case"mixTwo":return`color-mix(in srgb, ${ei(e.k1)} ${e.p1}%, ${ei(e.k2)})`;case"mixTwoOklab":return`color-mix(in oklab, ${ei(e.k1)} ${e.p1}%, ${ei(e.k2)})`;case"mixWhiteRef":return`color-mix(in srgb, ${ei(e.ref)} ${e.colorPercent}%, white)`;case"mixBlackRef":return`color-mix(in srgb, ${ei(e.ref)} ${e.colorPercent}%, black)`;case"mixBlackChrome":return`color-mix(in srgb, oklch(0 0 0) ${e.blackPercent}%, ${ei("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, ${ei(e.ref)} ${e.fadePercent}%, transparent)`:ei(e.ref);case"shadow":return _se(e.candidates);case"mixTransparentAlpha":return`color-mix(in srgb, ${ei(e.key)} ${e.percent}%, transparent)`;default:return e}}function Nse(e){const t=Rse[e];return Object.entries(Tse).map(([n,r])=>({name:Yc(n),expr:t[n]??r}))}function Ose(e){const t=Nse(e),n=[];for(const{name:r,expr:s}of t)n.push(` --cursor-${r}: ${Ase(s)};`);return n}function Ise(e){const t=rse(e),n=ese(t," "),r=ise(e),s=Ose(r).join(`
|
|
63
|
+
`);return`:root {
|
|
64
|
+
${n.join(`
|
|
65
|
+
`)}
|
|
66
|
+
}
|
|
67
|
+
:root {
|
|
68
|
+
${s}
|
|
69
|
+
}`}const $v={fontFamily:ey.fontFamily,scrollbar:ey.scrollbar,syntax:ey.syntax},Mse=[{key:"fontFamily",cssMid:"font-family"},{key:"scrollbar",cssMid:"scrollbar"},{key:"syntax",cssMid:"syntax"}];function Dse(e,t){const n=Yc(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(` ${Dse(e,s)}: ${l};`)}}function Lse(e={}){const t=e.selector??":root",n=e.theme??$v,r=[`${t} {`];for(const{key:s,cssMid:a}of Mse)for(const[l,c]of Object.entries(n[s]))r.push(` --cursor-${a}-${Yc(l)}: ${c};`);return bs("duration",ev,r,"ms"),bs("easing",TO,r),bs("spacing",W9,r,"px"),bs("radius",K9,r,"px"),bs("height",Y9,r,"px"),bs("font-size",X9,r,"px"),bs("line-height",Z9,r,"px"),bs("letter-spacing",Q9,r,"px"),bs("elevation",G9,r),r.push("}"),r.join(`
|
|
70
|
+
`)}function jse(e){const t=Ise(e.core),n=Lse(e.nonColor);return`${t}
|
|
71
|
+
${n}`}function zse(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 Pse(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 $se(e,t){const n=`${e} ${t}`.toLowerCase();return n.includes("mac")?"mac":n.includes("win")?"windows":"linux"}function Fse(e){return Pse(e.platform,zse(e.locale))}function Bse(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 ZC="agent-serve-cursor-theme",MD="agent-serve.playground.theme";function DD(){try{return localStorage.getItem(MD)}catch{return null}}function Use(){return typeof window>"u"||typeof window.matchMedia!="function"?!0:window.matchMedia("(prefers-color-scheme: dark)").matches}function Hse(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:DD();return r==="light"||r==="dark"?r:(t.prefersDark!==void 0?t.prefersDark:Use())?"dark":"light"}function Fv(e){const t=document.documentElement;t.dataset.theme=e==="light"?"cursor-light":"cursor-dark",t.style.colorScheme=e;const n=$se(navigator.userAgent,navigator.platform),r=jse({core:e==="light"?nse:tse,nonColor:{theme:{...$v,fontFamily:{...$v.fontFamily,sans:Fse({platform:n,locale:navigator.language}),mono:Bse(n)}}}});let s=document.getElementById(ZC);s==null&&(s=document.createElement("style"),s.id=ZC,document.head.appendChild(s)),s.textContent=r}function qse(){return document.documentElement.dataset.theme==="cursor-light"?"light":"dark"}function Vse(e){try{localStorage.setItem(MD,e)}catch{}try{const t=new URL(window.location.href);t.searchParams.set("theme",e),history.replaceState(null,"",t.toString())}catch{}Fv(e)}function Gse(e=window.location.search){if(Fv(Hse(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=DD();s==="light"||s==="dark"||Fv(t.matches?"dark":"light")};return t.addEventListener("change",n),()=>t.removeEventListener("change",n)}function Wse(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>t.disconnect()}function Kse(){return v.useSyncExternalStore(Wse,qse,()=>"dark")}function QC({title:e="Playground",onNewChat:t}){const n=Kse(),r=$e(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(vr,{icon:n==="dark"?"sun":"moon",size:"lg","aria-label":n==="dark"?"Switch to light theme":"Switch to dark theme",onClick:()=>Vse(n==="dark"?"light":"dark")})]}),g.jsxs("div",{className:"pg-overview-header__actions",children:[t?g.jsx(yn,{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(NH,{icon:"layout-sidebar-right",size:"lg","aria-label":r?"Close chat panel":"Open chat panel",pressed:r,onPressedChange:s=>Ye.setChatPanelOpen(s)})})]})]})}function Yse(){const e=$e(t=>t.toast);return e?g.jsx("div",{className:"pg-toast",role:"status","aria-live":"polite",children:e}):null}const Xse=/\b([\w.-]+)\/([\w.-]+)#(\d+)\b/,Zse=/https?:\/\/(?:www\.)?github\.com\/([\w.-]+)\/([\w.-]+)\/pull\/(\d+)/i;function Qse(e){const t=eoe(e.externalUrl),n=JC(e.prUrl)??JC(e.externalUrl)??Jse(e.title);return{slack:t,github:n!==void 0&&n!==t?n:void 0}}function Jse(e){const n=e.match(Zse)??e.match(Xse);if(n!==null)return`https://github.com/${n[1]}/${n[2]}/pull/${n[3]}`}function eoe(e){if(!(e===null||e===""||!noe(e)||aM(e)))return toe(e)?e:void 0}function JC(e){if(!(e==null||e===""))return aM(e)?e:void 0}function toe(e){try{const t=new URL(e).hostname.toLowerCase();return t==="slack.com"||t.endsWith(".slack.com")}catch{return!1}}function noe(e){return e.startsWith("https://")||e.startsWith("http://")}const roe=[{value:"overview",label:"Overview"},{value:"chat",label:"Chat"},{value:"trace",label:"Trace"},{value:"raw",label:"Raw"},{value:"evals",label:"Evals"},{value:"artifacts",label:"Artifacts"}],LD="(max-width: 640px)";function ioe(e){const t=window.matchMedia(LD);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function soe(){return v.useSyncExternalStore(ioe,()=>window.matchMedia(LD).matches)}function ooe(){const e=$e(C=>C.barTitle),t=$e(C=>C.barId),n=$e(C=>C.externalUrl),r=$e(C=>C.current),s=$e(C=>C.view),a=$e(C=>C.authToken),l=$e(C=>C.aliasHosted),c=$e(C=>C.embedded),d=$e(C=>C.evalNavReturn),f=$e(C=>C.evalRun),h=$e(C=>C.info),m=soe(),b=dD(roe,h,s),y=r?.sessionId??null,k=d&&s!=="evals"&&f!==null,S=Qse({title:e,externalUrl:n,prUrl:r?.prUrl}),T=S.slack,R=S.github,E=async()=>{if(y)try{const C=await Ye.api.eventsText(y);if(!C.ok){Ye.toast(`Download failed (${C.status})`);return}const D=await C.blob(),N=URL.createObjectURL(D),M=document.createElement("a");M.href=N,M.download=`${y}.events.ndjson`,M.target="_self",document.body.appendChild(M),M.click(),M.remove(),URL.revokeObjectURL(N)}catch(C){Ye.toast(`Download failed: ${C instanceof Error?C.message:String(C)}`)}},_=m?g.jsx(EH,{size:"md","aria-label":"Visualization mode",value:s,onValueChange:C=>Ye.setView(C??"overview"),options:b}):g.jsx(yc,{size:"sm",variant:"compact",value:s,onValueChange:C=>Ye.setView(C),"aria-label":"Visualization mode",children:b.map(C=>g.jsx(yc.Item,{value:C.value,children:C.label},C.value))});return g.jsxs("div",{className:"pg-topbar",children:[g.jsx(vr,{icon:"arrow-left",size:"sm","aria-label":"Back to overview",onClick:()=>Ye.backToOverview()}),k?g.jsx(yn,{variant:"secondary",size:"sm",onClick:()=>Ye.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:[T!==void 0?g.jsx(pa,{className:"tlink",href:T,title:"Open the Slack thread",children:"Open in Slack"}):null,R!==void 0?g.jsx(pa,{className:"tlink",href:R,title:"Open the GitHub pull request",children:"Open in GitHub"}):null,y?g.jsx(yn,{variant:"ghost",size:"sm",onClick:()=>{E()},title:"Download this session's event log",children:"Download"}):null]}),g.jsx("span",{className:"grow"}),_,c&&(y!==null||T!==void 0||R!==void 0)?g.jsxs(ni,{children:[g.jsx(ni.Trigger,{children:g.jsx(vr,{icon:"dots-3-horizontal",size:"sm","aria-label":"More actions"})}),g.jsxs(ni.Content,{"aria-label":"Session actions",size:"sm",children:[T!==void 0?g.jsx(ni.Item,{onSelect:()=>window.open(T,"_blank","noopener,noreferrer"),children:"Open in Slack"}):null,R!==void 0?g.jsx(ni.Item,{onSelect:()=>window.open(R,"_blank","noopener,noreferrer"),children:"Open in GitHub"}):null,y!==null?g.jsx(ni.Item,{onSelect:()=>{E()},children:"Download event log"}):null]})]}):null,l?null:g.jsx("div",{className:"pg-token",children:g.jsx(nf,{type:"password",size:"md","aria-label":"Bearer token",placeholder:"Bearer token (optional)",value:a,onChange:C=>Ye.setAuthToken(C.target.value),title:"Sent as Authorization: Bearer ... on API calls"})})]})}const jD="(min-width: 1201px)";function aoe(e){const t=window.matchMedia(jD);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function loe(){return window.matchMedia(jD).matches}function uoe(){return!0}function coe(){return v.useSyncExternalStore(aoe,loe,uoe)}function foe(){const e=$e(h=>h.view),t=$e(h=>h.drawerOpen),n=$e(h=>h.aliasHosted),r=$e(h=>h.aliasToken),s=$e(h=>h.embedded),a=$e(h=>h.meta.readonly===!0),c=$e(h=>h.capabilities.composer)==="enabled"&&Ye.hasCapability(kt.sessionStart),d=coe();if(v.useEffect(()=>{Ye.boot()},[]),n&&r.trim()==="")return s?g.jsx(EW,{}):g.jsx(wW,{});const f=d||s;return g.jsxs("div",{className:"pg-app",children:[g.jsx("div",{className:"pg-main",children:f?g.jsxs("div",{className:"pg-overview-layout",children:[g.jsxs("div",{className:"pg-overview-main",children:[g.jsx(QC,{onNewChat:a||!c?void 0:()=>Ye.newChat()}),g.jsx("div",{className:"pg-overview-scroll",children:g.jsx(WC,{})})]}),g.jsx(Hie,{})]}):e==="overview"?g.jsxs("div",{className:"pg-overview-main",children:[g.jsx(QC,{onNewChat:a||!c?void 0:()=>Ye.newChat()}),g.jsx("div",{className:"pg-overview-scroll",children:g.jsx(WC,{})})]}):s?g.jsxs(g.Fragment,{children:[g.jsx(ooe,{}),g.jsxs("div",{className:"pg-columns",children:[e==="chat"?g.jsxs("div",{className:"pg-transcript-wrap",children:[g.jsx(lD,{}),g.jsx(EM,{})]}):null,e==="trace"?g.jsx(DM,{}):null,e==="raw"?g.jsx(OM,{}):null,e==="evals"?g.jsx(_M,{}):null,e==="artifacts"?g.jsx(wM,{}):null]})]}):g.jsx(Mre,{})}),t?g.jsx("button",{type:"button","aria-label":"Close agent surface",className:"pg-drawer-backdrop",onClick:()=>Ye.setDrawerOpen(!1)}):null,g.jsx($re,{}),g.jsx(Yse,{})]})}Gse();CW();const zD=document.getElementById("root");if(zD===null)throw new Error("Playground bootstrap failed: #root element is missing.");Xj.createRoot(zD).render(g.jsx(v.StrictMode,{children:g.jsx(Is,{menuSize:"md",children:g.jsx(foe,{})})}));
|