@p4code/cli 0.8.4 → 0.8.5
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/bin.mjs +1 -1
- package/dist/{binCli-Bgjc_5FL.mjs → binCli-D9Qk_k5i.mjs} +88 -47
- package/dist/client/.vite/manifest.json +2103 -2103
- package/dist/client/assets/{AnimatedHeight-DYUgtGfz.js → AnimatedHeight-DKdClmyw.js} +2 -2
- package/dist/client/assets/{AuthSurfaceShell-CfLnzrCc.js → AuthSurfaceShell-UJgufrYU.js} +2 -2
- package/dist/client/assets/{CSPContext-i9QaQnwk.js → CSPContext-CTpTfAqS.js} +2 -2
- package/dist/client/assets/ChatGptUsageButton-9B_WUPVm.js +2 -0
- package/dist/client/assets/ChatMarkdown-B9_nJM54.js +65 -0
- package/dist/client/assets/{CodexSetupSection.logic-VTayPks4.js → CodexSetupSection.logic-YSEDjbLd.js} +2 -2
- package/dist/client/assets/{ComboboxClear-B-iYnTX_.js → ComboboxClear-TEL6MsPn.js} +2 -2
- package/dist/client/assets/{CommandBlock-dh2vBT70.js → CommandBlock-C6bCrWJ5.js} +2 -2
- package/dist/client/assets/{ComposerPromptEditor-fIqs_--j.js → ComposerPromptEditor-BpT2majW.js} +10 -10
- package/dist/client/assets/{CompositeRoot-JeAqW-33.js → CompositeRoot-CZuZX6hs.js} +2 -2
- package/dist/client/assets/{ConnectionStatusDot-BCSqqCpf.js → ConnectionStatusDot-BX6msmak.js} +2 -2
- package/dist/client/assets/{DevicePanel-BckpiUTa.js → DevicePanel-DavxmX2w.js} +2 -2
- package/dist/client/assets/{DeviceSetup-L8Q-0h1V.js → DeviceSetup-CZX8TKF_.js} +2 -2
- package/dist/client/assets/{DialogTitle-BRYusK7T.js → DialogTitle-CLcXbJRs.js} +2 -2
- package/dist/client/assets/{DiffCommentAnnotation-DxxGd0sM.js → DiffCommentAnnotation-B21n3tGU.js} +3 -3
- package/dist/client/assets/{DiffFileTree-C2N3dwbB.js → DiffFileTree--L--vp02.js} +2 -2
- package/dist/client/assets/DiffPanel-T4lIPUlN.js +2 -0
- package/dist/client/assets/{DiffWorkerPoolProvider-Dd8cIhyy.js → DiffWorkerPoolProvider-Cxzr_uYq.js} +3 -3
- package/dist/client/assets/{EnvironmentMachineIcon-giyHKjbh.js → EnvironmentMachineIcon-CGINHXnT.js} +2 -2
- package/dist/client/assets/{ExpandableText-dJhpznMp.js → ExpandableText-D1ewr-yU.js} +3 -3
- package/dist/client/assets/{FieldControl-CxuWXcJE.js → FieldControl-BVq7aDv3.js} +2 -2
- package/dist/client/assets/{FileDiff-EWd5oWlS.js → FileDiff-C0ZCBwBc.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-D3kud1xs.js → FilePreviewPanel-CxOIUI0_.js} +4 -4
- package/dist/client/assets/{FoldedSettingsSection-CsN_jb3V.js → FoldedSettingsSection-DmcJrCZO.js} +2 -2
- package/dist/client/assets/{FormContext-Vk5aZcR6.js → FormContext-CObkgUvS.js} +2 -2
- package/dist/client/assets/{Icons-DM1SzuL7.js → Icons-CSHLGz_M.js} +2 -2
- package/dist/client/assets/{KeybindingsSettings.logic-BcJGxVhV.js → KeybindingsSettings.logic-D9eYCeK5.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-DrkWMiG4.js → NoProjectsHero-C0RwYoYq.js} +2 -2
- package/dist/client/assets/{PanelLayoutControls-DjmAXscr.js → PanelLayoutControls-CcE6oZUh.js} +8 -8
- package/dist/client/assets/{PierreEntryIcon-BJ8xtDqQ.js → PierreEntryIcon-D0PlfaRc.js} +2 -2
- package/dist/client/assets/{PreviewPanel-D_JLD7YP.js → PreviewPanel-DgRCZ-80.js} +2 -2
- package/dist/client/assets/ProjectDefaultsSettings-DOXJKuJ7.js +2 -0
- package/dist/client/assets/{ProjectFavicon-By6-kpgk.js → ProjectFavicon-CFPeQQsG.js} +3 -3
- package/dist/client/assets/ProjectIconPickerDialog-B5iXalFo.js +2 -0
- package/dist/client/assets/{ProjectMonogram-BJVBhwjz.js → ProjectMonogram-HCgoNxPJ.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-DBiUwanv.js → ProviderAuthTerminal-rBb4SeQd.js} +2 -2
- package/dist/client/assets/{ProviderModelPicker-DV64N-fE.js → ProviderModelPicker-CHfA6QfR.js} +2 -2
- package/dist/client/assets/{ProviderSettingsForm-Tkr5xKCJ.js → ProviderSettingsForm-cr5QEWx_.js} +2 -2
- package/dist/client/assets/{PullRequestCodeTab-DijqMjN0.js → PullRequestCodeTab-CyJ0_1HE.js} +3 -3
- package/dist/client/assets/{ReadOnlySourcePreview-CydDaO9-.js → ReadOnlySourcePreview-BvUk75g2.js} +2 -2
- package/dist/client/assets/{RenderErrorBoundary-D4M2khxk.js → RenderErrorBoundary-h3g72sj0.js} +2 -2
- package/dist/client/assets/ScheduledTasksSettings-CpUearCU.js +4 -0
- package/dist/client/assets/ScopedSwitch-D1QVfZHR.js +2 -0
- package/dist/client/assets/{SecretInput-CNWNAhNe.js → SecretInput-SiHUbFCV.js} +2 -2
- package/dist/client/assets/{SettingsPanels-DAv_V_mk.js → SettingsPanels-B9t76y-c.js} +5 -5
- package/dist/client/assets/{SettingsPanels.logic-BYa5iHwl.js → SettingsPanels.logic-B3IqBMv7.js} +2 -2
- package/dist/client/assets/{SettingsScopeNotice-CcLrVZWz.js → SettingsScopeNotice-B_awMQPw.js} +2 -2
- package/dist/client/assets/{T3ConnectAccountPages-DjITJ87o.js → T3ConnectAccountPages-DOpj673A.js} +2 -2
- package/dist/client/assets/{T3ConnectSidebarSignIn-B-rQNmqG.js → T3ConnectSidebarSignIn-zrB8y6DQ.js} +2 -2
- package/dist/client/assets/{ThemeEditorPanel-CJGqmeTA.js → ThemeEditorPanel-Cx7KulxB.js} +2 -2
- package/dist/client/assets/{ThreadTerminalDrawer-Cdl3DAIx.js → ThreadTerminalDrawer-ChcqArNC.js} +4 -4
- package/dist/client/assets/{Virtualizer-Bk-YJlPj.js → Virtualizer-DWmIp9HB.js} +2 -2
- package/dist/client/assets/{WorkspaceBreadcrumb-DSFWvH19.js → WorkspaceBreadcrumb-Dx7xMwQd.js} +2 -2
- package/dist/client/assets/{WorkspacePageContainer-BXUbfbEU.js → WorkspacePageContainer-sM_H3DH4.js} +2 -2
- package/dist/client/assets/{WorkspacePageHeader-LbIzJCDs.js → WorkspacePageHeader-C_J7FxVt.js} +2 -2
- package/dist/client/assets/_chat-Du_FC4wO.js +45 -0
- package/dist/client/assets/{_chat.index-CTew1WmI.js → _chat.index-DUyKTtkh.js} +2 -2
- package/dist/client/assets/_chat.new-CMoB99iV.js +4 -0
- package/dist/client/assets/{_chat.pull-requests-BlXnsqov.js → _chat.pull-requests-BuTKumeN.js} +2 -2
- package/dist/client/assets/{abnfDiagram-VCTEODGH-brKh7bzh.js → abnfDiagram-VCTEODGH-D2OflHz4.js} +2 -2
- package/dist/client/assets/{alert-quTC4YbH.js → alert-8IFNkYPw.js} +2 -2
- package/dist/client/assets/architecture-7GRP2DOG-BMsijJGx.js +1 -0
- package/dist/client/assets/{architectureDiagram-5GKGNRK7-BVDiXgfK.js → architectureDiagram-5GKGNRK7-Cz7fFw7N.js} +2 -2
- package/dist/client/assets/arrow-left-DjrJekQJ.js +1 -0
- package/dist/client/assets/arrow-right-DNQ3322O.js +1 -0
- package/dist/client/assets/arrow-up-down-DpVszLOH.js +1 -0
- package/dist/client/assets/assets-DJce0KBy.js +2 -0
- package/dist/client/assets/bell-ehBYv81q.js +1 -0
- package/dist/client/assets/{blockDiagram-I7D4REHJ-CzoRCJDe.js → blockDiagram-I7D4REHJ-BcqcXQ0x.js} +2 -2
- package/dist/client/assets/blocks-CF1Wdm4Y.js +1 -0
- package/dist/client/assets/bot-Dj9hYg2w.js +1 -0
- package/dist/client/assets/{browserHistoryStore-Cw3ffhOV.js → browserHistoryStore-CuO1erOb.js} +2 -2
- package/dist/client/assets/{browserLinkTarget-KTI1tSl7.js → browserLinkTarget-B5-9Pt65.js} +2 -2
- package/dist/client/assets/{c4Diagram-7LVT6UL2-CfyobiDu.js → c4Diagram-7LVT6UL2-DDiDhcli.js} +2 -2
- package/dist/client/assets/calendar-clock-BaXgPf_7.js +1 -0
- package/dist/client/assets/channel-pJ5lNF0h.js +2 -0
- package/dist/client/assets/chart-no-axes-column-BzuvLLND.js +1 -0
- package/dist/client/assets/checkbox-BUOikrm3.js +2 -0
- package/dist/client/assets/{chunk-4HAMMTFA-CPnMRFld.js → chunk-4HAMMTFA-_7K6yngz.js} +2 -2
- package/dist/client/assets/{chunk-75Z2AOVW-C85FbOND.js → chunk-75Z2AOVW-CUqo_4ua.js} +2 -2
- package/dist/client/assets/{chunk-DU6HZSFF-s_qrqgaz.js → chunk-DU6HZSFF-C3RStRBi.js} +2 -2
- package/dist/client/assets/{chunk-F27PBJKO-90tTgV9x.js → chunk-F27PBJKO-BOr5cbtz.js} +2 -2
- package/dist/client/assets/{chunk-GMAD6QVW-CYRPr7hZ.js → chunk-GMAD6QVW-qBcSdTWV.js} +2 -2
- package/dist/client/assets/{chunk-GVQU2GXP-CxAvUb1-.js → chunk-GVQU2GXP-D8rhGQK_.js} +2 -2
- package/dist/client/assets/{chunk-IMKFNOWR-794woOlB.js → chunk-IMKFNOWR-BjTZFMrm.js} +2 -2
- package/dist/client/assets/{chunk-L3NEJ4N5-JXcRdiIo.js → chunk-L3NEJ4N5-DnCelWBi.js} +2 -2
- package/dist/client/assets/{chunk-OSK3NFVY-ToxVvjW1.js → chunk-OSK3NFVY-BEgD3sGZ.js} +2 -2
- package/dist/client/assets/{chunk-P2QGCYS3-JB1PmfIc.js → chunk-P2QGCYS3-DDmmXS6G.js} +2 -2
- package/dist/client/assets/{chunk-POPQ4Y6H-RMxlqjhd.js → chunk-POPQ4Y6H-CefHvRtI.js} +2 -2
- package/dist/client/assets/{chunk-PWAF6VOD-AB579n2y.js → chunk-PWAF6VOD-BPIKFLCK.js} +2 -2
- package/dist/client/assets/{chunk-SHT3W25Y-CV2hE9-g.js → chunk-SHT3W25Y-B_pDi6kv.js} +2 -2
- package/dist/client/assets/{chunk-SVP7TREG-b2Gs4u5W.js → chunk-SVP7TREG-BD15vJFs.js} +2 -2
- package/dist/client/assets/{chunk-TICWLB2K-CtkYqLLJ.js → chunk-TICWLB2K-B2yA6VhZ.js} +2 -2
- package/dist/client/assets/classDiagram-ZZMXUADV-D4Ed7oKu.js +2 -0
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-D4Ed7oKu.js +2 -0
- package/dist/client/assets/{color-picker-CFc6YapE.js → color-picker-Dqvd0njw.js} +2 -2
- package/dist/client/assets/{combobox-WVgW_agq.js → combobox-BPRK10Il.js} +2 -2
- package/dist/client/assets/{command-w6WcFbeZ.js → command-B-SWHWbd.js} +2 -2
- package/dist/client/assets/{connect-D_ncSJiK.js → connect-D8LGiBSX.js} +2 -2
- package/dist/client/assets/{connect-agent-8mHL_bau.js → connect-agent-B3TvHBIV.js} +2 -2
- package/dist/client/assets/corner-left-up-8yNxlIpO.js +1 -0
- package/dist/client/assets/{cynefin-OW5HDTMX-BDIjrXPB.js → cynefin-OW5HDTMX-D-j3kzkd.js} +1 -1
- package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-h9tw36zs.js → cynefinDiagram-5FMLGOSQ-CVEhj0G_.js} +2 -2
- package/dist/client/assets/{dagre-GXQ25YYZ-D3s1T81F.js → dagre-GXQ25YYZ-opF-kR2J.js} +2 -2
- package/dist/client/assets/device-DARKbqyG.js +2 -0
- package/dist/client/assets/{diagram-S7CK7UJ4-DTawhR4X.js → diagram-S7CK7UJ4-Y1OUf_Uf.js} +2 -2
- package/dist/client/assets/{diagram-UQ7AKVKN-CTUDQHKY.js → diagram-UQ7AKVKN-BMAkQiYU.js} +2 -2
- package/dist/client/assets/{diagram-VSXAHHWV-DsbNNWnj.js → diagram-VSXAHHWV-YWI6689v.js} +2 -2
- package/dist/client/assets/{diagram-VX7I27RA-BBy99N9O.js → diagram-VX7I27RA-DVxQ1Tyn.js} +2 -2
- package/dist/client/assets/{diagram-Z3DM3KII-CEy69xv1.js → diagram-Z3DM3KII-DzaunCE7.js} +2 -2
- package/dist/client/assets/{dialog-CPLO59bH.js → dialog-ChNU2rSW.js} +2 -2
- package/dist/client/assets/{diffRendering-BlmxsRF9.js → diffRendering-TJ6NEHef.js} +2 -2
- package/dist/client/assets/{discovery-list-D0LBmkzJ.js → discovery-list-2jVj88oX.js} +2 -2
- package/dist/client/assets/{dist-DZWol-cd.js → dist-Dc07DWZJ.js} +3 -3
- package/dist/client/assets/download-KOf4APex.js +1 -0
- package/dist/client/assets/{draft-input-CmvO5rl_.js → draft-input-CAOyi5vd.js} +2 -2
- package/dist/client/assets/{duoViewer-B0QD-fyi.js → duoViewer-CkI16mDl.js} +2 -2
- package/dist/client/assets/dynamic-B6ssT_6R.js +3 -0
- package/dist/client/assets/earth-Gh21ySR9.js +1 -0
- package/dist/client/assets/{ebnfDiagram-PWID7BFC-B9LWNbny.js → ebnfDiagram-PWID7BFC-CLu3StxL.js} +2 -2
- package/dist/client/assets/ellipsis-Dd1lpp1y.js +1 -0
- package/dist/client/assets/{embeddedScripts-B1MGNr-e.js → embeddedScripts-C0cHj-rX.js} +2 -2
- package/dist/client/assets/{empty-tr-EsB66.js → empty-DJMr9MZU.js} +2 -2
- package/dist/client/assets/entities-HApogVCu.js +2 -0
- package/dist/client/assets/{erDiagram-RLTQ6QDP-Nu9IMF5-.js → erDiagram-RLTQ6QDP-CMztaIAH.js} +2 -2
- package/dist/client/assets/eventmodeling-NTZA5JFV-D1FYr7Uj.js +1 -0
- package/dist/client/assets/eye-CQCt8uGE.js +1 -0
- package/dist/client/assets/file-search-BXNWZ1nV.js +1 -0
- package/dist/client/assets/{fileLinks-BHAkEh9k.js → fileLinks-3CrgspkN.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-BierCVUV.js → fileTreeExpansion-CYkjiRdT.js} +2 -2
- package/dist/client/assets/flowDiagram-HODETNUW-leGOLc6K.js +1 -0
- package/dist/client/assets/folder-git-2-BIZ4K8z0.js +1 -0
- package/dist/client/assets/folder-open-BI7lMTSr.js +1 -0
- package/dist/client/assets/folder-plus-B91hg6qR.js +1 -0
- package/dist/client/assets/{ganttDiagram-EL5Y4UJY-D_s5F9rI.js → ganttDiagram-EL5Y4UJY-G_L0ijf2.js} +2 -2
- package/dist/client/assets/{getDiffFileInput-B5j6sQbM.js → getDiffFileInput-Kc1w64Y-.js} +2 -2
- package/dist/client/assets/git-branch-Yqn0BBlE.js +1 -0
- package/dist/client/assets/{gitGraph-4MIJSDKK-BASxGOL3.js → gitGraph-4MIJSDKK-BmuEuxsx.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-BtA4z_1S.js → gitGraphDiagram-WWUBYQGX-C6A4msS5.js} +2 -2
- package/dist/client/assets/grip-vertical-DbE6Bv-r.js +1 -0
- package/dist/client/assets/{guideRunStore-C95PbUuP.js → guideRunStore-sdfoC8zb.js} +2 -2
- package/dist/client/assets/hard-drive--FvDwcA1.js +1 -0
- package/dist/client/assets/history-D-6p2svD.js +1 -0
- package/dist/client/assets/house-6Nj_TaKT.js +1 -0
- package/dist/client/assets/{htmlRender-DgdJ8GkZ.js → htmlRender-BPiW3VQi.js} +2 -2
- package/dist/client/assets/index-EKWtrZNr.js +3 -0
- package/dist/client/assets/{info-A6RAGUB7-Q4Qe5TI_.js → info-A6RAGUB7-CwFLPSUe.js} +1 -1
- package/dist/client/assets/{infoDiagram-27XIBGKW-CNnDxcfZ.js → infoDiagram-27XIBGKW-bjIIr1Q4.js} +2 -2
- package/dist/client/assets/{input-group-DJwXFHGO.js → input-group-DM7QvN7X.js} +2 -2
- package/dist/client/assets/{input-DaCwubQj.js → input-w_nbMVAd.js} +2 -2
- package/dist/client/assets/{ishikawaDiagram-5VMMS53U-Drb03OY6.js → ishikawaDiagram-5VMMS53U-ymImqXAG.js} +2 -2
- package/dist/client/assets/{journeyDiagram-3NMN7TZE-CynC6Up1.js → journeyDiagram-3NMN7TZE-TJpDU0em.js} +2 -2
- package/dist/client/assets/{kanban-definition-UXKFOSKX-DfyC_hIe.js → kanban-definition-UXKFOSKX-Bhm6s1x1.js} +2 -2
- package/dist/client/assets/{kbd-R3wkAau0.js → kbd-CTZhqOH9.js} +2 -2
- package/dist/client/assets/{keybindings-QrjnJ5jB.js → keybindings-CJFu-Dyg.js} +2 -2
- package/dist/client/assets/keyboard-Bf3n2zS8.js +1 -0
- package/dist/client/assets/{lazyRouteComponent-cLZROdN-.js → lazyRouteComponent-WxKijHdU.js} +2 -2
- package/dist/client/assets/{line-C3gvAOpf.js → line-C24Qe7Rj.js} +2 -2
- package/dist/client/assets/link-BVjRZ3mh.js +1 -0
- package/dist/client/assets/{link-Bl21VXlj.js → link-DnBUR2mx.js} +2 -2
- package/dist/client/assets/{linkedPrompt-DAcv0O_f.js → linkedPrompt-CNv-bVSs.js} +2 -2
- package/dist/client/assets/list-DrTK4zhP.js +1 -0
- package/dist/client/assets/loader-Bc9xbkPa.js +2 -0
- package/dist/client/assets/main-D1oD2GPo.js +30 -0
- package/dist/client/assets/main-hjb9WdQ8.css +2 -0
- package/dist/client/assets/{mediaReference-DN8lzwOF.js → mediaReference-vtwfoFLK.js} +2 -2
- package/dist/client/assets/{mediaSource-0nIWHHoL.js → mediaSource-BDkqXaxs.js} +2 -2
- package/dist/client/assets/{mermaid-parser.core-B3cYmj0d.js → mermaid-parser.core-D2hAGRv3.js} +4 -4
- package/dist/client/assets/{mermaid.core-9ekBSYCO.js → mermaid.core-DWtHy2iz.js} +5 -5
- package/dist/client/assets/message-circle-question-mark-D2JAzS9x.js +1 -0
- package/dist/client/assets/message-square-DNTOkKRN.js +1 -0
- package/dist/client/assets/message-square-dashed-NGYZLQqB.js +1 -0
- package/dist/client/assets/{mindmap-definition-YA3MSWOX-K4rtZu2z.js → mindmap-definition-YA3MSWOX-DCzTD1Gd.js} +2 -2
- package/dist/client/assets/mouse-pointer-2-CgUWLVBh.js +1 -0
- package/dist/client/assets/number-field-yRjM_PYx.js +2 -0
- package/dist/client/assets/{observeResize-BEjNJ-rK.js → observeResize-wFdsooQ8.js} +2 -2
- package/dist/client/assets/{onboarding--LqcHqO0.js → onboarding-Buk_SNIp.js} +2 -2
- package/dist/client/assets/{openFileInPreview-NwK1GJFN.js → openFileInPreview-CxrjOX7D.js} +2 -2
- package/dist/client/assets/{p4ProjectFile-CVEoe1SJ.js → p4ProjectFile-DNlgD3LH.js} +2 -2
- package/dist/client/assets/{packet-AYTQ26CC-kDkfULQq.js → packet-AYTQ26CC-CSklBRjj.js} +1 -1
- package/dist/client/assets/{pair-Bxo10T5t.js → pair-DYnW2Jz0.js} +2 -2
- package/dist/client/assets/palette-DCF6iKZY.js +1 -0
- package/dist/client/assets/panel-left-BObCZ482.js +1 -0
- package/dist/client/assets/panels-top-left-4ditdjHS.js +1 -0
- package/dist/client/assets/{pegDiagram-XKGWAZYB-6b8AqBYd.js → pegDiagram-XKGWAZYB-Cgo_C_YQ.js} +2 -2
- package/dist/client/assets/{phoneViewer-Vql_2ZzY.js → phoneViewer-CVOLU68D.js} +2 -2
- package/dist/client/assets/{pie-WAS4IAKB-CfoqFIwI.js → pie-WAS4IAKB-y0cNnmhp.js} +1 -1
- package/dist/client/assets/{pieDiagram-E7YTZNPT-i8FgTMai.js → pieDiagram-E7YTZNPT-CR9uQOKX.js} +2 -2
- package/dist/client/assets/{pierre-icons-CBmlpFgP.js → pierre-icons-YFKnGmUq.js} +2 -2
- package/dist/client/assets/{popover-BXin7C0B.js → popover-D-VzRDzk.js} +2 -2
- package/dist/client/assets/{preview-6t42evKb.js → preview-C7hqmFHN.js} +2 -2
- package/dist/client/assets/{preview-C9iPHfb1.js → preview-DT6Qi-Q0.js} +2 -2
- package/dist/client/assets/{previewMiniPlayerStore-BDRPsVx0.js → previewMiniPlayerStore-Dmvk7kfx.js} +2 -2
- package/dist/client/assets/primary-bBvWt8wp.js +2 -0
- package/dist/client/assets/primaryCloudLinkState-DDmxU43H.js +2 -0
- package/dist/client/assets/projectFilesQueryState-C9bparJ7.js +2 -0
- package/dist/client/assets/projectScriptEditor-2klDgdXc.js +2 -0
- package/dist/client/assets/{providerSkills-D0IxW0_5.js → providerSkills-Bd9FOodA.js} +2 -2
- package/dist/client/assets/{pullRequestDetail.logic-BiwUoz1M.js → pullRequestDetail.logic-BHCv2eTg.js} +4 -4
- package/dist/client/assets/{pullRequestReviewStore-J7YIGsZ9.js → pullRequestReviewStore-DNDBmRdQ.js} +2 -2
- package/dist/client/assets/pullRequests-NQiU1cvE.js +2 -0
- package/dist/client/assets/puzzle-DC6izfkI.js +1 -0
- package/dist/client/assets/{quadrantDiagram-AXDQQJYC-DzvIAxCm.js → quadrantDiagram-AXDQQJYC-B2RnhUBb.js} +2 -2
- package/dist/client/assets/queries-DrIiv9gC.js +2 -0
- package/dist/client/assets/query-B_BcLKlb.js +2 -0
- package/dist/client/assets/{radar-RG4KPBEZ-BnTV8utT.js → radar-RG4KPBEZ-Dygcuho2.js} +1 -1
- package/dist/client/assets/{radio-group-DhpPG5HP.js → radio-group-ESEwcJva.js} +2 -2
- package/dist/client/assets/{railroad-74A4TZTK-nxEBKbUo.js → railroad-74A4TZTK-CK7b6dqk.js} +1 -1
- package/dist/client/assets/railroad-abnf-HS5TGJTU-Bn3ASlRb.js +1 -0
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-DpIqYG5o.js +1 -0
- package/dist/client/assets/railroad-peg-WCYAUIDC-9vGlAMJk.js +1 -0
- package/dist/client/assets/{railroadDiagram-O6MQD6OU-DFdlMVKn.js → railroadDiagram-O6MQD6OU-DsiQNHoT.js} +2 -2
- package/dist/client/assets/{renderScheduler-DWKKtxcJ.js → renderScheduler-DwOi4uKZ.js} +2 -2
- package/dist/client/assets/{requirementDiagram-BXWQKSXE-BW8o0F_p.js → requirementDiagram-BXWQKSXE-DUEtMGYN.js} +2 -2
- package/dist/client/assets/{rightPanelStore-CQ94819A.js → rightPanelStore-BWYBRVeP.js} +2 -2
- package/dist/client/assets/rotate-ccw-BSwk8mHM.js +1 -0
- package/dist/client/assets/rotate-cw-BsgLwrfv.js +1 -0
- package/dist/client/assets/runtime-CBB2It1x.js +6 -0
- package/dist/client/assets/runtime-Dydpcwo9.js +2 -0
- package/dist/client/assets/{sankeyDiagram-P5KCCOFB-JA6FB6i0.js → sankeyDiagram-P5KCCOFB-Bnb7-uIo.js} +2 -2
- package/dist/client/assets/{scheduledTasksSettings.logic-C_AdQNVz.js → scheduledTasksSettings.logic-CFyLLJ0-.js} +3 -3
- package/dist/client/assets/{scroll-area-BYyfw-9F.js → scroll-area-iMm_YXqJ.js} +2 -2
- package/dist/client/assets/{select-CjGEfXy_.js → select-cvR_zMkG.js} +2 -2
- package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-DgBrrcVR.js → sequenceDiagram-WJ2MYXX4-BKHWFnq6.js} +2 -2
- package/dist/client/assets/server-FMafPUns.js +2 -0
- package/dist/client/assets/session-BI6WO3-p.js +2 -0
- package/dist/client/assets/{session-logic-l1juLk9v.js → session-logic-DVvClfzW.js} +5 -5
- package/dist/client/assets/settings-2-BbyXH0uI.js +1 -0
- package/dist/client/assets/settings-DRKdVCbB.js +1 -0
- package/dist/client/assets/{settings-xKzLy5aw.js → settings-Dzr6EHna.js} +2 -2
- package/dist/client/assets/settings.appearance-Dcbf4cgV.js +2 -0
- package/dist/client/assets/settings.archived-BI9u9Y07.js +2 -0
- package/dist/client/assets/{settings.computer-use-DZu90DiM.js → settings.computer-use-CE8rpPYM.js} +2 -2
- package/dist/client/assets/settings.connections-BWLCI5Zi.js +2 -0
- package/dist/client/assets/{settings.data-controls-CBrcsSvm.js → settings.data-controls-CmJZj_HT.js} +2 -2
- package/dist/client/assets/{settings.decisions-CGz9znLs.js → settings.decisions-Bm-M9k3t.js} +2 -2
- package/dist/client/assets/{settings.diagnostics-DKkOOzoq.js → settings.diagnostics-ao6ZzXXw.js} +2 -2
- package/dist/client/assets/settings.general-BoU897Dm.js +2 -0
- package/dist/client/assets/{settings.integrations-K3Jwfkyd.js → settings.integrations-ChLDKsIY.js} +2 -2
- package/dist/client/assets/{settings.keybindings-BbR3qnVs.js → settings.keybindings-BSg3FHQZ.js} +2 -2
- package/dist/client/assets/{settings.open-source-licenses-Mh-zg97k.js → settings.open-source-licenses-B4sC68Ud.js} +2 -2
- package/dist/client/assets/settings.plugins-CGUFRhFY.js +5 -0
- package/dist/client/assets/{settings.projects-BahZsoyx.js → settings.projects-V3nNBIzc.js} +4 -4
- package/dist/client/assets/settings.providers-D1BgocCC.js +3 -0
- package/dist/client/assets/settings.scheduled-tasks-C-I22teI.js +2 -0
- package/dist/client/assets/{settings.snap-shot-Bs_DZS7D.js → settings.snap-shot-aum1tmsR.js} +2 -2
- package/dist/client/assets/{settings.source-control-Akrp_mGm.js → settings.source-control-8YMYuva4.js} +2 -2
- package/dist/client/assets/{settings.storage-fl2BN0Cu.js → settings.storage-e3yKBYeM.js} +2 -2
- package/dist/client/assets/settingsLayout-BUbXPq57.js +3 -0
- package/dist/client/assets/shield-check-CG2tOYd1.js +1 -0
- package/dist/client/assets/shield-question-mark-Mk3rAYhm.js +1 -0
- package/dist/client/assets/{sidebar-MBwCdIpv.js → sidebar-CjtIIYSY.js} +2 -2
- package/dist/client/assets/{sidebarProjectGrouping-Sm7y9bd1.js → sidebarProjectGrouping-BmTLes3y.js} +2 -2
- package/dist/client/assets/{skeleton-CS8ffFVv.js → skeleton-DzaiJbx8.js} +2 -2
- package/dist/client/assets/{sortable.esm-CwrTFe-B.js → sortable.esm-Df_JB8i3.js} +2 -2
- package/dist/client/assets/{sourceControl-DyHbbOxl.js → sourceControl-BfGzu06x.js} +2 -2
- package/dist/client/assets/{spinner-B7a-VUeR.js → spinner-RAU9Cg6j.js} +2 -2
- package/dist/client/assets/square-pen-BuwM-DT0.js +1 -0
- package/dist/client/assets/{standalone-page-DTvNMgJy.js → standalone-page-Bsaqnigq.js} +2 -2
- package/dist/client/assets/{stateDiagram-D77RDMKH-gHEAo7xC.js → stateDiagram-D77RDMKH-BhdX_IDZ.js} +2 -2
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-Ba0Qofsh.js +2 -0
- package/dist/client/assets/{swimlanes-42K2YHIH-_qZ90QGb.js → swimlanes-42K2YHIH-T7QLMavY.js} +2 -2
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-C9WqWw-N.js +9 -0
- package/dist/client/assets/{terminal-links-Dc2HX7Ov.js → terminal-links-B9s8s-tz.js} +2 -2
- package/dist/client/assets/{terminalSessions-DK9WKgga.js → terminalSessions-BmqpP0Ss.js} +2 -2
- package/dist/client/assets/text-search-DyMq-QgY.js +1 -0
- package/dist/client/assets/{textarea-CYXHTTG6.js → textarea-C9YeXMVc.js} +2 -2
- package/dist/client/assets/{themePalette-zVYGoviO.js → themePalette-C1oD3Oeg.js} +3 -3
- package/dist/client/assets/threadSort-C4CtIL5v.js +2 -0
- package/dist/client/assets/{timeline-definition-24CTP7MA-BxWmcZQs.js → timeline-definition-24CTP7MA-Dnja29q2.js} +2 -2
- package/dist/client/assets/toast-DEgXlTR7.js +2 -0
- package/dist/client/assets/{toggle-fk33ppsB.js → toggle-CNbzG8Ec.js} +2 -2
- package/dist/client/assets/{toggle-group-W0bDGcPB.js → toggle-group-DIqmqqKQ.js} +2 -2
- package/dist/client/assets/tooltip-DyiHlEs0.js +2 -0
- package/dist/client/assets/{treeView-Q6P3EWNA-BsPhq-Fl.js → treeView-Q6P3EWNA-KHtw7wMC.js} +1 -1
- package/dist/client/assets/{treemap-WGGIJYW6-DZ3fnU-o.js → treemap-WGGIJYW6-BZN3U17E.js} +1 -1
- package/dist/client/assets/{usage-DlNazxzV.js → usage--nsoWaqi.js} +2 -2
- package/dist/client/assets/{usageAccess-Mp1Nbm2r.js → usageAccess-Dwz13Eun.js} +2 -2
- package/dist/client/assets/{usageFormat-ZiOrCBxk.js → usageFormat-Z0lz-RCF.js} +2 -2
- package/dist/client/assets/{usageShortcuts-Be5hddhr.js → usageShortcuts-cwv5i-oF.js} +2 -2
- package/dist/client/assets/use-atom-command-BVrZ0hTO.js +2 -0
- package/dist/client/assets/{useAriaLabelledBy-D-n0SDV6.js → useAriaLabelledBy-z3tVAFR_.js} +2 -2
- package/dist/client/assets/{useHandleNewThread-BQ5wqZab.js → useHandleNewThread-lAV5NpwQ.js} +2 -2
- package/dist/client/assets/{useLocation-BN5q7LjL.js → useLocation-CxFbcar1.js} +2 -2
- package/dist/client/assets/useNavigate-CLQYZa7I.js +2 -0
- package/dist/client/assets/{useNavigateBack-BWhsiBJ5.js → useNavigateBack-91jfuRCn.js} +2 -2
- package/dist/client/assets/{useParams-DQgx0pmy.js → useParams-nxAoxVO6.js} +2 -2
- package/dist/client/assets/{usePermissionStatus-FtemMvNg.js → usePermissionStatus-CVCguZPP.js} +2 -2
- package/dist/client/assets/{usePullRequestActions-D97OVSkM.js → usePullRequestActions-Cp-f2-rS.js} +3 -3
- package/dist/client/assets/{useRegisterFieldControl-KOnbOVnX.js → useRegisterFieldControl-hMeYQdpT.js} +2 -2
- package/dist/client/assets/useScopedModelAvailability-1rkaoEPh.js +2 -0
- package/dist/client/assets/useSettings-BCUX_14n.js +3 -0
- package/dist/client/assets/{useT3ConnectAuthPrompt-CPGDAWRk.js → useT3ConnectAuthPrompt-B1AHMyDF.js} +2 -2
- package/dist/client/assets/{utils-BxISc9RR.js → utils-Cbsb1ks0.js} +5 -5
- package/dist/client/assets/vcsRefInvalidation-DMlloB2h.js +2 -0
- package/dist/client/assets/{vennDiagram-4TSXK5OY-BnH-hzBf.js → vennDiagram-4TSXK5OY-B4KHYxz_.js} +2 -2
- package/dist/client/assets/{wardley-WFR3VGLG-BbiFWq4f.js → wardley-WFR3VGLG-EUhzOM0w.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-VM6X3IG4-DPf4ISf5.js → wardleyDiagram-VM6X3IG4-25okiPRC.js} +2 -2
- package/dist/client/assets/{welcome-DjYohRu3.js → welcome-pBX3QtZq.js} +2 -2
- package/dist/client/assets/{xychartDiagram-S5SC5T6Z-oaZh5sFY.js → xychartDiagram-S5SC5T6Z-Dyo2i7yf.js} +2 -2
- package/dist/client/index.html +1 -1
- package/package.json +1 -1
- package/dist/client/assets/ChatGptUsageButton-BWTEbaUC.js +0 -2
- package/dist/client/assets/ChatMarkdown-C6UsXjP9.js +0 -65
- package/dist/client/assets/DiffPanel-0HWHkPjD.js +0 -2
- package/dist/client/assets/ProjectDefaultsSettings-Bqo3T1SR.js +0 -2
- package/dist/client/assets/ProjectIconPickerDialog-Cx-QcJLy.js +0 -2
- package/dist/client/assets/ScheduledTasksSettings-D_Z_3GVl.js +0 -4
- package/dist/client/assets/ScopedSwitch-B8wdvttG.js +0 -2
- package/dist/client/assets/_chat-oHhtDqeh.js +0 -45
- package/dist/client/assets/_chat.new-COSURrfS.js +0 -4
- package/dist/client/assets/architecture-7GRP2DOG-BMFS-mJW.js +0 -1
- package/dist/client/assets/arrow-left-BFquhiaO.js +0 -1
- package/dist/client/assets/arrow-right-DiV8cYUQ.js +0 -1
- package/dist/client/assets/arrow-up-down-BDQTjPr1.js +0 -1
- package/dist/client/assets/assets-CRmNKuHc.js +0 -2
- package/dist/client/assets/bell-BvJp3v99.js +0 -1
- package/dist/client/assets/blocks-NuR9qdGl.js +0 -1
- package/dist/client/assets/bot-mvw1ddnU.js +0 -1
- package/dist/client/assets/calendar-clock-CuvWKWXS.js +0 -1
- package/dist/client/assets/channel-Cf2J77rP.js +0 -2
- package/dist/client/assets/chart-no-axes-column-Hfs9TSWj.js +0 -1
- package/dist/client/assets/checkbox-BHsP70Vt.js +0 -2
- package/dist/client/assets/classDiagram-ZZMXUADV-D9m4giYc.js +0 -2
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-D9m4giYc.js +0 -2
- package/dist/client/assets/corner-left-up-DedXC9IG.js +0 -1
- package/dist/client/assets/device-DhvzgETq.js +0 -2
- package/dist/client/assets/download-CUcdw53T.js +0 -1
- package/dist/client/assets/dynamic-tF-2a8Zt.js +0 -3
- package/dist/client/assets/earth-BqADiov-.js +0 -1
- package/dist/client/assets/ellipsis-BUF_4-Z7.js +0 -1
- package/dist/client/assets/entities-DqhRur25.js +0 -2
- package/dist/client/assets/eventmodeling-NTZA5JFV-CHuv5_8f.js +0 -1
- package/dist/client/assets/eye-C8OhITrC.js +0 -1
- package/dist/client/assets/file-search-ComEiFQ8.js +0 -1
- package/dist/client/assets/flowDiagram-HODETNUW-wmC7eeQc.js +0 -1
- package/dist/client/assets/folder-git-2-COyuVTXA.js +0 -1
- package/dist/client/assets/folder-open-DZzz50kK.js +0 -1
- package/dist/client/assets/folder-plus-BzJT8jXs.js +0 -1
- package/dist/client/assets/git-branch-CCzcdr93.js +0 -1
- package/dist/client/assets/grip-vertical-COceJQZo.js +0 -1
- package/dist/client/assets/hard-drive-BKLzbeTS.js +0 -1
- package/dist/client/assets/history-CAAEfWkp.js +0 -1
- package/dist/client/assets/house-U4txgvXa.js +0 -1
- package/dist/client/assets/index-D_uSeco8.js +0 -3
- package/dist/client/assets/keyboard-kgy5M4lo.js +0 -1
- package/dist/client/assets/link-C1k5F8-V.js +0 -1
- package/dist/client/assets/list-CU7BIfIS.js +0 -1
- package/dist/client/assets/loader-CRsWQXUs.js +0 -2
- package/dist/client/assets/main-BsiZpg85.css +0 -2
- package/dist/client/assets/main-uLg3xUJM.js +0 -30
- package/dist/client/assets/message-circle-question-mark-wTwD9xwk.js +0 -1
- package/dist/client/assets/message-square-dashed-Hcy2Q2EP.js +0 -1
- package/dist/client/assets/message-square-lCzwndCW.js +0 -1
- package/dist/client/assets/mouse-pointer-2-BFFAEWXU.js +0 -1
- package/dist/client/assets/number-field-pAaF-e0N.js +0 -2
- package/dist/client/assets/palette-BkpHEJXn.js +0 -1
- package/dist/client/assets/panel-left-DNz3ps89.js +0 -1
- package/dist/client/assets/panels-top-left-bKuZF4FX.js +0 -1
- package/dist/client/assets/primary-DOpcfgLH.js +0 -2
- package/dist/client/assets/primaryCloudLinkState-Dulej3bP.js +0 -2
- package/dist/client/assets/projectFilesQueryState-C1crs3C8.js +0 -2
- package/dist/client/assets/projectScriptEditor-ku2tGeKq.js +0 -2
- package/dist/client/assets/pullRequests-BQ9KruZm.js +0 -2
- package/dist/client/assets/puzzle-wfhgUaHl.js +0 -1
- package/dist/client/assets/queries-CEjFwxVW.js +0 -2
- package/dist/client/assets/query-D5pQUQvZ.js +0 -2
- package/dist/client/assets/railroad-abnf-HS5TGJTU-bDIjPMME.js +0 -1
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-BREFlihg.js +0 -1
- package/dist/client/assets/railroad-peg-WCYAUIDC-B0hEZefb.js +0 -1
- package/dist/client/assets/rotate-ccw-CkpQmcC5.js +0 -1
- package/dist/client/assets/rotate-cw-BAiACGtX.js +0 -1
- package/dist/client/assets/runtime-Bsb2I_n2.js +0 -2
- package/dist/client/assets/runtime-DkYxB4ri.js +0 -6
- package/dist/client/assets/server-BYntb2dN.js +0 -2
- package/dist/client/assets/session-eLrubJEW.js +0 -2
- package/dist/client/assets/settings-2-CDBTJPBs.js +0 -1
- package/dist/client/assets/settings-DDvSs7LG.js +0 -1
- package/dist/client/assets/settings.appearance-CEA3GKAa.js +0 -2
- package/dist/client/assets/settings.archived-DPWjmD2l.js +0 -2
- package/dist/client/assets/settings.connections-BKWbsMUk.js +0 -2
- package/dist/client/assets/settings.general-CoPWyKC4.js +0 -2
- package/dist/client/assets/settings.plugins-BI68kAsM.js +0 -5
- package/dist/client/assets/settings.providers-Dsnq0-AL.js +0 -3
- package/dist/client/assets/settings.scheduled-tasks-BOpVl_XK.js +0 -2
- package/dist/client/assets/settingsLayout-DV36_Jgq.js +0 -3
- package/dist/client/assets/shield-check-yRjvgn4y.js +0 -1
- package/dist/client/assets/shield-question-mark-DyVUewRO.js +0 -1
- package/dist/client/assets/square-pen-BrE59gWn.js +0 -1
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-CGT21P8W.js +0 -2
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-D9Ttx7dQ.js +0 -9
- package/dist/client/assets/text-search-CFbEY3qo.js +0 -1
- package/dist/client/assets/threadSort-Byzu7B1A.js +0 -2
- package/dist/client/assets/toast-BX9uiMAh.js +0 -2
- package/dist/client/assets/tooltip-B0rhqi5b.js +0 -2
- package/dist/client/assets/use-atom-command-RgcuqzP9.js +0 -2
- package/dist/client/assets/useNavigate-CDvr3Yvg.js +0 -2
- package/dist/client/assets/useScopedModelAvailability-BTR7tHpB.js +0 -2
- package/dist/client/assets/useSettings-BIggY3j1.js +0 -3
- package/dist/client/assets/vcsRefInvalidation-h_E9Figo.js +0 -2
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$b as n,$g as r,$n as i,Bf as a,Cf as o,Df as s,Ef as c,Ff as l,Gf as u,Gm as d,Gn as f,Go as p,Ho as m,If as h,Ko as g,Lf as _,Mf as v,Nf as y,Of as b,Pf as x,Qn as S,Rf as C,Ro as w,Vf as T,Yn as E,Zn as D,Zo as O,_v as k,ar as A,ch as j,cr as M,dg as N,es as P,ha as ee,ir as te,jf as ne,jx as re,kc as ie,mf as ae,nx as oe,or as se,ox as ce,pp as le,rr as ue,rx as F,sl as de,sr as I,t as fe,tr as pe,vf as me,wf as L,xf as he,xg as ge,zf as R}from"./utils-BxISc9RR.js";import{t as _e}from"./chevron-right-NbahR9_s.js";import{t as ve}from"./chevrons-left-right-ellipsis-D2Qu5H2y.js";import{t as ye}from"./plus-Cr075-cy.js";import{t as be}from"./qr-code-D3ZNC-wH.js";import{t as xe}from"./route-CQ6wZzks.js";import{t as Se}from"./terminal-6kKaKv-Q.js";import{t as z}from"./x-CSwbgjBe.js";import{At as B,C as Ce,Dn as we,Dt as Te,Et as V,Ht as Ee,L as De,Ot as Oe,P as ke,Tt as Ae,U as je,Vt as Me,an as Ne,b as Pe,et as H,o as Fe}from"./runtime-DkYxB4ri.js";import{E as U,Et as W,F as Ie,S as Le,St as Re,Tt as ze,_ as Be,bt as Ve,t as G}from"./runtime-Bsb2I_n2.js";import{a as He,n as Ue,t as We}from"./tooltip-B0rhqi5b.js";import{a as Ge,c as Ke,o as qe,s as Je,t as Ye}from"./select-CjGEfXy_.js";import{t as Xe}from"./spinner-B7a-VUeR.js";import{i as K,p as Ze}from"./toast-BX9uiMAh.js";import{A as Qe,D as $e,E as et,O as tt,b as q,c as nt,et as rt,s as it,v as at}from"./useSettings-BIggY3j1.js";import{f as ot,h as st,s as ct}from"./server-BYntb2dN.js";import{a as J,i as lt,n as ut,s as dt}from"./session-eLrubJEW.js";import{n as ft}from"./query-D5pQUQvZ.js";import{t as pt}from"./use-atom-command-RgcuqzP9.js";import{n as Y}from"./toastHelpers-Dsph6LwL.js";import{i as mt,r as ht}from"./timestampFormat-wac2e_Jz.js";import{t as gt}from"./checkbox-BHsP70Vt.js";import{t as _t}from"./textarea-CYXHTTG6.js";import{_ as vt,b as yt,g as bt,h as xt,v as St,x as Ct,y as wt}from"./command-w6WcFbeZ.js";import{t as Tt}from"./input-DaCwubQj.js";import{t as Et}from"./scroll-area-BYyfw-9F.js";import{a as Dt,c as Ot,i as kt,l as At,n as jt,o as Mt,r as Nt,s as Pt,t as Ft}from"./dialog-CPLO59bH.js";import{n as It}from"./T3ConnectAccountPages-DjITJ87o.js";import{a as Lt,i as Rt,o as zt,r as Bt,t as Vt}from"./empty-tr-EsB66.js";import{t as Ht}from"./AnimatedHeight-DYUgtGfz.js";import{C as Ut,_ as Wt,w as Gt,y as Kt}from"./keybindings-QrjnJ5jB.js";import{i as qt,o as Jt,t as Yt}from"./popover-BXin7C0B.js";import{a as Xt,b as Zt,c as Qt,h as $t,i as en,l as tn,m as nn,n as rn,o as an,p as on,s as sn,t as cn,u as ln}from"./sortable.esm-CwrTFe-B.js";import{n as un,t as dn}from"./EnvironmentMachineIcon-giyHKjbh.js";import{r as fn,t as pn}from"./alert-quTC4YbH.js";import{a as mn,i as hn,s as gn,u as _n}from"./settingsLayout-DV36_Jgq.js";import{t as vn}from"./ConnectionStatusDot-BCSqqCpf.js";import{a as yn,n as X,o as bn,s as xn,t as Sn}from"./primary-DOpcfgLH.js";import{n as Cn,t as wn}from"./onboarding--LqcHqO0.js";import{Ar as Tn,Er as En,Fr as Dn,Gn as On,Ir as kn,Jn as An,Kn as jn,La as Mn,Mr as Nn,Nr as Pn,Or as Fn,Pr as In,Qn as Ln,Qo as Rn,Ro as zn,T as Bn,Tr as Vn,Xn as Hn,Yn as Un,Zn as Wn,_r as Gn,an as Kn,ci as qn,gr as Jn,hr as Yn,in as Xn,ir as Zn,jr as Qn,kr as $n,mr as er,nn as tr,on as nr,qn as rr,si as ir}from"./main-uLg3xUJM.js";import{t as ar}from"./FoldedSettingsSection-CsN_jb3V.js";var Z=re(),or=[{scope:v,title:`View environment`,description:`Read threads, status, checkpoints, and configuration.`},{scope:ne,title:`Operate tasks`,description:`Start, update, and stop tasks.`},{scope:_,title:`Change environment settings`,description:`Edit environment preferences and keybindings.`},{scope:x,title:`Manage providers`,description:`Configure, install, sign in to, and update providers and usage sources.`},{scope:c,title:`Maintain environment`,description:`Update the server and control environment processes.`},{scope:y,title:`Control previews`,description:`Open browser previews and host browser automation.`},{scope:L,title:`View diagnostics and usage`,description:`Read process diagnostics, resource history, and usage totals.`},{scope:T,title:`View terminals`,description:`Read existing terminal output and status.`},{scope:a,title:`Use terminals`,description:`Create terminals and send input to running shells.`},{scope:C,title:`Change source control`,description:`Commit, push, manage branches and repositories, and change pull requests.`},{scope:s,title:`Read files`,description:`Browse host files, search workspaces, and inspect local changes.`},{scope:b,title:`Write files`,description:`Edit workspace files and save plans to disk.`},{scope:he,title:`View access`,description:`Inspect pairing links and authorized clients.`},{scope:o,title:`Manage access`,description:`Issue and revoke credentials for other clients.`},{scope:l,title:`View relay`,description:`Inspect managed relay connectivity.`},{scope:h,title:`Manage relay`,description:`Change managed tunnel connectivity.`}],Q=e(ee(),1);function sr(e){let t=(0,Z.c)(4),{environmentId:n,connected:r,routeContext:i}=e,a=i!==void 0&&i,o=J(n),s;return t[0]!==r||t[1]!==a||t[2]!==o?(s=r&&!o.hasError&&!o.isPending&&o.data?.authenticated?(0,Q.jsxs)(`div`,{className:`space-y-3 py-3 text-xs`,children:[(0,Q.jsx)(`p`,{className:`text-muted-foreground`,children:a?`These permissions apply to your active route. Other routes may have different permissions.`:`These permissions apply to this client’s current connection.`}),(0,Q.jsx)(`ul`,{className:`grid gap-x-6 gap-y-2 sm:grid-cols-2`,children:or.map(e=>{let{scope:t,title:n}=e;return(0,Q.jsxs)(`li`,{className:`flex items-start justify-between gap-3`,children:[(0,Q.jsx)(`span`,{children:n}),(0,Q.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:u(o.data,t)?`Allowed`:`Not granted`})]},t)})})]}):(0,Q.jsx)(`p`,{className:`py-3 text-xs text-muted-foreground`,children:`Permissions not checked. Connect to this environment to view this session’s permissions.`}),t[0]=r,t[1]=a,t[2]=o,t[3]=s):s=t[3],s}var $=e(t(),1);function cr(e,t){let n=new URL(e);return n.pathname=`/pair`,W(n,t).toString()}function lr(e,t){return new URL(e).protocol===`https:`?Le({host:e,token:t}):null}function ur(){let e=(0,Z.c)(48),t=window.desktopBridge?.setLocalEnvironmentEnabled,[n]=(0,$.useState)(dr),[r,i]=(0,$.useState)(!1),[a,o]=(0,$.useState)(!1),[s,c]=(0,$.useState)(null);if(!t)return null;let l;e[0]===n?l=e[1]:(l=async()=>{o(!0),c(null);try{await t(!n)}catch(e){let t=e;c(t instanceof Error?t.message:`Couldn't change this setting.`),o(!1)}},e[0]=n,e[1]=l);let u=l,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=Zn(`local-environment`),e[2]=d):d=e[2];let f=n?`Run agents on this computer. Turn off to use P4 Code only with remote environments.`:`Turned off. Agents only run in remote environments.`,p;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>i(!0),e[3]=p):p=e[3];let m;e[4]!==n||e[5]!==a?(m=(0,Q.jsx)(Mn,{checked:n,disabled:a,onCheckedChange:p,"aria-label":`Local environment`}),e[4]=n,e[5]=a,e[6]=m):m=e[6];let h;e[7]!==f||e[8]!==m?(h=(0,Q.jsx)(mn,{...d,description:f,control:m}),e[7]=f,e[8]=m,e[9]=h):h=e[9];let g;e[10]===a?g=e[11]:(g=e=>{a||(i(e),e||c(null))},e[10]=a,e[11]=g);let _=n?`Turn off local environment?`:`Turn on local environment?`,v;e[12]===_?v=e[13]:(v=(0,Q.jsx)(kn,{children:_}),e[12]=_,e[13]=v);let y=n?`P4 Code will restart without running a server on this computer. Any agents and terminals running here will stop, and other devices will no longer be able to connect to this computer. Your projects, history, and remote environments are unaffected.`:`P4 Code will restart and start running a server on this computer again.`,b;e[14]===y?b=e[15]:(b=(0,Q.jsx)(Nn,{children:y}),e[14]=y,e[15]=b);let x;e[16]!==b||e[17]!==v?(x=(0,Q.jsxs)(In,{children:[v,b]}),e[16]=b,e[17]=v,e[18]=x):x=e[18];let S;e[19]===s?S=e[20]:(S=s?(0,Q.jsx)(`p`,{className:`px-6 pb-4 text-sm text-destructive`,children:s}):null,e[19]=s,e[20]=S);let C;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Q.jsx)(I,{variant:`outline`}),e[21]=C):C=e[21];let w;e[22]===a?w=e[23]:(w=(0,Q.jsx)(Qn,{disabled:a,render:C,children:`Cancel`}),e[22]=a,e[23]=w);let T=n?`destructive`:`default`,E;e[24]===u?E=e[25]:(E=()=>void u(),e[24]=u,e[25]=E);let D;e[26]!==n||e[27]!==a?(D=a?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Xe,{size:`sm`}),`Restarting…`]}):n?`Restart and turn off`:`Restart and turn on`,e[26]=n,e[27]=a,e[28]=D):D=e[28];let O;e[29]!==a||e[30]!==T||e[31]!==E||e[32]!==D?(O=(0,Q.jsx)(I,{variant:T,disabled:a,onClick:E,children:D}),e[29]=a,e[30]=T,e[31]=E,e[32]=D,e[33]=O):O=e[33];let k;e[34]!==w||e[35]!==O?(k=(0,Q.jsxs)(Pn,{children:[w,O]}),e[34]=w,e[35]=O,e[36]=k):k=e[36];let A;e[37]!==x||e[38]!==S||e[39]!==k?(A=(0,Q.jsxs)(Dn,{children:[x,S,k]}),e[37]=x,e[38]=S,e[39]=k,e[40]=A):A=e[40];let j;e[41]!==r||e[42]!==A||e[43]!==g?(j=(0,Q.jsx)(Tn,{open:r,onOpenChange:g,children:A}),e[41]=r,e[42]=A,e[43]=g,e[44]=j):j=e[44];let M;return e[45]!==j||e[46]!==h?(M=(0,Q.jsxs)(Q.Fragment,{children:[h,j]}),e[45]=j,e[46]=h,e[47]=M):M=e[47],M}function dr(){return!Ce()}function fr(e){return e.serverConfig===null?`Connect to this environment to change its icon.`:e.serverConfig.environment.capabilities.environmentIcon===!0?e.operateAccess===`granted`?null:`Your session on this environment cannot change its settings.`:`This environment's server is too old to keep an icon. Update it to choose one.`}function pr(e){let t=(0,Z.c)(27),{environmentId:n,serverConfig:r}=e,a=q(n),o=lt(n,`settings:write`)?`granted`:`denied`,s;t[0]!==o||t[1]!==r?(s=fr({serverConfig:r,operateAccess:o}),t[0]=o,t[1]=r,t[2]=s):s=t[2];let c=s,l=r?.environment.platform.machine??`server`,u;t[3]===r?u=t[4]:(u=de(r),t[3]=r,t[4]=u);let d=u,f;t[5]===d?f=t[6]:(f=(0,Q.jsxs)(A,{children:[(0,Q.jsx)(un,{kind:d}),`Icon`]}),t[5]=d,t[6]=f);let p;t[7]===c?p=t[8]:(p=c===null?null:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(E,{disabled:!0,className:`whitespace-normal`,children:c}),(0,Q.jsx)(pe,{})]}),t[7]=c,t[8]=p);let m;t[9]!==l||t[10]!==c||t[11]!==a?(m=e=>{c===null&&me(e)&&a({environmentIcon:e===l?null:e})},t[9]=l,t[10]=c,t[11]=a,t[12]=m):m=t[12];let h;t[13]!==l||t[14]!==c||t[15]!==r?.environment?(h=ae.map(e=>(0,Q.jsx)(i,{value:e,disabled:c!==null,children:(0,Q.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Q.jsx)(un,{kind:e,className:`size-3.5 shrink-0`}),(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:dn[e]}),e===l?(0,Q.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:r?.environment.platform.machine?`detected`:`default`}):null]})},e)),t[13]=l,t[14]=c,t[15]=r?.environment,t[16]=h):h=t[16];let g;t[17]!==d||t[18]!==m||t[19]!==h?(g=(0,Q.jsx)(S,{value:d,onValueChange:m,children:h}),t[17]=d,t[18]=m,t[19]=h,t[20]=g):g=t[20];let _;t[21]!==p||t[22]!==g?(_=(0,Q.jsxs)(te,{children:[p,g]}),t[21]=p,t[22]=g,t[23]=_):_=t[23];let v;return t[24]!==f||t[25]!==_?(v=(0,Q.jsxs)(ue,{children:[f,_]}),t[24]=f,t[25]=_,t[26]=v):v=t[26],v}function mr(e){let t=(0,Z.c)(31),{environment:n,onAddRoute:r}=e,i=Oe(n.entry),a=i.map(gr),[o,s]=(0,$.useState)(null),c=o!==null&&o.length===a.length&&o.some((e,t)=>e!==a[t])?[...o]:a,l=new Map(i.map(hr)),u=c.flatMap(e=>l.get(e)??[]),d=dt(n.environmentId),f;t[0]!==n.connection||t[1]!==d._tag||t[2]!==d.value?(f=d._tag===`Some`&&n.connection.phase===`connected`?V(d.value.target):null,t[0]=n.connection,t[1]=d._tag,t[2]=d.value,t[3]=f):f=t[3];let p=f,m=pt(st.reorderRoutes,`Reorder routes`),h=pt(st.removeRoute,`Remove route`),g;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(g={activationConstraint:{distance:4}},t[4]=g):g=t[4];let _;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(_={coordinateGetter:en},t[5]=_):_=t[5];let v=nn(on(tn,g),on(Qt,_)),y;t[6]!==n.environmentId||t[7]!==h?(y=async e=>{let t=Ae(e);await rt(`Remove ${Te(e)} route?${t===null?``:`\n${t}`}`,{variant:`destructive`})===!0&&await h({environmentId:n.environmentId,routeId:V(e.target)})},t[6]=n.environmentId,t[7]=h,t[8]=y):y=t[8];let b=y,x=e=>{if(e.over===null||e.active.id===e.over.id)return;let t=rn(c,c.indexOf(String(e.active.id)),c.indexOf(String(e.over.id)));s(t),m({environmentId:n.environmentId,routeIds:t}).then(e=>{e._tag===`Failure`&&s(null)})},S=sn,C=ln,w;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(w=[qn,ir],t[9]=w):w=t[9];let T=cn,E=an,D=`Routes to ${n.label}, preferred first`,O=u.map((e,t)=>(0,Q.jsx)(_r,{route:e,position:t+1,inUse:V(e.target)===p,removable:u.length>1&&!B(e),onRemove:()=>void b(e)},V(e.target))),k;t[10]!==O||t[11]!==D?(k=(0,Q.jsx)(`ol`,{"aria-label":D,children:O}),t[10]=O,t[11]=D,t[12]=k):k=t[12];let A;t[13]!==T||t[14]!==c||t[15]!==k||t[16]!==E?(A=(0,Q.jsx)(T,{items:c,strategy:E,children:k}),t[13]=T,t[14]=c,t[15]=k,t[16]=E,t[17]=A):A=t[17];let j;t[18]!==S||t[19]!==x||t[20]!==v||t[21]!==A||t[22]!==C||t[23]!==w?(j=(0,Q.jsx)(S,{sensors:v,collisionDetection:C,modifiers:w,onDragEnd:x,children:A}),t[18]=S,t[19]=x,t[20]=v,t[21]=A,t[22]=C,t[23]=w,t[24]=j):j=t[24];let M;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,Q.jsx)(ye,{className:`size-3`}),t[25]=M):M=t[25];let N;t[26]===r?N=t[27]:(N=(0,Q.jsx)(`div`,{className:`-ml-1.5 pt-1`,children:(0,Q.jsxs)(I,{size:`xs`,variant:`ghost-muted`,onClick:r,children:[M,`Add route`]})}),t[26]=r,t[27]=N);let P;return t[28]!==j||t[29]!==N?(P=(0,Q.jsxs)(`div`,{className:`mt-2 border-t border-border/50 py-2`,children:[j,N]}),t[28]=j,t[29]=N,t[30]=P):P=t[30],P}function hr(e){return[V(e.target),e]}function gr(e){return V(e.target)}function _r(e){let t=(0,Z.c)(43),{route:n,position:r,inUse:i,removable:a,onRemove:o}=e,s;t[0]===n.target?s=t[1]:(s=V(n.target),t[0]=n.target,t[1]=s);let c=s,l;t[2]===n?l=t[3]:(l=Te(n),t[2]=n,t[3]=l);let u=l,d;t[4]===n?d=t[5]:(d=Ae(n),t[4]=n,t[5]=d);let f=d,p;t[6]===c?p=t[7]:(p={id:c},t[6]=c,t[7]=p);let{attributes:m,listeners:h,setNodeRef:g,setActivatorNodeRef:_,transform:v,transition:y,isDragging:b}=Xt(p),x;t[8]===v?x=t[9]:(x=$t.Translate.toString(v),t[8]=v,t[9]=x);let S;t[10]!==x||t[11]!==y?(S={transform:x,transition:y},t[10]=x,t[11]=y,t[12]=S):S=t[12];let C=b&&`relative z-10 rounded-md bg-background shadow-md`,w;t[13]===C?w=t[14]:(w=fe(`flex items-center gap-2 py-2`,C),t[13]=C,t[14]=w);let T;t[15]===i?T=t[16]:(T=i?(0,Q.jsx)(`span`,{className:`rounded-sm bg-success/12 px-1 text-2xs font-normal text-success-foreground`,children:`In use`}):null,t[15]=i,t[16]=T);let E;t[17]!==u||t[18]!==T?(E=(0,Q.jsxs)(`p`,{className:`flex items-center gap-1.5 text-xs font-medium text-foreground`,children:[u,T]}),t[17]=u,t[18]=T,t[19]=E):E=t[19];let D;t[20]!==f||t[21]!==n?(D=f===null?null:(0,Q.jsxs)(`p`,{className:`truncate text-2xs text-muted-foreground`,children:[f,B(n)?` · found automatically`:``]}),t[20]=f,t[21]=n,t[22]=D):D=t[22];let O;t[23]!==E||t[24]!==D?(O=(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[E,D]}),t[23]=E,t[24]=D,t[25]=O):O=t[25];let k=`Reorder ${u}, position ${r}`,A;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Q.jsx)(zn,{className:`size-3.5`}),t[26]=A):A=t[26];let j;t[27]!==m||t[28]!==h||t[29]!==_||t[30]!==k?(j=(0,Q.jsx)(`button`,{type:`button`,ref:_,...m,...h,"aria-label":k,className:`flex size-6 shrink-0 cursor-grab touch-none items-center justify-center rounded text-muted-foreground/70 outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring active:cursor-grabbing`,children:A}),t[27]=m,t[28]=h,t[29]=_,t[30]=k,t[31]=j):j=t[31];let M;t[32]!==u||t[33]!==o||t[34]!==a?(M=a?(0,Q.jsxs)(We,{children:[(0,Q.jsx)(He,{render:(0,Q.jsx)(I,{type:`button`,variant:`ghost-muted`,size:`icon-xs`,"aria-label":`Remove ${u} route`,onClick:o}),children:(0,Q.jsx)(z,{className:`size-3`})}),(0,Q.jsx)(Ue,{side:`top`,children:`Remove route`})]}):null,t[32]=u,t[33]=o,t[34]=a,t[35]=M):M=t[35];let N;return t[36]!==g||t[37]!==O||t[38]!==j||t[39]!==M||t[40]!==S||t[41]!==w?(N=(0,Q.jsxs)(`li`,{ref:g,style:S,className:w,children:[O,j,M]}),t[36]=g,t[37]=O,t[38]=j,t[39]=M,t[40]=S,t[41]=w,t[42]=N):N=t[42],N}function vr(e){let t=e.username?`${e.username}@${e.hostname}`:e.hostname;return e.port?`${t}:${e.port}`:t}function yr(e,t=null){let{entry:n}=e;if(n.target._tag===`PrimaryConnectionTarget`)return`This machine`;let r=Oe(n);if(r.length>1){let e=t===null?void 0:r.find(e=>V(e.target)===V(t));return e===void 0?Te(r[0]):`via ${Te(e)}`}return e.relayManaged?`P4 Connect`:Be(n.target)?`WSL`:n.target._tag===`SshConnectionTarget`&&F(n.profile)&&n.profile.value._tag===`SshConnectionProfile`?`SSH ${vr(n.profile.value.target)}`:e.displayUrl??`Remote link`}function br(e){let t=(0,Z.c)(23),{kind:n,label:r,subtitle:i,below:a,detail:o,dimmed:s,className:c,children:l}=e,u=s!==void 0&&s&&`opacity-60`,d;t[0]!==c||t[1]!==u?(d=fe(`grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-x-3 px-3 py-2.5 sm:px-4`,u,c),t[0]=c,t[1]=u,t[2]=d):d=t[2];let f;t[3]===n?f=t[4]:(f=(0,Q.jsx)(un,{"aria-hidden":!0,kind:n,className:`size-4 text-muted-foreground`}),t[3]=n,t[4]=f);let p;t[5]===r?p=t[6]:(p=(0,Q.jsx)(`p`,{className:`truncate text-sm font-medium text-foreground`,children:r}),t[5]=r,t[6]=p);let m;t[7]===i?m=t[8]:(m=(0,Q.jsx)(`div`,{className:`truncate text-xs text-muted-foreground`,children:i}),t[7]=i,t[8]=m);let h;t[9]!==a||t[10]!==p||t[11]!==m?(h=(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[p,m,a]}),t[9]=a,t[10]=p,t[11]=m,t[12]=h):h=t[12];let g;t[13]===l?g=t[14]:(g=(0,Q.jsx)(`div`,{className:`flex shrink-0 items-center gap-1`,children:l}),t[13]=l,t[14]=g);let _;t[15]===o?_=t[16]:(_=o?(0,Q.jsx)(`div`,{className:`col-span-2 col-start-2 min-w-0`,children:o}):null,t[15]=o,t[16]=_);let v;return t[17]!==d||t[18]!==f||t[19]!==h||t[20]!==g||t[21]!==_?(v=(0,Q.jsxs)(`div`,{className:d,children:[f,h,g,_]}),t[17]=d,t[18]=f,t[19]=h,t[20]=g,t[21]=_,t[22]=v):v=t[22],v}var xr=[{value:100,label:`Prefer`},{value:50,label:`Normal`},{value:25,label:`Less often`},{value:0,label:`Manual only`}];function Sr(e){return e===void 0||e===50?50:e===0?0:e<50?25:100}function Cr(e){return xr.find(t=>t.value===e).label}function wr(e,t){let n=e.flatMap(e=>{let n=Sr(t[e.environmentId]);return n===50?[]:[`${e.label} ${Cr(n).toLowerCase()}`]});return n.length===0?null:n.join(` · `)}function Tr(e){let t=(0,Z.c)(27),{environments:n}=e,r=it(),i=nt(),a=at();if(n.length<2)return null;let o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=Zn(`load-balancing`),t[0]=o):o=t[0];let{id:s,title:c}=o,l;t[1]!==n||t[2]!==r.loadBalancingEnabled||t[3]!==r.loadBalancingWeights?(l=r.loadBalancingEnabled?wr(n,r.loadBalancingWeights):`Off`,t[1]=n,t[2]=r.loadBalancingEnabled,t[3]=r.loadBalancingWeights,t[4]=l):l=t[4];let u=!i,d;t[5]===a?d=t[6]:(d=e=>a({loadBalancingEnabled:e}),t[5]=a,t[6]=d);let f;t[7]!==r.loadBalancingEnabled||t[8]!==u||t[9]!==d?(f=(0,Q.jsx)(Mn,{"aria-label":`Automatically balance load`,checked:r.loadBalancingEnabled,disabled:u,onCheckedChange:d}),t[7]=r.loadBalancingEnabled,t[8]=u,t[9]=d,t[10]=f):f=t[10];let p;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Q.jsx)(`p`,{className:`px-3 py-2.5 text-xs text-muted-foreground sm:px-4`,children:`New threads in shared projects start on the machine with the most free CPU and memory, weighted by each machine's preference.`}),t[11]=p):p=t[11];let m;if(t[12]!==n||t[13]!==r.loadBalancingEnabled||t[14]!==r.loadBalancingWeights||t[15]!==i||t[16]!==a){let e;t[18]!==r.loadBalancingEnabled||t[19]!==r.loadBalancingWeights||t[20]!==i||t[21]!==a?(e=e=>(0,Q.jsx)(br,{kind:de(e.serverConfig),label:e.label,subtitle:yr(e),children:(0,Q.jsxs)(Ye,{items:xr,value:Sr(r.loadBalancingWeights[e.environmentId]),disabled:!i||!r.loadBalancingEnabled,onValueChange:t=>{t!==null&&a({loadBalancingWeights:{...r.loadBalancingWeights,[e.environmentId]:t}})},children:[(0,Q.jsx)(Je,{size:`xs`,className:`w-32`,"aria-label":`${e.label} load preference`,children:(0,Q.jsx)(Ke,{})}),(0,Q.jsx)(qe,{align:`end`,alignItemWithTrigger:!1,children:xr.map(Er)})]})},e.environmentId),t[18]=r.loadBalancingEnabled,t[19]=r.loadBalancingWeights,t[20]=i,t[21]=a,t[22]=e):e=t[22],m=n.map(e),t[12]=n,t[13]=r.loadBalancingEnabled,t[14]=r.loadBalancingWeights,t[15]=i,t[16]=a,t[17]=m}else m=t[17];let h;return t[23]!==l||t[24]!==f||t[25]!==m?(h=(0,Q.jsxs)(ar,{id:s,title:c,summary:l,control:f,children:[p,m]}),t[23]=l,t[24]=f,t[25]=m,t[26]=h):h=t[26],h}function Er(e){let{value:t,label:n}=e;return(0,Q.jsx)(Ge,{value:t,children:n},t)}var Dr=[{value:`off`,label:`Off`},{value:`read`,label:`Read PRs`},{value:`read-write`,label:`Read and act`}],Or={"read-write":`read and act`,read:`read PRs`};function kr(e){let t=[`read-write`,`read`].flatMap(t=>{let n=e.filter(e=>e.permission===t);return n.length===0?[]:[`${n.map(e=>e.label).join(`, `)} ${Or[t]}`]});return t.length===0?null:t.join(` · `)}function Ar(e){let t=(0,Z.c)(19),{environments:n}=e,r=m(st.githubRoutingPermissionsValueAtom),i=m(st.catalogValueAtom),a=pt(st.setGitHubRoutingPermission),[o,s]=(0,$.useState)(!1);if(n.length<2)return null;let c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=Zn(`github-routing`),t[0]=c):c=t[0];let{id:l,title:u}=c,d;t[1]!==n||t[2]!==r?(d=kr(n.map(e=>({label:e.label,permission:Ee(e.entry,r)})))??`Off`,t[1]=n,t[2]=r,t[3]=d):d=t[3];let f;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Q.jsx)(`p`,{className:`px-3 py-2.5 text-xs text-muted-foreground sm:px-4`,children:`Machines you trust here can read PR data through each other's GitHub access. Enable both machines. Read and act may use broader permissions than the machine that owns them. This applies only to this device.`}),t[4]=f):f=t[4];let p;if(t[5]!==i||t[6]!==n||t[7]!==r||t[8]!==o||t[9]!==a){let e;t[11]!==i||t[12]!==r||t[13]!==o||t[14]!==a?(e=e=>(0,Q.jsx)(br,{kind:de(e.serverConfig),label:e.label,subtitle:yr(e),children:(0,Q.jsxs)(Ye,{items:Dr,value:Ee(e.entry,r),disabled:!i.isReady||o||Me(e.entry)===null,onValueChange:t=>{t!==null&&(s(!0),a({environmentId:e.environmentId,permission:t}).then(e=>{s(!1),e._tag===`Failure`&&K.add({type:`error`,title:`Could not save GitHub routing permission`})}))},children:[(0,Q.jsx)(Je,{size:`xs`,className:`w-32`,"aria-label":`${e.label} GitHub routing`,children:(0,Q.jsx)(Ke,{})}),(0,Q.jsx)(qe,{align:`end`,alignItemWithTrigger:!1,children:Dr.map(jr)})]})},e.environmentId),t[11]=i,t[12]=r,t[13]=o,t[14]=a,t[15]=e):e=t[15],p=n.map(e),t[5]=i,t[6]=n,t[7]=r,t[8]=o,t[9]=a,t[10]=p}else p=t[10];let h;return t[16]!==d||t[17]!==p?(h=(0,Q.jsxs)(ar,{id:l,title:u,summary:d,children:[f,p]}),t[16]=d,t[17]=p,t[18]=h):h=t[18],h}function jr(e){let{value:t,label:n}=e;return(0,Q.jsx)(Ge,{value:t,children:n},t)}function Mr(e){let t=(0,Z.c)(26),{environmentLabel:n,onCancel:r,onConfirm:i}=e,a=It(),[o,s]=(0,$.useState)(n);n!==null&&n!==o&&s(n);let c=a.open,l=n!==null,u;t[0]===r?u=t[1]:(u=e=>{e||r()},t[0]=r,t[1]=u);let d;t[2]===o?d=t[3]:(d=(0,Q.jsxs)(kn,{children:[`Remove `,o,` from this device?`]}),t[2]=o,t[3]=d);let f;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Q.jsx)(Nn,{children:`This forgets its pairing, credentials, and cached threads here.`}),t[4]=f):f=t[4];let p;t[5]!==r||t[6]!==c?(p=c?(0,Q.jsx)(M,{onClick:()=>{r(),c()},children:`P4 Connect settings`}):`P4 Connect settings`,t[5]=r,t[6]=c,t[7]=p):p=t[7];let m;t[8]===p?m=t[9]:(m=(0,Q.jsxs)(Nn,{children:[`It stays on your P4 Connect account and keeps its host space. Deregister it in`,` `,p,` `,`to free it.`]}),t[8]=p,t[9]=m);let h;t[10]!==d||t[11]!==m?(h=(0,Q.jsxs)(In,{children:[d,f,m]}),t[10]=d,t[11]=m,t[12]=h):h=t[12];let g;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Q.jsx)(Qn,{render:(0,Q.jsx)(I,{variant:`outline`}),children:`Cancel`}),t[13]=g):g=t[13];let _;t[14]===i?_=t[15]:(_=(0,Q.jsxs)(Pn,{children:[g,(0,Q.jsx)(I,{variant:`destructive`,onClick:i,children:`Remove from this device`})]}),t[14]=i,t[15]=_);let v;t[16]!==h||t[17]!==_?(v=(0,Q.jsxs)(Dn,{children:[h,_]}),t[16]=h,t[17]=_,t[18]=v):v=t[18];let y;t[19]!==l||t[20]!==v||t[21]!==u?(y=(0,Q.jsx)(Tn,{open:l,onOpenChange:u,children:v}),t[19]=l,t[20]=v,t[21]=u,t[22]=y):y=t[22];let b;return t[23]!==a.portals||t[24]!==y?(b=(0,Q.jsxs)(Q.Fragment,{children:[y,a.portals]}),t[23]=a.portals,t[24]=y,t[25]=b):b=t[25],b}var Nr={pairingLinks:[],clientSessions:[]};function Pr(e,t,n){let r=n(t);return[...e.filter(e=>n(e)!==r),t]}function Fr(e,t){switch(t.type){case`snapshot`:return t.payload;case`pairingLinkUpserted`:return{...e,pairingLinks:Pr(e.pairingLinks,t.payload,e=>e.id)};case`pairingLinkRemoved`:return{...e,pairingLinks:e.pairingLinks.filter(e=>e.id!==t.payload.id)};case`clientUpserted`:return{...e,clientSessions:Pr(e.clientSessions,t.payload,e=>e.sessionId)};case`clientRemoved`:return{...e,clientSessions:e.clientSessions.filter(e=>e.sessionId!==t.payload.sessionId)}}}function Ir(e,t){let n=Fr(e,t);return[n,[{version:1,revision:t.revision,type:`snapshot`,payload:n}]]}function Lr(e){return{accessChanges:ke(e,{label:`environment-data:server:auth-access-changes`,subscribe:e=>H(ie.subscribeAuthAccess,{}).pipe(le(()=>Nr,Ir))})}}var Rr=Lr(G),zr=3e4,Br=class extends j()(`DesktopNetworkAccessUnavailableError`,{}){get message(){return`Desktop network access is unavailable.`}},Vr=class extends j()(`DesktopServerExposureStateLoadError`,{cause:d()}){get message(){return`Failed to load desktop server exposure state.`}},Hr=class extends j()(`DesktopAdvertisedEndpointsLoadError`,{cause:d()}){get message(){return`Failed to load advertised desktop endpoints.`}};function Ur(){return typeof window>`u`?void 0:window.desktopBridge}function Wr(e){let t=r(`loadDesktopNetworkAccess`)(function*(){let t=e();if(!t)return yield*new Br;let[n,r]=yield*ge([k({try:()=>t.getServerExposureState(),catch:e=>new Vr({cause:e})}),k({try:()=>t.getAdvertisedEndpoints(),catch:e=>new Hr({cause:e})})],{concurrency:`unbounded`});return{advertisedEndpoints:r,serverExposureState:n}});return g(t()).pipe(O({staleTime:zr,revalidateOnMount:!0}),p,P(`desktop:network-access`))}var Gr=Wr(Ur);function Kr(){w.refresh(Gr)}function qr(e,t){let n=t.trim().toLowerCase();if(n.length===0)return e;let r=[],i=[];for(let t of e){let e=t.alias.toLowerCase();e.startsWith(n)?r.push(t):e.includes(n)&&i.push(t)}return[...r,...i]}var Jr=class extends j()(`DesktopSshDiscoveryUnavailableError`,{}){get message(){return`Desktop SSH host discovery is unavailable.`}},Yr=class extends j()(`DesktopSshDiscoveryError`,{cause:d()}){get message(){return`Failed to discover SSH hosts.`}};function Xr(){return typeof window>`u`?void 0:window.desktopBridge}function Zr(e){let t=r(`discoverDesktopSshHosts`)(function*(){let t=e();return t?yield*k({try:()=>t.discoverSshHosts(),catch:e=>new Yr({cause:e})}):yield*new Jr});return g(t()).pipe(O({staleTime:3e4,revalidateOnMount:!0}),p,P(`desktop:ssh-hosts`))}var Qr=Zr(Xr),$r=443,ei=[],ti=[],ni=`backend:default-wsl`,ri=`backend:wsl-off`,ii=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`});function ai(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:ii.format(t)}function oi(e){let t=(0,Z.c)(13),{scopes:n,label:r}=e,i=`${n.length} ${n.length===1?`scope`:`scopes`}`,a=`${r}: show ${i}`,o;t[0]===a?o=t[1]:(o=(0,Q.jsx)(`button`,{type:`button`,"aria-label":a,className:`cursor-help underline decoration-border underline-offset-2 outline-hidden hover:text-foreground focus-visible:text-foreground`}),t[0]=a,t[1]=o);let s;t[2]!==i||t[3]!==o?(s=(0,Q.jsx)(Jt,{openOnHover:!0,delay:250,closeDelay:100,render:o,children:i}),t[2]=i,t[3]=o,t[4]=s):s=t[4];let c;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Q.jsx)(`p`,{className:`mb-1 font-medium`,children:`Granted scopes`}),t[5]=c):c=t[5];let l;t[6]===n?l=t[7]:(l=n.map(si),t[6]=n,t[7]=l);let u;t[8]===l?u=t[9]:(u=(0,Q.jsxs)(qt,{side:`top`,align:`start`,tooltipStyle:!0,className:`w-max max-w-80 whitespace-normal`,children:[c,(0,Q.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:l})]}),t[8]=l,t[9]=u);let d;return t[10]!==s||t[11]!==u?(d=(0,Q.jsxs)(Yt,{children:[s,u]}),t[10]=s,t[11]=u,t[12]=d):d=t[12],d}function si(e){return(0,Q.jsx)(`code`,{className:`font-mono text-foreground/85`,children:e},e)}function ci(e){let t=e.host.trim();if(t.length===0)throw Error(`SSH host or alias is required.`);let n=t,r=e.username.trim()||null,i=null,a=n.lastIndexOf(`@`);if(a>0){let e=n.slice(0,a).trim();n=n.slice(a+1).trim(),!r&&e.length>0&&(r=e)}let o=/^\[([^\]]+)\](?::(\d+))?$/u.exec(n);if(o)n=o[1].trim(),o[2]&&(i=Number.parseInt(o[2],10));else{let e=n.split(`:`);e.length===2&&/^\d+$/u.test(e[1]??``)&&(n=e[0].trim(),i=Number.parseInt(e[1],10))}let s=e.port.trim();if(s.length>0&&(i=Number.parseInt(s,10)),n.length===0)throw Error(`SSH host or alias is required.`);if(i!==null&&(!Number.isInteger(i)||i<=0||i>65535))throw Error(`SSH port must be between 1 and 65535.`);return{alias:n,hostname:n,username:r,port:i}}function li(e){let t=e.trim();if(!t)return null;try{let e=/^[a-zA-Z][a-zA-Z\d+.-]*:\/\//u.test(t)||t.startsWith(`//`)?t:`https://${t}`,n=new URL(e,window.location.origin),r=U(n);if(r)return{host:r.host,pairingCode:r.token};let i=ze(n);return i?{host:n.origin,pairingCode:i}:null}catch{return null}}function ui(e){let t=li(e.host);if(t)return t;let n=e.host.trim(),r=e.pairingCode.trim();if(!n)throw Error(`Enter a backend host.`);if(!r)throw Error(`Enter a pairing code.`);return{host:n,pairingCode:r}}function di(e){let t=`Failed to connect SSH host.`;return(e instanceof Error?e.message:t).replace(/^Error invoking remote method 'desktop:ensure-ssh-environment':\s*/u,``).replace(/^Ssh[A-Za-z]+Error:\s*/u,``).trim()||t}var fi=`first:rounded-t-xl last:rounded-b-xl px-3 py-2.5 sm:px-4`;function pi(e){return Xn}function mi(e,t){return e===`endpoint-rail`?fe(`relative first:rounded-t-xl last:rounded-b-xl px-3 py-3 sm:px-4`,!t&&`bg-muted/15`):fe(fi,!t&&`bg-muted/24`)}function hi(e){return[...e].toSorted((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime())}function gi(e,t){return[`${e.length} ${e.length===1?`client`:`clients`}`,t.length>0?`${t.length} ${t.length===1?`pairing link`:`pairing links`}`:null].filter(e=>e!==null).join(` · `)}function _i(e){return[...e].toSorted((e,t)=>e.current===t.current?e.connected===t.connected?new Date(t.issuedAt).getTime()-new Date(e.issuedAt).getTime():e.connected?-1:1:e.current?-1:1)}function vi(e){return{...e,scopes:e.permissions??e.scopes,createdAt:N(e.createdAt),expiresAt:N(e.expiresAt)}}function yi(e){return{...e,scopes:e.permissions??e.scopes,issuedAt:N(e.issuedAt),expiresAt:N(e.expiresAt),lastConnectedAt:e.lastConnectedAt===null?null:N(e.lastConnectedAt)}}function bi(e,t){let n=e.filter(e=>e.status!==`unavailable`);if(t){let e=n.find(e=>Si(e)===t);if(e)return e}return n.find(e=>e.isDefault)??n.find(e=>e.reachability!==`loopback`)??n.find(e=>e.compatibility.hostedHttpsApp===`compatible`)??null}function xi(e){return e.id.startsWith(`tailscale-magicdns:`)}function Si(e){if(e.id.startsWith(`desktop-loopback:`))return`desktop-core:loopback:http`;if(e.id.startsWith(`desktop-lan:`))return`desktop-core:lan:http`;if(e.id.startsWith(`tailscale-ip:`))return`tailscale:ip:http`;if(xi(e))return`tailscale:magicdns:https`;let t=`unknown`;try{t=new URL(e.httpBaseUrl).protocol.replace(/:$/u,``)}catch{}return`${e.provider.id}:${e.reachability}:${t}:${e.label}`}function Ci(e,t){return e.compatibility.hostedHttpsApp===`compatible`?lr(e.httpBaseUrl,t)??cr(e.httpBaseUrl,t):cr(e.httpBaseUrl,t)}function wi(e){let t=new URL(`/pair`,window.location.href);return W(t,e).toString()}function Ti(e){try{let t=new URL(e);return t.pathname===`/pair`&&t.searchParams.has(`host`)}catch{return!1}}function Ei(e,t){if(Ti(t))return`Opens the hosted app, no install needed`;switch(e.reachability){case`lan`:return`Devices on the same network`;case`private-network`:return`Devices on your private network`;case`public`:return`Reachable from anywhere`;case`loopback`:return`Clients on this machine`}}var Di=(0,$.memo)(function(e){let t=(0,Z.c)(131),{pairingLink:n,credential:r,endpointUrl:i,endpoints:a,defaultEndpointKey:o,presentation:s,revokingPairingLinkId:c,onRevoke:l,canRevoke:u}=e,d=s===void 0?`current`:s,f=_n(1e3),p=new Date(n.expiresAt).getTime(),[m,h]=(0,$.useState)(!1),[g,_]=(0,$.useState)(!1),[v,y]=(0,$.useState)(null),b=(0,$.useId)(),x;t[0]===r?x=t[1]:(x=r?wi(r):null,t[0]=r,t[1]=x);let S=x,C;t[2]!==r||t[3]!==i?(C=r&&i!=null&&i!==``?lr(i,r):null,t[2]=r,t[3]=i,t[4]=C):C=t[4];let w=C,T;if(t[5]!==r||t[6]!==o||t[7]!==a){let e=bi(a,o);T=e&&r?Ci(e,r):null,t[5]=r,t[6]=o,t[7]=a,t[8]=T}else T=t[8];let E=T,D;if(t[9]!==r||t[10]!==a){bb0:{let e=[];if(!r){D=e;break bb0}for(let t of a){if(t.status===`unavailable`)continue;let n=Ci(t,r);e.push({id:t.id,preferenceKey:Si(t),label:t.label,url:n,detail:Ei(t,n),qrShareable:rr(t)})}D=e}t[9]=r,t[10]=a,t[11]=D}else D=t[11];let O=D,k;t[12]!==r||t[13]!==S||t[14]!==E||t[15]!==i||t[16]!==w?(k=E??(r&&i!=null&&i!==``?w??cr(i,r):Pe(window.location.hostname)?null:S),t[12]=r,t[13]=S,t[14]=E,t[15]=i,t[16]=w,t[17]=k):k=t[17];let A=k,[j,M]=(0,$.useState)(null),N=j??A??r??``,P=N!==r,ee=P&&Ti(N),te=O.find(e=>e.url===N)?.qrShareable??!0,ne=typeof window<`u`&&window.isSecureContext&&navigator.clipboard?.writeText!=null,re;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(re={onCopy:Yi,onError:(e,t)=>{let{value:n,kind:r}=t;M(n),h(!0),K.add(Y({type:`error`,title:ne?r===`hosted-link`?`Could not copy hosted app link`:r===`link`?`Could not copy pairing URL`:`Could not copy pairing code`:`Clipboard copy unavailable`,description:ne?e.message:`Showing the full value instead.`}))}},t[18]=re):re=t[18];let{copyToClipboard:ie}=Ze(re),ae;t[19]===ie?ae=t[20]:(ae=(e,t)=>{ie(e,{value:e,kind:t})},t[19]=ie,t[20]=ae);let oe=ae,se=Xi,ce;t[21]!==oe||t[22]!==r?(ce=()=>{r&&oe(r,`code`)},t[21]=oe,t[22]=r,t[23]=ce):ce=t[23];let le=ce,ue;t[24]===n.expiresAt?ue=t[25]:(ue=ai(n.expiresAt),t[24]=n.expiresAt,t[25]=ue);let F=ue,de=n.label??`Pairing link`,pe;t[26]!==o||t[27]!==O||t[28]!==v?(pe=Un(O,v,o),t[26]=o,t[27]=O,t[28]=v,t[29]=pe):pe=t[29];let me=pe,L=me?.url??A,he=me?.qrShareable??!0;if(p<=f)return null;let ge;t[30]===d?ge=t[31]:(ge=pi(d),t[30]=d,t[31]=ge);let R;t[32]===n.createdAt?R=t[33]:(R=ai(n.createdAt),t[32]=n.createdAt,t[33]=R);let _e=`Link created at ${R}`,ve;t[34]===_e?ve=t[35]:(ve=(0,Q.jsx)(vn,{tooltipText:_e,dotClassName:`bg-warning`}),t[34]=_e,t[35]=ve);let ye;t[36]===de?ye=t[37]:(ye=(0,Q.jsx)(`h3`,{className:`text-sm font-medium text-foreground`,children:de}),t[36]=de,t[37]=ye);let xe;t[38]!==ve||t[39]!==ye?(xe=(0,Q.jsxs)(`div`,{className:`flex min-h-5 items-center gap-1.5`,children:[ve,ye]}),t[38]=ve,t[39]=ye,t[40]=xe):xe=t[40];let Se;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,Q.jsx)(`span`,{}),t[41]=Se):Se=t[41];let z;t[42]!==f||t[43]!==n.expiresAt?(z=mt(n.expiresAt,f),t[42]=f,t[43]=n.expiresAt,t[44]=z):z=t[44];let B;t[45]===z?B=t[46]:(B=(0,Q.jsx)(He,{render:Se,children:z}),t[45]=z,t[46]=B);let Ce;t[47]===F?Ce=t[48]:(Ce=(0,Q.jsx)(Ue,{side:`top`,children:F}),t[47]=F,t[48]=Ce);let we;t[49]!==B||t[50]!==Ce?(we=(0,Q.jsxs)(We,{children:[B,Ce]}),t[49]=B,t[50]=Ce,t[51]=we):we=t[51];let Te;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,Q.jsx)(`span`,{"aria-hidden":!0,children:` · `}),t[52]=Te):Te=t[52];let V;t[53]===n.scopes?V=t[54]:(V=(0,Q.jsx)(oi,{scopes:n.scopes,label:`Pairing link scopes`}),t[53]=n.scopes,t[54]=V);let Ee;t[55]!==we||t[56]!==V?(Ee=(0,Q.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[we,Te,V]}),t[55]=we,t[56]=V,t[57]=Ee):Ee=t[57];let De;t[58]!==r||t[59]!==A?(De=r?A===null?(0,Q.jsx)(`p`,{className:`text-2xs text-muted-foreground/70`,children:`Copy the token and pair from another client using this backend's reachable host.`}):null:(0,Q.jsx)(`p`,{className:`text-2xs text-muted-foreground/70`,children:`Create a new link to share from this client.`}),t[58]=r,t[59]=A,t[60]=De):De=t[60];let Oe;t[61]!==xe||t[62]!==Ee||t[63]!==De?(Oe=(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[xe,Ee,De]}),t[61]=xe,t[62]=Ee,t[63]=De,t[64]=Oe):Oe=t[64];let ke;t[65]!==g||t[66]!==b||t[67]!==A?(ke=A&&ne?(0,Q.jsxs)(I,{size:`xs`,variant:`outline`,"aria-expanded":g,"aria-controls":b,onClick:()=>_(Zi),children:[(0,Q.jsx)(be,{"aria-hidden":!0}),`Share`]}):null,t[65]=g,t[66]=b,t[67]=A,t[68]=ke):ke=t[68];let Ae=r!==void 0&&m,je;t[69]===Symbol.for(`react.memo_cache_sentinel`)?(je=e=>{h(e),e||M(null)},t[69]=je):je=t[69];let Me;t[70]!==r||t[71]!==le||t[72]!==A?(Me=r?ne?A?null:(0,Q.jsx)(I,{size:`xs`,variant:`outline`,onClick:le,children:`Copy code`}):(0,Q.jsx)(At,{render:(0,Q.jsx)(I,{size:`xs`,variant:`outline`}),children:A?`Show link`:`Show code`}):null,t[70]=r,t[71]=le,t[72]=A,t[73]=Me):Me=t[73];let Ne=P?ee?`Hosted app pairing link`:`Pairing link`:`Pairing code`,H;t[74]===Ne?H=t[75]:(H=(0,Q.jsx)(Ot,{children:Ne}),t[74]=Ne,t[75]=H);let Fe=P?ee?`Clipboard copy is unavailable here. Open or manually copy this hosted app link on the device you want to connect.`:`Clipboard copy is unavailable here. Open or manually copy this full pairing URL on the device you want to connect.`:`Clipboard copy is unavailable here. Manually copy this code into another client.`,U;t[76]===Fe?U=t[77]:(U=(0,Q.jsx)(Nt,{children:Fe}),t[76]=Fe,t[77]=U);let W;t[78]!==H||t[79]!==U?(W=(0,Q.jsxs)(Dt,{children:[H,U]}),t[78]=H,t[79]=U,t[80]=W):W=t[80];let Ie=P?4:3,Le;t[81]!==N||t[82]!==Ie?(Le=(0,Q.jsx)(_t,{readOnly:!0,value:N,rows:Ie,onFocus:Qi,onClick:$i}),t[81]=N,t[82]=Ie,t[83]=Le):Le=t[83];let Re;t[84]!==te||t[85]!==P||t[86]!==N?(Re=P&&te?(0,Q.jsx)(`div`,{className:`flex justify-center rounded-xl border border-border/60 bg-muted/30 p-4`,children:(0,Q.jsx)(Bn,{value:N,size:132,level:`M`,marginSize:2,title:`Pairing link — scan to open on another device`})}):null,t[84]=te,t[85]=P,t[86]=N,t[87]=Re):Re=t[87];let ze;t[88]!==Le||t[89]!==Re?(ze=(0,Q.jsxs)(Mt,{children:[Le,Re]}),t[88]=Le,t[89]=Re,t[90]=ze):ze=t[90];let Be;t[91]===Symbol.for(`react.memo_cache_sentinel`)?(Be=(0,Q.jsx)(I,{variant:`outline`,onClick:()=>h(!1),children:`Done`}),t[91]=Be):Be=t[91];let Ve;t[92]===le?Ve=t[93]:(Ve=ne?(0,Q.jsx)(I,{variant:`outline`,onClick:le,children:`Copy code`}):null,t[92]=le,t[93]=Ve);let G;t[94]===Ve?G=t[95]:(G=(0,Q.jsxs)(kt,{variant:`bare`,children:[Be,Ve]}),t[94]=Ve,t[95]=G);let Ge;t[96]!==W||t[97]!==ze||t[98]!==G?(Ge=(0,Q.jsxs)(Pt,{className:`max-w-md`,children:[W,ze,G]}),t[96]=W,t[97]=ze,t[98]=G,t[99]=Ge):Ge=t[99];let Ke;t[100]!==Ae||t[101]!==Me||t[102]!==Ge?(Ke=(0,Q.jsxs)(Ft,{open:Ae,onOpenChange:je,children:[Me,Ge]}),t[100]=Ae,t[101]=Me,t[102]=Ge,t[103]=Ke):Ke=t[103];let qe=!u||c===n.id,Je;t[104]!==l||t[105]!==n.id?(Je=()=>void l(n.id),t[104]=l,t[105]=n.id,t[106]=Je):Je=t[106];let Ye=c===n.id?`Revoking…`:`Revoke`,Xe;t[107]!==qe||t[108]!==Je||t[109]!==Ye?(Xe=(0,Q.jsx)(I,{size:`xs`,variant:`destructive-outline`,disabled:qe,onClick:Je,children:Ye}),t[107]=qe,t[108]=Je,t[109]=Ye,t[110]=Xe):Xe=t[110];let Qe;t[111]!==ke||t[112]!==Ke||t[113]!==Xe?(Qe=(0,Q.jsxs)(`div`,{className:`flex w-full shrink-0 items-center gap-2 sm:w-auto sm:justify-end`,children:[ke,Ke,Xe]}),t[111]=ke,t[112]=Ke,t[113]=Xe,t[114]=Qe):Qe=t[114];let $e;t[115]!==Oe||t[116]!==Qe?($e=(0,Q.jsxs)(`div`,{className:Kn,children:[Oe,Qe]}),t[115]=Oe,t[116]=Qe,t[117]=$e):$e=t[117];let et;t[118]!==he||t[119]!==oe||t[120]!==O||t[121]!==le||t[122]!==g||t[123]!==L||t[124]!==b||t[125]!==me?.id?(et=g&&L!==null?(0,Q.jsxs)(`div`,{id:b,className:`mt-3 flex flex-col gap-4 border-t border-border/50 pt-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-3`,children:[O.length>1?(0,Q.jsxs)(`div`,{className:`space-y-1.5`,role:`radiogroup`,"aria-label":`Endpoint the pairing QR code and URL use`,children:[(0,Q.jsx)(`p`,{className:`text-2xs text-muted-foreground/70`,children:`Reach this machine via`}),O.map(e=>{let t=e.id===me?.id;return(0,Q.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":t,className:fe(`flex w-full items-baseline gap-2 rounded-lg border px-2.5 py-1.5 text-left outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,t?`border-foreground/60 bg-muted/30`:`border-border/50 hover:bg-muted/20`),onClick:()=>y(e.id),children:[(0,Q.jsx)(`span`,{className:fe(`text-xs font-medium`,t?`text-foreground`:`text-muted-foreground`),children:e.label}),(0,Q.jsx)(`span`,{className:`min-w-0 truncate text-2xs text-muted-foreground/70`,children:e.detail})]},e.id)})]}):null,(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-border/60 bg-muted/30 px-2.5 py-1.5`,children:[(0,Q.jsxs)(We,{children:[(0,Q.jsx)(He,{render:(0,Q.jsx)(`code`,{className:`min-w-0 flex-1 truncate font-mono text-2xs text-muted-foreground`,children:L})}),(0,Q.jsx)(Ue,{side:`top`,children:L})]}),(0,Q.jsx)(I,{size:`xs`,variant:`ghost`,className:`shrink-0`,onClick:()=>oe(L,se(L)),children:`Copy link`})]}),(0,Q.jsx)(I,{size:`xs`,variant:`ghost`,onClick:le,children:`Copy code only`})]}),he?(0,Q.jsx)(`div`,{className:`w-fit shrink-0 self-center rounded-xl bg-white p-3 sm:self-start`,children:(0,Q.jsx)(Bn,{value:L,size:168,level:`M`,marginSize:1,title:`Pairing link — scan to open on another device`})}):(0,Q.jsx)(`div`,{className:`flex size-[192px] shrink-0 items-center justify-center self-center rounded-xl border border-border/50 p-4 sm:self-start`,children:(0,Q.jsx)(`p`,{className:`text-center text-2xs text-muted-foreground/70`,children:`No QR for this endpoint. Another device scanning a loopback link would dial itself; copy the URL for use on this machine instead.`})})]}):null,t[118]=he,t[119]=oe,t[120]=O,t[121]=le,t[122]=g,t[123]=L,t[124]=b,t[125]=me?.id,t[126]=et):et=t[126];let tt;return t[127]!==ge||t[128]!==$e||t[129]!==et?(tt=(0,Q.jsxs)(`div`,{className:ge,children:[$e,et]}),t[127]=ge,t[128]=$e,t[129]=et,t[130]=tt):tt=t[130],tt}),Oi=(0,$.memo)(function(e){let t=(0,Z.c)(54),{clientSession:n,presentation:r,revokingClientSessionId:i,onRevokeSession:a,canRevoke:o}=e,s=r===void 0?`current`:r,c=_n(1e3),l=n.current||n.connected,u=n.lastConnectedAt,d;t[0]!==l||t[1]!==u||t[2]!==c?(d=l?u?`Connected for ${ht(u,c)}`:`Connected`:u?`Last connected at ${ai(u)}`:`Not connected yet.`,t[0]=l,t[1]=u,t[2]=c,t[3]=d):d=t[3];let f=d,p;t[4]===n.client.deviceType?p=t[5]:(p=n.client.deviceType===`unknown`?null:n.client.deviceType[0]?.toUpperCase()+n.client.deviceType.slice(1),t[4]=n.client.deviceType,t[5]=p);let m=n.client.os??null,h=n.client.browser??null,g=n.client.ipAddress??null,_;t[6]!==p||t[7]!==m||t[8]!==h||t[9]!==g?(_=[p,m,h,g].filter(ea),t[6]=p,t[7]=m,t[8]=h,t[9]=g,t[10]=_):_=t[10];let v=_,y;t[11]!==n.client.browser||t[12]!==n.client.label||t[13]!==n.client.os||t[14]!==n.subject?(y=n.client.label??([n.client.os,n.client.browser].filter(Boolean).join(` · `)||n.subject),t[11]=n.client.browser,t[12]=n.client.label,t[13]=n.client.os,t[14]=n.subject,t[15]=y):y=t[15];let b=y,x;t[16]===s?x=t[17]:(x=pi(s),t[16]=s,t[17]=x);let S=l?`bg-success`:`bg-muted-foreground/30`,C=l?`bg-success/60 duration-2000`:null,w;t[18]!==f||t[19]!==S||t[20]!==C?(w=(0,Q.jsx)(vn,{tooltipText:f,dotClassName:S,pingClassName:C}),t[18]=f,t[19]=S,t[20]=C,t[21]=w):w=t[21];let T;t[22]===b?T=t[23]:(T=(0,Q.jsx)(`h3`,{className:`text-sm font-medium text-foreground`,children:b}),t[22]=b,t[23]=T);let E;t[24]===n.current?E=t[25]:(E=n.current?(0,Q.jsx)(`span`,{className:`text-3xs text-muted-foreground/80 rounded-md border border-border/50 bg-muted/50 px-1 py-0.5`,children:`This device`}):null,t[24]=n.current,t[25]=E);let D;t[26]!==w||t[27]!==T||t[28]!==E?(D=(0,Q.jsxs)(`div`,{className:`flex min-h-5 items-center gap-1.5`,children:[w,T,E]}),t[26]=w,t[27]=T,t[28]=E,t[29]=D):D=t[29];let O;t[30]===v?O=t[31]:(O=v.length>0?(0,Q.jsxs)(Q.Fragment,{children:[v.join(` · `),(0,Q.jsx)(`span`,{"aria-hidden":!0,children:` · `})]}):null,t[30]=v,t[31]=O);let k;t[32]===n.scopes?k=t[33]:(k=(0,Q.jsx)(oi,{scopes:n.scopes,label:`Client scopes`}),t[32]=n.scopes,t[33]=k);let A;t[34]!==O||t[35]!==k?(A=(0,Q.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[O,k]}),t[34]=O,t[35]=k,t[36]=A):A=t[36];let j;t[37]!==D||t[38]!==A?(j=(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[D,A]}),t[37]=D,t[38]=A,t[39]=j):j=t[39];let M;t[40]!==o||t[41]!==n.current||t[42]!==n.sessionId||t[43]!==a||t[44]!==i?(M=n.current?null:(0,Q.jsx)(I,{size:`xs`,variant:`destructive-outline`,disabled:!o||i===n.sessionId,onClick:()=>void a(n.sessionId),children:i===n.sessionId?`Revoking…`:`Revoke`}),t[40]=o,t[41]=n.current,t[42]=n.sessionId,t[43]=a,t[44]=i,t[45]=M):M=t[45];let N;t[46]===M?N=t[47]:(N=(0,Q.jsx)(`div`,{className:`flex w-full shrink-0 items-center gap-2 sm:w-auto sm:justify-end`,children:M}),t[46]=M,t[47]=N);let P;t[48]!==j||t[49]!==N?(P=(0,Q.jsxs)(`div`,{className:Kn,children:[j,N]}),t[48]=j,t[49]=N,t[50]=P):P=t[50];let ee;return t[51]!==P||t[52]!==x?(ee=(0,Q.jsx)(`div`,{className:x,children:P}),t[51]=P,t[52]=x,t[53]=ee):ee=t[53],ee}),ki=(0,$.memo)(function({onPairingLinkCreated:e,clientSessions:t,isRevokingOtherClients:n,onRevokeOtherClients:r,delegatableScopes:i}){let a=tt(),[o,c]=(0,$.useState)(!1),[l,u]=(0,$.useState)(``),[d,f]=(0,$.useState)([...R]),p=d.filter(e=>i.includes(e)),[m,h]=(0,$.useState)(!1),g=(0,$.useCallback)(async()=>{if(a!==null&&p.length!==0&&ut(a,`access:write`)&&p.every(e=>ut(a,e))){h(!0);try{e(await X({label:l,scopes:p})),u(``),f(R.filter(e=>i.includes(e))),c(!1)}catch(e){let t=e instanceof Error?e.message:`Failed to create pairing URL.`;K.add(Y({type:`error`,title:`Could not create pairing URL`,description:t}))}finally{h(!1)}}},[i,e,l,a,p]),_=(0,$.useCallback)((e,t)=>{f(n=>Hn(n,e,t))},[]);return(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(I,{size:`xs`,variant:`destructive-outline`,disabled:n||!jn(t),onClick:()=>void r(),children:n?`Revoking…`:`Revoke others`}),(0,Q.jsxs)(Ft,{open:o,onOpenChange:e=>{c(e),e||(u(``),f(R.filter(e=>i.includes(e))))},children:[(0,Q.jsx)(At,{render:(0,Q.jsxs)(I,{size:`xs`,variant:`default`,children:[(0,Q.jsx)(ye,{className:`size-3`}),`Create link`]})}),(0,Q.jsxs)(Pt,{className:`max-w-md`,children:[(0,Q.jsxs)(Dt,{children:[(0,Q.jsx)(Ot,{children:`Create pairing link`}),(0,Q.jsx)(Nt,{children:`Generate a one-time link that another device can use to pair with this backend as an authorized client.`})]}),(0,Q.jsxs)(Mt,{children:[(0,Q.jsxs)(`label`,{className:`block`,children:[(0,Q.jsx)(`span`,{className:`mb-1.5 block text-xs font-medium text-foreground`,children:`Client label (optional)`}),(0,Q.jsx)(Tt,{value:l,onChange:e=>u(e.target.value),placeholder:`e.g. Living room iPad`,disabled:m,autoFocus:!0})]}),(0,Q.jsxs)(`section`,{className:`space-y-3`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`h3`,{className:`text-xs font-medium text-foreground`,children:`Permissions`}),(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Limit what the paired client can do.`})]}),(0,Q.jsxs)(`div`,{className:`flex gap-1`,children:[(0,Q.jsx)(I,{size:`xs`,variant:`outline`,disabled:m,onClick:()=>f([v,s,L,T].filter(e=>i.includes(e))),children:`Read only`}),(0,Q.jsx)(I,{size:`xs`,variant:`outline`,disabled:m,onClick:()=>f(R.filter(e=>i.includes(e))),children:`Standard`})]})]}),(0,Q.jsx)(`div`,{className:`divide-y divide-border/60 rounded-lg border border-input bg-muted/25`,children:or.filter(({scope:e})=>i.includes(e)).map(({scope:e,title:t,description:n})=>(0,Q.jsxs)(`label`,{className:`flex cursor-pointer items-start gap-3 px-3 py-2.5 transition-colors hover:bg-muted/40`,children:[(0,Q.jsx)(gt,{className:`mt-0.5`,checked:d.includes(e),disabled:m,onCheckedChange:t=>_(e,t===!0)}),(0,Q.jsxs)(`span`,{className:`min-w-0`,children:[(0,Q.jsx)(`span`,{className:`block text-xs font-medium text-foreground`,children:t}),(0,Q.jsx)(`span`,{className:`block text-xs leading-snug text-muted-foreground`,children:n})]})]},e))}),p.length===0?(0,Q.jsx)(`p`,{className:`text-xs text-destructive`,children:`Select at least one permission.`}):p.includes(`access:write`)?(0,Q.jsx)(`p`,{className:`text-xs text-warning`,children:`This client can create or revoke access for other devices.`}):null]})]}),(0,Q.jsxs)(kt,{variant:`bare`,children:[(0,Q.jsx)(I,{variant:`outline`,disabled:m,onClick:()=>c(!1),children:`Cancel`}),(0,Q.jsx)(I,{disabled:m||p.length===0,onClick:()=>void g(),children:m?`Creating…`:`Create link`})]})]})]})]})}),Ai=(0,$.memo)(function(e){let t=(0,Z.c)(39),{endpointUrl:n,endpoints:r,defaultEndpointKey:i,presentation:a,isLoading:o,pairingLinks:s,createdPairingCredentials:c,clientSessions:l,revokingPairingLinkId:u,revokingClientSessionId:d,onRevokePairingLink:f,onRevokeClientSession:p,canRevoke:m}=e,h=a===void 0?`current`:a,g;if(t[0]!==m||t[1]!==c||t[2]!==i||t[3]!==n||t[4]!==r||t[5]!==f||t[6]!==s||t[7]!==h||t[8]!==u){let e;t[10]!==m||t[11]!==c||t[12]!==i||t[13]!==n||t[14]!==r||t[15]!==f||t[16]!==h||t[17]!==u?(e=e=>(0,Q.jsx)(Di,{pairingLink:e,credential:c.get(e.id),endpointUrl:n,endpoints:r,defaultEndpointKey:i,presentation:h,revokingPairingLinkId:u,onRevoke:f,canRevoke:m},e.id),t[10]=m,t[11]=c,t[12]=i,t[13]=n,t[14]=r,t[15]=f,t[16]=h,t[17]=u,t[18]=e):e=t[18],g=s.map(e),t[0]=m,t[1]=c,t[2]=i,t[3]=n,t[4]=r,t[5]=f,t[6]=s,t[7]=h,t[8]=u,t[9]=g}else g=t[9];let _;if(t[19]!==m||t[20]!==l||t[21]!==p||t[22]!==h||t[23]!==d){let e;t[25]!==m||t[26]!==p||t[27]!==h||t[28]!==d?(e=e=>(0,Q.jsx)(Oi,{clientSession:e,presentation:h,revokingClientSessionId:d,onRevokeSession:p,canRevoke:m},e.sessionId),t[25]=m,t[26]=p,t[27]=h,t[28]=d,t[29]=e):e=t[29],_=l.map(e),t[19]=m,t[20]=l,t[21]=p,t[22]=h,t[23]=d,t[24]=_}else _=t[24];let v;t[30]!==l.length||t[31]!==o||t[32]!==s.length||t[33]!==h?(v=s.length===0&&l.length===0&&!o?(0,Q.jsx)(`div`,{className:pi(h),children:(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground/60`,children:`No pairing links or client sessions.`})}):null,t[30]=l.length,t[31]=o,t[32]=s.length,t[33]=h,t[34]=v):v=t[34];let y;return t[35]!==g||t[36]!==_||t[37]!==v?(y=(0,Q.jsxs)(Q.Fragment,{children:[g,_,v]}),t[35]=g,t[36]=_,t[37]=v,t[38]=y):y=t[38],y}),ji=(0,$.memo)(function(e){let t=(0,Z.c)(50),{endpoint:n,isDefault:r,presentation:i,onSetDefault:a,onSetupTailscaleServe:o,onDisableTailscaleServe:s,isUpdatingTailscaleServe:c}=e,l=i===void 0?`current`:i,u=n.status===`available`,d;t[0]===n?d=t[1]:(d=xi(n)&&n.status!==`available`,t[0]=n,t[1]=d);let f=d,p;t[2]===n?p=t[3]:(p=xi(n)&&n.status===`available`,t[2]=n,t[3]=p);let m=p,h=!f,g=l===`endpoint-rail`,_;t[4]!==u||t[5]!==l?(_=mi(l,u),t[4]=u,t[5]=l,t[6]=_):_=t[6];let v;t[7]!==r||t[8]!==g?(v=g&&r?(0,Q.jsx)(`span`,{className:`absolute inset-y-2 left-0 w-1 rounded-r-full bg-primary`,"aria-hidden":!0}):null,t[7]=r,t[8]=g,t[9]=v):v=t[9];let y;t[10]===n.label?y=t[11]:(y=(0,Q.jsx)(`h3`,{className:`shrink-0 text-sm leading-5 font-medium text-foreground`,children:n.label}),t[10]=n.label,t[11]=y);let b;t[12]!==n.httpBaseUrl||t[13]!==h?(b=h?(0,Q.jsxs)(We,{children:[(0,Q.jsx)(He,{render:(0,Q.jsx)(`p`,{className:`min-w-0 truncate text-xs leading-5 text-muted-foreground`,children:n.httpBaseUrl})}),(0,Q.jsx)(Ue,{side:`top`,children:n.httpBaseUrl})]}):null,t[12]=n.httpBaseUrl,t[13]=h,t[14]=b):b=t[14];let x;t[15]===u?x=t[16]:(x=u?null:(0,Q.jsx)(`span`,{className:`shrink-0 rounded-md border border-border/70 px-1 py-0.5 text-3xs text-muted-foreground`,children:`Setup required`}),t[15]=u,t[16]=x);let S;t[17]!==y||t[18]!==b||t[19]!==x?(S=(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-3`,children:[y,b,x]}),t[17]=y,t[18]=b,t[19]=x,t[20]=S):S=t[20];let C;t[21]===r?C=t[22]:(C=r?(0,Q.jsx)(`span`,{className:`rounded-md border border-primary/30 bg-primary/10 px-1 py-0.5 text-3xs text-primary`,children:`Default`}):null,t[21]=r,t[22]=C);let w;t[23]!==n||t[24]!==c||t[25]!==f||t[26]!==o?(w=f?(0,Q.jsx)(I,{size:`xs`,variant:`outline`,onClick:()=>o(n),disabled:c,children:c?`Restarting…`:`Setup`}):null,t[23]=n,t[24]=c,t[25]=f,t[26]=o,t[27]=w):w=t[27];let T;t[28]!==m||t[29]!==n||t[30]!==c||t[31]!==s?(T=m?(0,Q.jsx)(I,{size:`xs`,variant:`destructive-outline`,onClick:()=>s(n),disabled:c,children:c?`Restarting…`:`Disable`}):null,t[28]=m,t[29]=n,t[30]=c,t[31]=s,t[32]=T):T=t[32];let E;t[33]!==n||t[34]!==r||t[35]!==f||t[36]!==a?(E=!f&&!r?(0,Q.jsx)(I,{size:`xs`,variant:`outline`,onClick:()=>a(n),children:`Set as default`}):null,t[33]=n,t[34]=r,t[35]=f,t[36]=a,t[37]=E):E=t[37];let D;t[38]!==C||t[39]!==w||t[40]!==T||t[41]!==E?(D=(0,Q.jsxs)(`div`,{className:`ml-auto flex min-h-6 shrink-0 items-center justify-end gap-2`,children:[C,w,T,E]}),t[38]=C,t[39]=w,t[40]=T,t[41]=E,t[42]=D):D=t[42];let O;t[43]!==D||t[44]!==S?(O=(0,Q.jsxs)(`div`,{className:`flex min-h-6 min-w-0 flex-col gap-2 sm:-my-0.5 sm:flex-row sm:items-center`,children:[S,D]}),t[43]=D,t[44]=S,t[45]=O):O=t[45];let k;return t[46]!==O||t[47]!==_||t[48]!==v?(k=(0,Q.jsxs)(`div`,{className:_,children:[v,O]}),t[46]=O,t[47]=_,t[48]=v,t[49]=k):k=t[49],k});function Mi(e){let t=(0,Z.c)(14),{endpoint:n,hiddenEndpointCount:r,expanded:i,onToggleExpanded:a,fallback:o}=e;if(!n)return o;let s;t[0]===n.httpBaseUrl?s=t[1]:(s=(0,Q.jsx)(`span`,{className:`min-w-0 truncate`,children:n.httpBaseUrl}),t[0]=n.httpBaseUrl,t[1]=s);let c;t[2]!==i||t[3]!==r?(c=r>0?(0,Q.jsx)(`span`,{className:`shrink-0 text-xs font-medium`,children:i?`Hide`:`+${r}`}):null,t[2]=i,t[3]=r,t[4]=c):c=t[4];let l;t[5]!==s||t[6]!==c?(l=(0,Q.jsxs)(Q.Fragment,{children:[s,c]}),t[5]=s,t[6]=c,t[7]=l):l=t[7];let u=l,d;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Q.jsx)(`span`,{className:`shrink-0`,children:`Reachable at`}),t[8]=d):d=t[8];let f;return t[9]!==i||t[10]!==r||t[11]!==a||t[12]!==u?(f=(0,Q.jsxs)(`span`,{className:`inline-flex min-w-0 max-w-full items-baseline gap-1`,children:[d,r>0?(0,Q.jsx)(`button`,{type:`button`,className:`inline-flex min-w-0 max-w-full items-baseline gap-2 border-b border-dotted border-muted-foreground/60 text-left text-muted-foreground underline-offset-4 hover:border-foreground hover:text-foreground`,onClick:a,"aria-expanded":i,children:u}):(0,Q.jsx)(`span`,{className:`inline-flex min-w-0 max-w-full items-baseline gap-2`,children:u})]}),t[9]=i,t[10]=r,t[11]=a,t[12]=u,t[13]=f):f=t[13],f}function Ni(e){if(!e.entry.enabled&&e.connection.phase!==`unsupported`)return{text:`Off`,tone:`muted`};let{connection:t}=e;switch(t.phase){case`connected`:return{text:`Connected`,tone:`muted`};case`connecting`:return{text:`Connecting`,tone:`muted`};case`reconnecting`:return{text:t.error?`Reconnecting: ${t.error}`:`Reconnecting`,tone:`error`};case`unsupported`:return{text:`Client not supported`,tone:`muted`};case`error`:return{text:t.error?`Connection failed: ${t.error}`:`Connection failed`,tone:`error`};case`offline`:return{text:`Offline`,tone:`muted`};case`available`:return{text:`Not connected`,tone:`muted`}}}function Pi(e){let t=(0,Z.c)(161),{environment:r,removingEnvironmentId:i,onSetEnabled:a,onRemove:o,onAddRoute:s}=e,[c,l]=(0,$.useState)(!1),[u,d]=(0,$.useState)(!1),p=r.environmentId,h=r.connection.phase===`unsupported`,g=r.entry.enabled&&!h,_=r.connection.phase===`connected`,v=i===p,y=r.connection.traceId,b;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={target:`trace ID`,onCopy:Hi,onError:Vi},t[0]=b):b=t[0];let{copyToClipboard:x}=Ze(b),S;t[1]===x?S=t[2]:(S=e=>{x(e,{traceId:e})},t[1]=x,t[2]=S);let C=S,w;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(w={target:`MCP URL`,onCopy:Bi,onError:zi},t[3]=w):w=t[3];let{copyToClipboard:T}=Ze(w),O;t[4]===r.serverConfig?O=t[5]:(O=Vn(r.serverConfig),t[4]=r.serverConfig,t[5]=O);let k=O,A;t[6]===p?A=t[7]:(A=ot.updateStateAtom(p),t[6]=p,t[7]=A);let j=m(A),M=j.status===`running`&&j.stage===`resuming`,N;t[8]===r?N=t[9]:(N=Ni(r),t[8]=r,t[9]=N);let P=N,ee=r.serverConfig?.environment.serverVersion??null,te=Qe(),ne;t[10]!==p||t[11]!==te.environments?(ne=n(te.environments.get(p)?.status??ce())?.descriptor,t[10]=p,t[11]=te.environments,t[12]=ne):ne=t[12];let re=ne,[ie,ae]=(0,$.useState)(re);re!==void 0&&re!==ie&&ae(re);let oe;t[13]!==p||t[14]!==te.environments?(oe=te.environments.get(p)?.environment.endpoint.httpBaseUrl,t[13]=p,t[14]=te.environments,t[15]=oe):oe=t[15];let le=oe,[ue,F]=(0,$.useState)(le);le!==void 0&&le!==ue&&F(le);let me=dt(p),L=_&&me._tag===`Some`?me.value.target:null,he=le??ue,ge;t[16]!==L||t[17]!==r.entry||t[18]!==he?(ge=Re({entry:r.entry,relayHttpBaseUrl:he,connectedTarget:L}),t[16]=L,t[17]=r.entry,t[18]=he,t[19]=ge):ge=t[19];let R=ge,ve;t[20]!==r.serverConfig||t[21]!==ie?(ve=r.serverConfig??(ie===void 0?null:{environment:ie}),t[20]=r.serverConfig,t[21]=ie,t[22]=ve):ve=t[22];let ye;t[23]===ve?ye=t[24]:(ye=de(ve),t[23]=ve,t[24]=ye);let be=ye,Se;t[25]===r.entry?Se=t[26]:(Se=Oe(r.entry),t[25]=r.entry,t[26]=Se);let z=Se.length,B;t[27]!==L||t[28]!==r?(B=yr(r,L),t[27]=L,t[28]=r,t[29]=B):B=t[29];let Ce=M?`Restarting`:P.text,we=g&&k?ee:null,Te;t[30]!==B||t[31]!==Ce||t[32]!==we?(Te=[B,Ce,we].filter(Ri),t[30]=B,t[31]=Ce,t[32]=we,t[33]=Te):Te=t[33];let V=Te.join(` · `),Ee=g&&_&&k!==null&&(j.status===`idle`||j.status===`failed`),De;t[34]!==g||t[35]!==r.connection||t[36]!==h?(De=h?r.connection.error??Ve(r.connection):g?Ve(r.connection):`Switched off`,t[34]=g,t[35]=r.connection,t[36]=h,t[37]=De):De=t[37];let ke=`${De}${k?`\nUpdate available: ${k.serverVersion} → ${k.clientVersion}`:``}`,Ae=r.label,je=!g,Me=g&&P.tone===`error`&&!M&&`text-destructive`,Ne;t[38]===Me?Ne=t[39]:(Ne=fe(`min-w-0 truncate`,Me),t[38]=Me,t[39]=Ne);let Pe;t[40]===Ne?Pe=t[41]:(Pe=(0,Q.jsx)(`span`,{className:Ne}),t[40]=Ne,t[41]=Pe);let H;t[42]!==ke||t[43]!==V||t[44]!==Pe?(H=(0,Q.jsx)(He,{payload:ke,render:Pe,children:V}),t[42]=ke,t[43]=V,t[44]=Pe,t[45]=H):H=t[45];let Fe;t[46]===ke?Fe=t[47]:(Fe=(0,Q.jsx)(Ue,{side:`top`,className:`whitespace-pre-wrap`,children:ke}),t[46]=ke,t[47]=Fe);let U;t[48]!==H||t[49]!==Fe?(U=(0,Q.jsxs)(We,{children:[H,Fe]}),t[48]=H,t[49]=Fe,t[50]=U):U=t[50];let W;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,Q.jsx)(`span`,{"aria-hidden":!0,className:`shrink-0`,children:`·`}),t[51]=W):W=t[51];let Le;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(Le=()=>l(Li),t[52]=Le):Le=t[52];let ze=z===1?`Routes`:`${z} routes`,Be=c&&`rotate-90`,G;t[53]===Be?G=t[54]:(G=fe(`size-3 shrink-0 transition-transform duration-150 motion-reduce:transition-none`,Be),t[53]=Be,t[54]=G);let Ge;t[55]===G?Ge=t[56]:(Ge=(0,Q.jsx)(_e,{"aria-hidden":!0,className:G}),t[55]=G,t[56]=Ge);let Ke;t[57]!==c||t[58]!==ze||t[59]!==Ge?(Ke=(0,Q.jsxs)(`button`,{type:`button`,"aria-expanded":c,onClick:Le,className:`inline-flex shrink-0 items-center gap-0.5 rounded-sm text-muted-foreground outline-none hover:text-foreground focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring`,children:[ze,Ge]}),t[57]=c,t[58]=ze,t[59]=Ge,t[60]=Ke):Ke=t[60];let qe;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(qe=(0,Q.jsx)(`span`,{"aria-hidden":!0,className:`shrink-0`,children:`·`}),t[61]=qe):qe=t[61];let Je=`remote-permissions-${p}`,Ye;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(Ye=()=>d(Ii),t[62]=Ye):Ye=t[62];let Xe=u&&`rotate-90`,K;t[63]===Xe?K=t[64]:(K=fe(`size-3 shrink-0 transition-transform duration-150 motion-reduce:transition-none`,Xe),t[63]=Xe,t[64]=K);let $e;t[65]===K?$e=t[66]:($e=(0,Q.jsx)(_e,{"aria-hidden":!0,className:K}),t[65]=K,t[66]=$e);let et;t[67]!==u||t[68]!==Je||t[69]!==$e?(et=(0,Q.jsxs)(`button`,{type:`button`,"aria-expanded":u,"aria-controls":Je,onClick:Ye,className:`inline-flex shrink-0 items-center gap-0.5 rounded-sm text-muted-foreground outline-none hover:text-foreground focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring`,children:[`Permissions`,$e]}),t[67]=u,t[68]=Je,t[69]=$e,t[70]=et):et=t[70];let tt;t[71]!==U||t[72]!==Ke||t[73]!==et?(tt=(0,Q.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1`,children:[U,W,Ke,qe,et]}),t[71]=U,t[72]=Ke,t[73]=et,t[74]=tt):tt=t[74];let q;t[75]===j?q=t[76]:(q=j.status===`idle`?null:(0,Q.jsx)(`div`,{className:`mt-1 max-w-md`,children:(0,Q.jsx)(Jn,{state:j})}),t[75]=j,t[76]=q);let nt;t[77]!==r||t[78]!==s||t[79]!==c?(nt=c&&(0,Q.jsx)(mr,{environment:r,onAddRoute:()=>s(r)}),t[77]=r,t[78]=s,t[79]=c,t[80]=nt):nt=t[80];let rt;t[81]!==p||t[82]!==_||t[83]!==u?(rt=u&&(0,Q.jsx)(`div`,{id:`remote-permissions-${p}`,className:`mt-2 border-t border-border/50`,children:(0,Q.jsx)(sr,{environmentId:p,connected:_,routeContext:!0})}),t[81]=p,t[82]=_,t[83]=u,t[84]=rt):rt=t[84];let it;t[85]!==nt||t[86]!==rt?(it=(0,Q.jsxs)(Q.Fragment,{children:[nt,rt]}),t[85]=nt,t[86]=rt,t[87]=it):it=t[87];let at;t[88]!==r.entry.serverUpdateRequired||t[89]!==r.label||t[90]!==p||t[91]!==ie?.serverVersion||t[92]!==j.status||t[93]!==h?(at=h&&r.entry.serverUpdateRequired===!0&&j.status!==`running`?(0,Q.jsx)(er,{environmentId:p,serverLabel:`${r.label} server`,fromVersion:ie?.serverVersion,targetVersion:Ie,label:j.status===`failed`?`Retry update`:`Update`}):null,t[88]=r.entry.serverUpdateRequired,t[89]=r.label,t[90]=p,t[91]=ie?.serverVersion,t[92]=j.status,t[93]=h,t[94]=at):at=t[94];let st;t[95]!==r.label||t[96]!==r.serverConfig||t[97]!==p||t[98]!==j.status||t[99]!==Ee||t[100]!==k?(st=Ee?(0,Q.jsx)(Yn,{environmentId:p,serverLabel:`${r.label} server`,selfUpdate:En(r.serverConfig),installation:r.serverConfig?.environment.capabilities.serverInstallation,desktopAppUpdate:Fn(r.serverConfig),threadContinuation:$n(r.serverConfig),targetVersion:k.clientVersion,label:j.status===`failed`?`Retry update`:`Update`,appearance:`icon`}):null,t[95]=r.label,t[96]=r.serverConfig,t[97]=p,t[98]=j.status,t[99]=Ee,t[100]=k,t[101]=st):st=t[101];let ct=v||h,J=`${g?`Switch off`:`Switch on`} ${r.label}`,lt;t[102]!==p||t[103]!==a?(lt=e=>a(p,e),t[102]=p,t[103]=a,t[104]=lt):lt=t[104];let ut;t[105]!==g||t[106]!==ct||t[107]!==J||t[108]!==lt?(ut=(0,Q.jsx)(He,{render:(0,Q.jsx)(Mn,{size:`sm`,checked:g,disabled:ct,"aria-label":J,onCheckedChange:lt})}),t[105]=g,t[106]=ct,t[107]=J,t[108]=lt,t[109]=ut):ut=t[109];let ft=h?`Client not supported`:g?`Switch off`:`Switch on`,pt;t[110]===ft?pt=t[111]:(pt=(0,Q.jsx)(Ue,{side:`top`,children:ft}),t[110]=ft,t[111]=pt);let Y;t[112]!==ut||t[113]!==pt?(Y=(0,Q.jsxs)(We,{children:[ut,pt]}),t[112]=ut,t[113]=pt,t[114]=Y):Y=t[114];let mt=`More actions for ${r.label}`,ht;t[115]!==v||t[116]!==mt?(ht=(0,Q.jsx)(I,{type:`button`,variant:`ghost-muted`,size:`icon-xs`,disabled:v,"aria-label":mt}),t[115]=v,t[116]=mt,t[117]=ht):ht=t[117];let gt;t[118]===Symbol.for(`react.memo_cache_sentinel`)?(gt=(0,Q.jsx)(Rn,{className:`size-3.5`}),t[118]=gt):gt=t[118];let _t;t[119]===ht?_t=t[120]:(_t=(0,Q.jsx)(se,{render:ht,children:gt}),t[119]=ht,t[120]=_t);let vt;t[121]!==r.serverConfig||t[122]!==p?(vt=(0,Q.jsx)(pr,{environmentId:p,serverConfig:r.serverConfig}),t[121]=r.serverConfig,t[122]=p,t[123]=vt):vt=t[123];let yt,bt;t[124]===Symbol.for(`react.memo_cache_sentinel`)?(yt=()=>l(Fi),bt=(0,Q.jsx)(xe,{}),t[124]=yt,t[125]=bt):(yt=t[124],bt=t[125]);let xt=c?`Hide routes`:`Routes`,St;t[126]===xt?St=t[127]:(St=(0,Q.jsxs)(E,{onClick:yt,children:[bt,xt]}),t[126]=xt,t[127]=St);let Ct;t[128]!==T||t[129]!==R?(Ct=R?(0,Q.jsx)(E,{onClick:()=>T(R,{url:R}),children:`Copy MCP URL`}):null,t[128]=T,t[129]=R,t[130]=Ct):Ct=t[130];let wt;t[131]!==C||t[132]!==y?(wt=y?(0,Q.jsx)(E,{onClick:()=>C(y),children:`Copy trace ID`}):null,t[131]=C,t[132]=y,t[133]=wt):wt=t[133];let Tt;t[134]===Symbol.for(`react.memo_cache_sentinel`)?(Tt=(0,Q.jsx)(pe,{}),t[134]=Tt):Tt=t[134];let Et;t[135]!==r||t[136]!==o?(Et=()=>o(r),t[135]=r,t[136]=o,t[137]=Et):Et=t[137];let Dt=v?`Removing…`:`Remove from this device…`,Ot;t[138]!==Et||t[139]!==Dt?(Ot=(0,Q.jsx)(E,{variant:`destructive`,onClick:Et,children:Dt}),t[138]=Et,t[139]=Dt,t[140]=Ot):Ot=t[140];let kt;t[141]!==vt||t[142]!==St||t[143]!==Ct||t[144]!==wt||t[145]!==Ot?(kt=(0,Q.jsxs)(D,{align:`end`,children:[vt,St,Ct,wt,Tt,Ot]}),t[141]=vt,t[142]=St,t[143]=Ct,t[144]=wt,t[145]=Ot,t[146]=kt):kt=t[146];let At;t[147]!==_t||t[148]!==kt?(At=(0,Q.jsxs)(f,{children:[_t,kt]}),t[147]=_t,t[148]=kt,t[149]=At):At=t[149];let jt;return t[150]!==r.label||t[151]!==be||t[152]!==je||t[153]!==tt||t[154]!==q||t[155]!==it||t[156]!==at||t[157]!==st||t[158]!==Y||t[159]!==At?(jt=(0,Q.jsxs)(br,{kind:be,label:Ae,dimmed:je,subtitle:tt,below:q,detail:it,children:[at,st,Y,At]}),t[150]=r.label,t[151]=be,t[152]=je,t[153]=tt,t[154]=q,t[155]=it,t[156]=at,t[157]=st,t[158]=Y,t[159]=At,t[160]=jt):jt=t[160],jt}function Fi(e){return!e}function Ii(e){return!e}function Li(e){return!e}function Ri(e){return e!==null}function zi(e){K.add(Y({type:`error`,title:`Could not copy MCP URL`,description:e.message}))}function Bi(e){let{url:t}=e;K.add({type:`success`,title:`MCP URL copied`,description:`Add it to an agent, e.g. claude mcp add --transport http p4 ${t}`})}function Vi(e){K.add(Y({type:`error`,title:`Could not copy trace ID`,description:e.message}))}function Hi(e){let{traceId:t}=e;K.add({type:`success`,title:`Trace ID copied`,description:t})}function Ui(e){let t=(0,Z.c)(10),{checked:n,disabled:r,disabledReason:i,onCheckedChange:a,ariaLabel:o}=e,s=o===void 0?`Enable P4 Connect`:o,c;t[0]===a?c=t[1]:(c=a?{onCheckedChange:a}:{},t[0]=a,t[1]=c);let l;t[2]!==s||t[3]!==n||t[4]!==r||t[5]!==c?(l=(0,Q.jsx)(Mn,{"aria-label":s,checked:n,disabled:r,...c}),t[2]=s,t[3]=n,t[4]=r,t[5]=c,t[6]=l):l=t[6];let u=l,d;return t[7]!==u||t[8]!==i?(d=i?(0,Q.jsxs)(We,{children:[(0,Q.jsx)(He,{render:(0,Q.jsx)(`span`,{className:`inline-flex`,children:u})}),(0,Q.jsx)(Ue,{side:`top`,children:i})]}):u,t[7]=u,t[8]=i,t[9]=d):d=t[9],d}function Wi(e){let t=(0,Z.c)(44),{canManageRelay:n}=e,r=tt(),{isSignedIn:i,linkState:a,linkRevoked:o,managedTunnelActive:s,managedTunnelOutOfSync:c,publishAgentActivity:l,holdWebhooksWhileOffline:u,operationError:d,reconcileCloudState:f}=nr(),[p,m]=(0,$.useState)(!1),[h,g]=(0,$.useState)(!1),_=i?n?null:`Your session does not have permission to manage P4 Connect access.`:`Sign in to P4 Connect to manage this environment.`,v=p||h,y;t[0]!==r||t[1]!==l||t[2]!==f?(y=async e=>{r!==null&&ut(r,`relay:write`)&&(m(!0),await f({managedTunnel:e,publish:l})&&K.add({type:`success`,title:e?`P4 Connect linked`:l?`P4 Connect tunnel disabled`:`P4 Connect unlinked`,description:e?`This environment is available through P4 Connect.`:l?`The managed tunnel was removed. Agent activity publishing stays on.`:`This environment is no longer available through P4 Connect.`}),m(!1))},t[0]=r,t[1]=l,t[2]=f,t[3]=y):y=t[3];let b=y,x;t[4]!==s||t[5]!==r||t[6]!==f?(x=async e=>{r!==null&&ut(r,`relay:write`)&&(g(!0),await f({managedTunnel:s,publish:e})&&K.add({type:`success`,title:e?`Agent activity enabled`:`Agent activity disabled`,description:e?`This environment publishes agent activity to your mobile clients.`:`This environment will stop publishing agent activity.`}),g(!1))},t[4]=s,t[5]=r,t[6]=f,t[7]=x):x=t[7];let S=x,C;t[8]!==s||t[9]!==l||t[10]!==f?(C=async e=>{g(!0),await f({managedTunnel:s,publish:l,holdWebhooksWhileOffline:e})&&K.add({type:`success`,title:e?`Webhooks held while offline`:`Webhooks no longer held`,description:e?`P4 Connect keeps webhook requests for up to 24 hours while this environment is offline.`:`Requests to an offline environment now fail. Anything already held is still delivered.`}),g(!1)},t[8]=s,t[9]=l,t[10]=f,t[11]=C):C=t[11];let w=C,T;t[12]!==n||t[13]!==_||t[14]!==v||t[15]!==i||t[16]!==o||t[17]!==s||t[18]!==c||t[19]!==d||t[20]!==a||t[21]!==b?(T=window.desktopBridge?(0,Q.jsx)(mn,{title:Zn(`t3-connect`).title,description:o?`This environment was removed from P4 Connect. Turn it on to link it again.`:s?`This environment is available to your other devices through P4 Connect.`:c?`P4 Connect is out of sync. This environment is linked only to publish agent activity, so other devices cannot connect. Turn P4 Connect on to repair it.`:`Make this environment available to your other devices through P4 Connect.`,status:d??a.error,control:(0,Q.jsx)(Ui,{checked:s,disabled:!n||!i||a.data===null||a.isPending||v,disabledReason:_,onCheckedChange:e=>void b(e)})}):o?(0,Q.jsx)(mn,{title:Zn(`t3-connect`).title,description:"This environment was removed from P4 Connect. Run `p4c connect link` on the host to link it again."}):null,t[12]=n,t[13]=_,t[14]=v,t[15]=i,t[16]=o,t[17]=s,t[18]=c,t[19]=d,t[20]=a,t[21]=b,t[22]=T):T=t[22];let E;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(E=Zn(`publish-agent-activity`),t[23]=E):E=t[23];let D=!n||!i||a.data===null||a.isPending||v,O;t[24]===S?O=t[25]:(O=e=>void S(e),t[24]=S,t[25]=O);let k;t[26]!==_||t[27]!==l||t[28]!==D||t[29]!==O?(k=(0,Q.jsx)(mn,{title:E.title,description:`Send activity to mobile notifications and Live Activities without P4 Connect.`,control:(0,Q.jsx)(Ui,{ariaLabel:`Publish agent activity to mobile clients`,checked:l,disabled:D,disabledReason:_,onCheckedChange:O})}),t[26]=_,t[27]=l,t[28]=D,t[29]=O,t[30]=k):k=t[30];let A;t[31]!==n||t[32]!==_||t[33]!==u||t[34]!==v||t[35]!==i||t[36]!==s||t[37]!==a||t[38]!==w?(A=s?(0,Q.jsx)(mn,{title:Zn(`hold-webhooks-while-offline`).title,description:`Keep webhook requests for up to 24 hours while this environment is offline, then deliver them. Off: P4 Connect only forwards requests and stores nothing.`,control:(0,Q.jsx)(Ui,{ariaLabel:`Hold webhook requests while this environment is offline`,checked:u,disabled:!n||!i||a.isPending||v,disabledReason:_,onCheckedChange:e=>void w(e)})}):null,t[31]=n,t[32]=_,t[33]=u,t[34]=v,t[35]=i,t[36]=s,t[37]=a,t[38]=w,t[39]=A):A=t[39];let j;return t[40]!==T||t[41]!==k||t[42]!==A?(j=(0,Q.jsxs)(Q.Fragment,{children:[T,k,A]}),t[40]=T,t[41]=k,t[42]=A,t[43]=j):j=t[43],j}function Gi(e){let t=(0,Z.c)(3),{canReadRelay:n,canManageRelay:r}=e;if(!Fe())return null;if(!n){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(mn,{title:`P4 Connect`,description:`To edit these settings, pair this connection with both View relay and Manage relay permissions.`}),t[0]=e):e=t[0],e}let i;return t[1]===r?i=t[2]:(i=(0,Q.jsx)(Wi,{canManageRelay:r}),t[1]=r,t[2]=i),i}function Ki(e){let t=(0,Z.c)(4),{cloudEnabled:n}=e,r=n===void 0||n,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(Lt,{variant:`icon`,children:(0,Q.jsx)(ve,{})}),t[0]=i):i=t[0];let a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Q.jsx)(zt,{children:`No saved remote environments`}),t[1]=a):a=t[1];let o=r?`Click “Add environment” to pair another environment, or connect one from P4 Connect.`:`Click “Add environment” to pair another environment.`,s;return t[2]===o?s=t[3]:(s=(0,Q.jsxs)(Vt,{className:`min-h-52`,children:[i,(0,Q.jsxs)(Rt,{children:[a,(0,Q.jsx)(Bt,{children:o})]})]}),t[2]=o,t[3]=s),s}function qi(e){let t=(0,Z.c)(3),{primaryEnvironmentId:n,savedEnvironments:r}=e,i;return t[0]!==n||t[1]!==r?(i=Fe()?(0,Q.jsx)(tr,{primaryEnvironmentId:n,savedEnvironments:r,empty:(0,Q.jsx)(Ki,{})}):r.length===0?(0,Q.jsx)(Ki,{cloudEnabled:!1}):null,t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function Ji(){let e=window.desktopBridge,t=m(ct),{environments:n}=et(),r=$e(),i=pt(wn,{reportFailure:!1}),a=pt(Cn,{reportFailure:!1}),s=pt(st.remove,{reportFailure:!1}),u=pt(st.register,{reportFailure:!1}),d=Qe(),p=pt(st.setEnabled,{reportFailure:!1}),_=r?.environmentId??null,v=Sn(),y=v.data?.authenticated?v.data.permissions??v.data.scopes??null:null,b=e?null:v.data?.auth.policy??null,x=(0,$.useMemo)(()=>n.filter(e=>e.entry.target._tag!==`PrimaryConnectionTarget`),[n]),S=(0,$.useMemo)(()=>x.filter(e=>!Be(e.entry.target)),[x]),C=(0,$.useMemo)(()=>g(e=>x.map(t=>({environment:t,updateStatus:e(ot.updateStateAtom(t.environmentId)).status}))),[x]),w=m(C),T=(0,$.useMemo)(()=>w.flatMap(({environment:e,updateStatus:t})=>{let n=Vn(e.serverConfig),r=En(e.serverConfig),i=Fn(e.serverConfig);return!n||t===`running`||!e.entry.enabled||e.connection.phase!==`connected`||Be(e.entry.target)||r===null||r===`desktop-managed`&&!i?[]:[{environmentId:e.environmentId,serverLabel:e.label,selfUpdate:r,installation:e.serverConfig?.environment.capabilities.serverInstallation,desktopAppUpdate:i,threadContinuation:$n(e.serverConfig),continueThreadsAfterServerUpdate:e.serverConfig?.settings.continueThreadsAfterServerUpdate??!1,targetVersion:n.clientVersion}]}),[w]),E=(0,$.useMemo)(()=>[...r?[r]:[],...x.filter(e=>e.entry.enabled)],[r,x]),O=(0,$.useMemo)(()=>{let e=new Set;for(let t of x){let n=t.entry.profile;if(t.entry.target._tag!==`SshConnectionTarget`||oe(n)||n.value._tag!==`SshConnectionProfile`)continue;let r=n.value.target;e.add(r.alias),e.add(vr(r))}return e},[x]),[k,A]=(0,$.useState)(null),[j,M]=(0,$.useState)(null),[N,P]=(0,$.useState)(()=>new Map),ee=(0,$.useCallback)(e=>{P(t=>new Map(t).set(e.id,e.credential))},[]),[te,ne]=(0,$.useState)(null),[re,ie]=(0,$.useState)(null),[ae,ce]=(0,$.useState)(!1),[le,ue]=(0,$.useState)(!1),[F,pe]=(0,$.useState)(null),[me,L]=(0,$.useState)(`remote`),[ge,R]=(0,$.useState)(``),[be,xe]=(0,$.useState)(``),[z,B]=(0,$.useState)(``),[Te,V]=(0,$.useState)(``),[Ee,Oe]=(0,$.useState)(``),[ke,Ae]=(0,$.useState)(!1),Me=(0,$.useRef)(void 0),[Pe,H]=(0,$.useState)(null),[U,W]=(0,$.useState)(!1),[Ie,Le]=(0,$.useState)(null),[Re,ze]=(0,$.useState)(!1),[Ve,G]=(0,$.useState)(!1),[Ze,tt]=(0,$.useState)(!1),[q,nt]=(0,$.useState)(!1),[it,at]=(0,$.useState)(null),[J,dt]=(0,$.useState)(null),mt=J!==null,[ht,gt]=(0,$.useState)(null),[_t,It]=(0,$.useState)(!1),[Lt,Rt]=(0,$.useState)(String($r)),[zt,Bt]=(0,$.useState)(null),Vt=r?.serverConfig??null,qt=Vn(Vt),Jt=m(ot.updateStateAtom(_)),[Yt,Xt]=(0,$.useState)(!1),Qt=Zt(e=>e.defaultAdvertisedEndpointKey),$t=Zt(e=>e.setDefaultAdvertisedEndpointKey),en=lt(_,he),tn=lt(_,o),nn=lt(_,l),rn=lt(_,c),an=lt(_,h),on=!Ce()&&rn,sn=ft(en&&_!==null?Rr.accessChanges({environmentId:_,input:null}):null),cn=ft(on&&e?Gr:null),ln=e!==void 0&&le&&me===`ssh`,dn=ft(ln?Qr:null),_n=dn.refresh;(0,$.useEffect)(()=>{ln&&_n()},[ln,_n]);let vn=ft(on&&e?Wn:null),X=vn.data,jn=it??vn.error,zn=vn.isPending&&vn.data===null,Bn=dn.data??ti,Hn=(0,$.useMemo)(()=>Bn.filter(e=>{let t=vr(e);return!O.has(e.alias)&&!O.has(t)}),[Bn,O]),Un=(0,$.useMemo)(()=>qr(Hn,z),[z,Hn]),Kn=dn.isPending&&dn.data===null,qn=dn.error,Xn=e!==void 0&&(Kn||Hn.length>0),er=cn.data?.serverExposureState??null,tr=cn.data?.advertisedEndpoints??ei,nr=k??cn.error,rr=j??sn.error,ir=sn.isPending&&sn.data===null,Z=(0,$.useMemo)(()=>{let e=sn.data;return e?.type===`snapshot`?hi(e.payload.pairingLinks.map(e=>vi(e))):[]},[sn.data]),or=(0,$.useMemo)(()=>{let e=sn.data;return e?.type===`snapshot`?_i(e.payload.clientSessions.map(e=>yi(e))):[]},[sn.data]),cr=e?er?.mode===`network-accessible`:b===`remote-reachable`,lr=Lt.trim(),dr=Number(lr),fr=/^\d+$/u.test(lr)&&Number.isInteger(dr)&&dr>=1&&dr<=65535,mr=(0,$.useMemo)(()=>{if(!ht)return null;if(!fr||dr===$r)return ht.httpBaseUrl;try{let e=new URL(ht.httpBaseUrl);return e.port=String(dr),e.toString().replace(/\/$/u,``)}catch{return ht.httpBaseUrl}},[fr,dr,ht]),hr=(0,$.useCallback)(async t=>{if(e&&_!==null&&ut(_,`environment:maintain`)){ze(!0),A(null);try{await e.setServerExposureMode(t?`network-accessible`:`local-only`),Kr(),G(!1),ze(!1)}catch(e){let t=e instanceof Error?e.message:`Failed to update network exposure.`;G(!1),A(t),K.add(Y({type:`error`,title:`Could not update network access`,description:t})),ze(!1)}}},[e,_]),gr=(0,$.useCallback)(()=>{zt!==null&&hr(zt===`network-accessible`)},[hr,zt]),_r=(0,$.useCallback)(async()=>{if(e&&_!==null&&ut(_,`environment:maintain`)&&fr){tt(!0),A(null);try{await e.setTailscaleServeEnabled({enabled:!0,port:dr}),Kr(),gt(null)}catch(e){let t=e instanceof Error?e.message:`Failed to configure Tailscale HTTPS.`;A(t),K.add(Y({type:`error`,title:`Could not set up Tailscale HTTPS`,description:t}))}finally{tt(!1)}}},[e,fr,dr,_]),yr=(0,$.useCallback)(e=>{Rt(String(er?.tailscaleServePort??$r)),gt(e)},[er?.tailscaleServePort]),br=(0,$.useCallback)(async()=>{if(e&&_!==null&&ut(_,`environment:maintain`)){tt(!0),A(null);try{await e.setTailscaleServeEnabled({enabled:!1,port:er?.tailscaleServePort??$r}),Kr(),It(!1)}catch(e){let t=e instanceof Error?e.message:`Failed to disable Tailscale HTTPS.`;A(t),K.add(Y({type:`error`,title:`Could not disable Tailscale HTTPS`,description:t}))}finally{tt(!1)}}},[e,er,_]),xr=(0,$.useCallback)(e=>{It(!0)},[]),Sr=(0,$.useCallback)(async e=>{if(_!==null&&ut(_,`access:write`)){ne(e),M(null);try{await xn(e)}catch(e){let t=e instanceof Error?e.message:`Failed to revoke pairing link.`;M(t),K.add(Y({type:`error`,title:`Could not revoke pairing link`,description:t}))}finally{ne(null)}}},[_]),Cr=(0,$.useCallback)(async e=>{if(_!==null&&ut(_,`access:write`)){ie(e),M(null);try{await bn(e)}catch(e){let t=e instanceof Error?e.message:`Failed to revoke client access.`;M(t),K.add(Y({type:`error`,title:`Could not revoke client access`,description:t}))}finally{ie(null)}}},[_]),wr=(0,$.useCallback)(async()=>{if(_!==null&&ut(_,`access:write`)){ce(!0),M(null);try{let e=await yn();K.add({type:`success`,title:e===1?`Revoked 1 other client`:`Revoked ${e} clients`,description:`Other paired clients will need a new pairing link before reconnecting.`})}catch(e){let t=e instanceof Error?e.message:`Failed to revoke other clients.`;M(t),K.add(Y({type:`error`,title:`Could not revoke other clients`,description:t}))}finally{ce(!1)}}},[_]),Er=(0,$.useCallback)(async e=>{W(!0),H(null);let t=await a({target:e,label:``,...F?{expectedEnvironmentId:F.environmentId}:{}});if(t._tag===`Failure`){De(t)||H(di(je(t))),W(!1);return}R(``),xe(``),B(``),V(``),Oe(``),ue(!1),K.add({type:`success`,title:F?`Route added`:`Environment connected`,description:F?`${F.label} can now be reached over SSH ${e.alias}.`:`${e.alias} is ready over an SSH-managed tunnel.`}),W(!1)},[a,F]),Dr=(0,$.useCallback)(async()=>{if(me===`ssh`){let e;try{e=ci({host:z,username:Te,port:Ee})}catch(e){H(di(e));return}await Er(e);return}W(!0),H(null);let e;try{e=ui({host:ge,pairingCode:be})}catch(e){let t=e instanceof Error?e.message:`Failed to add backend.`;H(t),K.add(Y({type:`error`,title:`Could not add backend`,description:t})),W(!1);return}let t=await i({...e,...F?{expectedEnvironmentId:F.environmentId}:{}});if(t._tag===`Failure`){if(!De(t)){let e=je(t),n=e instanceof Error?e.message:`Failed to add backend.`;H(n),K.add(Y({type:`error`,title:`Could not add backend`,description:n}))}W(!1);return}R(``),xe(``),B(``),V(``),Oe(``),ue(!1),K.add(F?{type:`success`,title:`Route added`,description:`${F.label} now has another way to connect.`}:{type:`success`,title:`Backend added`,description:`The environment is saved and will reconnect on app startup.`}),W(!1)},[F,i,Er,ge,me,be,z,Ee,Te]),Or=(0,$.useCallback)(e=>{e.nativeEvent.isComposing||e.keyCode===229||e.key===`Enter`&&z.trim().length>0&&(e.preventDefault(),Dr())},[Dr,z]),kr=(0,$.useCallback)(async t=>{if(U||!e)return;W(!0),H(null),B(t.alias);let n;try{n=await e.resolveSshHost(t.alias)}catch(e){H(di(e)),W(!1);return}V(n.username??``),Oe(n.port===null?``:String(n.port)),await Er(n)},[Er,e,U]),jr=(0,$.useCallback)(e=>{if(e.nativeEvent.isComposing||e.keyCode===229)return;let n=ke&&Xn;if(n){let n=Wt(e,t,{platform:navigator.platform,context:{modelPickerOpen:!1}}),r=Gt(n??``),i=r===null?void 0:Un[r];if(i){e.preventDefault(),e.stopPropagation(),Ae(!1),kr(i);return}if(e.key===`Escape`){e.preventDefault(),e.stopPropagation();return}}let r=n&&Me.current!==void 0;!e.defaultPrevented&&!r&&e.key===`Enter`&&z.trim().length>0&&(e.preventDefault(),Dr())},[Un,Dr,kr,Xn,t,z,ke]),Nr=(0,$.useCallback)(async(e,t)=>{H(null);let n=await p({environmentId:e,enabled:t});if(n._tag===`Failure`&&!De(n)){let e=je(n),r=e instanceof Error?e.message:`Failed to switch the backend ${t?`on`:`off`}.`;H(r),K.add(Y({type:`error`,title:`Could not switch backend ${t?`on`:`off`}`,description:r}))}},[p]),Pr=(0,$.useCallback)(async e=>{let t=e.environmentId;Le(t),H(null);let n=await s(t);if(Le(null),n._tag===`Failure`&&!De(n)){let e=je(n),t=e instanceof Error?e.message:`Failed to remove backend.`;H(t),K.add(Y({type:`error`,title:`Could not remove backend`,description:t}))}},[s]),[Fr,Ir]=(0,$.useState)(null),Lr=(0,$.useCallback)(async e=>{if(e.relayManaged&&Fe()){Ir(e);return}await rt(`Remove ${e.label} from this device?\nThis forgets its pairing, credentials, and cached threads here. Switch it off instead to keep it saved.`,{variant:`destructive`})===!0&&await Pr(e)},[Pr]),zr=Z,Br=(0,$.useMemo)(()=>tr.find(xi)??null,[tr]),Vr=(0,$.useMemo)(()=>cr?tr.filter(e=>!xi(e)):[],[tr,cr]),Hr=(0,$.useMemo)(()=>Br?[...Vr,Br]:Vr,[Br,Vr]),Ur=(0,$.useMemo)(()=>bi(Vr,Qt),[Qt,Vr]),Wr=(0,$.useMemo)(()=>Ur??bi(Br?[Br]:[],Qt),[Qt,Ur,Br]),Jr=Wr?Si(Wr):null,Yr=(0,$.useCallback)(e=>{$t(Si(e))},[$t]),Xr=(0,$.useCallback)(e=>{let t=li(e);if(t){R(t.host),xe(t.pairingCode);return}R(e)},[]),Zr=e=>{let t=me===e.mode;return(0,Q.jsxs)(`button`,{type:`button`,"aria-pressed":t,className:fe(`group flex min-h-24 items-start gap-3 rounded-lg border p-4 text-left`,t?`border-primary/50 bg-primary/5`:`border-border/60 hover:bg-muted/40`),disabled:U,onClick:()=>{L(e.mode)},children:[e.icon?(0,Q.jsx)(`span`,{className:fe(`mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-md border`,t?`border-primary/30 bg-primary/10 text-primary`:`border-border/70 bg-background text-muted-foreground group-hover:text-foreground`),children:e.icon}):null,(0,Q.jsxs)(`span`,{className:`min-w-0`,children:[(0,Q.jsx)(`span`,{className:`block text-sm font-medium text-foreground`,children:e.title}),(0,Q.jsx)(`span`,{className:`mt-1 block text-xs leading-relaxed text-muted-foreground`,children:e.description})]})]})},ii=()=>(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[(0,Q.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-[minmax(0,1fr)_10rem]`,children:[(0,Q.jsxs)(`label`,{className:`block`,children:[(0,Q.jsx)(`span`,{className:`mb-1.5 block text-xs font-medium text-foreground`,children:`Host`}),(0,Q.jsx)(Tt,{value:ge,onChange:e=>Xr(e.target.value),placeholder:`backend.example.com`,disabled:U,spellCheck:!1})]}),(0,Q.jsxs)(`label`,{className:`block`,children:[(0,Q.jsx)(`span`,{className:`mb-1.5 block text-xs font-medium text-foreground`,children:`Pairing code`}),(0,Q.jsx)(Tt,{value:be,onChange:e=>xe(e.target.value),placeholder:`PAIRCODE`,disabled:U,spellCheck:!1})]})]}),(0,Q.jsx)(`div`,{children:(0,Q.jsx)(`span`,{className:`mt-1 block text-2xs text-muted-foreground`,children:`Paste a full pairing URL here to fill both fields automatically.`})})]}),ai=F!==null&&!F.relayManaged&&d.environments.has(F.environmentId)?d.environments.get(F.environmentId).environment:null,oi=async()=>{if(ai===null||F===null)return;W(!0);let e=await u(new Ne({target:new we({environmentId:ai.environmentId,label:F.label})}));if(W(!1),e._tag===`Failure`){if(!De(e)){let t=je(e);H(t instanceof Error?t.message:`Could not add the route.`)}return}ue(!1),K.add({type:`success`,title:`Route added`,description:`${F.label} falls back to P4 Connect when its other routes are unreachable.`})},si=()=>(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[ai===null?null:(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-md border border-border px-3 py-2`,children:[(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`This machine is on your P4 Connect account. Use it as a fallback route.`}),(0,Q.jsx)(I,{size:`xs`,variant:`outline`,disabled:U,onClick:()=>void oi(),children:`Add P4 Connect`})]}),ii(),Pe?(0,Q.jsx)(`p`,{className:`text-xs text-destructive`,children:Pe}):null,(0,Q.jsxs)(I,{variant:`outline`,className:`w-full`,disabled:U,onClick:()=>void Dr(),children:[(0,Q.jsx)(ye,{className:`size-3.5`}),U?`Adding…`:F?`Add route`:`Add environment`]})]}),fi=()=>(0,Q.jsx)(`div`,{className:`space-y-4`,children:(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[(0,Q.jsxs)(`div`,{className:`block`,children:[(0,Q.jsx)(`label`,{htmlFor:`saved-backend-ssh-host`,className:`mb-1.5 block text-xs font-medium text-foreground`,children:`SSH host or alias`}),(0,Q.jsxs)(bt,{items:Un,itemToStringValue:e=>e.alias,mode:`none`,openOnInputClick:!0,open:ke,onOpenChange:Ae,onItemHighlighted:e=>{Me.current=e},value:z,onValueChange:(e,t)=>{if(B(e),t.reason!==`item-press`)return;let n=Un.find(t=>t.alias===e);n&&kr(n)},children:[(0,Q.jsx)(St,{id:`saved-backend-ssh-host`,onKeyDown:jr,placeholder:`Search hosts or type devbox`,disabled:U,spellCheck:!1}),Xn?(0,Q.jsx)(Ct,{children:Kn?(0,Q.jsx)(`div`,{className:`px-3 py-2 text-xs text-muted-foreground`,children:`Loading hosts…`}):Un.length>0?(0,Q.jsx)(yt,{className:`max-h-72`,children:Un.map((e,n)=>{let r=vr(e),i=n<9?Ut(n):null,a=i?Kt(t,i,navigator.platform):null;return(0,Q.jsxs)(wt,{value:e,className:`h-8 min-h-8 whitespace-nowrap`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium`,children:e.alias}),r===e.alias?(0,Q.jsx)(`span`,{className:`flex-1`}):(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-muted-foreground`,children:r}),a?(0,Q.jsx)(xt,{className:`shrink-0`,children:a}):null]},`${e.alias}:${e.hostname}:${e.port??``}`)})}):(0,Q.jsxs)(vt,{className:`break-all`,children:[`No hosts match "`,z.trim(),`".`]})}):null]})]}),(0,Q.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-[minmax(0,1fr)_7rem]`,children:[(0,Q.jsxs)(`label`,{className:`block`,children:[(0,Q.jsx)(`span`,{className:`mb-1.5 block text-xs font-medium text-foreground`,children:`Username`}),(0,Q.jsx)(Tt,{value:Te,onChange:e=>V(e.target.value),onKeyDown:Or,placeholder:`root`,disabled:U,spellCheck:!1})]}),(0,Q.jsxs)(`label`,{className:`block`,children:[(0,Q.jsx)(`span`,{className:`mb-1.5 block text-xs font-medium text-foreground`,children:`Port`}),(0,Q.jsx)(Tt,{value:Ee,onChange:e=>Oe(e.target.value),onKeyDown:Or,placeholder:`22`,inputMode:`numeric`,disabled:U,spellCheck:!1})]})]}),Pe||qn?(0,Q.jsx)(pn,{variant:`error`,children:(0,Q.jsx)(fn,{children:Pe??qn})}):null,(0,Q.jsxs)(I,{variant:`outline`,className:`w-full`,disabled:U,onClick:()=>void Dr(),children:[(0,Q.jsx)(ye,{className:`size-3.5`}),U?`Adding…`:F?`Add route`:`Add environment`]})]})}),mi=()=>(0,Q.jsx)(Mn,{checked:er?.mode===`network-accessible`,disabled:!er||Re,onCheckedChange:e=>{Bt(e?`network-accessible`:`local-only`),G(!0)},"aria-label":`Enable network access`}),Ci=e=>Yt?Vr.map(t=>{let n=Si(t);return(0,Q.jsx)(ji,{endpoint:t,isDefault:n===Jr,presentation:e,onSetDefault:Yr,onSetupTailscaleServe:yr,onDisableTailscaleServe:xr,isUpdatingTailscaleServe:Ze},t.id)}):null,wi=(0,$.useCallback)(async t=>{if(e&&_!==null&&ut(_,`environment:maintain`)){nt(!0),at(null);try{await t(),Ln()}catch(e){let t=e instanceof Error?e.message:`Failed to update WSL backend.`;at(t),K.add(Y({type:`error`,title:`Could not change WSL backend`,description:t})),Ln()}finally{nt(!1)}}},[e,_]),Ti=(0,$.useCallback)(()=>{at(null),Ln()},[]),Ei=(0,$.useMemo)(()=>n.some(e=>Be(e.entry.target)),[n]),Di=(0,$.useCallback)(t=>{if(!e||!X)return;let n=X.distros.find(e=>e.isDefault)?.name??null;if(t===ri){if(!X.enabled&&!X.wslOnly)return;let t=X.wslOnly;if(Ei||t){dt({kind:`disable`,wasWslOnly:t});return}wi(()=>e.setWslBackendEnabled(!1));return}let r=t===ni?null:t,i=r??n;if(!X.enabled){dt({kind:`enable`,nextDistro:r});return}if((X.distro??n)!==i){if(Ei||X.wslOnly){dt({kind:`distro`,nextDistro:r});return}wi(()=>e.setWslDistro(r))}},[wi,e,X,Ei]),Oi=(0,$.useCallback)(t=>{if(!e||!J||J.kind!==`enable`)return;let n=J.nextDistro;dt(null);let r=X?.distro??null;wi(()=>On({bridge:e,mode:t,nextDistro:n,persistedDistro:r}))},[wi,e,X,J]),Ni=(0,$.useCallback)(t=>{e&&X&&X.wslOnly!==t&&dt({kind:`wsl-only`,nextValue:t})},[e,X]),Fi=(0,$.useCallback)(()=>{if(!e||!J)return;let t=J;if(t.kind!==`enable`){if(dt(null),t.kind===`disable`){wi(async()=>{let n=await e.setWslBackendEnabled(!1);return t.wasWslOnly?await e.setWslOnly(!1):n});return}if(t.kind===`distro`){wi(()=>e.setWslDistro(t.nextDistro));return}wi(()=>e.setWslOnly(t.nextValue))}},[wi,e,J]),Ii=()=>{if(!X)return An({state:null,error:jn})&&on?(0,Q.jsx)(mn,{...Zn(`wsl-backend`),description:`Couldn't load the WSL backend state.`,status:(0,Q.jsx)(`span`,{className:`block text-destructive`,children:jn}),control:(0,Q.jsx)(I,{size:`sm`,variant:`outline`,onClick:Ti,disabled:zn,children:zn?`Retrying…`:`Retry`})}):null;if(!An({state:X,error:jn}))return null;if(!X.available)return(0,Q.jsx)(mn,{...Zn(`wsl-backend`),description:`WSL is unavailable, so Windows is running instead. Turn WSL off to clear this preference.`,status:jn?(0,Q.jsx)(`span`,{className:`block text-destructive`,children:jn}):null,control:(0,Q.jsx)(I,{size:`sm`,variant:`outline`,disabled:q,onClick:()=>Di(ri),children:`Switch to Windows`})});let e=X.distros.find(e=>e.isDefault)?.name??null,t=X.enabled?X.distro??e??ni:ri,n=t===ri?`Off`:t===ni?`Default distro`:t;return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(mn,{...Zn(`wsl-backend`),description:`Run the selected WSL distro alongside Windows. Projects remain on their current filesystem.`,status:jn?(0,Q.jsx)(`span`,{className:`block text-destructive`,children:jn}):X.preflightError?(0,Q.jsxs)(`span`,{className:`block text-destructive`,children:[`WSL backend couldn't start: `,X.preflightError]}):null,control:(0,Q.jsxs)(Ye,{value:t,onValueChange:e=>{typeof e==`string`&&Di(e)},children:[(0,Q.jsx)(Je,{size:`sm`,className:`w-full sm:w-56`,"aria-label":`WSL backend`,disabled:q,children:(0,Q.jsx)(Ke,{children:n})}),(0,Q.jsxs)(qe,{align:`end`,alignItemWithTrigger:!1,children:[(0,Q.jsx)(Ge,{hideIndicator:!0,value:ri,children:`Off`}),X.distros.length===0?(0,Q.jsx)(Ge,{hideIndicator:!0,value:ni,children:`Default distro`}):X.distros.map(e=>(0,Q.jsxs)(Ge,{hideIndicator:!0,value:e.name,children:[e.name,e.isDefault?` (default)`:``]},e.name))]})]})}),X.enabled?(0,Q.jsx)(mn,{title:`WSL only`,description:`Run only the WSL backend. P4 Code restarts when this changes.`,className:`bg-muted/20 pl-7 sm:pl-8`,control:(0,Q.jsx)(Mn,{checked:X.wslOnly,disabled:q,onCheckedChange:e=>Ni(e),"aria-label":`Run WSL only`})}):null]})},Li=()=>(0,Q.jsx)(mn,{title:Zn(`tailscale-https`).title,description:Br?Br.status===`available`?Br.httpBaseUrl:`Use Tailscale Serve to expose this backend through a MagicDNS HTTPS URL.`:`Start Tailscale to set up HTTPS access through MagicDNS.`,control:Br?(0,Q.jsx)(Mn,{checked:Br.status===`available`,disabled:Ze,onCheckedChange:e=>{if(e){yr(Br);return}xr(Br)},"aria-label":`Enable Tailscale HTTPS`}):null}),Ri=e=>(0,Q.jsxs)(Q.Fragment,{children:[rr?(0,Q.jsx)(`div`,{className:pi(e),children:(0,Q.jsx)(`p`,{className:`text-xs text-destructive`,children:rr})}):null,(0,Q.jsx)(Ai,{endpointUrl:er?.endpointUrl,endpoints:Hr,defaultEndpointKey:Jr,presentation:e,isLoading:ir,pairingLinks:zr,createdPairingCredentials:N,clientSessions:or,revokingPairingLinkId:te,revokingClientSessionId:re,onRevokePairingLink:Sr,onRevokeClientSession:Cr,canRevoke:tn})]}),zi=()=>(0,Q.jsx)(mn,{title:Zn(`network-access`).title,description:cr?(0,Q.jsx)(Mi,{endpoint:Ur,hiddenEndpointCount:Math.max(Vr.length-1,0),expanded:Yt,onToggleExpanded:()=>Xt(e=>!e),fallback:er?.endpointUrl?`Reachable at ${er.endpointUrl}`:er?.advertisedHost?`Exposed on all interfaces. Pairing links use ${er.advertisedHost}.`:`Exposed on all interfaces.`}):er?`Limited to this machine.`:`Loading…`,status:nr?(0,Q.jsx)(`span`,{className:`block text-destructive`,children:nr}):null,control:mi()}),Bi=()=>(0,Q.jsx)(mn,{title:Zn(`network-access`).title,description:e?`This connection cannot view or change network exposure.`:b===`remote-reachable`?`Remote access is already configured. Change network exposure where the server starts.`:b===`loopback-browser`?`Only this machine can connect. Restart with a non-loopback host for remote pairing.`:`Network exposure information is unavailable.`,control:!e&&(b===`remote-reachable`||b===`loopback-browser`)?(0,Q.jsxs)(We,{children:[(0,Q.jsx)(He,{render:(0,Q.jsx)(`span`,{className:`inline-flex`,children:(0,Q.jsx)(Mn,{checked:cr,disabled:!0,"aria-label":`Enable network access`})})}),(0,Q.jsx)(Ue,{side:`top`,children:`Network exposure changes restart the backend and must be controlled where the server process is launched.`})]}):void 0}),Vi=(0,Q.jsx)(Q.Fragment,{children:_===null?(0,Q.jsxs)(gn,{...Zn(`connections-environment`),children:[(0,Q.jsx)(mn,{title:`No environment selected`,description:`Connect an environment to view its settings and access.`}),(0,Q.jsx)(ur,{}),nn||an?(0,Q.jsx)(Gi,{canReadRelay:nn,canManageRelay:an}):null]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(gn,{...Zn(`connections-environment`),title:r?.label??(e?`This machine`:`Primary environment`),icon:(0,Q.jsx)(un,{"aria-hidden":!0,kind:Vt?de(Vt):`desktop`,className:`size-4`}),headerAction:_===null?null:(0,Q.jsxs)(f,{children:[(0,Q.jsx)(se,{render:(0,Q.jsx)(I,{type:`button`,variant:`ghost-muted`,size:`icon-xs`,"aria-label":`More actions for this machine`}),children:(0,Q.jsx)(Rn,{className:`size-3.5`})}),(0,Q.jsx)(D,{align:`end`,children:(0,Q.jsx)(pr,{environmentId:_,serverConfig:Vt})})]}),children:[(0,Q.jsx)(ur,{}),on?(0,Q.jsx)(mn,{title:`Version`,description:Jt.status===`idle`?[Vt?.environment.serverVersion??null,r?.displayUrl??null].filter(e=>e!==null).join(` · `)||`Loading…`:(0,Q.jsx)(Jn,{state:Jt}),control:qt&&_!==null&&Jt.status!==`running`?(0,Q.jsx)(Yn,{size:`sm`,environmentId:_,serverLabel:r?`${r.label} server`:`server`,selfUpdate:En(Vt),installation:Vt?.environment.capabilities.serverInstallation,desktopAppUpdate:Fn(Vt),threadContinuation:$n(Vt),targetVersion:qt.clientVersion,label:Jt.status===`failed`?`Retry update`:`Update to ${qt.clientVersion}`}):Jt.status===`idle`&&Vt?(0,Q.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Up to date`}):void 0}):null,on&&e?(0,Q.jsxs)(Q.Fragment,{children:[zi(),Ci(`endpoint-rail`),Li(),Ii(),nn||an?(0,Q.jsx)(Gi,{canReadRelay:nn,canManageRelay:an}):null]}):on?(0,Q.jsxs)(Q.Fragment,{children:[Bi(),nn||an?(0,Q.jsx)(Gi,{canReadRelay:nn,canManageRelay:an}):null]}):null,r?(0,Q.jsxs)(`details`,{className:`group px-3 sm:px-4`,children:[(0,Q.jsxs)(`summary`,{className:`flex min-h-11 cursor-pointer list-none items-center gap-2 rounded-md text-sm font-medium outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring [&::-webkit-details-marker]:hidden`,children:[`Permissions`,(0,Q.jsx)(_e,{"aria-hidden":!0,className:`size-3 text-muted-foreground group-open:rotate-90`})]}),(0,Q.jsx)(sr,{environmentId:r.environmentId,connected:r.connection.phase===`connected`})]}):null]}),en||tn?(0,Q.jsx)(ar,{id:`authorized-clients`,title:`Authorized clients`,summary:gi(or,zr),control:tn?(0,Q.jsx)(ki,{delegatableScopes:y??[],onPairingLinkCreated:ee,clientSessions:en&&sn.error===null&&sn.data?.type===`snapshot`?or:null,isRevokingOtherClients:ae,onRevokeOtherClients:wr}):void 0,children:(0,Q.jsx)(Et,{scrollFade:!0,chainVerticalScroll:!0,className:`max-h-[22.5rem]`,"data-testid":`authorized-clients-scroll-area`,children:en?Ri(`current`):(0,Q.jsx)(`p`,{className:`px-4 py-3 text-xs text-muted-foreground`,children:`This connection can create access links but cannot view authorized clients.`})})}):null,(0,Q.jsx)(Tn,{open:Ve&&on,onOpenChange:e=>{Re||G(e)},onOpenChangeComplete:e=>{e||Bt(null)},children:(0,Q.jsxs)(Dn,{children:[(0,Q.jsxs)(In,{children:[(0,Q.jsx)(kn,{children:zt===`network-accessible`?`Enable network access?`:`Disable network access?`}),(0,Q.jsx)(Nn,{children:zt===`network-accessible`?`Let your other devices connect to P4 Code over the network. Pair devices to give them access. P4 Code will restart.`:`Devices connected over your local network will disconnect. Existing tunnels, such as P4 Connect or Tailscale HTTPS, keep working. P4 Code will restart.`})]}),(0,Q.jsxs)(Pn,{children:[(0,Q.jsx)(Qn,{disabled:Re,render:(0,Q.jsx)(I,{variant:`outline`,disabled:Re}),children:(0,Q.jsx)(`span`,{className:`[text-box:trim-both_cap_alphabetic]`,children:`Cancel`})}),(0,Q.jsxs)(I,{variant:`default`,onClick:gr,disabled:!on||zt===null||Re,children:[Re&&(0,Q.jsx)(Xe,{size:`sm`}),(0,Q.jsx)(`span`,{className:`[text-box:trim-both_cap_alphabetic]`,children:Re?`Restarting…`:zt===`network-accessible`?`Restart and enable`:`Restart and disable`})]})]})]})}),(0,Q.jsx)(Tn,{open:mt&&on,onOpenChange:e=>{q||e||dt(null)},children:(0,Q.jsxs)(Dn,{children:[(0,Q.jsxs)(In,{children:[(0,Q.jsx)(kn,{children:J?.kind===`disable`?J.wasWslOnly?`Turn off WSL and switch back to Windows?`:`Disable WSL backend?`:J?.kind===`distro`?`Switch WSL distro?`:J?.kind===`enable`?`Start the WSL backend`:J?.nextValue?`Run only the WSL backend?`:`Re-enable the Windows backend?`}),(0,Q.jsx)(Nn,{children:J?.kind===`disable`?J.wasWslOnly?`P4 Code will restart on the Windows backend. Threads and projects opened against WSL stay safe inside the distro and become available again when you re-enable WSL.`:`The WSL backend will stop. Threads and projects opened against WSL stay safe inside the distro, but they'll be unavailable in P4 Code until you re-enable WSL.`:J?.kind===`distro`?`P4 Code will restart the WSL backend on the new distro. Sessions still running on the current distro will be interrupted.`:J?.kind===`enable`?`Run the WSL backend alongside the Windows one, or stop the Windows backend and use only WSL? You can change this later from Settings.`:J?.nextValue?`P4 Code will restart and start only the WSL backend. Your Windows-side projects won't be accessible until you turn this off again.`:`P4 Code will restart and bring the Windows backend back up alongside WSL.`})]}),(0,Q.jsxs)(Pn,{children:[(0,Q.jsx)(Qn,{disabled:q,render:(0,Q.jsx)(I,{variant:`outline`,disabled:q}),children:`Cancel`}),J?.kind===`enable`?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(I,{variant:`outline`,onClick:()=>Oi(`wsl-only`),disabled:q||!on,children:q?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Xe,{size:`sm`}),`Applying…`]}):`Use only WSL`}),(0,Q.jsx)(I,{variant:`default`,onClick:()=>Oi(`both`),disabled:q||!on,children:q?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Xe,{size:`sm`}),`Applying…`]}):`Run both backends`})]}):(0,Q.jsx)(I,{variant:J?.kind===`disable`||J?.kind===`wsl-only`&&J.nextValue?`destructive`:`default`,onClick:Fi,disabled:q||!on,children:q?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Xe,{size:`sm`}),`Applying…`]}):J?.kind===`disable`?J.wasWslOnly?`Switch to Windows`:`Disable WSL`:J?.kind===`distro`?`Switch distro`:J?.nextValue?`Restart and enable`:`Restart and disable`})]})]})}),(0,Q.jsx)(Tn,{open:_t&&on,onOpenChange:e=>{Ze||It(e)},children:(0,Q.jsxs)(Dn,{children:[(0,Q.jsxs)(In,{children:[(0,Q.jsx)(kn,{children:`Disable Tailscale HTTPS?`}),(0,Q.jsx)(Nn,{children:`P4 Code will restart the local backend without Tailscale Serve.`})]}),(0,Q.jsxs)(Pn,{children:[(0,Q.jsx)(Qn,{disabled:Ze,render:(0,Q.jsx)(I,{variant:`outline`,disabled:Ze}),children:`Cancel`}),(0,Q.jsx)(I,{variant:`destructive`,onClick:()=>void br(),disabled:Ze||!on,children:Ze?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Xe,{size:`sm`}),`Restarting…`]}):`Restart and disable`})]})]})}),(0,Q.jsx)(Ft,{open:ht!==null,onOpenChange:e=>{Ze||e||gt(null)},children:(0,Q.jsxs)(Pt,{className:`max-w-md`,children:[(0,Q.jsxs)(Dt,{children:[(0,Q.jsx)(Ot,{children:`Set up Tailscale HTTPS?`}),(0,Q.jsx)(Nt,{children:`P4 Code will restart the local backend with Tailscale Serve enabled and ask Tailscale to proxy HTTPS traffic to this backend.`})]}),(0,Q.jsxs)(Mt,{children:[(0,Q.jsxs)(`label`,{className:`block`,children:[(0,Q.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:`HTTPS port`}),(0,Q.jsx)(Tt,{className:`mt-2`,type:`number`,inputMode:`numeric`,min:1,max:65535,step:1,value:Lt,onChange:e=>Rt(e.target.value),disabled:Ze})]}),fr?null:(0,Q.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:`Enter a port from 1 to 65535.`}),(0,Q.jsxs)(`div`,{className:`rounded-md border border-border/70 bg-muted/20 px-3 py-2`,children:[(0,Q.jsx)(`p`,{className:`text-xs font-medium text-muted-foreground`,children:`HTTPS endpoint`}),(0,Q.jsxs)(We,{children:[(0,Q.jsx)(He,{render:(0,Q.jsx)(`p`,{className:`mt-1 truncate text-sm text-foreground`,children:mr??`Pending MagicDNS endpoint`})}),mr?(0,Q.jsx)(Ue,{side:`top`,children:mr}):null]})]})]}),(0,Q.jsxs)(kt,{children:[(0,Q.jsx)(jt,{disabled:Ze,render:(0,Q.jsx)(I,{variant:`outline`,disabled:Ze}),children:`Cancel`}),(0,Q.jsx)(I,{onClick:()=>void _r(),disabled:Ze||!fr,children:Ze?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Xe,{size:`sm`}),`Restarting…`]}):`Enable`})]})]})})]})});return(0,Q.jsxs)(hn,{children:[Vi,(0,Q.jsxs)(gn,{...Zn(`remote-environments`),title:`Environments`,headerAction:(0,Q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[T.length>0?(0,Q.jsx)(Gn,{targets:T,variant:`ghost-muted`}):null,(0,Q.jsxs)(Ft,{open:le,onOpenChange:e=>{ue(e),e?pe(null):H(null)},children:[(0,Q.jsxs)(We,{children:[(0,Q.jsx)(He,{render:(0,Q.jsx)(At,{render:(0,Q.jsxs)(I,{size:`xs`,variant:`ghost-muted`,"aria-label":`Add environment`,children:[(0,Q.jsx)(ye,{className:`size-3`}),(0,Q.jsx)(`span`,{children:`Add environment`})]})})}),(0,Q.jsx)(Ue,{side:`top`,children:`Add environment`})]}),(0,Q.jsxs)(Pt,{className:`max-h-[80dvh] sm:max-w-3xl`,children:[(0,Q.jsxs)(Dt,{children:[(0,Q.jsx)(Ot,{children:F?`Add a route to ${F.label}`:`Add Environment`}),(0,Q.jsx)(Nt,{children:F?`Pair this machine again over another address, such as its Tailscale name. It joins the existing routes instead of adding a second machine.`:`Pair another environment to this client.`})]}),(0,Q.jsx)(Mt,{children:(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[Zr({mode:`remote`,title:`Remote link`,description:`Enter a backend host and pairing code.`,icon:(0,Q.jsx)(ve,{"aria-hidden":!0,className:`size-4`})}),e?Zr({mode:`ssh`,title:`SSH`,description:`Use local SSH config, agent, and tunnels for the backend.`,icon:(0,Q.jsx)(Se,{"aria-hidden":!0,className:`size-4`})}):null]}),(0,Q.jsx)(Ht,{children:me===`ssh`?fi():si()})]})})]})]})]}),children:[S.map(e=>(0,Q.jsx)(Pi,{environment:e,removingEnvironmentId:Ie,onSetEnabled:Nr,onRemove:Lr,onAddRoute:e=>{pe(e),H(null),ue(!0)}},e.environmentId)),(0,Q.jsx)(qi,{primaryEnvironmentId:_,savedEnvironments:x})]}),Fe()?(0,Q.jsx)(Mr,{environmentLabel:Fr?.label??null,onCancel:()=>Ir(null),onConfirm:()=>{Fr&&(Ir(null),Pr(Fr))}}):null,(0,Q.jsx)(Tr,{environments:E}),(0,Q.jsx)(Ar,{environments:E})]})}function Yi(e){let{kind:t}=e;K.add({type:`success`,title:t===`hosted-link`?`Hosted app link copied`:t===`link`?`Pairing URL copied`:`Pairing code copied`,description:t===`hosted-link`?`Open it in the browser on the device you want to connect.`:t===`link`?`Open it in the client you want to pair to this environment.`:`Paste it into another client to finish pairing.`})}function Xi(e){return Ti(e)?`hosted-link`:`link`}function Zi(e){return!e}function Qi(e){return e.currentTarget.select()}function $i(e){return e.currentTarget.select()}function ea(e){return e!==null}var ta=Ji;export{ta as component};
|
|
2
|
-
//# sourceMappingURL=settings.connections-BKWbsMUk.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{ha as t,jx as n}from"./utils-BxISc9RR.js";import{n as r}from"./SettingsPanels-DAv_V_mk.js";var i=n(),a=e(t());function o(){let e=(0,i.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsx)(r,{}),e[0]=t):t=e[0],t}export{o as component};
|
|
2
|
-
//# sourceMappingURL=settings.general-CoPWyKC4.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$b as n,Gn as r,Ho as i,Yn as a,Zn as o,du as s,fu as c,ha as l,hs as u,jx as d,l as f,lu as p,or as m,pu as h,sr as g,t as _,uu as v,vm as y}from"./utils-BxISc9RR.js";import{t as b}from"./box-CKWcQvdq.js";import{t as x}from"./chevron-down-DHV04o66.js";import{t as S}from"./plus-Cr075-cy.js";import{t as C}from"./plug-Cdxb0djR.js";import{t as w}from"./refresh-cw-PY_ECjtI.js";import{t as T}from"./search-Cr9eaeTj.js";import{t as E}from"./trash-2-CiyAV2xI.js";import{a as D,n as O,t as k}from"./tooltip-B0rhqi5b.js";import{n as A}from"./ChatMarkdown-C6UsXjP9.js";import{a as j,c as M,o as ee,s as te,t as ne}from"./select-CjGEfXy_.js";import{t as N}from"./useLocation-BN5q7LjL.js";import{p as P}from"./toast-BX9uiMAh.js";import{C as F}from"./useSettings-BIggY3j1.js";import{f as I}from"./server-BYntb2dN.js";import{t as L}from"./use-atom-command-RgcuqzP9.js";import{s as R,u as re}from"./providerSkills-D0IxW0_5.js";import{t as z}from"./skeleton-CS8ffFVv.js";import{t as B}from"./textarea-CYXHTTG6.js";import{n as ie,t as V}from"./toggle-group-W0bDGcPB.js";import{t as H}from"./input-DaCwubQj.js";import{c as U,r as ae,s as oe,t as se}from"./dialog-CPLO59bH.js";import{i as W,o as G,r as K,t as ce}from"./empty-tr-EsB66.js";import{n as le,r as ue,t as de}from"./input-group-DJwXFHGO.js";import{a as fe}from"./projectFilesQueryState-C1crs3C8.js";import{B as pe,P as q,U as J,a as me,i as he,s as ge}from"./settingsLayout-DV36_Jgq.js";import{Ar as _e,Fr as ve,Ir as ye,La as be,Mr as xe,Ni as Se,Nr as Ce,Pr as we,Qo as Te,bs as Ee,ir as De,jr as Oe,no as ke,uo as Ae}from"./main-uLg3xUJM.js";import{t as je}from"./SecretInput-CNWNAhNe.js";var Y=d(),Me={spawn:`Failed to start`,timeout:`Timed out`,protocol:`Not an MCP server`,http:`Can't connect`,auth:`Credentials rejected`};function Ne(e,t,n){if(!e.enabled)return{tone:`muted`,label:`Off`,needsSignIn:!1};if(n)return{tone:`muted`,label:`Checking…`,needsSignIn:!1};let r=e.transport.type===`http`&&e.transport.auth===`oauth`;if(r&&t?.auth===`signed-out`)return{tone:`warning`,label:`Needs sign-in`,needsSignIn:!0};let i=t?.health;switch(i?.status){case`connected`:return{tone:`success`,label:`Connected · ${i.toolCount} ${i.toolCount===1?`tool`:`tools`}`,needsSignIn:!1};case`needs-auth`:return{tone:`warning`,label:`Needs sign-in`,needsSignIn:r};case`error`:return{tone:`error`,label:Me[i.category],detail:i.message,needsSignIn:!1};default:return{tone:`muted`,label:`Not checked`,needsSignIn:!1}}}function Pe(e){let t=e.transport;if(t.type===`http`)try{let e=new URL(t.url);return`Remote · ${e.host}${e.pathname===`/`?``:e.pathname}`}catch{return`Remote`}return[t.command,...t.args].join(` `)}var X=e(t(),1),Z=e(l(),1);function Fe({environmentId:e,plugin:t,enabled:s,disabled:c,onDetails:l,onToggle:d}){let f=i(fe(e,t.path,`.claude-plugin/plugin.json`)),p=n(u(f)),h,_;try{let e=p&&!p.truncated?JSON.parse(p.contents):null;if(typeof e==`object`&&e&&(`description`in e&&typeof e.description==`string`&&(h=e.description),`author`in e)){let t=e.author;typeof t==`string`?_=t:typeof t==`object`&&t&&`name`in t&&typeof t.name==`string`&&(_=t.name)}}catch{}let v=re(e);return(0,Z.jsxs)(`li`,{className:`flex items-center gap-4 py-4`,children:[(0,Z.jsx)(`span`,{"aria-hidden":!0,className:`flex size-10 shrink-0 items-center justify-center rounded-xl border border-border/60 bg-muted`,children:(0,Z.jsx)(Ae,{className:`size-5 text-muted-foreground`})}),(0,Z.jsxs)(`div`,{className:`grid min-w-0 flex-1 gap-1`,children:[(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2`,children:[(0,Z.jsx)(`span`,{className:`break-words text-sm font-medium`,children:t.name}),_?(0,Z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:_}):null]}),(0,Z.jsx)(`p`,{className:`break-words text-xs text-muted-foreground`,children:h??`Local Claude plugin`})]}),(0,Z.jsxs)(r,{children:[(0,Z.jsxs)(k,{children:[(0,Z.jsx)(D,{render:(0,Z.jsx)(m,{render:(0,Z.jsx)(g,{variant:`ghost`,size:`icon-sm`,"aria-label":`More for ${t.name}`,children:(0,Z.jsx)(Te,{"aria-hidden":!0})})})}),(0,Z.jsx)(O,{children:`Plugin actions`})]}),(0,Z.jsxs)(o,{align:`end`,children:[v.capabilities.canOpenDefault?(0,Z.jsx)(a,{onClick:()=>void v.activate(`open`,{environmentId:e,filePath:t.path,workspaceRoot:void 0}),children:`Open`}):null,(0,Z.jsx)(a,{onClick:l,children:`Details`})]})]}),(0,Z.jsx)(be,{"aria-label":`Load ${t.name}`,checked:s,disabled:c,onCheckedChange:d})]})}var Ie=[`Personal`,`Built-in`,`Project`,`Plugins`,`Other`];function Le(e){switch(R(e)){case`personal`:return`Personal`;case`system`:return`Built-in`;case`repo`:case`project`:return`Project`;case`app`:return`Plugins`;default:return`Other`}}var Re=[[`codex`,`Codex`],[`claudeAgent`,`Claude`],[`cursor`,`Cursor`],[`grok`,`Grok`],[`antigravity`,`Antigravity`],[`opencode`,`OpenCode`],[`muse`,`Muse`],[`pi`,`Pi`]],ze={remote:`Remote servers aren't supported by this provider`,"working-directory":`Servers with a working directory aren't supported here`,provider:`Not supported by this provider yet`};function Be(e){return Re.map(([t,n])=>{let r=s(t,e.transport),i=y.make(t);return{driver:i,label:n,enabled:r.supported&&!e.disabledProviders.includes(i),...r.supported?{}:{unsupported:ze[r.reason]}}})}var Ve={name:``,type:`stdio`,command:``,args:``,cwd:``,url:``,auth:`none`,values:[]};function He(e){let t=e.transport;return t.type===`stdio`?{...Ve,name:e.name,type:`stdio`,command:t.command,args:t.args.join(`
|
|
2
|
-
`),cwd:t.cwd??``,values:Object.entries(t.env).map(([e,t])=>({key:e,value:t}))}:{...Ve,name:e.name,type:`http`,url:t.url,auth:t.auth,values:Object.entries(t.headers).map(([e,t])=>({key:e,value:t}))}}var Q=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;function Ue(e,t){let n=e.name.trim();if(!n)return`Enter a name.`;if(!Q.test(n)||n.length>64)return`Use letters, numbers, dashes, and underscores.`;if(n===`t3-code`)return`That name belongs to P4 Code's own server.`;if(t.has(n))return`Another server already uses that name.`;if(e.type===`stdio`&&!e.command.trim())return`Enter the command that starts it.`;if(e.type===`http`&&!/^https?:\/\/\S+$/i.test(e.url.trim()))return`Enter an http or https URL.`}function We(e,t){let n=Object.fromEntries(e.values.map(e=>[e.key.trim(),e.value]).filter(([e])=>e.length>0)),r=e.type===`stdio`?{type:`stdio`,command:e.command.trim(),args:e.args.split(`
|
|
3
|
-
`).map(e=>e.trim()).filter(e=>e.length>0),env:n,...e.cwd.trim()?{cwd:e.cwd.trim()}:{}}:{type:`http`,url:e.url.trim(),headers:n,auth:e.auth};return{name:e.name.trim(),enabled:t?.enabled??!0,transport:r,disabledProviders:t?.disabledProviders??[],...t?.source===void 0?{}:{source:t.source}}}function Ge(e){let t=new Map;for(let n of e){let e=n.displayName??n.driver;for(let r of n.skills){let n=`${r.scope??``}\u0000${r.name}`,i=t.get(n);i===void 0?t.set(n,{skill:r,providers:[e]}):i.providers.includes(e)||i.providers.push(e)}}return[...t.values()].toSorted((e,t)=>Ke(e.skill).localeCompare(Ke(t.skill)))}var Ke=e=>e.displayName??e.name.split(/[-_\s]+/).filter(e=>e.length>0).map(e=>e[0].toUpperCase()+e.slice(1)).join(` `);function qe(e){switch(e){case void 0:return;case`user`:return`Personal`;case`project`:case`repo`:return`Project`;case`system`:return`Built-in`;default:return e[0].toUpperCase()+e.slice(1)}}function Je(e){let t=/^---\r?\n[\s\S]*?\r?\n---\r?\n?/.exec(e);return(t===null?e:e.slice(t[0].length)).trimStart()}function Ye(e){let t=(0,Y.c)(14),{title:n,onBack:r,onUninstall:i,children:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(Ee,{"aria-hidden":!0}),t[0]=o):o=t[0];let s;t[1]===r?s=t[2]:(s=(0,Z.jsxs)(g,{size:`xs`,variant:`ghost`,className:`w-fit`,onClick:r,children:[o,`Back`]}),t[1]=r,t[2]=s);let c;t[3]===n?c=t[4]:(c=(0,Z.jsx)(`h2`,{className:`min-w-0 truncate text-xl font-semibold text-foreground`,children:n}),t[3]=n,t[4]=c);let l;t[5]===i?l=t[6]:(l=i?(0,Z.jsxs)(g,{size:`sm`,variant:`destructive-outline`,onClick:i,children:[(0,Z.jsx)(E,{"aria-hidden":!0}),`Uninstall`]}):null,t[5]=i,t[6]=l);let u;t[7]!==c||t[8]!==l?(u=(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[c,l]}),t[7]=c,t[8]=l,t[9]=u):u=t[9];let d;return t[10]!==a||t[11]!==s||t[12]!==u?(d=(0,Z.jsxs)(`div`,{className:`grid gap-6`,children:[s,u,a]}),t[10]=a,t[11]=s,t[12]=u,t[13]=d):d=t[13],d}function $(e){let t=(0,Y.c)(6),{label:n,htmlFor:r,children:i}=e,a;t[0]!==r||t[1]!==n?(a=(0,Z.jsx)(Se,{htmlFor:r,children:n}),t[0]=r,t[1]=n,t[2]=a):a=t[2];let o;return t[3]!==i||t[4]!==a?(o=(0,Z.jsxs)(`div`,{className:`grid gap-2 px-4 py-4`,children:[a,i]}),t[3]=i,t[4]=a,t[5]=o):o=t[5],o}function Xe(e){let t=(0,Y.c)(69),{server:n,takenNames:r,onSave:i}=e,a;t[0]===n?a=t[1]:(a=n===void 0?Ve:He(n),t[0]=n,t[1]=a);let o=a,[s,c]=(0,X.useState)(o),l;t[2]===o?l=t[3]:(l=JSON.stringify(o),t[2]=o,t[3]=l);let u=l,[d,f]=(0,X.useState)(u);u!==d&&(f(u),c(o));let p;t[4]!==s||t[5]!==r?(p=Ue(s,r),t[4]=s,t[5]=r,t[6]=p):p=t[6];let m=p,h;t[7]===s?h=t[8]:(h=JSON.stringify(s),t[7]=s,t[8]=h);let _=h!==u,v;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(v=e=>c(t=>({...t,...e})),t[9]=v):v=t[9];let y=v,b=s.type===`stdio`?`Environment variables`:`Headers`,x;t[10]===s.values?x=t[11]:(x=(e,t)=>y({values:s.values.map((n,r)=>r===e?{...n,...t}:n)}),t[10]=s.values,t[11]=x);let C=x,w;t[12]!==_||t[13]!==s||t[14]!==i||t[15]!==m||t[16]!==n?(w=e=>{e.preventDefault(),_&&m===void 0&&i(We(s,n))},t[12]=_,t[13]=s,t[14]=i,t[15]=m,t[16]=n,t[17]=w):w=t[17];let T;t[18]===n?T=t[19]:(T=n===void 0?null:(0,Z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`To switch between a command and a URL, uninstall the server and add it again.`}),t[18]=n,t[19]=T);let D;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(D=e=>y({name:e.target.value}),t[20]=D):D=t[20];let O;t[21]===s.name?O=t[22]:(O=(0,Z.jsx)($,{label:`Name`,htmlFor:`mcp-server-name`,children:(0,Z.jsx)(H,{id:`mcp-server-name`,placeholder:`github`,value:s.name,onChange:D})}),t[21]=s.name,t[22]=O);let k;t[23]!==s.type||t[24]!==n?(k=n===void 0?(0,Z.jsx)($,{label:`Type`,children:(0,Z.jsxs)(ie,{"aria-label":`How P4 Code reaches the server`,value:[s.type],onValueChange:e=>{let t=e[0];(t===`stdio`||t===`http`)&&y({type:t,values:[]})},children:[(0,Z.jsx)(V,{value:`stdio`,children:`Command`}),(0,Z.jsx)(V,{value:`http`,children:`URL`})]})}):null,t[23]=s.type,t[24]=n,t[25]=k):k=t[25];let A;t[26]!==s.args||t[27]!==s.auth||t[28]!==s.command||t[29]!==s.cwd||t[30]!==s.type||t[31]!==s.url?(A=s.type===`stdio`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)($,{label:`Command`,htmlFor:`mcp-server-command`,children:(0,Z.jsx)(H,{id:`mcp-server-command`,placeholder:`npx`,value:s.command,onChange:e=>y({command:e.target.value})})}),(0,Z.jsx)($,{label:`Arguments, one per line`,htmlFor:`mcp-server-args`,children:(0,Z.jsx)(B,{id:`mcp-server-args`,placeholder:`-y
|
|
4
|
-
@modelcontextprotocol/server-postgres`,value:s.args,onChange:e=>y({args:e.target.value})})}),(0,Z.jsx)($,{label:`Working directory (optional)`,htmlFor:`mcp-server-cwd`,children:(0,Z.jsx)(H,{id:`mcp-server-cwd`,placeholder:`The session's project folder`,value:s.cwd,onChange:e=>y({cwd:e.target.value})})})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)($,{label:`URL`,htmlFor:`mcp-server-url`,children:(0,Z.jsx)(H,{id:`mcp-server-url`,placeholder:`https://mcp.example.com/mcp`,value:s.url,onChange:e=>y({url:e.target.value})})}),(0,Z.jsx)($,{label:`Authentication`,children:(0,Z.jsxs)(ne,{value:s.auth,onValueChange:e=>{(e===`none`||e===`oauth`)&&y({auth:e})},children:[(0,Z.jsx)(te,{"aria-label":`Authentication`,children:(0,Z.jsx)(M,{children:Ze})}),(0,Z.jsxs)(ee,{alignItemWithTrigger:!1,children:[(0,Z.jsx)(j,{value:`none`,children:`None or headers`}),(0,Z.jsx)(j,{value:`oauth`,children:`OAuth (sign in after saving)`})]})]})})]}),t[26]=s.args,t[27]=s.auth,t[28]=s.command,t[29]=s.cwd,t[30]=s.type,t[31]=s.url,t[32]=A):A=t[32];let N;t[33]!==s.type||t[34]!==s.values||t[35]!==C||t[36]!==b?(N=s.values.map((e,t)=>(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(H,{"aria-label":`${b} name`,placeholder:s.type===`stdio`?`API_TOKEN`:`Authorization`,value:e.key,onChange:e=>C(t,{key:e.target.value})}),(0,Z.jsx)(je,{"aria-label":`${b} value`,placeholder:`Value`,value:e.value,onChange:e=>C(t,{value:e.target.value})}),(0,Z.jsx)(g,{size:`icon-sm`,variant:`ghost`,"aria-label":`Remove ${e.key||`row`}`,onClick:()=>y({values:s.values.filter((e,n)=>n!==t)}),children:(0,Z.jsx)(E,{"aria-hidden":!0})})]},t)),t[33]=s.type,t[34]=s.values,t[35]=C,t[36]=b,t[37]=N):N=t[37];let P;t[38]===s.values?P=t[39]:(P=()=>y({values:[...s.values,{key:``,value:``}]}),t[38]=s.values,t[39]=P);let F;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Z.jsx)(S,{"aria-hidden":!0}),t[40]=F):F=t[40];let I=s.type===`stdio`?`variable`:`header`,L;t[41]!==P||t[42]!==I?(L=(0,Z.jsxs)(g,{variant:`soft`,onClick:P,children:[F,`Add `,I]}),t[41]=P,t[42]=I,t[43]=L):L=t[43];let R;t[44]!==N||t[45]!==L?(R=(0,Z.jsxs)(`div`,{className:`grid gap-2`,children:[N,L]}),t[44]=N,t[45]=L,t[46]=R):R=t[46];let re;t[47]!==R||t[48]!==b?(re=(0,Z.jsx)($,{label:b,children:R}),t[47]=R,t[48]=b,t[49]=re):re=t[49];let z;t[50]!==O||t[51]!==k||t[52]!==A||t[53]!==re?(z=(0,Z.jsxs)(J,{children:[O,k,A,re]}),t[50]=O,t[51]=k,t[52]=A,t[53]=re,t[54]=z):z=t[54];let U;t[55]!==_||t[56]!==m?(U=_&&m!==void 0?(0,Z.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive-foreground`,children:m}):null,t[55]=_,t[56]=m,t[57]=U):U=t[57];let ae=!_||m!==void 0,oe=n===void 0?`Add server`:`Save`,se;t[58]!==ae||t[59]!==oe?(se=(0,Z.jsx)(g,{type:`submit`,disabled:ae,children:oe}),t[58]=ae,t[59]=oe,t[60]=se):se=t[60];let W;t[61]!==U||t[62]!==se?(W=(0,Z.jsxs)(`div`,{className:`flex items-center justify-end gap-3`,children:[U,se]}),t[61]=U,t[62]=se,t[63]=W):W=t[63];let G;return t[64]!==z||t[65]!==W||t[66]!==w||t[67]!==T?(G=(0,Z.jsxs)(`form`,{className:`grid gap-3`,onSubmit:w,children:[T,z,W]}),t[64]=z,t[65]=W,t[66]=w,t[67]=T,t[68]=G):G=t[68],G}function Ze(e){return e===`oauth`?`OAuth (sign in after saving)`:`None or headers`}function Qe(e){let t=(0,Y.c)(35),{plugin:n,environmentLabel:r,onSave:i}=e,[a,o]=(0,X.useState)(n?.name??``),[s,c]=(0,X.useState)(n?.path??``),l=`${n?.name??``}\u0000${n?.path??``}`,[u,d]=(0,X.useState)(l);l!==u&&(d(l),o(n?.name??``),c(n?.path??``));let f=a!==(n?.name??``)||s!==(n?.path??``),p;t[0]!==a||t[1]!==s?(p=a.trim().length>0&&s.trim().startsWith(`/`),t[0]=a,t[1]=s,t[2]=p):p=t[2];let m=p,h;t[3]!==f||t[4]!==a||t[5]!==i||t[6]!==s||t[7]!==n?.enabled||t[8]!==m?(h=e=>{e.preventDefault(),f&&m&&i({name:a.trim(),path:s.trim(),enabled:n?.enabled??!0})},t[3]=f,t[4]=a,t[5]=i,t[6]=s,t[7]=n?.enabled,t[8]=m,t[9]=h):h=t[9];let _;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>o(e.target.value),t[10]=_):_=t[10];let v;t[11]===a?v=t[12]:(v=(0,Z.jsx)($,{label:`Name`,htmlFor:`plugin-name`,children:(0,Z.jsx)(H,{id:`plugin-name`,value:a,onChange:_})}),t[11]=a,t[12]=v);let y=`Folder on ${r}`,b;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(b=e=>c(e.target.value),t[13]=b):b=t[13];let x;t[14]===s?x=t[15]:(x=(0,Z.jsx)(H,{id:`plugin-path`,placeholder:`/Users/me/plugins/my-plugin`,value:s,onChange:b}),t[14]=s,t[15]=x);let S;t[16]!==y||t[17]!==x?(S=(0,Z.jsx)($,{label:y,htmlFor:`plugin-path`,children:x}),t[16]=y,t[17]=x,t[18]=S):S=t[18];let C;t[19]!==v||t[20]!==S?(C=(0,Z.jsxs)(J,{children:[v,S]}),t[19]=v,t[20]=S,t[21]=C):C=t[21];let w;t[22]!==f||t[23]!==m?(w=f&&!m?(0,Z.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive-foreground`,children:`Enter a name and the plugin folder's full path.`}):null,t[22]=f,t[23]=m,t[24]=w):w=t[24];let T=!f||!m,E=n===void 0?`Add plugin`:`Save`,D;t[25]!==T||t[26]!==E?(D=(0,Z.jsx)(g,{type:`submit`,disabled:T,children:E}),t[25]=T,t[26]=E,t[27]=D):D=t[27];let O;t[28]!==w||t[29]!==D?(O=(0,Z.jsxs)(`div`,{className:`flex items-center justify-end gap-3`,children:[w,D]}),t[28]=w,t[29]=D,t[30]=O):O=t[30];let k;return t[31]!==O||t[32]!==h||t[33]!==C?(k=(0,Z.jsxs)(`form`,{className:`grid gap-3`,onSubmit:h,children:[C,O]}),t[31]=O,t[32]=h,t[33]=C,t[34]=k):k=t[34],k}var $e=e=>e.replace(/[\\/][^\\/]*$/,``)||`/`;function et(e){let t=(0,Y.c)(69),{entry:s,environmentId:c,onClose:l}=e,{skill:d,providers:f}=s,p,h,_;t[0]!==c||t[1]!==d.path?(p=$e(d.path),h=i,_=fe(c,p,d.path),t[0]=c,t[1]=d.path,t[2]=p,t[3]=h,t[4]=_):(p=t[2],h=t[3],_=t[4]);let v=h(_),y;t[5]===v?y=t[6]:(y=n(u(v)),t[5]=v,t[6]=y);let x=y,S=re(c),{copyToClipboard:C}=P(),w;t[7]!==c||t[8]!==d.path?(w={environmentId:c,filePath:d.path,workspaceRoot:void 0},t[7]=c,t[8]=d.path,t[9]=w):w=t[9];let T=w,E=d.shortDescription??d.description,D;t[10]===d.scope?D=t[11]:(D=qe(d.scope),t[10]=d.scope,t[11]=D);let O=D,k;t[12]===l?k=t[13]:(k=e=>!e&&l(),t[12]=l,t[13]=k);let j;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,Z.jsx)(`span`,{"aria-hidden":!0,className:`flex size-12 shrink-0 items-center justify-center rounded-full border border-border/60 text-muted-foreground`,children:(0,Z.jsx)(b,{className:`size-5`})}),t[14]=j):j=t[14];let M;t[15]===d?M=t[16]:(M=Ke(d),t[15]=d,t[16]=M);let ee=`More for ${M}`,te;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,Z.jsx)(Te,{"aria-hidden":!0}),t[17]=te):te=t[17];let ne;t[18]===ee?ne=t[19]:(ne=(0,Z.jsx)(m,{render:(0,Z.jsx)(g,{size:`icon-sm`,variant:`ghost`,"aria-label":ee,children:te})}),t[18]=ee,t[19]=ne);let N;t[20]!==S||t[21]!==T?(N=S.capabilities.canOpenDefault?(0,Z.jsx)(a,{onClick:()=>void S.activate(`open`,T),children:`Open`}):null,t[20]=S,t[21]=T,t[22]=N):N=t[22];let F;t[23]!==S||t[24]!==T?(F=S.capabilities.revealLabel?(0,Z.jsx)(a,{onClick:()=>void S.activate(`reveal-in-folder`,T),children:S.capabilities.revealLabel}):null,t[23]=S,t[24]=T,t[25]=F):F=t[25];let I=x===null,L;t[26]!==C||t[27]!==x?(L=()=>x&&C(x.contents,void 0),t[26]=C,t[27]=x,t[28]=L):L=t[28];let R;t[29]!==I||t[30]!==L?(R=(0,Z.jsx)(a,{disabled:I,onClick:L,children:`Copy Markdown`}),t[29]=I,t[30]=L,t[31]=R):R=t[31];let B;t[32]!==N||t[33]!==F||t[34]!==R?(B=(0,Z.jsxs)(o,{align:`end`,children:[N,F,R]}),t[32]=N,t[33]=F,t[34]=R,t[35]=B):B=t[35];let ie;t[36]!==ne||t[37]!==B?(ie=(0,Z.jsxs)(`div`,{className:`flex items-start justify-between gap-3 pe-8`,children:[j,(0,Z.jsxs)(r,{children:[ne,B]})]}),t[36]=ne,t[37]=B,t[38]=ie):ie=t[38];let V;t[39]===d?V=t[40]:(V=Ke(d),t[39]=d,t[40]=V);let H;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,Z.jsx)(`span`,{className:`font-normal text-muted-foreground`,children:`Skill`}),t[41]=H):H=t[41];let W;t[42]===V?W=t[43]:(W=(0,Z.jsxs)(U,{children:[V,` `,H]}),t[42]=V,t[43]=W);let G;t[44]===E?G=t[45]:(G=E?(0,Z.jsx)(ae,{children:E}):null,t[44]=E,t[45]=G);let K;t[46]!==W||t[47]!==G?(K=(0,Z.jsxs)(`div`,{className:`grid gap-1.5`,children:[W,G]}),t[46]=W,t[47]=G,t[48]=K):K=t[48];let ce;t[49]!==p||t[50]!==c||t[51]!==x||t[52]!==v?(ce=(0,Z.jsx)(`div`,{className:`max-h-[50vh] min-h-24 overflow-y-auto rounded-xl border border-border/60 bg-card/40 px-5 py-4`,children:x===null?v._tag===`Failure`?(0,Z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This skill's file could not be read. It may have moved since the provider last scanned it.`}):(0,Z.jsxs)(`div`,{className:`grid gap-2`,children:[(0,Z.jsx)(z,{className:`h-4 w-3/4`}),(0,Z.jsx)(z,{className:`h-4 w-full`}),(0,Z.jsx)(z,{className:`h-4 w-2/3`})]}):(0,Z.jsx)(A,{text:Je(x.contents),cwd:p,environmentId:c})}),t[49]=p,t[50]=c,t[51]=x,t[52]=v,t[53]=ce):ce=t[53];let le;t[54]===f?le=t[55]:(le=f.join(`, `),t[54]=f,t[55]=le);let ue=`Loaded by ${le}`,de;t[56]!==O||t[57]!==ue?(de=[O,ue].filter(Boolean),t[56]=O,t[57]=ue,t[58]=de):de=t[58];let pe=de.join(` · `),q;t[59]===pe?q=t[60]:(q=(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:pe}),t[59]=pe,t[60]=q);let J;t[61]!==ie||t[62]!==K||t[63]!==ce||t[64]!==q?(J=(0,Z.jsx)(oe,{className:`max-w-2xl`,children:(0,Z.jsxs)(`div`,{className:`grid min-h-0 gap-4 p-6`,children:[ie,K,ce,q]})}),t[61]=ie,t[62]=K,t[63]=ce,t[64]=q,t[65]=J):J=t[65];let me;return t[66]!==J||t[67]!==k?(me=(0,Z.jsx)(se,{open:!0,onOpenChange:k,children:J}),t[66]=J,t[67]=k,t[68]=me):me=t[68],me}var tt={claude:`Claude`,codex:`Codex`,cursor:`Cursor`},nt={success:`bg-success`,warning:`bg-warning`,error:`bg-destructive`,muted:`bg-muted-foreground/40`},rt={success:`text-success-foreground`,warning:`text-warning-foreground`,error:`text-destructive-foreground`,muted:`text-muted-foreground`};function it(e){let t=(0,Y.c)(13),{status:n,className:r}=e,i=rt[n.tone],a;t[0]!==r||t[1]!==i?(a=_(`flex min-w-0 items-center gap-1.5 text-xs`,i,r),t[0]=r,t[1]=i,t[2]=a):a=t[2];let o=nt[n.tone],s;t[3]===o?s=t[4]:(s=_(`size-1.5 shrink-0 rounded-full`,o),t[3]=o,t[4]=s);let c;t[5]===s?c=t[6]:(c=(0,Z.jsx)(`span`,{"aria-hidden":!0,className:s}),t[5]=s,t[6]=c);let l;t[7]===n.label?l=t[8]:(l=(0,Z.jsx)(`span`,{className:`truncate`,children:n.label}),t[7]=n.label,t[8]=l);let u;return t[9]!==a||t[10]!==c||t[11]!==l?(u=(0,Z.jsxs)(`span`,{className:a,children:[c,l]}),t[9]=a,t[10]=c,t[11]=l,t[12]=u):u=t[12],u}function at(){let e=(0,Y.c)(6),{environment:t,scope:n}=pe(),r=t?.connection.phase===`connected`&&t.serverConfig!==null,i=r?t.environmentId:null,a=r&&t.serverConfig?.environment.capabilities.mcpRegistry===!0,o;return e[0]!==r||e[1]!==t||e[2]!==i||e[3]!==n||e[4]!==a?(o=(0,Z.jsx)(he,{width:`wide`,children:t===null||!r?(0,Z.jsx)(ce,{children:(0,Z.jsxs)(W,{children:[(0,Z.jsx)(G,{children:`Connect to manage plugins and MCP servers`}),(0,Z.jsx)(K,{children:`They live on each environment. Choose a connected one above.`})]})}):!a||i===null?(0,Z.jsx)(ce,{children:(0,Z.jsxs)(W,{children:[(0,Z.jsxs)(G,{children:[`Update `,t.label,` to manage plugins and MCP servers`]}),(0,Z.jsx)(K,{children:`This environment runs a version without them.`})]})}):(0,Z.jsx)(lt,{environmentId:i,environmentLabel:t.label,projectId:n.kind===`checkout`?n.checkout.id:n.kind===`project`?n.members.find(e=>e.environmentId===i)?.id:void 0,projectLabel:n.kind===`project`||n.kind===`checkout`?n.label:void 0},i)}),e[0]=r,e[1]=t,e[2]=i,e[3]=n,e[4]=a,e[5]=o):o=e[5],o}var ot={plugins:`Search plugins`,mcps:`Search MCP servers`,skills:`Search skills`},st=(e,...t)=>e===``||t.some(t=>t.toLowerCase().includes(e));function ct(e){let t=(0,Y.c)(9),{text:n}=e,r=(0,X.useRef)(null),[i,a]=(0,X.useState)(!1),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=e=>{let t=r.current;a(e&&t!==null&&t.scrollWidth>t.clientWidth)},t[0]=o):o=t[0];let s;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Z.jsx)(`span`,{ref:r,tabIndex:0,className:`block truncate text-xs text-muted-foreground`}),t[1]=s):s=t[1];let c,l;t[2]===n?(c=t[3],l=t[4]):(c=(0,Z.jsx)(D,{render:s,children:n}),l=(0,Z.jsx)(O,{children:n}),t[2]=n,t[3]=c,t[4]=l);let u;return t[5]!==i||t[6]!==c||t[7]!==l?(u=(0,Z.jsxs)(k,{open:i,onOpenChange:o,children:[c,l]}),t[5]=i,t[6]=c,t[7]=l,t[8]=u):u=t[8],u}function lt({environmentId:e,environmentLabel:t,projectId:n,projectLabel:s}){let l=N({select:e=>e.hash}),[u,d]=(0,X.useState)(()=>l.replace(/^#/,``)===`mcp-servers`?`mcps`:l.replace(/^#/,``)===`skills`?`skills`:`plugins`),[_,y]=(0,X.useState)(``),[S,E]=(0,X.useState)(`All categories`),A=i(I.configValueAtom(e))?.providers,P=(0,X.useMemo)(()=>Ge(A??[]),[A]),[R,z]=(0,X.useState)(null),B=q(e=>e.mcpServers),H=q(e=>e.plugins),U=q(e=>e.projectSettingsOverrides),ae=q(e=>e.skillOverrides),oe=re(e),se=i(I.updateSettings.permissionAtom(e)),[W,G]=(0,X.useState)(null),K=i(I.mcpRegistryTest.permissionAtom(e)),ce=F(e),fe=L(I.updateSettings,{label:`update MCP registry`,reportFailure:!0}),pe=L(I.mcpRegistryState,{reportFailure:!1}),J=L(I.mcpRegistryTest,{label:`check MCP server`,reportFailure:!0}),me=L(I.mcpRegistryOAuthStart,{label:`start MCP sign-in`,reportFailure:!0}),he=L(I.mcpRegistryOAuthSignOut,{label:`sign out of MCP server`,reportFailure:!0}),Se=L(I.mcpRegistryDiscover,{reportFailure:!1}),Ee=L(I.mcpRegistryImport,{label:`import MCP servers`,reportFailure:!0}),[je,Y]=(0,X.useState)({}),[Me,Re]=(0,X.useState)(new Set),[ze,Be]=(0,X.useState)([]),[Ve,He]=(0,X.useState)({kind:`list`}),Q=Ve.kind!==`list`&&Ve.id!==null&&(Ve.kind===`server`?B[Ve.id]===void 0:H[Ve.id]===void 0)?{kind:`list`}:Ve,[Ue,We]=(0,X.useState)(l);if(l!==Ue){We(l);let e=l.replace(/^#/,``);(e===`mcp-servers`||e===`plugins`||e===`skills`)&&(d(e===`mcp-servers`?`mcps`:e),He({kind:`list`}))}let[qe,Je]=(0,X.useState)(null),[$,Ze]=(0,X.useState)(null),$e=(0,X.useMemo)(()=>Object.entries(B).map(([e,t])=>[p.make(e),t]).toSorted(([,e],[,t])=>e.name.localeCompare(t.name)),[B]),nt=(0,X.useMemo)(()=>Object.entries(H).map(([e,t])=>[v.make(e),t]),[H]),rt=(0,X.useCallback)(async()=>{let t=await pe({environmentId:e,input:{}});t._tag===`Success`&&Y(t.value.servers)},[e,pe]),at=(0,X.useCallback)(async()=>{if(!K)return;let t=await Se({environmentId:e,input:n===void 0?{}:{projectId:n}});t._tag===`Success`&&Be(t.value.servers)},[K,Se,e,n]);(0,X.useEffect)(()=>{rt(),at()},[rt,at]),(0,X.useEffect)(()=>{if($===null)return;let e=()=>void rt();return window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},[$,rt]);let lt=e=>{d(`mcps`),He({kind:`server`,id:e})},ut=e=>{d(`plugins`),He({kind:`plugin`,id:e})},pt=t=>fe({environmentId:e,input:{patch:t}}),mt=async t=>{Re(e=>new Set(e).add(t));let n=await J({environmentId:e,input:{serverId:t}});Re(e=>{let n=new Set(e);return n.delete(t),n}),n._tag===`Success`&&Y(e=>({...e,[t]:n.value}))},ht=async(e,t,n)=>{(await pt({mcpServers:{[e]:t}}))._tag===`Success`&&(n&&He({kind:`list`}),at(),t.enabled&&await mt(e))},gt=async t=>{let n=ce??window.location.origin,r=await me({environmentId:e,input:{serverId:t,origin:new URL(n,window.location.href).origin}});if(r._tag===`Success`){if(r.value.authorizationUrl===null){await mt(t);return}Ze(t),window.open(r.value.authorizationUrl,`_blank`,`noopener,noreferrer`)}},_t=(e,t,r)=>{if(n===void 0)return;let i=U[n]??{},a={...i[e]};r===void 0?delete a[t]:a[t]={enabled:r},pt({projectSettingsOverrides:{[n]:{...i,[e]:a}}})},vt=async()=>{let t=qe;if(Je(null),t!==null){if(t.kind===`server`){let n=B[t.id];n?.transport.type===`http`&&n.transport.auth===`oauth`&&await he({environmentId:e,input:{serverId:t.id}}),await pt({mcpServers:{[t.id]:null}})}else await pt({plugins:{[t.id]:null}});He({kind:`list`})}},yt=ze.filter(e=>!e.alreadyAdded),bt=new Set($e.filter(([e])=>Q.kind!==`server`||e!==Q.id).map(([,e])=>e.name)),xt=_.trim().toLowerCase(),St=$e.filter(([,e])=>st(xt,e.name,Pe(e))),Ct=nt.filter(([,e])=>st(xt,e.name,e.path)),wt=yt.filter(e=>st(xt,e.name,e.summary)),Tt=(e,t)=>c({mcpServers:B,plugins:H,projectSettingsOverrides:U},e,n??null,t),Et=(e,t,r)=>{if(n!==void 0){_t(e,t,r);return}pt(e===`mcpServers`?{mcpServers:{[t]:{...B[t],enabled:r}}}:{plugins:{[t]:{...H[t],enabled:r}}})},Dt=(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-4`,children:[(0,Z.jsxs)(`div`,{className:`grid gap-1`,children:[(0,Z.jsx)(`h1`,{className:`text-2xl font-semibold text-foreground`,children:`Plugins`}),(0,Z.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Manage plugins, skills, and MCP servers given to agents on `,t,`.`]})]}),K?(0,Z.jsxs)(r,{children:[(0,Z.jsx)(m,{render:(0,Z.jsxs)(g,{children:[`Add`,(0,Z.jsx)(x,{"aria-hidden":!0})]})}),(0,Z.jsxs)(o,{align:`end`,children:[(0,Z.jsxs)(a,{onClick:()=>lt(null),children:[(0,Z.jsx)(C,{"aria-hidden":!0}),`Add MCP server`]}),(0,Z.jsxs)(a,{onClick:()=>ut(null),children:[(0,Z.jsx)(Ae,{"aria-hidden":!0}),`Add plugin`]})]})]}):null]}),Ot=(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,Z.jsxs)(ie,{"aria-label":`Show`,variant:`default`,value:[u],onValueChange:e=>{let t=e[0];(t===`plugins`||t===`mcps`||t===`skills`)&&(d(t),He({kind:`list`}))},children:[(0,Z.jsxs)(V,{value:`plugins`,...De(`plugins`),children:[`Plugins `,(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:nt.length})]}),(0,Z.jsxs)(V,{value:`mcps`,...De(`mcp-servers`),children:[`MCPs `,(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:$e.length})]}),(0,Z.jsxs)(V,{value:`skills`,...De(`skills`),children:[`Skills `,(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:P.length})]})]}),(0,Z.jsxs)(`div`,{className:`flex w-full gap-2 sm:w-auto`,children:[u===`skills`?(0,Z.jsx)(`div`,{className:`w-fit shrink-0`,children:(0,Z.jsxs)(ne,{value:S,onValueChange:e=>e&&E(e),children:[(0,Z.jsx)(te,{"aria-label":`Skill category`,children:(0,Z.jsx)(M,{})}),(0,Z.jsxs)(ee,{children:[(0,Z.jsx)(j,{value:`All categories`,children:`All categories`}),Ie.filter(e=>e===`Personal`||e===`Built-in`||P.some(({skill:t})=>Le(t)===e)).map(e=>(0,Z.jsx)(j,{value:e,children:e},e))]})]})}):null,(0,Z.jsxs)(de,{className:`min-w-0 flex-1 sm:w-56`,children:[(0,Z.jsx)(le,{children:(0,Z.jsx)(T,{"aria-hidden":!0})}),(0,Z.jsx)(ue,{"aria-label":ot[u],placeholder:ot[u],value:_,onChange:e=>y(e.currentTarget.value)})]})]})]}),kt=(e,t)=>(0,Z.jsxs)(k,{children:[(0,Z.jsx)(D,{render:(0,Z.jsx)(g,{size:`icon-sm`,variant:`ghost`,"aria-label":e,onClick:t,children:(0,Z.jsx)(ke,{"aria-hidden":!0})})}),(0,Z.jsx)(O,{children:e})]}),At=Ct.length===0?(0,Z.jsx)(`p`,{className:`py-6 text-sm text-muted-foreground`,children:nt.length===0?`No plugins yet. Add a Claude Code plugin folder to load it in Claude sessions.`:`No plugins match your search.`}):(0,Z.jsx)(`ul`,{className:`grid gap-1`,children:Ct.map(([t,n])=>(0,Z.jsx)(Fe,{environmentId:e,plugin:n,enabled:Tt(`plugins`,t),disabled:!se,onDetails:()=>ut(t),onToggle:e=>Et(`plugins`,t,e)},t))}),jt=P.filter(({skill:e})=>(S===`All categories`||Le(e)===S)&&st(xt,Ke(e),e.name,e.shortDescription??``,e.description??``)),Mt=jt.length===0?(0,Z.jsx)(`p`,{className:`py-6 text-sm text-muted-foreground`,children:P.length===0?`No skills found. Providers report the skills they load when they start.`:`No skills match these filters.`}):(0,Z.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Switches apply to new Claude and OpenCode sessions.`}),(0,Z.jsx)(`ul`,{className:`grid gap-1`,children:jt.map(t=>{let i=Le(t.skill),s=(A??[]).filter(e=>h(e.driver)&&e.skills.some(e=>e.name===t.skill.name)),c=s.length?s.map(e=>e.displayName??e.driver).join(`, `):`Native settings`;return(0,Z.jsxs)(`li`,{className:`flex items-center gap-3 py-3`,children:[(0,Z.jsx)(`span`,{"aria-hidden":!0,className:`flex size-10 shrink-0 items-center justify-center rounded-full border border-border/60 text-muted-foreground`,children:(0,Z.jsx)(b,{className:`size-4`})}),(0,Z.jsxs)(`div`,{className:`grid min-w-0 flex-1 gap-1`,children:[(0,Z.jsx)(`button`,{type:`button`,onClick:()=>z(t),className:`w-fit break-words text-left text-sm font-medium outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,children:Ke(t.skill)}),(0,Z.jsx)(ct,{text:t.skill.shortDescription??t.skill.description??t.skill.path}),(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:[i,c].filter(Boolean).join(` · `)})]}),(0,Z.jsxs)(r,{children:[(0,Z.jsxs)(k,{children:[(0,Z.jsx)(D,{render:(0,Z.jsx)(m,{render:(0,Z.jsx)(g,{variant:`ghost`,size:`icon-sm`,"aria-label":`More for ${Ke(t.skill)}`,children:(0,Z.jsx)(Te,{"aria-hidden":!0})})})}),(0,Z.jsx)(O,{children:`Skill actions`})]}),(0,Z.jsxs)(o,{align:`end`,children:[oe.capabilities.canOpenDefault?(0,Z.jsx)(a,{onClick:()=>void oe.activate(`open`,{environmentId:e,filePath:t.skill.path,workspaceRoot:void 0}),children:`Open`}):null,(0,Z.jsx)(a,{onClick:()=>z(t),children:`Details`}),n!==void 0&&U[n]?.skillOverrides?.[t.skill.name]!==void 0?(0,Z.jsx)(a,{onClick:()=>{let e=U[n]??{},r={...e.skillOverrides};delete r[t.skill.name],pt({projectSettingsOverrides:{[n]:{...e,skillOverrides:r}}})},children:`Use environment setting`}):null]})]}),(0,Z.jsx)(be,{"aria-label":`Enable ${Ke(t.skill)} for ${c}`,checked:(n===void 0?void 0:U[n]?.skillOverrides?.[t.skill.name])??ae[t.skill.name]??t.skill.enabled,disabled:!se||W!==null||s.length===0,onCheckedChange:e=>{G(t.skill.name),pt(n===void 0?{skillOverrides:{[t.skill.name]:e}}:{projectSettingsOverrides:{[n]:{...U[n],skillOverrides:{...U[n]?.skillOverrides,[t.skill.name]:e}}}}).finally(()=>G(null))}})]},t.skill.path)})})]}),Nt=(0,Z.jsxs)(`div`,{className:`grid gap-6`,children:[$e.length>0?(0,Z.jsx)(ge,{title:`Servers`,children:St.length===0?(0,Z.jsx)(`p`,{className:`px-3 text-sm text-muted-foreground sm:px-4`,children:`No MCP servers match your search.`}):(0,Z.jsx)(Z.Fragment,{children:St.map(([e,t])=>{let n=Tt(`mcpServers`,e),r=Ne({...t,enabled:n},je[e],Me.has(e));return(0,Z.jsxs)(`div`,{className:`flex min-h-14 items-center gap-3 px-4 py-3`,children:[(0,Z.jsxs)(`div`,{className:`grid min-w-0 flex-1 gap-0.5`,children:[(0,Z.jsx)(`span`,{className:`break-words text-sm font-medium text-foreground`,children:t.name}),r.tone===`error`?(0,Z.jsx)(it,{status:r}):null]}),r.needsSignIn&&K?(0,Z.jsx)(g,{size:`xs`,variant:`outline`,onClick:()=>void gt(e),children:`Authenticate`}):null,kt(`Settings for ${t.name}`,()=>lt(e)),(0,Z.jsx)(be,{"aria-label":`Give ${t.name} to agents`,checked:n,disabled:!K,onCheckedChange:t=>Et(`mcpServers`,e,t)})]},e)})})}):null,K&&wt.length>0?(0,Z.jsx)(ge,{title:`Found in provider configs`,headerAction:(0,Z.jsx)(g,{size:`icon-xs`,variant:`ghost`,"aria-label":`Look again`,onClick:()=>void at(),children:(0,Z.jsx)(w,{"aria-hidden":!0})}),children:(0,Z.jsx)(Z.Fragment,{children:wt.map(t=>(0,Z.jsxs)(`div`,{className:`flex min-h-14 items-center gap-3 px-4 py-3`,children:[(0,Z.jsxs)(`div`,{className:`grid min-w-0 flex-1 gap-0.5`,children:[(0,Z.jsx)(`span`,{className:`break-words text-sm font-medium text-foreground`,children:t.name}),wt.filter(e=>e.name===t.name).length>1?(0,Z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:(t.providers??[t.provider]).map(e=>tt[e]).join(`, `)}):null]}),(0,Z.jsx)(g,{size:`xs`,variant:`outline`,onClick:async()=>{(await Ee({environmentId:e,input:{...n===void 0?{}:{projectId:n},servers:[{provider:t.provider,path:t.path,name:t.name}]}}))._tag===`Success`&&(at(),rt())},children:`Import`})]},`${t.provider}:${t.path}:${t.name}`))})}):null]}),Pt=Q.kind===`server`?(0,Z.jsxs)(Ye,{title:Q.id===null?`Add MCP server`:`Update ${B[Q.id]?.name??`server`} MCP`,onBack:()=>He({kind:`list`}),onUninstall:Q.id!==null&&K?()=>Je({kind:`server`,id:Q.id}):void 0,children:[(0,Z.jsx)(Xe,{server:Q.id===null?void 0:B[Q.id],takenNames:bt,onSave:e=>void ht(Q.id??p.make(f()),e,Q.id===null)},Q.id??`new`),Q.id!==null&&B[Q.id]!==void 0?(0,Z.jsx)(dt,{id:Q.id,server:B[Q.id],runtime:je[Q.id],checking:Me.has(Q.id),canManage:K,projectLabel:s,projectOverride:n===void 0?void 0:U[n]?.mcpServers?.[Q.id],awaitingSignIn:$===Q.id,onProviderToggle:(e,t)=>{let n=B[Q.id],r=t?n.disabledProviders.filter(t=>t!==e):[...n.disabledProviders,e];pt({mcpServers:{[Q.id]:{...n,disabledProviders:r}}})},onProjectOverride:n===void 0?void 0:e=>_t(`mcpServers`,Q.id,e),onTest:()=>void mt(Q.id),onSignIn:()=>void gt(Q.id),onSignOut:async()=>{let t=await he({environmentId:e,input:{serverId:Q.id}});t._tag===`Success`&&Y(e=>({...e,[Q.id]:t.value}))}}):null]}):null,Ft=Q.kind===`plugin`?(0,Z.jsxs)(Ye,{title:Q.id===null?`Add plugin`:`Update ${H[Q.id]?.name??`plugin`}`,onBack:()=>He({kind:`list`}),onUninstall:Q.id!==null&&K?()=>Je({kind:`plugin`,id:Q.id}):void 0,children:[(0,Z.jsx)(Qe,{plugin:Q.id===null?void 0:H[Q.id],environmentLabel:t,onSave:async e=>{let t=Q.id??v.make(f());(await pt({plugins:{[t]:e}}))._tag===`Success`&&Q.id===null&&He({kind:`list`})}},Q.id??`new`),Q.id!==null&&H[Q.id]!==void 0?(0,Z.jsx)(ft,{plugin:H[Q.id],environmentLabel:t,projectLabel:s,projectOverride:n===void 0?void 0:U[n]?.plugins?.[Q.id],onProjectOverride:n===void 0?void 0:e=>_t(`plugins`,Q.id,e)}):null]}):null;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`grid gap-6`,children:[Dt,Ot,Pt??Ft??(u===`plugins`?At:u===`mcps`?Nt:Mt)]}),R===null?null:(0,Z.jsx)(et,{entry:R,environmentId:e,onClose:()=>z(null)}),(0,Z.jsx)(_e,{open:qe!==null,onOpenChange:e=>!e&&Je(null),children:(0,Z.jsxs)(ve,{children:[(0,Z.jsxs)(we,{children:[(0,Z.jsxs)(ye,{children:[`Remove`,` `,qe?.kind===`server`?B[qe.id]?.name??`server`:qe?.kind===`plugin`?H[qe.id]?.name??`plugin`:``,`?`]}),(0,Z.jsxs)(xe,{children:[`New sessions on `,t,` stop getting it. Its stored values and sign-in are deleted. Provider config files are not changed.`]})]}),(0,Z.jsxs)(Ce,{children:[(0,Z.jsx)(Oe,{render:(0,Z.jsx)(g,{variant:`outline`,children:`Cancel`})}),(0,Z.jsx)(g,{variant:`destructive`,onClick:()=>void vt(),children:`Remove`})]})]})})]})}function ut(e){let t=(0,Y.c)(16),{projectLabel:n,override:r,inherited:i,onChange:a}=e,o=r?.enabled!==void 0,s=`In ${n}`,c=o?`Set for this project.`:`Follows the environment (${i?`on`:`off`}).`,l;t[0]!==a||t[1]!==o?(l=o?(0,Z.jsx)(g,{size:`xs`,variant:`ghost`,onClick:()=>a(void 0),children:`Reset`}):null,t[0]=a,t[1]=o,t[2]=l):l=t[2];let u=`Use in ${n}`,d=r?.enabled??i,f;t[3]===a?f=t[4]:(f=e=>a(e),t[3]=a,t[4]=f);let p;t[5]!==u||t[6]!==d||t[7]!==f?(p=(0,Z.jsx)(be,{"aria-label":u,checked:d,onCheckedChange:f}),t[5]=u,t[6]=d,t[7]=f,t[8]=p):p=t[8];let m;t[9]!==l||t[10]!==p?(m=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[l,p]}),t[9]=l,t[10]=p,t[11]=m):m=t[11];let h;return t[12]!==s||t[13]!==c||t[14]!==m?(h=(0,Z.jsx)(me,{title:s,description:c,control:m}),t[12]=s,t[13]=c,t[14]=m,t[15]=h):h=t[15],h}function dt(e){let t=(0,Y.c)(60),{id:n,server:r,runtime:i,checking:a,canManage:o,projectLabel:s,projectOverride:c,awaitingSignIn:l,onProviderToggle:u,onProjectOverride:d,onTest:f,onSignIn:p,onSignOut:m}=e,h;t[0]!==a||t[1]!==i||t[2]!==r?(h=Ne(r,i,a),t[0]=a,t[1]=i,t[2]=r,t[3]=h):h=t[3];let _=h,v=r.transport.type===`http`&&r.transport.auth===`oauth`&&i?.auth===`signed-in`,y;t[4]===_?y=t[5]:(y=(0,Z.jsx)(it,{status:_,className:`flex-1 text-sm`}),t[4]=_,t[5]=y);let b;t[6]!==l||t[7]!==o||t[8]!==p||t[9]!==_.needsSignIn?(b=_.needsSignIn&&o?(0,Z.jsx)(g,{size:`xs`,onClick:p,children:l?`Open sign-in again`:`Authenticate`}):null,t[6]=l,t[7]=o,t[8]=p,t[9]=_.needsSignIn,t[10]=b):b=t[10];let x;t[11]!==o||t[12]!==m||t[13]!==v?(x=v&&o?(0,Z.jsx)(g,{size:`xs`,variant:`ghost`,onClick:m,children:`Sign out`}):null,t[11]=o,t[12]=m,t[13]=v,t[14]=x):x=t[14];let S;t[15]!==o||t[16]!==a||t[17]!==f||t[18]!==r.enabled?(S=o&&r.enabled?(0,Z.jsx)(g,{size:`xs`,variant:`outline`,disabled:a,onClick:f,children:`Test connection`}):null,t[15]=o,t[16]=a,t[17]=f,t[18]=r.enabled,t[19]=S):S=t[19];let C;t[20]!==y||t[21]!==b||t[22]!==x||t[23]!==S?(C=(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[y,b,x,S]}),t[20]=y,t[21]=b,t[22]=x,t[23]=S,t[24]=C):C=t[24];let w;t[25]!==l||t[26]!==_.needsSignIn?(w=_.needsSignIn?(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:l?`Finish signing in in your browser, then come back here.`:`Agents can't reach this server until you sign in.`}):null,t[25]=l,t[26]=_.needsSignIn,t[27]=w):w=t[27];let T;t[28]===_.detail?T=t[29]:(T=_.detail?(0,Z.jsx)(`p`,{className:`rounded-md bg-destructive/8 px-2.5 py-1.5 text-xs text-destructive-foreground`,children:_.detail}):null,t[28]=_.detail,t[29]=T);let E;t[30]===r.source?E=t[31]:(E=r.source?(0,Z.jsxs)(`p`,{className:`truncate text-xs text-muted-foreground`,children:[`Imported from `,r.source.path]}):null,t[30]=r.source,t[31]=E);let D;t[32]!==C||t[33]!==w||t[34]!==T||t[35]!==E?(D=(0,Z.jsx)(ge,{title:`Status`,children:(0,Z.jsx)(J,{children:(0,Z.jsxs)(`div`,{className:`grid gap-2 px-4 py-3`,children:[C,w,T,E]})})}),t[32]=C,t[33]=w,t[34]=T,t[35]=E,t[36]=D):D=t[36];let O;if(t[37]!==o||t[38]!==u||t[39]!==r){let e;t[41]!==o||t[42]!==u||t[43]!==r.name?(e=e=>(0,Z.jsx)(me,{title:e.label,...e.unsupported===void 0?{}:{description:e.unsupported},control:(0,Z.jsx)(be,{"aria-label":`Give ${r.name} to ${e.label}`,checked:e.enabled,disabled:!o||e.unsupported!==void 0,onCheckedChange:t=>u(e.driver,t)})},e.driver),t[41]=o,t[42]=u,t[43]=r.name,t[44]=e):e=t[44],O=Be(r).map(e),t[37]=o,t[38]=u,t[39]=r,t[40]=O}else O=t[40];let k;t[45]===O?k=t[46]:(k=(0,Z.jsx)(J,{children:O}),t[45]=O,t[46]=k);let A;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Z.jsx)(`p`,{className:`px-3 text-xs text-muted-foreground sm:px-4`,children:`A change reaches a thread when its provider session next starts.`}),t[47]=A):A=t[47];let j;t[48]===k?j=t[49]:(j=(0,Z.jsxs)(ge,{title:`Providers`,children:[k,A]}),t[48]=k,t[49]=j);let M;t[50]!==d||t[51]!==s||t[52]!==c||t[53]!==r.enabled?(M=s!==void 0&&d!==void 0?(0,Z.jsx)(ge,{title:`Project`,children:(0,Z.jsx)(J,{children:(0,Z.jsx)(ut,{projectLabel:s,override:c,inherited:r.enabled,onChange:d})})}):null,t[50]=d,t[51]=s,t[52]=c,t[53]=r.enabled,t[54]=M):M=t[54];let ee;return t[55]!==n||t[56]!==D||t[57]!==j||t[58]!==M?(ee=(0,Z.jsxs)(`div`,{className:`grid gap-6`,"data-server-id":n,children:[D,j,M]}),t[55]=n,t[56]=D,t[57]=j,t[58]=M,t[59]=ee):ee=t[59],ee}function ft(e){let t=(0,Y.c)(13),{plugin:n,environmentLabel:r,projectLabel:i,projectOverride:a,onProjectOverride:o}=e,s=`Claude sessions on ${r} load this plugin folder.`,c;t[0]===s?c=t[1]:(c=(0,Z.jsx)(me,{title:`Claude`,description:s}),t[0]=s,t[1]=c);let l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(me,{title:`Codex, Cursor, Grok, OpenCode, Antigravity`,description:`Not supported here. These providers have no Claude plugin format.`}),t[2]=l):l=t[2];let u;t[3]===c?u=t[4]:(u=(0,Z.jsx)(ge,{title:`Providers`,children:(0,Z.jsxs)(J,{children:[c,l]})}),t[3]=c,t[4]=u);let d;t[5]!==o||t[6]!==n||t[7]!==i||t[8]!==a?(d=i!==void 0&&o!==void 0?(0,Z.jsx)(ge,{title:`Project`,children:(0,Z.jsx)(J,{children:(0,Z.jsx)(ut,{projectLabel:i,override:a,inherited:n.enabled,onChange:o})})}):null,t[5]=o,t[6]=n,t[7]=i,t[8]=a,t[9]=d):d=t[9];let f;return t[10]!==u||t[11]!==d?(f=(0,Z.jsxs)(`div`,{className:`grid gap-6`,children:[u,d]}),t[10]=u,t[11]=d,t[12]=f):f=t[12],f}var pt=at;export{pt as component};
|
|
5
|
-
//# sourceMappingURL=settings.plugins-BI68kAsM.js.map
|