ryco-cli 0.1.24 → 0.1.26
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/dist/{GrokDriver-DSPEmiwq.mjs → AcpAdapter-BemMQNbj.mjs} +102 -604
- package/dist/{GrokDriver-RyyFeh_q.cjs → AcpAdapter-CadxcdZV.cjs} +129 -612
- package/dist/AcpNativeLogging-BsbZRRD7.mjs +312 -0
- package/dist/AcpNativeLogging-DZPZNoju.cjs +383 -0
- package/dist/AcpRegistryDriver-BfCPf8FX.cjs +222 -0
- package/dist/AcpRegistryDriver-BpXCjh9I.mjs +221 -0
- package/dist/{AzureDevOpsSourceControlProvider-CrvgKNf2.cjs → AzureDevOpsSourceControlProvider-B9N_8NJg.cjs} +14 -14
- package/dist/{AzureDevOpsSourceControlProvider-BNGEg1R8.mjs → AzureDevOpsSourceControlProvider-BcQO_CyW.mjs} +3 -3
- package/dist/{BitbucketSourceControlProvider-Bt21jw68.mjs → BitbucketSourceControlProvider-BTUY2ZT8.mjs} +3 -3
- package/dist/{BitbucketSourceControlProvider-BzhsQwH-.cjs → BitbucketSourceControlProvider-C9WuwvY2.cjs} +14 -14
- package/dist/{BunPTY-TbHbSc8S.mjs → BunPTY-DdnqQAdw.mjs} +1 -1
- package/dist/{ClaudeDriver-B7mbf51W.cjs → ClaudeDriver-BSTxNNGO.cjs} +162 -126
- package/dist/{ClaudeDriver-C4yu7Jit.mjs → ClaudeDriver-Csnp78qR.mjs} +129 -93
- package/dist/{CodexDriver-CR0S17Lb.cjs → CodexDriver-BK4HVNV4.cjs} +145 -60
- package/dist/{CodexDriver-DnnqkGoY.mjs → CodexDriver-fwcV84hX.mjs} +99 -14
- package/dist/{CodexTextGeneration-tlfe1S5W.cjs → CodexTextGeneration-Y2GSS7f1.cjs} +145 -99
- package/dist/{CodexTextGeneration-Cw-FZbSS.mjs → CodexTextGeneration-_4aT5BHa.mjs} +141 -95
- package/dist/{CopilotDriver-GxKLX5pL.mjs → CopilotDriver-B12ZJ-L_.mjs} +69 -7
- package/dist/{CopilotDriver-IBd27Ji2.cjs → CopilotDriver-C7IyIwVW.cjs} +98 -36
- package/dist/{CursorDriver-C4Enoe9N.cjs → CursorDriver-BWmCfJ-w.cjs} +38 -32
- package/dist/{CursorDriver-CNo9Uzo8.mjs → CursorDriver-C_p0v-ul.mjs} +12 -6
- package/dist/{ForgejoSourceControlProvider-Dh6DOoc8.cjs → ForgejoSourceControlProvider-DTRrllIH.cjs} +14 -14
- package/dist/{ForgejoSourceControlProvider-BGXysSX6.mjs → ForgejoSourceControlProvider-DmOGJEaJ.mjs} +3 -3
- package/dist/{GitHubSourceControlProvider-8hsv_kCE.cjs → GitHubSourceControlProvider-D-YV8WP6.cjs} +16 -17
- package/dist/{GitHubSourceControlProvider-CPCYV8Xo.mjs → GitHubSourceControlProvider-sQGcwnr3.mjs} +6 -7
- package/dist/{GitLabSourceControlProvider-B0ZbF9Zx.cjs → GitLabSourceControlProvider-kKYYnpER.cjs} +14 -14
- package/dist/{GitLabSourceControlProvider-Bvknpaon.mjs → GitLabSourceControlProvider-mIl-K-4F.mjs} +3 -3
- package/dist/GrokDriver-BFOniP_K.cjs +567 -0
- package/dist/GrokDriver-CDcWkiAi.mjs +552 -0
- package/dist/{Metrics-a1h4iBQi.mjs → Metrics-C-3MahDy.mjs} +1 -107
- package/dist/{Metrics-Bcb9vCAe.cjs → Metrics-DCKbdeoH.cjs} +0 -168
- package/dist/{NodePTY-B_p5tLYO.mjs → NodePTY-DArvQ9bX.mjs} +1 -1
- package/dist/{OpenCodeDriver-CDcvPT9v.cjs → OpenCodeDriver-CckbFEQJ.cjs} +459 -141
- package/dist/{OpenCodeDriver-0q44rSQX.mjs → OpenCodeDriver-CnWJHyDJ.mjs} +430 -112
- package/dist/SideQuestionIsolation-5eGFRW0t.mjs +26 -0
- package/dist/SideQuestionIsolation-DvVKZWxi.cjs +37 -0
- package/dist/{SourceControlProviderDiscoveryCatalog-B37RHe2u.mjs → SourceControlProviderDiscoveryCatalog-BVvq7liJ.mjs} +2 -1
- package/dist/{SourceControlProviderDiscoveryCatalog-DreaAH1H.cjs → SourceControlProviderDiscoveryCatalog-CyUhKJLD.cjs} +6 -5
- package/dist/bin.cjs +12772 -3149
- package/dist/bin.mjs +10669 -1075
- package/dist/client/assets/AccountSettings-DLbcE2w-.js +1 -0
- package/dist/client/assets/Adobe-CNS1-UCS2-fO900upv.bcmap +0 -0
- package/dist/client/assets/Adobe-GB1-UCS2-BA083yIo.bcmap +0 -0
- package/dist/client/assets/Adobe-Japan1-UCS2-BL-4M2vS.bcmap +0 -0
- package/dist/client/assets/Adobe-Korea1-UCS2-BEQZuOdo.bcmap +0 -0
- package/dist/client/assets/AiFocusSettings-FKvdkl4P.js +1 -0
- package/dist/client/assets/{AnimatedHeight-i0YhvlGD.js → AnimatedHeight-CbIEyMLg.js} +1 -1
- package/dist/client/assets/AppearanceSettings-B2LsGKmL.js +1 -0
- package/dist/client/assets/{BranchToolbar.logic-AgPy06Mx.js → BranchToolbar.logic-BqkvYNPk.js} +1 -1
- package/dist/client/assets/{BrowserPanel-BWztlNuL.js → BrowserPanel-C_C4zjrh.js} +1 -1
- package/dist/client/assets/ChatRightPanel-ibiQ79jI.js +195 -0
- package/dist/client/assets/{ChatThreadRouteView-CWoBLzR_.js → ChatThreadRouteView-c7AXmbSk.js} +1 -1
- package/dist/client/assets/CommandPaletteDialog-DdPKN6rv.js +1 -0
- package/dist/client/assets/CompositeRoot-DKwS-ADi.js +1 -0
- package/dist/client/assets/ComputerUseSettings-DM17BYP5.js +1 -0
- package/dist/client/assets/ConnectionsSettings-D6wysIC8.js +7 -0
- package/dist/client/assets/ContextHandoffEndpointLabel-CsF_maM_.js +4 -0
- package/dist/client/assets/{DiagnosticsSettings-DvnNz2AZ.js → DiagnosticsSettings-Bq2l-C4J.js} +2 -2
- package/dist/client/assets/{DialogHandle-8o3kfoiI.js → DialogHandle-DuKTleCw.js} +1 -1
- package/dist/client/assets/{DialogPopup-CLw6NCkW.js → DialogPopup-Dt7DzTWv.js} +1 -1
- package/dist/client/assets/DialogRoot-DRyawL6l.js +1 -0
- package/dist/client/assets/{DialogTitle-DCHX74Tz.js → DialogTitle-BaxfPC6e.js} +1 -1
- package/dist/client/assets/DialogTrigger-D0PJ8bRT.js +1 -0
- package/dist/client/assets/{DialogViewport-DVDl03yd.js → DialogViewport-C3B2JZWQ.js} +1 -1
- package/dist/client/assets/DraftChatThreadRouteView-B8YiD5NP.js +1 -0
- package/dist/client/assets/ETHK-B5-H-1MLb5v9x.bcmap +0 -0
- package/dist/client/assets/{ExternalIdentityWeb.logic-arHvT6AX.js → ExternalIdentityWeb.logic-CrcNfdHK.js} +1 -1
- package/dist/client/assets/FoxitDingbats-BaQLufoW.pfb +0 -0
- package/dist/client/assets/FoxitFixed-Dyd5Nipw.pfb +0 -0
- package/dist/client/assets/FoxitFixedBold-D5TuYRwj.pfb +0 -0
- package/dist/client/assets/FoxitFixedBoldItalic-BqlXQ_Yv.pfb +0 -0
- package/dist/client/assets/FoxitFixedItalic-DqjQkmbS.pfb +0 -0
- package/dist/client/assets/FoxitSerif-qbgiDIe-.pfb +0 -0
- package/dist/client/assets/FoxitSerifBold-DZZ4CclT.pfb +0 -0
- package/dist/client/assets/FoxitSerifBoldItalic-DSQtwd_X.pfb +0 -0
- package/dist/client/assets/FoxitSerifItalic-CQs5lx9Y.pfb +0 -0
- package/dist/client/assets/FoxitSymbol-BVtbc20u.pfb +0 -0
- package/dist/client/assets/GBK-EUC-H-CAORqCkf.bcmap +0 -0
- package/dist/client/assets/GBK2K-H-Cv55KPk8.bcmap +0 -0
- package/dist/client/assets/GBKp-EUC-H-CElrnV5g.bcmap +0 -0
- package/dist/client/assets/GBT-EUC-H-BTsQIL1M.bcmap +0 -0
- package/dist/client/assets/GBT-H-DL9h-WkS.bcmap +0 -0
- package/dist/client/assets/GBTpc-EUC-H-DnIh5WJ3.bcmap +0 -0
- package/dist/client/assets/{GlassSurface-GY6owikG.js → GlassSurface-CBIEgwt1.js} +1 -1
- package/dist/client/assets/HKscs-B5-H-CXbBbq6g.bcmap +0 -0
- package/dist/client/assets/{HostedConnectionControls-COUhSe9x.js → HostedConnectionControls-DOpTlXzE.js} +1 -1
- package/dist/client/assets/HostedHubRoot-C1jq8cM6.js +2 -0
- package/dist/client/assets/{HostedNativeAuthorizationRoute-DZhYxv--.js → HostedNativeAuthorizationRoute-Clw1DHQW.js} +2 -2
- package/dist/client/assets/HostedNodeRenameDialog-Bd_Qu_ek.js +1 -0
- package/dist/client/assets/{HostedRelayTrustNotice-Bl6On0Yi.js → HostedRelayTrustNotice-CGcBpT9m.js} +1 -1
- package/dist/client/assets/IntegrationsSettingsPanel-J0qODRW-.js +2 -0
- package/dist/client/assets/KSC-Johab-H-CGtV3MPT.bcmap +0 -0
- package/dist/client/assets/{KeybindingsSettings-CPtXx-W2.js → KeybindingsSettings-CwxIHsFy.js} +1 -1
- package/dist/client/assets/{LazyBrowserPanel-SUIBB7B4.js → LazyBrowserPanel-VNAn6AUL.js} +2 -2
- package/dist/client/assets/LiberationSans-Bold-BPt4bU5Z.ttf +0 -0
- package/dist/client/assets/LiberationSans-BoldItalic-Bj53-jFw.ttf +0 -0
- package/dist/client/assets/LiberationSans-Italic-5QhGB3P9.ttf +0 -0
- package/dist/client/assets/LiberationSans-Regular-cbskN6YR.ttf +0 -0
- package/dist/client/assets/McpServersSettings-1pkIeutq.js +6 -0
- package/dist/client/assets/MobileSheet-DddfN8c2.js +1 -0
- package/dist/client/assets/{NodeSecuritySettings-BFifrshE.js → NodeSecuritySettings-BOIZeFZo.js} +1 -1
- package/dist/client/assets/OpinionatedPluginsSettings-oTIrPtIb.js +1 -0
- package/dist/client/assets/PdfAttachmentPreview-BCMO9OHD.js +54 -0
- package/dist/client/assets/{PhoneGetAppInterstitial-R0cqI17q.js → PhoneGetAppInterstitial-0EOj-PbW.js} +1 -1
- package/dist/client/assets/PhoneHome-Cg7l3b1T.js +1 -0
- package/dist/client/assets/PhoneSettingsSurface-BXAUtZ9M.js +2 -0
- package/dist/client/assets/ProvidersSettingsPanel-BaJgypXu.js +1 -0
- package/dist/client/assets/{QuitShortcutFeedback-CklL3jMd.js → QuitShortcutFeedback-DgJFEd6b.js} +1 -1
- package/dist/client/assets/{RedactedSensitiveText-CLPBtvH1.js → RedactedSensitiveText-D1VC2xa7.js} +1 -1
- package/dist/client/assets/RootAppShell-D2RjZ9jQ.js +7 -0
- package/dist/client/assets/Separator-CeMncdkm.js +1 -0
- package/dist/client/assets/SettingsDialog-B2hEb6u8.js +2 -0
- package/dist/client/assets/SettingsPanels-DtWLQDne.js +3 -0
- package/dist/client/assets/{SettingsPanels.editor-9pSZP875.js → SettingsPanels.editor-DJRckD71.js} +1 -1
- package/dist/client/assets/{SourceControlSettings-C1F3Brcn.js → SourceControlSettings-IpoZrjt5.js} +1 -1
- package/dist/client/assets/StatisticsPage-CUpE_5Gr.js +1 -0
- package/dist/client/assets/StatisticsPanel-CHrAY5AP.js +1 -0
- package/dist/client/assets/StatisticsSettingsLink-bGWuxNG3.js +1 -0
- package/dist/client/assets/{ThreadTerminalDrawer-CHZ60lPI.js → ThreadTerminalDrawer-BEv83xrk.js} +11 -11
- package/dist/client/assets/ThreadWorkspacePanel-BdMdJVHJ.js +2073 -0
- package/dist/client/assets/UniCNS-UCS2-H-DWzv8UhH.bcmap +0 -0
- package/dist/client/assets/UniCNS-UTF16-H-Bw0JKgCq.bcmap +0 -0
- package/dist/client/assets/UniCNS-UTF32-H-IE_GrH2i.bcmap +0 -0
- package/dist/client/assets/UniCNS-UTF8-H-BbLcFh6Q.bcmap +0 -0
- package/dist/client/assets/UniGB-UCS2-H-D7xzRvZN.bcmap +0 -0
- package/dist/client/assets/UniGB-UTF16-H-DKjbEwc0.bcmap +0 -0
- package/dist/client/assets/UniGB-UTF32-H-Behfouj5.bcmap +0 -0
- package/dist/client/assets/UniGB-UTF8-H-EROft1ro.bcmap +0 -0
- package/dist/client/assets/UniJIS-UCS2-H-2DbZ0MaQ.bcmap +0 -0
- package/dist/client/assets/UniJIS-UTF16-H-BlDDPdCK.bcmap +0 -0
- package/dist/client/assets/UniJIS-UTF32-H-BIQPWkjv.bcmap +0 -0
- package/dist/client/assets/UniJIS-UTF8-H-CGusholx.bcmap +0 -0
- package/dist/client/assets/UniJIS2004-UTF16-H-KXixH-HI.bcmap +0 -0
- package/dist/client/assets/UniJIS2004-UTF32-H-CXrD-9YE.bcmap +0 -0
- package/dist/client/assets/UniJIS2004-UTF8-H-BkOctZjn.bcmap +0 -0
- package/dist/client/assets/UniJISX0213-UTF32-H-BavAhZjb.bcmap +0 -0
- package/dist/client/assets/UniJISX02132004-UTF32-H-DAH-AgUq.bcmap +0 -0
- package/dist/client/assets/UniKS-UCS2-H-YeUc7k1L.bcmap +0 -0
- package/dist/client/assets/UniKS-UTF16-H-B0dvB-Td.bcmap +0 -0
- package/dist/client/assets/UniKS-UTF32-H-olR_LtmR.bcmap +0 -0
- package/dist/client/assets/UniKS-UTF8-H-CbpebD-y.bcmap +0 -0
- package/dist/client/assets/{activity-BMBx2Fu0.js → activity-BmRcsTyL.js} +1 -1
- package/dist/client/assets/{alert-CXnC_RJc.js → alert-C5UiA2xk.js} +1 -1
- package/dist/client/assets/{appChrome-BzM66lXM.js → appChrome-CsZ2ylc1.js} +1 -1
- package/dist/client/assets/{arrow-left-CymyVbCi.js → arrow-left-CSz-z20j.js} +1 -1
- package/dist/client/assets/{arrow-right-9wyq4YVq.js → arrow-right-DEi91hao.js} +1 -1
- package/dist/client/assets/{arrow-up-right-mfU38K6p.js → arrow-up-right-D7SpcTV9.js} +1 -1
- package/dist/client/assets/authorization-B1YXfej3.js +1 -0
- package/dist/client/assets/badge-BjvTY7-E.js +1 -0
- package/dist/client/assets/{bot-BR3RyOWP.js → bot-SC4UGZyw.js} +1 -1
- package/dist/client/assets/{capabilities-C8sxDbKT.js → capabilities-BCkDNe83.js} +1 -1
- package/dist/client/assets/{chart-column-CcRi3pAd.js → chart-column-C08MuLgY.js} +1 -1
- package/dist/client/assets/chevron-right-DgB53U1_.js +1 -0
- package/dist/client/assets/{clipboard-copy-ezz8rnaT.js → clipboard-copy-D74Wvnon.js} +1 -1
- package/dist/client/assets/{data-list-ZLhzdlED.js → data-list-CZ4Utnfl.js} +1 -1
- package/dist/client/assets/{desktopWorkspace-P28r2lN2.js → desktopWorkspace-DVfn9ZT_.js} +1 -1
- package/dist/client/assets/{download-BA9L9tK9.js → download-Dio40wIJ.js} +1 -1
- package/dist/client/assets/editorPreferences-2dG4uloq.js +1 -0
- package/dist/client/assets/{empty-3NpXLnAM.js → empty-6LExKYgQ.js} +1 -1
- package/dist/client/assets/{group-D5qBdsaB.js → group-D_mu0Kiq.js} +1 -1
- package/dist/client/assets/{hostedConnectionCoordinator-CLV-JD1S.js → hostedConnectionCoordinator-YkDLnATK.js} +1 -1
- package/dist/client/assets/{hubRoutes-EWJ3Gdod.js → hubRoutes-D3quWvU7.js} +1 -1
- package/dist/client/assets/{index-DxCd1PgA.js → index-7MTgf8YI.js} +2 -2
- package/dist/client/assets/{input-DrOL1KPS.js → input-CfVJycb1.js} +1 -1
- package/dist/client/assets/jbig2-CNFLgX9F.wasm +0 -0
- package/dist/client/assets/kbd-uFa_tY-L.js +1 -0
- package/dist/client/assets/{key-round-D2DtQ7aS.js → key-round-C-oUSjpF.js} +1 -1
- package/dist/client/assets/{layers-DtSJWmwy.js → layers-Co2a5C1k.js} +1 -1
- package/dist/client/assets/{log-out-YAp9fsOg.js → log-out-pWFhbvwr.js} +1 -1
- package/dist/client/assets/{logging-BuUPX1SP.js → logging-JMrwaeZh.js} +1 -1
- package/dist/client/assets/main-BNPtp9Z0.css +2 -0
- package/dist/client/assets/main-CGeD6yVE.js +9 -0
- package/dist/client/assets/openjpeg-MeY6OQBn.wasm +0 -0
- package/dist/client/assets/{palette-D18VboLH.js → palette-B_6C4fD6.js} +1 -1
- package/dist/client/assets/pdf.worker.min-Dswkl-cV.mjs +29 -0
- package/dist/client/assets/{play-d3KUi4G6.js → play-DFtc9zBy.js} +1 -1
- package/dist/client/assets/primary-CNUdEGcv.js +2 -0
- package/dist/client/assets/providerDriverMeta-Cg_XLUfo.js +1 -0
- package/dist/client/assets/{ProviderModelPicker-dwWhl7Uf.js → providerInstances-JaDrOWPZ.js} +1 -1
- package/dist/client/assets/providerModels-5uOq3qPC.js +1 -0
- package/dist/client/assets/qcms_bg-3PJi_GXR.wasm +0 -0
- package/dist/client/assets/{qr-code-Bk1kdf_k.js → qr-code-BU354aLS.js} +1 -1
- package/dist/client/assets/{qr-code-MAZkoKtL.js → qr-code-DaHWf7Oq.js} +1 -1
- package/dist/client/assets/quickjs-eval-zJSp5SB4.wasm +0 -0
- package/dist/client/assets/radio-group-DKaA1eey.js +2 -0
- package/dist/client/assets/{refresh-cw-DY3_Ph-S.js → refresh-cw-CY5BeUEr.js} +1 -1
- package/dist/client/assets/runtime-BKneT96Q.js +17 -0
- package/dist/client/assets/{save-ugJXuJRM.js → save-DIHMjHXd.js} +1 -1
- package/dist/client/assets/{scroll-area-BMnGzd2a.js → scroll-area-Cq4SX9P8.js} +1 -1
- package/dist/client/assets/{scrollEdges-QLSFwGSQ.js → scrollEdges-BaWRjrac.js} +1 -1
- package/dist/client/assets/{separator-BwUYkCkX.js → separator-BN705fC0.js} +1 -1
- package/dist/client/assets/{settingsLayout-C6SUmJVB.js → settingsLayout-DQERzSce.js} +1 -1
- package/dist/client/assets/{sheet-DLy4aeVa.js → sheet-CFvRY7T6.js} +1 -1
- package/dist/client/assets/{shield-Zq_ygsnJ.js → shield-Zn2kFj5M.js} +1 -1
- package/dist/client/assets/{shield-alert-DfUhTI4-.js → shield-alert-DMB5gKiC.js} +1 -1
- package/dist/client/assets/{shield-check-CO4SMhAs.js → shield-check-DyNf6Bky.js} +1 -1
- package/dist/client/assets/{sidebar-DNnW-a2V.js → sidebar-Bsh64sLK.js} +1 -1
- package/dist/client/assets/sidebarProjectFolders-CQbpO9ZI.js +4 -0
- package/dist/client/assets/{sidebarStatusText-CawrXnx0.js → sidebarStatusText-DCo-whyK.js} +1 -1
- package/dist/client/assets/{skeleton-DRm4_OvB.js → skeleton-DEuowfjY.js} +1 -1
- package/dist/client/assets/{smartphone-O2VACDhU.js → smartphone-BLWJ7C9-.js} +1 -1
- package/dist/client/assets/{sparkles-isHutYWU.js → sparkles-DAXDXp_s.js} +1 -1
- package/dist/client/assets/src-DPpEXU6w.js +14 -0
- package/dist/client/assets/{star-7UHEnC3x.js → star-CjQxHYbD.js} +1 -1
- package/dist/client/assets/switch-LahPAvrd.js +48 -0
- package/dist/client/assets/{toggle-CaKBNe6W.js → toggle-45lsrmyi.js} +1 -1
- package/dist/client/assets/{toggle-group-UeFeTI3u.js → toggle-group-D5pl24ED.js} +1 -1
- package/dist/client/assets/{tokenModePresentation-DV56ekA4.js → tokenModePresentation-CPUsUGY4.js} +1 -1
- package/dist/client/assets/tooltip-B8-izeMo.js +1 -0
- package/dist/client/assets/{unplug-DisTpujT.js → unplug-Bjpxv8i0.js} +1 -1
- package/dist/client/assets/usage-8vQUo0mr.js +1 -0
- package/dist/client/assets/useAppSidebarCollapsed-uwz9Hlgc.js +1 -0
- package/dist/client/assets/useBaseUiId-BtuL7q77.js +1 -0
- package/dist/client/assets/useLabelableId-N_LsKNbf.js +1 -0
- package/dist/client/assets/useNavigate-DADLi29i.js +1 -0
- package/dist/client/assets/usePhoneThreadActions-B9_HK7tn.js +1 -0
- package/dist/client/assets/usePopupViewport-w8BEny9j.js +1 -0
- package/dist/client/assets/useScrollLock-bCmUzTgK.js +1 -0
- package/dist/client/assets/useStatistics-DJtONxT0.js +55 -0
- package/dist/client/assets/useTriggerFocusGuards-C7JWO2LT.js +1 -0
- package/dist/client/assets/useValueChanged-DkoUO9bY.js +1 -0
- package/dist/client/assets/{user-round-DctamWV6.js → user-round-DEWIPpNs.js} +1 -1
- package/dist/client/assets/{vscode-icons-Dw-LGJAv.js → vscode-icons-DTH-Vj-_.js} +1 -1
- package/dist/client/assets/workspaceMetadataProjection-BnpxBe8S.js +1 -0
- package/dist/client/assets/{wrench-Ds8eZerZ.js → wrench-36WYdK_a.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/collectUint8StreamText-BAUF-vzz.mjs +37 -0
- package/dist/collectUint8StreamText-vagpNUMJ.cjs +42 -0
- package/dist/deviceHostWorker-C-BSnmkn.mjs +167 -0
- package/dist/deviceHostWorker-CYnrwfrv.cjs +169 -0
- package/dist/git-C4iJMbBu.mjs +132 -0
- package/dist/git-irmB8_k7.cjs +218 -0
- package/dist/{makeManagedServerProvider-GZcpSLrW.mjs → makeManagedServerProvider-BINne1KE.mjs} +3 -38
- package/dist/{makeManagedServerProvider-VzxWN-04.cjs → makeManagedServerProvider-DGbd8BhM.cjs} +1 -60
- package/dist/resource-monitor/ryco-resource-monitor +0 -0
- package/dist/resource-monitor/ryco-resource-monitor.exe +0 -0
- package/dist/resource-monitor/win32-arm64/ryco-resource-monitor.exe +0 -0
- package/dist/resource-monitor/win32-x64/ryco-resource-monitor.exe +0 -0
- package/dist/runtimeSession-Bj0OUcNJ.cjs +63 -0
- package/dist/runtimeSession-CA6cLWg0.mjs +40 -0
- package/dist/schemaJson-CaG1bOvo.mjs +49 -0
- package/dist/schemaJson-CuhFxa8p.cjs +66 -0
- package/dist/{collectUint8StreamText-DStwNTTK.cjs → src-BlzIcnVG.cjs} +573 -117
- package/dist/{collectUint8StreamText-C_VNyArd.mjs → src-DtEOcXdl.mjs} +389 -95
- package/package.json +1 -1
- package/dist/AcpNativeLogging-COepku4a.cjs +0 -5130
- package/dist/AcpNativeLogging-D7e1dn7s.mjs +0 -5015
- package/dist/client/assets/AccountSettings-ApnDA1f-.js +0 -1
- package/dist/client/assets/AiFocusSettings-CNmGHEcA.js +0 -1
- package/dist/client/assets/AppearanceSettings-BG8W4DP0.js +0 -1
- package/dist/client/assets/ChatRightPanel-a6UOHNMm.js +0 -194
- package/dist/client/assets/CommandPaletteDialog-B2iKWCUi.js +0 -1
- package/dist/client/assets/CompositeRoot-C1G-Ejus.js +0 -1
- package/dist/client/assets/ComputerUseSettings-CPwWoHWj.js +0 -1
- package/dist/client/assets/ConnectionsSettings-CPMkuxza.js +0 -7
- package/dist/client/assets/ContextHandoffEndpointLabel-BildLLDY.js +0 -4
- package/dist/client/assets/DialogRoot-SKkIuQHA.js +0 -1
- package/dist/client/assets/DialogTrigger-Bl_fcIV2.js +0 -1
- package/dist/client/assets/DraftChatThreadRouteView-CEDYjbKq.js +0 -1
- package/dist/client/assets/HostedHubRoot-BTWc0XoQ.js +0 -2
- package/dist/client/assets/IntegrationsSettingsPanel-n9owMZf-.js +0 -2
- package/dist/client/assets/McpServersSettings-BWIUud0Z.js +0 -6
- package/dist/client/assets/MobileSheet-NTayGHF6.js +0 -1
- package/dist/client/assets/OpinionatedPluginsSettings-D7WuuNWZ.js +0 -1
- package/dist/client/assets/PhoneHome-FqWvnJP_.js +0 -1
- package/dist/client/assets/PhoneSettingsSurface-w5PJnoBc.js +0 -2
- package/dist/client/assets/ProvidersSettingsPanel-Ww1ch3xA.js +0 -1
- package/dist/client/assets/RootAppShell-BdQCs2XJ.js +0 -7
- package/dist/client/assets/Separator-CpYBhf-I.js +0 -1
- package/dist/client/assets/SettingsDialog-DeMzEeCP.js +0 -2
- package/dist/client/assets/SettingsPanels-ZxNz9ZfL.js +0 -3
- package/dist/client/assets/StatisticsPage-C7v-6CTr.js +0 -1
- package/dist/client/assets/StatisticsPanel-CeIjiBm8.js +0 -1
- package/dist/client/assets/StatisticsSettingsLink-5s_violW.js +0 -1
- package/dist/client/assets/ThreadWorkspacePanel-Ct5kMcuY.js +0 -2073
- package/dist/client/assets/authorization-CjOFkg7b.js +0 -1
- package/dist/client/assets/badge-Dg7mXiOh.js +0 -1
- package/dist/client/assets/chevron-right-CuUjBsQV.js +0 -1
- package/dist/client/assets/editorPreferences-DeKdSV3s.js +0 -1
- package/dist/client/assets/kbd-rWDjJnWX.js +0 -1
- package/dist/client/assets/main-BbtLAX7M.js +0 -9
- package/dist/client/assets/main-D4CtFNPY.css +0 -2
- package/dist/client/assets/monitor-OyD484tI.js +0 -1
- package/dist/client/assets/primary-D_D7eLwT.js +0 -2
- package/dist/client/assets/providerDriverMeta-DNTocCcU.js +0 -1
- package/dist/client/assets/providerModels-bFbEIfL9.js +0 -1
- package/dist/client/assets/radio-group-D-VCGinX.js +0 -2
- package/dist/client/assets/runtime-Djy96GJd.js +0 -17
- package/dist/client/assets/sidebarProjectFolders-ygpaKZM6.js +0 -4
- package/dist/client/assets/src-BSuAGqhK.js +0 -14
- package/dist/client/assets/switch-DD1qVLgN.js +0 -48
- package/dist/client/assets/tooltip-DXvXxL37.js +0 -1
- package/dist/client/assets/useAppSidebarCollapsed-CaAsLi1q.js +0 -1
- package/dist/client/assets/useBaseUiId-CJN4MvrU.js +0 -1
- package/dist/client/assets/useLabelableId-BsDFG9Oj.js +0 -1
- package/dist/client/assets/useNavigate-cLfxn_9L.js +0 -1
- package/dist/client/assets/usePhoneThreadActions-rekHL1Mi.js +0 -1
- package/dist/client/assets/usePopupViewport-kXU31P6l.js +0 -1
- package/dist/client/assets/useScrollLock-DjMxrUJe.js +0 -1
- package/dist/client/assets/useStatistics-BYP-9CmW.js +0 -55
- package/dist/client/assets/useTriggerFocusGuards-DuAm2B8C.js +0 -1
- package/dist/client/assets/useValueChanged-DreFjrMK.js +0 -1
- package/dist/client/assets/workspaceMetadataProjection-BL4sEIL2.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{$c as n,As as r,Bo as i,Bs as a,Do as o,Ec as s,Fs as c,Gs as l,Hr as u,Hs as d,Is as f,Jo as p,Kc as m,Ma as h,Mc as g,Ms as _,Nc as v,No as y,Ns as b,Ps as x,Qc as S,Ro as C,Rs as w,Sa as T,So as E,To as D,Us as ee,Vc as O,Vo as k,Vr as A,Ws as j,Xo as M,Xs as te,Yo as ne,Zs as N,_o as P,bc as F,bo as I,bs as re,ds as L,ec as R,el as z,gc as B,gs as ie,hc as V,hs as H,il as ae,ja as oe,jc as U,kc as W,lo as G,ls as K,mc as q,ms as se,nc as J,nl as ce,no as le,os as Y,pc as ue,po as de,qc as X,rc as fe,rl as pe,ro as me,to as he,uc as ge,uo as _e,vc as ve,vl as ye,vo as be,vs as xe,wc as Se,xc as Ce,xs as we,yc as Z,zc as Te}from"./runtime-BKneT96Q.js";import{t as Ee}from"./compiler-runtime-qmuS0Svy.js";import{O as De,T as Oe,f as ke,r as Ae}from"./usePopupViewport-w8BEny9j.js";import{m as je,n as Me,p as Ne,s as Pe,t as Fe}from"./useScrollLock-bCmUzTgK.js";import{t as Ie}from"./useBaseUiId-BtuL7q77.js";import{t as Le}from"./useValueChanged-DkoUO9bY.js";import{t as Re}from"./useControlled-DQwgzrEC.js";import{i as ze,n as Be,r as Ve,s as He,t as Ue,u as We}from"./useLabelableId-N_LsKNbf.js";import{i as Ge,n as Ke,r as qe,t as Je}from"./scrollEdges-BaWRjrac.js";var Q=e(t(),1);function Ye(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:o=!1,stickIfOpen:s=!0,touchOpenDelay:c=0,reason:l=p}=t,u=`rootStore`in e?e.rootStore:e,d=u.context.dataRef,f=Q.useRef(void 0),m=U(),h=W(),g=Q.useMemo(()=>{function e(e,t,n,r){let i=D(l,t,n);e&&r===`touch`&&c>0?h.start(c,()=>{u.setOpen(!0,i)}):u.setOpen(e,i)}function t(e,t,n){let r=d.current.openEvent,a=u.select(`domReferenceElement`)!==t;return e&&a||!e||!i?!0:r&&s?!n(r.type):!1}return{onPointerDown(e){f.current=a(e.pointerType,!0)&&ee(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(n){let i=f.current,s=n.nativeEvent,c=u.select(`open`);if(n.button!==0||r===`click`||a(i,!0)&&o)return;let l=t(c,n.currentTarget,e=>e===`click`||e===`mousedown`),d=F(s);if(N(d)){e(l,s,d,i);return}let p=n.currentTarget;m.request(()=>{e(l,s,p,i)})},onClick(n){if(r===`mousedown-only`)return;let i=f.current;if(r===`mousedown`&&i){f.current=void 0;return}a(i,!0)&&o||e(t(u.select(`open`),n.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),n.nativeEvent,n.currentTarget,i)},onKeyDown(){f.current=void 0}}},[d,r,o,l,u,s,i,m,h,c]);return Q.useMemo(()=>n?{reference:g}:pe,[n,g])}var Xe=`Escape`;function Ze(e){return Se&&e.movementX===0&&e.movementY===0}function Qe(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function $e(e,t){return Qe(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function et(e,t,n){return Qe(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function tt(e,t,n){return Qe(t,n?e===q:e===V,e===ue)}function nt(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===Xe:Qe(t,n?e===V:e===q,e===B)}function rt(e,t){let{listRef:a,activeIndex:o,onNavigate:s=()=>{},enabled:u=!0,selectedIndex:f=null,allowEscape:p=!1,loopFocus:m=!1,nested:h=!1,rtl:g=!1,virtual:x=!1,focusItemOnOpen:S=`auto`,focusItemOnHover:C=!0,openOnArrowKeyDown:w=!0,disabledIndices:T=void 0,orientation:E=`vertical`,parentOrientation:k,id:A,resetOnPointerLeave:M=!0,externalTree:ne,grid:N}=t,re=N!=null,L=`rootStore`in e?e.rootStore:e,R=L.useState(`open`),z=L.useState(`floatingElement`),B=L.useState(`domReferenceElement`),ie=L.context.dataRef,V=l(z),H=te(B),ae=I(V),oe=P(),W=be(ne),G=Q.useRef(S),K=Q.useRef(f??-1),q=Q.useRef(null),se=Q.useRef(!0),J=X(e=>{s(K.current===-1?null:K.current,e)}),ce=Q.useRef(!!z),le=Q.useRef(R),Y=Q.useRef(!1),ue=Q.useRef(!1),de=Q.useRef(null),fe=I(T),pe=I(R),me=I(f),he=I(M),ge=U(),_e=U(),ye=X(()=>{function e(e){x?W?.events.emit(`virtualfocus`,e):de.current=je(e,{sync:Y.current,preventScroll:!0})}let t=a.current[K.current],n=ue.current;t&&e(t),(Y.current?e=>e():e=>ge.request(e))(()=>{let r=a.current[K.current]||t;r&&(t||e(r),Ee&&(n||!se.current)&&r.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});n(()=>{ie.current.orientation=E},[ie,E]),n(()=>{u&&(R&&z?(K.current=f??-1,G.current&&f!=null&&(ue.current=!0,J())):ce.current&&(K.current=-1,J()))},[u,R,z,f,J]),n(()=>{if(u){if(!R){Y.current=!1;return}if(z){if(o==null){if(Y.current=!1,me.current!=null)return;if(ce.current&&(K.current=-1,ye()),(!le.current||!ce.current)&&G.current&&(q.current!=null||G.current===!0&&q.current==null)){let e=0,t=()=>{a.current[0]==null?(e<2&&(e?e=>_e.request(e):queueMicrotask)(t),e+=1):(K.current=q.current==null||et(q.current,E,g)||h?b(a):_(a),q.current=null,J())};t()}}else c(a.current,o)||(K.current=o,ye(),ue.current=!1)}}},[u,R,z,o,me,h,a,E,g,J,ye,_e]),n(()=>{if(!u||z||!W||x||!ce.current)return;let e=W.nodesRef.current,t=e.find(e=>e.id===oe)?.context?.elements.floating,n=ve(v(B??t??null)),r=e.some(e=>e.context&&Z(e.context.elements.floating,n));t&&!r&&se.current&&t.focus({preventScroll:!0})},[u,z,B,W,oe,x]),n(()=>{le.current=R,ce.current=!!z}),n(()=>{R||(q.current=null,G.current=S)},[R,S]);let xe=o!=null,Se=X(e=>{if(!pe.current)return;let t=a.current.indexOf(e.currentTarget);t!==-1&&(K.current!==t||o!==t)&&(K.current=t,J(e))}),Ce=X(()=>k??W?.nodesRef.current.find(e=>e.id===oe)?.context?.dataRef?.current.orientation),we=X(()=>b(a,fe.current)),Te=X(e=>{if(se.current=!1,Y.current=!0,e.which===229||!pe.current&&e.currentTarget===ae.current)return;if(h&&nt(e.key,E,g,re)){$e(e.key,Ce())||j(e),L.setOpen(!1,D(i,e.nativeEvent)),O(B)&&(x?W?.events.emit(`virtualfocus`,B):B.focus());return}let t=K.current,n=b(a,T),o=_(a,T);if(H||(e.key===`Home`&&(j(e),K.current=n,J(e)),e.key===`End`&&(j(e),K.current=o,J(e))),N!=null){let t=N(e,K.current,a,E,m,g,T,n,o);if(t!=null&&(K.current=t,J(e)),E===`both`)return}if($e(e.key,E)){if(j(e),R&&!x&&ve(e.currentTarget.ownerDocument)===e.currentTarget){K.current=et(e.key,E,g)?n:o,J(e);return}et(e.key,E,g)?m?t>=o?p&&t!==a.current.length?K.current=-1:(Y.current=!1,K.current=n):K.current=r(a.current,{startingIndex:t,disabledIndices:T}):K.current=Math.min(o,r(a.current,{startingIndex:t,disabledIndices:T})):m?t<=n?p&&t!==-1?K.current=a.current.length:(Y.current=!1,K.current=o):K.current=r(a.current,{startingIndex:t,decrement:!0,disabledIndices:T}):K.current=Math.max(n,r(a.current,{startingIndex:t,decrement:!0,disabledIndices:T})),c(a.current,K.current)&&(K.current=-1),J(e)}}),Ee=Q.useMemo(()=>({onFocus(e){Y.current=!0,Se(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){Ze(e)||(Y.current=!0,ue.current=!1,C&&Se(e))},onPointerLeave(e){if(!pe.current||!se.current||e.pointerType===`touch`)return;Y.current=!0;let t=e.relatedTarget;if(C&&!a.current.includes(t)&&he.current&&(de.current?.(),de.current=null,K.current=-1,J(e),!x)){let e=ae.current,t=ve(v(e));e&&Z(e,t)&&e.focus({preventScroll:!0})}}}),[Se,pe,ae,C,a,J,he,x]),De=Q.useMemo(()=>x&&R&&xe&&{"aria-activedescendant":`${A}-${o}`},[x,R,xe,A,o]),Oe=Q.useMemo(()=>({...H?{}:De,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&R&&!x){let t=F(e.nativeEvent);if(t&&!Z(ae.current,t))return;j(e),L.setOpen(!1,D(y,e.nativeEvent)),O(B)&&B.focus();return}Te(e)},onPointerMove(e){Ze(e)||(se.current=!0)}}),[De,Te,ae,H,L,R,x,B]),ke=Q.useMemo(()=>{function e(e){L.setOpen(!0,D(i,e.nativeEvent,e.currentTarget))}function t(e){S===`auto`&&d(e.nativeEvent)&&(G.current=!x)}function n(e){G.current=S,S===`auto`&&ee(e.nativeEvent)&&(G.current=!0)}return{onKeyDown(t){let n=L.select(`open`);se.current=!1;let r=t.key.startsWith(`Arrow`),i=tt(t.key,Ce(),g),a=$e(t.key,E),o=(h?i:a)||t.key===`Enter`||t.key.trim()===``;if(x&&n)return Te(t);if(n||w||!r){if(o){let e=$e(t.key,Ce());q.current=h&&e?null:t.key}if(h){i&&(j(t),n?(K.current=we(),J(t)):e(t));return}a&&(me.current!=null&&(K.current=me.current),j(t),!n&&w?e(t):Te(t),n&&J(t))}},onFocus(e){L.select(`open`)&&!x&&(K.current=-1,J(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[Te,S,we,h,J,L,w,E,Ce,g,me,x]),Ae=Q.useMemo(()=>({...De,...ke}),[De,ke]);return Q.useMemo(()=>u?{reference:Ae,floating:Oe,item:Ee,trigger:ke}:{},[u,Ae,Oe,ke,Ee])}function it(e,t){let{listRef:r,elementsRef:i,activeIndex:a,onMatch:o,disabledIndices:s,onTyping:c,enabled:l=!0,resetMs:u=750,selectedIndex:d=null}=t,p=`rootStore`in e?e.rootStore:e,m=p.useState(`open`),h=W(),g=Q.useRef(``),_=Q.useRef(d??a??-1),v=Q.useRef(null),y=X(e=>{function t(e){return i?.current[e]}function n(e){let n=t(e);return n&&!x(n)||n?.matches(`:disabled`)?!1:s==null||!f(ce,e,s)}function l(e,t,r=0){if(e.length===0)return-1;let i=(r%e.length+e.length)%e.length,a=t.toLowerCase();for(let t=0;t<e.length;t+=1){let r=(i+t)%e.length;if(e[r]?.toLowerCase().startsWith(a)&&n(r))return r}return-1}let p=r.current;if(g.current.length>0&&e.key===` `&&(j(e),c?.(!0)),g.current.length>0&&g.current[0]!==` `&&l(p,g.current)===-1&&e.key!==` `&&c?.(!1),p==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;m&&e.key!==` `&&(j(e),c?.(!0));let y=g.current===``;y&&(_.current=d??a??-1),p.every((e,t)=>e&&n(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&g.current===e.key&&(g.current=``,_.current=v.current),g.current+=e.key,h.start(u,()=>{g.current=``,_.current=v.current,c?.(!1)});let b=((y?d??a??-1:_.current)??0)+1,S=l(p,g.current,b);S===-1?e.key!==` `&&(g.current=``,c?.(!1)):(o?.(S),v.current=S)}),b=X(e=>{let t=e.relatedTarget,n=p.select(`domReferenceElement`),r=p.select(`floatingElement`);Z(n,t)||Z(r,t)||(h.clear(),g.current=``,_.current=v.current,c?.(!1))});n(()=>{(m||d===null)&&(h.clear(),v.current=null,g.current!==``&&(g.current=``))},[m,d,h]);let S=Q.useMemo(()=>({onKeyDown:y,onBlur:b}),[y,b]);return Q.useMemo(()=>l?{reference:S,floating:S}:{},[l,S])}var $=ye();function at(e){let t=Q.useRef(``),n=Q.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:Q.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function ot(e,t){let{onClick:n,onPointerDown:r}=at(X((n,r)=>{(typeof e==`function`?e():e)||t(r||(s?`touch`:``))}));return Q.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function st(e){let[t,n]=Q.useState(null),r=ot(e,n);return Le(e,t=>{t&&!e&&n(null)}),Q.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}function ct(e){let t=Q.useRef(!0);t.current&&(t.current=!1,e())}function lt(e,t,n=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}var ut=(e,t)=>Object.is(e,t);function dt(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function ft(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!lt(e,t,(e,t)=>dt(e,t,n)):e!==t}function pt(e,t,n){return e?e.some(e=>e!==void 0&&dt(t,e,n)):!1}function mt(e,t,n){return e?e.findIndex(e=>e!==void 0&&dt(e,t,n)):-1}function ht(e,t){if(t!==ut)return n=>pt(e,n,t);let n=new Set(e);return n.delete(void 0),t=>n.has(t)&&(t!==0||e.some(e=>Object.is(t,e)))}function gt(e,t,n,r){let i=r&&Array.isArray(t)?e.findIndex(ht(t,n)):mt(e,t,n);return i===-1?null:i}function _t(e,t,n,r,i,a){return pt(r,t,i)?a!=null&&e>a&&pt(r,n[a],i)?a:e:e===a?gt(n,r,i,!0):a}function vt(e,t,n){return e.filter(e=>!dt(t,e,n))}function yt(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function bt(e){return typeof e==`object`&&!!e&&Array.isArray(e.items)}function xt(e){return bt(e?.[0])}function St(e){return xt(e)?e.flatMap(e=>e.items):e}function Ct(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(xt(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function wt(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return yt(e)}function Tt(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?yt(e.value):yt(e)}function Et(e,t,n){function r(){return wt(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){let n=St(t);if(typeof e!=`object`||!e){let t=n.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=n.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function Dt(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,$.jsx)(Q.Fragment,{children:Et(r,t,n)},i)),e),[])}var Ot=5;function kt(e,t){let n=At(t);return e.clientX>=n.left-Ot&&e.clientX<=n.right+Ot&&e.clientY>=n.top-Ot&&e.clientY<=n.bottom+Ot}function At(e){let t=e.getBoundingClientRect(),n=Te(e);if(Ce)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}function jt(e,t){return e??t}var Mt=Q.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Nt(){return Q.useContext(Mt)}function Pt(e){let{children:t,elementsRef:r,labelsRef:i,onMapChange:a}=e,o=X(a),[,s]=Q.useState(!1),c=z(It).current,l=z(Ft).current,u=Q.useRef(0),d=Q.useRef(!0),f=Q.useRef(null),p=Q.useRef(null),m=X(()=>{d.current||(d.current=!0,s(e=>!e))}),h=X((e,t)=>{l.set(e,t),m()}),g=X(e=>{l.delete(e),m()}),_=X(e=>{let t=new Map;return r.current.length=0,i&&(i.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),r.current[e.index]=e.element,i&&(i.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),u.current=r.current.length,t});function v(e){if(p.current?.disconnect(),p.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!zt(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&Bt(r,n)>0){t.disconnect(),m();return}r=n}});p.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=Rt(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let y=X(()=>{let[e,t]=Lt(l),n=_(e),r=f.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});v(t),f.current=e,d.current=!1,i&&(c.forEach(e=>e(n)),o(n))});n(()=>(!d.current&&f.current&&_(f.current),()=>{r.current=[],i&&(i.current=[])}),[r,i,_]),n(()=>{d.current&&y()}),n(()=>()=>{p.current?.disconnect(),d.current=!0},[]);let b=X(e=>(c.add(e),()=>{c.delete(e)})),x=Q.useMemo(()=>({register:h,unregister:g,subscribeMapChange:b,nextIndexRef:u}),[h,g,b,u]);return(0,$.jsx)(Mt.Provider,{value:x,children:t})}function Ft(){return new Map}function It(){return new Set}function Lt(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>Bt(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function Rt(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function zt(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function Bt(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}var Vt=20;function Ht(e,t,r,i){let[a,o]=Q.useState(!1);n(()=>{if(!e||!t||r==null){o(!1);return}let n=v(r).documentElement.clientWidth,i=r.offsetWidth;o(n>0&&i>0&&i>=n-Vt)},[e,t,r]),Fe(e&&(!t||a),i)}function Ut(e={}){let{guess:t,label:r,metadata:i,textRef:a,index:o}=e,{register:s,unregister:c,subscribeMapChange:l,nextIndexRef:u}=Nt(),d=Q.useRef(-1),[f,p]=Q.useState(o==null&&t?()=>{if(d.current===-1){let e=u.current;u.current+=1,d.current=e}return d.current}:-1),m=o??f,h=Q.useRef(null),g=Q.useCallback(e=>{let t=h.current;t&&c(t),h.current=e,e&&s(e,{metadata:i??null,index:o??null,label:r,textRef:a})},[o,s,c,i,r,a]);return n(()=>{if(o==null)return l(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&p(t)})},[o,l]),{ref:g,index:m}}var Wt=Q.createContext(void 0);function Gt(e){let t=Q.useContext(Wt);if(t===void 0&&!e)throw Error(S(69));return t}function Kt(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var qt=Q.createContext(void 0),Jt=Q.createContext(void 0),Yt=Q.createContext(void 0);function Xt(){let e=Q.useContext(qt);if(e===void 0)throw Error(S(60));return e}function Zt(){let e=Q.useContext(Jt);if(e===void 0)throw Error(S(101));return e}function Qt(){let e=Q.useContext(Yt);if(e===void 0)throw Error(S(61));return e}var $t={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Tt(t,r)!==``},hasNullItemLabel:(e,t)=>t?Ct(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>dt(t,e,n)):dt(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function en(e){let{id:t,value:r,defaultValue:i=null,onValueChange:a,open:o,defaultOpen:s=!1,onOpenChange:c,name:l,form:u,autoComplete:d,disabled:f=!1,readOnly:p=!1,required:h=!1,modal:g=!0,actionsRef:_,inputRef:v,onOpenChangeComplete:y,items:b,multiple:x=!1,itemToStringLabel:S,itemToStringValue:C,isItemEqualToValue:w=ut,highlightItemOnHover:T=!0,children:E}=e,{clearErrors:ee}=Ve(),{setDirty:O,setTouched:A,setFocused:j,validityData:M,setFilled:te,name:ne,disabled:N,validation:P,validationMode:F}=He(),R=Ue({id:t}),B=N||f,V=ne??l,[H,oe]=Re({controlled:r,default:x?i??ce:i,name:`Select`,state:`value`}),[U,W]=Re({controlled:o,default:s,name:`Select`,state:`open`}),G=Q.useRef([]),K=Q.useRef([]),q=Q.useRef(null),se=Q.useRef(null),J=Q.useRef(0),le=Q.useRef(null),Y=Q.useRef([]),ue=Q.useRef(!1),de=Q.useRef(null),fe=Q.useRef(null),me=Q.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),he=Q.useRef(!1),ge=Q.useRef(H),{mounted:ve,setMounted:ye,transitionStatus:be}=Oe(U),{openMethod:Se,triggerProps:Ce}=st(U),Z=z(()=>new m({id:R,labelId:void 0,modal:g,multiple:x,itemToStringLabel:S,itemToStringValue:C,isItemEqualToValue:w,value:H,open:U,mounted:ve,transitionStatus:be,items:b,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:pe,triggerProps:pe,triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:ae,setOpen:ae,handleScrollArrowVisibility:ae,onOpenChangeComplete:ae,listRef:G,popupRef:q,scrollHandlerRef:se,scrollArrowsMountedCountRef:J,valueRef:le,valuesRef:Y,labelsRef:K,typingRef:ue,selectionRef:me,firstItemTextRef:de,selectedItemTextRef:fe,alignItemWithTriggerActiveRef:he,initialValueRef:ge},$t)).current,Te=Z.useState(`activeIndex`),Ee=Z.useState(`selectedIndex`),je=Z.useState(`triggerElement`),Me=Z.useState(`positionerElement`),Ne=Ae(Se),Pe=Se??Ne,Fe=Q.useMemo(()=>x?``:Tt(H,C),[x,H,C]),Ie=Q.useMemo(()=>x&&Array.isArray(H)?H.map(e=>Tt(e,C)):Tt(H,C),[x,H,C]),Be=I(je),We=X(()=>Ie);ze(Be,R,H,We,!B,l);let Ge=x?Array.isArray(H)&&H.length>0:H!=null&&Fe!==``;n(()=>{te(Ge)},[Ge,te]),n(function(){let e=gt(Y.current,H,w,x);e===null&&(fe.current=null),!U&&Z.set(`selectedIndex`,e)},[x,U,H,w,Z]),Le(H,()=>{ee(V),O(ft(H,M.initialValue,w)),P.change(H)});let qe=X((e,t)=>{c?.(e,t),!t.isCanceled&&(W(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(A(!0),j(!1),F===`onBlur`&&P.commit(H)))}),Xe=X(()=>{ye(!1),Z.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),y?.(!1)});L({enabled:!_,open:U,ref:q,onComplete(){U||Xe()}}),Q.useImperativeHandle(_,()=>({unmount:Xe}),[Xe]);let Ze=X((e,t)=>{a?.(e,t),!t.isCanceled&&oe(e)}),Qe=X(e=>{let t=Je(e.scrollHeight,e.clientHeight),n=Ke(e.scrollTop,t),r=n>0,i=n<t;Z.set(`scrollUpArrowVisible`,r),Z.set(`scrollDownArrowVisible`,i)}),$e=_e({open:U,onOpenChange:qe,elements:{reference:je,floating:Me}}),et=Ye($e,{enabled:!B,event:`mousedown`}),tt=De($e),nt=rt($e,{enabled:!B,listRef:G,activeIndex:Te,selectedIndex:Ee,disabledIndices:ce,onNavigate(e){(e!==null||U)&&Z.set(`activeIndex`,e)},focusItemOnHover:T}),at=it($e,{enabled:!B&&(U||!p&&!x),listRef:K,activeIndex:Te,selectedIndex:Ee,disabledIndices:e=>Kt(G.current[e]),onMatch(e){U?Z.set(`activeIndex`,e):Ze(Y.current[e],D(k))},onTyping(e){ue.current=e}}),ot=Q.useMemo(()=>ie(at.reference,nt.reference,tt.reference,et.reference,Ce),[et.reference,at.reference,nt.reference,tt.reference,Ce]),lt=Q.useMemo(()=>ie(ke,at.floating,nt.floating,tt.floating),[at.floating,nt.floating,tt.floating]),dt=nt.item??pe;Z.useContextCallback(`setValue`,Ze),Z.useContextCallback(`setOpen`,qe),Z.useContextCallback(`handleScrollArrowVisibility`,Qe),Z.useContextCallback(`onOpenChangeComplete`,y),ct(()=>{Z.update({popupProps:lt,triggerProps:ot})}),Z.useSyncedValues({id:R,modal:g,multiple:x,value:H,open:U,mounted:ve,transitionStatus:be,popupProps:lt,triggerProps:ot,items:b,itemToStringLabel:S,itemToStringValue:C,isItemEqualToValue:w,openMethod:Pe});let pt=Q.useMemo(()=>({disabled:B,readOnly:p,required:h,multiple:x,highlightItemOnHover:T,itemProps:dt}),[B,p,h,x,T,dt]),mt=xe(v,P.inputRef),ht=x?void 0:V,_t=Q.useMemo(()=>!x||!Array.isArray(H)||!V?null:H.map(e=>{let t=Tt(e,C);return(0,$.jsx)(`input`,{type:`hidden`,form:u,name:V,value:t,disabled:B},t)}),[x,H,u,V,C,B]);return(0,$.jsxs)(qt.Provider,{value:Z,children:[(0,$.jsx)(Jt.Provider,{value:pt,children:(0,$.jsx)(Yt.Provider,{value:$e,children:E})}),(0,$.jsx)(`input`,{...P.getValidationProps(B,{onFocus(){Z.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||B||p)return;let t=e.currentTarget.value,n=D(k,e.nativeEvent);function r(){if(x)return;let e=t.toLowerCase(),r=Y.current.findIndex(t=>Tt(t,C).toLowerCase()===e||wt(t,S).toLowerCase()===e);r===-1&&(r=Y.current.findIndex((t,n)=>{let r=K.current[n];return r!=null&&r.toLowerCase()===e}));let i=Y.current[r];i!=null&&Ze(i,n)}Z.set(`forceMount`,!0),queueMicrotask(r)}}),id:R&&ht==null?`${R}-hidden-input`:void 0,form:u,name:ht,autoComplete:d,value:Fe,disabled:B,required:h&&!(x&&Ge),readOnly:p,ref:mt,style:V?we:re,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),_t]})}var tn=`data-popup-side`,nn=400,rn={...J,...We,popupSide:e=>e?{[tn]:e}:null,value:()=>null},an=Q.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:s=!0,style:c,...u}=e,{setTouched:d,setFocused:f,validationMode:p,validation:m,state:h,disabled:g}=He(),{labelId:_}=Be(),y=Xt(),{readOnly:b,required:x,disabled:S}=Zt(),C=g||S||a,w=y.useState(`open`),T=y.useState(`mounted`),E=y.useState(`value`),ee=y.useState(`triggerProps`),O=y.useState(`positionerElement`),A=y.useState(`listElement`),j=y.useState(`popupSide`),te=y.useState(`id`),ne=y.useState(`labelId`),N=y.useState(`hasSelectedValue`),P=T&&O?j:null,F=i??te,re=jt(_,ne);Ue({id:i});let L=I(O),R=Q.useRef(null),{getButtonProps:z,buttonRef:B}=M({disabled:C,native:s}),V=y.useStateSetter(`triggerElement`),ae=W(),oe=W(),U=W();Q.useEffect(()=>{if(w)return U.start(nn,()=>{y.context.selectionRef.current.allowUnselectedMouseUp=!0,y.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{U.clear()};y.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},oe.clear()},[w,y,oe,U]);let G=ie(ee,{id:F,role:`combobox`,"aria-expanded":w,"aria-haspopup":`listbox`,"aria-controls":w?A?.id??l(O)?.id:void 0,"aria-labelledby":re,"aria-readonly":b||void 0,"aria-required":x||void 0,tabIndex:C?-1:0,onFocus(e){f(!0),w&&y.context.alignItemWithTriggerActiveRef.current&&y.context.setOpen(!1,D(k,e.nativeEvent)),ae.start(0,()=>{y.set(`forceMount`,!0)})},onBlur(e){Z(O,e.relatedTarget)||(d(!0),f(!1),p===`onBlur`&&m.commit(E))},onMouseDown(e){if(w)return;let t=v(e.currentTarget);function n(e){if(!R.current)return;let t=e.target;Z(R.current,t)||Z(L.current,t)||kt(e,R.current)||y.context.setOpen(!1,D(o,e))}oe.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},u,z),K=m.getValidationProps(C,G);K.role=`combobox`;let q={...h,open:w,disabled:C,value:E,readOnly:b,popupSide:P,placeholder:!N};return H(`button`,e,{ref:[t,R,B,V],state:q,stateAttributesMapping:rn,props:K})}),on={value:()=>null},sn=Q.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,c=Xt(),l=c.useState(`value`),u=c.useState(`items`),d=c.useState(`itemToStringLabel`),f=c.useState(`hasSelectedValue`),p=!f&&a!=null&&i==null,m=c.useState(`hasNullItemLabel`,p),h={value:l,placeholder:!f},g=null;return g=typeof i==`function`?i(l):i??(p&&!m?a:Array.isArray(l)?Dt(l,u,d):Et(l,u,d)),H(`span`,e,{state:h,ref:[t,c.context.valueRef],props:[{children:g},s],stateAttributesMapping:on})}),cn=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o={open:Xt().useState(`open`)};return H(`span`,e,{state:o,ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:fe})}),ln=Q.forwardRef(function(e,t){let n=Xt(),r=n.useState(`mounted`),i=n.useState(`forceMount`);return r||i?(0,$.jsx)(E,{ref:t,...e}):null}),un=Q.createContext(void 0);function dn(){let e=Q.useContext(un);if(!e)throw Error(S(59));return e}function fn(e,t){e&&Object.assign(e.style,t)}var pn={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},mn={position:`fixed`},hn=Q.forwardRef(function(e,t){let{anchor:r,className:i,render:a,positionMethod:o,side:s,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:h,alignItemWithTrigger:g=!0,collisionAvoidance:_=K,style:v,...y}=e,b=Xt(),x=Qt(),S=b.useState(`open`),C=b.useState(`mounted`),w=b.useState(`modal`),T=b.useState(`value`),E=b.useState(`openMethod`),ee=b.useState(`positionerElement`),O=b.useState(`triggerElement`),A=b.useState(`isItemEqualToValue`),j=b.useState(`transitionStatus`),M=Q.useRef(null),te=Q.useRef(null),[ne,N]=Q.useState(g),P=C&&ne&&E!==`touch`;!C&&ne!==g&&N(g),Q.useImperativeHandle(b.context.alignItemWithTriggerActiveRef,()=>P),Ht((P||w)&&S,E===`touch`,ee,O);let F=me({anchor:r,floatingRootContext:x,positionMethod:o,mounted:C,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h??P,collisionAvoidance:_,keepMounted:!0}),I=P?`none`:F.side,re=P?mn:F.positionerStyles,L={open:S,side:I,align:F.align,anchorHidden:F.anchorHidden};n(()=>{b.set(`popupSide`,F.side)},[b,F.side]);let R=b.useStateSetter(`positionerElement`),z=he(e,L,{styles:re,transitionStatus:j,props:y,refs:[t,R],hidden:!C,inert:!S}),B=Q.useRef(0),ie=X(e=>{if(b.context.valuesRef.current.length===0)return;let t=B.current;B.current=e.size;let n=D(k);if(t!==0&&!b.state.multiple&&T!==null&&mt(b.context.valuesRef.current,T,A)===-1){let e=b.context.initialValueRef.current,t=e!=null&&mt(b.context.valuesRef.current,e,A)!==-1?e:null;b.context.setValue(t,n),t===null&&(b.set(`selectedIndex`,null),b.context.selectedItemTextRef.current=null)}if(t!==0&&b.state.multiple&&Array.isArray(T)){let e=T.filter(e=>mt(b.context.valuesRef.current,e,A)!==-1);e.length!==T.length&&(b.context.setValue(e,n),e.length===0&&(b.set(`selectedIndex`,null),b.context.selectedItemTextRef.current=null))}if(S&&P){b.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};fn(ee,e),fn(b.context.popupRef.current,e)}}),V=Q.useMemo(()=>({...F,side:I,alignItemWithTriggerActive:P,setControlledAlignItemWithTrigger:N,scrollUpArrowRef:M,scrollDownArrowRef:te}),[F,I,P,N]);return(0,$.jsx)(Pt,{elementsRef:b.context.listRef,labelsRef:b.context.labelsRef,onMapChange:ie,children:(0,$.jsxs)(un.Provider,{value:V,children:[C&&w&&(0,$.jsx)(Me,{inert:se(!S),cutout:O}),z]})})}),gn=`--transform-origin`,_n={...R,...ge},vn=Q.forwardRef(function(e,t){let{render:r,className:i,style:a,finalFocus:o,...s}=e,c=Xt(),{multiple:l,readOnly:u,highlightItemOnHover:d}=Zt(),f=Qt(),{side:p,align:m,alignItemWithTriggerActive:h,isPositioned:_,setControlledAlignItemWithTrigger:y}=dn(),b=Gt(!0)!=null,x=G(),{nonce:S,disableStyleElements:C}=qe(),w=c.useState(`id`),T=c.useState(`open`),E=c.useState(`openMethod`),ee=c.useState(`mounted`),O=c.useState(`popupProps`),k=c.useState(`transitionStatus`),A=c.useState(`triggerElement`),j=c.useState(`positionerElement`),M=c.useState(`listElement`),te=Q.useRef(!1),N=Q.useRef(!1),P=Q.useRef({}),F=U(),I=X(e=>{if(!j||!c.context.popupRef.current||!N.current)return;let t=j.style.top===`0px`,n=j.style.bottom===`0px`;if(te.current||!h||!t&&!n){c.context.handleScrollArrowVisibility(e);return}let r=xn(j),i=Sn(j.getBoundingClientRect().height,`y`,r),a=v(j),o=Te(j),s=o.getComputedStyle(j),l=parseFloat(s.marginTop),u=parseFloat(s.marginBottom),d=yn(o.getComputedStyle(c.context.popupRef.current)),f=Math.min(a.documentElement.clientHeight-l-u,d),p=e.scrollTop,m=bn(e),g=null,_=e=>{j.style.height=`${e}px`},y=t?m-p:p,b=Math.min(i+y,f);if(y<=1){let n=Y(y,0,f-i);n>0&&_(i+n),e.scrollTop=t?m:0,f-(i+n)<=1&&(te.current=!0),c.context.handleScrollArrowVisibility(e);return}f-b>1?g=t?1/0:0:n&&p<m&&(g=p-(y-(i+y-f)));let x=Math.ceil(b);if(x!==0&&_(x),g!=null){let t=Y(g,0,bn(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}x>=f-1&&(te.current=!0),c.context.handleScrollArrowVisibility(e)});Q.useImperativeHandle(c.context.scrollHandlerRef,()=>I,[I]),L({open:T,ref:c.context.popupRef,onComplete(){T&&c.context.onOpenChangeComplete(!0)}});let re={open:T,transitionStatus:k,side:p,align:m};n(()=>{j&&c.context.popupRef.current&&!Object.keys(P.current).length&&(P.current={top:j.style.top||`0`,left:j.style.left||`0`,right:j.style.right,height:j.style.height,bottom:j.style.bottom,minHeight:j.style.minHeight,maxHeight:j.style.maxHeight,marginTop:j.style.marginTop,marginBottom:j.style.marginBottom})},[c,j]),n(()=>{T||h||(N.current=!1,te.current=!1,fn(j,P.current))},[T,h,j]),n(()=>{let e=c.context.popupRef.current;if(!T||!A||!j||!e||h&&!_||c.state.transitionStatus===`ending`)return;if(N.current=!0,e.style.removeProperty(gn),!h){F.request(()=>c.context.handleScrollArrowVisibility(M||e));return}let t=Tn(e);try{let t=c.context.selectedItemTextRef.current;t?.isConnected||(t=!c.select(`hasSelectedValue`)&&c.context.firstItemTextRef.current?.isConnected?c.context.firstItemTextRef.current:null);let n=c.context.valueRef.current,r=Te(j),i=r.getComputedStyle(j),a=r.getComputedStyle(e),o=v(A),s=xn(A),l=Cn(A.getBoundingClientRect(),s),u=Cn(j.getBoundingClientRect(),s),f=l.height,p=M||e,m=p.scrollHeight,h=parseFloat(a.borderBottomWidth),g=parseFloat(i.marginTop)||10,_=parseFloat(i.marginBottom)||10,b=parseFloat(i.minHeight)||100,S=yn(a),C=o.documentElement.clientHeight-g-_,w=o.documentElement.clientWidth,T=C-l.bottom+f,E,D=x===`rtl`?l.right-u.width:l.left,ee=0;if(t&&n){let e=Cn(n.getBoundingClientRect(),s);E=Cn(t.getBoundingClientRect(),s),D=u.left+(x===`rtl`?e.right-E.right:e.left-E.left);let r=e.top-l.top+e.height/2;ee=E.top-u.top+E.height/2-r}let O=T+ee+_+h,k=Math.min(C,O),ne=C-g-_,N=O-k,F=w-5;j.style.left=`${Y(D,5,F-u.width)}px`,j.style.height=`${k}px`,j.style.maxHeight=`none`,j.style.marginTop=`${g}px`,j.style.marginBottom=`${_}px`,e.style.height=`100%`;let I=bn(p),re=N>=I-1;re&&(k=Math.min(C,u.height)-(N-I));let L=l.top<20||l.bottom>C-20||Math.ceil(k)+1<Math.min(m,b),R=(r.visualViewport?.scale??1)!==1&&Se;if(L||R){fn(j,P.current),y(!1);return}let z=Math.max(b,k);if(re){let e=Math.max(0,C-O);j.style.top=u.height>=ne?`0`:`${e}px`,j.style.height=`${k}px`,p.scrollTop=bn(p)}else j.style.bottom=`0`,p.scrollTop=N;if(E){let t=u.top,n=u.height,r=E.top+E.height/2,i=Y(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(gn,`50% ${i}%`)}(z===C||k>=S)&&(te.current=!0),c.context.handleScrollArrowVisibility(p),d&&c.state.selectedIndex===null&&c.state.activeIndex===null&&c.context.listRef.current[0]!=null&&c.set(`activeIndex`,0)}finally{t()}},[c,T,j,A,h,y,F,M,d,x,_]),Q.useEffect(()=>{if(!h||!j||!T)return;let e=Te(j);function t(e){c.context.setOpen(!1,D(ne,e))}return g(e,`resize`,t)},[c,h,j,T]);let R={...M?{role:`presentation`}:{role:`listbox`,"aria-multiselectable":l||void 0,"aria-readonly":u||void 0,id:`${w}-list`},onKeyDown(e){b&&Pe.has(e.key)&&e.stopPropagation()},onScroll(e){M||I(e.currentTarget)},...h&&{style:M?{height:`100%`}:pn},className:!M&&h?Ge.className:void 0},z=H(`div`,e,{ref:[t,c.context.popupRef],state:re,stateAttributesMapping:_n,props:[O,R,le(k),s]});return(0,$.jsxs)(Q.Fragment,{children:[!C&&Ge.getElement(S),(0,$.jsx)(Ne,{context:f,modal:!1,disabled:!ee,openInteractionType:E,returnFocus:o,restoreFocus:!0,children:z})]})});function yn(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function bn(e){return Je(e.scrollHeight,e.clientHeight)}function xn(e){return de.getScale(e)}function Sn(e,t,n){return e/n[t]}function Cn(e,t){return w({x:Sn(e.x,`x`,t),y:Sn(e.y,`y`,t),width:Sn(e.width,`x`,t),height:Sn(e.height,`y`,t)})}var wn=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function Tn(e){let{style:t}=e,n={};for(let[e,r]of wn)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of wn){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var En=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Xt(),{multiple:s,readOnly:c}=Zt(),{alignItemWithTriggerActive:l}=dn(),u=o.useState(`hasScrollArrows`),d=o.useState(`openMethod`),f={id:`${o.useState(`id`)}-list`,role:`listbox`,"aria-multiselectable":s||void 0,"aria-readonly":c||void 0,onScroll(e){o.context.scrollHandlerRef.current?.(e.currentTarget)},...l&&{style:pn},className:u&&d!==`touch`?Ge.className:void 0},p=o.useStateSetter(`listElement`);return H(`div`,e,{ref:[t,p],props:[f,a]})}),Dn=Q.createContext(void 0);function On(){let e=Q.useContext(Dn);if(!e)throw Error(S(57));return e}var kn=Q.memo(Q.forwardRef(function(e,t){let{render:r,className:i,style:a,value:o=null,label:s,disabled:c=!1,nativeButton:l=!1,...u}=e,f=Q.useRef(null),p=Ut({guess:!0,label:s,textRef:f}),m=Xt(),{itemProps:h,multiple:g,disabled:_,readOnly:v}=Zt(),y=_||c,b=m.useState(`isActive`,p.index),x=m.useState(`open`),S=m.useState(`isSelected`,o),w=m.useState(`isSelectedByFocus`,p.index),T=m.useState(`isItemEqualToValue`),E=p.index,ee=Q.useRef(null);n(()=>{let e=m.context.valuesRef.current;return e[E]=o,()=>{delete e[E]}},[E,o,m]),n(()=>{let e=m.state.value,t=m.state.selectedIndex,n=t,r;g&&Array.isArray(e)?(n=_t(E,o,m.context.valuesRef.current,e,T,t),r=n===E,E===t&&!r&&(m.context.selectedItemTextRef.current=null)):(r=e!==void 0&&dt(o,e,T),r&&(n=E)),m.set(`selectedIndex`,n),r&&f.current&&(m.context.selectedItemTextRef.current=f.current)},[E,g,T,m,o]);let O=Q.useRef(`mouse`),k=Q.useRef(!1),{getButtonProps:A,buttonRef:j}=M({disabled:y,focusableWhenDisabled:!0,native:l,composite:!0}),te={disabled:y,selected:S,highlighted:b};function ne(e){if(_||v)return;let t=m.state.value;if(g){let n=Array.isArray(t)?t:[],r=S?vt(n,o,T):[...n,o];m.context.setValue(r,D(C,e))}else m.context.setValue(o,D(C,e)),m.context.setOpen(!1,D(C,e))}function N(){m.context.selectionRef.current.dragY=0}let P={role:`option`,"aria-selected":S,tabIndex:x&&b?0:-1,onKeyDown(e){m.set(`activeIndex`,E),e.key===` `&&m.context.typingRef.current&&e.preventDefault()},onClick(e){let t=O.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&d(e.nativeEvent)&&(n!==void 0||b),i=t&&!r&&!k.current;k.current=!1,!(y||i)&&ne(e.nativeEvent)},onPointerEnter(e){O.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=m.context.selectionRef.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){O.current=e.pointerType,k.current=!0,N()},onMouseUp(){if(N(),y||O.current===`touch`||k.current)return;let e=!m.context.selectionRef.current.allowSelectedMouseUp&&S,t=!m.context.selectionRef.current.allowUnselectedMouseUp&&!S;e||t||(k.current=!0,ee.current?.click(),k.current=!1)}},F=H(`div`,e,{ref:[j,t,p.ref,ee],state:te,props:[h,P,u,A]}),I=Q.useMemo(()=>({selected:S,index:E,textRef:f,selectedByFocus:w}),[S,E,f,w]);return(0,$.jsx)(Dn.Provider,{value:I,children:F})})),An=Q.forwardRef(function(e,t){let{selected:n}=On();return e.keepMounted||n?(0,$.jsx)(jn,{...e,ref:t}):null}),jn=Q.memo(Q.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=On(),c=Q.useRef(null),{transitionStatus:l,setMounted:u}=Oe(s),d=H(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:ge});return L({batch:!0,enabled:!s,open:s,ref:c,onComplete(){s||u(!1)}}),d})),Mn=Q.memo(Q.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=On(),a=Xt(),{render:o,className:s,style:c,...l}=e,u=Q.useCallback(e=>{e&&(n===0&&(a.context.firstItemTextRef.current=e),i&&(a.context.selectedItemTextRef.current=e))},[a,n,i]);return H(`div`,e,{ref:[u,t,r],props:l})})),Nn=Q.forwardRef(function(e,t){let{render:r,className:i,style:a,direction:o,keepMounted:s,...c}=e,l=o===`up`,u=Xt(),{side:d,scrollDownArrowRef:f,scrollUpArrowRef:p}=dn(),m=l?`scrollUpArrowVisible`:`scrollDownArrowVisible`,h=u.useState(m),g=u.useState(`openMethod`),_=h&&g!==`touch`,v=W(),y=l?p:f,{mounted:b,transitionStatus:x,setMounted:S}=Oe(_);n(()=>(u.context.scrollArrowsMountedCountRef.current+=1,u.set(`hasScrollArrows`,!0),()=>{u.context.scrollArrowsMountedCountRef.current=Math.max(0,u.context.scrollArrowsMountedCountRef.current-1),u.context.scrollArrowsMountedCountRef.current===0&&u.set(`hasScrollArrows`,!1)}),[u]),L({open:_,ref:y,onComplete(){_||S(!1)}});let C=H(`div`,e,{ref:[t,y],state:{direction:o,visible:_,side:d,transitionStatus:x},props:[{"aria-hidden":!0,children:l?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||v.isStarted())return;u.set(`activeIndex`,null);function t(){let e=u.state.listElement??u.context.popupRef.current;if(!e)return;u.set(`activeIndex`,null),u.context.handleScrollArrowVisibility(e);let n=Je(e.scrollHeight,e.clientHeight),r=Ke(e.scrollTop,n),i=r===(l?0:n),a=u.context.listRef.current;if(r!==e.scrollTop&&(e.scrollTop=r),i){v.clear();return}if(a.length>0){let t=y.current?.offsetHeight||0;e.scrollTop=Pn(a,l,r,e.clientHeight,t,n)}v.start(40,t)}v.start(40,t)},onMouseLeave(){v.clear()}},c],stateAttributesMapping:ge});return b||s?C:null});function Pn(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?Ke(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?Ke(l.offsetTop+l.offsetHeight-r+i,a):a}var Fn=Q.forwardRef(function(e,t){return(0,$.jsx)(Nn,{...e,ref:t,direction:`down`})}),In=Q.forwardRef(function(e,t){return(0,$.jsx)(Nn,{...e,ref:t,direction:`up`})}),Ln=Q.createContext(void 0);function Rn(){let e=Q.useContext(Ln);if(e===void 0)throw Error(S(56));return e}var zn=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=Q.useState(),c=Q.useMemo(()=>({labelId:o,setLabelId:s}),[o,s]),l=H(`div`,e,{ref:t,props:[{role:`group`,"aria-labelledby":o},a]});return(0,$.jsx)(Ln.Provider,{value:c,children:l})}),Bn=Q.forwardRef(function(e,t){let{render:r,className:i,style:a,id:o,...s}=e,{setLabelId:c}=Rn(),l=Ie(o);return n(()=>(c(l),()=>{c(e=>e===l?void 0:e)}),[l,c]),H(`div`,e,{ref:t,props:[{id:l,"aria-hidden":!0},s]})}),Vn=Ee(),Hn=en,Un=T(`relative inline-flex cursor-pointer select-none items-center justify-between gap-2 border rounded-lg text-left text-base outline-none transition-[color,box-shadow,background-color] data-disabled:pointer-events-none data-disabled:opacity-64 sm:text-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4`,{defaultVariants:{size:`default`,variant:`default`},variants:{variant:{default:`w-full min-w-36 border-input bg-background not-dark:bg-clip-padding text-foreground shadow-xs/5 ring-ring/24 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 focus-visible:border-ring focus-visible:ring-[3px] aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:ring-destructive/16 dark:bg-input/32 dark:aria-invalid:ring-destructive/24 dark:not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] [&_svg:not([class*='opacity-'])]:opacity-80 [[data-disabled],:focus-visible,[aria-invalid],[data-pressed]]:shadow-none`,ghost:`border-transparent text-muted-foreground/70 focus-visible:ring-2 focus-visible:ring-ring data-pressed:bg-accent [:hover,[data-pressed]]:bg-accent [:hover,[data-pressed]]:text-foreground/80`},size:{default:`min-h-9 px-[calc(--spacing(3)-1px)] sm:min-h-8`,lg:`min-h-10 px-[calc(--spacing(3)-1px)] sm:min-h-9`,sm:`min-h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] sm:min-h-7`,xs:`h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-sm before:rounded-[calc(var(--radius-md)-1px)] sm:h-6 sm:text-xs [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5`}}});function Wn(e){let t=(0,Vn.c)(15),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:r,size:a,variant:o,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=a===void 0?`default`:a,c=o===void 0?`default`:o,l;t[6]!==r||t[7]!==s||t[8]!==c?(l=u(Un({size:s,variant:c}),r),t[6]=r,t[7]=s,t[8]=c,t[9]=l):l=t[9];let d;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(cn,{"data-slot":`select-icon`,children:(0,$.jsx)(h,{className:`size-3 opacity-50`})}),t[10]=d):d=t[10];let f;return t[11]!==n||t[12]!==i||t[13]!==l?(f=(0,$.jsxs)(an,{className:l,"data-slot":`select-trigger`,...i,children:[n,d]}),t[11]=n,t[12]=i,t[13]=l,t[14]=f):f=t[14],f}function Gn(e){let t=(0,Vn.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=u(`flex-1 truncate data-placeholder:text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(sn,{className:i,"data-slot":`select-value`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Kn(e){let t=(0,Vn.c)(28),n,r,i,a,o,s,c,l,d;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],d=t[9]):({className:i,children:r,side:o,sideOffset:s,align:c,alignOffset:l,alignItemWithTrigger:d,anchor:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t[9]=d);let f=o===void 0?`bottom`:o,p=s===void 0?4:s,m=c===void 0?`start`:c,g=l===void 0?0:l,_=d===void 0||d,v;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(In,{className:`top-0 z-50 flex h-6 w-full cursor-default items-center justify-center before:pointer-events-none before:absolute before:inset-x-px before:top-px before:h-[200%] before:rounded-t-[calc(var(--radius-lg)-1px)] before:bg-linear-to-b before:from-50% before:from-popover/85`,"data-slot":`select-scroll-up-arrow`,children:(0,$.jsx)(oe,{className:`relative size-4.5 sm:size-4`})}),t[10]=v):v=t[10];let y;t[11]===i?y=t[12]:(y=u(`max-h-(--available-height) overflow-y-auto p-1`,i),t[11]=i,t[12]=y);let b;t[13]!==r||t[14]!==y?(b=(0,$.jsx)(`div`,{className:`selection-glass-surface relative h-full min-w-(--anchor-width) origin-(--transform-origin) rounded-lg border text-popover-foreground transition-[scale,opacity] duration-(--app-motion-duration-pop) ease-(--app-motion-spring-gentle) in-data-starting-style:scale-98 in-data-starting-style:opacity-0 in-data-ending-style:scale-98 in-data-ending-style:opacity-0`,children:(0,$.jsx)(En,{className:y,"data-slot":`select-list`,children:r})}),t[13]=r,t[14]=y,t[15]=b):b=t[15];let x;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(Fn,{className:`bottom-0 z-50 flex h-6 w-full cursor-default items-center justify-center before:pointer-events-none before:absolute before:inset-x-px before:bottom-px before:h-[200%] before:rounded-b-[calc(var(--radius-lg)-1px)] before:bg-linear-to-t before:from-50% before:from-popover/85`,"data-slot":`select-scroll-down-arrow`,children:(0,$.jsx)(h,{className:`relative size-4.5 sm:size-4`})}),t[16]=x):x=t[16];let S;t[17]!==a||t[18]!==b?(S=(0,$.jsxs)(vn,{className:`text-foreground transition-opacity duration-(--app-motion-duration-pop) ease-(--app-motion-spring-gentle) data-ending-style:opacity-0`,"data-slot":`select-popup`,...a,children:[v,b,x]}),t[17]=a,t[18]=b,t[19]=S):S=t[19];let C;return t[20]!==m||t[21]!==_||t[22]!==g||t[23]!==n||t[24]!==f||t[25]!==p||t[26]!==S?(C=(0,$.jsx)(ln,{children:(0,$.jsx)(hn,{align:m,alignItemWithTrigger:_,alignOffset:g,anchor:n,className:`z-50 select-none`,"data-slot":`select-positioner`,side:f,sideOffset:p,children:S})}),t[20]=m,t[21]=_,t[22]=g,t[23]=n,t[24]=f,t[25]=p,t[26]=S,t[27]=C):C=t[27],C}function qn(e){let t=(0,Vn.c)(20),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,hideIndicator:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a!==void 0&&a,s=o?`grid-cols-[1fr] ps-3 pe-3`:`grid-cols-[1rem_1fr] ps-2 pe-4`,c;t[5]!==r||t[6]!==s?(c=u(`grid min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default items-center gap-2 rounded-sm py-1 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent/80 data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,s,r),t[5]=r,t[6]=s,t[7]=c):c=t[7];let l;t[8]===o?l=t[9]:(l=o?null:(0,$.jsx)(An,{className:`col-start-1`,"data-slot":`select-item-indicator`,children:(0,$.jsx)(`svg`,{fill:`none`,height:`24`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,viewBox:`0 0 24 24`,width:`24`,xmlns:`http://www.w3.org/1500/svg`,children:(0,$.jsx)(`path`,{d:`M5.252 12.7 10.2 18.63 18.748 5.37`})})}),t[8]=o,t[9]=l);let d=o?`col-start-1`:`col-start-2`,f;t[10]===d?f=t[11]:(f=u(`min-w-0`,d),t[10]=d,t[11]=f);let p;t[12]!==n||t[13]!==f?(p=(0,$.jsx)(Mn,{className:f,"data-slot":`select-item-text`,children:n}),t[12]=n,t[13]=f,t[14]=p):p=t[14];let m;return t[15]!==i||t[16]!==c||t[17]!==l||t[18]!==p?(m=(0,$.jsxs)(kn,{className:c,"data-slot":`select-item`,...i,children:[l,p]}),t[15]=i,t[16]=c,t[17]=l,t[18]=p,t[19]=m):m=t[19],m}function Jn(e){let t=(0,Vn.c)(2),n;return t[0]===e?n=t[1]:(n=(0,$.jsx)(zn,{"data-slot":`select-group`,...e}),t[0]=e,t[1]=n),n}function Yn(e){let t=(0,Vn.c)(2),n;return t[0]===e?n=t[1]:(n=(0,$.jsx)(Bn,{className:`px-2 py-1.5 font-medium text-muted-foreground text-xs`,"data-slot":`select-group-label`,...e}),t[0]=e,t[1]=n),n}var Xn=T(`relative inline-flex shrink-0 items-center justify-center gap-1 whitespace-nowrap rounded-sm border border-transparent font-medium outline-none transition-shadow focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-3.5 sm:[&_svg:not([class*='size-'])]:size-3 [&_svg]:pointer-events-none [&_svg]:shrink-0 [button&,a&]:cursor-pointer [button&,a&]:pointer-coarse:after:absolute [button&,a&]:pointer-coarse:after:size-full [button&,a&]:pointer-coarse:after:min-h-11 [button&,a&]:pointer-coarse:after:min-w-11`,{defaultVariants:{size:`default`,variant:`default`},variants:{size:{default:`h-5.5 min-w-5.5 px-[calc(--spacing(1)-1px)] text-sm sm:h-4.5 sm:min-w-4.5 sm:text-xs`,lg:`h-6.5 min-w-6.5 px-[calc(--spacing(1.5)-1px)] text-base sm:h-5.5 sm:min-w-5.5 sm:text-sm`,sm:`h-5 min-w-5 rounded-sm px-[calc(--spacing(1)-1px)] text-xs sm:h-4 sm:min-w-4 sm:text-[.625rem]`},variant:{default:`bg-primary text-primary-foreground [button&,a&]:hover:bg-primary/90`,destructive:`bg-destructive text-white [button&,a&]:hover:bg-destructive/90`,error:`bg-destructive/8 text-destructive-foreground dark:bg-destructive/16`,info:`bg-info/8 text-info-foreground dark:bg-info/16`,outline:`border-input bg-background text-foreground dark:bg-input/32 [button&,a&]:hover:bg-accent/50 dark:[button&,a&]:hover:bg-input/48`,secondary:`bg-secondary text-secondary-foreground [button&,a&]:hover:bg-secondary/90`,success:`bg-success/8 text-success-foreground dark:bg-success/16`,warning:`bg-warning/8 text-warning-foreground dark:bg-warning/16`}}});function Zn(e){let t=(0,Vn.c)(9),n,r,i,a;if(t[0]!==e){let{className:o,variant:s,size:c,render:l,...d}=e;n=l;let f={className:u(Xn({className:o,size:c,variant:s})),"data-slot":`badge`};a=A,r=`span`,i=ie(f,d),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a}else n=t[1],r=t[2],i=t[3],a=t[4];let o;return t[5]!==n||t[6]!==r||t[7]!==i?(o={defaultTagName:r,props:i,render:n},t[5]=n,t[6]=r,t[7]=i,t[8]=o):o=t[8],a(o)}export{ct as A,ut as C,vt as D,ft as E,Ye as F,ot as M,it as N,_t as O,rt as P,dt as S,gt as T,Ct as _,qn as a,Tt as b,Gn as c,Ut as d,Ht as f,St as g,kt as h,Yn as i,st as j,pt as k,Kt as l,jt as m,Hn as n,Kn as o,Pt as p,Jn as r,Wn as s,Zn as t,Gt as u,xt as v,mt as w,yt as x,wt as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Pa as e}from"./runtime-BKneT96Q.js";var t={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{K as e}from"./primary-
|
|
1
|
+
import{K as e}from"./primary-CNUdEGcv.js";import{P as t}from"./runtime-BKneT96Q.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{t as r}from"./authorization-B1YXfej3.js";var i=n();function a(n){let a=(0,i.c)(7),s=t(o),c;return a[0]!==n||a[1]!==s.browserStatus||a[2]!==s.directoryStatus||a[3]!==s.effectiveRole||a[4]!==s.sessionStatus||a[5]!==s.transportStatus?(c=r({hosted:e(),role:s.effectiveRole,fresh:s.directoryStatus===`ready`&&s.transportStatus===`online`,browserCurrent:s.browserStatus===`current`,sessionReady:s.sessionStatus===`ready`,method:n}),a[0]=n,a[1]=s.browserStatus,a[2]=s.directoryStatus,a[3]=s.effectiveRole,a[4]=s.sessionStatus,a[5]=s.transportStatus,a[6]=c):c=a[6],c}function o(e){return e}export{a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Pa as e}from"./runtime-BKneT96Q.js";var t={name:`chart-column`,size:24,node:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]],aliases:[`bar-chart-3`]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Pa as e}from"./runtime-BKneT96Q.js";var t={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Pa as e}from"./runtime-BKneT96Q.js";var t={name:`clipboard-copy`,size:24,node:[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2`,key:`4jdomd`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v4`,key:`3hqy98`}],[`path`,{d:`M21 14H11`,key:`1bme5i`}],[`path`,{d:`m15 10-4 4 4 4`,key:`5dvupr`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Hr as e,vl as t}from"./runtime-BKneT96Q.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";var r=n(),i=t();function a(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`grid grid-cols-[auto_1fr] gap-x-4 gap-y-2`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`dl`,{className:s,"data-slot":`data-list`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}function o(t){let n=(0,r.c)(16),{term:a,children:o,mono:s,action:c,className:l}=t,u=s!==void 0&&s,d;n[0]===a?d=n[1]:(d=(0,i.jsx)(`dt`,{className:`text-xs text-muted-foreground`,"data-slot":`data-list-term`,children:a}),n[0]=a,n[1]=d);let f=u&&`font-mono text-xs break-all`,p;n[2]!==l||n[3]!==f?(p=e(`flex min-w-0 items-start gap-2 text-sm`,f,l),n[2]=l,n[3]=f,n[4]=p):p=n[4];let m;n[5]===o?m=n[6]:(m=(0,i.jsx)(`span`,{className:`min-w-0`,children:o}),n[5]=o,n[6]=m);let h;n[7]===c?h=n[8]:(h=c?(0,i.jsx)(`span`,{className:`shrink-0 font-sans text-sm`,children:c}):null,n[7]=c,n[8]=h);let g;n[9]!==p||n[10]!==m||n[11]!==h?(g=(0,i.jsxs)(`dd`,{className:p,"data-slot":`data-list-detail`,children:[m,h]}),n[9]=p,n[10]=m,n[11]=h,n[12]=g):g=n[12];let _;return n[13]!==d||n[14]!==g?(_=(0,i.jsxs)(i.Fragment,{children:[d,g]}),n[13]=d,n[14]=g,n[15]=_):_=n[15],_}export{o as n,a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{r as n}from"./primary-
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{r as n}from"./primary-CNUdEGcv.js";import{Nn as r,a as i,i as a,o,p as s,s as c}from"./runtime-BKneT96Q.js";import{i as l,n as u,r as d,t as f}from"./workspaceMetadataProjection-BnpxBe8S.js";var p=e(t(),1);function m(e){let t=new Set;for(let n of e.snapshots)l(n)&&(e.excludedEnvironmentIds?.has(n.environmentId)||(t.add(n.environmentId),e.port.hydrate(n)));for(let n of e.previouslyHydratedEnvironmentIds)t.has(n)||e.port.isCacheHydrated(n)&&e.port.remove(n);return t}var h={status:`signed-out`,accountId:null,localEnvironmentId:null,machines:[],snapshots:[],queuedEnvironmentIds:[],activeConnectionCount:0},g=new Set,_=new Set;function v(){return h}function y(e){return g.add(e),()=>g.delete(e)}function b(){return(0,p.useSyncExternalStore)(y,v,v)}function x(e,t){let n=globalThis.window?.desktopBridge,r=n?.retainDesktopWorkspaceScope;if(!n||!r)return()=>void 0;let i=!1,a=!1,o=null,s=null,c=()=>h.status===`ready`&&h.machines.some(t=>t.environmentId===e&&t.canConnect),l=()=>{s&&globalThis.clearInterval(s),s=null;let e=o;o=null,e&&n.releaseDesktopWorkspaceScope?.(e).catch(()=>void 0)},u=()=>{if(!i){if(!c()){l();return}a||o!==null||(a=!0,r({environmentId:e,scope:t}).then(e=>{if(a=!1,i||!c()){n.releaseDesktopWorkspaceScope?.(e.leaseId).catch(()=>void 0);return}o=e.leaseId,s=globalThis.setInterval(()=>{n.renewDesktopWorkspaceScope?.(e.leaseId).catch(()=>void 0)},15e3)}).catch(()=>{a=!1}))}},d=y(u);return u(),()=>{i=!0,d(),l()}}function S(e,t){return x(e,{type:`thread-detail`,threadId:t})}function C(e){return x(e,{type:`interactive`})}function w(e,t){return x(e,{type:`vcs-status`,cwd:t})}function T(e,t){return x(e,{type:`provider-status`,...t?{instanceId:t}:{}})}function E(e){let t=n()?.environmentId??null,i=t!==null&&e.localEnvironmentId!==null&&e.localEnvironmentId!==t?e.localEnvironmentId:null;_=new Set(m({snapshots:e.snapshots,previouslyHydratedEnvironmentIds:_,...i===null?{}:{excludedEnvironmentIds:new Set([i])},port:{hydrate:e=>r.getState().hydrateEnvironmentStateFromCache(d(e),e.environmentId),isCacheHydrated:e=>r.getState().environmentStateById[e]?.hydratedFromCacheAt!==void 0,remove:e=>r.getState().removeEnvironmentState(e)}})),h=e;for(let e of g)e()}async function D(e){let t=n()?.environmentId??null;if(t!==null&&h.localEnvironmentId===e.environmentId&&t!==e.environmentId){if(e.action===`connect`){e.delayMs>0&&await new Promise(t=>globalThis.setTimeout(t,e.delayMs));try{let t=i();if(!t)throw Error(`Primary environment is unavailable.`);await t.ensureBootstrapped(),await globalThis.window?.desktopBridge?.reportDesktopWorkspaceConnection?.({environmentId:e.environmentId,connected:!0}).catch(()=>void 0)}catch(t){throw await globalThis.window?.desktopBridge?.reportDesktopWorkspaceConnection?.({environmentId:e.environmentId,connected:!1}).catch(()=>void 0),t}return}await globalThis.window?.desktopBridge?.reportDesktopWorkspaceConnection?.({environmentId:e.environmentId,connected:!1}).catch(()=>void 0);return}let r=s(e.environmentId);if(e.action===`connect`){e.delayMs>0&&await new Promise(t=>globalThis.setTimeout(t,e.delayMs));try{if(r)await r.reconnect(),await r.ensureBootstrapped();else{let t=h.machines.find(t=>t.environmentId===e.environmentId);if(!t?.canConnect)throw Error(`Desktop workspace machine is unavailable.`);r=await a({environmentId:t.environmentId,label:t.label})}await globalThis.window?.desktopBridge?.reportDesktopWorkspaceConnection?.({environmentId:e.environmentId,connected:!0}).catch(()=>void 0)}catch(t){throw await globalThis.window?.desktopBridge?.reportDesktopWorkspaceConnection?.({environmentId:e.environmentId,connected:!1}).catch(()=>void 0),t}return}r&&(r.kind===`primary`?await o():await c(e.environmentId),await globalThis.window?.desktopBridge?.reportDesktopWorkspaceConnection?.({environmentId:e.environmentId,connected:!1}).catch(()=>void 0))}function O(){let e=globalThis.window?.desktopBridge;if(!e?.getDesktopWorkspaceState)return()=>void 0;let t=!1,i=null,a=h.accountId,o=new Map,s=e=>{a!==e.accountId&&(o.clear(),a=e.accountId);for(let t of o.keys())e.machines.some(e=>e.environmentId===t&&e.canReadMetadata)||o.delete(t);E(e)},c=()=>{i&&globalThis.clearTimeout(i),i=globalThis.setTimeout(()=>{i=null;let a=e.publishDesktopWorkspaceSnapshot;if(!a||t)return;let s=n()?.environmentId??null;for(let e of h.machines){if(!e.canReadMetadata)continue;let n=s!==null&&e.environmentId===h.localEnvironmentId?s:e.environmentId;if(r.getState().environmentStateById[n]?.hydratedFromCacheAt!==void 0)continue;let i=f(n,0);if(!i)continue;let l=u(i,e.environmentId),d=JSON.stringify(l),p=o.get(e.environmentId);if(p?.pending||p?.fingerprint===d)continue;let m={fingerprint:d,pending:!0};o.set(e.environmentId,m),a({...l,capturedAt:Date.now()}).then(()=>{t||o.get(e.environmentId)!==m||(m.pending=!1,c())}).catch(()=>{o.get(e.environmentId)===m&&o.delete(e.environmentId)})}},100)},l=e.onDesktopWorkspaceState?.(e=>{t||(s(e),c())}),d=e.onDesktopWorkspaceConnectionCommand?.(e=>{D(e).catch(()=>void 0)}),p=r.subscribe(c);return e.getDesktopWorkspaceState().then(e=>{t||(s(e),c())}).catch(()=>void 0),()=>{t=!0,i&&globalThis.clearTimeout(i),l?.(),d?.(),p()}}export{O as a,w as i,T as n,b as o,S as r,C as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Pa as e}from"./runtime-BKneT96Q.js";var t={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ht as e,mt as t}from"./src-DPpEXU6w.js";import{Or as n,Pa as r,ci as i,kr as a,oi as o,si as s}from"./runtime-BKneT96Q.js";import{t as c}from"./compiler-runtime-qmuS0Svy.js";var l={name:`undo-2`,size:24,node:[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]};l.node;var u=r(l),d=c(),f=`ryco:last-editor`;function p(e){let n=t.find(t=>t.id===e);return!(!n||`workspaceOnly`in n&&n.workspaceOnly)}function m(n){let r=(0,d.c)(5),[o,s]=i(f,null,e),c=a(h),l;bb0:{if(c&&n.includes(c)&&p(c)){l=c;break bb0}if(o&&n.includes(o)&&p(o)){l=o;break bb0}let e;r[0]===n?e=r[1]:(e=t.find(e=>n.includes(e.id)&&p(e.id))?.id??null,r[0]=n,r[1]=e),l=e}let u=l,m;return r[2]!==u||r[3]!==s?(m=[u,s],r[2]=u,r[3]=s,r[4]=m):m=r[4],m}function h(e){return e.preferredEditor}function g(r){let i=new Set(r),a=n().preferredEditor;if(a&&i.has(a)&&p(a))return a;let c=o(f,e);if(c&&i.has(c)&&p(c))return c;let l=t.find(e=>i.has(e.id)&&p(e.id))?.id??null;return l&&s(f,l,e),l??null}async function _(e,t){let{availableEditors:n}=await e.server.getConfig(),r=g(n);if(!r)throw Error(`No available editors found.`);return await e.shell.openInEditor(t,r),r}export{u as a,m as i,_ as n,g as r,p as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Hr as e,Sa as t,vl as n}from"./runtime-BKneT96Q.js";import{t as r}from"./compiler-runtime-qmuS0Svy.js";var i=r(),a=n();function o(t){let n=(0,i.c)(8),r,o;n[0]===t?(r=n[1],o=n[2]):({className:r,...o}=t,n[0]=t,n[1]=r,n[2]=o);let s;n[3]===r?s=n[4]:(s=e(`flex min-w-0 flex-1 flex-col items-center justify-center gap-6 text-balance p-6 text-center md:p-12`,r),n[3]=r,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,a.jsx)(`div`,{className:s,"data-slot":`empty`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}function s(t){let n=(0,i.c)(8),r,o;n[0]===t?(r=n[1],o=n[2]):({className:r,...o}=t,n[0]=t,n[1]=r,n[2]=o);let s;n[3]===r?s=n[4]:(s=e(`flex max-w-sm flex-col items-center text-center`,r),n[3]=r,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,a.jsx)(`div`,{className:s,"data-slot":`empty-header`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}var c=t(`flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{defaultVariants:{variant:`default`},variants:{variant:{default:`bg-transparent`,icon:`relative flex size-9 shrink-0 items-center justify-center rounded-md border bg-card not-dark:bg-clip-padding text-foreground shadow-sm/5 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)] [&_svg:not([class*='size-'])]:size-4.5`}}});function l(t){let n=(0,i.c)(21),r,o,s;n[0]===t?(r=n[1],o=n[2],s=n[3]):({className:r,variant:s,...o}=t,n[0]=t,n[1]=r,n[2]=o,n[3]=s);let l=s===void 0?`default`:s,u;n[4]===r?u=n[5]:(u=e(`relative mb-6`,r),n[4]=r,n[5]=u);let d;n[6]!==r||n[7]!==l?(d=l===`icon`&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`div`,{"aria-hidden":`true`,className:e(c({className:r,variant:l}),`-translate-x-0.5 -rotate-10 pointer-events-none absolute bottom-px origin-bottom-left scale-84 shadow-none`)}),(0,a.jsx)(`div`,{"aria-hidden":`true`,className:e(c({className:r,variant:l}),`pointer-events-none absolute bottom-px origin-bottom-right translate-x-0.5 rotate-10 scale-84 shadow-none`)})]}),n[6]=r,n[7]=l,n[8]=d):d=n[8];let f;n[9]!==r||n[10]!==l?(f=e(c({className:r,variant:l})),n[9]=r,n[10]=l,n[11]=f):f=n[11];let p;n[12]!==o||n[13]!==f?(p=(0,a.jsx)(`div`,{className:f,...o}),n[12]=o,n[13]=f,n[14]=p):p=n[14];let m;return n[15]!==o||n[16]!==u||n[17]!==d||n[18]!==p||n[19]!==l?(m=(0,a.jsxs)(`div`,{className:u,"data-slot":`empty-media`,"data-variant":l,...o,children:[d,p]}),n[15]=o,n[16]=u,n[17]=d,n[18]=p,n[19]=l,n[20]=m):m=n[20],m}function u(t){let n=(0,i.c)(8),r,o;n[0]===t?(r=n[1],o=n[2]):({className:r,...o}=t,n[0]=t,n[1]=r,n[2]=o);let s;n[3]===r?s=n[4]:(s=e(`font-heading font-semibold text-xl`,r),n[3]=r,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,a.jsx)(`div`,{className:s,"data-slot":`empty-title`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}function d(t){let n=(0,i.c)(8),r,o;n[0]===t?(r=n[1],o=n[2]):({className:r,...o}=t,n[0]=t,n[1]=r,n[2]=o);let s;n[3]===r?s=n[4]:(s=e(`text-muted-foreground text-sm [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4 [[data-slot=empty-title]+&]:mt-1`,r),n[3]=r,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,a.jsx)(`div`,{className:s,"data-slot":`empty-description`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}function f(t){let n=(0,i.c)(8),r,o;n[0]===t?(r=n[1],o=n[2]):({className:r,...o}=t,n[0]=t,n[1]=r,n[2]=o);let s;n[3]===r?s=n[4]:(s=e(`flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm`,r),n[3]=r,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,a.jsx)(`div`,{className:s,"data-slot":`empty-content`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}export{l as a,s as i,f as n,u as o,d as r,o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Hr as e,Sa as t,vl as n}from"./runtime-BKneT96Q.js";import{t as r}from"./compiler-runtime-qmuS0Svy.js";import{t as i}from"./separator-BN705fC0.js";var a=r(),o=n(),s=t(`flex w-fit *:focus-visible:z-1 has-[>[data-slot=group]]:gap-2 *:has-focus-visible:z-1 dark:*:[[data-slot=button]:hover~[data-slot=separator]:not([data-slot]:hover~[data-slot=separator]~[data-slot=separator]),[data-slot][data-pressed]~[data-slot=separator]:not([data-slot][data-pressed]~[data-slot=separator]~[data-slot=separator])]:before:bg-input/64 dark:*:[[data-slot=separator]:has(~[data-slot=button]:hover):not(:has(~[data-slot=separator]~[data-slot]:hover)),[data-slot=separator]:has(~[data-slot][data-pressed]):not(:has(~[data-slot=separator]~[data-slot][data-pressed]))]:before:bg-input/64`,{defaultVariants:{orientation:`horizontal`},variants:{orientation:{horizontal:`*:[[data-slot]~[data-slot]:not([data-slot=separator])]:before:-start-[0.5px] *:data-slot:not-data-[slot=separator]:has-[~[data-slot]]:before:-end-[0.5px] *:pointer-coarse:after:min-w-auto *:data-slot:has-[~[data-slot]]:rounded-e-none *:data-slot:has-[~[data-slot]]:border-e-0 *:data-slot:has-[~[data-slot]]:before:rounded-e-none *:[[data-slot]~[data-slot]]:rounded-s-none *:[[data-slot]~[data-slot]]:border-s-0 *:[[data-slot]~[data-slot]]:before:rounded-s-none`,vertical:`*:[[data-slot]~[data-slot]:not([data-slot=separator])]:before:-top-[0.5px] *:data-slot:not-data-[slot=separator]:has-[~[data-slot]]:before:-bottom-[0.5px] flex-col *:pointer-coarse:after:min-h-auto *:data-slot:has-[~[data-slot]]:rounded-b-none *:data-slot:has-[~[data-slot]]:border-b-0 *:data-slot:not-data-[slot=separator]:has-[~[data-slot]]:before:hidden *:data-slot:has-[~[data-slot]]:before:rounded-b-none dark:*:last:before:hidden dark:*:first:before:block *:[[data-slot]~[data-slot]]:rounded-t-none *:[[data-slot]~[data-slot]]:border-t-0 *:[[data-slot]~[data-slot]]:before:rounded-t-none`}}});function c(t){let n=(0,a.c)(13),r,i,c,l;n[0]===t?(r=n[1],i=n[2],c=n[3],l=n[4]):({className:i,orientation:c,children:r,...l}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=c,n[4]=l);let u;n[5]!==i||n[6]!==c?(u=e(s({orientation:c}),i),n[5]=i,n[6]=c,n[7]=u):u=n[7];let d;return n[8]!==r||n[9]!==c||n[10]!==l||n[11]!==u?(d=(0,o.jsx)(`div`,{className:u,"data-orientation":c,"data-slot":`group`,role:`group`,...l,children:r}),n[8]=r,n[9]=c,n[10]=l,n[11]=u,n[12]=d):d=n[12],d}function l(t){let n=(0,a.c)(10),r,s,c;n[0]===t?(r=n[1],s=n[2],c=n[3]):({className:r,orientation:c,...s}=t,n[0]=t,n[1]=r,n[2]=s,n[3]=c);let l=c===void 0?`vertical`:c,u;n[4]===r?u=n[5]:(u=e(`[[data-slot=input-control]:focus-within+&,[data-slot=input-group]:focus-within+&,[data-slot=select-trigger]:focus-visible+*+&,[data-slot=number-field]:focus-within+input+&]:-translate-x-px pointer-events-none relative z-2 bg-input before:absolute before:inset-0 has-[+[data-slot=input-control]:focus-within,+[data-slot=input-group]:focus-within,+[data-slot=select-trigger]:focus-visible+*,+[data-slot=number-field]:focus-within]:translate-x-px has-[+[data-slot=input-control]:focus-within,+[data-slot=input-group]:focus-within,+[data-slot=select-trigger]:focus-visible+*,+[data-slot=number-field]:focus-within]:bg-ring dark:before:bg-input/32 [[data-slot=input-control]:focus-within+&,[data-slot=input-group]:focus-within+&,[data-slot=select-trigger]:focus-visible+*+&,[data-slot=number-field]:focus-within+&,[data-slot=number-field]:focus-within+input+&]:bg-ring`,r),n[4]=r,n[5]=u);let d;return n[6]!==l||n[7]!==s||n[8]!==u?(d=(0,o.jsx)(i,{className:u,orientation:l,...s}),n[6]=l,n[7]=s,n[8]=u,n[9]=d):d=n[9],d}export{l as n,c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{D as n,L as r,Nn as i,w as a}from"./runtime-Djy96GJd.js";import{o,s}from"./authorization-CjOFkg7b.js";import{a as c,i as l,o as u,r as d,s as f,t as p}from"./workspaceMetadataProjection-BL4sEIL2.js";var m=`__TSR_index`,h=`popstate`,g=`beforeunload`;function _(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=S(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[m];i=v(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[m];i=v(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t,n?.ignoreBlocker??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[m]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function v(e,t){t||={};let n=C();return{...t,key:n,__TSR_key:n,[m]:e}}function y(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>S(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=C();t.history.replaceState({[m]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,v=!1,y=()=>l,b,x=()=>{b&&(O._ignoreSubscribers=!0,(b[2]?t.history.pushState:t.history.replaceState)(b[1],``,b[0]),O._ignoreSubscribers=!1,b=void 0,u=void 0)},w=(e,t,n)=>{let r=s(t),i=!!b;i||(u=l),l=S(t,n),b=[r,n,b?.[2]||e],i||queueMicrotask(()=>x())},T=e=>{l=c(),O.notify({type:e})},E=async()=>{if(v=!1,f){f=!1;return}let e=c(),n=e.state[m]-l.state[m],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),O.notify(u);return}}}l=c(),O.notify(u)},D=e=>{if(v){v=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},O=_({getLocation:y,getLength:()=>t.history.length,pushState:(e,t)=>w(!0,e,t),replaceState:(e,t)=>w(!1,e,t),back:e=>(e&&(p=!0,v=!0),t.history.back()),forward:e=>{e&&(p=!0,v=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,v=!0),t.history.go(e)},createHref:e=>s(e),flush:x,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(g,D,{capture:!0}),t.removeEventListener(h,E)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(g,D,{capture:!0}),t.addEventListener(h,E),t.history.pushState=function(...e){let r=n.apply(t.history,e);return O._ignoreSubscribers||T(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return O._ignoreSubscribers||T(`REPLACE`),n},O}function b(e){let t=e?.window??(typeof document<`u`?window:void 0);return y({window:t,parseLocation:()=>{let e=t.location.hash.split(`#`).slice(1),n=e[0]??`/`,r=t.location.search,i=e.slice(1);return S(`${n}${r}${i.length===0?``:`#${i.join(`#`)}`}`,t.history.state)},createHref:e=>`${t.location.pathname}${t.location.search}#${e}`})}function x(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function S(e,t){let n=x(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=C();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[m]:0,key:a,__TSR_key:a}}}function C(){return(Math.random()+1).toString(36).substring(7)}function w(e){return Number.isSafeInteger(e)&&e>=0}function T(e){return e.environmentId===null||!w(e.selectionGeneration)||!w(e.snapshotGeneration)||e.effectiveRole!==`owner`||!e.directoryReady||!e.relayReady||!e.shellReady?null:{environmentId:e.environmentId,selectionGeneration:e.selectionGeneration,snapshotGeneration:e.snapshotGeneration,effectiveRole:e.effectiveRole,directoryReady:!0,relayReady:!0,shellReady:!0}}function E(e,t,n){let r=T(n);return r!==null&&e.environmentId===t&&r.environmentId===t&&e.selectionGeneration===r.selectionGeneration&&e.snapshotGeneration===r.snapshotGeneration&&e.effectiveRole===r.effectiveRole}function D(){let e=new Set,t={environmentId:null,selectionGeneration:0,snapshotGeneration:0,effectiveRole:null,directoryReady:!1,relayReady:!1,shellReady:!1};return{update(n){let r=t.environmentId!==n.environmentId||t.effectiveRole!==n.effectiveRole||t.directoryReady!==n.directoryReady||t.relayReady!==n.relayReady||t.shellReady!==n.shellReady;t={...n,selectionGeneration:r?t.selectionGeneration+1:t.selectionGeneration};for(let t of Array.from(e))t()},read:()=>t,lease(e){let n=T(t);return n?.environmentId===e?n:null},validate:(e,n)=>E(e,n,t),subscribe(t){return e.add(t),()=>e.delete(t)}}}var O=45e3;function k(e){if(!Number.isInteger(e)||e<1||e>3)throw RangeError(`platformMaxConnections must be between 1 and 3`);return{platformMaxConnections:e,backgrounded:!1,leases:[],connections:[]}}function ee(e,t,n){let r=e.connections.find(e=>e.environmentId===t)??{environmentId:t,connected:!1,lastAccessedAt:0};return{...e,connections:[...e.connections.filter(e=>e.environmentId!==t),n(r)]}}function te(e,t,n){return ee(e,t,e=>({...e,lastAccessedAt:Math.max(e.lastAccessedAt,n)}))}function A(e,t,n,r){return ee(e,t,e=>({...e,connected:n,lastAccessedAt:Math.max(e.lastAccessedAt,r)}))}function ne(e,t){if(t.leaseId.length===0)throw TypeError(`leaseId must not be empty`);if(e.leases.some(e=>e.leaseId===t.leaseId))throw Error(`Duplicate workspace connection lease: ${t.leaseId}`);let n=t.ttlMs??45e3;if(!Number.isFinite(n)||n<=0)throw RangeError(`ttlMs must be positive`);return te({...e,leases:[...e.leases,{leaseId:t.leaseId,environmentId:t.environmentId,scope:t.scope,retainedAt:t.now,expiresAt:t.now+n}]},t.environmentId,t.now)}function re(e,t,n,r=O){if(!Number.isFinite(r)||r<=0)throw RangeError(`ttlMs must be positive`);return{...e,leases:e.leases.map(e=>e.leaseId===t?{...e,expiresAt:n+r}:e)}}function ie(e,t){return{...e,leases:e.leases.filter(e=>e.leaseId!==t)}}function ae(e,t){return e.backgrounded===t?e:{...e,backgrounded:t}}function oe(e,t){let n=e.leases.filter(e=>e.expiresAt>t);return n.length===e.leases.length?e:{...e,leases:n}}function se(e,t){let n=oe(e,t.now),r=new Map;for(let e of n.leases)r.set(e.environmentId,Math.max(r.get(e.environmentId)??0,e.retainedAt));let i=Array.from(r.keys()),a=new Set(i),o=n.connections.filter(e=>e.connected),s=new Set(o.map(e=>e.environmentId)),c=o.filter(e=>!a.has(e.environmentId)).toSorted((e,t)=>e.lastAccessedAt-t.lastAccessedAt||String(e.environmentId).localeCompare(String(t.environmentId))),l=i.filter(e=>!s.has(e)).toSorted((e,t)=>(r.get(t)??0)-(r.get(e)??0)||String(e).localeCompare(String(t))),u=[];if(n.backgrounded)return u.push(...c.map(e=>e.environmentId)),{state:n,retain:i.filter(e=>s.has(e)),release:u,connect:[],queued:l};let d=o.length,f=[...c];for(;f.length>0&&(d>n.platformMaxConnections||d+l.length>n.platformMaxConnections);){let e=f.shift();u.push(e.environmentId),--d}let p=Math.max(0,n.platformMaxConnections-d),m=l.slice(0,p),h=Math.max(0,t.wakeStaggerMs??0);return{state:n,retain:i.filter(e=>s.has(e)),release:u,connect:m.map((e,t)=>({environmentId:e,delayMs:t*h})),queued:l.slice(m.length)}}var ce={os:`unknown`,arch:`other`};function le(e){return Array.from(new Set(e.filter(e=>e!==null)))}function ue(e){let t=e.revokedAt!=null,n=e.removed===!0,r=e.clientTier===`hosted-web`&&e.capabilities?.nativeClientRequired===!0,i=e.clientTier===`native`&&e.requiresNativeVerification&&e.nativeTrust===`unknown`,a=e.clientTier===`native`&&e.requiresNativeVerification&&e.nativeTrust===`unverified`,o=e.nativeTrust===`identity-conflict`,s=e.clientTier===`hosted-web`?!r:!e.requiresNativeVerification||e.nativeTrust===`verified`||e.nativeTrust===`account-trusted`,c=!t&&!n&&s&&!o,l=c&&e.online,u=l&&e.effectiveRole!==null&&e.effectiveRole!==`viewer`,d=le([t?`revoked`:null,n?`removed`:null,r?`native-client-required`:null,i?`trust-unknown`:null,a?`not-verified`:null,o?`identity-conflict`:null,e.online?null:`offline`,e.effectiveRole===null?`role-unknown`:null,e.effectiveRole===`viewer`?`viewer`:null]);return{environmentId:e.environmentId,nodeId:e.nodeId??null,label:e.label,platform:e.platform??ce,serverVersion:e.serverVersion??null,capabilities:{repositoryIdentity:e.capabilities?.repositoryIdentity??!1,nativeClientRequired:e.capabilities?.nativeClientRequired??!1,threadSettlement:e.capabilities?.threadSettlement??!1,...e.capabilities?.threadSnooze===void 0?{}:{threadSnooze:e.capabilities.threadSnooze}},clientTier:e.clientTier,nativeTrust:e.nativeTrust,effectiveRole:e.effectiveRole,presence:{online:e.online,lastSeenAt:e.lastSeenAt,observedAt:e.observedAt},connectionState:e.connectionState??`disconnected`,deliveryUnknown:e.deliveryUnknown??!1,revokedAt:e.revokedAt??null,removed:n,canReadMetadata:c,canConnect:l,canMutate:u,cacheDisposition:t||n||r||i||a?`purge`:o?`locked-stale`:`available`,accessReasons:d}}function de(e){let t=new Map;for(let n of e)t.set(n.environmentId,ue(n));return Array.from(t.values()).toSorted((e,t)=>e.label.localeCompare(t.label)||String(e.environmentId).localeCompare(String(t.environmentId)))}function fe(e){if(e===null)return null;let t=Date.parse(e);return Number.isFinite(t)?t:null}function pe(e){let t=new Map(e.machines.map(e=>[e.environmentId,e])),r=new Map;for(let t of e.snapshots){let e=r.get(t.environmentId);(!e||t.capturedAt>e.capturedAt)&&r.set(t.environmentId,t)}let i=[],o=[];for(let[e,n]of r){let r=t.get(e);if(r&&r.cacheDisposition!==`purge`){if(r.cacheDisposition===`locked-stale`){o.push({status:`locked-stale`,environmentId:e,capturedAt:n.capturedAt});continue}r.canReadMetadata&&(o.push({status:`available`,snapshot:n}),i.push(n))}}let s=i.flatMap(e=>e.projects),c=i.flatMap(e=>e.worktrees),l=i.flatMap(e=>{let n=t.get(e.environmentId);return e.threads.map(e=>({...e,deliveryUnknown:e.deliveryUnknown||n?.deliveryUnknown===!0}))}),u=s.flatMap(n=>{let r=t.get(n.environmentId);if(!r)return[];let i=a(n);return[{environmentId:n.environmentId,projectId:n.id,physicalKey:i,name:n.name,cwd:n.cwd,repositoryIdentity:n.repositoryIdentity,machineLabel:r.label,online:r.presence.online,canMutate:r.canMutate,nativeTrust:r.nativeTrust,effectiveRole:r.effectiveRole,lastUsedAt:e.lastUsedAtByPhysicalProjectKey?.[i]??null,lastLiveAt:fe(n.updatedAt)??r.presence.lastSeenAt,localDesktop:e.localDesktopEnvironmentId===n.environmentId}]});return{machines:e.machines,snapshots:o.toSorted((e,t)=>{let n=e.status===`available`?e.snapshot.environmentId:e.environmentId,r=t.status===`available`?t.snapshot.environmentId:t.environmentId;return String(n).localeCompare(String(r))}),projects:s,worktrees:c,threads:l,logicalProjects:n(u)}}var me=e(t(),1),j=`ryco:hosted-workspace-metadata:v1`,M=1;function N(e){try{return new URL(e).origin.toLowerCase()}catch{return e.replace(/\/+$/gu,``).toLowerCase()}}function P(e){return{...e,hubOrigin:N(e.hubOrigin)}}function he(e){return{...e,namespace:P(e.namespace)}}function ge(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=e;return typeof t.hubOrigin==`string`&&t.hubOrigin.length>0&&t.hubOrigin.length<=2048&&typeof t.accountId==`string`&&t.accountId.length>0&&t.accountId.length<=2048&&typeof t.environmentId==`string`&&t.environmentId.length>0&&t.environmentId.length<=2048}function _e(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=e;return ge(t.namespace)&&l(t.snapshot,t.namespace.environmentId)&&Number.isSafeInteger(t.payloadBytes)&&t.payloadBytes===f(t.snapshot)&&Number.isSafeInteger(t.updatedAt)&&Number(t.updatedAt)>=0}function F(e){try{let t=e.getItem(j);if(!t)return{version:M,records:[]};let n=JSON.parse(t);if(typeof n!=`object`||!n||Array.isArray(n))return{version:M,records:[]};let r=n;if(r.version!==M||!Array.isArray(r.records))return{version:M,records:[]};let i=new Map;for(let e of r.records){if(!_e(e))continue;let t=he(e),n=u(t.namespace),r=i.get(n);(!r||t.updatedAt>r.updatedAt)&&i.set(n,t)}return{version:M,records:Array.from(i.values())}}catch{return{version:M,records:[]}}}function I(e,t){if(t.length===0){e.removeItem(j);return}e.setItem(j,JSON.stringify({version:M,records:t}))}function ve(e){let t=Promise.resolve(),n=e=>{let n=t.then(e,e);return t=n.then(()=>void 0,()=>void 0),n};return{load:async t=>{let n=u(P(t));return F(e).records.find(e=>u(e.namespace)===n)??null},list:async({hubOrigin:t,accountId:n})=>F(e).records.filter(e=>N(e.namespace.hubOrigin)===N(t)&&e.namespace.accountId===n),replace:t=>n(async()=>{if(!_e(t))throw TypeError(`Invalid hosted workspace metadata record.`);let n=he(t),r=F(e),i=c({existing:r.records,incoming:n});if(!i.accepted)return;let a=u(n.namespace),o=new Set(i.evict.map(u));I(e,[...r.records.filter(e=>{let t=u(e.namespace);return t!==a&&!o.has(t)}),n])}),purgeEnvironment:t=>n(async()=>{let n=u(P(t));I(e,F(e).records.filter(e=>u(e.namespace)!==n))}),purgeAccount:({hubOrigin:t,accountId:r})=>n(async()=>{I(e,F(e).records.filter(e=>N(e.namespace.hubOrigin)!==N(t)||e.namespace.accountId!==r))})}}var ye=null;function be(){return ye||=ve(window.localStorage),ye}var L=`/node`,xe=/^[A-Za-z0-9_-]{1,128}$/,Se={nodeId:null,malformed:!1,logicalPathname:`/`},Ce={nodeId:null,malformed:!0},we={nodeId:null,malformed:!1};function R(e){return xe.test(e)}function z(e){let t=e.indexOf(`#`),n=t===-1?e:e.slice(0,t),r=n.indexOf(`?`),i=r===-1?n:n.slice(0,r);return{pathname:i,suffix:e.slice(i.length)}}function Te(e){let{pathname:t,suffix:n}=z(e);if(t!==L&&!t.startsWith(`${L}/`))return{routed:we,logicalHref:e};let r=t.slice(6),i=r.indexOf(`/`),a=i===-1?r:r.slice(0,i);if(!R(a))return{routed:Ce,logicalHref:`/`};let o=i===-1?`/`:r.slice(i)||`/`;return{routed:{nodeId:a,malformed:!1},logicalHref:`${o}${n}`}}var Ee=new Set([`sign-in`,`sign-up`,`public-signup`,`password-reset`,`invitation`,`setup`,`email-verification`,`nodes`,`account`]),B=()=>null;function De(e){return B=e,()=>{B===e&&(B=()=>null)}}function Oe(e){let t=/^\/([^/]+)\/[^/]+\/?$/u.exec(e)?.[1];if(!t||Ee.has(t)||t===`draft`||t===`node`)return null;try{return decodeURIComponent(t)}catch{return t}}function ke(e){if(!e.startsWith(`/`))return!1;let t=e.slice(1).split(`/`,1)[0]??``;return Ee.has(t)}function Ae(e,t){let{pathname:n,suffix:r}=z(e);if(ke(n))return e;let i=Oe(n),a=i?B(i)??t:t;return a===null||!R(a)?e:`${n===``||n===`/`?`${L}/${a}`:`${L}/${a}${n}`}${r}`}var V=Se,H=new Set,U=null;function W(e){if(e.nodeId!==V.nodeId||e.malformed!==V.malformed||e.logicalPathname!==V.logicalPathname){V=e;for(let e of Array.from(H))e()}}function je(e){let{pathname:t}=z(e);return t===``?`/`:t}function Me(){return V}function Ne(e){return H.add(e),()=>{H.delete(e)}}function Pe(e,t){let n=e.indexOf(`#`),r=n===-1?e:e.slice(0,n),i=r.indexOf(`?`);return{href:e,pathname:i===-1?r:r.slice(0,i),search:i===-1?``:r.slice(i),hash:n===-1?``:e.slice(n),state:t??{__TSR_index:0}}}function Fe(e=window){let t=y({window:e,parseLocation:()=>{let t=Te(`${e.location.pathname}${e.location.search}${e.location.hash}`);return W({...t.routed,logicalPathname:je(t.logicalHref)}),Pe(t.logicalHref,e.history.state)},createHref:e=>Ae(e,V.nodeId)}),n=t.subscribe(({location:e,action:t})=>{if(t.type!==`PUSH`&&t.type!==`REPLACE`)return;let n=Te(Ae(e.href,V.nodeId));W({...n.routed,logicalPathname:je(n.logicalHref)})}),r=t.destroy.bind(t);return t.destroy=()=>{n(),r()},U=t,t}function Ie(){return U}function Le(e){let t=U;return!t||!R(e)?!1:(W({nodeId:e,malformed:!1,logicalPathname:`/`}),t.push(`/`),!0)}function Re(e){let t=U;return!t||!R(e)?!1:(W({nodeId:e,malformed:!1,logicalPathname:V.logicalPathname}),t.replace(t.location.href),!0)}function ze(){let e=U;return e?(W({nodeId:null,malformed:!1,logicalPathname:`/nodes`}),e.push(`/nodes`),!0):!1}function Be(){let e=U;e&&(W(Se),e.replace(`/`))}var Ve=25e3,He=O;function Ue(e,t){switch(t.type){case`interactive`:return JSON.stringify([e,t.type]);case`thread-detail`:return JSON.stringify([e,t.type,t.threadId]);case`vcs-status`:return JSON.stringify([e,t.type,t.cwd]);case`provider-status`:return JSON.stringify([e,t.type,t.instanceId??null])}}function We(){let e=new Map,t=new Set,n=()=>{for(let e of Array.from(t))e()};return{retain(t,r){let i=Ue(t,r),a=e.get(i);e.set(i,{key:i,environmentId:t,scope:r,refCount:(a?.refCount??0)+1}),a||n();let o=!1;return()=>{if(o)return;o=!0;let t=e.get(i);if(t){if(t.refCount>1){e.set(i,{...t,refCount:t.refCount-1});return}e.delete(i),n()}}},list:()=>Array.from(e.values()),subscribe(e){return t.add(e),()=>t.delete(e)},reset(){e.size!==0&&(e.clear(),n())}}}var G=We();function Ge(e,t){return G.retain(e,{type:`thread-detail`,threadId:t})}function Ke(e,t){return G.retain(e,{type:`vcs-status`,cwd:t})}function qe(e,t){return G.retain(e,{type:`provider-status`,...t?{instanceId:t}:{}})}function Je(e){let t=k(1),n=[],r=Promise.resolve(),i=!1,a=0,o=new Map,s=new Set,c=()=>{for(let e of Array.from(s))e()},l=()=>{let n=new Map(e.scopes.list().map(e=>[e.key,e]));for(let[e,r]of Array.from(o))n.has(e)||(o.delete(e),t=ie(t,r));for(let[r,i]of n){let n=o.get(r);if(n){t=re(t,n,e.now(),He);continue}let s=`hosted-web-${++a}`;o.set(r,s),t=ne(t,{leaseId:s,environmentId:i.environmentId,scope:i.scope,now:e.now(),ttlMs:He})}},u=async()=>{if(i)return;l();let r=se(t,{now:e.now(),wakeStaggerMs:750});t=r.state,n=r.queued,c();for(let n of r.release)await e.release(n).catch(()=>void 0),t=A(t,n,!1,e.now());for(let n of r.connect)try{await e.connect(n.environmentId,n.delayMs),t=A(t,n.environmentId,!0,e.now())}catch{t=A(t,n.environmentId,!1,e.now())}n=se(t,{now:e.now(),wakeStaggerMs:750}).queued,c()},d=()=>{let e=r.catch(()=>void 0).then(u);return r=e.catch(()=>void 0),e},f=e.scopes.subscribe(()=>void d()),p=e.setInterval(()=>void d(),Ve);return{snapshot:()=>({demand:t,queuedEnvironmentIds:n,activeConnectionCount:t.connections.filter(e=>e.connected).length}),subscribe(e){return s.add(e),()=>s.delete(e)},reportConnected(n,r){t=A(t,n,r,e.now()),c()},setBackgrounded(e){return t=ae(t,e),d()},reconcile:d,dispose(){i||(i=!0,f(),e.clearInterval(p),s.clear())}}}var Ye={machines:[],snapshots:[],projects:[],worktrees:[],threads:[],logicalProjects:[]},K={status:`signed-out`,accountId:null,machines:[],workspace:Ye,demand:{demand:k(1),queuedEnvironmentIds:[],activeConnectionCount:0}},q=new Set,J=null,Y=D();function X(e){return Y.lease(e)}function Xe(e,t=3e4){let n=X(e);return n?Promise.resolve(n):new Promise(n=>{let r=!1,i=e=>{r||(r=!0,globalThis.clearTimeout(o),a(),n(e))},a=Y.subscribe(()=>{let t=X(e);t&&i(t)}),o=globalThis.setTimeout(()=>i(null),t)})}function Z(e){K=e;for(let e of Array.from(q))e()}function Ze(){return K}function Qe(){return(0,me.useSyncExternalStore)($e,Ze,Ze)}function $e(e){return q.add(e),()=>q.delete(e)}function Q(e){return e.capabilities?.nativeClientRequired===!0}function et(e,t,n,r,i){return de(e.map(e=>({environmentId:e.environmentId,nodeId:e.id,label:e.label,platform:{os:e.platformOs,arch:e.platformArch},serverVersion:e.clientVersion,capabilities:{repositoryIdentity:e.capabilities?.repositoryIdentity??!0,threadSettlement:e.capabilities?.threadSettlement??!1,nativeClientRequired:e.capabilities?.nativeClientRequired??!1},clientTier:`hosted-web`,nativeTrust:`not-required`,requiresNativeVerification:!1,effectiveRole:e.effectiveRole,online:e.presence.online,lastSeenAt:e.presence.lastHeartbeatAt,observedAt:i,connectionState:e.environmentId===t&&n?`connected`:`disconnected`,deliveryUnknown:e.environmentId===t&&r,revokedAt:e.revokedAt})))}function tt(e){let t=e?.cache??be(),n=e?.now??Date.now,a=e?.setTimeout??((e,t)=>globalThis.setTimeout(e,t)),c=e?.clearTimeout??(e=>globalThis.clearTimeout(e)),l=e?.setInterval??((e,t)=>globalThis.setInterval(e,t)),u=e?.clearInterval??(e=>globalThis.clearInterval(e)),m=e?.hubOrigin??window.location.origin,h=new Map,g=null,_=null,v=null,y=!1,b=0,x=null,S=Je({scopes:G,now:n,setInterval:l,clearInterval:u,connect:async(e,t)=>{t>0&&await new Promise(e=>a(e,t));let n=s.getState();if(n.directoryStatus!==`ready`||n.browserStatus!==`current`)throw Error(`Hosted Web directory is not current.`);let r=n.nodes.find(t=>t.environmentId===e&&t.revokedAt===null&&t.presence.online&&!Q(t));if(!r)throw Error(`Hosted Web environment is not eligible.`);await o.selectNode(r.id)},release:async e=>{s.getState().selectedNode?.environmentId===e&&await o.returnToDirectory()}});J=S;let C=e=>{let t=s.getState(),n=t.accountStatus===`authenticated`?t.directoryStatus===`ready`?`ready`:t.directoryStatus===`stale`?`stale`:`loading`:`signed-out`,r=t.selectedNode?.environmentId??null,i=r===null?void 0:h.get(r);Y.update({environmentId:r,snapshotGeneration:i?.capturedAt??0,effectiveRole:t.effectiveRole,directoryReady:t.directoryStatus===`ready`&&t.browserStatus===`current`,relayReady:t.transportStatus===`online`&&t.sessionEstablished&&r!==null,shellReady:i!==void 0&&e.some(e=>e.environmentId===r&&e.connectionState===`connected`&&e.canMutate)}),Z({status:n,accountId:t.account?.id??null,machines:e,workspace:pe({machines:e,snapshots:Array.from(h.values())}),demand:S.snapshot()})},w=async()=>{let e=++b,a=s.getState(),o=a.accountStatus===`authenticated`?a.account?.id??null:null,c=o?JSON.stringify([m,o]):null,l=_;if(_=o,l&&o!==l&&(await t.purgeAccount({hubOrigin:m,accountId:l}).catch(()=>void 0),h.clear(),G.reset(),r()),!o){g=null,C([]);return}if(c!==g&&a.directoryStatus===`ready`){g=c;let n=await t.list({hubOrigin:m,accountId:o});if(y||e!==b)return;let r=new Set(a.nodes.filter(e=>e.revokedAt===null&&!Q(e)).map(e=>e.environmentId));for(let e of n){if(!r.has(e.namespace.environmentId)){await t.purgeEnvironment(e.namespace).catch(()=>void 0);continue}h.set(e.namespace.environmentId,e.snapshot),i.getState().hydrateEnvironmentStateFromCache(d(e.snapshot),e.namespace.environmentId)}}let u=a.selectedNode?.environmentId??null,f=u!==null&&a.transportStatus!==`idle`&&a.transportStatus!==`terminal-failure`,p=a.transportStatus===`online`&&a.sessionEstablished;x&&x!==u&&S.reportConnected(x,!1),u&&S.reportConnected(u,f),x=u;let v=et(a.nodes,u,p,a.sessionStatus===`delivery-unknown`,n()),w=new Map(v.map(e=>[e.environmentId,e]));if(a.directoryStatus===`ready`)for(let[e]of Array.from(h))w.get(e)?.cacheDisposition!==`available`&&(h.delete(e),i.getState().removeEnvironmentState(e),await t.purgeEnvironment({hubOrigin:m,accountId:o,environmentId:e}).catch(()=>void 0));y||e!==b||C(v)},T=()=>{v!==null&&c(v),v=a(()=>{if(v=null,y||!_)return;let e=K.machines;for(let r of e){if(!r.canReadMetadata)continue;let e=p(r.environmentId,n(),r.deliveryUnknown);e&&(h.set(r.environmentId,e),t.replace({namespace:{hubOrigin:m,accountId:_,environmentId:r.environmentId},snapshot:e,payloadBytes:f(e),updatedAt:n()}).catch(()=>void 0))}C(e)},100)},E=s.subscribe(()=>void w()),D=i.subscribe(T),O=S.subscribe(()=>C(K.machines)),k=De($);return S.reconcile(),w(),()=>{y=!0,b+=1,v!==null&&c(v),E(),D(),O(),k(),S.dispose(),J===S&&(J=null,Y.update({environmentId:null,snapshotGeneration:0,effectiveRole:null,directoryReady:!1,relayReady:!1,shellReady:!1}),Z({status:`signed-out`,accountId:null,machines:[],workspace:Ye,demand:S.snapshot()}))}}function nt(e){return J?.setBackgrounded(e)??Promise.resolve()}function rt(){return J!==null}function $(e){return s.getState().nodes.find(t=>t.environmentId===e&&t.revokedAt===null&&!Q(t))?.id??null}export{S,Fe as _,nt as a,y as b,Xe as c,Ke as d,Re as f,Me as g,Ie as h,X as i,qe as l,Le as m,Q as n,tt as o,Be as p,$ as r,Qe as s,rt as t,Ge as u,ze as v,b as x,Ne as y};
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{D as n,L as r,Nn as i,w as a}from"./runtime-BKneT96Q.js";import{o,s}from"./authorization-B1YXfej3.js";import{a as c,i as l,o as u,r as d,s as f,t as p}from"./workspaceMetadataProjection-BnpxBe8S.js";var m=`__TSR_index`,h=`popstate`,g=`beforeunload`;function _(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=S(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[m];i=v(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[m];i=v(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t,n?.ignoreBlocker??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[m]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function v(e,t){t||={};let n=C();return{...t,key:n,__TSR_key:n,[m]:e}}function y(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>S(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=C();t.history.replaceState({[m]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,v=!1,y=()=>l,b,x=()=>{b&&(O._ignoreSubscribers=!0,(b[2]?t.history.pushState:t.history.replaceState)(b[1],``,b[0]),O._ignoreSubscribers=!1,b=void 0,u=void 0)},w=(e,t,n)=>{let r=s(t),i=!!b;i||(u=l),l=S(t,n),b=[r,n,b?.[2]||e],i||queueMicrotask(()=>x())},T=e=>{l=c(),O.notify({type:e})},E=async()=>{if(v=!1,f){f=!1;return}let e=c(),n=e.state[m]-l.state[m],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),O.notify(u);return}}}l=c(),O.notify(u)},D=e=>{if(v){v=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},O=_({getLocation:y,getLength:()=>t.history.length,pushState:(e,t)=>w(!0,e,t),replaceState:(e,t)=>w(!1,e,t),back:e=>(e&&(p=!0,v=!0),t.history.back()),forward:e=>{e&&(p=!0,v=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,v=!0),t.history.go(e)},createHref:e=>s(e),flush:x,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(g,D,{capture:!0}),t.removeEventListener(h,E)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(g,D,{capture:!0}),t.addEventListener(h,E),t.history.pushState=function(...e){let r=n.apply(t.history,e);return O._ignoreSubscribers||T(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return O._ignoreSubscribers||T(`REPLACE`),n},O}function b(e){let t=e?.window??(typeof document<`u`?window:void 0);return y({window:t,parseLocation:()=>{let e=t.location.hash.split(`#`).slice(1),n=e[0]??`/`,r=t.location.search,i=e.slice(1);return S(`${n}${r}${i.length===0?``:`#${i.join(`#`)}`}`,t.history.state)},createHref:e=>`${t.location.pathname}${t.location.search}#${e}`})}function x(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function S(e,t){let n=x(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=C();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[m]:0,key:a,__TSR_key:a}}}function C(){return(Math.random()+1).toString(36).substring(7)}function w(e){return Number.isSafeInteger(e)&&e>=0}function T(e){return e.environmentId===null||!w(e.selectionGeneration)||!w(e.snapshotGeneration)||e.effectiveRole!==`owner`||!e.directoryReady||!e.relayReady||!e.shellReady?null:{environmentId:e.environmentId,selectionGeneration:e.selectionGeneration,snapshotGeneration:e.snapshotGeneration,effectiveRole:e.effectiveRole,directoryReady:!0,relayReady:!0,shellReady:!0}}function E(e,t,n){let r=T(n);return r!==null&&e.environmentId===t&&r.environmentId===t&&e.selectionGeneration===r.selectionGeneration&&e.snapshotGeneration===r.snapshotGeneration&&e.effectiveRole===r.effectiveRole}function D(){let e=new Set,t={environmentId:null,selectionGeneration:0,snapshotGeneration:0,effectiveRole:null,directoryReady:!1,relayReady:!1,shellReady:!1};return{update(n){let r=t.environmentId!==n.environmentId||t.effectiveRole!==n.effectiveRole||t.directoryReady!==n.directoryReady||t.relayReady!==n.relayReady||t.shellReady!==n.shellReady;t={...n,selectionGeneration:r?t.selectionGeneration+1:t.selectionGeneration};for(let t of Array.from(e))t()},read:()=>t,lease(e){let n=T(t);return n?.environmentId===e?n:null},validate:(e,n)=>E(e,n,t),subscribe(t){return e.add(t),()=>e.delete(t)}}}var O=45e3;function k(e){if(!Number.isInteger(e)||e<1||e>3)throw RangeError(`platformMaxConnections must be between 1 and 3`);return{platformMaxConnections:e,backgrounded:!1,leases:[],connections:[]}}function ee(e,t,n){let r=e.connections.find(e=>e.environmentId===t)??{environmentId:t,connected:!1,lastAccessedAt:0};return{...e,connections:[...e.connections.filter(e=>e.environmentId!==t),n(r)]}}function te(e,t,n){return ee(e,t,e=>({...e,lastAccessedAt:Math.max(e.lastAccessedAt,n)}))}function A(e,t,n,r){return ee(e,t,e=>({...e,connected:n,lastAccessedAt:Math.max(e.lastAccessedAt,r)}))}function ne(e,t){if(t.leaseId.length===0)throw TypeError(`leaseId must not be empty`);if(e.leases.some(e=>e.leaseId===t.leaseId))throw Error(`Duplicate workspace connection lease: ${t.leaseId}`);let n=t.ttlMs??45e3;if(!Number.isFinite(n)||n<=0)throw RangeError(`ttlMs must be positive`);return te({...e,leases:[...e.leases,{leaseId:t.leaseId,environmentId:t.environmentId,scope:t.scope,retainedAt:t.now,expiresAt:t.now+n}]},t.environmentId,t.now)}function re(e,t,n,r=O){if(!Number.isFinite(r)||r<=0)throw RangeError(`ttlMs must be positive`);return{...e,leases:e.leases.map(e=>e.leaseId===t?{...e,expiresAt:n+r}:e)}}function ie(e,t){return{...e,leases:e.leases.filter(e=>e.leaseId!==t)}}function ae(e,t){return e.backgrounded===t?e:{...e,backgrounded:t}}function oe(e,t){let n=e.leases.filter(e=>e.expiresAt>t);return n.length===e.leases.length?e:{...e,leases:n}}function se(e,t){let n=oe(e,t.now),r=new Map;for(let e of n.leases)r.set(e.environmentId,Math.max(r.get(e.environmentId)??0,e.retainedAt));let i=Array.from(r.keys()),a=new Set(i),o=n.connections.filter(e=>e.connected),s=new Set(o.map(e=>e.environmentId)),c=o.filter(e=>!a.has(e.environmentId)).toSorted((e,t)=>e.lastAccessedAt-t.lastAccessedAt||String(e.environmentId).localeCompare(String(t.environmentId))),l=i.filter(e=>!s.has(e)).toSorted((e,t)=>(r.get(t)??0)-(r.get(e)??0)||String(e).localeCompare(String(t))),u=[];if(n.backgrounded)return u.push(...c.map(e=>e.environmentId)),{state:n,retain:i.filter(e=>s.has(e)),release:u,connect:[],queued:l};let d=o.length,f=[...c];for(;f.length>0&&(d>n.platformMaxConnections||d+l.length>n.platformMaxConnections);){let e=f.shift();u.push(e.environmentId),--d}let p=Math.max(0,n.platformMaxConnections-d),m=l.slice(0,p),h=Math.max(0,t.wakeStaggerMs??0);return{state:n,retain:i.filter(e=>s.has(e)),release:u,connect:m.map((e,t)=>({environmentId:e,delayMs:t*h})),queued:l.slice(m.length)}}var ce={os:`unknown`,arch:`other`};function le(e){return Array.from(new Set(e.filter(e=>e!==null)))}function ue(e){let t=e.revokedAt!=null,n=e.removed===!0,r=e.clientTier===`hosted-web`&&e.capabilities?.nativeClientRequired===!0,i=e.clientTier===`native`&&e.requiresNativeVerification&&e.nativeTrust===`unknown`,a=e.clientTier===`native`&&e.requiresNativeVerification&&e.nativeTrust===`unverified`,o=e.nativeTrust===`identity-conflict`,s=e.clientTier===`hosted-web`?!r:!e.requiresNativeVerification||e.nativeTrust===`verified`||e.nativeTrust===`account-trusted`,c=!t&&!n&&s&&!o,l=c&&e.online,u=l&&e.effectiveRole!==null&&e.effectiveRole!==`viewer`,d=le([t?`revoked`:null,n?`removed`:null,r?`native-client-required`:null,i?`trust-unknown`:null,a?`not-verified`:null,o?`identity-conflict`:null,e.online?null:`offline`,e.effectiveRole===null?`role-unknown`:null,e.effectiveRole===`viewer`?`viewer`:null]);return{environmentId:e.environmentId,nodeId:e.nodeId??null,label:e.label,platform:e.platform??ce,serverVersion:e.serverVersion??null,capabilities:{repositoryIdentity:e.capabilities?.repositoryIdentity??!1,nativeClientRequired:e.capabilities?.nativeClientRequired??!1,threadSettlement:e.capabilities?.threadSettlement??!1,...e.capabilities?.threadSnooze===void 0?{}:{threadSnooze:e.capabilities.threadSnooze}},clientTier:e.clientTier,nativeTrust:e.nativeTrust,effectiveRole:e.effectiveRole,presence:{online:e.online,lastSeenAt:e.lastSeenAt,observedAt:e.observedAt},connectionState:e.connectionState??`disconnected`,deliveryUnknown:e.deliveryUnknown??!1,revokedAt:e.revokedAt??null,removed:n,canReadMetadata:c,canConnect:l,canMutate:u,cacheDisposition:t||n||r||i||a?`purge`:o?`locked-stale`:`available`,accessReasons:d}}function de(e){let t=new Map;for(let n of e)t.set(n.environmentId,ue(n));return Array.from(t.values()).toSorted((e,t)=>e.label.localeCompare(t.label)||String(e.environmentId).localeCompare(String(t.environmentId)))}function fe(e){if(e===null)return null;let t=Date.parse(e);return Number.isFinite(t)?t:null}function pe(e){let t=new Map(e.machines.map(e=>[e.environmentId,e])),r=new Map;for(let t of e.snapshots){let e=r.get(t.environmentId);(!e||t.capturedAt>e.capturedAt)&&r.set(t.environmentId,t)}let i=[],o=[];for(let[e,n]of r){let r=t.get(e);if(r&&r.cacheDisposition!==`purge`){if(r.cacheDisposition===`locked-stale`){o.push({status:`locked-stale`,environmentId:e,capturedAt:n.capturedAt});continue}r.canReadMetadata&&(o.push({status:`available`,snapshot:n}),i.push(n))}}let s=i.flatMap(e=>e.projects),c=i.flatMap(e=>e.worktrees),l=i.flatMap(e=>{let n=t.get(e.environmentId);return e.threads.map(e=>({...e,deliveryUnknown:e.deliveryUnknown||n?.deliveryUnknown===!0}))}),u=s.flatMap(n=>{let r=t.get(n.environmentId);if(!r)return[];let i=a(n);return[{environmentId:n.environmentId,projectId:n.id,physicalKey:i,name:n.name,cwd:n.cwd,repositoryIdentity:n.repositoryIdentity,machineLabel:r.label,online:r.presence.online,canMutate:r.canMutate,nativeTrust:r.nativeTrust,effectiveRole:r.effectiveRole,lastUsedAt:e.lastUsedAtByPhysicalProjectKey?.[i]??null,lastLiveAt:fe(n.updatedAt)??r.presence.lastSeenAt,localDesktop:e.localDesktopEnvironmentId===n.environmentId}]});return{machines:e.machines,snapshots:o.toSorted((e,t)=>{let n=e.status===`available`?e.snapshot.environmentId:e.environmentId,r=t.status===`available`?t.snapshot.environmentId:t.environmentId;return String(n).localeCompare(String(r))}),projects:s,worktrees:c,threads:l,logicalProjects:n(u)}}var me=e(t(),1),j=`ryco:hosted-workspace-metadata:v1`,M=1;function N(e){try{return new URL(e).origin.toLowerCase()}catch{return e.replace(/\/+$/gu,``).toLowerCase()}}function P(e){return{...e,hubOrigin:N(e.hubOrigin)}}function he(e){return{...e,namespace:P(e.namespace)}}function ge(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=e;return typeof t.hubOrigin==`string`&&t.hubOrigin.length>0&&t.hubOrigin.length<=2048&&typeof t.accountId==`string`&&t.accountId.length>0&&t.accountId.length<=2048&&typeof t.environmentId==`string`&&t.environmentId.length>0&&t.environmentId.length<=2048}function _e(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=e;return ge(t.namespace)&&l(t.snapshot,t.namespace.environmentId)&&Number.isSafeInteger(t.payloadBytes)&&t.payloadBytes===f(t.snapshot)&&Number.isSafeInteger(t.updatedAt)&&Number(t.updatedAt)>=0}function F(e){try{let t=e.getItem(j);if(!t)return{version:M,records:[]};let n=JSON.parse(t);if(typeof n!=`object`||!n||Array.isArray(n))return{version:M,records:[]};let r=n;if(r.version!==M||!Array.isArray(r.records))return{version:M,records:[]};let i=new Map;for(let e of r.records){if(!_e(e))continue;let t=he(e),n=u(t.namespace),r=i.get(n);(!r||t.updatedAt>r.updatedAt)&&i.set(n,t)}return{version:M,records:Array.from(i.values())}}catch{return{version:M,records:[]}}}function I(e,t){if(t.length===0){e.removeItem(j);return}e.setItem(j,JSON.stringify({version:M,records:t}))}function ve(e){let t=Promise.resolve(),n=e=>{let n=t.then(e,e);return t=n.then(()=>void 0,()=>void 0),n};return{load:async t=>{let n=u(P(t));return F(e).records.find(e=>u(e.namespace)===n)??null},list:async({hubOrigin:t,accountId:n})=>F(e).records.filter(e=>N(e.namespace.hubOrigin)===N(t)&&e.namespace.accountId===n),replace:t=>n(async()=>{if(!_e(t))throw TypeError(`Invalid hosted workspace metadata record.`);let n=he(t),r=F(e),i=c({existing:r.records,incoming:n});if(!i.accepted)return;let a=u(n.namespace),o=new Set(i.evict.map(u));I(e,[...r.records.filter(e=>{let t=u(e.namespace);return t!==a&&!o.has(t)}),n])}),purgeEnvironment:t=>n(async()=>{let n=u(P(t));I(e,F(e).records.filter(e=>u(e.namespace)!==n))}),purgeAccount:({hubOrigin:t,accountId:r})=>n(async()=>{I(e,F(e).records.filter(e=>N(e.namespace.hubOrigin)!==N(t)||e.namespace.accountId!==r))})}}var ye=null;function be(){return ye||=ve(window.localStorage),ye}var L=`/node`,xe=/^[A-Za-z0-9_-]{1,128}$/,Se={nodeId:null,malformed:!1,logicalPathname:`/`},Ce={nodeId:null,malformed:!0},we={nodeId:null,malformed:!1};function R(e){return xe.test(e)}function z(e){let t=e.indexOf(`#`),n=t===-1?e:e.slice(0,t),r=n.indexOf(`?`),i=r===-1?n:n.slice(0,r);return{pathname:i,suffix:e.slice(i.length)}}function Te(e){let{pathname:t,suffix:n}=z(e);if(t!==L&&!t.startsWith(`${L}/`))return{routed:we,logicalHref:e};let r=t.slice(6),i=r.indexOf(`/`),a=i===-1?r:r.slice(0,i);if(!R(a))return{routed:Ce,logicalHref:`/`};let o=i===-1?`/`:r.slice(i)||`/`;return{routed:{nodeId:a,malformed:!1},logicalHref:`${o}${n}`}}var Ee=new Set([`sign-in`,`sign-up`,`public-signup`,`password-reset`,`invitation`,`setup`,`email-verification`,`nodes`,`account`]),B=()=>null;function De(e){return B=e,()=>{B===e&&(B=()=>null)}}function Oe(e){let t=/^\/([^/]+)\/[^/]+\/?$/u.exec(e)?.[1];if(!t||Ee.has(t)||t===`draft`||t===`node`)return null;try{return decodeURIComponent(t)}catch{return t}}function ke(e){if(!e.startsWith(`/`))return!1;let t=e.slice(1).split(`/`,1)[0]??``;return Ee.has(t)}function Ae(e,t){let{pathname:n,suffix:r}=z(e);if(ke(n))return e;let i=Oe(n),a=i?B(i)??t:t;return a===null||!R(a)?e:`${n===``||n===`/`?`${L}/${a}`:`${L}/${a}${n}`}${r}`}var V=Se,H=new Set,U=null;function W(e){if(e.nodeId!==V.nodeId||e.malformed!==V.malformed||e.logicalPathname!==V.logicalPathname){V=e;for(let e of Array.from(H))e()}}function je(e){let{pathname:t}=z(e);return t===``?`/`:t}function Me(){return V}function Ne(e){return H.add(e),()=>{H.delete(e)}}function Pe(e,t){let n=e.indexOf(`#`),r=n===-1?e:e.slice(0,n),i=r.indexOf(`?`);return{href:e,pathname:i===-1?r:r.slice(0,i),search:i===-1?``:r.slice(i),hash:n===-1?``:e.slice(n),state:t??{__TSR_index:0}}}function Fe(e=window){let t=y({window:e,parseLocation:()=>{let t=Te(`${e.location.pathname}${e.location.search}${e.location.hash}`);return W({...t.routed,logicalPathname:je(t.logicalHref)}),Pe(t.logicalHref,e.history.state)},createHref:e=>Ae(e,V.nodeId)}),n=t.subscribe(({location:e,action:t})=>{if(t.type!==`PUSH`&&t.type!==`REPLACE`)return;let n=Te(Ae(e.href,V.nodeId));W({...n.routed,logicalPathname:je(n.logicalHref)})}),r=t.destroy.bind(t);return t.destroy=()=>{n(),r()},U=t,t}function Ie(){return U}function Le(e){let t=U;return!t||!R(e)?!1:(W({nodeId:e,malformed:!1,logicalPathname:`/`}),t.push(`/`),!0)}function Re(e){let t=U;return!t||!R(e)?!1:(W({nodeId:e,malformed:!1,logicalPathname:V.logicalPathname}),t.replace(t.location.href),!0)}function ze(){let e=U;return e?(W({nodeId:null,malformed:!1,logicalPathname:`/nodes`}),e.push(`/nodes`),!0):!1}function Be(){let e=U;e&&(W(Se),e.replace(`/`))}var Ve=25e3,He=O;function Ue(e,t){switch(t.type){case`interactive`:return JSON.stringify([e,t.type]);case`thread-detail`:return JSON.stringify([e,t.type,t.threadId]);case`vcs-status`:return JSON.stringify([e,t.type,t.cwd]);case`provider-status`:return JSON.stringify([e,t.type,t.instanceId??null])}}function We(){let e=new Map,t=new Set,n=()=>{for(let e of Array.from(t))e()};return{retain(t,r){let i=Ue(t,r),a=e.get(i);e.set(i,{key:i,environmentId:t,scope:r,refCount:(a?.refCount??0)+1}),a||n();let o=!1;return()=>{if(o)return;o=!0;let t=e.get(i);if(t){if(t.refCount>1){e.set(i,{...t,refCount:t.refCount-1});return}e.delete(i),n()}}},list:()=>Array.from(e.values()),subscribe(e){return t.add(e),()=>t.delete(e)},reset(){e.size!==0&&(e.clear(),n())}}}var G=We();function Ge(e,t){return G.retain(e,{type:`thread-detail`,threadId:t})}function Ke(e,t){return G.retain(e,{type:`vcs-status`,cwd:t})}function qe(e,t){return G.retain(e,{type:`provider-status`,...t?{instanceId:t}:{}})}function Je(e){let t=k(1),n=[],r=Promise.resolve(),i=!1,a=0,o=new Map,s=new Set,c=()=>{for(let e of Array.from(s))e()},l=()=>{let n=new Map(e.scopes.list().map(e=>[e.key,e]));for(let[e,r]of Array.from(o))n.has(e)||(o.delete(e),t=ie(t,r));for(let[r,i]of n){let n=o.get(r);if(n){t=re(t,n,e.now(),He);continue}let s=`hosted-web-${++a}`;o.set(r,s),t=ne(t,{leaseId:s,environmentId:i.environmentId,scope:i.scope,now:e.now(),ttlMs:He})}},u=async()=>{if(i)return;l();let r=se(t,{now:e.now(),wakeStaggerMs:750});t=r.state,n=r.queued,c();for(let n of r.release)await e.release(n).catch(()=>void 0),t=A(t,n,!1,e.now());for(let n of r.connect)try{await e.connect(n.environmentId,n.delayMs),t=A(t,n.environmentId,!0,e.now())}catch{t=A(t,n.environmentId,!1,e.now())}n=se(t,{now:e.now(),wakeStaggerMs:750}).queued,c()},d=()=>{let e=r.catch(()=>void 0).then(u);return r=e.catch(()=>void 0),e},f=e.scopes.subscribe(()=>void d()),p=e.setInterval(()=>void d(),Ve);return{snapshot:()=>({demand:t,queuedEnvironmentIds:n,activeConnectionCount:t.connections.filter(e=>e.connected).length}),subscribe(e){return s.add(e),()=>s.delete(e)},reportConnected(n,r){t=A(t,n,r,e.now()),c()},setBackgrounded(e){return t=ae(t,e),d()},reconcile:d,dispose(){i||(i=!0,f(),e.clearInterval(p),s.clear())}}}var Ye={machines:[],snapshots:[],projects:[],worktrees:[],threads:[],logicalProjects:[]},K={status:`signed-out`,accountId:null,machines:[],workspace:Ye,demand:{demand:k(1),queuedEnvironmentIds:[],activeConnectionCount:0}},q=new Set,J=null,Y=D();function X(e){return Y.lease(e)}function Xe(e,t=3e4){let n=X(e);return n?Promise.resolve(n):new Promise(n=>{let r=!1,i=e=>{r||(r=!0,globalThis.clearTimeout(o),a(),n(e))},a=Y.subscribe(()=>{let t=X(e);t&&i(t)}),o=globalThis.setTimeout(()=>i(null),t)})}function Z(e){K=e;for(let e of Array.from(q))e()}function Ze(){return K}function Qe(){return(0,me.useSyncExternalStore)($e,Ze,Ze)}function $e(e){return q.add(e),()=>q.delete(e)}function Q(e){return e.capabilities?.nativeClientRequired===!0}function et(e,t,n,r,i){return de(e.map(e=>({environmentId:e.environmentId,nodeId:e.id,label:e.label,platform:{os:e.platformOs,arch:e.platformArch},serverVersion:e.clientVersion,capabilities:{repositoryIdentity:e.capabilities?.repositoryIdentity??!0,threadSettlement:e.capabilities?.threadSettlement??!1,nativeClientRequired:e.capabilities?.nativeClientRequired??!1},clientTier:`hosted-web`,nativeTrust:`not-required`,requiresNativeVerification:!1,effectiveRole:e.effectiveRole,online:e.presence.online,lastSeenAt:e.presence.lastHeartbeatAt,observedAt:i,connectionState:e.environmentId===t&&n?`connected`:`disconnected`,deliveryUnknown:e.environmentId===t&&r,revokedAt:e.revokedAt})))}function tt(e){let t=e?.cache??be(),n=e?.now??Date.now,a=e?.setTimeout??((e,t)=>globalThis.setTimeout(e,t)),c=e?.clearTimeout??(e=>globalThis.clearTimeout(e)),l=e?.setInterval??((e,t)=>globalThis.setInterval(e,t)),u=e?.clearInterval??(e=>globalThis.clearInterval(e)),m=e?.hubOrigin??window.location.origin,h=new Map,g=null,_=null,v=null,y=!1,b=0,x=null,S=Je({scopes:G,now:n,setInterval:l,clearInterval:u,connect:async(e,t)=>{t>0&&await new Promise(e=>a(e,t));let n=s.getState();if(n.directoryStatus!==`ready`||n.browserStatus!==`current`)throw Error(`Hosted Web directory is not current.`);let r=n.nodes.find(t=>t.environmentId===e&&t.revokedAt===null&&t.presence.online&&!Q(t));if(!r)throw Error(`Hosted Web environment is not eligible.`);await o.selectNode(r.id)},release:async e=>{s.getState().selectedNode?.environmentId===e&&await o.returnToDirectory()}});J=S;let C=e=>{let t=s.getState(),n=t.accountStatus===`authenticated`?t.directoryStatus===`ready`?`ready`:t.directoryStatus===`stale`?`stale`:`loading`:`signed-out`,r=t.selectedNode?.environmentId??null,i=r===null?void 0:h.get(r);Y.update({environmentId:r,snapshotGeneration:i?.capturedAt??0,effectiveRole:t.effectiveRole,directoryReady:t.directoryStatus===`ready`&&t.browserStatus===`current`,relayReady:t.transportStatus===`online`&&t.sessionEstablished&&r!==null,shellReady:i!==void 0&&e.some(e=>e.environmentId===r&&e.connectionState===`connected`&&e.canMutate)}),Z({status:n,accountId:t.account?.id??null,machines:e,workspace:pe({machines:e,snapshots:Array.from(h.values())}),demand:S.snapshot()})},w=async()=>{let e=++b,a=s.getState(),o=a.accountStatus===`authenticated`?a.account?.id??null:null,c=o?JSON.stringify([m,o]):null,l=_;if(_=o,l&&o!==l&&(await t.purgeAccount({hubOrigin:m,accountId:l}).catch(()=>void 0),h.clear(),G.reset(),r()),!o){g=null,C([]);return}if(c!==g&&a.directoryStatus===`ready`){g=c;let n=await t.list({hubOrigin:m,accountId:o});if(y||e!==b)return;let r=new Set(a.nodes.filter(e=>e.revokedAt===null&&!Q(e)).map(e=>e.environmentId));for(let e of n){if(!r.has(e.namespace.environmentId)){await t.purgeEnvironment(e.namespace).catch(()=>void 0);continue}h.set(e.namespace.environmentId,e.snapshot),i.getState().hydrateEnvironmentStateFromCache(d(e.snapshot),e.namespace.environmentId)}}let u=a.selectedNode?.environmentId??null,f=u!==null&&a.transportStatus!==`idle`&&a.transportStatus!==`terminal-failure`,p=a.transportStatus===`online`&&a.sessionEstablished;x&&x!==u&&S.reportConnected(x,!1),u&&S.reportConnected(u,f),x=u;let v=et(a.nodes,u,p,a.sessionStatus===`delivery-unknown`,n()),w=new Map(v.map(e=>[e.environmentId,e]));if(a.directoryStatus===`ready`)for(let[e]of Array.from(h))w.get(e)?.cacheDisposition!==`available`&&(h.delete(e),i.getState().removeEnvironmentState(e),await t.purgeEnvironment({hubOrigin:m,accountId:o,environmentId:e}).catch(()=>void 0));y||e!==b||C(v)},T=()=>{v!==null&&c(v),v=a(()=>{if(v=null,y||!_)return;let e=K.machines;for(let r of e){if(!r.canReadMetadata)continue;let e=p(r.environmentId,n(),r.deliveryUnknown);e&&(h.set(r.environmentId,e),t.replace({namespace:{hubOrigin:m,accountId:_,environmentId:r.environmentId},snapshot:e,payloadBytes:f(e),updatedAt:n()}).catch(()=>void 0))}C(e)},100)},E=s.subscribe(()=>void w()),D=i.subscribe(T),O=S.subscribe(()=>C(K.machines)),k=De($);return S.reconcile(),w(),()=>{y=!0,b+=1,v!==null&&c(v),E(),D(),O(),k(),S.dispose(),J===S&&(J=null,Y.update({environmentId:null,snapshotGeneration:0,effectiveRole:null,directoryReady:!1,relayReady:!1,shellReady:!1}),Z({status:`signed-out`,accountId:null,machines:[],workspace:Ye,demand:S.snapshot()}))}}function nt(e){return J?.setBackgrounded(e)??Promise.resolve()}function rt(){return J!==null}function $(e){return s.getState().nodes.find(t=>t.environmentId===e&&t.revokedAt===null&&!Q(t))?.id??null}export{S,Fe as _,nt as a,y as b,Xe as c,Ke as d,Re as f,Me as g,Ie as h,X as i,qe as l,Le as m,Q as n,tt as o,Be as p,$ as r,Qe as s,rt as t,Ge as u,ze as v,b as x,Ne as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{g as r,h as i,y as a}from"./hostedConnectionCoordinator-
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{g as r,h as i,y as a}from"./hostedConnectionCoordinator-YkDLnATK.js";var o=n(),s=e(t(),1),c=Object.freeze({"":`overview`,security:`security`,appearance:`appearance`}),l=Object.freeze({"sign-in":`/sign-in`,"sign-in-password":`/sign-in/password`,"sign-in-recovery-code":`/sign-in/recovery-code`,"sign-up":`/sign-up`,"sign-up-verify":`/public-signup/verify`,"reset-password":`/password-reset`,invitation:`/invitation`,setup:`/setup`,"email-verification":`/email-verification`,nodes:`/nodes`,"nodes-enroll":`/nodes/enroll`}),u=Object.freeze([`sign-in`,`sign-up`,`public-signup`,`password-reset`,`invitation`,`setup`,`email-verification`,`nodes`,`account`]);function d(e){return e.length>1&&e.endsWith(`/`)?e.slice(0,-1):e===``?`/`:e}function f(e){let t=d(e);if(t.startsWith(`/account`))return{kind:`account`,section:c[t.slice(8).replace(/^\//,``)]??`overview`};for(let[e,n]of Object.entries(l))if(t===n)return{kind:e};return null}function p(e){return e.kind===`account`?e.section===`overview`?`/account`:`/account/${e.section}`:l[e.kind]}function m(e){switch(e.kind){case`sign-in`:return`Sign in`;case`sign-in-password`:return`Sign in with a password`;case`sign-in-recovery-code`:return`Use a recovery code`;case`sign-up`:return`Create your account`;case`sign-up-verify`:return`Verify your email`;case`reset-password`:return`Reset your password`;case`invitation`:return`Redeem your invitation`;case`setup`:return`Claim this Hub`;case`email-verification`:return`Email verification`;case`nodes`:return`Your nodes`;case`nodes-enroll`:return`Enroll a node`;case`account`:return e.section===`overview`?`Account`:e.section===`security`?`Security`:`Appearance`}}var h=typeof window>`u`?`/`:d(window.location.pathname),g=new Set;function _(){for(let e of Array.from(g))e()}function v(e){let t=d(e);t!==h&&(h=t,_())}var y=!1;function b(){y||(y=!0,a(()=>{v(r().logicalPathname)}))}function x(){return i()===null?typeof window>`u`?h:d(window.location.pathname):h}var S=!1;function C(){S||typeof window>`u`||(S=!0,window.addEventListener(`popstate`,()=>{i()===null&&_()}))}function w(e){return b(),C(),g.add(e),()=>{g.delete(e)}}function T(e,t){E(p(e),t)}function E(e,t){let n=d(e),r=i();if(r){t?.replace===!0?r.replace(n):r.push(n),v(n);return}typeof window<`u`&&(t?.replace===!0?window.history.replaceState(window.history.state,``,n):window.history.pushState(window.history.state,``,n)),h=n,_()}function D(){let e=(0,o.c)(2),t=(0,s.useSyncExternalStore)(w,x),n;return e[0]===t?n=e[1]:(n=f(t),e[0]=t,e[1]=n),n}export{E as a,T as i,p as n,D as o,m as r,u as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/main-
|
|
2
|
-
var e=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),t=function(e){return`/`+e},n={},r=function(r,i,a){let o=Promise.resolve();if(i&&i.length>0){let r=document.getElementsByTagName(`link`),s=document.querySelector(`meta[property=csp-nonce]`),c=s?.nonce||s?.getAttribute(`nonce`);function l(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function u(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}o=l(i.map(i=>{if(i=t(i,a),i=u(i),i in n)return;n[i]=!0;let o=i.endsWith(`.css`);for(let e=r.length-1;e>=0;e--){let t=r[e];if(t.href===i&&(!o||t.rel===`stylesheet`))return}let s=document.createElement(`link`);if(s.rel=o?`stylesheet`:e,o||(s.as=`script`),s.crossOrigin=``,s.href=i,c&&s.setAttribute(`nonce`,c),document.head.appendChild(s),o)return new Promise((e,t)=>{s.addEventListener(`load`,e),s.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${i}`)))})}))}function s(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return o.then(e=>{for(let t of e||[])t.status===`rejected`&&s(t.reason);return r().catch(s)})},i=e=>{let t=document.createElement(`link`);for(let[n,r]of Object.entries(e))t.setAttribute(n,r);document.head.append(t)};window.addEventListener(`load`,()=>{i({rel:`icon`,type:`image/png`,href:`/favicon-96x96.png`,sizes:`96x96`}),i({rel:`shortcut icon`,href:`/favicon.ico`}),i({rel:`apple-touch-icon`,sizes:`180x180`,href:`/apple-touch-icon.png`})},{once:!0}),performance.mark(`ryco:startup:web-entry.import-start`),r(()=>import(`./main-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/main-BNPtp9Z0.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var e=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),t=function(e){return`/`+e},n={},r=function(r,i,a){let o=Promise.resolve();if(i&&i.length>0){let r=document.getElementsByTagName(`link`),s=document.querySelector(`meta[property=csp-nonce]`),c=s?.nonce||s?.getAttribute(`nonce`);function l(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function u(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}o=l(i.map(i=>{if(i=t(i,a),i=u(i),i in n)return;n[i]=!0;let o=i.endsWith(`.css`);for(let e=r.length-1;e>=0;e--){let t=r[e];if(t.href===i&&(!o||t.rel===`stylesheet`))return}let s=document.createElement(`link`);if(s.rel=o?`stylesheet`:e,o||(s.as=`script`),s.crossOrigin=``,s.href=i,c&&s.setAttribute(`nonce`,c),document.head.appendChild(s),o)return new Promise((e,t)=>{s.addEventListener(`load`,e),s.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${i}`)))})}))}function s(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return o.then(e=>{for(let t of e||[])t.status===`rejected`&&s(t.reason);return r().catch(s)})},i=e=>{let t=document.createElement(`link`);for(let[n,r]of Object.entries(e))t.setAttribute(n,r);document.head.append(t)};window.addEventListener(`load`,()=>{i({rel:`icon`,type:`image/png`,href:`/favicon-96x96.png`,sizes:`96x96`}),i({rel:`shortcut icon`,href:`/favicon.ico`}),i({rel:`apple-touch-icon`,sizes:`180x180`,href:`/apple-touch-icon.png`})},{once:!0}),performance.mark(`ryco:startup:web-entry.import-start`),r(()=>import(`./main-CGeD6yVE.js`).then(e=>e.t),__vite__mapDeps([0])).finally(()=>{performance.mark(`ryco:startup:web-entry.import-end`)});export{r as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{$c as n,Hr as r,Nc as i,To as a,Vo as o,hs as s,kc as c,qc as l,vc as u,vl as d}from"./runtime-BKneT96Q.js";import{t as f}from"./compiler-runtime-qmuS0Svy.js";import{t as p}from"./useValueChanged-DkoUO9bY.js";import{t as m}from"./useControlled-DQwgzrEC.js";import{i as h,n as g,r as _,s as v,t as y,u as b}from"./useLabelableId-N_LsKNbf.js";var x=e(t(),1),S=x.forwardRef(function(e,t){let{render:r,className:d,id:f,name:S,value:C,disabled:w=!1,onValueChange:T,defaultValue:E,autoFocus:D=!1,style:ee,...O}=e,{state:k,name:A,disabled:j,setTouched:M,setDirty:N,validityData:P,setFocused:F,setFilled:I,validationMode:L,validation:R}=v(),{clearErrors:z,elementRef:B,submitCountRef:V}=_(),H=j||w,U=A??S,W={...k,disabled:H},{labelId:G}=g(),K=y({id:f}),[q]=m({controlled:C,default:E,name:`FieldControl`,state:`value`}),J=C!==void 0,Y=J?q:void 0,X=Y==null?void 0:String(Y),Z=l(()=>R.inputRef.current?.value);h(R.inputRef,K,X,Z,!H,S),n(()=>{let e=X??R.inputRef.current?.value;e!==void 0&&I(e!==``)},[X,R.inputRef,I]),p(X,()=>{X!==void 0&&(z(U),N(X!==(P.initialValue??``)),R.change(X))});let Q=x.useRef(null),$=c();return n(()=>{D&&Q.current===u(i(Q.current))&&F(!0)},[D,F]),s(`input`,e,{ref:[t,Q],state:W,props:[{id:K,disabled:H,name:U,ref:R.inputRef,"aria-labelledby":G,autoFocus:D,...J?{value:Y}:{defaultValue:E},onChange(e){let t=e.currentTarget.value,n=a(o,e.nativeEvent);T?.(t,n),!J&&(N(t!==(P.initialValue??``)),I(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(z(U),R.change(t)))},onFocus(){F(!0)},onBlur(e){if(M(!0),F(!1),L===`onBlur`){let t=e.currentTarget.value;R.commit(t),J&&queueMicrotask(()=>{let e=R.inputRef.current?.value;e!==void 0&&e!==t&&e!==(P.initialValue??``)&&R.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){M(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===B.current&&!e.defaultPrevented){let t=e.currentTarget,n=V.current;$.start(0,()=>{V.current===n&&R.commit(t.value)})}else R.commit(t)}}},O,e=>R.getValidationProps(H,e)],stateAttributesMapping:b})}),C=d(),w=x.forwardRef(function(e,t){return(0,C.jsx)(S,{ref:t,...e})}),T=f(),E=`phone:h-11 phone:[&_[data-slot=input]]:h-11 phone:[&_[data-slot=input]]:leading-11`;function D(e){let t=(0,T.c)(25),n,i,a,o,s,c;t[0]===e?(n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6]):({className:n,size:o,unstyled:s,nativeInput:c,style:a,...i}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c);let l=o===void 0?`default`:o,u=s!==void 0&&s,d=c!==void 0&&c,f=l===`sm`&&`h-7.5 px-[calc(--spacing(2.5)-1px)] leading-7.5 sm:h-6.5 sm:leading-6.5`,p=l===`lg`&&`h-9.5 leading-9.5 sm:h-8.5 sm:leading-8.5`,m=i.type===`search`&&`[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-webkit-search-results-button]:appearance-none [&::-webkit-search-results-decoration]:appearance-none`,h=i.type===`file`&&`text-muted-foreground file:me-3 file:bg-transparent file:font-medium file:text-foreground file:text-sm`,g;t[7]!==f||t[8]!==p||t[9]!==m||t[10]!==h?(g=r(`h-8.5 w-full min-w-0 rounded-[inherit] px-[calc(--spacing(3)-1px)] leading-8.5 outline-none placeholder:text-muted-foreground/72 sm:h-7.5 sm:leading-7.5 [transition:background-color_5000000s_ease-in-out_0s]`,f,p,m,h),t[7]=f,t[8]=p,t[9]=m,t[10]=h,t[11]=g):g=t[11];let _=g,v;t[12]!==n||t[13]!==u?(v=r(!u&&`relative inline-flex w-full rounded-lg border border-input bg-background not-dark:bg-clip-padding text-base text-foreground shadow-xs/5 ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16 has-aria-invalid:border-destructive/36 has-focus-visible:border-ring has-autofill:bg-foreground/4 has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none has-focus-visible:ring-[3px] sm:text-sm dark:bg-input/32 dark:has-autofill:bg-foreground/8 dark:has-aria-invalid:ring-destructive/24 dark:not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]`,n)||void 0,t[12]=n,t[13]=u,t[14]=v):v=t[14];let y;t[15]!==_||t[16]!==d||t[17]!==i||t[18]!==l||t[19]!==a?(y=d?(0,C.jsx)(`input`,{...i,className:_,"data-slot":`input`,size:typeof l==`number`?l:void 0,style:typeof a==`function`?void 0:a}):(0,C.jsx)(w,{...i,className:_,"data-slot":`input`,size:typeof l==`number`?l:void 0,style:a}),t[15]=_,t[16]=d,t[17]=i,t[18]=l,t[19]=a,t[20]=y):y=t[20];let b;return t[21]!==l||t[22]!==y||t[23]!==v?(b=(0,C.jsx)(`span`,{className:v,"data-size":l,"data-slot":`input-control`,children:y}),t[21]=l,t[22]=y,t[23]=v,t[24]=b):b=t[24],b}export{E as n,S as r,D as t};
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{$c as n,Bo as r,Cc as i,Do as a,Eo as o,Fo as ee,Fs as s,Gc as c,Hr as l,Io as u,Kc as te,Lc as ne,Lo as d,Mo as re,Nc as f,Oo as p,Pa as ie,Qc as m,Ro as h,Tc as g,To as _,Uo as v,Vc as y,Vo as b,Ws as x,Xo as ae,as as oe,bc as se,bo as ce,bs as le,ds as ue,el as S,gs as C,hs as w,il as T,js as E,kc as de,ko as D,lo as fe,nc as pe,nl as O,qc as k,rc as A,rl as me,uc as he,uo as ge,vl as _e,vs as ve,xs as ye,yc as j,zo as be}from"./runtime-BKneT96Q.js";import{t as xe}from"./compiler-runtime-qmuS0Svy.js";import{O as Se,T as Ce,f as we}from"./usePopupViewport-w8BEny9j.js";import{A as Te,C as Ee,D as De,E as Oe,F as ke,N as Ae,O as je,P as Me,S as Ne,T as Pe,_ as Fe,b as Ie,d as Le,g as Re,h as ze,j as Be,k as Ve,m as He,p as M,v as Ue,w as We,y as Ge}from"./badge-BjvTY7-E.js";import{t as Ke}from"./useBaseUiId-BtuL7q77.js";import{t as qe}from"./useValueChanged-DkoUO9bY.js";import{t as Je}from"./useControlled-DQwgzrEC.js";import{a as Ye,c as Xe,i as Ze,n as Qe,o as N,r as $e,s as et,t as tt,u as nt}from"./useLabelableId-N_LsKNbf.js";var rt={name:`chevrons-up-down`,size:24,node:[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]};rt.node;var it=ie(rt),P=e(t(),1);function at(e,t,n,r,i,a,o,ee,c,l=2){let u=E(n.current,{event:e,orientation:r,loopFocus:i,rtl:a,cols:l,disabledIndices:o,minIndex:ee,maxIndex:c,prevIndex:t>c?ee:t,stopEvent:!0});return s(n.current,u)?void 0:u}var ot=P.createContext(void 0),st=P.createContext(void 0),ct=P.createContext(void 0),lt=P.createContext(!1),ut=P.createContext(``);function F(){let e=P.useContext(ot);if(!e)throw Error(m(22));return e}function dt(){let e=P.useContext(st);if(!e)throw Error(m(23));return e}function ft(){let e=P.useContext(ct);if(!e)throw Error(m(24));return e}function pt(){return P.useContext(ut)}function mt(){return P.useContext(lt)}var ht={id:e=>e.id,labelId:e=>e.labelId,items:e=>e.items,selectedValue:e=>e.selectedValue,hasSelectionChips:e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0},hasSelectedValue:e=>{let{selectedValue:t,selectionMode:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0},hasNullItemLabel:(e,t)=>t?Fe(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMounted:e=>e.forceMounted,inline:e=>e.inline,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>Ne(t,e,n)):Ne(t,r,n)},transitionStatus:e=>e.transitionStatus,popupProps:e=>e.popupProps,listProps:e=>e.listProps,inputProps:e=>e.inputProps,triggerProps:e=>e.triggerProps,itemProps:e=>e.itemProps,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupId:e=>e.popupId,triggerElement:e=>e.triggerElement,inputElement:e=>e.inputElement,inputGroupElement:e=>e.inputGroupElement,popupSide:e=>e.popupSide,openMethod:e=>e.openMethod,inputInsidePopup:e=>e.inputInsidePopup,inputOwnsFormValue:e=>e.inputOwnsFormValue,selectionMode:e=>e.selectionMode,name:e=>e.name,form:e=>e.form,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,grid:e=>e.grid,virtualized:e=>e.virtualized,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,modal:e=>e.modal,autoHighlight:e=>e.autoHighlight};function gt(e){return e==null?void 0:`${e}-popup`}function _t(e,t){return(n,r)=>n!=null&&e.contains(n,r,t)}function vt(e,t,n){return(r,i)=>{if(r==null)return!1;if(!i)return!0;let a=t?.selected??t,o=n==null?``:Ge(n,a);return o&&e.contains(o,i)&&o.length===i.length?!0:e.contains(r,i,t)}}function yt(e){return Array.isArray(e)?e.map(e=>yt(e)).join(`,`):e==null?``:String(e)}var bt=new Map;function xt(e={}){let t={usage:`search`,sensitivity:`base`,ignorePunctuation:!0,...e},n=`${yt(e.locale)}|${JSON.stringify(t)}`,r=bt.get(n);if(r)return r;let i=new Intl.Collator(e.locale,t),a={contains(e,t,n){if(!t)return!0;let r=Ge(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(i.compare(r.slice(e,e+t.length),t)===0)return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=Ge(e,n);return i.compare(r.slice(0,t.length),t)===0},endsWith(e,t,n){if(!t)return!0;let r=Ge(e,n),a=t.length;return r.length>=a&&i.compare(r.slice(r.length-a),t)===0}};return bt.set(n,a),a}var St=xt;function Ct(e={}){let{multiple:t=!1,value:n,...r}=e,i=xt(r),a=P.useCallback((e,r,a)=>t?_t(i,a)(e,r):vt(i,a,n)(e,r),[i,n,t]);return P.useMemo(()=>({...i,contains:a}),[a,i])}var wt=Symbol(`none`),Tt={value:wt,index:-1};function Et(e,t,n){let r=e.get(t);if(r!==void 0||n===Ee)return r;for(let[r,i]of e)if(Ne(r,t,n))return i}var I=_e();function Dt(e){let{id:t,onOpenChangeComplete:r,defaultSelectedValue:i=null,selectedValue:a,onSelectedValueChange:s,defaultInputValue:c,inputValue:l,open:re,defaultOpen:f=!1,selectionMode:p,onItemHighlighted:ie,name:g,form:x,disabled:ae=!1,readOnly:w=!1,required:E=!1,inputRef:de,grid:D=!1,items:pe,filteredItems:A,filter:he,filterQuery:_e,openOnInputClick:xe=!0,autoHighlight:Ae=!1,keepHighlight:je=!1,highlightItemOnHover:Fe=!0,loopFocus:Le=!0,itemToStringLabel:ze,itemToStringValue:He,isItemEqualToValue:M=Ee,virtualized:Ke=!1,inline:Ye=!1,fillInputOnItemPress:Xe=!0,modal:Qe=!1,limit:N=-1,autoComplete:nt=`list`,formAutoComplete:rt,locale:it,submitOnItemClick:F=!1}=e,{clearErrors:dt}=$e(),{setDirty:ft,validityData:pt,setFilled:mt,name:gt,disabled:vt,setTouched:yt,setFocused:bt,validationMode:xt,validation:Ct}=et(),Dt=fe(),Ot=tt({id:t}),kt=St({locale:it}),L=Array.isArray(pe)?null:pe;if(L&&typeof L.label!=`function`)throw Error(m(100));let R=L?L.data:pe,z=L?.value,At=z?void 0:R,jt=P.useMemo(()=>{if(!A||!z)return;let e=Re(A),t=e.map(z),n;return{values:t,findItem(r,i){if(!n){n=new Map;for(let r=0;r<t.length;r+=1)n.has(t[r])||n.set(t[r],e[r])}return Et(n,r,i)}}},[A,z]),Mt=P.useMemo(()=>L?e=>L.label(e,M,e=>{let t=jt?.findItem(e,M);return t==null?Ge(e,ze):L.itemLabel(t)}):ze,[L,ze,jt,M]),Nt=P.useMemo(()=>L?Object.assign(e=>L.itemLabel(e),{selected:e=>Ge(e,Mt)}):ze,[L,Mt,ze]);function Pt(e){return Ge(e,Mt)}let[Ft,It]=P.useState(!1),[B,Lt]=P.useState(null),Rt=P.useRef(B),zt=P.useRef([]),Bt=P.useRef([]),Vt=P.useRef(null),V=P.useRef(null),Ht=P.useRef(null),Ut=P.useRef(null),Wt=P.useRef(null),Gt=P.useRef(!0),Kt=P.useRef(!1),qt=P.useRef(null),Jt=P.useRef(null),Yt=P.useRef(null),Xt=P.useRef(Tt),Zt=P.useRef(null),Qt=P.useRef([]),$t=P.useRef(null),H=vt||ae,en=gt??g,U=p===`multiple`,tn=p===`single`,nn=l!==void 0||c!==void 0,W=R!==void 0,rn=A!==void 0,G;G=Ae===`always`?`always`:Ae?`input-change`:!1;let[K,an]=Je({controlled:a,default:U?i??O:i,name:`Combobox`,state:`selectedValue`}),on=P.useMemo(()=>he===null?()=>!0:he===void 0?_t(kt,Nt):he,[he,kt,Nt]),sn=S(()=>nn?c??``:tn?Pt(K):``).current,[q,cn]=Je({controlled:l,default:sn,name:`Combobox`,state:`inputValue`}),[J,ln]=Je({controlled:re,default:f,name:`Combobox`,state:`open`}),un=Ue(R),Y=!J&&B!==null?B:String(q).trim(),dn=tn?Pt(K):``,fn=tn&&!Ft&&Y!==``&&dn.length===Y.length&&kt.contains(dn,Y),pn=fn?``:_e??Y,mn=W&&rn&&fn&&(!L||L.hasValue(K,M)),hn=P.useMemo(()=>R?Re(R):O,[R]),gn=P.useMemo(()=>{if(A&&!mn)return A;if(!R)return O;if(un){let e=R,t=[],n=0;for(let r of e){if(N>-1&&n>=N)break;let e=N>-1?N-n:1/0,i=pn===``?r.items.slice(0,e):[];if(pn!==``)for(let t of r.items){if(i.length>=e)break;on(t,pn,Nt)&&i.push(t)}if(i.length>0){let e={...r,items:i};t.push(e),n+=i.length}}return t}if(pn===``)return N>-1?hn.slice(0,N):hn;let e=[];for(let t of hn){if(N>-1&&e.length>=N)break;on(t,pn,Nt)&&e.push(t)}return e},[A,mn,R,un,pn,N,on,Nt,hn]),X=P.useMemo(()=>{if(jt&&gn===A)return jt.values;let e=Re(gn);return z?e.map(e=>z(e)):e},[gn,A,jt,z]),Z=S(()=>{let e=null;return Ye&&J&&W&&p!==`none`&&(e=Pe(X,K,M,U)),new te({id:Ot,labelId:void 0,selectedValue:K,open:J,items:At,selectionMode:p,name:en,form:x,disabled:H,readOnly:w,required:E,grid:D,virtualized:Ke,openOnInputClick:xe,itemToStringLabel:Mt,isItemEqualToValue:M,modal:Qe,autoHighlight:G,submitOnItemClick:F,hasInputValue:nn,mounted:!1,forceMounted:!1,transitionStatus:`idle`,inline:Ye,activeIndex:null,selectedIndex:e,popupProps:{},listProps:{},inputProps:{},triggerProps:{},itemProps:me,positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:p===`none`},{onOpenChangeComplete:T,setOpen:T,setInputValue:T,setSelectedValue:T,setIndices:T,handleSelection:T,forceMount:T,requestSubmit:T,listRef:zt,labelsRef:Bt,popupRef:Vt,emptyRef:Wt,inputRef:V,startDismissRef:Ht,endDismissRef:Ut,keyboardActiveRef:Gt,chipsContainerRef:qt,clearRef:Jt,valuesRef:Qt,pointerDownItemRef:$t,selectionEventRef:Yt},ht)}).current,_n=p===`none`?q:K,vn=P.useMemo(()=>p===`none`?_n:Array.isArray(K)?K.map(e=>Ie(e,He)):Ie(K,He),[_n,He,p,K]),yn=k(ie),bn=k(r),xn=Z.useState(`activeIndex`),Sn=Z.useState(`selectedIndex`),Cn=Z.useState(`positionerElement`),wn=Z.useState(`listElement`),Tn=Z.useState(`triggerElement`),En=Z.useState(`inputElement`),Dn=Z.useState(`inputGroupElement`),Q=Z.useState(`inline`),$=Z.useState(`inputInsidePopup`),On=Z.useState(`inputOwnsFormValue`),kn=tn&&!$&&q===dn,An=ce(Tn),{mounted:jn,setMounted:Mn,transitionStatus:Nn}=Ce(J),{openMethod:Pn,triggerProps:Fn}=Be(J),In=k(()=>vn);Ze($?An:V,Ot,_n,In,!H,g);let Ln=k(()=>{R?Bt.current=X.map(Pt):Z.set(`forceMounted`,!0)}),Rn=k((e,t,n)=>{if(t===-1){if(Xt.current===Tt)return;Xt.current=Tt}else Xt.current={value:e,index:t};yn(e,o(n,void 0,{index:t}))}),zn=k(e=>{let t={};e.activeIndex!==void 0&&(t.activeIndex=e.activeIndex),e.selectedIndex!==void 0&&(t.selectedIndex=e.selectedIndex),Z.update(t);let n=e.activeIndex;if(n===void 0)return;let r=e.type||`none`;n===null?Rn(void 0,-1,r):Rn(Qt.current[n],n,r)}),Bn=k((t,n)=>{if(e.onInputValueChange?.(t,n),!n.isCanceled){if(Kt.current=n.reason===u,n.reason===`input-change`){J&&B!==null&&Lt(null);let e=n.event,r=e.inputType;if(e.type===`compositionend`||r!=null&&r!==``&&r!==`insertReplacementText`){let e=t.trim()!==``;e&&It(!0),Zt.current={hasQuery:e};let n=Z.state.listElement;if(!Z.state.virtualized&&n){let e=Vt.current;for(let t of ne(n.firstElementChild??n)){if(!y(t)||(e?!j(e,t):t.getAttribute(`role`)===`dialog`))break;if(oe(t)){t.scrollTop=0;break}}}e&&G&&Z.state.activeIndex==null&&(J||Q)&&Z.set(`activeIndex`,0)}}else n.reason===`input-clear`&&t===``&&Z.state.inputInsidePopup&&(Zt.current={hasQuery:!1,selection:!0});cn(t)}}),Vn=k(e=>{let t=!e&&$&&!Q&&q!==``&&(String(q).trim()===B||q===dn);!e&&(t||q===``||kn)&&It(!1),Lt(null),t&&Bn(``,_(u))}),Hn=k((t,n)=>{if(J!==t&&(n.reason===`escape-key`&&W&&X.length===0&&!Wt.current&&n.allowPropagation(),e.onOpenChange?.(t,n),!n.isCanceled&&(t&&B!==null&&Vn(n.reason===ee),!t&&Ft&&(tn?(Q||Lt(Y),Y===``&&It(!1)):U&&(Q||Lt(Y),$&&zn({activeIndex:null}),(!$||Q)&&Bn(``,_(u,n.event,void 0,{isItemPress:n.reason===h})))),ln(t),!t&&$&&(n.reason===`focus-out`||n.reason===`outside-press`)&&(yt(!0),bt(!1),xt===`onBlur`)))){let e=p===`none`?q:K;Ct.commit(e)}}),Un=k((e,t)=>{s?.(e,t),!t.isCanceled&&(an(e),(p===`none`&&Vt.current&&Xe||tn&&!Z.state.inputInsidePopup)&&Bn(Pt(e),_(t.reason,t.event)))}),Wn=k((e,t)=>{let n=se(e),r=Yt.current??e;Yt.current=null;let i=_(h,r),a=n?.closest(`a`)?.getAttribute(`href`);if(a){a.startsWith(`#`)&&Hn(!1,i);return}if(U){let e=Array.isArray(K)?K:[],n=Ve(e,t,M),r=n?De(e,t,M):[...e,t];if(Un(r,i),i.isCanceled||!(V.current&&V.current.value.trim()!==``))return;if(Z.state.inputInsidePopup){Bn(``,_(u,i.event,void 0,{isItemPress:!0}));let e=Zt.current;e&&!n&&(e.toggledValue=t)}else Hn(!1,i)}else{if(Un(t,i),i.isCanceled)return;Hn(!1,i)}}),Gn=k(()=>{let e=Ct.inputRef.current?.form??Z.state.inputElement?.form;e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}),Kn=k(()=>{if(Mn(!1),bn?.(!1),It(!1),Lt(null),zn(p===`none`?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),U&&V.current&&V.current.value!==``&&!Kt.current&&Bn(``,_(u)),tn){if(Z.state.inputInsidePopup)V.current&&V.current.value!==``&&Bn(``,_(u));else{let e=Pt(K);V.current&&V.current.value!==e&&Bn(e,_(e===``?u:b))}}}),qn=P.useMemo(()=>Q&&Cn?{current:Cn.closest(`[role="dialog"]`)}:Vt,[Q,Cn]);ue({enabled:!e.actionsRef,open:J,ref:qn,onComplete(){J||Kn()}}),P.useImperativeHandle(e.actionsRef,()=>({unmount:Kn}),[Kn]),n(function(){let e=Rt.current!==null&&B===null;if(Rt.current=B,J&&(!e||!W)||(J||($t.current=null),p===`none`))return;let t=W?X:Qt.current;zn({selectedIndex:Pe(t,K,M,U)})},[J,B,K,p,U,W,X,M,zn]),n(()=>{R&&(Qt.current=X,zt.current.length=X.length)},[R,X]),n(()=>{let e=Zt.current;if(e){let t=J||Q||Z.state.positionerElement?.hidden===!1;if(e.hasQuery)G&&t&&Z.set(`activeIndex`,0),Zt.current=null;else if(String(q).trim()===``&&(Zt.current=null,t)){let t=e.selection;G===`always`&&!t&&Z.state.selectionMode===`none`&&Z.set(`activeIndex`,0),queueMicrotask(()=>{if(!Z.state.open&&!Z.state.inline||V.current&&V.current.value.trim()!==``)return;let n=Z.state.selectedValue,r=Z.state.selectionMode===`multiple`;if(r&&Array.isArray(n)?n.length>0:Z.state.selectionMode!==`none`&&n!=null){let t=W||rn?X:Qt.current,i=We(t,e.toggledValue,Z.state.isItemEqualToValue);Z.set(`activeIndex`,i===-1?Pe(t,n,Z.state.isItemEqualToValue,r):i)}else t?Z.set(`activeIndex`,null):G===`always`&&Z.set(`activeIndex`,0)})}}if(!J&&!Q)return;let t=W||rn?X:Qt.current,n=Z.state.activeIndex;if(n==null){if(G===`always`&&t.length>0){Z.set(`activeIndex`,0);return}Rn(void 0,-1,b);return}if(n>=t.length){Rn(void 0,-1,b),Z.set(`activeIndex`,null);return}let r=t[n],i=Xt.current.value,a=i!==wt&&Ne(r,i,Z.state.isItemEqualToValue);(Xt.current.index!==n||!a)&&Rn(r,n,b)},[xn,G,Rn,rn,W,X,Q,J,Z,q]),n(()=>{if(p===`none`){mt(String(q)!==``);return}mt(U?Array.isArray(K)&&K.length>0:K!=null)},[mt,p,q,K,U]),P.useEffect(()=>{W&&G&&X.length===0&&zn({activeIndex:null})},[W,G,X.length,zn]);function Jn(){J&&Y!==``&&Y!==String(sn)&&!kn&&It(!0)}function Yn(){J&&B!==null&&Vn(!1)}let Xn=!1;function Zn(){!Xn&&q!==dn&&(Xn=!0,Bn(dn,_(b)))}function Qn(){p!==`none`&&(dt(en),ft(Oe(K,pt.initialValue,M)),Ct.change(K),tn&&!nn&&!$&&Zn())}function $n(){tn&&!nn&&!$&&!Ft&&Zn()}function er(){p===`none`&&(dt(en),ft(q!==pt.initialValue),Ct.change(q))}qe(Y,Jn),qe(J,Yn),qe(K,Qn),qe(dn,$n),qe(R,$n),qe(q,er);let tr=ge({open:Q?!0:J,onOpenChange:Hn,elements:{reference:$?Tn:En,floating:Cn}}),nr=D?`grid`:`listbox`,rr=J||Q,ir=rr?`true`:`false`,ar=P.useMemo(()=>{let e=En?.tagName===`INPUT`,t=En==null||e,n=t||rr,r=t?{autoComplete:`off`,spellCheck:`false`,autoCorrect:`off`,autoCapitalize:`none`}:{};return n&&(r.role=`combobox`,r[`aria-expanded`]=ir,r[`aria-haspopup`]=nr,r[`aria-controls`]=rr?wn?.id:void 0,r[`aria-autocomplete`]=w?`none`:nt),{reference:r,floating:{role:`presentation`}}},[En,rr,ir,nr,wn?.id,nt,w]),or=ke(tr,{enabled:!H&&xe,event:`mousedown-only`,toggle:!1,touchOpenDelay:$?0:100,reason:d}),sr=Se(tr,{enabled:!H&&!Q,outsidePressEvent:{mouse:`sloppy`,touch:`intentional`},bubbles:Q?!0:void 0,outsidePress(e){let t=se(e);return!j(Tn,t)&&!j(Jt.current,t)&&!j(qt.current,t)&&!j(Dn,t)}}),cr=Me(tr,{enabled:!H,id:Ot,listRef:zt,activeIndex:xn,selectedIndex:Sn,virtual:!0,loopFocus:Le,allowEscape:Le&&!G,focusItemOnOpen:Ft||p===`none`&&!G?!1:`auto`,focusItemOnHover:Fe,resetOnPointerLeave:!je,orientation:D?`horizontal`:void 0,rtl:Dt===`rtl`,disabledIndices:O,grid:D?at:void 0,onNavigate(e,t){(t||J)&&Nn!==`ending`&&zn(t?{activeIndex:e,type:Gt.current?be:v}:{activeIndex:e})}}),lr=P.useMemo(()=>C(cr.reference,{onKeyDown(e){D&&Z.state.activeIndex==null&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&e.preventBaseUIHandler()}},sr.reference,or.reference,ar.reference),[cr.reference,sr.reference,or.reference,ar.reference,D,Z]),ur=P.useMemo(()=>C(we,sr.floating),[sr.floating]),dr=P.useMemo(()=>C(cr.floating,ar.floating),[cr.floating,ar.floating]),fr=P.useMemo(()=>{let e=cr.item;return e?{...e,onFocus:void 0}:me},[cr.item]);Z.useContextCallback(`setOpen`,Hn),Z.useContextCallback(`setInputValue`,Bn),Z.useContextCallback(`setSelectedValue`,Un),Z.useContextCallback(`setIndices`,zn),Z.useContextCallback(`handleSelection`,Wn),Z.useContextCallback(`forceMount`,Ln),Z.useContextCallback(`requestSubmit`,Gn),Z.useContextCallback(`onOpenChangeComplete`,r),Te(()=>{Z.update({inline:Ye,popupProps:ur,listProps:dr,inputProps:lr,triggerProps:Fn,itemProps:fr})});let pr={id:Ot,selectedValue:K,open:J,mounted:jn,transitionStatus:Nn,items:At,inline:Ye,popupProps:ur,listProps:dr,inputProps:lr,triggerProps:Fn,itemProps:fr,openMethod:Pn,selectionMode:p,name:en,form:x,disabled:H,readOnly:w,required:E,grid:D,virtualized:Ke,openOnInputClick:xe,itemToStringLabel:Mt,modal:Qe,autoHighlight:G,isItemEqualToValue:M,submitOnItemClick:F,hasInputValue:nn};n(()=>{Z.update({...pr,inputOwnsFormValue:p===`none`&&(Ye||!Z.state.inputInsidePopup)})},[Z,...Object.values(pr)]);let mr=ve(de,Ct.inputRef),hr=P.useMemo(()=>({query:Y,hasItems:W,filteredItems:gn,flatFilteredValues:X}),[Y,W,gn,X]),gr=P.useMemo(()=>Array.isArray(_n)?``:Ie(_n,He),[_n,He]),_r=U&&Array.isArray(K)&&K.length>0,vr=U||p===`none`&&On?void 0:en,yr=P.useMemo(()=>!U||!Array.isArray(K)||!en?null:K.map(e=>{let t=Ie(e,He);return(0,I.jsx)(`input`,{type:`hidden`,form:x,name:en,value:t,disabled:H},t)}),[U,K,x,en,He,H]),br=(0,I.jsxs)(P.Fragment,{children:[e.children,(0,I.jsx)(`input`,{...Ct.getValidationProps(H,{onFocus(){if($){Tn?.focus();return}(V.current||Tn)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||H||w)return;let t=e.currentTarget.value,n=t.toLowerCase(),r=_(b,e.nativeEvent),i=()=>Qt.current.findIndex(e=>Ie(e,He).toLowerCase()===n||Pt(e).toLowerCase()===n);function a(){if(U)return;if(p===`none`){Bn(t,r);return}let e=i();e===-1&&(e=Qt.current.findIndex((e,t)=>{let r=Bt.current[t];return r!=null&&r.toLowerCase()===n}));let a=e===-1?void 0:Qt.current[e];a!=null&&Un?.(a,r)}tn&&(Ln(),R&&i()===-1&&Z.set(`forceMounted`,!0)),queueMicrotask(a)}}),id:Ot&&vr==null?`${Ot}-hidden-input`:void 0,form:x,name:vr,autoComplete:rt,disabled:H,required:E&&!_r,readOnly:w,value:gr,ref:mr,style:vr?ye:le,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),yr]});return(0,I.jsx)(ot.Provider,{value:Z,children:(0,I.jsx)(st.Provider,{value:tr,children:(0,I.jsx)(lt.Provider,{value:W,children:(0,I.jsx)(ct.Provider,{value:hr,children:(0,I.jsx)(ut.Provider,{value:q,children:br})})})})})}var Ot=`data-popup-side`,kt=`data-list-empty`,L={...pe,...nt,popupSide:e=>e?{[Ot]:e}:null,listEmpty:e=>e?{[kt]:``}:null};function R(e){let t=e.useState(`mounted`),n=e.useState(`popupSide`),r=e.useState(`positionerElement`);return t&&r?n:null}function z(){return ft().filteredItems.length===0}function At(e){return e===`rtl`?[`ArrowRight`,`ArrowLeft`]:[`ArrowLeft`,`ArrowRight`]}function jt(e,t){let n=e>=t-1?t-2:e;return n>=0?n:void 0}function Mt(e,t,n){let r=e.context.listRef.current[t];r&&(e.context.selectionEventRef.current=n,r.click(),e.context.selectionEventRef.current=null)}var Nt=P.forwardRef(function(e,t){let{render:n,className:i,nativeButton:o=!0,disabled:ee=!1,id:s,style:c,...l}=e,{state:u,disabled:te,setTouched:ne,setFocused:d,validationMode:re,validation:p}=et(),{labelId:ie}=Qe(),m=F(),h=m.useState(`selectionMode`),g=m.useState(`disabled`),v=m.useState(`readOnly`),y=m.useState(`required`),oe=m.useState(`positionerElement`),ce=m.useState(`listElement`),le=m.useState(`popupId`),ue=m.useState(`triggerProps`),S=m.useState(`inputInsidePopup`),C=m.useState(`id`),T=m.useState(`labelId`),E=m.useState(`open`),D=m.useState(`selectedValue`),fe=m.useState(`activeIndex`),pe=m.useState(`selectedIndex`),O=m.useState(`hasSelectedValue`),A=dt(),me=pt(),he=de(),ge=te||g||ee,_e=z(),ve=R(m);tt({id:S?s:void 0});let ye=S?s??C:s,be=He(ie,T),xe;E&&S?xe=le??gt(C):E&&(xe=ce?.id);let Se=P.useRef(``);function Ce(e){Se.current=e.pointerType}let{reference:we}=Ae(A,{enabled:!E&&!v&&!g&&h===`single`,listRef:m.context.labelsRef,activeIndex:fe,selectedIndex:pe,onMatch(e){let t=m.context.valuesRef.current[e];t!==void 0&&m.context.setSelectedValue(t,_(b))}}),{reference:Te}=ke(A,{enabled:!g,event:`mousedown`}),{buttonRef:Ee,getButtonProps:De}=ae({native:o,disabled:ge}),Oe={...u,readOnly:v,open:E,disabled:ge,popupSide:ve,listEmpty:_e,placeholder:h!==`none`&&!O},je=k(e=>{m.set(`triggerElement`,e)});return w(`button`,e,{ref:[t,Ee,je],state:Oe,props:[ue,Te,we,{id:ye,tabIndex:S?0:-1,role:S?`combobox`:void 0,"aria-expanded":E,"aria-haspopup":S?`dialog`:`listbox`,"aria-controls":xe,"aria-required":S&&y||void 0,"aria-readonly":S&&v||void 0,"aria-labelledby":be,onPointerDown:Ce,onPointerEnter:Ce,onFocus(){d(!0),!ge&&he.start(0,m.context.forceMount)},onBlur(e){if(!j(oe,e.relatedTarget)&&(ne(!0),d(!1),re===`onBlur`)){let e=h===`none`?me:D;p.commit(e)}},onMouseDown(e){if(ge||(S||A.set(`domReferenceElement`,e.currentTarget),m.context.forceMount(),Se.current!==`touch`&&(m.context.inputRef.current?.focus(),S||e.preventDefault()),E))return;let t=f(e.currentTarget);function n(e){let t=m.state.triggerElement;if(!t)return;let n=se(e),r=m.state.positionerElement,i=m.state.listElement;j(t,n)||j(r,n)||j(i,n)||ze(e,t)||m.context.setOpen(!1,_(a,e))}S&&t.addEventListener(`mouseup`,n,{once:!0})},onKeyDown(e){(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(x(e),m.context.setOpen(!0,_(r,e.nativeEvent)),m.context.inputRef.current?.focus())}},p.getValidationProps(ge,l),De],stateAttributesMapping:L})}),Pt=P.createContext(void 0);function Ft(){return P.useContext(Pt)}var It=P.createContext(void 0);function B(e){let t=P.useContext(It);if(t===void 0&&!e)throw Error(m(21));return t}var Lt=P.forwardRef(function(e,t){let n=F(),{buttonRef:r,getButtonProps:i}=ae({native:!1}),a=ve(t,r);function o(e){n.context.setOpen(!1,_(D,e.nativeEvent,e.currentTarget))}let ee=i({onClick:o});return(0,I.jsx)(`span`,{ref:a,...ee,"aria-label":`Dismiss`,tabIndex:void 0,style:ye})}),Rt=P.forwardRef(function(e,t){let{render:n,className:r,disabled:a=!1,id:o,style:s,...c}=e,{state:l,disabled:te,setTouched:ne,setFocused:d,validationMode:f,validation:p}=et(),{labelId:ie}=Qe(),m=Ft(),h=!!B(!0),y=F(),ae=pt(),oe=fe(),se=y.useState(`required`),ce=y.useState(`disabled`),le=y.useState(`readOnly`),ue=y.useState(`name`),S=y.useState(`form`),C=y.useState(`selectionMode`),T=y.useState(`autoHighlight`),E=y.useState(`inputProps`),de=y.useState(`triggerProps`),D=y.useState(`open`),pe=y.useState(`mounted`),O=y.useState(`selectedValue`),A=y.useState(`id`),me=y.useState(`inline`),he=y.useState(`modal`),ge=!!T,_e=R(y),ve=te||ce||a,ye=z(),j=h||me,xe=!j||he,Se=Ke(o??(j?void 0:A)),Ce=h?Xe:l,[we,Te]=P.useState(null),Ee=P.useRef(!1),De=P.useRef(null),Oe=P.useRef(!1),ke=C===`none`&&!h,Ae=k(e=>{let t=h||y.state.inline;t&&!y.state.hasInputValue&&y.context.setInputValue(``,_(b)),y.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:ke})}),je=h?c:p.getValidationProps(ve,c);function Me(){y.context.setIndices({activeIndex:null,selectedIndex:null,type:y.context.keyboardActiveRef.current?be:v})}function Ne(){y.context.keyboardActiveRef.current=!1}let Pe={...Ce,open:D,disabled:ve,readOnly:le,popupSide:_e,listEmpty:ye};function Fe(e){if(!m)return;let t,{highlightedChipIndex:n}=m,r=m.chipsRef.current.length,[i,a]=At(oe);return n===void 0?(e.key===i&&(e.currentTarget.selectionStart??0)===0&&O.length>0&&(e.preventDefault(),t=r>0?r-1:void 0),t):(e.key===i?(e.preventDefault(),t=n>0?n-1:void 0):e.key===a?(e.preventDefault(),t=n<r-1?n+1:void 0):(e.key===`Backspace`||e.key===`Delete`)&&(e.preventDefault(),t=jt(n,O.length),Me()),t)}let Ie=w(`input`,e,{state:Pe,ref:[t,y.context.inputRef,Ae],props:[E,de,{value:we??ae,"aria-readonly":le||void 0,"aria-required":se||void 0,"aria-labelledby":ie,disabled:ve,readOnly:le,required:C===`none`?se:void 0,form:S,...ke&&ue&&{name:ue},id:Se,onFocus(){if(d(!0),!me||!Oe.current)return;Oe.current=!1;let e=De.current;e!=null&&Object.hasOwn(y.context.valuesRef.current,e)&&y.context.setIndices({activeIndex:e})},onBlur(){ne(!0),d(!1);let e=y.state.activeIndex;if(me&&e!==null&&T!==`always`&&(De.current=e,Oe.current=!0,y.context.setIndices({activeIndex:null})),f===`onBlur`){let e=C===`none`?ae:O;p.commit(e)}},onCompositionStart(e){g||(Ee.current=!0,Te(e.currentTarget.value))},onCompositionEnd(e){Ee.current=!1;let t=e.currentTarget.value;Te(null),y.context.setInputValue(t,_(ee,e.nativeEvent))},onChange(e){let t=e.nativeEvent,n=t.inputType,r=!n||n===`insertReplacementText`,i=Ee.current||!r;function a(e){!le&&!ve&&e&&i&&(y.context.setOpen(!0,_(ee,t)),ge||Me())}if(Ee.current){let n=e.currentTarget.value;Te(n),n===``&&!y.state.openOnInputClick&&!y.state.inputInsidePopup&&y.context.setOpen(!1,_(u,t));let r=n.trim(),i=ge&&r!==``;a(r),D&&y.state.activeIndex!==null&&!i&&Me();return}let o=_(ee,t);if(y.context.setInputValue(e.currentTarget.value,o),o.isCanceled)return;let s=e.currentTarget.value===``,c=_(u,t);s&&!y.state.inputInsidePopup&&(C===`single`&&y.context.setSelectedValue(null,c),y.state.openOnInputClick||y.context.setOpen(!1,c)),a(e.currentTarget.value.trim()),D&&y.state.activeIndex!==null&&!ge&&Me()},onKeyDown(e){if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;if(y.context.keyboardActiveRef.current=!0,ve||le){le&&e.key===`Enter`&&D&&y.state.activeIndex!==null&&x(e);return}let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r=oe===`rtl`;if(e.key===`Home`){x(e);let n=i&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if(e.key===`End`){x(e);let a=i&&r?0:t.value.length;t.setSelectionRange(a,a),t.scrollLeft=r?-n:n;return}if(!pe&&e.key===`Escape`){let t=C===`multiple`&&Array.isArray(O)?O.length===0:O===null,n=_(re,e.nativeEvent),r=C===`multiple`?[]:null;y.context.setInputValue(``,n),y.context.setSelectedValue(r,n),!t&&!y.state.inline&&!n.isPropagationAllowed&&e.stopPropagation();return}if(m&&e.key===`Backspace`&&t.value===``&&m.highlightedChipIndex===void 0&&Array.isArray(O)&&O.length>0){let t=m.chipsRef.current.length,n=t>0?t-1:O.length-1,r=O.filter((e,t)=>t!==n);Me(),y.context.setSelectedValue(r,_(b,e.nativeEvent));return}let a=m?.highlightedChipIndex!==void 0,o=Fe(e);if(m?.setHighlightedChipIndex(o),o===void 0?a&&y.context.inputRef.current?.focus():m?.chipsRef.current[o]?.focus(),e.which!==229&&e.key===`Enter`&&D){let t=y.state.activeIndex,n=e.nativeEvent;if(t===null){if(me)return;y.context.setOpen(!1,_(b,n));return}x(e),Mt(y,t,n)}},onPointerMove:Ne,onPointerDown:Ne},je],stateAttributesMapping:L}),Le=h?(0,I.jsx)(N.Provider,{value:Ye,children:Ie}):Ie;return(0,I.jsxs)(P.Fragment,{children:[D&&xe&&(0,I.jsx)(Lt,{ref:y.context.startDismissRef}),Le]})}),zt=P.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return w(`span`,e,{ref:t,props:[{"aria-hidden":!0,children:`▼`},a]})}),Bt={...he,...A},Vt=P.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,keepMounted:o=!1,style:ee,...s}=e,{disabled:c}=et(),l=F(),u=l.useState(`selectionMode`),te=l.useState(`disabled`),ne=l.useState(`readOnly`),d=l.useState(`open`),re=l.useState(`selectedValue`),f=l.useState(`hasSelectionChips`),ie=pt(),m=!1;m=u===`none`?ie!==``:u===`single`?re!=null:f;let h=c||te||i,{buttonRef:g,getButtonProps:y}=ae({native:a,disabled:h}),{mounted:b,transitionStatus:x,setMounted:oe}=Ce(m),se={disabled:h,visible:m,open:d,transitionStatus:x};ue({open:m,ref:l.context.clearRef,onComplete(){m||oe(!1)}});let ce=w(`button`,e,{state:se,ref:[t,g,l.context.clearRef],props:[{tabIndex:-1,children:`x`,onMouseDown(e){e.preventDefault()},onClick(e){if(h||ne)return;let t=l.context.keyboardActiveRef.current?be:v;l.context.setInputValue(``,_(p,e.nativeEvent)),u===`none`?l.context.setIndices({activeIndex:null,type:t}):(l.context.setSelectedValue(Array.isArray(re)?[]:null,_(p,e.nativeEvent)),l.context.setIndices({activeIndex:null,selectedIndex:null,type:t})),l.context.inputRef.current?.focus()}},s,y],stateAttributesMapping:Bt});return o||b?ce:null}),V=P.createContext(null);function Ht(){return P.useContext(V)}function Ut(e){let{children:t,items:n}=e,r=P.useMemo(()=>({items:n}),[n]);return(0,I.jsx)(V.Provider,{value:r,children:t})}function Wt(e){let{children:t}=e,{filteredItems:n}=ft(),r=Ht(),i=r?r.items:n;return(0,I.jsx)(P.Fragment,{children:i.map(t)})}var Gt=P.forwardRef(function(e,t){var n;let{render:r,className:i,style:a,children:o,...ee}=e,s=F(),c=dt(),l=!!B(!0),{filteredItems:u,hasItems:te}=ft(),ne=s.useState(`selectionMode`),d=s.useState(`grid`),re=s.useState(`readOnly`),f=s.useState(`listProps`),p=s.useState(`virtualized`),ie=s.useState(`forceMounted`),m=ne===`multiple`,h=u.length===0,g=k(e=>{s.set(`positionerElement`,e)}),_=k(e=>{s.set(`listElement`,e)}),v=P.useMemo(()=>typeof o==`function`?n||=(0,I.jsx)(Wt,{children:o}):o,[o]),y={empty:h},b=c.useState(`floatingId`),ae=w(`div`,e,{state:y,ref:[t,_,l?null:g],props:[f,{children:v,tabIndex:-1,id:b,role:d?`grid`:`listbox`,"aria-multiselectable":m?`true`:void 0,"aria-readonly":!d&&re?!0:void 0,onKeyDown(e){if(!(s.state.disabled||s.state.readOnly)&&e.key===`Enter`){let t=s.state.activeIndex;if(t==null)return;x(e),Mt(s,t,e.nativeEvent)}},onKeyDownCapture(){s.context.keyboardActiveRef.current=!0},onPointerMoveCapture(){s.context.keyboardActiveRef.current=!1}},ee]});if(p)return ae;let oe=te&&!ie?void 0:s.context.labelsRef;return(0,I.jsx)(M,{elementsRef:s.context.listRef,labelsRef:oe,children:ae})}),Kt=e(c(),1),qt=P.createContext(void 0);function Jt(){let e=P.useContext(qt);if(!e)throw Error(m(19));return e}var Yt=P.createContext(!1);function Xt(){return P.useContext(Yt)}function Zt(e){let{componentProps:t,forwardedRef:r,virtualized:i,indexFromFilter:a}=e,{render:o,className:ee,style:s,value:c=null,index:l,disabled:u=!1,nativeButton:te=!1,...ne}=t,d=P.useRef(null),re=Le({guess:!0,index:l,textRef:d}),f=F(),p=Xt(),ie=mt(),m=f.useState(`selectionMode`),h=f.useState(`disabled`),g=f.useState(`readOnly`),_=f.useState(`isItemEqualToValue`),v=h||u,y=m!==`none`,b=l??a??re.index,x=b!==-1,oe=f.useState(`id`),se=f.useState(`isActive`,b),ce=f.useState(`isSelected`,c),le=f.useState(`itemProps`),ue=P.useRef(null),S=oe!=null&&x?`${oe}-${b}`:void 0,C=ce&&y;n(()=>{if(!x||!i&&l==null)return;let e=f.context.listRef.current;return e[b]=ue.current,()=>{delete e[b]}},[x,i,b,l,f]),n(()=>{if(!x||ie)return;let e=f.context.valuesRef.current;return e[b]=c,()=>{delete e[b]}},[x,ie,b,c,f]),n(()=>{if(!x||ie)return;let e=f.state.selectedValue,t=f.state.selectedIndex;f.state.selectionMode===`multiple`&&Array.isArray(e)?t=je(b,c,f.context.valuesRef.current,e,_,t):Ne(c,e,_)&&(t=b),f.set(`selectedIndex`,t)},[x,ie,f,b,c,_]);let{getButtonProps:T,buttonRef:E}=ae({disabled:v,focusableWhenDisabled:!0,native:te,composite:!0}),de={disabled:v,selected:C,highlighted:se};function D(e){function t(){f.context.handleSelection(e,c)}f.state.submitOnItemClick?(Kt.flushSync(t),f.context.requestSubmit()):t()}let fe={id:S,role:p?`gridcell`:`option`,"aria-selected":y?C:void 0,tabIndex:void 0,onPointerDownCapture(e){e.isPrimary&&(f.context.pointerDownItemRef.current=e.currentTarget),e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){v||g||D(e.nativeEvent)},onMouseUp(e){let t=f.context.pointerDownItemRef.current===e.currentTarget;f.context.pointerDownItemRef.current=null,!(v||g||e.button!==0||t||!se)&&D(e.nativeEvent)}},pe=w(`div`,t,{ref:[E,r,re.ref,ue],state:de,props:[le,fe,ne,T]}),O=P.useMemo(()=>({selected:C,textRef:d}),[C,d]);return(0,I.jsx)(qt.Provider,{value:O,children:pe})}function Qt(e){let{componentProps:t,forwardedRef:n}=e,r=F().useState(`isItemEqualToValue`),{flatFilteredValues:i}=ft(),a=t.value??null,o=We(i,a,r);return(0,I.jsx)(Zt,{componentProps:t,forwardedRef:n,virtualized:!0,indexFromFilter:o})}var $t=P.memo(P.forwardRef(function(e,t){let n=F().useState(`virtualized`);return n&&e.index==null?(0,I.jsx)(Qt,{componentProps:e,forwardedRef:t}):(0,I.jsx)(Zt,{componentProps:e,forwardedRef:t,virtualized:n,indexFromFilter:void 0})})),H=xe();function en(e){let t=(0,H.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`pointer-events-none inline-flex h-5 min-w-5 select-none items-center justify-center gap-1 rounded bg-muted px-1 font-medium font-sans text-muted-foreground text-xs [&_svg:not([class*='size-'])]:size-3`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,I.jsx)(`kbd`,{className:i,"data-slot":`kbd`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function U(e){let t=(0,H.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`inline-flex items-center gap-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,I.jsx)(`kbd`,{className:i,"data-slot":`kbd-group`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{it as C,F as S,Ct as _,Gt as a,ft as b,Vt as c,Lt as d,It as f,Dt as g,z as h,Jt as i,zt as l,Nt as m,U as n,Wt as o,B as p,$t as r,Ut as s,en as t,Rt as u,St as v,dt as x,gt as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Pa as e}from"./runtime-BKneT96Q.js";var t={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Pa as e}from"./runtime-BKneT96Q.js";var t={name:`file-diff`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M9 10h6`,key:`9gxzsh`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}]]};t.node;var n=e(t),r={name:`layers`,size:24,node:[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]],aliases:[`layers-3`]};r.node;var i=e(r);export{n,i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Pa as e}from"./runtime-BKneT96Q.js";var t={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./authorization-
|
|
1
|
+
import"./authorization-B1YXfej3.js";var e=!1;function t(){if(e||typeof console>`u`)return;e=!0;let t=[`debug`,`error`,`info`,`log`,`warn`],n=console;Object.fromEntries(t.map(e=>[e,n[e]]));for(let e of t)n[e]=()=>void 0}export{t as installHostedConsoleBoundary};
|