@openscout/scout 0.2.80 → 0.2.82
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/README.md +1 -1
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +4 -4
- package/dist/client/assets/ActivityScreen-aewI4Ul1.js +1 -0
- package/dist/client/assets/{AddProjectForm-CtEiLQnm.js → AddProjectForm-Czb5uwou.js} +1 -1
- package/dist/client/assets/{AgentAvatar-CszU5eaU.js → AgentAvatar-DMov24_o.js} +1 -1
- package/dist/client/assets/AgentConfigurationScreen-BjG6ECjl.js +1 -0
- package/dist/client/assets/AgentDefinitionsWorkspace-D4MbSMXp.js +1 -0
- package/dist/client/assets/{AgentDetailCard-sZuHl1de.js → AgentDetailCard-Biq8b2gv.js} +1 -1
- package/dist/client/assets/AgentFloorView-h9KDJdw0.js +1 -0
- package/dist/client/assets/AgentInfoScreen-SjhK_SBh.js +1 -0
- package/dist/client/assets/{AgentLaneCard-nB68f2CI.js → AgentLaneCard-C4DMQR-c.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-O9Yf0uR-.js → AgentLaneChrome-D1xNNf7A.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-BfhpaEQ3.js → AgentLaneDetailSheet-DnAKe4e3.js} +1 -1
- package/dist/client/assets/{AgentLaneSummaryResize-Ct3b0TQR.js → AgentLaneSummaryResize-C9loK-st.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-BNOYF16R.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-DNGvZvjd.js → AgentLanesPreflight-M7iDXdP2.js} +1 -1
- package/dist/client/assets/{AgentLanesView-DqRK5-d2.js → AgentLanesView-Ct-Gz5WD.js} +1 -1
- package/dist/client/assets/{AgentLiveActions-DI4ooSHW.js → AgentLiveActions-0iy8QZ1T.js} +1 -1
- package/dist/client/assets/{AgentSessions-BxWIPkWh.js → AgentSessions-CDfSfNiE.js} +2 -2
- package/dist/client/assets/{AgentsConsole-D6VHSCfZ.js → AgentsConsole-BVxhBqRa.js} +1 -1
- package/dist/client/assets/AgentsScreen-Bww6HgFs.js +1 -0
- package/dist/client/assets/AgentsSubnav-CiIuzxnZ.js +1 -0
- package/dist/client/assets/{AtopView-VZkk40v0.js → AtopView-h_aFoNkP.js} +1 -1
- package/dist/client/assets/BackToPicker-BXp5E2ck.js +1 -0
- package/dist/client/assets/{BriefingDetailScreen-BZU4qMwE.js → BriefingDetailScreen-C83o2YfN.js} +1 -1
- package/dist/client/assets/{BriefingsScreen-Bfc3tqPp.js → BriefingsScreen-BTsvr5fv.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-CaFe6kdh.js → BrokerMetadataPanel-jg7odHQp.js} +1 -1
- package/dist/client/assets/BrokerScreen-DplF8d_X.js +5 -0
- package/dist/client/assets/Canvas-BePL08RR.js +1 -0
- package/dist/client/assets/{ChatCollapsedStrip-Cov54p9V.js → ChatCollapsedStrip-BRljIymi.js} +1 -1
- package/dist/client/assets/{CodeDiffPane-C1ebFt-Y.js → CodeDiffPane-86odpBSt.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-tsCly-f3.js → CodeProjectPicker-8svr_S_A.js} +1 -1
- package/dist/client/assets/{CodeScreen-D0hpZNLP.js → CodeScreen-CJ2RgB32.js} +1 -1
- package/dist/client/assets/{ContextMenu-N-Z6X0Z1.js → ContextMenu-CxkmFQcN.js} +1 -1
- package/dist/client/assets/{ConversationComposer-CiEF7dhd.js → ConversationComposer-CWohCCmn.js} +1 -1
- package/dist/client/assets/ConversationFeedRows-IWh0JSIL.js +1 -0
- package/dist/client/assets/{ConversationHeader-BGgbITvr.js → ConversationHeader-BxTzXl8e.js} +1 -1
- package/dist/client/assets/ConversationPanels-D9UCwNkS.js +2 -0
- package/dist/client/assets/ConversationScreen-oZSitVtX.js +1 -0
- package/dist/client/assets/{ConversationStatus-COEj5loj.js → ConversationStatus-B6pAbo2w.js} +1 -1
- package/dist/client/assets/{DataTable-BoofV-_4.js → DataTable-CGw5CECG.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-OXYlMbT1.js → DispatchAftermath-DowTb7uO.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-BCG2kOmd.js → DocumentFocusViewer-DRKjNG9s.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-C2SZvrHJ.js → EmbeddableSurfacesLab-CxfJXS2g.js} +1 -1
- package/dist/client/assets/{EmptyState-DypEjx0V.js → EmptyState-BUvllvA6.js} +1 -1
- package/dist/client/assets/{FileViewerPane-CXCq-oKj.js → FileViewerPane-BM4AD_bo.js} +1 -1
- package/dist/client/assets/{FleetSearch-Dj7-CfNi.js → FleetSearch-CYeWn85V.js} +1 -1
- package/dist/client/assets/FlightObserveScreen-DYJJ3Z2B.js +1 -0
- package/dist/client/assets/{FollowScreen-DRgYuAvp.js → FollowScreen-DG0osbUp.js} +1 -1
- package/dist/client/assets/{HarnessMark-BE-YSyci.js → HarnessMark-MztYnrGK.js} +1 -1
- package/dist/client/assets/HarnessesScreen-BWqirBjK.js +1 -0
- package/dist/client/assets/{HerdrSession-DKFCJMst.js → HerdrSession-6sFln7WX.js} +1 -1
- package/dist/client/assets/{HomeHero-CAEg8Yg5.js → HomeHero-BPBArHXa.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchInspector-C2EZsQ5i.js → KnowledgeSearchInspector-BOIhFWd2.js} +1 -1
- package/dist/client/assets/KnowledgeSearchScreen-BP8tD-Bh.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-DrPXYZvQ.js → LaneToolHoverCard-CcEiQC6B.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-B4i1Ut4R.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-X4-DDFEo.js → LaneTraceEventFocus-Bl9L0EYb.js} +1 -1
- package/dist/client/assets/{MeshCanvas-rtCBD7s6.js → MeshCanvas-ZjIuMiRo.js} +1 -1
- package/dist/client/assets/{MeshCanvasMinimap-CuvXOkc7.js → MeshCanvasMinimap-C-LQtiX6.js} +1 -1
- package/dist/client/assets/MeshScreen-Bs3soujg.js +1 -0
- package/dist/client/assets/{MeshTopologyView-CeTShs-U.js → MeshTopologyView-C0LUyT3K.js} +2 -2
- package/dist/client/assets/{MessageComposerSuggestions-Cs9u-F_3.js → MessageComposerSuggestions-Dfc3PH2y.js} +1 -1
- package/dist/client/assets/MessagesScreen-TgSL5KMc.js +1 -0
- package/dist/client/assets/{MissionContextRail-0O-Zu1Tn.js → MissionContextRail-CjGAEGu8.js} +1 -1
- package/dist/client/assets/MissionControlView-D629w2A8.js +1 -0
- package/dist/client/assets/{MissionFocusOverlay-LnjmqBiW.js → MissionFocusOverlay-Bubrr8Gc.js} +1 -1
- package/dist/client/assets/{MissionLeftAgentRow-nc1Jyq3D.js → MissionLeftAgentRow-DokImu4Y.js} +1 -1
- package/dist/client/assets/{MissionLogPane-lZ9vUftY.js → MissionLogPane-Cs0LuIkn.js} +1 -1
- package/dist/client/assets/{NewAgentModal-K1cvdmZr.js → NewAgentModal-D5e0YUAo.js} +1 -1
- package/dist/client/assets/{NewChatComposer-DXDxV2Mh.js → NewChatComposer-S08F6_La.js} +1 -1
- package/dist/client/assets/{NewChatOrigin-CnjoswTG.js → NewChatOrigin-BEz6jyqf.js} +1 -1
- package/dist/client/assets/{ObserveEmbedScreen-CRpzYf0Y.js → ObserveEmbedScreen-CHx2sEAA.js} +2 -2
- package/dist/client/assets/ObserveTextFlow-_ApDwRCO.js +2 -0
- package/dist/client/assets/{ObservedTopologyPanel-C1AQM0Mq.js → ObservedTopologyPanel-ByW7Ar7p.js} +1 -1
- package/dist/client/assets/OpenScoutAppShell-DTmnbG-h.js +88 -0
- package/dist/client/assets/OpsAgentsView-DiFuHcJs.js +1 -0
- package/dist/client/assets/OpsScreen-CCR3U_9P.js +1 -0
- package/dist/client/assets/OpsSubnav-CZs_OL2N.js +1 -0
- package/dist/client/assets/{PlanView-DDXdC19M.js → PlanView-C54eAzig.js} +1 -1
- package/dist/client/assets/ProjectAgentProfile-BEfYOaxc.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-MODhG0P6.js → ProjectAgentProfileBar-B1VpwzGD.js} +1 -1
- package/dist/client/assets/{ProjectAgentProfileHero-C1ImgGDu.js → ProjectAgentProfileHero-B4f_AoCr.js} +1 -1
- package/dist/client/assets/ProjectsInbox-DoPZ17FC.js +2 -0
- package/dist/client/assets/{ProjectsRail-B1zrQLZe.js → ProjectsRail-CWOkZjsY.js} +1 -1
- package/dist/client/assets/ProjectsScreen-Dse0Q6p6.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-DMnfyPLE.js +1 -0
- package/dist/client/assets/Provider-DKZWuzSR.js +1 -0
- package/dist/client/assets/{RailRow-DerXOXQS.js → RailRow-DIGd3MMM.js} +1 -1
- package/dist/client/assets/RawSessionsTable-Zkl4YDvz.js +1 -0
- package/dist/client/assets/RealtimeVoiceScreen-B_PMJxY_.js +1 -0
- package/dist/client/assets/{RepoDiffEmbedScreen-C9oLCcZX.js → RepoDiffEmbedScreen-VLg4caej.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-CGEMAv2Z.js → RepoDiffPageScreen-BelnvgnP.js} +1 -1
- package/dist/client/assets/{RepoDiffViewer-CB8PSVey.js → RepoDiffViewer-VrUJw33u.js} +1 -1
- package/dist/client/assets/RepoDiffViewerLazy-BPg_JkYW.js +2 -0
- package/dist/client/assets/{ReposScreen-BN1lVjOj.js → ReposScreen-IINK-CFn.js} +2 -2
- package/dist/client/assets/ScoutDeckSurface-MbwGp6Ab.js +1 -0
- package/dist/client/assets/{ScoutSurface-BEnDlynn.js → ScoutSurface-x_QbcRyk.js} +1 -1
- package/dist/client/assets/ScoutbotBroadcastChip-DAKQKB25.js +2 -0
- package/dist/client/assets/{ScoutbotFxLab-fAROyIfz.js → ScoutbotFxLab-7t9JVvZg.js} +1 -1
- package/dist/client/assets/{ScoutbotRealtimeVoiceCall-CDyFJX8m.js → ScoutbotRealtimeVoiceCall-Br4bYVAx.js} +1 -1
- package/dist/client/assets/{SecondaryNav-Hv5AJ3Fv.js → SecondaryNav-Dj30epYF.js} +1 -1
- package/dist/client/assets/{SessionEmbedScreen-CDRpQc3g.js → SessionEmbedScreen-s2mJ5Fg9.js} +1 -1
- package/dist/client/assets/{SessionObserve-BmmJ8dEh.js → SessionObserve-DaUrJCMq.js} +1 -1
- package/dist/client/assets/{SessionObserveEvidence-CEedIk2a.js → SessionObserveEvidence-ClUW8jpV.js} +1 -1
- package/dist/client/assets/SessionRefScreen-DLZNFZFK.js +1 -0
- package/dist/client/assets/SessionsScreen-D-hN1n4k.js +1 -0
- package/dist/client/assets/{SettingsDrawer-DL-SVLdd.js → SettingsDrawer-BFsnww-k.js} +3 -3
- package/dist/client/assets/SettingsScreen-Bc3Xtv5V.js +1 -0
- package/dist/client/assets/{ShikiPane-B7O4if20.js → ShikiPane-Dkwyx--r.js} +1 -1
- package/dist/client/assets/{SlidePanel-B3gc5HnM.js → SlidePanel-CuTeirnk.js} +1 -1
- package/dist/client/assets/{SpriteAvatar-BpQDpOkq.js → SpriteAvatar-DQ3PTb8L.js} +1 -1
- package/dist/client/assets/{StatusPill-B33sQinT.js → StatusPill-BJ1ierIR.js} +1 -1
- package/dist/client/assets/{TailView-DL3YZkzE.js → TailView-CufWcrvf.js} +2 -2
- package/dist/client/assets/Terminal-D_OmdFmr.js +1 -0
- package/dist/client/assets/TerminalEmbedScreen-D21ytNXW.js +1 -0
- package/dist/client/assets/TerminalRelay-rvUzI9Ek.js +46 -0
- package/dist/client/assets/{TextDocumentSurface-DRjctOIt.js → TextDocumentSurface-Bc-kHPgG.js} +1 -1
- package/dist/client/assets/{TmuxPeek-DNC4uWky.js → TmuxPeek-DLyDkq_D.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-WLN0V-Xv.js → VoicePermissionsPanel-CD903y9K.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-D2Yl0mYZ.js → WorkDetailScreen-D51oI0dH.js} +2 -2
- package/dist/client/assets/{WorkFilesViewer-BbVfcUN-.js → WorkFilesViewer-BDMNbxE4.js} +1 -1
- package/dist/client/assets/{activity-BxwKkT8z.js → activity-BvGruxWG.js} +1 -1
- package/dist/client/assets/{addon-fit-B9O2vJoh.js → addon-fit-Cfq4Ayjd.js} +1 -1
- package/dist/client/assets/{addon-webgl-BhRZFDcn.js → addon-webgl-B8sIf9-s.js} +1 -1
- package/dist/client/assets/{agent-essentials-SrzMYEXV.js → agent-essentials-yb4wIJlX.js} +1 -1
- package/dist/client/assets/{agent-lane-card-model-DSWdGu-v.js → agent-lane-card-model-q4cwzLX4.js} +1 -1
- package/dist/client/assets/{agent-lanes-model-CPgQRenB.js → agent-lanes-model-VYQ5a68i.js} +1 -1
- package/dist/client/assets/{arc.es-NlJw-19N.js → arc.es-BBTfhvLE.js} +1 -1
- package/dist/client/assets/{arrow-left-_vS7itsV.js → arrow-left-BOht-YQu.js} +1 -1
- package/dist/client/assets/{arrow-up-right-CcrWONpD.js → arrow-up-right-hoR8_oUz.js} +1 -1
- package/dist/client/assets/{bot-BRINYlC6.js → bot-BUK7dOPS.js} +1 -1
- package/dist/client/assets/{check-COxArFXG.js → check--esHw52j.js} +1 -1
- package/dist/client/assets/{chevron-down-DRCbnzyY.js → chevron-down-NAhBUkFd.js} +1 -1
- package/dist/client/assets/{chevron-right-CNE6QAVr.js → chevron-right-C10o7t_X.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-CAeEKaf5.js → chunk-HRAB3GC3-DF8R9rPv.js} +1 -1
- package/dist/client/assets/{clock-CyfvRmj6.js → clock-of01sAB6.js} +1 -1
- package/dist/client/assets/{code-xml--LjSM4Mv.js → code-xml-CLn3TDWF.js} +1 -1
- package/dist/client/assets/content-B-SUUhXj.js +1 -0
- package/dist/client/assets/content-BRY2vo1_.js +1 -0
- package/dist/client/assets/content-BTm0mVyD.js +1 -0
- package/dist/client/assets/content-BTqvyb5E.js +1 -0
- package/dist/client/assets/content-BjDaXmSD.js +1 -0
- package/dist/client/assets/content-BrR6deGh.js +1 -0
- package/dist/client/assets/content-C5yvBEMy.js +1 -0
- package/dist/client/assets/content-Cgj5AWqT.js +1 -0
- package/dist/client/assets/content-CkhG__-v.js +1 -0
- package/dist/client/assets/content-CudIBsiP.js +1 -0
- package/dist/client/assets/content-DBb7ppd5.js +1 -0
- package/dist/client/assets/content-DEw_kGyK.js +1 -0
- package/dist/client/assets/content-DIy0DCzK.js +1 -0
- package/dist/client/assets/content-THl9hRAo.js +1 -0
- package/dist/client/assets/content-vi9FbmV9.js +1 -0
- package/dist/client/assets/content-wcgPMGVf.js +1 -0
- package/dist/client/assets/{conversation-icons-c-hXv7hY.js → conversation-icons-ClBJi21l.js} +1 -1
- package/dist/client/assets/conversation-motion-features-zU0k3Agz.js +1 -0
- package/dist/client/assets/{copy-4LfKIdQJ.js → copy-Dty8ZYsM.js} +1 -1
- package/dist/client/assets/{createLucideIcon-ClCdc3F9.js → createLucideIcon-Bt67PWH-.js} +1 -1
- package/dist/client/assets/discover-NDAqNvKt.js +2 -0
- package/dist/client/assets/embed-entry-BVR09F6e.js +2 -0
- package/dist/client/assets/{external-link-CnaI1QFS.js → external-link-Dem738OJ.js} +1 -1
- package/dist/client/assets/{eye-BFlhMzQL.js → eye-B3lBIwJZ.js} +1 -1
- package/dist/client/assets/{file-text-DG-pufl1.js → file-text-iF0hyVyU.js} +1 -1
- package/dist/client/assets/{home-moving-signal-aNJusIzL.js → home-moving-signal-C8dTXieA.js} +1 -1
- package/dist/client/assets/{home-now-card-BQK4EFHx.js → home-now-card-BgvVcE83.js} +1 -1
- package/dist/client/assets/{home-now-card-nano-CdtzqSIF.js → home-now-card-nano-hZl9klbP.js} +1 -1
- package/dist/client/assets/hooks-DBIezYS2.js +2 -0
- package/dist/client/assets/index-BMwKgdz_.js +1 -0
- package/dist/client/assets/index-Bu-fckyR.css +1 -0
- package/dist/client/assets/index-BxoufAPA.js +1 -0
- package/dist/client/assets/index-Cj7NnSxI.js +1 -0
- package/dist/client/assets/{index-CzVeWScw.js → index-o4FKpU7Z.js} +2 -2
- package/dist/client/assets/{inspector-panel-DgOM8nCo.js → inspector-panel-Dy2cVTCi.js} +2 -2
- package/dist/client/assets/{keyboard-nav-BJnFoFDP.js → keyboard-nav-Chf51dns.js} +1 -1
- package/dist/client/assets/{lane-roster-store-pR4ZaYQm.js → lane-roster-store-BiIVlYmG.js} +1 -1
- package/dist/client/assets/left-BC7p5QbT.js +1 -0
- package/dist/client/assets/left-BCSGqccQ.js +1 -0
- package/dist/client/assets/left-BSyj8PuJ.js +2 -0
- package/dist/client/assets/left-DDnxNUxd.js +1 -0
- package/dist/client/assets/left-DLoDKxT5.js +2 -0
- package/dist/client/assets/left-O-TBH7JB.js +1 -0
- package/dist/client/assets/left-agents-Dk9Y89lb.js +1 -0
- package/dist/client/assets/left-default-B3JBRQNJ.js +1 -0
- package/dist/client/assets/left-lanes-30Oe_3RM.js +1 -0
- package/dist/client/assets/left-mission-DEl4-7xu.js +1 -0
- package/dist/client/assets/left-plan-B4qdm4Gn.js +2 -0
- package/dist/client/assets/left-rvUOB14X.js +1 -0
- package/dist/client/assets/library-DDKSLFJ_.js +1 -0
- package/dist/client/assets/{loader-circle-Byb9kSFx.js → loader-circle-4LDsy4Ke.js} +1 -1
- package/dist/client/assets/{local-agents-DBaUbP-_.js → local-agents-DIi2EacM.js} +1 -1
- package/dist/client/assets/{mentions-fbQJ2mBI.js → mentions-CvDaviLJ.js} +1 -1
- package/dist/client/assets/{mesh-ops-Cnw3vwAu.js → mesh-ops-JZwGuAPn.js} +1 -1
- package/dist/client/assets/{mesh-view-store-Btlyc7rW.js → mesh-view-store-Du7VqIT_.js} +1 -1
- package/dist/client/assets/{message-circle-aGOfQWm2.js → message-circle-BM3XgevU.js} +1 -1
- package/dist/client/assets/{message-markup-mGF07emJ.js → message-markup-BcY1lShv.js} +1 -1
- package/dist/client/assets/{message-square-CIXda-Y7.js → message-square-ER1_q2pe.js} +1 -1
- package/dist/client/assets/{mission-control-store-CcoNeQHG.js → mission-control-store-C6w5iVfg.js} +1 -1
- package/dist/client/assets/{observe-BNFzh-7B.js → observe-3-jn4SXb.js} +1 -1
- package/dist/client/assets/{page-status-DDvNdA8s.js → page-status-0LPfBC8S.js} +1 -1
- package/dist/client/assets/{plus-CmFQp9Uj.js → plus-C-2gTcPK.js} +1 -1
- package/dist/client/assets/profile-DW80Gn5k.js +1 -0
- package/dist/client/assets/{projects-inbox-Diddml6e.js → projects-inbox-DCeD3FfV.js} +1 -1
- package/dist/client/assets/provider-BvAxRQfE.js +1 -0
- package/dist/client/assets/{radio-PauJIekM.js → radio-v7UAMZGh.js} +1 -1
- package/dist/client/assets/{refresh-cw-4oeFn1Jn.js → refresh-cw-B5To7b6B.js} +1 -1
- package/dist/client/assets/resolve-panes-BDi9Qx4R.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-HE-5eZYa.js +1 -0
- package/dist/client/assets/right-BDf_yTv6.js +1 -0
- package/dist/client/assets/{right-BcFnuse9.js → right-BvoGOUKH.js} +1 -1
- package/dist/client/assets/right-C-bgjYg-.js +1 -0
- package/dist/client/assets/right-C3JdEfYQ.js +1 -0
- package/dist/client/assets/right-CYIs2tEe.js +1 -0
- package/dist/client/assets/right-CyRCv6Up.js +1 -0
- package/dist/client/assets/right-DBYGtoRv.js +1 -0
- package/dist/client/assets/right-o3LHMiKa.js +1 -0
- package/dist/client/assets/right-oPrcx9MX.js +1 -0
- package/dist/client/assets/right-sSvBUK-j.js +1 -0
- package/dist/client/assets/{rocket-C-AskjZH.js → rocket-BQQQv2L5.js} +1 -1
- package/dist/client/assets/router-C65cZYPn.js +1 -0
- package/dist/client/assets/{runtime-picker-BCQD7d4K.js → runtime-picker-eDEvx2Mz.js} +1 -1
- package/dist/client/assets/{scope-views-BhkbIFPY.js → scope-views-BOOmgmwx.js} +1 -1
- package/dist/client/assets/{scout-voice-S5_YZ2v8.js → scout-voice-B7kXlkcl.js} +1 -1
- package/dist/client/assets/{scroll-text-BV-BB7v-.js → scroll-text-BuneRiAD.js} +1 -1
- package/dist/client/assets/{search-C3bSJluv.js → search-7_n7CxWl.js} +1 -1
- package/dist/client/assets/{secondaryNavConfig-Bg4Tc0gT.js → secondaryNavConfig-CSFDCQAf.js} +1 -1
- package/dist/client/assets/{selection-bridge-B1dmkX3P.js → selection-bridge-SlGsgHw2.js} +1 -1
- package/dist/client/assets/{send-horizontal-CqogPmbY.js → send-horizontal-DP16OOIW.js} +1 -1
- package/dist/client/assets/{server-Brw5Y1Gh.js → server-pYOMFjrT.js} +1 -1
- package/dist/client/assets/{session-catalog-9FqXmjBw.js → session-catalog-_QfQ7fhZ.js} +1 -1
- package/dist/client/assets/{session-table-1xdSxSXq.js → session-table-CYN8e4s3.js} +1 -1
- package/dist/client/assets/{sliders-horizontal-CUiOH26y.js → sliders-horizontal-D2Z8gz6J.js} +1 -1
- package/dist/client/assets/{sparkles-BjCA3Evu.js → sparkles-Bth2iK7t.js} +1 -1
- package/dist/client/assets/{sse-QcU9bikk.js → sse-CL6gctHY.js} +1 -1
- package/dist/client/assets/{tail-events-C6K7bCWB.js → tail-events-NLIWLq27.js} +1 -1
- package/dist/client/assets/{terminal-DrTkVXIj.js → terminal-By1Lw2i2.js} +1 -1
- package/dist/client/assets/{terminal-relay-BkXjjSkq.js → terminal-relay-CjkI5aUy.js} +1 -1
- package/dist/client/assets/{terminal-sessions-C3qU8tnY.js → terminal-sessions-AmSgHklm.js} +1 -1
- package/dist/client/assets/{terminal-takeover-KvmTwABa.js → terminal-takeover-7AvNpnkC.js} +1 -1
- package/dist/client/assets/{use-conversation-list-C5sF6WBR.js → use-conversation-list-BCzY032j.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-BOMPW0nl.js → use-fleet-active-asks-CJ6-oj5k.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-Co05vcTV.js → use-mesh-ops-items-D5L-CKe_.js} +1 -1
- package/dist/client/assets/use-reduced-motion-CqXpVXv-.js +1 -0
- package/dist/client/assets/use-scout-dev-flags-BohC8seq.js +1 -0
- package/dist/client/assets/{useAgentHoverCard-FtCmY-b9.js → useAgentHoverCard-RsLUYyeh.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-DOr5yHbT.js +1 -0
- package/dist/client/assets/usePersistentState-D3M4m2Ou.js +1 -0
- package/dist/client/assets/{usePierreRuntime-Bo4lD7Ui.js → usePierreRuntime-B4hbNWTz.js} +1 -1
- package/dist/client/assets/{wrench-CeCdjiPF.js → wrench-M4G7WtYB.js} +1 -1
- package/dist/client/assets/{x-D4X_y1j_.js → x-ynOfVadO.js} +1 -1
- package/dist/client/assets/{xterm-D2a5wrkJ.js → xterm-DZHyijPp.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/main.mjs +41 -26
- package/dist/node/main.mjs +19 -5
- package/dist/pairing-runtime-controller.mjs +2 -2
- package/dist/runtime/broker-daemon.mjs +2 -2
- package/dist/scout-control-plane-web.mjs +21 -7
- package/dist/scout-web-server.mjs +21 -7
- package/package.json +4 -4
- package/dist/client/assets/ActivityScreen-BXm6nJ6L.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-CfBXxrsD.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-4Z0aN8AR.js +0 -1
- package/dist/client/assets/AgentFloorView-DMivAYHU.js +0 -1
- package/dist/client/assets/AgentInfoScreen-CPkLg1pK.js +0 -1
- package/dist/client/assets/AgentLanesEmbedScreen-CjHMvy3v.js +0 -1
- package/dist/client/assets/AgentsScreen-zR6b2bUL.js +0 -1
- package/dist/client/assets/AgentsSubnav-q0xcZi6C.js +0 -1
- package/dist/client/assets/BackToPicker-DZg_4nHL.js +0 -1
- package/dist/client/assets/BrokerScreen-Chh8sGen.js +0 -5
- package/dist/client/assets/ConversationFeedRows-5it6QNBV.js +0 -1
- package/dist/client/assets/ConversationPanels-vI9YuQJh.js +0 -2
- package/dist/client/assets/ConversationScreen-C-PrCRz1.js +0 -1
- package/dist/client/assets/FlightObserveScreen-Yq5NtQQJ.js +0 -1
- package/dist/client/assets/HarnessesScreen-L-emPcXd.js +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-DvdOFh-b.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-Dl7foF88.js +0 -1
- package/dist/client/assets/MeshScreen-D5zzTn0o.js +0 -1
- package/dist/client/assets/MessagesScreen-BhOJ7_tj.js +0 -1
- package/dist/client/assets/MissionControlView-D2JO9u-y.js +0 -1
- package/dist/client/assets/ObserveTextFlow-DJxQc2H6.js +0 -2
- package/dist/client/assets/OpenScoutAppShell-DrHYD_pd.js +0 -87
- package/dist/client/assets/OpsAgentsView-BnMX0vEY.js +0 -1
- package/dist/client/assets/OpsScreen-BeC0lieE.js +0 -1
- package/dist/client/assets/OpsSubnav-D5Bpowtk.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-zE1cApxw.js +0 -1
- package/dist/client/assets/ProjectsInbox-C3Jd6JTk.js +0 -2
- package/dist/client/assets/ProjectsScreen-PW_NH5VK.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-DaCEUWN1.js +0 -1
- package/dist/client/assets/Provider-DSsb2gLR.js +0 -1
- package/dist/client/assets/RawSessionsTable-LWEvXJzj.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-XtxbCjOs.js +0 -1
- package/dist/client/assets/RepoDiffViewerLazy-DIxkiMto.js +0 -2
- package/dist/client/assets/ScoutDeckSurface-BCpl0QCx.js +0 -1
- package/dist/client/assets/ScoutbotBroadcastChip-z9R_pC_U.js +0 -2
- package/dist/client/assets/SessionRefScreen-Dk-O4OVt.js +0 -1
- package/dist/client/assets/SessionsScreen-BJEjuo2X.js +0 -1
- package/dist/client/assets/SettingsScreen-DJ-BhBwR.js +0 -1
- package/dist/client/assets/Terminal-Dp1FSGIS.js +0 -1
- package/dist/client/assets/TerminalEmbedScreen-DP9IM4xf.js +0 -1
- package/dist/client/assets/arrow-down-D3-IbArq.js +0 -1
- package/dist/client/assets/chunk-JTPDIGGW-s6WbxdjC.js +0 -46
- package/dist/client/assets/chunk-T65CQEWV-CiZ_ICHW.js +0 -1
- package/dist/client/assets/chunk-YOZR3KYS-DLOc92uD.js +0 -2
- package/dist/client/assets/content-7ZeCPAEt.js +0 -1
- package/dist/client/assets/content-BHUcUCH5.js +0 -1
- package/dist/client/assets/content-BUhvLPkv.js +0 -1
- package/dist/client/assets/content-BomQ5YWo.js +0 -1
- package/dist/client/assets/content-C39ELNgC.js +0 -1
- package/dist/client/assets/content-C4RYKHut.js +0 -1
- package/dist/client/assets/content-CCiZfG4H.js +0 -1
- package/dist/client/assets/content-CDpDtVI-.js +0 -1
- package/dist/client/assets/content-CO-9CeFd.js +0 -1
- package/dist/client/assets/content-CuOLxp1x.js +0 -1
- package/dist/client/assets/content-CvtLIjXS.js +0 -1
- package/dist/client/assets/content-CzwTUb9n.js +0 -1
- package/dist/client/assets/content-DQXbo2RO.js +0 -1
- package/dist/client/assets/content-DRTQ9QQb.js +0 -1
- package/dist/client/assets/content-LCELs6zg.js +0 -1
- package/dist/client/assets/content-qsDjA4Au.js +0 -1
- package/dist/client/assets/conversation-motion-features-T8vF9zED.js +0 -1
- package/dist/client/assets/discover-7Ks00w-M.js +0 -2
- package/dist/client/assets/embed-entry-n2ThmSSX.js +0 -2
- package/dist/client/assets/gestures-CxG3Dphs.js +0 -1
- package/dist/client/assets/hooks-Dst1TH7n.js +0 -2
- package/dist/client/assets/index-9as_JTUs.css +0 -1
- package/dist/client/assets/index-CU9dtwJk.js +0 -1
- package/dist/client/assets/index-Dewd56RX.js +0 -1
- package/dist/client/assets/index-_YQXKEhb.js +0 -1
- package/dist/client/assets/left-BhzPp-_E.js +0 -1
- package/dist/client/assets/left-CN1MABD0.js +0 -2
- package/dist/client/assets/left-DDgbsio7.js +0 -1
- package/dist/client/assets/left-Dpf2R9uD.js +0 -1
- package/dist/client/assets/left-HwwbMVtl.js +0 -2
- package/dist/client/assets/left-YfH0daht.js +0 -1
- package/dist/client/assets/left-agents-CYUwAy2Z.js +0 -1
- package/dist/client/assets/left-default-vEGZALPv.js +0 -1
- package/dist/client/assets/left-lanes-bphF-vlX.js +0 -1
- package/dist/client/assets/left-mission-B54-c3hq.js +0 -1
- package/dist/client/assets/left-np5USKqG.js +0 -1
- package/dist/client/assets/left-plan-BNBuDoPQ.js +0 -2
- package/dist/client/assets/library-DbCVJG_O.js +0 -1
- package/dist/client/assets/paperclip-DfpJkR4s.js +0 -1
- package/dist/client/assets/profile-s3KRbip1.js +0 -1
- package/dist/client/assets/resolve-panes-cp6eNewO.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-Dbo-5PWx.js +0 -1
- package/dist/client/assets/right-09W2JJFg.js +0 -1
- package/dist/client/assets/right-B-MKhiJ6.js +0 -1
- package/dist/client/assets/right-B91Zl8lQ.js +0 -1
- package/dist/client/assets/right-BdtMzn35.js +0 -1
- package/dist/client/assets/right-BqmKXLtf.js +0 -1
- package/dist/client/assets/right-BzeB-Dpt.js +0 -1
- package/dist/client/assets/right-CkGOs-sq.js +0 -1
- package/dist/client/assets/right-CzGiNBzB.js +0 -1
- package/dist/client/assets/right-Dc7uqv7l.js +0 -1
- package/dist/client/assets/router-B-K15T7B.js +0 -1
- package/dist/client/assets/use-reduced-motion-Dla-G_Jz.js +0 -1
- package/dist/client/assets/use-scout-dev-flags-BOQF3fW2.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-BX7Sq7vy.js +0 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import{i as t6,N as Ja,r as a,g as cx,j as h,F as Qa}from"./index-o4FKpU7Z.js";import{u as Tt}from"./usePersistentState-D3M4m2Ou.js";import{a as Qs,u as n6,T as r6,b as o6,H as s6}from"./TerminalRelay-rvUzI9Ek.js";import{C as i6}from"./Canvas-BePL08RR.js";import{r as Lt}from"./index-BMwKgdz_.js";import{b as a6,u as $o,F as c6}from"./provider-BvAxRQfE.js";import{at as l6,u as lx,T as u6,d as ux,J as d6,L as dx,M as f6,N as p6,O as m6}from"./router-C65cZYPn.js";import{u as fx,i as px,d as h6,e as g6,c as v6,f as b6}from"./keyboard-nav-Chf51dns.js";import{i as da,u as mx}from"./use-scout-dev-flags-BohC8seq.js";import{X as Ip}from"./x-ynOfVadO.js";import{c as Xr}from"./createLucideIcon-Bt67PWH-.js";import{s as y6,S as w6,d as x6}from"./scope-views-BOOmgmwx.js";import{a as hx,b as C6,u as Sn,e as gx,m as k6,h as E6,A as S6,j as $6}from"./Provider-DKZWuzSR.js";import"./index-BWHgHrtv.js";import"./AgentDetailCard-Biq8b2gv.js";/* empty css *//* empty css */import"./NewChatComposer-S08F6_La.js";/* empty css */import"./BackToPicker-BXp5E2ck.js";import"./AgentLiveActions-0iy8QZ1T.js";import"./ObservedTopologyPanel-ByW7Ar7p.js";/* empty css */import{e as O6,f as ur,P as fa,g as vx,h as bx,s as L6,i as j6}from"./secondaryNavConfig-CSFDCQAf.js";/* empty css */import"./runtime-picker-eDEvx2Mz.js";import"./ConversationScreen-oZSitVtX.js";/* empty css */import"./SessionObserve-DaUrJCMq.js";/* empty css *//* empty css *//* empty css */import{a as R6}from"./ProjectsRail-CWOkZjsY.js";import"./ProjectsInbox-DoPZ17FC.js";import"./projects-inbox-DCeD3FfV.js";/* empty css */import"./RailRow-DIGd3MMM.js";/* empty css */import"./cache-Dr0why2k.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./left-DLoDKxT5.js";import"./content-CudIBsiP.js";import{u as P6}from"./mesh-view-store-Du7VqIT_.js";import"./FleetSearch-CYeWn85V.js";import"./left-DDnxNUxd.js";/* empty css */import"./mesh-ops-JZwGuAPn.js";import"./left-mission-DEl4-7xu.js";import"./mission-control-store-C6w5iVfg.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./SlidePanel-CuTeirnk.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./TailView-CufWcrvf.js";import"./RepoDiffViewerLazy-BPg_JkYW.js";/* empty css *//* empty css *//* empty css */import"./SettingsDrawer-BFsnww-k.js";import"./left-BCSGqccQ.js";/* empty css */import{N as Cs,f as M6,g as T6,h as Ui,i as I6,j as A6,k as _6}from"./hooks-DBIezYS2.js";import{a as yf}from"./api-h5zurxmi.js";import{o as N6,i as D6}from"./surface-activity-B1rgWB1i.js";import{S as V6}from"./ScoutbotBroadcastChip-DAKQKB25.js";import{P as z6,S as F6,a as B6}from"./ScoutbotRealtimeVoiceCall-Br4bYVAx.js";import{L as H6}from"./loader-circle-4LDsy4Ke.js";import{P as W6}from"./plus-C-2gTcPK.js";import{resolveSidebarContext as Z6}from"./resolve-sidebar-context-HE-5eZYa.js";import{d as ec,n as U6,i as yx}from"./colors-BtO5_zlx.js";import{b as G6}from"./mesh-buckets-CfAukILK.js";import{u as K6}from"./sse-CL6gctHY.js";import{f as Y6,b as q6,d as X6}from"./terminal-sessions-AmSgHklm.js";import{o as Sh}from"./openAgent-Dbv5wfuL.js";import{C as Vo,a as J6,b as ei,c as tc,d as Q6}from"./ChatCollapsedStrip-BRljIymi.js";import{A as e3}from"./activity-BvGruxWG.js";import{OpsSubnav as t3}from"./OpsSubnav-CZs_OL2N.js";import{A as $h}from"./arrow-left-BOht-YQu.js";import{S as wx}from"./search-7_n7CxWl.js";import{C as n3}from"./chevron-down-NAhBUkFd.js";import{C as r3}from"./chevron-right-C10o7t_X.js";import{M as o3,b as s3}from"./DocumentFocusViewer-DRKjNG9s.js";import{T as i3}from"./terminal-By1Lw2i2.js";import{S as a3}from"./sparkles-Bth2iK7t.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-CxkmFQcN.js";import"./TextDocumentSurface-Bc-kHPgG.js";import"./file-text-iF0hyVyU.js";import"./code-xml-CLn3TDWF.js";import"./scout-voice-B7kXlkcl.js";import"./fx-z37u1o2z.js";import"./MessageComposerSuggestions-Dfc3PH2y.js";import"./chunk-HRAB3GC3-DF8R9rPv.js";import"./time-Dhsh_2EG.js";import"./HarnessMark-MztYnrGK.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-BEz6jyqf.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./terminal-takeover-7AvNpnkC.js";import"./openContent-C6XO6kr5.js";import"./eye-B3lBIwJZ.js";import"./message-square-ER1_q2pe.js";import"./scroll-text-BuneRiAD.js";import"./voice-levels-Dcr3jglk.js";import"./ConversationComposer-CWohCCmn.js";import"./message-markup-BcY1lShv.js";import"./mentions-CvDaviLJ.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./AgentAvatar-DMov24_o.js";import"./SpriteAvatar-DQ3PTb8L.js";import"./agent-identity-BxCsXnDp.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-BxTzXl8e.js";import"./ConversationFeedRows-IWh0JSIL.js";import"./ConversationPanels-D9UCwNkS.js";import"./use-reduced-motion-CqXpVXv-.js";import"./message-circle-BM3XgevU.js";import"./tail-display-BRcJltQa.js";import"./lane-edit-display-C_Aujldz.js";import"./tail-events-NLIWLq27.js";import"./ConversationStatus-B6pAbo2w.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-CcEiQC6B.js";import"./lane-observe-BA3g9aVd.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObserveTextFlow-_ApDwRCO.js";import"./SessionObserveEvidence-ClUW8jpV.js";import"./wrench-M4G7WtYB.js";import"./external-link-Dem738OJ.js";import"./AddProjectForm-Czb5uwou.js";import"./project-overview-helpers-BQTc_Ous.js";import"./api-BkjHJfgJ.js";import"./ui-LM8pS8qE.js";import"./SessionRefScreen-DLZNFZFK.js";import"./arrow-up-right-hoR8_oUz.js";import"./agents-project-model-UYiamtrU.js";import"./model-IGCUEsMy.js";import"./operator-attention-BwSPeheT.js";import"./HomeHero-BPBArHXa.js";import"./observe-3-jn4SXb.js";import"./agent-lanes-model-VYQ5a68i.js";import"./context-budget-DX_fwUs3.js";import"./home-moving-signal-C8dTXieA.js";import"./home-live-action-BkqGLVRY.js";import"./use-fleet-active-asks-CJ6-oj5k.js";import"./MissionLeftAgentRow-DokImu4Y.js";import"./page-status-0LPfBC8S.js";import"./VoicePermissionsPanel-CD903y9K.js";import"./check--esHw52j.js";import"./refresh-cw-B5To7b6B.js";import"./copy-Dty8ZYsM.js";import"./terminal-relay-CjkI5aUy.js";import"./session-table-CYN8e4s3.js";import"./clock-of01sAB6.js";import"./server-pYOMFjrT.js";import"./bot-BUK7dOPS.js";import"./radio-v7UAMZGh.js";import"./left-O-TBH7JB.js";import"./left-BSyj8PuJ.js";import"./conversation-prefs-DNre-Lcx.js";import"./use-conversation-list-BCzY032j.js";import"./left-BC7p5QbT.js";import"./use-mesh-ops-items-D5L-CKe_.js";import"./left-rvUOB14X.js";import"./left-agents-Dk9Y89lb.js";import"./left-default-B3JBRQNJ.js";import"./left-lanes-30Oe_3RM.js";import"./lane-roster-store-BiIVlYmG.js";import"./left-plan-B4qdm4Gn.js";import"./MeshCanvasMinimap-C-LQtiX6.js";import"./SecondaryNav-Dj30epYF.js";const c3=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],l3=Xr("bell",c3);const u3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],d3=Xr("circle-question-mark",u3);const f3=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]],p3=Xr("flag",f3);const m3=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],h3=Xr("layout-grid",m3);const g3=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],v3=Xr("list-todo",g3);const b3=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]],y3=Xr("pin-off",b3);const w3=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],x3=Xr("users",w3);var xx="vercel.ai.error",C3=Symbol.for(xx),Oh,Lh,An=class Cx extends(Lh=Error,Oh=C3,Lh){constructor({name:t,message:n,cause:r}){super(n),this[Oh]=!0,this.name=t,this.cause=r}static isInstance(t){return Cx.hasMarker(t,xx)}static hasMarker(t,n){const r=Symbol.for(n);return t!=null&&typeof t=="object"&&r in t&&typeof t[r]=="boolean"&&t[r]===!0}};function kx(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var Ex="AI_InvalidArgumentError",Sx=`vercel.ai.error.${Ex}`,k3=Symbol.for(Sx),jh,Rh,E3=class extends(Rh=An,jh=k3,Rh){constructor({message:e,cause:t,argument:n}){super({name:Ex,message:e,cause:t}),this[jh]=!0,this.argument=n}static isInstance(e){return An.hasMarker(e,Sx)}},$x="AI_JSONParseError",Ox=`vercel.ai.error.${$x}`,S3=Symbol.for(Ox),Ph,Mh,Th=class extends(Mh=An,Ph=S3,Mh){constructor({text:e,cause:t}){super({name:$x,message:`JSON parsing failed: Text: ${e}.
|
|
2
|
+
Error message: ${kx(t)}`,cause:t}),this[Ph]=!0,this.text=e}static isInstance(e){return An.hasMarker(e,Ox)}},Lx="AI_TypeValidationError",jx=`vercel.ai.error.${Lx}`,$3=Symbol.for(jx),Ih,Ah,Oo=class wf extends(Ah=An,Ih=$3,Ah){constructor({value:t,cause:n,context:r}){let o="Type validation failed";if(r?.field&&(o+=` for ${r.field}`),r?.entityName||r?.entityId){o+=" (";const s=[];r.entityName&&s.push(r.entityName),r.entityId&&s.push(`id: "${r.entityId}"`),o+=s.join(", "),o+=")"}super({name:Lx,message:`${o}: Value: ${JSON.stringify(t)}.
|
|
3
|
+
Error message: ${kx(n)}`,cause:n}),this[Ih]=!0,this.value=t,this.context=r}static isInstance(t){return An.hasMarker(t,jx)}static wrap({value:t,cause:n,context:r}){var o,s,i;return wf.isInstance(n)&&n.value===t&&((o=n.context)==null?void 0:o.field)===r?.field&&((s=n.context)==null?void 0:s.entityName)===r?.entityName&&((i=n.context)==null?void 0:i.entityId)===r?.entityId?n:new wf({value:t,cause:n,context:r})}};function H(e,t,n){function r(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:i,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,u);const l=i.prototype,d=Object.keys(l);for(let f=0;f<d.length;f++){const p=d[f];p in c||(c[p]=l[p].bind(c))}}const o=n?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function i(c){var u;const l=n?.Parent?new s:this;r(l,c),(u=l._zod).deferred??(u.deferred=[]);for(const d of l._zod.deferred)d();return l}return Object.defineProperty(i,"init",{value:r}),Object.defineProperty(i,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class wo extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Rx extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Px={};function gr(e){return Px}function Mx(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function xf(e,t){return typeof t=="bigint"?t.toString():t}function nc(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Ap(e){return e==null}function _p(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function O3(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const u=r.match(/\d?e-(\d?)/);u?.[1]&&(o=Number.parseInt(u[1]))}const s=n>o?n:o,i=Number.parseInt(e.toFixed(s).replace(".","")),c=Number.parseInt(t.toFixed(s).replace(".",""));return i%c/10**s}const _h=Symbol("evaluating");function _e(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==_h)return r===void 0&&(r=_h,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Jr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function wr(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Nh(e){return JSON.stringify(e)}function L3(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Tx="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function As(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const j3=nc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Lo(e){if(As(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(As(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Ix(e){return Lo(e)?{...e}:Array.isArray(e)?[...e]:e}const R3=new Set(["string","number","symbol"]);function jo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function xr(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function be(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function P3(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const M3={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function T3(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=wr(e._zod.def,{get shape(){const i={};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(i[c]=n.shape[c])}return Jr(this,"shape",i),i},checks:[]});return xr(e,s)}function I3(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=wr(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete i[c]}return Jr(this,"shape",i),i},checks:[]});return xr(e,s)}function A3(e,t){if(!Lo(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const s=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(s,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=wr(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return Jr(this,"shape",s),s}});return xr(e,o)}function _3(e,t){if(!Lo(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=wr(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Jr(this,"shape",r),r}});return xr(e,n)}function N3(e,t){const n=wr(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Jr(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return xr(e,n)}function D3(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const i=wr(t._zod.def,{get shape(){const c=t._zod.def.shape,u={...c};if(n)for(const l in n){if(!(l in c))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(u[l]=e?new e({type:"optional",innerType:c[l]}):c[l])}else for(const l in c)u[l]=e?new e({type:"optional",innerType:c[l]}):c[l];return Jr(this,"shape",u),u},checks:[]});return xr(t,i)}function V3(e,t,n){const r=wr(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(n)for(const i in n){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(s[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(const i in o)s[i]=new e({type:"nonoptional",innerType:o[i]});return Jr(this,"shape",s),s}});return xr(t,r)}function fo(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function po(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function xi(e){return typeof e=="string"?e:e?.message}function vr(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=xi(e.inst?._zod.def?.error?.(e))??xi(t?.error?.(e))??xi(n.customError?.(e))??xi(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Np(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function _s(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const Ax=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,xf,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},_x=H("$ZodError",Ax),Nx=H("$ZodError",Ax,{Parent:Error});function z3(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function F3(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(i=>r({issues:i}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)n._errors.push(t(s));else{let i=n,c=0;for(;c<s.path.length;){const u=s.path[c];c===s.path.length-1?(i[u]=i[u]||{_errors:[]},i[u]._errors.push(t(s))):i[u]=i[u]||{_errors:[]},i=i[u],c++}}};return r(e),n}const Dp=e=>(t,n,r,o)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new wo;if(i.issues.length){const c=new(o?.Err??e)(i.issues.map(u=>vr(u,s,gr())));throw Tx(c,o?.callee),c}return i.value},Vp=e=>async(t,n,r,o)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){const c=new(o?.Err??e)(i.issues.map(u=>vr(u,s,gr())));throw Tx(c,o?.callee),c}return i.value},rc=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new wo;return s.issues.length?{success:!1,error:new(e??_x)(s.issues.map(i=>vr(i,o,gr())))}:{success:!0,data:s.value}},B3=rc(Nx),oc=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>vr(i,o,gr())))}:{success:!0,data:s.value}},H3=oc(Nx),W3=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Dp(e)(t,n,o)},Z3=e=>(t,n,r)=>Dp(e)(t,n,r),U3=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Vp(e)(t,n,o)},G3=e=>async(t,n,r)=>Vp(e)(t,n,r),K3=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return rc(e)(t,n,o)},Y3=e=>(t,n,r)=>rc(e)(t,n,r),q3=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return oc(e)(t,n,o)},X3=e=>async(t,n,r)=>oc(e)(t,n,r),J3=/^[cC][^\s-]{8,}$/,Q3=/^[0-9a-z]+$/,e$=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,t$=/^[0-9a-vA-V]{20}$/,n$=/^[A-Za-z0-9]{27}$/,r$=/^[a-zA-Z0-9_-]{21}$/,o$=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,s$=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Dh=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,i$=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,a$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function c$(){return new RegExp(a$,"u")}const l$=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,u$=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,d$=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,f$=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,p$=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Dx=/^[A-Za-z0-9_-]*$/,m$=/^\+[1-9]\d{6,14}$/,Vx="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",h$=new RegExp(`^${Vx}$`);function zx(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function g$(e){return new RegExp(`^${zx(e)}$`)}function v$(e){const t=zx({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${Vx}T(?:${r})$`)}const b$=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},y$=/^-?\d+$/,Fx=/^-?\d+(?:\.\d+)?$/,w$=/^(?:true|false)$/i,x$=/^null$/i,C$=/^[^A-Z]*$/,k$=/^[^a-z]*$/,Ut=H("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Bx={number:"number",bigint:"bigint",object:"date"},Hx=H("$ZodCheckLessThan",(e,t)=>{Ut.init(e,t);const n=Bx[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Wx=H("$ZodCheckGreaterThan",(e,t)=>{Ut.init(e,t);const n=Bx[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),E$=H("$ZodCheckMultipleOf",(e,t)=>{Ut.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):O3(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),S$=H("$ZodCheckNumberFormat",(e,t)=>{Ut.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,s]=M3[t.format];e._zod.onattach.push(i=>{const c=i._zod.bag;c.format=t.format,c.minimum=o,c.maximum=s,n&&(c.pattern=y$)}),e._zod.check=i=>{const c=i.value;if(n){if(!Number.isInteger(c)){i.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?i.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):i.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}c<o&&i.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>s&&i.issues.push({origin:"number",input:c,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),$$=H("$ZodCheckMaxLength",(e,t)=>{var n;Ut.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Ap(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const i=Np(o);r.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),O$=H("$ZodCheckMinLength",(e,t)=>{var n;Ut.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Ap(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const i=Np(o);r.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),L$=H("$ZodCheckLengthEquals",(e,t)=>{var n;Ut.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Ap(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,s=o.length;if(s===t.length)return;const i=Np(o),c=s>t.length;r.issues.push({origin:i,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),sc=H("$ZodCheckStringFormat",(e,t)=>{var n,r;Ut.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),j$=H("$ZodCheckRegex",(e,t)=>{sc.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),R$=H("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=C$),sc.init(e,t)}),P$=H("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=k$),sc.init(e,t)}),M$=H("$ZodCheckIncludes",(e,t)=>{Ut.init(e,t);const n=jo(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),T$=H("$ZodCheckStartsWith",(e,t)=>{Ut.init(e,t);const n=new RegExp(`^${jo(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),I$=H("$ZodCheckEndsWith",(e,t)=>{Ut.init(e,t);const n=new RegExp(`.*${jo(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),A$=H("$ZodCheckOverwrite",(e,t)=>{Ut.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class _${constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
4
|
+
`).filter(i=>i),o=Math.min(...r.map(i=>i.length-i.trimStart().length)),s=r.map(i=>i.slice(o)).map(i=>" ".repeat(this.indent*2)+i);for(const i of s)this.content.push(i)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(s=>` ${s}`)];return new t(...n,o.join(`
|
|
5
|
+
`))}}const N$={major:4,minor:3,patch:6},et=H("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=N$;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const s of o._zod.onattach)s(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(i,c,u)=>{let l=fo(i),d;for(const f of c){if(f._zod.def.when){if(!f._zod.def.when(i))continue}else if(l)continue;const p=i.issues.length,m=f._zod.check(i);if(m instanceof Promise&&u?.async===!1)throw new wo;if(d||m instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await m,i.issues.length!==p&&(l||(l=fo(i,p)))});else{if(i.issues.length===p)continue;l||(l=fo(i,p))}}return d?d.then(()=>i):i},s=(i,c,u)=>{if(fo(i))return i.aborted=!0,i;const l=o(c,r,u);if(l instanceof Promise){if(u.async===!1)throw new wo;return l.then(d=>e._zod.parse(d,u))}return e._zod.parse(l,u)};e._zod.run=(i,c)=>{if(c.skipChecks)return e._zod.parse(i,c);if(c.direction==="backward"){const l=e._zod.parse({value:i.value,issues:[]},{...c,skipChecks:!0});return l instanceof Promise?l.then(d=>s(d,i,c)):s(l,i,c)}const u=e._zod.parse(i,c);if(u instanceof Promise){if(c.async===!1)throw new wo;return u.then(l=>o(l,r,c))}return o(u,r,c)}}_e(e,"~standard",()=>({validate:o=>{try{const s=B3(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return H3(e,o).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}))}),zp=H("$ZodString",(e,t)=>{et.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??b$(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),st=H("$ZodStringFormat",(e,t)=>{sc.init(e,t),zp.init(e,t)}),D$=H("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=s$),st.init(e,t)}),V$=H("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Dh(r))}else t.pattern??(t.pattern=Dh());st.init(e,t)}),z$=H("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=i$),st.init(e,t)}),F$=H("$ZodURL",(e,t)=>{st.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),B$=H("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=c$()),st.init(e,t)}),H$=H("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=r$),st.init(e,t)}),W$=H("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=J3),st.init(e,t)}),Z$=H("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Q3),st.init(e,t)}),U$=H("$ZodULID",(e,t)=>{t.pattern??(t.pattern=e$),st.init(e,t)}),G$=H("$ZodXID",(e,t)=>{t.pattern??(t.pattern=t$),st.init(e,t)}),K$=H("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=n$),st.init(e,t)}),Y$=H("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=v$(t)),st.init(e,t)}),q$=H("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=h$),st.init(e,t)}),X$=H("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=g$(t)),st.init(e,t)}),J$=H("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=o$),st.init(e,t)}),Q$=H("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=l$),st.init(e,t),e._zod.bag.format="ipv4"}),eO=H("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=u$),st.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),tO=H("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=d$),st.init(e,t)}),nO=H("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=f$),st.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,s]=r;if(!s)throw new Error;const i=Number(s);if(`${i}`!==s)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Zx(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const rO=H("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=p$),st.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Zx(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function oO(e){if(!Dx.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Zx(n)}const sO=H("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Dx),st.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{oO(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),iO=H("$ZodE164",(e,t)=>{t.pattern??(t.pattern=m$),st.init(e,t)});function aO(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const cO=H("$ZodJWT",(e,t)=>{st.init(e,t),e._zod.check=n=>{aO(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Ux=H("$ZodNumber",(e,t)=>{et.init(e,t),e._zod.pattern=e._zod.bag.pattern??Fx,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),n}}),lO=H("$ZodNumberFormat",(e,t)=>{S$.init(e,t),Ux.init(e,t)}),uO=H("$ZodBoolean",(e,t)=>{et.init(e,t),e._zod.pattern=w$,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),dO=H("$ZodNull",(e,t)=>{et.init(e,t),e._zod.pattern=x$,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const o=n.value;return o===null||n.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),n}}),fO=H("$ZodUnknown",(e,t)=>{et.init(e,t),e._zod.parse=n=>n}),pO=H("$ZodNever",(e,t)=>{et.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Vh(e,t,n){e.issues.length&&t.issues.push(...po(n,e.issues)),t.value[n]=e.value}const mO=H("$ZodArray",(e,t)=>{et.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const s=[];for(let i=0;i<o.length;i++){const c=o[i],u=t.element._zod.run({value:c,issues:[]},r);u instanceof Promise?s.push(u.then(l=>Vh(l,n,i))):Vh(u,n,i)}return s.length?Promise.all(s).then(()=>n):n}});function pa(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...po(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Gx(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=P3(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Kx(e,t,n,r,o,s){const i=[],c=o.keySet,u=o.catchall._zod,l=u.def.type,d=u.optout==="optional";for(const f in t){if(c.has(f))continue;if(l==="never"){i.push(f);continue}const p=u.run({value:t[f],issues:[]},r);p instanceof Promise?e.push(p.then(m=>pa(m,n,f,t,d))):pa(p,n,f,t,d)}return i.length&&n.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:s}),e.length?Promise.all(e).then(()=>n):n}const hO=H("$ZodObject",(e,t)=>{if(et.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const u={...c};return Object.defineProperty(t,"shape",{value:u}),u}})}const r=nc(()=>Gx(t));_e(e._zod,"propValues",()=>{const c=t.shape,u={};for(const l in c){const d=c[l]._zod;if(d.values){u[l]??(u[l]=new Set);for(const f of d.values)u[l].add(f)}}return u});const o=As,s=t.catchall;let i;e._zod.parse=(c,u)=>{i??(i=r.value);const l=c.value;if(!o(l))return c.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),c;c.value={};const d=[],f=i.shape;for(const p of i.keys){const m=f[p],g=m._zod.optout==="optional",y=m._zod.run({value:l[p],issues:[]},u);y instanceof Promise?d.push(y.then(x=>pa(x,c,p,l,g))):pa(y,c,p,l,g)}return s?Kx(d,l,c,u,r.value,e):d.length?Promise.all(d).then(()=>c):c}}),gO=H("$ZodObjectJIT",(e,t)=>{hO.init(e,t);const n=e._zod.parse,r=nc(()=>Gx(t)),o=p=>{const m=new _$(["shape","payload","ctx"]),g=r.value,y=v=>{const C=Nh(v);return`shape[${C}]._zod.run({ value: input[${C}], issues: [] }, ctx)`};m.write("const input = payload.value;");const x=Object.create(null);let w=0;for(const v of g.keys)x[v]=`key_${w++}`;m.write("const newResult = {};");for(const v of g.keys){const C=x[v],k=Nh(v),$=p[v]?._zod?.optout==="optional";m.write(`const ${C} = ${y(v)};`),$?m.write(`
|
|
6
|
+
if (${C}.issues.length) {
|
|
7
|
+
if (${k} in input) {
|
|
8
|
+
payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
|
|
9
|
+
...iss,
|
|
10
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
11
|
+
})));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (${C}.value === undefined) {
|
|
16
|
+
if (${k} in input) {
|
|
17
|
+
newResult[${k}] = undefined;
|
|
18
|
+
}
|
|
19
|
+
} else {
|
|
20
|
+
newResult[${k}] = ${C}.value;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
`):m.write(`
|
|
24
|
+
if (${C}.issues.length) {
|
|
25
|
+
payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
|
|
26
|
+
...iss,
|
|
27
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
28
|
+
})));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (${C}.value === undefined) {
|
|
32
|
+
if (${k} in input) {
|
|
33
|
+
newResult[${k}] = undefined;
|
|
34
|
+
}
|
|
35
|
+
} else {
|
|
36
|
+
newResult[${k}] = ${C}.value;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
`)}m.write("payload.value = newResult;"),m.write("return payload;");const b=m.compile();return(v,C)=>b(p,v,C)};let s;const i=As,c=!Px.jitless,l=c&&j3.value,d=t.catchall;let f;e._zod.parse=(p,m)=>{f??(f=r.value);const g=p.value;return i(g)?c&&l&&m?.async===!1&&m.jitless!==!0?(s||(s=o(t.shape)),p=s(p,m),d?Kx([],g,p,m,f,e):p):n(p,m):(p.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),p)}});function zh(e,t,n,r){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const o=e.filter(s=>!fo(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(s=>s.issues.map(i=>vr(i,r,gr())))}),t)}const Yx=H("$ZodUnion",(e,t)=>{et.init(e,t),_e(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),_e(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),_e(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),_e(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>_p(s.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,s)=>{if(n)return r(o,s);let i=!1;const c=[];for(const u of t.options){const l=u._zod.run({value:o.value,issues:[]},s);if(l instanceof Promise)c.push(l),i=!0;else{if(l.issues.length===0)return l;c.push(l)}}return i?Promise.all(c).then(u=>zh(u,o,e,s)):zh(c,o,e,s)}}),vO=H("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Yx.init(e,t);const n=e._zod.parse;_e(e._zod,"propValues",()=>{const o={};for(const s of t.options){const i=s._zod.propValues;if(!i||Object.keys(i).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(const[c,u]of Object.entries(i)){o[c]||(o[c]=new Set);for(const l of u)o[c].add(l)}}return o});const r=nc(()=>{const o=t.options,s=new Map;for(const i of o){const c=i._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const u of c){if(s.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);s.set(u,i)}}return s});e._zod.parse=(o,s)=>{const i=o.value;if(!As(i))return o.issues.push({code:"invalid_type",expected:"object",input:i,inst:e}),o;const c=r.value.get(i?.[t.discriminator]);return c?c._zod.run(o,s):t.unionFallback?n(o,s):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:i,path:[t.discriminator],inst:e}),o)}}),bO=H("$ZodIntersection",(e,t)=>{et.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,s=t.left._zod.run({value:o,issues:[]},r),i=t.right._zod.run({value:o,issues:[]},r);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([u,l])=>Fh(n,u,l)):Fh(n,s,i)}});function Cf(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Lo(e)&&Lo(t)){const n=Object.keys(t),r=Object.keys(e).filter(s=>n.indexOf(s)!==-1),o={...e,...t};for(const s of r){const i=Cf(e[s],t[s]);if(!i.valid)return{valid:!1,mergeErrorPath:[s,...i.mergeErrorPath]};o[s]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],s=t[r],i=Cf(o,s);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};n.push(i.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Fh(e,t,n){const r=new Map;let o;for(const c of t.issues)if(c.code==="unrecognized_keys"){o??(o=c);for(const u of c.keys)r.has(u)||r.set(u,{}),r.get(u).l=!0}else e.issues.push(c);for(const c of n.issues)if(c.code==="unrecognized_keys")for(const u of c.keys)r.has(u)||r.set(u,{}),r.get(u).r=!0;else e.issues.push(c);const s=[...r].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(s.length&&o&&e.issues.push({...o,keys:s}),fo(e))return e;const i=Cf(t.value,n.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const yO=H("$ZodRecord",(e,t)=>{et.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Lo(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;const s=[],i=t.keyType._zod.values;if(i){n.value={};const c=new Set;for(const l of i)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){c.add(typeof l=="number"?l.toString():l);const d=t.valueType._zod.run({value:o[l],issues:[]},r);d instanceof Promise?s.push(d.then(f=>{f.issues.length&&n.issues.push(...po(l,f.issues)),n.value[l]=f.value})):(d.issues.length&&n.issues.push(...po(l,d.issues)),n.value[l]=d.value)}let u;for(const l in o)c.has(l)||(u=u??[],u.push(l));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:u})}else{n.value={};for(const c of Reflect.ownKeys(o)){if(c==="__proto__")continue;let u=t.keyType._zod.run({value:c,issues:[]},r);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&Fx.test(c)&&u.issues.length){const f=t.keyType._zod.run({value:Number(c),issues:[]},r);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");f.issues.length===0&&(u=f)}if(u.issues.length){t.mode==="loose"?n.value[c]=o[c]:n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(f=>vr(f,r,gr())),input:c,path:[c],inst:e});continue}const d=t.valueType._zod.run({value:o[c],issues:[]},r);d instanceof Promise?s.push(d.then(f=>{f.issues.length&&n.issues.push(...po(c,f.issues)),n.value[u.value]=f.value})):(d.issues.length&&n.issues.push(...po(c,d.issues)),n.value[u.value]=d.value)}}return s.length?Promise.all(s).then(()=>n):n}}),wO=H("$ZodEnum",(e,t)=>{et.init(e,t);const n=Mx(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>R3.has(typeof o)).map(o=>typeof o=="string"?jo(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{const i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:n,input:i,inst:e}),o}}),xO=H("$ZodLiteral",(e,t)=>{if(et.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?jo(r):r?jo(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{const s=r.value;return n.has(s)||r.issues.push({code:"invalid_value",values:t.values,input:s,inst:e}),r}}),CO=H("$ZodTransform",(e,t)=>{et.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Rx(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(n.value=i,n));if(o instanceof Promise)throw new wo;return n.value=o,n}});function Bh(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const qx=H("$ZodOptional",(e,t)=>{et.init(e,t),e._zod.optin="optional",e._zod.optout="optional",_e(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),_e(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${_p(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>Bh(s,n.value)):Bh(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),kO=H("$ZodExactOptional",(e,t)=>{qx.init(e,t),_e(e._zod,"values",()=>t.innerType._zod.values),_e(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),EO=H("$ZodNullable",(e,t)=>{et.init(e,t),_e(e._zod,"optin",()=>t.innerType._zod.optin),_e(e._zod,"optout",()=>t.innerType._zod.optout),_e(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${_p(n.source)}|null)$`):void 0}),_e(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),SO=H("$ZodDefault",(e,t)=>{et.init(e,t),e._zod.optin="optional",_e(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>Hh(s,t)):Hh(o,t)}});function Hh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const $O=H("$ZodPrefault",(e,t)=>{et.init(e,t),e._zod.optin="optional",_e(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),OO=H("$ZodNonOptional",(e,t)=>{et.init(e,t),_e(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>Wh(s,e)):Wh(o,e)}});function Wh(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const LO=H("$ZodCatch",(e,t)=>{et.init(e,t),_e(e._zod,"optin",()=>t.innerType._zod.optin),_e(e._zod,"optout",()=>t.innerType._zod.optout),_e(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(i=>vr(i,r,gr()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(s=>vr(s,r,gr()))},input:n.value}),n.issues=[]),n)}}),jO=H("$ZodPipe",(e,t)=>{et.init(e,t),_e(e._zod,"values",()=>t.in._zod.values),_e(e._zod,"optin",()=>t.in._zod.optin),_e(e._zod,"optout",()=>t.out._zod.optout),_e(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const s=t.out._zod.run(n,r);return s instanceof Promise?s.then(i=>Ci(i,t.in,r)):Ci(s,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(s=>Ci(s,t.out,r)):Ci(o,t.out,r)}});function Ci(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const RO=H("$ZodReadonly",(e,t)=>{et.init(e,t),_e(e._zod,"propValues",()=>t.innerType._zod.propValues),_e(e._zod,"values",()=>t.innerType._zod.values),_e(e._zod,"optin",()=>t.innerType?._zod?.optin),_e(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(Zh):Zh(o)}});function Zh(e){return e.value=Object.freeze(e.value),e}const PO=H("$ZodLazy",(e,t)=>{et.init(e,t),_e(e._zod,"innerType",()=>t.getter()),_e(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),_e(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),_e(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),_e(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),MO=H("$ZodCustom",(e,t)=>{Ut.init(e,t),et.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(s=>Uh(s,n,r,e));Uh(o,n,r,e)}});function Uh(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(_s(o))}}var Gh;class TO{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function IO(){return new TO}(Gh=globalThis).__zod_globalRegistry??(Gh.__zod_globalRegistry=IO());const ps=globalThis.__zod_globalRegistry;function AO(e,t){return new e({type:"string",...be(t)})}function _O(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...be(t)})}function Kh(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...be(t)})}function NO(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...be(t)})}function DO(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...be(t)})}function VO(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...be(t)})}function zO(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...be(t)})}function FO(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...be(t)})}function BO(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...be(t)})}function HO(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...be(t)})}function WO(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...be(t)})}function ZO(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...be(t)})}function UO(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...be(t)})}function GO(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...be(t)})}function KO(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...be(t)})}function YO(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...be(t)})}function qO(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...be(t)})}function XO(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...be(t)})}function JO(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...be(t)})}function QO(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...be(t)})}function eL(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...be(t)})}function tL(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...be(t)})}function nL(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...be(t)})}function rL(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...be(t)})}function oL(e,t){return new e({type:"string",format:"date",check:"string_format",...be(t)})}function sL(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...be(t)})}function iL(e,t){return new e({type:"string",format:"duration",check:"string_format",...be(t)})}function aL(e,t){return new e({type:"number",checks:[],...be(t)})}function cL(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...be(t)})}function lL(e,t){return new e({type:"boolean",...be(t)})}function uL(e,t){return new e({type:"null",...be(t)})}function dL(e){return new e({type:"unknown"})}function fL(e,t){return new e({type:"never",...be(t)})}function Yh(e,t){return new Hx({check:"less_than",...be(t),value:e,inclusive:!1})}function Wc(e,t){return new Hx({check:"less_than",...be(t),value:e,inclusive:!0})}function qh(e,t){return new Wx({check:"greater_than",...be(t),value:e,inclusive:!1})}function Zc(e,t){return new Wx({check:"greater_than",...be(t),value:e,inclusive:!0})}function Xh(e,t){return new E$({check:"multiple_of",...be(t),value:e})}function Xx(e,t){return new $$({check:"max_length",...be(t),maximum:e})}function ma(e,t){return new O$({check:"min_length",...be(t),minimum:e})}function Jx(e,t){return new L$({check:"length_equals",...be(t),length:e})}function pL(e,t){return new j$({check:"string_format",format:"regex",...be(t),pattern:e})}function mL(e){return new R$({check:"string_format",format:"lowercase",...be(e)})}function hL(e){return new P$({check:"string_format",format:"uppercase",...be(e)})}function gL(e,t){return new M$({check:"string_format",format:"includes",...be(t),includes:e})}function vL(e,t){return new T$({check:"string_format",format:"starts_with",...be(t),prefix:e})}function bL(e,t){return new I$({check:"string_format",format:"ends_with",...be(t),suffix:e})}function zo(e){return new A$({check:"overwrite",tx:e})}function yL(e){return zo(t=>t.normalize(e))}function wL(){return zo(e=>e.trim())}function xL(){return zo(e=>e.toLowerCase())}function CL(){return zo(e=>e.toUpperCase())}function kL(){return zo(e=>L3(e))}function EL(e,t,n){return new e({type:"array",element:t,...be(n)})}function SL(e,t,n){const r=be(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function $L(e,t,n){return new e({type:"custom",check:"custom",fn:t,...be(n)})}function OL(e){const t=LL(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(_s(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(_s(o))}},e(n.value,n)));return t}function LL(e,t){const n=new Ut({check:"custom",...be(t)});return n._zod.check=e,n}function ha(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ps,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ye(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,s=t.seen.get(e);if(s)return s.count++,n.schemaPath.includes(e)&&(s.cycle=n.path),s.schema;const i={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,i);const c=e._zod.toJSONSchema?.();if(c)i.schema=c;else{const d={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,d);else{const p=i.schema,m=t.processors[o.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);m(e,t,p,d)}const f=e._zod.parent;f&&(i.ref||(i.ref=f),Ye(f,t,d),t.seen.get(f).isParent=!0)}const u=t.metadataRegistry.get(e);return u&&Object.assign(i.schema,u),t.io==="input"&&Pt(e)&&(delete i.schema.examples,delete i.schema.default),t.io==="input"&&i.schema._prefault&&((r=i.schema).default??(r.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}function ga(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const i of e.seen.entries()){const c=e.metadataRegistry.get(i[0])?.id;if(c){const u=r.get(c);if(u&&u!==i[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(c,i[0])}}const o=i=>{const c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(i[0])?.id,p=e.external.uri??(g=>g);if(f)return{ref:p(f)};const m=i[1].defId??i[1].schema.id??`schema${e.counter++}`;return i[1].defId=m,{defId:m,ref:`${p("__shared")}#/${c}/${m}`}}if(i[1]===n)return{ref:"#"};const l=`#/${c}/`,d=i[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:l+d}},s=i=>{if(i[1].schema.$ref)return;const c=i[1],{ref:u,defId:l}=o(i);c.def={...c.schema},l&&(c.defId=l);const d=c.schema;for(const f in d)delete d[f];d.$ref=u};if(e.cycles==="throw")for(const i of e.seen.entries()){const c=i[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
|
|
40
|
+
|
|
41
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const i of e.seen.entries()){const c=i[1];if(t===i[0]){s(i);continue}if(e.external){const l=e.external.registry.get(i[0])?.id;if(t!==i[0]&&l){s(i);continue}}if(e.metadataRegistry.get(i[0])?.id){s(i);continue}if(c.cycle){s(i);continue}if(c.count>1&&e.reused==="ref"){s(i);continue}}}function va(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=i=>{const c=e.seen.get(i);if(c.ref===null)return;const u=c.def??c.schema,l={...u},d=c.ref;if(c.ref=null,d){r(d);const p=e.seen.get(d),m=p.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(m)):Object.assign(u,m),Object.assign(u,l),i._zod.parent===d)for(const y in u)y==="$ref"||y==="allOf"||y in l||delete u[y];if(m.$ref&&p.def)for(const y in u)y==="$ref"||y==="allOf"||y in p.def&&JSON.stringify(u[y])===JSON.stringify(p.def[y])&&delete u[y]}const f=i._zod.parent;if(f&&f!==d){r(f);const p=e.seen.get(f);if(p?.schema.$ref&&(u.$ref=p.schema.$ref,p.def))for(const m in u)m==="$ref"||m==="allOf"||m in p.def&&JSON.stringify(u[m])===JSON.stringify(p.def[m])&&delete u[m]}e.override({zodSchema:i,jsonSchema:u,path:c.path??[]})};for(const i of[...e.seen.entries()].reverse())r(i[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const i=e.external.registry.get(t)?.id;if(!i)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(i)}Object.assign(o,n.def??n.schema);const s=e.external?.defs??{};for(const i of e.seen.entries()){const c=i[1];c.def&&c.defId&&(s[c.defId]=c.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{const i=JSON.parse(JSON.stringify(o));return Object.defineProperty(i,"~standard",{value:{...t["~standard"],jsonSchema:{input:ba(t,"input",e.processors),output:ba(t,"output",e.processors)}},enumerable:!1,writable:!1}),i}catch{throw new Error("Error converting schema to JSON.")}}function Pt(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Pt(r.element,n);if(r.type==="set")return Pt(r.valueType,n);if(r.type==="lazy")return Pt(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Pt(r.innerType,n);if(r.type==="intersection")return Pt(r.left,n)||Pt(r.right,n);if(r.type==="record"||r.type==="map")return Pt(r.keyType,n)||Pt(r.valueType,n);if(r.type==="pipe")return Pt(r.in,n)||Pt(r.out,n);if(r.type==="object"){for(const o in r.shape)if(Pt(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(Pt(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(Pt(o,n))return!0;return!!(r.rest&&Pt(r.rest,n))}return!1}const jL=(e,t={})=>n=>{const r=ha({...n,processors:t});return Ye(e,r),ga(r,e),va(r,e)},ba=(e,t,n={})=>r=>{const{libraryOptions:o,target:s}=r??{},i=ha({...o??{},target:s,io:t,processors:n});return Ye(e,i),ga(i,e),va(i,e)},RL={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Qx=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:s,maximum:i,format:c,patterns:u,contentEncoding:l}=e._zod.bag;if(typeof s=="number"&&(o.minLength=s),typeof i=="number"&&(o.maxLength=i),c&&(o.format=RL[c]??c,o.format===""&&delete o.format,c==="time"&&delete o.format),l&&(o.contentEncoding=l),u&&u.size>0){const d=[...u];d.length===1?o.pattern=d[0].source:d.length>1&&(o.allOf=[...d.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},eC=(e,t,n,r)=>{const o=n,{minimum:s,maximum:i,format:c,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;typeof c=="string"&&c.includes("int")?o.type="integer":o.type="number",typeof d=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=d,o.exclusiveMinimum=!0):o.exclusiveMinimum=d),typeof s=="number"&&(o.minimum=s,typeof d=="number"&&t.target!=="draft-04"&&(d>=s?delete o.minimum:delete o.exclusiveMinimum)),typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=l,o.exclusiveMaximum=!0):o.exclusiveMaximum=l),typeof i=="number"&&(o.maximum=i,typeof l=="number"&&t.target!=="draft-04"&&(l<=i?delete o.maximum:delete o.exclusiveMaximum)),typeof u=="number"&&(o.multipleOf=u)},tC=(e,t,n,r)=>{n.type="boolean"},PL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},ML=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},nC=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},TL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},IL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},rC=(e,t,n,r)=>{n.not={}},AL=(e,t,n,r)=>{},oC=(e,t,n,r)=>{},_L=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},sC=(e,t,n,r)=>{const o=e._zod.def,s=Mx(o.entries);s.every(i=>typeof i=="number")&&(n.type="number"),s.every(i=>typeof i=="string")&&(n.type="string"),n.enum=s},iC=(e,t,n,r)=>{const o=e._zod.def,s=[];for(const i of o.values)if(i===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");s.push(Number(i))}else s.push(i);if(s.length!==0)if(s.length===1){const i=s[0];n.type=i===null?"null":typeof i,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[i]:n.const=i}else s.every(i=>typeof i=="number")&&(n.type="number"),s.every(i=>typeof i=="string")&&(n.type="string"),s.every(i=>typeof i=="boolean")&&(n.type="boolean"),s.every(i=>i===null)&&(n.type="null"),n.enum=s},NL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},DL=(e,t,n,r)=>{const o=n,s=e._zod.pattern;if(!s)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=s.source},VL=(e,t,n,r)=>{const o=n,s={type:"string",format:"binary",contentEncoding:"binary"},{minimum:i,maximum:c,mime:u}=e._zod.bag;i!==void 0&&(s.minLength=i),c!==void 0&&(s.maxLength=c),u?u.length===1?(s.contentMediaType=u[0],Object.assign(o,s)):(Object.assign(o,s),o.anyOf=u.map(l=>({contentMediaType:l}))):Object.assign(o,s)},zL=(e,t,n,r)=>{n.type="boolean"},aC=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},FL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},cC=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},BL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},HL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},lC=(e,t,n,r)=>{const o=n,s=e._zod.def,{minimum:i,maximum:c}=e._zod.bag;typeof i=="number"&&(o.minItems=i),typeof c=="number"&&(o.maxItems=c),o.type="array",o.items=Ye(s.element,t,{...r,path:[...r.path,"items"]})},uC=(e,t,n,r)=>{const o=n,s=e._zod.def;o.type="object",o.properties={};const i=s.shape;for(const l in i)o.properties[l]=Ye(i[l],t,{...r,path:[...r.path,"properties",l]});const c=new Set(Object.keys(i)),u=new Set([...c].filter(l=>{const d=s.shape[l]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));u.size>0&&(o.required=Array.from(u)),s.catchall?._zod.def.type==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=Ye(s.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},dC=(e,t,n,r)=>{const o=e._zod.def,s=o.inclusive===!1,i=o.options.map((c,u)=>Ye(c,t,{...r,path:[...r.path,s?"oneOf":"anyOf",u]}));s?n.oneOf=i:n.anyOf=i},fC=(e,t,n,r)=>{const o=e._zod.def,s=Ye(o.left,t,{...r,path:[...r.path,"allOf",0]}),i=Ye(o.right,t,{...r,path:[...r.path,"allOf",1]}),c=l=>"allOf"in l&&Object.keys(l).length===1,u=[...c(s)?s.allOf:[s],...c(i)?i.allOf:[i]];n.allOf=u},WL=(e,t,n,r)=>{const o=n,s=e._zod.def;o.type="array";const i=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",u=s.items.map((p,m)=>Ye(p,t,{...r,path:[...r.path,i,m]})),l=s.rest?Ye(s.rest,t,{...r,path:[...r.path,c,...t.target==="openapi-3.0"?[s.items.length]:[]]}):null;t.target==="draft-2020-12"?(o.prefixItems=u,l&&(o.items=l)):t.target==="openapi-3.0"?(o.items={anyOf:u},l&&o.items.anyOf.push(l),o.minItems=u.length,l||(o.maxItems=u.length)):(o.items=u,l&&(o.additionalItems=l));const{minimum:d,maximum:f}=e._zod.bag;typeof d=="number"&&(o.minItems=d),typeof f=="number"&&(o.maxItems=f)},pC=(e,t,n,r)=>{const o=n,s=e._zod.def;o.type="object";const i=s.keyType,u=i._zod.bag?.patterns;if(s.mode==="loose"&&u&&u.size>0){const d=Ye(s.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const f of u)o.patternProperties[f.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=Ye(s.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=Ye(s.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const l=i._zod.values;if(l){const d=[...l].filter(f=>typeof f=="string"||typeof f=="number");d.length>0&&(o.required=d)}},mC=(e,t,n,r)=>{const o=e._zod.def,s=Ye(o.innerType,t,r),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=o.innerType,n.nullable=!0):n.anyOf=[s,{type:"null"}]},hC=(e,t,n,r)=>{const o=e._zod.def;Ye(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},gC=(e,t,n,r)=>{const o=e._zod.def;Ye(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},vC=(e,t,n,r)=>{const o=e._zod.def;Ye(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},bC=(e,t,n,r)=>{const o=e._zod.def;Ye(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType;let i;try{i=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i},yC=(e,t,n,r)=>{const o=e._zod.def,s=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;Ye(s,t,r);const i=t.seen.get(e);i.ref=s},wC=(e,t,n,r)=>{const o=e._zod.def;Ye(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.readOnly=!0},ZL=(e,t,n,r)=>{const o=e._zod.def;Ye(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},Fp=(e,t,n,r)=>{const o=e._zod.def;Ye(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},xC=(e,t,n,r)=>{const o=e._zod.innerType;Ye(o,t,r);const s=t.seen.get(e);s.ref=o},Jh={string:Qx,number:eC,boolean:tC,bigint:PL,symbol:ML,null:nC,undefined:TL,void:IL,never:rC,any:AL,unknown:oC,date:_L,enum:sC,literal:iC,nan:NL,template_literal:DL,file:VL,success:zL,custom:aC,function:FL,transform:cC,map:BL,set:HL,array:lC,object:uC,union:dC,intersection:fC,tuple:WL,record:pC,nullable:mC,nonoptional:hC,default:gC,prefault:vC,catch:bC,pipe:yC,readonly:wC,promise:ZL,optional:Fp,lazy:xC};function UL(e,t){if("_idmap"in e){const r=e,o=ha({...t,processors:Jh}),s={};for(const u of r._idmap.entries()){const[l,d]=u;Ye(d,o)}const i={},c={registry:r,uri:t?.uri,defs:s};o.external=c;for(const u of r._idmap.entries()){const[l,d]=u;ga(o,d),i[l]=va(o,d)}if(Object.keys(s).length>0){const u=o.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[u]:s}}return{schemas:i}}const n=ha({...t,processors:Jh});return Ye(e,n),ga(n,e),va(n,e)}const GL=H("ZodISODateTime",(e,t)=>{Y$.init(e,t),at.init(e,t)});function KL(e){return rL(GL,e)}const YL=H("ZodISODate",(e,t)=>{q$.init(e,t),at.init(e,t)});function qL(e){return oL(YL,e)}const XL=H("ZodISOTime",(e,t)=>{X$.init(e,t),at.init(e,t)});function JL(e){return sL(XL,e)}const QL=H("ZodISODuration",(e,t)=>{J$.init(e,t),at.init(e,t)});function ej(e){return iL(QL,e)}const tj=(e,t)=>{_x.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>F3(e,n)},flatten:{value:n=>z3(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,xf,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,xf,2)}},isEmpty:{get(){return e.issues.length===0}}})},pn=H("ZodError",tj,{Parent:Error}),nj=Dp(pn),rj=Vp(pn),oj=rc(pn),CC=oc(pn),sj=W3(pn),ij=Z3(pn),aj=U3(pn),cj=G3(pn),lj=K3(pn),uj=Y3(pn),dj=q3(pn),fj=X3(pn),tt=H("ZodType",(e,t)=>(et.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:ba(e,"input"),output:ba(e,"output")}}),e.toJSONSchema=jL(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(wr(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>xr(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>nj(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>oj(e,n,r),e.parseAsync=async(n,r)=>rj(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>CC(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>sj(e,n,r),e.decode=(n,r)=>ij(e,n,r),e.encodeAsync=async(n,r)=>aj(e,n,r),e.decodeAsync=async(n,r)=>cj(e,n,r),e.safeEncode=(n,r)=>lj(e,n,r),e.safeDecode=(n,r)=>uj(e,n,r),e.safeEncodeAsync=async(n,r)=>dj(e,n,r),e.safeDecodeAsync=async(n,r)=>fj(e,n,r),e.refine=(n,r)=>e.check(cR(n,r)),e.superRefine=n=>e.check(lR(n)),e.overwrite=n=>e.check(zo(n)),e.optional=()=>tg(e),e.exactOptional=()=>Kj(e),e.nullable=()=>ng(e),e.nullish=()=>tg(ng(e)),e.nonoptional=n=>eR(e,n),e.array=()=>Fo(e),e.or=n=>Dt([e,n]),e.and=n=>Bj(e,n),e.transform=n=>rg(e,Uj(n)),e.default=n=>Xj(e,n),e.prefault=n=>Qj(e,n),e.catch=n=>nR(e,n),e.pipe=n=>rg(e,n),e.readonly=()=>sR(e),e.describe=n=>{const r=e.clone();return ps.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return ps.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return ps.get(e);const r=e.clone();return ps.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),kC=H("_ZodString",(e,t)=>{zp.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(r,o,s)=>Qx(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(pL(...r)),e.includes=(...r)=>e.check(gL(...r)),e.startsWith=(...r)=>e.check(vL(...r)),e.endsWith=(...r)=>e.check(bL(...r)),e.min=(...r)=>e.check(ma(...r)),e.max=(...r)=>e.check(Xx(...r)),e.length=(...r)=>e.check(Jx(...r)),e.nonempty=(...r)=>e.check(ma(1,...r)),e.lowercase=r=>e.check(mL(r)),e.uppercase=r=>e.check(hL(r)),e.trim=()=>e.check(wL()),e.normalize=(...r)=>e.check(yL(...r)),e.toLowerCase=()=>e.check(xL()),e.toUpperCase=()=>e.check(CL()),e.slugify=()=>e.check(kL())}),pj=H("ZodString",(e,t)=>{zp.init(e,t),kC.init(e,t),e.email=n=>e.check(_O(mj,n)),e.url=n=>e.check(FO(hj,n)),e.jwt=n=>e.check(nL(Rj,n)),e.emoji=n=>e.check(BO(gj,n)),e.guid=n=>e.check(Kh(Qh,n)),e.uuid=n=>e.check(NO(ki,n)),e.uuidv4=n=>e.check(DO(ki,n)),e.uuidv6=n=>e.check(VO(ki,n)),e.uuidv7=n=>e.check(zO(ki,n)),e.nanoid=n=>e.check(HO(vj,n)),e.guid=n=>e.check(Kh(Qh,n)),e.cuid=n=>e.check(WO(bj,n)),e.cuid2=n=>e.check(ZO(yj,n)),e.ulid=n=>e.check(UO(wj,n)),e.base64=n=>e.check(QO(Oj,n)),e.base64url=n=>e.check(eL(Lj,n)),e.xid=n=>e.check(GO(xj,n)),e.ksuid=n=>e.check(KO(Cj,n)),e.ipv4=n=>e.check(YO(kj,n)),e.ipv6=n=>e.check(qO(Ej,n)),e.cidrv4=n=>e.check(XO(Sj,n)),e.cidrv6=n=>e.check(JO($j,n)),e.e164=n=>e.check(tL(jj,n)),e.datetime=n=>e.check(KL(n)),e.date=n=>e.check(qL(n)),e.time=n=>e.check(JL(n)),e.duration=n=>e.check(ej(n))});function ce(e){return AO(pj,e)}const at=H("ZodStringFormat",(e,t)=>{st.init(e,t),kC.init(e,t)}),mj=H("ZodEmail",(e,t)=>{z$.init(e,t),at.init(e,t)}),Qh=H("ZodGUID",(e,t)=>{D$.init(e,t),at.init(e,t)}),ki=H("ZodUUID",(e,t)=>{V$.init(e,t),at.init(e,t)}),hj=H("ZodURL",(e,t)=>{F$.init(e,t),at.init(e,t)}),gj=H("ZodEmoji",(e,t)=>{B$.init(e,t),at.init(e,t)}),vj=H("ZodNanoID",(e,t)=>{H$.init(e,t),at.init(e,t)}),bj=H("ZodCUID",(e,t)=>{W$.init(e,t),at.init(e,t)}),yj=H("ZodCUID2",(e,t)=>{Z$.init(e,t),at.init(e,t)}),wj=H("ZodULID",(e,t)=>{U$.init(e,t),at.init(e,t)}),xj=H("ZodXID",(e,t)=>{G$.init(e,t),at.init(e,t)}),Cj=H("ZodKSUID",(e,t)=>{K$.init(e,t),at.init(e,t)}),kj=H("ZodIPv4",(e,t)=>{Q$.init(e,t),at.init(e,t)}),Ej=H("ZodIPv6",(e,t)=>{eO.init(e,t),at.init(e,t)}),Sj=H("ZodCIDRv4",(e,t)=>{tO.init(e,t),at.init(e,t)}),$j=H("ZodCIDRv6",(e,t)=>{nO.init(e,t),at.init(e,t)}),Oj=H("ZodBase64",(e,t)=>{rO.init(e,t),at.init(e,t)}),Lj=H("ZodBase64URL",(e,t)=>{sO.init(e,t),at.init(e,t)}),jj=H("ZodE164",(e,t)=>{iO.init(e,t),at.init(e,t)}),Rj=H("ZodJWT",(e,t)=>{cO.init(e,t),at.init(e,t)}),EC=H("ZodNumber",(e,t)=>{Ux.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(r,o,s)=>eC(e,r,o),e.gt=(r,o)=>e.check(qh(r,o)),e.gte=(r,o)=>e.check(Zc(r,o)),e.min=(r,o)=>e.check(Zc(r,o)),e.lt=(r,o)=>e.check(Yh(r,o)),e.lte=(r,o)=>e.check(Wc(r,o)),e.max=(r,o)=>e.check(Wc(r,o)),e.int=r=>e.check(eg(r)),e.safe=r=>e.check(eg(r)),e.positive=r=>e.check(qh(0,r)),e.nonnegative=r=>e.check(Zc(0,r)),e.negative=r=>e.check(Yh(0,r)),e.nonpositive=r=>e.check(Wc(0,r)),e.multipleOf=(r,o)=>e.check(Xh(r,o)),e.step=(r,o)=>e.check(Xh(r,o)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Pj(e){return aL(EC,e)}const Mj=H("ZodNumberFormat",(e,t)=>{lO.init(e,t),EC.init(e,t)});function eg(e){return cL(Mj,e)}const Tj=H("ZodBoolean",(e,t)=>{uO.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>tC(e,n,r)});function Mt(e){return lL(Tj,e)}const Ij=H("ZodNull",(e,t)=>{dO.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>nC(e,n,r)});function Aj(e){return uL(Ij,e)}const _j=H("ZodUnknown",(e,t)=>{fO.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>oC()});function jn(){return dL(_j)}const Nj=H("ZodNever",(e,t)=>{pO.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rC(e,n,r)});function SC(e){return fL(Nj,e)}const Dj=H("ZodArray",(e,t)=>{mO.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>lC(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(ma(n,r)),e.nonempty=n=>e.check(ma(1,n)),e.max=(n,r)=>e.check(Xx(n,r)),e.length=(n,r)=>e.check(Jx(n,r)),e.unwrap=()=>e.element});function Fo(e,t){return EL(Dj,e,t)}const $C=H("ZodObject",(e,t)=>{gO.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>uC(e,n,r,o),_e(e,"shape",()=>t.shape),e.keyof=()=>LC(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:jn()}),e.loose=()=>e.clone({...e._zod.def,catchall:jn()}),e.strict=()=>e.clone({...e._zod.def,catchall:SC()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>A3(e,n),e.safeExtend=n=>_3(e,n),e.merge=n=>N3(e,n),e.pick=n=>T3(e,n),e.omit=n=>I3(e,n),e.partial=(...n)=>D3(jC,e,n[0]),e.required=(...n)=>V3(RC,e,n[0])});function Ze(e,t){const n={type:"object",shape:e??{},...be(t)};return new $C(n)}function qe(e,t){return new $C({type:"object",shape:e,catchall:SC(),...be(t)})}const OC=H("ZodUnion",(e,t)=>{Yx.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>dC(e,n,r,o),e.options=t.options});function Dt(e,t){return new OC({type:"union",options:e,...be(t)})}const Vj=H("ZodDiscriminatedUnion",(e,t)=>{OC.init(e,t),vO.init(e,t)});function zj(e,t,n){return new Vj({type:"union",options:t,discriminator:e,...be(n)})}const Fj=H("ZodIntersection",(e,t)=>{bO.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>fC(e,n,r,o)});function Bj(e,t){return new Fj({type:"intersection",left:e,right:t})}const Hj=H("ZodRecord",(e,t)=>{yO.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>pC(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});function Ns(e,t,n){return new Hj({type:"record",keyType:e,valueType:t,...be(n)})}const kf=H("ZodEnum",(e,t)=>{wO.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(r,o,s)=>sC(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const s={};for(const i of r)if(n.has(i))s[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new kf({...t,checks:[],...be(o),entries:s})},e.exclude=(r,o)=>{const s={...t.entries};for(const i of r)if(n.has(i))delete s[i];else throw new Error(`Key ${i} not found in enum`);return new kf({...t,checks:[],...be(o),entries:s})}});function LC(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new kf({type:"enum",entries:n,...be(t)})}const Wj=H("ZodLiteral",(e,t)=>{xO.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>iC(e,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function xe(e,t){return new Wj({type:"literal",values:Array.isArray(e)?e:[e],...be(t)})}const Zj=H("ZodTransform",(e,t)=>{CO.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>cC(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Rx(e.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(_s(s,n.value,t));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=e),n.issues.push(_s(i))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(s=>(n.value=s,n)):(n.value=o,n)}});function Uj(e){return new Zj({type:"transform",transform:e})}const jC=H("ZodOptional",(e,t)=>{qx.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Fp(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function tg(e){return new jC({type:"optional",innerType:e})}const Gj=H("ZodExactOptional",(e,t)=>{kO.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Fp(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Kj(e){return new Gj({type:"optional",innerType:e})}const Yj=H("ZodNullable",(e,t)=>{EO.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>mC(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function ng(e){return new Yj({type:"nullable",innerType:e})}const qj=H("ZodDefault",(e,t)=>{SO.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gC(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Xj(e,t){return new qj({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ix(t)}})}const Jj=H("ZodPrefault",(e,t)=>{$O.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>vC(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Qj(e,t){return new Jj({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ix(t)}})}const RC=H("ZodNonOptional",(e,t)=>{OO.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hC(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function eR(e,t){return new RC({type:"nonoptional",innerType:e,...be(t)})}const tR=H("ZodCatch",(e,t)=>{LO.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>bC(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function nR(e,t){return new tR({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const rR=H("ZodPipe",(e,t)=>{jO.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>yC(e,n,r,o),e.in=t.in,e.out=t.out});function rg(e,t){return new rR({type:"pipe",in:e,out:t})}const oR=H("ZodReadonly",(e,t)=>{RO.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>wC(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function sR(e){return new oR({type:"readonly",innerType:e})}const iR=H("ZodLazy",(e,t)=>{PO.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>xC(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});function aR(e){return new iR({type:"lazy",getter:e})}const Bp=H("ZodCustom",(e,t)=>{MO.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>aC(e,n)});function PC(e,t){return SL(Bp,e??(()=>!0),t)}function cR(e,t={}){return $L(Bp,e,t)}function lR(e){return OL(e)}function ya(e,t={}){const n=new Bp({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...be(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}var Ds;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(c=>typeof o[o[c]]!="number"),i={};for(const c of s)i[c]=o[c];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(Ds||(Ds={}));var og;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(og||(og={}));Ds.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);Ds.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class wa extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let c=r,u=0;for(;u<i.path.length;){const l=i.path[u];u===i.path.length-1?(c[l]=c[l]||{_errors:[]},c[l]._errors.push(n(i))):c[l]=c[l]||{_errors:[]},c=c[l],u++}}};return o(this),r}static assert(t){if(!(t instanceof wa))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ds.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n=Object.create(null),r=[];for(const o of this.issues)if(o.path.length>0){const s=o.path[0];n[s]=n[s]||[],n[s].push(t(o))}else r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}wa.create=e=>new wa(e);var sg;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(sg||(sg={}));var Le;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Le||(Le={}));class ig extends Error{constructor(t,n){super(t),this.name="ParseError",this.type=n.type,this.field=n.field,this.value=n.value,this.line=n.line}}const ag=10,uR=13,Tr=32;function Uc(e){}function dR(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=Uc,onError:n=Uc,onRetry:r=Uc,onComment:o}=e;let s="",i=!0,c,u="",l=0,d;function f(b){if(i){i=!1,p(b);return}const v=s===""?b:s+b;s=m(v)}function p(b){b.charCodeAt(0)===239&&b.charCodeAt(1)===187&&b.charCodeAt(2)===191&&(b=b.slice(3));const v=s===""?b:s+b;s=m(v)}function m(b){let v=0;if(b.indexOf("\r")===-1){let C=b.indexOf(`
|
|
42
|
+
`,v);for(;C!==-1;){if(v===C){l>0&&t({id:c,event:d,data:u}),c=void 0,u="",l=0,d=void 0,v=C+1,C=b.indexOf(`
|
|
43
|
+
`,v);continue}const k=b.charCodeAt(v);if(cg(b,v,k)){const E=b.charCodeAt(v+5)===Tr?v+6:v+5,$=b.slice(E,C);if(l===0&&b.charCodeAt(C+1)===ag){t({id:c,event:d,data:$}),c=void 0,u="",d=void 0,v=C+2,C=b.indexOf(`
|
|
44
|
+
`,v);continue}u=l===0?$:`${u}
|
|
45
|
+
${$}`,l++}else lg(b,v,k)?d=b.slice(b.charCodeAt(v+6)===Tr?v+7:v+6,C)||void 0:g(b,v,C);v=C+1,C=b.indexOf(`
|
|
46
|
+
`,v)}return b.slice(v)}for(;v<b.length;){const C=b.indexOf("\r",v),k=b.indexOf(`
|
|
47
|
+
`,v);let E=-1;if(C!==-1&&k!==-1?E=C<k?C:k:C!==-1?C===b.length-1?E=-1:E=C:k!==-1&&(E=k),E===-1)break;g(b,v,E),v=E+1,b.charCodeAt(v-1)===uR&&b.charCodeAt(v)===ag&&v++}return b.slice(v)}function g(b,v,C){if(v===C){x();return}const k=b.charCodeAt(v);if(cg(b,v,k)){const T=b.charCodeAt(v+5)===Tr?v+6:v+5,A=b.slice(T,C);u=l===0?A:`${u}
|
|
48
|
+
${A}`,l++;return}if(lg(b,v,k)){d=b.slice(b.charCodeAt(v+6)===Tr?v+7:v+6,C)||void 0;return}if(k===105&&b.charCodeAt(v+1)===100&&b.charCodeAt(v+2)===58){const T=b.slice(b.charCodeAt(v+3)===Tr?v+4:v+3,C);c=T.includes("\0")?void 0:T;return}if(k===58){if(o){const T=b.slice(v,C);o(T.slice(b.charCodeAt(v+1)===Tr?2:1))}return}const E=b.slice(v,C),$=E.indexOf(":");if($===-1){y(E,"",E);return}const S=E.slice(0,$),j=E.charCodeAt($+1)===Tr?2:1,R=E.slice($+j);y(S,R,E)}function y(b,v,C){switch(b){case"event":d=v||void 0;break;case"data":u=l===0?v:`${u}
|
|
49
|
+
${v}`,l++;break;case"id":c=v.includes("\0")?void 0:v;break;case"retry":/^\d+$/.test(v)?r(parseInt(v,10)):n(new ig(`Invalid \`retry\` value: "${v}"`,{type:"invalid-retry",value:v,line:C}));break;default:n(new ig(`Unknown field "${b.length>20?`${b.slice(0,20)}…`:b}"`,{type:"unknown-field",field:b,value:v,line:C}));break}}function x(){l>0&&t({id:c,event:d,data:u}),c=void 0,u="",l=0,d=void 0}function w(b={}){s&&b.consume&&g(s,0,s.length),i=!0,c=void 0,u="",l=0,d=void 0,s=""}return{feed:f,reset:w}}function cg(e,t,n){return n===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function lg(e,t,n){return n===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}class fR extends TransformStream{constructor({onError:t,onRetry:n,onComment:r}={}){let o;super({start(s){o=dR({onEvent:i=>{s.enqueue(i)},onError(i){t==="terminate"?s.error(i):typeof t=="function"&&t(i)},onRetry:n,onComment:r})},transform(s){o.feed(s)}})}}var ti=({prefix:e,size:t=16,alphabet:n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const o=()=>{const s=n.length,i=new Array(t);for(let c=0;c<t;c++)i[c]=n[Math.random()*s|0];return i.join("")};if(e==null)return o;if(n.includes(r))throw new E3({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${n}".`});return()=>`${e}${r}${o()}`},pR=ti();function io(e){if(e==null)return{};const t={};if(e instanceof Headers)e.forEach((n,r)=>{t[r.toLowerCase()]=n});else{Array.isArray(e)||(e=Object.entries(e));for(const[n,r]of e)r!=null&&(t[n.toLowerCase()]=r)}return t}var mR=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,hR=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function ug(e){const t=JSON.parse(e);return t===null||typeof t!="object"||mR.test(e)===!1&&hR.test(e)===!1?t:gR(t)}function gR(e){let t=[e];for(;t.length;){const n=t;t=[];for(const r of n){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const o in r){const s=r[o];s&&typeof s=="object"&&t.push(s)}}}return e}function vR(e){const{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return ug(e)}try{return ug(e)}finally{Error.stackTraceLimit=t}}function Hp(e){if(e.type==="object"||Array.isArray(e.type)&&e.type.includes("object")){e.additionalProperties=!1;const{properties:n}=e;if(n!=null)for(const r of Object.keys(n))n[r]=Ir(n[r])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(Ir):Ir(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(Ir)),e.allOf!=null&&(e.allOf=e.allOf.map(Ir)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(Ir));const{definitions:t}=e;if(t!=null)for(const n of Object.keys(t))t[n]=Ir(t[n]);return e}function Ir(e){return typeof e=="boolean"?e:Hp(e)}var bR=Symbol("Let zodToJsonSchema decide on which parser to use"),dg={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},yR=e=>typeof e=="string"?{...dg,name:e}:{...dg,...e};function nn(){return{}}function wR(e,t){var n,r,o;const s={type:"array"};return(n=e.type)!=null&&n._def&&((o=(r=e.type)==null?void 0:r._def)==null?void 0:o.typeName)!==Le.ZodAny&&(s.items=ze(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(s.minItems=e.minLength.value),e.maxLength&&(s.maxItems=e.maxLength.value),e.exactLength&&(s.minItems=e.exactLength.value,s.maxItems=e.exactLength.value),s}function xR(e){const t={type:"integer",format:"int64"};if(!e.checks)return t;for(const n of e.checks)switch(n.kind){case"min":n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case"max":n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case"multipleOf":t.multipleOf=n.value;break}return t}function CR(){return{type:"boolean"}}function MC(e,t){return ze(e.type._def,t)}var kR=(e,t)=>ze(e.innerType._def,t);function TC(e,t,n){const r=n??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((o,s)=>TC(e,t,o))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return ER(e)}}var ER=e=>{const t={type:"integer",format:"unix-time"};for(const n of e.checks)switch(n.kind){case"min":t.minimum=n.value;break;case"max":t.maximum=n.value;break}return t};function SR(e,t){return{...ze(e.innerType._def,t),default:e.defaultValue()}}function $R(e,t){return t.effectStrategy==="input"?ze(e.schema._def,t):nn()}function OR(e){return{type:"string",enum:Array.from(e.values)}}var LR=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function jR(e,t){const n=[ze(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),ze(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(o=>!!o),r=[];return n.forEach(o=>{if(LR(o))r.push(...o.allOf);else{let s=o;if("additionalProperties"in o&&o.additionalProperties===!1){const{additionalProperties:i,...c}=o;s=c}r.push(s)}}),r.length?{allOf:r}:void 0}function RR(e){const t=typeof e.value;return t!=="bigint"&&t!=="number"&&t!=="boolean"&&t!=="string"?{type:Array.isArray(e.value)?"array":"object"}:{type:t==="bigint"?"integer":t,const:e.value}}var Gc=void 0,gn={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Gc===void 0&&(Gc=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Gc),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function IC(e,t){const n={type:"string"};if(e.checks)for(const r of e.checks)switch(r.kind){case"min":n.minLength=typeof n.minLength=="number"?Math.max(n.minLength,r.value):r.value;break;case"max":n.maxLength=typeof n.maxLength=="number"?Math.min(n.maxLength,r.value):r.value;break;case"email":switch(t.emailStrategy){case"format:email":vn(n,"email",r.message,t);break;case"format:idn-email":vn(n,"idn-email",r.message,t);break;case"pattern:zod":Rt(n,gn.email,r.message,t);break}break;case"url":vn(n,"uri",r.message,t);break;case"uuid":vn(n,"uuid",r.message,t);break;case"regex":Rt(n,r.regex,r.message,t);break;case"cuid":Rt(n,gn.cuid,r.message,t);break;case"cuid2":Rt(n,gn.cuid2,r.message,t);break;case"startsWith":Rt(n,RegExp(`^${Kc(r.value,t)}`),r.message,t);break;case"endsWith":Rt(n,RegExp(`${Kc(r.value,t)}$`),r.message,t);break;case"datetime":vn(n,"date-time",r.message,t);break;case"date":vn(n,"date",r.message,t);break;case"time":vn(n,"time",r.message,t);break;case"duration":vn(n,"duration",r.message,t);break;case"length":n.minLength=typeof n.minLength=="number"?Math.max(n.minLength,r.value):r.value,n.maxLength=typeof n.maxLength=="number"?Math.min(n.maxLength,r.value):r.value;break;case"includes":{Rt(n,RegExp(Kc(r.value,t)),r.message,t);break}case"ip":{r.version!=="v6"&&vn(n,"ipv4",r.message,t),r.version!=="v4"&&vn(n,"ipv6",r.message,t);break}case"base64url":Rt(n,gn.base64url,r.message,t);break;case"jwt":Rt(n,gn.jwt,r.message,t);break;case"cidr":{r.version!=="v6"&&Rt(n,gn.ipv4Cidr,r.message,t),r.version!=="v4"&&Rt(n,gn.ipv6Cidr,r.message,t);break}case"emoji":Rt(n,gn.emoji(),r.message,t);break;case"ulid":{Rt(n,gn.ulid,r.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{vn(n,"binary",r.message,t);break}case"contentEncoding:base64":{n.contentEncoding="base64";break}case"pattern:zod":{Rt(n,gn.base64,r.message,t);break}}break}case"nanoid":Rt(n,gn.nanoid,r.message,t)}return n}function Kc(e,t){return t.patternStrategy==="escape"?MR(e):e}var PR=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function MR(e){let t="";for(let n=0;n<e.length;n++)PR.has(e[n])||(t+="\\"),t+=e[n];return t}function vn(e,t,n,r){var o;e.format||(o=e.anyOf)!=null&&o.some(s=>s.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...n&&r.errorMessages&&{errorMessage:{format:n}}})):e.format=t}function Rt(e,t,n,r){var o;e.pattern||(o=e.allOf)!=null&&o.some(s=>s.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:fg(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):e.pattern=fg(t,r)}function fg(e,t){var n;if(!t.applyRegexFlags||!e.flags)return e.source;const r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},o=r.i?e.source.toLowerCase():e.source;let s="",i=!1,c=!1,u=!1;for(let l=0;l<o.length;l++){if(i){s+=o[l],i=!1;continue}if(r.i){if(c){if(o[l].match(/[a-z]/)){u?(s+=o[l],s+=`${o[l-2]}-${o[l]}`.toUpperCase(),u=!1):o[l+1]==="-"&&((n=o[l+2])!=null&&n.match(/[a-z]/))?(s+=o[l],u=!0):s+=`${o[l]}${o[l].toUpperCase()}`;continue}}else if(o[l].match(/[a-z]/)){s+=`[${o[l]}${o[l].toUpperCase()}]`;continue}}if(r.m){if(o[l]==="^"){s+=`(^|(?<=[\r
|
|
50
|
+
]))`;continue}else if(o[l]==="$"){s+=`($|(?=[\r
|
|
51
|
+
]))`;continue}}if(r.s&&o[l]==="."){s+=c?`${o[l]}\r
|
|
52
|
+
`:`[${o[l]}\r
|
|
53
|
+
]`;continue}s+=o[l],o[l]==="\\"?i=!0:c&&o[l]==="]"?c=!1:!c&&o[l]==="["&&(c=!0)}try{new RegExp(s)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return s}function AC(e,t){var n,r,o,s,i,c;const u={type:"object",additionalProperties:(n=ze(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))!=null?n:t.allowedAdditionalProperties};if(((r=e.keyType)==null?void 0:r._def.typeName)===Le.ZodString&&((o=e.keyType._def.checks)!=null&&o.length)){const{type:l,...d}=IC(e.keyType._def,t);return{...u,propertyNames:d}}else{if(((s=e.keyType)==null?void 0:s._def.typeName)===Le.ZodEnum)return{...u,propertyNames:{enum:e.keyType._def.values}};if(((i=e.keyType)==null?void 0:i._def.typeName)===Le.ZodBranded&&e.keyType._def.type._def.typeName===Le.ZodString&&((c=e.keyType._def.type._def.checks)!=null&&c.length)){const{type:l,...d}=MC(e.keyType._def,t);return{...u,propertyNames:d}}}return u}function TR(e,t){if(t.mapStrategy==="record")return AC(e,t);const n=ze(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||nn(),r=ze(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||nn();return{type:"array",maxItems:125,items:{type:"array",items:[n,r],minItems:2,maxItems:2}}}function IR(e){const t=e.values,r=Object.keys(e.values).filter(s=>typeof t[t[s]]!="number").map(s=>t[s]),o=Array.from(new Set(r.map(s=>typeof s)));return{type:o.length===1?o[0]==="string"?"string":"number":["string","number"],enum:r}}function AR(){return{not:nn()}}function _R(){return{type:"null"}}var Ef={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function NR(e,t){const n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(r=>r._def.typeName in Ef&&(!r._def.checks||!r._def.checks.length))){const r=n.reduce((o,s)=>{const i=Ef[s._def.typeName];return i&&!o.includes(i)?[...o,i]:o},[]);return{type:r.length>1?r:r[0]}}else if(n.every(r=>r._def.typeName==="ZodLiteral"&&!r.description)){const r=n.reduce((o,s)=>{const i=typeof s._def.value;switch(i){case"string":case"number":case"boolean":return[...o,i];case"bigint":return[...o,"integer"];case"object":if(s._def.value===null)return[...o,"null"];default:return o}},[]);if(r.length===n.length){const o=r.filter((s,i,c)=>c.indexOf(s)===i);return{type:o.length>1?o:o[0],enum:n.reduce((s,i)=>s.includes(i._def.value)?s:[...s,i._def.value],[])}}}else if(n.every(r=>r._def.typeName==="ZodEnum"))return{type:"string",enum:n.reduce((r,o)=>[...r,...o._def.values.filter(s=>!r.includes(s))],[])};return DR(e,t)}var DR=(e,t)=>{const n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((r,o)=>ze(r._def,{...t,currentPath:[...t.currentPath,"anyOf",`${o}`]})).filter(r=>!!r&&(!t.strictUnions||typeof r=="object"&&Object.keys(r).length>0));return n.length?{anyOf:n}:void 0};function VR(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[Ef[e.innerType._def.typeName],"null"]};const n=ze(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return n&&{anyOf:[n,{type:"null"}]}}function zR(e){const t={type:"number"};if(!e.checks)return t;for(const n of e.checks)switch(n.kind){case"int":t.type="integer";break;case"min":n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case"max":n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case"multipleOf":t.multipleOf=n.value;break}return t}function FR(e,t){const n={type:"object",properties:{}},r=[],o=e.shape();for(const i in o){let c=o[i];if(c===void 0||c._def===void 0)continue;const u=HR(c),l=ze(c._def,{...t,currentPath:[...t.currentPath,"properties",i],propertyPath:[...t.currentPath,"properties",i]});l!==void 0&&(n.properties[i]=l,u||r.push(i))}r.length&&(n.required=r);const s=BR(e,t);return s!==void 0&&(n.additionalProperties=s),n}function BR(e,t){if(e.catchall._def.typeName!=="ZodNever")return ze(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function HR(e){try{return e.isOptional()}catch{return!0}}var WR=(e,t)=>{var n;if(t.currentPath.toString()===((n=t.propertyPath)==null?void 0:n.toString()))return ze(e.innerType._def,t);const r=ze(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:nn()},r]}:nn()},ZR=(e,t)=>{if(t.pipeStrategy==="input")return ze(e.in._def,t);if(t.pipeStrategy==="output")return ze(e.out._def,t);const n=ze(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),r=ze(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",n?"1":"0"]});return{allOf:[n,r].filter(o=>o!==void 0)}};function UR(e,t){return ze(e.type._def,t)}function GR(e,t){const r={type:"array",uniqueItems:!0,items:ze(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(r.minItems=e.minSize.value),e.maxSize&&(r.maxItems=e.maxSize.value),r}function KR(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((n,r)=>ze(n._def,{...t,currentPath:[...t.currentPath,"items",`${r}`]})).reduce((n,r)=>r===void 0?n:[...n,r],[]),additionalItems:ze(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((n,r)=>ze(n._def,{...t,currentPath:[...t.currentPath,"items",`${r}`]})).reduce((n,r)=>r===void 0?n:[...n,r],[])}}function YR(){return{not:nn()}}function qR(){return nn()}var XR=(e,t)=>ze(e.innerType._def,t),JR=(e,t,n)=>{switch(t){case Le.ZodString:return IC(e,n);case Le.ZodNumber:return zR(e);case Le.ZodObject:return FR(e,n);case Le.ZodBigInt:return xR(e);case Le.ZodBoolean:return CR();case Le.ZodDate:return TC(e,n);case Le.ZodUndefined:return YR();case Le.ZodNull:return _R();case Le.ZodArray:return wR(e,n);case Le.ZodUnion:case Le.ZodDiscriminatedUnion:return NR(e,n);case Le.ZodIntersection:return jR(e,n);case Le.ZodTuple:return KR(e,n);case Le.ZodRecord:return AC(e,n);case Le.ZodLiteral:return RR(e);case Le.ZodEnum:return OR(e);case Le.ZodNativeEnum:return IR(e);case Le.ZodNullable:return VR(e,n);case Le.ZodOptional:return WR(e,n);case Le.ZodMap:return TR(e,n);case Le.ZodSet:return GR(e,n);case Le.ZodLazy:return()=>e.getter()._def;case Le.ZodPromise:return UR(e,n);case Le.ZodNaN:case Le.ZodNever:return AR();case Le.ZodEffects:return $R(e,n);case Le.ZodAny:return nn();case Le.ZodUnknown:return qR();case Le.ZodDefault:return SR(e,n);case Le.ZodBranded:return MC(e,n);case Le.ZodReadonly:return XR(e,n);case Le.ZodCatch:return kR(e,n);case Le.ZodPipeline:return ZR(e,n);case Le.ZodFunction:case Le.ZodVoid:case Le.ZodSymbol:return;default:return(r=>{})()}},QR=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join("/")};function ze(e,t,n=!1){var r;const o=t.seen.get(e);if(t.override){const u=(r=t.override)==null?void 0:r.call(t,e,t,o,n);if(u!==bR)return u}if(o&&!n){const u=e9(o,t);if(u!==void 0)return u}const s={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,s);const i=JR(e,e.typeName,t),c=typeof i=="function"?ze(i(),t):i;if(c&&t9(e,t,c),t.postProcess){const u=t.postProcess(c,e,t);return s.jsonSchema=c,u}return s.jsonSchema=c,c}var e9=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:QR(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((n,r)=>t.currentPath[r]===n)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),nn()):t.$refStrategy==="seen"?nn():void 0}},t9=(e,t,n)=>(e.description&&(n.description=e.description),n),n9=e=>{const t=yR(e),n=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([r,o])=>[o._def,{def:o._def,path:[...t.basePath,t.definitionPath,r],jsonSchema:void 0}]))}},r9=(e,t)=>{var n;const r=n9(t);let o=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((l,[d,f])=>{var p;return{...l,[d]:(p=ze(f._def,{...r,currentPath:[...r.basePath,r.definitionPath,d]},!0))!=null?p:nn()}},{}):void 0;const s=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,i=(n=ze(e._def,s===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,s]},!1))!=null?n:nn(),c=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;c!==void 0&&(i.title=c);const u=s===void 0?o?{...i,[r.definitionPath]:o}:i:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,s].join("/"),[r.definitionPath]:{...o,[s]:i}};return u.$schema="http://json-schema.org/draft-07/schema#",u},Sf=Symbol.for("vercel.ai.schema");function o9(e){let t;return()=>(t==null&&(t=e()),t)}function ic(e,{validate:t}={}){return{[Sf]:!0,_type:void 0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function s9(e){return typeof e=="object"&&e!==null&&Sf in e&&e[Sf]===!0&&"jsonSchema"in e&&"validate"in e}function Wp(e){return e==null?ic({properties:{},additionalProperties:!1}):s9(e)?e:"~standard"in e?e["~standard"].vendor==="zod"?_C(e):i9(e):e()}function i9(e){return ic(()=>Hp(e["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async t=>{const n=await e["~standard"].validate(t);return"value"in n?{success:!0,value:n.value}:{success:!1,error:new Oo({value:t,cause:n.issues})}}})}function a9(e,t){var n;const r=(n=void 0)!=null?n:!1;return ic(()=>r9(e,{$refStrategy:r?"root":"none"}),{validate:async o=>{const s=await e.safeParseAsync(o);return s.success?{success:!0,value:s.data}:{success:!1,error:s.error}}})}function c9(e,t){var n;const r=(n=void 0)!=null?n:!1;return ic(()=>Hp(UL(e,{target:"draft-7",io:"input",reused:r?"ref":"inline"})),{validate:async o=>{const s=await CC(e,o);return s.success?{success:!0,value:s.data}:{success:!1,error:s.error}}})}function l9(e){return"_zod"in e}function _C(e,t){return l9(e)?c9(e):a9(e)}async function pg({value:e,schema:t,context:n}){const r=await Vs({value:e,schema:t,context:n});if(!r.success)throw Oo.wrap({value:e,cause:r.error,context:n});return r.value}async function Vs({value:e,schema:t,context:n}){const r=Wp(t);try{if(r.validate==null)return{success:!0,value:e,rawValue:e};const o=await r.validate(e);return o.success?{success:!0,value:o.value,rawValue:e}:{success:!1,error:Oo.wrap({value:e,cause:o.error,context:n}),rawValue:e}}catch(o){return{success:!1,error:Oo.wrap({value:e,cause:o,context:n}),rawValue:e}}}async function Ur({text:e,schema:t}){try{const n=vR(e);return t==null?{success:!0,value:n,rawValue:n}:await Vs({value:n,schema:t})}catch(n){return{success:!1,error:Th.isInstance(n)?n:new Th({text:e,cause:n}),rawValue:void 0}}}function u9({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new fR).pipeThrough(new TransformStream({async transform({data:n},r){n!=="[DONE]"&&r.enqueue(await Ur({text:n,schema:t}))}}))}async function sr(e){return typeof e=="function"&&(e=e()),Promise.resolve(e)}var d9=Object.defineProperty,f9=(e,t)=>{for(var n in t)d9(e,n,{get:t[n],enumerable:!0})},NC="AI_NoObjectGeneratedError",DC=`vercel.ai.error.${NC}`,p9=Symbol.for(DC),VC,dr=class extends An{constructor({message:e="No object generated.",cause:t,text:n,response:r,usage:o,finishReason:s}){super({name:NC,message:e,cause:t}),this[VC]=!0,this.text=n,this.response=r,this.usage=o,this.finishReason=s}static isInstance(e){return An.hasMarker(e,DC)}};VC=p9;var zC="AI_UIMessageStreamError",FC=`vercel.ai.error.${zC}`,m9=Symbol.for(FC),BC,ao=class extends An{constructor({chunkType:e,chunkId:t,message:n}){super({name:zC,message:n}),this[BC]=!0,this.chunkType=e,this.chunkId=t}static isInstance(e){return An.hasMarker(e,FC)}};BC=m9;var HC=Dt([ce(),ya(Uint8Array),ya(ArrayBuffer),PC(e=>{var t,n;return(n=(t=globalThis.Buffer)==null?void 0:t.isBuffer(e))!=null?n:!1},{message:"Must be a Buffer"})]),zs=aR(()=>Dt([Aj(),ce(),Pj(),Mt(),Ns(ce(),zs.optional()),Fo(zs)])),Ie=Ns(ce(),Ns(ce(),zs.optional())),WC=Ze({type:xe("text"),text:ce(),providerOptions:Ie.optional()}),h9=Ze({type:xe("image"),image:Dt([HC,ya(URL)]),mediaType:ce().optional(),providerOptions:Ie.optional()}),ZC=Ze({type:xe("file"),data:Dt([HC,ya(URL)]),filename:ce().optional(),mediaType:ce(),providerOptions:Ie.optional()}),g9=Ze({type:xe("reasoning"),text:ce(),providerOptions:Ie.optional()}),v9=Ze({type:xe("tool-call"),toolCallId:ce(),toolName:ce(),input:jn(),providerOptions:Ie.optional(),providerExecuted:Mt().optional()}),b9=zj("type",[Ze({type:xe("text"),value:ce(),providerOptions:Ie.optional()}),Ze({type:xe("json"),value:zs,providerOptions:Ie.optional()}),Ze({type:xe("execution-denied"),reason:ce().optional(),providerOptions:Ie.optional()}),Ze({type:xe("error-text"),value:ce(),providerOptions:Ie.optional()}),Ze({type:xe("error-json"),value:zs,providerOptions:Ie.optional()}),Ze({type:xe("content"),value:Fo(Dt([Ze({type:xe("text"),text:ce(),providerOptions:Ie.optional()}),Ze({type:xe("media"),data:ce(),mediaType:ce()}),Ze({type:xe("file-data"),data:ce(),mediaType:ce(),filename:ce().optional(),providerOptions:Ie.optional()}),Ze({type:xe("file-url"),url:ce(),providerOptions:Ie.optional()}),Ze({type:xe("file-id"),fileId:Dt([ce(),Ns(ce(),ce())]),providerOptions:Ie.optional()}),Ze({type:xe("image-data"),data:ce(),mediaType:ce(),providerOptions:Ie.optional()}),Ze({type:xe("image-url"),url:ce(),providerOptions:Ie.optional()}),Ze({type:xe("image-file-id"),fileId:Dt([ce(),Ns(ce(),ce())]),providerOptions:Ie.optional()}),Ze({type:xe("custom"),providerOptions:Ie.optional()})]))})]),UC=Ze({type:xe("tool-result"),toolCallId:ce(),toolName:ce(),output:b9,providerOptions:Ie.optional()}),y9=Ze({type:xe("tool-approval-request"),approvalId:ce(),toolCallId:ce()}),w9=Ze({type:xe("tool-approval-response"),approvalId:ce(),approved:Mt(),reason:ce().optional()}),x9=Ze({role:xe("system"),content:ce(),providerOptions:Ie.optional()}),C9=Ze({role:xe("user"),content:Dt([ce(),Fo(Dt([WC,h9,ZC]))]),providerOptions:Ie.optional()}),k9=Ze({role:xe("assistant"),content:Dt([ce(),Fo(Dt([WC,ZC,g9,v9,UC,y9]))]),providerOptions:Ie.optional()}),E9=Ze({role:xe("tool"),content:Fo(Dt([UC,w9])),providerOptions:Ie.optional()});Dt([x9,C9,k9,E9]);function GC(e,t){if(e===void 0&&t===void 0)return;if(e===void 0)return t;if(t===void 0)return e;const n={...e};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const o=t[r];if(o===void 0)continue;const s=r in e?e[r]:void 0,i=o!==null&&typeof o=="object"&&!Array.isArray(o)&&!(o instanceof Date)&&!(o instanceof RegExp),c=s!=null&&typeof s=="object"&&!Array.isArray(s)&&!(s instanceof Date)&&!(s instanceof RegExp);i&&c?n[r]=GC(s,o):n[r]=o}return n}var S9={};f9(S9,{array:()=>j9,choice:()=>R9,json:()=>P9,object:()=>L9,text:()=>O9});function $9(e){const t=["ROOT"];let n=-1,r=null;function o(u,l,d){switch(u){case'"':{n=l,t.pop(),t.push(d),t.push("INSIDE_STRING");break}case"f":case"t":case"n":{n=l,r=l,t.pop(),t.push(d),t.push("INSIDE_LITERAL");break}case"-":{t.pop(),t.push(d),t.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{n=l,t.pop(),t.push(d),t.push("INSIDE_NUMBER");break}case"{":{n=l,t.pop(),t.push(d),t.push("INSIDE_OBJECT_START");break}case"[":{n=l,t.pop(),t.push(d),t.push("INSIDE_ARRAY_START");break}}}function s(u,l){switch(u){case",":{t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{n=l,t.pop();break}}}function i(u,l){switch(u){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{n=l,t.pop();break}}}for(let u=0;u<e.length;u++){const l=e[u];switch(t[t.length-1]){case"ROOT":o(l,u,"FINISH");break;case"INSIDE_OBJECT_START":{switch(l){case'"':{t.pop(),t.push("INSIDE_OBJECT_KEY");break}case"}":{n=u,t.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{l==='"'&&(t.pop(),t.push("INSIDE_OBJECT_KEY"));break}case"INSIDE_OBJECT_KEY":{l==='"'&&(t.pop(),t.push("INSIDE_OBJECT_AFTER_KEY"));break}case"INSIDE_OBJECT_AFTER_KEY":{l===":"&&(t.pop(),t.push("INSIDE_OBJECT_BEFORE_VALUE"));break}case"INSIDE_OBJECT_BEFORE_VALUE":{o(l,u,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{s(l,u);break}case"INSIDE_STRING":{switch(l){case'"':{t.pop(),n=u;break}case"\\":{t.push("INSIDE_STRING_ESCAPE");break}default:n=u}break}case"INSIDE_ARRAY_START":{l==="]"?(n=u,t.pop()):(n=u,o(l,u,"INSIDE_ARRAY_AFTER_VALUE"));break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(l){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{n=u,t.pop();break}default:{n=u;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{o(l,u,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{t.pop(),n=u;break}case"INSIDE_NUMBER":{switch(l){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{n=u;break}case"e":case"E":case"-":case".":break;case",":{t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&i(l,u),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&s(l,u);break}case"}":{t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&s(l,u);break}case"]":{t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&i(l,u);break}default:{t.pop();break}}break}case"INSIDE_LITERAL":{const f=e.substring(r,u+1);!"false".startsWith(f)&&!"true".startsWith(f)&&!"null".startsWith(f)?(t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?s(l,u):t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&i(l,u)):n=u;break}}}let c=e.slice(0,n+1);for(let u=t.length-1;u>=0;u--)switch(t[u]){case"INSIDE_STRING":{c+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{c+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{c+="]";break}case"INSIDE_LITERAL":{const d=e.substring(r,e.length);"true".startsWith(d)?c+="true".slice(d.length):"false".startsWith(d)?c+="false".slice(d.length):"null".startsWith(d)&&(c+="null".slice(d.length))}}return c}async function ni(e){if(e===void 0)return{value:void 0,state:"undefined-input"};let t=await Ur({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=await Ur({text:$9(e)}),t.success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var O9=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:e}){return e},async parsePartialOutput({text:e}){return{partial:e}},createElementStreamTransform(){}}),L9=({schema:e,name:t,description:n})=>{const r=Wp(e);return{name:"object",responseFormat:sr(r.jsonSchema).then(o=>({type:"json",schema:o,...t!=null&&{name:t},...n!=null&&{description:n}})),async parseCompleteOutput({text:o},s){const i=await Ur({text:o});if(!i.success)throw new dr({message:"No object generated: could not parse the response.",cause:i.error,text:o,response:s.response,usage:s.usage,finishReason:s.finishReason});const c=await Vs({value:i.value,schema:r});if(!c.success)throw new dr({message:"No object generated: response did not match schema.",cause:c.error,text:o,response:s.response,usage:s.usage,finishReason:s.finishReason});return c.value},async parsePartialOutput({text:o}){const s=await ni(o);switch(s.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:s.value}}},createElementStreamTransform(){}}},j9=({element:e,name:t,description:n})=>{const r=Wp(e);return{name:"array",responseFormat:sr(r.jsonSchema).then(o=>{const{$schema:s,...i}=o;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:i}},required:["elements"],additionalProperties:!1},...t!=null&&{name:t},...n!=null&&{description:n}}}),async parseCompleteOutput({text:o},s){const i=await Ur({text:o});if(!i.success)throw new dr({message:"No object generated: could not parse the response.",cause:i.error,text:o,response:s.response,usage:s.usage,finishReason:s.finishReason});const c=i.value;if(c==null||typeof c!="object"||!("elements"in c)||!Array.isArray(c.elements))throw new dr({message:"No object generated: response did not match schema.",cause:new Oo({value:c,cause:"response must be an object with an elements array"}),text:o,response:s.response,usage:s.usage,finishReason:s.finishReason});for(const u of c.elements){const l=await Vs({value:u,schema:r});if(!l.success)throw new dr({message:"No object generated: response did not match schema.",cause:l.error,text:o,response:s.response,usage:s.usage,finishReason:s.finishReason})}return c.elements},async parsePartialOutput({text:o}){const s=await ni(o);switch(s.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const i=s.value;if(i==null||typeof i!="object"||!("elements"in i)||!Array.isArray(i.elements))return;const c=s.state==="repaired-parse"&&i.elements.length>0?i.elements.slice(0,-1):i.elements,u=[];for(const l of c){const d=await Vs({value:l,schema:r});d.success&&u.push(d.value)}return{partial:u}}}},createElementStreamTransform(){let o=0;return new TransformStream({transform({partialOutput:s},i){if(s!=null)for(;o<s.length;o++)i.enqueue(s[o])}})}}},R9=({options:e,name:t,description:n})=>({name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:e}},required:["result"],additionalProperties:!1},...t!=null&&{name:t},...n!=null&&{description:n}}),async parseCompleteOutput({text:r},o){const s=await Ur({text:r});if(!s.success)throw new dr({message:"No object generated: could not parse the response.",cause:s.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});const i=s.value;if(i==null||typeof i!="object"||!("result"in i)||typeof i.result!="string"||!e.includes(i.result))throw new dr({message:"No object generated: response did not match schema.",cause:new Oo({value:i,cause:"response must be an object that contains a choice value."}),text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});return i.result},async parsePartialOutput({text:r}){const o=await ni(r);switch(o.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const s=o.value;if(s==null||typeof s!="object"||!("result"in s)||typeof s.result!="string")return;const i=e.filter(c=>c.startsWith(s.result));return o.state==="successful-parse"?i.includes(s.result)?{partial:s.result}:void 0:i.length===1?{partial:i[0]}:void 0}}},createElementStreamTransform(){}}),P9=({name:e,description:t}={})=>({name:"json",responseFormat:Promise.resolve({type:"json",...e!=null&&{name:e},...t!=null&&{description:t}}),async parseCompleteOutput({text:n},r){const o=await Ur({text:n});if(!o.success)throw new dr({message:"No object generated: could not parse the response.",cause:o.error,text:n,response:r.response,usage:r.usage,finishReason:r.finishReason});return o.value},async parsePartialOutput({text:n}){const r=await ni(n);switch(r.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return r.value===void 0?void 0:{partial:r.value}}},createElementStreamTransform(){}});ti({prefix:"aitxt",size:24});(class extends TransformStream{constructor(){super({transform(e,t){t.enqueue(`data: ${JSON.stringify(e)}
|
|
54
|
+
|
|
55
|
+
`)},flush(e){e.enqueue(`data: [DONE]
|
|
56
|
+
|
|
57
|
+
`)}})}});var M9=o9(()=>_C(Dt([qe({type:xe("text-start"),id:ce(),providerMetadata:Ie.optional()}),qe({type:xe("text-delta"),id:ce(),delta:ce(),providerMetadata:Ie.optional()}),qe({type:xe("text-end"),id:ce(),providerMetadata:Ie.optional()}),qe({type:xe("error"),errorText:ce()}),qe({type:xe("tool-input-start"),toolCallId:ce(),toolName:ce(),providerExecuted:Mt().optional(),providerMetadata:Ie.optional(),dynamic:Mt().optional(),title:ce().optional()}),qe({type:xe("tool-input-delta"),toolCallId:ce(),inputTextDelta:ce()}),qe({type:xe("tool-input-available"),toolCallId:ce(),toolName:ce(),input:jn(),providerExecuted:Mt().optional(),providerMetadata:Ie.optional(),dynamic:Mt().optional(),title:ce().optional()}),qe({type:xe("tool-input-error"),toolCallId:ce(),toolName:ce(),input:jn(),providerExecuted:Mt().optional(),providerMetadata:Ie.optional(),dynamic:Mt().optional(),errorText:ce(),title:ce().optional()}),qe({type:xe("tool-approval-request"),approvalId:ce(),toolCallId:ce()}),qe({type:xe("tool-output-available"),toolCallId:ce(),output:jn(),providerExecuted:Mt().optional(),providerMetadata:Ie.optional(),dynamic:Mt().optional(),preliminary:Mt().optional()}),qe({type:xe("tool-output-error"),toolCallId:ce(),errorText:ce(),providerExecuted:Mt().optional(),providerMetadata:Ie.optional(),dynamic:Mt().optional()}),qe({type:xe("tool-output-denied"),toolCallId:ce()}),qe({type:xe("reasoning-start"),id:ce(),providerMetadata:Ie.optional()}),qe({type:xe("reasoning-delta"),id:ce(),delta:ce(),providerMetadata:Ie.optional()}),qe({type:xe("reasoning-end"),id:ce(),providerMetadata:Ie.optional()}),qe({type:xe("source-url"),sourceId:ce(),url:ce(),title:ce().optional(),providerMetadata:Ie.optional()}),qe({type:xe("source-document"),sourceId:ce(),mediaType:ce(),title:ce(),filename:ce().optional(),providerMetadata:Ie.optional()}),qe({type:xe("file"),url:ce(),mediaType:ce(),providerMetadata:Ie.optional()}),qe({type:PC(e=>typeof e=="string"&&e.startsWith("data-"),{message:'Type must start with "data-"'}),id:ce().optional(),data:jn(),transient:Mt().optional()}),qe({type:xe("start-step")}),qe({type:xe("finish-step")}),qe({type:xe("start"),messageId:ce().optional(),messageMetadata:jn().optional()}),qe({type:xe("finish"),finishReason:LC(["stop","length","content-filter","tool-calls","error","other"]).optional(),messageMetadata:jn().optional()}),qe({type:xe("abort"),reason:ce().optional()}),qe({type:xe("message-metadata"),messageMetadata:jn()})])));function T9(e){return e.type.startsWith("data-")}function $f(e){return e.type.startsWith("tool-")}function KC(e){return e.type==="dynamic-tool"}function Fs(e){return $f(e)||KC(e)}function Of(e){return e.type.split("-").slice(1).join("-")}function I9(e){return KC(e)?e.toolName:Of(e)}function A9({lastMessage:e,messageId:t}){return{message:e?.role==="assistant"?e:{id:t,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function _9({stream:e,messageMetadataSchema:t,dataPartSchemas:n,runUpdateMessageJob:r,onError:o,onToolCall:s,onData:i}){return e.pipeThrough(new TransformStream({async transform(c,u){await r(async({state:l,write:d})=>{var f,p,m,g;function y(v){const k=l.message.parts.filter(Fs).find(E=>E.toolCallId===v);if(k==null)throw new ao({chunkType:"tool-invocation",chunkId:v,message:`No tool invocation found for tool call ID "${v}".`});return k}function x(v){var C;const k=l.message.parts.find(S=>$f(S)&&S.toolCallId===v.toolCallId),E=v,$=k;if(k!=null){k.state=v.state,$.input=E.input,$.output=E.output,$.errorText=E.errorText,$.rawInput=E.rawInput,$.preliminary=E.preliminary,v.title!==void 0&&($.title=v.title),$.providerExecuted=(C=E.providerExecuted)!=null?C:k.providerExecuted;const S=E.providerMetadata;if(S!=null)if(v.state==="output-available"||v.state==="output-error"){const j=k;j.resultProviderMetadata=S}else k.callProviderMetadata=S}else l.message.parts.push({type:`tool-${v.toolName}`,toolCallId:v.toolCallId,state:v.state,title:v.title,input:E.input,output:E.output,rawInput:E.rawInput,errorText:E.errorText,providerExecuted:E.providerExecuted,preliminary:E.preliminary,...E.providerMetadata!=null&&(v.state==="output-available"||v.state==="output-error")?{resultProviderMetadata:E.providerMetadata}:{},...E.providerMetadata!=null&&!(v.state==="output-available"||v.state==="output-error")?{callProviderMetadata:E.providerMetadata}:{}})}function w(v){var C,k;const E=l.message.parts.find(j=>j.type==="dynamic-tool"&&j.toolCallId===v.toolCallId),$=v,S=E;if(E!=null){E.state=v.state,S.toolName=v.toolName,S.input=$.input,S.output=$.output,S.errorText=$.errorText,S.rawInput=(C=$.rawInput)!=null?C:S.rawInput,S.preliminary=$.preliminary,v.title!==void 0&&(S.title=v.title),S.providerExecuted=(k=$.providerExecuted)!=null?k:E.providerExecuted;const j=$.providerMetadata;if(j!=null)if(v.state==="output-available"||v.state==="output-error"){const R=E;R.resultProviderMetadata=j}else E.callProviderMetadata=j}else l.message.parts.push({type:"dynamic-tool",toolName:v.toolName,toolCallId:v.toolCallId,state:v.state,input:$.input,output:$.output,errorText:$.errorText,preliminary:$.preliminary,providerExecuted:$.providerExecuted,title:v.title,...$.providerMetadata!=null&&(v.state==="output-available"||v.state==="output-error")?{resultProviderMetadata:$.providerMetadata}:{},...$.providerMetadata!=null&&!(v.state==="output-available"||v.state==="output-error")?{callProviderMetadata:$.providerMetadata}:{}})}async function b(v){if(v!=null){const C=l.message.metadata!=null?GC(l.message.metadata,v):v;t!=null&&await pg({value:C,schema:t,context:{field:"message.metadata",entityId:l.message.id}}),l.message.metadata=C}}switch(c.type){case"text-start":{const v={type:"text",text:"",providerMetadata:c.providerMetadata,state:"streaming"};l.activeTextParts[c.id]=v,l.message.parts.push(v),d();break}case"text-delta":{const v=l.activeTextParts[c.id];if(v==null)throw new ao({chunkType:"text-delta",chunkId:c.id,message:`Received text-delta for missing text part with ID "${c.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});v.text+=c.delta,v.providerMetadata=(f=c.providerMetadata)!=null?f:v.providerMetadata,d();break}case"text-end":{const v=l.activeTextParts[c.id];if(v==null)throw new ao({chunkType:"text-end",chunkId:c.id,message:`Received text-end for missing text part with ID "${c.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});v.state="done",v.providerMetadata=(p=c.providerMetadata)!=null?p:v.providerMetadata,delete l.activeTextParts[c.id],d();break}case"reasoning-start":{const v={type:"reasoning",text:"",providerMetadata:c.providerMetadata,state:"streaming"};l.activeReasoningParts[c.id]=v,l.message.parts.push(v),d();break}case"reasoning-delta":{const v=l.activeReasoningParts[c.id];if(v==null)throw new ao({chunkType:"reasoning-delta",chunkId:c.id,message:`Received reasoning-delta for missing reasoning part with ID "${c.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});v.text+=c.delta,v.providerMetadata=(m=c.providerMetadata)!=null?m:v.providerMetadata,d();break}case"reasoning-end":{const v=l.activeReasoningParts[c.id];if(v==null)throw new ao({chunkType:"reasoning-end",chunkId:c.id,message:`Received reasoning-end for missing reasoning part with ID "${c.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});v.providerMetadata=(g=c.providerMetadata)!=null?g:v.providerMetadata,v.state="done",delete l.activeReasoningParts[c.id],d();break}case"file":{l.message.parts.push({type:"file",mediaType:c.mediaType,url:c.url,...c.providerMetadata!=null?{providerMetadata:c.providerMetadata}:{}}),d();break}case"source-url":{l.message.parts.push({type:"source-url",sourceId:c.sourceId,url:c.url,title:c.title,providerMetadata:c.providerMetadata}),d();break}case"source-document":{l.message.parts.push({type:"source-document",sourceId:c.sourceId,mediaType:c.mediaType,title:c.title,filename:c.filename,providerMetadata:c.providerMetadata}),d();break}case"tool-input-start":{const v=l.message.parts.filter($f);l.partialToolCalls[c.toolCallId]={text:"",toolName:c.toolName,index:v.length,dynamic:c.dynamic,title:c.title},c.dynamic?w({toolCallId:c.toolCallId,toolName:c.toolName,state:"input-streaming",input:void 0,providerExecuted:c.providerExecuted,title:c.title,providerMetadata:c.providerMetadata}):x({toolCallId:c.toolCallId,toolName:c.toolName,state:"input-streaming",input:void 0,providerExecuted:c.providerExecuted,title:c.title,providerMetadata:c.providerMetadata}),d();break}case"tool-input-delta":{const v=l.partialToolCalls[c.toolCallId];if(v==null)throw new ao({chunkType:"tool-input-delta",chunkId:c.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${c.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});v.text+=c.inputTextDelta;const{value:C}=await ni(v.text);v.dynamic?w({toolCallId:c.toolCallId,toolName:v.toolName,state:"input-streaming",input:C,title:v.title}):x({toolCallId:c.toolCallId,toolName:v.toolName,state:"input-streaming",input:C,title:v.title}),d();break}case"tool-input-available":{c.dynamic?w({toolCallId:c.toolCallId,toolName:c.toolName,state:"input-available",input:c.input,providerExecuted:c.providerExecuted,providerMetadata:c.providerMetadata,title:c.title}):x({toolCallId:c.toolCallId,toolName:c.toolName,state:"input-available",input:c.input,providerExecuted:c.providerExecuted,providerMetadata:c.providerMetadata,title:c.title}),d(),s&&!c.providerExecuted&&await s({toolCall:c});break}case"tool-input-error":{const v=l.message.parts.filter(Fs).find(k=>k.toolCallId===c.toolCallId);(v!=null?v.type==="dynamic-tool":!!c.dynamic)?w({toolCallId:c.toolCallId,toolName:c.toolName,state:"output-error",input:c.input,errorText:c.errorText,providerExecuted:c.providerExecuted,providerMetadata:c.providerMetadata}):x({toolCallId:c.toolCallId,toolName:c.toolName,state:"output-error",input:void 0,rawInput:c.input,errorText:c.errorText,providerExecuted:c.providerExecuted,providerMetadata:c.providerMetadata}),d();break}case"tool-approval-request":{const v=y(c.toolCallId);v.state="approval-requested",v.approval={id:c.approvalId},d();break}case"tool-output-denied":{const v=y(c.toolCallId);v.state="output-denied",d();break}case"tool-output-available":{const v=y(c.toolCallId);v.type==="dynamic-tool"?w({toolCallId:c.toolCallId,toolName:v.toolName,state:"output-available",input:v.input,output:c.output,preliminary:c.preliminary,providerExecuted:c.providerExecuted,providerMetadata:c.providerMetadata,title:v.title}):x({toolCallId:c.toolCallId,toolName:Of(v),state:"output-available",input:v.input,output:c.output,providerExecuted:c.providerExecuted,preliminary:c.preliminary,providerMetadata:c.providerMetadata,title:v.title}),d();break}case"tool-output-error":{const v=y(c.toolCallId);v.type==="dynamic-tool"?w({toolCallId:c.toolCallId,toolName:v.toolName,state:"output-error",input:v.input,errorText:c.errorText,providerExecuted:c.providerExecuted,providerMetadata:c.providerMetadata,title:v.title}):x({toolCallId:c.toolCallId,toolName:Of(v),state:"output-error",input:v.input,rawInput:v.rawInput,errorText:c.errorText,providerExecuted:c.providerExecuted,providerMetadata:c.providerMetadata,title:v.title}),d();break}case"start-step":{l.message.parts.push({type:"step-start"});break}case"finish-step":{l.activeTextParts={},l.activeReasoningParts={};break}case"start":{c.messageId!=null&&(l.message.id=c.messageId),await b(c.messageMetadata),(c.messageId!=null||c.messageMetadata!=null)&&d();break}case"finish":{c.finishReason!=null&&(l.finishReason=c.finishReason),await b(c.messageMetadata),c.messageMetadata!=null&&d();break}case"message-metadata":{await b(c.messageMetadata),c.messageMetadata!=null&&d();break}case"error":{o?.(new Error(c.errorText));break}default:if(T9(c)){if(n?.[c.type]!=null){const k=l.message.parts.findIndex($=>"id"in $&&"data"in $&&$.id===c.id&&$.type===c.type),E=k>=0?k:l.message.parts.length;await pg({value:c.data,schema:n[c.type],context:{field:`message.parts[${E}].data`,entityName:c.type,entityId:c.id}})}const v=c;if(v.transient){i?.(v);break}const C=v.id!=null?l.message.parts.find(k=>v.type===k.type&&v.id===k.id):void 0;C!=null?C.data=v.data:l.message.parts.push(v),i?.(v),d()}}u.enqueue(c)})}}))}async function N9({stream:e,onError:t}){const n=e.getReader();try{for(;;){const{done:r}=await n.read();if(r)break}}catch(r){t?.(r)}finally{n.releaseLock()}}ti({prefix:"aitxt",size:24});ti({prefix:"aiobj",size:24});var D9=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise((t,n)=>{this.queue.push(async()=>{try{await e(),t()}catch(r){n(r)}}),this.processQueue()})}};ti({prefix:"aiobj",size:24});async function V9(e){if(e==null)return[];if(!globalThis.FileList||!(e instanceof globalThis.FileList))throw new Error("FileList is not supported in the current environment");return Promise.all(Array.from(e).map(async t=>{const{name:n,type:r}=t,o=await new Promise((s,i)=>{const c=new FileReader;c.onload=u=>{var l;s((l=u.target)==null?void 0:l.result)},c.onerror=u=>i(u),c.readAsDataURL(t)});return{type:"file",mediaType:r,filename:n,url:o}}))}var z9=class{constructor({api:e="/api/chat",credentials:t,headers:n,body:r,fetch:o,prepareSendMessagesRequest:s,prepareReconnectToStreamRequest:i}){this.api=e,this.credentials=t,this.headers=n,this.body=r,this.fetch=o,this.prepareSendMessagesRequest=s,this.prepareReconnectToStreamRequest=i}async sendMessages({abortSignal:e,...t}){var n,r,o,s,i;const c=await sr(this.body),u=await sr(this.headers),l=await sr(this.credentials),d={...io(u),...io(t.headers)},f=await((n=this.prepareSendMessagesRequest)==null?void 0:n.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...c,...t.body},headers:d,credentials:l,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId})),p=(r=f?.api)!=null?r:this.api,m=f?.headers!==void 0?io(f.headers):d,g=f?.body!==void 0?f.body:{...c,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId},y=(o=f?.credentials)!=null?o:l,w=await((s=this.fetch)!=null?s:globalThis.fetch)(p,{method:"POST",headers:{"Content-Type":"application/json",...m},body:JSON.stringify(g),credentials:y,signal:e});if(!w.ok)throw new Error((i=await w.text())!=null?i:"Failed to fetch the chat response.");if(!w.body)throw new Error("The response body is empty.");return this.processResponseStream(w.body)}async reconnectToStream(e){var t,n,r,o,s;const i=await sr(this.body),c=await sr(this.headers),u=await sr(this.credentials),l={...io(c),...io(e.headers)},d=await((t=this.prepareReconnectToStreamRequest)==null?void 0:t.call(this,{api:this.api,id:e.chatId,body:{...i,...e.body},headers:l,credentials:u,requestMetadata:e.metadata})),f=(n=d?.api)!=null?n:`${this.api}/${e.chatId}/stream`,p=d?.headers!==void 0?io(d.headers):l,m=(r=d?.credentials)!=null?r:u,y=await((o=this.fetch)!=null?o:globalThis.fetch)(f,{method:"GET",headers:p,credentials:m});if(y.status===204)return null;if(!y.ok)throw new Error((s=await y.text())!=null?s:"Failed to fetch the chat response.");if(!y.body)throw new Error("The response body is empty.");return this.processResponseStream(y.body)}},YC=class extends z9{constructor(e={}){super(e)}processResponseStream(e){return u9({stream:e,schema:M9}).pipeThrough(new TransformStream({async transform(t,n){if(!t.success)throw t.error;n.enqueue(t.value)}}))}},F9=class{constructor({generateId:e=pR,id:t=e(),transport:n=new YC,messageMetadataSchema:r,dataPartSchemas:o,state:s,onError:i,onToolCall:c,onFinish:u,onData:l,sendAutomaticallyWhen:d}){this.activeResponse=void 0,this.jobExecutor=new D9,this.sendMessage=async(f,p)=>{var m,g,y,x;if(f==null){await this.makeRequest({trigger:"submit-message",messageId:(m=this.lastMessage)==null?void 0:m.id,...p});return}let w;if("text"in f||"files"in f?w={parts:[...Array.isArray(f.files)?f.files:await V9(f.files),..."text"in f&&f.text!=null?[{type:"text",text:f.text}]:[]]}:w=f,f.messageId!=null){const b=this.state.messages.findIndex(v=>v.id===f.messageId);if(b===-1)throw new Error(`message with id ${f.messageId} not found`);if(this.state.messages[b].role!=="user")throw new Error(`message with id ${f.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,b+1),this.state.replaceMessage(b,{...w,id:f.messageId,role:(g=w.role)!=null?g:"user",metadata:f.metadata})}else this.state.pushMessage({...w,id:(y=w.id)!=null?y:this.generateId(),role:(x=w.role)!=null?x:"user",metadata:f.metadata});await this.makeRequest({trigger:"submit-message",messageId:f.messageId,...p})},this.regenerate=async({messageId:f,...p}={})=>{const m=f==null?this.state.messages.length-1:this.state.messages.findIndex(g=>g.id===f);if(m===-1)throw new Error(`message ${f} not found`);this.state.messages=this.state.messages.slice(0,this.messages[m].role==="assistant"?m:m+1),await this.makeRequest({trigger:"regenerate-message",messageId:f,...p})},this.resumeStream=async(f={})=>{await this.makeRequest({trigger:"resume-stream",...f})},this.clearError=()=>{this.status==="error"&&(this.state.error=void 0,this.setStatus({status:"ready"}))},this.addToolApprovalResponse=async({id:f,approved:p,reason:m,options:g})=>this.jobExecutor.run(async()=>{const y=this.state.messages,x=y[y.length-1],w=b=>Fs(b)&&b.state==="approval-requested"&&b.approval.id===f?{...b,state:"approval-responded",approval:{id:f,approved:p,reason:m}}:b;this.state.replaceMessage(y.length-1,{...x,parts:x.parts.map(w)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(w)),this.status!=="streaming"&&this.status!=="submitted"&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(b=>{var v;b&&this.makeRequest({trigger:"submit-message",messageId:(v=this.lastMessage)==null?void 0:v.id,...g})})}),this.addToolOutput=async({state:f="output-available",toolCallId:p,output:m,errorText:g,options:y})=>this.jobExecutor.run(async()=>{const x=this.state.messages,w=x[x.length-1],b=v=>Fs(v)&&v.toolCallId===p?{...v,state:f,output:m,errorText:g}:v;this.state.replaceMessage(x.length-1,{...w,parts:w.parts.map(b)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(b)),this.status!=="streaming"&&this.status!=="submitted"&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(v=>{var C;v&&this.makeRequest({trigger:"submit-message",messageId:(C=this.lastMessage)==null?void 0:C.id,...y})})}),this.addToolResult=this.addToolOutput,this.stop=async()=>{var f;this.status!=="streaming"&&this.status!=="submitted"||(f=this.activeResponse)!=null&&f.abortController&&this.activeResponse.abortController.abort()},this.id=t,this.transport=n,this.generateId=e,this.messageMetadataSchema=r,this.dataPartSchemas=o,this.state=s,this.onError=i,this.onToolCall=c,this.onFinish=u,this.onData=l,this.sendAutomaticallyWhen=d}get status(){return this.state.status}setStatus({status:e,error:t}){this.status!==e&&(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async shouldSendAutomatically(){if(!this.sendAutomaticallyWhen)return!1;const e=this.sendAutomaticallyWhen({messages:this.state.messages});return e&&typeof e=="object"&&"then"in e?await e:e}async makeRequest({trigger:e,metadata:t,headers:n,body:r,messageId:o}){var s,i,c;let u;if(e==="resume-stream")try{const m=await this.transport.reconnectToStream({chatId:this.id,metadata:t,headers:n,body:r});if(m==null)return;u=m}catch(m){this.onError&&m instanceof Error&&this.onError(m),this.setStatus({status:"error",error:m});return}this.setStatus({status:"submitted",error:void 0});const l=this.lastMessage;let d=!1,f=!1,p=!1;try{const m={state:A9({lastMessage:this.state.snapshot(l),messageId:this.generateId()}),abortController:new AbortController};m.abortController.signal.addEventListener("abort",()=>{d=!0}),this.activeResponse=m;let g;e==="resume-stream"?g=u:g=await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:m.abortController.signal,metadata:t,headers:n,body:r,trigger:e,messageId:o});const y=x=>this.jobExecutor.run(()=>x({state:m.state,write:()=>{var w;this.setStatus({status:"streaming"}),m.state.message.id===((w=this.lastMessage)==null?void 0:w.id)?this.state.replaceMessage(this.state.messages.length-1,m.state.message):this.state.pushMessage(m.state.message)}}));await N9({stream:_9({stream:g,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:y,onError:x=>{throw x}}),onError:x=>{throw x}}),this.setStatus({status:"ready"})}catch(m){if(d||m.name==="AbortError")return d=!0,this.setStatus({status:"ready"}),null;p=!0,m instanceof TypeError&&(m.message.toLowerCase().includes("fetch")||m.message.toLowerCase().includes("network"))&&(f=!0),this.onError&&m instanceof Error&&this.onError(m),this.setStatus({status:"error",error:m})}finally{try{(i=this.onFinish)==null||i.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:d,isDisconnect:f,isError:p,finishReason:(s=this.activeResponse)==null?void 0:s.state.finishReason})}catch(m){console.error(m)}this.activeResponse=void 0}!p&&await this.shouldSendAutomatically()&&await this.makeRequest({trigger:"submit-message",messageId:(c=this.lastMessage)==null?void 0:c.id,metadata:t,headers:n,body:r})}},Yc,mg;function B9(){if(mg)return Yc;mg=1;function e(t,n){if(typeof t!="function")throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof t}\`.`);let r,o=0;return function(...i){clearTimeout(r);const c=Date.now(),u=c-o,l=n-u;l<=0?(o=c,t.apply(this,i)):r=setTimeout(()=>{o=Date.now(),t.apply(this,i)},l)}}return Yc=e,Yc}var H9=B9();const W9=t6(H9);var qc={exports:{}},Xc={};var hg;function Z9(){if(hg)return Xc;hg=1;var e=Ja();function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function c(f,p){var m=p(),g=r({inst:{value:m,getSnapshot:p}}),y=g[0].inst,x=g[1];return s(function(){y.value=m,y.getSnapshot=p,u(y)&&x({inst:y})},[f,m,p]),o(function(){return u(y)&&x({inst:y}),f(function(){u(y)&&x({inst:y})})},[f]),i(m),m}function u(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!n(f,m)}catch{return!0}}function l(f,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:c;return Xc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Xc}var gg;function qC(){return gg||(gg=1,qc.exports=Z9()),qc.exports}var U9=qC(),XC=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Xe=(e,t,n)=>(XC(e,t,"read from private field"),n?n.call(e):t.get(e)),On=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},rr=(e,t,n,r)=>(XC(e,t,"write to private field"),t.set(e,n),n);function G9(e,t){return t!=null?W9(e,t):e}var an,Gi,Ki,ms,hs,gs,co,Lf,jf,K9=class{constructor(e=[]){On(this,an,void 0),On(this,Gi,"ready"),On(this,Ki,void 0),On(this,ms,new Set),On(this,hs,new Set),On(this,gs,new Set),this.pushMessage=t=>{rr(this,an,Xe(this,an).concat(t)),Xe(this,co).call(this)},this.popMessage=()=>{rr(this,an,Xe(this,an).slice(0,-1)),Xe(this,co).call(this)},this.replaceMessage=(t,n)=>{rr(this,an,[...Xe(this,an).slice(0,t),this.snapshot(n),...Xe(this,an).slice(t+1)]),Xe(this,co).call(this)},this.snapshot=t=>structuredClone(t),this["~registerMessagesCallback"]=(t,n)=>{const r=n?G9(t,n):t;return Xe(this,ms).add(r),()=>{Xe(this,ms).delete(r)}},this["~registerStatusCallback"]=t=>(Xe(this,hs).add(t),()=>{Xe(this,hs).delete(t)}),this["~registerErrorCallback"]=t=>(Xe(this,gs).add(t),()=>{Xe(this,gs).delete(t)}),On(this,co,()=>{Xe(this,ms).forEach(t=>t())}),On(this,Lf,()=>{Xe(this,hs).forEach(t=>t())}),On(this,jf,()=>{Xe(this,gs).forEach(t=>t())}),rr(this,an,e)}get status(){return Xe(this,Gi)}set status(e){rr(this,Gi,e),Xe(this,Lf).call(this)}get error(){return Xe(this,Ki)}set error(e){rr(this,Ki,e),Xe(this,jf).call(this)}get messages(){return Xe(this,an)}set messages(e){rr(this,an,[...e]),Xe(this,co).call(this)}};an=new WeakMap;Gi=new WeakMap;Ki=new WeakMap;ms=new WeakMap;hs=new WeakMap;gs=new WeakMap;co=new WeakMap;Lf=new WeakMap;jf=new WeakMap;var lo,vg=class extends F9{constructor({messages:e,...t}){const n=new K9(e);super({...t,state:n}),On(this,lo,void 0),this["~registerMessagesCallback"]=(r,o)=>Xe(this,lo)["~registerMessagesCallback"](r,o),this["~registerStatusCallback"]=r=>Xe(this,lo)["~registerStatusCallback"](r),this["~registerErrorCallback"]=r=>Xe(this,lo)["~registerErrorCallback"](r),rr(this,lo,n)}};lo=new WeakMap;function Y9({experimental_throttle:e,resume:t=!1,...n}={}){const r=a.useRef("chat"in n?{}:{onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});"chat"in n||(r.current={onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});const o={...n,onToolCall:p=>{var m,g;return(g=(m=r.current).onToolCall)==null?void 0:g.call(m,p)},onData:p=>{var m,g;return(g=(m=r.current).onData)==null?void 0:g.call(m,p)},onFinish:p=>{var m,g;return(g=(m=r.current).onFinish)==null?void 0:g.call(m,p)},onError:p=>{var m,g;return(g=(m=r.current).onError)==null?void 0:g.call(m,p)},sendAutomaticallyWhen:p=>{var m,g,y;return(y=(g=(m=r.current).sendAutomaticallyWhen)==null?void 0:g.call(m,p))!=null?y:!1}},s=a.useRef("chat"in n?n.chat:new vg(o));("chat"in n&&n.chat!==s.current||"id"in n&&s.current.id!==n.id)&&(s.current="chat"in n?n.chat:new vg(o));const c=a.useCallback(p=>s.current["~registerMessagesCallback"](p,e),[e,s.current.id]),u=a.useSyncExternalStore(c,()=>s.current.messages,()=>s.current.messages),l=a.useSyncExternalStore(s.current["~registerStatusCallback"],()=>s.current.status,()=>s.current.status),d=a.useSyncExternalStore(s.current["~registerErrorCallback"],()=>s.current.error,()=>s.current.error),f=a.useCallback(p=>{typeof p=="function"&&(p=p(s.current.messages)),s.current.messages=p},[s]);return a.useEffect(()=>{t&&s.current.resumeStream()},[t,s]),{id:s.current.id,messages:u,setMessages:f,sendMessage:s.current.sendMessage,regenerate:s.current.regenerate,clearError:s.current.clearError,stop:s.current.stop,error:d,resumeStream:s.current.resumeStream,status:l,addToolResult:s.current.addToolOutput,addToolOutput:s.current.addToolOutput,addToolApprovalResponse:s.current.addToolApprovalResponse}}function JC(e="h",t=12){const n=globalThis.crypto;if(n&&typeof n.randomUUID=="function"){const o=n.randomUUID().replace(/-/g,"").slice(0,t);return e?`${e}_${o}`:o}if(n&&typeof n.getRandomValues=="function"){const o=new Uint8Array(Math.ceil(t/2));n.getRandomValues(o);const s=Array.from(o,i=>i.toString(16).padStart(2,"0")).join("").slice(0,t);return e?`${e}_${s}`:s}const r=Math.random().toString(36).slice(2,2+t);return e?`${e}_${r}`:r}const q9=200,X9=()=>Date.now(),J9=()=>JC("h",12),Q9=e=>e instanceof Error?{name:e.name,message:e.message}:{message:String(e)},eP=()=>{const e=globalThis;return e.H_OBSERVABILITY===!0||e.H_DEBUG===!0};class tP{sinks=new Map;get size(){return this.sinks.size}add(t,n={}){const r=n.kinds?new Set(n.kinds):null;return this.sinks.set(t,{kinds:r}),()=>{this.sinks.delete(t)}}emit(t){for(const[n,r]of this.sinks)if(!(r.kinds&&!r.kinds.has(t.kind)))try{n(t)}catch{}}}class nP{constructor(t){this.owner=t}owner;log(t,n,r={}){const o={id:this.owner.createId(),kind:"log",timestamp:this.owner.now(),level:t,message:n,category:r.category,data:r.data};return this.owner.emit(o),o}debug(t,n){return this.log("debug",t,n)}info(t,n){return this.log("info",t,n)}warn(t,n){return this.log("warn",t,n)}error(t,n){return this.log("error",t,n)}}class rP{constructor(t){this.owner=t}owner;counter(t,n=1,r={}){return this.record("counter",t,n,r)}gauge(t,n,r={}){return this.record("gauge",t,n,r)}timing(t,n,r={}){return this.record("timing",t,n,{...r,unit:r.unit??"ms"})}record(t,n,r,o){const s={id:this.owner.createId(),kind:"metric",timestamp:this.owner.now(),metricType:t,name:n,value:r,category:o.category,unit:o.unit,tags:o.tags,data:o.data};return this.owner.emit(s),s}}class oP{constructor(t,n){this.owner=t,this.event=n,this.owner.emit({...n})}owner;event;ended=!1;end(t){if(this.ended)return this.event;const n=this.owner.now();return this.ended=!0,this.event.endTime=n,this.event.durationMs=Math.max(0,n-this.event.startTime),this.event.status="ok",t&&(this.event.data={...this.event.data,...t}),this.owner.emit({...this.event}),this.event}error(t,n){if(this.ended)return this.event;const r=this.owner.now();return this.ended=!0,this.event.endTime=r,this.event.durationMs=Math.max(0,r-this.event.startTime),this.event.status="error",this.event.error=Q9(t),n&&(this.event.data={...this.event.data,...n}),this.owner.emit({...this.event}),this.event}}class sP{constructor(t){this.owner=t}owner;start(t,n={}){const r=this.owner.createId(),o=this.owner.now(),s={id:r,kind:"span",timestamp:o,name:t,traceId:n.traceId??r,parentId:n.parentId,startTime:o,status:"active",category:n.category,data:n.data};return new oP(this.owner,s)}}class Zp{logger=new nP(this);metrics=new rP(this);trace=new sP(this);sinks=new tP;buffer=[];maxBufferSize;enabled;nowFn;createIdFn;constructor(t={}){this.enabled=t.enabled??!0,this.maxBufferSize=Math.max(0,t.maxBufferSize??q9),this.nowFn=t.now??X9,this.createIdFn=t.createId??J9}static global(t={}){return new Zp({...t,enabled:t.enabled??eP()})}get isEnabled(){return this.enabled}setEnabled(t){this.enabled=t}subscribe(t,n={}){const r=this.sinks.add(t,n);if(n.replay)for(const o of this.buffer)n.kinds&&!n.kinds.includes(o.kind)||t(o);return r}flush(){const t=this.buffer.slice();return this.buffer.length=0,t}snapshot(){return this.buffer.slice()}emit(t){return this.enabled&&(this.remember(t),this.sinks.size>0&&this.sinks.emit(t)),t}now(){return this.nowFn()}createId(){return this.createIdFn()}remember(t){this.maxBufferSize!==0&&(this.buffer.push(t),this.buffer.length>this.maxBufferSize&&this.buffer.splice(0,this.buffer.length-this.maxBufferSize))}}const en=Zp.global();function QC(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function iP(e,t){const n=e.toLowerCase();return n.includes("secret")||n.includes("token")||n.includes("password")||n.includes("apikey")||n.includes("api_key")||t[0]==="set_environment_variable"&&n==="value"}function Bs(e,t=[]){if(Array.isArray(e))return e.map(r=>Bs(r,t));if(!QC(e))return e;const n={};for(const[r,o]of Object.entries(e))n[r]=iP(r,t)?"[redacted]":Bs(o,[...t,r]);return n}function aP(e){if(e)return e instanceof Error?{name:e.name,message:e.message}:QC(e)?Bs(e):{message:String(e)}}function cP(e,t=en){const n=e.status??"started",r=n==="failed"?"error":"info";return t.logger[r]("hudson.agent.action",{category:"agent-action",data:{triggeredBy:"agent",source:e.source??"external",origin:e.origin,actor:e.actor,status:n,toolset:e.toolset,chatId:e.chatId,action:e.action,commandId:e.commandId,appId:e.appId,appName:e.appName,workspaceId:e.workspaceId,workspaceName:e.workspaceName,traceId:e.traceId,parentTraceId:e.parentTraceId,args:e.args?Bs(e.args,[e.action??""]):void 0,metadata:e.metadata?Bs(e.metadata):void 0,error:aP(e.error)}})}const lP=a.createContext({});function uP(){return a.useContext(lP)}const dP="about:blank";function fP(e){const t={};for(const n of e.attachmentsRef.current??[])if(e.activeAttachmentsRef.current.has(n.label)){const r=n.content();r!==null&&(t[n.label.toLowerCase()]=r)}return{toolset:e.toolsetRef.current,context:{...e.contextRef.current,...t},mode:e.modeRef.current,provider:e.providerRef.current,model:e.modelRef.current,effort:e.effortRef.current}}function pP(e,t){e.current?.(t)}function Jc(e,t){e.current?.(t)}function ks(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function It(e){return typeof e=="string"&&e.trim()?e:void 0}function mP(e,t){if(!(!t||!ks(e)||!Array.isArray(e.commands)))return e.commands.find(n=>ks(n)&&n.id===t)}function hP(e){if(!ks(e))return{};const t=ks(e.scope)?e.scope:void 0,n=ks(e.workspace)?e.workspace:void 0;return{workspaceId:It(t?.workspaceId)??It(n?.id),workspaceName:It(t?.workspaceName)??It(n?.name)}}function gP(e){const t=e?.parentTraceId;return It(typeof t=="function"?t():t)}function Qc(e){const t=mP(e.context,It(e.args.commandId)),n=hP(e.context),r=e.trace?.appId??It(e.args.appId)??It(e.args.targetAppId)??It(t?.appId),o=e.trace?.appName??It(e.args.appName)??It(e.args.targetAppName)??It(t?.appName),s=e.trace?.workspaceId??It(e.args.workspaceId)??n.workspaceId,i=e.trace?.workspaceName??n.workspaceName;cP({source:e.trace?.source??"useHudsonAI",status:e.status,toolset:e.toolset,chatId:e.chatId,action:e.toolName,commandId:It(e.args.commandId),appId:r,appName:o,workspaceId:s,workspaceName:i,traceId:e.traceId,parentTraceId:gP(e.trace),args:e.args,error:e.error})}function vP({api:e,toolset:t,chatId:n,initialMessages:r,context:o,onToolCall:s,mode:i,attachments:c,provider:u,model:l,effort:d,onFinish:f,onError:p,agentTrace:m}){const g=uP(),y=e??g.aiChat,x=a.useRef(s),w=a.useRef(f),b=a.useRef(p),v=a.useRef(m),[C,k]=a.useState(new Set),E=a.useCallback(G=>{k(ue=>{const se=new Set(ue);return se.has(G)?se.delete(G):se.add(G),se})},[]),[$]=Tt("hudson.settings",{}),S=i??$.aiMode??"api",j=a.useRef(C),R=a.useRef(c),T=a.useRef(o),A=a.useRef(t),L=a.useRef(S),V=a.useRef(u),I=a.useRef(l),_=a.useRef(d);a.useEffect(()=>{x.current=s},[s]),a.useEffect(()=>{w.current=f},[f]),a.useEffect(()=>{b.current=p},[p]),a.useEffect(()=>{v.current=m},[m]),a.useEffect(()=>{j.current=C},[C]),a.useEffect(()=>{R.current=c},[c]),a.useEffect(()=>{T.current=o},[o]),a.useEffect(()=>{A.current=t},[t]),a.useEffect(()=>{L.current=S},[S]),a.useEffect(()=>{V.current=u},[u]),a.useEffect(()=>{I.current=l},[l]),a.useEffect(()=>{_.current=d},[d]);const N=a.useMemo(()=>new YC({api:y??dP,body:()=>fP({activeAttachmentsRef:j,attachmentsRef:R,contextRef:T,toolsetRef:A,modeRef:L,providerRef:V,modelRef:I,effortRef:_})}),[y]),O=a.useCallback(async({toolCall:G})=>{if(!x.current)return;const ue=G.input&&typeof G.input=="object"&&!Array.isArray(G.input)?G.input:{},se=JC("tr");try{Qc({toolset:A.current,chatId:n,toolName:G.toolName,args:ue,context:T.current,trace:v.current,status:"started",traceId:se}),await x.current(G.toolName,ue),Qc({toolset:A.current,chatId:n,toolName:G.toolName,args:ue,context:T.current,trace:v.current,status:"completed",traceId:se})}catch(ne){const re=ne instanceof Error?ne:new Error(String(ne));throw Qc({toolset:A.current,chatId:n,toolName:G.toolName,args:ue,context:T.current,trace:v.current,status:"failed",traceId:se,error:re}),Jc(b,re),re}},[n]),z=Y9({id:n,messages:r,transport:N,onToolCall:O,onFinish:G=>pP(w,G),onError:G=>Jc(b,G)}),M=a.useCallback(()=>{z.setMessages([])},[z]),q=a.useCallback((...G)=>{if(y)return z.sendMessage(...G);const ue=new Error("Hudson AI is not configured for this host. Provide useHudsonAI({ api }) or WorkspaceShell environment.routes.aiChat.");return Jc(b,ue),Promise.reject(ue)},[z,y]),{messages:ee}=z;return{messages:ee,sendMessage:q,stop:z.stop,status:z.status,setMessages:z.setMessages,clearChat:M,error:z.error,mode:S,attachments:c??[],activeAttachments:C,toggleAttachment:E}}function bP({app:e,commands:t,state:n,provider:r,model:o,onFinish:s}){const i=a.useMemo(()=>(e.intents??[]).map(l=>({commandId:l.commandId,title:l.title,description:l.description,category:l.category,keywords:l.keywords,shortcut:l.shortcut,dangerous:l.dangerous,params:l.params?.map(d=>({name:d.name,description:d.description,type:d.type,optional:d.optional,enum:d.enum}))})),[e.intents]),c=a.useMemo(()=>({appId:e.id,appName:e.name,appDescription:e.description,intents:i,state:n}),[e.id,e.name,e.description,i,n]),u=a.useCallback(l=>{const d=t.find(f=>f.id===l);if(!d){console.warn(`[useAssistant] no command for id "${l}"`);return}d.action()},[t]);return vP({toolset:"intents",context:c,provider:r,model:o,onFinish:s,onToolCall:(l,d)=>{if(l!=="dispatch")return;const f=d.commandId;typeof f=="string"&&u(f)}})}const Ro={panels:{statusBar:"bg-card/95 backdrop-blur-xl border-t border-[var(--hud-chrome-border-subtle)] shadow-[var(--hud-shadow-bar)] fixed bottom-0 left-0 right-0 z-[60]"},zIndex:{navigationStack:50,drawer:70},layout:{navHeight:48,statusBarHeight:28}},yP=Ro.panels,F=cx.createContext({});var wP=Object.defineProperty,bg=Object.getOwnPropertySymbols,xP=Object.prototype.hasOwnProperty,CP=Object.prototype.propertyIsEnumerable,yg=(e,t,n)=>t in e?wP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,el=(e,t)=>{for(var n in t||(t={}))xP.call(t,n)&&yg(e,n,t[n]);if(bg)for(var n of bg(t))CP.call(t,n)&&yg(e,n,t[n]);return e};const kP=(e,t)=>{const n=a.useContext(F),r=el(el({},n),e);return a.createElement("svg",el({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M3 12H6L9 3L15 21L18 12H21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},EP=a.forwardRef(kP);var SP=EP,$P=Object.defineProperty,wg=Object.getOwnPropertySymbols,OP=Object.prototype.hasOwnProperty,LP=Object.prototype.propertyIsEnumerable,xg=(e,t,n)=>t in e?$P(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tl=(e,t)=>{for(var n in t||(t={}))OP.call(t,n)&&xg(e,n,t[n]);if(wg)for(var n of wg(t))LP.call(t,n)&&xg(e,n,t[n]);return e};const jP=(e,t)=>{const n=a.useContext(F),r=tl(tl({},n),e);return a.createElement("svg",tl({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M17.5 8C17.5 8 19 9.5 19 12C19 14.5 17.5 16 17.5 16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M20.5 5C20.5 5 23 7.5 23 12C23 16.5 20.5 19 20.5 19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M6.5 8C6.5 8 5 9.5 5 12C5 14.5 6.5 16 6.5 16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M3.5 5C3.5 5 1 7.5 1 12C1 16.5 3.5 19 3.5 19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z",fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},RP=a.forwardRef(jP);var PP=RP,MP=Object.defineProperty,Cg=Object.getOwnPropertySymbols,TP=Object.prototype.hasOwnProperty,IP=Object.prototype.propertyIsEnumerable,kg=(e,t,n)=>t in e?MP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nl=(e,t)=>{for(var n in t||(t={}))TP.call(t,n)&&kg(e,n,t[n]);if(Cg)for(var n of Cg(t))IP.call(t,n)&&kg(e,n,t[n]);return e};const AP=(e,t)=>{const n=a.useContext(F),r=nl(nl({},n),e);return a.createElement("svg",nl({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M2 19V5C2 3.89543 2.89543 3 4 3H20C21.1046 3 22 3.89543 22 5V19C22 20.1046 21.1046 21 20 21H4C2.89543 21 2 20.1046 2 19Z",stroke:"currentColor"}),a.createElement("path",{d:"M2 7L22 7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M5 5.01L5.01 4.99889",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M8 5.01L8.01 4.99889",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M11 5.01L11.01 4.99889",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},_P=a.forwardRef(AP);var NP=_P,DP=Object.defineProperty,Eg=Object.getOwnPropertySymbols,VP=Object.prototype.hasOwnProperty,zP=Object.prototype.propertyIsEnumerable,Sg=(e,t,n)=>t in e?DP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rl=(e,t)=>{for(var n in t||(t={}))VP.call(t,n)&&Sg(e,n,t[n]);if(Eg)for(var n of Eg(t))zP.call(t,n)&&Sg(e,n,t[n]);return e};const FP=(e,t)=>{const n=a.useContext(F),r=rl(rl({},n),e);return a.createElement("svg",rl({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M12 3L12 21M12 21L20.5 12.5M12 21L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},BP=a.forwardRef(FP);var HP=BP,WP=Object.defineProperty,$g=Object.getOwnPropertySymbols,ZP=Object.prototype.hasOwnProperty,UP=Object.prototype.propertyIsEnumerable,Og=(e,t,n)=>t in e?WP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ol=(e,t)=>{for(var n in t||(t={}))ZP.call(t,n)&&Og(e,n,t[n]);if($g)for(var n of $g(t))UP.call(t,n)&&Og(e,n,t[n]);return e};const GP=(e,t)=>{const n=a.useContext(F),r=ol(ol({},n),e);return a.createElement("svg",ol({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M3 12L21 12M21 12L12.5 3.5M21 12L12.5 20.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},KP=a.forwardRef(GP);var YP=KP,qP=Object.defineProperty,Lg=Object.getOwnPropertySymbols,XP=Object.prototype.hasOwnProperty,JP=Object.prototype.propertyIsEnumerable,jg=(e,t,n)=>t in e?qP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sl=(e,t)=>{for(var n in t||(t={}))XP.call(t,n)&&jg(e,n,t[n]);if(Lg)for(var n of Lg(t))JP.call(t,n)&&jg(e,n,t[n]);return e};const QP=(e,t)=>{const n=a.useContext(F),r=sl(sl({},n),e);return a.createElement("svg",sl({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M17 8L12 3L7 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M17 16L12 21L7 16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},eM=a.forwardRef(QP);var tM=eM,nM=Object.defineProperty,Rg=Object.getOwnPropertySymbols,rM=Object.prototype.hasOwnProperty,oM=Object.prototype.propertyIsEnumerable,Pg=(e,t,n)=>t in e?nM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,il=(e,t)=>{for(var n in t||(t={}))rM.call(t,n)&&Pg(e,n,t[n]);if(Rg)for(var n of Rg(t))oM.call(t,n)&&Pg(e,n,t[n]);return e};const sM=(e,t)=>{const n=a.useContext(F),r=il(il({},n),e);return a.createElement("svg",il({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M17 4L12 9L7 4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M17 20L12 15L7 20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},iM=a.forwardRef(sM);var aM=iM,cM=Object.defineProperty,Mg=Object.getOwnPropertySymbols,lM=Object.prototype.hasOwnProperty,uM=Object.prototype.propertyIsEnumerable,Tg=(e,t,n)=>t in e?cM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,al=(e,t)=>{for(var n in t||(t={}))lM.call(t,n)&&Tg(e,n,t[n]);if(Mg)for(var n of Mg(t))uM.call(t,n)&&Tg(e,n,t[n]);return e};const dM=(e,t)=>{const n=a.useContext(F),r=al(al({},n),e);return a.createElement("svg",al({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M12 21L12 3M12 3L20.5 11.5M12 3L3.5 11.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},fM=a.forwardRef(dM);var pM=fM,mM=Object.defineProperty,Ig=Object.getOwnPropertySymbols,hM=Object.prototype.hasOwnProperty,gM=Object.prototype.propertyIsEnumerable,Ag=(e,t,n)=>t in e?mM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cl=(e,t)=>{for(var n in t||(t={}))hM.call(t,n)&&Ag(e,n,t[n]);if(Ig)for(var n of Ig(t))gM.call(t,n)&&Ag(e,n,t[n]);return e};const vM=(e,t)=>{const n=a.useContext(F),r=cl(cl({},n),e);return a.createElement("svg",cl({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M21.4383 11.6622L12.2483 20.8522C11.1225 21.9781 9.59552 22.6106 8.00334 22.6106C6.41115 22.6106 4.88418 21.9781 3.75834 20.8522C2.63249 19.7264 2 18.1994 2 16.6072C2 15.015 2.63249 13.4881 3.75834 12.3622L12.9483 3.17222C13.6989 2.42166 14.7169 2 15.7783 2C16.8398 2 17.8578 2.42166 18.6083 3.17222C19.3589 3.92279 19.7806 4.94077 19.7806 6.00222C19.7806 7.06368 19.3589 8.08166 18.6083 8.83222L9.40834 18.0222C9.03306 18.3975 8.52406 18.6083 7.99334 18.6083C7.46261 18.6083 6.95362 18.3975 6.57834 18.0222C6.20306 17.6469 5.99222 17.138 5.99222 16.6072C5.99222 16.0765 6.20306 15.5675 6.57834 15.1922L15.0683 6.71222",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},bM=a.forwardRef(vM);var yM=bM,wM=Object.defineProperty,_g=Object.getOwnPropertySymbols,xM=Object.prototype.hasOwnProperty,CM=Object.prototype.propertyIsEnumerable,Ng=(e,t,n)=>t in e?wM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ll=(e,t)=>{for(var n in t||(t={}))xM.call(t,n)&&Ng(e,n,t[n]);if(_g)for(var n of _g(t))CM.call(t,n)&&Ng(e,n,t[n]);return e};const kM=(e,t)=>{const n=a.useContext(F),r=ll(ll({},n),e);return a.createElement("svg",ll({width:"1.5em",strokeWidth:1.5,height:"1.5em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M5 19.5V5C5 3.89543 5.89543 3 7 3H18.4C18.7314 3 19 3.26863 19 3.6V21",stroke:"currentColor",strokeLinecap:"round"}),a.createElement("path",{d:"M9 7L15 7",stroke:"currentColor",strokeLinecap:"round"}),a.createElement("path",{d:"M6.5 15L19 15",stroke:"currentColor",strokeLinecap:"round"}),a.createElement("path",{d:"M6.5 18L19 18",stroke:"currentColor",strokeLinecap:"round"}),a.createElement("path",{d:"M6.5 21L19 21",stroke:"currentColor",strokeLinecap:"round"}),a.createElement("path",{d:"M6.5 18C5.5 18 5 17.3284 5 16.5C5 15.6716 5.5 15 6.5 15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M6.5 21C5.5 21 5 20.3284 5 19.5C5 18.6716 5.5 18 6.5 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},EM=a.forwardRef(kM);var SM=EM,$M=Object.defineProperty,Dg=Object.getOwnPropertySymbols,OM=Object.prototype.hasOwnProperty,LM=Object.prototype.propertyIsEnumerable,Vg=(e,t,n)=>t in e?$M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ul=(e,t)=>{for(var n in t||(t={}))OM.call(t,n)&&Vg(e,n,t[n]);if(Dg)for(var n of Dg(t))LM.call(t,n)&&Vg(e,n,t[n]);return e};const jM=(e,t)=>{const n=a.useContext(F),r=ul(ul({},n),e);return a.createElement("svg",ul({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M2.6954 7.18536L11.6954 11.1854L12.3046 9.81464L3.3046 5.81464L2.6954 7.18536ZM12.75 21.5V10.5H11.25V21.5H12.75ZM12.3046 11.1854L21.3046 7.18536L20.6954 5.81464L11.6954 9.81464L12.3046 11.1854Z",fill:"currentColor"}),a.createElement("path",{d:"M3 17.1101V6.88992C3 6.65281 3.13964 6.43794 3.35632 6.34164L11.7563 2.6083C11.9115 2.53935 12.0885 2.53935 12.2437 2.6083L20.6437 6.34164C20.8604 6.43794 21 6.65281 21 6.88992V17.1101C21 17.3472 20.8604 17.5621 20.6437 17.6584L12.2437 21.3917C12.0885 21.4606 11.9115 21.4606 11.7563 21.3917L3.35632 17.6584C3.13964 17.5621 3 17.3472 3 17.1101Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M7.5 4.5L16.1437 8.34164C16.3604 8.43794 16.5 8.65281 16.5 8.88992V12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},RM=a.forwardRef(jM);var PM=RM,MM=Object.defineProperty,zg=Object.getOwnPropertySymbols,TM=Object.prototype.hasOwnProperty,IM=Object.prototype.propertyIsEnumerable,Fg=(e,t,n)=>t in e?MM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dl=(e,t)=>{for(var n in t||(t={}))TM.call(t,n)&&Fg(e,n,t[n]);if(zg)for(var n of zg(t))IM.call(t,n)&&Fg(e,n,t[n]);return e};const AM=(e,t)=>{const n=a.useContext(F),r=dl(dl({},n),e);return a.createElement("svg",dl({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M7 14C5.34315 14 4 15.3431 4 17C4 18.6569 5.34315 20 7 20C7.35064 20 7.68722 19.9398 8 19.8293",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M4.26392 15.6046C2.9243 14.9582 2.00004 13.587 2.00004 12C2.00004 10.7883 2.53877 9.70251 3.38978 8.96898",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M3.42053 8.8882C3.1549 8.49109 3 8.01363 3 7.5C3 6.11929 4.11929 5 5.5 5C6.06291 5 6.58237 5.18604 7.00024 5.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M7.23769 5.56533C7.08524 5.24215 7 4.88103 7 4.5C7 3.11929 8.11929 2 9.5 2C10.8807 2 12 3.11929 12 4.5V20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M8 20C8 21.1046 8.89543 22 10 22C11.1046 22 12 21.1046 12 20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 7C12 8.65685 13.3431 10 15 10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M20.6102 8.96898C21.4612 9.70251 22 10.7883 22 12C22 12.7031 21.8186 13.3638 21.5 13.9379",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M20.5795 8.8882C20.8451 8.49109 21 8.01363 21 7.5C21 6.11929 19.8807 5 18.5 5C17.9371 5 17.4176 5.18604 16.9998 5.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 4.5C12 3.11929 13.1193 2 14.5 2C15.8807 2 17 3.11929 17 4.5C17 4.88103 16.9148 5.24215 16.7623 5.56533",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M14 22C12.8954 22 12 21.1046 12 20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M18.6667 16L17 19H21L19.3333 22",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},_M=a.forwardRef(AM);var NM=_M,DM=Object.defineProperty,Bg=Object.getOwnPropertySymbols,VM=Object.prototype.hasOwnProperty,zM=Object.prototype.propertyIsEnumerable,Hg=(e,t,n)=>t in e?DM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fl=(e,t)=>{for(var n in t||(t={}))VM.call(t,n)&&Hg(e,n,t[n]);if(Bg)for(var n of Bg(t))zM.call(t,n)&&Hg(e,n,t[n]);return e};const FM=(e,t)=>{const n=a.useContext(F),r=fl(fl({},n),e);return a.createElement("svg",fl({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M7 14C5.34315 14 4 15.3431 4 17C4 18.6569 5.34315 20 7 20C7.35064 20 7.68722 19.9398 8 19.8293",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M4.26392 15.6046C2.9243 14.9582 2.00004 13.587 2.00004 12C2.00004 10.7883 2.53877 9.70251 3.38978 8.96898",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M3.42053 8.8882C3.1549 8.49109 3 8.01363 3 7.5C3 6.11929 4.11929 5 5.5 5C6.06291 5 6.58237 5.18604 7.00024 5.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M7.23769 5.56533C7.08524 5.24215 7 4.88103 7 4.5C7 3.11929 8.11929 2 9.5 2C10.8807 2 12 3.11929 12 4.5V20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M8 20C8 21.1046 8.89543 22 10 22C11.1046 22 12 21.1046 12 20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 7C12 8.65685 13.3431 10 15 10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M17 14C18.6569 14 20 15.3431 20 17C20 18.6569 18.6569 20 17 20C16.6494 20 16.3128 19.9398 16 19.8293",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M19.7361 15.6046C21.0757 14.9582 22 13.587 22 12C22 10.7883 21.4612 9.70251 20.6102 8.96898",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M20.5795 8.8882C20.8451 8.49109 21 8.01363 21 7.5C21 6.11929 19.8807 5 18.5 5C17.9371 5 17.4176 5.18604 16.9998 5.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 4.5C12 3.11929 13.1193 2 14.5 2C15.8807 2 17 3.11929 17 4.5C17 4.88103 16.9148 5.24215 16.7623 5.56533",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M16 20C16 21.1046 15.1046 22 14 22C12.8954 22 12 21.1046 12 20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},BM=a.forwardRef(FM);var HM=BM,WM=Object.defineProperty,Wg=Object.getOwnPropertySymbols,ZM=Object.prototype.hasOwnProperty,UM=Object.prototype.propertyIsEnumerable,Zg=(e,t,n)=>t in e?WM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pl=(e,t)=>{for(var n in t||(t={}))ZM.call(t,n)&&Zg(e,n,t[n]);if(Wg)for(var n of Wg(t))UM.call(t,n)&&Zg(e,n,t[n]);return e};const GM=(e,t)=>{const n=a.useContext(F),r=pl(pl({},n),e);return a.createElement("svg",pl({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M2 15V9C2 5.68629 4.68629 3 8 3H16C19.3137 3 22 5.68629 22 9V15C22 18.3137 19.3137 21 16 21H8C4.68629 21 2 18.3137 2 15Z",stroke:"currentColor"}),a.createElement("path",{d:"M11.6667 8L10 12H14L12.3333 16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},KM=a.forwardRef(GM);var YM=KM,qM=Object.defineProperty,Ug=Object.getOwnPropertySymbols,XM=Object.prototype.hasOwnProperty,JM=Object.prototype.propertyIsEnumerable,Gg=(e,t,n)=>t in e?qM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ml=(e,t)=>{for(var n in t||(t={}))XM.call(t,n)&&Gg(e,n,t[n]);if(Ug)for(var n of Ug(t))JM.call(t,n)&&Gg(e,n,t[n]);return e};const QM=(e,t)=>{const n=a.useContext(F),r=ml(ml({},n),e);return a.createElement("svg",ml({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M2 19V9C2 7.89543 2.89543 7 4 7H4.5C5.12951 7 5.72229 6.70361 6.1 6.2L8.32 3.24C8.43331 3.08892 8.61115 3 8.8 3H15.2C15.3889 3 15.5667 3.08892 15.68 3.24L17.9 6.2C18.2777 6.70361 18.8705 7 19.5 7H20C21.1046 7 22 7.89543 22 9V19C22 20.1046 21.1046 21 20 21H4C2.89543 21 2 20.1046 2 19Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 17C14.2091 17 16 15.2091 16 13C16 10.7909 14.2091 9 12 9C9.79086 9 8 10.7909 8 13C8 15.2091 9.79086 17 12 17Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},e7=a.forwardRef(QM);var t7=e7,n7=Object.defineProperty,Kg=Object.getOwnPropertySymbols,r7=Object.prototype.hasOwnProperty,o7=Object.prototype.propertyIsEnumerable,Yg=(e,t,n)=>t in e?n7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hl=(e,t)=>{for(var n in t||(t={}))r7.call(t,n)&&Yg(e,n,t[n]);if(Kg)for(var n of Kg(t))o7.call(t,n)&&Yg(e,n,t[n]);return e};const s7=(e,t)=>{const n=a.useContext(F),r=hl(hl({},n),e);return a.createElement("svg",hl({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M17 12.5C17.2761 12.5 17.5 12.2761 17.5 12C17.5 11.7239 17.2761 11.5 17 11.5C16.7239 11.5 16.5 11.7239 16.5 12C16.5 12.2761 16.7239 12.5 17 12.5Z",fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z",fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M7 12.5C7.27614 12.5 7.5 12.2761 7.5 12C7.5 11.7239 7.27614 11.5 7 11.5C6.72386 11.5 6.5 11.7239 6.5 12C6.5 12.2761 6.72386 12.5 7 12.5Z",fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 13.8214 2.48697 15.5291 3.33782 17L2.5 21.5L7 20.6622C8.47087 21.513 10.1786 22 12 22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},i7=a.forwardRef(s7);var a7=i7,c7=Object.defineProperty,qg=Object.getOwnPropertySymbols,l7=Object.prototype.hasOwnProperty,u7=Object.prototype.propertyIsEnumerable,Xg=(e,t,n)=>t in e?c7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gl=(e,t)=>{for(var n in t||(t={}))l7.call(t,n)&&Xg(e,n,t[n]);if(qg)for(var n of qg(t))u7.call(t,n)&&Xg(e,n,t[n]);return e};const d7=(e,t)=>{const n=a.useContext(F),r=gl(gl({},n),e);return a.createElement("svg",gl({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M7 12.5L10 15.5L17 8.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},f7=a.forwardRef(d7);var p7=f7,m7=Object.defineProperty,Jg=Object.getOwnPropertySymbols,h7=Object.prototype.hasOwnProperty,g7=Object.prototype.propertyIsEnumerable,Qg=(e,t,n)=>t in e?m7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vl=(e,t)=>{for(var n in t||(t={}))h7.call(t,n)&&Qg(e,n,t[n]);if(Jg)for(var n of Jg(t))g7.call(t,n)&&Qg(e,n,t[n]);return e};const v7=(e,t)=>{const n=a.useContext(F),r=vl(vl({},n),e);return a.createElement("svg",vl({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M5 13L9 17L19 7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},b7=a.forwardRef(v7);var y7=b7,w7=Object.defineProperty,e1=Object.getOwnPropertySymbols,x7=Object.prototype.hasOwnProperty,C7=Object.prototype.propertyIsEnumerable,t1=(e,t,n)=>t in e?w7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bl=(e,t)=>{for(var n in t||(t={}))x7.call(t,n)&&t1(e,n,t[n]);if(e1)for(var n of e1(t))C7.call(t,n)&&t1(e,n,t[n]);return e};const k7=(e,t)=>{const n=a.useContext(F),r=bl(bl({},n),e);return a.createElement("svg",bl({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},E7=a.forwardRef(k7);var S7=E7,$7=Object.defineProperty,n1=Object.getOwnPropertySymbols,O7=Object.prototype.hasOwnProperty,L7=Object.prototype.propertyIsEnumerable,r1=(e,t,n)=>t in e?$7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yl=(e,t)=>{for(var n in t||(t={}))O7.call(t,n)&&r1(e,n,t[n]);if(n1)for(var n of n1(t))L7.call(t,n)&&r1(e,n,t[n]);return e};const j7=(e,t)=>{const n=a.useContext(F),r=yl(yl({},n),e);return a.createElement("svg",yl({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M12 6L12 12L18 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M21.8883 10.5C21.1645 5.68874 17.013 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C16.1006 22 19.6248 19.5318 21.1679 16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M17 16H21.4C21.7314 16 22 16.2686 22 16.6V21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},R7=a.forwardRef(j7);var P7=R7,M7=Object.defineProperty,o1=Object.getOwnPropertySymbols,T7=Object.prototype.hasOwnProperty,I7=Object.prototype.propertyIsEnumerable,s1=(e,t,n)=>t in e?M7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wl=(e,t)=>{for(var n in t||(t={}))T7.call(t,n)&&s1(e,n,t[n]);if(o1)for(var n of o1(t))I7.call(t,n)&&s1(e,n,t[n]);return e};const A7=(e,t)=>{const n=a.useContext(F),r=wl(wl({},n),e);return a.createElement("svg",wl({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M12 6L12 12L18 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},_7=a.forwardRef(A7);var N7=_7,D7=Object.defineProperty,i1=Object.getOwnPropertySymbols,V7=Object.prototype.hasOwnProperty,z7=Object.prototype.propertyIsEnumerable,a1=(e,t,n)=>t in e?D7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xl=(e,t)=>{for(var n in t||(t={}))V7.call(t,n)&&a1(e,n,t[n]);if(i1)for(var n of i1(t))z7.call(t,n)&&a1(e,n,t[n]);return e};const F7=(e,t)=>{const n=a.useContext(F),r=xl(xl({},n),e);return a.createElement("svg",xl({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M12 4C6 4 6 8 6 10C4.33333 10 1 11 1 15C1 19 4.33333 20 6 20H18C19.6667 20 23 19 23 15C23 11 19.6667 10 18 10C18 8 18 4 12 4Z",stroke:"currentColor",strokeLinejoin:"round"}))},B7=a.forwardRef(F7);var H7=B7,W7=Object.defineProperty,c1=Object.getOwnPropertySymbols,Z7=Object.prototype.hasOwnProperty,U7=Object.prototype.propertyIsEnumerable,l1=(e,t,n)=>t in e?W7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cl=(e,t)=>{for(var n in t||(t={}))Z7.call(t,n)&&l1(e,n,t[n]);if(c1)for(var n of c1(t))U7.call(t,n)&&l1(e,n,t[n]);return e};const G7=(e,t)=>{const n=a.useContext(F),r=Cl(Cl({},n),e);return a.createElement("svg",Cl({width:"1.5em",strokeWidth:1.5,height:"1.5em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M10 17L9.33334 17C8.22877 17 7.33334 16.1047 7.33334 15.0002C7.33334 14.3284 7.33334 13.6211 7.33333 13.1111C7.33333 12.5556 6 12 6 12C6 12 7.33333 11.4444 7.33334 10.8889C7.33334 10.4359 7.33334 9.70586 7.33334 8.99998C7.33334 7.89541 8.22877 7 9.33334 7L10 7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M14 17L14.6667 17C15.7712 17 16.6667 16.1047 16.6667 15.0002C16.6667 14.3284 16.6667 13.6211 16.6667 13.1111C16.6667 12.5556 18 12 18 12C18 12 16.6667 11.4444 16.6667 10.8889C16.6667 10.4359 16.6667 9.70586 16.6667 8.99998C16.6667 7.89541 15.7712 7 14.6667 7L14 7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M21 3.6V20.4C21 20.7314 20.7314 21 20.4 21H3.6C3.26863 21 3 20.7314 3 20.4V3.6C3 3.26863 3.26863 3 3.6 3H20.4C20.7314 3 21 3.26863 21 3.6Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},K7=a.forwardRef(G7);var ek=K7,Y7=Object.defineProperty,u1=Object.getOwnPropertySymbols,q7=Object.prototype.hasOwnProperty,X7=Object.prototype.propertyIsEnumerable,d1=(e,t,n)=>t in e?Y7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kl=(e,t)=>{for(var n in t||(t={}))q7.call(t,n)&&d1(e,n,t[n]);if(u1)for(var n of u1(t))X7.call(t,n)&&d1(e,n,t[n]);return e};const J7=(e,t)=>{const n=a.useContext(F),r=kl(kl({},n),e);return a.createElement("svg",kl({width:"1.5em",strokeWidth:1.5,height:"1.5em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M9.00001 21L8.00001 21C6.89544 21 6.00001 20.1057 6.00001 19.0011C6.00001 17.4501 6.00001 15.3443 6 14C6 13 4.5 12 4.5 12C4.5 12 6.00001 11 6.00001 10C6.00001 8.827 6.00001 6.62207 6.00001 4.99914C6.00001 3.89457 6.89544 3 8.00001 3L9.00001 3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M15 21L16 21C17.1046 21 18 20.1057 18 19.0011C18 17.4501 18 15.3443 18 14C18 13 19.5 12 19.5 12C19.5 12 18 11 18 10C18 8.827 18 6.62207 18 4.99914C18 3.89457 17.1046 3 16 3L15 3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},Q7=a.forwardRef(J7);var eT=Q7,tT=Object.defineProperty,f1=Object.getOwnPropertySymbols,nT=Object.prototype.hasOwnProperty,rT=Object.prototype.propertyIsEnumerable,p1=(e,t,n)=>t in e?tT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,El=(e,t)=>{for(var n in t||(t={}))nT.call(t,n)&&p1(e,n,t[n]);if(f1)for(var n of f1(t))rT.call(t,n)&&p1(e,n,t[n]);return e};const oT=(e,t)=>{const n=a.useContext(F),r=El(El({},n),e);return a.createElement("svg",El({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M13.5 6L10 18.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M6.5 8.5L3 12L6.5 15.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M17.5 8.5L21 12L17.5 15.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},sT=a.forwardRef(oT);var iT=sT,aT=Object.defineProperty,m1=Object.getOwnPropertySymbols,cT=Object.prototype.hasOwnProperty,lT=Object.prototype.propertyIsEnumerable,h1=(e,t,n)=>t in e?aT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sl=(e,t)=>{for(var n in t||(t={}))cT.call(t,n)&&h1(e,n,t[n]);if(m1)for(var n of m1(t))lT.call(t,n)&&h1(e,n,t[n]);return e};const uT=(e,t)=>{const n=a.useContext(F),r=Sl(Sl({},n),e);return a.createElement("svg",Sl({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M10.5857 10.5857L16.9496 7.0502L13.4141 13.4142L7.05012 16.9497L10.5857 10.5857Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},dT=a.forwardRef(uT);var fT=dT,pT=Object.defineProperty,g1=Object.getOwnPropertySymbols,mT=Object.prototype.hasOwnProperty,hT=Object.prototype.propertyIsEnumerable,v1=(e,t,n)=>t in e?pT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$l=(e,t)=>{for(var n in t||(t={}))mT.call(t,n)&&v1(e,n,t[n]);if(g1)for(var n of g1(t))hT.call(t,n)&&v1(e,n,t[n]);return e};const gT=(e,t)=>{const n=a.useContext(F),r=$l($l({},n),e);return a.createElement("svg",$l({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M2 21L17 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M21 21L22 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M2 16.4V3.6C2 3.26863 2.26863 3 2.6 3H21.4C21.7314 3 22 3.26863 22 3.6V16.4C22 16.7314 21.7314 17 21.4 17H2.6C2.26863 17 2 16.7314 2 16.4Z",stroke:"currentColor"}))},vT=a.forwardRef(gT);var bT=vT,yT=Object.defineProperty,b1=Object.getOwnPropertySymbols,wT=Object.prototype.hasOwnProperty,xT=Object.prototype.propertyIsEnumerable,y1=(e,t,n)=>t in e?yT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ol=(e,t)=>{for(var n in t||(t={}))wT.call(t,n)&&y1(e,n,t[n]);if(b1)for(var n of b1(t))xT.call(t,n)&&y1(e,n,t[n]);return e};const CT=(e,t)=>{const n=a.useContext(F),r=Ol(Ol({},n),e);return a.createElement("svg",Ol({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M6.75469 17.2828L5.32612 7.28284C5.154 6.07798 6.08892 5 7.30602 5H10.694C11.9111 5 12.846 6.07797 12.6739 7.28284L11.2453 17.2828C11.1046 18.2681 10.2607 19 9.26541 19H8.73459C7.73929 19 6.89545 18.2681 6.75469 17.2828Z",stroke:"currentColor"}),a.createElement("path",{d:"M2 12L6 12M22 12L12 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},kT=a.forwardRef(CT);var tk=kT,ET=Object.defineProperty,w1=Object.getOwnPropertySymbols,ST=Object.prototype.hasOwnProperty,$T=Object.prototype.propertyIsEnumerable,x1=(e,t,n)=>t in e?ET(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ll=(e,t)=>{for(var n in t||(t={}))ST.call(t,n)&&x1(e,n,t[n]);if(w1)for(var n of w1(t))$T.call(t,n)&&x1(e,n,t[n]);return e};const OT=(e,t)=>{const n=a.useContext(F),r=Ll(Ll({},n),e);return a.createElement("svg",Ll({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M19.4 20H9.6C9.26863 20 9 19.7314 9 19.4V9.6C9 9.26863 9.26863 9 9.6 9H19.4C19.7314 9 20 9.26863 20 9.6V19.4C20 19.7314 19.7314 20 19.4 20Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M15 9V4.6C15 4.26863 14.7314 4 14.4 4H4.6C4.26863 4 4 4.26863 4 4.6V14.4C4 14.7314 4.26863 15 4.6 15H9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},LT=a.forwardRef(OT);var jT=LT,RT=Object.defineProperty,C1=Object.getOwnPropertySymbols,PT=Object.prototype.hasOwnProperty,MT=Object.prototype.propertyIsEnumerable,k1=(e,t,n)=>t in e?RT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jl=(e,t)=>{for(var n in t||(t={}))PT.call(t,n)&&k1(e,n,t[n]);if(C1)for(var n of C1(t))MT.call(t,n)&&k1(e,n,t[n]);return e};const TT=(e,t)=>{const n=a.useContext(F),r=jl(jl({},n),e);return a.createElement("svg",jl({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M4.00047 8.00001L4.01047 8.01112",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M4.00047 4.00001L4.01047 4.01112",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M8.00047 4.00001L8.01047 4.01112",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12.0005 4.00001L12.0105 4.01112",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M16.0005 4.00001L16.0105 4.01112",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M20.0005 4.00001L20.0105 4.01112",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M20.0005 8.00001L20.0105 8.01112",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M20.0005 12L20.0105 12.0111",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M20.0005 16L20.0105 16.0111",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M20.0005 20L20.0105 20.0111",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M16.0005 20L16.0105 20.0111",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M4.00047 12.01V20.01H12.0005V12.01H4.00047Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},IT=a.forwardRef(TT);var AT=IT,_T=Object.defineProperty,E1=Object.getOwnPropertySymbols,NT=Object.prototype.hasOwnProperty,DT=Object.prototype.propertyIsEnumerable,S1=(e,t,n)=>t in e?_T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rl=(e,t)=>{for(var n in t||(t={}))NT.call(t,n)&&S1(e,n,t[n]);if(E1)for(var n of E1(t))DT.call(t,n)&&S1(e,n,t[n]);return e};const VT=(e,t)=>{const n=a.useContext(F),r=Rl(Rl({},n),e);return a.createElement("svg",Rl({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5027 9.96958C20.7073 10.4588 20.6154 12.1941 19.3658 12.5533L13.0605 14.3658L10.1807 20.2606C9.60996 21.4288 7.88499 21.218 7.6124 19.9468L4.67677 6.25646C4.44638 5.18204 5.5121 4.2878 6.53019 4.70126L19.5027 9.96958Z",stroke:"currentColor"}))},zT=a.forwardRef(VT);var FT=zT,BT=Object.defineProperty,$1=Object.getOwnPropertySymbols,HT=Object.prototype.hasOwnProperty,WT=Object.prototype.propertyIsEnumerable,O1=(e,t,n)=>t in e?BT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pl=(e,t)=>{for(var n in t||(t={}))HT.call(t,n)&&O1(e,n,t[n]);if($1)for(var n of $1(t))WT.call(t,n)&&O1(e,n,t[n]);return e};const ZT=(e,t)=>{const n=a.useContext(F),r=Pl(Pl({},n),e);return a.createElement("svg",Pl({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M17 20V4M17 4L20 7M17 4L14 7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M7 4V20M7 20L10 17M7 20L4 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},UT=a.forwardRef(ZT);var GT=UT,KT=Object.defineProperty,L1=Object.getOwnPropertySymbols,YT=Object.prototype.hasOwnProperty,qT=Object.prototype.propertyIsEnumerable,j1=(e,t,n)=>t in e?KT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ml=(e,t)=>{for(var n in t||(t={}))YT.call(t,n)&&j1(e,n,t[n]);if(L1)for(var n of L1(t))qT.call(t,n)&&j1(e,n,t[n]);return e};const XT=(e,t)=>{const n=a.useContext(F),r=Ml(Ml({},n),e);return a.createElement("svg",Ml({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M5 12V18C5 18 5 21 12 21C19 21 19 18 19 18V12",stroke:"currentColor"}),a.createElement("path",{d:"M5 6V12C5 12 5 15 12 15C19 15 19 12 19 12V6",stroke:"currentColor"}),a.createElement("path",{d:"M12 3C19 3 19 6 19 6C19 6 19 9 12 9C5 9 5 6 5 6C5 6 5 3 12 3Z",stroke:"currentColor"}))},JT=a.forwardRef(XT);var QT=JT,e8=Object.defineProperty,R1=Object.getOwnPropertySymbols,t8=Object.prototype.hasOwnProperty,n8=Object.prototype.propertyIsEnumerable,P1=(e,t,n)=>t in e?e8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tl=(e,t)=>{for(var n in t||(t={}))t8.call(t,n)&&P1(e,n,t[n]);if(R1)for(var n of R1(t))n8.call(t,n)&&P1(e,n,t[n]);return e};const r8=(e,t)=>{const n=a.useContext(F),r=Tl(Tl({},n),e);return a.createElement("svg",Tl({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M17.6744 11.4075L15.7691 17.1233C15.7072 17.309 15.5586 17.4529 15.3709 17.5087L3.69348 20.9803C3.22819 21.1186 2.79978 20.676 2.95328 20.2155L6.74467 8.84131C6.79981 8.67588 6.92419 8.54263 7.08543 8.47624L12.472 6.25822C12.696 6.166 12.9535 6.21749 13.1248 6.38876L17.5294 10.7935C17.6901 10.9542 17.7463 11.1919 17.6744 11.4075Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M3.2959 20.6016L9.65986 14.2376",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M17.7917 11.0557L20.6202 8.22724C21.4012 7.44619 21.4012 6.17986 20.6202 5.39881L18.4989 3.27749C17.7178 2.49645 16.4515 2.49645 15.6704 3.27749L12.842 6.10592",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M11.7814 12.1163C11.1956 11.5305 10.2458 11.5305 9.66004 12.1163C9.07426 12.7021 9.07426 13.6519 9.66004 14.2376C10.2458 14.8234 11.1956 14.8234 11.7814 14.2376C12.3671 13.6519 12.3671 12.7021 11.7814 12.1163Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},o8=a.forwardRef(r8);var s8=o8,i8=Object.defineProperty,M1=Object.getOwnPropertySymbols,a8=Object.prototype.hasOwnProperty,c8=Object.prototype.propertyIsEnumerable,T1=(e,t,n)=>t in e?i8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Il=(e,t)=>{for(var n in t||(t={}))a8.call(t,n)&&T1(e,n,t[n]);if(M1)for(var n of M1(t))c8.call(t,n)&&T1(e,n,t[n]);return e};const l8=(e,t)=>{const n=a.useContext(F),r=Il(Il({},n),e);return a.createElement("svg",Il({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M20.5 20.5L22 22",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M15 18C15 19.6569 16.3431 21 18 21C18.8299 21 19.581 20.663 20.1241 20.1185C20.6654 19.5758 21 18.827 21 18C21 16.3431 19.6569 15 18 15C16.3431 15 15 16.3431 15 18Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M20 12V5.74853C20 5.5894 19.9368 5.43679 19.8243 5.32426L16.6757 2.17574C16.5632 2.06321 16.4106 2 16.2515 2H4.6C4.26863 2 4 2.26863 4 2.6V21.4C4 21.7314 4.26863 22 4.6 22H11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M16 2V5.4C16 5.73137 16.2686 6 16.6 6H20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},u8=a.forwardRef(l8);var d8=u8,f8=Object.defineProperty,I1=Object.getOwnPropertySymbols,p8=Object.prototype.hasOwnProperty,m8=Object.prototype.propertyIsEnumerable,A1=(e,t,n)=>t in e?f8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Al=(e,t)=>{for(var n in t||(t={}))p8.call(t,n)&&A1(e,n,t[n]);if(I1)for(var n of I1(t))m8.call(t,n)&&A1(e,n,t[n]);return e};const h8=(e,t)=>{const n=a.useContext(F),r=Al(Al({},n),e);return a.createElement("svg",Al({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M6 18L18 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 6V14M12 14L15.5 10.5M12 14L8.5 10.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M3 20.4V3.6C3 3.26863 3.26863 3 3.6 3H20.4C20.7314 3 21 3.26863 21 3.6V20.4C21 20.7314 20.7314 21 20.4 21H3.6C3.26863 21 3 20.7314 3 20.4Z",stroke:"currentColor"}))},g8=a.forwardRef(h8);var v8=g8,b8=Object.defineProperty,_1=Object.getOwnPropertySymbols,y8=Object.prototype.hasOwnProperty,w8=Object.prototype.propertyIsEnumerable,N1=(e,t,n)=>t in e?b8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_l=(e,t)=>{for(var n in t||(t={}))y8.call(t,n)&&N1(e,n,t[n]);if(_1)for(var n of _1(t))w8.call(t,n)&&N1(e,n,t[n]);return e};const x8=(e,t)=>{const n=a.useContext(F),r=_l(_l({},n),e);return a.createElement("svg",_l({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M6 20L18 20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 4V16M12 16L15.5 12.5M12 16L8.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},C8=a.forwardRef(x8);var k8=C8,E8=Object.defineProperty,D1=Object.getOwnPropertySymbols,S8=Object.prototype.hasOwnProperty,$8=Object.prototype.propertyIsEnumerable,V1=(e,t,n)=>t in e?E8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nl=(e,t)=>{for(var n in t||(t={}))S8.call(t,n)&&V1(e,n,t[n]);if(D1)for(var n of D1(t))$8.call(t,n)&&V1(e,n,t[n]);return e};const O8=(e,t)=>{const n=a.useContext(F),r=Nl(Nl({},n),e);return a.createElement("svg",Nl({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M7 10.5L4.99591 13.1721C4.41845 13.9421 4.47127 15.0141 5.1216 15.7236L8.9055 19.8515C9.28432 20.2647 9.81826 20.5 10.3789 20.5C11.4651 20.5 13.2415 20.5 15 20.5C17.4 20.5 19 19 19 16.5C19 16.5 19 16.5 19 16.5C19 16.5 19 9.64287 19 7.92859",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M16 8.49995C16 8.49995 16 8.37483 16 7.92852C16 5.6428 19 5.6428 19 7.92852",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M13 8.50008C13 8.50008 13 7.91978 13 7.02715M13 6.50008C13 6.50008 13 6.804 13 7.02715M16 8.50008C16 8.50008 16 8.37496 16 7.92865C16 7.70549 16 7.25031 16 7.02715C16 4.74144 13 4.74144 13 7.02715",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M13 8.50008C13 8.50008 13 7.91978 13 7.02715C13 4.74144 16 4.74144 16 7.02715C16 7.25031 16 7.70549 16 7.92865C16 8.37496 16 8.50008 16 8.50008",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M10 8.50005C10 8.50005 10 7.85719 10 6.50005C10 4.21434 13 4.21434 13 6.50005C13 6.50005 13 6.50005 13 6.50005C13 6.50005 13 6.80397 13 7.02713C13 7.91975 13 8.50005 13 8.50005",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M7 13.5001V6.50006C7 5.67164 7.67157 5.00006 8.5 5.00006V5.00006C9.32843 5.00006 10 5.55527 10 6.38369C10 6.42151 10 6.4603 10 6.50006C10 7.85721 10 8.50006 10 8.50006",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},L8=a.forwardRef(O8);var j8=L8,R8=Object.defineProperty,z1=Object.getOwnPropertySymbols,P8=Object.prototype.hasOwnProperty,M8=Object.prototype.propertyIsEnumerable,F1=(e,t,n)=>t in e?R8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Dl=(e,t)=>{for(var n in t||(t={}))P8.call(t,n)&&F1(e,n,t[n]);if(z1)for(var n of z1(t))M8.call(t,n)&&F1(e,n,t[n]);return e};const T8=(e,t)=>{const n=a.useContext(F),r=Dl(Dl({},n),e);return a.createElement("svg",Dl({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M12 12L4 4M4 4V8M4 4H8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 12L20 4M20 4V8M20 4H16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 12L4 20M4 20V16M4 20H8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 12L20 20M20 20V16M20 20H16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},I8=a.forwardRef(T8);var Up=I8,A8=Object.defineProperty,B1=Object.getOwnPropertySymbols,_8=Object.prototype.hasOwnProperty,N8=Object.prototype.propertyIsEnumerable,H1=(e,t,n)=>t in e?A8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vl=(e,t)=>{for(var n in t||(t={}))_8.call(t,n)&&H1(e,n,t[n]);if(B1)for(var n of B1(t))N8.call(t,n)&&H1(e,n,t[n]);return e};const D8=(e,t)=>{const n=a.useContext(F),r=Vl(Vl({},n),e);return a.createElement("svg",Vl({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M14.3632 5.65156L15.8431 4.17157C16.6242 3.39052 17.8905 3.39052 18.6716 4.17157L20.0858 5.58579C20.8668 6.36683 20.8668 7.63316 20.0858 8.41421L18.6058 9.8942M14.3632 5.65156L4.74749 15.2672C4.41542 15.5993 4.21079 16.0376 4.16947 16.5054L3.92738 19.2459C3.87261 19.8659 4.39148 20.3848 5.0115 20.33L7.75191 20.0879C8.21972 20.0466 8.65806 19.8419 8.99013 19.5099L18.6058 9.8942M14.3632 5.65156L18.6058 9.8942",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},V8=a.forwardRef(D8);var z8=V8,F8=Object.defineProperty,W1=Object.getOwnPropertySymbols,B8=Object.prototype.hasOwnProperty,H8=Object.prototype.propertyIsEnumerable,Z1=(e,t,n)=>t in e?F8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zl=(e,t)=>{for(var n in t||(t={}))B8.call(t,n)&&Z1(e,n,t[n]);if(W1)for(var n of W1(t))H8.call(t,n)&&Z1(e,n,t[n]);return e};const W8=(e,t)=>{const n=a.useContext(F),r=zl(zl({},n),e);return a.createElement("svg",zl({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M15 9L20 4M20 4V8M20 4H16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M9 15L4 20M4 20V16M4 20H8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},Z8=a.forwardRef(W8);var U8=Z8,G8=Object.defineProperty,U1=Object.getOwnPropertySymbols,K8=Object.prototype.hasOwnProperty,Y8=Object.prototype.propertyIsEnumerable,G1=(e,t,n)=>t in e?G8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fl=(e,t)=>{for(var n in t||(t={}))K8.call(t,n)&&G1(e,n,t[n]);if(U1)for(var n of U1(t))Y8.call(t,n)&&G1(e,n,t[n]);return e};const q8=(e,t)=>{const n=a.useContext(F),r=Fl(Fl({},n),e);return a.createElement("svg",Fl({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M19.5 16L17.0248 12.6038",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 17.5V14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M4.5 16L6.96895 12.6124",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M3 8C6.6 16 17.4 16 21 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},X8=a.forwardRef(q8);var J8=X8,Q8=Object.defineProperty,K1=Object.getOwnPropertySymbols,eI=Object.prototype.hasOwnProperty,tI=Object.prototype.propertyIsEnumerable,Y1=(e,t,n)=>t in e?Q8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bl=(e,t)=>{for(var n in t||(t={}))eI.call(t,n)&&Y1(e,n,t[n]);if(K1)for(var n of K1(t))tI.call(t,n)&&Y1(e,n,t[n]);return e};const nI=(e,t)=>{const n=a.useContext(F),r=Bl(Bl({},n),e);return a.createElement("svg",Bl({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M3 13C6.6 5 17.4 5 21 13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 17C10.3431 17 9 15.6569 9 14C9 12.3431 10.3431 11 12 11C13.6569 11 15 12.3431 15 14C15 15.6569 13.6569 17 12 17Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},rI=a.forwardRef(nI);var oI=rI,sI=Object.defineProperty,q1=Object.getOwnPropertySymbols,iI=Object.prototype.hasOwnProperty,aI=Object.prototype.propertyIsEnumerable,X1=(e,t,n)=>t in e?sI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hl=(e,t)=>{for(var n in t||(t={}))iI.call(t,n)&&X1(e,n,t[n]);if(q1)for(var n of q1(t))aI.call(t,n)&&X1(e,n,t[n]);return e};const cI=(e,t)=>{const n=a.useContext(F),r=Hl(Hl({},n),e);return a.createElement("svg",Hl({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M13 10V3L5 14H11V21L19 10H13Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},lI=a.forwardRef(cI);var uI=lI,dI=Object.defineProperty,J1=Object.getOwnPropertySymbols,fI=Object.prototype.hasOwnProperty,pI=Object.prototype.propertyIsEnumerable,Q1=(e,t,n)=>t in e?dI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wl=(e,t)=>{for(var n in t||(t={}))fI.call(t,n)&&Q1(e,n,t[n]);if(J1)for(var n of J1(t))pI.call(t,n)&&Q1(e,n,t[n]);return e};const mI=(e,t)=>{const n=a.useContext(F),r=Wl(Wl({},n),e);return a.createElement("svg",Wl({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M3 19V5C3 3.89543 3.89543 3 5 3H16.1716C16.702 3 17.2107 3.21071 17.5858 3.58579L20.4142 6.41421C20.7893 6.78929 21 7.29799 21 7.82843V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19Z",stroke:"currentColor"}),a.createElement("path",{d:"M8.6 9H15.4C15.7314 9 16 8.73137 16 8.4V3.6C16 3.26863 15.7314 3 15.4 3H8.6C8.26863 3 8 3.26863 8 3.6V8.4C8 8.73137 8.26863 9 8.6 9Z",stroke:"currentColor"}),a.createElement("path",{d:"M6 13.6V21H18V13.6C18 13.2686 17.7314 13 17.4 13H6.6C6.26863 13 6 13.2686 6 13.6Z",stroke:"currentColor"}))},hI=a.forwardRef(mI);var gI=hI,vI=Object.defineProperty,ev=Object.getOwnPropertySymbols,bI=Object.prototype.hasOwnProperty,yI=Object.prototype.propertyIsEnumerable,tv=(e,t,n)=>t in e?vI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zl=(e,t)=>{for(var n in t||(t={}))bI.call(t,n)&&tv(e,n,t[n]);if(ev)for(var n of ev(t))yI.call(t,n)&&tv(e,n,t[n]);return e};const wI=(e,t)=>{const n=a.useContext(F),r=Zl(Zl({},n),e);return a.createElement("svg",Zl({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M2 11V4.6C2 4.26863 2.26863 4 2.6 4H8.77805C8.92127 4 9.05977 4.05124 9.16852 4.14445L12.3315 6.85555C12.4402 6.94876 12.5787 7 12.722 7H21.4C21.7314 7 22 7.26863 22 7.6V11M2 11V19.4C2 19.7314 2.26863 20 2.6 20H21.4C21.7314 20 22 19.7314 22 19.4V11M2 11H22",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},xI=a.forwardRef(wI);var CI=xI,kI=Object.defineProperty,nv=Object.getOwnPropertySymbols,EI=Object.prototype.hasOwnProperty,SI=Object.prototype.propertyIsEnumerable,rv=(e,t,n)=>t in e?kI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ul=(e,t)=>{for(var n in t||(t={}))EI.call(t,n)&&rv(e,n,t[n]);if(nv)for(var n of nv(t))SI.call(t,n)&&rv(e,n,t[n]);return e};const $I=(e,t)=>{const n=a.useContext(F),r=Ul(Ul({},n),e);return a.createElement("svg",Ul({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M4.9984 2H2V4.9984H4.9984V2Z",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M4.99854 3.50098H18.9987",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M3.5 4.99854V19.0005",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M20.4978 5V19.002",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M4.99854 20.501H18.9987",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M4.9984 19H2V21.9984H4.9984V19Z",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M21.9974 2.00195H18.999V5.00035H21.9974V2.00195Z",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M21.9974 19.002H18.999V22.0004H21.9974V19.002Z",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.9966 15.002L7.99658 8.00195L14.9966 11.002L11.9986 12.0009L10.9966 15.002Z",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.999 12.002L14.997 15.002L11.999 12.002Z",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},OI=a.forwardRef($I);var LI=OI,jI=Object.defineProperty,ov=Object.getOwnPropertySymbols,RI=Object.prototype.hasOwnProperty,PI=Object.prototype.propertyIsEnumerable,sv=(e,t,n)=>t in e?jI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gl=(e,t)=>{for(var n in t||(t={}))RI.call(t,n)&&sv(e,n,t[n]);if(ov)for(var n of ov(t))PI.call(t,n)&&sv(e,n,t[n]);return e};const MI=(e,t)=>{const n=a.useContext(F),r=Gl(Gl({},n),e);return a.createElement("svg",Gl({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M4.9984 2.00098H2V4.99938H4.9984V2.00098Z",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M4.9984 10.502H2V13.5004H4.9984V10.502Z",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M20.4978 5.00049V10.503",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M3.5 5.00049V10.503",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M20.4978 13.5015V19.004",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M3.5 13.5015V19.004",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M4.99902 20.5015H10.4999",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M4.99902 3.50342H10.4999",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M13.498 20.499H18.9989",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M13.498 3.50098H18.9989",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M4.9984 19.001H2V21.9994H4.9984V19.001Z",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M21.9974 2.00195H18.999V5.00035H21.9974V2.00195Z",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M13.4974 2H10.499V4.9984H13.4974V2Z",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M21.9974 10.5029H18.999V13.5013H21.9974V10.5029Z",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M21.9974 19.002H18.999V22.0004H21.9974V19.002Z",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M13.4974 19H10.499V21.9984H13.4974V19Z",stroke:"currentColor",strokeMiterlimit:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},TI=a.forwardRef(MI);var II=TI,AI=Object.defineProperty,iv=Object.getOwnPropertySymbols,_I=Object.prototype.hasOwnProperty,NI=Object.prototype.propertyIsEnumerable,av=(e,t,n)=>t in e?AI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kl=(e,t)=>{for(var n in t||(t={}))_I.call(t,n)&&av(e,n,t[n]);if(iv)for(var n of iv(t))NI.call(t,n)&&av(e,n,t[n]);return e};const DI=(e,t)=>{const n=a.useContext(F),r=Kl(Kl({},n),e);return a.createElement("svg",Kl({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M18 8C19.1046 8 20 7.10457 20 6C20 4.89543 19.1046 4 18 4C16.8954 4 16 4.89543 16 6C16 7.10457 16.8954 8 18 8Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M6 20C7.10457 20 8 19.1046 8 18C8 16.8954 7.10457 16 6 16C4.89543 16 4 16.8954 4 18C4 19.1046 4.89543 20 6 20Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M6 16V3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M8 18H9C12.5 18 18 15.9 18 9.5V8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},VI=a.forwardRef(DI);var zI=VI,FI=Object.defineProperty,cv=Object.getOwnPropertySymbols,BI=Object.prototype.hasOwnProperty,HI=Object.prototype.propertyIsEnumerable,lv=(e,t,n)=>t in e?FI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yl=(e,t)=>{for(var n in t||(t={}))BI.call(t,n)&&lv(e,n,t[n]);if(cv)for(var n of cv(t))HI.call(t,n)&&lv(e,n,t[n]);return e};const WI=(e,t)=>{const n=a.useContext(F),r=Yl(Yl({},n),e);return a.createElement("svg",Yl({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M18 21C19.1046 21 20 20.1046 20 19C20 17.8954 19.1046 17 18 17C16.8954 17 16 17.8954 16 19C16 20.1046 16.8954 21 18 21Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M6 7C7.10457 7 8 6.10457 8 5C8 3.89543 7.10457 3 6 3C4.89543 3 4 3.89543 4 5C4 6.10457 4.89543 7 6 7Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M18 17V7C18 7 18 5 16 5H13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M6 7V17C6 17 6 19 8 19H11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M15.0005 7.50012L12.5005 5.00012L15.0005 2.50012",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M8.5 16.5L11 19L8.5 21.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},ZI=a.forwardRef(WI);var UI=ZI,GI=Object.defineProperty,uv=Object.getOwnPropertySymbols,KI=Object.prototype.hasOwnProperty,YI=Object.prototype.propertyIsEnumerable,dv=(e,t,n)=>t in e?GI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ql=(e,t)=>{for(var n in t||(t={}))KI.call(t,n)&&dv(e,n,t[n]);if(uv)for(var n of uv(t))YI.call(t,n)&&dv(e,n,t[n]);return e};const qI=(e,t)=>{const n=a.useContext(F),r=ql(ql({},n),e);return a.createElement("svg",ql({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M2.5 12.5L8 14.5L7 18L8 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M17 20.5L16.5 18L14 17V13.5L17 12.5L21.5 13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M19 5.5L18.5 7L15 7.5V10.5L17.5 9.5H19.5L21.5 10.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M2.5 10.5L5 8.5L7.5 8L9.5 5L8.5 3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},XI=a.forwardRef(qI);var JI=XI,QI=Object.defineProperty,fv=Object.getOwnPropertySymbols,eA=Object.prototype.hasOwnProperty,tA=Object.prototype.propertyIsEnumerable,pv=(e,t,n)=>t in e?QI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xl=(e,t)=>{for(var n in t||(t={}))eA.call(t,n)&&pv(e,n,t[n]);if(fv)for(var n of fv(t))tA.call(t,n)&&pv(e,n,t[n]);return e};const nA=(e,t)=>{const n=a.useContext(F),r=Xl(Xl({},n),e);return a.createElement("svg",Xl({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M10 3L6 21",stroke:"currentColor",strokeLinecap:"round"}),a.createElement("path",{d:"M20.5 16H2.5",stroke:"currentColor",strokeLinecap:"round"}),a.createElement("path",{d:"M22 7H4",stroke:"currentColor",strokeLinecap:"round"}),a.createElement("path",{d:"M18 3L14 21",stroke:"currentColor",strokeLinecap:"round"}))},rA=a.forwardRef(nA);var oA=rA,sA=Object.defineProperty,mv=Object.getOwnPropertySymbols,iA=Object.prototype.hasOwnProperty,aA=Object.prototype.propertyIsEnumerable,hv=(e,t,n)=>t in e?sA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jl=(e,t)=>{for(var n in t||(t={}))iA.call(t,n)&&hv(e,n,t[n]);if(mv)for(var n of mv(t))aA.call(t,n)&&hv(e,n,t[n]);return e};const cA=(e,t)=>{const n=a.useContext(F),r=Jl(Jl({},n),e);return a.createElement("svg",Jl({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M2 8L11.7317 3.13416C11.9006 3.04971 12.0994 3.0497 12.2683 3.13416L22 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M20 11V19C20 20.1046 19.1046 21 18 21H6C4.89543 21 4 20.1046 4 19V11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},lA=a.forwardRef(cA);var uA=lA,dA=Object.defineProperty,gv=Object.getOwnPropertySymbols,fA=Object.prototype.hasOwnProperty,pA=Object.prototype.propertyIsEnumerable,vv=(e,t,n)=>t in e?dA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ql=(e,t)=>{for(var n in t||(t={}))fA.call(t,n)&&vv(e,n,t[n]);if(gv)for(var n of gv(t))pA.call(t,n)&&vv(e,n,t[n]);return e};const mA=(e,t)=>{const n=a.useContext(F),r=Ql(Ql({},n),e);return a.createElement("svg",Ql({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M12 11.5V16.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 7.51L12.01 7.49889",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},hA=a.forwardRef(mA);var gA=hA,vA=Object.defineProperty,bv=Object.getOwnPropertySymbols,bA=Object.prototype.hasOwnProperty,yA=Object.prototype.propertyIsEnumerable,yv=(e,t,n)=>t in e?vA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eu=(e,t)=>{for(var n in t||(t={}))bA.call(t,n)&&yv(e,n,t[n]);if(bv)for(var n of bv(t))yA.call(t,n)&&yv(e,n,t[n]);return e};const wA=(e,t)=>{const n=a.useContext(F),r=eu(eu({},n),e);return a.createElement("svg",eu({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M9 6V18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M15 6V18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M9 6C9 4.34315 7.65685 3 6 3C4.34315 3 3 4.34315 3 6C3 7.65685 4.34315 9 6 9H18C19.6569 9 21 7.65685 21 6C21 4.34315 19.6569 3 18 3C16.3431 3 15 4.34315 15 6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M9 18C9 19.6569 7.65685 21 6 21C4.34315 21 3 19.6569 3 18C3 16.3431 4.34315 15 6 15H18C19.6569 15 21 16.3431 21 18C21 19.6569 19.6569 21 18 21C16.3431 21 15 19.6569 15 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},xA=a.forwardRef(wA);var CA=xA,kA=Object.defineProperty,wv=Object.getOwnPropertySymbols,EA=Object.prototype.hasOwnProperty,SA=Object.prototype.propertyIsEnumerable,xv=(e,t,n)=>t in e?kA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tu=(e,t)=>{for(var n in t||(t={}))EA.call(t,n)&&xv(e,n,t[n]);if(wv)for(var n of wv(t))SA.call(t,n)&&xv(e,n,t[n]);return e};const $A=(e,t)=>{const n=a.useContext(F),r=tu(tu({},n),e);return a.createElement("svg",tu({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M7.14286 16.9953C6.75006 16.9953 6.36756 16.9525 6 16.8715C3.70973 16.3665 2 14.3761 2 11.9977C2 9.284 4.22573 7.07548 7 7.00195",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M13.3184 9.63429C12.7858 8.73635 11.9737 7.96977 11 7.4989",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M16.8571 6.99999C17.2499 6.99999 17.6324 7.04278 18 7.12383C20.2903 7.62884 22 9.6192 22 11.9976C22 14.7577 19.6975 16.9952 16.8571 16.9952C16.581 16.9952 15.4776 16.9952 15.1429 16.9952C12.317 16.9952 10 14.4893 10 11.9976C10 11.9976 10 11 10.5 10.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M3 3L21 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},OA=a.forwardRef($A);var LA=OA,jA=Object.defineProperty,Cv=Object.getOwnPropertySymbols,RA=Object.prototype.hasOwnProperty,PA=Object.prototype.propertyIsEnumerable,kv=(e,t,n)=>t in e?jA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nu=(e,t)=>{for(var n in t||(t={}))RA.call(t,n)&&kv(e,n,t[n]);if(Cv)for(var n of Cv(t))PA.call(t,n)&&kv(e,n,t[n]);return e};const MA=(e,t)=>{const n=a.useContext(F),r=nu(nu({},n),e);return a.createElement("svg",nu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M14 11.9976C14 9.5059 11.683 7 8.85714 7C8.52241 7 7.41904 7.00001 7.14286 7.00001C4.30254 7.00001 2 9.23752 2 11.9976C2 14.376 3.70973 16.3664 6 16.8714C6.36756 16.9525 6.75006 16.9952 7.14286 16.9952",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M10 11.9976C10 14.4893 12.317 16.9952 15.1429 16.9952C15.4776 16.9952 16.581 16.9952 16.8571 16.9952C19.6975 16.9952 22 14.7577 22 11.9976C22 9.6192 20.2903 7.62884 18 7.12383C17.6324 7.04278 17.2499 6.99999 16.8571 6.99999",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},TA=a.forwardRef(MA);var IA=TA,AA=Object.defineProperty,Ev=Object.getOwnPropertySymbols,_A=Object.prototype.hasOwnProperty,NA=Object.prototype.propertyIsEnumerable,Sv=(e,t,n)=>t in e?AA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ru=(e,t)=>{for(var n in t||(t={}))_A.call(t,n)&&Sv(e,n,t[n]);if(Ev)for(var n of Ev(t))NA.call(t,n)&&Sv(e,n,t[n]);return e};const DA=(e,t)=>{const n=a.useContext(F),r=ru(ru({},n),e);return a.createElement("svg",ru({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M8 6L20 6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M4 6.01L4.01 5.99889",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M4 12.01L4.01 11.9989",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M4 18.01L4.01 17.9989",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M8 12L20 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M8 18L20 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},VA=a.forwardRef(DA);var nk=VA,zA=Object.defineProperty,$v=Object.getOwnPropertySymbols,FA=Object.prototype.hasOwnProperty,BA=Object.prototype.propertyIsEnumerable,Ov=(e,t,n)=>t in e?zA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ou=(e,t)=>{for(var n in t||(t={}))FA.call(t,n)&&Ov(e,n,t[n]);if($v)for(var n of $v(t))BA.call(t,n)&&Ov(e,n,t[n]);return e};const HA=(e,t)=>{const n=a.useContext(F),r=ou(ou({},n),e);return a.createElement("svg",ou({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M16 12H17.4C17.7314 12 18 12.2686 18 12.6V19.4C18 19.7314 17.7314 20 17.4 20H6.6C6.26863 20 6 19.7314 6 19.4V12.6C6 12.2686 6.26863 12 6.6 12H8M16 12V8C16 6.66667 15.2 4 12 4C8.8 4 8 6.66667 8 8V12M16 12H8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},WA=a.forwardRef(HA);var rk=WA,ZA=Object.defineProperty,Lv=Object.getOwnPropertySymbols,UA=Object.prototype.hasOwnProperty,GA=Object.prototype.propertyIsEnumerable,jv=(e,t,n)=>t in e?ZA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,su=(e,t)=>{for(var n in t||(t={}))UA.call(t,n)&&jv(e,n,t[n]);if(Lv)for(var n of Lv(t))GA.call(t,n)&&jv(e,n,t[n]);return e};const KA=(e,t)=>{const n=a.useContext(F),r=su(su({},n),e);return a.createElement("svg",su({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M3 21L13 11M18 6L15.5 8.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M9.5 2L10.4453 4.55468L13 5.5L10.4453 6.44532L9.5 9L8.55468 6.44532L6 5.5L8.55468 4.55468L9.5 2Z",stroke:"currentColor",strokeLinejoin:"round"}),a.createElement("path",{d:"M19 10L19.5402 11.4598L21 12L19.5402 12.5402L19 14L18.4598 12.5402L17 12L18.4598 11.4598L19 10Z",stroke:"currentColor",strokeLinejoin:"round"}))},YA=a.forwardRef(KA);var qA=YA,XA=Object.defineProperty,Rv=Object.getOwnPropertySymbols,JA=Object.prototype.hasOwnProperty,QA=Object.prototype.propertyIsEnumerable,Pv=(e,t,n)=>t in e?XA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,iu=(e,t)=>{for(var n in t||(t={}))JA.call(t,n)&&Pv(e,n,t[n]);if(Rv)for(var n of Rv(t))QA.call(t,n)&&Pv(e,n,t[n]);return e};const e_=(e,t)=>{const n=a.useContext(F),r=iu(iu({},n),e);return a.createElement("svg",iu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M9 19L3.78974 20.7368C3.40122 20.8663 3 20.5771 3 20.1675L3 5.43246C3 5.1742 3.16526 4.94491 3.41026 4.86325L9 3M9 19L15 21M9 19L9 3M15 21L20.5897 19.1368C20.8347 19.0551 21 18.8258 21 18.5675L21 3.83246C21 3.42292 20.5988 3.13374 20.2103 3.26325L15 5M15 21L15 5M15 5L9 3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},t_=a.forwardRef(e_);var n_=t_,r_=Object.defineProperty,Mv=Object.getOwnPropertySymbols,o_=Object.prototype.hasOwnProperty,s_=Object.prototype.propertyIsEnumerable,Tv=(e,t,n)=>t in e?r_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,au=(e,t)=>{for(var n in t||(t={}))o_.call(t,n)&&Tv(e,n,t[n]);if(Mv)for(var n of Mv(t))s_.call(t,n)&&Tv(e,n,t[n]);return e};const i_=(e,t)=>{const n=a.useContext(F),r=au(au({},n),e);return a.createElement("svg",au({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M7 4H4V7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M17 4H20V7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M7 20H4V17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M17 20H20V17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},a_=a.forwardRef(i_);var c_=a_,l_=Object.defineProperty,Iv=Object.getOwnPropertySymbols,u_=Object.prototype.hasOwnProperty,d_=Object.prototype.propertyIsEnumerable,Av=(e,t,n)=>t in e?l_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cu=(e,t)=>{for(var n in t||(t={}))u_.call(t,n)&&Av(e,n,t[n]);if(Iv)for(var n of Iv(t))d_.call(t,n)&&Av(e,n,t[n]);return e};const f_=(e,t)=>{const n=a.useContext(F),r=cu(cu({},n),e);return a.createElement("svg",cu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M21 3.6V20.4C21 20.7314 20.7314 21 20.4 21H3.6C3.26863 21 3 20.7314 3 20.4V3.6C3 3.26863 3.26863 3 3.6 3H20.4C20.7314 3 21 3.26863 21 3.6Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M3 16L10 13L21 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M16 10C14.8954 10 14 9.10457 14 8C14 6.89543 14.8954 6 16 6C17.1046 6 18 6.89543 18 8C18 9.10457 17.1046 10 16 10Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},p_=a.forwardRef(f_);var ok=p_,m_=Object.defineProperty,_v=Object.getOwnPropertySymbols,h_=Object.prototype.hasOwnProperty,g_=Object.prototype.propertyIsEnumerable,Nv=(e,t,n)=>t in e?m_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lu=(e,t)=>{for(var n in t||(t={}))h_.call(t,n)&&Nv(e,n,t[n]);if(_v)for(var n of _v(t))g_.call(t,n)&&Nv(e,n,t[n]);return e};const v_=(e,t)=>{const n=a.useContext(F),r=lu(lu({},n),e);return a.createElement("svg",lu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M21 7.6V20.4C21 20.7314 20.7314 21 20.4 21H7.6C7.26863 21 7 20.7314 7 20.4V7.6C7 7.26863 7.26863 7 7.6 7H20.4C20.7314 7 21 7.26863 21 7.6Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M18 4H4.6C4.26863 4 4 4.26863 4 4.6V18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12.9087 11.5452C12.5088 11.3053 12 11.5933 12 12.0597V15.9403C12 16.4067 12.5088 16.6947 12.9087 16.4548L16.1425 14.5145C16.5309 14.2815 16.5309 13.7185 16.1425 13.4855L12.9087 11.5452Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},b_=a.forwardRef(v_);var y_=b_,w_=Object.defineProperty,Dv=Object.getOwnPropertySymbols,x_=Object.prototype.hasOwnProperty,C_=Object.prototype.propertyIsEnumerable,Vv=(e,t,n)=>t in e?w_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uu=(e,t)=>{for(var n in t||(t={}))x_.call(t,n)&&Vv(e,n,t[n]);if(Dv)for(var n of Dv(t))C_.call(t,n)&&Vv(e,n,t[n]);return e};const k_=(e,t)=>{const n=a.useContext(F),r=uu(uu({},n),e);return a.createElement("svg",uu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("rect",{x:9,y:2,width:6,height:12,rx:3,stroke:"currentColor",strokeWidth:1.5}),a.createElement("path",{d:"M5 10V11C5 14.866 8.13401 18 12 18V18V18C15.866 18 19 14.866 19 11V10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 18V22M12 22H9M12 22H15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},E_=a.forwardRef(k_);var S_=E_,$_=Object.defineProperty,zv=Object.getOwnPropertySymbols,O_=Object.prototype.hasOwnProperty,L_=Object.prototype.propertyIsEnumerable,Fv=(e,t,n)=>t in e?$_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,du=(e,t)=>{for(var n in t||(t={}))O_.call(t,n)&&Fv(e,n,t[n]);if(zv)for(var n of zv(t))L_.call(t,n)&&Fv(e,n,t[n]);return e};const j_=(e,t)=>{const n=a.useContext(F),r=du(du({},n),e);return a.createElement("svg",du({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M6 12H18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},R_=a.forwardRef(j_);var P_=R_,M_=Object.defineProperty,Bv=Object.getOwnPropertySymbols,T_=Object.prototype.hasOwnProperty,I_=Object.prototype.propertyIsEnumerable,Hv=(e,t,n)=>t in e?M_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fu=(e,t)=>{for(var n in t||(t={}))T_.call(t,n)&&Hv(e,n,t[n]);if(Bv)for(var n of Bv(t))I_.call(t,n)&&Hv(e,n,t[n]);return e};const A_=(e,t)=>{const n=a.useContext(F),r=fu(fu({},n),e);return a.createElement("svg",fu({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M20 12.5C20.2761 12.5 20.5 12.2761 20.5 12C20.5 11.7239 20.2761 11.5 20 11.5C19.7239 11.5 19.5 11.7239 19.5 12C19.5 12.2761 19.7239 12.5 20 12.5Z",fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z",fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M4 12.5C4.27614 12.5 4.5 12.2761 4.5 12C4.5 11.7239 4.27614 11.5 4 11.5C3.72386 11.5 3.5 11.7239 3.5 12C3.5 12.2761 3.72386 12.5 4 12.5Z",fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},__=a.forwardRef(A_);var N_=__,D_=Object.defineProperty,Wv=Object.getOwnPropertySymbols,V_=Object.prototype.hasOwnProperty,z_=Object.prototype.propertyIsEnumerable,Zv=(e,t,n)=>t in e?D_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pu=(e,t)=>{for(var n in t||(t={}))V_.call(t,n)&&Zv(e,n,t[n]);if(Wv)for(var n of Wv(t))z_.call(t,n)&&Zv(e,n,t[n]);return e};const F_=(e,t)=>{const n=a.useContext(F),r=pu(pu({},n),e);return a.createElement("svg",pu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M7 8.01L7.01 7.99889",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M17 8.01L17.01 7.99889",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M7 12.01L7.01 11.9989",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M17 12.01L17.01 11.9989",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M7 16.01L7.01 15.9989",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M17 16.01L17.01 15.9989",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M7 2H3.6C3.26863 2 3 2.26863 3 2.6V21.4C3 21.7314 3.26863 22 3.6 22H7M7 2V4M7 2H17M17 2H20.4C20.7314 2 21 2.26863 21 2.6V21.4C21 21.7314 20.7314 22 20.4 22H17M17 2V4M17 22V20M17 22H7M7 22V20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},B_=a.forwardRef(F_);var H_=B_,W_=Object.defineProperty,Uv=Object.getOwnPropertySymbols,Z_=Object.prototype.hasOwnProperty,U_=Object.prototype.propertyIsEnumerable,Gv=(e,t,n)=>t in e?W_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mu=(e,t)=>{for(var n in t||(t={}))Z_.call(t,n)&&Gv(e,n,t[n]);if(Uv)for(var n of Uv(t))U_.call(t,n)&&Gv(e,n,t[n]);return e};const G_=(e,t)=>{const n=a.useContext(F),r=mu(mu({},n),e);return a.createElement("svg",mu({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M1.99219 19H4.99219M7.99219 19H4.99219M4.99219 19V16M4.99219 19V22",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M7 2L16.5 2L21 6.5V19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M11 22H16.5C17.3284 22 18 21.3284 18 20.5V8.74853C18 8.5894 17.9368 8.43679 17.8243 8.32426L14.6757 5.17574C14.5632 5.06321 14.4106 5 14.2515 5H4.5C3.67157 5 3 5.67157 3 6.5V13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M14 5V8.4C14 8.73137 14.2686 9 14.6 9H18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},K_=a.forwardRef(G_);var Y_=K_,q_=Object.defineProperty,Kv=Object.getOwnPropertySymbols,X_=Object.prototype.hasOwnProperty,J_=Object.prototype.propertyIsEnumerable,Yv=(e,t,n)=>t in e?q_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hu=(e,t)=>{for(var n in t||(t={}))X_.call(t,n)&&Yv(e,n,t[n]);if(Kv)for(var n of Kv(t))J_.call(t,n)&&Yv(e,n,t[n]);return e};const Q_=(e,t)=>{const n=a.useContext(F),r=hu(hu({},n),e);return a.createElement("svg",hu({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M7 18H10.5H14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M7 14H7.5H8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M7 10H8.5H10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M7 2L16.5 2L21 6.5V19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M3 20.5V6.5C3 5.67157 3.67157 5 4.5 5H14.2515C14.4106 5 14.5632 5.06321 14.6757 5.17574L17.8243 8.32426C17.9368 8.43679 18 8.5894 18 8.74853V20.5C18 21.3284 17.3284 22 16.5 22H4.5C3.67157 22 3 21.3284 3 20.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M14 5V8.4C14 8.73137 14.2686 9 14.6 9H18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},eN=a.forwardRef(Q_);var sk=eN,tN=Object.defineProperty,qv=Object.getOwnPropertySymbols,nN=Object.prototype.hasOwnProperty,rN=Object.prototype.propertyIsEnumerable,Xv=(e,t,n)=>t in e?tN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gu=(e,t)=>{for(var n in t||(t={}))nN.call(t,n)&&Xv(e,n,t[n]);if(qv)for(var n of qv(t))rN.call(t,n)&&Xv(e,n,t[n]);return e};const oN=(e,t)=>{const n=a.useContext(F),r=gu(gu({},n),e);return a.createElement("svg",gu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M20 14V3L9 5V16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M17 19H18C19.1046 19 20 18.1046 20 17V14H17C15.8954 14 15 14.8954 15 16V17C15 18.1046 15.8954 19 17 19Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M6 21H7C8.10457 21 9 20.1046 9 19V16H6C4.89543 16 4 16.8954 4 18V19C4 20.1046 4.89543 21 6 21Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},sN=a.forwardRef(oN);var iN=sN,aN=Object.defineProperty,Jv=Object.getOwnPropertySymbols,cN=Object.prototype.hasOwnProperty,lN=Object.prototype.propertyIsEnumerable,Qv=(e,t,n)=>t in e?aN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vu=(e,t)=>{for(var n in t||(t={}))cN.call(t,n)&&Qv(e,n,t[n]);if(Jv)for(var n of Jv(t))lN.call(t,n)&&Qv(e,n,t[n]);return e};const uN=(e,t)=>{const n=a.useContext(F),r=vu(vu({},n),e);return a.createElement("svg",vu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},dN=a.forwardRef(uN);var fN=dN,pN=Object.defineProperty,eb=Object.getOwnPropertySymbols,mN=Object.prototype.hasOwnProperty,hN=Object.prototype.propertyIsEnumerable,tb=(e,t,n)=>t in e?pN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bu=(e,t)=>{for(var n in t||(t={}))mN.call(t,n)&&tb(e,n,t[n]);if(eb)for(var n of eb(t))hN.call(t,n)&&tb(e,n,t[n]);return e};const gN=(e,t)=>{const n=a.useContext(F),r=bu(bu({},n),e);return a.createElement("svg",bu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M9 6L15 12L9 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},vN=a.forwardRef(gN);var bN=vN,yN=Object.defineProperty,nb=Object.getOwnPropertySymbols,wN=Object.prototype.hasOwnProperty,xN=Object.prototype.propertyIsEnumerable,rb=(e,t,n)=>t in e?yN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yu=(e,t)=>{for(var n in t||(t={}))wN.call(t,n)&&rb(e,n,t[n]);if(nb)for(var n of nb(t))xN.call(t,n)&&rb(e,n,t[n]);return e};const CN=(e,t)=>{const n=a.useContext(F),r=yu(yu({},n),e);return a.createElement("svg",yu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M6 15L12 9L18 15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},kN=a.forwardRef(CN);var EN=kN,SN=Object.defineProperty,ob=Object.getOwnPropertySymbols,$N=Object.prototype.hasOwnProperty,ON=Object.prototype.propertyIsEnumerable,sb=(e,t,n)=>t in e?SN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wu=(e,t)=>{for(var n in t||(t={}))$N.call(t,n)&&sb(e,n,t[n]);if(ob)for(var n of ob(t))ON.call(t,n)&&sb(e,n,t[n]);return e};const LN=(e,t)=>{const n=a.useContext(F),r=wu(wu({},n),e);return a.createElement("svg",wu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("rect",{x:3,y:2,width:7,height:5,rx:.6,stroke:"currentColor",strokeWidth:1.5}),a.createElement("rect",{x:8.5,y:17,width:7,height:5,rx:.6,stroke:"currentColor",strokeWidth:1.5}),a.createElement("rect",{x:14,y:2,width:7,height:5,rx:.6,stroke:"currentColor",strokeWidth:1.5}),a.createElement("path",{d:"M6.5 7V10.5C6.5 11.6046 7.39543 12.5 8.5 12.5H15.5C16.6046 12.5 17.5 11.6046 17.5 10.5V7",stroke:"currentColor"}),a.createElement("path",{d:"M12 12.5V17",stroke:"currentColor"}))},jN=a.forwardRef(LN);var ik=jN,RN=Object.defineProperty,ib=Object.getOwnPropertySymbols,PN=Object.prototype.hasOwnProperty,MN=Object.prototype.propertyIsEnumerable,ab=(e,t,n)=>t in e?RN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xu=(e,t)=>{for(var n in t||(t={}))PN.call(t,n)&&ab(e,n,t[n]);if(ib)for(var n of ib(t))MN.call(t,n)&&ab(e,n,t[n]);return e};const TN=(e,t)=>{const n=a.useContext(F),r=xu(xu({},n),e);return a.createElement("svg",xu({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z",fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M19 19L17.5 17.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M15.5 15.5L14.5 14.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},IN=a.forwardRef(TN);var AN=IN,_N=Object.defineProperty,cb=Object.getOwnPropertySymbols,NN=Object.prototype.hasOwnProperty,DN=Object.prototype.propertyIsEnumerable,lb=(e,t,n)=>t in e?_N(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cu=(e,t)=>{for(var n in t||(t={}))NN.call(t,n)&&lb(e,n,t[n]);if(cb)for(var n of cb(t))DN.call(t,n)&&lb(e,n,t[n]);return e};const VN=(e,t)=>{const n=a.useContext(F),r=Cu(Cu({},n),e);return a.createElement("svg",Cu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M12 21V7C12 5.89543 12.8954 5 14 5H21.4C21.7314 5 22 5.26863 22 5.6V18.7143",stroke:"currentColor",strokeLinecap:"round"}),a.createElement("path",{d:"M12 21V7C12 5.89543 11.1046 5 10 5H2.6C2.26863 5 2 5.26863 2 5.6V18.7143",stroke:"currentColor",strokeLinecap:"round"}),a.createElement("path",{d:"M14 19L22 19",stroke:"currentColor",strokeLinecap:"round"}),a.createElement("path",{d:"M10 19L2 19",stroke:"currentColor",strokeLinecap:"round"}),a.createElement("path",{d:"M12 21C12 19.8954 12.8954 19 14 19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 21C12 19.8954 11.1046 19 10 19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},zN=a.forwardRef(VN);var ak=zN,FN=Object.defineProperty,ub=Object.getOwnPropertySymbols,BN=Object.prototype.hasOwnProperty,HN=Object.prototype.propertyIsEnumerable,db=(e,t,n)=>t in e?FN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ku=(e,t)=>{for(var n in t||(t={}))BN.call(t,n)&&db(e,n,t[n]);if(ub)for(var n of ub(t))HN.call(t,n)&&db(e,n,t[n]);return e};const WN=(e,t)=>{const n=a.useContext(F),r=ku(ku({},n),e);return a.createElement("svg",ku({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M21 3L15 3M21 3L12 12M21 3V9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M21 13V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V5C3 3.89543 3.89543 3 5 3H11",stroke:"currentColor",strokeLinecap:"round"}))},ZN=a.forwardRef(WN);var UN=ZN,GN=Object.defineProperty,fb=Object.getOwnPropertySymbols,KN=Object.prototype.hasOwnProperty,YN=Object.prototype.propertyIsEnumerable,pb=(e,t,n)=>t in e?GN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Eu=(e,t)=>{for(var n in t||(t={}))KN.call(t,n)&&pb(e,n,t[n]);if(fb)for(var n of fb(t))YN.call(t,n)&&pb(e,n,t[n]);return e};const qN=(e,t)=>{const n=a.useContext(F),r=Eu(Eu({},n),e);return a.createElement("svg",Eu({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M8.5 11L12 14.5L15.5 11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},XN=a.forwardRef(qN);var JN=XN,QN=Object.defineProperty,mb=Object.getOwnPropertySymbols,eD=Object.prototype.hasOwnProperty,tD=Object.prototype.propertyIsEnumerable,hb=(e,t,n)=>t in e?QN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Su=(e,t)=>{for(var n in t||(t={}))eD.call(t,n)&&hb(e,n,t[n]);if(mb)for(var n of mb(t))tD.call(t,n)&&hb(e,n,t[n]);return e};const nD=(e,t)=>{const n=a.useContext(F),r=Su(Su({},n),e);return a.createElement("svg",Su({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M8.5 13L12 9.5L15.5 13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},rD=a.forwardRef(nD);var oD=rD,sD=Object.defineProperty,gb=Object.getOwnPropertySymbols,iD=Object.prototype.hasOwnProperty,aD=Object.prototype.propertyIsEnumerable,vb=(e,t,n)=>t in e?sD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$u=(e,t)=>{for(var n in t||(t={}))iD.call(t,n)&&vb(e,n,t[n]);if(gb)for(var n of gb(t))aD.call(t,n)&&vb(e,n,t[n]);return e};const cD=(e,t)=>{const n=a.useContext(F),r=$u($u({},n),e);return a.createElement("svg",$u({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M4 21.4V2.6C4 2.26863 4.26863 2 4.6 2H16.2515C16.4106 2 16.5632 2.06321 16.6757 2.17574L19.8243 5.32426C19.9368 5.43679 20 5.5894 20 5.74853V21.4C20 21.7314 19.7314 22 19.4 22H4.6C4.26863 22 4 21.7314 4 21.4Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M8 10L16 10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M8 18L16 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M8 14L12 14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M16 2V5.4C16 5.73137 16.2686 6 16.6 6H20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},lD=a.forwardRef(cD);var uD=lD,dD=Object.defineProperty,bb=Object.getOwnPropertySymbols,fD=Object.prototype.hasOwnProperty,pD=Object.prototype.propertyIsEnumerable,yb=(e,t,n)=>t in e?dD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ou=(e,t)=>{for(var n in t||(t={}))fD.call(t,n)&&yb(e,n,t[n]);if(bb)for(var n of bb(t))pD.call(t,n)&&yb(e,n,t[n]);return e};const mD=(e,t)=>{const n=a.useContext(F),r=Ou(Ou({},n),e);return a.createElement("svg",Ou({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M20.5096 9.54C20.4243 9.77932 20.2918 9.99909 20.12 10.1863C19.9483 10.3735 19.7407 10.5244 19.5096 10.63C18.2796 11.1806 17.2346 12.0745 16.5002 13.2045C15.7659 14.3345 15.3733 15.6524 15.3696 17C15.3711 17.4701 15.418 17.9389 15.5096 18.4C15.5707 18.6818 15.5747 18.973 15.5215 19.2564C15.4682 19.5397 15.3588 19.8096 15.1996 20.05C15.0649 20.2604 14.8877 20.4403 14.6793 20.5781C14.4709 20.7158 14.2359 20.8085 13.9896 20.85C13.4554 20.9504 12.9131 21.0006 12.3696 21C11.1638 21.0006 9.97011 20.7588 8.85952 20.2891C7.74893 19.8194 6.74405 19.1314 5.90455 18.2657C5.06506 17.4001 4.40807 16.3747 3.97261 15.2502C3.53714 14.1257 3.33208 12.9252 3.36959 11.72C3.4472 9.47279 4.3586 7.33495 5.92622 5.72296C7.49385 4.11097 9.60542 3.14028 11.8496 3H12.3596C14.0353 3.00042 15.6777 3.46869 17.1017 4.35207C18.5257 5.23544 19.6748 6.49885 20.4196 8C20.6488 8.47498 20.6812 9.02129 20.5096 9.52V9.54Z",stroke:"currentColor"}),a.createElement("path",{d:"M8 16.01L8.01 15.9989",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M6 12.01L6.01 11.9989",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M8 8.01L8.01 7.99889",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 6.01L12.01 5.99889",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M16 8.01L16.01 7.99889",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},hD=a.forwardRef(mD);var ck=hD,gD=Object.defineProperty,wb=Object.getOwnPropertySymbols,vD=Object.prototype.hasOwnProperty,bD=Object.prototype.propertyIsEnumerable,xb=(e,t,n)=>t in e?gD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lu=(e,t)=>{for(var n in t||(t={}))vD.call(t,n)&&xb(e,n,t[n]);if(wb)for(var n of wb(t))bD.call(t,n)&&xb(e,n,t[n]);return e};const yD=(e,t)=>{const n=a.useContext(F),r=Lu(Lu({},n),e);return a.createElement("svg",Lu({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M8.5 4H6C4.89543 4 4 4.89543 4 6V20C4 21.1046 4.89543 22 6 22H18C19.1046 22 20 21.1046 20 20V6C20 4.89543 19.1046 4 18 4H15.5",stroke:"currentColor",strokeLinecap:"round"}),a.createElement("path",{d:"M8 6.4V4.5C8 4.22386 8.22386 4 8.5 4C8.77614 4 9.00422 3.77604 9.05152 3.50398C9.19968 2.65171 9.77399 1 12 1C14.226 1 14.8003 2.65171 14.9485 3.50398C14.9958 3.77604 15.2239 4 15.5 4C15.7761 4 16 4.22386 16 4.5V6.4C16 6.73137 15.7314 7 15.4 7H8.6C8.26863 7 8 6.73137 8 6.4Z",stroke:"currentColor",strokeLinecap:"round"}))},wD=a.forwardRef(yD);var xD=wD,CD=Object.defineProperty,Cb=Object.getOwnPropertySymbols,kD=Object.prototype.hasOwnProperty,ED=Object.prototype.propertyIsEnumerable,kb=(e,t,n)=>t in e?CD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ju=(e,t)=>{for(var n in t||(t={}))kD.call(t,n)&&kb(e,n,t[n]);if(Cb)for(var n of Cb(t))ED.call(t,n)&&kb(e,n,t[n]);return e};const SD=(e,t)=>{const n=a.useContext(F),r=ju(ju({},n),e);return a.createElement("svg",ju({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M18 16.5V3M18 3L21.5 6.5M18 3L14.5 6.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M18 16.5C18 18.433 16.433 20 14.5 20C12.567 20 11 18.433 11 16.5V7.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M11 7.5C11 5.567 9.433 4 7.5 4C5.567 4 4 5.567 4 7.5V19.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},$D=a.forwardRef(SD);var OD=$D,LD=Object.defineProperty,Eb=Object.getOwnPropertySymbols,jD=Object.prototype.hasOwnProperty,RD=Object.prototype.propertyIsEnumerable,Sb=(e,t,n)=>t in e?LD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ru=(e,t)=>{for(var n in t||(t={}))jD.call(t,n)&&Sb(e,n,t[n]);if(Eb)for(var n of Eb(t))RD.call(t,n)&&Sb(e,n,t[n]);return e};const PD=(e,t)=>{const n=a.useContext(F),r=Ru(Ru({},n),e);return a.createElement("svg",Ru({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M6 18.4V5.6C6 5.26863 6.26863 5 6.6 5H9.4C9.73137 5 10 5.26863 10 5.6V18.4C10 18.7314 9.73137 19 9.4 19H6.6C6.26863 19 6 18.7314 6 18.4Z",stroke:"currentColor"}),a.createElement("path",{d:"M14 18.4V5.6C14 5.26863 14.2686 5 14.6 5H17.4C17.7314 5 18 5.26863 18 5.6V18.4C18 18.7314 17.7314 19 17.4 19H14.6C14.2686 19 14 18.7314 14 18.4Z",stroke:"currentColor"}))},MD=a.forwardRef(PD);var TD=MD,ID=Object.defineProperty,$b=Object.getOwnPropertySymbols,AD=Object.prototype.hasOwnProperty,_D=Object.prototype.propertyIsEnumerable,Ob=(e,t,n)=>t in e?ID(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pu=(e,t)=>{for(var n in t||(t={}))AD.call(t,n)&&Ob(e,n,t[n]);if($b)for(var n of $b(t))_D.call(t,n)&&Ob(e,n,t[n]);return e};const ND=(e,t)=>{const n=a.useContext(F),r=Pu(Pu({},n),e);return a.createElement("svg",Pu({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M9.5 14.5L3 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M7.67602 7.8896L6.69713 7.78823L5.00007 9.48528L14.1925 18.6777L15.8895 16.9806L15.7879 16M11.4847 7L15.1568 2.67141L21.0065 8.5211L16.6991 12.175",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M3 3L21 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},DD=a.forwardRef(ND);var VD=DD,zD=Object.defineProperty,Lb=Object.getOwnPropertySymbols,FD=Object.prototype.hasOwnProperty,BD=Object.prototype.propertyIsEnumerable,jb=(e,t,n)=>t in e?zD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mu=(e,t)=>{for(var n in t||(t={}))FD.call(t,n)&&jb(e,n,t[n]);if(Lb)for(var n of Lb(t))BD.call(t,n)&&jb(e,n,t[n]);return e};const HD=(e,t)=>{const n=a.useContext(F),r=Mu(Mu({},n),e);return a.createElement("svg",Mu({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M9.5 14.5L3 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M5.00007 9.48528L14.1925 18.6777L15.8895 16.9806L15.4974 13.1944L21.0065 8.5211L15.1568 2.67141L10.4834 8.18034L6.69713 7.78823L5.00007 9.48528Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},WD=a.forwardRef(HD);var ZD=WD,UD=Object.defineProperty,Rb=Object.getOwnPropertySymbols,GD=Object.prototype.hasOwnProperty,KD=Object.prototype.propertyIsEnumerable,Pb=(e,t,n)=>t in e?UD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tu=(e,t)=>{for(var n in t||(t={}))GD.call(t,n)&&Pb(e,n,t[n]);if(Rb)for(var n of Rb(t))KD.call(t,n)&&Pb(e,n,t[n]);return e};const YD=(e,t)=>{const n=a.useContext(F),r=Tu(Tu({},n),e);return a.createElement("svg",Tu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M6.90588 4.53682C6.50592 4.2998 6 4.58808 6 5.05299V18.947C6 19.4119 6.50592 19.7002 6.90588 19.4632L18.629 12.5162C19.0211 12.2838 19.0211 11.7162 18.629 11.4838L6.90588 4.53682Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},qD=a.forwardRef(YD);var XD=qD,JD=Object.defineProperty,Mb=Object.getOwnPropertySymbols,QD=Object.prototype.hasOwnProperty,eV=Object.prototype.propertyIsEnumerable,Tb=(e,t,n)=>t in e?JD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Iu=(e,t)=>{for(var n in t||(t={}))QD.call(t,n)&&Tb(e,n,t[n]);if(Mb)for(var n of Mb(t))eV.call(t,n)&&Tb(e,n,t[n]);return e};const tV=(e,t)=>{const n=a.useContext(F),r=Iu(Iu({},n),e);return a.createElement("svg",Iu({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M2 11L16 11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M2 17L13 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M2 5L20 5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M20 18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5C17 17.6716 17.6716 17 18.5 17C19.3284 17 20 17.6716 20 18.5ZM20 18.5V10.6C20 10.2686 20.2686 10 20.6 10H22",stroke:"currentColor",strokeLinecap:"round"}))},nV=a.forwardRef(tV);var rV=nV,oV=Object.defineProperty,Ib=Object.getOwnPropertySymbols,sV=Object.prototype.hasOwnProperty,iV=Object.prototype.propertyIsEnumerable,Ab=(e,t,n)=>t in e?oV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Au=(e,t)=>{for(var n in t||(t={}))sV.call(t,n)&&Ab(e,n,t[n]);if(Ib)for(var n of Ib(t))iV.call(t,n)&&Ab(e,n,t[n]);return e};const aV=(e,t)=>{const n=a.useContext(F),r=Au(Au({},n),e);return a.createElement("svg",Au({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M6 12H12M18 12H12M12 12V6M12 12V18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},cV=a.forwardRef(aV);var lV=cV,uV=Object.defineProperty,_b=Object.getOwnPropertySymbols,dV=Object.prototype.hasOwnProperty,fV=Object.prototype.propertyIsEnumerable,Nb=(e,t,n)=>t in e?uV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_u=(e,t)=>{for(var n in t||(t={}))dV.call(t,n)&&Nb(e,n,t[n]);if(_b)for(var n of _b(t))fV.call(t,n)&&Nb(e,n,t[n]);return e};const pV=(e,t)=>{const n=a.useContext(F),r=_u(_u({},n),e);return a.createElement("svg",_u({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M6 19.0007C3.57111 17.1763 2 14.2716 2 11C2 5.47715 6.47715 1 12 1C17.5228 1 22 5.47715 22 11C22 14.2716 20.4289 17.1763 18 19.0007",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M6 19.0007C3.57111 17.1763 2 14.2716 2 11C2 5.47715 6.47715 1 12 1C17.5228 1 22 5.47715 22 11C22 14.2716 20.4289 17.1763 18 19.0007",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M7.52779 15C6.57771 13.9385 6 12.5367 6 11C6 7.68629 8.68629 5 12 5C15.3137 5 18 7.68629 18 11C18 12.5367 17.4223 13.9385 16.4722 15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 13C13.1046 13 14 12.1046 14 11C14 9.89543 13.1046 9 12 9C10.8954 9 10 9.89543 10 11C10 12.1046 10.8954 13 12 13Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M10.076 16.2827L10.8906 15.7396C11.5624 15.2917 12.4376 15.2917 13.1094 15.7396L13.924 16.2827C14.5789 16.7192 14.9168 17.4993 14.7874 18.2756L14.2785 21.3288C14.1178 22.2932 13.2834 23 12.3057 23H11.6943C10.7166 23 9.8822 22.2932 9.72147 21.3288L9.2126 18.2756C9.08321 17.4993 9.42114 16.7192 10.076 16.2827Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},mV=a.forwardRef(pV);var hV=mV,gV=Object.defineProperty,Db=Object.getOwnPropertySymbols,vV=Object.prototype.hasOwnProperty,bV=Object.prototype.propertyIsEnumerable,Vb=(e,t,n)=>t in e?gV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nu=(e,t)=>{for(var n in t||(t={}))vV.call(t,n)&&Vb(e,n,t[n]);if(Db)for(var n of Db(t))bV.call(t,n)&&Vb(e,n,t[n]);return e};const yV=(e,t)=>{const n=a.useContext(F),r=Nu(Nu({},n),e);return a.createElement("svg",Nu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M12 6L12 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 16L12 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M8 12H6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M18 12H16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},wV=a.forwardRef(yV);var xV=wV,CV=Object.defineProperty,zb=Object.getOwnPropertySymbols,kV=Object.prototype.hasOwnProperty,EV=Object.prototype.propertyIsEnumerable,Fb=(e,t,n)=>t in e?CV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Du=(e,t)=>{for(var n in t||(t={}))kV.call(t,n)&&Fb(e,n,t[n]);if(zb)for(var n of zb(t))EV.call(t,n)&&Fb(e,n,t[n]);return e};const SV=(e,t)=>{const n=a.useContext(F),r=Du(Du({},n),e);return a.createElement("svg",Du({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M4 20L9 15M9 15V19M9 15H5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M20 4L15 9M15 9V5M15 9H19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},$V=a.forwardRef(SV);var OV=$V,LV=Object.defineProperty,Bb=Object.getOwnPropertySymbols,jV=Object.prototype.hasOwnProperty,RV=Object.prototype.propertyIsEnumerable,Hb=(e,t,n)=>t in e?LV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vu=(e,t)=>{for(var n in t||(t={}))jV.call(t,n)&&Hb(e,n,t[n]);if(Bb)for(var n of Bb(t))RV.call(t,n)&&Hb(e,n,t[n]);return e};const PV=(e,t)=>{const n=a.useContext(F),r=Vu(Vu({},n),e);return a.createElement("svg",Vu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M21.1679 8C19.6247 4.46819 16.1006 2 11.9999 2C6.81459 2 2.55104 5.94668 2.04932 11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M17 8H21.4C21.7314 8 22 7.73137 22 7.4V3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M2.88146 16C4.42458 19.5318 7.94874 22 12.0494 22C17.2347 22 21.4983 18.0533 22 13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M7.04932 16H2.64932C2.31795 16 2.04932 16.2686 2.04932 16.6V21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},MV=a.forwardRef(PV);var lk=MV,TV=Object.defineProperty,Wb=Object.getOwnPropertySymbols,IV=Object.prototype.hasOwnProperty,AV=Object.prototype.propertyIsEnumerable,Zb=(e,t,n)=>t in e?TV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zu=(e,t)=>{for(var n in t||(t={}))IV.call(t,n)&&Zb(e,n,t[n]);if(Wb)for(var n of Wb(t))AV.call(t,n)&&Zb(e,n,t[n]);return e};const _V=(e,t)=>{const n=a.useContext(F),r=zu(zu({},n),e);return a.createElement("svg",zu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M17 17H8C6.33333 17 3 16 3 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M8 7H16C17.6667 7 21 8 21 12C21 13.4943 20.5348 14.57 19.865 15.3312",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M14.5 14.5L17 17L14.5 19.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M4 8V5V3L2 4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},NV=a.forwardRef(_V);var DV=NV,VV=Object.defineProperty,Ub=Object.getOwnPropertySymbols,zV=Object.prototype.hasOwnProperty,FV=Object.prototype.propertyIsEnumerable,Gb=(e,t,n)=>t in e?VV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fu=(e,t)=>{for(var n in t||(t={}))zV.call(t,n)&&Gb(e,n,t[n]);if(Ub)for(var n of Ub(t))FV.call(t,n)&&Gb(e,n,t[n]);return e};const BV=(e,t)=>{const n=a.useContext(F),r=Fu(Fu({},n),e);return a.createElement("svg",Fu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M17 17H8C6.33333 17 3 16 3 12C3 8 6.33333 7 8 7H16C17.6667 7 21 8 21 12C21 13.4943 20.5348 14.57 19.865 15.3312",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M14.5 14.5L17 17L14.5 19.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},HV=a.forwardRef(BV);var WV=HV,ZV=Object.defineProperty,Kb=Object.getOwnPropertySymbols,UV=Object.prototype.hasOwnProperty,GV=Object.prototype.propertyIsEnumerable,Yb=(e,t,n)=>t in e?ZV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bu=(e,t)=>{for(var n in t||(t={}))UV.call(t,n)&&Yb(e,n,t[n]);if(Kb)for(var n of Kb(t))GV.call(t,n)&&Yb(e,n,t[n]);return e};const KV=(e,t)=>{const n=a.useContext(F),r=Bu(Bu({},n),e);return a.createElement("svg",Bu({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M17 17L21 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M3 11C3 15.4183 6.58172 19 11 19C13.213 19 15.2161 18.1015 16.6644 16.6493C18.1077 15.2022 19 13.2053 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},YV=a.forwardRef(KV);var qV=YV,XV=Object.defineProperty,qb=Object.getOwnPropertySymbols,JV=Object.prototype.hasOwnProperty,QV=Object.prototype.propertyIsEnumerable,Xb=(e,t,n)=>t in e?XV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hu=(e,t)=>{for(var n in t||(t={}))JV.call(t,n)&&Xb(e,n,t[n]);if(qb)for(var n of qb(t))QV.call(t,n)&&Xb(e,n,t[n]);return e};const ez=(e,t)=>{const n=a.useContext(F),r=Hu(Hu({},n),e);return a.createElement("svg",Hu({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M22 12L3 20L6.5625 12L3 4L22 12Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M6.5 12L22 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},tz=a.forwardRef(ez);var nz=tz,rz=Object.defineProperty,Jb=Object.getOwnPropertySymbols,oz=Object.prototype.hasOwnProperty,sz=Object.prototype.propertyIsEnumerable,Qb=(e,t,n)=>t in e?rz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wu=(e,t)=>{for(var n in t||(t={}))oz.call(t,n)&&Qb(e,n,t[n]);if(Jb)for(var n of Jb(t))sz.call(t,n)&&Qb(e,n,t[n]);return e};const iz=(e,t)=>{const n=a.useContext(F),r=Wu(Wu({},n),e);return a.createElement("svg",Wu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M6 18.01L6.01 17.9989",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M6 6.01L6.01 5.99889",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M2 9.4V2.6C2 2.26863 2.26863 2 2.6 2H21.4C21.7314 2 22 2.26863 22 2.6V9.4C22 9.73137 21.7314 10 21.4 10H2.6C2.26863 10 2 9.73137 2 9.4Z",stroke:"currentColor"}),a.createElement("path",{d:"M2 21.4V14.6C2 14.2686 2.26863 14 2.6 14H21.4C21.7314 14 22 14.2686 22 14.6V21.4C22 21.7314 21.7314 22 21.4 22H2.6C2.26863 22 2 21.7314 2 21.4Z",stroke:"currentColor"}))},az=a.forwardRef(iz);var cz=az,lz=Object.defineProperty,e0=Object.getOwnPropertySymbols,uz=Object.prototype.hasOwnProperty,dz=Object.prototype.propertyIsEnumerable,t0=(e,t,n)=>t in e?lz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zu=(e,t)=>{for(var n in t||(t={}))uz.call(t,n)&&t0(e,n,t[n]);if(e0)for(var n of e0(t))dz.call(t,n)&&t0(e,n,t[n]);return e};const fz=(e,t)=>{const n=a.useContext(F),r=Zu(Zu({},n),e);return a.createElement("svg",Zu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M11.6065 2.34184C11.8322 2.14578 12.1678 2.14578 12.3935 2.34184L14.3418 4.03445C14.4646 4.14111 14.6254 4.19336 14.7874 4.17924L17.3586 3.9551C17.6564 3.92913 17.9279 4.1264 17.9953 4.41768L18.5766 6.93224C18.6133 7.09069 18.7126 7.22748 18.852 7.31129L21.0639 8.64123C21.3201 8.79529 21.4238 9.11447 21.307 9.3897L20.2994 11.7657C20.2359 11.9155 20.2359 12.0845 20.2994 12.2343L21.307 14.6103C21.4238 14.8855 21.3201 15.2047 21.0639 15.3588L18.852 16.6887C18.7126 16.7725 18.6133 16.9093 18.5766 17.0678L17.9953 19.5823C17.9279 19.8736 17.6564 20.0709 17.3586 20.0449L14.7874 19.8208C14.6254 19.8066 14.4646 19.8589 14.3418 19.9655L12.3935 21.6582C12.1678 21.8542 11.8322 21.8542 11.6065 21.6582L9.65816 19.9655C9.53539 19.8589 9.37458 19.8066 9.21256 19.8208L6.64142 20.0449C6.34359 20.0709 6.07208 19.8736 6.00474 19.5823L5.42338 17.0678C5.38675 16.9093 5.28736 16.7725 5.14798 16.6887L2.93615 15.3588C2.67993 15.2047 2.57622 14.8855 2.69295 14.6103L3.70065 12.2343C3.76414 12.0845 3.76414 11.9155 3.70065 11.7657L2.69295 9.3897C2.57622 9.11447 2.67993 8.79529 2.93615 8.64123L5.14798 7.31129C5.28736 7.22748 5.38675 7.09069 5.42338 6.93224L6.00474 4.41768C6.07208 4.1264 6.34359 3.92913 6.64142 3.9551L9.21256 4.17924C9.37458 4.19336 9.53539 4.14111 9.65816 4.03445L11.6065 2.34184Z",stroke:"currentColor"}),a.createElement("path",{d:"M9 13L11 15L16 10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},pz=a.forwardRef(fz);var mz=pz,hz=Object.defineProperty,n0=Object.getOwnPropertySymbols,gz=Object.prototype.hasOwnProperty,vz=Object.prototype.propertyIsEnumerable,r0=(e,t,n)=>t in e?hz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Uu=(e,t)=>{for(var n in t||(t={}))gz.call(t,n)&&r0(e,n,t[n]);if(n0)for(var n of n0(t))vz.call(t,n)&&r0(e,n,t[n]);return e};const bz=(e,t)=>{const n=a.useContext(F),r=Uu(Uu({},n),e);return a.createElement("svg",Uu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M19.6224 10.3954L18.5247 7.7448L20 6L18 4L16.2647 5.48295L13.5578 4.36974L12.9353 2H10.981L10.3491 4.40113L7.70441 5.51596L6 4L4 6L5.45337 7.78885L4.3725 10.4463L2 11V13L4.40111 13.6555L5.51575 16.2997L4 18L6 20L7.79116 18.5403L10.397 19.6123L11 22H13L13.6045 19.6132L16.2551 18.5155C16.6969 18.8313 18 20 18 20L20 18L18.5159 16.2494L19.6139 13.598L21.9999 12.9772L22 11L19.6224 10.3954Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},yz=a.forwardRef(bz);var wz=yz,xz=Object.defineProperty,o0=Object.getOwnPropertySymbols,Cz=Object.prototype.hasOwnProperty,kz=Object.prototype.propertyIsEnumerable,s0=(e,t,n)=>t in e?xz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gu=(e,t)=>{for(var n in t||(t={}))Cz.call(t,n)&&s0(e,n,t[n]);if(o0)for(var n of o0(t))kz.call(t,n)&&s0(e,n,t[n]);return e};const Ez=(e,t)=>{const n=a.useContext(F),r=Gu(Gu({},n),e);return a.createElement("svg",Gu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M18 22C19.6569 22 21 20.6569 21 19C21 17.3431 19.6569 16 18 16C16.3431 16 15 17.3431 15 19C15 20.6569 16.3431 22 18 22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M18 8C19.6569 8 21 6.65685 21 5C21 3.34315 19.6569 2 18 2C16.3431 2 15 3.34315 15 5C15 6.65685 16.3431 8 18 8Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M6 15C7.65685 15 9 13.6569 9 12C9 10.3431 7.65685 9 6 9C4.34315 9 3 10.3431 3 12C3 13.6569 4.34315 15 6 15Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M15.5 6.5L8.5 10.5",stroke:"currentColor"}),a.createElement("path",{d:"M8.5 13.5L15.5 17.5",stroke:"currentColor"}))},Sz=a.forwardRef(Ez);var $z=Sz,Oz=Object.defineProperty,i0=Object.getOwnPropertySymbols,Lz=Object.prototype.hasOwnProperty,jz=Object.prototype.propertyIsEnumerable,a0=(e,t,n)=>t in e?Oz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ku=(e,t)=>{for(var n in t||(t={}))Lz.call(t,n)&&a0(e,n,t[n]);if(i0)for(var n of i0(t))jz.call(t,n)&&a0(e,n,t[n]);return e};const Rz=(e,t)=>{const n=a.useContext(F),r=Ku(Ku({},n),e);return a.createElement("svg",Ku({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M8.5 11.5L11.5 14.5L16.5 9.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M5 18L3.13036 4.91253C3.05646 4.39524 3.39389 3.91247 3.90398 3.79912L11.5661 2.09641C11.8519 2.03291 12.1481 2.03291 12.4339 2.09641L20.096 3.79912C20.6061 3.91247 20.9435 4.39524 20.8696 4.91252L19 18C18.9293 18.495 18.5 21.5 12 21.5C5.5 21.5 5.07071 18.495 5 18Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},Pz=a.forwardRef(Rz);var Mz=Pz,Tz=Object.defineProperty,c0=Object.getOwnPropertySymbols,Iz=Object.prototype.hasOwnProperty,Az=Object.prototype.propertyIsEnumerable,l0=(e,t,n)=>t in e?Tz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yu=(e,t)=>{for(var n in t||(t={}))Iz.call(t,n)&&l0(e,n,t[n]);if(c0)for(var n of c0(t))Az.call(t,n)&&l0(e,n,t[n]);return e};const _z=(e,t)=>{const n=a.useContext(F),r=Yu(Yu({},n),e);return a.createElement("svg",Yu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M22 6.99999C19 6.99999 13.5 6.99999 11.5 12.5C9.5 18 5 18 2 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M20 5C20 5 21.219 6.21895 22 7C21.219 7.78105 20 9 20 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M22 18C19 18 13.5 18 11.5 12.5C9.5 6.99999 5 7.00001 2 7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M20 20C20 20 21.219 18.781 22 18C21.219 17.219 20 16 20 16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},Nz=a.forwardRef(_z);var Dz=Nz,Vz=Object.defineProperty,u0=Object.getOwnPropertySymbols,zz=Object.prototype.hasOwnProperty,Fz=Object.prototype.propertyIsEnumerable,d0=(e,t,n)=>t in e?Vz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qu=(e,t)=>{for(var n in t||(t={}))zz.call(t,n)&&d0(e,n,t[n]);if(u0)for(var n of u0(t))Fz.call(t,n)&&d0(e,n,t[n]);return e};const Bz=(e,t)=>{const n=a.useContext(F),r=qu(qu({},n),e);return a.createElement("svg",qu({width:"1.5em",strokeWidth:1.5,height:"1.5em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M19 21L5 21C3.89543 21 3 20.1046 3 19L3 5C3 3.89543 3.89543 3 5 3L19 3C20.1046 3 21 3.89543 21 5L21 19C21 20.1046 20.1046 21 19 21Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M7.25 10L5.5 12L7.25 14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M9.5 21V3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},Hz=a.forwardRef(Bz);var uk=Hz,Wz=Object.defineProperty,f0=Object.getOwnPropertySymbols,Zz=Object.prototype.hasOwnProperty,Uz=Object.prototype.propertyIsEnumerable,p0=(e,t,n)=>t in e?Wz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xu=(e,t)=>{for(var n in t||(t={}))Zz.call(t,n)&&p0(e,n,t[n]);if(f0)for(var n of f0(t))Uz.call(t,n)&&p0(e,n,t[n]);return e};const Gz=(e,t)=>{const n=a.useContext(F),r=Xu(Xu({},n),e);return a.createElement("svg",Xu({width:"1.5em",strokeWidth:1.5,height:"1.5em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M19 21L5 21C3.89543 21 3 20.1046 3 19L3 5C3 3.89543 3.89543 3 5 3L19 3C20.1046 3 21 3.89543 21 5L21 19C21 20.1046 20.1046 21 19 21Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M9.5 21V3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M5.5 10L7.25 12L5.5 14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},Kz=a.forwardRef(Gz);var Gp=Kz,Yz=Object.defineProperty,m0=Object.getOwnPropertySymbols,qz=Object.prototype.hasOwnProperty,Xz=Object.prototype.propertyIsEnumerable,h0=(e,t,n)=>t in e?Yz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ju=(e,t)=>{for(var n in t||(t={}))qz.call(t,n)&&h0(e,n,t[n]);if(m0)for(var n of m0(t))Xz.call(t,n)&&h0(e,n,t[n]);return e};const Jz=(e,t)=>{const n=a.useContext(F),r=Ju(Ju({},n),e);return a.createElement("svg",Ju({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M18 7V17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M6.97179 5.2672C6.57832 4.95657 6 5.23682 6 5.73813V18.2619C6 18.7632 6.57832 19.0434 6.97179 18.7328L14.9035 12.4709C15.2078 12.2307 15.2078 11.7693 14.9035 11.5291L6.97179 5.2672Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},Qz=a.forwardRef(Jz);var eF=Qz,tF=Object.defineProperty,g0=Object.getOwnPropertySymbols,nF=Object.prototype.hasOwnProperty,rF=Object.prototype.propertyIsEnumerable,v0=(e,t,n)=>t in e?tF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qu=(e,t)=>{for(var n in t||(t={}))nF.call(t,n)&&v0(e,n,t[n]);if(g0)for(var n of g0(t))rF.call(t,n)&&v0(e,n,t[n]);return e};const oF=(e,t)=>{const n=a.useContext(F),r=Qu(Qu({},n),e);return a.createElement("svg",Qu({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M6 7V17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M17.0282 5.2672C17.4217 4.95657 18 5.23682 18 5.73813V18.2619C18 18.7632 17.4217 19.0434 17.0282 18.7328L9.09651 12.4709C8.79223 12.2307 8.79223 11.7693 9.09651 11.5291L17.0282 5.2672Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},sF=a.forwardRef(oF);var iF=sF,aF=Object.defineProperty,b0=Object.getOwnPropertySymbols,cF=Object.prototype.hasOwnProperty,lF=Object.prototype.propertyIsEnumerable,y0=(e,t,n)=>t in e?aF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ed=(e,t)=>{for(var n in t||(t={}))cF.call(t,n)&&y0(e,n,t[n]);if(b0)for(var n of b0(t))lF.call(t,n)&&y0(e,n,t[n]);return e};const uF=(e,t)=>{const n=a.useContext(F),r=ed(ed({},n),e);return a.createElement("svg",ed({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M1 13.8571V10.1429C1 9.03829 1.89543 8.14286 3 8.14286H5.9C6.09569 8.14286 6.28708 8.08544 6.45046 7.97772L12.4495 4.02228C13.1144 3.5839 14 4.06075 14 4.85714V19.1429C14 19.9392 13.1144 20.4161 12.4495 19.9777L6.45046 16.0223C6.28708 15.9146 6.09569 15.8571 5.9 15.8571H3C1.89543 15.8571 1 14.9617 1 13.8571Z",stroke:"currentColor"}),a.createElement("path",{d:"M17.5 7.5C17.5 7.5 19 9 19 11.5C19 14 17.5 15.5 17.5 15.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M20.5 4.5C20.5 4.5 23 7 23 11.5C23 16 20.5 18.5 20.5 18.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},dF=a.forwardRef(uF);var dk=dF,fF=Object.defineProperty,w0=Object.getOwnPropertySymbols,pF=Object.prototype.hasOwnProperty,mF=Object.prototype.propertyIsEnumerable,x0=(e,t,n)=>t in e?fF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,td=(e,t)=>{for(var n in t||(t={}))pF.call(t,n)&&x0(e,n,t[n]);if(w0)for(var n of w0(t))mF.call(t,n)&&x0(e,n,t[n]);return e};const hF=(e,t)=>{const n=a.useContext(F),r=td(td({},n),e);return a.createElement("svg",td({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M19.5 7.5C19.5 7.5 21 9 21 11.5C21 14 19.5 15.5 19.5 15.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M2 13.8571V10.1429C2 9.03829 2.89543 8.14286 4 8.14286H6.9C7.09569 8.14286 7.28708 8.08544 7.45046 7.97772L13.4495 4.02228C14.1144 3.5839 15 4.06075 15 4.85714V19.1429C15 19.9392 14.1144 20.4161 13.4495 19.9777L7.45046 16.0223C7.28708 15.9146 7.09569 15.8571 6.9 15.8571H4C2.89543 15.8571 2 14.9617 2 13.8571Z",stroke:"currentColor"}))},gF=a.forwardRef(hF);var vF=gF,bF=Object.defineProperty,C0=Object.getOwnPropertySymbols,yF=Object.prototype.hasOwnProperty,wF=Object.prototype.propertyIsEnumerable,k0=(e,t,n)=>t in e?bF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nd=(e,t)=>{for(var n in t||(t={}))yF.call(t,n)&&k0(e,n,t[n]);if(C0)for(var n of C0(t))wF.call(t,n)&&k0(e,n,t[n]);return e};const xF=(e,t)=>{const n=a.useContext(F),r=nd(nd({},n),e);return a.createElement("svg",nd({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M18 14L20.0005 12M22 10L20.0005 12M20.0005 12L18 10M20.0005 12L22 14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M2 13.8571V10.1429C2 9.03829 2.89543 8.14286 4 8.14286H6.9C7.09569 8.14286 7.28708 8.08544 7.45046 7.97772L13.4495 4.02228C14.1144 3.5839 15 4.06075 15 4.85714V19.1429C15 19.9392 14.1144 20.4161 13.4495 19.9777L7.45046 16.0223C7.28708 15.9146 7.09569 15.8571 6.9 15.8571H4C2.89543 15.8571 2 14.9617 2 13.8571Z",stroke:"currentColor"}))},CF=a.forwardRef(xF);var kF=CF,EF=Object.defineProperty,E0=Object.getOwnPropertySymbols,SF=Object.prototype.hasOwnProperty,$F=Object.prototype.propertyIsEnumerable,S0=(e,t,n)=>t in e?EF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rd=(e,t)=>{for(var n in t||(t={}))SF.call(t,n)&&S0(e,n,t[n]);if(E0)for(var n of E0(t))$F.call(t,n)&&S0(e,n,t[n]);return e};const OF=(e,t)=>{const n=a.useContext(F),r=rd(rd({},n),e);return a.createElement("svg",rd({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M8 15C12.8747 15 15 12.949 15 8C15 12.949 17.1104 15 22 15C17.1104 15 15 17.1104 15 22C15 17.1104 12.8747 15 8 15Z",stroke:"currentColor",strokeLinejoin:"round"}),a.createElement("path",{d:"M2 6.5C5.13376 6.5 6.5 5.18153 6.5 2C6.5 5.18153 7.85669 6.5 11 6.5C7.85669 6.5 6.5 7.85669 6.5 11C6.5 7.85669 5.13376 6.5 2 6.5Z",stroke:"currentColor",strokeLinejoin:"round"}))},LF=a.forwardRef(OF);var jF=LF,RF=Object.defineProperty,$0=Object.getOwnPropertySymbols,PF=Object.prototype.hasOwnProperty,MF=Object.prototype.propertyIsEnumerable,O0=(e,t,n)=>t in e?RF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,od=(e,t)=>{for(var n in t||(t={}))PF.call(t,n)&&O0(e,n,t[n]);if($0)for(var n of $0(t))MF.call(t,n)&&O0(e,n,t[n]);return e};const TF=(e,t)=>{const n=a.useContext(F),r=od(od({},n),e);return a.createElement("svg",od({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M21 3.6V20.4C21 20.7314 20.7314 21 20.4 21H3.6C3.26863 21 3 20.7314 3 20.4V3.6C3 3.26863 3.26863 3 3.6 3H20.4C20.7314 3 21 3.26863 21 3.6Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},IF=a.forwardRef(TF);var AF=IF,_F=Object.defineProperty,L0=Object.getOwnPropertySymbols,NF=Object.prototype.hasOwnProperty,DF=Object.prototype.propertyIsEnumerable,j0=(e,t,n)=>t in e?_F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sd=(e,t)=>{for(var n in t||(t={}))NF.call(t,n)&&j0(e,n,t[n]);if(L0)for(var n of L0(t))DF.call(t,n)&&j0(e,n,t[n]);return e};const VF=(e,t)=>{const n=a.useContext(F),r=sd(sd({},n),e);return a.createElement("svg",sd({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M7 13C7.55228 13 8 12.5523 8 12C8 11.4477 7.55228 11 7 11C6.44772 11 6 11.4477 6 12C6 12.5523 6.44772 13 7 13Z",fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M17 17H7C4.23858 17 2 14.7614 2 12C2 9.23858 4.23858 7 7 7H17C19.7614 7 22 9.23858 22 12C22 14.7614 19.7614 17 17 17Z",stroke:"currentColor"}))},zF=a.forwardRef(VF);var FF=zF,BF=Object.defineProperty,R0=Object.getOwnPropertySymbols,HF=Object.prototype.hasOwnProperty,WF=Object.prototype.propertyIsEnumerable,P0=(e,t,n)=>t in e?BF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,id=(e,t)=>{for(var n in t||(t={}))HF.call(t,n)&&P0(e,n,t[n]);if(R0)for(var n of R0(t))WF.call(t,n)&&P0(e,n,t[n]);return e};const ZF=(e,t)=>{const n=a.useContext(F),r=id(id({},n),e);return a.createElement("svg",id({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M17 13C17.5523 13 18 12.5523 18 12C18 11.4477 17.5523 11 17 11C16.4477 11 16 11.4477 16 12C16 12.5523 16.4477 13 17 13Z",fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M17 17H7C4.23858 17 2 14.7614 2 12C2 9.23858 4.23858 7 7 7H17C19.7614 7 22 9.23858 22 12C22 14.7614 19.7614 17 17 17Z",stroke:"currentColor"}))},UF=a.forwardRef(ZF);var GF=UF,KF=Object.defineProperty,M0=Object.getOwnPropertySymbols,YF=Object.prototype.hasOwnProperty,qF=Object.prototype.propertyIsEnumerable,T0=(e,t,n)=>t in e?KF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ad=(e,t)=>{for(var n in t||(t={}))YF.call(t,n)&&T0(e,n,t[n]);if(M0)for(var n of M0(t))qF.call(t,n)&&T0(e,n,t[n]);return e};const XF=(e,t)=>{const n=a.useContext(F),r=ad(ad({},n),e);return a.createElement("svg",ad({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M12 7V17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},JF=a.forwardRef(XF);var QF=JF,eB=Object.defineProperty,I0=Object.getOwnPropertySymbols,tB=Object.prototype.hasOwnProperty,nB=Object.prototype.propertyIsEnumerable,A0=(e,t,n)=>t in e?eB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cd=(e,t)=>{for(var n in t||(t={}))tB.call(t,n)&&A0(e,n,t[n]);if(I0)for(var n of I0(t))nB.call(t,n)&&A0(e,n,t[n]);return e};const rB=(e,t)=>{const n=a.useContext(F),r=cd(cd({},n),e);return a.createElement("svg",cd({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M3 12H7.5H12H16.5H21M3 12V16.5M3 12V7.5M21 12V16.5M21 12V7.5M3 16.5V20.4C3 20.7314 3.26863 21 3.6 21H7.5H12H16.5H20.4C20.7314 21 21 20.7314 21 20.4V16.5M3 16.5H7.5H12H16.5H21M21 7.5V3.6C21 3.26863 20.7314 3 20.4 3H16.5H12H7.5H3.6C3.26863 3 3 3.26863 3 3.6V7.5M21 7.5H16.5H12H7.5H3",stroke:"currentColor"}))},oB=a.forwardRef(rB);var sB=oB,iB=Object.defineProperty,_0=Object.getOwnPropertySymbols,aB=Object.prototype.hasOwnProperty,cB=Object.prototype.propertyIsEnumerable,N0=(e,t,n)=>t in e?iB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ld=(e,t)=>{for(var n in t||(t={}))aB.call(t,n)&&N0(e,n,t[n]);if(_0)for(var n of _0(t))cB.call(t,n)&&N0(e,n,t[n]);return e};const lB=(e,t)=>{const n=a.useContext(F),r=ld(ld({},n),e);return a.createElement("svg",ld({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M13 16H18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M6 8L10 12L6 16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M2 18V6C2 4.89543 2.89543 4 4 4H20C21.1046 4 22 4.89543 22 6V18C22 19.1046 21.1046 20 20 20H4C2.89543 20 2 19.1046 2 18Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},uB=a.forwardRef(lB);var dB=uB,fB=Object.defineProperty,D0=Object.getOwnPropertySymbols,pB=Object.prototype.hasOwnProperty,mB=Object.prototype.propertyIsEnumerable,V0=(e,t,n)=>t in e?fB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ud=(e,t)=>{for(var n in t||(t={}))pB.call(t,n)&&V0(e,n,t[n]);if(D0)for(var n of D0(t))mB.call(t,n)&&V0(e,n,t[n]);return e};const hB=(e,t)=>{const n=a.useContext(F),r=ud(ud({},n),e);return a.createElement("svg",ud({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M13 17H20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M5 7L10 12L5 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},gB=a.forwardRef(hB);var vB=gB,bB=Object.defineProperty,z0=Object.getOwnPropertySymbols,yB=Object.prototype.hasOwnProperty,wB=Object.prototype.propertyIsEnumerable,F0=(e,t,n)=>t in e?bB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dd=(e,t)=>{for(var n in t||(t={}))yB.call(t,n)&&F0(e,n,t[n]);if(z0)for(var n of z0(t))wB.call(t,n)&&F0(e,n,t[n]);return e};const xB=(e,t)=>{const n=a.useContext(F),r=dd(dd({},n),e);return a.createElement("svg",dd({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M19 7V5L5 5V7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 5L12 19M12 19H10M12 19H14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},CB=a.forwardRef(xB);var kB=CB,EB=Object.defineProperty,B0=Object.getOwnPropertySymbols,SB=Object.prototype.hasOwnProperty,$B=Object.prototype.propertyIsEnumerable,H0=(e,t,n)=>t in e?EB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fd=(e,t)=>{for(var n in t||(t={}))SB.call(t,n)&&H0(e,n,t[n]);if(B0)for(var n of B0(t))$B.call(t,n)&&H0(e,n,t[n]);return e};const OB=(e,t)=>{const n=a.useContext(F),r=fd(fd({},n),e);return a.createElement("svg",fd({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M20 9L18.005 20.3463C17.8369 21.3026 17.0062 22 16.0353 22H7.96474C6.99379 22 6.1631 21.3026 5.99496 20.3463L4 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M21 6L15.375 6M3 6L8.625 6M8.625 6V4C8.625 2.89543 9.52043 2 10.625 2H13.375C14.4796 2 15.375 2.89543 15.375 4V6M8.625 6L15.375 6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},LB=a.forwardRef(OB);var jB=LB,RB=Object.defineProperty,W0=Object.getOwnPropertySymbols,PB=Object.prototype.hasOwnProperty,MB=Object.prototype.propertyIsEnumerable,Z0=(e,t,n)=>t in e?RB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pd=(e,t)=>{for(var n in t||(t={}))PB.call(t,n)&&Z0(e,n,t[n]);if(W0)for(var n of W0(t))MB.call(t,n)&&Z0(e,n,t[n]);return e};const TB=(e,t)=>{const n=a.useContext(F),r=pd(pd({},n),e);return a.createElement("svg",pd({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M7 16.2485C7 16.0894 6.93679 15.9368 6.82426 15.8243L3.17574 12.1757C3.06321 12.0632 3 11.9106 3 11.7515V4C3 2.89543 3.89543 2 5 2H12H19C20.1046 2 21 2.89543 21 4V11.7515C21 11.9106 20.9368 12.0632 20.8243 12.1757L17.1757 15.8243C17.0632 15.9368 17 16.0894 17 16.2485V20C17 21.1046 16.1046 22 15 22H9C7.89543 22 7 21.1046 7 20V16.2485Z",stroke:"currentColor"}),a.createElement("path",{d:"M9.5 11.5L10 10.4M14.5 11.5L14 10.4M14 10.4L12 6L10 10.4M14 10.4H10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},IB=a.forwardRef(TB);var fk=IB,AB=Object.defineProperty,U0=Object.getOwnPropertySymbols,_B=Object.prototype.hasOwnProperty,NB=Object.prototype.propertyIsEnumerable,G0=(e,t,n)=>t in e?AB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,md=(e,t)=>{for(var n in t||(t={}))_B.call(t,n)&&G0(e,n,t[n]);if(U0)for(var n of U0(t))NB.call(t,n)&&G0(e,n,t[n]);return e};const DB=(e,t)=>{const n=a.useContext(F),r=md(md({},n),e);return a.createElement("svg",md({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M4.5 8C8.5 8 11 8 15 8C15 8 15 8 15 8C15 8 20 8 20 12.7059C20 18 15 18 15 18C11.5714 18 9.71429 18 6.28571 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M7.5 11.5C6.13317 10.1332 5.36683 9.36683 4 8C5.36683 6.63317 6.13317 5.86683 7.5 4.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},VB=a.forwardRef(DB);var zB=VB,FB=Object.defineProperty,K0=Object.getOwnPropertySymbols,BB=Object.prototype.hasOwnProperty,HB=Object.prototype.propertyIsEnumerable,Y0=(e,t,n)=>t in e?FB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hd=(e,t)=>{for(var n in t||(t={}))BB.call(t,n)&&Y0(e,n,t[n]);if(K0)for(var n of K0(t))HB.call(t,n)&&Y0(e,n,t[n]);return e};const WB=(e,t)=>{const n=a.useContext(F),r=hd(hd({},n),e);return a.createElement("svg",hd({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M6 20L18 20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 16V4M12 4L15.5 7.5M12 4L8.5 7.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},ZB=a.forwardRef(WB);var UB=ZB,GB=Object.defineProperty,q0=Object.getOwnPropertySymbols,KB=Object.prototype.hasOwnProperty,YB=Object.prototype.propertyIsEnumerable,X0=(e,t,n)=>t in e?GB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gd=(e,t)=>{for(var n in t||(t={}))KB.call(t,n)&&X0(e,n,t[n]);if(q0)for(var n of q0(t))YB.call(t,n)&&X0(e,n,t[n]);return e};const qB=(e,t)=>{const n=a.useContext(F),r=gd(gd({},n),e);return a.createElement("svg",gd({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M12 3H20.4C20.7314 3 21 3.26863 21 3.6V20.4C21 20.7314 20.7314 21 20.4 21H12M12 3H3.6C3.26863 3 3 3.26863 3 3.6V20.4C3 20.7314 3.26863 21 3.6 21H12M12 3V21",stroke:"currentColor"}))},XB=a.forwardRef(qB);var JB=XB,QB=Object.defineProperty,J0=Object.getOwnPropertySymbols,eH=Object.prototype.hasOwnProperty,tH=Object.prototype.propertyIsEnumerable,Q0=(e,t,n)=>t in e?QB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vd=(e,t)=>{for(var n in t||(t={}))eH.call(t,n)&&Q0(e,n,t[n]);if(J0)for(var n of J0(t))tH.call(t,n)&&Q0(e,n,t[n]);return e};const nH=(e,t)=>{const n=a.useContext(F),r=vd(vd({},n),e);return a.createElement("svg",vd({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M14 20.4V14.6C14 14.2686 14.2686 14 14.6 14H20.4C20.7314 14 21 14.2686 21 14.6V20.4C21 20.7314 20.7314 21 20.4 21H14.6C14.2686 21 14 20.7314 14 20.4Z",stroke:"currentColor"}),a.createElement("path",{d:"M3 20.4V14.6C3 14.2686 3.26863 14 3.6 14H9.4C9.73137 14 10 14.2686 10 14.6V20.4C10 20.7314 9.73137 21 9.4 21H3.6C3.26863 21 3 20.7314 3 20.4Z",stroke:"currentColor"}),a.createElement("path",{d:"M14 9.4V3.6C14 3.26863 14.2686 3 14.6 3H20.4C20.7314 3 21 3.26863 21 3.6V9.4C21 9.73137 20.7314 10 20.4 10H14.6C14.2686 10 14 9.73137 14 9.4Z",stroke:"currentColor"}),a.createElement("path",{d:"M3 9.4V3.6C3 3.26863 3.26863 3 3.6 3H9.4C9.73137 3 10 3.26863 10 3.6V9.4C10 9.73137 9.73137 10 9.4 10H3.6C3.26863 10 3 9.73137 3 9.4Z",stroke:"currentColor"}))},rH=a.forwardRef(nH);var ac=rH,oH=Object.defineProperty,ey=Object.getOwnPropertySymbols,sH=Object.prototype.hasOwnProperty,iH=Object.prototype.propertyIsEnumerable,ty=(e,t,n)=>t in e?oH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bd=(e,t)=>{for(var n in t||(t={}))sH.call(t,n)&&ty(e,n,t[n]);if(ey)for(var n of ey(t))iH.call(t,n)&&ty(e,n,t[n]);return e};const aH=(e,t)=>{const n=a.useContext(F),r=bd(bd({},n),e);return a.createElement("svg",bd({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M12 7L12 13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 17.01L12.01 16.9989",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},cH=a.forwardRef(aH);var lH=cH,uH=Object.defineProperty,ny=Object.getOwnPropertySymbols,dH=Object.prototype.hasOwnProperty,fH=Object.prototype.propertyIsEnumerable,ry=(e,t,n)=>t in e?uH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yd=(e,t)=>{for(var n in t||(t={}))dH.call(t,n)&&ry(e,n,t[n]);if(ny)for(var n of ny(t))fH.call(t,n)&&ry(e,n,t[n]);return e};const pH=(e,t)=>{const n=a.useContext(F),r=yd(yd({},n),e);return a.createElement("svg",yd({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M20.0429 21H3.95705C2.41902 21 1.45658 19.3364 2.22324 18.0031L10.2662 4.01533C11.0352 2.67792 12.9648 2.67791 13.7338 4.01532L21.7768 18.0031C22.5434 19.3364 21.581 21 20.0429 21Z",stroke:"currentColor",strokeLinecap:"round"}),a.createElement("path",{d:"M12 9V13",stroke:"currentColor",strokeLinecap:"round"}),a.createElement("path",{d:"M12 17.01L12.01 16.9989",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},mH=a.forwardRef(pH);var hH=mH,gH=Object.defineProperty,oy=Object.getOwnPropertySymbols,vH=Object.prototype.hasOwnProperty,bH=Object.prototype.propertyIsEnumerable,sy=(e,t,n)=>t in e?gH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wd=(e,t)=>{for(var n in t||(t={}))vH.call(t,n)&&sy(e,n,t[n]);if(oy)for(var n of oy(t))bH.call(t,n)&&sy(e,n,t[n]);return e};const yH=(e,t)=>{const n=a.useContext(F),r=wd(wd({},n),e);return a.createElement("svg",wd({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M10.0503 10.6066L2.97923 17.6777C2.19818 18.4587 2.19818 19.725 2.97923 20.5061V20.5061C3.76027 21.2871 5.0266 21.2871 5.80765 20.5061L12.8787 13.435",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M10.0502 10.6066C9.20638 8.45358 9.37134 5.6286 11.1109 3.88909C12.8504 2.14957 16.0606 1.76777 17.8284 2.82843L14.7877 5.8691L14.5051 8.98014L17.6161 8.69753L20.6568 5.65685C21.7175 7.42462 21.3357 10.6349 19.5961 12.3744C17.8566 14.1139 15.0316 14.2789 12.8786 13.435",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},wH=a.forwardRef(yH);var xH=wH,CH=Object.defineProperty,iy=Object.getOwnPropertySymbols,kH=Object.prototype.hasOwnProperty,EH=Object.prototype.propertyIsEnumerable,ay=(e,t,n)=>t in e?CH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xd=(e,t)=>{for(var n in t||(t={}))kH.call(t,n)&&ay(e,n,t[n]);if(iy)for(var n of iy(t))EH.call(t,n)&&ay(e,n,t[n]);return e};const SH=(e,t)=>{const n=a.useContext(F),r=xd(xd({},n),e);return a.createElement("svg",xd({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M16.8198 20.7684L3.75317 3.96836C3.44664 3.57425 3.72749 3 4.22678 3H6.70655C6.8917 3 7.06649 3.08548 7.18016 3.23164L20.2468 20.0316C20.5534 20.4258 20.2725 21 19.7732 21H17.2935C17.1083 21 16.9335 20.9145 16.8198 20.7684Z",stroke:"currentColor"}),a.createElement("path",{d:"M20 3L4 21",stroke:"currentColor",strokeLinecap:"round"}))},$H=a.forwardRef(SH);var OH=$H,LH=Object.defineProperty,cy=Object.getOwnPropertySymbols,jH=Object.prototype.hasOwnProperty,RH=Object.prototype.propertyIsEnumerable,ly=(e,t,n)=>t in e?LH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cd=(e,t)=>{for(var n in t||(t={}))jH.call(t,n)&&ly(e,n,t[n]);if(cy)for(var n of cy(t))RH.call(t,n)&&ly(e,n,t[n]);return e};const PH=(e,t)=>{const n=a.useContext(F),r=Cd(Cd({},n),e);return a.createElement("svg",Cd({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},r),a.createElement("path",{d:"M9.17218 14.8284L12.0006 12M14.829 9.17157L12.0006 12M12.0006 12L9.17218 9.17157M12.0006 12L14.829 14.8284",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},MH=a.forwardRef(PH);var TH=MH;function D(e,t,n={}){const r=a.forwardRef(function({size:s=24,width:i,height:c,strokeWidth:u=1.5,absoluteStrokeWidth:l=!1,style:d,...f},p){const m=l&&typeof s=="number"&&typeof u=="number"?u*24/s:u,g=n.mirror?{...d,transform:`scaleX(-1) ${d?.transform??""}`.trim()}:d;return h.jsx(e,{...f,ref:p,width:i??s,height:c??s,strokeWidth:m,style:g})});return r.displayName=t,r}D(SP,"Activity");const IH=D(lH,"AlertCircle");D(hH,"AlertTriangle");D(NP,"AppWindow");const AH=D(HP,"ArrowDown");D(YP,"ArrowRight");const _H=D(pM,"ArrowUp"),NH=D(GT,"ArrowUpDown");D(dk,"AudioLines");D(ak,"BookOpen");D(ak,"BookOpenText");D(NM,"Bot");D(PM,"Boxes");D(eT,"Braces");D(ek,"Brackets");D(HM,"Brain");D(t7,"Camera");D(YM,"Cable");D(y7,"Check");D(p7,"CheckCircle2");D(fN,"ChevronDown");D(bN,"ChevronRight");D(aM,"ChevronsDownUp");D(tM,"ChevronsUpDown");D(EN,"ChevronUp");D(S7,"Circle");D(AN,"CircleDot");D(xD,"Clipboard");const DH=D(N7,"Clock");D(H7,"Cloud");D(iT,"Code2");D(JB,"Columns2");D(CA,"Command");D(fT,"Compass");D(jT,"Copy");D(Y_,"CopyPlus");const VH=D(AT,"CornerDownLeft");D(xV,"Crosshair");D(QT,"Database");D(k8,"Download");D(UN,"ExternalLink");D(oI,"Eye");D(J8,"EyeOff");D(ek,"FileCode2");D(UI,"FileDiff");D(uD,"FileText");D(H_,"Film");D(LI,"Focus");D(CI,"Folder");D(II,"FrameIcon");D(zI,"GitBranchPlus");D(Up,"GripVertical");D(Up,"GripHorizontal");D(JI,"Globe");D(j8,"Hand");D(oA,"Hash");D(P7,"History");D(uA,"Home");D(ok,"ImageIcon");D(ok,"Image");D(v8,"Inbox");D(gA,"Info");D(fk,"Keyboard");D(sk,"Layers");D(sk,"Layers3");D(ac,"LayoutGrid");D(ac,"Grid3X3");D(nk,"LayoutList");D(ac,"LayoutTemplate");D(SM,"Library");D(IA,"Link2");D(nk,"List");D(rV,"ListMusic");const uy=D(lk,"Loader2");D(lk,"LoaderCircle");D(rk,"Lock");D(rk,"LockKeyhole");const zH=D(n_,"Map");D(c_,"Maximize");const FH=D(U8,"Maximize2");D(a7,"MessageSquare");const BH=D(S_,"Mic"),HH=D(OV,"Minimize2"),WH=D(P_,"Minus");D(FT,"MousePointer2");D(bT,"Monitor");D(N_,"MoreHorizontal");D(Up,"Move");D(iN,"Music2");D(ik,"Network");D(Gp,"PanelLeft");const ZH=D(uk,"PanelLeftClose"),UH=D(Gp,"PanelLeftOpen");D(JN,"PanelBottom");const GH=D(uk,"PanelRightClose",{mirror:!0}),KH=D(Gp,"PanelRightOpen",{mirror:!0});D(oD,"PanelTop");D(ac,"PanelsTopLeft");D(s8,"Paintbrush");D(ck,"Palette");const YH=D(yM,"Paperclip");D(TD,"Pause");D(z8,"Pencil");D(y_,"PictureInPicture2");D(ZD,"Pin");D(VD,"PinOff");D(XD,"Play");const qH=D(lV,"Plus");D(QF,"Power");D(PP,"Radar");D(hV,"Radio");D(WV,"Repeat");D(DV,"Repeat1");D(zB,"RotateCcw");D(sB,"Rows3");D(gI,"Save");D(d8,"ScanSearch");const pk=D(qV,"Search");D(nz,"Send");D(cz,"Server");D(wz,"Settings");D(mz,"Settings2");D($z,"Share2");D(Mz,"ShieldCheck");D(Dz,"Shuffle");D(iF,"SkipBack");D(eF,"SkipForward");D(tk,"Sliders");D(tk,"SlidersHorizontal");const XH=D(jF,"Sparkles"),mk=D(AF,"Square"),JH=D(vB,"Terminal");D(dB,"TerminalSquare");D(kB,"Text");D(FF,"ToggleLeft");D(GF,"ToggleRight");const QH=D(jB,"Trash2");D(fk,"Type");D(LA,"Unlink");D(UB,"Upload");D(vF,"Volume1");const eW=D(dk,"Volume2"),tW=D(kF,"VolumeX");D(xH,"Wrench");D(ck,"SwatchBook");D(qA,"Wand2");D(OD,"Waypoints");D(ik,"Workflow");const nW=D(OH,"X");D(TH,"XCircle");D(uI,"Zap");const hk="hudsonTrace",rW=new Set(["cat","find","fd","grep","head","ls","pwd","rg","sed","tail","wc","which"]),oW=new Set(["branch","diff","ls-files","log","rev-parse","show","status"]),gk=new Set(["","agent.task"]);function sW(e,t){const n=e.filter(Po),r=cW(n);if(t==="raw")return{events:n,hiddenDetailEvents:0,collapsedEvents:0,relatedEventsByTrace:r};const o=aW(n),s=[];let i=0;for(const c of o.values())(t==="details"||uW(c))&&(i+=c.length,s.push(lW(c)));return{events:s,hiddenDetailEvents:Math.max(0,n.length-i),collapsedEvents:Math.max(0,i-s.length),relatedEventsByTrace:r}}function Po(e){const t=Vt(e);return e.category==="agent-action"||t.triggeredBy==="agent"||t.source==="workspace-ai"}function Vt(e){return e.data&&typeof e.data=="object"&&!Array.isArray(e.data)?e.data:{}}function De(e,t){const n=e[t];return typeof n=="string"&&n.trim()?n:null}function Mo(e){return e.kind==="span"?e.traceId:De(Vt(e),"traceId")}function Kp(e){return De(Vt(e),"parentTraceId")}function cc(e){const t=Vt(e).metadata;if(!qp(t))return null;const n=t.command;return Array.isArray(n)&&n.every(r=>typeof r=="string")?n:typeof n=="string"&&n.trim()?n.trim().split(/\s+/):null}function Rf(e){if(!e||e.length===0)return!1;const t=yk(e[0]);if(rW.has(t))return!0;if(t==="git"){const n=e.find((r,o)=>o>0&&!r.startsWith("-"));return n?oW.has(n):!1}return!1}function Yp(e){const t=Vt(e),n=De(t,"appId")??De(t,"targetAppId");if(n)return n;const r=De(t,"action")??De(t,"playbook")??De(t,"commandId"),o=r&&!gk.has(r)?fW(r):null;if(o)return o;const s=cc(e);for(const i of s??[]){const c=bk(i);if(c)return c}return null}function iW(e){const t=Vt(e)[hk];if(!qp(t))return null;const n=De(t,"traceId"),r=is(t,"eventCount"),o=is(t,"startedAt"),s=is(t,"endedAt"),i=is(t,"durationMs"),c=is(t,"hiddenDetailEvents")??0;return!n||r===void 0||o===void 0||s===void 0||i===void 0?null:{traceId:n,eventCount:r,startedAt:o,endedAt:s,durationMs:i,hiddenDetailEvents:c}}function vk(e){if(!e||e.length===0)return null;const t=yk(e[0]),n=e.map(pW).find(Boolean);return Rf(e)?n?`Read ${n} with ${t}`:`Read with ${t}`:t==="bun"&&e[1]==="run"&&e[2]?`Run bun ${e[2]}`:e.slice(0,4).join(" ")}function dy(e){return!e||e==="agent.task"?"Agent task":e.replace(/^hudson\./,"").replace(/[._:-]+/g," ").replace(/\s+/g," ").trim().split(" ").map((n,r)=>r===0?mW(n):n).join(" ")}function aW(e){const t=new Map;for(const n of e){const r=Mo(n)??n.id,o=t.get(r);o?o.push(n):t.set(r,[n])}return t}function cW(e){const t=new Map,n=(r,o)=>{if(!r)return;const s=t.get(r);s?s.some(i=>i.id===o.id)||s.push(o):t.set(r,[o])};for(const r of e)n(Mo(r)??r.id,r),n(Kp(r),r),n(r.kind==="span"?r.parentId??null:null,r);for(const r of t.values())r.sort((o,s)=>o.timestamp-s.timestamp);return t}function lW(e){const t=[...e].sort((i,c)=>i.timestamp-c.timestamp),n=Ed(t,i=>kd(i)===3)??Ed(t,i=>kd(i)===2)??Ed(t,i=>kd(i)===1)??t[t.length-1],r=Mo(n)??n.id,o=t[0]?.timestamp??n.timestamp,s=t[t.length-1]?.timestamp??n.timestamp;return{...n,data:{...Vt(n),[hk]:{traceId:r,eventCount:t.length,startedAt:o,endedAt:s,durationMs:Math.max(0,s-o),hiddenDetailEvents:Math.max(0,t.length-1)}}}}function uW(e){return e.every(t=>Kp(t))?!1:e.some(t=>{if(t.kind==="span")return!0;const n=Vt(t),r=De(n,"action")??De(n,"playbook")??"",o=!gk.has(r),s=cc(t);return o||De(n,"commandId")||Yp(t)&&!s||dW(n)&&!Rf(s)?!0:!!(s&&!Rf(s))})}function dW(e){const t=e.args;return qp(t)&&typeof t.prompt=="string"&&t.prompt.trim().length>0}function kd(e){if(e.kind==="span")return e.status==="error"?3:e.status==="ok"?2:e.status==="active"?1:0;const t=De(Vt(e),"status")??(e.kind==="log"?e.level:void 0);return t==="failed"||t==="error"?3:t==="completed"||t==="ok"?2:t==="started"||t==="active"?1:0}function Ed(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return e[n]}function fW(e){if(!e)return null;const[t]=e.split(/[.:_-]/);return t||null}function bk(e){const t=e.match(/(?:^|\/)app\/apps\/([^/\s]+)/);return t?t[1]:null}function pW(e){const t=bk(e);return t||null}function yk(e){return e.split("/").pop()??e}function qp(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function is(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function mW(e){return e&&`${e[0].toUpperCase()}${e.slice(1)}`}const hW=["debug","info","warn","error"],gW=["log","metric","span"],vW="hudson:open-app",Sd=340,xa=440,fy=900,bW=420,yW="hudson.hud-logger.inspector-width",wW=1,py={key:"time",direction:"desc"},my="grid-cols-[62px_64px_76px_58px_72px_112px_128px_minmax(260px,1fr)_92px]";function xW(e){return typeof e!="number"||e===380?xa:e}function wk(e=en,t={}){const n=t.maxEvents??200,[r,o]=a.useState(()=>e.snapshot().slice(-n).reverse());return a.useEffect(()=>{const s=()=>{o(e.snapshot().slice(-n).reverse())},i=e.subscribe(s);return s(),i},[n,e]),r}function xk(e){const t=new Map;for(const n of e){if(n.kind!=="span")continue;(!t.get(n.id)||n.status!=="active")&&t.set(n.id,n.status)}return{total:e.length,errors:e.filter(n=>n.kind==="log"&&n.level==="error").length,warnings:e.filter(n=>n.kind==="log"&&n.level==="warn").length,agentActions:e.filter(Po).length,activeSpans:Array.from(t.values()).filter(n=>n==="active").length,lastEvent:e[0]??null}}function CW(e=en,t={}){const n=wk(e,t);return a.useMemo(()=>xk(n),[n])}function kW({observability:e=en,maxEvents:t=200,label:n="Logs",className:r="",showCounts:o=!1}){const s=CW(e,{maxEvents:t}),i=s.errors>0?"red":s.warnings>0||s.activeSpans>0?"amber":"emerald";return h.jsxs("span",{className:`inline-flex min-w-0 items-center gap-2 font-mono text-[9px] font-light uppercase tracking-[0.18em] ${ZW(i)} ${r}`,title:`${s.total} events, ${s.errors} errors, ${s.activeSpans} active spans`,children:[h.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${UW(i)}`}),h.jsx("span",{children:n}),o&&s.errors>0?h.jsxs("span",{className:"tabular-nums font-semibold",children:[s.errors," err"]}):o&&s.warnings>0?h.jsxs("span",{className:"tabular-nums",children:[s.warnings," warn"]}):null]})}function EW({observability:e=en,events:t,replayEvents:n,maxEvents:r=200,title:o="HudLogger",className:s="",emptyMessage:i="No events match the current filters.",showHeader:c=!0,showInspector:u=!0,initialTail:l=!0,initialScope:d="all"}){const f=wk(e,{maxEvents:r}),p=a.useMemo(()=>t?t.slice(0,r):!n||n.length===0?f:WW(n,f,r),[t,n,f,r]),[m,g]=a.useState(null),[y,x]=a.useState("all"),[w,b]=a.useState("all"),[v,C]=a.useState(d),[k,E]=a.useState(d==="agent-actions"?"actions":"raw"),[$,S]=a.useState(""),[j,R]=a.useState(l),[T,A]=a.useState(py),[L,V]=a.useState(null),[I,_]=Tt(yW,xa,{version:wW,migrate:xW}),N=a.useRef(null),O=a.useRef(null),[z,M]=a.useState(!1),q=a.useMemo(()=>sW(p,v==="agent-actions"?k:"raw"),[k,p,v]),ee=v==="agent-actions"?q.events:p,G=a.useMemo(()=>ee.filter(U=>{if(w!=="all"&&U.kind!==w||y!=="all"&&(U.kind!=="log"||U.level!==y))return!1;if(!$.trim())return!0;const W=Mo(U)??U.id,le=q.relatedEventsByTrace.get(W)??[];return _W(U,le).includes($.trim().toLowerCase())}),[q.relatedEventsByTrace,w,y,$,ee]),ue=a.useMemo(()=>FW(G,T),[G,T]),ne=j&&T.key==="time"&&T.direction==="desc"?ue[0]?tr(ue[0]):null:m,re=ue.find(U=>tr(U)===ne)??ue[0]??null,ie=re?Mo(re)??re.id:null,ae=ie?q.relatedEventsByTrace.get(ie)??[]:[],pe=a.useMemo(()=>xk(p),[p]),P=a.useCallback(async(U,W)=>{await HW(U)&&(V(W),window.setTimeout(()=>{V(J=>J===W?null:J)},1200))},[]),K=a.useCallback(U=>{R(!1),g(tr(U))},[]),B=a.useCallback(U=>{R(!1),A(W=>W.key!==U?{key:U,direction:zW(U)}:{key:U,direction:W.direction==="asc"?"desc":"asc"})},[]),ve=a.useCallback(()=>{j||A(py),R(U=>!U)},[j]),Q=a.useCallback(U=>{const W=Pf(U);!W||typeof window>"u"||window.dispatchEvent(new CustomEvent(vW,{detail:{appId:W,workspaceId:PW(U),source:"hud-logger"}}))},[]),X=a.useCallback((U,W)=>{const le=Math.min(fy,Math.max(Sd,W-bW));return Math.max(Sd,Math.min(le,U))},[]),te=a.useCallback(U=>{if(U.button!==0)return;const W=N.current,le=O.current;if(!W||!le)return;U.preventDefault();const J=U.clientX,de=le.getBoundingClientRect().width;M(!0),document.body.style.cursor="col-resize",document.body.style.userSelect="none";const Z=Pe=>{const Ee=W.getBoundingClientRect().width,Fe=X(de+(J-Pe.clientX),Ee);le.style.setProperty("--inspector-width",`${Fe}px`)},ye=Pe=>{const Ee=W.getBoundingClientRect().width,Fe=X(de+(J-Pe.clientX),Ee);_(Fe),M(!1),document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("pointermove",Z),window.removeEventListener("pointerup",ye),window.removeEventListener("pointercancel",ye)};window.addEventListener("pointermove",Z),window.addEventListener("pointerup",ye),window.addEventListener("pointercancel",ye)},[X,_]),ke=a.useCallback(()=>{_(xa)},[_]);a.useEffect(()=>{if(typeof window>"u")return;const U=N.current;if(!U)return;const W=new ResizeObserver(()=>{const le=U.getBoundingClientRect().width;_(J=>{const de=X(J,le);return de===J?J:de})});return W.observe(U),()=>W.disconnect()},[X,_]);const Ce=a.useMemo(()=>({"--inspector-width":`${I}px`}),[I]);return h.jsxs("section",{ref:N,className:`flex min-h-[520px] flex-col overflow-hidden rounded-md border border-border bg-background text-foreground lg:flex-row ${s}`,children:[h.jsxs("main",{className:"flex min-h-0 min-w-0 flex-col border-b border-border/70 lg:flex-1 lg:border-b-0",children:[c&&h.jsxs("div",{className:"shrink-0 border-b border-border/70 bg-card/80 px-3 py-2.5",children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsx($W,{ariaLabel:"copy filtered table",copied:L==="table",disabled:ue.length===0,label:"copy all",onClick:()=>{P(DW(ue),"table")}}),h.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 font-mono text-[11px] font-normal uppercase tracking-[0.14em] text-muted-foreground",children:[h.jsx("span",{children:o}),h.jsxs("span",{className:"text-accent",children:[ue.length," shown"]}),h.jsxs("span",{children:[pe.total," buffered"]}),h.jsxs("span",{children:[pe.agentActions," agent"]}),h.jsxs("span",{children:[pe.errors," errors"]}),pe.activeSpans>0&&h.jsxs("span",{className:"text-warning",children:[pe.activeSpans," active"]}),v==="agent-actions"&&k!=="raw"&&q.hiddenDetailEvents>0&&h.jsxs("span",{children:[q.hiddenDetailEvents," detail hidden"]}),v==="agent-actions"&&q.collapsedEvents>0&&h.jsxs("span",{children:[q.collapsedEvents," collapsed"]})]})]}),h.jsxs("label",{className:"mt-2 flex min-w-0 items-center gap-2 rounded-md border border-border/70 bg-muted/20 px-2.5 py-2 font-mono text-[13px] font-normal text-accent transition-colors focus-within:border-accent/40 focus-within:bg-muted/30",children:[h.jsx("span",{className:"shrink-0 text-success",children:"$"}),h.jsx("input",{value:$,onChange:U=>S(U.target.value),placeholder:"grep message, category, payload",className:"min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted-foreground"})]}),h.jsxs("details",{className:"mt-2 text-left",children:[h.jsx("summary",{className:"cursor-pointer font-mono text-[11px] font-normal uppercase tracking-[0.14em] text-muted-foreground hover:text-foreground",children:"filters / controls"}),h.jsxs("div",{className:"mt-3 grid gap-3 border-t border-border/60 pt-3 md:grid-cols-[1fr_1fr_1fr_1fr_auto]",children:[h.jsxs(Ei,{label:"Scope",children:[h.jsx(Bn,{active:v==="all",onClick:()=>C("all"),children:"all"}),h.jsx(Bn,{active:v==="agent-actions",onClick:()=>C("agent-actions"),children:"agent actions"})]}),v==="agent-actions"?h.jsxs(Ei,{label:"Rows",children:[h.jsx(Bn,{active:k==="actions",onClick:()=>E("actions"),children:"actions"}),h.jsx(Bn,{active:k==="details",onClick:()=>E("details"),children:"details"}),h.jsx(Bn,{active:k==="raw",onClick:()=>E("raw"),children:"raw"})]}):h.jsx("div",{}),h.jsxs(Ei,{label:"Kind",children:[h.jsx(Bn,{active:w==="all",onClick:()=>b("all"),children:"all"}),gW.map(U=>h.jsx(Bn,{active:w===U,onClick:()=>b(U),children:U},U))]}),h.jsxs(Ei,{label:"Level",children:[h.jsx(Bn,{active:y==="all",onClick:()=>x("all"),children:"all"}),hW.map(U=>h.jsx(Bn,{active:y===U,onClick:()=>x(U),children:U},U))]}),h.jsx("div",{className:"flex flex-wrap items-end gap-2",children:h.jsxs("button",{type:"button",onClick:ve,className:`rounded-md border px-2.5 py-1.5 font-mono text-[11px] font-normal uppercase tracking-[0.12em] transition-colors ${j?"border-accent/30 bg-accent/10 text-accent":"border-border/70 bg-muted/20 text-muted-foreground hover:border-border hover:text-foreground"}`,children:["tail ",j?"on":"off"]})})]})]})]}),h.jsx("div",{className:"max-h-[650px] overflow-auto lg:max-h-none lg:flex-1 lg:min-h-0",children:h.jsxs("div",{className:"min-w-[980px] font-mono text-[11px] font-normal",children:[h.jsxs("div",{className:`sticky top-0 z-10 grid min-h-8 ${my} items-center border-b border-border/70 bg-card px-3 py-1.5 font-medium uppercase tracking-[0.12em] text-muted-foreground`,children:[h.jsx("span",{className:"sticky left-0 bg-card pr-2",children:"Copy"}),h.jsx("span",{children:"Open"}),h.jsx(Ar,{column:"time",label:"Time",sort:T,onSort:B}),h.jsx(Ar,{column:"kind",label:"Kind",sort:T,onSort:B}),h.jsx(Ar,{column:"level",label:"Level",sort:T,onSort:B}),h.jsx(Ar,{column:"category",label:"Category",sort:T,onSort:B}),h.jsx(Ar,{column:"target",label:"Target",sort:T,onSort:B}),h.jsx(Ar,{column:"message",label:"Message",sort:T,onSort:B}),h.jsx(Ar,{column:"id",label:"Id",sort:T,onSort:B})]}),ue.map(U=>{const W=Pf(U),le=tr(U);return h.jsxs("div",{role:"button",tabIndex:0,onClick:()=>K(U),onKeyDown:J=>{(J.key==="Enter"||J.key===" ")&&(J.preventDefault(),K(U))},className:`grid min-h-[34px] w-full ${my} items-center border-b border-l-2 px-3 py-2 text-left transition-colors ${re&&tr(re)===le?"border-b-border/40 border-l-accent bg-accent/[0.08]":"border-b-border/40 border-l-transparent hover:bg-muted/30"}`,children:[h.jsx("button",{type:"button","aria-label":`copy row ${Mf(U.id)}`,onClick:J=>{J.stopPropagation(),P(Tf(U).join(" "),`row:${le}`)},className:`sticky left-0 z-[1] justify-self-start rounded border border-border/70 px-1.5 py-0.5 font-mono text-[10px] font-normal uppercase tracking-[0.1em] text-muted-foreground transition-colors hover:border-accent/30 hover:text-accent ${re&&tr(re)===le?"bg-accent/[0.08]":"bg-background"}`,children:L===`row:${le}`?"copied":"copy"}),W?h.jsx("button",{type:"button","aria-label":`open ${Hs(U)}`,onClick:J=>{J.stopPropagation(),Q(U)},className:"justify-self-start rounded border border-border/70 bg-muted/20 px-1.5 py-0.5 font-mono text-[10px] font-normal uppercase tracking-[0.1em] text-muted-foreground transition-colors hover:border-accent/30 hover:text-accent",children:"open"}):h.jsx("span",{className:"text-muted-foreground/45",children:"-"}),h.jsx("span",{className:"tabular-nums text-muted-foreground",children:Jp(U)}),h.jsx("span",{className:"uppercase tracking-[0.13em] text-muted-foreground",children:U.kind}),h.jsx("span",{className:`uppercase tracking-[0.13em] ${Xp(U)}`,children:_n(U)}),h.jsx("span",{className:"truncate uppercase tracking-[0.13em] text-muted-foreground",children:U.category??"-"}),h.jsx("span",{className:"truncate font-sans text-[12px] font-normal normal-case tracking-normal text-muted-foreground",children:Hs(U)}),h.jsx("span",{className:"truncate font-sans text-[13px] font-normal normal-case tracking-normal text-foreground",children:br(U)}),h.jsx("span",{className:"truncate text-muted-foreground",children:Mf(U.id)})]},le)}),ue.length===0&&h.jsx("div",{className:"border-b border-border/40 px-3 py-5 font-sans text-[13px] text-muted-foreground",children:i})]})})]}),u&&h.jsxs(h.Fragment,{children:[h.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize payload inspector","aria-valuenow":I,"aria-valuemin":Sd,"aria-valuemax":fy,title:"Drag to resize · Double-click to reset",onPointerDown:te,onDoubleClick:ke,className:`group hidden shrink-0 cursor-col-resize items-stretch justify-center transition-colors lg:flex lg:w-[5px] ${z?"bg-accent/15":"hover:bg-accent/10"}`,children:h.jsx("div",{className:`w-px transition-colors ${z?"bg-accent/80":"bg-border group-hover:bg-accent/60"}`})}),h.jsx("aside",{ref:O,style:Ce,className:"flex w-full shrink-0 flex-col bg-background lg:w-[var(--inspector-width)]",children:h.jsx(SW,{copied:re?L===`inspector:${tr(re)}`:!1,event:re,relatedEvents:ae,onCopyRow:U=>{P(Tf(U).join(" "),`inspector:${tr(U)}`)},onOpenTarget:Q})})]})]})}function SW({copied:e,event:t,relatedEvents:n,onCopyRow:r,onOpenTarget:o}){const s=t?Pf(t):null;return h.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[h.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border/70 bg-card/40 px-3 py-2.5 lg:px-4",children:[h.jsx("div",{className:"font-mono text-[11px] font-medium uppercase tracking-[0.15em] text-foreground/80",children:"Payload inspector"}),t?h.jsxs("div",{className:"flex items-center gap-2",children:[s?h.jsx("button",{type:"button",onClick:()=>o(t),className:"rounded-md border border-border/70 bg-muted/20 px-2 py-1 font-mono text-[11px] font-normal uppercase tracking-[0.11em] text-muted-foreground transition hover:border-accent/30 hover:text-accent",children:"open app"}):null,h.jsx("button",{type:"button",onClick:()=>r(t),className:"rounded-md border border-border/70 bg-muted/20 px-2 py-1 font-mono text-[11px] font-normal uppercase tracking-[0.11em] text-muted-foreground transition hover:border-accent/30 hover:text-accent",children:e?"copied":"copy row"}),h.jsx("div",{className:`font-mono text-[11px] uppercase tracking-[0.12em] ${Xp(t)}`,children:_n(t)})]}):null]}),h.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-3 py-3 lg:px-4 lg:py-4",children:t?h.jsxs("div",{className:"grid gap-3",children:[h.jsxs("div",{className:"overflow-hidden rounded-md border border-accent/25 bg-accent/[0.07]",children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b border-accent/15 px-3 py-2",children:[h.jsx(OW,{event:t}),h.jsx("span",{className:"font-mono text-[11px] uppercase tracking-[0.12em] text-muted-foreground",children:t.kind})]}),h.jsxs("div",{className:"px-3 py-2",children:[h.jsx("div",{className:"font-mono text-[11px] font-medium uppercase tracking-[0.13em] text-accent",children:"selected event"}),h.jsx("div",{className:"mt-1 break-words text-[14px] font-normal leading-5 text-foreground",children:br(t)})]})]}),MW(t).map(i=>h.jsx(LW,{section:i},i.title)),h.jsx(jW,{events:n,selectedId:t.id}),h.jsx($d,{label:"payload.data",value:t.data??{}}),t.kind==="metric"&&t.tags?h.jsx($d,{label:"metric.tags",value:t.tags}):null,t.kind==="span"&&t.error?h.jsx($d,{label:"span.error",value:t.error}):null]}):h.jsx("div",{className:"rounded-md border border-border/60 bg-muted/20 p-4 text-[13px] leading-6 text-muted-foreground",children:"No event selected."})})]})}function Ei({label:e,children:t}){return h.jsxs("div",{children:[h.jsx("div",{className:"font-mono text-[11px] uppercase tracking-[0.14em] text-muted-foreground",children:e}),h.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:t})]})}function Bn({active:e,onClick:t,children:n}){return h.jsx("button",{type:"button",onClick:t,className:`rounded-md border px-2 py-1 font-mono text-[11px] uppercase tracking-[0.1em] transition-colors ${e?"border-accent/30 bg-accent/10 text-accent":"border-border/70 bg-muted/20 text-muted-foreground hover:border-border hover:text-foreground"}`,children:n})}function Ar({column:e,label:t,sort:n,onSort:r}){const o=n.key===e,s=o?n.direction==="asc"?_H:AH:NH,i=n.direction==="asc"?"ascending":"descending";return h.jsxs("button",{type:"button","aria-label":`Sort by ${t}${o?`, currently ${i}`:""}`,"aria-pressed":o,onClick:()=>r(e),className:`flex min-w-0 items-center gap-1.5 text-left uppercase tracking-[0.14em] transition ${o?"text-accent":"text-muted-foreground hover:text-foreground"}`,children:[h.jsx("span",{className:"min-w-0 truncate",children:t}),h.jsx(s,{size:10,strokeWidth:1.75,"aria-hidden":"true",className:"shrink-0"})]})}function $W({ariaLabel:e,copied:t,disabled:n=!1,label:r,onClick:o}){return h.jsx("button",{type:"button","aria-label":e,disabled:n,onClick:o,className:"rounded-md border border-border/70 bg-muted/20 px-2 py-1 font-mono text-[11px] font-normal uppercase tracking-[0.11em] text-muted-foreground transition hover:border-accent/30 hover:text-accent disabled:cursor-not-allowed disabled:opacity-40",children:t?"copied":r})}function OW({event:e}){const t=_n(e),n=vs(e),r=n==="red"?"border-destructive/30 bg-destructive/10 text-destructive":n==="amber"?"border-warning/30 bg-warning/10 text-warning":n==="emerald"?"border-success/30 bg-success/10 text-success":"border-accent/30 bg-accent/10 text-accent";return h.jsx("span",{className:`rounded-full border px-2 py-0.5 font-mono text-[10px] uppercase tracking-[0.11em] ${r}`,children:t})}function LW({section:e}){return h.jsxs("section",{className:"overflow-hidden rounded-md border border-border/60 bg-muted/15",children:[h.jsx("div",{className:"border-b border-border/50 bg-muted/30 px-3 py-2 font-mono text-[10px] font-medium uppercase tracking-[0.14em] text-foreground/70",children:e.title}),h.jsx("div",{className:"divide-y divide-border/40",children:e.rows.map(t=>h.jsx(RW,{row:t},`${e.title}-${t.label}`))})]})}function jW({events:e,selectedId:t}){return e.length<=1?null:h.jsxs("section",{className:"overflow-hidden rounded-md border border-border/60 bg-muted/15",children:[h.jsxs("div",{className:"flex items-center justify-between border-b border-border/50 bg-muted/30 px-3 py-2",children:[h.jsx("div",{className:"font-mono text-[10px] font-medium uppercase tracking-[0.14em] text-foreground/70",children:"Trace lines"}),h.jsx("div",{className:"font-mono text-[10px] font-light uppercase tracking-[0.12em] text-muted-foreground",children:e.length})]}),h.jsx("div",{className:"divide-y divide-border/40",children:e.map(n=>{const r=vk(cc(n));return h.jsxs("div",{className:`grid grid-cols-[74px_82px_minmax(0,1fr)] gap-2 px-3 py-1.5 ${n.id===t?"bg-accent/10":""}`,children:[h.jsx("span",{className:"font-mono text-[10px] tabular-nums text-muted-foreground",children:Jp(n)}),h.jsx("span",{className:`font-mono text-[10px] uppercase tracking-[0.11em] ${Xp(n)}`,children:_n(n)}),h.jsx("span",{className:"min-w-0 truncate text-[12px] text-foreground/80",children:r??br(n)})]},`${n.id}-${n.timestamp}`)})})]})}function RW({row:e}){return h.jsxs("div",{className:"grid grid-cols-[96px_minmax(0,1fr)] items-start gap-3 px-3 py-2",children:[h.jsx("div",{className:"font-mono text-[10px] font-light uppercase tracking-[0.12em] text-muted-foreground",children:e.label}),h.jsx("div",{className:`min-w-0 break-words text-[12px] leading-5 ${e.mono?"font-mono tabular-nums":"font-sans"} ${TW(e.tone)}`,children:e.value})]})}function $d({label:e,value:t}){return h.jsxs("div",{className:"overflow-hidden rounded-md border border-border/60 bg-muted/15",children:[h.jsx("div",{className:"border-b border-border/50 bg-muted/30 px-3 py-2 font-mono text-[10px] font-medium uppercase tracking-[0.14em] text-foreground/70",children:e}),h.jsx("pre",{className:"max-h-[360px] overflow-auto whitespace-pre-wrap break-words p-3 font-mono text-[12px] font-light leading-5 text-foreground/80 lg:max-h-none lg:overflow-x-auto",children:JSON.stringify(t,null,2)})]})}function Pf(e){return Yp(e)}function PW(e){const t=Vt(e);return De(t,"workspaceId")??De(t,"targetWorkspaceId")}function Hs(e){const t=Vt(e),n=Yp(e);return De(t,"appName")??De(t,"appId")??n??De(t,"workspaceName")??De(t,"workspaceId")??De(t,"serviceId")??De(t,"target")??"-"}function MW(e){const t=[{title:"Identity",rows:[{label:"id",value:e.id,mono:!0},{label:"kind",value:e.kind,tone:"cyan",mono:!0},{label:"category",value:e.category??"none",mono:!0}]},{title:"Signal",rows:[{label:IW(e),value:_n(e),tone:vs(e),mono:!0},{label:"timestamp",value:Od(e.timestamp),mono:!0}]}];if(Po(e)){const n=Vt(e),r=Mo(e),o=Kp(e);t.push({title:"Agent Action",rows:[{label:"source",value:De(n,"source")??"agent",mono:!0},{label:"status",value:De(n,"status")??_n(e),tone:vs(e),mono:!0},{label:"action",value:De(n,"action")??br(e),mono:!0},{label:"target",value:Hs(e),mono:!0},{label:"workspace",value:De(n,"workspaceName")??De(n,"workspaceId")??"unknown",mono:!0},...r?[{label:"trace",value:r,mono:!0}]:[],...o?[{label:"parent",value:o,mono:!0}]:[]]});const s=NW(e),i=iW(e);(s||i)&&t.push({title:"Request",rows:[...s?[{label:"prompt",value:s}]:[],...i?[{label:"lines",value:String(i.eventCount),mono:!0},{label:"duration",value:`${i.durationMs}ms`,mono:!0}]:[]]})}return e.kind==="log"&&t.push({title:"Log",rows:[{label:"message",value:e.message},{label:"level",value:e.level,tone:vs(e),mono:!0}]}),e.kind==="metric"&&t.push({title:"Metric",rows:[{label:"name",value:e.name},{label:"type",value:e.metricType,tone:"emerald",mono:!0},{label:"value",value:AW(e),tone:"emerald",mono:!0},{label:"unit",value:e.unit??"none",mono:!0}]}),e.kind==="span"&&t.push({title:"Trace",rows:[{label:"name",value:e.name},{label:"trace id",value:e.traceId,mono:!0},{label:"parent id",value:e.parentId??"none",mono:!0},{label:"status",value:e.status,tone:vs(e),mono:!0},{label:"duration",value:e.durationMs===void 0?"active":`${e.durationMs}ms`,mono:!0},{label:"started",value:Od(e.startTime),mono:!0},{label:"ended",value:e.endTime===void 0?"pending":Od(e.endTime),mono:!0}]}),t}function br(e){if(e.kind==="log"){if(Po(e)){const t=Vt(e),n=vk(cc(e));if(n){const i=De(t,"status");return i?`${n} ${i}`:n}const r=De(t,"action")??De(t,"commandId")??e.message,o=De(t,"status"),s=dy(r);return o?`${s} ${o}`:s}return e.message}return Po(e)?dy(e.name):e.name}function _n(e){return e.kind==="log"?Po(e)?De(Vt(e),"status")??e.level:e.level:e.kind==="metric"?e.metricType:e.status}function Xp(e){const t=_n(e);return t==="error"||t==="failed"?"text-destructive":t==="warn"||t==="active"||t==="started"?"text-warning":e.kind==="metric"||t==="ok"||t==="completed"?"text-success":"text-accent"}function vs(e){const t=_n(e);return t==="error"||t==="failed"?"red":t==="warn"||t==="active"||t==="started"?"amber":e.kind==="metric"||t==="ok"||t==="completed"?"emerald":"cyan"}function TW(e="neutral"){return e==="red"?"text-destructive":e==="amber"?"text-warning":e==="emerald"?"text-success":e==="cyan"?"text-accent":"text-foreground"}function IW(e){return e.kind==="log"?"level":e.kind==="metric"?"type":"status"}function AW(e){return`${e.value}${e.unit?` ${e.unit}`:""}`}function Od(e){const t=new Date(e);return`${t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}.${String(t.getMilliseconds()).padStart(3,"0")}`}function Mf(e){return e.length>10?e.slice(-10):e}function tr(e){return e.kind==="span"?`${e.kind}:${e.id}:${e.status}:${e.endTime??"active"}`:`${e.kind}:${e.id}:${e.timestamp}`}function Jp(e){return new Date(e.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}function Tf(e){return[Jp(e),e.kind,_n(e),e.category??"",Hs(e),br(e),e.id,JSON.stringify(e.data??{})].map(VW)}function _W(e,t){return[br(e),e.category??"",JSON.stringify(e.data??{}),...t.map(r=>`${br(r)} ${JSON.stringify(r.data??{})}`)].join(" ").toLowerCase()}function NW(e){const n=Vt(e).args,r=n&&typeof n=="object"&&!Array.isArray(n)?n.prompt:void 0;return typeof r!="string"||!r.trim()?null:r.replace(/\s+/g," ").trim().slice(0,360)}function DW(e){return[["time","kind","signal","category","target","message","id","payload"].join(" "),...e.map(t=>Tf(t).join(" "))].join(`
|
|
58
|
+
`)}function VW(e){return e.replace(/\s+/g," ").trim()}function zW(e){return e==="time"?"desc":"asc"}function FW(e,t){const n=t.direction==="asc"?1:-1;return e.map((r,o)=>({event:r,index:o})).sort((r,o)=>{const s=BW(hy(r.event,t.key),hy(o.event,t.key));return s===0?r.index-o.index:s*n}).map(({event:r})=>r)}function hy(e,t){switch(t){case"time":return e.timestamp;case"kind":return e.kind;case"level":return _n(e);case"category":return e.category??"";case"target":return Hs(e);case"message":return br(e);case"id":return Mf(e.id)}}function BW(e,t){return typeof e=="number"&&typeof t=="number"?e-t:String(e).localeCompare(String(t),void 0,{numeric:!0,sensitivity:"base"})}async function HW(e){if(navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(e),!0}catch{}const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly","true"),t.style.position="fixed",t.style.left="-9999px",t.style.top="0",document.body.appendChild(t),t.focus(),t.select();try{return document.execCommand("copy")}finally{document.body.removeChild(t)}}function WW(e,t,n){const r=new Set,o=[];for(const s of t)r.has(s.id)||(r.add(s.id),o.push(s));for(let s=e.length-1;s>=0;s--){const i=e[s];r.has(i.id)||(r.add(i.id),o.push(i))}return o.sort((s,i)=>i.timestamp-s.timestamp),o.slice(0,n)}function ZW(e){return e==="red"?"text-destructive":e==="amber"?"text-warning":"text-success"}function UW(e){return e==="red"?"bg-destructive":e==="amber"?"bg-warning":"bg-success"}function GW({chat:e,placeholder:t="Ask AI",inputExtras:n,inputStatus:r,inputValue:o,onInputChange:s}){const{messages:i,sendMessage:c,stop:u,status:l,clearChat:d,error:f,attachments:p,activeAttachments:m,toggleAttachment:g}=e,[y,x]=a.useState(""),w=o!==void 0,b=w?o:y,v=R=>{w?s?.(R):x(R)},C=a.useRef(null),k=a.useRef(null),E=l==="streaming"||l==="submitted",$=p.length>0;a.useEffect(()=>{const R=C.current;R&&(R.scrollTop=R.scrollHeight)},[i]),a.useEffect(()=>{k.current?.focus()},[]);const S=R=>{R.preventDefault();const T=b.trim();!T||E||(v(""),c({text:T}))},j=R=>{R.stopPropagation(),R.key==="Enter"&&!R.shiftKey&&(R.preventDefault(),S(R))};return h.jsxs("div",{className:"flex flex-col h-full font-mono text-[12px]",children:[h.jsxs("div",{ref:C,className:"flex-1 overflow-y-auto frame-scrollbar p-3 space-y-3",children:[i.length===0&&h.jsx("div",{className:"text-muted-foreground/80 text-center py-8 select-none",children:t}),i.map(R=>h.jsx("div",{className:`flex ${R.role==="user"?"justify-end":"justify-start"}`,children:h.jsx("div",{className:`max-w-[85%] rounded-lg px-3 py-2 whitespace-pre-wrap break-words leading-relaxed ${R.role==="user"?"bg-accent/10 text-foreground border border-accent/20":"bg-muted/50 text-foreground border border-border/50"}`,children:(R.parts??[]).map((T,A)=>{if(!T)return null;if(T.type==="text")return h.jsx("span",{children:T.text},A);if(Fs(T)){const L=I9(T),V=Object.entries(T.input??{}).map(([I,_])=>`${I}: ${JSON.stringify(_)}`).join(", ");return h.jsxs("div",{className:"text-[11px] text-info/80 mt-1 font-mono",children:[h.jsx("span",{className:"text-muted-foreground/80",children:"↳ "}),L,"(",V,")"]},A)}return null})})},R.id)),E&&i[i.length-1]?.role!=="assistant"&&h.jsx("div",{className:"flex justify-start",children:h.jsx("div",{className:"bg-muted/50 border border-border/50 rounded-lg px-3 py-2 text-muted-foreground",children:h.jsx("span",{className:"animate-pulse",children:"Thinking"})})})]}),f&&h.jsxs("div",{className:"px-3 py-2 bg-destructive/10 border-t border-destructive/30 text-destructive text-[11px] flex items-center gap-2",children:[h.jsx(IH,{size:12}),h.jsx("span",{className:"truncate",children:f.message||"An error occurred"})]}),h.jsxs("div",{className:"px-3 py-2.5 border-t border-border/50 bg-background/60",children:[r&&h.jsx("div",{className:"mb-2",children:r}),$&&h.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[h.jsx(YH,{size:11,className:"text-muted-foreground/80 shrink-0"}),p.map(R=>{const T=m.has(R.label);return h.jsx("button",{type:"button",onClick:()=>g(R.label),className:`text-[10px] px-2 py-0.5 rounded-full border transition-colors ${T?"bg-info/10 text-info border-info/30":"text-muted-foreground/80 border-border hover:text-foreground hover:border-foreground/30"}`,children:R.label},R.label)}),m.size>0&&h.jsx("span",{className:"text-[10px] text-muted-foreground/60 ml-1",children:"attached"})]}),h.jsxs("form",{onSubmit:S,className:"flex items-center gap-2 rounded-lg border border-border bg-muted/60 px-3 py-2 focus-within:border-accent/40 transition-colors",children:[n,i.length>0&&h.jsx("button",{type:"button",onClick:()=>d(),className:"p-1 rounded text-muted-foreground/80 hover:text-foreground hover:bg-muted transition-colors",title:"Clear",children:h.jsx(QH,{size:12})}),h.jsx("input",{ref:k,type:"text",value:b,onChange:R=>v(R.target.value),onKeyDown:j,placeholder:t,className:"flex-1 bg-transparent outline-none text-foreground placeholder:text-muted-foreground/80 caret-accent",disabled:E}),E?h.jsx("button",{type:"button",onClick:()=>u(),className:"p-1.5 rounded text-warning hover:bg-warning/10 transition-colors",title:"Stop",children:h.jsx(mk,{size:12})}):h.jsx("button",{type:"submit",disabled:!b.trim(),className:"text-[11px] px-2 py-1 rounded bg-accent/10 text-accent border border-accent/30 hover:bg-accent/20 disabled:opacity-30 disabled:cursor-default transition-colors",children:"Send"})]})]})]})}function KW({app:e,commands:t,state:n,relayUrl:r="ws://localhost:3600",cwd:o,agent:s="claude",provider:i,model:c,backend:u="pty",tmuxSession:l,workspaceFiles:d,onOpenSettings:f,onStartService:p,voiceKit:m}){const[g,y]=Tt(`assistant.${e.id}.mode`,"relay"),[x,w]=a.useState(""),[b,v]=Tt(`assistant.${e.id}.voice.speakReplies`,m?.settings.speakReplies??!1),{serviceApiUrl:C}=Qs(),k=a.useMemo(()=>qW(e),[e]),E=n6({url:r,systemPrompt:k,cwd:o,workspaceFiles:d,sessionKey:`assistant-${e.id}`,backend:u,tmuxSession:l,agent:s,provider:s==="pi"?i:void 0,model:s==="pi"?c:void 0}),$=a.useCallback(async()=>{if(p)return p();try{return(await(await fetch(`${C}/api/services/execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serviceId:"relay",action:"start",triggeredBy:"assistant"})})).json()).success===!0}catch{return!1}},[p,C]),S=a.useMemo(()=>{const O=[{label:"Relay",value:r},{label:"Agent",value:s}];return o&&O.push({label:"CWD",value:o}),s==="pi"&&c&&O.push({label:"Model",value:c}),O},[r,s,o,c]),[j,R]=a.useState("text"),T=bP({app:e,commands:t,state:n,provider:i,model:c,onFinish:({message:O,isAbort:z,isDisconnect:M,isError:q})=>{!m||!b||z||M||q||O.role==="assistant"&&m.speakReply(O,{surface:"hudson-assistant",appId:e.id,source:j})}}),A=a.useCallback(O=>{if(!m)return;const z=[x.trim(),O].filter(Boolean).join(" ");m.settings.autoSend&&T.status!=="streaming"&&T.status!=="submitted"?(w(""),R("voice"),T.sendMessage({text:z})):w(z)},[m,x,T]),L=a.useCallback(()=>{m&&(m.input.status==="recording"?m.input.stop():m.input.start(A))},[m,A]),V=e.intents?.length??0,I=!!m,_=m?.input.status==="transcribing",N=m?.input.status==="recording";return h.jsxs("div",{className:"flex flex-col h-full",children:[h.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1.5 border-b border-border/50 bg-background/60",children:[h.jsx(XH,{size:11,className:"text-cyan-400/60"}),h.jsx("span",{className:"text-[10px] font-mono uppercase tracking-wider text-muted-foreground/80",children:"Assistant"}),h.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground/60",children:["· ",e.name]}),h.jsx("div",{className:"flex-1"}),I&&g==="chat"&&h.jsx("button",{type:"button",onClick:()=>{b&&m?.output.stop(),v(!b)},className:`p-1 rounded transition-colors ${b?"text-cyan-300 hover:text-cyan-200":"text-muted-foreground/80 hover:text-foreground"}`,title:b?"Speaker on (click to mute)":"Speaker off (click to enable)",children:m?.output.isPlaying?h.jsx(uy,{size:12,className:"animate-spin"}):b?h.jsx(eW,{size:12}):h.jsx(tW,{size:12})}),h.jsxs("div",{className:"flex items-center gap-1 rounded-full border border-border p-0.5",children:[h.jsx(vy,{active:g==="relay",onClick:()=>y("relay"),children:"Relay"}),h.jsx(vy,{active:g==="chat",onClick:()=>y("chat"),children:"Chat"})]}),g==="relay"&&E.status==="connected"&&h.jsx("button",{type:"button",onClick:()=>E.restart(),className:"text-[10px] px-2 py-0.5 rounded-full border text-cyan-400 border-cyan-500/30 hover:bg-cyan-500/10 transition-colors",title:"Kill session and start fresh",children:"Restart"}),g==="relay"&&E.status==="connected"&&h.jsx("button",{type:"button",onClick:()=>E.disconnect(),className:"text-[10px] px-2 py-0.5 rounded-full border text-red-400 border-red-500/30 hover:bg-red-500/10 transition-colors",children:"Disconnect"}),g==="relay"&&E.status!=="connected"&&E.status!=="connecting"&&h.jsx("button",{type:"button",onClick:()=>E.connect(),className:"text-[10px] px-2 py-0.5 rounded-full border text-accent border-accent/30 hover:bg-accent/10 transition-colors",children:"Connect"})]}),h.jsx("div",{className:"flex-1 min-h-0",children:g==="relay"?h.jsx(r6,{relay:E,configItems:S,onOpenSettings:f,onStartService:$}):h.jsx(GW,{chat:T,placeholder:V===0?`Ask about ${e.name} — no intents declared, conversation only.`:`Ask ${e.name} to do something… (${V} intent${V===1?"":"s"})`,inputValue:x,onInputChange:O=>{j==="voice"&&O.length===0&&R("text"),w(O)},inputExtras:I&&m?.input.isSupported?h.jsx("button",{type:"button",onClick:L,disabled:_,className:`p-1 rounded transition-colors disabled:opacity-30 ${N?"bg-red-500/15 text-red-300 hover:bg-red-500/20":"text-muted-foreground/80 hover:text-cyan-400"}`,title:N?"Stop recording":"Record voice prompt",children:_?h.jsx(uy,{size:12,className:"animate-spin"}):N?h.jsx(mk,{size:11}):h.jsx(BH,{size:12})}):void 0,inputStatus:I&&m?h.jsx(YW,{inputStatus:m.input.status,inputError:m.input.error,outputStatus:m.output.status,outputError:m.output.error}):void 0})})]})}function YW({inputStatus:e,inputError:t,outputStatus:n,outputError:r}){const o=gy(e)??gy(n),s=t??r;return!o&&!s?null:h.jsxs("div",{className:"flex items-center gap-2",children:[o&&h.jsx("span",{className:`text-[10px] px-2 py-0.5 rounded-full border font-mono ${o.className}`,children:o.label}),s&&h.jsx("span",{className:"text-[10px] text-muted-foreground/80 truncate flex-1",title:s,children:s})]})}function gy(e){switch(e){case"recording":return{label:"listening",className:"border-red-500/20 bg-red-500/10 text-red-300"};case"transcribing":return{label:"transcribing",className:"border-amber-500/20 bg-amber-500/10 text-amber-300"};case"ready":return{label:"draft ready",className:"border-cyan-500/20 bg-cyan-500/10 text-cyan-300"};case"synthesizing":return{label:"voicing",className:"border-cyan-500/20 bg-cyan-500/10 text-cyan-300"};case"speaking":return{label:"speaking",className:"border-accent/20 bg-accent/10 text-accent"};case"unavailable":return{label:"voice offline",className:"border-amber-500/20 bg-amber-500/10 text-amber-300"};case"error":return{label:"voice error",className:"border-red-500/20 bg-red-500/10 text-red-300"};default:return null}}function vy({active:e,onClick:t,children:n}){return h.jsx("button",{type:"button",onClick:t,className:`text-[10px] px-2 py-0.5 rounded-full transition-colors ${e?"bg-cyan-500/15 text-cyan-300":"text-muted-foreground/80 hover:text-foreground"}`,children:n})}function qW(e){const t=[`You are working alongside the user inside the **${e.name}** Hudson app.`];e.description&&t.push(e.description);const n=e.intents??[];if(n.length>0){t.push("","## What this app can do (for context)");for(const r of n)t.push(`- ${r.title} — ${r.description}`);t.push("","These actions live inside the running app. You can describe them to the user, but you do not invoke them yourself — the user can trigger any of them via the command palette (Cmd+K).")}return t.push("","## How to behave","- Be terse. The user is in a terminal; respect their attention.","- Use your own tools (file ops, shell, etc.) freely if it helps.","- When asked to change something inside the app itself, prefer guiding the user to the matching command rather than hacking around it."),t.join(`
|
|
59
|
+
`)}function Qp(){const{titleBarInset:e}=Qs();return a.useMemo(()=>{const t=Ro.layout.navHeight+e;return{navTotalHeight:t,panelTopOffset:t}},[e])}const by={borderColor:"var(--hud-chrome-border, oklch(var(--border)))"},XW=({scale:e,onZoom:t,min:n=.2,max:r=3,step:o=.1})=>{const[s,i]=a.useState(!1),[c,u]=a.useState(""),l=a.useRef(null),d=a.useCallback(x=>Math.min(r,Math.max(n,x)),[n,r]),f=a.useCallback(()=>{t(d(e+o))},[e,o,t,d]),p=a.useCallback(()=>{t(d(e-o))},[e,o,t,d]),m=a.useCallback(()=>{u(Math.round(e*100).toString()),i(!0)},[e]),g=a.useCallback(()=>{i(!1);const x=parseInt(c,10);!isNaN(x)&&x>0&&t(d(x/100))},[c,t,d]),y=a.useCallback(x=>{x.key==="Enter"?g():x.key==="Escape"&&i(!1)},[g]);return a.useEffect(()=>{s&&l.current&&(l.current.focus(),l.current.select())},[s]),h.jsxs("div",{className:"pointer-events-auto flex flex-col items-center bg-card/95 border rounded-none shadow-[var(--hud-shadow-panel)] overflow-hidden",style:by,children:[h.jsx("button",{onClick:f,className:"w-9 h-8 flex items-center justify-center hover:bg-accent/10 text-muted-foreground hover:text-foreground transition-colors",title:"Zoom in",children:h.jsx(qH,{size:14})}),h.jsx("div",{className:"w-full border-t border-b",style:by,children:s?h.jsx("input",{ref:l,type:"text",value:c,onChange:x=>u(x.target.value.replace(/[^0-9]/g,"")),onBlur:g,onKeyDown:y,className:"w-9 py-1.5 text-center text-[11px] font-mono text-foreground bg-background/60 outline-none tabular-nums"}):h.jsxs("button",{onClick:m,className:"w-9 py-1.5 text-center text-[11px] font-mono text-foreground hover:bg-accent/10 transition-colors cursor-text tabular-nums",title:"Click to set zoom",children:[Math.round(e*100),"%"]})}),h.jsx("button",{onClick:p,className:"w-9 h-8 flex items-center justify-center hover:bg-accent/10 text-muted-foreground hover:text-foreground transition-colors",title:"Zoom out",children:h.jsx(WH,{size:14})})]})},JW={...Qa};let yy=0;function QW(e,t="mui"){const[n,r]=a.useState(e),o=e||n;return a.useEffect(()=>{n==null&&(yy+=1,r(`${t}-${yy}`))},[n,t]),o}const wy=JW.useId;function Cr(e,t){if(wy!==void 0){const n=wy();return e??(t?`${t}-${n}`:n)}return QW(e,t)}function Qr(e,...t){const n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const Ck=a.createContext(void 0);function lc(e=!0){const t=a.useContext(Ck);if(t===void 0&&!e)throw new Error(Qr(25));return t}const kk=a.createContext(void 0);function Ek(e){const t=a.useContext(kk);if(t===void 0&&!e)throw new Error(Qr(33));return t}const em=a.createContext(void 0);function Bo(e){const t=a.useContext(em);if(t===void 0&&!e)throw new Error(Qr(36));return t}const xy={};function fn(e,t){const n=a.useRef(xy);return n.current===xy&&(n.current=e(t)),n}function Ws(e,t,n,r){const o=fn(Sk).current;return tZ(o,e,t,n,r)&&$k(o,[e,t,n,r]),o.callback}function eZ(e){const t=fn(Sk).current;return nZ(t,e)&&$k(t,e),t.callback}function Sk(){return{callback:null,cleanup:null,refs:[]}}function tZ(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function nZ(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function $k(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 o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const i=s(n);typeof i=="function"&&(r[o]=i);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const i=r[o];typeof i=="function"?i():s(null);break}case"object":{s.current=null;break}}}}}}}const rZ=parseInt(a.version,10);function tm(e){return rZ>=e}function Cy(e){if(!a.isValidElement(e))return null;const t=e,n=t.props;return(tm(19)?n?.ref:t.ref)??null}function If(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function oZ(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const s=t[r](o);s!=null&&Object.assign(n,s);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function sZ(e,t){return typeof e=="function"?e(t):e}function iZ(e,t){return typeof e=="function"?e(t):e}const Es={};function uc(e,t,n,r,o){let s={...Af(e,Es)};return t&&(s=Yi(s,t)),n&&(s=Yi(s,n)),r&&(s=Yi(s,r)),s}function aZ(e){if(e.length===0)return Es;if(e.length===1)return Af(e[0],Es);let t={...Af(e[0],Es)};for(let n=1;n<e.length;n+=1)t=Yi(t,e[n]);return t}function Yi(e,t){return Ok(t)?t(e):cZ(e,t)}function cZ(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=If(e.style,r);break}case"className":{e[n]=Lk(e.className,r);break}default:lZ(n,r)?e[n]=uZ(e[n],r):e[n]=r}}return e}function lZ(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function Ok(e){return typeof e=="function"}function Af(e,t){return Ok(e)?e(t):e??Es}function uZ(e,t){return t?e?n=>{if(dZ(n)){const o=n;_f(o);const s=t(o);return o.baseUIHandlerPrevented||e?.(o),s}const r=t(n);return e?.(n),r}:t:e}function _f(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Lk(e,t){return t?e?t+" "+e:t:e}function dZ(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function jk(){}const Rk=Object.freeze([]),Wt=Object.freeze({}),fZ=500,pZ={style:{transition:"none"}},mZ="data-base-ui-click-trigger",hZ={fallbackAxisSide:"none"},gZ={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function kr(e,t,n={}){const r=t.render,o=vZ(t,n);if(n.enabled===!1)return null;const s=n.state??Wt;return bZ(e,r,o,s)}function vZ(e,t={}){const{className:n,style:r,render:o}=e,{state:s=Wt,ref:i,props:c,stateAttributesMapping:u,enabled:l=!0}=t,d=l?sZ(n,s):void 0,f=l?iZ(r,s):void 0,p=l?oZ(s,u):Wt,m=l?If(p,Array.isArray(c)?aZ(c):c)??Wt:Wt;return typeof document<"u"&&(l?Array.isArray(i)?m.ref=eZ([m.ref,Cy(o),...i]):m.ref=Ws(m.ref,Cy(o),i):Ws(null,null)),l?(d!==void 0&&(m.className=Lk(m.className,d)),f!==void 0&&(m.style=If(m.style,f)),m):Wt}function bZ(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=uc(n,t.props);return o.ref=n.ref,a.cloneElement(t,o)}return yZ(e,n)}function yZ(e,t){return a.createElement(e,t)}let Ca=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const wZ={[Ca.startingStyle]:""},xZ={[Ca.endingStyle]:""},CZ={transitionStatus(e){return e==="starting"?wZ:e==="ending"?xZ:null}};let nm=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Ca.startingStyle]="startingStyle",e[e.endingStyle=Ca.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({}),ky=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const kZ={[ky.popupOpen]:"",[ky.pressed]:""},EZ={[nm.open]:""},SZ={[nm.closed]:""},$Z={[nm.anchorHidden]:""},OZ={open(e){return e?kZ:null}},Pk={open(e){return e?EZ:SZ},anchorHidden(e){return e?$Z:null}},LZ="none",ka="trigger-press",Hr="trigger-hover",Ey="trigger-focus",rm="outside-press",Mk="item-press",dc="focus-out",Tk="escape-key",qi="list-navigation",jZ="cancel-open",bs="sibling-open",RZ="imperative-action",Ld=Qa[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],PZ=Ld&&Ld!==a.useLayoutEffect?Ld:e=>e();function Oe(e){const t=fn(MZ).current;return t.next=e,PZ(t.effect),t.trampoline}function MZ(){const e={next:void 0,callback:TZ,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function TZ(){}function fc(){return typeof window<"u"}function Er(e){return om(e)?(e.nodeName||"").toLowerCase():"#document"}function Ct(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Vn(e){var t;return(t=(om(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function om(e){return fc()?e instanceof Node||e instanceof Ct(e).Node:!1}function Qe(e){return fc()?e instanceof Element||e instanceof Ct(e).Element:!1}function dt(e){return fc()?e instanceof HTMLElement||e instanceof Ct(e).HTMLElement:!1}function Nf(e){return!fc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ct(e).ShadowRoot}const IZ=new Set(["inline","contents"]);function eo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=rn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!IZ.has(o)}const AZ=new Set(["table","td","th"]);function _Z(e){return AZ.has(Er(e))}const NZ=[":popover-open",":modal"];function pc(e){return NZ.some(t=>{try{return e.matches(t)}catch{return!1}})}const DZ=["transform","translate","scale","rotate","perspective"],VZ=["transform","translate","scale","rotate","perspective","filter"],zZ=["paint","layout","strict","content"];function sm(e){const t=mc(),n=Qe(e)?rn(e):e;return DZ.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||VZ.some(r=>(n.willChange||"").includes(r))||zZ.some(r=>(n.contain||"").includes(r))}function FZ(e){let t=Nn(e);for(;dt(t)&&!Pn(t);){if(sm(t))return t;if(pc(t))return null;t=Nn(t)}return null}function mc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const BZ=new Set(["html","body","#document"]);function Pn(e){return BZ.has(Er(e))}function rn(e){return Ct(e).getComputedStyle(e)}function hc(e){return Qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nn(e){if(Er(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Nf(e)&&e.host||Vn(e);return Nf(t)?t.host:t}function Ik(e){const t=Nn(e);return Pn(t)?e.ownerDocument?e.ownerDocument.body:e.body:dt(t)&&eo(t)?t:Ik(t)}function fr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ik(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Ct(o);if(s){const c=Df(i);return t.concat(i,i.visualViewport||[],eo(o)?o:[],c&&n?fr(c):[])}return t.concat(o,fr(o,[],n))}function Df(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const HZ=()=>{},Se=typeof document<"u"?a.useLayoutEffect:HZ,WZ=a.createContext(void 0);function ZZ(e=!1){const t=a.useContext(WZ);if(t===void 0&&!e)throw new Error(Qr(16));return t}function UZ(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:s}=e,i=r&&t!==!1,c=r&&t===!1;return{props:a.useMemo(()=>{const l={onKeyDown(d){n&&t&&d.key!=="Tab"&&d.preventDefault()}};return r||(l.tabIndex=o,!s&&n&&(l.tabIndex=t?o:-1)),(s&&(t||i)||!s&&n)&&(l["aria-disabled"]=n),s&&(!t||c)&&(l.disabled=n),l},[r,n,t,i,c,s,o])}}function GZ(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,s=a.useRef(null),i=ZZ(!0)!==void 0,c=Oe(()=>{const p=s.current;return!!(p?.tagName==="A"&&p?.href)}),{props:u}=UZ({focusableWhenDisabled:n,disabled:t,composite:i,tabIndex:r,isNativeButton:o}),l=a.useCallback(()=>{const p=s.current;KZ(p)&&i&&t&&u.disabled===void 0&&p.disabled&&(p.disabled=!1)},[t,u.disabled,i]);Se(l,[l]);const d=a.useCallback((p={})=>{const{onClick:m,onMouseDown:g,onKeyUp:y,onKeyDown:x,onPointerDown:w,...b}=p;return uc({type:o?"button":void 0,onClick(C){if(t){C.preventDefault();return}m?.(C)},onMouseDown(C){t||g?.(C)},onKeyDown(C){if(t||(_f(C),x?.(C)),C.baseUIHandlerPrevented)return;const k=C.target===C.currentTarget&&!o&&!c()&&!t,E=C.key==="Enter",$=C.key===" ";k&&(($||E)&&C.preventDefault(),E&&m?.(C))},onKeyUp(C){t||(_f(C),y?.(C)),!C.baseUIHandlerPrevented&&C.target===C.currentTarget&&!o&&!t&&C.key===" "&&m?.(C)},onPointerDown(C){if(t){C.preventDefault();return}w?.(C)}},o?void 0:{role:"button"},u,b)},[t,u,o,c]),f=Oe(p=>{s.current=p,l()});return{getButtonProps:d,buttonRef:f}}function KZ(e){return dt(e)&&e.tagName==="BUTTON"}const YZ={type:"regular-item"};function qZ(e){const{closeOnClick:t,disabled:n=!1,highlighted:r,id:o,store:s,nativeButton:i,itemMetadata:c,nodeId:u}=e,l=a.useRef(null),d=lc(!0),f=d!==void 0,{events:p}=s.useState("floatingTreeRoot"),{getButtonProps:m,buttonRef:g}=GZ({disabled:n,focusableWhenDisabled:!0,native:i}),y=a.useCallback(w=>uc({id:o,role:"menuitem",tabIndex:r?0:-1,onMouseMove(b){u&&p.emit("itemhover",{nodeId:u,target:b.currentTarget})},onMouseEnter(){c.type==="submenu-trigger"&&c.setActive()},onKeyUp(b){b.key===" "&&s.context.typingRef.current&&b.preventBaseUIHandler()},onClick(b){t&&p.emit("close",{domEvent:b,reason:Mk})},onMouseUp(b){if(d){const v=d.initialCursorPointRef.current;if(d.initialCursorPointRef.current=null,f&&v&&Math.abs(b.clientX-v.x)<=1&&Math.abs(b.clientY-v.y)<=1)return}l.current&&s.context.allowMouseUpTriggerRef.current&&(!f||b.button===2)&&c.type==="regular-item"&&l.current.click()}},w,m),[o,r,m,t,p,s,f,d,c,u]),x=Ws(l,g);return a.useMemo(()=>({getItemProps:y,itemRef:x}),[y,x])}const Ak=a.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function XZ(){return a.useContext(Ak)}let JZ=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function QZ(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:s}=e,{register:i,unregister:c,subscribeMapChange:u,elementsRef:l,labelsRef:d,nextIndexRef:f}=XZ(),p=a.useRef(-1),[m,g]=a.useState(s??(o===JZ.GuessFromOrder?()=>{if(p.current===-1){const w=f.current;f.current+=1,p.current=w}return p.current}:-1)),y=a.useRef(null),x=a.useCallback(w=>{if(y.current=w,m!==-1&&w!==null&&(l.current[m]=w,d)){const b=t!==void 0;d.current[m]=b?t:r?.current?.textContent??w.textContent}},[m,l,d,t,r]);return Se(()=>{if(s!=null)return;const w=y.current;if(w)return i(w,n),()=>{c(w)}},[s,i,c,n]),Se(()=>{if(s==null)return u(w=>{const b=y.current?w.get(y.current)?.index:null;b!=null&&g(b)})},[s,u,g]),a.useMemo(()=>({ref:x,index:m}),[m,x])}function _k(e){return Cr(e,"base-ui")}function mt(e,t,n,r){let o=!1,s=!1;const i=Wt;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){s=!0},get isCanceled(){return o},get isPropagationAllowed(){return s},trigger:n,...i}}const eU=[];function Nk(e){a.useEffect(e,eU)}const Si=null;let tU=class{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 o=0;o<n.length;o+=1)n[o]?.(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 $i=new tU;let ir=class Dk{static create(){return new Dk}static request(t){return $i.request(t)}static cancel(t){return $i.cancel(t)}currentId=Si;request(t){this.cancel(),this.currentId=$i.request(()=>{this.currentId=Si,t()})}cancel=()=>{this.currentId!==Si&&($i.cancel(this.currentId),this.currentId=Si)};disposeEffect=()=>this.cancel};function im(){const e=fn(ir.create).current;return Nk(e.disposeEffect),e}function nU(e,t=!1,n=!1){const[r,o]=a.useState(e&&t?"idle":void 0),[s,i]=a.useState(e);return e&&!s&&(i(!0),o("starting")),!e&&s&&r!=="ending"&&!n&&o("ending"),!e&&!s&&r==="ending"&&o(void 0),Se(()=>{if(!e&&s&&r!=="ending"&&n){const c=ir.request(()=>{o("ending")});return()=>{ir.cancel(c)}}},[e,s,r,n]),Se(()=>{if(!e||t)return;const c=ir.request(()=>{Lt.flushSync(()=>{o(void 0)})});return()=>{ir.cancel(c)}},[t,e]),Se(()=>{if(!e||!t)return;e&&s&&r!=="idle"&&o("starting");const c=ir.request(()=>{o("idle")});return()=>{ir.cancel(c)}},[t,e,s,o,r]),a.useMemo(()=>({mounted:s,setMounted:i,transitionStatus:r}),[s,r])}function Bt(e){const t=fn(rU,e).current;return t.next=e,Se(t.effect),t}function rU(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function Vr(e){return e==null?e:"current"in e?e.current:e}function oU(e,t=!1,n=!0){const r=im();return Oe((o,s=null)=>{r.cancel();const i=Vr(e);i!=null&&(typeof i.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED?o():r.request(()=>{function c(){i&&Promise.all(i.getAnimations().map(u=>u.finished)).then(()=>{s!=null&&s.aborted||Lt.flushSync(o)}).catch(()=>{if(n){if(s!=null&&s.aborted)return;Lt.flushSync(o)}else i.getAnimations().length>0&&i.getAnimations().some(u=>u.pending||u.playState!=="finished")&&c()})}t?r.request(c):c()}))})}function Vk(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,s=Bt(n),i=Oe(o),c=oU(r,n);a.useEffect(()=>{t&&c(()=>{n===s.current&&i()})},[t,n,i,c,s])}const zk=a.createContext(void 0);function sU(){const e=a.useContext(zk);if(e===void 0)throw new Error(Qr(31));return e}const iU=a.forwardRef(function(t,n){const{render:r,className:o,...s}=t,[i,c]=a.useState(void 0),u=a.useMemo(()=>({setLabelId:c}),[c]),l=kr("div",t,{ref:n,props:{role:"group","aria-labelledby":i,...s}});return h.jsx(zk.Provider,{value:u,children:l})}),aU=a.forwardRef(function(t,n){const{className:r,render:o,id:s,...i}=t,c=_k(s),{setLabelId:u}=sU();return Se(()=>(u(c),()=>{u(void 0)}),[u,c]),kr("div",t,{ref:n,props:{id:c,role:"presentation",...i}})}),cU=a.forwardRef(function(t,n){const{render:r,className:o,id:s,label:i,nativeButton:c=!1,disabled:u=!1,closeOnClick:l=!0,...d}=t,f=QZ({label:i}),p=Ek(!0),m=_k(s),{store:g}=Bo(),y=g.useState("isActive",f.index),x=g.useState("itemProps"),{getItemProps:w,itemRef:b}=qZ({closeOnClick:l,disabled:u,highlighted:y,id:m,store:g,nativeButton:c,nodeId:p?.nodeId,itemMetadata:YZ}),v=a.useMemo(()=>({disabled:u,highlighted:y}),[u,y]);return kr("div",t,{state:v,props:[x,d,w],ref:[b,n,f.ref]})}),as=0;let Ea=class Fk{static create(){return new Fk}currentId=as;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=as,n()},t)}isStarted(){return this.currentId!==as}clear=()=>{this.currentId!==as&&(clearTimeout(this.currentId),this.currentId=as)};disposeEffect=()=>this.clear};function En(){const e=fn(Ea.create).current;return Nk(e.disposeEffect),e}const Ho=typeof navigator<"u",jd=pU(),Bk=hU(),Hk=mU(),lU=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),uU=jd.platform==="MacIntel"&&jd.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(jd.platform),dU=Ho&&/apple/i.test(navigator.vendor),Vf=Ho&&/android/i.test(Bk)||/android/i.test(Hk);Ho&&Bk.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const fU=Hk.includes("jsdom/");function pU(){if(!Ho)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function mU(){if(!Ho)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function hU(){if(!Ho)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const zf="data-base-ui-focusable",Wk="active",Zk="selected",Uk="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",pr="ArrowLeft",mr="ArrowRight",am="ArrowUp",ri="ArrowDown";function ar(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Je(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Nf(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Ht(e){return"composedPath"in e?e.composedPath()[0]:e.target}function bn(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 gU(e){return e.matches("html,body")}function yt(e){return e?.ownerDocument||document}function vU(e){return dt(e)&&e.matches(Uk)}function Ff(e){return e?e.getAttribute("role")==="combobox"&&vU(e):!1}function Sa(e){return e?e.hasAttribute(zf)?e:e.querySelector(`[${zf}]`)||e:null}function xo(e,t,n=!0){return e.filter(o=>o.parentId===t&&(!n||o.context?.open)).flatMap(o=>[o,...xo(e,o.id,n)])}function Sy(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){const o=e.find(s=>s.id===r);r=o?.parentId,o&&(n=n.concat(o))}return n}function wt(e){e.preventDefault(),e.stopPropagation()}function bU(e){return"nativeEvent"in e}function Gk(e){return e.mozInputSource===0&&e.isTrusted?!0:Vf&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Kk(e){return fU?!1:!Vf&&e.width===0&&e.height===0||Vf&&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 yU(e,t){const n=["mouse","pen"];return n.push("",void 0),n.includes(e)}function wU(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const xU=["top","right","bottom","left"],To=Math.min,qt=Math.max,$a=Math.round,mo=Math.floor,Mn=e=>({x:e,y:e}),CU={left:"right",right:"left",bottom:"top",top:"bottom"},kU={start:"end",end:"start"};function Bf(e,t,n){return qt(e,To(t,n))}function Gn(e,t){return typeof e=="function"?e(t):e}function tn(e){return e.split("-")[0]}function Sr(e){return e.split("-")[1]}function cm(e){return e==="x"?"y":"x"}function lm(e){return e==="y"?"height":"width"}const EU=new Set(["top","bottom"]);function cn(e){return EU.has(tn(e))?"y":"x"}function um(e){return cm(cn(e))}function SU(e,t,n){n===void 0&&(n=!1);const r=Sr(e),o=um(e),s=lm(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Oa(i)),[i,Oa(i)]}function $U(e){const t=Oa(e);return[Hf(e),t,Hf(t)]}function Hf(e){return e.replace(/start|end/g,t=>kU[t])}const $y=["left","right"],Oy=["right","left"],OU=["top","bottom"],LU=["bottom","top"];function jU(e,t,n){switch(e){case"top":case"bottom":return n?t?Oy:$y:t?$y:Oy;case"left":case"right":return t?OU:LU;default:return[]}}function RU(e,t,n,r){const o=Sr(e);let s=jU(tn(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Hf)))),s}function Oa(e){return e.replace(/left|right|bottom|top/g,t=>CU[t])}function PU(e){return{top:0,right:0,bottom:0,left:0,...e}}function Yk(e){return typeof e!="number"?PU(e):{top:e,right:e,bottom:e,left:e}}function La(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Oi(e,t,n){return Math.floor(e/t)!==n}function Ss(e,t){return t<0||t>=e.current.length}function Rd(e,t){return St(e,{disabledIndices:t})}function Ly(e,t){return St(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function St(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let s=t;do s+=n?-o:o;while(s>=0&&s<=e.current.length-1&&$s(e,s,r));return s}function MU(e,{event:t,orientation:n,loopFocus:r,rtl:o,cols:s,disabledIndices:i,minIndex:c,maxIndex:u,prevIndex:l,stopEvent:d=!1}){let f=l;const p=[],m={};let g=!1;{let w=null,b=-1;e.current.forEach((v,C)=>{if(v==null)return;const k=v.closest('[role="row"]');k&&(g=!0),(k!==w||b===-1)&&(w=k,b+=1,p[b]=[]),p[b].push(C),m[C]=b})}const y=g&&p.length>0&&p.some(w=>w.length!==s);function x(w){if(!y||l===-1)return;const b=m[l];if(b==null)return;const v=p[b].indexOf(l);let C=w==="up"?b-1:b+1;r&&(C<0?C=p.length-1:C>=p.length&&(C=0));const k=new Set;for(;C>=0&&C<p.length&&!k.has(C);){k.add(C);const E=p[C];if(E.length===0){C=w==="up"?C-1:C+1;continue}const $=Math.min(v,E.length-1);for(let S=$;S>=0;S-=1){const j=E[S];if(!$s(e,j,i))return j}C=w==="up"?C-1:C+1,r&&(C<0?C=p.length-1:C>=p.length&&(C=0))}}if(t.key===am){const w=x("up");if(w!==void 0)d&&wt(t),f=w;else{if(d&&wt(t),l===-1)f=u;else if(f=St(e,{startingIndex:f,amount:s,decrement:!0,disabledIndices:i}),r&&(l-s<c||f<0)){const b=l%s,v=u%s,C=u-(v-b);v===b?f=u:f=v>b?C:C-s}Ss(e,f)&&(f=l)}}if(t.key===ri){const w=x("down");w!==void 0?(d&&wt(t),f=w):(d&&wt(t),l===-1?f=c:(f=St(e,{startingIndex:l,amount:s,disabledIndices:i}),r&&l+s>u&&(f=St(e,{startingIndex:l%s-s,amount:s,disabledIndices:i}))),Ss(e,f)&&(f=l))}if(n==="both"){const w=mo(l/s);t.key===(o?pr:mr)&&(d&&wt(t),l%s!==s-1?(f=St(e,{startingIndex:l,disabledIndices:i}),r&&Oi(f,s,w)&&(f=St(e,{startingIndex:l-l%s-1,disabledIndices:i}))):r&&(f=St(e,{startingIndex:l-l%s-1,disabledIndices:i})),Oi(f,s,w)&&(f=l)),t.key===(o?mr:pr)&&(d&&wt(t),l%s!==0?(f=St(e,{startingIndex:l,decrement:!0,disabledIndices:i}),r&&Oi(f,s,w)&&(f=St(e,{startingIndex:l+(s-l%s),decrement:!0,disabledIndices:i}))):r&&(f=St(e,{startingIndex:l+(s-l%s),decrement:!0,disabledIndices:i})),Oi(f,s,w)&&(f=l));const b=mo(u/s)===w;Ss(e,f)&&(r&&b?f=t.key===(o?mr:pr)?u:St(e,{startingIndex:l-l%s-1,disabledIndices:i}):f=l)}return f}function TU(e,t,n){const r=[];let o=0;return e.forEach(({width:s,height:i},c)=>{let u=!1;for(n&&(o=0);!u;){const l=[];for(let d=0;d<s;d+=1)for(let f=0;f<i;f+=1)l.push(o+d+f*t);o%t+s<=t&&l.every(d=>r[d]==null)?(l.forEach(d=>{r[d]=c}),u=!0):o+=1}}),[...r]}function IU(e,t,n,r,o){if(e===-1)return-1;const s=n.indexOf(e),i=t[e];switch(o){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*r:s;case"br":return n.lastIndexOf(e);default:return-1}}function AU(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function $s(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r?r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true":!1}var _U=["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] *)"],ja=_U.join(","),qk=typeof Element>"u",Io=qk?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ra=!qk&&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},Pa=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Pa(t.parentNode));return i},NU=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Xk=function(t,n,r){if(Pa(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(ja));return n&&Io.call(t,ja)&&o.unshift(t),o=o.filter(r),o},Ma=function(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Pa(i,!1))if(i.tagName==="SLOT"){var c=i.assignedElements(),u=c.length?c:i.children,l=Ma(u,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:i,candidates:l})}else{var d=Io.call(i,ja);d&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var f=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),p=!Pa(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(f&&p){var m=Ma(f===!0?i.children:f.children,!0,r);r.flatten?o.push.apply(o,m):o.push({scopeParent:i,candidates:m})}else s.unshift.apply(s,i.children)}}return o},Jk=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Qk=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||NU(t))&&!Jk(t)?0:t.tabIndex},DU=function(t,n){var r=Qk(t);return r<0&&n&&!Jk(t)?0:r},VU=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},e5=function(t){return t.tagName==="INPUT"},zU=function(t){return e5(t)&&t.type==="hidden"},FU=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},BU=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},HU=function(t){if(!t.name)return!0;var n=t.form||Ra(t),r=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){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",i.message),!1}var s=BU(o,t.form);return!s||s===t},WU=function(t){return e5(t)&&t.type==="radio"},ZU=function(t){return WU(t)&&!HU(t)},UU=function(t){var n,r=t&&Ra(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,c,u;for(s=!!((i=o)!==null&&i!==void 0&&(c=i.ownerDocument)!==null&&c!==void 0&&c.contains(o)||t!=null&&(u=t.ownerDocument)!==null&&u!==void 0&&u.contains(t));!s&&o;){var l,d,f;r=Ra(o),o=(l=r)===null||l===void 0?void 0:l.host,s=!!((d=o)!==null&&d!==void 0&&(f=d.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return s},jy=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},GU=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(t).visibility==="hidden")return!0;var i=Io.call(t,"details>summary:first-of-type"),c=i?t.parentElement:t;if(Io.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var u=t;t;){var l=t.parentElement,d=Ra(t);if(l&&!l.shadowRoot&&o(l)===!0)return jy(t);t.assignedSlot?t=t.assignedSlot:!l&&d!==t.ownerDocument?t=d.host:t=l}t=u}if(UU(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return jy(t);return!1},KU=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 o=n.children.item(r);if(o.tagName==="LEGEND")return Io.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Wf=function(t,n){return!(n.disabled||zU(n)||GU(n,t)||FU(n)||KU(n))},Zf=function(t,n){return!(ZU(n)||Qk(n)<0||!Wf(t,n))},YU=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},t5=function(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,c=i?o.scopeParent:o,u=DU(c,i),l=i?t5(o.candidates):c;u===0?i?n.push.apply(n,l):n.push(c):r.push({documentOrder:s,tabIndex:u,item:o,isScope:i,content:l})}),r.sort(VU).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},gc=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Ma([t],n.includeContainer,{filter:Zf.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:YU}):r=Xk(t,n.includeContainer,Zf.bind(null,n)),t5(r)},qU=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Ma([t],n.includeContainer,{filter:Wf.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Xk(t,n.includeContainer,Wf.bind(null,n)),r},n5=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Io.call(t,ja)===!1?!1:Zf(n,t)};const oi=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function r5(e,t){const n=gc(e,oi()),r=n.length;if(r===0)return;const o=ar(yt(e)),s=n.indexOf(o),i=s===-1?t===1?0:r-1:s+t;return n[i]}function o5(e){return r5(yt(e).body,1)||e}function s5(e){return r5(yt(e).body,-1)||e}function Os(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Je(n,r)}function XU(e){gc(e,oi()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Ry(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 i5(){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 a5{nodesRef={current:[]};events=i5();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 c5=a.createContext(null),l5=a.createContext(null),$r=()=>a.useContext(c5)?.id||null,Wo=e=>{const t=a.useContext(l5);return e??t};function JU(e){const t=Cr(),n=Wo(e),r=$r();return Se(()=>{if(!t)return;const o={id:t,parentId:r};return n?.addNode(o),()=>{n?.removeNode(o)}},[n,t,r]),t}function QU(e){const{children:t,id:n}=e,r=$r();return h.jsx(c5.Provider,{value:a.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function eG(e){const{children:t,externalTree:n}=e,r=fn(()=>n??new a5).current;return h.jsx(l5.Provider,{value:r,children:t})}function Zs(e){return`data-base-ui-${e}`}const u5={clip:"rect(0 0 0 0)",overflow:"hidden",whiteSpace:"nowrap",position:"fixed",top:0,left:0,border:0,padding:0,width:1,height:1,margin:-1};function Gr(e){return e?.ownerDocument||document}const Ta=a.forwardRef(function(t,n){const[r,o]=a.useState();Se(()=>{dU&&o("button")},[]);const s={tabIndex:0,role:r};return h.jsx("span",{...t,ref:n,style:u5,"aria-hidden":r?void 0:!0,...s,"data-base-ui-focus-guard":""})});let Py=0;function Xi(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Py);const s=()=>e?.focus({preventScroll:n});o?s():Py=requestAnimationFrame(s)}const Co={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function My(e){return e==="inert"?Co.inert:e==="aria-hidden"?Co["aria-hidden"]:Co.none}let Li=new WeakSet,ji={},Pd=0;const d5=e=>e&&(e.host||d5(e.parentNode)),tG=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=d5(n);return e.contains(r)?r:null}).filter(n=>n!=null);function nG(e,t,n,r){const o="data-base-ui-inert",s=r?"inert":n?"aria-hidden":null,i=tG(t,e),c=new Set,u=new Set(i),l=[];ji[o]||(ji[o]=new WeakMap);const d=ji[o];i.forEach(f),p(t),c.clear();function f(m){!m||c.has(m)||(c.add(m),m.parentNode&&f(m.parentNode))}function p(m){!m||u.has(m)||[].forEach.call(m.children,g=>{if(Er(g)!=="script")if(c.has(g))p(g);else{const y=s?g.getAttribute(s):null,x=y!==null&&y!=="false",w=My(s),b=(w.get(g)||0)+1,v=(d.get(g)||0)+1;w.set(g,b),d.set(g,v),l.push(g),b===1&&x&&Li.add(g),v===1&&g.setAttribute(o,""),!x&&s&&g.setAttribute(s,s==="inert"?"":"true")}})}return Pd+=1,()=>{l.forEach(m=>{const g=My(s),x=(g.get(m)||0)-1,w=(d.get(m)||0)-1;g.set(m,x),d.set(m,w),x||(!Li.has(m)&&s&&m.removeAttribute(s),Li.delete(m)),w||m.removeAttribute(o)}),Pd-=1,Pd||(Co.inert=new WeakMap,Co["aria-hidden"]=new WeakMap,Co.none=new WeakMap,Li=new WeakSet,ji={})}}function rG(e,t=!1,n=!1){const r=yt(e[0]).body;return nG(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const f5=a.createContext(null),p5=()=>a.useContext(f5),oG=Zs("portal");function sG(e={}){const{ref:t,container:n,componentProps:r=Wt,elementProps:o,elementState:s}=e,i=Cr(),u=p5()?.portalNode,[l,d]=a.useState(null),[f,p]=a.useState(null),m=a.useRef(null);Se(()=>{if(n===null){m.current&&(m.current=null,p(null),d(null));return}if(i==null)return;const x=(n&&(om(n)?n:n.current))??u??document.body;if(x==null){m.current&&(m.current=null,p(null),d(null));return}m.current!==x&&(m.current=x,p(null),d(x))},[n,u,i]);const g=kr("div",r,{ref:[t,p],state:s,props:[{id:i,[oG]:""},o]});return{portalNode:f,portalSubtree:l&&g?Lt.createPortal(g,l):null}}const iG=a.forwardRef(function(t,n){const{children:r,container:o,className:s,render:i,renderGuards:c,...u}=t,{portalNode:l,portalSubtree:d}=sG({container:o,ref:n,componentProps:t,elementProps:u}),f=a.useRef(null),p=a.useRef(null),m=a.useRef(null),g=a.useRef(null),[y,x]=a.useState(null),w=y?.modal,b=y?.open,v=typeof c=="boolean"?c:!!y&&!y.modal&&y.open&&!!l;a.useEffect(()=>{if(!l||w)return;function k(E){l&&Os(E)&&(E.type==="focusin"?Ry:XU)(l)}return l.addEventListener("focusin",k,!0),l.addEventListener("focusout",k,!0),()=>{l.removeEventListener("focusin",k,!0),l.removeEventListener("focusout",k,!0)}},[l,w]),a.useEffect(()=>{!l||b||Ry(l)},[b,l]);const C=a.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:g,portalNode:l,setFocusManagerState:x}),[l]);return h.jsxs(a.Fragment,{children:[d,h.jsxs(f5.Provider,{value:C,children:[v&&l&&h.jsx(Ta,{"data-type":"outside",ref:f,onFocus:k=>{if(Os(k,l))m.current?.focus();else{const E=y?y.domReference:null;s5(E)?.focus()}}}),v&&l&&h.jsx("span",{"aria-owns":l.id,style:gZ}),l&&Lt.createPortal(r,l),v&&l&&h.jsx(Ta,{"data-type":"outside",ref:p,onFocus:k=>{if(Os(k,l))g.current?.focus();else{const E=y?y.domReference:null;o5(E)?.focus(),y?.closeOnFocusOut&&y?.onOpenChange(!1,mt(dc,k.nativeEvent))}}})]})]})});function aG(e,t){const n=Ct(e.target);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 Ty=20;let cr=[];function dm(){cr=cr.filter(e=>e.isConnected)}function cG(e){dm(),e&&Er(e)!=="body"&&(cr.push(e),cr.length>Ty&&(cr=cr.slice(-Ty)))}function Md(){return dm(),cr[cr.length-1]}function lG(e){if(!e)return null;const t=oi();return n5(e,t)?e:gc(e,t)[0]||e}function uG(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():rn(e).display!=="none"}function Iy(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=oi(),o=qU(e,n).filter(i=>{const c=i.getAttribute("data-tabindex")||"";return n5(i,n)||i.hasAttribute("data-tabindex")&&!c.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||o.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function dG(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],initialFocus:s=!0,returnFocus:i=!0,restoreFocus:c=!1,modal:u=!0,closeOnFocusOut:l=!0,openInteractionType:d="",getInsideElements:f=()=>[],nextFocusableElement:p,previousFocusableElement:m,beforeContentFocusGuardRef:g,externalTree:y}=e,x="rootStore"in t?t.rootStore:t,w=x.useState("open"),b=x.useState("domReferenceElement"),v=x.useState("floatingElement"),{events:C,dataRef:k}=x.context,E=Oe(()=>k.current.floatingContext?.nodeId),$=Oe(f),S=s===!1,j=Ff(b)&&S,R=Bt(o),T=Bt(s),A=Bt(i),L=Bt(d),V=Wo(y),I=p5(),_=a.useRef(null),N=a.useRef(null),O=a.useRef(!1),z=a.useRef(!1),M=a.useRef(!1),q=a.useRef(-1),ee=a.useRef(""),G=a.useRef(""),ue=En(),se=En(),ne=im(),re=I!=null,ie=Sa(v),ae=Oe((X=ie)=>X?gc(X,oi()):[]),pe=Oe(X=>{const te=ae(X);return R.current.map(()=>te).filter(Boolean).flat()});a.useEffect(()=>{if(r||!u)return;function X(ke){ke.key==="Tab"&&Je(ie,ar(yt(ie)))&&ae().length===0&&!j&&wt(ke)}const te=yt(ie);return te.addEventListener("keydown",X),()=>{te.removeEventListener("keydown",X)}},[r,b,ie,u,R,j,ae,pe]),a.useEffect(()=>{if(r||!v)return;function X(te){const ke=Ht(te),U=ae().indexOf(ke);U!==-1&&(q.current=U)}return v.addEventListener("focusin",X),()=>{v.removeEventListener("focusin",X)}},[r,v,ae]),a.useEffect(()=>{if(r||!w)return;const X=yt(ie);function te(){M.current=!1}function ke(U){const W=Ht(U),le=Je(v,W)||Je(b,W)||Je(I?.portalNode,W);M.current=!le,G.current=U.pointerType||"keyboard"}function Ce(){G.current="keyboard"}return X.addEventListener("pointerdown",ke,!0),X.addEventListener("pointerup",te,!0),X.addEventListener("pointercancel",te,!0),X.addEventListener("keydown",Ce,!0),()=>{X.removeEventListener("pointerdown",ke,!0),X.removeEventListener("pointerup",te,!0),X.removeEventListener("pointercancel",te,!0),X.removeEventListener("keydown",Ce,!0)}},[r,v,b,ie,w,I]),a.useEffect(()=>{if(r||!l)return;function X(){z.current=!0,se.start(0,()=>{z.current=!1})}function te(W){const le=W.relatedTarget,J=W.currentTarget,de=Ht(W);queueMicrotask(()=>{const Z=E(),ye=x.context.triggerElements,Pe=!(Je(b,le)||Je(v,le)||Je(le,v)||Je(I?.portalNode,le)||le!=null&&ye.hasElement(le)||ye.hasMatchingElement(Ee=>Je(Ee,le))||le?.hasAttribute(Zs("focus-guard"))||V&&(xo(V.nodesRef.current,Z).find(Ee=>Je(Ee.context?.elements.floating,le)||Je(Ee.context?.elements.domReference,le))||Sy(V.nodesRef.current,Z).find(Ee=>[Ee.context?.elements.floating,Sa(Ee.context?.elements.floating)].includes(le)||Ee.context?.elements.domReference===le)));if(J===b&&ie&&Iy(ie,R),c&&J!==b&&!uG(de)&&ar(yt(ie))===yt(ie).body){if(dt(ie)&&(ie.focus(),c==="popup")){ne.request(()=>{ie.focus()});return}const Ee=q.current,Fe=ae(),nt=Fe[Ee]||Fe[Fe.length-1]||ie;dt(nt)&&nt.focus()}if(k.current.insideReactTree){k.current.insideReactTree=!1;return}(j||!u)&&le&&Pe&&!z.current&&(j||le!==Md())&&(O.current=!0,x.setOpen(!1,mt(dc,W)))})}function ke(){M.current||(k.current.insideReactTree=!0,ue.start(0,()=>{k.current.insideReactTree=!1}))}const Ce=dt(b)?b:null,U=[];if(!(!v&&!Ce))return Ce&&(Ce.addEventListener("focusout",te),Ce.addEventListener("pointerdown",X),U.push(()=>{Ce.removeEventListener("focusout",te),Ce.removeEventListener("pointerdown",X)})),v&&(v.addEventListener("focusout",te),I&&(v.addEventListener("focusout",ke,!0),U.push(()=>{v.removeEventListener("focusout",ke,!0)})),U.push(()=>{v.removeEventListener("focusout",te)})),()=>{U.forEach(W=>{W()})}},[r,b,v,ie,u,V,I,x,l,c,ae,j,E,R,k,ue,se,ne]);const P=a.useRef(null),K=a.useRef(null),B=Ws(P,g,I?.beforeInsideRef),ve=Ws(K,I?.afterInsideRef);a.useEffect(()=>{if(r||!v||!w)return;const X=Array.from(I?.portalNode?.querySelectorAll(`[${Zs("portal")}]`)||[]),ke=(V?Sy(V.nodesRef.current,E()):[]).find(W=>Ff(W.context?.elements.domReference||null))?.context?.elements.domReference,Ce=[v,ke,...X,...$(),_.current,N.current,P.current,K.current,I?.beforeOutsideRef.current,I?.afterOutsideRef.current,Vr(m),Vr(p),j?b:null].filter(W=>W!=null),U=rG(Ce,u||j);return()=>{U()}},[w,r,b,v,u,R,I,j,V,E,$,p,m]),Se(()=>{if(!w||r||!dt(ie))return;const X=yt(ie),te=ar(X);queueMicrotask(()=>{const ke=pe(ie),Ce=T.current,U=typeof Ce=="function"?Ce(L.current||""):Ce;if(U===void 0||U===!1)return;let W;U===!0||U===null?W=ke[0]||ie:W=Vr(U),W=W||ke[0]||ie,!Je(ie,te)&&Xi(W,{preventScroll:W===ie})})},[r,w,ie,S,pe,T,L]),Se(()=>{if(r||!ie)return;const X=yt(ie),te=ar(X);cG(te);function ke(W){if(W.open||(ee.current=aG(W.nativeEvent,G.current)),W.reason===Hr&&W.nativeEvent.type==="mouseleave"&&(O.current=!0),W.reason===rm)if(W.nested)O.current=!1;else if(Gk(W.nativeEvent)||Kk(W.nativeEvent))O.current=!1;else{let le=!1;document.createElement("div").focus({get preventScroll(){return le=!0,!1}}),le?O.current=!1:O.current=!0}}C.on("openchange",ke);const Ce=X.createElement("span");Ce.setAttribute("tabindex","-1"),Ce.setAttribute("aria-hidden","true"),Object.assign(Ce.style,u5),re&&b&&b.insertAdjacentElement("afterend",Ce);function U(){const W=A.current;let le=typeof W=="function"?W(ee.current):W;if(le===void 0||le===!1)return null;if(le===null&&(le=!0),typeof le=="boolean"){const de=b||Md();return de&&de.isConnected?de:Ce}const J=b||Md()||Ce;return Vr(le)||J}return()=>{C.off("openchange",ke);const W=ar(X),le=Je(v,W)||V&&xo(V.nodesRef.current,E(),!1).some(de=>Je(de.context?.elements.floating,W)),J=U();queueMicrotask(()=>{const de=lG(J),Z=typeof A.current!="boolean";A.current&&!O.current&&dt(de)&&(!(!Z&&de!==W&&W!==X.body)||le)&&de.focus({preventScroll:!0}),Ce.remove()})}},[r,v,ie,A,k,C,V,re,b,E]),a.useEffect(()=>{queueMicrotask(()=>{O.current=!1})},[r]),a.useEffect(()=>{if(r||!w)return;function X(ke){Ht(ke)?.closest(`[${mZ}]`)&&(z.current=!0)}const te=yt(ie);return te.addEventListener("pointerdown",X,!0),()=>{te.removeEventListener("pointerdown",X,!0)}},[r,w,ie]),Se(()=>{if(!r&&I)return I.setFocusManagerState({modal:u,closeOnFocusOut:l,open:w,onOpenChange:x.setOpen,domReference:b}),()=>{I.setFocusManagerState(null)}},[r,I,u,w,x,l,b]),Se(()=>{if(!(r||!ie))return Iy(ie,R),()=>{queueMicrotask(dm)}},[r,ie,R]);const Q=!r&&(u?!j:!0)&&(re||u);return h.jsxs(a.Fragment,{children:[Q&&h.jsx(Ta,{"data-type":"inside",ref:B,onFocus:X=>{if(u){const te=pe();Xi(te[te.length-1])}else I?.portalNode&&(O.current=!1,Os(X,I.portalNode)?o5(b)?.focus():Vr(m??I.beforeOutsideRef)?.focus())}}),n,Q&&h.jsx(Ta,{"data-type":"inside",ref:ve,onFocus:X=>{u?Xi(pe()[0]):I?.portalNode&&(l&&(O.current=!0),Os(X,I.portalNode)?s5(b)?.focus():Vr(p??I.afterOutsideRef)?.focus())}})]})}function Ay(e,t,n){let{reference:r,floating:o}=e;const s=cn(t),i=um(t),c=lm(i),u=tn(t),l=s==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[c]/2-o[c]/2;let m;switch(u){case"top":m={x:d,y:r.y-o.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-o.width,y:f};break;default:m={x:r.x,y:r.y}}switch(Sr(t)){case"start":m[i]-=p*(n&&l?-1:1);break;case"end":m[i]+=p*(n&&l?-1:1);break}return m}async function fG(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:c,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=Gn(t,e),g=Yk(m),x=c[p?f==="floating"?"reference":"floating":f],w=La(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:l,rootBoundary:d,strategy:u})),b=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),C=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},k=La(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:b,offsetParent:v,strategy:u}):b);return{top:(w.top-k.top+g.top)/C.y,bottom:(k.bottom-w.bottom+g.bottom)/C.y,left:(w.left-k.left+g.left)/C.x,right:(k.right-w.right+g.right)/C.x}}const pG=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,c=s.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=Ay(l,r,u),p=r,m={},g=0;for(let x=0;x<c.length;x++){var y;const{name:w,fn:b}=c[x],{x:v,y:C,data:k,reset:E}=await b({x:d,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:m,rects:l,platform:{...i,detectOverflow:(y=i.detectOverflow)!=null?y:fG},elements:{reference:e,floating:t}});d=v??d,f=C??f,m={...m,[w]:{...m[w],...k}},E&&g<=50&&(g++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(l=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:d,y:f}=Ay(l,p,u)),x=-1)}return{x:d,y:f,placement:p,strategy:o,middlewareData:m}},mG=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:c,platform:u,elements:l}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...x}=Gn(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=tn(o),b=cn(c),v=tn(c)===c,C=await(u.isRTL==null?void 0:u.isRTL(l.floating)),k=p||(v||!y?[Oa(c)]:$U(c)),E=g!=="none";!p&&E&&k.push(...RU(c,y,g,C));const $=[c,...k],S=await u.detectOverflow(t,x),j=[];let R=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&j.push(S[w]),f){const V=SU(o,i,C);j.push(S[V[0]],S[V[1]])}if(R=[...R,{placement:o,overflows:j}],!j.every(V=>V<=0)){var T,A;const V=(((T=s.flip)==null?void 0:T.index)||0)+1,I=$[V];if(I&&(!(f==="alignment"?b!==cn(I):!1)||R.every(O=>cn(O.placement)===b?O.overflows[0]>0:!0)))return{data:{index:V,overflows:R},reset:{placement:I}};let _=(A=R.filter(N=>N.overflows[0]<=0).sort((N,O)=>N.overflows[1]-O.overflows[1])[0])==null?void 0:A.placement;if(!_)switch(m){case"bestFit":{var L;const N=(L=R.filter(O=>{if(E){const z=cn(O.placement);return z===b||z==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(z=>z>0).reduce((z,M)=>z+M,0)]).sort((O,z)=>O[1]-z[1])[0])==null?void 0:L[0];N&&(_=N);break}case"initialPlacement":_=c;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function _y(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ny(e){return xU.some(t=>e[t]>=0)}const hG=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=Gn(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),c=_y(i,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Ny(c)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),c=_y(i,n.floating);return{data:{escapedOffsets:c,escaped:Ny(c)}}}default:return{}}}}},m5=new Set(["left","top"]);async function gG(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=tn(n),c=Sr(n),u=cn(n)==="y",l=m5.has(i)?-1:1,d=s&&u?-1:1,f=Gn(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof g=="number"&&(m=c==="end"?g*-1:g),u?{x:m*d,y:p*l}:{x:p*l,y:m*d}}const vG=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:c}=t,u=await gG(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:s+u.y,data:{...u,placement:i}}}}},bG=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:c=!1,limiter:u={fn:w=>{let{x:b,y:v}=w;return{x:b,y:v}}},...l}=Gn(e,t),d={x:n,y:r},f=await s.detectOverflow(t,l),p=cn(tn(o)),m=cm(p);let g=d[m],y=d[p];if(i){const w=m==="y"?"top":"left",b=m==="y"?"bottom":"right",v=g+f[w],C=g-f[b];g=Bf(v,g,C)}if(c){const w=p==="y"?"top":"left",b=p==="y"?"bottom":"right",v=y+f[w],C=y-f[b];y=Bf(v,y,C)}const x=u.fn({...t,[m]:g,[p]:y});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[m]:i,[p]:c}}}}}},yG=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:u=!0,crossAxis:l=!0}=Gn(e,t),d={x:n,y:r},f=cn(o),p=cm(f);let m=d[p],g=d[f];const y=Gn(c,t),x=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(u){const v=p==="y"?"height":"width",C=s.reference[p]-s.floating[v]+x.mainAxis,k=s.reference[p]+s.reference[v]-x.mainAxis;m<C?m=C:m>k&&(m=k)}if(l){var w,b;const v=p==="y"?"width":"height",C=m5.has(tn(o)),k=s.reference[f]-s.floating[v]+(C&&((w=i.offset)==null?void 0:w[f])||0)+(C?0:x.crossAxis),E=s.reference[f]+s.reference[v]+(C?0:((b=i.offset)==null?void 0:b[f])||0)-(C?x.crossAxis:0);g<k?g=k:g>E&&(g=E)}return{[p]:m,[f]:g}}}},wG=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:c}=t,{apply:u=()=>{},...l}=Gn(e,t),d=await i.detectOverflow(t,l),f=tn(o),p=Sr(o),m=cn(o)==="y",{width:g,height:y}=s.floating;let x,w;f==="top"||f==="bottom"?(x=f,w=p===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(w=f,x=p==="end"?"top":"bottom");const b=y-d.top-d.bottom,v=g-d.left-d.right,C=To(y-d[x],b),k=To(g-d[w],v),E=!t.middlewareData.shift;let $=C,S=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=v),(r=t.middlewareData.shift)!=null&&r.enabled.y&&($=b),E&&!p){const R=qt(d.left,0),T=qt(d.right,0),A=qt(d.top,0),L=qt(d.bottom,0);m?S=g-2*(R!==0||T!==0?R+T:qt(d.left,d.right)):$=y-2*(A!==0||L!==0?A+L:qt(d.top,d.bottom))}await u({...t,availableWidth:S,availableHeight:$});const j=await i.getDimensions(c.floating);return g!==j.width||y!==j.height?{reset:{rects:!0}}:{}}}};function h5(e){const t=rn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=dt(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,c=$a(n)!==s||$a(r)!==i;return c&&(n=s,r=i),{width:n,height:r,$:c}}function fm(e){return Qe(e)?e:e.contextElement}function ko(e){const t=fm(e);if(!dt(t))return Mn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=h5(t);let i=(s?$a(n.width):n.width)/r,c=(s?$a(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const xG=Mn(0);function g5(e){const t=Ct(e);return!mc()||!t.visualViewport?xG:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function CG(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ct(e)?!1:t}function Kr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=fm(e);let i=Mn(1);t&&(r?Qe(r)&&(i=ko(r)):i=ko(e));const c=CG(s,n,r)?g5(s):Mn(0);let u=(o.left+c.x)/i.x,l=(o.top+c.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const p=Ct(s),m=r&&Qe(r)?Ct(r):r;let g=p,y=Df(g);for(;y&&r&&m!==g;){const x=ko(y),w=y.getBoundingClientRect(),b=rn(y),v=w.left+(y.clientLeft+parseFloat(b.paddingLeft))*x.x,C=w.top+(y.clientTop+parseFloat(b.paddingTop))*x.y;u*=x.x,l*=x.y,d*=x.x,f*=x.y,u+=v,l+=C,g=Ct(y),y=Df(g)}}return La({width:d,height:f,x:u,y:l})}function vc(e,t){const n=hc(e).scrollLeft;return t?t.left+n:Kr(Vn(e)).left+n}function v5(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-vc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function kG(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Vn(r),c=t?pc(t.floating):!1;if(r===i||c&&s)return n;let u={scrollLeft:0,scrollTop:0},l=Mn(1);const d=Mn(0),f=dt(r);if((f||!f&&!s)&&((Er(r)!=="body"||eo(i))&&(u=hc(r)),dt(r))){const m=Kr(r);l=ko(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const p=i&&!f&&!s?v5(i,u):Mn(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+d.x+p.x,y:n.y*l.y-u.scrollTop*l.y+d.y+p.y}}function EG(e){return Array.from(e.getClientRects())}function SG(e){const t=Vn(e),n=hc(e),r=e.ownerDocument.body,o=qt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=qt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+vc(e);const c=-n.scrollTop;return rn(r).direction==="rtl"&&(i+=qt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:c}}const Dy=25;function $G(e,t){const n=Ct(e),r=Vn(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,c=0,u=0;if(o){s=o.width,i=o.height;const d=mc();(!d||d&&t==="fixed")&&(c=o.offsetLeft,u=o.offsetTop)}const l=vc(r);if(l<=0){const d=r.ownerDocument,f=d.body,p=getComputedStyle(f),m=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(r.clientWidth-f.clientWidth-m);g<=Dy&&(s-=g)}else l<=Dy&&(s+=l);return{width:s,height:i,x:c,y:u}}const OG=new Set(["absolute","fixed"]);function LG(e,t){const n=Kr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=dt(e)?ko(e):Mn(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,u=o*s.x,l=r*s.y;return{width:i,height:c,x:u,y:l}}function Vy(e,t,n){let r;if(t==="viewport")r=$G(e,n);else if(t==="document")r=SG(Vn(e));else if(Qe(t))r=LG(t,n);else{const o=g5(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return La(r)}function b5(e,t){const n=Nn(e);return n===t||!Qe(n)||Pn(n)?!1:rn(n).position==="fixed"||b5(n,t)}function jG(e,t){const n=t.get(e);if(n)return n;let r=fr(e,[],!1).filter(c=>Qe(c)&&Er(c)!=="body"),o=null;const s=rn(e).position==="fixed";let i=s?Nn(e):e;for(;Qe(i)&&!Pn(i);){const c=rn(i),u=sm(i);!u&&c.position==="fixed"&&(o=null),(s?!u&&!o:!u&&c.position==="static"&&!!o&&OG.has(o.position)||eo(i)&&!u&&b5(e,i))?r=r.filter(d=>d!==i):o=c,i=Nn(i)}return t.set(e,r),r}function RG(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?pc(t)?[]:jG(t,this._c):[].concat(n),r],c=i[0],u=i.reduce((l,d)=>{const f=Vy(t,d,o);return l.top=qt(f.top,l.top),l.right=To(f.right,l.right),l.bottom=To(f.bottom,l.bottom),l.left=qt(f.left,l.left),l},Vy(t,c,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function PG(e){const{width:t,height:n}=h5(e);return{width:t,height:n}}function MG(e,t,n){const r=dt(t),o=Vn(t),s=n==="fixed",i=Kr(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const u=Mn(0);function l(){u.x=vc(o)}if(r||!r&&!s)if((Er(t)!=="body"||eo(o))&&(c=hc(t)),r){const m=Kr(t,!0,s,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else o&&l();s&&!r&&o&&l();const d=o&&!r&&!s?v5(o,c):Mn(0),f=i.left+c.scrollLeft-u.x-d.x,p=i.top+c.scrollTop-u.y-d.y;return{x:f,y:p,width:i.width,height:i.height}}function Td(e){return rn(e).position==="static"}function zy(e,t){if(!dt(e)||rn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Vn(e)===n&&(n=n.ownerDocument.body),n}function y5(e,t){const n=Ct(e);if(pc(e))return n;if(!dt(e)){let o=Nn(e);for(;o&&!Pn(o);){if(Qe(o)&&!Td(o))return o;o=Nn(o)}return n}let r=zy(e,t);for(;r&&_Z(r)&&Td(r);)r=zy(r,t);return r&&Pn(r)&&Td(r)&&!sm(r)?n:r||FZ(e)||n}const TG=async function(e){const t=this.getOffsetParent||y5,n=this.getDimensions,r=await n(e.floating);return{reference:MG(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function IG(e){return rn(e).direction==="rtl"}const AG={convertOffsetParentRelativeRectToViewportRelativeRect:kG,getDocumentElement:Vn,getClippingRect:RG,getOffsetParent:y5,getElementRects:TG,getClientRects:EG,getDimensions:PG,getScale:ko,isElement:Qe,isRTL:IG};function w5(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function _G(e,t){let n=null,r;const o=Vn(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),s();const l=e.getBoundingClientRect(),{left:d,top:f,width:p,height:m}=l;if(c||t(),!p||!m)return;const g=mo(f),y=mo(o.clientWidth-(d+p)),x=mo(o.clientHeight-(f+m)),w=mo(d),v={rootMargin:-g+"px "+-y+"px "+-x+"px "+-w+"px",threshold:qt(0,To(1,u))||1};let C=!0;function k(E){const $=E[0].intersectionRatio;if($!==u){if(!C)return i();$?i(!1,$):r=setTimeout(()=>{i(!1,1e-7)},1e3)}$===1&&!w5(l,e.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(k,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,v)}n.observe(e)}return i(!0),s}function Fy(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=fm(e),d=o||s?[...l?fr(l):[],...fr(t)]:[];d.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const f=l&&c?_G(l,n):null;let p=-1,m=null;i&&(m=new ResizeObserver(w=>{let[b]=w;b&&b.target===l&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var v;(v=m)==null||v.observe(t)})),n()}),l&&!u&&m.observe(l),m.observe(t));let g,y=u?Kr(e):null;u&&x();function x(){const w=Kr(e);y&&!w5(y,w)&&n(),y=w,g=requestAnimationFrame(x)}return n(),()=>{var w;d.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),f?.(),(w=m)==null||w.disconnect(),m=null,u&&cancelAnimationFrame(g)}}const NG=vG,DG=bG,VG=mG,zG=wG,FG=hG,BG=yG,HG=(e,t,n)=>{const r=new Map,o={platform:AG,...n},s={...o.platform,_c:r};return pG(e,t,{...o,platform:s})};var WG=typeof document<"u",ZG=function(){},Ji=WG?a.useLayoutEffect:ZG;function Ia(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,o;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(!Ia(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Ia(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function x5(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function By(e,t){const n=x5(e);return Math.round(t*n)/n}function Id(e){const t=a.useRef(e);return Ji(()=>{t.current=e}),t}function UG(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:u,open:l}=e,[d,f]=a.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=a.useState(r);Ia(p,r)||m(r);const[g,y]=a.useState(null),[x,w]=a.useState(null),b=a.useCallback(O=>{O!==E.current&&(E.current=O,y(O))},[]),v=a.useCallback(O=>{O!==$.current&&($.current=O,w(O))},[]),C=s||g,k=i||x,E=a.useRef(null),$=a.useRef(null),S=a.useRef(d),j=u!=null,R=Id(u),T=Id(o),A=Id(l),L=a.useCallback(()=>{if(!E.current||!$.current)return;const O={placement:t,strategy:n,middleware:p};T.current&&(O.platform=T.current),HG(E.current,$.current,O).then(z=>{const M={...z,isPositioned:A.current!==!1};V.current&&!Ia(S.current,M)&&(S.current=M,Lt.flushSync(()=>{f(M)}))})},[p,t,n,T,A]);Ji(()=>{l===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,f(O=>({...O,isPositioned:!1})))},[l]);const V=a.useRef(!1);Ji(()=>(V.current=!0,()=>{V.current=!1}),[]),Ji(()=>{if(C&&(E.current=C),k&&($.current=k),C&&k){if(R.current)return R.current(C,k,L);L()}},[C,k,L,R,j]);const I=a.useMemo(()=>({reference:E,floating:$,setReference:b,setFloating:v}),[b,v]),_=a.useMemo(()=>({reference:C,floating:k}),[C,k]),N=a.useMemo(()=>{const O={position:n,left:0,top:0};if(!_.floating)return O;const z=By(_.floating,d.x),M=By(_.floating,d.y);return c?{...O,transform:"translate("+z+"px, "+M+"px)",...x5(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:M}},[n,c,_.floating,d.x,d.y]);return a.useMemo(()=>({...d,update:L,refs:I,elements:_,floatingStyles:N}),[d,L,I,_,N])}const GG=(e,t)=>({...NG(e),options:[e,t]}),KG=(e,t)=>({...DG(e),options:[e,t]}),YG=(e,t)=>({...BG(e),options:[e,t]}),qG=(e,t)=>({...VG(e),options:[e,t]}),XG=(e,t)=>({...zG(e),options:[e,t]}),JG=(e,t)=>({...FG(e),options:[e,t]}),QG={intentional:"onClick",sloppy:"onPointerDown"};function eK(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function tK(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),s=n.useState("referenceElement"),i=n.useState("domReferenceElement"),{onOpenChange:c,dataRef:u}=n.context,{enabled:l=!0,escapeKey:d=!0,outsidePress:f=!0,outsidePressEvent:p="sloppy",referencePress:m=!1,referencePressEvent:g="sloppy",ancestorScroll:y=!1,bubbles:x,externalTree:w}=t,b=Wo(w),v=Oe(typeof f=="function"?f:()=>!1),C=typeof f=="function"?v:f,k=a.useRef(!1),{escapeKey:E,outsidePress:$}=eK(x),S=a.useRef(null),j=En(),R=En(),T=Oe(()=>{R.clear(),u.current.insideReactTree=!1}),A=a.useRef(!1),L=a.useRef(""),V=Oe(P=>{L.current=P.pointerType}),I=Oe(()=>{const P=L.current,K=P==="pen"||!P?"mouse":P,B=typeof p=="function"?p():p;return typeof B=="string"?B:B[K]}),_=Oe(P=>{if(!r||!l||!d||P.key!=="Escape"||A.current)return;const K=u.current.floatingContext?.nodeId,B=b?xo(b.nodesRef.current,K):[];if(!E&&B.length>0){let X=!0;if(B.forEach(te=>{te.context?.open&&!te.context.dataRef.current.__escapeKeyBubbles&&(X=!1)}),!X)return}const ve=bU(P)?P.nativeEvent:P,Q=mt(Tk,ve);n.setOpen(!1,Q),!E&&!Q.isPropagationAllowed&&P.stopPropagation()}),N=Oe(P=>{const K=I();return K==="intentional"&&P.type!=="click"||K==="sloppy"&&P.type==="click"}),O=Oe(()=>{u.current.insideReactTree=!0,R.start(0,T)}),z=Oe((P,K=!1)=>{if(N(P)){T();return}if(u.current.insideReactTree){T();return}if(I()==="intentional"&&K||typeof C=="function"&&!C(P))return;const B=Ht(P),ve=`[${Zs("inert")}]`,Q=yt(n.select("floatingElement")).querySelectorAll(ve),X=n.context.triggerElements;if(B&&(X.hasElement(B)||X.hasMatchingElement(W=>Je(W,B))))return;let te=Qe(B)?B:null;for(;te&&!Pn(te);){const W=Nn(te);if(Pn(W)||!Qe(W))break;te=W}if(Q.length&&Qe(B)&&!gU(B)&&!Je(B,n.select("floatingElement"))&&Array.from(Q).every(W=>!Je(te,W)))return;if(dt(B)&&!("touches"in P)){const W=Pn(B),le=rn(B),J=/auto|scroll/,de=W||J.test(le.overflowX),Z=W||J.test(le.overflowY),ye=de&&B.clientWidth>0&&B.scrollWidth>B.clientWidth,Pe=Z&&B.clientHeight>0&&B.scrollHeight>B.clientHeight,Ee=le.direction==="rtl",Fe=Pe&&(Ee?P.offsetX<=B.offsetWidth-B.clientWidth:P.offsetX>B.clientWidth),nt=ye&&P.offsetY>B.clientHeight;if(Fe||nt)return}const ke=u.current.floatingContext?.nodeId,Ce=b&&xo(b.nodesRef.current,ke).some(W=>bn(P,W.context?.elements.floating));if(bn(P,n.select("floatingElement"))||bn(P,n.select("domReferenceElement"))||Ce)return;const U=b?xo(b.nodesRef.current,ke):[];if(U.length>0){let W=!0;if(U.forEach(le=>{le.context?.open&&!le.context.dataRef.current.__outsidePressBubbles&&(W=!1)}),!W)return}n.setOpen(!1,mt(rm,P)),T()}),M=Oe(P=>{I()!=="sloppy"||P.pointerType==="touch"||!n.select("open")||!l||bn(P,n.select("floatingElement"))||bn(P,n.select("domReferenceElement"))||z(P)}),q=Oe(P=>{if(I()!=="sloppy"||!n.select("open")||!l||bn(P,n.select("floatingElement"))||bn(P,n.select("domReferenceElement")))return;const K=P.touches[0];K&&(S.current={startTime:Date.now(),startX:K.clientX,startY:K.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},j.start(1e3,()=>{S.current&&(S.current.dismissOnTouchEnd=!1,S.current.dismissOnMouseDown=!1)}))}),ee=Oe(P=>{const K=Ht(P);function B(){q(P),K?.removeEventListener(P.type,B)}K?.addEventListener(P.type,B)}),G=Oe(P=>{const K=k.current;if(k.current=!1,j.clear(),P.type==="mousedown"&&S.current&&!S.current.dismissOnMouseDown)return;const B=Ht(P);function ve(){P.type==="pointerdown"?M(P):z(P,K),B?.removeEventListener(P.type,ve)}B?.addEventListener(P.type,ve)}),ue=Oe(P=>{if(I()!=="sloppy"||!S.current||bn(P,n.select("floatingElement"))||bn(P,n.select("domReferenceElement")))return;const K=P.touches[0];if(!K)return;const B=Math.abs(K.clientX-S.current.startX),ve=Math.abs(K.clientY-S.current.startY),Q=Math.sqrt(B*B+ve*ve);Q>5&&(S.current.dismissOnTouchEnd=!0),Q>10&&(z(P),j.clear(),S.current=null)}),se=Oe(P=>{const K=Ht(P);function B(){ue(P),K?.removeEventListener(P.type,B)}K?.addEventListener(P.type,B)}),ne=Oe(P=>{I()!=="sloppy"||!S.current||bn(P,n.select("floatingElement"))||bn(P,n.select("domReferenceElement"))||(S.current.dismissOnTouchEnd&&z(P),j.clear(),S.current=null)}),re=Oe(P=>{const K=Ht(P);function B(){ne(P),K?.removeEventListener(P.type,B)}K?.addEventListener(P.type,B)});a.useEffect(()=>{if(!r||!l)return;u.current.__escapeKeyBubbles=E,u.current.__outsidePressBubbles=$;const P=new Ea;function K(te){n.setOpen(!1,mt(LZ,te))}function B(){P.clear(),A.current=!0}function ve(){P.start(mc()?5:0,()=>{A.current=!1})}const Q=yt(o);Q.addEventListener("pointerdown",V,!0),d&&(Q.addEventListener("keydown",_),Q.addEventListener("compositionstart",B),Q.addEventListener("compositionend",ve)),C&&(Q.addEventListener("click",G,!0),Q.addEventListener("pointerdown",G,!0),Q.addEventListener("touchstart",ee,!0),Q.addEventListener("touchmove",se,!0),Q.addEventListener("touchend",re,!0),Q.addEventListener("mousedown",G,!0));let X=[];return y&&(Qe(i)&&(X=fr(i)),Qe(o)&&(X=X.concat(fr(o))),!Qe(s)&&s&&s.contextElement&&(X=X.concat(fr(s.contextElement)))),X=X.filter(te=>te!==Q.defaultView?.visualViewport),X.forEach(te=>{te.addEventListener("scroll",K,{passive:!0})}),()=>{Q.removeEventListener("pointerdown",V,!0),d&&(Q.removeEventListener("keydown",_),Q.removeEventListener("compositionstart",B),Q.removeEventListener("compositionend",ve)),C&&(Q.removeEventListener("click",G,!0),Q.removeEventListener("pointerdown",G,!0),Q.removeEventListener("touchstart",ee,!0),Q.removeEventListener("touchmove",se,!0),Q.removeEventListener("touchend",re,!0),Q.removeEventListener("mousedown",G,!0)),X.forEach(te=>{te.removeEventListener("scroll",K)}),P.clear()}},[u,o,s,i,d,C,r,c,y,l,E,$,_,z,G,M,ee,se,re,V,n]),a.useEffect(T,[C,T]);const ie=a.useMemo(()=>({onKeyDown:_,...m&&{[QG[g]]:P=>{n.setOpen(!1,mt(ka,P.nativeEvent))},...g!=="intentional"&&{onClick(P){n.setOpen(!1,mt(ka,P.nativeEvent))}}}}),[_,n,m,g]),ae=Oe(P=>{const K=Ht(P.nativeEvent);!Je(n.select("floatingElement"),K)||P.button!==0||(k.current=!0)}),pe=a.useMemo(()=>({onKeyDown:_,onPointerDown:ae,onMouseDown:ae,onMouseUp:ae,onClickCapture:O,onMouseDownCapture:O,onPointerDownCapture:O,onMouseUpCapture:O,onTouchEndCapture:O,onTouchMoveCapture:O}),[_,ae,O]);return a.useMemo(()=>l?{reference:ie,floating:pe,trigger:ie}:{},[l,ie,pe])}var Aa=Symbol("NOT_FOUND");function nK(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function rK(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function oK(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var Hy=e=>Array.isArray(e)?e:[e];function sK(e){const t=Array.isArray(e[0])?e[0]:e;return oK(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function iK(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}function aK(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Aa},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function cK(e,t){let n=[];function r(c){const u=n.findIndex(l=>t(c,l.key));if(u>-1){const l=n[u];return u>0&&(n.splice(u,1),n.unshift(l)),l.value}return Aa}function o(c,u){r(c)===Aa&&(n.unshift({key:c,value:u}),n.length>e&&n.pop())}function s(){return n}function i(){n=[]}return{get:r,put:o,getEntries:s,clear:i}}var lK=(e,t)=>e===t;function uK(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let s=0;s<o;s++)if(!e(n[s],r[s]))return!1;return!0}}function dK(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=lK,maxSize:o=1,resultEqualityCheck:s}=n,i=uK(r);let c=0;const u=o<=1?aK(i):cK(o,i);function l(){let d=u.get(arguments);if(d===Aa){if(d=e.apply(null,arguments),c++,s){const p=u.getEntries().find(m=>s(m.value,d));p&&(d=p.value,c!==0&&c--)}u.put(arguments,d)}return d}return l.clearCache=()=>{u.clear(),l.resetResultsCount()},l.resultsCount=()=>c,l.resetResultsCount=()=>{c=0},l}var fK=class{constructor(t){this.value=t}deref(){return this.value}},pK=typeof WeakRef<"u"?WeakRef:fK,mK=0,Wy=1;function Ri(){return{s:mK,v:void 0,o:null,p:null}}function C5(e,t={}){let n=Ri();const{resultEqualityCheck:r}=t;let o,s=0;function i(){let c=n;const{length:u}=arguments;for(let f=0,p=u;f<p;f++){const m=arguments[f];if(typeof m=="function"||typeof m=="object"&&m!==null){let g=c.o;g===null&&(c.o=g=new WeakMap);const y=g.get(m);y===void 0?(c=Ri(),g.set(m,c)):c=y}else{let g=c.p;g===null&&(c.p=g=new Map);const y=g.get(m);y===void 0?(c=Ri(),g.set(m,c)):c=y}}const l=c;let d;if(c.s===Wy)d=c.v;else if(d=e.apply(null,arguments),s++,r){const f=o?.deref?.()??o;f!=null&&r(f,d)&&(d=f,s!==0&&s--),o=typeof d=="object"&&d!==null||typeof d=="function"?new pK(d):d}return l.s=Wy,l.v=d,d}return i.clearCache=()=>{n=Ri(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function k5(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,i=0,c,u={},l=o.pop();typeof l=="object"&&(u=l,l=o.pop()),nK(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const d={...n,...u},{memoize:f,memoizeOptions:p=[],argsMemoize:m=C5,argsMemoizeOptions:g=[]}=d,y=Hy(p),x=Hy(g),w=sK(o),b=f(function(){return s++,l.apply(null,arguments)},...y),v=m(function(){i++;const k=iK(w,arguments);return c=b.apply(null,k),c},...x);return Object.assign(v,{resultFunc:l,memoizedResultFunc:b,dependencies:w,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>c,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:f,argsMemoize:m})};return Object.assign(r,{withTypes:()=>r}),r}var hK=k5(C5),gK=Object.assign((e,t=hK)=>{rK(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((i,c,u)=>(i[n[u]]=c,i),{}))},{withTypes:()=>gK});k5({memoize:dK,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const Te=(e,t,n,r,o,s,...i)=>{if(i.length>0)throw new Error(Qr(1));let c;if(e)c=e;else throw new Error("Missing arguments");return c};var Ad={exports:{}},_d={};var Zy;function vK(){if(Zy)return _d;Zy=1;var e=Ja();function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function c(f,p){var m=p(),g=r({inst:{value:m,getSnapshot:p}}),y=g[0].inst,x=g[1];return s(function(){y.value=m,y.getSnapshot=p,u(y)&&x({inst:y})},[f,m,p]),o(function(){return u(y)&&x({inst:y}),f(function(){u(y)&&x({inst:y})})},[f]),i(m),m}function u(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!n(f,m)}catch{return!0}}function l(f,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:c;return _d.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,_d}var Uy;function E5(){return Uy||(Uy=1,Ad.exports=vK()),Ad.exports}var bK=E5(),Nd={exports:{}},Dd={};var Gy;function yK(){if(Gy)return Dd;Gy=1;var e=Ja(),t=E5();function n(l,d){return l===d&&(l!==0||1/l===1/d)||l!==l&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,c=e.useMemo,u=e.useDebugValue;return Dd.useSyncExternalStoreWithSelector=function(l,d,f,p,m){var g=s(null);if(g.current===null){var y={hasValue:!1,value:null};g.current=y}else y=g.current;g=c(function(){function w(E){if(!b){if(b=!0,v=E,E=p(E),m!==void 0&&y.hasValue){var $=y.value;if(m($,E))return C=$}return C=E}if($=C,r(v,E))return $;var S=p(E);return m!==void 0&&m($,S)?(v=E,$):(v=E,C=S)}var b=!1,v,C,k=f===void 0?null:f;return[function(){return w(d())},k===null?void 0:function(){return w(k())}]},[d,f,p,m]);var x=o(l,g[0],g[1]);return i(function(){y.hasValue=!0,y.value=x},[x]),u(x),x},Dd}var Ky;function wK(){return Ky||(Ky=1,Nd.exports=yK()),Nd.exports}var xK=wK();const CK=tm(19),kK=CK?SK:$K;function EK(e,t,n,r,o){return kK(e,t,n,r,o)}function SK(e,t,n,r,o){const s=a.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return bK.useSyncExternalStore(e.subscribe,s,s)}function $K(e,t,n,r,o){return xK.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,n,r,o))}let OK=class Qi{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])){Qi.prototype.setState.call(this,{...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||Qi.prototype.setState.call(this,{...this.state,[t]:n})}notifyAll(){const t={...this.state};Qi.prototype.setState.call(this,t)}},S5=class extends OK{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}controlledValues=new Map;useSyncedValue(t,n){a.useDebugValue(t),Se(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){Se(()=>(this.state[t]!==n&&this.set(t,n),()=>{this.set(t,void 0)}),[t,n])}useSyncedValues(t){const n=Object.values(t);Se(()=>{this.update(t)},n)}useControlledProp(t,n,r){a.useDebugValue(t);const o=n!==void 0;this.controlledValues.has(t)||(this.controlledValues.set(t,o),!o&&!Object.is(this.state[t],r)&&super.setState({...this.state,[t]:r})),Se(()=>{o&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r,o])}set(t,n){this.controlledValues.get(t)!==!0&&super.set(t,n)}update(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.update(n)}setState(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.setState({...this.state,...n})}select=(t,n,r,o)=>{const s=this.selectors[t];return s(this.state,n,r,o)};useState=(t,n,r,o)=>{a.useDebugValue(t);const s=this.selectors[t];return EK(this,s,n,r,o)};useContextCallback(t,n){a.useDebugValue(t);const r=Oe(n??jk);this.context[t]=r}useStateSetter(t){const n=a.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 o=r(this.state);return n(o,o,this),this.subscribe(s=>{const i=r(s);if(!Object.is(o,i)){const c=o;o=i,n(i,c,this)}})}};const LK={open:Te(e=>e.open),domReferenceElement:Te(e=>e.domReferenceElement),referenceElement:Te(e=>e.positionReference??e.referenceElement),floatingElement:Te(e=>e.floatingElement),floatingId:Te(e=>e.floatingId)};let pm=class extends S5{constructor(t){const{nested:n,noEmit:r,onOpenChange:o,triggerElements:s,...i}=t;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:i5(),nested:n,noEmit:r,triggerElements:s},LK)}setOpen=(t,n)=>{if((!t||!this.state.open||wU(n.event))&&(this.context.dataRef.current.openEvent=t?n.event:void 0),!this.context.noEmit){const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(t,n)}};function jK(e){const t=e.useState("open");Se(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,o]=n.value;e.update({activeTriggerId:r,activeTriggerElement:o})}}},[t,e])}function RK(e,t,n){const{mounted:r,setMounted:o,transitionStatus:s}=nU(e);t.useSyncedValues({mounted:r,transitionStatus:s});const i=Oe(()=>{o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),c=t.useState("preventUnmountingOnClose");return Vk({enabled:!c,open:e,ref:t.context.popupRef,onComplete(){e||i()}}),{forceUnmount:i,transitionStatus:s}}let mm=class{constructor(){this.elements=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elements.delete(r),this.elements.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elements.delete(n),this.idMap.delete(t))}hasElement(t){return this.elements.has(t)}hasMatchingElement(t){for(const n of this.elements)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}};function PK(){return new pm({open:!1,floatingElement:null,referenceElement:null,triggerElements:new mm,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function MK(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:PK(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:Wt,inactiveTriggerProps:Wt,popupProps:Wt}}const TK={open:Te(e=>e.open),mounted:Te(e=>e.mounted),transitionStatus:Te(e=>e.transitionStatus),floatingRootContext:Te(e=>e.floatingRootContext),preventUnmountingOnClose:Te(e=>e.preventUnmountingOnClose),payload:Te(e=>e.payload),activeTriggerId:Te(e=>e.activeTriggerId),activeTriggerElement:Te(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:Te((e,t)=>t!==void 0&&e.activeTriggerId===t),isOpenedByTrigger:Te((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.open),isMountedByTrigger:Te((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.mounted),triggerProps:Te((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:Te(e=>e.popupProps),popupElement:Te(e=>e.popupElement),positionerElement:Te(e=>e.positionerElement)};function IK(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=Cr(),s=$r()!=null,i=fn(()=>new pm({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:r.triggers??new mm,floatingId:o,nested:s,noEmit:e.noEmit||!1})).current;return Se(()=>{const c={open:t,floatingId:o};r.reference!==void 0&&(c.referenceElement=r.reference,c.domReferenceElement=Qe(r.reference)?r.reference:null),r.floating!==void 0&&(c.floatingElement=r.floating),i.update(c)},[t,o,r.reference,r.floating,i]),i.context.onOpenChange=n,i.context.nested=s,i.context.noEmit=e.noEmit||!1,i}function AK(e={}){const{nodeId:t,externalTree:n}=e,r=IK(e),o=e.rootContext||r,s={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[i,c]=a.useState(null),u=a.useRef(null),l=Wo(n);Se(()=>{s.domReference&&(u.current=s.domReference)},[s.domReference]);const d=UG({...e,elements:{...s,...i&&{reference:i}}}),f=a.useCallback($=>{const S=Qe($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),getClientRects:()=>$.getClientRects(),contextElement:$}:$;c(S),d.refs.setReference(S)},[d.refs]),[p,m]=a.useState(null),[g,y]=a.useState(null);o.useSyncedValue("referenceElement",p),o.useSyncedValue("domReferenceElement",Qe(p)?p:null),o.useSyncedValue("floatingElement",g);const x=a.useCallback($=>{(Qe($)||$===null)&&(u.current=$,m($)),(Qe(d.refs.reference.current)||d.refs.reference.current===null||$!==null&&!Qe($))&&d.refs.setReference($)},[d.refs,m]),w=a.useCallback($=>{y($),d.refs.setFloating($)},[d.refs]),b=a.useMemo(()=>({...d.refs,setReference:x,setFloating:w,setPositionReference:f,domReference:u}),[d.refs,x,w,f]),v=a.useMemo(()=>({...d.elements,domReference:s.domReference}),[d.elements,s.domReference]),C=o.useState("open"),k=o.useState("floatingId"),E=a.useMemo(()=>({...d,dataRef:o.context.dataRef,open:C,onOpenChange:o.setOpen,events:o.context.events,floatingId:k,refs:b,elements:v,nodeId:t,rootStore:o}),[d,b,v,t,o,C,k]);return Se(()=>{o.context.dataRef.current.floatingContext=E;const $=l?.nodesRef.current.find(S=>S.id===t);$&&($.context=E)}),a.useMemo(()=>({...d,context:E,refs:b,elements:v,rootStore:o}),[d,b,v,E,o])}function _K(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:o}=e,s=Cr(),i=$r()!=null,c=t.useState("open"),u=t.useState("activeTriggerElement"),l=t.useState(r?"popupElement":"positionerElement"),d=t.context.triggerElements,f=fn(()=>new pm({open:c,referenceElement:u,floatingElement:l,triggerElements:d,onOpenChange:o,floatingId:s,nested:i,noEmit:n})).current;return Se(()=>{const p={open:c,floatingId:s,referenceElement:u,floatingElement:l};Qe(u)&&(p.domReferenceElement=u),f.update(p)},[c,s,u,l,f]),f.context.onOpenChange=o,f.context.nested=i,f.context.noEmit=n,f}const Yy=Zs("safe-polygon"),NK=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${Uk}`;function DK(e){return e?!!e.closest(NK):!1}function VK(e){const t=a.useRef(void 0),n=a.useRef(!1),r=a.useRef(void 0),o=a.useRef(!0),s=a.useRef(!1),i=a.useRef(()=>{}),c=a.useRef(!1),u=En(),l=En(),d=a.useRef(void 0);return a.useMemo(()=>{const f=e.context.dataRef.current;return f.hoverInteractionState||(f.hoverInteractionState={pointerTypeRef:t,interactedInsideRef:n,handlerRef:r,blockMouseMoveRef:o,performedPointerEventsMutationRef:s,unbindMouseMoveRef:i,restTimeoutPendingRef:c,openChangeTimeout:u,restTimeout:l,handleCloseOptionsRef:d}),f.hoverInteractionState},[e,t,n,r,o,s,i,c,u,l,d])}const zK=new Set(["click","mousedown"]);function FK(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),s=n.useState("domReferenceElement"),{dataRef:i}=n.context,{enabled:c=!0,closeDelay:u=0,externalTree:l}=t,{pointerTypeRef:d,interactedInsideRef:f,handlerRef:p,performedPointerEventsMutationRef:m,unbindMouseMoveRef:g,restTimeoutPendingRef:y,openChangeTimeout:x,handleCloseOptionsRef:w}=VK(n),b=Wo(l),v=$r(),C=Oe(()=>f.current?!0:i.current.openEvent?zK.has(i.current.openEvent.type):!1),k=Oe(()=>{const R=i.current.openEvent?.type;return R?.includes("mouse")&&R!=="mousedown"}),E=a.useCallback((R,T=!0)=>{const A=BK(u,d.current);A&&!p.current?x.start(A,()=>n.setOpen(!1,mt(Hr,R))):T&&(x.clear(),n.setOpen(!1,mt(Hr,R)))},[u,p,n,d,x]),$=Oe(()=>{g.current(),p.current=void 0}),S=Oe(()=>{if(m.current){const R=yt(o).body;R.style.pointerEvents="",R.removeAttribute(Yy),m.current=!1}}),j=Oe(R=>{const T=Ht(R);if(!DK(T)){f.current=!1;return}f.current=!0});Se(()=>{r||(d.current=void 0,y.current=!1,f.current=!1,$(),S())},[r,d,y,f,$,S]),a.useEffect(()=>()=>{$()},[$]),a.useEffect(()=>S,[S]),Se(()=>{if(c&&r&&w.current?.blockPointerEvents&&k()&&Qe(s)&&o){m.current=!0;const R=yt(o).body;R.setAttribute(Yy,"");const T=s,A=o,L=b?.nodesRef.current.find(V=>V.id===v)?.context?.elements.floating;return L&&(L.style.pointerEvents=""),R.style.pointerEvents="none",T.style.pointerEvents="auto",A.style.pointerEvents="auto",()=>{R.style.pointerEvents="",T.style.pointerEvents="",A.style.pointerEvents=""}}},[c,r,s,o,w,k,b,v,m]),a.useEffect(()=>{if(!c)return;function R(V){if(C()||!i.current.floatingContext)return;const I=n.context.triggerElements;V.relatedTarget&&I.hasElement(V.relatedTarget)||(S(),$(),C()||E(V))}function T(V){x.clear(),S(),p.current?.(V),$()}function A(V){C()||E(V,!1)}const L=o;return L&&(L.addEventListener("mouseleave",R),L.addEventListener("mouseenter",T),L.addEventListener("mouseleave",A),L.addEventListener("pointerdown",j,!0)),()=>{L&&(L.removeEventListener("mouseleave",R),L.removeEventListener("mouseenter",T),L.removeEventListener("mouseleave",A),L.removeEventListener("pointerdown",j,!0))}})}function BK(e,t){return t&&!yU(t)?0:typeof e=="function"?e():e}function HK(e=[]){const t=e.map(l=>l?.reference),n=e.map(l=>l?.floating),r=e.map(l=>l?.item),o=e.map(l=>l?.trigger),s=a.useCallback(l=>Pi(l,e,"reference"),t),i=a.useCallback(l=>Pi(l,e,"floating"),n),c=a.useCallback(l=>Pi(l,e,"item"),r),u=a.useCallback(l=>Pi(l,e,"trigger"),o);return a.useMemo(()=>({getReferenceProps:s,getFloatingProps:i,getItemProps:c,getTriggerProps:u}),[s,i,c,u])}function Pi(e,t,n){const r=new Map,o=n==="item",s={};n==="floating"&&(s.tabIndex=-1,s[zf]="");for(const i in e)o&&e&&(i===Wk||i===Zk)||(s[i]=e[i]);for(let i=0;i<t.length;i+=1){let c;const u=t[i]?.[n];typeof u=="function"?c=e?u(e):null:c=u,c&&qy(s,c,o,r)}return qy(s,e,o,r),s}function qy(e,t,n,r){for(const o in t){const s=t[o];n&&(o===Wk||o===Zk)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof s=="function"&&(r.get(o)?.push(s),e[o]=(...i)=>r.get(o)?.map(c=>c(...i)).find(c=>c!==void 0))):e[o]=s)}}const WK="Escape";function bc(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Mi(e,t){return bc(t,e===am||e===ri,e===pr||e===mr)}function Vd(e,t,n){return bc(t,e===ri,n?e===pr:e===mr)||e==="Enter"||e===" "||e===""}function ZK(e,t,n){return bc(t,n?e===pr:e===mr,e===ri)}function UK(e,t,n,r){const o=n?e===mr:e===pr,s=e===am;return t==="both"||t==="horizontal"&&r&&r>1?e===WK:bc(t,o,s)}function GK(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),s=n.useState("domReferenceElement"),i=n.context.dataRef,{listRef:c,activeIndex:u,onNavigate:l=()=>{},enabled:d=!0,selectedIndex:f=null,allowEscape:p=!1,loopFocus:m=!1,nested:g=!1,rtl:y=!1,virtual:x=!1,focusItemOnOpen:w="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:v=!0,disabledIndices:C=void 0,orientation:k="vertical",parentOrientation:E,cols:$=1,scrollItemIntoView:S=!0,itemSizes:j,dense:R=!1,id:T,resetOnPointerLeave:A=!0,externalTree:L}=t,V=Sa(o),I=Bt(V),_=$r(),N=Wo(L);Se(()=>{i.current.orientation=k},[i,k]);const O=Ff(s),z=a.useRef(w),M=a.useRef(f??-1),q=a.useRef(null),ee=a.useRef(!0),G=Oe(J=>{l(M.current===-1?null:M.current,J)}),ue=a.useRef(G),se=a.useRef(!!o),ne=a.useRef(r),re=a.useRef(!1),ie=a.useRef(!1),ae=Bt(C),pe=Bt(r),P=Bt(S),K=Bt(f),B=Bt(A),ve=Oe(()=>{function J(Pe){x?N?.events.emit("virtualfocus",Pe):Xi(Pe,{sync:re.current,preventScroll:!0})}const de=c.current[M.current],Z=ie.current;de&&J(de),(re.current?Pe=>Pe():requestAnimationFrame)(()=>{const Pe=c.current[M.current]||de;if(!Pe)return;de||J(Pe);const Ee=P.current;Ee&&X&&(Z||!ee.current)&&Pe.scrollIntoView?.(typeof Ee=="boolean"?{block:"nearest",inline:"nearest"}:Ee)})});Se(()=>{d&&(r&&o?(M.current=f??-1,z.current&&f!=null&&(ie.current=!0,G())):se.current&&(M.current=-1,ue.current()))},[d,r,o,f,G]),Se(()=>{if(d){if(!r){re.current=!1;return}if(o)if(u==null){if(re.current=!1,K.current!=null)return;if(se.current&&(M.current=-1,ve()),(!ne.current||!se.current)&&z.current&&(q.current!=null||z.current===!0&&q.current==null)){let J=0;const de=()=>{c.current[0]==null?(J<2&&(J?requestAnimationFrame:queueMicrotask)(de),J+=1):(M.current=q.current==null||Vd(q.current,k,y)||g?Rd(c):Ly(c),q.current=null,G())};de()}}else Ss(c,u)||(M.current=u,ve(),ie.current=!1)}},[d,r,o,u,K,g,c,k,y,G,ve,ae]),Se(()=>{if(!d||o||!N||x||!se.current)return;const J=N.nodesRef.current,de=J.find(Pe=>Pe.id===_)?.context?.elements.floating,Z=ar(yt(o)),ye=J.some(Pe=>Pe.context&&Je(Pe.context.elements.floating,Z));de&&!ye&&ee.current&&de.focus({preventScroll:!0})},[d,o,N,_,x]),Se(()=>{ue.current=G,ne.current=r,se.current=!!o}),Se(()=>{r||(q.current=null,z.current=w)},[r,w]);const Q=u!=null,X=a.useMemo(()=>{function J(Z){if(!pe.current)return;const ye=c.current.indexOf(Z.currentTarget);ye!==-1&&M.current!==ye&&(M.current=ye,G(Z))}return{onFocus(Z){re.current=!0,J(Z)},onClick:({currentTarget:Z})=>Z.focus({preventScroll:!0}),onMouseMove(Z){re.current=!0,ie.current=!1,b&&J(Z)},onPointerLeave(Z){if(!pe.current||!ee.current||Z.pointerType==="touch")return;re.current=!0;const ye=Z.relatedTarget;!b||c.current.includes(ye)||B.current&&(M.current=-1,G(Z),x||I.current?.focus({preventScroll:!0}))}}},[pe,I,b,c,G,B,x]),te=a.useCallback(()=>E??N?.nodesRef.current.find(J=>J.id===_)?.context?.dataRef?.current.orientation,[_,N,E]),ke=Oe(J=>{if(ee.current=!1,re.current=!0,J.which===229||!pe.current&&J.currentTarget===I.current)return;if(g&&UK(J.key,k,y,$)){Mi(J.key,te())||wt(J),n.setOpen(!1,mt(qi,J.nativeEvent)),dt(s)&&(x?N?.events.emit("virtualfocus",s):s.focus());return}const de=M.current,Z=Rd(c,C),ye=Ly(c,C);if(O||(J.key==="Home"&&(wt(J),M.current=Z,G(J)),J.key==="End"&&(wt(J),M.current=ye,G(J))),$>1){const Pe=j||Array.from({length:c.current.length},()=>({width:1,height:1})),Ee=TU(Pe,$,R),Fe=Ee.findIndex(ft=>ft!=null&&!$s(c,ft,C)),nt=Ee.reduce((ft,kt,$e)=>kt!=null&&!$s(c,kt,C)?$e:ft,-1),rt=Ee[MU({current:Ee.map(ft=>ft!=null?c.current[ft]:null)},{event:J,orientation:k,loopFocus:m,rtl:y,cols:$,disabledIndices:AU([...(typeof C!="function"?C:null)||c.current.map((ft,kt)=>$s(c,kt,C)?kt:void 0),void 0],Ee),minIndex:Fe,maxIndex:nt,prevIndex:IU(M.current>ye?Z:M.current,Pe,Ee,$,J.key===ri?"bl":J.key===(y?pr:mr)?"tr":"tl"),stopEvent:!0})];if(rt!=null&&(M.current=rt,G(J)),k==="both")return}if(Mi(J.key,k)){if(wt(J),r&&!x&&ar(J.currentTarget.ownerDocument)===J.currentTarget){M.current=Vd(J.key,k,y)?Z:ye,G(J);return}Vd(J.key,k,y)?m?de>=ye?p&&de!==c.current.length?M.current=-1:(re.current=!1,M.current=Z):M.current=St(c,{startingIndex:de,disabledIndices:C}):M.current=Math.min(ye,St(c,{startingIndex:de,disabledIndices:C})):m?de<=Z?p&&de!==-1?M.current=c.current.length:(re.current=!1,M.current=ye):M.current=St(c,{startingIndex:de,decrement:!0,disabledIndices:C}):M.current=Math.max(Z,St(c,{startingIndex:de,decrement:!0,disabledIndices:C})),Ss(c,M.current)&&(M.current=-1),G(J)}}),Ce=a.useMemo(()=>x&&r&&Q&&{"aria-activedescendant":`${T}-${u}`},[x,r,Q,T,u]),U=a.useMemo(()=>({"aria-orientation":k==="both"?void 0:k,...O?{}:Ce,onKeyDown(J){if(J.key==="Tab"&&J.shiftKey&&r&&!x){const de=Ht(J.nativeEvent);if(de&&!Je(I.current,de))return;wt(J),n.setOpen(!1,mt(dc,J.nativeEvent)),dt(s)&&s.focus();return}ke(J)},onPointerMove(){ee.current=!0}}),[Ce,ke,I,k,O,n,r,x,s]),W=a.useMemo(()=>{function J(Z){w==="auto"&&Gk(Z.nativeEvent)&&(z.current=!x)}function de(Z){z.current=w,w==="auto"&&Kk(Z.nativeEvent)&&(z.current=!0)}return{onKeyDown(Z){const ye=n.select("open");ee.current=!1;const Pe=Z.key.startsWith("Arrow"),Ee=ZK(Z.key,te(),y),Fe=Mi(Z.key,k),nt=(g?Ee:Fe)||Z.key==="Enter"||Z.key.trim()==="";if(x&&ye)return ke(Z);if(!(!ye&&!v&&Pe)){if(nt){const rt=Mi(Z.key,te());q.current=g&&rt?null:Z.key}if(g){Ee&&(wt(Z),ye?(M.current=Rd(c,ae.current),G(Z)):n.setOpen(!0,mt(qi,Z.nativeEvent,Z.currentTarget)));return}Fe&&(K.current!=null&&(M.current=K.current),wt(Z),!ye&&v?n.setOpen(!0,mt(qi,Z.nativeEvent,Z.currentTarget)):ke(Z),ye&&G(Z))}},onFocus(Z){n.select("open")&&!x&&(M.current=-1,G(Z))},onPointerDown:de,onPointerEnter:de,onMouseDown:J,onClick:J}},[ke,ae,w,c,g,G,n,v,k,te,y,K,x]),le=a.useMemo(()=>({...Ce,...W}),[Ce,W]);return a.useMemo(()=>d?{reference:le,floating:U,item:X,trigger:W}:{},[d,le,U,W,X])}const KK=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function YK(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingId"),s=n.useState("domReferenceElement"),i=n.useState("floatingElement"),{enabled:c=!0,role:u="dialog"}=t,l=Cr(),d=s?.id||l,f=a.useMemo(()=>Sa(i)?.id||o,[i,o]),p=KK.get(u)??u,g=$r()!=null,y=a.useMemo(()=>p==="tooltip"||u==="label"?Wt:{"aria-haspopup":p==="alertdialog"?"dialog":p,"aria-expanded":"false",...p==="listbox"&&{role:"combobox"},...p==="menu"&&g&&{role:"menuitem"},...u==="select"&&{"aria-autocomplete":"none"},...u==="combobox"&&{"aria-autocomplete":"list"}},[p,g,u]),x=a.useMemo(()=>p==="tooltip"||u==="label"?{[`aria-${u==="label"?"labelledby":"describedby"}`]:r?f:void 0}:{...y,"aria-expanded":r?"true":"false","aria-controls":r?f:void 0,...p==="menu"&&{id:d}},[p,f,r,d,u,y]),w=a.useMemo(()=>{const v={id:f,...p&&{role:p}};return p==="tooltip"||u==="label"?v:{...v,...p==="menu"&&{"aria-labelledby":d}}},[p,f,d,u]),b=a.useCallback(({active:v,selected:C})=>{const k={role:"option",...v&&{id:`${f}-fui-option`}};switch(u){case"select":case"combobox":return{...k,"aria-selected":C}}return{}},[f,u]);return a.useMemo(()=>c?{reference:x,floating:w,item:b,trigger:y}:{},[c,x,w,y,b])}function qK(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.context.dataRef,{listRef:s,activeIndex:i,onMatch:c,onTypingChange:u,enabled:l=!0,findMatch:d=null,resetMs:f=750,ignoreKeys:p=Rk,selectedIndex:m=null}=t,g=En(),y=a.useRef(""),x=a.useRef(m??i??-1),w=a.useRef(null);Se(()=>{r&&(g.clear(),w.current=null,y.current="")},[r,g]),Se(()=>{r&&y.current===""&&(x.current=m??i??-1)},[r,m,i]);const b=Oe(E=>{E?o.current.typing||(o.current.typing=E,u?.(E)):o.current.typing&&(o.current.typing=E,u?.(E))}),v=Oe(E=>{function $(A,L,V){const I=d?d(L,V):L.find(_=>_?.toLocaleLowerCase().indexOf(V.toLocaleLowerCase())===0);return I?A.indexOf(I):-1}const S=s.current;if(y.current.length>0&&y.current[0]!==" "&&($(S,S,y.current)===-1?b(!1):E.key===" "&&wt(E)),S==null||p.includes(E.key)||E.key.length!==1||E.ctrlKey||E.metaKey||E.altKey)return;r&&E.key!==" "&&(wt(E),b(!0)),S.every(A=>A?A[0]?.toLocaleLowerCase()!==A[1]?.toLocaleLowerCase():!0)&&y.current===E.key&&(y.current="",x.current=w.current),y.current+=E.key,g.start(f,()=>{y.current="",x.current=w.current,b(!1)});const R=x.current,T=$(S,[...S.slice((R||0)+1),...S.slice(0,(R||0)+1)],y.current);T!==-1?(c?.(T),w.current=T):E.key!==" "&&(y.current="",b(!1))}),C=a.useMemo(()=>({onKeyDown:v}),[v]),k=a.useMemo(()=>({onKeyDown:v,onKeyUp(E){E.key===" "&&b(!1)}}),[v,b]);return a.useMemo(()=>l?{reference:C,floating:k}:{},[l,C,k])}const XK=a.createContext(void 0);function JK(e){return a.useContext(XK)}const $5="ArrowUp",O5="ArrowDown",L5="ArrowLeft",j5="ArrowRight",R5="Home",P5="End",QK=new Set([L5,j5]),eY=new Set([$5,O5]),tY=new Set([...QK,...eY]);[...tY];const nY=new Set([$5,O5,L5,j5,R5,P5]);function rY(e){return e==="starting"?pZ:Wt}const oY={...Pk,...CZ},sY=a.forwardRef(function(t,n){const{render:r,className:o,finalFocus:s,...i}=t,{store:c}=Bo(),{side:u,align:l}=Ek(),d=JK()!=null,f=c.useState("open"),p=c.useState("transitionStatus"),m=c.useState("popupProps"),g=c.useState("mounted"),y=c.useState("instantType"),x=c.useState("activeTriggerElement"),w=c.useState("parent"),b=c.useState("lastOpenChangeReason"),v=c.useState("rootId"),C=c.useState("floatingRootContext"),k=c.useState("floatingTreeRoot"),E=c.useState("closeDelay"),$=c.useState("activeTriggerElement");Vk({open:f,ref:c.context.popupRef,onComplete(){f&&c.context.onOpenChangeComplete?.(!0)}}),a.useEffect(()=>{function L(V){c.setOpen(!1,mt(V.reason,V.domEvent))}return k.events.on("close",L),()=>{k.events.off("close",L)}},[k.events,c]);const S=c.useState("hoverEnabled"),j=c.useState("disabled");FK(C,{enabled:S&&!j&&w.type!=="context-menu"&&w.type!=="menubar",closeDelay:E});const R=a.useMemo(()=>({transitionStatus:p,side:u,align:l,open:f,nested:w.type==="menu",instant:y}),[p,u,l,f,w.type,y]),T=kr("div",t,{state:R,ref:[n,c.context.popupRef],stateAttributesMapping:oY,props:[m,{onKeyDown(L){d&&nY.has(L.key)&&L.stopPropagation()}},rY(p),i,{"data-rootownerid":v}]});let A=w.type===void 0||w.type==="context-menu";return(x||w.type==="menubar"&&b!==rm)&&(A=!0),h.jsx(dG,{context:C,modal:!1,disabled:!g,returnFocus:s===void 0?A:s,initialFocus:w.type!=="menu",restoreFocus:!0,externalTree:w.type!=="menubar"?k:void 0,previousFocusableElement:$,nextFocusableElement:w.type===void 0?c.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:w.type===void 0?c.context.beforeContentFocusGuardRef:void 0,children:T})}),M5=a.createContext(void 0);function iY(){const e=a.useContext(M5);if(e===void 0)throw new Error(Qr(32));return e}const aY=a.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,{store:s}=Bo();return s.useState("mounted")||r?h.jsx(M5.Provider,{value:r,children:h.jsx(iG,{ref:n,...o})}):null});function cY(e){return tm(19)?e:e?"true":void 0}const lY=a.createContext(void 0);function T5(){return a.useContext(lY)?.direction??"ltr"}const uY=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:c,middlewareData:u}=t,{element:l,padding:d=0,offsetParent:f="real"}=Gn(e,t)||{};if(l==null)return{};const p=Yk(d),m={x:n,y:r},g=um(o),y=lm(g),x=await i.getDimensions(l),w=g==="y",b=w?"top":"left",v=w?"bottom":"right",C=w?"clientHeight":"clientWidth",k=s.reference[y]+s.reference[g]-m[g]-s.floating[y],E=m[g]-s.reference[g],$=f==="real"?await i.getOffsetParent?.(l):c.floating;let S=c.floating[C]||s.floating[y];(!S||!await i.isElement?.($))&&(S=c.floating[C]||s.floating[y]);const j=k/2-E/2,R=S/2-x[y]/2-1,T=Math.min(p[b],R),A=Math.min(p[v],R),L=T,V=S-x[y]-A,I=S/2-x[y]/2+j,_=Bf(L,I,V),N=!u.arrow&&Sr(o)!=null&&I!==_&&s.reference[y]/2-(I<L?T:A)-x[y]/2<0,O=N?I<L?I-L:I-V:0;return{[g]:m[g]+O,data:{[g]:_,centerOffset:I-_-O,...N&&{alignmentOffset:O}},reset:N}}}),dY=(e,t)=>({...uY(e),options:[e,t]}),fY={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,s=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:(await JG().fn(e)).data?.referenceHidden||s}}}},pY={sideX:"left",sideY:"top"};function I5(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 Xy(e,t,n){const{rects:r,placement:o}=e;return{side:I5(t,tn(o),n),align:Sr(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function mY(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,collisionBoundary:c,collisionPadding:u=5,sticky:l=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,keepMounted:p=!1,floatingRootContext:m,mounted:g,collisionAvoidance:y,shiftCrossAxis:x=!1,nodeId:w,adaptiveOrigin:b,lazyFlip:v=!1,externalTree:C}=e,[k,E]=a.useState(null);!g&&k!==null&&E(null);const $=y.side||"flip",S=y.align||"flip",j=y.fallbackAxisSide||"end",R=typeof t=="function"?t:void 0,T=Oe(R),A=R?T:t,L=Bt(t),I=T5()==="rtl",_=k||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":I?"left":"right","inline-start":I?"right":"left"}[r],N=s==="center"?_:`${_}-${s}`;let O=u;const z=1,M=r==="bottom"?z:0,q=r==="top"?z:0,ee=r==="right"?z:0,G=r==="left"?z:0;typeof O=="number"?O={top:O+M,right:O+G,bottom:O+q,left:O+ee}:O&&(O={top:(O.top||0)+M,right:(O.right||0)+G,bottom:(O.bottom||0)+q,left:(O.left||0)+ee});const ue={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:O},se=a.useRef(null),ne=Bt(o),re=Bt(i),pe=[GG(we=>{const je=Xy(we,r,I),Ge=typeof ne.current=="function"?ne.current(je):ne.current,Be=typeof re.current=="function"?re.current(je):re.current;return{mainAxis:Ge,crossAxis:Be,alignmentAxis:Be}},[typeof o!="function"?o:0,typeof i!="function"?i:0,I,r])],P=S==="none"&&$!=="shift",K=!P&&(l||x||$==="shift"),B=$==="none"?null:qG({...ue,padding:{top:O.top+z,right:O.right+z,bottom:O.bottom+z,left:O.left+z},mainAxis:!x&&$==="flip",crossAxis:S==="flip"?"alignment":!1,fallbackAxisSideDirection:j}),ve=P?null:KG(we=>{const je=Gr(we.elements.floating).documentElement;return{...ue,rootBoundary:x?{x:0,y:0,width:je.clientWidth,height:je.clientHeight}:void 0,mainAxis:S!=="none",crossAxis:K,limiter:l||x?void 0:YG(Ge=>{if(!se.current)return{};const{width:Be,height:ht}=se.current.getBoundingClientRect(),We=cn(tn(Ge.placement)),zt=We==="y"?Be:ht,Fn=We==="y"?O.left+O.right:O.top+O.bottom;return{offset:zt/2+Fn/2}})}},[ue,l,x,O,S]);$==="shift"||S==="shift"||s==="center"?pe.push(ve,B):pe.push(B,ve),pe.push(XG({...ue,apply({elements:{floating:we},rects:{reference:je},availableWidth:Ge,availableHeight:Be}){Object.entries({"--available-width":`${Ge}px`,"--available-height":`${Be}px`,"--anchor-width":`${je.width}px`,"--anchor-height":`${je.height}px`}).forEach(([ht,We])=>{we.style.setProperty(ht,We)})}}),dY(()=>({element:se.current||document.createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(we){const{elements:je,middlewareData:Ge,placement:Be,rects:ht,y:We}=we,zt=tn(Be),Fn=cn(zt),Rr=se.current,Xo=Ge.arrow?.x||0,Jo=Ge.arrow?.y||0,Qo=Rr?.clientWidth||0,Jn=Rr?.clientHeight||0,Ft=Xo+Qo/2,Pr=Jo+Jn/2,es=Math.abs(Ge.shift?.y||0),ts=ht.reference.height/2,Gt=typeof o=="function"?o(Xy(we,r,I)):o,no=es>Gt,Mr={top:`${Ft}px calc(100% + ${Gt}px)`,bottom:`${Ft}px ${-Gt}px`,left:`calc(100% + ${Gt}px) ${Pr}px`,right:`${-Gt}px ${Pr}px`}[zt],ro=`${Ft}px ${ht.reference.y+ts-We}px`;return je.floating.style.setProperty("--transform-origin",K&&Fn==="y"&&no?ro:Mr),{}}},fY,b),Se(()=>{!g&&m&&m.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[g,m]);const Q=a.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:X,elements:te,x:ke,y:Ce,middlewareData:U,update:W,placement:le,context:J,isPositioned:de,floatingStyles:Z}=AK({rootContext:m,placement:N,middleware:pe,strategy:n,whileElementsMounted:p?void 0:(...we)=>Fy(...we,Q),nodeId:w,externalTree:C}),{sideX:ye,sideY:Pe}=U.adaptiveOrigin||pY,Ee=de?n:"fixed",Fe=a.useMemo(()=>b?{position:Ee,[ye]:ke,[Pe]:Ce}:{position:Ee,...Z},[b,Ee,ye,ke,Pe,Ce,Z]),nt=a.useRef(null);Se(()=>{if(!g)return;const we=L.current,je=typeof we=="function"?we():we,Be=(Jy(je)?je.current:je)||null||null;Be!==nt.current&&(X.setPositionReference(Be),nt.current=Be)},[g,X,A,L]),a.useEffect(()=>{if(!g)return;const we=L.current;typeof we!="function"&&Jy(we)&&we.current!==nt.current&&(X.setPositionReference(we.current),nt.current=we.current)},[g,X,A,L]),a.useEffect(()=>{if(p&&g&&te.domReference&&te.floating)return Fy(te.domReference,te.floating,W,Q)},[p,g,te,W,Q]);const rt=tn(le),ft=I5(r,rt,I),kt=Sr(le)||"center",$e=!!U.hide?.referenceHidden;Se(()=>{v&&g&&de&&E(rt)},[v,g,de,rt]);const Ne=a.useMemo(()=>({position:"absolute",top:U.arrow?.y,left:U.arrow?.x}),[U.arrow]),ot=U.arrow?.centerOffset!==0;return a.useMemo(()=>({positionerStyles:Fe,arrowStyles:Ne,arrowRef:se,arrowUncentered:ot,side:ft,align:kt,physicalSide:rt,anchorHidden:$e,refs:X,context:J,isPositioned:de,update:W}),[Fe,Ne,se,ot,ft,kt,rt,$e,X,J,de,W])}function Jy(e){return e!=null&&"current"in e}function hY(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,s=Oe(o),i=a.useRef(0),c=fn(vY).current,u=fn(gY).current,[l,d]=a.useState(0),f=a.useRef(l),p=Oe((w,b)=>{u.set(w,b??null),f.current+=1,d(f.current)}),m=Oe(w=>{u.delete(w),f.current+=1,d(f.current)}),g=a.useMemo(()=>{const w=new Map;return Array.from(u.keys()).filter(v=>v.isConnected).sort(bY).forEach((v,C)=>{const k=u.get(v)??{};w.set(v,{...k,index:C})}),w},[u,l]);Se(()=>{if(typeof MutationObserver!="function"||g.size===0)return;const w=new MutationObserver(b=>{const v=new Set,C=k=>v.has(k)?v.delete(k):v.add(k);b.forEach(k=>{k.removedNodes.forEach(C),k.addedNodes.forEach(C)}),v.size===0&&(f.current+=1,d(f.current))});return g.forEach((b,v)=>{v.parentElement&&w.observe(v.parentElement,{childList:!0})}),()=>{w.disconnect()}},[g]),Se(()=>{f.current===l&&(n.current.length!==g.size&&(n.current.length=g.size),r&&r.current.length!==g.size&&(r.current.length=g.size),i.current=g.size),s(g)},[s,g,n,r,l]),Se(()=>()=>{n.current=[]},[n]),Se(()=>()=>{r&&(r.current=[])},[r]);const y=Oe(w=>(c.add(w),()=>{c.delete(w)}));Se(()=>{c.forEach(w=>w(g))},[c,g]);const x=a.useMemo(()=>({register:p,unregister:m,subscribeMapChange:y,elementsRef:n,labelsRef:r,nextIndexRef:i}),[p,m,y,n,r,i]);return h.jsx(Ak.Provider,{value:x,children:t})}function gY(){return new Map}function vY(){return new Set}function bY(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 yY=a.forwardRef(function(t,n){const{cutout:r,...o}=t;let s;if(r){const i=r?.getBoundingClientRect();s=`polygon(
|
|
60
|
+
0% 0%,
|
|
61
|
+
100% 0%,
|
|
62
|
+
100% 100%,
|
|
63
|
+
0% 100%,
|
|
64
|
+
0% 0%,
|
|
65
|
+
${i.left}px ${i.top}px,
|
|
66
|
+
${i.left}px ${i.bottom}px,
|
|
67
|
+
${i.right}px ${i.bottom}px,
|
|
68
|
+
${i.right}px ${i.top}px,
|
|
69
|
+
${i.left}px ${i.top}px
|
|
70
|
+
)`}return h.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})}),wY=a.forwardRef(function(t,n){const{anchor:r,positionMethod:o="absolute",className:s,render:i,side:c,align:u,sideOffset:l=0,alignOffset:d=0,collisionBoundary:f="clipping-ancestors",collisionPadding:p=5,arrowPadding:m=5,sticky:g=!1,disableAnchorTracking:y=!1,collisionAvoidance:x=hZ,...w}=t,{store:b}=Bo(),v=iY(),C=lc(!0),k=b.useState("parent"),E=b.useState("floatingRootContext"),$=b.useState("floatingTreeRoot"),S=b.useState("mounted"),j=b.useState("open"),R=b.useState("modal"),T=b.useState("activeTriggerElement"),A=b.useState("lastOpenChangeReason"),L=b.useState("floatingNodeId"),V=b.useState("floatingParentNodeId");let I=r,_=l,N=d,O=u;k.type==="context-menu"&&(I=r??k.context?.anchor,O=O??"start",!c&&O!=="center"&&(N=t.alignOffset??2,_=t.sideOffset??-5));let z=c,M=O;k.type==="menu"?(z=z??"inline-end",M=M??"start"):k.type==="menubar"&&(z=z??"bottom",M=M??"start");const q=k.type==="context-menu",ee=mY({anchor:I,floatingRootContext:E,positionMethod:C?"fixed":o,mounted:S,side:z,sideOffset:_,align:M,alignOffset:N,arrowPadding:q?0:m,collisionBoundary:f,collisionPadding:p,sticky:g,nodeId:L,keepMounted:v,disableAnchorTracking:y,collisionAvoidance:x,shiftCrossAxis:q,externalTree:$}),G=a.useMemo(()=>{const ae={};return j||(ae.pointerEvents="none"),{role:"presentation",hidden:!S,style:{...ee.positionerStyles,...ae}}},[j,S,ee.positionerStyles]);a.useEffect(()=>{function ae(pe){pe.open?(pe.parentNodeId===L&&b.set("hoverEnabled",!1),pe.nodeId!==L&&pe.parentNodeId===b.select("floatingParentNodeId")&&b.setOpen(!1,mt(bs))):pe.parentNodeId===L&&pe.reason!==bs&&b.set("hoverEnabled",!0)}return $.events.on("menuopenchange",ae),()=>{$.events.off("menuopenchange",ae)}},[b,$.events,L]),a.useEffect(()=>{if(b.select("floatingParentNodeId")==null)return;function ae(pe){if(pe.open||pe.nodeId!==b.select("floatingParentNodeId"))return;const P=pe.reason??bs;b.setOpen(!1,mt(P))}return $.events.on("menuopenchange",ae),()=>{$.events.off("menuopenchange",ae)}},[$.events,b]),a.useEffect(()=>{function ae(pe){!j||pe.nodeId!==b.select("floatingParentNodeId")||pe.target&&T&&T!==pe.target&&b.setOpen(!1,mt(bs))}return $.events.on("itemhover",ae),()=>{$.events.off("itemhover",ae)}},[$.events,j,T,b]),a.useEffect(()=>{const ae={open:j,nodeId:L,parentNodeId:V,reason:b.select("lastOpenChangeReason")};$.events.emit("menuopenchange",ae)},[$.events,j,b,L,V]);const ue=a.useMemo(()=>({open:j,side:ee.side,align:ee.align,anchorHidden:ee.anchorHidden,nested:k.type==="menu"}),[j,ee.side,ee.align,ee.anchorHidden,k.type]),se=a.useMemo(()=>({side:ee.side,align:ee.align,arrowRef:ee.arrowRef,arrowUncentered:ee.arrowUncentered,arrowStyles:ee.arrowStyles,nodeId:ee.context.nodeId}),[ee.side,ee.align,ee.arrowRef,ee.arrowUncentered,ee.arrowStyles,ee.context.nodeId]),ne=kr("div",t,{state:ue,stateAttributesMapping:Pk,ref:[n,b.useStateSetter("positionerElement")],props:[G,w]}),re=S&&k.type!=="menu"&&(k.type!=="menubar"&&R&&A!==Hr||k.type==="menubar"&&k.context.modal);let ie=null;return k.type==="menubar"?ie=k.context.contentElement:k.type===void 0&&(ie=T),h.jsxs(kk.Provider,{value:se,children:[re&&h.jsx(yY,{ref:k.type==="context-menu"||k.type==="nested-context-menu"?k.context.internalBackdropRef:null,inert:cY(!j),cutout:ie}),h.jsx(QU,{id:L,children:h.jsx(hY,{elementsRef:b.context.itemDomElements,labelsRef:b.context.itemLabels,children:ne})})]})});let Qy={},e2={},t2="";function xY(e){if(typeof document>"u")return!1;const t=Gr(e);return Ct(t).innerWidth-t.documentElement.clientWidth>0}function CY(e){const t=Gr(e),n=t.documentElement,r=t.body,o=eo(n)?n:r,s=o.style.overflow;return o.style.overflow="hidden",()=>{o.style.overflow=s}}function kY(e){const t=Gr(e),n=t.documentElement,r=t.body,o=Ct(n);let s=0,i=0;const c=ir.create(),u=typeof CSS<"u"&&CSS.supports?.("scrollbar-gutter","stable");if(lU&&(o.visualViewport?.scale??1)!==1)return()=>{};function l(){const p=o.getComputedStyle(n),m=o.getComputedStyle(r),x=(p.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=n.scrollTop,i=n.scrollLeft,Qy={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},t2=n.style.scrollBehavior,e2={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 w=n.scrollHeight>n.clientHeight,b=n.scrollWidth>n.clientWidth,v=p.overflowY==="scroll"||m.overflowY==="scroll",C=p.overflowX==="scroll"||m.overflowX==="scroll",k=Math.max(0,o.innerWidth-n.clientWidth),E=Math.max(0,o.innerHeight-n.clientHeight),$=parseFloat(m.marginTop)+parseFloat(m.marginBottom),S=parseFloat(m.marginLeft)+parseFloat(m.marginRight),j=eo(n)?n:r;if(u){n.style.scrollbarGutter=x,j.style.overflowY="hidden",j.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:x,overflowY:"hidden",overflowX:"hidden"}),(w||v)&&(n.style.overflowY="scroll"),(b||C)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:$||E?`calc(100dvh - ${$+E}px)`:"100dvh",width:S||k?`calc(100vw - ${S+k}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=s,r.scrollLeft=i,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function d(){Object.assign(n.style,Qy),Object.assign(r.style,e2),u||(n.scrollTop=s,n.scrollLeft=i,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=t2)}function f(){d(),c.request(l)}return l(),o.addEventListener("resize",f),()=>{c.cancel(),d(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",f)}}class EY{lockCount=0;restore=null;timeoutLock=Ea.create();timeoutUnlock=Ea.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=Gr(t).documentElement,o=Ct(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=jk;return}const s=uU||!xY(t);this.restore=s?CY(t):kY(t)}}const SY=new EY;function $Y(e=!0,t=null){Se(()=>{if(e)return SY.acquire(t)},[e,t])}const OY=a.createContext(null);function LY(e){return a.useContext(OY)}function jY(e){const t=a.useRef(""),n=a.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:a.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o&&e(o,o.pointerType),e(o,t.current),t.current=""},[e]),onPointerDown:n}}function RY(e){const[t,n]=a.useState(null),r=Oe((c,u)=>{e||n(u)}),o=a.useCallback(()=>{n(null)},[]),{onClick:s,onPointerDown:i}=jY(r);return a.useMemo(()=>({openMethod:t,reset:o,triggerProps:{onClick:s,onPointerDown:i}}),[t,o,s,i])}const PY={...TK,disabled:Te(e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled),modal:Te(e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0)),allowMouseEnter:Te(e=>e.parent.type==="menu"?e.parent.store.select("allowMouseEnter"):e.allowMouseEnter),stickIfOpen:Te(e=>e.stickIfOpen),parent:Te(e=>e.parent),rootId:Te(e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId),activeIndex:Te(e=>e.activeIndex),isActive:Te((e,t)=>e.activeIndex===t),hoverEnabled:Te(e=>e.hoverEnabled),instantType:Te(e=>e.instantType),lastOpenChangeReason:Te(e=>e.openChangeReason),floatingTreeRoot:Te(e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:Te(e=>e.floatingNodeId),floatingParentNodeId:Te(e=>e.floatingParentNodeId),itemProps:Te(e=>e.itemProps),closeDelay:Te(e=>e.closeDelay),keyboardEventRelay:Te(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")})};class hm extends S5{constructor(t){super({...MY(),...t},{positionerRef:a.createRef(),popupRef:a.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:a.createRef(),beforeContentFocusGuardRef:a.createRef(),onOpenChangeComplete:void 0,triggerElements:new mm},PY),this.observe(Te(n=>n.allowMouseEnter),(n,r)=>{this.state.parent.type==="menu"&&n!==r&&this.state.parent.store.set("allowMouseEnter",n)}),this.unsubscribeParentListener=this.observe("parent",n=>{if(this.unsubscribeParentListener?.(),n.type==="menu"){this.unsubscribeParentListener=n.store.subscribe(()=>{this.notifyAll()}),this.context.allowMouseUpTriggerRef=n.store.context.allowMouseUpTriggerRef;return}n.type!==void 0&&(this.context.allowMouseUpTriggerRef=n.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(t,n){this.state.floatingRootContext.context.events.emit("setOpen",{open:t,eventDetails:n})}static useStore(t,n){return fn(()=>t??new hm(n)).current}unsubscribeParentListener=null}function MY(){return{...MK(),disabled:!1,modal:!0,allowMouseEnter:!0,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new a5,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Wt,keyboardEventRelay:void 0,closeDelay:0}}const TY=a.createContext(void 0);function IY(){return a.useContext(TY)}function AY(e){const{children:t,open:n,onOpenChange:r,onOpenChangeComplete:o,defaultOpen:s=!1,disabled:i=!1,modal:c,loopFocus:u=!0,orientation:l="vertical",actionsRef:d,closeParentOnEsc:f=!0,handle:p,triggerId:m,defaultTriggerId:g=null,highlightItemOnHover:y=!0}=e,x=lc(!0),w=Bo(!0),b=LY(),v=IY(),C=a.useMemo(()=>v&&w?{type:"menu",store:w.store}:b?{type:"menubar",context:b}:x&&!w?{type:"context-menu",context:x}:{type:void 0},[x,w,b,v]),k=hm.useStore(p?.store,{parent:C}),E=k.useState("floatingTreeRoot"),$=JU(E),S=$r();Se(()=>{x&&!w?k.update({parent:{type:"context-menu",context:x},floatingNodeId:$,floatingParentNodeId:S}):w&&k.update({floatingNodeId:$,floatingParentNodeId:S})},[x,w,$,S,k]),k.useControlledProp("open",n,s),k.useControlledProp("activeTriggerId",m,g),k.useContextCallback("onOpenChangeComplete",o);const j=k.useState("open"),R=k.useState("activeTriggerElement"),T=k.useState("positionerElement"),A=k.useState("hoverEnabled"),L=k.useState("modal"),V=k.useState("disabled"),I=k.useState("lastOpenChangeReason"),_=k.useState("parent"),N=k.useState("activeIndex"),O=k.useState("payload"),z=k.useState("floatingParentNodeId"),M=a.useRef(null),q=z!=null;let ee;k.useSyncedValues({disabled:i,modal:_.type===void 0?c:void 0,rootId:Cr()});const{openMethod:G,triggerProps:ue,reset:se}=RY(j);jK(k);const{forceUnmount:ne}=RK(j,k,()=>{k.update({allowMouseEnter:!1,stickIfOpen:!0}),se()}),re=a.useRef(_.type!=="context-menu"),ie=En();a.useEffect(()=>{if(j||(M.current=null),_.type==="context-menu"){if(!j){ie.clear(),re.current=!1;return}ie.start(500,()=>{re.current=!0})}},[ie,j,_.type]),$Y(j&&L&&I!==Hr&&G!=="touch",T),Se(()=>{!j&&!A&&k.set("hoverEnabled",!0)},[j,A,k]);const ae=a.useRef(!0),pe=En(),P=Oe(($e,Ne)=>{const ot=Ne.reason;if(j===$e&&Ne.trigger===R||(Ne.preventUnmountOnClose=()=>{k.set("preventUnmountingOnClose",!0)},!$e&&Ne.trigger==null&&(Ne.trigger=R??void 0),r?.($e,Ne),Ne.isCanceled))return;const we={open:$e,nativeEvent:Ne.event,reason:Ne.reason,nested:q};ee?.emit("openchange",we);const je=Ne.event;if($e===!1&&je?.type==="click"&&je.pointerType==="touch"&&!ae.current)return;if(!$e&&N!==null){const We=k.context.itemDomElements.current[N];queueMicrotask(()=>{We?.setAttribute("tabindex","-1")})}$e&&ot===Ey?(ae.current=!1,pe.start(300,()=>{ae.current=!0})):(ae.current=!0,pe.clear());const Ge=(ot===ka||ot===Mk)&&je.detail===0&&je?.isTrusted,Be=!$e&&(ot===Tk||ot==null);function ht(){const We={open:$e,openChangeReason:ot};M.current=Ne.event??null;const zt=Ne.trigger?.id??null;(zt||$e)&&(We.activeTriggerId=zt,We.activeTriggerElement=Ne.trigger??null),k.update(We)}ot===Hr?Lt.flushSync(ht):ht(),_.type==="menubar"&&(ot===Ey||ot===dc||ot===Hr||ot===qi||ot===bs)?k.set("instantType","group"):Ge||Be?k.set("instantType",Ge?"click":"dismiss"):k.set("instantType",void 0)}),K=a.useCallback($e=>{const Ne=mt($e);return Ne.preventUnmountOnClose=()=>{k.set("preventUnmountingOnClose",!0)},Ne},[k]),B=a.useCallback(()=>{k.setOpen(!1,K(RZ))},[k,K]);a.useImperativeHandle(d,()=>({unmount:ne,close:B}),[ne,B]);let ve;_.type==="context-menu"&&(ve=_.context),a.useImperativeHandle(ve?.positionerRef,()=>T,[T]),a.useImperativeHandle(ve?.actionsRef,()=>({setOpen:P}),[P]);const Q=_K({popupStore:k,onOpenChange:P});ee=Q.context.events,a.useEffect(()=>{const $e=({open:Ne,eventDetails:ot})=>P(Ne,ot);return ee.on("setOpen",$e),()=>{ee?.off("setOpen",$e)}},[ee,P]);const X=tK(Q,{enabled:!V,bubbles:f&&_.type==="menu",outsidePress(){return _.type!=="context-menu"||M.current?.type==="contextmenu"?!0:re.current},externalTree:q?E:void 0}),te=YK(Q,{role:"menu"}),ke=T5(),Ce=a.useCallback($e=>{k.select("activeIndex")!==$e&&k.set("activeIndex",$e)},[k]),U=GK(Q,{enabled:!V,listRef:k.context.itemDomElements,activeIndex:N,nested:_.type!==void 0,loopFocus:u,orientation:l,parentOrientation:_.type==="menubar"?_.context.orientation:void 0,rtl:ke==="rtl",disabledIndices:Rk,onNavigate:Ce,openOnArrowKeyDown:_.type!=="context-menu",externalTree:q?E:void 0,focusItemOnHover:y}),W=a.useCallback($e=>{k.context.typingRef.current=$e},[k]),le=qK(Q,{listRef:k.context.itemLabels,activeIndex:N,resetMs:fZ,onMatch:$e=>{j&&$e!==N&&k.set("activeIndex",$e)},onTypingChange:W}),{getReferenceProps:J,getFloatingProps:de,getItemProps:Z,getTriggerProps:ye}=HK([X,te,U,le]),Pe=a.useMemo(()=>{const $e=uc(J(),{onMouseEnter(){k.set("hoverEnabled",!0)},onMouseMove(){k.set("allowMouseEnter",!0)}},ue);return delete $e.role,$e},[J,k,ue]),Ee=a.useMemo(()=>{const $e=ye();if(!$e)return $e;const{role:Ne,["aria-controls"]:ot,...we}=$e;return we},[ye]),Fe=im(),nt=a.useMemo(()=>de({onMouseEnter(){_.type==="menu"&&Fe.request(()=>k.set("hoverEnabled",!1))},onMouseMove(){k.set("allowMouseEnter",!0)},onClick(){k.select("hoverEnabled")&&k.set("hoverEnabled",!1)},onKeyDown($e){const Ne=k.select("keyboardEventRelay");Ne&&!$e.isPropagationStopped()&&Ne($e)}}),[de,_.type,Fe,k]),rt=a.useMemo(()=>Z(),[Z]);k.useSyncedValues({floatingRootContext:Q,activeTriggerProps:Pe,inactiveTriggerProps:Ee,popupProps:nt,itemProps:rt});const ft=a.useMemo(()=>({store:k,parent:C}),[k,C]),kt=h.jsx(em.Provider,{value:ft,children:typeof t=="function"?t({payload:O}):t});return _.type===void 0||_.type==="context-menu"?h.jsx(eG,{externalTree:E,children:kt}):kt}function A5(e){if(dt(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid")??void 0;if(!Pn(e))return A5(Nn(e))}const _Y=a.forwardRef(function(t,n){const{className:r,render:o,orientation:s="horizontal",...i}=t,c=a.useMemo(()=>({orientation:s}),[s]);return kr("div",t,{state:c,ref:n,props:[{role:"separator","aria-orientation":s},i]})});function NY(e){const[t,n]=a.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),r=a.useRef(null),o=a.useRef(null),s=a.useRef(null),i=a.useRef(null),c=a.useRef(!0),u=a.useRef(null),l=Cr(),d=a.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:s,backdropRef:r,internalBackdropRef:o,positionerRef:i,allowMouseUpTriggerRef:c,initialCursorPointRef:u,rootId:l}),[t,l]);return h.jsx(Ck.Provider,{value:d,children:h.jsx(em.Provider,{value:void 0,children:h.jsx(AY,{...e})})})}const n2=500,DY=a.forwardRef(function(t,n){const{render:r,className:o,...s}=t,{setAnchor:i,actionsRef:c,internalBackdropRef:u,backdropRef:l,positionerRef:d,allowMouseUpTriggerRef:f,initialCursorPointRef:p,rootId:m}=lc(!1),{store:g}=Bo(!1),y=g.useState("open"),x=a.useRef(null),w=a.useRef(null),b=En(),v=En(),C=a.useRef(!1);function k(A,L,V){const I=V.type.startsWith("touch");p.current={x:A,y:L},i({getBoundingClientRect(){return DOMRect.fromRect({width:I?10:0,height:I?10:0,x:A,y:L})}}),C.current=!1,c.current?.setOpen(!0,mt(ka,V)),v.start(n2,()=>{C.current=!0})}function E(A){f.current=!0,wt(A),k(A.clientX,A.clientY,A.nativeEvent),Gr(x.current).addEventListener("mouseup",V=>{if(f.current=!1,!C.current)return;v.clear(),C.current=!1;const I=Ht(V);Je(d.current,I)||m&&I&&A5(I)===m||c.current?.setOpen(!1,mt(jZ,V))},{once:!0})}function $(A){if(f.current=!1,A.touches.length===1){A.stopPropagation();const L=A.touches[0];w.current={x:L.clientX,y:L.clientY},b.start(n2,()=>{w.current&&k(w.current.x,w.current.y,A.nativeEvent)})}}function S(A){if(b.isStarted()&&w.current&&A.touches.length===1){const L=A.touches[0],V=10,I=Math.abs(L.clientX-w.current.x),_=Math.abs(L.clientY-w.current.y);(I>V||_>V)&&b.clear()}}function j(){b.clear(),w.current=null}a.useEffect(()=>{function A(V){const _=Ht(V);(Je(x.current,_)||Je(u.current,_)||Je(l.current,_))&&V.preventDefault()}const L=Gr(x.current);return L.addEventListener("contextmenu",A),()=>{L.removeEventListener("contextmenu",A)}},[l,u]);const R=a.useMemo(()=>({open:y}),[y]);return kr("div",t,{state:R,ref:[x,n],props:[{onContextMenu:E,onTouchStart:$,onTouchMove:S,onTouchEnd:j,onTouchCancel:j,style:{WebkitTouchCallout:"none"}},s],stateAttributesMapping:OZ})}),gm=a.createContext({});function vm(e){const t=a.useRef(null);return t.current===null&&(t.current=e()),t.current}const _5=typeof window<"u",N5=_5?a.useLayoutEffect:a.useEffect,yc=a.createContext(null);function bm(e,t){e.indexOf(t)===-1&&e.push(t)}function _a(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Dn=(e,t,n)=>n>t?t:n<e?e:n;let ym=()=>{};const Kn={},D5=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function V5(e){return typeof e=="object"&&e!==null}const z5=e=>/^0[^.\s]+$/u.test(e);function F5(e){let t;return()=>(t===void 0&&(t=e()),t)}const dn=e=>e,VY=(e,t)=>n=>t(e(n)),si=(...e)=>e.reduce(VY),Us=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class wm{constructor(){this.subscriptions=[]}add(t){return bm(this.subscriptions,t),()=>_a(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Cn=e=>e*1e3,ln=e=>e/1e3;function B5(e,t){return t?e*(1e3/t):0}const H5=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,zY=1e-7,FY=12;function BY(e,t,n,r,o){let s,i,c=0;do i=t+(n-t)/2,s=H5(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>zY&&++c<FY);return i}function ii(e,t,n,r){if(e===t&&n===r)return dn;const o=s=>BY(s,0,1,e,n);return s=>s===0||s===1?s:H5(o(s),t,r)}const W5=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Z5=e=>t=>1-e(1-t),U5=ii(.33,1.53,.69,.99),xm=Z5(U5),G5=W5(xm),K5=e=>(e*=2)<1?.5*xm(e):.5*(2-Math.pow(2,-10*(e-1))),Cm=e=>1-Math.sin(Math.acos(e)),Y5=Z5(Cm),q5=W5(Cm),HY=ii(.42,0,1,1),WY=ii(0,0,.58,1),X5=ii(.42,0,.58,1),ZY=e=>Array.isArray(e)&&typeof e[0]!="number",J5=e=>Array.isArray(e)&&typeof e[0]=="number",UY={linear:dn,easeIn:HY,easeInOut:X5,easeOut:WY,circIn:Cm,circInOut:q5,circOut:Y5,backIn:xm,backInOut:G5,backOut:U5,anticipate:K5},GY=e=>typeof e=="string",r2=e=>{if(J5(e)){ym(e.length===4);const[t,n,r,o]=e;return ii(t,n,r,o)}else if(GY(e))return UY[e];return e},Ti=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function KY(e,t){let n=new Set,r=new Set,o=!1,s=!1;const i=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function u(d){i.has(d)&&(l.schedule(d),e()),d(c)}const l={schedule:(d,f=!1,p=!1)=>{const g=p&&o?n:r;return f&&i.add(d),g.has(d)||g.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(c=d,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(u),n.clear(),o=!1,s&&(s=!1,l.process(d))}};return l}const YY=40;function Q5(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=Ti.reduce((v,C)=>(v[C]=KY(s),v),{}),{setup:c,read:u,resolveKeyframes:l,preUpdate:d,update:f,preRender:p,render:m,postRender:g}=i,y=()=>{const v=Kn.useManualTiming?o.timestamp:performance.now();n=!1,Kn.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,YY),1)),o.timestamp=v,o.isProcessing=!0,c.process(o),u.process(o),l.process(o),d.process(o),f.process(o),p.process(o),m.process(o),g.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(y))},x=()=>{n=!0,r=!0,o.isProcessing||e(y)};return{schedule:Ti.reduce((v,C)=>{const k=i[C];return v[C]=(E,$=!1,S=!1)=>(n||x(),k.schedule(E,$,S)),v},{}),cancel:v=>{for(let C=0;C<Ti.length;C++)i[Ti[C]].cancel(v)},state:o,steps:i}}const{schedule:Ke,cancel:yr,state:bt,steps:zd}=Q5(typeof requestAnimationFrame<"u"?requestAnimationFrame:dn,!0);let ea;function qY(){ea=void 0}const _t={now:()=>(ea===void 0&&_t.set(bt.isProcessing||Kn.useManualTiming?bt.timestamp:performance.now()),ea),set:e=>{ea=e,queueMicrotask(qY)}},eE=e=>t=>typeof t=="string"&&t.startsWith(e),tE=eE("--"),XY=eE("var(--"),km=e=>XY(e)?JY.test(e.split("/*")[0].trim()):!1,JY=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function o2(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Zo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Gs={...Zo,transform:e=>Dn(0,1,e)},Ii={...Zo,default:1},Ls=e=>Math.round(e*1e5)/1e5,Em=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function QY(e){return e==null}const eq=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Sm=(e,t)=>n=>!!(typeof n=="string"&&eq.test(n)&&n.startsWith(e)||t&&!QY(n)&&Object.prototype.hasOwnProperty.call(n,t)),nE=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,c]=r.match(Em);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:c!==void 0?parseFloat(c):1}},tq=e=>Dn(0,255,e),Fd={...Zo,transform:e=>Math.round(tq(e))},Fr={test:Sm("rgb","red"),parse:nE("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Fd.transform(e)+", "+Fd.transform(t)+", "+Fd.transform(n)+", "+Ls(Gs.transform(r))+")"};function nq(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Uf={test:Sm("#"),parse:nq,transform:Fr.transform},ai=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),or=ai("deg"),Tn=ai("%"),he=ai("px"),rq=ai("vh"),oq=ai("vw"),s2={...Tn,parse:e=>Tn.parse(e)/100,transform:e=>Tn.transform(e*100)},ho={test:Sm("hsl","hue"),parse:nE("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Tn.transform(Ls(t))+", "+Tn.transform(Ls(n))+", "+Ls(Gs.transform(r))+")"},pt={test:e=>Fr.test(e)||Uf.test(e)||ho.test(e),parse:e=>Fr.test(e)?Fr.parse(e):ho.test(e)?ho.parse(e):Uf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Fr.transform(e):ho.transform(e),getAnimatableNone:e=>{const t=pt.parse(e);return t.alpha=0,pt.transform(t)}},sq=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function iq(e){return isNaN(e)&&typeof e=="string"&&(e.match(Em)?.length||0)+(e.match(sq)?.length||0)>0}const rE="number",oE="color",aq="var",cq="var(",i2="${}",lq=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ks(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const c=t.replace(lq,u=>(pt.test(u)?(r.color.push(s),o.push(oE),n.push(pt.parse(u))):u.startsWith(cq)?(r.var.push(s),o.push(aq),n.push(u)):(r.number.push(s),o.push(rE),n.push(parseFloat(u))),++s,i2)).split(i2);return{values:n,split:c,indexes:r,types:o}}function sE(e){return Ks(e).values}function iE(e){const{split:t,types:n}=Ks(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const c=n[i];c===rE?s+=Ls(o[i]):c===oE?s+=pt.transform(o[i]):s+=o[i]}return s}}const uq=e=>typeof e=="number"?0:pt.test(e)?pt.getAnimatableNone(e):e;function dq(e){const t=sE(e);return iE(e)(t.map(uq))}const kn={test:iq,parse:sE,createTransformer:iE,getAnimatableNone:dq};function Bd(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function fq({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const c=n<.5?n*(1+t):n+t-n*t,u=2*n-c;o=Bd(u,c,e+1/3),s=Bd(u,c,e),i=Bd(u,c,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function Na(e,t){return n=>n>0?t:e}const it=(e,t,n)=>e+(t-e)*n,Hd=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},pq=[Uf,Fr,ho],mq=e=>pq.find(t=>t.test(e));function a2(e){const t=mq(e);if(!t)return!1;let n=t.parse(e);return t===ho&&(n=fq(n)),n}const c2=(e,t)=>{const n=a2(e),r=a2(t);if(!n||!r)return Na(e,t);const o={...n};return s=>(o.red=Hd(n.red,r.red,s),o.green=Hd(n.green,r.green,s),o.blue=Hd(n.blue,r.blue,s),o.alpha=it(n.alpha,r.alpha,s),Fr.transform(o))},Gf=new Set(["none","hidden"]);function hq(e,t){return Gf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function gq(e,t){return n=>it(e,t,n)}function $m(e){return typeof e=="number"?gq:typeof e=="string"?km(e)?Na:pt.test(e)?c2:yq:Array.isArray(e)?aE:typeof e=="object"?pt.test(e)?c2:vq:Na}function aE(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>$m(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function vq(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=$m(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function bq(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],i=e.indexes[s][r[s]],c=e.values[i]??0;n[o]=c,r[s]++}return n}const yq=(e,t)=>{const n=kn.createTransformer(t),r=Ks(e),o=Ks(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Gf.has(e)&&!o.values.length||Gf.has(t)&&!r.values.length?hq(e,t):si(aE(bq(r,o),o.values),n):Na(e,t)};function cE(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?it(e,t,n):$m(e)(e,t)}const wq=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Ke.update(t,n),stop:()=>yr(t),now:()=>bt.isProcessing?bt.timestamp:_t.now()}},lE=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=Math.round(e(s/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Da=2e4;function Om(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Da;)t+=n,r=e.next(t);return t>=Da?1/0:t}function xq(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Om(r),Da);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:ln(o)}}const Cq=5;function uE(e,t,n){const r=Math.max(t-Cq,0);return B5(n-e(r),t-r)}const lt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Wd=.001;function kq({duration:e=lt.duration,bounce:t=lt.bounce,velocity:n=lt.velocity,mass:r=lt.mass}){let o,s,i=1-t;i=Dn(lt.minDamping,lt.maxDamping,i),e=Dn(lt.minDuration,lt.maxDuration,ln(e)),i<1?(o=l=>{const d=l*i,f=d*e,p=d-n,m=Kf(l,i),g=Math.exp(-f);return Wd-p/m*g},s=l=>{const f=l*i*e,p=f*n+n,m=Math.pow(i,2)*Math.pow(l,2)*e,g=Math.exp(-f),y=Kf(Math.pow(l,2),i);return(-o(l)+Wd>0?-1:1)*((p-m)*g)/y}):(o=l=>{const d=Math.exp(-l*e),f=(l-n)*e+1;return-Wd+d*f},s=l=>{const d=Math.exp(-l*e),f=(n-l)*(e*e);return d*f});const c=5/e,u=Sq(o,s,c);if(e=Cn(e),isNaN(u))return{stiffness:lt.stiffness,damping:lt.damping,duration:e};{const l=Math.pow(u,2)*r;return{stiffness:l,damping:i*2*Math.sqrt(r*l),duration:e}}}const Eq=12;function Sq(e,t,n){let r=n;for(let o=1;o<Eq;o++)r=r-e(r)/t(r);return r}function Kf(e,t){return e*Math.sqrt(1-t*t)}const $q=["duration","bounce"],Oq=["stiffness","damping","mass"];function l2(e,t){return t.some(n=>e[n]!==void 0)}function Lq(e){let t={velocity:lt.velocity,stiffness:lt.stiffness,damping:lt.damping,mass:lt.mass,isResolvedFromDuration:!1,...e};if(!l2(e,Oq)&&l2(e,$q))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*Dn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:lt.mass,stiffness:o,damping:s}}else{const n=kq({...e,velocity:0});t={...t,...n,mass:lt.mass},t.isResolvedFromDuration=!0}return t}function Va(e=lt.visualDuration,t=lt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],c={done:!1,value:s},{stiffness:u,damping:l,mass:d,duration:f,velocity:p,isResolvedFromDuration:m}=Lq({...n,velocity:-ln(n.velocity||0)}),g=p||0,y=l/(2*Math.sqrt(u*d)),x=i-s,w=ln(Math.sqrt(u/d)),b=Math.abs(x)<5;r||(r=b?lt.restSpeed.granular:lt.restSpeed.default),o||(o=b?lt.restDelta.granular:lt.restDelta.default);let v;if(y<1){const k=Kf(w,y);v=E=>{const $=Math.exp(-y*w*E);return i-$*((g+y*w*x)/k*Math.sin(k*E)+x*Math.cos(k*E))}}else if(y===1)v=k=>i-Math.exp(-w*k)*(x+(g+w*x)*k);else{const k=w*Math.sqrt(y*y-1);v=E=>{const $=Math.exp(-y*w*E),S=Math.min(k*E,300);return i-$*((g+y*w*x)*Math.sinh(S)+k*x*Math.cosh(S))/k}}const C={calculatedDuration:m&&f||null,next:k=>{const E=v(k);if(m)c.done=k>=f;else{let $=k===0?g:0;y<1&&($=k===0?Cn(g):uE(v,k,E));const S=Math.abs($)<=r,j=Math.abs(i-E)<=o;c.done=S&&j}return c.value=c.done?i:E,c},toString:()=>{const k=Math.min(Om(C),Da),E=lE($=>C.next(k*$).value,k,30);return k+"ms "+E},toTransition:()=>{}};return C}Va.applyToOptions=e=>{const t=xq(e,100,Va);return e.ease=t.ease,e.duration=Cn(t.duration),e.type="keyframes",e};function Yf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:c,max:u,restDelta:l=.5,restSpeed:d}){const f=e[0],p={done:!1,value:f},m=S=>c!==void 0&&S<c||u!==void 0&&S>u,g=S=>c===void 0?u:u===void 0||Math.abs(c-S)<Math.abs(u-S)?c:u;let y=n*t;const x=f+y,w=i===void 0?x:i(x);w!==x&&(y=w-f);const b=S=>-y*Math.exp(-S/r),v=S=>w+b(S),C=S=>{const j=b(S),R=v(S);p.done=Math.abs(j)<=l,p.value=p.done?w:R};let k,E;const $=S=>{m(p.value)&&(k=S,E=Va({keyframes:[p.value,g(p.value)],velocity:uE(v,S,p.value),damping:o,stiffness:s,restDelta:l,restSpeed:d}))};return $(0),{calculatedDuration:null,next:S=>{let j=!1;return!E&&k===void 0&&(j=!0,C(S),$(S)),k!==void 0&&S>=k?E.next(S-k):(!j&&C(S),p)}}}function jq(e,t,n){const r=[],o=n||Kn.mix||cE,s=e.length-1;for(let i=0;i<s;i++){let c=o(e[i],e[i+1]);if(t){const u=Array.isArray(t)?t[i]||dn:t;c=si(u,c)}r.push(c)}return r}function Rq(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(ym(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=jq(t,r,o),u=c.length,l=d=>{if(i&&d<e[0])return t[0];let f=0;if(u>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const p=Us(e[f],e[f+1],d);return c[f](p)};return n?d=>l(Dn(e[0],e[s-1],d)):l}function Pq(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Us(0,t,r);e.push(it(n,1,o))}}function Mq(e){const t=[0];return Pq(t,e.length-1),t}function Tq(e,t){return e.map(n=>n*t)}function Iq(e,t){return e.map(()=>t||X5).splice(0,e.length-1)}function js({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=ZY(r)?r.map(r2):r2(r),s={done:!1,value:t[0]},i=Tq(n&&n.length===t.length?n:Mq(t),e),c=Rq(i,t,{ease:Array.isArray(o)?o:Iq(t,o)});return{calculatedDuration:e,next:u=>(s.value=c(u),s.done=u>=e,s)}}const Aq=e=>e!==null;function Lm(e,{repeat:t,repeatType:n="loop"},r,o=1){const s=e.filter(Aq),c=o<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!c||r===void 0?s[c]:r}const _q={decay:Yf,inertia:Yf,tween:js,keyframes:js,spring:Va};function dE(e){typeof e.type=="string"&&(e.type=_q[e.type])}class jm{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Nq=e=>e/100;class Rm extends jm{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==_t.now()&&this.tick(_t.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;dE(t);const{type:n=js,repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=t;let{keyframes:c}=t;const u=n||js;u!==js&&typeof c[0]!="number"&&(this.mixKeyframes=si(Nq,cE(c[0],c[1])),c=[0,100]);const l=u({...t,keyframes:c});s==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...c].reverse(),velocity:-i})),l.calculatedDuration===null&&(l.calculatedDuration=Om(l));const{calculatedDuration:d}=l;this.calculatedDuration=d,this.resolvedDuration=d+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=l}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:s,mirroredGenerator:i,resolvedDuration:c,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:l=0,keyframes:d,repeat:f,repeatType:p,repeatDelay:m,type:g,onUpdate:y,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-l*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?w<0:w>o;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let v=this.currentTime,C=r;if(f){const S=Math.min(this.currentTime,o)/c;let j=Math.floor(S),R=S%1;!R&&S>=1&&(R=1),R===1&&j--,j=Math.min(j,f+1),j%2&&(p==="reverse"?(R=1-R,m&&(R-=m/c)):p==="mirror"&&(C=i)),v=Dn(0,1,R)*c}const k=b?{done:!1,value:d[0]}:C.next(v);s&&(k.value=s(k.value));let{done:E}=k;!b&&u!==null&&(E=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const $=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return $&&g!==Yf&&(k.value=Lm(d,this.options,x,this.speed)),y&&y(k.value),$&&this.finish(),k}then(t,n){return this.finished.then(t,n)}get duration(){return ln(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ln(t)}get time(){return ln(this.currentTime)}set time(t){t=Cn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(_t.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ln(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=wq,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(_t.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Dq(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Br=e=>e*180/Math.PI,qf=e=>{const t=Br(Math.atan2(e[1],e[0]));return Xf(t)},Vq={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:qf,rotateZ:qf,skewX:e=>Br(Math.atan(e[1])),skewY:e=>Br(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Xf=e=>(e=e%360,e<0&&(e+=360),e),u2=qf,d2=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),f2=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),zq={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:d2,scaleY:f2,scale:e=>(d2(e)+f2(e))/2,rotateX:e=>Xf(Br(Math.atan2(e[6],e[5]))),rotateY:e=>Xf(Br(Math.atan2(-e[2],e[0]))),rotateZ:u2,rotate:u2,skewX:e=>Br(Math.atan(e[4])),skewY:e=>Br(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Jf(e){return e.includes("scale")?1:0}function Qf(e,t){if(!e||e==="none")return Jf(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=zq,o=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Vq,o=c}if(!o)return Jf(t);const s=r[t],i=o[1].split(",").map(Bq);return typeof s=="function"?s(i):i[s]}const Fq=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Qf(n,t)};function Bq(e){return parseFloat(e.trim())}const Uo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Go=new Set(Uo),p2=e=>e===Zo||e===he,Hq=new Set(["x","y","z"]),Wq=Uo.filter(e=>!Hq.has(e));function Zq(e){const t=[];return Wq.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const lr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Qf(t,"x"),y:(e,{transform:t})=>Qf(t,"y")};lr.translateX=lr.x;lr.translateY=lr.y;const Wr=new Set;let ep=!1,tp=!1,np=!1;function fE(){if(tp){const e=Array.from(Wr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=Zq(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{r.getValue(s)?.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}tp=!1,ep=!1,Wr.forEach(e=>e.complete(np)),Wr.clear()}function pE(){Wr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(tp=!0)})}function Uq(){np=!0,pE(),fE(),np=!1}class Pm{constructor(t,n,r,o,s,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(Wr.add(this),ep||(ep=!0,Ke.read(pE),Ke.resolveKeyframes(fE))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const s=o?.get(),i=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const c=r.readValue(n,i);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=i),o&&s===void 0&&o.set(t[0])}Dq(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Wr.delete(this)}cancel(){this.state==="scheduled"&&(Wr.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Gq=e=>e.startsWith("--");function Kq(e,t,n){Gq(t)?e.style.setProperty(t,n):e.style[t]=n}const Yq={};function mE(e,t){const n=F5(e);return()=>Yq[t]??n()}const qq=mE(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),hE=mE(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ys=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,m2={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ys([0,.65,.55,1]),circOut:ys([.55,0,1,.45]),backIn:ys([.31,.01,.66,-.59]),backOut:ys([.33,1.53,.69,.99])};function gE(e,t){if(e)return typeof e=="function"?hE()?lE(e,t):"ease-out":J5(e)?ys(e):Array.isArray(e)?e.map(n=>gE(n,t)||m2.easeOut):m2[e]}function Xq(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:c="easeOut",times:u}={},l=void 0){const d={[t]:n};u&&(d.offset=u);const f=gE(c,o);Array.isArray(f)&&(d.easing=f);const p={delay:r,duration:o,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"};return l&&(p.pseudoElement=l),e.animate(d,p)}function vE(e){return typeof e=="function"&&"applyToOptions"in e}function Jq({type:e,...t}){return vE(e)&&hE()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class bE extends jm{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:s,allowFlatten:i=!1,finalKeyframe:c,onComplete:u}=t;this.isPseudoElement=!!s,this.allowFlatten=i,this.options=t,ym(typeof t.type!="string");const l=Jq(t);this.animation=Xq(n,r,o,l,s),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const d=Lm(o,this.options,c,this.speed);this.updateMotionValue?this.updateMotionValue(d):Kq(n,r,d),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ln(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ln(t)}get time(){return ln(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Cn(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&qq()?(this.animation.timeline=t,dn):n(this)}}const yE={anticipate:K5,backInOut:G5,circInOut:q5};function Qq(e){return e in yE}function eX(e){typeof e.ease=="string"&&Qq(e.ease)&&(e.ease=yE[e.ease])}const Zd=10;class tX extends bE{constructor(t){eX(t),dE(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:s,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new Rm({...i,autoplay:!1}),u=Math.max(Zd,_t.now()-this.startTime),l=Dn(0,Zd,u-Zd);n.setWithVelocity(c.sample(Math.max(0,u-l)).value,c.sample(u).value,l),c.stop()}}const h2=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(kn.test(e)||e==="0")&&!e.startsWith("url("));function nX(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function rX(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=h2(o,t),c=h2(s,t);return!i||!c?!1:nX(e)||(n==="spring"||vE(n))&&r}function rp(e){e.duration=0,e.type="keyframes"}const oX=new Set(["opacity","clipPath","filter","transform"]),sX=F5(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function iX(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:s,type:i}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:l}=t.owner.getProps();return sX()&&n&&oX.has(n)&&(n!=="transform"||!l)&&!u&&!r&&o!=="mirror"&&s!==0&&i!=="inertia"}const aX=40;class cX extends jm{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",keyframes:c,name:u,motionValue:l,element:d,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=_t.now();const p={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,name:u,motionValue:l,element:d,...f},m=d?.KeyframeResolver||Pm;this.keyframeResolver=new m(c,(g,y,x)=>this.onKeyframesResolved(g,y,p,!x),u,l,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:s,type:i,velocity:c,delay:u,isHandoff:l,onUpdate:d}=r;this.resolvedAt=_t.now(),rX(t,s,i,c)||((Kn.instantAnimations||!u)&&d?.(Lm(t,r,n)),t[0]=t[t.length-1],rp(r),r.repeat=0);const p={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>aX?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},m=!l&&iX(p),g=p.motionValue?.owner?.current,y=m?new tX({...p,element:g}):new Rm(p);y.finished.then(()=>{this.notifyFinished()}).catch(dn),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Uq()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function wE(e,t,n,r=0,o=1){const s=Array.from(e).sort((l,d)=>l.sortNodePosition(d)).indexOf(t),i=e.size,c=(i-1)*r;return typeof n=="function"?n(s,i):o===1?s*r:c-s*r}const lX=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function uX(e){const t=lX.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}function xE(e,t,n=1){const[r,o]=uX(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return D5(i)?parseFloat(i):i}return km(o)?xE(o,t,n+1):o}const dX={type:"spring",stiffness:500,damping:25,restSpeed:10},fX=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),pX={type:"keyframes",duration:.8},mX={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},hX=(e,{keyframes:t})=>t.length>2?pX:Go.has(e)?e.startsWith("scale")?fX(t[1]):dX:mX,gX=e=>e!==null;function vX(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(gX),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[s]}function CE(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Mm(e,t){const n=e?.[t]??e?.default??e;return n!==e?CE(n,e):n}function bX({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:c,from:u,elapsed:l,...d}){return!!Object.keys(d).length}const Tm=(e,t,n,r={},o,s)=>i=>{const c=Mm(r,e)||{},u=c.delay||r.delay||0;let{elapsed:l=0}=r;l=l-Cn(u);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-l,onUpdate:p=>{t.set(p),c.onUpdate&&c.onUpdate(p)},onComplete:()=>{i(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:s?void 0:o};bX(c)||Object.assign(d,hX(e,d)),d.duration&&(d.duration=Cn(d.duration)),d.repeatDelay&&(d.repeatDelay=Cn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(rp(d),d.delay===0&&(f=!0)),(Kn.instantAnimations||Kn.skipAnimations||o?.shouldSkipAnimations)&&(f=!0,rp(d),d.delay=0),d.allowFlatten=!c.type&&!c.ease,f&&!s&&t.get()!==void 0){const p=vX(d.keyframes,c);if(p!==void 0){Ke.update(()=>{d.onUpdate(p),d.onComplete()});return}}return c.isSync?new Rm(d):new cX(d)};function g2(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Im(e,t,n,r){if(typeof t=="function"){const[o,s]=g2(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=g2(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function Eo(e,t,n){const r=e.getProps();return Im(r,t,n!==void 0?n:r.custom,e)}const kE=new Set(["width","height","top","left","right","bottom",...Uo]),v2=30,yX=e=>!isNaN(parseFloat(e));class wX{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=_t.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=_t.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=yX(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new wm);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ke.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=_t.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>v2)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,v2);return B5(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ao(e,t){return new wX(e,t)}const op=e=>Array.isArray(e);function xX(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ao(n))}function CX(e){return op(e)?e[e.length-1]||0:e}function kX(e,t){const n=Eo(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const c=CX(s[i]);xX(e,i,c)}}const $t=e=>!!(e&&e.getVelocity);function EX(e){return!!($t(e)&&e.add)}function sp(e,t){const n=e.getValue("willChange");if(EX(n))return n.add(t);if(!n&&Kn.WillChange){const r=new Kn.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Am(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const SX="framerAppearId",EE="data-"+Am(SX);function SE(e){return e.props[EE]}function $X({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function $E(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:s,transitionEnd:i,...c}=t;const u=e.getDefaultTransition();s=s?CE(s,u):u;const l=s?.reduceMotion;r&&(s=r);const d=[],f=o&&e.animationState&&e.animationState.getState()[o];for(const p in c){const m=e.getValue(p,e.latestValues[p]??null),g=c[p];if(g===void 0||f&&$X(f,p))continue;const y={delay:n,...Mm(s||{},p)},x=m.get();if(x!==void 0&&!m.isAnimating&&!Array.isArray(g)&&g===x&&!y.velocity)continue;let w=!1;if(window.MotionHandoffAnimation){const C=SE(e);if(C){const k=window.MotionHandoffAnimation(C,p,Ke);k!==null&&(y.startTime=k,w=!0)}}sp(e,p);const b=l??e.shouldReduceMotion;m.start(Tm(p,m,g,b&&kE.has(p)?{type:!1}:y,e,w));const v=m.animation;v&&d.push(v)}if(i){const p=()=>Ke.update(()=>{i&&kX(e,i)});d.length?Promise.all(d).then(p):p()}return d}function ip(e,t,n={}){const r=Eo(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all($E(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:l=0,staggerChildren:d,staggerDirection:f}=o;return OX(e,t,u,l,d,f,n)}:()=>Promise.resolve(),{when:c}=o;if(c){const[u,l]=c==="beforeChildren"?[s,i]:[i,s];return u().then(()=>l())}else return Promise.all([s(),i(n.delay)])}function OX(e,t,n=0,r=0,o=0,s=1,i){const c=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),c.push(ip(u,t,{...i,delay:n+(typeof r=="function"?0:r)+wE(e.variantChildren,u,r,o,s)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(c)}function LX(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>ip(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=ip(e,t,n);else{const o=typeof t=="function"?Eo(e,t,n.custom):t;r=Promise.all($E(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const jX={test:e=>e==="auto",parse:e=>e},OE=e=>t=>t.test(e),LE=[Zo,he,Tn,or,oq,rq,jX],b2=e=>LE.find(OE(e));function RX(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||z5(e):!0}const PX=new Set(["brightness","contrast","saturate","opacity"]);function MX(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Em)||[];if(!r)return e;const o=n.replace(r,"");let s=PX.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const TX=/\b([a-z-]*)\(.*?\)/gu,ap={...kn,getAnimatableNone:e=>{const t=e.match(TX);return t?t.map(MX).join(" "):e}},cp={...kn,getAnimatableNone:e=>{const t=kn.parse(e);return kn.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},y2={...Zo,transform:Math.round},IX={rotate:or,rotateX:or,rotateY:or,rotateZ:or,scale:Ii,scaleX:Ii,scaleY:Ii,scaleZ:Ii,skew:or,skewX:or,skewY:or,distance:he,translateX:he,translateY:he,translateZ:he,x:he,y:he,z:he,perspective:he,transformPerspective:he,opacity:Gs,originX:s2,originY:s2,originZ:he},_m={borderWidth:he,borderTopWidth:he,borderRightWidth:he,borderBottomWidth:he,borderLeftWidth:he,borderRadius:he,borderTopLeftRadius:he,borderTopRightRadius:he,borderBottomRightRadius:he,borderBottomLeftRadius:he,width:he,maxWidth:he,height:he,maxHeight:he,top:he,right:he,bottom:he,left:he,inset:he,insetBlock:he,insetBlockStart:he,insetBlockEnd:he,insetInline:he,insetInlineStart:he,insetInlineEnd:he,padding:he,paddingTop:he,paddingRight:he,paddingBottom:he,paddingLeft:he,paddingBlock:he,paddingBlockStart:he,paddingBlockEnd:he,paddingInline:he,paddingInlineStart:he,paddingInlineEnd:he,margin:he,marginTop:he,marginRight:he,marginBottom:he,marginLeft:he,marginBlock:he,marginBlockStart:he,marginBlockEnd:he,marginInline:he,marginInlineStart:he,marginInlineEnd:he,fontSize:he,backgroundPositionX:he,backgroundPositionY:he,...IX,zIndex:y2,fillOpacity:Gs,strokeOpacity:Gs,numOctaves:y2},AX={..._m,color:pt,backgroundColor:pt,outlineColor:pt,fill:pt,stroke:pt,borderColor:pt,borderTopColor:pt,borderRightColor:pt,borderBottomColor:pt,borderLeftColor:pt,filter:ap,WebkitFilter:ap,mask:cp,WebkitMask:cp},jE=e=>AX[e],_X=new Set([ap,cp]);function RE(e,t){let n=jE(e);return _X.has(n)||(n=kn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const NX=new Set(["auto","none","0"]);function DX(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!NX.has(s)&&Ks(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=RE(n,o)}class VX extends Pm{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let f=t[d];if(typeof f=="string"&&(f=f.trim(),km(f))){const p=xE(f,n.current);p!==void 0&&(t[d]=p),d===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!kE.has(r)||t.length!==2)return;const[o,s]=t,i=b2(o),c=b2(s),u=o2(o),l=o2(s);if(u!==l&&lr[r]){this.needsMeasurement=!0;return}if(i!==c)if(p2(i)&&p2(c))for(let d=0;d<t.length;d++){const f=t[d];typeof f=="string"&&(t[d]=parseFloat(f))}else lr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||RX(t[o]))&&r.push(o);r.length&&DX(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=lr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const s=r.length-1,i=r[s];r[s]=lr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const zX=new Set(["opacity","clipPath","filter","transform"]);function PE(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const ME=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function lp(e){return V5(e)&&"offsetHeight"in e}const{schedule:Nm}=Q5(queueMicrotask,!1),xn={x:!1,y:!1};function TE(){return xn.x||xn.y}function FX(e){return e==="x"||e==="y"?xn[e]?null:(xn[e]=!0,()=>{xn[e]=!1}):xn.x||xn.y?null:(xn.x=xn.y=!0,()=>{xn.x=xn.y=!1})}function IE(e,t){const n=PE(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function BX(e){return!(e.pointerType==="touch"||TE())}function HX(e,t,n={}){const[r,o,s]=IE(e,n);return r.forEach(i=>{let c=!1,u=!1,l;const d=()=>{i.removeEventListener("pointerleave",g)},f=x=>{l&&(l(x),l=void 0),d()},p=x=>{c=!1,window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p),u&&(u=!1,f(x))},m=()=>{c=!0,window.addEventListener("pointerup",p,o),window.addEventListener("pointercancel",p,o)},g=x=>{if(x.pointerType!=="touch"){if(c){u=!0;return}f(x)}},y=x=>{if(!BX(x))return;u=!1;const w=t(i,x);typeof w=="function"&&(l=w,i.addEventListener("pointerleave",g,o))};i.addEventListener("pointerenter",y,o),i.addEventListener("pointerdown",m,o)}),s}const AE=(e,t)=>t?e===t?!0:AE(e,t.parentElement):!1,Dm=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,WX=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ZX(e){return WX.has(e.tagName)||e.isContentEditable===!0}const UX=new Set(["INPUT","SELECT","TEXTAREA"]);function GX(e){return UX.has(e.tagName)||e.isContentEditable===!0}const ta=new WeakSet;function w2(e){return t=>{t.key==="Enter"&&e(t)}}function Ud(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const KX=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=w2(()=>{if(ta.has(n))return;Ud(n,"down");const o=w2(()=>{Ud(n,"up")}),s=()=>Ud(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function x2(e){return Dm(e)&&!TE()}const C2=new WeakSet;function YX(e,t,n={}){const[r,o,s]=IE(e,n),i=c=>{const u=c.currentTarget;if(!x2(c)||C2.has(c))return;ta.add(u),n.stopPropagation&&C2.add(c);const l=t(u,c),d=(m,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),ta.has(u)&&ta.delete(u),x2(m)&&typeof l=="function"&&l(m,{success:g})},f=m=>{d(m,u===window||u===document||n.useGlobalTarget||AE(u,m.target))},p=m=>{d(m,!1)};window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",p,o)};return r.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",i,o),lp(c)&&(c.addEventListener("focus",l=>KX(l,o)),!ZX(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),s}function Vm(e){return V5(e)&&"ownerSVGElement"in e}const na=new WeakMap;let ra;const _E=(e,t,n)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:Vm(r)&&"getBBox"in r?r.getBBox()[t]:r[n],qX=_E("inline","width","offsetWidth"),XX=_E("block","height","offsetHeight");function JX({target:e,borderBoxSize:t}){na.get(e)?.forEach(n=>{n(e,{get width(){return qX(e,t)},get height(){return XX(e,t)}})})}function QX(e){e.forEach(JX)}function eJ(){typeof ResizeObserver>"u"||(ra=new ResizeObserver(QX))}function tJ(e,t){ra||eJ();const n=PE(e);return n.forEach(r=>{let o=na.get(r);o||(o=new Set,na.set(r,o)),o.add(t),ra?.observe(r)}),()=>{n.forEach(r=>{const o=na.get(r);o?.delete(t),o?.size||ra?.unobserve(r)})}}const oa=new Set;let go;function nJ(){go=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};oa.forEach(t=>t(e))},window.addEventListener("resize",go)}function rJ(e){return oa.add(e),go||nJ(),()=>{oa.delete(e),!oa.size&&typeof go=="function"&&(window.removeEventListener("resize",go),go=void 0)}}function k2(e,t){return typeof e=="function"?rJ(e):tJ(e,t)}function oJ(e){return Vm(e)&&e.tagName==="svg"}const sJ=[...LE,pt,kn],iJ=e=>sJ.find(OE(e)),E2=()=>({translate:0,scale:1,origin:0,originPoint:0}),vo=()=>({x:E2(),y:E2()}),S2=()=>({min:0,max:0}),vt=()=>({x:S2(),y:S2()}),aJ=new WeakMap;function wc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ys(e){return typeof e=="string"||Array.isArray(e)}const zm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Fm=["initial",...zm];function xc(e){return wc(e.animate)||Fm.some(t=>Ys(e[t]))}function NE(e){return!!(xc(e)||e.variants)}function cJ(e,t,n){for(const r in t){const o=t[r],s=n[r];if($t(o))e.addValue(r,o);else if($t(s))e.addValue(r,Ao(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,Ao(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const up={current:null},DE={current:!1},lJ=typeof window<"u";function uJ(){if(DE.current=!0,!!lJ)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>up.current=e.matches;e.addEventListener("change",t),t()}else up.current=!1}const $2=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let za={};function VE(e){za=e}function dJ(){return za}class fJ{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,skipAnimations:s,blockInitialAnimation:i,visualState:c},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Pm,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=_t.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Ke.render(this.render,!1,!0))};const{latestValues:l,renderState:d}=c;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=s,this.options=u,this.blockInitialAnimation=!!i,this.isControllingVariants=xc(n),this.isVariantNode=NE(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in p){const g=p[m];l[m]!==void 0&&$t(g)&&g.set(l[m])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,aJ.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(DE.current||uJ(),this.shouldReduceMotion=up.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),yr(this.notifyUpdate),yr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&zX.has(t)&&this.current instanceof HTMLElement){const{factory:i,keyframes:c,times:u,ease:l,duration:d}=n.accelerate,f=new bE({element:this.current,name:t,keyframes:c,times:u,ease:l,duration:Cn(d)}),p=i(f);this.valueSubscriptions.set(t,()=>{p(),f.cancel()});return}const r=Go.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Ke.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in za){const n=za[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):vt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<$2.length;r++){const o=$2[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=cJ(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Ao(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(D5(r)||z5(r))?r=parseFloat(r):!iJ(r)&&kn.test(n)&&(r=RE(t,n)),this.setBaseTarget(t,$t(r)?r.get():r)),$t(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=Im(this.props,n,this.presenceContext?.custom);s&&(r=s[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!$t(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new wm),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Nm.render(this.render)}}class zE extends fJ{constructor(){super(...arguments),this.KeyframeResolver=VX}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;$t(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Or{constructor(t){this.isMounted=!1,this.node=t}update(){}}function FE({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function pJ({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function mJ(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Gd(e){return e===void 0||e===1}function dp({scale:e,scaleX:t,scaleY:n}){return!Gd(e)||!Gd(t)||!Gd(n)}function zr(e){return dp(e)||BE(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function BE(e){return O2(e.x)||O2(e.y)}function O2(e){return e&&e!=="0%"}function Fa(e,t,n){const r=e-n,o=t*r;return n+o}function L2(e,t,n,r,o){return o!==void 0&&(e=Fa(e,o,r)),Fa(e,n,r)+t}function fp(e,t=0,n=1,r,o){e.min=L2(e.min,t,n,r,o),e.max=L2(e.max,t,n,r,o)}function HE(e,{x:t,y:n}){fp(e.x,t.translate,t.scale,t.originPoint),fp(e.y,n.translate,n.scale,n.originPoint)}const j2=.999999999999,R2=1.0000000000001;function hJ(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let c=0;c<o;c++){s=n[c],i=s.projectionDelta;const{visualElement:u}=s.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&yo(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,HE(e,i)),r&&zr(s.latestValues)&&yo(e,s.latestValues))}t.x<R2&&t.x>j2&&(t.x=1),t.y<R2&&t.y>j2&&(t.y=1)}function bo(e,t){e.min=e.min+t,e.max=e.max+t}function P2(e,t,n,r,o=.5){const s=it(e.min,e.max,o);fp(e,t,n,s,r)}function yo(e,t){P2(e.x,t.x,t.scaleX,t.scale,t.originX),P2(e.y,t.y,t.scaleY,t.scale,t.originY)}function WE(e,t){return FE(mJ(e.getBoundingClientRect(),t))}function gJ(e,t,n){const r=WE(e,n),{scroll:o}=t;return o&&(bo(r.x,o.offset.x),bo(r.y,o.offset.y)),r}const vJ={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},bJ=Uo.length;function yJ(e,t,n){let r="",o=!0;for(let s=0;s<bJ;s++){const i=Uo[s],c=e[i];if(c===void 0)continue;let u=!0;if(typeof c=="number")u=c===(i.startsWith("scale")?1:0);else{const l=parseFloat(c);u=i.startsWith("scale")?l===1:l===0}if(!u||n){const l=ME(c,_m[i]);if(!u){o=!1;const d=vJ[i]||i;r+=`${d}(${l}) `}n&&(t[i]=l)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Bm(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let i=!1,c=!1;for(const u in t){const l=t[u];if(Go.has(u)){i=!0;continue}else if(tE(u)){o[u]=l;continue}else{const d=ME(l,_m[u]);u.startsWith("origin")?(c=!0,s[u]=d):r[u]=d}}if(t.transform||(i||n?r.transform=yJ(t,e.transform,n):r.transform&&(r.transform="none")),c){const{originX:u="50%",originY:l="50%",originZ:d=0}=s;r.transformOrigin=`${u} ${l} ${d}`}}function ZE(e,{style:t,vars:n},r,o){const s=e.style;let i;for(i in t)s[i]=t[i];o?.applyProjectionStyles(s,r);for(i in n)s.setProperty(i,n[i])}function M2(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const cs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(he.test(e))e=parseFloat(e);else return e;const n=M2(e,t.target.x),r=M2(e,t.target.y);return`${n}% ${r}%`}},wJ={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=kn.parse(e);if(o.length>5)return r;const s=kn.createTransformer(e),i=typeof o[0]!="number"?1:0,c=n.x.scale*t.x,u=n.y.scale*t.y;o[0+i]/=c,o[1+i]/=u;const l=it(c,u,.5);return typeof o[2+i]=="number"&&(o[2+i]/=l),typeof o[3+i]=="number"&&(o[3+i]/=l),s(o)}},pp={borderRadius:{...cs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:cs,borderTopRightRadius:cs,borderBottomLeftRadius:cs,borderBottomRightRadius:cs,boxShadow:wJ};function UE(e,{layout:t,layoutId:n}){return Go.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!pp[e]||e==="opacity")}function Hm(e,t,n){const r=e.style,o=t?.style,s={};if(!r)return s;for(const i in r)($t(r[i])||o&&$t(o[i])||UE(i,e)||n?.getValue(i)?.liveStyle!==void 0)&&(s[i]=r[i]);return s}function xJ(e){return window.getComputedStyle(e)}class CJ extends zE{constructor(){super(...arguments),this.type="html",this.renderInstance=ZE}readValueFromInstance(t,n){if(Go.has(n))return this.projection?.isProjecting?Jf(n):Fq(t,n);{const r=xJ(t),o=(tE(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return WE(t,n)}build(t,n,r){Bm(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Hm(t,n,r)}}const kJ={offset:"stroke-dashoffset",array:"stroke-dasharray"},EJ={offset:"strokeDashoffset",array:"strokeDasharray"};function SJ(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?kJ:EJ;e[s.offset]=`${-r}`,e[s.array]=`${t} ${n}`}const $J=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function GE(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:s=1,pathOffset:i=0,...c},u,l,d){if(Bm(e,c,l),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p}=e;f.transform&&(p.transform=f.transform,delete f.transform),(p.transform||f.transformOrigin)&&(p.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),p.transform&&(p.transformBox=d?.transformBox??"fill-box",delete f.transformBox);for(const m of $J)f[m]!==void 0&&(p[m]=f[m],delete f[m]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&SJ(f,o,s,i,!1)}const KE=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),YE=e=>typeof e=="string"&&e.toLowerCase()==="svg";function OJ(e,t,n,r){ZE(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(KE.has(o)?o:Am(o),t.attrs[o])}function qE(e,t,n){const r=Hm(e,t,n);for(const o in e)if($t(e[o])||$t(t[o])){const s=Uo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}class LJ extends zE{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=vt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Go.has(n)){const r=jE(n);return r&&r.default||0}return n=KE.has(n)?n:Am(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return qE(t,n,r)}build(t,n,r){GE(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){OJ(t,n,r,o)}mount(t){this.isSVGTag=YE(t.tagName),super.mount(t)}}const jJ=Fm.length;function XE(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?XE(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<jJ;n++){const r=Fm[n],o=e.props[r];(Ys(o)||o===!1)&&(t[r]=o)}return t}function JE(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const RJ=[...zm].reverse(),PJ=zm.length;function MJ(e){return t=>Promise.all(t.map(({animation:n,options:r})=>LX(e,n,r)))}function TJ(e){let t=MJ(e),n=T2(),r=!0;const o=u=>(l,d)=>{const f=Eo(e,d,u==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:p,transitionEnd:m,...g}=f;l={...l,...g,...m}}return l};function s(u){t=u(e)}function i(u){const{props:l}=e,d=XE(e.parent)||{},f=[],p=new Set;let m={},g=1/0;for(let x=0;x<PJ;x++){const w=RJ[x],b=n[w],v=l[w]!==void 0?l[w]:d[w],C=Ys(v),k=w===u?b.isActive:null;k===!1&&(g=x);let E=v===d[w]&&v!==l[w]&&C;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),b.protectedKeys={...m},!b.isActive&&k===null||!v&&!b.prevProp||wc(v)||typeof v=="boolean")continue;if(w==="exit"&&b.isActive&&k!==!0){b.prevResolvedValues&&(m={...m,...b.prevResolvedValues});continue}const $=IJ(b.prevProp,v);let S=$||w===u&&b.isActive&&!E&&C||x>g&&C,j=!1;const R=Array.isArray(v)?v:[v];let T=R.reduce(o(w),{});k===!1&&(T={});const{prevResolvedValues:A={}}=b,L={...A,...T},V=N=>{S=!0,p.has(N)&&(j=!0,p.delete(N)),b.needsAnimating[N]=!0;const O=e.getValue(N);O&&(O.liveStyle=!1)};for(const N in L){const O=T[N],z=A[N];if(m.hasOwnProperty(N))continue;let M=!1;op(O)&&op(z)?M=!JE(O,z):M=O!==z,M?O!=null?V(N):p.add(N):O!==void 0&&p.has(N)?V(N):b.protectedKeys[N]=!0}b.prevProp=v,b.prevResolvedValues=T,b.isActive&&(m={...m,...T}),r&&e.blockInitialAnimation&&(S=!1);const I=E&&$;S&&(!I||j)&&f.push(...R.map(N=>{const O={type:w};if(typeof N=="string"&&r&&!I&&e.manuallyAnimateOnMount&&e.parent){const{parent:z}=e,M=Eo(z,N);if(z.enteringChildren&&M){const{delayChildren:q}=M.transition||{};O.delay=wE(z.enteringChildren,e,q)}}return{animation:N,options:O}}))}if(p.size){const x={};if(typeof l.initial!="boolean"){const w=Eo(e,Array.isArray(l.initial)?l.initial[0]:l.initial);w&&w.transition&&(x.transition=w.transition)}p.forEach(w=>{const b=e.getBaseTarget(w),v=e.getValue(w);v&&(v.liveStyle=!0),x[w]=b??null}),f.push({animation:x})}let y=!!f.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(f):Promise.resolve()}function c(u,l){if(n[u].isActive===l)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(u,l)),n[u].isActive=l;const d=i(u);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:c,setAnimateFunction:s,getState:()=>n,reset:()=>{n=T2()}}}function IJ(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!JE(t,e):!1}function _r(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function T2(){return{animate:_r(!0),whileInView:_r(),whileHover:_r(),whileTap:_r(),whileDrag:_r(),whileFocus:_r(),exit:_r()}}function I2(e,t){e.min=t.min,e.max=t.max}function yn(e,t){I2(e.x,t.x),I2(e.y,t.y)}function A2(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const QE=1e-4,AJ=1-QE,_J=1+QE,e4=.01,NJ=0-e4,DJ=0+e4;function Nt(e){return e.max-e.min}function VJ(e,t,n){return Math.abs(e-t)<=n}function _2(e,t,n,r=.5){e.origin=r,e.originPoint=it(t.min,t.max,e.origin),e.scale=Nt(n)/Nt(t),e.translate=it(n.min,n.max,e.origin)-e.originPoint,(e.scale>=AJ&&e.scale<=_J||isNaN(e.scale))&&(e.scale=1),(e.translate>=NJ&&e.translate<=DJ||isNaN(e.translate))&&(e.translate=0)}function Rs(e,t,n,r){_2(e.x,t.x,n.x,r?r.originX:void 0),_2(e.y,t.y,n.y,r?r.originY:void 0)}function N2(e,t,n){e.min=n.min+t.min,e.max=e.min+Nt(t)}function zJ(e,t,n){N2(e.x,t.x,n.x),N2(e.y,t.y,n.y)}function D2(e,t,n){e.min=t.min-n.min,e.max=e.min+Nt(t)}function Ba(e,t,n){D2(e.x,t.x,n.x),D2(e.y,t.y,n.y)}function V2(e,t,n,r,o){return e-=t,e=Fa(e,1/n,r),o!==void 0&&(e=Fa(e,1/o,r)),e}function FJ(e,t=0,n=1,r=.5,o,s=e,i=e){if(Tn.test(t)&&(t=parseFloat(t),t=it(i.min,i.max,t/100)-i.min),typeof t!="number")return;let c=it(s.min,s.max,r);e===s&&(c-=t),e.min=V2(e.min,t,n,c,o),e.max=V2(e.max,t,n,c,o)}function z2(e,t,[n,r,o],s,i){FJ(e,t[n],t[r],t[o],t.scale,s,i)}const BJ=["x","scaleX","originX"],HJ=["y","scaleY","originY"];function F2(e,t,n,r){z2(e.x,t,BJ,n?n.x:void 0,r?r.x:void 0),z2(e.y,t,HJ,n?n.y:void 0,r?r.y:void 0)}function B2(e){return e.translate===0&&e.scale===1}function t4(e){return B2(e.x)&&B2(e.y)}function H2(e,t){return e.min===t.min&&e.max===t.max}function WJ(e,t){return H2(e.x,t.x)&&H2(e.y,t.y)}function W2(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function n4(e,t){return W2(e.x,t.x)&&W2(e.y,t.y)}function Z2(e){return Nt(e.x)/Nt(e.y)}function U2(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ln(e){return[e("x"),e("y")]}function ZJ(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=n?.z||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:d,rotateX:f,rotateY:p,skewX:m,skewY:g}=n;l&&(r=`perspective(${l}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),p&&(r+=`rotateY(${p}deg) `),m&&(r+=`skewX(${m}deg) `),g&&(r+=`skewY(${g}deg) `)}const c=e.x.scale*t.x,u=e.y.scale*t.y;return(c!==1||u!==1)&&(r+=`scale(${c}, ${u})`),r||"none"}const r4=["TopLeft","TopRight","BottomLeft","BottomRight"],UJ=r4.length,G2=e=>typeof e=="string"?parseFloat(e):e,K2=e=>typeof e=="number"||he.test(e);function GJ(e,t,n,r,o,s){o?(e.opacity=it(0,n.opacity??1,KJ(r)),e.opacityExit=it(t.opacity??1,0,YJ(r))):s&&(e.opacity=it(t.opacity??1,n.opacity??1,r));for(let i=0;i<UJ;i++){const c=`border${r4[i]}Radius`;let u=Y2(t,c),l=Y2(n,c);if(u===void 0&&l===void 0)continue;u||(u=0),l||(l=0),u===0||l===0||K2(u)===K2(l)?(e[c]=Math.max(it(G2(u),G2(l),r),0),(Tn.test(l)||Tn.test(u))&&(e[c]+="%")):e[c]=l}(t.rotate||n.rotate)&&(e.rotate=it(t.rotate||0,n.rotate||0,r))}function Y2(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const KJ=o4(0,.5,Y5),YJ=o4(.5,.95,dn);function o4(e,t,n){return r=>r<e?0:r>t?1:n(Us(e,t,r))}function qJ(e,t,n){const r=$t(e)?e:Ao(e);return r.start(Tm("",r,t,n)),r.animation}function qs(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const XJ=(e,t)=>e.depth-t.depth;class JJ{constructor(){this.children=[],this.isDirty=!1}add(t){bm(this.children,t),this.isDirty=!0}remove(t){_a(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(XJ),this.isDirty=!1,this.children.forEach(t)}}function QJ(e,t){const n=_t.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(yr(r),e(s-t))};return Ke.setup(r,!0),()=>yr(r)}function sa(e){return $t(e)?e.get():e}class eQ{constructor(){this.members=[]}add(t){bm(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const o=r.instance;o&&o.isConnected===!1&&r.isPresent!==!1&&!r.snapshot&&_a(this.members,r)}t.scheduleRender()}remove(t){if(_a(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o],i=s.instance;if(s.isPresent!==!1&&(!i||i.isConnected!==!1)){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const o=r.options.layoutDependency,s=t.options.layoutDependency;if(!(o!==void 0&&s!==void 0&&o===s)){const u=r.instance;u&&u.isConnected===!1&&!r.snapshot||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0))}const{crossfade:c}=t.options;c===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const ia={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Kd=["","X","Y","Z"],tQ=1e3;let nQ=0;function Yd(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function s4(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=SE(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ke,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&s4(r)}function i4({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},c=t?.()){this.id=nQ++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(sQ),this.nodes.forEach(lQ),this.nodes.forEach(uQ),this.nodes.forEach(iQ)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new JJ)}addEventListener(i,c){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new wm),this.eventHandlers.get(i).add(c)}notifyListeners(i,...c){const u=this.eventHandlers.get(i);u&&u.notify(...c)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=Vm(i)&&!oJ(i),this.instance=i;const{layoutId:c,layout:u,visualElement:l}=this.options;if(l&&!l.current&&l.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||c)&&(this.isLayoutDirty=!0),e){let d,f=0;const p=()=>this.root.updateBlockedByResize=!1;Ke.read(()=>{f=window.innerWidth}),e(i,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,d&&d(),d=QJ(p,250),ia.hasAnimatedSinceResize&&(ia.hasAnimatedSinceResize=!1,this.nodes.forEach(J2)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&l&&(c||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||l.getDefaultTransition()||hQ,{onLayoutAnimationStart:y,onLayoutAnimationComplete:x}=l.getProps(),w=!this.targetLayout||!n4(this.targetLayout,m),b=!f&&p;if(this.options.layoutRoot||this.resumeFrom||b||f&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Mm(g,"layout"),onPlay:y,onComplete:x};(l.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(d,b)}else f||J2(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),yr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(dQ),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&s4(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:c,layout:u}=this.options;if(c===void 0&&!u)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(q2);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(X2);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(cQ),this.nodes.forEach(rQ),this.nodes.forEach(oQ)):this.nodes.forEach(X2),this.clearAllSnapshots();const c=_t.now();bt.delta=Dn(0,1e3/60,c-bt.timestamp),bt.timestamp=c,bt.isProcessing=!0,zd.update.process(bt),zd.preRender.process(bt),zd.render.process(bt),bt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Nm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(aQ),this.sharedNodes.forEach(fQ)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Nt(this.snapshot.measuredBox.x)&&!Nt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=vt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(c=!1),c&&this.instance){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!t4(this.projectionDelta),u=this.getTransformTemplate(),l=u?u(this.latestValues,""):void 0,d=l!==this.prevTransformTemplateValue;i&&this.instance&&(c||zr(this.latestValues)||d)&&(o(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const c=this.measurePageBox();let u=this.removeElementScroll(c);return i&&(u=this.removeTransform(u)),gQ(u),{animationId:this.root.animationId,measuredBox:c,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:i}=this.options;if(!i)return vt();const c=i.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(vQ))){const{scroll:l}=this.root;l&&(bo(c.x,l.offset.x),bo(c.y,l.offset.y))}return c}removeElementScroll(i){const c=vt();if(yn(c,i),this.scroll?.wasRoot)return c;for(let u=0;u<this.path.length;u++){const l=this.path[u],{scroll:d,options:f}=l;l!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&yn(c,i),bo(c.x,d.offset.x),bo(c.y,d.offset.y))}return c}applyTransform(i,c=!1){const u=vt();yn(u,i);for(let l=0;l<this.path.length;l++){const d=this.path[l];!c&&d.options.layoutScroll&&d.scroll&&d!==d.root&&yo(u,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),zr(d.latestValues)&&yo(u,d.latestValues)}return zr(this.latestValues)&&yo(u,this.latestValues),u}removeTransform(i){const c=vt();yn(c,i);for(let u=0;u<this.path.length;u++){const l=this.path[u];if(!l.instance||!zr(l.latestValues))continue;dp(l.latestValues)&&l.updateSnapshot();const d=vt(),f=l.measurePageBox();yn(d,f),F2(c,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,d)}return zr(this.latestValues)&&F2(c,this.latestValues),c}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==bt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(i||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!this.layout||!(d||f))return;this.resolvedRelativeTargetAt=bt.timestamp;const p=this.getClosestProjectingParent();p&&this.linkedParentVersion!==p.layoutVersion&&!p.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(p&&p.layout?this.createRelativeTarget(p,this.layout.layoutBox,p.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=vt(),this.targetWithTransforms=vt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),zJ(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):yn(this.target,this.layout.layoutBox),HE(this.target,this.targetDelta)):yn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?this.createRelativeTarget(p,this.target,p.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||dp(this.parent.latestValues)||BE(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(i,c,u){this.relativeParent=i,this.linkedParentVersion=i.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=vt(),this.relativeTargetOrigin=vt(),Ba(this.relativeTargetOrigin,c,u),yn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const i=this.getLead(),c=!!this.resumingFrom||this!==i;let u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===bt.timestamp&&(u=!1),u)return;const{layout:l,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||d))return;yn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;hJ(this.layoutCorrected,this.treeScale,this.path,c),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=vt());const{target:m}=i;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(A2(this.prevProjectionDelta.x,this.projectionDelta.x),A2(this.prevProjectionDelta.y,this.projectionDelta.y)),Rs(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!U2(this.projectionDelta.x,this.prevProjectionDelta.x)||!U2(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.visualElement?.scheduleRender(),i){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=vo(),this.projectionDelta=vo(),this.projectionDeltaWithTransform=vo()}setAnimationOrigin(i,c=!1){const u=this.snapshot,l=u?u.latestValues:{},d={...this.latestValues},f=vo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const p=vt(),m=u?u.source:void 0,g=this.layout?this.layout.source:void 0,y=m!==g,x=this.getStack(),w=!x||x.members.length<=1,b=!!(y&&!w&&this.options.crossfade===!0&&!this.path.some(mQ));this.animationProgress=0;let v;this.mixTargetDelta=C=>{const k=C/1e3;Q2(f.x,i.x,k),Q2(f.y,i.y,k),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ba(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),pQ(this.relativeTarget,this.relativeTargetOrigin,p,k),v&&WJ(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=vt()),yn(v,this.relativeTarget)),y&&(this.animationValues=d,GJ(d,l,this.latestValues,k,b,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(yr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ke.update(()=>{ia.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ao(0)),this.motionValue.jump(0,!1),this.currentAnimation=qJ(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),i.onUpdate&&i.onUpdate(c)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(tQ),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:c,target:u,layout:l,latestValues:d}=i;if(!(!c||!u||!l)){if(this!==i&&this.layout&&l&&a4(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||vt();const f=Nt(this.layout.layoutBox.x);u.x.min=i.target.x.min,u.x.max=u.x.min+f;const p=Nt(this.layout.layoutBox.y);u.y.min=i.target.y.min,u.y.max=u.y.min+p}yn(c,u),yo(c,d),Rs(this.projectionDeltaWithTransform,this.layoutCorrected,c,d)}}registerSharedNode(i,c){this.sharedNodes.has(i)||this.sharedNodes.set(i,new eQ),this.sharedNodes.get(i).add(c);const l=c.options.initialPromotionConfig;c.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(c):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){const{layoutId:i}=this.options;return i?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:i}=this.options;return i?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:c,preserveFollowOpacity:u}={}){const l=this.getStack();l&&l.promote(this,u),i&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let c=!1;const{latestValues:u}=i;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(c=!0),!c)return;const l={};u.z&&Yd("z",i,l,this.animationValues);for(let d=0;d<Kd.length;d++)Yd(`rotate${Kd[d]}`,i,l,this.animationValues),Yd(`skew${Kd[d]}`,i,l,this.animationValues);i.render();for(const d in l)i.setStaticValue(d,l[d]),this.animationValues&&(this.animationValues[d]=l[d]);i.scheduleRender()}applyProjectionStyles(i,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=sa(c?.pointerEvents)||"",i.transform=u?u(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=sa(c?.pointerEvents)||""),this.hasProjected&&!zr(this.latestValues)&&(i.transform=u?u({},""):"none",this.hasProjected=!1);return}i.visibility="";const d=l.animationValues||l.latestValues;this.applyTransformsToTarget();let f=ZJ(this.projectionDeltaWithTransform,this.treeScale,d);u&&(f=u(d,f)),i.transform=f;const{x:p,y:m}=this.projectionDelta;i.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,l.animationValues?i.opacity=l===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:i.opacity=l===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const g in pp){if(d[g]===void 0)continue;const{correct:y,applyTo:x,isCSSVariable:w}=pp[g],b=f==="none"?d[g]:y(d[g],l);if(x){const v=x.length;for(let C=0;C<v;C++)i[x[C]]=b}else w?this.options.visualElement.renderState.vars[g]=b:i[g]=b}this.options.layoutId&&(i.pointerEvents=l===this?sa(c?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>i.currentAnimation?.stop()),this.root.nodes.forEach(q2),this.root.sharedNodes.clear()}}}function rQ(e){e.updateLayout()}function oQ(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,s=t.source!==e.layout.source;o==="size"?Ln(d=>{const f=s?t.measuredBox[d]:t.layoutBox[d],p=Nt(f);f.min=n[d].min,f.max=f.min+p}):a4(o,t.layoutBox,n)&&Ln(d=>{const f=s?t.measuredBox[d]:t.layoutBox[d],p=Nt(n[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const i=vo();Rs(i,n,t.layoutBox);const c=vo();s?Rs(c,e.applyTransform(r,!0),t.measuredBox):Rs(c,n,t.layoutBox);const u=!t4(i);let l=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const m=vt();Ba(m,t.layoutBox,f.layoutBox);const g=vt();Ba(g,n,p.layoutBox),n4(m,g)||(l=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:i,hasLayoutChanged:u,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function sQ(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function iQ(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function aQ(e){e.clearSnapshot()}function q2(e){e.clearMeasurements()}function X2(e){e.isLayoutDirty=!1}function cQ(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function J2(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function lQ(e){e.resolveTargetDelta()}function uQ(e){e.calcProjection()}function dQ(e){e.resetSkewAndRotation()}function fQ(e){e.removeLeadSnapshot()}function Q2(e,t,n){e.translate=it(t.translate,0,n),e.scale=it(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ew(e,t,n,r){e.min=it(t.min,n.min,r),e.max=it(t.max,n.max,r)}function pQ(e,t,n,r){ew(e.x,t.x,n.x,r),ew(e.y,t.y,n.y,r)}function mQ(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const hQ={duration:.45,ease:[.4,0,.1,1]},tw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),nw=tw("applewebkit/")&&!tw("chrome/")?Math.round:dn;function rw(e){e.min=nw(e.min),e.max=nw(e.max)}function gQ(e){rw(e.x),rw(e.y)}function a4(e,t,n){return e==="position"||e==="preserve-aspect"&&!VJ(Z2(t),Z2(n),.2)}function vQ(e){return e!==e.root&&e.scroll?.wasRoot}const bQ=i4({attachResizeListener:(e,t)=>qs(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),qd={current:void 0},c4=i4({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!qd.current){const e=new bQ({});e.mount(window),e.setOptions({layoutScroll:!0}),qd.current=e}return qd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Wm=a.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function ow(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function yQ(...e){return t=>{let n=!1;const r=e.map(o=>{const s=ow(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():ow(e[o],null)}}}}function wQ(...e){return a.useCallback(yQ(...e),e)}class xQ extends a.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,o=lp(r)&&r.offsetWidth||0,s=lp(r)&&r.offsetHeight||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left,i.bottom=s-i.height-i.top}return null}componentDidUpdate(){}render(){return this.props.children}}function CQ({children:e,isPresent:t,anchorX:n,anchorY:r,root:o,pop:s}){const i=a.useId(),c=a.useRef(null),u=a.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=a.useContext(Wm),d=e.props?.ref??e?.ref,f=wQ(c,d);return a.useInsertionEffect(()=>{const{width:p,height:m,top:g,left:y,right:x,bottom:w}=u.current;if(t||s===!1||!c.current||!p||!m)return;const b=n==="left"?`left: ${y}`:`right: ${x}`,v=r==="bottom"?`bottom: ${w}`:`top: ${g}`;c.current.dataset.motionPopId=i;const C=document.createElement("style");l&&(C.nonce=l);const k=o??document.head;return k.appendChild(C),C.sheet&&C.sheet.insertRule(`
|
|
71
|
+
[data-motion-pop-id="${i}"] {
|
|
72
|
+
position: absolute !important;
|
|
73
|
+
width: ${p}px !important;
|
|
74
|
+
height: ${m}px !important;
|
|
75
|
+
${b}px !important;
|
|
76
|
+
${v}px !important;
|
|
77
|
+
}
|
|
78
|
+
`),()=>{k.contains(C)&&k.removeChild(C)}},[t]),h.jsx(xQ,{isPresent:t,childRef:c,sizeRef:u,pop:s,children:s===!1?e:a.cloneElement(e,{ref:f})})}const kQ=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i,anchorX:c,anchorY:u,root:l})=>{const d=vm(EQ),f=a.useId();let p=!0,m=a.useMemo(()=>(p=!1,{id:f,initial:t,isPresent:n,custom:o,onExitComplete:g=>{d.set(g,!0);for(const y of d.values())if(!y)return;r&&r()},register:g=>(d.set(g,!1),()=>d.delete(g))}),[n,d,r]);return s&&p&&(m={...m}),a.useMemo(()=>{d.forEach((g,y)=>d.set(y,!1))},[n]),a.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=h.jsx(CQ,{pop:i==="popLayout",isPresent:n,anchorX:c,anchorY:u,root:l,children:e}),h.jsx(yc.Provider,{value:m,children:e})};function EQ(){return new Map}function l4(e=!0){const t=a.useContext(yc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=a.useId();a.useEffect(()=>{if(e)return o(s)},[e]);const i=a.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}const Ai=e=>e.key||"";function sw(e){const t=[];return a.Children.forEach(e,n=>{a.isValidElement(n)&&t.push(n)}),t}const SQ=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:i=!1,anchorX:c="left",anchorY:u="top",root:l})=>{const[d,f]=l4(i),p=a.useMemo(()=>sw(e),[e]),m=i&&!d?[]:p.map(Ai),g=a.useRef(!0),y=a.useRef(p),x=vm(()=>new Map),w=a.useRef(new Set),[b,v]=a.useState(p),[C,k]=a.useState(p);N5(()=>{g.current=!1,y.current=p;for(let S=0;S<C.length;S++){const j=Ai(C[S]);m.includes(j)?(x.delete(j),w.current.delete(j)):x.get(j)!==!0&&x.set(j,!1)}},[C,m.length,m.join("-")]);const E=[];if(p!==b){let S=[...p];for(let j=0;j<C.length;j++){const R=C[j],T=Ai(R);m.includes(T)||(S.splice(j,0,R),E.push(R))}return s==="wait"&&E.length&&(S=E),k(sw(S)),v(p),null}const{forceRender:$}=a.useContext(gm);return h.jsx(h.Fragment,{children:C.map(S=>{const j=Ai(S),R=i&&!d?!1:p===C||m.includes(j),T=()=>{if(w.current.has(j))return;if(w.current.add(j),x.has(j))x.set(j,!0);else return;let A=!0;x.forEach(L=>{L||(A=!1)}),A&&($?.(),k(y.current),i&&f?.(),r&&r())};return h.jsx(kQ,{isPresent:R,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:l,onExitComplete:R?void 0:T,anchorX:c,anchorY:u,children:S},j)})})},u4=a.createContext({strict:!1}),iw={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let aw=!1;function $Q(){if(aw)return;const e={};for(const t in iw)e[t]={isEnabled:n=>iw[t].some(r=>!!n[r])};VE(e),aw=!0}function d4(){return $Q(),dJ()}function OQ(e){const t=d4();for(const n in e)t[n]={...t[n],...e[n]};VE(t)}const LQ=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Ha(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||LQ.has(e)}let f4=e=>!Ha(e);function jQ(e){typeof e=="function"&&(f4=t=>t.startsWith("on")?!Ha(t):e(t))}try{jQ(require("@emotion/is-prop-valid").default)}catch{}function RQ(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(f4(o)||n===!0&&Ha(o)||!t&&!Ha(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const Cc=a.createContext({});function PQ(e,t){if(xc(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ys(n)?n:void 0,animate:Ys(r)?r:void 0}}return e.inherit!==!1?t:{}}function MQ(e){const{initial:t,animate:n}=PQ(e,a.useContext(Cc));return a.useMemo(()=>({initial:t,animate:n}),[cw(t),cw(n)])}function cw(e){return Array.isArray(e)?e.join(" "):e}const Zm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function p4(e,t,n){for(const r in t)!$t(t[r])&&!UE(r,n)&&(e[r]=t[r])}function TQ({transformTemplate:e},t){return a.useMemo(()=>{const n=Zm();return Bm(n,t,e),Object.assign({},n.vars,n.style)},[t])}function IQ(e,t){const n=e.style||{},r={};return p4(r,n,e),Object.assign(r,TQ(e,t)),r}function AQ(e,t){const n={},r=IQ(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const m4=()=>({...Zm(),attrs:{}});function _Q(e,t,n,r){const o=a.useMemo(()=>{const s=m4();return GE(s,t,YE(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};p4(s,e.style,e),o.style={...s,...o.style}}return o}const NQ=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Um(e){return typeof e!="string"||e.includes("-")?!1:!!(NQ.indexOf(e)>-1||/[A-Z]/u.test(e))}function DQ(e,t,n,{latestValues:r},o,s=!1,i){const u=(i??Um(e)?_Q:AQ)(t,r,o,e),l=RQ(t,typeof e=="string",s),d=e!==a.Fragment?{...l,...u,ref:n}:{},{children:f}=t,p=a.useMemo(()=>$t(f)?f.get():f,[f]);return a.createElement(e,{...d,children:p})}function VQ({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:zQ(n,r,o,e),renderState:t()}}function zQ(e,t,n,r){const o={},s=r(e,{});for(const p in s)o[p]=sa(s[p]);let{initial:i,animate:c}=e;const u=xc(e),l=NE(e);t&&l&&!u&&e.inherit!==!1&&(i===void 0&&(i=t.initial),c===void 0&&(c=t.animate));let d=n?n.initial===!1:!1;d=d||i===!1;const f=d?c:i;if(f&&typeof f!="boolean"&&!wc(f)){const p=Array.isArray(f)?f:[f];for(let m=0;m<p.length;m++){const g=Im(e,p[m]);if(g){const{transitionEnd:y,transition:x,...w}=g;for(const b in w){let v=w[b];if(Array.isArray(v)){const C=d?v.length-1:0;v=v[C]}v!==null&&(o[b]=v)}for(const b in y)o[b]=y[b]}}}return o}const h4=e=>(t,n)=>{const r=a.useContext(Cc),o=a.useContext(yc),s=()=>VQ(e,t,r,o);return n?s():vm(s)},FQ=h4({scrapeMotionValuesFromProps:Hm,createRenderState:Zm}),BQ=h4({scrapeMotionValuesFromProps:qE,createRenderState:m4}),HQ=Symbol.for("motionComponentSymbol");function WQ(e,t,n){const r=a.useRef(n);a.useInsertionEffect(()=>{r.current=n});const o=a.useRef(null);return a.useCallback(s=>{s&&e.onMount?.(s),t&&(s?t.mount(s):t.unmount());const i=r.current;if(typeof i=="function")if(s){const c=i(s);typeof c=="function"&&(o.current=c)}else o.current?(o.current(),o.current=null):i(s);else i&&(i.current=s)},[t])}const g4=a.createContext({});function uo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function ZQ(e,t,n,r,o,s){const{visualElement:i}=a.useContext(Cc),c=a.useContext(u4),u=a.useContext(yc),l=a.useContext(Wm),d=l.reducedMotion,f=l.skipAnimations,p=a.useRef(null),m=a.useRef(!1);r=r||c.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:i,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:s}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const g=p.current,y=a.useContext(g4);g&&!g.projection&&o&&(g.type==="html"||g.type==="svg")&&UQ(p.current,n,o,y);const x=a.useRef(!1);a.useInsertionEffect(()=>{g&&x.current&&g.update(n,u)});const w=n[EE],b=a.useRef(!!w&&!window.MotionHandoffIsComplete?.(w)&&window.MotionHasOptimisedAnimation?.(w));return N5(()=>{m.current=!0,g&&(x.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),b.current&&g.animationState&&g.animationState.animateChanges())}),a.useEffect(()=>{g&&(!b.current&&g.animationState&&g.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(w)}),b.current=!1),g.enteringChildren=void 0)}),g}function UQ(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:c,layoutScroll:u,layoutRoot:l,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:v4(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||c&&uo(c),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:u,layoutRoot:l})}function v4(e){if(e)return e.options.allowProjection!==!1?e.projection:v4(e.parent)}function Xd(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&OQ(r);const s=n?n==="svg":Um(e),i=s?BQ:FQ;function c(l,d){let f;const p={...a.useContext(Wm),...l,layoutId:GQ(l)},{isStatic:m}=p,g=MQ(l),y=i(l,m);if(!m&&_5){KQ();const x=YQ(p);f=x.MeasureLayout,g.visualElement=ZQ(e,y,p,o,x.ProjectionNode,s)}return h.jsxs(Cc.Provider,{value:g,children:[f&&g.visualElement?h.jsx(f,{visualElement:g.visualElement,...p}):null,DQ(e,l,WQ(y,g.visualElement,d),y,m,t,s)]})}c.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=a.forwardRef(c);return u[HQ]=e,u}function GQ({layoutId:e}){const t=a.useContext(gm).id;return t&&e!==void 0?t+"-"+e:e}function KQ(e,t){a.useContext(u4).strict}function YQ(e){const t=d4(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function qQ(e,t){if(typeof Proxy>"u")return Xd;const n=new Map,r=(s,i)=>Xd(s,i,e,t),o=(s,i)=>r(s,i);return new Proxy(o,{get:(s,i)=>i==="create"?r:(n.has(i)||n.set(i,Xd(i,void 0,e,t)),n.get(i))})}const XQ=(e,t)=>t.isSVG??Um(e)?new LJ(t):new CJ(t,{allowProjection:e!==a.Fragment});class JQ extends Or{constructor(t){super(t),t.animationState||(t.animationState=TJ(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();wc(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let QQ=0;class eee extends Or{constructor(){super(...arguments),this.id=QQ++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const tee={animation:{Feature:JQ},exit:{Feature:eee}};function ci(e){return{point:{x:e.pageX,y:e.pageY}}}const nee=e=>t=>Dm(t)&&e(t,ci(t));function Ps(e,t,n,r){return qs(e,t,nee(n),r)}const b4=({current:e})=>e?e.ownerDocument.defaultView:null,lw=(e,t)=>Math.abs(e-t);function ree(e,t){const n=lw(e.x,t.x),r=lw(e.y,t.y);return Math.sqrt(n**2+r**2)}const uw=new Set(["auto","scroll"]);class y4{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:i=3,element:c}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Qd(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,y=ree(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!y)return;const{point:x}=m,{timestamp:w}=bt;this.history.push({...x,timestamp:w});const{onStart:b,onMove:v}=this.handlers;g||(b&&b(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=Jd(g,this.transformPagePoint),Ke.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:y,onSessionEnd:x,resumeAnimation:w}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Qd(m.type==="pointercancel"?this.lastMoveEventInfo:Jd(g,this.transformPagePoint),this.history);this.startEvent&&y&&y(m,b),x&&x(m,b)},!Dm(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=i,this.contextWindow=o||window;const u=ci(t),l=Jd(u,this.transformPagePoint),{point:d}=l,{timestamp:f}=bt;this.history=[{...d,timestamp:f}];const{onSessionStart:p}=n;p&&p(t,Qd(l,this.history)),this.removeListeners=si(Ps(this.contextWindow,"pointermove",this.handlePointerMove),Ps(this.contextWindow,"pointerup",this.handlePointerUp),Ps(this.contextWindow,"pointercancel",this.handlePointerUp)),c&&this.startScrollTracking(c)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(uw.has(r.overflowX)||uw.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:o.x-n.x,y:o.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,o),Ke.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),yr(this.updatePoint)}}function Jd(e,t){return t?{point:t(e.point)}:e}function dw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Qd({point:e},t){return{point:e,delta:dw(e,w4(t)),offset:dw(e,oee(t)),velocity:see(t,.1)}}function oee(e){return e[0]}function w4(e){return e[e.length-1]}function see(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=w4(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Cn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&o.timestamp-r.timestamp>Cn(t)*2&&(r=e[1]);const s=ln(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function iee(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?it(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?it(n,e,r.max):Math.min(e,n)),e}function fw(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function aee(e,{top:t,left:n,bottom:r,right:o}){return{x:fw(e.x,n,o),y:fw(e.y,t,r)}}function pw(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function cee(e,t){return{x:pw(e.x,t.x),y:pw(e.y,t.y)}}function lee(e,t){let n=.5;const r=Nt(e),o=Nt(t);return o>r?n=Us(t.min,t.max-r,e.min):r>o&&(n=Us(e.min,e.max-o,t.min)),Dn(0,1,n)}function uee(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const mp=.35;function dee(e=mp){return e===!1?e=0:e===!0&&(e=mp),{x:mw(e,"left","right"),y:mw(e,"top","bottom")}}function mw(e,t,n){return{min:hw(e,t),max:hw(e,n)}}function hw(e,t){return typeof e=="number"?e:e[t]||0}const fee=new WeakMap;class pee{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=vt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=f=>{n&&this.snapToCursor(ci(f).point),this.stopAnimation()},i=(f,p)=>{const{drag:m,dragPropagation:g,onDragStart:y}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=FX(m),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ln(w=>{let b=this.getAxisMotionValue(w).get()||0;if(Tn.test(b)){const{projection:v}=this.visualElement;if(v&&v.layout){const C=v.layout.layoutBox[w];C&&(b=Nt(C)*(parseFloat(b)/100))}}this.originPoint[w]=b}),y&&Ke.update(()=>y(f,p),!1,!0),sp(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},c=(f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p;const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:y,onDrag:x}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:w}=p;if(g&&this.currentDirection===null){this.currentDirection=hee(w),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",p.point,w),this.updateAxis("y",p.point,w),this.visualElement.render(),x&&Ke.update(()=>x(f,p),!1,!0)},u=(f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p,this.stop(f,p),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new y4(t,{onSessionStart:s,onStart:i,onMove:c,onSessionEnd:u,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:b4(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!r)return;const{velocity:i}=o;this.startAnimation(i);const{onDragEnd:c}=this.getProps();c&&Ke.postRender(()=>c(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!_i(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=iee(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&uo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=aee(r.layoutBox,t):this.constraints=!1,this.elastic=dee(n),o!==this.constraints&&!uo(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Ln(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=uee(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!uo(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=gJ(r,o.root,this.visualElement.getTransformPagePoint());let i=cee(o.layout.layoutBox,s);if(n){const c=n(pJ(i));this.hasMutatedConstraints=!!c,c&&(i=FE(c))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},l=Ln(d=>{if(!_i(d,n,this.currentDirection))return;let f=u&&u[d]||{};i&&(f={min:0,max:0});const p=o?200:1e6,m=o?40:1e7,g={type:"inertia",velocity:r?t[d]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(d,g)});return Promise.all(l).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return sp(this.visualElement,t),r.start(Tm(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ln(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ln(n=>{const{drag:r}=this.getProps();if(!_i(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:c}=o.layout.layoutBox[n],u=s.get()||0;s.set(t[n]-it(i,c,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!uo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Ln(i=>{const c=this.getAxisMotionValue(i);if(c&&this.constraints!==!1){const u=c.get();o[i]=lee({min:u,max:u},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ln(i=>{if(!_i(i,t,null))return;const c=this.getAxisMotionValue(i),{min:u,max:l}=this.constraints[i];c.set(it(u,l,o[i]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;fee.set(this.visualElement,this);const t=this.visualElement.current,n=Ps(t,"pointerdown",l=>{const{drag:d,dragListener:f=!0}=this.getProps(),p=l.target,m=p!==t&&GX(p);d&&f&&!m&&this.start(l)});let r;const o=()=>{const{dragConstraints:l}=this.getProps();uo(l)&&l.current&&(this.constraints=this.resolveRefConstraints(),r||(r=mee(t,l.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,i=s.addEventListener("measure",o);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Ke.read(o);const c=qs(window,"resize",()=>this.scalePositionWithinConstraints()),u=s.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:d})=>{this.isDragging&&d&&(Ln(f=>{const p=this.getAxisMotionValue(f);p&&(this.originPoint[f]+=l[f].translate,p.set(p.get()+l[f].translate))}),this.visualElement.render())}));return()=>{c(),n(),i(),u&&u(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=mp,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:c}}}function gw(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function mee(e,t,n){const r=k2(e,gw(n)),o=k2(t,gw(n));return()=>{r(),o()}}function _i(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function hee(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class gee extends Or{constructor(t){super(t),this.removeGroupControls=dn,this.removeListeners=dn,this.controls=new pee(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||dn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const ef=e=>(t,n)=>{e&&Ke.update(()=>e(t,n),!1,!0)};class vee extends Or{constructor(){super(...arguments),this.removePointerDownListener=dn}onPointerDown(t){this.session=new y4(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:b4(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:ef(t),onStart:ef(n),onMove:ef(r),onEnd:(s,i)=>{delete this.session,o&&Ke.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=Ps(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let tf=!1;class bee extends a.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),tf&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ia.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,{projection:i}=r;return i&&(i.isPresent=s,t.layoutDependency!==n&&i.setOptions({...i.options,layoutDependency:n}),tf=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||Ke.postRender(()=>{const c=i.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Nm.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;tf=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function x4(e){const[t,n]=l4(),r=a.useContext(gm);return h.jsx(bee,{...e,layoutGroup:r,switchLayoutGroup:a.useContext(g4),isPresent:t,safeToRemove:n})}const yee={pan:{Feature:vee},drag:{Feature:gee,ProjectionNode:c4,MeasureLayout:x4}};function vw(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&Ke.postRender(()=>s(t,ci(t)))}class wee extends Or{mount(){const{current:t}=this.node;t&&(this.unmount=HX(t,(n,r)=>(vw(this.node,r,"Start"),o=>vw(this.node,o,"End"))))}unmount(){}}class xee extends Or{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=si(qs(this.node.current,"focus",()=>this.onFocus()),qs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function bw(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&Ke.postRender(()=>s(t,ci(t)))}class Cee extends Or{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=YX(t,(o,s)=>(bw(this.node,s,"Start"),(i,{success:c})=>bw(this.node,i,c?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}}const hp=new WeakMap,nf=new WeakMap,kee=e=>{const t=hp.get(e.target);t&&t(e)},Eee=e=>{e.forEach(kee)};function See({root:e,...t}){const n=e||document;nf.has(n)||nf.set(n,{});const r=nf.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Eee,{root:e,...t})),r[o]}function $ee(e,t,n){const r=See(t);return hp.set(e,n),r.observe(e),()=>{hp.delete(e),r.unobserve(e)}}const Oee={some:0,all:1};class Lee extends Or{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:Oee[o]},c=u=>{const{isIntersecting:l}=u;if(this.isInView===l||(this.isInView=l,s&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),p=l?d:f;p&&p(u)};return $ee(this.node.current,i,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(jee(t,n))&&this.startObserver()}unmount(){}}function jee({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Ree={inView:{Feature:Lee},tap:{Feature:Cee},focus:{Feature:xee},hover:{Feature:wee}},Pee={layout:{ProjectionNode:c4,MeasureLayout:x4}},Mee={...tee,...Ree,...yee,...Pee},Tee=qQ(Mee,XQ),Iee={borderColor:"var(--hud-chrome-border, oklch(var(--border)))"},Aee={backgroundColor:"var(--hud-chrome-border, oklch(var(--border)))"},_ee="bg-popover/95 backdrop-blur-xl border rounded-lg shadow-2xl py-1 min-w-[180px] z-[200] outline-none",Nee="flex items-center gap-3 w-full px-3 py-1.5 text-[12px] font-mono text-popover-foreground outline-none select-none data-[highlighted]:bg-accent/10 data-[highlighted]:text-accent data-[selected]:bg-accent/10 data-[selected]:text-accent data-[disabled]:opacity-40 data-[disabled]:pointer-events-none cursor-default text-left border-0 bg-transparent box-border",Dee="w-4 h-4 flex items-center justify-center shrink-0 text-muted-foreground",Vee="flex-1 min-w-0 truncate",zee="text-muted-foreground text-[10px] ml-4 tracking-wider",Fee="px-3 py-1 text-[10px] font-mono uppercase tracking-widest text-muted-foreground",Bee="h-px my-1 border-0",Hee="z-[200]";function Wee(e){return"type"in e&&e.type==="separator"}function Zee(e){return"type"in e&&e.type==="group"}function yw({item:e}){return h.jsxs(cU,{disabled:e.disabled,onClick:e.action,label:e.label,className:Nee,children:[e.icon&&h.jsx("span",{className:Dee,children:e.icon}),h.jsx("span",{className:Vee,children:e.label}),e.shortcut&&h.jsx("span",{className:zee,children:e.shortcut})]})}const C4=cx.forwardRef(({items:e},t)=>h.jsx(Tee.div,{ref:t,initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.96},transition:{duration:.1,ease:"easeOut"},children:h.jsx(sY,{className:_ee,style:Iee,"aria-label":"Context menu",children:e.map((n,r)=>Wee(n)?h.jsx(_Y,{className:Bee,style:Aee},`sep-${r}`):Zee(n)?h.jsxs(iU,{children:[h.jsx(aU,{className:Fee,children:n.label}),n.items.map(o=>h.jsx(yw,{item:o},o.id))]},`grp-${r}`):h.jsx(yw,{item:n},n.id))})}));C4.displayName="PopupContent";function Uee(e,t){switch(t){case"alt":return e.altKey;case"meta":return e.metaKey;case"ctrl":return e.ctrlKey;default:return e.shiftKey}}function Gee({items:e,children:t,nativeMenuModifier:n="alt",activationMode:r="default"}){const o=a.useRef(!1);return e.length===0?h.jsx(h.Fragment,{children:t}):h.jsxs(NY,{children:[h.jsx(DY,{render:h.jsx("div",{style:{display:"contents"},"aria-haspopup":"menu",onKeyDownCapture:s=>{if(s.defaultPrevented||!(s.key==="ContextMenu"||s.shiftKey&&s.key==="F10"))return;s.preventDefault(),s.stopPropagation();const u=(s.target instanceof HTMLElement?s.target:s.currentTarget).getBoundingClientRect(),l=u.left+Math.min(24,Math.max(0,u.width/2)),d=u.top+Math.min(24,Math.max(0,u.height/2));o.current=!0;try{s.currentTarget.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:l,clientY:d,button:2}))}finally{o.current=!1}},onContextMenuCapture:s=>{if(o.current)return;const i=Uee(s,n);(r==="modifier"?!i:i)&&s.stopPropagation()}}),children:t}),h.jsx(aY,{children:h.jsx(wY,{className:Hee,sideOffset:4,children:h.jsx(SQ,{children:h.jsx(C4,{items:e})})})})]})}const ww=()=>{},Kee={x:0,y:0},Yee=({children:e,hud:t,mode:n="canvas",panOffset:r=Kee,scale:o=1,onPan:s=ww,onZoom:i=ww,onPanStart:c,onPanEnd:u,isTransitioning:l=!1,onViewportChange:d,onCanvasClick:f,canvasProps:p,zoomSensitivity:m,zoomControlsRightOffset:g,zoomControlsBottomOffset:y,showZoomControls:x=!0,viewportShiftX:w=0,canvasContextMenuItems:b,canvasContextMenuActivationMode:v})=>{const C=a.useRef(null),k=a.useRef(o);k.current=o;const E=a.useRef(i);E.current=i;const $=a.useRef(s);$.current=s;const S=a.useRef(c);S.current=c;const j=a.useRef(u);j.current=u;const R=a.useRef(m);R.current=m;const[T,A]=a.useState(!1),L=a.useRef(!1),[V,I]=a.useState(!1),_=a.useRef(!1),N=a.useRef({x:0,y:0}),O=a.useRef(M=>{const q=M.target||document.activeElement;if(!q)return!1;const ee=q.tagName;return!!(ee==="INPUT"||ee==="TEXTAREA"||q.isContentEditable||q.closest?.(".xterm"))});a.useEffect(()=>{if(n!=="canvas")return;const M=G=>{G.key!==" "||G.repeat||O.current(G)||l||(G.preventDefault(),L.current=!0,A(!0))},q=G=>{G.key===" "&&L.current&&(L.current=!1,A(!1),_.current&&(_.current=!1,I(!1),j.current?.()))},ee=()=>{L.current&&(L.current=!1,A(!1),_.current&&(_.current=!1,I(!1),j.current?.()))};return window.addEventListener("keydown",M),window.addEventListener("keyup",q),window.addEventListener("blur",ee),()=>{window.removeEventListener("keydown",M),window.removeEventListener("keyup",q),window.removeEventListener("blur",ee)}},[n,l]);const z=a.useCallback(M=>{M.button===0&&(M.preventDefault(),_.current=!0,I(!0),N.current={x:M.clientX,y:M.clientY},S.current?.())},[]);return a.useEffect(()=>{if(!T)return;const M=ee=>{if(!_.current)return;const G=(ee.clientX-N.current.x)/k.current,ue=(ee.clientY-N.current.y)/k.current;N.current={x:ee.clientX,y:ee.clientY},$.current({x:G,y:ue})},q=()=>{_.current&&(_.current=!1,I(!1),j.current?.())};return window.addEventListener("mousemove",M),window.addEventListener("mouseup",q),()=>{window.removeEventListener("mousemove",M),window.removeEventListener("mouseup",q)}},[T]),a.useEffect(()=>{if(n!=="canvas")return;const M=q=>{if(q.ctrlKey||q.metaKey){q.preventDefault();const ee=k.current,G=-q.deltaY*.001*(R.current??1),ue=Math.min(Math.max(.2,ee+G),3);k.current=ue,E.current(ue)}};return window.addEventListener("wheel",M,{passive:!1}),()=>window.removeEventListener("wheel",M)},[n]),a.useEffect(()=>{if(!d)return;let M=null;const q=()=>{M&&cancelAnimationFrame(M),M=requestAnimationFrame(()=>{d({width:window.innerWidth,height:window.innerHeight})})};return q(),window.addEventListener("resize",q),()=>{window.removeEventListener("resize",q),M&&cancelAnimationFrame(M)}},[d]),n==="panel"?h.jsxs("div",{ref:C,className:"fixed inset-0 bg-background text-foreground overflow-hidden font-sans select-none z-0",children:[h.jsx("div",{className:"absolute inset-0 z-10 overflow-auto frame-scrollbar",children:e}),h.jsx("div",{className:"fixed inset-0 pointer-events-none overflow-hidden",style:{zIndex:Ro.zIndex.navigationStack},children:t})]}):h.jsxs("div",{ref:C,className:"fixed inset-0 bg-background text-foreground overflow-hidden font-sans select-none z-0",children:[h.jsx(Gee,{items:b??[],activationMode:v,children:h.jsx(i6,{panOffset:r,scale:o,onPan:s,onPanStart:c,onPanEnd:u,isPanLocked:l,onClick:f,showGuides:p?.showGuides,onGuidesChange:p?.onGuidesChange,gridOpacity:p?.gridOpacity})}),h.jsx("div",{className:"absolute z-10 pointer-events-none",style:{left:"50%",top:"50%",zoom:o,transform:w?`translateX(${w}px)`:void 0,transition:"transform 240ms cubic-bezier(0.34, 1.7, 0.64, 1)"},children:h.jsx("div",{style:{position:"absolute",left:r.x,top:r.y},children:e})}),T&&h.jsx("div",{className:`fixed inset-0 z-20 ${V?"cursor-grabbing":"cursor-grab"}`,onMouseDown:z}),x&&h.jsx("div",{className:"absolute z-30 transition-[bottom,right] duration-200",style:{bottom:`calc(${44+(y??0)}px + var(--hud-player-panel-offset, 0px))`,right:16+(g??0)},children:h.jsx(XW,{scale:o,onZoom:M=>i(M)})}),h.jsx("div",{className:"fixed inset-0 pointer-events-none overflow-hidden",style:{zIndex:Ro.zIndex.navigationStack},children:t})]})},gp=({side:e,title:t,icon:n,isCollapsed:r=!1,onToggleCollapse:o,headerActions:s,footer:i,style:c,width:u,onResizeStart:l,floating:d=!1,children:f})=>{const p="var(--hud-chrome-border, oklch(var(--border) / 0.8))",{panelTopOffset:m}=Qp();if(r){const C=e==="left"?UH:KH;return h.jsx("button",{onClick:o,className:`fixed top-1/2 -translate-y-1/2 z-40 ${e==="left"?"left-3":"right-3"} p-2.5 rounded bg-card/95 border hover:border-accent/60 shadow-[var(--hud-shadow-panel)] hover:shadow-[var(--hud-shadow-panel-hover,var(--hud-shadow-panel))] transition-all duration-200 group pointer-events-auto focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background focus-visible:outline-none`,style:{borderColor:"var(--hud-chrome-border, oklch(var(--border) / 0.8))"},title:`Expand ${t||"panel"}`,children:h.jsx(C,{size:14,className:"text-muted-foreground group-hover:text-accent transition-colors",strokeWidth:1.5})})}const g=e==="left"?ZH:GH,w=`bg-card/95 border shadow-[var(--hud-shadow-panel)] fixed z-40 rounded-none border-t-0 overflow-hidden ${e==="left"?"border-l-0 border-r-0":"border-r-0 border-l-0"}`,b=d?{boxShadow:`var(--hud-shadow-panel-float, 0 0 0 1px ${p}, ${e==="left"?"18px":"-18px"} 0 48px -12px rgba(0, 0, 0, 0.55))`,backdropFilter:"blur(24px) saturate(140%)",WebkitBackdropFilter:"blur(24px) saturate(140%)"}:{},v={position:"fixed",top:m,bottom:28,left:e==="left"?0:void 0,right:e==="right"?0:void 0,width:`${u||280}px`,borderColor:p,...b,...c};return h.jsxs("div",{"data-frame-panel":e==="left"?"manifest":"inspector","data-floating":d?"true":void 0,className:`${w} pointer-events-none select-none font-mono text-[11px] flex flex-col`,style:v,children:[l&&h.jsxs("div",{className:`absolute top-0 ${e==="left"?"right-0":"left-0"} bottom-0 w-[7px] cursor-ew-resize z-50 pointer-events-auto group flex items-center justify-center`,onMouseDown:l,children:[h.jsx("div",{className:`absolute top-0 bottom-0 ${e==="left"?"right-0":"left-0"} w-px transition-colors group-hover:bg-accent/30`,style:{backgroundColor:p}}),h.jsxs("div",{className:"flex flex-col gap-[3px] opacity-0 group-hover:opacity-100 transition-opacity",children:[h.jsx("div",{className:"w-[3px] h-[3px] rounded-full bg-muted-foreground/70 group-hover:bg-accent/70"}),h.jsx("div",{className:"w-[3px] h-[3px] rounded-full bg-muted-foreground/70 group-hover:bg-accent/70"}),h.jsx("div",{className:"w-[3px] h-[3px] rounded-full bg-muted-foreground/70 group-hover:bg-accent/70"})]})]}),!l&&h.jsx("div",{className:`absolute top-0 ${e==="left"?"right-0":"left-0"} bottom-0 w-px`,style:{backgroundColor:p}}),h.jsx("div",{className:"absolute top-0 left-0 right-0 h-px bg-gradient-to-r from-transparent via-foreground/4 to-transparent z-10"}),h.jsxs("div",{className:"pointer-events-auto flex-1 flex flex-col overflow-hidden",children:[t&&h.jsx("div",{className:"shrink-0 p-4",style:{borderBottom:`1px dashed ${p}`},children:h.jsxs("div",{className:"flex items-center justify-between text-foreground text-[10px]",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[n&&h.jsx("span",{className:"text-muted-foreground",children:n}),h.jsx("span",{className:"tracking-[0.18em] font-normal uppercase text-muted-foreground",children:t})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[s,o&&h.jsx("button",{onClick:o,className:"p-1 hover:bg-accent/10 rounded transition-colors text-muted-foreground hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",title:"Collapse panel",children:h.jsx(g,{size:12})})]})]})}),h.jsx("div",{className:"flex-1 overflow-y-auto frame-scrollbar",children:f}),i&&h.jsx("div",{className:"shrink-0",children:i})]})]})},qee={emerald:{dot:"bg-success",ping:"bg-success",text:"text-success"},amber:{dot:"bg-warning",ping:"bg-warning",text:"text-warning"},red:{dot:"bg-destructive",ping:"bg-destructive",text:"text-destructive"},neutral:{dot:"bg-muted-foreground",ping:"bg-muted-foreground",text:"text-muted-foreground"}},Xee={borderColor:"var(--hud-chrome-border, oklch(var(--border)))"},Jee=({left:e,viewport:t,right:n,isMinimapCollapsed:r=!1,onExpandMinimap:o,status:s={label:"READY",color:"emerald"},onStatusClick:i,onToggleTerminal:c,isTerminalOpen:u=!1,terminalLabel:l="Console"})=>{const[d,f]=a.useState(new Date),[p,m]=a.useState(!1),[g,y]=a.useState(!1);a.useEffect(()=>{y(!0);const k=setInterval(()=>f(new Date),1e3);return()=>clearInterval(k)},[]);const x=qee[s.color],w=s.title??s.label,b=`shrink-0 flex items-center gap-2 ${x.text}`,v=h.jsxs(h.Fragment,{children:[h.jsx("span",{className:`inline-block h-1.5 w-1.5 rounded-full ${x.dot}`}),h.jsx("span",{className:"font-light tracking-[0.18em] uppercase text-[9px]",children:s.label})]}),C=async()=>{if(!t)return;const k=`PAN: ${t.pan.x.toFixed(0)},${t.pan.y.toFixed(0)} | SIZE: ${t.canvasSize?.w??1024}x${t.canvasSize?.h??1024} | ZOOM: ${(t.zoom*100).toFixed(0)}%`;try{await navigator.clipboard.writeText(k),m(!0),setTimeout(()=>m(!1),1500)}catch{}};return h.jsxs("div",{"data-frame-panel":"status-bar",className:`${yP.statusBar} h-7 flex items-center justify-between gap-3 px-3 select-none font-mono text-[9px] md:text-[10px] text-foreground pointer-events-auto overflow-hidden`,style:Xee,children:[h.jsxs("div",{className:"min-w-0 flex items-center gap-3 md:gap-4 overflow-hidden",children:[r&&o&&h.jsxs(h.Fragment,{children:[h.jsxs("button",{onClick:o,className:"flex items-center gap-1.5 text-muted-foreground hover:text-foreground transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none rounded",title:"Expand minimap",children:[h.jsx(zH,{size:10}),h.jsx("span",{className:"text-[9px] font-light tracking-[0.18em] uppercase",children:"Map"})]}),h.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/40 select-none",children:"·"})]}),i?h.jsx("button",{type:"button",onClick:i,className:`${b} rounded transition-opacity hover:opacity-85 focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none`,title:w,"aria-label":w,children:v}):h.jsx("div",{className:b,title:s.title,children:v}),e&&h.jsxs(h.Fragment,{children:[h.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/40 select-none",children:"·"}),e]})]}),t&&h.jsx("div",{className:"hidden lg:flex absolute -translate-x-1/2 items-center gap-3 opacity-70 hover:opacity-100 transition-[left,opacity] duration-200",style:{left:"calc(50% - var(--hud-player-status-inline-offset, 0px))"},children:h.jsxs("button",{onClick:C,className:"flex items-center gap-3 hover:text-foreground transition-colors cursor-pointer focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none rounded",title:"Copy viewport data",children:[h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("span",{className:"text-muted-foreground tracking-[0.18em] text-[9px] uppercase",children:"Pan"}),h.jsxs("span",{className:`tabular-nums ${p?"text-accent":""}`,children:[t.pan.x.toFixed(0),",",t.pan.y.toFixed(0)]})]}),h.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/40 select-none",children:"·"}),h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("span",{className:"text-muted-foreground tracking-[0.18em] text-[9px] uppercase",children:"Size"}),h.jsxs("span",{className:`tabular-nums ${p?"text-accent":""}`,children:[t.canvasSize?.w??1024,"x",t.canvasSize?.h??1024]})]}),h.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/40 select-none",children:"·"}),h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("span",{className:"text-muted-foreground tracking-[0.18em] text-[9px] uppercase",children:"Zoom"}),h.jsxs("span",{className:`tabular-nums ${p?"text-accent":""}`,children:[(t.zoom*100).toFixed(0),"%"]})]})]})}),h.jsxs("div",{className:"shrink-0 flex items-center gap-3 md:gap-4",children:[c&&h.jsxs(h.Fragment,{children:[h.jsxs("button",{onClick:c,className:`flex items-center gap-1.5 transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none rounded ${u?"text-accent":"text-muted-foreground hover:text-foreground"}`,title:`Toggle ${l} (Ctrl+\`)`,children:[h.jsxs("span",{className:"text-[10px]",children:[">","_"]}),h.jsx("span",{className:"uppercase text-[9px] font-light tracking-[0.18em]",children:l})]}),h.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/40 select-none",children:"·"})]}),n,n&&h.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/40 select-none",children:"·"}),h.jsxs("div",{className:"flex items-center gap-1.5 text-foreground min-w-[60px] justify-end",children:[h.jsx(DH,{size:11,className:"text-muted-foreground"}),h.jsx("span",{children:g?d.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):"--:--"})]})]})]})},Qee=({onOpenCommandPalette:e,extraControls:t})=>h.jsx("div",{className:"select-none font-mono text-[11px]",style:{borderTop:"1px dashed var(--hud-chrome-border, oklch(var(--border) / 0.6))"},children:h.jsxs("div",{className:"px-3 py-2 flex items-center justify-between",children:[h.jsxs("button",{onClick:e,className:"flex items-center gap-1.5 text-muted-foreground hover:text-foreground transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none rounded",children:[h.jsx(pk,{size:10}),h.jsx("span",{className:"tracking-[0.18em] font-normal uppercase text-[10px]",children:"Command Palette"})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[t,h.jsx("kbd",{className:"text-[10px] text-muted-foreground font-mono",children:"⌘K"})]})]})}),xw={"light-prod":"Lean launch","max-pro":"Max pro","scope-instrument":"Scope"};function ete(e){const t=l6(e);return t===!0?"on":t===!1?"off":"default"}function tte(e,t){const n=new Set([t]);for(const r of e)r.requiredTier&&n.add(String(r.requiredTier));return[...n]}function nte({isOpen:e,onClose:t,audienceOptions:n}){const r=a6(),{ref:o,onKeyDown:s}=fx(e),i=da(),{activeBundle:c,applyBundle:u,resetBundle:l}=mx(),d=a.useMemo(()=>r?.all()??[],[r]);if(a.useEffect(()=>{if(!e)return;const g=y=>{y.key==="Escape"&&(y.preventDefault(),t())};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[e,t]),!e||!r)return null;const f=r.audience(),p=r.layers.local?.audience??"",m=n??tte(d,f.tier);return h.jsx("div",{className:"scout-flag-backdrop",onClick:t,children:h.jsxs("div",{...o,className:"scout-flag-panel",role:"dialog","aria-modal":"true","aria-labelledby":"scout-flag-title",onKeyDown:s,onClick:g=>g.stopPropagation(),children:[h.jsxs("header",{className:"scout-flag-head",children:[h.jsxs("div",{className:"scout-flag-head-copy",children:[h.jsx("h2",{id:"scout-flag-title",className:"scout-flag-title",children:"Feature flags"}),h.jsxs("p",{className:"scout-flag-subtitle",children:["Audience ",h.jsx("strong",{children:f.tier})," · local overrides apply instantly"]})]}),h.jsx("button",{type:"button",className:"btn btn--ghost btn--sm btn--icon","aria-label":"Close feature flags",onClick:t,children:h.jsx(Ip,{size:14,strokeWidth:1.8})})]}),h.jsxs("div",{className:"scout-flag-toolbar",children:[h.jsx("label",{className:"scout-flag-toolbar-label",htmlFor:"scout-flag-audience",children:"Local audience"}),h.jsxs("select",{id:"scout-flag-audience",className:"scout-flag-select",value:p,onChange:g=>r.setLocalAudienceOverride(g.target.value||null),children:[h.jsxs("option",{value:"",children:["Default (",f.tier,")"]}),m.map(g=>h.jsx("option",{value:g,children:g},g))]}),i&&h.jsx("div",{className:"scout-flag-bundles",children:Object.keys(xw).map(g=>h.jsx("button",{type:"button",className:`chip chip--mono chip--caps chip--sm${c===g?" chip--working":" chip--ghost"}`,onClick:()=>u(g),children:xw[g]},g))})]}),h.jsx("div",{className:"scout-flag-list",children:d.map(g=>{const y=r.layers.local?.flags?.[g.key];return h.jsxs("div",{className:"scout-flag-row",children:[h.jsxs("div",{className:"scout-flag-key",children:[h.jsx("div",{className:"scout-flag-key-name",children:g.key}),h.jsx("div",{className:"scout-flag-key-desc",children:g.definition?.description??g.definition?.label??g.reason})]}),h.jsx("span",{className:`chip chip--mono chip--caps chip--sm ${g.enabled?"chip--success":"chip--neutral"}`,children:g.enabled?"on":"off"}),h.jsx("span",{className:"scout-flag-meta",title:`${g.layer} · ${g.reason}`,children:g.layer}),h.jsxs("select",{className:"scout-flag-select","aria-label":`Override ${g.key}`,value:ete(y),onChange:x=>{const w=x.target.value;r.setLocalOverride(g.key,w==="default"?null:w==="on")},children:[h.jsx("option",{value:"default",children:"default"}),h.jsx("option",{value:"on",children:"on"}),h.jsx("option",{value:"off",children:"off"})]})]},g.key)})}),h.jsxs("footer",{className:"scout-flag-foot",children:[h.jsxs("span",{className:"scout-flag-count",children:[d.length," flags"]}),h.jsx("button",{type:"button",className:"btn btn--ghost btn--sm btn--mono",onClick:l,children:"Reset flags"})]})]})})}const rte={"light-prod":"lean","max-pro":"max","scope-instrument":"scope"};function ote({onOpenPanel:e}){const{activeBundle:t,toggleBundle:n}=mx();return da()?h.jsxs("div",{className:"scout-dev-flag",children:[h.jsx("button",{type:"button",className:"chip chip--mono chip--caps chip--sm chip--warning",title:`Experience bundle: ${t}. Click to flip lean/max.`,onClick:n,children:rte[t]}),h.jsx("button",{type:"button",className:"btn btn--ghost btn--sm btn--icon",title:"Open feature flags","aria-label":"Open feature flags",onClick:e,children:h.jsx(p3,{size:11,strokeWidth:1.8})})]}):null}const{statusBarHeight:Ni}=Ro.layout,Cw=120,kw={borderColor:"var(--hud-chrome-border, oklch(var(--border)))"},ste={backgroundColor:"var(--hud-chrome-border, oklch(var(--border)))"},ite=({isOpen:e,onClose:t,onToggleMaximize:n,isMaximized:r=!1,height:o=320,onHeightChange:s,title:i,headerActions:c,contentOverlay:u,children:l})=>{const d=a.useRef(!1),f=a.useRef(null),p=a.useCallback(g=>{if(!s)return;g.preventDefault(),d.current=!0;const y=g.clientY,x=o;f.current&&(f.current.style.transition="none");const w=v=>{const C=y-v.clientY,k=window.innerHeight-Ni,E=Math.max(Cw,Math.min(k,x+C));f.current&&(f.current.style.height=`${E}px`)},b=v=>{d.current=!1,document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",b),f.current&&(f.current.style.transition="");const C=y-v.clientY,k=window.innerHeight-Ni;s(Math.max(Cw,Math.min(k,x+C)))};document.addEventListener("mousemove",w),document.addEventListener("mouseup",b)},[o,s]),m=r?`calc(100vh - ${Ni}px)`:`${o}px`;return h.jsxs("div",{ref:f,"data-hudson-template":"hudson",className:`
|
|
79
|
+
fixed left-0 right-0 shadow-[0_-2px_12px_rgba(0,0,0,0.16)] flex flex-col border-t text-card-foreground
|
|
80
|
+
bg-card
|
|
81
|
+
${e?"translate-y-0 opacity-100 pointer-events-auto":"translate-y-full opacity-0 pointer-events-none"}
|
|
82
|
+
transition-all duration-300 ease-in-out
|
|
83
|
+
`,style:{bottom:Ni,height:m,zIndex:Ro.zIndex.drawer,...kw},children:[h.jsxs("div",{className:"h-9 bg-card/80 border-b flex items-center justify-between px-3 shrink-0 select-none backdrop-blur-sm",style:kw,children:[h.jsxs("div",{className:"flex items-center gap-3",children:[i||h.jsxs("div",{className:"flex items-center gap-2 text-accent",children:[h.jsx(JH,{size:14}),h.jsx("span",{className:"text-[10px] font-light tracking-[0.18em] font-mono uppercase",children:"TERMINAL"})]}),c]}),h.jsx("div",{className:"flex-1 flex items-center justify-center h-full cursor-ns-resize text-muted-foreground hover:text-foreground transition-colors group",title:"Drag to Resize",onMouseDown:p,children:h.jsx("div",{className:"w-16 h-1 rounded-full group-hover:bg-muted-foreground transition-colors",style:ste})}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("button",{onClick:n,className:"p-1.5 rounded hover:bg-accent/10 text-muted-foreground hover:text-foreground transition-colors",title:r?"Restore":"Maximize",children:r?h.jsx(HH,{size:14}):h.jsx(FH,{size:14})}),h.jsx("button",{onClick:t,className:"p-1.5 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive transition-colors",title:"Close console","aria-label":"Close console",children:h.jsx(nW,{size:14})})]})]}),h.jsx(o6.Provider,{value:s6,children:h.jsxs("div",{"data-hudson-terminal-drawer-content":"true",className:"flex-1 relative overflow-hidden flex flex-col bg-transparent",children:[l,u&&h.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-3 z-30 flex justify-center px-4",children:h.jsx("div",{className:"pointer-events-auto",children:u})})]})})]})},ls={borderColor:"var(--hud-chrome-border, oklch(var(--border)))"},ate={"--tw-ring-color":"color-mix(in srgb, var(--hud-accent, currentColor) 34%, transparent)"},cte=({isOpen:e,onClose:t,commands:n})=>{const[r,o]=a.useState(""),[s,i]=a.useState(0),c=a.useId(),u=`${c}-listbox`,l=a.useRef(null),d=a.useRef(null),f=a.useRef(null),p=n.filter(w=>w.label.toLowerCase().includes(r.toLowerCase()));a.useEffect(()=>{e&&(en.logger.info("hudson.command_palette.open",{category:"command",data:{commandCount:n.length}}),l.current?.focus({preventScroll:!0}),o(""),i(0))},[n.length,e]),a.useEffect(()=>{i(0)},[r]),a.useEffect(()=>{f.current?.scrollIntoView({behavior:"smooth",block:"nearest"})},[s]);const m=(w,b)=>{const v=en.trace.start("hudson.command.execute",{category:"command",data:{commandId:w.id,surface:"command_palette",source:b,queryLength:r.length,resultCount:p.length}});try{w.action(),v.end(),t()}catch(C){throw v.error(C),C}},g=w=>{if((w.key==="ArrowDown"||w.key==="ArrowUp")&&p.length===0){w.preventDefault();return}w.key==="ArrowDown"?(w.preventDefault(),i(b=>(b+1)%p.length)):w.key==="ArrowUp"?(w.preventDefault(),i(b=>(b-1+p.length)%p.length)):w.key==="Enter"?(w.preventDefault(),p[s]&&m(p[s],"keyboard")):w.key==="Escape"&&t()},y=w=>{if(w.key!=="Tab")return;const b=d.current;if(!b)return;const v=Array.from(b.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter($=>!$.hasAttribute("disabled")&&$.getAttribute("aria-hidden")!=="true");if(v.length===0){w.preventDefault();return}const C=v[0],k=v[v.length-1],E=document.activeElement;w.shiftKey?(E===C||!b.contains(E))&&(w.preventDefault(),k.focus()):E===k&&(w.preventDefault(),C.focus())},x=p[s]?`${c}-option-${s}`:void 0;return e?h.jsx("div",{className:"fixed inset-0 z-[100] flex items-start justify-center pt-[15vh] bg-background/45 backdrop-blur-[2px] pointer-events-auto",onClick:t,children:h.jsxs("div",{ref:d,role:"dialog","aria-modal":"true","aria-label":"Command palette",className:"w-[640px] max-w-[90vw] bg-popover border shadow-2xl rounded-lg overflow-hidden flex flex-col animate-in fade-in zoom-in-95 duration-100",style:ls,onClick:w=>w.stopPropagation(),onKeyDown:y,children:[h.jsxs("div",{className:"flex items-center px-4 py-3 border-b gap-3 focus-within:ring-2 focus-within:outline-none",style:{...ls,...ate},children:[h.jsx(pk,{className:"text-muted-foreground",size:16,strokeWidth:1.5,"aria-hidden":"true"}),h.jsx("input",{ref:l,className:"flex-1 bg-transparent border-none outline-none text-popover-foreground placeholder:text-muted-foreground font-mono text-[12px] font-normal",style:{boxShadow:"none"},placeholder:"Type a command or search",value:r,onChange:w=>o(w.target.value),onKeyDown:g,role:"combobox","aria-expanded":"true","aria-haspopup":"listbox","aria-controls":u,"aria-activedescendant":x,"aria-autocomplete":"list"}),h.jsx("div",{className:"px-1.5 py-0.5 rounded bg-muted border text-[10px] text-muted-foreground font-mono tracking-[0.12em]",style:ls,"aria-hidden":"true",children:"ESC"})]}),h.jsxs("div",{className:"max-h-[300px] overflow-y-auto py-2 relative",children:[h.jsx("div",{id:u,role:"listbox","aria-label":"Command results",className:"pb-2",children:p.length===0?h.jsx("div",{className:"px-4 py-8 text-center text-muted-foreground text-[11px] font-mono",role:"status",children:"No matching commands"}):p.map((w,b)=>h.jsxs("div",{id:`${c}-option-${b}`,ref:b===s?f:null,role:"option","aria-selected":b===s,className:`px-4 py-2.5 flex items-center gap-3 cursor-pointer transition-colors ${b===s?"bg-accent/10 border-l-2 border-accent":"border-l-2 border-transparent hover:bg-muted/70"}`,onClick:()=>m(w,"pointer"),onMouseEnter:()=>i(b),children:[w.icon&&h.jsx("div",{className:`${b===s?"text-accent":"text-muted-foreground"}`,children:w.icon}),h.jsx("div",{className:"flex-1",children:h.jsx("div",{className:`text-[12px] ${b===s?"text-accent font-medium":"text-foreground/80 font-normal"}`,children:w.label})}),w.shortcut&&h.jsx("div",{className:"text-[10px] font-mono text-muted-foreground bg-muted px-1.5 py-0.5 rounded border tracking-[0.04em]",style:ls,children:w.shortcut}),b===s&&h.jsx(VH,{size:14,className:"text-accent ml-2","aria-hidden":"true"})]},w.id))}),p.length>6&&h.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-8 bg-gradient-to-t from-popover to-transparent pointer-events-none"})]}),h.jsxs("div",{className:"px-4 py-1.5 bg-card/90 backdrop-blur-sm border-t flex justify-between items-center text-[10px] text-muted-foreground font-mono relative z-10 tracking-[0.18em] uppercase",style:ls,children:[h.jsx("span",{children:"Command Palette"}),h.jsxs("span",{className:"tracking-[0.04em] normal-case",children:[p.length," matches"]})]})]})}):null},k4=a.createContext(null),lte=a.createContext(null);function ute({children:e}){const[t,n]=a.useState(null);return h.jsx(k4.Provider,{value:t,children:h.jsx(lte.Provider,{value:n,children:e})})}function dte(){return a.useContext(k4)}const E4=O6();function fte(e){const t=e.toLowerCase();return E4.find(n=>n.key===t)??null}const ge=(...e)=>e,pte=[{title:"App shell",bindings:[{chords:[M6,T6],label:Cs},{chords:[ge("⌘","K")],label:"Command palette"},{chords:[ge("⌘","["),ge("⌘","B")],label:"Toggle sidebar / left panel"},{chords:[ge("⌘","]")],label:"Toggle right panel"},{chords:[ge("⌘","⇧","]")],label:"Toggle inspector overlay"},{chords:[ge("Ctrl","`")],label:"Toggle terminal drawer"},{chords:[ge("⌘","J")],label:"Toggle assistant drawer"}]},{title:"Navigation",bindings:E4.map(e=>({chords:[ge("g",e.key)],label:e.label}))},{title:"Global",bindings:[{chords:[ge("?")],label:"Toggle this help"},{chords:[ge("Esc")],label:"Close dialog / clear search"},{chords:[ge("Tab"),ge("⇧","Tab")],label:"Move focus"},{chords:[ge("[")],label:"Focus previous pane"},{chords:[ge("]")],label:"Focus next pane"}]},{title:"Lists",bindings:[{chords:[ge("↓"),ge("j")],label:"Next item"},{chords:[ge("↑"),ge("k")],label:"Previous item"},{chords:[ge("g"),ge("Home")],label:"First item"},{chords:[ge("G"),ge("End")],label:"Last item"},{chords:[ge("Enter")],label:"Open / activate"}]},{title:"Search",bindings:[{chords:[ge("/")],label:"Focus filter input"},{chords:[ge("↓")],label:"From filter → first match"},{chords:[ge("Esc")],label:"Clear filter (while focused)"}]},{title:"Composers",bindings:[{chords:[ge("Enter"),ge("⇧","Enter")],label:"Insert line break"},{chords:[ge("⌘","Enter"),ge("Ctrl","Enter")],label:"Send message"}]},{title:"Capture routing",bindings:[{chords:[ge("Drop")],label:"Drop screenshot/video anywhere"},{chords:[ge("⌘","V")],label:"Paste image into route composer"},{chords:[ge("Existing chat"),ge("New session")],label:"Choose delivery in composer"}]},{title:"Dispatch",bindings:[{chords:[ge("↓"),ge("j")],label:"Next ledger row"},{chords:[ge("↑"),ge("k")],label:"Previous ledger row"},{chords:[ge("Enter")],label:"Inspect row / open dialogue thread"},{chords:[ge("←"),ge("→")],label:"Switch dispatch tabs"},{chords:[ge("Esc")],label:"Clear inspector selection"}]},{title:"Agent lanes",bindings:[{chords:[ge("↓"),ge("j")],label:"Next lane"},{chords:[ge("↑"),ge("k")],label:"Previous lane"},{chords:[ge("Enter"),ge("i")],label:"Inspect lane"},{chords:[ge("1","…","4")],label:"Switch trace window (5m → 24h)"},{chords:[ge("o")],label:"Open session (detail sheet)"},{chords:[ge("t")],label:"Open traces (detail sheet)"},{chords:[ge("p")],label:"Agent profile (detail sheet)"},{chords:[ge("Esc")],label:"Close detail sheet"}]},{title:"Tail · Atop",bindings:[{chords:[ge("/")],label:"Open filter (Tail)"},{chords:[ge("G")],label:"Jump to live (Tail)"},{chords:[ge("j"),ge("k")],label:"Walk rows (Atop)"}]},{title:"Session scrubber",bindings:[{chords:[ge("←"),ge("→")],label:"Seek ±1%"},{chords:[ge("⇧","←"),ge("⇧","→")],label:"Seek ±5%"},{chords:[ge("Home"),ge("End")],label:"Jump to start / end"}]}];function mte({open:e,onClose:t}){const{ref:n,onKeyDown:r}=fx(e);return e?h.jsx("div",{className:"kb-help-backdrop",onClick:t,role:"presentation",children:h.jsxs("div",{ref:n,className:"kb-help-panel",role:"dialog","aria-modal":"true","aria-labelledby":"kb-help-title",onClick:o=>o.stopPropagation(),onKeyDown:r,tabIndex:-1,children:[h.jsxs("header",{className:"kb-help-head",children:[h.jsx("h2",{id:"kb-help-title",className:"kb-help-title",children:"Keyboard shortcuts"}),h.jsx("button",{type:"button",className:"kb-help-close",onClick:t,"aria-label":"Close (Esc)",children:"✕"})]}),h.jsx("div",{className:"kb-help-grid",children:pte.map(o=>h.jsxs("section",{className:"kb-help-group",children:[h.jsx("h3",{className:"kb-help-group-title",children:o.title}),h.jsx("dl",{className:"kb-help-list",children:o.bindings.map((s,i)=>h.jsxs("div",{className:"kb-help-row",children:[h.jsx("dt",{className:"kb-help-keys",children:s.chords.map((c,u)=>h.jsxs("span",{className:"kb-help-chord-wrap",children:[u>0&&h.jsx("span",{className:"kb-help-or",children:"or"}),h.jsx("span",{className:"kb-help-chord",children:c.map((l,d)=>h.jsx("kbd",{className:"kb-help-kbd",children:l},`${l}-${d}`))})]},`${u}-${c.join("+")}`))}),h.jsx("dd",{className:"kb-help-label",children:s.label})]},`${o.title}-${i}`))})]},o.title))}),h.jsxs("footer",{className:"kb-help-foot",children:["Press ",h.jsx("kbd",{className:"kb-help-kbd",children:"?"})," to toggle · ",h.jsx("kbd",{className:"kb-help-kbd",children:"Esc"})," to close"]})]})}):null}function hte(){const[e,t]=a.useState(!1);return a.useEffect(()=>{const n=r=>{if(r.key==="Escape"&&e){r.preventDefault(),t(!1);return}r.key==="?"&&(px(r.target)||(r.preventDefault(),t(o=>!o)))};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e]),{open:e,setOpen:t}}const gte=15e3,vte=3e4;function bte(){const[e,t]=a.useState([]),[n,r]=a.useState(null),[o,s]=a.useState(null),i=a.useRef(!0),c=a.useRef(null),u=a.useCallback(async()=>{try{const m=await yf("/api/notifications?type=pairing_request");if(!i.current)return!0;const g=m.notifications.map(y=>y.data?.request).filter(y=>y?.status==="pending");return t(g),!0}catch{return!1}},[]);a.useEffect(()=>{i.current=!0;let m=!1;const g=()=>{c.current!==null&&(window.clearTimeout(c.current),c.current=null)},y=b=>{g(),c.current=window.setTimeout(()=>{x()},b)},x=async()=>{if(g(),!D6())return;const b=await u();m||!i.current||y(b?gte:vte)};x();const w=N6(()=>{x()});return()=>{m=!0,i.current=!1,g(),w()}},[u]);const l=a.useCallback(async(m,g)=>{r(m),s(null);try{await yf(`/api/pairing/requests/${encodeURIComponent(m)}/decide`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({decision:g})}),t(y=>y.filter(x=>x.token!==m)),u()}catch(y){s(y instanceof Error?y.message:String(y))}finally{r(null)}},[u]);if(e.length===0)return null;const d=e[0],f=d.requesterLabel?.trim()||"A device",p=n===d.token;return h.jsx("div",{className:"scout-pair-prompt",role:"alertdialog","aria-label":"Pairing request",children:h.jsxs("div",{className:"scout-pair-prompt-card",children:[h.jsx("div",{className:"scout-pair-prompt-eyebrow",children:"Pairing request"}),h.jsxs("div",{className:"scout-pair-prompt-title",children:[f," wants to pair"]}),h.jsxs("div",{className:"scout-pair-prompt-detail",children:["On your network",d.requesterIp?` · ${d.requesterIp}`:"",". Allowing trusts this device and starts pair mode."]}),o?h.jsx("div",{className:"scout-pair-prompt-error",children:o}):null,h.jsxs("div",{className:"scout-pair-prompt-actions",children:[h.jsx("button",{type:"button",className:"scout-pair-prompt-btn scout-pair-prompt-deny",disabled:p,onClick:()=>{l(d.token,"deny")},children:"Deny"}),h.jsx("button",{type:"button",className:"scout-pair-prompt-btn scout-pair-prompt-allow",disabled:p,onClick:()=>{l(d.token,"approve")},children:p?"Allowing…":"Allow"})]}),e.length>1?h.jsxs("div",{className:"scout-pair-prompt-more",children:["+",e.length-1," more waiting"]}):null]})})}const S4=200;function yte({onOpen:e}){return h.jsx("button",{type:"button",onClick:e,className:"flex min-w-0 items-center rounded px-1 py-0.5 transition-colors hover:bg-muted/70 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",title:"Open activity log","aria-label":"Open activity log",children:h.jsx(kW,{maxEvents:S4,showCounts:!0})})}function wte({open:e,onClose:t}){return a.useEffect(()=>{if(!e)return;const n=r=>{r.key==="Escape"&&t()};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[t,e]),e?h.jsx("div",{className:"fixed inset-0 z-[70] flex bg-background/88 p-3 text-foreground backdrop-blur-md md:p-5",role:"dialog","aria-modal":"true","aria-label":"Activity log",children:h.jsxs("div",{className:"flex min-h-0 w-full flex-col",children:[h.jsxs("div",{className:"flex h-10 shrink-0 items-center justify-between border border-border border-b-0 bg-card/95 px-3 shadow-[var(--hud-shadow-nav)]",children:[h.jsx("div",{className:"min-w-0 font-mono text-sm font-semibold uppercase tracking-[0.18em] text-foreground",children:"Activity Log"}),h.jsx("button",{type:"button",onClick:t,className:"rounded p-1 text-muted-foreground transition-colors hover:bg-muted/70 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",title:"Close activity log","aria-label":"Close activity log",children:h.jsx(Ip,{size:14})})]}),h.jsx(EW,{observability:en,maxEvents:S4,title:"activity",className:"min-h-0 flex-1 rounded-t-none",emptyMessage:"No activity yet. Connection and status events will appear here."})]})}):null}function xte({dictationActive:e}){const t=$o(hx,!1),{open:n,setOpen:r,state:o}=C6(),{navigate:s}=Sn(),i=a.useRef(null),[c,u]=a.useState({left:12,bottom:36});if(a.useEffect(()=>()=>r(!1),[r]),a.useEffect(()=>{if(!n)return;const p=m=>{m.key==="Escape"&&(m.preventDefault(),r(!1),i.current?.focus())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[n,r]),a.useLayoutEffect(()=>{if(!n)return;const p=()=>{const m=i.current;if(!m)return;const g=m.getBoundingClientRect(),y=Math.min(384,window.innerWidth-16);u({left:Math.max(8,Math.min(g.left,window.innerWidth-y-8)),bottom:Math.max(36,window.innerHeight-g.top+8)})};return p(),window.addEventListener("resize",p),window.addEventListener("scroll",p,!0),()=>{window.removeEventListener("resize",p),window.removeEventListener("scroll",p,!0)}},[n]),!t)return null;const d=o==="connecting"||o==="live"?o==="connecting"?"Scoutbot voice is connecting":"Scoutbot voice is live":n?"Hide Scoutbot voice":"Open Scoutbot voice controls",f=typeof document>"u"?null:document.querySelector("[data-scout-theme]")??document.body;return h.jsxs("div",{className:"flex items-center",children:[h.jsxs("button",{ref:i,type:"button",onClick:()=>r(p=>!p),title:d,"aria-label":d,"aria-expanded":n,"aria-controls":"scoutbot-realtime-voice-menu",className:`flex h-[18px] items-center gap-1.5 rounded border px-1.5 font-mono text-2xs uppercase tracking-[0.1em] transition-colors ${o==="live"?"border-lime-300/35 bg-lime-300/[0.08] text-lime-100":o==="connecting"?"border-amber-300/30 bg-amber-300/[0.07] text-amber-100/90":o==="error"?"border-red-400/30 bg-red-400/[0.07] text-red-100":n?"border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] text-[var(--scout-chrome-ink)]":"border-transparent text-[var(--scout-chrome-ink-faint)] hover:text-[var(--scout-chrome-ink)]"}`,children:[o==="connecting"?h.jsx(H6,{size:10,className:"animate-spin","aria-hidden":"true"}):o==="live"?h.jsxs("span",{className:"relative flex size-1.5 shrink-0","aria-hidden":"true",children:[h.jsx("span",{className:"absolute inline-flex size-full animate-ping rounded-full bg-lime-300/30"}),h.jsx("span",{className:"relative inline-flex size-1.5 rounded-full bg-lime-300/90"})]}):h.jsx(z6,{size:10,fill:"currentColor","aria-hidden":"true"}),h.jsx("span",{children:o==="live"?"Voice live":o==="connecting"?"Voice connecting":"Voice"})]}),n&&f&&Lt.createPortal(h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed inset-0 z-[80]","aria-hidden":"true",onMouseDown:()=>r(!1)}),h.jsxs("div",{id:"scoutbot-realtime-voice-menu",className:"fixed z-[81] flex h-[min(31rem,calc(100vh-3rem))] min-h-80 w-[min(24rem,calc(100vw-1rem))] min-w-80 resize flex-col overflow-hidden rounded-xl border border-[color-mix(in_srgb,var(--hud-ink)_13%,transparent)] bg-[color-mix(in_srgb,var(--scout-chrome-bg)_96%,black)] shadow-[0_18px_44px_rgba(0,0,0,0.46)] backdrop-blur-md",style:{left:c.left,bottom:c.bottom},role:"dialog","aria-label":"Scoutbot live voice",onMouseDown:p=>p.stopPropagation(),children:[h.jsx(F6,{state:o,onExpand:()=>{r(!1),s({view:"voice"})}}),h.jsx(B6,{dictationActive:e})]})]}),f)]})}let Ew=!1;function Cte(){Ew||(Ew=!0,en.setEnabled(!0),en.logger.info("Scout web shell booted",{category:"shell"}))}function kte(e,t){const n=a.useRef(null),r=a.useRef(null),o=a.useRef(null);a.useEffect(()=>{if(Cte(),t.status==="offline"||t.status==="degraded"){const s=t.message?.trim()||"Scout web API unreachable";s!==n.current&&(n.current=s,en.logger.log(t.status==="offline"?"error":"warn",s,{category:"connection"}))}else n.current=null;if(e.status.color==="red"){const s=e.status.label.trim();s&&s!==r.current&&(r.current=s,en.logger.error(s,{category:"status"}))}else r.current=null;if(e.mesh.color==="amber"||e.mesh.color==="red"){const s=`${e.mesh.label}: ${e.mesh.value}`;if(s!==o.current){o.current=s;const i=e.mesh.color==="red"?"error":"warn";en.logger.log(i,s,{category:"mesh"})}}else o.current=null},[t.message,t.status,e.mesh,e.status])}function vp(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Ms={};function kc(e,t,n,r,o){let s={...bp(e,Ms)};return t&&(s=$4(s,t)),s}function Ete(e){if(e.length===0)return Ms;if(e.length===1)return bp(e[0],Ms);let t={...bp(e[0],Ms)};for(let n=1;n<e.length;n+=1)t=$4(t,e[n]);return t}function $4(e,t){return O4(t)?t(e):Ste(e,t)}function Ste(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=vp(e.style,r);break}case"className":{e[n]=L4(e.className,r);break}default:$te(n,r)?e[n]=Ote(e[n],r):e[n]=r}}return e}function $te(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function O4(e){return typeof e=="function"}function bp(e,t){return O4(e)?e(t):e??Ms}function Ote(e,t){return t?e?n=>{if(jte(n)){const o=n;Lte(o);const s=t(o);return o.baseUIHandlerPrevented||e?.(o),s}const r=t(n);return e?.(n),r}:t:e}function Lte(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function L4(e,t){return t?e?t+" "+e:t:e}function jte(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Ko(e,...t){const n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const Sw={};function Xn(e,t){const n=a.useRef(Sw);return n.current===Sw&&(n.current=e(t)),n}function $w(e,t,n,r){const o=Xn(j4).current;return Pte(o,e,t,n,r)&&R4(o,[e,t,n,r]),o.callback}function Rte(e){const t=Xn(j4).current;return Mte(t,e)&&R4(t,e),t.callback}function j4(){return{callback:null,cleanup:null,refs:[]}}function Pte(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function Mte(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function R4(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 o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const i=s(n);typeof i=="function"&&(r[o]=i);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const i=r[o];typeof i=="function"?i():s(null);break}case"object":{s.current=null;break}}}}}}}const Tte=parseInt(a.version,10);function P4(e){return Tte>=e}function Ow(e){if(!a.isValidElement(e))return null;const t=e,n=t.props;return(P4(19)?n?.ref:t.ref)??null}function Ite(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const s=t[r](o);s!=null&&Object.assign(n,s);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function Ate(e,t){return typeof e=="function"?e(t):e}function _te(e,t){return typeof e=="function"?e(t):e}function Nte(){}const Qt=Object.freeze({}),Dte={style:{transition:"none"}},Vte={fallbackAxisSide:"end"};function li(e,t,n={}){const r=t.render,o=zte(t,n);if(n.enabled===!1)return null;const s=n.state??Qt;return Fte(e,r,o,s)}function zte(e,t={}){const{className:n,style:r,render:o}=e,{state:s=Qt,ref:i,props:c,stateAttributesMapping:u,enabled:l=!0}=t,d=l?Ate(n,s):void 0,f=l?_te(r,s):void 0,p=l?Ite(s,u):Qt,m=l?vp(p,Array.isArray(c)?Ete(c):c)??Qt:Qt;return typeof document<"u"&&(l?Array.isArray(i)?m.ref=Rte([m.ref,Ow(o),...i]):m.ref=$w(m.ref,Ow(o),i):$w(null,null)),l?(d!==void 0&&(m.className=L4(m.className,d)),f!==void 0&&(m.style=vp(m.style,f)),m):Qt}function Fte(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=kc(n,t.props);return o.ref=n.ref,a.cloneElement(t,o)}if(e&&typeof e=="string")return Bte(e,n);throw new Error(Ko(8))}function Bte(e,t){return e==="button"?a.createElement("button",{type:"button",...t,key:t.key}):e==="img"?a.createElement("img",{alt:"",...t,key:t.key}):a.createElement(e,t)}function Gm(e){return li(e.defaultTagName??"div",e,e)}function M4(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=M4(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function T4(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=M4(e))&&(r&&(r+=" "),r+=t);return r}const Lw=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,jw=T4,Hte=(e,t)=>n=>{var r;if(t?.variants==null)return jw(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(l=>{const d=n?.[l],f=s?.[l];if(d===null)return null;const p=Lw(d)||Lw(f);return o[l][p]}),c=n&&Object.entries(n).reduce((l,d)=>{let[f,p]=d;return p===void 0||(l[f]=p),l},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,d)=>{let{class:f,className:p,...m}=d;return Object.entries(m).every(g=>{let[y,x]=g;return Array.isArray(x)?x.includes({...s,...c}[y]):{...s,...c}[y]===x})?[...l,f,p]:l},[]);return jw(e,i,u,n?.class,n?.className)},Wte=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Zte=(e,t)=>({classGroupId:e,validator:t}),I4=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Wa="-",Rw=[],Ute="arbitrary..",Gte=e=>{const t=Yte(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Kte(i);const c=i.split(Wa),u=c[0]===""&&c.length>1?1:0;return A4(c,u,t)},getConflictingClassGroupIds:(i,c)=>{if(c){const u=r[i],l=n[i];return u?l?Wte(l,u):u:l||Rw}return n[i]||Rw}}},A4=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const l=A4(e,t+1,s);if(l)return l}const i=n.validators;if(i===null)return;const c=t===0?e.join(Wa):e.slice(t).join(Wa),u=i.length;for(let l=0;l<u;l++){const d=i[l];if(d.validator(c))return d.classGroupId}},Kte=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Ute+r:void 0})(),Yte=e=>{const{theme:t,classGroups:n}=e;return qte(n,t)},qte=(e,t)=>{const n=I4();for(const r in e){const o=e[r];Km(o,n,r,t)}return n},Km=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];Xte(i,t,n,r)}},Xte=(e,t,n,r)=>{if(typeof e=="string"){Jte(e,t,n);return}if(typeof e=="function"){Qte(e,t,n,r);return}ene(e,t,n,r)},Jte=(e,t,n)=>{const r=e===""?t:_4(t,e);r.classGroupId=n},Qte=(e,t,n,r)=>{if(tne(e)){Km(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Zte(n,e))},ene=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[c,u]=o[i];Km(u,_4(t,c),n,r)}},_4=(e,t)=>{let n=e;const r=t.split(Wa),o=r.length;for(let s=0;s<o;s++){const i=r[s];let c=n.nextPart.get(i);c||(c=I4(),n.nextPart.set(i,c)),n=c}return n},tne=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,nne=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,i)=>{n[s]=i,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let i=n[s];if(i!==void 0)return i;if((i=r[s])!==void 0)return o(s,i),i},set(s,i){s in n?n[s]=i:o(s,i)}}},yp="!",Pw=":",rne=[],Mw=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),one=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,c=0,u=0,l;const d=o.length;for(let y=0;y<d;y++){const x=o[y];if(i===0&&c===0){if(x===Pw){s.push(o.slice(u,y)),u=y+1;continue}if(x==="/"){l=y;continue}}x==="["?i++:x==="]"?i--:x==="("?c++:x===")"&&c--}const f=s.length===0?o:o.slice(u);let p=f,m=!1;f.endsWith(yp)?(p=f.slice(0,-1),m=!0):f.startsWith(yp)&&(p=f.slice(1),m=!0);const g=l&&l>u?l-u:void 0;return Mw(s,m,p,g)};if(t){const o=t+Pw,s=r;r=i=>i.startsWith(o)?s(i.slice(o.length)):Mw(rne,!1,i,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},sne=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const i=n[s],c=i[0]==="[",u=t.has(i);c||u?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(i)):o.push(i)}return o.length>0&&(o.sort(),r.push(...o)),r}},ine=e=>({cache:nne(e.cacheSize),parseClassName:one(e),sortModifiers:sne(e),postfixLookupClassGroupIds:ane(e),...Gte(e)}),ane=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},cne=/\s+/,lne=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s,postfixLookupClassGroupIds:i}=t,c=[],u=e.trim().split(cne);let l="";for(let d=u.length-1;d>=0;d-=1){const f=u[d],{isExternal:p,modifiers:m,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:x}=n(f);if(p){l=f+(l.length>0?" "+l:l);continue}let w=!!x,b;if(w){const $=y.substring(0,x);b=r($);const S=b&&i[b]?r(y):void 0;S&&S!==b&&(b=S,w=!1)}else b=r(y);if(!b){if(!w){l=f+(l.length>0?" "+l:l);continue}if(b=r(y),!b){l=f+(l.length>0?" "+l:l);continue}w=!1}const v=m.length===0?"":m.length===1?m[0]:s(m).join(":"),C=g?v+yp:v,k=C+b;if(c.indexOf(k)>-1)continue;c.push(k);const E=o(b,w);for(let $=0;$<E.length;++$){const S=E[$];c.push(C+S)}l=f+(l.length>0?" "+l:l)}return l},une=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=N4(n))&&(o&&(o+=" "),o+=r);return o},N4=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=N4(e[r]))&&(n&&(n+=" "),n+=t);return n},dne=(e,...t)=>{let n,r,o,s;const i=u=>{const l=t.reduce((d,f)=>f(d),e());return n=ine(l),r=n.cache.get,o=n.cache.set,s=c,c(u)},c=u=>{const l=r(u);if(l)return l;const d=lne(u,n);return o(u,d),d};return s=i,(...u)=>s(une(...u))},fne=[],gt=e=>{const t=n=>n[e]||fne;return t.isThemeGetter=!0,t},D4=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,V4=/^\((?:(\w[\w-]*):)?(.+)\)$/i,pne=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,mne=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hne=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,gne=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,vne=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bne=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nr=e=>pne.test(e),Me=e=>!!e&&!Number.isNaN(Number(e)),$n=e=>!!e&&Number.isInteger(Number(e)),rf=e=>e.endsWith("%")&&Me(e.slice(0,-1)),Hn=e=>mne.test(e),z4=()=>!0,yne=e=>hne.test(e)&&!gne.test(e),Ym=()=>!1,wne=e=>vne.test(e),xne=e=>bne.test(e),Cne=e=>!fe(e)&&!me(e),kne=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),Ene=e=>Lr(e,H4,Ym),fe=e=>D4.test(e),Nr=e=>Lr(e,W4,yne),Tw=e=>Lr(e,Mne,Me),Sne=e=>Lr(e,U4,z4),$ne=e=>Lr(e,Z4,Ym),Iw=e=>Lr(e,F4,Ym),One=e=>Lr(e,B4,xne),Di=e=>Lr(e,G4,wne),me=e=>V4.test(e),us=e=>to(e,W4),Lne=e=>to(e,Z4),Aw=e=>to(e,F4),jne=e=>to(e,H4),Rne=e=>to(e,B4),Vi=e=>to(e,G4,!0),Pne=e=>to(e,U4,!0),Lr=(e,t,n)=>{const r=D4.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},to=(e,t,n=!1)=>{const r=V4.exec(e);return r?r[1]?t(r[1]):n:!1},F4=e=>e==="position"||e==="percentage",B4=e=>e==="image"||e==="url",H4=e=>e==="length"||e==="size"||e==="bg-size",W4=e=>e==="length",Mne=e=>e==="number",Z4=e=>e==="family-name",U4=e=>e==="number"||e==="weight",G4=e=>e==="shadow",Tne=()=>{const e=gt("color"),t=gt("font"),n=gt("text"),r=gt("font-weight"),o=gt("tracking"),s=gt("leading"),i=gt("breakpoint"),c=gt("container"),u=gt("spacing"),l=gt("radius"),d=gt("shadow"),f=gt("inset-shadow"),p=gt("text-shadow"),m=gt("drop-shadow"),g=gt("blur"),y=gt("perspective"),x=gt("aspect"),w=gt("ease"),b=gt("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...C(),me,fe],E=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto","contain","none"],S=()=>[me,fe,u],j=()=>[nr,"full","auto",...S()],R=()=>[$n,"none","subgrid",me,fe],T=()=>["auto",{span:["full",$n,me,fe]},$n,me,fe],A=()=>[$n,"auto",me,fe],L=()=>["auto","min","max","fr",me,fe],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],I=()=>["start","end","center","stretch","center-safe","end-safe"],_=()=>["auto",...S()],N=()=>[nr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],O=()=>[nr,"screen","full","dvw","lvw","svw","min","max","fit",...S()],z=()=>[nr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],M=()=>[e,me,fe],q=()=>[...C(),Aw,Iw,{position:[me,fe]}],ee=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",jne,Ene,{size:[me,fe]}],ue=()=>[rf,us,Nr],se=()=>["","none","full",l,me,fe],ne=()=>["",Me,us,Nr],re=()=>["solid","dashed","dotted","double"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[Me,rf,Aw,Iw],pe=()=>["","none",g,me,fe],P=()=>["none",Me,me,fe],K=()=>["none",Me,me,fe],B=()=>[Me,me,fe],ve=()=>[nr,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Hn],breakpoint:[Hn],color:[z4],container:[Hn],"drop-shadow":[Hn],ease:["in","out","in-out"],font:[Cne],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Hn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Hn],shadow:[Hn],spacing:["px",Me],text:[Hn],"text-shadow":[Hn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",nr,fe,me,x]}],container:["container"],"container-type":[{"@container":["","normal","size",me,fe]}],"container-named":[kne],columns:[{columns:[Me,fe,me,c]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{"inset-s":j(),start:j()}],end:[{"inset-e":j(),end:j()}],"inset-bs":[{"inset-bs":j()}],"inset-be":[{"inset-be":j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[$n,"auto",me,fe]}],basis:[{basis:[nr,"full","auto",c,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Me,nr,"auto","initial","none",fe]}],grow:[{grow:["",Me,me,fe]}],shrink:[{shrink:["",Me,me,fe]}],order:[{order:[$n,"first","last","none",me,fe]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:T()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:T()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...I(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...I(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:_()}],mx:[{mx:_()}],my:[{my:_()}],ms:[{ms:_()}],me:[{me:_()}],mbs:[{mbs:_()}],mbe:[{mbe:_()}],mt:[{mt:_()}],mr:[{mr:_()}],mb:[{mb:_()}],ml:[{ml:_()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:N()}],"inline-size":[{inline:["auto",...O()]}],"min-inline-size":[{"min-inline":["auto",...O()]}],"max-inline-size":[{"max-inline":["none",...O()]}],"block-size":[{block:["auto",...z()]}],"min-block-size":[{"min-block":["auto",...z()]}],"max-block-size":[{"max-block":["none",...z()]}],w:[{w:[c,"screen",...N()]}],"min-w":[{"min-w":[c,"screen","none",...N()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...N()]}],h:[{h:["screen","lh",...N()]}],"min-h":[{"min-h":["screen","lh","none",...N()]}],"max-h":[{"max-h":["screen","lh",...N()]}],"font-size":[{text:["base",n,us,Nr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Pne,Sne]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",rf,fe]}],"font-family":[{font:[Lne,$ne,t]}],"font-features":[{"font-features":[fe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,me,fe]}],"line-clamp":[{"line-clamp":[Me,"none",me,Tw]}],leading:[{leading:[s,...S()]}],"list-image":[{"list-image":["none",me,fe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",me,fe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[Me,"from-font","auto",me,Nr]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[Me,"auto",me,fe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"tab-size":[{tab:[$n,me,fe]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me,fe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",me,fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:q()}],"bg-repeat":[{bg:ee()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},$n,me,fe],radial:["",me,fe],conic:[$n,me,fe]},Rne,One]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:se()}],"rounded-s":[{"rounded-s":se()}],"rounded-e":[{"rounded-e":se()}],"rounded-t":[{"rounded-t":se()}],"rounded-r":[{"rounded-r":se()}],"rounded-b":[{"rounded-b":se()}],"rounded-l":[{"rounded-l":se()}],"rounded-ss":[{"rounded-ss":se()}],"rounded-se":[{"rounded-se":se()}],"rounded-ee":[{"rounded-ee":se()}],"rounded-es":[{"rounded-es":se()}],"rounded-tl":[{"rounded-tl":se()}],"rounded-tr":[{"rounded-tr":se()}],"rounded-br":[{"rounded-br":se()}],"rounded-bl":[{"rounded-bl":se()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-bs":[{"border-bs":ne()}],"border-w-be":[{"border-be":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Me,me,fe]}],"outline-w":[{outline:["",Me,us,Nr]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",d,Vi,Di]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",f,Vi,Di]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[Me,Nr]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",p,Vi,Di]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[Me,me,fe]}],"mix-blend":[{"mix-blend":[...ie(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ie()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Me]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[me,fe]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[Me]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:q()}],"mask-repeat":[{mask:ee()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",me,fe]}],filter:[{filter:["","none",me,fe]}],blur:[{blur:pe()}],brightness:[{brightness:[Me,me,fe]}],contrast:[{contrast:[Me,me,fe]}],"drop-shadow":[{"drop-shadow":["","none",m,Vi,Di]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",Me,me,fe]}],"hue-rotate":[{"hue-rotate":[Me,me,fe]}],invert:[{invert:["",Me,me,fe]}],saturate:[{saturate:[Me,me,fe]}],sepia:[{sepia:["",Me,me,fe]}],"backdrop-filter":[{"backdrop-filter":["","none",me,fe]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[Me,me,fe]}],"backdrop-contrast":[{"backdrop-contrast":[Me,me,fe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Me,me,fe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Me,me,fe]}],"backdrop-invert":[{"backdrop-invert":["",Me,me,fe]}],"backdrop-opacity":[{"backdrop-opacity":[Me,me,fe]}],"backdrop-saturate":[{"backdrop-saturate":[Me,me,fe]}],"backdrop-sepia":[{"backdrop-sepia":["",Me,me,fe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",me,fe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Me,"initial",me,fe]}],ease:[{ease:["linear","initial",w,me,fe]}],delay:[{delay:[Me,me,fe]}],animate:[{animate:["none",b,me,fe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,me,fe]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:P()}],"rotate-x":[{"rotate-x":P()}],"rotate-y":[{"rotate-y":P()}],"rotate-z":[{"rotate-z":P()}],scale:[{scale:K()}],"scale-x":[{"scale-x":K()}],"scale-y":[{"scale-y":K()}],"scale-z":[{"scale-z":K()}],"scale-3d":["scale-3d"],skew:[{skew:B()}],"skew-x":[{"skew-x":B()}],"skew-y":[{"skew-y":B()}],transform:[{transform:[me,fe,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ve()}],"translate-x":[{"translate-x":ve()}],"translate-y":[{"translate-y":ve()}],"translate-z":[{"translate-z":ve()}],"translate-none":["translate-none"],zoom:[{zoom:[$n,me,fe]}],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",me,fe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":M()}],"scrollbar-track-color":[{"scrollbar-track":M()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",me,fe]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[Me,us,Nr,Tw]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ine=dne(Tne);function ut(...e){return Ine(T4(e))}function Ec(){return typeof window<"u"}function Yo(e){return qm(e)?(e.nodeName||"").toLowerCase():"#document"}function Ot(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zn(e){var t;return(t=(qm(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function qm(e){return Ec()?e instanceof Node||e instanceof Ot(e).Node:!1}function Ve(e){return Ec()?e instanceof Element||e instanceof Ot(e).Element:!1}function sn(e){return Ec()?e instanceof HTMLElement||e instanceof Ot(e).HTMLElement:!1}function wp(e){return!Ec()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ot(e).ShadowRoot}function ui(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=on(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Ane(e){return/^(table|td|th)$/.test(Yo(e))}function Sc(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const _ne=/transform|translate|scale|rotate|perspective|filter/,Nne=/paint|layout|strict|content/,Dr=e=>!!e&&e!=="none";let of;function Xm(e){const t=Ve(e)?on(e):e;return Dr(t.transform)||Dr(t.translate)||Dr(t.scale)||Dr(t.rotate)||Dr(t.perspective)||!$c()&&(Dr(t.backdropFilter)||Dr(t.filter))||_ne.test(t.willChange||"")||Nne.test(t.contain||"")}function Dne(e){let t=Yn(e);for(;sn(t)&&!Un(t);){if(Xm(t))return t;if(Sc(t))return null;t=Yn(t)}return null}function $c(){return of==null&&(of=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),of}function Un(e){return/^(html|body|#document)$/.test(Yo(e))}function on(e){return Ot(e).getComputedStyle(e)}function Oc(e){return Ve(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yn(e){if(Yo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wp(e)&&e.host||zn(e);return wp(t)?t.host:t}function K4(e){const t=Yn(e);return Un(t)?e.ownerDocument?e.ownerDocument.body:e.body:sn(t)&&ui(t)?t:K4(t)}function hr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=K4(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Ot(o);if(s){const c=xp(i);return t.concat(i,i.visualViewport||[],ui(o)?o:[],c&&n?hr(c):[])}else return t.concat(o,hr(o,[],n))}function xp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const sf=Qa[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Vne=sf&&sf!==a.useLayoutEffect?sf:e=>e();function Ae(e){const t=Xn(zne).current;return t.next=e,Vne(t.effect),t.trampoline}function zne(){const e={next:void 0,callback:Fne,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Fne(){}const Bne=()=>{},He=typeof document<"u"?a.useLayoutEffect:Bne,Y4=a.createContext(void 0);function Lc(e){const t=a.useContext(Y4);if(t===void 0&&!e)throw new Error(Ko(72));return t}const Hne=[];function q4(e){a.useEffect(e,Hne)}const ds=0;class qo{static create(){return new qo}currentId=ds;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=ds,n()},t)}isStarted(){return this.currentId!==ds}clear=()=>{this.currentId!==ds&&(clearTimeout(this.currentId),this.currentId=ds)};disposeEffect=()=>this.clear}function _o(){const e=Xn(qo.create).current;return q4(e.disposeEffect),e}function Zr(e){const t=Xn(Wne,e).current;return t.next=e,He(t.effect),t}function Wne(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const di=typeof navigator<"u",af=qne(),Zne=Jne(),Une=Xne();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none");af.platform==="MacIntel"&&af.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(af.platform);const Gne=di&&/apple/i.test(navigator.vendor),Kne=di&&Zne.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,Yne=Une.includes("jsdom/");function qne(){if(!di)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function Xne(){if(!di)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Jne(){if(!di)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const Qne="data-base-ui-focusable",X4="active",J4="selected",Q4="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function _w(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function At(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&wp(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Rn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function wn(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 ere(e){return e.matches("html,body")}function Yr(e){return e?.ownerDocument||document}function tre(e){return sn(e)&&e.matches(Q4)}function nre(e){if(!e||Yne)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Ts(e,t,n=!0){return e.filter(o=>o.parentId===t&&(!n||o.context?.open)).flatMap(o=>[o,...Ts(e,o.id,n)])}function rre(e){return"nativeEvent"in e}function Xs(e,t){const n=["mouse","pen"];return n.push("",void 0),n.includes(e)}function ore(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const sre=["top","right","bottom","left"],No=Math.min,Xt=Math.max,Do=Math.round,zi=Math.floor,In=e=>({x:e,y:e}),ire={left:"right",right:"left",bottom:"top",top:"bottom"};function Cp(e,t,n){return Xt(e,No(t,n))}function qn(e,t){return typeof e=="function"?e(t):e}function Zt(e){return e.split("-")[0]}function jr(e){return e.split("-")[1]}function Jm(e){return e==="x"?"y":"x"}function Qm(e){return e==="y"?"height":"width"}function un(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function eh(e){return Jm(un(e))}function are(e,t,n){n===void 0&&(n=!1);const r=jr(e),o=eh(e),s=Qm(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Za(i)),[i,Za(i)]}function cre(e){const t=Za(e);return[kp(e),t,kp(t)]}function kp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Nw=["left","right"],Dw=["right","left"],lre=["top","bottom"],ure=["bottom","top"];function dre(e,t,n){switch(e){case"top":case"bottom":return n?t?Dw:Nw:t?Nw:Dw;case"left":case"right":return t?lre:ure;default:return[]}}function fre(e,t,n,r){const o=jr(e);let s=dre(Zt(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(kp)))),s}function Za(e){const t=Zt(e);return ire[t]+e.slice(t.length)}function pre(e){return{top:0,right:0,bottom:0,left:0,...e}}function eS(e){return typeof e!="number"?pre(e):{top:e,right:e,bottom:e,left:e}}function Ua(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}const mre={...Qa};let Vw=0;function hre(e,t="mui"){const[n,r]=a.useState(e),o=e||n;return a.useEffect(()=>{n==null&&(Vw+=1,r(`${t}-${Vw}`))},[n,t]),o}const zw=mre.useId;function jc(e,t){if(zw!==void 0){const n=zw();return e??(t?`${t}-${n}`:n)}return hre(e,t)}function gre(){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)}}}const vre=a.createContext(null),bre=a.createContext(null),th=()=>a.useContext(vre)?.id||null,Rc=e=>{const t=a.useContext(bre);return e??t},nh="none",Ga="trigger-press",Zn="trigger-hover",Ep="trigger-focus",yre="outside-press",rh="escape-key",wre="disabled",xre="imperative-action";function xt(e,t,n,r){let o=!1,s=!1;const i=Qt;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){s=!0},get isCanceled(){return o},get isPropagationAllowed(){return s},trigger:n,...i}}function Pc(e){return`data-base-ui-${e}`}function aa(e,t,n){if(n&&!Xs(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]}const tS=a.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new qo,currentIdRef:{current:null},currentContextRef:{current:null}});function Cre(e){const{children:t,delay:n,timeoutMs:r=0}=e,o=a.useRef(n),s=a.useRef(n),i=a.useRef(null),c=a.useRef(null),u=_o();return h.jsx(tS.Provider,{value:a.useMemo(()=>({hasProvider:!0,delayRef:o,initialDelayRef:s,currentIdRef:i,timeoutMs:r,currentContextRef:c,timeout:u}),[r,u]),children:t})}function kre(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{enabled:o=!0,open:s}=t,i=a.useContext(tS),{currentIdRef:c,delayRef:u,timeoutMs:l,initialDelayRef:d,currentContextRef:f,hasProvider:p,timeout:m}=i,[g,y]=a.useState(!1);return He(()=>{function x(){y(!1),f.current?.setIsInstantPhase(!1),c.current=null,f.current=null,u.current=d.current}if(o&&c.current&&!s&&c.current===r){if(y(!1),l)return m.start(l,x),()=>{m.clear()};x()}},[o,s,r,c,u,l,d,f,m]),He(()=>{if(!o||!s)return;const x=f.current,w=c.current;f.current={onOpenChange:n.setOpen,setIsInstantPhase:y},c.current=r,u.current={open:0,close:aa(d.current,"close")},w!==null&&w!==r?(m.clear(),y(!0),x?.setIsInstantPhase(!0),x?.onOpenChange(!1,xt(nh))):(y(!1),x?.setIsInstantPhase(!1))},[o,s,r,n,c,u,l,d,f,m]),He(()=>()=>{f.current=null},[f]),a.useMemo(()=>({hasProvider:p,delayRef:u,isInstantPhase:g}),[p,u,g])}const Fi=null;class Ere{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 o=0;o<n.length;o+=1)n[o]?.(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 Bi=new Ere;class Wn{static create(){return new Wn}static request(t){return Bi.request(t)}static cancel(t){return Bi.cancel(t)}currentId=Fi;request(t){this.cancel(),this.currentId=Bi.request(()=>{this.currentId=Fi,t()})}cancel=()=>{this.currentId!==Fi&&(Bi.cancel(this.currentId),this.currentId=Fi)};disposeEffect=()=>this.cancel}function nS(){const e=Xn(Wn.create).current;return q4(e.disposeEffect),e}function rS(e){return e?.ownerDocument||document}const Sre=a.createContext(null),$re=()=>a.useContext(Sre),Ore=Pc("portal");function Lre(e={}){const{ref:t,container:n,componentProps:r=Qt,elementProps:o,elementState:s}=e,i=jc(),u=$re()?.portalNode,[l,d]=a.useState(null),[f,p]=a.useState(null),m=a.useRef(null);He(()=>{if(n===null){m.current&&(m.current=null,p(null),d(null));return}if(i==null)return;const x=(n&&(qm(n)?n:n.current))??u??document.body;if(x==null){m.current&&(m.current=null,p(null),d(null));return}m.current!==x&&(m.current=x,p(null),d(x))},[n,u,i]);const g=li("div",r,{ref:[t,p],state:s,props:[{id:i,[Ore]:""},o]});return{portalNode:f,portalSubtree:l&&g?Lt.createPortal(g,l):null}}function jre(e){return e==null?e:"current"in e?e.current:e}function Rre(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){const s=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},i=t.axis==="x"||t.axis==="both",c=t.axis==="y"||t.axis==="both",u=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let l=s.width,d=s.height,f=s.x,p=s.y;return n==null&&t.x&&i&&(n=s.x-t.x),r==null&&t.y&&c&&(r=s.y-t.y),f-=n||0,p-=r||0,l=0,d=0,!o||u?(l=t.axis==="y"?s.width:0,d=t.axis==="x"?s.height:0,f=i&&t.x!=null?t.x:f,p=c&&t.y!=null?t.y:p):o&&!u&&(d=t.axis==="x"?s.height:d,l=t.axis==="y"?s.width:l),o=!0,{width:l,height:d,x:f,y:p,top:p,right:f+l,bottom:p+d,left:f}}}}function Fw(e){return e!=null&&e.clientX!=null}function Pre(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),s=n.useState("domReferenceElement"),i=n.context.dataRef,{enabled:c=!0,axis:u="both",x:l=null,y:d=null}=t,f=a.useRef(!1),p=a.useRef(null),[m,g]=a.useState(),[y,x]=a.useState([]),w=Ae((E,$)=>{f.current||i.current.openEvent&&!Fw(i.current.openEvent)||n.set("positionReference",Rre(s,{x:E,y:$,axis:u,dataRef:i,pointerType:m}))}),b=Ae(E=>{l!=null||d!=null||(r?p.current||x([]):w(E.clientX,E.clientY))}),v=Xs(m)?o:r,C=a.useCallback(()=>{if(!v||!c||l!=null||d!=null)return;const E=Ot(o);function $(S){const j=Rn(S);At(o,j)?(E.removeEventListener("mousemove",$),p.current=null):w(S.clientX,S.clientY)}if(!i.current.openEvent||Fw(i.current.openEvent)){E.addEventListener("mousemove",$);const S=()=>{E.removeEventListener("mousemove",$),p.current=null};return p.current=S,S}n.set("positionReference",s)},[v,c,l,d,o,i,s,n,w]);a.useEffect(()=>C(),[C,y]),a.useEffect(()=>{c&&!o&&(f.current=!1)},[c,o]),a.useEffect(()=>{!c&&r&&(f.current=!0)},[c,r]),He(()=>{c&&(l!=null||d!=null)&&(f.current=!1,w(l,d))},[c,l,d,w]);const k=a.useMemo(()=>{function E($){g($.pointerType)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:b,onMouseEnter:b}},[b]);return a.useMemo(()=>c?{reference:k}:{},[c,k])}function Bw(e,t,n){let{reference:r,floating:o}=e;const s=un(t),i=eh(t),c=Qm(i),u=Zt(t),l=s==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[c]/2-o[c]/2;let m;switch(u){case"top":m={x:d,y:r.y-o.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-o.width,y:f};break;default:m={x:r.x,y:r.y}}switch(jr(t)){case"start":m[i]-=p*(n&&l?-1:1);break;case"end":m[i]+=p*(n&&l?-1:1);break}return m}async function Mre(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:c,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=qn(t,e),g=eS(m),x=c[p?f==="floating"?"reference":"floating":f],w=Ua(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:l,rootBoundary:d,strategy:u})),b=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),C=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},k=Ua(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:b,offsetParent:v,strategy:u}):b);return{top:(w.top-k.top+g.top)/C.y,bottom:(k.bottom-w.bottom+g.bottom)/C.y,left:(w.left-k.left+g.left)/C.x,right:(k.right-w.right+g.right)/C.x}}const Tre=50,Ire=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,c=i.detectOverflow?i:{...i,detectOverflow:Mre},u=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=Bw(l,r,u),p=r,m=0;const g={};for(let y=0;y<s.length;y++){const x=s[y];if(!x)continue;const{name:w,fn:b}=x,{x:v,y:C,data:k,reset:E}=await b({x:d,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:g,rects:l,platform:c,elements:{reference:e,floating:t}});d=v??d,f=C??f,g[w]={...g[w],...k},E&&m<Tre&&(m++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(l=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:d,y:f}=Bw(l,p,u)),y=-1)}return{x:d,y:f,placement:p,strategy:o,middlewareData:g}},Are=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:c,platform:u,elements:l}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...x}=qn(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=Zt(o),b=un(c),v=Zt(c)===c,C=await(u.isRTL==null?void 0:u.isRTL(l.floating)),k=p||(v||!y?[Za(c)]:cre(c)),E=g!=="none";!p&&E&&k.push(...fre(c,y,g,C));const $=[c,...k],S=await u.detectOverflow(t,x),j=[];let R=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&j.push(S[w]),f){const V=are(o,i,C);j.push(S[V[0]],S[V[1]])}if(R=[...R,{placement:o,overflows:j}],!j.every(V=>V<=0)){var T,A;const V=(((T=s.flip)==null?void 0:T.index)||0)+1,I=$[V];if(I&&(!(f==="alignment"?b!==un(I):!1)||R.every(O=>un(O.placement)===b?O.overflows[0]>0:!0)))return{data:{index:V,overflows:R},reset:{placement:I}};let _=(A=R.filter(N=>N.overflows[0]<=0).sort((N,O)=>N.overflows[1]-O.overflows[1])[0])==null?void 0:A.placement;if(!_)switch(m){case"bestFit":{var L;const N=(L=R.filter(O=>{if(E){const z=un(O.placement);return z===b||z==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(z=>z>0).reduce((z,M)=>z+M,0)]).sort((O,z)=>O[1]-z[1])[0])==null?void 0:L[0];N&&(_=N);break}case"initialPlacement":_=c;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function Hw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ww(e){return sre.some(t=>e[t]>=0)}const _re=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=qn(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),c=Hw(i,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Ww(c)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),c=Hw(i,n.floating);return{data:{escapedOffsets:c,escaped:Ww(c)}}}default:return{}}}}},oS=new Set(["left","top"]);async function Nre(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Zt(n),c=jr(n),u=un(n)==="y",l=oS.has(i)?-1:1,d=s&&u?-1:1,f=qn(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof g=="number"&&(m=c==="end"?g*-1:g),u?{x:m*d,y:p*l}:{x:p*l,y:m*d}}const Dre=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:c}=t,u=await Nre(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:s+u.y,data:{...u,placement:i}}}}},Vre=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:c=!1,limiter:u={fn:w=>{let{x:b,y:v}=w;return{x:b,y:v}}},...l}=qn(e,t),d={x:n,y:r},f=await s.detectOverflow(t,l),p=un(Zt(o)),m=Jm(p);let g=d[m],y=d[p];if(i){const w=m==="y"?"top":"left",b=m==="y"?"bottom":"right",v=g+f[w],C=g-f[b];g=Cp(v,g,C)}if(c){const w=p==="y"?"top":"left",b=p==="y"?"bottom":"right",v=y+f[w],C=y-f[b];y=Cp(v,y,C)}const x=u.fn({...t,[m]:g,[p]:y});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[m]:i,[p]:c}}}}}},zre=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:u=!0,crossAxis:l=!0}=qn(e,t),d={x:n,y:r},f=un(o),p=Jm(f);let m=d[p],g=d[f];const y=qn(c,t),x=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(u){const v=p==="y"?"height":"width",C=s.reference[p]-s.floating[v]+x.mainAxis,k=s.reference[p]+s.reference[v]-x.mainAxis;m<C?m=C:m>k&&(m=k)}if(l){var w,b;const v=p==="y"?"width":"height",C=oS.has(Zt(o)),k=s.reference[f]-s.floating[v]+(C&&((w=i.offset)==null?void 0:w[f])||0)+(C?0:x.crossAxis),E=s.reference[f]+s.reference[v]+(C?0:((b=i.offset)==null?void 0:b[f])||0)-(C?x.crossAxis:0);g<k?g=k:g>E&&(g=E)}return{[p]:m,[f]:g}}}},Fre=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:c}=t,{apply:u=()=>{},...l}=qn(e,t),d=await i.detectOverflow(t,l),f=Zt(o),p=jr(o),m=un(o)==="y",{width:g,height:y}=s.floating;let x,w;f==="top"||f==="bottom"?(x=f,w=p===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(w=f,x=p==="end"?"top":"bottom");const b=y-d.top-d.bottom,v=g-d.left-d.right,C=No(y-d[x],b),k=No(g-d[w],v),E=!t.middlewareData.shift;let $=C,S=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=v),(r=t.middlewareData.shift)!=null&&r.enabled.y&&($=b),E&&!p){const R=Xt(d.left,0),T=Xt(d.right,0),A=Xt(d.top,0),L=Xt(d.bottom,0);m?S=g-2*(R!==0||T!==0?R+T:Xt(d.left,d.right)):$=y-2*(A!==0||L!==0?A+L:Xt(d.top,d.bottom))}await u({...t,availableWidth:S,availableHeight:$});const j=await i.getDimensions(c.floating);return g!==j.width||y!==j.height?{reset:{rects:!0}}:{}}}};function sS(e){const t=on(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=sn(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,c=Do(n)!==s||Do(r)!==i;return c&&(n=s,r=i),{width:n,height:r,$:c}}function oh(e){return Ve(e)?e:e.contextElement}function So(e){const t=oh(e);if(!sn(t))return In(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=sS(t);let i=(s?Do(n.width):n.width)/r,c=(s?Do(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const Bre=In(0);function iS(e){const t=Ot(e);return!$c()||!t.visualViewport?Bre:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Hre(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ot(e)?!1:t}function qr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=oh(e);let i=In(1);t&&(r?Ve(r)&&(i=So(r)):i=So(e));const c=Hre(s,n,r)?iS(s):In(0);let u=(o.left+c.x)/i.x,l=(o.top+c.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const p=Ot(s),m=r&&Ve(r)?Ot(r):r;let g=p,y=xp(g);for(;y&&r&&m!==g;){const x=So(y),w=y.getBoundingClientRect(),b=on(y),v=w.left+(y.clientLeft+parseFloat(b.paddingLeft))*x.x,C=w.top+(y.clientTop+parseFloat(b.paddingTop))*x.y;u*=x.x,l*=x.y,d*=x.x,f*=x.y,u+=v,l+=C,g=Ot(y),y=xp(g)}}return Ua({width:d,height:f,x:u,y:l})}function Mc(e,t){const n=Oc(e).scrollLeft;return t?t.left+n:qr(zn(e)).left+n}function aS(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Mc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Wre(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=zn(r),c=t?Sc(t.floating):!1;if(r===i||c&&s)return n;let u={scrollLeft:0,scrollTop:0},l=In(1);const d=In(0),f=sn(r);if((f||!f&&!s)&&((Yo(r)!=="body"||ui(i))&&(u=Oc(r)),f)){const m=qr(r);l=So(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const p=i&&!f&&!s?aS(i,u):In(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+d.x+p.x,y:n.y*l.y-u.scrollTop*l.y+d.y+p.y}}function Zre(e){return Array.from(e.getClientRects())}function Ure(e){const t=zn(e),n=Oc(e),r=e.ownerDocument.body,o=Xt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Xt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Mc(e);const c=-n.scrollTop;return on(r).direction==="rtl"&&(i+=Xt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:c}}const Zw=25;function Gre(e,t){const n=Ot(e),r=zn(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,c=0,u=0;if(o){s=o.width,i=o.height;const d=$c();(!d||d&&t==="fixed")&&(c=o.offsetLeft,u=o.offsetTop)}const l=Mc(r);if(l<=0){const d=r.ownerDocument,f=d.body,p=getComputedStyle(f),m=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(r.clientWidth-f.clientWidth-m);g<=Zw&&(s-=g)}else l<=Zw&&(s+=l);return{width:s,height:i,x:c,y:u}}function Kre(e,t){const n=qr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=sn(e)?So(e):In(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,u=o*s.x,l=r*s.y;return{width:i,height:c,x:u,y:l}}function Uw(e,t,n){let r;if(t==="viewport")r=Gre(e,n);else if(t==="document")r=Ure(zn(e));else if(Ve(t))r=Kre(t,n);else{const o=iS(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ua(r)}function cS(e,t){const n=Yn(e);return n===t||!Ve(n)||Un(n)?!1:on(n).position==="fixed"||cS(n,t)}function Yre(e,t){const n=t.get(e);if(n)return n;let r=hr(e,[],!1).filter(c=>Ve(c)&&Yo(c)!=="body"),o=null;const s=on(e).position==="fixed";let i=s?Yn(e):e;for(;Ve(i)&&!Un(i);){const c=on(i),u=Xm(i);!u&&c.position==="fixed"&&(o=null),(s?!u&&!o:!u&&c.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||ui(i)&&!u&&cS(e,i))?r=r.filter(d=>d!==i):o=c,i=Yn(i)}return t.set(e,r),r}function qre(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Sc(t)?[]:Yre(t,this._c):[].concat(n),r],c=Uw(t,i[0],o);let u=c.top,l=c.right,d=c.bottom,f=c.left;for(let p=1;p<i.length;p++){const m=Uw(t,i[p],o);u=Xt(m.top,u),l=No(m.right,l),d=No(m.bottom,d),f=Xt(m.left,f)}return{width:l-f,height:d-u,x:f,y:u}}function Xre(e){const{width:t,height:n}=sS(e);return{width:t,height:n}}function Jre(e,t,n){const r=sn(t),o=zn(t),s=n==="fixed",i=qr(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const u=In(0);function l(){u.x=Mc(o)}if(r||!r&&!s)if((Yo(t)!=="body"||ui(o))&&(c=Oc(t)),r){const m=qr(t,!0,s,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else o&&l();s&&!r&&o&&l();const d=o&&!r&&!s?aS(o,c):In(0),f=i.left+c.scrollLeft-u.x-d.x,p=i.top+c.scrollTop-u.y-d.y;return{x:f,y:p,width:i.width,height:i.height}}function cf(e){return on(e).position==="static"}function Gw(e,t){if(!sn(e)||on(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return zn(e)===n&&(n=n.ownerDocument.body),n}function lS(e,t){const n=Ot(e);if(Sc(e))return n;if(!sn(e)){let o=Yn(e);for(;o&&!Un(o);){if(Ve(o)&&!cf(o))return o;o=Yn(o)}return n}let r=Gw(e,t);for(;r&&Ane(r)&&cf(r);)r=Gw(r,t);return r&&Un(r)&&cf(r)&&!Xm(r)?n:r||Dne(e)||n}const Qre=async function(e){const t=this.getOffsetParent||lS,n=this.getDimensions,r=await n(e.floating);return{reference:Jre(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function eoe(e){return on(e).direction==="rtl"}const toe={convertOffsetParentRelativeRectToViewportRelativeRect:Wre,getDocumentElement:zn,getClippingRect:qre,getOffsetParent:lS,getElementRects:Qre,getClientRects:Zre,getDimensions:Xre,getScale:So,isElement:Ve,isRTL:eoe};function uS(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function noe(e,t){let n=null,r;const o=zn(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),s();const l=e.getBoundingClientRect(),{left:d,top:f,width:p,height:m}=l;if(c||t(),!p||!m)return;const g=zi(f),y=zi(o.clientWidth-(d+p)),x=zi(o.clientHeight-(f+m)),w=zi(d),v={rootMargin:-g+"px "+-y+"px "+-x+"px "+-w+"px",threshold:Xt(0,No(1,u))||1};let C=!0;function k(E){const $=E[0].intersectionRatio;if($!==u){if(!C)return i();$?i(!1,$):r=setTimeout(()=>{i(!1,1e-7)},1e3)}$===1&&!uS(l,e.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(k,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,v)}n.observe(e)}return i(!0),s}function Kw(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=oh(e),d=o||s?[...l?hr(l):[],...t?hr(t):[]]:[];d.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const f=l&&c?noe(l,n):null;let p=-1,m=null;i&&(m=new ResizeObserver(w=>{let[b]=w;b&&b.target===l&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var v;(v=m)==null||v.observe(t)})),n()}),l&&!u&&m.observe(l),t&&m.observe(t));let g,y=u?qr(e):null;u&&x();function x(){const w=qr(e);y&&!uS(y,w)&&n(),y=w,g=requestAnimationFrame(x)}return n(),()=>{var w;d.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),f?.(),(w=m)==null||w.disconnect(),m=null,u&&cancelAnimationFrame(g)}}const roe=Dre,ooe=Vre,soe=Are,ioe=Fre,aoe=_re,coe=zre,loe=(e,t,n)=>{const r=new Map,o={platform:toe,...n},s={...o.platform,_c:r};return Ire(e,t,{...o,platform:s})};var uoe=typeof document<"u",doe=function(){},ca=uoe?a.useLayoutEffect:doe;function Ka(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,o;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(!Ka(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Ka(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function dS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yw(e,t){const n=dS(e);return Math.round(t*n)/n}function lf(e){const t=a.useRef(e);return ca(()=>{t.current=e}),t}function foe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:u,open:l}=e,[d,f]=a.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=a.useState(r);Ka(p,r)||m(r);const[g,y]=a.useState(null),[x,w]=a.useState(null),b=a.useCallback(O=>{O!==E.current&&(E.current=O,y(O))},[]),v=a.useCallback(O=>{O!==$.current&&($.current=O,w(O))},[]),C=s||g,k=i||x,E=a.useRef(null),$=a.useRef(null),S=a.useRef(d),j=u!=null,R=lf(u),T=lf(o),A=lf(l),L=a.useCallback(()=>{if(!E.current||!$.current)return;const O={placement:t,strategy:n,middleware:p};T.current&&(O.platform=T.current),loe(E.current,$.current,O).then(z=>{const M={...z,isPositioned:A.current!==!1};V.current&&!Ka(S.current,M)&&(S.current=M,Lt.flushSync(()=>{f(M)}))})},[p,t,n,T,A]);ca(()=>{l===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,f(O=>({...O,isPositioned:!1})))},[l]);const V=a.useRef(!1);ca(()=>(V.current=!0,()=>{V.current=!1}),[]),ca(()=>{if(C&&(E.current=C),k&&($.current=k),C&&k){if(R.current)return R.current(C,k,L);L()}},[C,k,L,R,j]);const I=a.useMemo(()=>({reference:E,floating:$,setReference:b,setFloating:v}),[b,v]),_=a.useMemo(()=>({reference:C,floating:k}),[C,k]),N=a.useMemo(()=>{const O={position:n,left:0,top:0};if(!_.floating)return O;const z=Yw(_.floating,d.x),M=Yw(_.floating,d.y);return c?{...O,transform:"translate("+z+"px, "+M+"px)",...dS(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:M}},[n,c,_.floating,d.x,d.y]);return a.useMemo(()=>({...d,update:L,refs:I,elements:_,floatingStyles:N}),[d,L,I,_,N])}const poe=(e,t)=>{const n=roe(e);return{name:n.name,fn:n.fn,options:[e,t]}},moe=(e,t)=>{const n=ooe(e);return{name:n.name,fn:n.fn,options:[e,t]}},hoe=(e,t)=>({fn:coe(e).fn,options:[e,t]}),goe=(e,t)=>{const n=soe(e);return{name:n.name,fn:n.fn,options:[e,t]}},voe=(e,t)=>{const n=ioe(e);return{name:n.name,fn:n.fn,options:[e,t]}},boe=(e,t)=>{const n=aoe(e);return{name:n.name,fn:n.fn,options:[e,t]}},yoe={intentional:"onClick",sloppy:"onPointerDown"};function woe(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function xoe(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),s=n.useState("referenceElement"),i=n.useState("domReferenceElement"),{onOpenChange:c,dataRef:u}=n.context,{enabled:l=!0,escapeKey:d=!0,outsidePress:f=!0,outsidePressEvent:p="sloppy",referencePress:m=!1,referencePressEvent:g="sloppy",ancestorScroll:y=!1,bubbles:x,externalTree:w}=t,b=Rc(w),v=Ae(typeof f=="function"?f:()=>!1),C=typeof f=="function"?v:f,k=a.useRef(!1),{escapeKey:E,outsidePress:$}=woe(x),S=a.useRef(null),j=_o(),R=_o(),T=Ae(()=>{R.clear(),u.current.insideReactTree=!1}),A=a.useRef(!1),L=a.useRef(""),V=Ae(P=>{L.current=P.pointerType}),I=Ae(()=>{const P=L.current,K=P==="pen"||!P?"mouse":P,B=typeof p=="function"?p():p;return typeof B=="string"?B:B[K]}),_=Ae(P=>{if(!r||!l||!d||P.key!=="Escape"||A.current)return;const K=u.current.floatingContext?.nodeId,B=b?Ts(b.nodesRef.current,K):[];if(!E&&B.length>0){let X=!0;if(B.forEach(te=>{te.context?.open&&!te.context.dataRef.current.__escapeKeyBubbles&&(X=!1)}),!X)return}const ve=rre(P)?P.nativeEvent:P,Q=xt(rh,ve);n.setOpen(!1,Q),!E&&!Q.isPropagationAllowed&&P.stopPropagation()}),N=Ae(P=>{const K=I();return K==="intentional"&&P.type!=="click"||K==="sloppy"&&P.type==="click"}),O=Ae(()=>{u.current.insideReactTree=!0,R.start(0,T)}),z=Ae((P,K=!1)=>{if(N(P)){T();return}if(u.current.insideReactTree){T();return}if(I()==="intentional"&&K||typeof C=="function"&&!C(P))return;const B=Rn(P),ve=`[${Pc("inert")}]`,Q=Yr(n.select("floatingElement")).querySelectorAll(ve),X=n.context.triggerElements;if(B&&(X.hasElement(B)||X.hasMatchingElement(W=>At(W,B))))return;let te=Ve(B)?B:null;for(;te&&!Un(te);){const W=Yn(te);if(Un(W)||!Ve(W))break;te=W}if(Q.length&&Ve(B)&&!ere(B)&&!At(B,n.select("floatingElement"))&&Array.from(Q).every(W=>!At(te,W)))return;if(sn(B)&&!("touches"in P)){const W=Un(B),le=on(B),J=/auto|scroll/,de=W||J.test(le.overflowX),Z=W||J.test(le.overflowY),ye=de&&B.clientWidth>0&&B.scrollWidth>B.clientWidth,Pe=Z&&B.clientHeight>0&&B.scrollHeight>B.clientHeight,Ee=le.direction==="rtl",Fe=Pe&&(Ee?P.offsetX<=B.offsetWidth-B.clientWidth:P.offsetX>B.clientWidth),nt=ye&&P.offsetY>B.clientHeight;if(Fe||nt)return}const ke=u.current.floatingContext?.nodeId,Ce=b&&Ts(b.nodesRef.current,ke).some(W=>wn(P,W.context?.elements.floating));if(wn(P,n.select("floatingElement"))||wn(P,n.select("domReferenceElement"))||Ce)return;const U=b?Ts(b.nodesRef.current,ke):[];if(U.length>0){let W=!0;if(U.forEach(le=>{le.context?.open&&!le.context.dataRef.current.__outsidePressBubbles&&(W=!1)}),!W)return}n.setOpen(!1,xt(yre,P)),T()}),M=Ae(P=>{I()!=="sloppy"||P.pointerType==="touch"||!n.select("open")||!l||wn(P,n.select("floatingElement"))||wn(P,n.select("domReferenceElement"))||z(P)}),q=Ae(P=>{if(I()!=="sloppy"||!n.select("open")||!l||wn(P,n.select("floatingElement"))||wn(P,n.select("domReferenceElement")))return;const K=P.touches[0];K&&(S.current={startTime:Date.now(),startX:K.clientX,startY:K.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},j.start(1e3,()=>{S.current&&(S.current.dismissOnTouchEnd=!1,S.current.dismissOnMouseDown=!1)}))}),ee=Ae(P=>{const K=Rn(P);function B(){q(P),K?.removeEventListener(P.type,B)}K?.addEventListener(P.type,B)}),G=Ae(P=>{const K=k.current;if(k.current=!1,j.clear(),P.type==="mousedown"&&S.current&&!S.current.dismissOnMouseDown)return;const B=Rn(P);function ve(){P.type==="pointerdown"?M(P):z(P,K),B?.removeEventListener(P.type,ve)}B?.addEventListener(P.type,ve)}),ue=Ae(P=>{if(I()!=="sloppy"||!S.current||wn(P,n.select("floatingElement"))||wn(P,n.select("domReferenceElement")))return;const K=P.touches[0];if(!K)return;const B=Math.abs(K.clientX-S.current.startX),ve=Math.abs(K.clientY-S.current.startY),Q=Math.sqrt(B*B+ve*ve);Q>5&&(S.current.dismissOnTouchEnd=!0),Q>10&&(z(P),j.clear(),S.current=null)}),se=Ae(P=>{const K=Rn(P);function B(){ue(P),K?.removeEventListener(P.type,B)}K?.addEventListener(P.type,B)}),ne=Ae(P=>{I()!=="sloppy"||!S.current||wn(P,n.select("floatingElement"))||wn(P,n.select("domReferenceElement"))||(S.current.dismissOnTouchEnd&&z(P),j.clear(),S.current=null)}),re=Ae(P=>{const K=Rn(P);function B(){ne(P),K?.removeEventListener(P.type,B)}K?.addEventListener(P.type,B)});a.useEffect(()=>{if(!r||!l)return;u.current.__escapeKeyBubbles=E,u.current.__outsidePressBubbles=$;const P=new qo;function K(te){n.setOpen(!1,xt(nh,te))}function B(){P.clear(),A.current=!0}function ve(){P.start($c()?5:0,()=>{A.current=!1})}const Q=Yr(o);Q.addEventListener("pointerdown",V,!0),d&&(Q.addEventListener("keydown",_),Q.addEventListener("compositionstart",B),Q.addEventListener("compositionend",ve)),C&&(Q.addEventListener("click",G,!0),Q.addEventListener("pointerdown",G,!0),Q.addEventListener("touchstart",ee,!0),Q.addEventListener("touchmove",se,!0),Q.addEventListener("touchend",re,!0),Q.addEventListener("mousedown",G,!0));let X=[];return y&&(Ve(i)&&(X=hr(i)),Ve(o)&&(X=X.concat(hr(o))),!Ve(s)&&s&&s.contextElement&&(X=X.concat(hr(s.contextElement)))),X=X.filter(te=>te!==Q.defaultView?.visualViewport),X.forEach(te=>{te.addEventListener("scroll",K,{passive:!0})}),()=>{Q.removeEventListener("pointerdown",V,!0),d&&(Q.removeEventListener("keydown",_),Q.removeEventListener("compositionstart",B),Q.removeEventListener("compositionend",ve)),C&&(Q.removeEventListener("click",G,!0),Q.removeEventListener("pointerdown",G,!0),Q.removeEventListener("touchstart",ee,!0),Q.removeEventListener("touchmove",se,!0),Q.removeEventListener("touchend",re,!0),Q.removeEventListener("mousedown",G,!0)),X.forEach(te=>{te.removeEventListener("scroll",K)}),P.clear()}},[u,o,s,i,d,C,r,c,y,l,E,$,_,z,G,M,ee,se,re,V,n]),a.useEffect(T,[C,T]);const ie=a.useMemo(()=>({onKeyDown:_,...m&&{[yoe[g]]:P=>{n.setOpen(!1,xt(Ga,P.nativeEvent))},...g!=="intentional"&&{onClick(P){n.setOpen(!1,xt(Ga,P.nativeEvent))}}}}),[_,n,m,g]),ae=Ae(P=>{const K=Rn(P.nativeEvent);!At(n.select("floatingElement"),K)||P.button!==0||(k.current=!0)}),pe=a.useMemo(()=>({onKeyDown:_,onPointerDown:ae,onMouseDown:ae,onMouseUp:ae,onClickCapture:O,onMouseDownCapture:O,onPointerDownCapture:O,onMouseUpCapture:O,onTouchEndCapture:O,onTouchMoveCapture:O}),[_,ae,O]);return a.useMemo(()=>l?{reference:ie,floating:pe,trigger:ie}:{},[l,ie,pe])}var Ya=Symbol("NOT_FOUND");function Coe(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function koe(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Eoe(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var qw=e=>Array.isArray(e)?e:[e];function Soe(e){const t=Array.isArray(e[0])?e[0]:e;return Eoe(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function $oe(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}function Ooe(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Ya},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function Loe(e,t){let n=[];function r(c){const u=n.findIndex(l=>t(c,l.key));if(u>-1){const l=n[u];return u>0&&(n.splice(u,1),n.unshift(l)),l.value}return Ya}function o(c,u){r(c)===Ya&&(n.unshift({key:c,value:u}),n.length>e&&n.pop())}function s(){return n}function i(){n=[]}return{get:r,put:o,getEntries:s,clear:i}}var joe=(e,t)=>e===t;function Roe(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let s=0;s<o;s++)if(!e(n[s],r[s]))return!1;return!0}}function Poe(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=joe,maxSize:o=1,resultEqualityCheck:s}=n,i=Roe(r);let c=0;const u=o<=1?Ooe(i):Loe(o,i);function l(){let d=u.get(arguments);if(d===Ya){if(d=e.apply(null,arguments),c++,s){const p=u.getEntries().find(m=>s(m.value,d));p&&(d=p.value,c!==0&&c--)}u.put(arguments,d)}return d}return l.clearCache=()=>{u.clear(),l.resetResultsCount()},l.resultsCount=()=>c,l.resetResultsCount=()=>{c=0},l}var Moe=class{constructor(e){this.value=e}deref(){return this.value}},Toe=typeof WeakRef<"u"?WeakRef:Moe,Ioe=0,Xw=1;function Hi(){return{s:Ioe,v:void 0,o:null,p:null}}function fS(e,t={}){let n=Hi();const{resultEqualityCheck:r}=t;let o,s=0;function i(){let c=n;const{length:u}=arguments;for(let f=0,p=u;f<p;f++){const m=arguments[f];if(typeof m=="function"||typeof m=="object"&&m!==null){let g=c.o;g===null&&(c.o=g=new WeakMap);const y=g.get(m);y===void 0?(c=Hi(),g.set(m,c)):c=y}else{let g=c.p;g===null&&(c.p=g=new Map);const y=g.get(m);y===void 0?(c=Hi(),g.set(m,c)):c=y}}const l=c;let d;if(c.s===Xw)d=c.v;else if(d=e.apply(null,arguments),s++,r){const f=o?.deref?.()??o;f!=null&&r(f,d)&&(d=f,s!==0&&s--),o=typeof d=="object"&&d!==null||typeof d=="function"?new Toe(d):d}return l.s=Xw,l.v=d,d}return i.clearCache=()=>{n=Hi(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function pS(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,i=0,c,u={},l=o.pop();typeof l=="object"&&(u=l,l=o.pop()),Coe(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const d={...n,...u},{memoize:f,memoizeOptions:p=[],argsMemoize:m=fS,argsMemoizeOptions:g=[]}=d,y=qw(p),x=qw(g),w=Soe(o),b=f(function(){return s++,l.apply(null,arguments)},...y),v=m(function(){i++;const k=$oe(w,arguments);return c=b.apply(null,k),c},...x);return Object.assign(v,{resultFunc:l,memoizedResultFunc:b,dependencies:w,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>c,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:f,argsMemoize:m})};return Object.assign(r,{withTypes:()=>r}),r}var Aoe=pS(fS),_oe=Object.assign((e,t=Aoe)=>{koe(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((i,c,u)=>(i[n[u]]=c,i),{}))},{withTypes:()=>_oe});pS({memoize:Poe,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const Ue=(e,t,n,r,o,s,...i)=>{if(i.length>0)throw new Error(Ko(1));let c;if(e)c=e;else throw new Error("Missing arguments");return c};var uf={exports:{}},df={};var Jw;function Noe(){if(Jw)return df;Jw=1;var e=Ja(),t=qC();function n(l,d){return l===d&&(l!==0||1/l===1/d)||l!==l&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,c=e.useMemo,u=e.useDebugValue;return df.useSyncExternalStoreWithSelector=function(l,d,f,p,m){var g=s(null);if(g.current===null){var y={hasValue:!1,value:null};g.current=y}else y=g.current;g=c(function(){function w(E){if(!b){if(b=!0,v=E,E=p(E),m!==void 0&&y.hasValue){var $=y.value;if(m($,E))return C=$}return C=E}if($=C,r(v,E))return $;var S=p(E);return m!==void 0&&m($,S)?(v=E,$):(v=E,C=S)}var b=!1,v,C,k=f===void 0?null:f;return[function(){return w(d())},k===null?void 0:function(){return w(k())}]},[d,f,p,m]);var x=o(l,g[0],g[1]);return i(function(){y.hasValue=!0,y.value=x},[x]),u(x),x},df}var Qw;function Doe(){return Qw||(Qw=1,uf.exports=Noe()),uf.exports}var Voe=Doe();const zoe=P4(19),Foe=zoe?Hoe:Woe;function Boe(e,t,n,r,o){return Foe(e,t,n,r,o)}function Hoe(e,t,n,r,o){const s=a.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return U9.useSyncExternalStore(e.subscribe,s,s)}function Woe(e,t,n,r,o){return Voe.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,n,r,o))}class Is{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])){Is.prototype.setState.call(this,{...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||Is.prototype.setState.call(this,{...this.state,[t]:n})}notifyAll(){const t={...this.state};Is.prototype.setState.call(this,t)}}class mS extends Is{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}controlledValues=new Map;useSyncedValue(t,n){a.useDebugValue(t),He(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){He(()=>(this.state[t]!==n&&this.set(t,n),()=>{this.set(t,void 0)}),[t,n])}useSyncedValues(t){const n=Object.values(t);He(()=>{this.update(t)},n)}useControlledProp(t,n,r){a.useDebugValue(t);const o=n!==void 0;this.controlledValues.has(t)||(this.controlledValues.set(t,o),!o&&!Object.is(this.state[t],r)&&super.setState({...this.state,[t]:r})),He(()=>{o&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r,o])}set(t,n){this.controlledValues.get(t)!==!0&&super.set(t,n)}update(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.update(n)}setState(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.setState({...this.state,...n})}select=(t,n,r,o)=>{const s=this.selectors[t];return s(this.state,n,r,o)};useState=(t,n,r,o)=>{a.useDebugValue(t);const s=this.selectors[t];return Boe(this,s,n,r,o)};useContextCallback(t,n){a.useDebugValue(t);const r=Ae(n??Nte);this.context[t]=r}useStateSetter(t){const n=a.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 o=r(this.state);return n(o,o,this),this.subscribe(s=>{const i=r(s);if(!Object.is(o,i)){const c=o;o=i,n(i,c,this)}})}}const Zoe={open:Ue(e=>e.open),domReferenceElement:Ue(e=>e.domReferenceElement),referenceElement:Ue(e=>e.positionReference??e.referenceElement),floatingElement:Ue(e=>e.floatingElement),floatingId:Ue(e=>e.floatingId)};class sh extends mS{constructor(t){const{nested:n,noEmit:r,onOpenChange:o,triggerElements:s,...i}=t;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:gre(),nested:n,noEmit:r,triggerElements:s},Zoe)}setOpen=(t,n)=>{if((!t||!this.state.open||ore(n.event))&&(this.context.dataRef.current.openEvent=t?n.event:void 0),!this.context.noEmit){const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(t,n)}}function Uoe(e,t=!1,n=!1){const[r,o]=a.useState(e&&t?"idle":void 0),[s,i]=a.useState(e);return e&&!s&&(i(!0),o("starting")),!e&&s&&r!=="ending"&&!n&&o("ending"),!e&&!s&&r==="ending"&&o(void 0),He(()=>{if(!e&&s&&r!=="ending"&&n){const c=Wn.request(()=>{o("ending")});return()=>{Wn.cancel(c)}}},[e,s,r,n]),He(()=>{if(!e||t)return;const c=Wn.request(()=>{Lt.flushSync(()=>{o(void 0)})});return()=>{Wn.cancel(c)}},[t,e]),He(()=>{if(!e||!t)return;e&&s&&r!=="idle"&&o("starting");const c=Wn.request(()=>{o("idle")});return()=>{Wn.cancel(c)}},[t,e,s,o,r]),a.useMemo(()=>({mounted:s,setMounted:i,transitionStatus:r}),[s,r])}function hS(e,t=!1,n=!0){const r=nS();return Ae((o,s=null)=>{r.cancel();const i=jre(e);i!=null&&(typeof i.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED?o():r.request(()=>{function c(){i&&Promise.all(i.getAnimations().map(u=>u.finished)).then(()=>{s!=null&&s.aborted||Lt.flushSync(o)}).catch(()=>{if(n){if(s!=null&&s.aborted)return;Lt.flushSync(o)}else i.getAnimations().length>0&&i.getAnimations().some(u=>u.pending||u.playState!=="finished")&&c()})}t?r.request(c):c()}))})}function gS(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,s=Zr(n),i=Ae(o),c=hS(r,n);a.useEffect(()=>{t&&c(()=>{n===s.current&&i()})},[t,n,i,c,s])}function Goe(e,t){const n=a.useRef(null);return a.useCallback(r=>{if(e!==void 0&&(n.current!==null&&(t.context.triggerElements.delete(n.current),n.current=null),r!==null))return n.current=e,t.context.triggerElements.add(e,r),()=>{n.current!==null&&(t.context.triggerElements.delete(n.current),n.current=null)}},[t,e])}function Koe(e,t,n,r){const o=n.useState("isMountedByTrigger",e),s=Goe(e,n),i=Ae(c=>{const u=s(c);return c!==null&&n.select("open")&&n.select("activeTriggerId")==null&&n.update({activeTriggerId:e,activeTriggerElement:c,...r}),u});return He(()=>{o&&n.update({activeTriggerElement:t.current,...r})},[o,n,t,...Object.values(r)]),{registerTrigger:i,isMountedByThisTrigger:o}}function Yoe(e){const t=e.useState("open");He(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,o]=n.value;e.update({activeTriggerId:r,activeTriggerElement:o})}}},[t,e])}function qoe(e,t,n){const{mounted:r,setMounted:o,transitionStatus:s}=Uoe(e);t.useSyncedValues({mounted:r,transitionStatus:s});const i=Ae(()=>{o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),t.context.onOpenChangeComplete?.(!1)}),c=t.useState("preventUnmountingOnClose");return gS({enabled:!c,open:e,ref:t.context.popupRef,onComplete(){e||i()}}),{forceUnmount:i,transitionStatus:s}}class ih{constructor(){this.elements=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elements.delete(r),this.elements.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elements.delete(n),this.idMap.delete(t))}hasElement(t){return this.elements.has(t)}hasMatchingElement(t){for(const n of this.elements)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function Xoe(){return new sh({open:!1,floatingElement:null,referenceElement:null,triggerElements:new ih,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function Joe(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:Xoe(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:Qt,inactiveTriggerProps:Qt,popupProps:Qt}}const Qoe={open:Ue(e=>e.open),mounted:Ue(e=>e.mounted),transitionStatus:Ue(e=>e.transitionStatus),floatingRootContext:Ue(e=>e.floatingRootContext),preventUnmountingOnClose:Ue(e=>e.preventUnmountingOnClose),payload:Ue(e=>e.payload),activeTriggerId:Ue(e=>e.activeTriggerId),activeTriggerElement:Ue(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:Ue((e,t)=>t!==void 0&&e.activeTriggerId===t),isOpenedByTrigger:Ue((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.open),isMountedByTrigger:Ue((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.mounted),triggerProps:Ue((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:Ue(e=>e.popupProps),popupElement:Ue(e=>e.popupElement),positionerElement:Ue(e=>e.positionerElement)};function ese(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=jc(),s=th()!=null,i=Xn(()=>new sh({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:r.triggers??new ih,floatingId:o,nested:s,noEmit:e.noEmit||!1})).current;return He(()=>{const c={open:t,floatingId:o};r.reference!==void 0&&(c.referenceElement=r.reference,c.domReferenceElement=Ve(r.reference)?r.reference:null),r.floating!==void 0&&(c.floatingElement=r.floating),i.update(c)},[t,o,r.reference,r.floating,i]),i.context.onOpenChange=n,i.context.nested=s,i.context.noEmit=e.noEmit||!1,i}function tse(e={}){const{nodeId:t,externalTree:n}=e,r=ese(e),o=e.rootContext||r,s={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[i,c]=a.useState(null),u=a.useRef(null),l=Rc(n);He(()=>{s.domReference&&(u.current=s.domReference)},[s.domReference]);const d=foe({...e,elements:{...s,...i&&{reference:i}}}),f=a.useCallback($=>{const S=Ve($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),getClientRects:()=>$.getClientRects(),contextElement:$}:$;c(S),d.refs.setReference(S)},[d.refs]),[p,m]=a.useState(null),[g,y]=a.useState(null);o.useSyncedValue("referenceElement",p),o.useSyncedValue("domReferenceElement",Ve(p)?p:null),o.useSyncedValue("floatingElement",g);const x=a.useCallback($=>{(Ve($)||$===null)&&(u.current=$,m($)),(Ve(d.refs.reference.current)||d.refs.reference.current===null||$!==null&&!Ve($))&&d.refs.setReference($)},[d.refs,m]),w=a.useCallback($=>{y($),d.refs.setFloating($)},[d.refs]),b=a.useMemo(()=>({...d.refs,setReference:x,setFloating:w,setPositionReference:f,domReference:u}),[d.refs,x,w,f]),v=a.useMemo(()=>({...d.elements,domReference:s.domReference}),[d.elements,s.domReference]),C=o.useState("open"),k=o.useState("floatingId"),E=a.useMemo(()=>({...d,dataRef:o.context.dataRef,open:C,onOpenChange:o.setOpen,events:o.context.events,floatingId:k,refs:b,elements:v,nodeId:t,rootStore:o}),[d,b,v,t,o,C,k]);return He(()=>{o.context.dataRef.current.floatingContext=E;const $=l?.nodesRef.current.find(S=>S.id===t);$&&($.context=E)}),a.useMemo(()=>({...d,context:E,refs:b,elements:v,rootStore:o}),[d,b,v,E,o])}function nse(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:o}=e,s=jc(),i=th()!=null,c=t.useState("open"),u=t.useState("activeTriggerElement"),l=t.useState(r?"popupElement":"positionerElement"),d=t.context.triggerElements,f=Xn(()=>new sh({open:c,referenceElement:u,floatingElement:l,triggerElements:d,onOpenChange:o,floatingId:s,nested:i,noEmit:n})).current;return He(()=>{const p={open:c,floatingId:s,referenceElement:u,floatingElement:l};Ve(u)&&(p.domReferenceElement=u),f.update(p)},[c,s,u,l,f]),f.context.onOpenChange=o,f.context.nested=i,f.context.noEmit=n,f}const ff=Kne&&Gne;function rse(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:o}=n.context,{enabled:s=!0,visibleOnly:i=!0}=t,c=a.useRef(!1),u=_o(),l=a.useRef(!0);a.useEffect(()=>{const f=n.select("domReferenceElement");if(!s)return;const p=Ot(f);function m(){!n.select("open")&&sn(f)&&f===_w(Yr(f))&&(c.current=!0)}function g(){l.current=!0}function y(){l.current=!1}return p.addEventListener("blur",m),ff&&(p.addEventListener("keydown",g,!0),p.addEventListener("pointerdown",y,!0)),()=>{p.removeEventListener("blur",m),ff&&(p.removeEventListener("keydown",g,!0),p.removeEventListener("pointerdown",y,!0))}},[n,s]),a.useEffect(()=>{if(!s)return;function f(p){(p.reason===Ga||p.reason===rh)&&(c.current=!0)}return r.on("openchange",f),()=>{r.off("openchange",f)}},[r,s]);const d=a.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const p=Rn(f.nativeEvent);if(i&&Ve(p)){if(ff&&!f.relatedTarget){if(!l.current&&!tre(p))return}else if(!nre(p))return}n.setOpen(!0,xt(Ep,f.nativeEvent,f.currentTarget))},onBlur(f){c.current=!1;const p=f.relatedTarget,m=f.nativeEvent,g=Ve(p)&&p.hasAttribute(Pc("focus-guard"))&&p.getAttribute("data-type")==="outside";u.start(0,()=>{const y=n.select("domReferenceElement"),x=_w(y?y.ownerDocument:document);!p&&x===y||At(o.current.floatingContext?.refs.floating.current,x)||At(y,x)||g||n.context.triggerElements.hasElement(f.relatedTarget)||n.setOpen(!1,xt(Ep,m))})}}),[o,n,i,u]);return a.useMemo(()=>s?{reference:d,trigger:d}:{},[s,d])}const Sp=Pc("safe-polygon"),ose=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${Q4}`;function sse(e){return e?!!e.closest(ose):!1}function vS(e){const t=a.useRef(void 0),n=a.useRef(!1),r=a.useRef(void 0),o=a.useRef(!0),s=a.useRef(!1),i=a.useRef(()=>{}),c=a.useRef(!1),u=_o(),l=_o(),d=a.useRef(void 0);return a.useMemo(()=>{const f=e.context.dataRef.current;return f.hoverInteractionState||(f.hoverInteractionState={pointerTypeRef:t,interactedInsideRef:n,handlerRef:r,blockMouseMoveRef:o,performedPointerEventsMutationRef:s,unbindMouseMoveRef:i,restTimeoutPendingRef:c,openChangeTimeout:u,restTimeout:l,handleCloseOptionsRef:d}),f.hoverInteractionState},[e,t,n,r,o,s,i,c,u,l,d])}const ise=new Set(["click","mousedown"]);function ase(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),s=n.useState("domReferenceElement"),{dataRef:i}=n.context,{enabled:c=!0,closeDelay:u=0,externalTree:l}=t,{pointerTypeRef:d,interactedInsideRef:f,handlerRef:p,performedPointerEventsMutationRef:m,unbindMouseMoveRef:g,restTimeoutPendingRef:y,openChangeTimeout:x,handleCloseOptionsRef:w}=vS(n),b=Rc(l),v=th(),C=Ae(()=>f.current?!0:i.current.openEvent?ise.has(i.current.openEvent.type):!1),k=Ae(()=>{const R=i.current.openEvent?.type;return R?.includes("mouse")&&R!=="mousedown"}),E=a.useCallback((R,T=!0)=>{const A=cse(u,d.current);A&&!p.current?x.start(A,()=>n.setOpen(!1,xt(Zn,R))):T&&(x.clear(),n.setOpen(!1,xt(Zn,R)))},[u,p,n,d,x]),$=Ae(()=>{g.current(),p.current=void 0}),S=Ae(()=>{if(m.current){const R=Yr(o).body;R.style.pointerEvents="",R.removeAttribute(Sp),m.current=!1}}),j=Ae(R=>{const T=Rn(R);if(!sse(T)){f.current=!1;return}f.current=!0});He(()=>{r||(d.current=void 0,y.current=!1,f.current=!1,$(),S())},[r,d,y,f,$,S]),a.useEffect(()=>()=>{$()},[$]),a.useEffect(()=>S,[S]),He(()=>{if(c&&r&&w.current?.blockPointerEvents&&k()&&Ve(s)&&o){m.current=!0;const R=Yr(o).body;R.setAttribute(Sp,"");const T=s,A=o,L=b?.nodesRef.current.find(V=>V.id===v)?.context?.elements.floating;return L&&(L.style.pointerEvents=""),R.style.pointerEvents="none",T.style.pointerEvents="auto",A.style.pointerEvents="auto",()=>{R.style.pointerEvents="",T.style.pointerEvents="",A.style.pointerEvents=""}}},[c,r,s,o,w,k,b,v,m]),a.useEffect(()=>{if(!c)return;function R(V){if(C()||!i.current.floatingContext)return;const I=n.context.triggerElements;V.relatedTarget&&I.hasElement(V.relatedTarget)||(S(),$(),C()||E(V))}function T(V){x.clear(),S(),p.current?.(V),$()}function A(V){C()||E(V,!1)}const L=o;return L&&(L.addEventListener("mouseleave",R),L.addEventListener("mouseenter",T),L.addEventListener("mouseleave",A),L.addEventListener("pointerdown",j,!0)),()=>{L&&(L.removeEventListener("mouseleave",R),L.removeEventListener("mouseenter",T),L.removeEventListener("mouseleave",A),L.removeEventListener("pointerdown",j,!0))}})}function cse(e,t){return t&&!Xs(t)?0:typeof e=="function"?e():e}function pf(e){return typeof e=="function"?e():e}const lse={current:null};function use(e,t={}){const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:o}=n.context,{enabled:s=!0,delay:i=0,handleClose:c=null,mouseOnly:u=!1,restMs:l=0,move:d=!0,triggerElementRef:f=lse,externalTree:p,isActiveTrigger:m=!0}=t,g=Rc(p),{pointerTypeRef:y,interactedInsideRef:x,handlerRef:w,blockMouseMoveRef:b,performedPointerEventsMutationRef:v,unbindMouseMoveRef:C,restTimeoutPendingRef:k,openChangeTimeout:E,restTimeout:$,handleCloseOptionsRef:S}=vS(n),j=Zr(c),R=Zr(i),T=Zr(l);m&&(S.current=j.current?.__options);const A=Ae(()=>x.current?!0:r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1),L=a.useCallback((N,O=!0)=>{const z=aa(R.current,"close",y.current);z&&!w.current?E.start(z,()=>n.setOpen(!1,xt(Zn,N))):O&&(E.clear(),n.setOpen(!1,xt(Zn,N)))},[R,w,n,y,E]),V=Ae(()=>{C.current(),w.current=void 0}),I=Ae(()=>{if(v.current){const N=Yr(n.select("domReferenceElement")).body;N.style.pointerEvents="",N.removeAttribute(Sp),v.current=!1}});a.useEffect(()=>{if(!s)return;function N(O){O.open||(E.clear(),$.clear(),b.current=!0,k.current=!1)}return o.on("openchange",N),()=>{o.off("openchange",N)}},[s,o,E,$,b,k]);const _=Ae(N=>{if(A()||!r.current.floatingContext)return;const O=n.context.triggerElements;N.relatedTarget&&O.hasElement(N.relatedTarget)||j.current?.({...r.current.floatingContext,tree:g,x:N.clientX,y:N.clientY,onClose(){I(),V(),A()||L(N)}})(N)});return a.useEffect(()=>{if(!s)return;const N=f.current??(m?n.select("domReferenceElement"):null);if(!Ve(N))return;function O(q){if(E.clear(),b.current=!1,u&&!Xs(y.current)||pf(T.current)>0&&!aa(R.current,"open"))return;const ee=aa(R.current,"open",y.current),G=n.select("domReferenceElement"),ue=n.context.triggerElements,se=(ue.hasElement(q.target)||ue.hasMatchingElement(re=>At(re,q.target)))&&(!G||!At(G,q.target)),ne=q.currentTarget??null;ee?E.start(ee,()=>{n.select("open")||n.setOpen(!0,xt(Zn,q,ne))}):(!n.select("open")||se)&&n.setOpen(!0,xt(Zn,q,ne))}function z(q){if(A()){I();return}C.current();const ee=n.select("domReferenceElement"),G=Yr(ee);$.clear(),k.current=!1;const ue=n.context.triggerElements;if(q.relatedTarget&&ue.hasElement(q.relatedTarget))return;if(j.current&&r.current.floatingContext){n.select("open")||E.clear(),w.current=j.current({...r.current.floatingContext,tree:g,x:q.clientX,y:q.clientY,onClose(){I(),V(),A()||L(q,!0)}});const ne=w.current;ne(q),G.addEventListener("mousemove",ne),C.current=()=>{G.removeEventListener("mousemove",ne)};return}(y.current!=="touch"||!At(n.select("floatingElement"),q.relatedTarget))&&L(q)}function M(q){_(q)}return n.select("open")&&N.addEventListener("mouseleave",M),d&&N.addEventListener("mousemove",O,{once:!0}),N.addEventListener("mouseenter",O),N.addEventListener("mouseleave",z),()=>{N.removeEventListener("mouseleave",M),d&&N.removeEventListener("mousemove",O),N.removeEventListener("mouseenter",O),N.removeEventListener("mouseleave",z)}},[V,I,b,r,R,L,n,s,j,_,m,A,u,d,y,T,$,k,E,f,g,C,w]),a.useMemo(()=>{function N(O){y.current=O.pointerType}return{onPointerDown:N,onPointerEnter:N,onMouseMove(O){const{nativeEvent:z}=O,M=O.currentTarget,q=n.select("domReferenceElement"),ee=n.context.triggerElements,G=n.select("open"),ue=(ee.hasElement(O.target)||ee.hasMatchingElement(ne=>At(ne,O.target)))&&(!q||!At(q,O.target));if(u&&!Xs(y.current)||G&&!ue||pf(T.current)===0||!ue&&k.current&&O.movementX**2+O.movementY**2<2)return;$.clear();function se(){!b.current&&(!G||ue)&&n.setOpen(!0,xt(Zn,z,M))}y.current==="touch"?Lt.flushSync(()=>{se()}):ue&&G?se():(k.current=!0,$.start(pf(T.current),se))}}},[b,u,n,y,T,$,k])}function dse(e=[]){const t=e.map(l=>l?.reference),n=e.map(l=>l?.floating),r=e.map(l=>l?.item),o=e.map(l=>l?.trigger),s=a.useCallback(l=>Wi(l,e,"reference"),t),i=a.useCallback(l=>Wi(l,e,"floating"),n),c=a.useCallback(l=>Wi(l,e,"item"),r),u=a.useCallback(l=>Wi(l,e,"trigger"),o);return a.useMemo(()=>({getReferenceProps:s,getFloatingProps:i,getItemProps:c,getTriggerProps:u}),[s,i,c,u])}function Wi(e,t,n){const r=new Map,o=n==="item",s={};n==="floating"&&(s.tabIndex=-1,s[Qne]="");for(const i in e)o&&e&&(i===X4||i===J4)||(s[i]=e[i]);for(let i=0;i<t.length;i+=1){let c;const u=t[i]?.[n];typeof u=="function"?c=e?u(e):null:c=u,c&&ex(s,c,o,r)}return ex(s,e,o,r),s}function ex(e,t,n,r){for(const o in t){const s=t[o];n&&(o===X4||o===J4)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof s=="function"&&(r.get(o)?.push(s),e[o]=(...i)=>r.get(o)?.map(c=>c(...i)).find(c=>c!==void 0))):e[o]=s)}}function tx(e,t){const[n,r]=e;let o=!1;const s=t.length;for(let i=0,c=s-1;i<s;c=i++){const[u,l]=t[i]||[0,0],[d,f]=t[c]||[0,0];l>=r!=f>=r&&n<=(d-u)*(r-l)/(f-l)+u&&(o=!o)}return o}function fse(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function pse(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o=new qo;let s=!1,i=null,c=null,u=typeof performance<"u"?performance.now():0;function l(f,p){const m=performance.now(),g=m-u;if(i===null||c===null||g===0)return i=f,c=p,u=m,null;const y=f-i,x=p-c,b=Math.sqrt(y*y+x*x)/g;return i=f,c=p,u=m,b}const d=({x:f,y:p,placement:m,elements:g,onClose:y,nodeId:x,tree:w})=>function(v){function C(){o.clear(),y()}if(o.clear(),!g.domReference||!g.floating||m==null||f==null||p==null)return;const{clientX:k,clientY:E}=v,$=[k,E],S=Rn(v),j=v.type==="mouseleave",R=At(g.floating,S),T=At(g.domReference,S),A=g.domReference.getBoundingClientRect(),L=g.floating.getBoundingClientRect(),V=m.split("-")[0],I=f>L.right-L.width/2,_=p>L.bottom-L.height/2,N=fse($,A),O=L.width>A.width,z=L.height>A.height,M=(O?A:L).left,q=(O?A:L).right,ee=(z?A:L).top,G=(z?A:L).bottom;if(R&&(s=!0,!j))return;if(T&&(s=!1),T&&!j){s=!0;return}if(j&&Ve(v.relatedTarget)&&At(g.floating,v.relatedTarget)||w&&Ts(w.nodesRef.current,x).some(({context:ne})=>ne?.open))return;if(V==="top"&&p>=A.bottom-1||V==="bottom"&&p<=A.top+1||V==="left"&&f>=A.right-1||V==="right"&&f<=A.left+1)return C();let ue=[];switch(V){case"top":ue=[[M,A.top+1],[M,L.bottom-1],[q,L.bottom-1],[q,A.top+1]];break;case"bottom":ue=[[M,L.top+1],[M,A.bottom-1],[q,A.bottom-1],[q,L.top+1]];break;case"left":ue=[[L.right-1,G],[L.right-1,ee],[A.left+1,ee],[A.left+1,G]];break;case"right":ue=[[A.right-1,G],[A.right-1,ee],[L.left+1,ee],[L.left+1,G]];break}function se([ne,re]){switch(V){case"top":{const ie=[O?ne+t/2:I?ne+t*4:ne-t*4,re+t+1],ae=[O?ne-t/2:I?ne+t*4:ne-t*4,re+t+1],pe=[[L.left,I||O?L.bottom-t:L.top],[L.right,I?O?L.bottom-t:L.top:L.bottom-t]];return[ie,ae,...pe]}case"bottom":{const ie=[O?ne+t/2:I?ne+t*4:ne-t*4,re-t],ae=[O?ne-t/2:I?ne+t*4:ne-t*4,re-t],pe=[[L.left,I||O?L.top+t:L.bottom],[L.right,I?O?L.top+t:L.bottom:L.top+t]];return[ie,ae,...pe]}case"left":{const ie=[ne+t+1,z?re+t/2:_?re+t*4:re-t*4],ae=[ne+t+1,z?re-t/2:_?re+t*4:re-t*4];return[...[[_||z?L.right-t:L.left,L.top],[_?z?L.right-t:L.left:L.right-t,L.bottom]],ie,ae]}case"right":{const ie=[ne-t,z?re+t/2:_?re+t*4:re-t*4],ae=[ne-t,z?re-t/2:_?re+t*4:re-t*4],pe=[[_||z?L.left+t:L.right,L.top],[_?z?L.left+t:L.right:L.left+t,L.bottom]];return[ie,ae,...pe]}default:return[]}}if(!tx([k,E],ue)){if(s&&!N)return C();if(!j&&r){const ne=l(v.clientX,v.clientY);if(ne!==null&&ne<.1)return C()}tx([k,E],se([f,p]))?!s&&r&&o.start(40,C):C()}};return d.__options={blockPointerEvents:n},d}const mse={...Qoe,disabled:Ue(e=>e.disabled),instantType:Ue(e=>e.instantType),isInstantPhase:Ue(e=>e.isInstantPhase),trackCursorAxis:Ue(e=>e.trackCursorAxis),disableHoverablePopup:Ue(e=>e.disableHoverablePopup),lastOpenChangeReason:Ue(e=>e.openChangeReason),closeDelay:Ue(e=>e.closeDelay)};class ah extends mS{constructor(t){super({...hse(),...t},{popupRef:a.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new ih},mse)}setOpen=(t,n)=>{const r=n.reason,o=r===Zn,s=t&&r===Ep,i=!t&&(r===Ga||r===rh);if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,n),n.isCanceled)return;const c=()=>{const u={open:t,openChangeReason:r};s?u.instantType="focus":i?u.instantType="dismiss":r===Zn&&(u.instantType=void 0);const l=n.trigger?.id??null;(l||t)&&(u.activeTriggerId=l,u.activeTriggerElement=n.trigger??null),this.update(u)};o?Lt.flushSync(c):c()};static useStore(t,n){const r=Xn(()=>t??new ah(n)).current,o=nse({popupStore:r,onOpenChange:r.setOpen});return r.state.floatingRootContext=o,r}}function hse(){return{...Joe(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeDelay:0}}function gse(e){const{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:o=!1,trackCursorAxis:s="none",actionsRef:i,onOpenChange:c,onOpenChangeComplete:u,handle:l,triggerId:d,defaultTriggerId:f=null,children:p}=e,m=ah.useStore(l?.store,{open:r??n,activeTriggerId:d!==void 0?d:f});m.useControlledProp("open",r,n),m.useControlledProp("activeTriggerId",d,f),m.useContextCallback("onOpenChange",c),m.useContextCallback("onOpenChangeComplete",u);const g=m.useState("open"),y=m.useState("activeTriggerId"),x=m.useState("payload");m.useSyncedValues({trackCursorAxis:s,disableHoverablePopup:o});const w=!t&&g;He(()=>{g&&t&&m.setOpen(!1,xt(wre))},[g,t,m]),m.useSyncedValue("disabled",t),Yoe(m);const{forceUnmount:b,transitionStatus:v}=qoe(w,m),C=m.useState("isInstantPhase"),k=m.useState("instantType"),E=m.useState("lastOpenChangeReason"),$=a.useRef(null);He(()=>{v==="ending"&&E===nh||v!=="ending"&&C?(k!=="delay"&&($.current=k),m.set("instantType","delay")):$.current!==null&&(m.set("instantType",$.current),$.current=null)},[v,C,E,k,m]),He(()=>{w&&y==null&&m.set("payload",void 0)},[m,y,w]);const S=a.useCallback(()=>{m.setOpen(!1,vse(m,xre))},[m]);a.useImperativeHandle(i,()=>({unmount:b,close:S}),[b,S]);const j=m.useState("floatingRootContext"),R=rse(j,{enabled:!t}),T=xoe(j,{enabled:!t,referencePress:!0}),A=Pre(j,{enabled:!t&&s!=="none",axis:s==="none"?void 0:s}),{getReferenceProps:L,getFloatingProps:V,getTriggerProps:I}=dse([R,T,A]),_=a.useMemo(()=>L(),[L]),N=a.useMemo(()=>I(),[I]),O=a.useMemo(()=>V(),[V]);return m.useSyncedValues({floatingRootContext:j,activeTriggerProps:_,inactiveTriggerProps:N,popupProps:O}),h.jsx(Y4.Provider,{value:m,children:typeof p=="function"?p({payload:x}):p})}function vse(e,t){const n=xt(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}let qa=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const bse={[qa.startingStyle]:""},yse={[qa.endingStyle]:""},wse={transitionStatus(e){return e==="starting"?bse:e==="ending"?yse:null}};let ch=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=qa.startingStyle]="startingStyle",e[e.endingStyle=qa.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({}),xse=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Cse={[xse.popupOpen]:""},kse={[ch.open]:""},Ese={[ch.closed]:""},Sse={[ch.anchorHidden]:""},$se={open(e){return e?Cse:null}},bS={open(e){return e?kse:Ese},anchorHidden(e){return e?Sse:null}};function Ose(e){return jc(e,"base-ui")}const yS=a.createContext(void 0);function Lse(){return a.useContext(yS)}const jse=600,Rse=a.forwardRef(function(t,n){const{className:r,render:o,handle:s,payload:i,disabled:c,delay:u,closeDelay:l,id:d,...f}=t,p=Lc(!0),m=s?.store??p;if(!m)throw new Error(Ko(82));const g=Ose(d),y=m.useState("isTriggerActive",g),x=m.useState("floatingRootContext"),w=m.useState("isOpenedByTrigger",g),b=a.useRef(null),v=u??jse,C=l??0,{registerTrigger:k,isMountedByThisTrigger:E}=Koe(g,b,m,{payload:i,closeDelay:C}),$=Lse(),{delayRef:S,isInstantPhase:j,hasProvider:R}=kre(x,{open:w});m.useSyncedValue("isInstantPhase",j);const T=m.useState("disabled"),A=c??T,L=m.useState("trackCursorAxis"),V=m.useState("disableHoverablePopup"),I=use(x,{enabled:!A,mouseOnly:!0,move:!1,handleClose:!V&&L!=="both"?pse():null,restMs(){const z=$?.delay,M=typeof S.current=="object"?S.current.open:void 0;let q=v;return R&&(M!==0?q=u??z??v:q=0),q},delay(){const z=typeof S.current=="object"?S.current.close:void 0;let M=C;return l==null&&R&&(M=z),{close:M}},triggerElementRef:b,isActiveTrigger:y}),_=a.useMemo(()=>({open:w}),[w]),N=m.useState("triggerProps",E);return li("button",t,{state:_,ref:[n,k,b],props:[I,N,{id:g},f],stateAttributesMapping:$se})}),wS=a.createContext(void 0);function Pse(){const e=a.useContext(wS);if(e===void 0)throw new Error(Ko(70));return e}const Mse=a.forwardRef(function(t,n){const{children:r,container:o,className:s,render:i,...c}=t,{portalNode:u,portalSubtree:l}=Lre({container:o,ref:n,componentProps:t,elementProps:c});return!l&&!u?null:h.jsxs(a.Fragment,{children:[l,u&&Lt.createPortal(r,u)]})}),Tse=a.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t;return Lc().useState("mounted")||r?h.jsx(wS.Provider,{value:r,children:h.jsx(Mse,{ref:n,...o})}):null}),xS=a.createContext(void 0);function Ise(){const e=a.useContext(xS);if(e===void 0)throw new Error(Ko(71));return e}const Ase=a.createContext(void 0);function CS(){return a.useContext(Ase)?.direction??"ltr"}const _se=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:c,middlewareData:u}=t,{element:l,padding:d=0,offsetParent:f="real"}=qn(e,t)||{};if(l==null)return{};const p=eS(d),m={x:n,y:r},g=eh(o),y=Qm(g),x=await i.getDimensions(l),w=g==="y",b=w?"top":"left",v=w?"bottom":"right",C=w?"clientHeight":"clientWidth",k=s.reference[y]+s.reference[g]-m[g]-s.floating[y],E=m[g]-s.reference[g],$=f==="real"?await i.getOffsetParent?.(l):c.floating;let S=c.floating[C]||s.floating[y];(!S||!await i.isElement?.($))&&(S=c.floating[C]||s.floating[y]);const j=k/2-E/2,R=S/2-x[y]/2-1,T=Math.min(p[b],R),A=Math.min(p[v],R),L=T,V=S-x[y]-A,I=S/2-x[y]/2+j,_=Cp(L,I,V),N=!u.arrow&&jr(o)!=null&&I!==_&&s.reference[y]/2-(I<L?T:A)-x[y]/2<0,O=N?I<L?I-L:I-V:0;return{[g]:m[g]+O,data:{[g]:_,centerOffset:I-_-O,...N&&{alignmentOffset:O}},reset:N}}}),Nse=(e,t)=>({..._se(e),options:[e,t]}),Dse={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,s=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:(await boe().fn(e)).data?.referenceHidden||s}}}},la={sideX:"left",sideY:"top"},Vse={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:o},platform:s,strategy:i,placement:c}=e,u=Ot(o),l=u.getComputedStyle(o);if(!(l.transitionDuration!=="0s"&&l.transitionDuration!==""))return{x:t,y:n,data:la};const f=await s.getOffsetParent?.(o);let p={width:0,height:0};if(i==="fixed"&&u?.visualViewport)p={width:u.visualViewport.width,height:u.visualViewport.height};else if(f===u){const b=rS(o);p={width:b.documentElement.clientWidth,height:b.documentElement.clientHeight}}else await s.isElement?.(f)&&(p=await s.getDimensions(f));const m=Zt(c);let g=t,y=n;m==="left"&&(g=p.width-(t+r.width)),m==="top"&&(y=p.height-(n+r.height));const x=m==="left"?"right":la.sideX,w=m==="top"?"bottom":la.sideY;return{x:g,y,data:{sideX:x,sideY:w}}}};function kS(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 nx(e,t,n){const{rects:r,placement:o}=e;return{side:kS(t,Zt(o),n),align:jr(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function zse(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,collisionBoundary:c,collisionPadding:u=5,sticky:l=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,keepMounted:p=!1,floatingRootContext:m,mounted:g,collisionAvoidance:y,shiftCrossAxis:x=!1,nodeId:w,adaptiveOrigin:b,lazyFlip:v=!1,externalTree:C}=e,[k,E]=a.useState(null);!g&&k!==null&&E(null);const $=y.side||"flip",S=y.align||"flip",j=y.fallbackAxisSide||"end",R=typeof t=="function"?t:void 0,T=Ae(R),A=R?T:t,L=Zr(t),I=CS()==="rtl",_=k||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":I?"left":"right","inline-start":I?"right":"left"}[r],N=s==="center"?_:`${_}-${s}`;let O=u;const z=1,M=r==="bottom"?z:0,q=r==="top"?z:0,ee=r==="right"?z:0,G=r==="left"?z:0;typeof O=="number"?O={top:O+M,right:O+G,bottom:O+q,left:O+ee}:O&&(O={top:(O.top||0)+M,right:(O.right||0)+G,bottom:(O.bottom||0)+q,left:(O.left||0)+ee});const ue={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:O},se=a.useRef(null),ne=Zr(o),re=Zr(i),pe=[poe(we=>{const je=nx(we,r,I),Ge=typeof ne.current=="function"?ne.current(je):ne.current,Be=typeof re.current=="function"?re.current(je):re.current;return{mainAxis:Ge,crossAxis:Be,alignmentAxis:Be}},[typeof o!="function"?o:0,typeof i!="function"?i:0,I,r])],P=S==="none"&&$!=="shift",K=!P&&(l||x||$==="shift"),B=$==="none"?null:goe({...ue,padding:{top:O.top+z,right:O.right+z,bottom:O.bottom+z,left:O.left+z},mainAxis:!x&&$==="flip",crossAxis:S==="flip"?"alignment":!1,fallbackAxisSideDirection:j}),ve=P?null:moe(we=>{const je=rS(we.elements.floating).documentElement;return{...ue,rootBoundary:x?{x:0,y:0,width:je.clientWidth,height:je.clientHeight}:void 0,mainAxis:S!=="none",crossAxis:K,limiter:l||x?void 0:hoe(Ge=>{if(!se.current)return{};const{width:Be,height:ht}=se.current.getBoundingClientRect(),We=un(Zt(Ge.placement)),zt=We==="y"?Be:ht,Fn=We==="y"?O.left+O.right:O.top+O.bottom;return{offset:zt/2+Fn/2}})}},[ue,l,x,O,S]);$==="shift"||S==="shift"||s==="center"?pe.push(ve,B):pe.push(B,ve),pe.push(voe({...ue,apply({elements:{floating:we},rects:{reference:je},availableWidth:Ge,availableHeight:Be}){Object.entries({"--available-width":`${Ge}px`,"--available-height":`${Be}px`,"--anchor-width":`${je.width}px`,"--anchor-height":`${je.height}px`}).forEach(([ht,We])=>{we.style.setProperty(ht,We)})}}),Nse(()=>({element:se.current||document.createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(we){const{elements:je,middlewareData:Ge,placement:Be,rects:ht,y:We}=we,zt=Zt(Be),Fn=un(zt),Rr=se.current,Xo=Ge.arrow?.x||0,Jo=Ge.arrow?.y||0,Qo=Rr?.clientWidth||0,Jn=Rr?.clientHeight||0,Ft=Xo+Qo/2,Pr=Jo+Jn/2,es=Math.abs(Ge.shift?.y||0),ts=ht.reference.height/2,Gt=typeof o=="function"?o(nx(we,r,I)):o,no=es>Gt,Mr={top:`${Ft}px calc(100% + ${Gt}px)`,bottom:`${Ft}px ${-Gt}px`,left:`calc(100% + ${Gt}px) ${Pr}px`,right:`${-Gt}px ${Pr}px`}[zt],ro=`${Ft}px ${ht.reference.y+ts-We}px`;return je.floating.style.setProperty("--transform-origin",K&&Fn==="y"&&no?ro:Mr),{}}},Dse,b),He(()=>{!g&&m&&m.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[g,m]);const Q=a.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:X,elements:te,x:ke,y:Ce,middlewareData:U,update:W,placement:le,context:J,isPositioned:de,floatingStyles:Z}=tse({rootContext:m,placement:N,middleware:pe,strategy:n,whileElementsMounted:p?void 0:(...we)=>Kw(...we,Q),nodeId:w,externalTree:C}),{sideX:ye,sideY:Pe}=U.adaptiveOrigin||la,Ee=de?n:"fixed",Fe=a.useMemo(()=>b?{position:Ee,[ye]:ke,[Pe]:Ce}:{position:Ee,...Z},[b,Ee,ye,ke,Pe,Ce,Z]),nt=a.useRef(null);He(()=>{if(!g)return;const we=L.current,je=typeof we=="function"?we():we,Be=(rx(je)?je.current:je)||null||null;Be!==nt.current&&(X.setPositionReference(Be),nt.current=Be)},[g,X,A,L]),a.useEffect(()=>{if(!g)return;const we=L.current;typeof we!="function"&&rx(we)&&we.current!==nt.current&&(X.setPositionReference(we.current),nt.current=we.current)},[g,X,A,L]),a.useEffect(()=>{if(p&&g&&te.domReference&&te.floating)return Kw(te.domReference,te.floating,W,Q)},[p,g,te,W,Q]);const rt=Zt(le),ft=kS(r,rt,I),kt=jr(le)||"center",$e=!!U.hide?.referenceHidden;He(()=>{v&&g&&de&&E(rt)},[v,g,de,rt]);const Ne=a.useMemo(()=>({position:"absolute",top:U.arrow?.y,left:U.arrow?.x}),[U.arrow]),ot=U.arrow?.centerOffset!==0;return a.useMemo(()=>({positionerStyles:Fe,arrowStyles:Ne,arrowRef:se,arrowUncentered:ot,side:ft,align:kt,physicalSide:rt,anchorHidden:$e,refs:X,context:J,isPositioned:de,update:W}),[Fe,Ne,se,ot,ft,kt,rt,$e,X,J,de,W])}function rx(e){return e!=null&&"current"in e}function ES(e){return e==="starting"?Dte:Qt}const Fse=a.forwardRef(function(t,n){const{render:r,className:o,anchor:s,positionMethod:i="absolute",side:c="top",align:u="center",sideOffset:l=0,alignOffset:d=0,collisionBoundary:f="clipping-ancestors",collisionPadding:p=5,arrowPadding:m=5,sticky:g=!1,disableAnchorTracking:y=!1,collisionAvoidance:x=Vte,...w}=t,b=Lc(),v=Pse(),C=b.useState("open"),k=b.useState("mounted"),E=b.useState("trackCursorAxis"),$=b.useState("disableHoverablePopup"),S=b.useState("floatingRootContext"),j=b.useState("instantType"),R=b.useState("transitionStatus"),T=zse({anchor:s,positionMethod:i,floatingRootContext:S,mounted:k,side:c,sideOffset:l,align:u,alignOffset:d,collisionBoundary:f,collisionPadding:p,sticky:g,arrowPadding:m,disableAnchorTracking:y,keepMounted:v,collisionAvoidance:x,adaptiveOrigin:Vse}),A=a.useMemo(()=>{const _={};return(!C||E==="both"||$)&&(_.pointerEvents="none"),{role:"presentation",hidden:!k,style:{...T.positionerStyles,..._}}},[C,E,$,k,T.positionerStyles]),L=a.useMemo(()=>({open:C,side:T.side,align:T.align,anchorHidden:T.anchorHidden,instant:E!=="none"?"tracking-cursor":j}),[C,T.side,T.align,T.anchorHidden,E,j]),V=a.useMemo(()=>({...L,arrowRef:T.arrowRef,arrowStyles:T.arrowStyles,arrowUncentered:T.arrowUncentered}),[L,T.arrowRef,T.arrowStyles,T.arrowUncentered]),I=li("div",t,{state:L,props:[A,ES(R),w],ref:[n,b.useStateSetter("positionerElement")],stateAttributesMapping:bS});return h.jsx(xS.Provider,{value:V,children:I})});function ox(e){const t=on(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=sn(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r;return(Do(n)!==s||Do(r)!==i)&&(n=s,r=i),{width:n,height:r}}const Bse=typeof ResizeObserver<"u",Hse=()=>!0;function Wse(e){const{popupElement:t,positionerElement:n,content:r,mounted:o,enabled:s=Hse,onMeasureLayout:i,onMeasureLayoutComplete:c,side:u,direction:l}=e,d=a.useRef(!0),f=hS(t,!0,!1),p=nS(),m=a.useRef(null),g=Ae(i),y=Ae(c),x=a.useMemo(()=>{let w=u==="top",b=u==="left";return l==="rtl"?(w=w||u==="inline-end",b=b||u==="inline-end"):(w=w||u==="inline-start",b=b||u==="inline-start"),w?{position:"absolute",[u==="top"?"bottom":"top"]:"0",[b?"right":"left"]:"0"}:Qt},[u,l]);He(()=>{if(!o||!s()||!Bse){d.current=!0,m.current=null;return}if(!t||!n)return;Object.entries(x).forEach(([j,R])=>{t.style.setProperty(j,R)});const w=new ResizeObserver(j=>{const R=j[0];R&&(m.current===null?m.current={width:Math.ceil(R.borderBoxSize[0].inlineSize),height:Math.ceil(R.borderBoxSize[0].blockSize)}:(m.current.width=Math.ceil(R.borderBoxSize[0].inlineSize),m.current.height=Math.ceil(R.borderBoxSize[0].blockSize)))});w.observe(t),t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto");const b=fs(t,"position","static"),v=fs(t,"transform","none"),C=fs(t,"scale","1"),k=fs(n,"--available-width","max-content"),E=fs(n,"--available-height","max-content");if(g?.(),d.current||m.current===null){n.style.setProperty("--positioner-width","max-content"),n.style.setProperty("--positioner-height","max-content");const j=ox(t);return n.style.setProperty("--positioner-width",`${j.width}px`),n.style.setProperty("--positioner-height",`${j.height}px`),b(),v(),C(),k(),E(),y?.(null,j),d.current=!1,()=>{w.disconnect()}}t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto"),n.style.setProperty("--positioner-width","max-content"),n.style.setProperty("--positioner-height","max-content");const $=ox(t);t.style.setProperty("--popup-width",`${m.current.width}px`),t.style.setProperty("--popup-height",`${m.current.height}px`),b(),v(),k(),E(),y?.(m.current,$),n.style.setProperty("--positioner-width",`${$.width}px`),n.style.setProperty("--positioner-height",`${$.height}px`);const S=new AbortController;return p.request(()=>{t.style.setProperty("--popup-width",`${$.width}px`),t.style.setProperty("--popup-height",`${$.height}px`),f(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},S.signal)}),()=>{w.disconnect(),S.abort(),p.cancel()}},[r,t,n,f,p,s,o,g,y,x])}function fs(e,t,n){const r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r)}}const Zse={...bS,...wse},Use=a.forwardRef(function(t,n){const{className:r,render:o,...s}=t,i=Lc(),{side:c,align:u}=Ise(),l=i.useState("open"),d=i.useState("mounted"),f=i.useState("instantType"),p=i.useState("transitionStatus"),m=i.useState("popupProps"),g=i.useState("payload"),y=i.useState("popupElement"),x=i.useState("positionerElement"),w=i.useState("floatingRootContext"),b=CS();gS({open:l,ref:i.context.popupRef,onComplete(){l&&i.context.onOpenChangeComplete?.(!0)}});function v(){w.context.events.emit("measure-layout")}function C(R,T){w.context.events.emit("measure-layout-complete",{previousDimensions:R,nextDimensions:T})}Wse({popupElement:y,positionerElement:x,mounted:d,content:g,enabled:()=>i.context.triggerElements.size>1,onMeasureLayout:v,onMeasureLayoutComplete:C,side:c,direction:b});const E=i.useState("disabled"),$=i.useState("closeDelay");ase(w,{enabled:!E,closeDelay:$});const S=a.useMemo(()=>({open:l,side:c,align:u,instant:f,transitionStatus:p}),[l,c,u,f,p]);return li("div",t,{state:S,ref:[n,i.context.popupRef,i.useStateSetter("popupElement")],props:[m,ES(p),s],stateAttributesMapping:Zse})}),Gse=function(t){const{delay:n,closeDelay:r,timeout:o=400}=t,s=a.useMemo(()=>({delay:n,closeDelay:r}),[n,r]),i=a.useMemo(()=>({open:n,close:r}),[n,r]);return h.jsx(yS.Provider,{value:s,children:h.jsx(Cre,{delay:i,timeoutMs:o,children:t.children})})};function Kse({delay:e=500,...t}){return h.jsx(Gse,{delay:e,...t})}function Yse({...e}){return h.jsx(gse,{"data-slot":"tooltip",...e})}function qse({...e}){return h.jsx(Rse,{"data-slot":"tooltip-trigger",...e})}function Xse({className:e,side:t="top",sideOffset:n=8,align:r="center",alignOffset:o=0,children:s,hidden:i,...c}){return i?null:h.jsx(Tse,{children:h.jsx(Fse,{align:r,alignOffset:o,side:t,sideOffset:n,className:"isolate z-[80]",children:h.jsx(Use,{"data-slot":"tooltip-content",className:ut("z-[80] w-fit max-w-xs rounded-md border border-[var(--hud-border)] bg-[var(--hud-surface)] px-2.5 py-1.5 text-sm font-medium text-sidebar-foreground shadow-md",e),...c,children:s})})})}const Jse="260px",Qse="48px",SS=a.createContext(null);function lh(){const e=a.useContext(SS);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function eie({defaultOpen:e=!1,open:t,onOpenChange:n,className:r,style:o,children:s,...i}){const[c,u]=a.useState(e),l=t??c,d=a.useCallback(g=>{const y=typeof g=="function"?g(l):g;n?n(y):u(y)},[n,l]),f=a.useCallback(()=>{d(g=>!g)},[d]),p=l?"expanded":"collapsed",m=a.useMemo(()=>({state:p,open:l,setOpen:d,toggleSidebar:f}),[p,l,d,f]);return h.jsx(SS.Provider,{value:m,children:h.jsx(Kse,{delay:200,children:h.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Jse,"--sidebar-width-icon":Qse,...o},className:ut("group/sidebar-wrapper contents",r),...i,children:s})})})}function tie({side:e="left",variant:t="sidebar",collapsible:n="icon",className:r,children:o,...s}){const{state:i}=lh();return n==="none"?h.jsx("div",{"data-slot":"sidebar","data-sidebar":"primary",className:ut("pointer-events-auto flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),...s,children:o}):h.jsx("div",{className:"group peer text-sidebar-foreground","data-state":i,"data-collapsible":i==="collapsed"?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:h.jsx("div",{"data-slot":"sidebar-container","data-sidebar":"primary","data-side":e,className:ut("pointer-events-auto fixed z-40 flex w-(--sidebar-width) flex-col transition-[left,right,width] duration-200 ease-linear","top-[var(--scout-sidebar-top,0px)] bottom-[28px]","data-[side=left]:left-0 data-[side=right]:right-0",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l border-sidebar-border",r),...s,children:h.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full min-h-0 flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:o})})})}function nie({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:ut("flex flex-col gap-2 p-2",e),...t})}function rie({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:ut("flex flex-col gap-2 p-2",e),...t})}function oie({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:ut("flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function mf({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:ut("relative flex w-full min-w-0 flex-col p-2",e),...t})}function hf({className:e,render:t,...n}){return Gm({defaultTagName:"div",props:kc({className:ut("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",e)},n),render:t,state:{slot:"sidebar-group-label",sidebar:"group-label"}})}function gf({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:ut("w-full text-sm",e),...t})}function ua({className:e,...t}){return h.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:ut("flex w-full min-w-0 flex-col gap-0",e),...t})}function ws({className:e,...t}){return h.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:ut("group/menu-item relative",e),...t})}const sie=Hte("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function xs({render:e,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:s,...i}){const{state:c}=lh(),[u,l]=a.useState(!1);a.useEffect(()=>{l(!1)},[c]);const d=Gm({defaultTagName:"button",props:kc({className:ut(sie({variant:n,size:r}),s)},i),render:o?h.jsx(qse,{render:e}):e,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:r,active:t}});return o?(typeof o=="string"&&(o={children:o}),h.jsxs(Yse,{open:c==="collapsed"&&u,onOpenChange:f=>l(c==="collapsed"&&f),children:[d,h.jsx(Xse,{side:"right",align:"center",...o})]})):d}function iie({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:ut("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground",e),...t})}function aie({className:e,...t}){return h.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:ut("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",e),...t})}function cie({className:e,...t}){return h.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:ut("group/menu-sub-item relative",e),...t})}function lie({render:e,size:t="md",isActive:n=!1,className:r,...o}){return Gm({defaultTagName:"a",props:kc({className:ut("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",r)},o),render:e,state:{slot:"sidebar-menu-sub-button",sidebar:"menu-sub-button",size:t,active:n}})}function $S(e){const{pathname:t}=lx(),n=$o("nav.sidebar",!1),r=u6(t);return a.useMemo(()=>{if(r){const i=y6(e);return{kind:"scope",items:w6.map(c=>({id:c.key,label:c.label,route:c.route,active:c.key===i})),activeId:i,sidebarChromeEnabled:n,scopePresentation:!0}}const o=ur(e);return{kind:"scout",items:fa.map(i=>({id:i.id,label:i.label,route:vx(i.id),active:i.id===o})),activeId:o,sidebarChromeEnabled:n,scopePresentation:!1}},[e,r,n])}function uie({className:e=""}){return h.jsxs("svg",{viewBox:"3.35 3.35 13.3 13.3","aria-hidden":"true",className:e,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[h.jsx("polygon",{points:"10,4.3 14.8,7.1 14.8,12.9 10,15.7 5.2,12.9 5.2,7.1",strokeWidth:"1.9",fill:"currentColor",fillOpacity:"0.12"}),h.jsx("polygon",{points:"10,7 12.4,8.4 12.4,10.6 10,12 7.6,10.6 7.6,8.4",strokeWidth:"0.9",fill:"currentColor",fillOpacity:"0.9"})]})}const $p="data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground data-active:shadow-[inset_2px_0_0_0_var(--sidebar-primary,var(--hud-accent,oklch(0.86_0.17_125)))]";function sx({areas:e,activeAreaId:t,onNavigateArea:n,route:r,navigate:o,opsControlEnabled:s,presentation:i}){const{state:c}=lh(),u=c==="expanded",l=L6(r,{opsControlEnabled:s});return h.jsx(ua,{children:e.map(d=>{const f=i==="slack"&&d.id==="home",p=i==="slack"&&d.id==="chat",m=f?"chat":p?"home":d.id,g=p?l3:d.icon,y=p?"Activity":d.label,x=m===t,w=u&&x&&l&&l.areaId===m?l.items:null;return h.jsxs(ws,{children:[h.jsxs(xs,{type:"button",isActive:x,tooltip:y,"aria-label":y,"aria-current":x?"page":void 0,"data-area":d.id,className:ut("font-mono text-sm font-medium tracking-[0.02em]",$p),onClick:()=>n(d.id),children:[h.jsx(g,{size:16,strokeWidth:1.6,"aria-hidden":!0}),h.jsx("span",{children:y})]}),w&&w.length>0?h.jsx(aie,{children:w.map(b=>{const v=b.active(r);return h.jsx(cie,{children:h.jsx(lie,{render:h.jsx("button",{type:"button"}),isActive:v,"aria-current":v?"page":void 0,"data-subnav":b.id,className:"font-mono text-xs",onClick:()=>o(b.route),children:h.jsx("span",{children:b.label})})},b.id)})}):null]},d.id)})})}function die({brandLabel:e="Scout",presentation:t="scout"}){const{route:n,navigate:r,openSettings:o,openContextCapture:s}=Sn(),{titleBarInset:i,dragRegionProps:c,onInteractiveMouseDown:u}=Qs(),l=$o("ops.control",!0),d=$S(n),f=ur(n),p=fa.filter(C=>C.section==="navigate"),m=fa.filter(C=>C.section==="system"&&C.id!=="settings"),g=bx("settings"),y=g.icon,x=f==="settings",w=()=>r(t==="slack"?{view:"messages"}:{view:"inbox"}),b=()=>s(),v=C=>{if(t==="slack"&&C==="home"){if(f==="chat")return;r({view:"messages"});return}if(t==="slack"&&C==="chat"){if(f==="home")return;r({view:"activity"});return}ur(n)!==C&&r(vx(C,{opsControlEnabled:l}))};return h.jsxs(tie,{side:"left",variant:"sidebar",collapsible:"icon","aria-label":d.kind==="scope"?"Scope navigation":"Primary navigation","data-sidebar-kind":d.kind,"data-presentation":t,children:[h.jsx(nie,{className:"border-b border-sidebar-border",style:{paddingTop:i||0,...c?.style??{}},...Object.fromEntries(Object.entries(c??{}).filter(([C])=>C!=="style")),"data-sidebar-drag-region":"",children:h.jsx("div",{className:"flex items-center gap-0.5","data-sidebar":"brand-row",children:h.jsx(ua,{className:"min-w-0 flex-1",children:h.jsx(ws,{children:h.jsxs(xs,{type:"button",size:"lg",tooltip:"Home",onClick:w,onMouseDown:u,"aria-label":"Scout Home",title:"Home",className:ut("data-[slot=sidebar-menu-button]:!p-2",t==="slack"?"font-sans":"font-mono"),children:[h.jsx(uie,{className:"size-[20px] shrink-0"}),h.jsx("span",{className:ut("truncate text-sm font-bold",t==="slack"?"tracking-[-0.01em]":"tracking-[0.08em] uppercase"),children:e})]})})})})}),h.jsx(oie,{className:"gap-0",children:d.kind==="scope"?h.jsxs(mf,{children:[h.jsx(hf,{"data-sidebar-head":"",className:"font-mono uppercase",children:"Surfaces"}),h.jsx(gf,{children:h.jsx(ua,{children:d.items.map(C=>h.jsx(ws,{children:h.jsxs(xs,{type:"button",isActive:C.active,tooltip:C.label,"aria-current":C.active?"page":void 0,"data-area":C.id,"aria-label":C.label,title:C.label,className:ut("font-mono text-sm font-medium",$p),onClick:()=>r(C.route),children:[h.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center text-sm font-bold uppercase","aria-hidden":!0,children:C.label.slice(0,1)}),h.jsx("span",{children:C.label})]})},C.id))})})]}):h.jsxs(h.Fragment,{children:[h.jsxs(mf,{children:[h.jsx(hf,{"data-sidebar-head":"",className:"font-mono uppercase",children:"Navigate"}),h.jsx(gf,{children:h.jsx(sx,{areas:p,activeAreaId:f,onNavigateArea:v,route:n,navigate:r,opsControlEnabled:l,presentation:t})})]}),h.jsxs(mf,{children:[h.jsx(hf,{className:"font-mono text-2xs tracking-[0.12em] uppercase",children:"System"}),h.jsx(gf,{children:h.jsx(sx,{areas:m,activeAreaId:f,onNavigateArea:v,route:n,navigate:r,opsControlEnabled:l,presentation:t})})]})]})}),h.jsx(rie,{className:"border-t border-sidebar-border",children:h.jsxs(ua,{className:"gap-1",children:[h.jsxs(ws,{children:[h.jsxs(xs,{type:"button",tooltip:`${Cs} (${Ui})`,"aria-label":Cs,"aria-keyshortcuts":Ui,"data-action":"new-task",className:"font-mono text-sm font-semibold tracking-[0.02em] [&_svg]:text-[var(--hud-accent)]",onClick:b,children:[h.jsx(W6,{size:16,strokeWidth:1.8,"aria-hidden":!0}),h.jsx("span",{children:Cs})]}),h.jsx(iie,{className:"font-mono text-2xs text-sidebar-foreground/55",children:Ui})]}),h.jsx(ws,{children:h.jsxs(xs,{type:"button",isActive:x,tooltip:g.label,"aria-label":g.label,"aria-current":x?"page":void 0,"data-area":"settings",className:ut("font-mono text-sm font-medium tracking-[0.02em]",$p),onClick:()=>o(),children:[h.jsx(y,{size:16,strokeWidth:1.6,"aria-hidden":!0}),h.jsx("span",{children:g.label})]})})]})})]})}function fie(e,t){return e==="left"?t?"›":"‹":t?"‹":"›"}function pie(e,t){const n=t?.trim()||"panel";return e?`Expand ${n}`:`Collapse ${n}`}function Xa({side:e,collapsed:t,label:n,onToggle:r,className:o="",style:s,onMouseDown:i}){const c=pie(t,n),l=fie(e,t)==="›"?"right":"left";return h.jsx("button",{type:"button","data-scout-rail-toggle":"","data-side":e,"data-direction":l,"data-collapsed":t?"true":"false","aria-expanded":!t,"aria-label":c,title:c,className:`scout-rail-toggle${o?` ${o}`:""}`,style:s,onClick:r,onMouseDown:i,children:h.jsx("svg",{"aria-hidden":"true",className:"scout-rail-toggle-glyph",viewBox:"0 0 16 16",fill:"none",children:h.jsx("path",{d:l==="right"?"M6 4.5 9.5 8 6 11.5":"M10 4.5 6.5 8l3.5 3.5",stroke:"currentColor",strokeWidth:"1.65",strokeLinecap:"round",strokeLinejoin:"round"})})})}const Jt=48,mie=56,Op=44,hie=32,OS=Math.round((Op-hie)/2),gie=Jt,Js=260,Lp=200,jp=360,vie=880,Rp=260,Pp=240,Mp=400;function vf(e){return Number.isFinite(e)?Math.max(Pp,Math.min(Mp,Math.round(e))):Rp}const LS=40,bie=24;function jS(e,{min:t,max:n,startedCollapsed:r,collapsedWidth:o=Jt}){if(!Number.isFinite(e))return r?o:t;const s=Math.max(o,Math.min(n,Math.round(e)));if(r)return s;const i=t-LS;return s<i?Jt:s}function RS({startedCollapsed:e,rawWidth:t},{min:n,max:r,collapsedWidth:o=Jt}){const s=Number.isFinite(t)?Math.round(t):n;if(e)return s>=o+bie?{kind:"expand"}:{kind:"none"};const i=n-LS;return s<i?{kind:"collapse"}:{kind:"resize",width:Math.max(n,Math.min(r,s))}}function PS(e){return e.autoCollapsed?!e.forceExpanded:e.manualCollapsed}function Tp(e){return Number.isFinite(e)?Math.max(Lp,Math.min(jp,Math.round(e))):Js}function yie(e,t=Js,n=Jt){return e?n:Tp(t)}function MS(e,t){return e.autoCollapsed?{manualCollapsed:e.manualCollapsed,forceExpanded:!t}:{manualCollapsed:t,forceExpanded:e.forceExpanded}}function wie(e){const t=PS(e);return MS(e,!t)}function TS({side:e,title:t,onToggle:n,edgeOffset:r=0,top:o=0,width:s=Jt,glyph:i,body:c,style:u,className:l=""}){return h.jsxs("aside",{"data-scout-collapsed-rail":"","data-side":e,"data-pane":e==="left"?"side-rail-collapsed":"inspector-collapsed",className:`scout-collapsed-rail${l?` ${l}`:""}${c?" scout-collapsed-rail--rich":""}`,style:{position:"fixed",top:o,bottom:28,width:s,zIndex:40,...e==="left"?{left:r}:{right:r},...u},"aria-label":`${t} (collapsed)`,children:[h.jsx(Xa,{side:e,collapsed:!0,label:t,onToggle:n,className:"scout-collapsed-rail-toggle",style:{position:"absolute",top:OS,zIndex:46,...e==="left"?{right:0,transform:"translateX(50%)"}:{left:0,transform:"translateX(-50%)"}}}),c?h.jsx("div",{className:"scout-collapsed-rail-body",children:c}):i?h.jsx("div",{className:"scout-collapsed-rail-glyph","aria-hidden":"true",style:{marginTop:40},children:i}):null]})}const Tc=10;function xie({route:e}){switch(e.view){case"messages":case"conversation":return h.jsx(J6,{});case"inbox":case"activity":case"briefings":return h.jsx(Cie,{});case"agents-v2":case"agent-info":return h.jsx(kie,{});case"terminal":return h.jsx(Eie,{});case"ops":return h.jsx(Sie,{});case"mesh":return h.jsx($ie,{});default:return h.jsx(Vo,{label:"Context",emptyMark:"·",children:null})}}function Cie(){const{agents:e,navigate:t,route:n}=Sn(),[r,o]=a.useState(null),s=ux(n),i=a.useMemo(()=>gx(e,s),[e,s]),c=a.useMemo(()=>k6(e,s),[e,s]),u=a.useMemo(()=>E6(r,c),[r,c]),l=a.useCallback(async()=>{o(await yf("/api/fleet").catch(()=>null))},[]);a.useEffect(()=>{l()},[l]),K6(m=>{(m.kind==="message.posted"||m.kind==="flight.updated"||m.kind==="agent.updated")&&l()});const d=a.useMemo(()=>{const m=new Set;for(const g of u?.needsAttention??[])g.agentId&&m.add(g.agentId);return m},[u]),f=a.useMemo(()=>i.filter(m=>d.has(m.id)).slice(0,4),[i,d]),p=a.useMemo(()=>{const m=new Set(f.map(g=>g.id));return[...i].filter(g=>!m.has(g.id)).sort((g,y)=>(y.updatedAt??y.createdAt??0)-(g.updatedAt??g.createdAt??0)).slice(0,Tc-f.length)},[i,f]);return h.jsxs(Vo,{label:"Home",emptyMark:"H",labelTone:f.length>0?"attention":"default",labelCount:f.length>0?f.length:void 0,children:[f.map(m=>h.jsx(ix,{agent:m,attention:!0,onClick:()=>Sh(t,m,{returnTo:n})},`att-${m.id}`)),f.length>0&&p.length>0?h.jsx(Q6,{}):null,p.map(m=>h.jsx(ix,{agent:m,onClick:()=>Sh(t,m,{returnTo:n})},m.id))]})}function kie(){const{agents:e,navigate:t,route:n}=Sn(),r=ux(n),o=a.useMemo(()=>gx(e,r),[e,r]),s=a.useMemo(()=>{const c=new Map;for(const u of o){const l=(u.project??Oie(u.workspaceRoot)??u.name??"project").trim(),d=l.toLowerCase(),f=c.get(d)??{name:l,needs:0,working:0,latest:0},p=U6(u.state);(p==="needs_attention"||p==="blocked")&&(f.needs+=1),(p==="in_turn"||p==="in_flight"||yx(u.state))&&(f.working+=1),f.latest=Math.max(f.latest,u.updatedAt??u.createdAt??0),c.set(d,f)}return[...c.values()].sort((u,l)=>l.needs>0!=u.needs>0?l.needs>0?1:-1:l.latest-u.latest).slice(0,Tc)},[o]),i=s.reduce((c,u)=>c+u.needs,0);return h.jsx(Vo,{label:"Projects",emptyMark:"P",labelTone:i>0?"attention":"default",labelCount:i>0?i:s.length||void 0,children:s.map(c=>h.jsx(ei,{title:`${c.name}${c.needs?` · ${c.needs} need you`:""}`,tone:c.needs>0?"attention":"default",ava:tc(c.name),avaColor:ec(c.name),dot:c.needs>0?"attention":c.working>0?"live":null,onClick:()=>t({view:"agents-v2",...r?{machineId:r}:{}})},c.name))})}function Eie(){const{route:e,navigate:t}=Sn(),[n,r]=a.useState([]);a.useEffect(()=>{Y6({includeDiscovered:!0}).then(r).catch(()=>{})},[]);const o=a.useMemo(()=>q6(n).slice(0,Tc),[n]),s=e.view==="terminal"?e.terminalSurfaceKey??null:null;return h.jsx(Vo,{label:"Term",emptyMark:"T",labelTone:o.length>0?"live":"default",labelCount:o.length||void 0,children:o.map(i=>h.jsx(ei,{title:i.title,active:X6(i.key,s),tone:"neutral",ava:tc(i.title),avaColor:ec(i.title),onClick:()=>t({view:"terminal",terminalSurfaceKey:i.key,terminalSessionId:i.session.id})},i.key))})}function Sie(){const{route:e,navigate:t}=Sn(),n=e.view==="ops"?e.mode:void 0,r=[{id:"mission",title:"Mission",glyph:h.jsx(v3,{size:13,strokeWidth:1.7,"aria-hidden":!0})},{id:"agents",title:"Agents",glyph:h.jsx(x3,{size:13,strokeWidth:1.7,"aria-hidden":!0})},{id:"lanes",title:"Agent Lanes",glyph:h.jsx(h3,{size:13,strokeWidth:1.7,"aria-hidden":!0})},{id:"plan",title:"Plan",glyph:h.jsx(e3,{size:13,strokeWidth:1.7,"aria-hidden":!0})}];return h.jsx(Vo,{label:"Operations",emptyMark:"O",labelTone:"default",children:r.map(o=>h.jsx(ei,{title:o.title,active:n===o.id||!n&&o.id==="mission",tone:"neutral",glyph:o.glyph,onClick:()=>t({view:"ops",mode:o.id})},o.id))})}function $ie(){const{agents:e,navigate:t}=Sn(),{meshSnapshot:n}=P6(),r=a.useMemo(()=>n?G6(e,n):[],[e,n]),o=a.useMemo(()=>[...r].sort((i,c)=>c.agents.length-i.agents.length).slice(0,Tc),[r]),s=o.filter(i=>i.online).length;return h.jsx(Vo,{label:"Network",emptyMark:"M",labelTone:s>0?"live":"default",labelCount:o.length||void 0,children:o.map(i=>h.jsx(ei,{title:`${i.machineLabel} · ${i.agents.length}`,tone:i.online?"default":"neutral",ava:tc(i.machineLabel),avaColor:ec(i.machineLabel),dot:i.online?"live":null,onClick:()=>t({view:"mesh"})},i.machineId))})}function ix({agent:e,attention:t,onClick:n}){const r=e.name??e.id,o=yx(e.state);return h.jsx(ei,{title:t?`${r} · needs you`:r,tone:t?"attention":"default",ava:tc(r),avaColor:ec(r),dot:t?"attention":o?"live":null,onClick:n})}function Oie(e){if(!e)return null;const t=e.replace(/\/+$/,"").split("/");return t[t.length-1]||null}function Lie(e,t){if(t)return!1;switch(e.view){case"inbox":case"activity":case"briefings":case"agents-v2":case"agent-info":case"terminal":case"messages":case"conversation":case"ops":case"mesh":case"mesh-ops":return!0;default:return!1}}function jie({presentation:e="scout",navRailWidth:t,isCollapsed:n,onToggleCollapse:r,width:o,style:s,hideWhenEmpty:i=!0}){const{route:c,navigate:u}=Sn(),l=$S(c),d=l.kind==="scope"?{body:null,footer:null}:Z6(c,u),f=!d.body&&!d.footer;if(i&&f)return null;const p=ur(c),m=fa.find(w=>w.id===p),g=l.kind==="scope"?"Scope":e==="slack"&&p==="chat"?"Scout":e==="slack"&&p==="home"?"Activity":m?.label??"Context",y=typeof s?.top=="number"?s.top:typeof s?.top=="string"&&Number.parseFloat(s.top)||0,x=t+o;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"scout-side-rail-expanded-host","data-presentation":e,"data-collapsed":n?"true":"false",hidden:n,"aria-hidden":n,style:n?{display:"none"}:void 0,children:[h.jsx(gp,{side:"left",title:g,isCollapsed:!1,width:o,style:{left:t,...s},footer:d.footer?d.footer:void 0,children:h.jsx("div",{"data-pane":"side-rail","data-scout-side-rail":"",style:{display:"contents"},children:d.body})}),h.jsx(Xa,{side:"left",collapsed:!1,label:g,onToggle:r,className:"scout-rail-toggle--panel scout-rail-toggle--side-rail",style:{position:"fixed",left:x,top:y+6,zIndex:45,transform:"translateX(-50%)"}})]}),h.jsx("div",{className:"scout-side-rail-collapsed-host","data-presentation":e,"data-collapsed":n?"true":"false",hidden:!n,"aria-hidden":!n,style:n?void 0:{display:"none"},children:h.jsx(TS,{side:"left",title:g,onToggle:r,edgeOffset:t,top:y,style:s,body:h.jsx(xie,{route:c})})})]})}function Rie(e){return ur(e)==="ops"?"ops":null}function Pie({items:e,route:t,navigate:n,className:r=""}){return e.length===0?null:h.jsx("nav",{className:`scout-area-subnav${r?` ${r}`:""}`,"aria-label":"Area sub-navigation","data-scout-area-subnav":"",children:e.map(o=>{const s=o.active(t);return h.jsx("button",{type:"button","aria-current":s?"page":void 0,className:`scout-area-subnav-item${s?" scout-area-subnav-item--active":""}`,onClick:()=>n(o.route),children:o.label},o.id)})})}function Mie({rightUtility:e,variant:t,presentation:n="scout",onOpenSearch:r,onInteractiveMouseDown:o}={}){const{route:s,navigate:i,navigateBack:c,canNavigateBack:u}=Sn(),l=I6(s),d=j6(s),f=Rie(s),p=t==="top-row",m=!!d||f!==null;if(!p&&!l&&!d&&!f&&!e)return null;const g=m?h.jsxs(h.Fragment,{children:[d?h.jsx(Pie,{items:d.items,route:s,navigate:i}):null,f==="ops"?h.jsx("div",{className:"scout-center-pane-secondary","data-scout-secondary-nav":"ops",children:h.jsx(t3,{activeRoute:s,navigate:i})}):null]}):null;if(p){const y=bx(ur(s)).label;if(n==="slack"){const x=ur(s)==="chat"?"Home":ur(s)==="home"?"Activity":y;return h.jsxs("div",{className:"scout-center-pane-header scout-center-pane-header--top-row scout-slack-topbar","data-scout-center-pane-header":"","data-scout-top-row":"","data-presentation":"slack",children:[h.jsxs("div",{className:"scout-slack-topbar-history",onMouseDown:o,children:[h.jsx("button",{type:"button","aria-label":"Go back",title:"Go back",onClick:()=>window.history.back(),children:h.jsx($h,{size:16,strokeWidth:1.8,"aria-hidden":!0})}),h.jsx("button",{type:"button","aria-label":"Go forward",title:"Go forward",onClick:()=>window.history.forward(),children:h.jsx(S6,{size:16,strokeWidth:1.8,"aria-hidden":!0})}),h.jsx("span",{children:x})]}),h.jsxs("button",{type:"button",className:"scout-slack-topbar-search","aria-label":"Search Scout",onMouseDown:o,onClick:r,children:[h.jsx(wx,{size:15,strokeWidth:1.8,"aria-hidden":!0}),h.jsx("span",{children:"Search Scout"}),h.jsx("kbd",{children:"⌘K"})]}),e?h.jsx("div",{className:"scout-center-pane-header-utility scout-slack-topbar-utility","data-scout-header-utility":"",onMouseDown:o,children:e}):h.jsx("span",{})]})}return h.jsxs("div",{className:"scout-center-pane-header scout-center-pane-header--top-row","data-scout-center-pane-header":"","data-scout-top-row":"","data-scout-has-secondary-row":m?"":void 0,children:[h.jsxs("div",{className:"scout-center-pane-header-main",onMouseDown:o,children:[h.jsx("button",{type:"button",className:"scout-top-row-back","aria-label":"Back","aria-keyshortcuts":"Meta+[",title:"Back (⌘[)",disabled:!u,onClick:c,children:h.jsx($h,{size:16,strokeWidth:1.9,"aria-hidden":"true"})}),h.jsx("div",{className:"scout-center-pane-breadcrumb","data-scout-breadcrumb":"",children:h.jsx("span",{className:"scout-nav-crumb",children:y})}),m?h.jsx("span",{className:"scout-top-row-sep","aria-hidden":"true",children:"/"}):null,g]}),e?h.jsx("div",{className:"scout-center-pane-header-utility","data-scout-header-utility":"",onMouseDown:o,children:e}):null]})}return h.jsxs("div",{className:"scout-center-pane-header","data-scout-center-pane-header":"",children:[h.jsxs("div",{className:"scout-center-pane-header-main",onMouseDown:o,children:[l?h.jsx("div",{className:"scout-center-pane-breadcrumb","data-scout-breadcrumb":"",children:h.jsx("span",{className:"scout-nav-crumb",children:l})}):null,g]}),e?h.jsx("div",{className:"scout-center-pane-header-utility","data-scout-header-utility":"",onMouseDown:o,children:e}):null]})}const Tie="https://openscout.app/docs";function Iie({presentation:e="scout"}){const{onboarding:t,refreshOnboarding:n}=Sn(),r=t?.operatorName?.trim()||t?.operatorNameSuggestion?.trim()||null,o=a.useRef(!1);return a.useEffect(()=>{r||!t||o.current||(o.current=!0,n())},[t,r,n]),h.jsxs("div",{className:"scout-top-row-identity","data-presentation":e,children:[h.jsx("a",{className:"scout-top-row-docs",href:Tie,target:"_blank",rel:"noreferrer",title:"OpenScout documentation",children:e==="slack"?h.jsx(d3,{size:16,strokeWidth:1.8,"aria-hidden":!0}):"docs"}),r?h.jsx("span",{className:"scout-top-row-operator",title:r,"aria-label":`Operator ${r}`,children:e==="slack"?r.slice(0,1).toUpperCase():`@${r.toLowerCase()}`}):null]})}function Aie(e,t,n=Jt){const r=`appshell.${e}.sidebar.manualCollapsed`,o=`appshell.${e}.sidebar.width`,[s,i]=Tt(r,!0),[c,u]=Tt(o,Js),l=t<=vie,[d,f]=a.useState(!1),[p,m]=a.useState(null),[g,y]=a.useState(!1),[x,w]=a.useState(!1);a.useEffect(()=>{l||f(!1)},[l]);const v=PS({manualCollapsed:s,autoCollapsed:l,forceExpanded:d}),C=Tp(c),k=p!=null?jS(p,{min:Lp,max:jp,startedCollapsed:g,collapsedWidth:n}):null,E=yie(v,C,n),$=a.useCallback(()=>{const I=wie({manualCollapsed:s,autoCollapsed:l,forceExpanded:d});if(l){f(I.forceExpanded);return}i(I.manualCollapsed)},[l,d,s,i]),S=a.useCallback(I=>{const _=MS({manualCollapsed:s,autoCollapsed:l,forceExpanded:d},I);if(l){f(N=>N===_.forceExpanded?N:_.forceExpanded);return}i(N=>N===_.manualCollapsed?N:_.manualCollapsed)},[l,d,s,i]),j=a.useCallback(I=>{u(Tp(I))},[u]),R=a.useCallback(()=>{u(Js),m(null)},[u]),T=a.useCallback((I,_=!1)=>{w(!0),y(_),m(I)},[]),A=a.useCallback(I=>{m(I)},[]),L=a.useCallback(()=>{m(null),w(!1)},[]),V=a.useCallback((I,_)=>{const N=RS({startedCollapsed:_,rawWidth:I},{min:Lp,max:jp,collapsedWidth:n});return N.kind==="collapse"?S(!0):N.kind==="expand"?S(!1):N.kind==="resize"&&u(N.width),m(null),w(!1),N},[n,S,u]);return{manualCollapsed:s,autoCollapsed:l,forceExpanded:d,effectiveCollapsed:v,width:E,expandedWidth:C,dragGhostWidth:k,dragStartedCollapsed:g,isSidebarResizing:x,toggleCollapsed:$,setCollapsed:S,setManualCollapsed:i,setExpandedWidth:j,resetExpandedWidth:R,beginResize:T,updateResize:A,clearDrag:L,commitDrag:V}}function _ie(e){return e.view==="ops"&&e.mode==="lanes"}function Nie(e,t){return!_ie(e)||!t||t.loading?!1:t.messageCount===0}function Die(e){return e.empty?!e.forceOpen:e.baseCollapsed}function Vie(e){return(e.empty?!e.forceOpen:e.rightCollapsed)?{forceOpen:!0,rightCollapsed:e.empty?e.rightCollapsed:!1}:{forceOpen:!1,rightCollapsed:e.empty?e.rightCollapsed:!0}}function zie(e,t){switch(e.view){case"agents-v2":return!!(e.agentId||e.selectedAgentId||e.sessionId);case"agent-info":case"conversation":case"mesh":case"mesh-ops":case"repos":case"terminal":case"work":return!0;case"ops":return e.mode!=="lanes";case"sessions":return!e.flightId;case"messages":return!!e.conversationId;case"search":return!!(e.hitId&&t.hasKnowledgeHit);case"broker":return!!(e.attemptId&&t.hasBrokerAttempt);case"activity":case"briefings":case"code":case"follow":case"harnesses":case"inbox":case"repo-diff":case"settings":case"voice":return!1}}const Zi=240,Fie=900,Bie=.45,Hie=500,Wie=420,Zie=480,Uie=520,bf=560,Gie=1500,Kie=40;function ax(e){return Math.min(Fie,Math.max(Hie,Math.floor(e*Bie)))}function Yie({className:e=""}){return h.jsxs("svg",{viewBox:"0 0 20 20","aria-hidden":"true",className:e,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[h.jsx("polygon",{points:"10,4.3 14.8,7.1 14.8,12.9 10,15.7 5.2,12.9 5.2,7.1",strokeWidth:"1.9",fill:"currentColor",fillOpacity:"0.12"}),h.jsx("polygon",{points:"10,7 12.4,8.4 12.4,10.6 10,12 7.6,10.6 7.6,8.4",strokeWidth:"0.9",fill:"currentColor",fillOpacity:"0.9"})]})}function qie({title:e,center:t,actions:n,search:r}){const{dragRegionProps:o,onInteractiveMouseDown:s}=Qs(),{navTotalHeight:i}=Qp(),c=!!r?.value,u=a.useRef(null),l=a.useRef(null),d=a.useRef(null),f=a.useRef(null);return a.useEffect(()=>{const p=u.current;if(!p)return;const m=()=>{const x=(l.current?.offsetWidth??0)+16,w=(d.current?.offsetWidth??0)+16,b=f.current?.firstElementChild?.clientWidth??0;p.style.setProperty("--scout-nav-left-w",`${x}px`),p.style.setProperty("--scout-nav-right-w",`${w}px`),p.style.setProperty("--scout-nav-strip-w",`${b}px`)};m();const g=new ResizeObserver(m),y=f.current?.firstElementChild;for(const x of[l.current,d.current,y])x&&g.observe(x);return window.addEventListener("resize",m),()=>{g.disconnect(),window.removeEventListener("resize",m)}},[]),h.jsx("div",{ref:u,"data-frame-panel":"navigation",className:"fixed top-0 left-0 right-0 z-50 pointer-events-auto",...o,children:h.jsxs("div",{className:"bg-background/95 border-b shadow-[var(--hud-shadow-nav)] flex items-end px-4",style:{height:i,borderColor:"var(--hud-chrome-border, oklch(var(--border) / 0.8))"},children:[h.jsx("div",{ref:l,className:"absolute left-4 bottom-0 h-12 z-10 flex items-center gap-2.5 select-none",onMouseDown:s,children:h.jsxs("div",{"aria-label":e,className:"flex items-center gap-2 rounded-sm px-0.5 -mx-0.5 leading-none text-foreground/90",children:[h.jsx(Yie,{className:"h-5 w-5 text-[#f8f3e8] drop-shadow-[0_0_6px_rgba(255,247,234,0.3)]"}),h.jsx("span",{className:"font-mono text-sm font-medium tracking-[0.06em] leading-none",children:e})]})}),t&&h.jsx("div",{ref:f,className:"flex-1 flex justify-center h-12 items-center",onMouseDown:s,children:t}),h.jsxs("div",{ref:d,className:"absolute right-4 bottom-0 h-12 z-10 flex items-center gap-3",onMouseDown:s,children:[n,r&&h.jsxs("div",{className:"hidden sm:block relative w-[220px] max-w-[34vw] bg-card border border-input rounded px-2.5 shadow-[inset_0_1px_0_oklch(var(--foreground)/0.02)] hover:border-ring/60 focus-within:border-ring focus-within:bg-card transition-colors duration-200",children:[h.jsx(wx,{size:11,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),h.jsx("input",{type:"text",value:r.value,onChange:p=>r.onChange(p.target.value),placeholder:r.placeholder??"Search",className:`
|
|
84
|
+
w-full h-7 pl-5 pr-6 bg-transparent text-sm font-mono font-normal tracking-[0.02em]
|
|
85
|
+
placeholder:text-muted-foreground/80 placeholder:font-light text-foreground
|
|
86
|
+
focus:outline-none transition-all duration-200
|
|
87
|
+
${c?"text-accent":""}
|
|
88
|
+
`}),c&&h.jsx("button",{type:"button",onClick:()=>r.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none rounded-sm",children:h.jsx(Ip,{size:12})})]})]})]})})}function Mue({app:e,assistant:t=!0}){return h.jsx(c6,{registry:p6,audience:f6,audienceOrder:dx,storageKey:d6,initialLayers:m6(),children:h.jsx(e.Provider,{children:h.jsx(ute,{children:h.jsx(Qie,{app:e,assistantEnabled:t})})})})}function Xie({statusBar:e,dictationActive:t}){const n=$o("surface.scoutbot",!0),r=$o(hx,!1),o=e.mesh.color==="amber"?"text-amber-400":e.mesh.color==="red"?"text-red-400":"text-foreground";return h.jsxs("div",{className:"flex items-center gap-3 font-mono leading-none",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx("span",{className:"text-2xs font-normal uppercase tracking-[0.16em] text-muted-foreground",children:e.activeAgents.label}),h.jsx("span",{className:"text-xs tabular-nums text-foreground",children:e.activeAgents.count})]}),h.jsx("span",{"aria-hidden":"true",className:"select-none text-muted-foreground/40 text-xs",children:"·"}),h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx("span",{className:"text-2xs font-normal uppercase tracking-[0.16em] text-muted-foreground",children:e.mesh.label}),h.jsx("span",{className:`text-xs ${o}`,children:e.mesh.value})]}),(n||r)&&h.jsxs(h.Fragment,{children:[h.jsx("span",{"aria-hidden":"true",className:"select-none text-muted-foreground/40 text-xs",children:"·"}),h.jsxs("div",{className:"flex items-center gap-1",children:[n&&h.jsx(V6,{}),r&&h.jsx(xte,{dictationActive:t})]})]})]})}function Jie({statusBar:e,onOpenFlagPanel:t,onOpenActivityLog:n}){return h.jsxs("div",{className:"flex max-w-[42vw] items-center gap-3",children:[h.jsx(yte,{onOpen:n}),h.jsx("span",{"aria-hidden":"true",className:"select-none text-muted-foreground/40 text-xs",children:"·"}),h.jsx(ote,{onOpenPanel:t}),h.jsx("div",{className:"truncate font-mono text-xs leading-none text-muted-foreground",title:e.build.title,children:e.build.label})]})}function Qie({app:e,assistantEnabled:t}){const{navTotalHeight:n}=Qp(),{titleBarInset:r,dragRegionProps:o,onInteractiveMouseDown:s}=Qs(),i=hte();h6();const{route:c,openContextCapture:u,apiConnection:l,navigate:d,navigateBack:f,selectedBrokerAttempt:p,selectedKnowledgeHit:m,appearanceDetails:g}=Sn(),y=lx(),x=g.shell==="slack",w=$o("nav.sidebar",!1),b=x||w,v=b?r:n,C=b,k=C?Kie:0,E=v+k,$=E+OS,S=$6(),j=e.hooks.useCommands(),R=e.hooks.useSearch?.()??null,T=e.hooks.useNavCenter?.()??null,A=e.hooks.useNavActions?.()??null,L=e.hooks.useLayoutMode?.()??e.mode,V=L==="focus"?"panel":L,I=e.hooks.useActiveToolHint?.()??null,_=e.hooks.useTakeover?.()??null,N=_?.active===!0,O=N&&_?.dismissible===!0,z=_?.onDismiss,M=e.slots.Takeover,q=A6();kte(q,l);const ee=dte(),[G,ue]=a.useState(!1),[se,ne]=Tt(`appshell.${e.id}.left`,!1),[re,ie]=Tt(`appshell.${e.id}.right`,!1),[ae,pe]=Tt(`appshell.${e.id}.rightOverlay`,!1),[P,K]=Tt(`appshell.${e.id}.leftW`,260),[B,ve]=Tt(`appshell.${e.id}.rightW`,280),[Q,X]=Tt("openscout.ops.minimap.collapsed",!1),[te,ke]=Tt(`appshell.${e.id}.terminalFocus`,!1),[Ce,U]=a.useState(()=>typeof window<"u"?window.innerWidth:1280),[W,le]=a.useState(()=>ax(typeof window<"u"?window.innerWidth:1280)),J=c.view==="search"||y.pathname==="/search",de=x?mie:gie,Z=Aie(e.id,Ce,de),ye=b&&c.view==="terminal"&&te,[Pe,Ee]=a.useState(null),[Fe,nt]=a.useState(!1),rt=a.useRef(null),ft=a.useRef(null),kt=Pe!=null,$e=Pe!=null?jS(Pe,{min:Pp,max:Mp,startedCollapsed:Fe}):null,[Ne,ot]=a.useState(null),we=a.useRef(null);a.useEffect(()=>{const Y=()=>{U(window.innerWidth),le(ax(window.innerWidth))};return Y(),window.addEventListener("resize",Y),()=>window.removeEventListener("resize",Y)},[]);const{active:je,brandLabel:Ge}=x6({route:c});a.useEffect(()=>(document.documentElement.style.setProperty("--scout-rail-collapsed-width",`${Jt}px`),b?(document.documentElement.setAttribute("data-scout-sidebar-chrome",""),document.documentElement.style.setProperty("--scout-nav-rail-width",`${Z.width}px`),Z.isSidebarResizing?document.documentElement.setAttribute("data-scout-sidebar-resizing",""):document.documentElement.removeAttribute("data-scout-sidebar-resizing")):(document.documentElement.removeAttribute("data-scout-sidebar-chrome"),document.documentElement.removeAttribute("data-scout-sidebar-resizing"),document.documentElement.style.removeProperty("--scout-nav-rail-width")),()=>{document.documentElement.removeAttribute("data-scout-sidebar-chrome"),document.documentElement.removeAttribute("data-scout-sidebar-resizing"),document.documentElement.style.removeProperty("--scout-nav-rail-width")}),[b,Z.width,Z.isSidebarResizing]),a.useEffect(()=>{K(b?Y=>vf(Y):Y=>Math.min(W,Math.max(Zi,Y))),ve(Y=>Math.min(W,Math.max(Zi,Y)))},[b,W,K,ve]),a.useEffect(()=>{!J||re||ae||ve(Y=>Math.max(Y,Math.min(W,Wie)))},[J,re,ae,ve,W]);const ht=c.view==="agents-v2"&&!c.agentId&&!c.sessionId&&!!c.selectedAgentId||c.view==="agents-v2"&&!!c.agentId;a.useEffect(()=>{!ht||re||ae||ve(Y=>Math.max(Y,Math.min(W,Zie)))},[ht,re,ae,ve,W]);const We=c.view==="broker"&&!!c.attemptId;a.useEffect(()=>{We&&(ie(!1),ve(Y=>Math.max(Y,Math.min(W,Uie))))},[We,ie,ve,W]);const[zt,Fn]=a.useState({x:0,y:0}),[Rr,Xo]=a.useState(1),Jo=a.useCallback(Y=>{Fn(oe=>({x:oe.x+Y.x,y:oe.y+Y.y}))},[]),Qo=a.useCallback(Y=>{Xo(Y)},[]),[Jn,Ft]=a.useState(!1),[Pr,es]=a.useState(!1),[ts,Gt]=Tt(`appshell.${e.id}.termH`,320),no=!!e.slots.Terminal,Mr=a.useMemo(()=>{const Y=[];return no&&Y.push("terminal"),t&&Y.push("assistant"),Y},[no,t]),ro=Mr[0]??"terminal",[fi,ns]=Tt(`appshell.${e.id}.drawerTab`,ro),rs=Mr.includes(fi)?fi:ro,[IS,pi]=a.useState(!1),[AS,oo]=a.useState(!1),[_S,NS]=a.useState(new Set),Ic=a.useRef(!1),so=a.useRef(null),Qn=a.useCallback(()=>{Ic.current=!1,so.current!==null&&(window.clearTimeout(so.current),so.current=null)},[]),uh=a.useCallback(()=>{Ic.current=!0,so.current!==null&&window.clearTimeout(so.current),so.current=window.setTimeout(Qn,Gie)},[Qn]);a.useEffect(()=>Qn,[Qn]);const DS=a.useCallback(Y=>{NS(oe=>{const Re=new Set(oe);return Re.has(Y)?Re.delete(Y):Re.add(Y),Re})},[]),dh=a.useCallback(Y=>oe=>{oe.preventDefault();const Re=oe.clientX,Kt=Y==="left"?P:B,jt=Y==="left"?K:ve,ct=Y==="left"?1:-1,er=Yt=>{const Et=(Yt.clientX-Re)*ct;jt(Math.max(Zi,Math.min(W,Kt+Et)))},mn=()=>{document.removeEventListener("mousemove",er),document.removeEventListener("mouseup",hn),window.removeEventListener("blur",mn)},hn=()=>mn();document.addEventListener("mousemove",er),document.addEventListener("mouseup",hn),window.addEventListener("blur",mn)},[P,B,K,ve,W]),[mi,VS]=a.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches);a.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const Y=window.matchMedia("(prefers-reduced-motion: reduce)"),oe=()=>VS(Y.matches);return oe(),Y.addEventListener?.("change",oe),()=>Y.removeEventListener?.("change",oe)},[]);const hi=a.useCallback(Y=>{mi||(ot(Y),we.current!==null&&window.clearTimeout(we.current),we.current=window.setTimeout(()=>{ot(null),we.current=null},150))},[mi]);a.useEffect(()=>()=>{we.current!==null&&window.clearTimeout(we.current)},[]);const zS=a.useCallback(Y=>{Y.preventDefault(),Y.stopPropagation();const oe=Z.effectiveCollapsed,Re=Y.clientX,Kt=oe?de:Z.expandedWidth;ft.current=Kt,Z.beginResize(Kt,oe);const jt=()=>{document.removeEventListener("pointermove",ct),document.removeEventListener("pointerup",er),document.removeEventListener("pointercancel",mn),window.removeEventListener("blur",mn)},ct=hn=>{const Yt=Kt+(hn.clientX-Re);ft.current=Yt,Z.updateResize(Yt)},er=()=>{const hn=ft.current??Kt,Yt=Z.commitDrag(hn,oe),Et=Yt.kind==="collapse"?de:Yt.kind==="expand"?Z.expandedWidth:Yt.kind==="resize"?Yt.width:null;Et!=null&&hi(Et),jt()},mn=()=>{Z.clearDrag(),jt()};document.addEventListener("pointermove",ct),document.addEventListener("pointerup",er),document.addEventListener("pointercancel",mn),window.addEventListener("blur",mn)},[Z,de,hi]),FS=a.useCallback((Y,oe)=>Re=>{Re.preventDefault(),Re.stopPropagation();const Kt=Re.clientX,jt=oe?Jt:vf(P);rt.current=jt,Ee(jt),nt(oe);const ct=()=>{document.removeEventListener("pointermove",er),document.removeEventListener("pointerup",mn),document.removeEventListener("pointercancel",hn),window.removeEventListener("blur",hn)},er=Yt=>{const Et=jt+(Yt.clientX-Kt);rt.current=Et,Ee(Et)},mn=()=>{const Yt=rt.current??jt,Et=RS({startedCollapsed:oe,rawWidth:Yt},{min:Pp,max:Mp});Et.kind==="collapse"?ne(!0):Et.kind==="expand"?ne(!1):Et.kind==="resize"&&K(Et.width),Ee(null),rt.current=null;const Eh=Et.kind==="collapse"?Y+Jt:Et.kind==="expand"?Y+vf(P):Et.kind==="resize"?Y+Et.width:null;Eh!=null&&hi(Eh),ct()},hn=()=>{Ee(null),rt.current=null,ct()};document.addEventListener("pointermove",er),document.addEventListener("pointerup",mn),document.addEventListener("pointercancel",hn),window.addEventListener("blur",hn)},[P,ne,K,hi]),fh=a.useMemo(()=>{const oe=[{id:"nav:back",label:"Back",shortcut:"Cmd+[",action:f},{id:"shell:toggle-sidebar-b",label:"Toggle Sidebar",shortcut:"Cmd+B",action:()=>{b?Z.toggleCollapsed():ne(Re=>!Re)}},{id:"shell:toggle-right",label:"Toggle Right Panel",shortcut:"Cmd+]",action:()=>ie(Re=>!Re)},{id:"shell:toggle-right-overlay",label:"Toggle Inspector Overlay",shortcut:"Cmd+Shift+]",action:()=>pe(Re=>!Re)},{id:"shell:new-session",label:Cs,shortcut:Ui,action:()=>u()},{id:"shell:toggle-terminal",label:"Toggle Terminal",shortcut:"Ctrl+`",action:()=>Ft(Re=>!Re)},...b&&c.view==="terminal"?[{id:"shell:terminal-focus",label:te?"Exit Terminal Focus":"Focus Terminal",shortcut:"Cmd+Shift+B",action:()=>ke(Re=>!Re)}]:[],{id:"shell:feature-flags",label:"Feature Flags",shortcut:da()?"Cmd+Shift+F":void 0,action:()=>oo(!0)}];return t&&oe.push({id:"shell:toggle-assistant",label:"Toggle Assistant",shortcut:"Cmd+J",action:()=>{ns("assistant"),Ft(Re=>!Re||fi!=="assistant")}}),oe},[t,fi,u,f,c,ns,ne,ie,pe,oo,ke,b,Z,te]),BS=a.useMemo(()=>[...j,...fh],[j,fh]);a.useEffect(()=>{const Y=oe=>{if(g6(oe)&&!N&&!i.open&&!v6()&&b&&c.view==="terminal"){oe.preventDefault(),oe.stopPropagation(),ke(ct=>!ct);return}if(b6(oe.target)||N||i.open)return;const Re=oe.key.toLowerCase(),Kt=oe.metaKey||oe.ctrlKey||oe.altKey,jt=px(oe.target);if(Ic.current)if(oe.key==="Escape"||Kt||jt)Qn();else{const ct=fte(Re);if(ct){oe.preventDefault(),oe.stopPropagation(),Qn(),d(ct.route);return}else Qn()}if(!Kt&&!oe.shiftKey&&Re==="g"&&!jt){oe.preventDefault(),oe.stopPropagation(),uh();return}if((oe.metaKey||oe.ctrlKey)&&oe.key==="k"&&(oe.preventDefault(),pi(!0)),_6(oe)&&(oe.preventDefault(),u()),(oe.metaKey||oe.ctrlKey)&&oe.key==="["&&(oe.preventDefault(),f()),(oe.metaKey||oe.ctrlKey)&&oe.key.toLowerCase()==="b"){if(jt)return;oe.preventDefault(),b?Z.toggleCollapsed():ne(ct=>!ct)}(oe.metaKey||oe.ctrlKey)&&oe.key==="]"&&(oe.preventDefault(),oe.shiftKey?pe(ct=>!ct):ie(ct=>!ct)),oe.ctrlKey&&oe.key==="`"&&(oe.preventDefault(),Ft(ct=>!ct)),t&&(oe.metaKey||oe.ctrlKey)&&oe.key==="j"&&(oe.preventDefault(),ns("assistant"),Ft(ct=>!(ct&&rs==="assistant"))),da()&&(oe.metaKey||oe.ctrlKey)&&oe.shiftKey&&!oe.altKey&&oe.code==="KeyF"&&(oe.preventDefault(),oe.stopPropagation(),oo(!0))};return window.addEventListener("keydown",Y,!0),()=>window.removeEventListener("keydown",Y,!0)},[t,Qn,i.open,f,d,u,rs,c,ns,ne,ie,pe,oo,ke,b,Z,uh,N]),a.useEffect(()=>{const Y=oe=>{const Re=oe.detail,Kt=typeof Re?.width=="number"?Re.width:420;ie(!1),ve(jt=>Math.max(jt,Math.min(W,Math.max(Zi,Kt))))};return window.addEventListener("scout:set-inspector-width",Y),()=>window.removeEventListener("scout:set-inspector-width",Y)},[ie,ve,W]);const Ac=e.slots.Inspector,ph=e.slots.RightPanel,HS=e.tools&&e.tools.length>0,WS=h.jsxs(h.Fragment,{children:[Ac&&h.jsx(Ac,{}),!Ac&&ph&&h.jsx(ph,{}),HS&&h.jsx("div",{className:"border-t border-neutral-700/50",children:e.tools.map(Y=>{const oe=_S.has(Y.id);return h.jsxs("div",{children:[h.jsxs("button",{onClick:()=>DS(Y.id),className:`w-full flex items-center gap-2 px-4 py-2.5 text-sm font-mono tracking-wider uppercase transition-colors hover:bg-white/5 ${I===Y.id?"text-emerald-400":"text-neutral-300"}`,children:[oe?h.jsx(n3,{size:10}):h.jsx(r3,{size:10}),h.jsx("span",{className:"text-neutral-400",children:Y.icon}),h.jsx("span",{className:"font-bold",children:Y.name})]}),oe&&h.jsx("div",{className:"px-4 pb-3",children:h.jsx(Y.Component,{})})]},Y.id)})})]}),ZS=h.jsx(Qee,{onOpenCommandPalette:()=>pi(!0)}),mh=a.useMemo(()=>({isCollapsed:Q,onToggleCollapse:()=>X(Y=>!Y)}),[Q,X]),US=ee?h.jsx("div",{className:`scout-canvas-minimap-shell${Q?" scout-canvas-minimap-shell--collapsed":""}`,children:ee.render(mh)}):null,GS=ee?h.jsx("div",{className:`scout-canvas-minimap-shell scout-canvas-minimap-shell--floating${Q?" scout-canvas-minimap-shell--collapsed":""}`,children:ee.render(mh)}):null,hh=a.useRef(null),gh=a.useRef(null);a.useEffect(()=>{const Y=hh.current;Y&&(N?Y.setAttribute("inert",""):Y.removeAttribute("inert"))},[N]),a.useEffect(()=>{if(!N)return;const Y=gh.current;if(Y&&(Y.querySelector("button, [href], input, select, textarea, [tabindex]:not([tabindex='-1'])")??Y).focus(),!O)return;const oe=Re=>{Re.key==="Escape"&&(Re.preventDefault(),z?.())};return window.addEventListener("keydown",oe),()=>window.removeEventListener("keydown",oe)},[N,O,z]);const vh=c.view==="agents-v2",KS=zie(c,{hasBrokerAttempt:!!p,hasKnowledgeHit:!!m}),_c=c.view==="ops"&&c.mode==="lanes",[bh,Nc]=a.useState(!1),YS=S.state.conversation,gi=Nie(c,YS);a.useEffect(()=>{_c||Nc(!1)},[_c]),a.useEffect(()=>{gi||Nc(!1)},[gi]);const vi=Die({empty:gi,forceOpen:bh,baseCollapsed:re||je}),yh=!ye&&!je&&KS,bi=je&&!b,qS=je,os=!ye&&b&&Lie(c,je),Dc=os?se?Jt:P:0,wh=os&&Z.effectiveCollapsed&&se;a.useEffect(()=>(wh?document.documentElement.setAttribute("data-scout-double-rail",""):document.documentElement.removeAttribute("data-scout-double-rail"),()=>document.documentElement.removeAttribute("data-scout-double-rail")),[wh]);const ss=ye?0:b?Z.width+Dc:se||bi?0:P,yi=ye||!yh||ae||We||qS?0:vi?b?Jt:0:B,XS=Ce-ss-yi,xh=L==="panel"&&XS<bf&&(ss>0||yi>0),Vc=xh&&yi>0,zc=xh&&(b?Dc>0&&Ce-Z.width-Dc<bf:ss>0&&Ce-ss<bf),wi=We||ae||Vc,Fc=zc?b?Z.width:0:ss,Bc=wi?0:yi,JS=L==="panel"?{position:"absolute",top:E,bottom:28,left:Fc,right:Bc,overflow:"auto"}:{},Ch=b?{top:E}:{},QS=b?{top:E}:{},e6={display:"contents","--scout-shell-left-inset":`${L==="panel"?Fc:0}px`,"--scout-shell-right-inset":`${L==="panel"?Bc:0}px`,...b?{"--scout-nav-rail-width":`${Z.width}px`}:{}},kh=ae?"Pin inspector (push content)":Vc?"Keep inspector floating when there is room":"Float inspector (overlay content)",Hc=a.useCallback((Y,oe=!1)=>({backgroundColor:"rgba(13, 14, 16, 0.72)",backdropFilter:"blur(24px) saturate(140%)",WebkitBackdropFilter:"blur(24px) saturate(140%)",boxShadow:Y==="left"?"18px 0 48px -12px rgba(0,0,0,0.7), inset -1px 0 0 0 rgba(255,255,255,0.06)":"-18px 0 48px -12px rgba(0,0,0,0.7), inset 1px 0 0 0 rgba(255,255,255,0.06)",...oe?{right:12,bottom:40,borderWidth:1,borderStyle:"solid",borderColor:"rgba(255,255,255,0.09)",borderRadius:12,boxShadow:"-24px 18px 72px -18px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.025)"}:{}}),[]);return h.jsxs(h.Fragment,{children:[h.jsx("div",{ref:hh,"aria-hidden":N?!0:void 0,style:e6,children:h.jsx(Yee,{mode:V,panOffset:zt,scale:Rr,onPan:Jo,onZoom:Qo,hud:h.jsxs(h.Fragment,{children:[b?null:h.jsx(qie,{title:je?Ge:e.name,search:je?void 0:R??void 0,center:T,actions:A}),b?ye?null:h.jsxs(h.Fragment,{children:[h.jsx(eie,{open:!Z.effectiveCollapsed,onOpenChange:Y=>Z.setCollapsed(!Y),style:{"--sidebar-width":`${Z.expandedWidth}px`,"--sidebar-width-icon":`${de}px`,"--scout-sidebar-top":"0px"},"data-sidebar-resizing":Z.isSidebarResizing?"":void 0,children:h.jsx(die,{brandLabel:e.name,presentation:x?"slack":"scout"})}),h.jsx(Xa,{side:"left",collapsed:Z.effectiveCollapsed,label:"Sidebar",onToggle:Z.toggleCollapsed,onMouseDown:Y=>Y.stopPropagation(),className:"scout-rail-toggle--sidebar-edge",style:{position:"fixed",left:Z.width,top:$,zIndex:46,transform:"translateX(-50%)"}}),h.jsx("div",{"data-scout-sidebar-resize-handle":"",role:"separator","aria-orientation":"vertical","aria-label":Z.effectiveCollapsed?"Expand sidebar (drag out)":"Resize or collapse sidebar",title:Z.effectiveCollapsed?"Drag out to expand · double-click to expand":"Drag to resize · drag in to collapse · double-click to reset",onPointerDown:zS,onDoubleClick:Y=>{Y.preventDefault(),Z.effectiveCollapsed?(Z.setExpandedWidth(Js),Z.setCollapsed(!1)):Z.resetExpandedWidth()},onMouseDown:Y=>{Y.stopPropagation()},style:{position:"fixed",left:Math.max(0,Z.width-3),top:E+Op,bottom:28,width:6,zIndex:50,cursor:"ew-resize",pointerEvents:"auto",touchAction:"none"}}),!mi&&Z.isSidebarResizing&&Z.dragGhostWidth!=null?h.jsx("div",{"data-scout-sidebar-resize-ghost":"","aria-hidden":"true",className:"scout-sidebar-resize-ghost",style:{position:"fixed",left:Z.dragGhostWidth,top:E,bottom:28,width:2,transform:"translateX(-50%)",zIndex:55,pointerEvents:"none"}}):null,os?h.jsx(jie,{presentation:x?"slack":"scout",navRailWidth:Z.width,isCollapsed:se,onToggleCollapse:()=>ne(!se),width:P,style:{...QS,...zc?Hc("left"):{}}}):null,os?h.jsx("div",{"data-scout-sidebar-resize-handle":"","data-scout-side-rail-resize-handle":"",role:"separator","aria-orientation":"vertical","aria-label":se?"Expand context rail (drag out)":"Resize or collapse context rail",title:se?"Drag out to expand · double-click to expand":"Drag to resize · drag in to collapse · double-click to reset",onPointerDown:FS(Z.width,se),onDoubleClick:Y=>{Y.preventDefault(),se?(K(Rp),ne(!1)):K(Rp)},onMouseDown:Y=>{Y.stopPropagation()},style:{position:"fixed",left:Math.max(0,Z.width+(se?Jt:P)-3),top:E+Op,bottom:28,width:6,zIndex:50,cursor:"ew-resize",pointerEvents:"auto",touchAction:"none"}}):null,!mi&&os&&kt&&$e!=null?h.jsx("div",{"data-scout-side-rail-resize-ghost":"","aria-hidden":"true",className:"scout-sidebar-resize-ghost",style:{position:"fixed",left:Z.width+$e,top:E,bottom:28,width:2,transform:"translateX(-50%)",zIndex:55,pointerEvents:"none"}}):null,Ne!=null?h.jsx("div",{"data-scout-rail-settle-ghost":"","aria-hidden":"true",className:"scout-sidebar-resize-ghost scout-sidebar-resize-ghost--settle",style:{position:"fixed",left:Ne,top:E,bottom:28,width:2,transform:"translateX(-50%)",zIndex:55,pointerEvents:"none"}}):null]}):h.jsxs(h.Fragment,{children:[h.jsx(gp,{side:"left",title:vh?"Browse":c.view==="agent-info"?"Projects":e.leftPanel?.title??"Navigation",icon:e.leftPanel?.icon,isCollapsed:se||bi,onToggleCollapse:()=>ne(!se),width:P,onResizeStart:dh("left"),style:zc?Hc("left"):void 0,footer:!se&&!bi?US:void 0,headerActions:e.leftPanel?.headerActions&&h.jsx(e.leftPanel.headerActions,{}),children:h.jsx("div",{"data-pane":"left",style:{display:"contents"},children:e.slots.LeftPanel&&h.jsx(e.slots.LeftPanel,{})})}),se||bi?GS:null]}),C?h.jsx("div",{"data-scout-top-row-frame":"",className:"scout-top-row-frame",style:{position:"fixed",top:v,left:ye?0:Z.width,right:0,height:k,zIndex:30,...o?.style??{}},...Object.fromEntries(Object.entries(o??{}).filter(([Y])=>Y!=="style")),children:h.jsx(Mie,{variant:"top-row",presentation:x?"slack":"scout",onOpenSearch:()=>pi(!0),rightUtility:h.jsxs(h.Fragment,{children:[c.view==="terminal"?h.jsx("button",{type:"button","data-scout-terminal-focus-toggle":"","aria-label":ye?"Exit terminal focus":"Focus terminal","aria-pressed":ye,"aria-keyshortcuts":"Meta+Shift+B Control+Shift+B",title:ye?"Exit focus (⌘⇧B)":"Focus terminal (⌘⇧B)",className:`scout-terminal-focus-toggle${ye?" scout-terminal-focus-toggle--active":""}`,onClick:()=>ke(Y=>!Y),children:ye?h.jsx(o3,{size:13,strokeWidth:1.8,"aria-hidden":"true"}):h.jsx(s3,{size:13,strokeWidth:1.8,"aria-hidden":"true"})}):null,h.jsx(Iie,{presentation:x?"slack":"scout"})]}),onInteractiveMouseDown:s})}):null,yh&&(()=>{const Y=We?"Dispatch detail":vh?"Detail":e.rightPanel?.title??"Inspector",oe=()=>{if(_c){const Re=Vie({empty:gi,forceOpen:bh,rightCollapsed:re});Nc(Re.forceOpen),Re.rightCollapsed!==re&&ie(Re.rightCollapsed);return}ie(!re)};return b&&vi?h.jsx(TS,{side:"right",title:Y,onToggle:oe,edgeOffset:0,top:E,style:Ch}):h.jsxs(h.Fragment,{children:[h.jsx(gp,{side:"right",title:Y,icon:e.rightPanel?.icon,isCollapsed:b?!1:vi,onToggleCollapse:b?void 0:oe,width:B,onResizeStart:dh("right"),floating:wi,style:{...Ch,...wi?Hc("right",We):{}},footer:ZS,headerActions:h.jsxs(h.Fragment,{children:[!We&&h.jsx("button",{type:"button",onClick:()=>pe(Re=>Vc&&!Re?!0:!Re),title:kh,"aria-label":kh,className:"p-1 hover:bg-accent/10 rounded transition-colors text-muted-foreground hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",children:wi?h.jsx(y3,{size:12}):h.jsx(R6,{size:12})}),e.rightPanel?.headerActions&&h.jsx(e.rightPanel.headerActions,{})]}),children:h.jsx("div",{"data-pane":"right",style:{display:"contents"},children:WS})}),b&&!vi?h.jsx(Xa,{side:"right",collapsed:!1,label:Y,onToggle:oe,className:"scout-rail-toggle--panel scout-rail-toggle--inspector",style:{position:"fixed",right:B,top:$,zIndex:45,transform:"translateX(50%)"}}):null]})})(),h.jsx(Jee,{status:q.status,left:h.jsx(Xie,{statusBar:q,dictationActive:S.state.activity==="listening"}),right:h.jsx(Jie,{statusBar:q,onOpenFlagPanel:()=>oo(!0),onOpenActivityLog:()=>ue(!0)}),onToggleTerminal:()=>Ft(Y=>!Y),isTerminalOpen:Jn}),h.jsx(wte,{open:G,onClose:()=>ue(!1)}),h.jsx("div",{className:"pointer-events-none",style:{position:"fixed",left:Fc,right:Bc,bottom:0,top:0,zIndex:45,transform:"translateZ(0)"},children:h.jsxs(ite,{isOpen:Jn,onClose:()=>Ft(!1),onToggleMaximize:()=>es(Y=>!Y),isMaximized:Pr,height:Math.min(ts,window.innerHeight*.8),onHeightChange:Y=>Gt(Math.min(Y,window.innerHeight*.8)),title:h.jsx(eae,{tabs:Mr,active:rs,onSelect:ns}),children:[Jn&&rs==="terminal"&&(e.slots.Terminal?h.jsx(e.slots.Terminal,{}):h.jsx("div",{className:"p-4 font-mono text-md text-neutral-400",children:"No terminal content"})),Jn&&rs==="assistant"&&h.jsx(KW,{app:e,commands:j})]})}),h.jsx(cte,{isOpen:IS,onClose:()=>pi(!1),commands:BS})]}),children:h.jsx("div",{style:JS,className:"frame-scrollbar","data-pane":"center",children:h.jsx(e.slots.Content,{})})})}),N&&M?h.jsxs("div",{ref:gh,tabIndex:-1,role:"dialog","aria-modal":"true",style:{position:"fixed",inset:0,zIndex:80,outline:"none"},children:[h.jsx("div",{"data-scout-takeover-drag-region":"","aria-hidden":"true",style:{position:"absolute",top:0,left:0,right:0,height:Math.max(28,r||28),zIndex:1,...o?.style??{}},...Object.fromEntries(Object.entries(o??{}).filter(([Y])=>Y!=="style"))}),h.jsx(M,{})]}):null,h.jsx(mte,{open:i.open,onClose:()=>i.setOpen(!1)}),h.jsx(nte,{isOpen:AS,onClose:()=>oo(!1),audienceOptions:dx}),h.jsx(bte,{})]})}function eae({tabs:e,active:t,onSelect:n}){return e.length===0?null:h.jsx("div",{className:"flex items-center gap-0.5",children:e.map(r=>{const o=r===t,s=r==="terminal"?i3:a3,i=r==="terminal"?"TERMINAL":"ASSISTANT",c=r==="terminal"?"text-emerald-400":"text-cyan-400";return h.jsxs("button",{type:"button",onClick:()=>n(r),className:`flex items-center gap-1.5 px-2.5 py-1 rounded text-xs font-bold tracking-widest font-mono transition-colors ${o?`${c} bg-white/[0.04]`:"text-neutral-500 hover:text-neutral-300"}`,children:[h.jsx(s,{size:13}),h.jsx("span",{children:i})]},r)})})}export{Mue as OpenScoutAppShell};
|