decocms 4.6.0 → 4.8.0
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/client/assets/{AlertCircle-Dc2EW1Xh.js → AlertCircle-BP8AraZY.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-CQzCYQdd.js → ArrowUpRight-BusN0ze9.js} +1 -1
- package/dist/client/assets/{CheckCircle-Co8-96Va.js → CheckCircle-CCiLVyhM.js} +1 -1
- package/dist/client/assets/{ChevronDown-DWQLUoqf.js → ChevronDown-D1rSZJNJ.js} +1 -1
- package/dist/client/assets/{ChevronRight-Fl5MZFE5.js → ChevronRight-lATD-CWU.js} +1 -1
- package/dist/client/assets/{ChevronUp-C_lc_o3g.js → ChevronUp-COalomvK.js} +1 -1
- package/dist/client/assets/{DotsVertical-Bj73amJ1.js → DotsVertical-DYu5y7nS.js} +1 -1
- package/dist/client/assets/{Eye-Cbxk_9w_.js → Eye-BfOiLqEH.js} +1 -1
- package/dist/client/assets/{FilterLines-BYUFwc91.js → FilterLines-BIcisIR_.js} +1 -1
- package/dist/client/assets/{Globe01-DWTVb7Un.js → Globe01-CZa0pcoj.js} +1 -1
- package/dist/client/assets/{Globe04-CDxhXYra.js → Globe04-D5AGMp6t.js} +1 -1
- package/dist/client/assets/{HardDrive-BMXxrd-5.js → HardDrive-BC3OhmUD.js} +1 -1
- package/dist/client/assets/{Key01-DE0qpETa.js → Key01-BoG0RxKz.js} +1 -1
- package/dist/client/assets/{LayoutLeft-D_an0z1y.js → LayoutLeft-D0U40IKQ.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CkYnR-pE.js → LinkExternal01-l52zuk1o.js} +1 -1
- package/dist/client/assets/{Monitor01-CwPbYng2.js → Monitor01-Cn4nsH4_.js} +1 -1
- package/dist/client/assets/{Palette-D_MNr8c_.js → Palette-cRfEIzBn.js} +1 -1
- package/dist/client/assets/{Play-BSsk9TRT.js → Play-BEfmBSkL.js} +1 -1
- package/dist/client/assets/{Plus-CVGVCEWD.js → Plus-Bl_LZN4x.js} +1 -1
- package/dist/client/assets/{SearchLg-C6-0dWFV.js → SearchLg-C3MEBHez.js} +1 -1
- package/dist/client/assets/{SearchMd-B5gWQzhi.js → SearchMd-B2KjCykZ.js} +1 -1
- package/dist/client/assets/{Settings02-BPbjqaSP.js → Settings02-BWw2xnTO.js} +1 -1
- package/dist/client/assets/{Shield01-JA8ffipF.js → Shield01-BStJDHB3.js} +1 -1
- package/dist/client/assets/{Star01-Coh-d_en.js → Star01-CqQOYJ2t.js} +1 -1
- package/dist/client/assets/{Stars01-BNO0I13-.js → Stars01-Dm8_ZsjH.js} +1 -1
- package/dist/client/assets/{Stars02-_7e7vEGZ.js → Stars02-BbYM6zLw.js} +1 -1
- package/dist/client/assets/{Sun-Bkd03ipa.js → Sun-CmHWC7S4.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CiBRgm5I.js → SwitchHorizontal01-FX9hjZ1i.js} +1 -1
- package/dist/client/assets/{Tool01-l_q8HUGI.js → Tool01-DhQ4ho9u.js} +1 -1
- package/dist/client/assets/{Trash01-Bg4qQ-BB.js → Trash01-DGP_hvtF.js} +1 -1
- package/dist/client/assets/{Upload01-DXs8XkD-.js → Upload01-ZkeQp0wC.js} +1 -1
- package/dist/client/assets/{User01-B-8LArOe.js → User01-CEj0lW_2.js} +1 -1
- package/dist/client/assets/{Users01-BKqcv_gF.js → Users01-Db402lVp.js} +1 -1
- package/dist/client/assets/{Users03-D6kZFOjC.js → Users03-ChX-8nqW.js} +1 -1
- package/dist/client/assets/{X-CKh7IqmP.js → X-B01YsVvG.js} +1 -1
- package/dist/client/assets/{XCircle-ChyNg6J4.js → XCircle-QJAHsohS.js} +1 -1
- package/dist/client/assets/{XClose-DOOHZ1iM.js → XClose-BYQo3mf2.js} +1 -1
- package/dist/client/assets/{Zap-CGzacH_p.js → Zap-Bt3fWEYQ.js} +1 -1
- package/dist/client/assets/{ZapSquare-C9wtQq17.js → ZapSquare-DIH7lGOR.js} +1 -1
- package/dist/client/assets/{ZoomOut-DT2MdREq.js → ZoomOut-uLvrT3ZO.js} +1 -1
- package/dist/client/assets/{access-gate-BvzmNzgn.js → access-gate-DEalrdU6.js} +1 -1
- package/dist/client/assets/{add-section-modal-BPyB9snb.js → add-section-modal-CUUUFg0S.js} +1 -1
- package/dist/client/assets/{agent-icon-B8eeNtuV.js → agent-icon-CSOnaLfl.js} +1 -1
- package/dist/client/assets/{agents-list-CRZC4vXY.js → agents-list-DigFFCz5.js} +1 -1
- package/dist/client/assets/{ai-providers-CgZlWEmI.js → ai-providers-Bn0ko-Me.js} +1 -1
- package/dist/client/assets/{alert-BFh5ZgoM.js → alert-B6-7zmcz.js} +1 -1
- package/dist/client/assets/{alert-dialog-BD3igJDK.js → alert-dialog-COZUoYSZ.js} +1 -1
- package/dist/client/assets/{app-editor-GuZ0oz1C.js → app-editor-D62eXjsM.js} +1 -1
- package/dist/client/assets/{auth-CVcuabTS.js → auth-C-4tdsy-.js} +1 -1
- package/dist/client/assets/{auth-catchall-BmKG9NPL.js → auth-catchall-FZ6UeU1m.js} +1 -1
- package/dist/client/assets/{auth-entry-gYR0lE8e.js → auth-entry-DIhbcEXh.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CSxcQQiq.js → auth-split-layout-Dy7TVgby.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-B6YIi7Gy.js → authenticate-and-persist-oauth-C9EIeJf7.js} +1 -1
- package/dist/client/assets/{automation-list-row-DjU3jslE.js → automation-list-row-CuXR-b1D.js} +1 -1
- package/dist/client/assets/{automation-runs-Dk8muYzQ.js → automation-runs-Jll4D_3k.js} +1 -1
- package/dist/client/assets/{automations-Dh7v1Iwu.js → automations-DauLH4Ko.js} +1 -1
- package/dist/client/assets/{avatar-ClJplFDb.js → avatar-DJ3QuuQ7.js} +1 -1
- package/dist/client/assets/{badge-kG1ciDHg.js → badge-DophsIRD.js} +1 -1
- package/dist/client/assets/{block-document-RwImv4A7.js → block-document-DQR0nY0w.js} +1 -1
- package/dist/client/assets/{brand-context-C134XR4f.js → brand-context-Cl_SkCNy.js} +1 -1
- package/dist/client/assets/{buckets-Dn3RjMXJ.js → buckets-HXVvwsRF.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-Dc7EhKeO.js → bulk-category-panel-lAbQonVb.js} +1 -1
- package/dist/client/assets/{capability-load-error-Ea8TKuPS.js → capability-load-error-DZnbbeLs.js} +1 -1
- package/dist/client/assets/{card-B4nOjxjh.js → card-fxR4lUhv.js} +1 -1
- package/dist/client/assets/{category-editor-QHLmkKZL.js → category-editor-zTbuw8X7.js} +1 -1
- package/dist/client/assets/{chat-context-o6OHcwaz.js → chat-context-CazPZc8S.js} +1 -1
- package/dist/client/assets/{checkbox-C8lYmD-I.js → checkbox-CeFarX34.js} +1 -1
- package/dist/client/assets/{cli-auth-success-B1Fu33_g.js → cli-auth-success-CMkcLqVT.js} +1 -1
- package/dist/client/assets/{collection-detail-B5rNz-Wz.js → collection-detail-ByP_xq_7.js} +1 -1
- package/dist/client/assets/{collection-display-button-Bk_9Pvnv.js → collection-display-button-BS1F3pfn.js} +1 -1
- package/dist/client/assets/{collection-search-EKDGBBWD.js → collection-search-kw13BHqh.js} +1 -1
- package/dist/client/assets/{collection-tabs-B4rLoGfk.js → collection-tabs-BPNKPBMh.js} +1 -1
- package/dist/client/assets/{command-BdMByUYO.js → command-DJqDR9gR.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-BwW4IuxA.js → commerce-onboarding-lR2PQsg1.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-ZFUlmIw8.js → connect-desktop-dialog-BKrlHfvB.js} +1 -1
- package/dist/client/assets/{connection-card-DXxeWgUJ.js → connection-card-BLTARFN7.js} +1 -1
- package/dist/client/assets/{connection-detail-BDw02lKx.js → connection-detail-DdqBSRDV.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DPNIJhMB.js → connection-form-helpers-Bmc7HAzG.js} +1 -1
- package/dist/client/assets/{connections-CEJbZBo0.js → connections-XWCpYXva.js} +1 -1
- package/dist/client/assets/{context-menu-gI4zglEM.js → context-menu-_eeSEmED.js} +1 -1
- package/dist/client/assets/{decopilot-BAd_1NUv.js → decopilot-CpTi8_CD.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-D9bCmaFi.js → decopilot-sse-pool-BqKt_VjF.js} +1 -1
- package/dist/client/assets/{dialog-D_71fLjl.js → dialog-DfRvSPDX.js} +1 -1
- package/dist/client/assets/{domain-settings-BNNySpeP.js → domain-settings-DZINJBvM.js} +1 -1
- package/dist/client/assets/{drawer-DodsaUcg.js → drawer-3i1mzioQ.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DA0Umn63.js → dropdown-menu-DxVOJpYg.js} +1 -1
- package/dist/client/assets/{empty-state-DKU1AE7g.js → empty-state-DIXvP0bC.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Dr1KuD3e.js → extract-connection-data-DztiYkKt.js} +1 -1
- package/dist/client/assets/{file-explorer-DRnjO29u.js → file-explorer-DzBaGSrd.js} +1 -1
- package/dist/client/assets/{file-type-icon-B-idWQER.js → file-type-icon-DsZ7zLCo.js} +1 -1
- package/dist/client/assets/{files-Du_TyDiZ.js → files-B5QH6M7W.js} +1 -1
- package/dist/client/assets/{form-DM2r8X1h.js → form-C5K81Zvy.js} +1 -1
- package/dist/client/assets/{general-DSwDb14Y.js → general-yRKdcc2J.js} +1 -1
- package/dist/client/assets/{github-repo-picker-BzKrKS0y.js → github-repo-picker-B-2PDiD8.js} +1 -1
- package/dist/client/assets/{hooks-DxOSHTpN.js → hooks-D1Xb43Cw.js} +1 -1
- package/dist/client/assets/{import-from-deco-dialog-B0LK8KLz.js → import-from-deco-dialog-KlExHidd.js} +1 -1
- package/dist/client/assets/{index-C8BsadKU.js → index-BTJHmUlE.js} +1 -1
- package/dist/client/assets/{index-Btu8MJ2T.js → index-BYxLxb_N.js} +3 -3
- package/dist/client/assets/{index-Bqne0FVi.js → index-Bses2pxU.js} +1 -1
- package/dist/client/assets/{index-B3OleqJQ.js → index-COeFUvR6.js} +1 -1
- package/dist/client/assets/{index-BtNdd8C0.js → index-CaZ1DnAf.js} +1 -1
- package/dist/client/assets/{index-Cwvb1nlN.js → index-Ce9EWw17.js} +5 -5
- package/dist/client/assets/{index-DJ7Qk0xb.js → index-CfS9o05V.js} +1 -1
- package/dist/client/assets/{index-pHcuwHnY.js → index-CzR-Evqc.js} +1 -1
- package/dist/client/assets/{index-CveNYzWA.js → index-DL5kX7dJ.js} +1 -1
- package/dist/client/assets/{index-CMq-PrAu.js → index-DYvWPY4W.js} +1 -1
- package/dist/client/assets/{index-DKUn_x5-.js → index-emGOlkNe.js} +1 -1
- package/dist/client/assets/{index-DFQgcYyk.js → index-imDk1Td6.js} +1 -1
- package/dist/client/assets/{index-C_NGk336.js → index-jWHdRYiU.js} +1 -1
- package/dist/client/assets/{index-D0NstA9i.js → index-kkRn4_qd.js} +1 -1
- package/dist/client/assets/{index-redirect-BnWjgCMM.js → index-redirect-BnQLnros.js} +1 -1
- package/dist/client/assets/{input-4Ev3FmKy.js → input-3siSzfvD.js} +1 -1
- package/dist/client/assets/{integration-icon-eUjgo-Wa.js → integration-icon-HzOHy5Xw.js} +1 -1
- package/dist/client/assets/{label-gN8KznQ2.js → label-C6vpGlT2.js} +1 -1
- package/dist/client/assets/{login-BmQXmH_N.js → login-BcdgteuR.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Cc5rkXEa.js → mcp-oauth-C8ojuSjk.js} +1 -1
- package/dist/client/assets/{members-Cp4zjzzy.js → members-D6E0gds_.js} +1 -1
- package/dist/client/assets/{monaco-editor-C44cv-br.js → monaco-editor-BFK8GWcY.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-B40jQDmM.js → monitoring-stats-row-BiTNhi0G.js} +1 -1
- package/dist/client/assets/{oauth-callback-BrDST1fv.js → oauth-callback-DzrXe6M7.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-WTkIlkS3.js → oauth-callback-ai-provider-DsdXnhfN.js} +1 -1
- package/dist/client/assets/{onboarding-Dxkmjc30.js → onboarding-BkL0LeQn.js} +1 -1
- package/dist/client/assets/{org-install-B1JYSwjj.js → org-install-Cr_tNoS2.js} +1 -1
- package/dist/client/assets/{org-layout-Dujtpnew.js → org-layout-Dtw-vTdN.js} +1 -1
- package/dist/client/assets/{organization-choice-J5jK1Oxb.js → organization-choice-ip59BRuY.js} +1 -1
- package/dist/client/assets/{page-seo-form-A__xQkq5.js → page-seo-form-BkxMWtkp.js} +1 -1
- package/dist/client/assets/page-seo-sheet--SbTIgYU.js +1 -0
- package/dist/client/assets/{popover-HVRs71J_.js → popover-Dsv1r95r.js} +1 -1
- package/dist/client/assets/{post-editor-AykTxdlh.js → post-editor-ESSLPwM7.js} +1 -1
- package/dist/client/assets/{primitives-CqVCusAX.js → primitives-DAiSPMx4.js} +1 -1
- package/dist/client/assets/{profile-Dsm5cVUE.js → profile-CH8wBgcr.js} +1 -1
- package/dist/client/assets/project-app-view-BdMoAeM8.js +1 -0
- package/dist/client/assets/record-editor-Dx48UMmO.js +1 -0
- package/dist/client/assets/registry-Bx8ywDs1.js +2 -0
- package/dist/client/assets/{registry-layout-DnR6q-gU.js → registry-layout-DP5F-9Lo.js} +1 -1
- package/dist/client/assets/{require-capability-BHjBd5cR.js → require-capability-Bxhn3CI-.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BHT7ZfwS.js → required-auth-layout-DSF1nEU7.js} +1 -1
- package/dist/client/assets/{reset-password-C9fbH_Io.js → reset-password-CcVmyfwE.js} +1 -1
- package/dist/client/assets/{roles-DdiiM8bD.js → roles-BX-xewru.js} +1 -1
- package/dist/client/assets/{scroll-area-DBKWSV0V.js → scroll-area-R4MuycdP.js} +1 -1
- package/dist/client/assets/{search-input-CCb3iBWj.js → search-input-wZR45WcL.js} +1 -1
- package/dist/client/assets/{secrets-POD6p8M3.js → secrets-C-uTxc6F.js} +1 -1
- package/dist/client/assets/{sections-editor-DmZ3dLRQ.js → sections-editor-BduM-QIP.js} +1 -1
- package/dist/client/assets/{select-model-Dz5WmHmG.js → select-model-DLjICXAB.js} +1 -1
- package/dist/client/assets/{select-DsygRtM0.js → select-xa-GjJp_.js} +1 -1
- package/dist/client/assets/{seo-editor-KdLfuwTx.js → seo-editor-C8y5V7Zn.js} +1 -1
- package/dist/client/assets/{settings-layout-C7eatiLG.js → settings-layout-YeAQm5Jl.js} +1 -1
- package/dist/client/assets/{settings-section-BDyOfwm9.js → settings-section-BO74XZSq.js} +1 -1
- package/dist/client/assets/{sheet-BuVYCl7W.js → sheet-ChiQca7K.js} +1 -1
- package/dist/client/assets/{shell-controls-BKIuBDCo.js → shell-controls-B9KCPdYQ.js} +1 -1
- package/dist/client/assets/shell-layout-_3HPhbLa.js +1 -0
- package/dist/client/assets/{shell-route-loading-LDGMG-07.js → shell-route-loading-Dddc3D5B.js} +1 -1
- package/dist/client/assets/{sidebar-DnL9fG62.js → sidebar-B9dgUcrl.js} +1 -1
- package/dist/client/assets/{skeleton-BgNQclTb.js → skeleton-BFIflr8H.js} +1 -1
- package/dist/client/assets/{sortable.esm-CPwrTvNQ.js → sortable.esm-Dha08fCq.js} +1 -1
- package/dist/client/assets/{sso-DzkqAS16.js → sso-BWL49DoM.js} +1 -1
- package/dist/client/assets/{store-CuC2elbL.js → store-BVVZggV2.js} +1 -1
- package/dist/client/assets/store-registry-C_NqLo4w.js +2 -0
- package/dist/client/assets/{studio-tools-B50CVfWQ.js → studio-tools-CX1t2wo7.js} +1 -1
- package/dist/client/assets/{switch-wJmvNZzz.js → switch-_sVfSPaD.js} +1 -1
- package/dist/client/assets/{table-CDMv3jJI.js → table-DwDbz8iY.js} +1 -1
- package/dist/client/assets/{tabs-BtMboBYf.js → tabs-CH_sAsPv.js} +1 -1
- package/dist/client/assets/{task-status-XX_WiZVd.js → task-status-BilXNld4.js} +1 -1
- package/dist/client/assets/{textarea-DhaBNVNU.js → textarea-WTWE3YW7.js} +1 -1
- package/dist/client/assets/{toggle-group-CUlLZ0WG.js → toggle-group-CP4tUZC4.js} +1 -1
- package/dist/client/assets/{toolbar-ChXNrWyq.js → toolbar-Cg38UlON.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Ds9XpOpZ.js → toolbar-icon-button-vPK5DPYy.js} +1 -1
- package/dist/client/assets/{tools-list-jajXFCHc.js → tools-list-MKkD55QW.js} +1 -1
- package/dist/client/assets/{tooltip--hLULyB8.js → tooltip-CIGYkCAI.js} +1 -1
- package/dist/client/assets/{types-CJ1piLtD.js → types-CBYtFnMZ.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CDUvzgtf.js → use-ai-providers-DepwN6Nt.js} +1 -1
- package/dist/client/assets/{use-automations-CM_uU7rn.js → use-automations-Ck9NK_oB.js} +1 -1
- package/dist/client/assets/{use-capability-BU6ciZJU.js → use-capability-CVgQJ8xn.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CrebkY9T.js → use-clock-tick-C5iYcOG_.js} +1 -1
- package/dist/client/assets/{use-collections-DVgsseNJ.js → use-collections-B9JlVxD2.js} +1 -1
- package/dist/client/assets/{use-connection-eth2XC-k.js → use-connection-BKkAL8KW.js} +1 -1
- package/dist/client/assets/{use-copy-Pbq9Qj8M.js → use-copy-eM9xM7hR.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BiSxyHB5.js → use-create-virtual-mcp-CkM5QpI8.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-D47AwpeF.js → use-debounced-autosave-BhsBW6Nj.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BwJG2WZ7.js → use-debounced-value-0BOyiXG4.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-vuxyqGzO.js → use-decopilot-events-CCDt3KOG.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BLF2aFv2.js → use-delete-connection-DZfZoTPp.js} +1 -1
- package/dist/client/assets/{use-file-configs-C0Bxesif.js → use-file-configs-DGp2AP1n.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-D2_Ok7--.js → use-infinite-scroll-C2FI-2Uk.js} +1 -1
- package/dist/client/assets/{use-join-requests-Bb9m7Kcn.js → use-join-requests-DljJvjIG.js} +1 -1
- package/dist/client/assets/{use-mcp-client-gLPXhZwB.js → use-mcp-client-BRyGzGjZ.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DlvK4PCy.js → use-mcp-prompts-DDRoN3LD.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BuZcYJRN.js → use-mcp-tools-DI-MkCd8.js} +1 -1
- package/dist/client/assets/{use-members-CKL7vqmc.js → use-members-CealryXB.js} +1 -1
- package/dist/client/assets/{use-mobile-ClQdwqdV.js → use-mobile-42JaqbyB.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BiR_hnuj.js → use-navigate-to-agent-f2m02HAF.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DhNK-6Hb.js → use-org-auth-client-CVdba79K.js} +1 -1
- package/dist/client/assets/{use-org-fs-DEr-WdtP.js → use-org-fs-CU_E4q-e.js} +1 -1
- package/dist/client/assets/{use-org-sso-D7xmv0-O.js → use-org-sso-Dg7bL-tR.js} +1 -1
- package/dist/client/assets/{use-organization-roles-d3UIS_ut.js → use-organization-roles-ylf3jugw.js} +1 -1
- package/dist/client/assets/{use-organization-settings-sdfsJyHP.js → use-organization-settings-lLQudMV_.js} +1 -1
- package/dist/client/assets/{use-registry-connections-zKZuukaQ.js → use-registry-connections-BVPw6piI.js} +1 -1
- package/dist/client/assets/{use-secrets-CqdIcoAr.js → use-secrets-CW6NzUK3.js} +1 -1
- package/dist/client/assets/{use-status-sounds-PFzjdDsL.js → use-status-sounds-C1B6MKX0.js} +1 -1
- package/dist/client/assets/{use-view-mode-DIgKkfzH.js → use-view-mode-CicWJY61.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-cFiSNo55.js → use-virtual-mcp-BIWjDnR3.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-B_YuxoOI.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DC5qHrow.js +1 -0
- package/dist/client/assets/{useSuspenseQueries-Blox8E_y.js → useSuspenseQueries-CsDWb7hT.js} +1 -1
- package/dist/client/assets/{variant-calendar-BGBXolQx.js → variant-calendar-ChkUdpwk.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CXuLlYYW.js → view-mode-toggle-Cy46ust1.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +454 -427
- package/dist/server/migrate.js +24 -24
- package/dist/server/server.js +256 -256
- package/package.json +1 -1
- package/dist/client/assets/page-seo-sheet-BDorMbm5.js +0 -1
- package/dist/client/assets/project-app-view-0WOOUHRR.js +0 -1
- package/dist/client/assets/record-editor-BeS6EgWO.js +0 -1
- package/dist/client/assets/registry-JHGZe7dz.js +0 -2
- package/dist/client/assets/shell-layout-DBLgWYru.js +0 -1
- package/dist/client/assets/store-registry-rIEcmjfy.js +0 -2
- package/dist/client/assets/useInfiniteQuery-DRF-obNO.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CxCY-IUG.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as S,e as R,j as s,D as H,l as k,ae as J,G as L,v as B,P as G,a as I,i as Q,r as F,O as K}from"./index-Btu8MJ2T.js";import{u as T,S as U,M as V}from"./shell-controls-BKIuBDCo.js";import{j as X,k as Y,l as Z,b as q,c as w,d as P,S as M,a as O,f as ee,g as se}from"./sidebar-DnL9fG62.js";import{a as te}from"./index-Bqne0FVi.js";import{n as le,b as re,a as ie,c as oe,d as ne,i as E}from"./ZapSquare-C9wtQq17.js";import{t as ae,a as A}from"./Users03-D6kZFOjC.js";import{i as ce}from"./HardDrive-BMXxrd-5.js";import{i as me}from"./Key01-DE0qpETa.js";import{i as fe}from"./Shield01-JA8ffipF.js";import{s as de}from"./User01-B-8LArOe.js";import{i as xe}from"./Zap-CGzacH_p.js";import{a as be}from"./use-capability-BU6ciZJU.js";import{a as ue}from"./use-join-requests-Bb9m7Kcn.js";import{u as W}from"./use-mobile-ClQdwqdV.js";import{u as he}from"./use-status-sounds-PFzjdDsL.js";import{T as y}from"./toolbar-ChXNrWyq.js";import"./sheet-BuVYCl7W.js";import"./X-CKh7IqmP.js";import"./LayoutLeft-D_an0z1y.js";import"./toolbar-icon-button-Ds9XpOpZ.js";import"./tooltip--hLULyB8.js";import"./studio-tools-B50CVfWQ.js";import"./question-004-sINsf4GQ.js";import"./use-decopilot-events-vuxyqGzO.js";import"./decopilot-sse-pool-D9bCmaFi.js";import"./backoff-CrEUbyZT.js";function D(){const e=S.c(21),{capabilities:t,isPrivileged:m,loading:l,error:i}=be(),o=ue().length;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ae,{size:14}),e[0]=n):n=e[0];let r,a;if(e[1]!==t||e[2]!==i||e[3]!==m||e[4]!==o||e[5]!==l){a=Symbol.for("react.early_return_sentinel");e:{let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(le,{size:14}),e[8]=f):f=e[8];let d;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(re,{size:14}),e[9]=d):d=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(me,{size:14}),e[10]=c):c=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ce,{size:14}),e[11]=x):x=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(ie,{size:14}),e[12]=b):b=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(A,{size:14}),e[13]=p):p=e[13];let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(xe,{size:14}),e[14]=h):h=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(oe,{size:14}),e[15]=g):g=e[15];let u;e[16]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ne,{size:14}),e[16]=u):u=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(A,{size:14}),e[17]=_):_=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(fe,{size:14}),e[18]=j):j=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(J,{size:14}),e[19]=v):v=e[19];let N;e[20]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(de,{size:14}),e[20]=N):N=e[20];const z=[{label:"Organization",items:[{key:"general",label:"General",icon:n,to:"/$org/settings/general",requires:"org:manage"},{key:"brand-context",label:"Brand Context",icon:f,to:"/$org/settings/brand-context",requires:"org:manage"},{key:"ai-providers",label:"AI Providers",icon:d,to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"secrets",label:"Secrets",icon:c,to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"buckets",label:"Buckets",icon:x,to:"/$org/settings/buckets",requires:"file-configs:manage"}]},{label:"Build",items:[{key:"connections",label:"Connections",icon:b,to:"/$org/settings/connections"},{key:"agents",label:"Agents",icon:p,to:"/$org/settings/agents"},{key:"automations",label:"Automations",icon:h,to:"/$org/settings/automations",requires:"automations:manage"},{key:"store",label:"Store",icon:g,to:"/$org/settings/store",requires:"registry:manage"}]},{label:"Manage",items:[{key:"monitor",label:"Monitor",icon:u,to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:"Members",icon:_,to:"/$org/settings/members",requires:"members:manage",badge:o},{key:"roles",label:"Roles",icon:j,to:"/$org/settings/roles",privilegedOnly:!0},{key:"sso",label:"Security",icon:v,to:"/$org/settings/sso",requires:"org:manage"}]},{label:"Account",items:[{key:"profile",label:"Profile & Preferences",icon:N,to:"/$org/settings/profile"}]}];if(l||i){a=z;break e}r=z.map(C=>({...C,items:C.items.filter($=>$.privilegedOnly?m:$.requires?m||t[$.requires]:!0)})).filter(pe)}e[1]=t,e[2]=i,e[3]=m,e[4]=o,e[5]=l,e[6]=r,e[7]=a}else r=e[6],a=e[7];return a!==Symbol.for("react.early_return_sentinel")?a:r}function pe(e){return e.items.length>0}function ge(){const e=S.c(19),t=D();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={from:"/shell/$org"},e[0]=m):m=e[0];const{org:l}=R(m);let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={select:_e},e[1]=i):i=e[1];const o=T(i);let n;e[2]!==l||e[3]!==o?(n=p=>{const h=p.replace("$org",l);return o.startsWith(h)},e[2]=l,e[3]=o,e[4]=n):n=e[4];const r=n;let a;if(e[5]!==t||e[6]!==r||e[7]!==l){let p;e[9]!==r||e[10]!==l?(p=(h,g)=>s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[h.label&&s.jsx("p",{className:k("px-2 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",g>0&&"mt-3"),children:h.label}),s.jsx(w,{children:s.jsx(P,{className:"gap-0.5",children:h.items.map(u=>s.jsx(M,{children:s.jsx(O,{asChild:!0,isActive:r(u.to),children:s.jsxs(L,{to:u.to,params:{org:l},onClick:()=>B("settings_nav_clicked",{section_key:u.key,section_label:u.label,group_label:h.label||"main"}),className:"flex items-center gap-2.5 text-sm",children:[s.jsxs("span",{className:"relative shrink-0",children:[u.icon,u.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:u.label})]})})},u.key))})})]},`${h.label}-${g}`),e[9]=r,e[10]=l,e[11]=p):p=e[11],a=t.map(p),e[5]=t,e[6]=r,e[7]=l,e[8]=a}else a=e[8];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[12]=f):f=e[12];let d;e[13]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[f,s.jsx(w,{children:s.jsx(P,{className:"gap-0.5",children:s.jsx(M,{children:s.jsxs(O,{onClick:je,className:"flex items-center gap-2.5 text-sm",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(E,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})})})})]}),e[13]=d):d=e[13];let c;e[14]!==a?(c=s.jsxs(ee,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0 overflow-y-auto",children:[a,d]}),e[14]=a,e[15]=c):c=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.6.0"]})}),e[16]=x):x=e[16];let b;return e[17]!==c?(b=s.jsxs(se,{variant:"sidebar",children:[c,x]}),e[17]=c,e[18]=b):b=e[18],b}function je(){B("signed_out",{source:"settings_sidebar"}),G(),I.signOut()}function _e(e){return e.location.pathname}function ye(e){const t=S.c(21),{onClose:m}=e,l=D();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org"},t[0]=i):i=t[0];const{org:o}=R(i);let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n={select:ve},t[1]=n):n=t[1];const r=T(n);let a;t[2]!==o||t[3]!==r?(a=g=>{const u=g.replace("$org",o);return r.startsWith(u)},t[2]=o,t[3]=r,t[4]=a):a=t[4];const f=a;let d;if(t[5]!==l||t[6]!==f||t[7]!==m||t[8]!==o){let g;t[10]!==f||t[11]!==m||t[12]!==o?(g=(u,_)=>s.jsxs("div",{className:"flex flex-col gap-0.5",children:[u.label&&s.jsx("p",{className:k("px-3 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",_>0&&"mt-3"),children:u.label}),u.items.map(j=>s.jsxs(L,{to:j.to,params:{org:o},onClick:m,className:k("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",f(j.to)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[s.jsxs("span",{className:"relative shrink-0",children:[j.icon,j.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:j.label})]},j.key))]},`${u.label}-${_}`),t[10]=f,t[11]=m,t[12]=o,t[13]=g):g=t[13],d=l.map(g),t[5]=l,t[6]=f,t[7]=m,t[8]=o,t[9]=d}else d=t[9];let c;t[14]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"h-px bg-border/50 my-2"}),t[14]=c):c=t[14];let x;t[15]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[c,s.jsxs("button",{type:"button",onClick:Se,className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(E,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})]}),t[15]=x):x=t[15];let b;t[16]!==d?(b=s.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[d,x]}),t[16]=d,t[17]=b):b=t[17];let p;t[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.6.0"]})}),t[18]=p):p=t[18];let h;return t[19]!==b?(h=s.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[b,p]}),t[19]=b,t[20]=h):h=t[20],h}function Se(){G(),I.signOut()}function ve(e){return e.location.pathname}function Ne(){const e=S.c(4),t=W(),{org:m}=H();he(m.slug);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(Q,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=l):l=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(F.Suspense,{fallback:l,children:s.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:s.jsx(te,{value:"p-0",children:s.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:s.jsx(K,{})})})})}),e[1]=i):i=e[1];const o=i;if(t){let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex flex-col flex-1 bg-background min-h-0 overflow-hidden",children:o}),e[2]=r):r=e[2],r}let n;return e[3]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex-1 min-h-0 p-1",children:s.jsx("div",{className:k("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),children:o})}),e[3]=n):n=e[3],n}function Ye(){const e=S.c(21),t=W();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(y.LogoLink,{}),e[0]=m):m=e[0];let l;e[1]!==t?(l=t&&s.jsx(U,{}),e[1]=t,e[2]=l):l=e[2];let i;e[3]!==l?(i=s.jsxs(y.LeftColumn,{children:[m,l]}),e[3]=l,e[4]=i):i=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(y.CenterSlot,{}),e[5]=o):o=e[5];let n;e[6]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(y.RightColumn,{children:s.jsx("span",{})}),e[6]=n):n=e[6];let r;e[7]!==i?(r=s.jsxs(y.Header,{children:[i,o,n]}),e[7]=i,e[8]=r):r=e[8];let a;e[9]===Symbol.for("react.memo_cache_sentinel")?(a={"--sidebar-width-icon":"3.5rem"},e[9]=a):a=e[9];let f;e[10]!==t?(f=!t&&s.jsx(ge,{}),e[10]=t,e[11]=f):f=e[11];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(X,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:s.jsx(Ne,{})}),e[12]=d):d=e[12];let c;e[13]!==f?(c=s.jsxs(Y,{className:"flex-1 bg-sidebar min-h-0",style:a,children:[f,d]}),e[13]=f,e[14]=c):c=e[14];let x;e[15]!==t?(x=t&&s.jsx(V,{renderSidebar:ke}),e[15]=t,e[16]=x):x=e[16];let b;return e[17]!==x||e[18]!==r||e[19]!==c?(b=s.jsx(y.Provider,{children:s.jsx(Z,{defaultOpen:!0,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[r,c,x]})})}),e[17]=x,e[18]=r,e[19]=c,e[20]=b):b=e[20],b}function ke(e){const{onClose:t}=e;return s.jsx(ye,{onClose:t})}export{ge as SettingsSidebar,ye as SettingsSidebarMobile,Ye as default};
|
|
1
|
+
import{c as S,e as R,j as s,D as H,l as k,ae as J,G as L,v as B,P as G,a as I,i as Q,r as F,O as K}from"./index-BYxLxb_N.js";import{u as T,S as U,M as V}from"./shell-controls-B9KCPdYQ.js";import{j as X,k as Y,l as Z,b as q,c as w,d as P,S as M,a as O,f as ee,g as se}from"./sidebar-B9dgUcrl.js";import{a as te}from"./index-Bses2pxU.js";import{n as le,b as re,a as ie,c as oe,d as ne,i as E}from"./ZapSquare-DIH7lGOR.js";import{t as ae,a as A}from"./Users03-ChX-8nqW.js";import{i as ce}from"./HardDrive-BC3OhmUD.js";import{i as me}from"./Key01-BoG0RxKz.js";import{i as fe}from"./Shield01-BStJDHB3.js";import{s as de}from"./User01-CEj0lW_2.js";import{i as xe}from"./Zap-Bt3fWEYQ.js";import{a as be}from"./use-capability-CVgQJ8xn.js";import{a as ue}from"./use-join-requests-DljJvjIG.js";import{u as W}from"./use-mobile-42JaqbyB.js";import{u as he}from"./use-status-sounds-C1B6MKX0.js";import{T as y}from"./toolbar-Cg38UlON.js";import"./sheet-ChiQca7K.js";import"./X-B01YsVvG.js";import"./LayoutLeft-D0U40IKQ.js";import"./toolbar-icon-button-vPK5DPYy.js";import"./tooltip-CIGYkCAI.js";import"./studio-tools-CX1t2wo7.js";import"./question-004-sINsf4GQ.js";import"./use-decopilot-events-CCDt3KOG.js";import"./decopilot-sse-pool-BqKt_VjF.js";import"./backoff-CrEUbyZT.js";function D(){const e=S.c(21),{capabilities:t,isPrivileged:m,loading:l,error:i}=be(),o=ue().length;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ae,{size:14}),e[0]=n):n=e[0];let r,a;if(e[1]!==t||e[2]!==i||e[3]!==m||e[4]!==o||e[5]!==l){a=Symbol.for("react.early_return_sentinel");e:{let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(le,{size:14}),e[8]=f):f=e[8];let d;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(re,{size:14}),e[9]=d):d=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(me,{size:14}),e[10]=c):c=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ce,{size:14}),e[11]=x):x=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(ie,{size:14}),e[12]=b):b=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(A,{size:14}),e[13]=p):p=e[13];let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(xe,{size:14}),e[14]=h):h=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(oe,{size:14}),e[15]=g):g=e[15];let u;e[16]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ne,{size:14}),e[16]=u):u=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(A,{size:14}),e[17]=_):_=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(fe,{size:14}),e[18]=j):j=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(J,{size:14}),e[19]=v):v=e[19];let N;e[20]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(de,{size:14}),e[20]=N):N=e[20];const z=[{label:"Organization",items:[{key:"general",label:"General",icon:n,to:"/$org/settings/general",requires:"org:manage"},{key:"brand-context",label:"Brand Context",icon:f,to:"/$org/settings/brand-context",requires:"org:manage"},{key:"ai-providers",label:"AI Providers",icon:d,to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"secrets",label:"Secrets",icon:c,to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"buckets",label:"Buckets",icon:x,to:"/$org/settings/buckets",requires:"file-configs:manage"}]},{label:"Build",items:[{key:"connections",label:"Connections",icon:b,to:"/$org/settings/connections"},{key:"agents",label:"Agents",icon:p,to:"/$org/settings/agents"},{key:"automations",label:"Automations",icon:h,to:"/$org/settings/automations",requires:"automations:manage"},{key:"store",label:"Store",icon:g,to:"/$org/settings/store",requires:"registry:manage"}]},{label:"Manage",items:[{key:"monitor",label:"Monitor",icon:u,to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:"Members",icon:_,to:"/$org/settings/members",requires:"members:manage",badge:o},{key:"roles",label:"Roles",icon:j,to:"/$org/settings/roles",privilegedOnly:!0},{key:"sso",label:"Security",icon:v,to:"/$org/settings/sso",requires:"org:manage"}]},{label:"Account",items:[{key:"profile",label:"Profile & Preferences",icon:N,to:"/$org/settings/profile"}]}];if(l||i){a=z;break e}r=z.map(C=>({...C,items:C.items.filter($=>$.privilegedOnly?m:$.requires?m||t[$.requires]:!0)})).filter(pe)}e[1]=t,e[2]=i,e[3]=m,e[4]=o,e[5]=l,e[6]=r,e[7]=a}else r=e[6],a=e[7];return a!==Symbol.for("react.early_return_sentinel")?a:r}function pe(e){return e.items.length>0}function ge(){const e=S.c(19),t=D();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={from:"/shell/$org"},e[0]=m):m=e[0];const{org:l}=R(m);let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={select:_e},e[1]=i):i=e[1];const o=T(i);let n;e[2]!==l||e[3]!==o?(n=p=>{const h=p.replace("$org",l);return o.startsWith(h)},e[2]=l,e[3]=o,e[4]=n):n=e[4];const r=n;let a;if(e[5]!==t||e[6]!==r||e[7]!==l){let p;e[9]!==r||e[10]!==l?(p=(h,g)=>s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[h.label&&s.jsx("p",{className:k("px-2 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",g>0&&"mt-3"),children:h.label}),s.jsx(w,{children:s.jsx(P,{className:"gap-0.5",children:h.items.map(u=>s.jsx(M,{children:s.jsx(O,{asChild:!0,isActive:r(u.to),children:s.jsxs(L,{to:u.to,params:{org:l},onClick:()=>B("settings_nav_clicked",{section_key:u.key,section_label:u.label,group_label:h.label||"main"}),className:"flex items-center gap-2.5 text-sm",children:[s.jsxs("span",{className:"relative shrink-0",children:[u.icon,u.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:u.label})]})})},u.key))})})]},`${h.label}-${g}`),e[9]=r,e[10]=l,e[11]=p):p=e[11],a=t.map(p),e[5]=t,e[6]=r,e[7]=l,e[8]=a}else a=e[8];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[12]=f):f=e[12];let d;e[13]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[f,s.jsx(w,{children:s.jsx(P,{className:"gap-0.5",children:s.jsx(M,{children:s.jsxs(O,{onClick:je,className:"flex items-center gap-2.5 text-sm",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(E,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})})})})]}),e[13]=d):d=e[13];let c;e[14]!==a?(c=s.jsxs(ee,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0 overflow-y-auto",children:[a,d]}),e[14]=a,e[15]=c):c=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.8.0"]})}),e[16]=x):x=e[16];let b;return e[17]!==c?(b=s.jsxs(se,{variant:"sidebar",children:[c,x]}),e[17]=c,e[18]=b):b=e[18],b}function je(){B("signed_out",{source:"settings_sidebar"}),G(),I.signOut()}function _e(e){return e.location.pathname}function ye(e){const t=S.c(21),{onClose:m}=e,l=D();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org"},t[0]=i):i=t[0];const{org:o}=R(i);let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n={select:ve},t[1]=n):n=t[1];const r=T(n);let a;t[2]!==o||t[3]!==r?(a=g=>{const u=g.replace("$org",o);return r.startsWith(u)},t[2]=o,t[3]=r,t[4]=a):a=t[4];const f=a;let d;if(t[5]!==l||t[6]!==f||t[7]!==m||t[8]!==o){let g;t[10]!==f||t[11]!==m||t[12]!==o?(g=(u,_)=>s.jsxs("div",{className:"flex flex-col gap-0.5",children:[u.label&&s.jsx("p",{className:k("px-3 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",_>0&&"mt-3"),children:u.label}),u.items.map(j=>s.jsxs(L,{to:j.to,params:{org:o},onClick:m,className:k("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",f(j.to)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[s.jsxs("span",{className:"relative shrink-0",children:[j.icon,j.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:j.label})]},j.key))]},`${u.label}-${_}`),t[10]=f,t[11]=m,t[12]=o,t[13]=g):g=t[13],d=l.map(g),t[5]=l,t[6]=f,t[7]=m,t[8]=o,t[9]=d}else d=t[9];let c;t[14]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"h-px bg-border/50 my-2"}),t[14]=c):c=t[14];let x;t[15]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[c,s.jsxs("button",{type:"button",onClick:Se,className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(E,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})]}),t[15]=x):x=t[15];let b;t[16]!==d?(b=s.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[d,x]}),t[16]=d,t[17]=b):b=t[17];let p;t[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.8.0"]})}),t[18]=p):p=t[18];let h;return t[19]!==b?(h=s.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[b,p]}),t[19]=b,t[20]=h):h=t[20],h}function Se(){G(),I.signOut()}function ve(e){return e.location.pathname}function Ne(){const e=S.c(4),t=W(),{org:m}=H();he(m.slug);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(Q,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=l):l=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(F.Suspense,{fallback:l,children:s.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:s.jsx(te,{value:"p-0",children:s.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:s.jsx(K,{})})})})}),e[1]=i):i=e[1];const o=i;if(t){let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex flex-col flex-1 bg-background min-h-0 overflow-hidden",children:o}),e[2]=r):r=e[2],r}let n;return e[3]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex-1 min-h-0 p-1",children:s.jsx("div",{className:k("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),children:o})}),e[3]=n):n=e[3],n}function Ye(){const e=S.c(21),t=W();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(y.LogoLink,{}),e[0]=m):m=e[0];let l;e[1]!==t?(l=t&&s.jsx(U,{}),e[1]=t,e[2]=l):l=e[2];let i;e[3]!==l?(i=s.jsxs(y.LeftColumn,{children:[m,l]}),e[3]=l,e[4]=i):i=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(y.CenterSlot,{}),e[5]=o):o=e[5];let n;e[6]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(y.RightColumn,{children:s.jsx("span",{})}),e[6]=n):n=e[6];let r;e[7]!==i?(r=s.jsxs(y.Header,{children:[i,o,n]}),e[7]=i,e[8]=r):r=e[8];let a;e[9]===Symbol.for("react.memo_cache_sentinel")?(a={"--sidebar-width-icon":"3.5rem"},e[9]=a):a=e[9];let f;e[10]!==t?(f=!t&&s.jsx(ge,{}),e[10]=t,e[11]=f):f=e[11];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(X,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:s.jsx(Ne,{})}),e[12]=d):d=e[12];let c;e[13]!==f?(c=s.jsxs(Y,{className:"flex-1 bg-sidebar min-h-0",style:a,children:[f,d]}),e[13]=f,e[14]=c):c=e[14];let x;e[15]!==t?(x=t&&s.jsx(V,{renderSidebar:ke}),e[15]=t,e[16]=x):x=e[16];let b;return e[17]!==x||e[18]!==r||e[19]!==c?(b=s.jsx(y.Provider,{children:s.jsx(Z,{defaultOpen:!0,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[r,c,x]})})}),e[17]=x,e[18]=r,e[19]=c,e[20]=b):b=e[20],b}function ke(e){const{onClose:t}=e;return s.jsx(ye,{onClose:t})}export{ge as SettingsSidebar,ye as SettingsSidebarMobile,Ye as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,l as N,j as r,r as S}from"./index-
|
|
1
|
+
import{c as v,l as N,j as r,r as S}from"./index-BYxLxb_N.js";import{C as w}from"./card-fxR4lUhv.js";import{i as E}from"./ArrowUpRight-BusN0ze9.js";function I(c){const e=v.c(12),{title:i,description:l,docsHref:t,actions:s,className:n,headerClassName:a,children:d}=c;let m;e[0]!==n?(m=N("flex flex-col gap-3",n),e[0]=n,e[1]=m):m=e[1];let f;e[2]!==s||e[3]!==l||e[4]!==t||e[5]!==a||e[6]!==i?(f=(i||l||t||s)&&r.jsxs("div",{className:N("flex items-center justify-between gap-3 px-4",a),children:[r.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[i&&r.jsx("h2",{className:"text-[15px] font-medium leading-tight",children:i}),(l||t)&&r.jsxs("p",{className:"text-sm text-muted-foreground leading-snug",children:[l,t&&r.jsxs("a",{href:t,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 ml-1 text-foreground hover:underline",children:["Docs ",r.jsx(E,{size:12})]})]})]}),s&&r.jsx("div",{className:"shrink-0",children:s})]}),e[2]=s,e[3]=l,e[4]=t,e[5]=a,e[6]=i,e[7]=f):f=e[7];let o;return e[8]!==d||e[9]!==m||e[10]!==f?(o=r.jsxs("section",{className:m,children:[f,d]}),e[8]=d,e[9]=m,e[10]=f,e[11]=o):o=e[11],o}function P(c){const e=v.c(11),{className:i,children:l}=c;let t,s,n;if(e[0]!==l||e[1]!==i){const d=S.Children.toArray(l).filter(S.isValidElement);t=w,e[5]!==i?(s=N("p-0 gap-0 overflow-hidden",i),e[5]=i,e[6]=s):s=e[6],n=d.map($),e[0]=l,e[1]=i,e[2]=t,e[3]=s,e[4]=n}else t=e[2],s=e[3],n=e[4];let a;return e[7]!==t||e[8]!==s||e[9]!==n?(a=r.jsx(t,{className:s,children:n}),e[7]=t,e[8]=s,e[9]=n,e[10]=a):a=e[10],a}function $(c,e){return r.jsxs("div",{children:[e>0&&r.jsx("div",{className:"h-px bg-border mx-5"}),c]},e)}function R(c){const e=v.c(27),{icon:i,title:l,description:t,action:s,onClick:n,className:a,children:d}=c,m=d?"flex items-start gap-3 px-4 py-4":"flex items-center gap-3 px-4 py-4",f=n&&"hover:bg-muted/50 cursor-pointer";let o;e[0]!==a||e[1]!==m||e[2]!==f?(o=N(m,f,a),e[0]=a,e[1]=m,e[2]=f,e[3]=o):o=e[3];const b=n?"button":void 0,C=n?0:void 0;let x;e[4]!==n?(x=n?k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),n())}:void 0,e[4]=n,e[5]=x):x=e[5];let p;e[6]!==i?(p=i&&r.jsx("div",{className:"size-8 shrink-0 rounded-lg bg-muted/60 flex items-center justify-center text-muted-foreground",children:i}),e[6]=i,e[7]=p):p=e[7];let u;e[8]!==l?(u=r.jsx("div",{className:"text-sm font-medium",children:l}),e[8]=l,e[9]=u):u=e[9];let h;e[10]!==t?(h=t&&r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:t}),e[10]=t,e[11]=h):h=e[11];let g;e[12]!==d||e[13]!==u||e[14]!==h?(g=r.jsxs("div",{className:"flex-1 min-w-0",children:[u,h,d]}),e[12]=d,e[13]=u,e[14]=h,e[15]=g):g=e[15];let j;e[16]!==s?(j=s&&r.jsx("div",{className:"shrink-0",onClick:D,children:s}),e[16]=s,e[17]=j):j=e[17];let y;return e[18]!==n||e[19]!==g||e[20]!==j||e[21]!==o||e[22]!==b||e[23]!==C||e[24]!==x||e[25]!==p?(y=r.jsxs("div",{className:o,onClick:n,role:b,tabIndex:C,onKeyDown:x,children:[p,g,j]}),e[18]=n,e[19]=g,e[20]=j,e[21]=o,e[22]=b,e[23]=C,e[24]=x,e[25]=p,e[26]=y):y=e[26],y}function D(c){return c.stopPropagation()}function H(c){const e=v.c(5),{children:i,className:l}=c;let t;e[0]!==l?(t=N("flex items-center justify-end gap-2 px-4 py-4",l),e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==i||e[3]!==t?(s=r.jsx("div",{className:t,children:i}),e[2]=i,e[3]=t,e[4]=s):s=e[4],s}function K(c){const e=v.c(5),{className:i,children:l}=c;let t;e[0]!==i?(t=N("flex flex-col gap-10",i),e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==l||e[3]!==t?(s=r.jsx("div",{className:t,children:l}),e[2]=l,e[3]=t,e[4]=s):s=e[4],s}export{I as S,P as a,R as b,K as c,H as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,l as f,j as i,dr as N,cC as y,bT as S,ds as v,cD as C,dt as $,cE as w}from"./index-
|
|
1
|
+
import{c as n,l as f,j as i,dr as N,cC as y,bT as S,ds as v,cD as C,dt as $,cE as w}from"./index-BYxLxb_N.js";import{i as k}from"./X-B01YsVvG.js";function T(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(y,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function z(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(C,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function D(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(w,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function B(o){const e=n.c(20);let t,s,a,l,c;e[0]!==o?({className:s,children:t,side:l,hideCloseButton:c,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=c):(t=e[1],s=e[2],a=e[3],l=e[4],c=e[5]);const p=l===void 0?"right":l,h=c===void 0?!1:c;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(D,{}),e[6]=m):m=e[6];const x=p==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",b=p==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",g=p==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",j=p==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let r;e[7]!==s||e[8]!==x||e[9]!==b||e[10]!==g||e[11]!==j?(r=f("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",x,b,g,j,s),e[7]=s,e[8]=x,e[9]=b,e[10]=g,e[11]=j,e[12]=r):r=e[12];let d;e[13]!==h?(d=!h&&i.jsxs($,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[i.jsx(k,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=h,e[14]=d):d=e[14];let u;return e[15]!==t||e[16]!==a||e[17]!==r||e[18]!==d?(u=i.jsxs(z,{children:[m,i.jsxs(S,{"data-slot":"sheet-content",className:r,...a,children:[t,d]})]}),e[15]=t,e[16]=a,e[17]=r,e[18]=d,e[19]=u):u=e[19],u}function O(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function P(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(N,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function _(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(v,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{P as S,_ as a,O as b,B as c,T as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b1 as S,r as d,b2 as b,b3 as h,c as f,j as c}from"./index-
|
|
1
|
+
import{b1 as S,r as d,b2 as b,b3 as h,c as f,j as c}from"./index-BYxLxb_N.js";import{S as p,c as x,d as g}from"./sheet-ChiQca7K.js";import{u as m}from"./sidebar-B9dgUcrl.js";import{i as j}from"./LayoutLeft-D0U40IKQ.js";import{T as R}from"./toolbar-icon-button-vPK5DPYy.js";function E(t){const e=S({warn:t?.router===void 0}),r=t?.router||e,o=d.useRef(void 0);return b(r.stores.__store,s=>{if(t?.select){if(t.structuralSharing??r.options.defaultStructuralSharing){const n=h(o.current,t.select(s));return o.current=n,n}return t.select(s)}return s})}function M(){const t=f.c(3),{toggleSidebar:e}=m();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=c.jsx(j,{size:16}),t[0]=r):r=t[0];let o;return t[1]!==e?(o=c.jsx(R,{onClick:e,"aria-label":"Toggle sidebar",children:r}),t[1]=e,t[2]=o):o=t[2],o}function y(t){const e=f.c(12),{renderSidebar:r}=t,{openMobile:o,setOpenMobile:s}=m();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=c.jsx(p,{className:"sr-only",children:"Navigation"}),e[0]=n):n=e[0];let i;e[1]!==s?(i=()=>s(!1),e[1]=s,e[2]=i):i=e[2];let l;e[3]!==r||e[4]!==i?(l=r({onClose:i}),e[3]=r,e[4]=i,e[5]=l):l=e[5];let a;e[6]!==l?(a=c.jsxs(x,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[n,l]}),e[6]=l,e[7]=a):a=e[7];let u;return e[8]!==o||e[9]!==s||e[10]!==a?(u=c.jsx(g,{open:o,onOpenChange:s,children:a}),e[8]=o,e[9]=s,e[10]=a,e[11]=u):u=e[11],u}export{y as M,M as S,E as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as k,d as Z,j as s,B as C,bX as K,t as W,ae as ge,a as B,y as ve,q as pe,K as ce,bY as ke,bZ as Ne,L as H,r as X,b_ as Oe,b$ as _e,k as ae,b as Ce,D as Ae,e as ye,u as Te,I as Ee,b1 as $e,c0 as ze,c1 as de,c2 as Me,c3 as Le,S as Pe,O as Ie,c4 as Fe}from"./index-BYxLxb_N.js";import{A as te}from"./avatar-DJ3QuuQ7.js";import{t as xe,a as Re}from"./Users03-ChX-8nqW.js";import{i as qe}from"./SearchLg-C3MEBHez.js";import{i as De,s as Ue,a as L,n as Ke}from"./Stars02-BbYM6zLw.js";import{s as Ge}from"./XClose-BYQo3mf2.js";import{i as U}from"./CheckCircle-CCiLVyhM.js";import{i as ue}from"./FilterLines-BIcisIR_.js";import{i as G}from"./Zap-Bt3fWEYQ.js";import{d as He,c as Be,a as We,e as Ye}from"./dialog-DfRvSPDX.js";import{R as Je}from"./required-auth-layout-DSF1nEU7.js";import{g as Qe,c as Ve,A as Xe}from"./hooks-D1Xb43Cw.js";import{a as Ze,m as et,S as tt}from"./use-mcp-client-BRyGzGjZ.js";import{n as nt}from"./tab-id-AX1D_RMI.js";import{c as st}from"./use-organization-settings-lLQudMV_.js";import{u as ot}from"./use-org-sso-Dg7bL-tR.js";function it(t){const e=k.c(27),{orgName:n,orgSlug:o,orgLogo:i,domain:r}=t;let a;e[0]!==o?(a={mutationFn:async()=>{const b=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),v=await b.json();if(!b.ok||!v.success)throw new Error(v.error??"Failed to join organization");return v},onSuccess:b=>{window.location.href=`/${b.slug??o}`},onError:rt},e[0]=o,e[1]=a):a=e[1];const l=Z(a),c=at;let d;e[2]!==i||e[3]!==n?(d=i?s.jsx(te,{url:i,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(xe,{className:"h-6 w-6 text-primary"})}),e[2]=i,e[3]=n,e[4]=d):d=e[4];let u;e[5]!==n?(u=s.jsxs("h3",{className:"text-lg font-medium",children:["Join ",n,"?"]}),e[5]=n,e[6]=u):u=e[6];let m;e[7]!==r?(m=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Anyone with an ",s.jsxs("strong",{children:["@",r]})," email can join this organization."]}),e[7]=r,e[8]=m):m=e[8];let h;e[9]!==u||e[10]!==m?(h=s.jsxs("div",{className:"space-y-2",children:[u,m]}),e[9]=u,e[10]=m,e[11]=h):h=e[11];let y;e[12]!==l?(y=()=>l.mutate(),e[12]=l,e[13]=y):y=e[13];const g=l.isPending?"Joining…":`Enter ${n}`;let f;e[14]!==l.isPending||e[15]!==y||e[16]!==g?(f=s.jsx(C,{onClick:y,disabled:l.isPending,children:g}),e[14]=l.isPending,e[15]=y,e[16]=g,e[17]=f):f=e[17];let p;e[18]!==l.isPending?(p=s.jsx(C,{variant:"ghost",onClick:c,disabled:l.isPending,children:"Go to home"}),e[18]=l.isPending,e[19]=p):p=e[19];let x;e[20]!==f||e[21]!==p?(x=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f,p]}),e[20]=f,e[21]=p,e[22]=x):x=e[22];let S;return e[23]!==x||e[24]!==d||e[25]!==h?(S=s.jsxs(K,{children:[d,h,x]}),e[23]=x,e[24]=d,e[25]=h,e[26]=S):S=e[26],S}function at(){window.location.href="/"}function rt(t){W.error(t instanceof Error?t.message:"Failed to join organization")}function me(t){const e=k.c(17),{orgSlug:n,orgName:o,reason:i}=t,r=lt,a=i==="not-found",l=a?qe:ge,c=a?"Organization not found":"No access";let d;e[0]!==a||e[1]!==o||e[2]!==n?(d=a?s.jsxs(s.Fragment,{children:["We couldn't find an organization called ",s.jsx("strong",{children:n}),"."]}):s.jsxs(s.Fragment,{children:["You don't have access to ",s.jsx("strong",{children:o??n}),".",s.jsx("br",{}),"Ask an admin to invite you."]}),e[0]=a,e[1]=o,e[2]=n,e[3]=d):d=e[3];const u=d;let m;e[4]!==l?(m=s.jsx("div",{className:"bg-muted p-3 rounded-full",children:s.jsx(l,{className:"h-6 w-6 text-muted-foreground"})}),e[4]=l,e[5]=m):m=e[5];let h;e[6]!==c?(h=s.jsx("h3",{className:"text-lg font-medium",children:c}),e[6]=c,e[7]=h):h=e[7];let y;e[8]!==u?(y=s.jsx("p",{className:"text-sm text-muted-foreground",children:u}),e[8]=u,e[9]=y):y=e[9];let g;e[10]!==h||e[11]!==y?(g=s.jsxs("div",{className:"space-y-2",children:[h,y]}),e[10]=h,e[11]=y,e[12]=g):g=e[12];let f;e[13]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(C,{onClick:r,children:"Go to home"}),e[13]=f):f=e[13];let p;return e[14]!==m||e[15]!==g?(p=s.jsxs(K,{children:[m,g,f]}),e[14]=m,e[15]=g,e[16]=p):p=e[16],p}function lt(){window.location.href="/"}function ct(t){const e=k.c(39),{invitationId:n,orgName:o,orgSlug:i,orgLogo:r}=t;let a;e[0]!==n?(a=async()=>{const O=await B.organization.acceptInvitation({invitationId:n});if(O.error)throw new Error(O.error.message);return O.data},e[0]=n,e[1]=a):a=e[1];let l;e[2]!==i?(l=()=>{ve(),window.location.href=`/${i}`},e[2]=i,e[3]=l):l=e[3];let c;e[4]!==a||e[5]!==l?(c={mutationFn:a,onSuccess:l,onError:mt},e[4]=a,e[5]=l,e[6]=c):c=e[6];const d=Z(c);let u;e[7]!==n?(u=async()=>{const O=await B.organization.rejectInvitation({invitationId:n});if(O.error)throw new Error(O.error.message);return O.data},e[7]=n,e[8]=u):u=e[8];let m;e[9]===Symbol.for("react.memo_cache_sentinel")?(m=ut,e[9]=m):m=e[9];let h;e[10]!==u?(h={mutationFn:u,onSuccess:m,onError:dt},e[10]=u,e[11]=h):h=e[11];const y=Z(h),g=d.isPending||y.isPending;let f;e[12]!==r||e[13]!==o?(f=r?s.jsx(te,{url:r,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(De,{className:"h-6 w-6 text-primary"})}),e[12]=r,e[13]=o,e[14]=f):f=e[14];let p;e[15]!==o?(p=s.jsxs("h3",{className:"text-lg font-medium",children:["You've been invited to ",s.jsx("strong",{children:o})]}),e[15]=o,e[16]=p):p=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("p",{className:"text-sm text-muted-foreground",children:"Accept the invitation to join this organization."}),e[17]=x):x=e[17];let S;e[18]!==p?(S=s.jsxs("div",{className:"space-y-2",children:[p,x]}),e[18]=p,e[19]=S):S=e[19];let b;e[20]!==d?(b=()=>d.mutate(),e[20]=d,e[21]=b):b=e[21];const v=d.isPending?"Accepting…":"Accept invitation";let N;e[22]!==g||e[23]!==b||e[24]!==v?(N=s.jsx(C,{onClick:b,disabled:g,children:v}),e[22]=g,e[23]=b,e[24]=v,e[25]=N):N=e[25];let T;e[26]!==y?(T=()=>y.mutate(),e[26]=y,e[27]=T):T=e[27];const $=y.isPending?"Declining…":"Decline";let w;e[28]!==g||e[29]!==T||e[30]!==$?(w=s.jsx(C,{variant:"ghost",onClick:T,disabled:g,children:$}),e[28]=g,e[29]=T,e[30]=$,e[31]=w):w=e[31];let E;e[32]!==N||e[33]!==w?(E=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,w]}),e[32]=N,e[33]=w,e[34]=E):E=e[34];let z;return e[35]!==S||e[36]!==E||e[37]!==f?(z=s.jsxs(K,{children:[f,S,E]}),e[35]=S,e[36]=E,e[37]=f,e[38]=z):z=e[38],z}function dt(t){W.error(t instanceof Error?t.message:"Failed to decline invitation")}function ut(){W.success("Invitation declined"),window.location.href="/"}function mt(t){W.error(t instanceof Error?t.message:"Failed to accept invitation")}function ft(t){const e=k.c(10),{orgName:n,orgLogo:o}=t;let i;e[0]!==o||e[1]!==n?(i=o?s.jsx(te,{url:o,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(Ue,{className:"h-6 w-6 text-primary"})}),e[0]=o,e[1]=n,e[2]=i):i=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("h3",{className:"text-lg font-medium",children:"Request pending"}),e[3]=r):r=e[3];let a;e[4]!==n?(a=s.jsxs("div",{className:"space-y-2",children:[r,s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Your request to join ",s.jsx("strong",{children:n})," is waiting for an admin to approve it. You'll get access once it's approved."]})]}),e[4]=n,e[5]=a):a=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(C,{variant:"ghost",onClick:ht,children:"Go to home"}),e[6]=l):l=e[6];let c;return e[7]!==i||e[8]!==a?(c=s.jsxs(K,{children:[i,a,l]}),e[7]=i,e[8]=a,e[9]=c):c=e[9],c}function ht(){window.location.href="/"}function gt(t){const e=k.c(30),{orgName:n,orgSlug:o,orgLogo:i,domain:r}=t;let a;e[0]!==o?(a=async()=>{const v=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),N=await v.json();if(!v.ok||!N.success)throw new Error(N.error??"Failed to request access");return N},e[0]=o,e[1]=a):a=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=xt,e[2]=l):l=e[2];let c;e[3]!==a?(c={mutationFn:a,onSuccess:l,onError:yt},e[3]=a,e[4]=c):c=e[4];const d=Z(c);let u;e[5]!==i||e[6]!==n?(u=i?s.jsx(te,{url:i,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(xe,{className:"h-6 w-6 text-primary"})}),e[5]=i,e[6]=n,e[7]=u):u=e[7];let m;e[8]!==n?(m=s.jsxs("h3",{className:"text-lg font-medium",children:["Request to join ",n,"?"]}),e[8]=n,e[9]=m):m=e[9];let h;e[10]!==r?(h=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["An admin must approve requests from ",s.jsxs("strong",{children:["@",r]})," emails before you can join."]}),e[10]=r,e[11]=h):h=e[11];let y;e[12]!==m||e[13]!==h?(y=s.jsxs("div",{className:"space-y-2",children:[m,h]}),e[12]=m,e[13]=h,e[14]=y):y=e[14];let g;e[15]!==d?(g=()=>d.mutate(),e[15]=d,e[16]=g):g=e[16];const f=d.isPending?"Requesting…":"Request to join";let p;e[17]!==d.isPending||e[18]!==g||e[19]!==f?(p=s.jsx(C,{onClick:g,disabled:d.isPending,children:f}),e[17]=d.isPending,e[18]=g,e[19]=f,e[20]=p):p=e[20];let x;e[21]!==d.isPending?(x=s.jsx(C,{variant:"ghost",onClick:pt,disabled:d.isPending,children:"Go to home"}),e[21]=d.isPending,e[22]=x):x=e[22];let S;e[23]!==p||e[24]!==x?(S=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[p,x]}),e[23]=p,e[24]=x,e[25]=S):S=e[25];let b;return e[26]!==S||e[27]!==u||e[28]!==y?(b=s.jsxs(K,{children:[u,y,S]}),e[26]=S,e[27]=u,e[28]=y,e[29]=b):b=e[29],b}function pt(){window.location.href="/"}function yt(t){W.error(t instanceof Error?t.message:"Failed to request access")}function xt(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function bt(t){const e=k.c(7);let n;e[0]!==t?(n=ce.orgAccessStatus(t),e[0]=t,e[1]=n):n=e[1];let o;e[2]!==t?(o=async()=>{const r=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!r.ok)throw new Error(`org-access-status failed (${r.status})`);return await r.json()},e[2]=t,e[3]=o):o=e[3];let i;return e[4]!==n||e[5]!==o?(i={queryKey:n,queryFn:o,refetchOnWindowFocus:!1},e[4]=n,e[5]=o,e[6]=i):i=e[6],pe(i)}function wt({orgSlug:t}){const{data:e}=bt(t);if(e.status!=="member"){ke()?.org===t&&Ne();const n=localStorage.getItem(H.lastOrgSlug())===t;if(n&&localStorage.removeItem(H.lastOrgSlug()),n&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?s.jsx(me,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?s.jsx(ct,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?s.jsx(it,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?s.jsx(gt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?s.jsx(ft,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):s.jsx(me,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function St(t){const e=k.c(20),{release:n,onCtaClick:o,onLearnMoreClick:i}=t;let r;e[0]!==n.eyebrow?(r=n.eyebrow&&s.jsx("p",{className:"text-xs text-muted-foreground",children:n.eyebrow}),e[0]=n.eyebrow,e[1]=r):r=e[1];let a;e[2]!==n.title?(a=s.jsx("h3",{className:"text-base font-semibold text-foreground",children:n.title}),e[2]=n.title,e[3]=a):a=e[3];let l;e[4]!==r||e[5]!==a?(l=s.jsxs("div",{children:[r,a]}),e[4]=r,e[5]=a,e[6]=l):l=e[6];let c;e[7]!==n.bullets?(c=n.bullets.map(jt),e[7]=n.bullets,e[8]=c):c=e[8];let d;e[9]!==c?(d=s.jsx("ul",{className:"flex flex-col gap-3",children:c}),e[9]=c,e[10]=d):d=e[10];let u;e[11]!==o||e[12]!==i||e[13]!==n.cta||e[14]!==n.learnMoreHref?(u=(n.cta||n.learnMoreHref)&&s.jsxs("div",{className:"flex items-center justify-between pt-1",children:[n.learnMoreHref?s.jsx("a",{href:n.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:i,className:"text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline",children:"Learn More"}):s.jsx("span",{}),n.cta&&s.jsx(C,{asChild:!0,size:"sm",onClick:o,children:s.jsx("a",{href:n.cta.href,children:n.cta.label})})]}),e[11]=o,e[12]=i,e[13]=n.cta,e[14]=n.learnMoreHref,e[15]=u):u=e[15];let m;return e[16]!==l||e[17]!==d||e[18]!==u?(m=s.jsxs("div",{className:"flex flex-col gap-3",children:[l,d,u]}),e[16]=l,e[17]=d,e[18]=u,e[19]=m):m=e[19],m}function jt(t,e){return s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(t.icon,{size:20,className:"text-muted-foreground mt-0.5 shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),s.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const be=[{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:L,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:U,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:G,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:U,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:L,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:G,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:L,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:U,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:G,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:L,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:U,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:G,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:L,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:ue,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:U,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:Re,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:G,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:U,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:L,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:ue,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:L,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:Ke,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],ee="studio.release-feed.v1",re=new Set;let P="",I={},le=!1;function vt(){if(le)return P||"{}";try{return localStorage.getItem(ee)??"{}"}catch{return P||"{}"}}function we(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function fe(){const t=vt();return t!==P&&(P=t,I=we(t)),I}function kt(t){re.add(t);const e=n=>{if(!(n.key!==ee&&n.key!==null)){try{const o=localStorage.getItem(ee)??"{}",r={...we(o),...I};I=r,P=JSON.stringify(r)}catch{}t()}};return window.addEventListener("storage",e),()=>{re.delete(t),window.removeEventListener("storage",e)}}function Nt(t){I=t,P=JSON.stringify(t);try{localStorage.setItem(ee,P),le=!1}catch{le=!0}re.forEach(e=>e())}function Ot(){const t=k.c(7),e=X.useSyncExternalStore(kt,fe,fe);let n;t[0]!==e?(n=c=>!!e[c],t[0]=e,t[1]=n):n=t[1];const o=n,i=_t;let r;t[2]!==e?(r=be.reduce((c,d)=>e[d.id]?c:c+1,0),t[2]=e,t[3]=r):r=t[3];const a=r;let l;return t[4]!==o||t[5]!==a?(l={isSeen:o,markSeen:i,unseenCount:a},t[4]=o,t[5]=a,t[6]=l):l=t[6],l}function _t(t){I[t]||Nt({...I,[t]:{seenAt:new Date().toISOString()}})}const Ct=720*60*60*1e3,At=10080*60*1e3;function Tt(t){const[e,n,o]=t.split("-").map(Number);return!e||!n||!o?new Date(t).getTime():new Date(e,n-1,o).getTime()}function Et(t){const e=be[0];if(!e)return null;const n=Tt(e.date),o=t-n;return o<0||o>Ct?null:e}function $t(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function zt(t,e){const n=$t(t);return n===null?!1:e-n>=At}function Mt(){const t=k.c(22),{data:e}=B.useSession(),{isSeen:n,markSeen:o}=Ot();let i,r,a;if(t[0]!==n||t[1]!==e?.user?.createdAt){a=Symbol.for("react.early_return_sentinel");e:{const g=Date.now();if(i=Et(g),!i){a=null;break e}if(!zt(e?.user?.createdAt,g)){a=null;break e}r=n(i.id)}t[0]=n,t[1]=e?.user?.createdAt,t[2]=i,t[3]=r,t[4]=a}else i=t[2],r=t[3],a=t[4];if(a!==Symbol.for("react.early_return_sentinel"))return a;if(r)return null;let l;t[5]!==i.id||t[6]!==o?(l=()=>o(i.id),t[5]=i.id,t[6]=o,t[7]=l):l=t[7];let c;t[8]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Ge,{size:14}),t[8]=c):c=t[8];let d;t[9]!==l?(d=s.jsx(C,{size:"icon",variant:"ghost","aria-label":"Dismiss release announcement",className:"absolute right-1.5 top-1.5 size-7 text-muted-foreground",onClick:l,children:c}),t[9]=l,t[10]=d):d=t[10];let u,m;t[11]!==i.id||t[12]!==o?(u=()=>o(i.id),m=()=>o(i.id),t[11]=i.id,t[12]=o,t[13]=u,t[14]=m):(u=t[13],m=t[14]);let h;t[15]!==i||t[16]!==u||t[17]!==m?(h=s.jsx(St,{release:i,onCtaClick:u,onLearnMoreClick:m}),t[15]=i,t[16]=u,t[17]=m,t[18]=h):h=t[18];let y;return t[19]!==d||t[20]!==h?(y=s.jsxs("div",{role:"region","aria-label":"Release announcement",className:"relative rounded-lg border border-border bg-background p-3 shadow-sm",children:[d,h]}),t[19]=d,t[20]=h,t[21]=y):y=t[21],y}const Se=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),M=Se?"⌘":"Ctrl",A={keyboardShortcuts:{keys:[M,"K"],description:"Keyboard shortcuts"},back:{keys:[M,"["],description:"Back to previous"},focusChatInput:{keys:[M,"L"],description:"Focus chat input"},saveAndFormat:{keys:[M,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[M,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[M,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",M,"S"],description:"New task"},toggleDaemon:{keys:[M,"D"],description:"Toggle daemon logs"}},Lt=[{label:"General",shortcuts:[A.keyboardShortcuts,A.back,A.newTask,A.toggleDaemon]},{label:"Editor",shortcuts:[A.saveAndFormat]},{label:"Chat",shortcuts:[A.focusChatInput,A.togglePlanMode,A.sendMessage,A.newLine]},{label:"Questions",shortcuts:[A.selectOption]},{label:"Monitoring",shortcuts:[A.applyFilter]}];function he(t){return Se?t.metaKey:t.ctrlKey}function Pt(t){const e=k.c(5),{open:n,onOpenChange:o}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Be,{children:s.jsx(We,{children:"Keyboard Shortcuts"})}),e[0]=i):i=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(He,{className:"sm:max-w-md",children:[i,s.jsx("div",{className:"flex flex-col gap-4",children:Lt.map(It)})]}),e[1]=r):r=e[1];let a;return e[2]!==o||e[3]!==n?(a=s.jsx(Ye,{open:n,onOpenChange:o,children:r}),e[2]=o,e[3]=n,e[4]=a):a=e[4],a}function It(t){return s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),s.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Ft)})]},t.label)}function Ft(t){return s.jsxs("div",{className:"flex items-center justify-between py-1",children:[s.jsx("span",{className:"text-sm",children:t.description}),s.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Rt)})]},t.description)}function Rt(t){return s.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}function qt({activeOrg:t}){return t&&(Oe(t.id,{name:t.name??void 0,slug:t.slug??void 0}),_e()),null}function Dt(t,e,n){if(!n)return null;const o=Qe(t,e);return o?o.threads.get().find(r=>r.id===n)?.branch??null:null}function je(t){return{queryKey:ce.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function fn(t){const e=k.c(10);let n;e[0]!==t?(n=je(t),e[0]=t,e[1]=n):n=e[1];const o=ae(n);let i;e[2]!==o.data?.prompts?(i=o.data?.prompts??[],e[2]=o.data?.prompts,e[3]=i):i=e[3];let r;e[4]!==o.data?.tiles?(r=o.data?.tiles??[],e[4]=o.data?.tiles,e[5]=r):r=e[5];let a;return e[6]!==o.isLoading||e[7]!==i||e[8]!==r?(a={isLoading:o.isLoading,prompts:i,tiles:r},e[6]=o.isLoading,e[7]=i,e[8]=r,e[9]=a):a=e[9],a}function Ut(t){const e=k.c(17),{orgSlug:n,orgName:o,domain:i}=t;let r;e[0]!==n?(r=()=>{window.location.href=`/api/${encodeURIComponent(n)}/sso/authorize`},e[0]=n,e[1]=r):r=e[1];const a=r,l=Kt;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(ge,{className:"h-6 w-6 text-primary"})}),e[2]=c):c=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("h3",{className:"text-lg font-medium",children:"SSO Authentication Required"}),e[3]=d):d=e[3];let u;e[4]!==i||e[5]!==o?(u=o?s.jsxs(s.Fragment,{children:[s.jsx("strong",{children:o})," requires SSO authentication",i?` via ${i}`:"","."]}):"This organization requires SSO authentication to access.",e[4]=i,e[5]=o,e[6]=u):u=e[6];let m;e[7]!==u?(m=s.jsxs("div",{className:"space-y-2",children:[d,s.jsx("p",{className:"text-sm text-muted-foreground",children:u})]}),e[7]=u,e[8]=m):m=e[8];let h;e[9]!==a?(h=s.jsx(C,{onClick:a,children:"Sign in with SSO"}),e[9]=a,e[10]=h):h=e[10];let y;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(C,{variant:"ghost",onClick:l,children:"Go back"}),e[11]=y):y=e[11];let g;e[12]!==h?(g=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[h,y]}),e[12]=h,e[13]=g):g=e[13];let f;return e[14]!==m||e[15]!==g?(f=s.jsxs(K,{children:[c,m,g]}),e[14]=m,e[15]=g,e[16]=f):f=e[16],f}function Kt(){window.location.href="/"}function Gt(t){const e=k.c(8),{org:n,children:o}=t,r=st(n.id,n.slug)?.enabled_plugins??null;let a;e[0]!==n.id||e[1]!==n.name||e[2]!==r?(a={id:n.id,organizationId:n.id,slug:"_org",name:n.name,enabledPlugins:r,ui:null},e[0]=n.id,e[1]=n.name,e[2]=r,e[3]=a):a=e[3];const l=a;let c;return e[4]!==o||e[5]!==n||e[6]!==l?(c=s.jsx(Fe,{org:n,project:l,children:o}),e[4]=o,e[5]=n,e[6]=l,e[7]=c):c=e[7],c}function Ht(){const t=Ce(),e=Ve(),{org:n,locator:o}=Ae(),i=ye({strict:!1}),r=Te({strict:!1}),a=i.org??"",l=i.taskId??"",c=(f,p,x=!0)=>t({to:"/$org/$taskId",params:{org:a,taskId:f},search:p,replace:x}),d=(f,p=!0)=>c(l,f,p),u=f=>d(p=>({...p,chat:f?1:0})),m=(f,p,x)=>c(f,S=>{const b={chat:1};if(p?b.virtualmcpid=p:S.virtualmcpid&&(b.virtualmcpid=S.virtualmcpid),x?.main)b.main=x.main;else{const v=S.main;v&&typeof v=="string"&&!nt(v)&&(b.main=v)}return x?.autosend&&(b.autosend=Xe),b},!1);return{setChatOpen:u,setTaskId:m,createNewTask:async f=>{const p=crypto.randomUUID(),x=f??r.virtualmcpid??Ze(n.id).id,b=x===r.virtualmcpid?Dt(n.slug,o,l):null;try{await e?.create({id:p,virtual_mcp_id:x,...b?{branch:b}:{}})}catch{}m(p,x)},openTab:f=>c(l||crypto.randomUUID(),p=>({...p,main:f})),toggleMain:()=>d(f=>{if(f.main!==void 0&&f.main!=="0")return{...f,main:"0"};const x={...f};return delete x.main,x})}}function Bt(){const t=k.c(52);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const o=Ee(e)?.params.org;let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},t[1]=i):i=t[1];const{taskId:r}=ye(i),[a,l]=X.useState(!1),c=$e(),d=o??"";let u;t[2]!==d?(u=je(d),t[2]=d,t[3]=u):u=t[3];const m=!!o&&!r;let h;t[4]!==u||t[5]!==m?(h={...u,enabled:m},t[4]=u,t[5]=m,t[6]=h):h=t[6],ae(h);const{data:y}=B.useSession(),g=y?.user?.id;let f;t[7]!==o||t[8]!==g?(f=o&&g?ze(g,o):null,t[7]=o,t[8]=g,t[9]=f):f=t[9];const p=f;let x,S;t[10]!==c?(x=()=>{const j=_=>{if(he(_)&&_.code==="KeyK"){_.preventDefault(),l(!0);return}he(_)&&_.code==="BracketLeft"&&c.history.canGoBack()&&(_.preventDefault(),c.history.back())};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},S=[c],t[10]=c,t[11]=x,t[12]=S):(x=t[11],S=t[12]),X.useEffect(x,S);let b;t[13]!==o?(b=ce.activeOrganization(o),t[13]=o,t[14]=b):b=t[14];let v;t[15]!==o||t[16]!==g?(v=async()=>{if(!o)return null;performance.mark("mesh:active-org-fetch:start");const{data:j}=await B.organization.getFullOrganization({query:{organizationSlug:o}}).finally(Wt),_=de(j);return j&&!_&&localStorage.setItem(H.lastOrgSlug(),o),g&&j&&Le(g,o,j),j},t[15]=o,t[16]=g,t[17]=v):v=t[17];const N=p?p.data:void 0,T=p?.updatedAt;let $;t[18]!==v||t[19]!==N||t[20]!==T||t[21]!==b?($={queryKey:b,queryFn:v,initialData:N,initialDataUpdatedAt:T,gcTime:1/0,refetchOnWindowFocus:!1},t[18]=v,t[19]=N,t[20]=T,t[21]=b,t[22]=$):$=t[22];const{data:w}=pe($),E=w?.id,z=w?.slug,{data:O}=ot(E,z),ne=E??"",se=z??"";let F;t[23]!==ne||t[24]!==se?(F=et({connectionId:tt,orgId:ne,orgSlug:se}),t[23]=ne,t[24]=se,t[25]=F):F=t[25];const oe=!!E&&!!z;let Y;if(t[26]!==F||t[27]!==oe?(Y={...F,enabled:oe},t[26]=F,t[27]=oe,t[28]=Y):Y=t[28],ae(Y),!w){let j;t[29]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Pe,{}),t[29]=j):j=t[29];let _;return t[30]!==o?(_=s.jsx(X.Suspense,{fallback:j,children:s.jsx(wt,{orgSlug:o})}),t[30]=o,t[31]=_):_=t[31],_}if(de(w)){localStorage.getItem(H.lastOrgSlug())===o&&localStorage.removeItem(H.lastOrgSlug());let j;return t[32]!==w.name?(j=s.jsx(Me,{orgName:w.name}),t[32]=w.name,t[33]=j):j=t[33],j}if(O?.ssoRequired&&!O.authenticated){let j;return t[34]!==w.id||t[35]!==w.name||t[36]!==w.slug||t[37]!==O.domain?(j=s.jsx(Ut,{orgId:w.id,orgSlug:w.slug,orgName:w.name,domain:O.domain}),t[34]=w.id,t[35]=w.name,t[36]=w.slug,t[37]=O.domain,t[38]=j):j=t[38],j}const ie=w.logo??null;let R;t[39]!==w||t[40]!==ie?(R={...w,logo:ie},t[39]=w,t[40]=ie,t[41]=R):R=t[41];let q;t[42]!==w?(q=s.jsx(qt,{activeOrg:w}),t[42]=w,t[43]=q):q=t[43];let J,Q;t[44]===Symbol.for("react.memo_cache_sentinel")?(J=s.jsx(Ie,{}),Q=s.jsx(Mt,{}),t[44]=J,t[45]=Q):(J=t[44],Q=t[45]);let D;t[46]!==a?(D=s.jsx(Pt,{open:a,onOpenChange:l}),t[46]=a,t[47]=D):D=t[47];let V;return t[48]!==R||t[49]!==q||t[50]!==D?(V=s.jsxs(Gt,{org:R,children:[q,J,Q,D]}),t[48]=R,t[49]=q,t[50]=D,t[51]=V):V=t[51],V}function Wt(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function Yt(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Je,{children:s.jsx(Bt,{})}),t[0]=e):e=t[0],e}const hn=Object.freeze(Object.defineProperty({__proto__:null,default:Yt,usePanelActions:Ht},Symbol.toStringTag,{value:"Module"}));export{A as K,be as R,St as a,Ht as b,fn as c,je as h,he as i,Dt as r,hn as s,Ot as u};
|
package/dist/client/assets/{shell-route-loading-LDGMG-07.js → shell-route-loading-Dddc3D5B.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as S,l as y,j as t,am as G,i as K}from"./index-
|
|
1
|
+
import{c as S,l as y,j as t,am as G,i as K}from"./index-BYxLxb_N.js";import{i as L}from"./Zap-Bt3fWEYQ.js";import{T as U,a as V,b as W}from"./tooltip-CIGYkCAI.js";import{a as q}from"./use-virtual-mcp-BIWjDnR3.js";import{A as H}from"./agent-icon-CSOnaLfl.js";import{g as J}from"./task-status-BilXNld4.js";import{u as O,f as Q}from"./use-clock-tick-C5iYcOG_.js";import{f as X}from"./sortable.esm-Dha08fCq.js";function Y(n){return n==="ephemeral"||n.startsWith("thread:")}function re(n){const e=S.c(40),{task:s,isActive:j,onClick:a,onArchive:x,showAutomationBadge:I,showAgentIcon:w,hideStatusIdle:$,indented:B}=n,A=J(s.status),D=A.icon,b=s.metadata?.kind==="tool_call_run",i=q(b?void 0:s.virtual_mcp_id);let N;e[0]!==i?(N=X(i),e[0]=i,e[1]=N):N=e[1];const v=N;O(6e4);const _=I||!!s.trigger_id,E=s.id,F="button",M=0;let r;e[2]!==a?(r=o=>{o.target===o.currentTarget&&(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),a())},e[2]=a,e[3]=r):r=e[3];const T=B?"-ml-4 pl-6":"pl-2",C=j?"bg-accent text-accent-foreground":"hover:bg-accent/60";let l;e[4]!==T||e[5]!==C?(l=y("group/row flex items-center gap-2 py-1.5 pr-2 rounded-md cursor-pointer transition-colors",T,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",C),e[4]=T,e[5]=C,e[6]=l):l=e[6];let c;e[7]!==b||e[8]!==w||e[9]!==i?.icon||e[10]!==i?.title?(c=w&&!b&&t.jsx(H,{icon:i?.icon??null,name:i?.title??"?",size:"2xs"}),e[7]=b,e[8]=w,e[9]=i?.icon,e[10]=i?.title,e[11]=c):c=e[11];let u;e[12]!==_?(u=_&&t.jsx(L,{size:12,"aria-label":"Automation-triggered",className:"shrink-0 text-blue-500"}),e[12]=_,e[13]=u):u=e[13];const z=s.title||"Untitled task";let d;e[14]!==z?(d=t.jsx("div",{className:"text-sm text-foreground truncate",children:z}),e[14]=z,e[15]=d):d=e[15];let m;e[16]!==u||e[17]!==d?(m=t.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[u,d]}),e[16]=u,e[17]=d,e[18]=m):m=e[18];let f;e[19]!==v||e[20]!==j||e[21]!==s.branch||e[22]!==s.updated_at?(f=s.updated_at&&t.jsxs("div",{className:y("flex items-center gap-1 text-[11px] min-w-0",j?"text-accent-foreground/70":"text-muted-foreground/60"),children:[s.branch&&!Y(s.branch)?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"truncate font-mono",children:s.branch}),t.jsx("span",{className:"shrink-0",children:"·"})]}):v?t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"truncate",children:[v.owner,"/",v.name]}),t.jsx("span",{className:"shrink-0",children:"·"})]}):null,t.jsx("span",{className:"shrink-0",children:Q(new Date(s.updated_at))})]}),e[19]=v,e[20]=j,e[21]=s.branch,e[22]=s.updated_at,e[23]=f):f=e[23];let p;e[24]!==m||e[25]!==f?(p=t.jsxs("div",{className:"flex-1 min-w-0",children:[m,f]}),e[24]=m,e[25]=f,e[26]=p):p=e[26];const P="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",R=!$&&t.jsx("span",{className:y("[grid-area:slot] flex size-7 items-center justify-center pointer-events-none transition-opacity",x&&"group-hover/row:opacity-0"),"aria-label":A.label,children:t.jsx(D,{size:14,className:y(A.iconClassName,s.status==="in_progress"&&"animate-spin")})});let h;e[27]!==x?(h=x&&t.jsxs(U,{children:[t.jsx(V,{asChild:!0,children:t.jsx("button",{type:"button","aria-label":"Archive task",onClick:o=>{o.stopPropagation(),x()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto transition-opacity flex size-7 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:t.jsx(G,{size:14})})}),t.jsx(W,{side:"right",children:"Archive"})]}),e[27]=x,e[28]=h):h=e[28];let g;e[29]!==R||e[30]!==h?(g=t.jsxs("div",{className:P,children:[R,h]}),e[29]=R,e[30]=h,e[31]=g):g=e[31];let k;return e[32]!==a||e[33]!==p||e[34]!==g||e[35]!==r||e[36]!==l||e[37]!==c||e[38]!==s.id?(k=t.jsxs("div",{"data-task-id":E,role:F,tabIndex:M,onClick:a,onKeyDown:r,className:l,children:[c,p,g]}),e[32]=a,e[33]=p,e[34]=g,e[35]=r,e[36]=l,e[37]=c,e[38]=s.id,e[39]=k):k=e[39],k}function le(){const n=S.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{"data-testid":"shell-route-loading",className:"absolute inset-0 h-full w-full flex items-center justify-center",children:t.jsx(K,{size:20,className:"animate-spin text-muted-foreground"})}),n[0]=e):e=n[0],e}export{le as S,re as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as S,l as w,j as r,r as T,bf as A,bE as H,B as P}from"./index-Btu8MJ2T.js";import{i as R}from"./LayoutLeft-D_an0z1y.js";import{u as V}from"./use-mobile-ClQdwqdV.js";import{d as W,b as G,S as L,a as q,c as F}from"./sheet-BuVYCl7W.js";import{c as D,b as E,a as B,T as z}from"./tooltip--hLULyB8.js";const J="15rem",K="18rem",Q="4.5rem",k=T.createContext(null);function O(){const l=T.useContext(k);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function ie(l){const e=S.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:i}=l,d=s===void 0?!1:s,n=V(),[o,h]=T.useState(d),[u,g]=T.useState(!1),c=a!==void 0,b=c?a:o;let N;e[0]!==c||e[1]!==i?(N=_=>{c||h(_),i?.(_)},e[0]=c,e[1]=i,e[2]=N):N=e[2];const f=N;let j;e[3]!==n||e[4]!==b||e[5]!==f?(j=()=>{n?g(U):f(!b)},e[3]=n,e[4]=b,e[5]=f,e[6]=j):j=e[6];const y=j,m=b?"expanded":"collapsed";let p;e[7]!==n||e[8]!==b||e[9]!==u||e[10]!==f||e[11]!==m||e[12]!==y?(p={state:m,open:b,setOpen:f,isMobile:n,openMobile:u,setOpenMobile:g,toggleSidebar:y},e[7]=n,e[8]=b,e[9]=u,e[10]=f,e[11]=m,e[12]=y,e[13]=p):p=e[13];const v=p;let x;e[14]!==t?(x=r.jsx(D,{delayDuration:0,children:t}),e[14]=t,e[15]=x):x=e[15];let C;return e[16]!==v||e[17]!==x?(C=r.jsx(k.Provider,{value:v,children:x}),e[16]=v,e[17]=x,e[18]=C):C=e[18],C}function U(l){return!l}function le(l){const e=S.c(14);let t,s,a,i;e[0]!==l?({className:s,style:i,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i):(t=e[1],s=e[2],a=e[3],i=e[4]);let d;e[5]!==i?(d={"--sidebar-width":J,"--sidebar-width-icon":Q,...i},e[5]=i,e[6]=d):d=e[6];const n=d;let o;e[7]!==s?(o=w("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=o):o=e[8];let h;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==o?(h=r.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:o,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=o,e[13]=h):h=e[13],h}function re(l){const e=S.c(36);let t,s,a,i,d;e[0]!==l?({side:i,variant:d,className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5]);const n=i===void 0?"left":i,o=d===void 0?"sidebar":d,{isMobile:h,state:u,openMobile:g,setOpenMobile:c}=O();if(h){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":K},e[6]=C):C=e[6];let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsxs(G,{className:"sr-only",children:[r.jsx(L,{children:"Sidebar"}),r.jsx(q,{children:"Displays the mobile sidebar."})]}),e[7]=_):_=e[7];let $;e[8]!==t?($=r.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let M;e[10]!==n||e[11]!==$?(M=r.jsxs(F,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[_,$]}),e[10]=n,e[11]=$,e[12]=M):M=e[12];let I;return e[13]!==g||e[14]!==a||e[15]!==c||e[16]!==M?(I=r.jsx(W,{open:g,onOpenChange:c,...a,children:M}),e[13]=g,e[14]=a,e[15]=c,e[16]=M,e[17]=I):I=e[17],I}const b=u==="expanded",N=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let f;e[18]!==N?(f=w("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",N),e[18]=N,e[19]=f):f=e[19];const j=b?void 0:"icon",y=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let m;e[20]!==s||e[21]!==y?(m=w("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=m):m=e[22];let p;e[23]!==t?(p=r.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=p):p=e[24];let v;e[25]!==a||e[26]!==m||e[27]!==p?(v=r.jsx("div",{"data-slot":"sidebar-container",className:m,...a,children:p}),e[25]=a,e[26]=m,e[27]=p,e[28]=v):v=e[28];let x;return e[29]!==n||e[30]!==u||e[31]!==f||e[32]!==j||e[33]!==v||e[34]!==o?(x=r.jsx("div",{className:f,"data-state":u,"data-collapsible":j,"data-variant":o,"data-side":n,"data-slot":"sidebar",children:v}),e[29]=n,e[30]=u,e[31]=f,e[32]=j,e[33]=v,e[34]=o,e[35]=x):x=e[35],x}function ne(l){const e=S.c(18);let t,s,a;e[0]!==l?({className:t,onClick:s,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:i}=O();let d;e[4]!==t?(d=w("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==i?(n=b=>{s?.(b),i()},e[6]=s,e[7]=i,e[8]=n):n=e[8];let o,h;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(R,{}),h=r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=o,e[10]=h):(o=e[9],h=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=r.jsx(B,{asChild:!0,children:r.jsxs(P,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[o,h]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsxs(E,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",r.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(X)})]}),e[15]=g):g=e[15];let c;return e[16]!==u?(c=r.jsx(D,{delayDuration:300,children:r.jsxs(z,{children:[u,g]})}),e[16]=u,e[17]=c):c=e[17],c}function X(l){return r.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:l},l)}function oe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function de(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ce(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function fe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ue(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function pe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function be(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function me(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function xe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}const Y=H("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function he(l){const e=S.c(28);let t,s,a,i,d,n,o;e[0]!==l?({asChild:a,isActive:i,variant:d,size:n,tooltip:o,className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d,e[6]=n,e[7]=o):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5],n=e[6],o=e[7]);const h=a===void 0?!1:a,u=i===void 0?!1:i,g=d===void 0?"default":d,c=n===void 0?"default":n,b=h?A:"button",{isMobile:N}=O();let f;e[8]!==t||e[9]!==c||e[10]!==g?(f=w(Y({variant:g,size:c}),t),e[8]=t,e[9]=c,e[10]=g,e[11]=f):f=e[11];let j;e[12]!==b||e[13]!==u||e[14]!==s||e[15]!==c||e[16]!==f?(j=r.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":c,"data-active":u,className:f,...s}),e[12]=b,e[13]=u,e[14]=s,e[15]=c,e[16]=f,e[17]=j):j=e[17];const y=j;if(!o)return y;if(typeof o=="string"){let x;e[18]!==o?(x={children:o},e[18]=o,e[19]=x):x=e[19],o=x}let m;e[20]!==y?(m=r.jsx(B,{asChild:!0,children:y}),e[20]=y,e[21]=m):m=e[21];let p;e[22]!==N||e[23]!==o?(p=r.jsx(E,{side:"right",align:"center",hidden:N,...o}),e[22]=N,e[23]=o,e[24]=p):p=e[24];let v;return e[25]!==m||e[26]!==p?(v=r.jsxs(z,{children:[m,p]}),e[25]=m,e[26]=p,e[27]=v):v=e[27],v}export{xe as S,he as a,pe as b,be as c,me as d,fe as e,ue as f,re as g,de as h,ce as i,oe as j,le as k,ie as l,ne as m,O as u};
|
|
1
|
+
import{c as S,l as w,j as r,r as T,bf as A,bE as H,B as P}from"./index-BYxLxb_N.js";import{i as R}from"./LayoutLeft-D0U40IKQ.js";import{u as V}from"./use-mobile-42JaqbyB.js";import{d as W,b as G,S as L,a as q,c as F}from"./sheet-ChiQca7K.js";import{c as D,b as E,a as B,T as z}from"./tooltip-CIGYkCAI.js";const J="15rem",K="18rem",Q="4.5rem",k=T.createContext(null);function O(){const l=T.useContext(k);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function ie(l){const e=S.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:i}=l,d=s===void 0?!1:s,n=V(),[o,h]=T.useState(d),[u,g]=T.useState(!1),c=a!==void 0,b=c?a:o;let N;e[0]!==c||e[1]!==i?(N=_=>{c||h(_),i?.(_)},e[0]=c,e[1]=i,e[2]=N):N=e[2];const f=N;let j;e[3]!==n||e[4]!==b||e[5]!==f?(j=()=>{n?g(U):f(!b)},e[3]=n,e[4]=b,e[5]=f,e[6]=j):j=e[6];const y=j,m=b?"expanded":"collapsed";let p;e[7]!==n||e[8]!==b||e[9]!==u||e[10]!==f||e[11]!==m||e[12]!==y?(p={state:m,open:b,setOpen:f,isMobile:n,openMobile:u,setOpenMobile:g,toggleSidebar:y},e[7]=n,e[8]=b,e[9]=u,e[10]=f,e[11]=m,e[12]=y,e[13]=p):p=e[13];const v=p;let x;e[14]!==t?(x=r.jsx(D,{delayDuration:0,children:t}),e[14]=t,e[15]=x):x=e[15];let C;return e[16]!==v||e[17]!==x?(C=r.jsx(k.Provider,{value:v,children:x}),e[16]=v,e[17]=x,e[18]=C):C=e[18],C}function U(l){return!l}function le(l){const e=S.c(14);let t,s,a,i;e[0]!==l?({className:s,style:i,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i):(t=e[1],s=e[2],a=e[3],i=e[4]);let d;e[5]!==i?(d={"--sidebar-width":J,"--sidebar-width-icon":Q,...i},e[5]=i,e[6]=d):d=e[6];const n=d;let o;e[7]!==s?(o=w("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=o):o=e[8];let h;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==o?(h=r.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:o,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=o,e[13]=h):h=e[13],h}function re(l){const e=S.c(36);let t,s,a,i,d;e[0]!==l?({side:i,variant:d,className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5]);const n=i===void 0?"left":i,o=d===void 0?"sidebar":d,{isMobile:h,state:u,openMobile:g,setOpenMobile:c}=O();if(h){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":K},e[6]=C):C=e[6];let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsxs(G,{className:"sr-only",children:[r.jsx(L,{children:"Sidebar"}),r.jsx(q,{children:"Displays the mobile sidebar."})]}),e[7]=_):_=e[7];let $;e[8]!==t?($=r.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let M;e[10]!==n||e[11]!==$?(M=r.jsxs(F,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[_,$]}),e[10]=n,e[11]=$,e[12]=M):M=e[12];let I;return e[13]!==g||e[14]!==a||e[15]!==c||e[16]!==M?(I=r.jsx(W,{open:g,onOpenChange:c,...a,children:M}),e[13]=g,e[14]=a,e[15]=c,e[16]=M,e[17]=I):I=e[17],I}const b=u==="expanded",N=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let f;e[18]!==N?(f=w("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",N),e[18]=N,e[19]=f):f=e[19];const j=b?void 0:"icon",y=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let m;e[20]!==s||e[21]!==y?(m=w("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=m):m=e[22];let p;e[23]!==t?(p=r.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=p):p=e[24];let v;e[25]!==a||e[26]!==m||e[27]!==p?(v=r.jsx("div",{"data-slot":"sidebar-container",className:m,...a,children:p}),e[25]=a,e[26]=m,e[27]=p,e[28]=v):v=e[28];let x;return e[29]!==n||e[30]!==u||e[31]!==f||e[32]!==j||e[33]!==v||e[34]!==o?(x=r.jsx("div",{className:f,"data-state":u,"data-collapsible":j,"data-variant":o,"data-side":n,"data-slot":"sidebar",children:v}),e[29]=n,e[30]=u,e[31]=f,e[32]=j,e[33]=v,e[34]=o,e[35]=x):x=e[35],x}function ne(l){const e=S.c(18);let t,s,a;e[0]!==l?({className:t,onClick:s,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:i}=O();let d;e[4]!==t?(d=w("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==i?(n=b=>{s?.(b),i()},e[6]=s,e[7]=i,e[8]=n):n=e[8];let o,h;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(R,{}),h=r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=o,e[10]=h):(o=e[9],h=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=r.jsx(B,{asChild:!0,children:r.jsxs(P,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[o,h]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsxs(E,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",r.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(X)})]}),e[15]=g):g=e[15];let c;return e[16]!==u?(c=r.jsx(D,{delayDuration:300,children:r.jsxs(z,{children:[u,g]})}),e[16]=u,e[17]=c):c=e[17],c}function X(l){return r.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:l},l)}function oe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function de(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ce(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function fe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ue(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function pe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function be(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function me(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function xe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}const Y=H("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function he(l){const e=S.c(28);let t,s,a,i,d,n,o;e[0]!==l?({asChild:a,isActive:i,variant:d,size:n,tooltip:o,className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d,e[6]=n,e[7]=o):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5],n=e[6],o=e[7]);const h=a===void 0?!1:a,u=i===void 0?!1:i,g=d===void 0?"default":d,c=n===void 0?"default":n,b=h?A:"button",{isMobile:N}=O();let f;e[8]!==t||e[9]!==c||e[10]!==g?(f=w(Y({variant:g,size:c}),t),e[8]=t,e[9]=c,e[10]=g,e[11]=f):f=e[11];let j;e[12]!==b||e[13]!==u||e[14]!==s||e[15]!==c||e[16]!==f?(j=r.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":c,"data-active":u,className:f,...s}),e[12]=b,e[13]=u,e[14]=s,e[15]=c,e[16]=f,e[17]=j):j=e[17];const y=j;if(!o)return y;if(typeof o=="string"){let x;e[18]!==o?(x={children:o},e[18]=o,e[19]=x):x=e[19],o=x}let m;e[20]!==y?(m=r.jsx(B,{asChild:!0,children:y}),e[20]=y,e[21]=m):m=e[21];let p;e[22]!==N||e[23]!==o?(p=r.jsx(E,{side:"right",align:"center",hidden:N,...o}),e[22]=N,e[23]=o,e[24]=p):p=e[24];let v;return e[25]!==m||e[26]!==p?(v=r.jsxs(z,{children:[m,p]}),e[25]=m,e[26]=p,e[27]=v):v=e[27],v}export{xe as S,he as a,pe as b,be as c,me as d,fe as e,ue as f,re as g,de as h,ce as i,oe as j,le as k,ie as l,ne as m,O as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,l as c,j as i}from"./index-
|
|
1
|
+
import{c as n,l as c,j as i}from"./index-BYxLxb_N.js";function m(o){const e=n.c(8);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=c("bg-accent animate-pulse rounded-md",s),e[3]=s,e[4]=l):l=e[4];let a;return e[5]!==t||e[6]!==l?(a=i.jsx("div",{"data-slot":"skeleton",className:l,...t}),e[5]=t,e[6]=l,e[7]=a):a=e[7],a}export{m as S};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{D as Lt,a as Tn,z as pr,p as vr,n as mr,j as i,B as Ye,t as Le,r as u,m as br,b as xr,i as It,v as J,K as ht,c as yr,C as wr,L as Cr,l as Sr,k as Dr,af as z,al as ft}from"./index-Btu8MJ2T.js";import{g as jr}from"./connection-slug-eyAPH6o3.js";import{u as _n,a as kn,g as Rr,C as Ut}from"./connection-card-DXxeWgUJ.js";import{C as Nr}from"./collection-search-EKDGBBWD.js";import{C as Ir}from"./collection-tabs-B4rLoGfk.js";import{a as Ar,b as Er,e as Tr,g as _r}from"./extract-connection-data-Dr1KuD3e.js";import{e as Mn,d as On,c as Pn,a as Ln,b as kr,D as Mr}from"./dialog-D_71fLjl.js";import{D as Or,a as Pr,c as Lr,b as Fr,d as zr,e as Br,f as $r}from"./drawer-DodsaUcg.js";import{u as Vr}from"./use-mobile-ClQdwqdV.js";import{F as De,b as je,c as Re,d as Ne,e as Ie,a as fn}from"./form-DM2r8X1h.js";import{I as He}from"./input-4Ev3FmKy.js";import{S as Kr,a as Xr,b as Ur,c as Hr,d as ut}from"./select-DsygRtM0.js";import{T as Yr}from"./textarea-DhaBNVNU.js";import{b as Fn}from"./use-connection-eth2XC-k.js";import{n as At,c as Ht}from"./XCircle-ChyNg6J4.js";import{s as Yt}from"./Star01-Coh-d_en.js";import{ab as Wr}from"./agent-icon-B8eeNtuV.js";import{s as qr}from"./XClose-DOOHZ1iM.js";import{c as Gr,i as Dt,a as hn,E as Jr,p as Qr,b as Zr,d as eo}from"./connection-form-helpers-DPNIJhMB.js";import{u as gn}from"./use-infinite-scroll-D2_Ok7--.js";import{a as Wt}from"./authenticate-and-persist-oauth-B6YIi7Gy.js";import{B as jt}from"./badge-kG1ciDHg.js";import{T as qt,a as Gt,b as Jt}from"./tooltip--hLULyB8.js";import{u as to}from"./useSuspenseInfiniteQuery-CxCY-IUG.js";import{S as no,u as ro}from"./use-mcp-client-gLPXhZwB.js";import{i as pn}from"./ChevronUp-C_lc_o3g.js";import{s as oo}from"./Plus-CVGVCEWD.js";import{u as so}from"./studio-tools-B50CVfWQ.js";import{u as io}from"./use-ai-providers-CDUvzgtf.js";function sn(t){const e=t?.metadata?.githubRepo;if(!e?.url)return{status:"none"};const n=e.connectionId;return!!n&&!!t?.connections?.some(s=>s.connection_id===n)?{status:"attached",repo:e,connectionId:n}:!!n||e.installationId!=null?{status:"detached",repo:e}:{status:"public-clone",repo:e}}function ki(t){const e=sn(t);return e.status==="attached"||e.status==="public-clone"?e.repo:null}function Mi(t){if(typeof t!="object"||t===null)return!1;const n=t.githubRepo?.url;return typeof n=="string"&&n.length>0}function Oi(t){return sn(t).status==="attached"}function Pi(t){const e=sn(t).status;return e==="attached"||e==="detached"}function Li(t){const e=new Set;for(const n of t??[]){const r=n.metadata?.liveAgentId;typeof r=="string"&&r&&e.add(n.id)}return e}function Fi(t){const e=new Map,n=new Map;for(const r of t??[]){const o=r.metadata?.liveAgentId;typeof o=="string"&&o&&(n.set(r.id,o),e.set(o,r.id))}return{liveToDev:e,devToLive:n}}function zi(t,e){if(!t)return null;const n=t.metadata?.liveAgentId;if(typeof n=="string"&&n)return{mode:"dev",targetId:n};const r=(e??[]).find(o=>o.metadata?.liveAgentId===t.id);return r?{mode:"live",targetId:r.id}:null}function Bi(t){return t.online?t.capabilities.includes("claude-code")||t.capabilities.includes("codex"):!1}function ao({open:t,onOpenChange:e,onCreated:n}){const{org:r}=Lt(),{data:o}=Tn.useSession(),{stdioEnabled:s}=pr(),a=Vr(),c=Fn(),l=_n(),h=kn(l,"").items,d=vr({resolver:mr(Gr),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),g=d.watch("ui_type"),m=d.watch("connection_url"),N=d.watch("npx_package"),x=Dt({uiType:g,connectionUrl:m??"",npxPackage:N??""})??hn({uiType:g,connectionUrl:m??"",registryItems:h}),v=p=>{const y=p.trim();if(!y)return;const b=!!d.formState.dirtyFields.title,w=!!d.formState.dirtyFields.description,I=!!d.formState.dirtyFields.env_vars,O=E=>{if(E&&(!b&&!d.getValues("title").trim()&&E.title&&d.setValue("title",E.title,{shouldDirty:!1}),!w&&!(d.getValues("description")??"").trim()&&E.description&&d.setValue("description",E.description,{shouldDirty:!1}),!I&&E.envVarKeys?.length)){const B=d.getValues("env_vars")??[],ae=new Set(B.map(Y=>Y.key)),K=E.envVarKeys.filter(Y=>!ae.has(Y));K.length>0&&d.setValue("env_vars",[...B,...K.map(Y=>({key:Y,value:""}))],{shouldDirty:!0})}},k=Qr(y);if(k&&s){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",k.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),O(Dt({uiType:"NPX",npxPackage:k.packageName}));return}if(y.startsWith("http://")||y.startsWith("https://")){const E=g==="HTTP"||g==="SSE"||g==="Websocket"?g:"HTTP";d.setValue("ui_type",E,{shouldDirty:!0}),d.setValue("connection_url",y,{shouldDirty:!0}),O(Dt({uiType:E,connectionUrl:y})??hn({uiType:E,connectionUrl:y,registryItems:h}));return}g==="NPX"&&O(Dt({uiType:"NPX",npxPackage:y}))},j=p=>{p||d.reset(),e(p)},C=async p=>{let y,b=null,w=null,I=null;p.ui_type==="NPX"?(y="STDIO",b="",I=Zr(p.npx_package||"",p.env_vars||[])):p.ui_type==="STDIO"?(y="STDIO",b="",I=eo(p.stdio_command||"",p.stdio_args||"",p.stdio_cwd,p.env_vars||[])):(y=p.ui_type,b=p.connection_url||"",w=p.connection_token||null);const O=Ar("conn");try{await c.create.mutateAsync({id:O,title:p.title,description:p.description||null,connection_type:y,connection_url:b,connection_token:w,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:o?.user?.id||"system",organization_id:r.id,icon:p.icon??null,app_name:null,app_id:null,connection_headers:I,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),n?.(O)}catch{Le.error("Failed to create connection")}},S="Create Connection",R="Create a custom connection in your organization. Fill in the details below.",T=d.formState.isSubmitting?"Saving...":"Create Connection",A=i.jsxs("div",{className:"grid gap-4",children:[i.jsx(De,{control:d.control,name:"ui_type",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Type *"}),i.jsxs(Kr,{value:p.value,onValueChange:p.onChange,children:[i.jsx(Ne,{children:i.jsx(Xr,{children:i.jsx(Ur,{})})}),i.jsxs(Hr,{children:[i.jsx(ut,{value:"HTTP",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Yt,{className:"w-4 h-4"}),"HTTP"]})}),i.jsx(ut,{value:"SSE",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Yt,{className:"w-4 h-4"}),"SSE"]})}),i.jsx(ut,{value:"Websocket",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Yt,{className:"w-4 h-4"}),"Websocket"]})}),s&&i.jsxs(i.Fragment,{children:[i.jsx(ut,{value:"NPX",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(At,{className:"w-4 h-4"}),"NPX Package"]})}),i.jsx(ut,{value:"STDIO",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Wr,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),i.jsx(Ie,{})]})}),g==="NPX"&&i.jsx(De,{control:d.control,name:"npx_package",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"NPM Package *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"@perplexity-ai/mcp-server",...p,value:p.value??"",onPaste:y=>{const b=y.clipboardData.getData("text");b&&(y.preventDefault(),d.setValue("npx_package",b.trim(),{shouldDirty:!0}),v(b))},onBlur:y=>{v(y.target.value),p.onBlur()}})}),i.jsx(Ie,{})]})}),g==="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[i.jsx(De,{control:d.control,name:"stdio_command",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Command *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"node, bun, python...",...p,value:p.value??""})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"stdio_args",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Arguments"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"arg1 arg2 --flag value",...p,value:p.value??""})}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"stdio_cwd",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Working Directory"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"/path/to/project (optional)",...p,value:p.value??""})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),i.jsx(Ie,{})]})})]}),(g==="NPX"||g==="STDIO")&&i.jsx(De,{control:d.control,name:"env_vars",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Environment Variables"}),i.jsx(Ne,{children:i.jsx(Jr,{value:p.value??[],onChange:p.onChange})}),i.jsx(Ie,{})]})}),g!=="NPX"&&g!=="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsx(De,{control:d.control,name:"connection_url",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"URL *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"https://example.com/mcp",...p,value:p.value??"",onPaste:y=>{const b=y.clipboardData.getData("text");b&&(y.preventDefault(),d.setValue("connection_url",b.trim(),{shouldDirty:!0}),v(b))},onBlur:y=>{v(y.target.value),p.onBlur()}})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"connection_token",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:x?.token?.label??"Token (optional)"}),i.jsx(Ne,{children:i.jsx(He,{type:"password",placeholder:x?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...p,value:p.value??""})}),x?.token?.helperText&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&i.jsxs(i.Fragment,{children:[" ","·"," ",i.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"title",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Name *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"My Connection",...p})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"description",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Description"}),i.jsx(Ne,{children:i.jsx(Yr,{placeholder:"A brief description of this connection",rows:3,...p,value:p.value??""})}),i.jsx(Ie,{})]})})]});return a?i.jsx(Or,{open:t,onOpenChange:j,children:i.jsxs(Pr,{className:"max-h-[90vh]",children:[i.jsx(Lr,{className:"pb-2",children:i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{className:"flex-1 text-left",children:[i.jsx(Fr,{children:S}),i.jsx(zr,{className:"mt-1",children:R})]}),i.jsx(Br,{asChild:!0,children:i.jsx(Ye,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:i.jsx(qr,{size:16})})})]})}),i.jsx(fn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(C),children:[i.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:A}),i.jsx($r,{children:i.jsx(Ye,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:T})})]})})]})}):i.jsx(Mn,{open:t,onOpenChange:j,children:i.jsxs(On,{className:"sm:max-w-[525px]",children:[i.jsxs(Pn,{children:[i.jsx(Ln,{children:S}),i.jsx(kr,{children:R})]}),i.jsx(fn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(C),children:[i.jsx("div",{className:"py-4",children:A}),i.jsxs(Mr,{children:[i.jsx(Ye,{type:"button",variant:"outline",onClick:()=>j(!1),children:"Cancel"}),i.jsx(Ye,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:T})]})]})})]})})}function co(t){const e=yr.c(73),{mode:n,agentId:r,addedConnectionIds:o,onAdd:s,onCloneAndAdd:a,onConnectAndAdd:c,connectingItemId:l,search:f,onCreateConnection:h,onBrowseNavigate:d,defaultTab:g}=t,m=n===void 0?"add":n,N=g===void 0?"connected":g,{org:x}=Lt(),v=u.useDeferredValue(f),j=f!==v,C=v.trim().toLowerCase();let S;e[0]!==N?(S=D=>D??N,e[0]=N,e[1]=S):S=e[1];const[R,T]=wr(Cr.connectionsTab(x.slug)+(N==="all"?":home-modal":":agent-modal"),S);let A;e[2]!==R||e[3]!==T?(A=D=>{D!==R&&J("connections_dialog_tab_changed",{to_tab:D}),T(D)},e[2]=R,e[3]=T,e[4]=A):A=e[4];const p=A;let y;e[5]!==x.id||e[6]!==x.slug?(y={connectionId:no,orgId:x.id,orgSlug:x.slug},e[5]=x.id,e[6]=x.slug,e[7]=y):y=e[7];const b=ro(y);let w,I,O;if(e[8]!==b||e[9]!==v||e[10]!==x.id){O=v?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:v.trim()},{field:["description"],operator:"contains",value:v.trim()}]}:void 0;const D={...O&&{where:O},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},P=JSON.stringify(D);I=to,w=ht.collectionListInfinite(b,x.id,"","CONNECTIONS",P),e[8]=b,e[9]=v,e[10]=x.id,e[11]=w,e[12]=I,e[13]=O}else w=e[11],I=e[12],O=e[13];let k;e[14]!==b||e[15]!==O?(k=async D=>{const{pageParam:P}=D,de=P===void 0?0:P;return(await b.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...O&&{where:O},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:de}})).structuredContent},e[14]=b,e[15]=O,e[16]=k):k=e[16];let E;e[17]!==w||e[18]!==k?(E={queryKey:w,queryFn:k,initialPageParam:0,getNextPageParam:po,staleTime:3e4},e[17]=w,e[18]=k,e[19]=E):E=e[19];const{data:B,fetchNextPage:ae,hasNextPage:K,isFetchingNextPage:Y}=I(E),ce=B?.pages.flatMap(go)??[],xe=Rr(ce),qe=new Set(ce.filter(ho).map(fo)),$=_n(),U=kn($,v),he=gn(U.loadMore,U.hasMore,U.isLoadingMore),Ae=gn(ae,K??!1,Y),L=R==="all"||!!C,Ue=L?U.items.filter(D=>{const P=Er(D);if(P&&qe.has(P))return!1;if(!C)return!0;const de=D._meta?.["mcp.mesh"];return[D.title,D.description,D.name,D.server?.title,D.server?.description,D.server?.name,de?.friendly_name,de?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(C)}):[],Z=Ue.filter(uo),W=Ue.filter(lo);let M;e[20]!==o?(M=D=>D.some(P=>o.has(P.id)),e[20]=o,e[21]=M):M=e[21];const Ee=M;let q;e[22]!==o||e[23]!==r||e[24]!==l||e[25]!==Ee||e[26]!==m||e[27]!==s||e[28]!==d||e[29]!==a?(q=(D,P,de,ze,ve)=>{const Ze=Ee(ve),Be=ve.find(F=>!o.has(F.id)),te=ve[0];if(m==="browse"){const F=jr(te);return i.jsx(Ut,{connection:{title:P,icon:de,description:ve.length>1?`${ve.length} instances`:ze??void 0},fallbackIcon:i.jsx(At,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs(jt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(pn,{size:11})," Connected"]}),onClick:()=>{J("connection_browse_clicked",{app_name:te.app_name??null,connection_id:te.id,instances_count:ve.length}),d?.(F)}},D)}return i.jsx(Ut,{connection:{title:P,icon:de,description:ze},fallbackIcon:i.jsx(At,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[Ze&&i.jsxs(jt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(pn,{size:11})," Added"]}),i.jsx(Ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),Be?(J("connection_add_clicked",{action:"use_existing",app_name:te.app_name??null,connection_id:Be.id}),r&&J("agent_connection_attached",{agent_id:r,connection_id:Be.id,app_name:te.app_name??null,mode:"existing"}),s(Be.id)):(J("connection_add_clicked",{action:"clone",app_name:te.app_name??null,base_connection_id:te.id}),a(te))},children:"Add"})]})},D)},e[22]=o,e[23]=r,e[24]=l,e[25]=Ee,e[26]=m,e[27]=s,e[28]=d,e[29]=a,e[30]=q):q=e[30];const ge=q;let ee;e[31]!==l||e[32]!==m||e[33]!==c?(ee=D=>{const P=D._meta?.["mcp.mesh"],de=P?.friendlyName||P?.friendly_name||D.server?.title||D.title||D.server?.name||D.name||D.id||"",ze=D.server?.description||D.description||null,ve=D.server?.icons?.[0]?.src||_r(D.server?.repository)||null,Ze=P?.official===!0,Be=P?.verified===!0,te=P?.owner==="deco";return i.jsx(Ut,{connection:{title:de,description:ze,icon:ve},fallbackIcon:i.jsx(At,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[te&&i.jsxs(qt,{children:[i.jsx(Gt,{asChild:!0,children:i.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:i.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),i.jsx(Jt,{children:"Built and maintained by Deco"})]}),!te&&Ze&&i.jsxs(qt,{children:[i.jsx(Gt,{asChild:!0,children:i.jsx(jt,{variant:"outline",size:"icon",children:i.jsx(Ht,{})})}),i.jsx(Jt,{children:"Built and maintained by the official vendor"})]}),!te&&!Ze&&Be&&i.jsxs(qt,{children:[i.jsx(Gt,{asChild:!0,children:i.jsx(jt,{variant:"outline",size:"icon",children:i.jsx(Ht,{})})}),i.jsx(Jt,{children:"Verified by the Deco team"})]}),i.jsx(Ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),J("connection_add_clicked",{action:"connect_new",registry_item_id:D.id,app_name:P?.friendlyName||D.server?.name||D.name||null}),c(D)},children:l===D.id?i.jsx(It,{size:14,className:"animate-spin"}):m==="browse"?"Connect":"Add"})]})},`catalog-${D.id}`)},e[31]=l,e[32]=m,e[33]=c,e[34]=ee):ee=e[34];const Te=ee,ye=!C&&i.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[i.jsx(Ir,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:R,onTabChange:D=>p(D)}),i.jsxs(Ye,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{J("connections_dialog_custom_clicked"),h()},children:[i.jsx(oo,{size:12}),"Custom Connection"]})]}),Ge=j&&"opacity-50 pointer-events-none";let _e;e[35]!==Ge?(_e=Sr("flex-1 overflow-auto p-5 transition-opacity duration-150",Ge),e[35]=Ge,e[36]=_e):_e=e[36];const st="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let ne;e[37]!==ge?(ne=D=>{if(D.type==="group")return ge(D.key,D.title,D.icon,null,D.connections);const P=D.connection;return ge(P.id,P.title,P.icon,P.description??null,[P])},e[37]=ge,e[38]=ne):ne=e[38];const Fe=xe.map(ne);let pe;e[39]!==Ae?(pe=i.jsx("div",{ref:Ae,className:"col-span-full h-1"}),e[39]=Ae,e[40]=pe):pe=e[40];let ke;e[41]!==Y?(ke=Y&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),e[41]=Y,e[42]=ke):ke=e[42];const Je=L&&Z.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx(Ht,{size:13,className:"text-muted-foreground shrink-0"}),i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),it=L&&Z.map(Te),at=L&&W.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),we=L&&W.map(Te);let re;e[43]!==he||e[44]!==$||e[45]!==L?(re=L&&$.length>0&&i.jsx("div",{ref:he,className:"col-span-full h-1"}),e[43]=he,e[44]=$,e[45]=L,e[46]=re):re=e[46];let le;e[47]!==U.isLoadingMore||e[48]!==L?(le=L&&U.isLoadingMore&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),e[47]=U.isLoadingMore,e[48]=L,e[49]=le):le=e[49];let Me;e[50]!==Fe||e[51]!==pe||e[52]!==ke||e[53]!==Je||e[54]!==it||e[55]!==at||e[56]!==we||e[57]!==re||e[58]!==le?(Me=i.jsxs("div",{className:st,children:[Fe,pe,ke,Je,it,at,we,re,le]}),e[50]=Fe,e[51]=pe,e[52]=ke,e[53]=Je,e[54]=it,e[55]=at,e[56]=we,e[57]=re,e[58]=le,e[59]=Me):Me=e[59];let G;e[60]!==R||e[61]!==xe.length||e[62]!==W||e[63]!==f||e[64]!==Z?(G=xe.length===0&&Z.length===0&&W.length===0&&i.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:f?`No connections match "${f}"`:R==="connected"?"No connections yet":"No connections available"}),e[60]=R,e[61]=xe.length,e[62]=W,e[63]=f,e[64]=Z,e[65]=G):G=e[65];let Oe;e[66]!==_e||e[67]!==Me||e[68]!==G?(Oe=i.jsxs("div",{className:_e,children:[Me,G]}),e[66]=_e,e[67]=Me,e[68]=G,e[69]=Oe):Oe=e[69];let Qe;return e[70]!==ye||e[71]!==Oe?(Qe=i.jsxs(i.Fragment,{children:[ye,Oe]}),e[70]=ye,e[71]=Oe,e[72]=Qe):Qe=e[72],Qe}function lo(t){return!t.verified&&!t._meta?.["mcp.mesh"]?.verified&&!t.meta?.verified}function uo(t){return t.verified||t._meta?.["mcp.mesh"]?.verified||t.meta?.verified}function fo(t){return t.app_name}function ho(t){return t.app_name}function go(t){return t?.items??[]}function po(t,e){if(t?.hasMore)return e.reduce(vo,0)}function vo(t,e){return t+(e?.items?.length??0)}function $i({open:t,onOpenChange:e,defaultTab:n,initialSearch:r="",...o}){const s=o.mode??"add",a="agentId"in o?o.agentId:void 0,c="addedConnectionIds"in o?o.addedConnectionIds??new Set:new Set,l="onAdd"in o&&o.onAdd?o.onAdd:b=>{},f=(b,w,I)=>{a&&J("agent_connection_attached",{agent_id:a,connection_id:b,app_name:w,mode:I})},[h,d]=u.useState(null),[g,m]=u.useState(r),[N,x]=u.useState(!1),{org:v}=Lt(),{data:j}=Tn.useSession(),C=Fn(),S=br(),R=xr(),T=b=>{e(!1),R({to:"/$org/settings/connections/$appSlug",params:{org:v.slug,appSlug:b}})},A=()=>{S.invalidateQueries({predicate:b=>{const w=b.queryKey;return w[1]===v.id&&w[3]==="collection"&&w[4]==="CONNECTIONS"}})},p=async b=>{d(b.app_name??b.id);try{const I=`${b.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,k=(await C.create.mutateAsync({title:I,description:b.description??null,connection_type:b.connection_type,connection_url:b.connection_url??null,connection_token:null,icon:b.icon??null,app_name:b.app_name??null,app_id:b.app_id??null,connection_headers:b.connection_headers??null})).id,E=await Wt({connectionId:k,orgId:v.id,orgSlug:v.slug,persistFallback:B=>C.update.mutateAsync({id:k,data:{connection_token:B}}).then(()=>{})});if(E.ran&&!E.ok){J("connection_oauth_failed",{connection_id:k,flow:"clone",error:E.error??"no_token"}),Le.error(`Authentication failed: ${E.error??"no token received"}`),await C.delete.mutateAsync(k);return}if(E.ran){J("connection_oauth_succeeded",{connection_id:k,flow:"clone"});const B=new URL(`/api/${v.slug}/mcp/${k}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(B.href,null)}),A()}f(k,b.app_name??null,"clone"),l(k)}catch(w){console.error("Failed to add connection:",w),Le.error("Failed to add connection")}finally{d(null)}},y=async b=>{if(!(!v||!j?.user?.id)){d(b.id);try{const w=Tr(b,v.id,j.user.id,{remoteIndex:0}),I=w.connection_type==="STDIO",O=!!w.connection_url,k=I&&w.connection_headers&&typeof w.connection_headers=="object"&&"command"in w.connection_headers;if(!O&&!k){Le.error("This MCP Server cannot be connected: no connection method available"),d(null);return}const{id:E}=await C.create.mutateAsync(w),B=await Wt({connectionId:E,orgId:v.id,orgSlug:v.slug,persistFallback:ae=>C.update.mutateAsync({id:E,data:{connection_token:ae}}).then(()=>{})});if(B.ran&&!B.ok){J("connection_oauth_failed",{connection_id:E,flow:"connect_new",error:B.error??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${B.error??"no token received"})`}),f(E,w.app_name??null,"new"),l(E);return}if(B.ran){J("connection_oauth_succeeded",{connection_id:E,flow:"connect_new"});const ae=new URL(`/api/${v.slug}/mcp/${E}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(ae.href,null)}),A(),Le.success("Connected and authenticated")}else Le.success("Connected");f(E,w.app_name??null,"new"),l(E)}catch(w){console.error("Failed to connect:",w),Le.error("Failed to connect")}finally{d(null)}}};return i.jsxs(Mn,{open:t,onOpenChange:e,children:[i.jsxs(On,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[i.jsx(Pn,{className:"px-6 pt-5 pb-0 shrink-0",children:i.jsx(Ln,{className:"text-base font-semibold",children:s==="browse"?"Connections":"Add Connection"})}),i.jsx("div",{className:"pt-3 shrink-0",children:i.jsx(Nr,{value:g,onChange:m,placeholder:"Search connections..."})}),i.jsx(u.Suspense,{fallback:i.jsx("div",{className:"flex-1 flex items-center justify-center",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),children:i.jsx(co,{mode:s,agentId:a,addedConnectionIds:c,onAdd:l,onCloneAndAdd:p,onConnectAndAdd:y,connectingItemId:h,search:g,onCreateConnection:()=>x(!0),onBrowseNavigate:T,defaultTab:n})})]}),i.jsx(ao,{open:N,onOpenChange:x,onCreated:async b=>{x(!1);const w=await Wt({connectionId:b,orgId:v.id,orgSlug:v.slug,persistFallback:I=>C.update.mutateAsync({id:b,data:{connection_token:I}}).then(()=>{})});if(w.ran&&!w.ok){J("connection_oauth_failed",{connection_id:b,flow:"custom_create",error:w.error??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${w.error??"no token received"})`}),f(b,null,"custom"),l(b),e(!1);return}if(w.ran){J("connection_oauth_succeeded",{connection_id:b,flow:"custom_create"});const I=new URL(`/api/${v.slug}/mcp/${b}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(I.href,null)}),A()}f(b,null,"custom"),l(b),e(!1)}})]})}const vn=new Map;function Vi(){const{org:t}=Lt(),e=so(),n=io(),r=n.find(v=>v.providerId==="deco"),{data:o,isLoading:s,refetch:a,isFetching:c}=Dr({queryKey:ht.aiProviderCredits(t.id,"deco"),enabled:!!r,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=o?.balanceCents??null,f=l!=null?l/100:null,h=u.useRef(new Map);if(l!=null){const v=vn.get(t.id);h.current.get(t.id)&&v!=null&&l>v&&J("credits_topped_up_detected",{organization_id:t.id,delta_cents:l-v,previous_balance_cents:v,new_balance_cents:l}),vn.set(t.id,l),h.current.set(t.id,!0)}const d=!!r,g=l!=null&&l>0,m=l!=null&&l===0,N=l!=null&&l===200,x=n.length>0&&n.every(v=>v.providerId==="deco");return{hasDecoKey:d,decoKeyId:r?.id??null,balanceCents:l,balanceDollars:f,hasCredits:g,isZeroBalance:m,isInitialFreeCredit:N,hasOnlyDecoProvider:x,isLoading:s,isFetching:c,refetch:a}}function mo(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return u.useMemo(()=>r=>{e.forEach(o=>o(r))},e)}const Ft=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nt(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function an(t){return"nodeType"in t}function Q(t){var e,n;return t?nt(t)?t:an(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function cn(t){const{Document:e}=Q(t);return t instanceof e}function yt(t){return nt(t)?!1:t instanceof Q(t).HTMLElement}function zn(t){return t instanceof Q(t).SVGElement}function rt(t){return t?nt(t)?t.document:an(t)?cn(t)?t:yt(t)||zn(t)?t.ownerDocument:document:document:document}const me=Ft?u.useLayoutEffect:u.useEffect;function zt(t){const e=u.useRef(t);return me(()=>{e.current=t}),u.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}function bo(){const t=u.useRef(null),e=u.useCallback((r,o)=>{t.current=setInterval(r,o)},[]),n=u.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function mt(t,e){e===void 0&&(e=[t]);const n=u.useRef(t);return me(()=>{n.current!==t&&(n.current=t)},e),n}function wt(t,e){const n=u.useRef();return u.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function Tt(t){const e=zt(t),n=u.useRef(null),r=u.useCallback(o=>{o!==n.current&&e?.(o,n.current),n.current=o},[]);return[n,r]}function _t(t){const e=u.useRef();return u.useEffect(()=>{e.current=t},[t]),e.current}let Qt={};function Ct(t,e){return u.useMemo(()=>{if(e)return e;const n=Qt[t]==null?0:Qt[t]+1;return Qt[t]=n,t+"-"+n},[t,e])}function Bn(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,a)=>{const c=Object.entries(a);for(const[l,f]of c){const h=s[l];h!=null&&(s[l]=h+t*f)}return s},{...e})}}const tt=Bn(1),bt=Bn(-1);function xo(t){return"clientX"in t&&"clientY"in t}function Bt(t){if(!t)return!1;const{KeyboardEvent:e}=Q(t.target);return e&&t instanceof e}function yo(t){if(!t)return!1;const{TouchEvent:e}=Q(t.target);return e&&t instanceof e}function kt(t){if(yo(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return xo(t)?{x:t.clientX,y:t.clientY}:null}const We=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[We.Translate.toString(t),We.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),mn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function wo(t){return t.matches(mn)?t:t.querySelector(mn)}const Co={display:"none"};function So(t){let{id:e,value:n}=t;return z.createElement("div",{id:e,style:Co},n)}function Do(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return z.createElement("div",{id:e,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function jo(){const[t,e]=u.useState("");return{announce:u.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const $n=u.createContext(null);function Ro(t){const e=u.useContext($n);u.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function No(){const[t]=u.useState(()=>new Set),e=u.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[u.useCallback(r=>{let{type:o,event:s}=r;t.forEach(a=>{var c;return(c=a[o])==null?void 0:c.call(a,s)})},[t]),e]}const Io={draggable:`
|
|
1
|
+
import{D as Lt,a as Tn,z as pr,p as vr,n as mr,j as i,B as Ye,t as Le,r as u,m as br,b as xr,i as It,v as J,K as ht,c as yr,C as wr,L as Cr,l as Sr,k as Dr,af as z,al as ft}from"./index-BYxLxb_N.js";import{g as jr}from"./connection-slug-eyAPH6o3.js";import{u as _n,a as kn,g as Rr,C as Ut}from"./connection-card-BLTARFN7.js";import{C as Nr}from"./collection-search-kw13BHqh.js";import{C as Ir}from"./collection-tabs-BPNKPBMh.js";import{a as Ar,b as Er,e as Tr,g as _r}from"./extract-connection-data-DztiYkKt.js";import{e as Mn,d as On,c as Pn,a as Ln,b as kr,D as Mr}from"./dialog-DfRvSPDX.js";import{D as Or,a as Pr,c as Lr,b as Fr,d as zr,e as Br,f as $r}from"./drawer-3i1mzioQ.js";import{u as Vr}from"./use-mobile-42JaqbyB.js";import{F as De,b as je,c as Re,d as Ne,e as Ie,a as fn}from"./form-C5K81Zvy.js";import{I as He}from"./input-3siSzfvD.js";import{S as Kr,a as Xr,b as Ur,c as Hr,d as ut}from"./select-xa-GjJp_.js";import{T as Yr}from"./textarea-WTWE3YW7.js";import{b as Fn}from"./use-connection-BKkAL8KW.js";import{n as At,c as Ht}from"./XCircle-QJAHsohS.js";import{s as Yt}from"./Star01-CqQOYJ2t.js";import{ab as Wr}from"./agent-icon-CSOnaLfl.js";import{s as qr}from"./XClose-BYQo3mf2.js";import{c as Gr,i as Dt,a as hn,E as Jr,p as Qr,b as Zr,d as eo}from"./connection-form-helpers-Bmc7HAzG.js";import{u as gn}from"./use-infinite-scroll-C2FI-2Uk.js";import{a as Wt}from"./authenticate-and-persist-oauth-C9EIeJf7.js";import{B as jt}from"./badge-DophsIRD.js";import{T as qt,a as Gt,b as Jt}from"./tooltip-CIGYkCAI.js";import{u as to}from"./useSuspenseInfiniteQuery-DC5qHrow.js";import{S as no,u as ro}from"./use-mcp-client-BRyGzGjZ.js";import{i as pn}from"./ChevronUp-COalomvK.js";import{s as oo}from"./Plus-Bl_LZN4x.js";import{u as so}from"./studio-tools-CX1t2wo7.js";import{u as io}from"./use-ai-providers-DepwN6Nt.js";function sn(t){const e=t?.metadata?.githubRepo;if(!e?.url)return{status:"none"};const n=e.connectionId;return!!n&&!!t?.connections?.some(s=>s.connection_id===n)?{status:"attached",repo:e,connectionId:n}:!!n||e.installationId!=null?{status:"detached",repo:e}:{status:"public-clone",repo:e}}function ki(t){const e=sn(t);return e.status==="attached"||e.status==="public-clone"?e.repo:null}function Mi(t){if(typeof t!="object"||t===null)return!1;const n=t.githubRepo?.url;return typeof n=="string"&&n.length>0}function Oi(t){return sn(t).status==="attached"}function Pi(t){const e=sn(t).status;return e==="attached"||e==="detached"}function Li(t){const e=new Set;for(const n of t??[]){const r=n.metadata?.liveAgentId;typeof r=="string"&&r&&e.add(n.id)}return e}function Fi(t){const e=new Map,n=new Map;for(const r of t??[]){const o=r.metadata?.liveAgentId;typeof o=="string"&&o&&(n.set(r.id,o),e.set(o,r.id))}return{liveToDev:e,devToLive:n}}function zi(t,e){if(!t)return null;const n=t.metadata?.liveAgentId;if(typeof n=="string"&&n)return{mode:"dev",targetId:n};const r=(e??[]).find(o=>o.metadata?.liveAgentId===t.id);return r?{mode:"live",targetId:r.id}:null}function Bi(t){return t.online?t.capabilities.includes("claude-code")||t.capabilities.includes("codex"):!1}function ao({open:t,onOpenChange:e,onCreated:n}){const{org:r}=Lt(),{data:o}=Tn.useSession(),{stdioEnabled:s}=pr(),a=Vr(),c=Fn(),l=_n(),h=kn(l,"").items,d=vr({resolver:mr(Gr),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),g=d.watch("ui_type"),m=d.watch("connection_url"),N=d.watch("npx_package"),x=Dt({uiType:g,connectionUrl:m??"",npxPackage:N??""})??hn({uiType:g,connectionUrl:m??"",registryItems:h}),v=p=>{const y=p.trim();if(!y)return;const b=!!d.formState.dirtyFields.title,w=!!d.formState.dirtyFields.description,I=!!d.formState.dirtyFields.env_vars,O=E=>{if(E&&(!b&&!d.getValues("title").trim()&&E.title&&d.setValue("title",E.title,{shouldDirty:!1}),!w&&!(d.getValues("description")??"").trim()&&E.description&&d.setValue("description",E.description,{shouldDirty:!1}),!I&&E.envVarKeys?.length)){const B=d.getValues("env_vars")??[],ae=new Set(B.map(Y=>Y.key)),K=E.envVarKeys.filter(Y=>!ae.has(Y));K.length>0&&d.setValue("env_vars",[...B,...K.map(Y=>({key:Y,value:""}))],{shouldDirty:!0})}},k=Qr(y);if(k&&s){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",k.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),O(Dt({uiType:"NPX",npxPackage:k.packageName}));return}if(y.startsWith("http://")||y.startsWith("https://")){const E=g==="HTTP"||g==="SSE"||g==="Websocket"?g:"HTTP";d.setValue("ui_type",E,{shouldDirty:!0}),d.setValue("connection_url",y,{shouldDirty:!0}),O(Dt({uiType:E,connectionUrl:y})??hn({uiType:E,connectionUrl:y,registryItems:h}));return}g==="NPX"&&O(Dt({uiType:"NPX",npxPackage:y}))},j=p=>{p||d.reset(),e(p)},C=async p=>{let y,b=null,w=null,I=null;p.ui_type==="NPX"?(y="STDIO",b="",I=Zr(p.npx_package||"",p.env_vars||[])):p.ui_type==="STDIO"?(y="STDIO",b="",I=eo(p.stdio_command||"",p.stdio_args||"",p.stdio_cwd,p.env_vars||[])):(y=p.ui_type,b=p.connection_url||"",w=p.connection_token||null);const O=Ar("conn");try{await c.create.mutateAsync({id:O,title:p.title,description:p.description||null,connection_type:y,connection_url:b,connection_token:w,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:o?.user?.id||"system",organization_id:r.id,icon:p.icon??null,app_name:null,app_id:null,connection_headers:I,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),n?.(O)}catch{Le.error("Failed to create connection")}},S="Create Connection",R="Create a custom connection in your organization. Fill in the details below.",T=d.formState.isSubmitting?"Saving...":"Create Connection",A=i.jsxs("div",{className:"grid gap-4",children:[i.jsx(De,{control:d.control,name:"ui_type",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Type *"}),i.jsxs(Kr,{value:p.value,onValueChange:p.onChange,children:[i.jsx(Ne,{children:i.jsx(Xr,{children:i.jsx(Ur,{})})}),i.jsxs(Hr,{children:[i.jsx(ut,{value:"HTTP",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Yt,{className:"w-4 h-4"}),"HTTP"]})}),i.jsx(ut,{value:"SSE",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Yt,{className:"w-4 h-4"}),"SSE"]})}),i.jsx(ut,{value:"Websocket",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Yt,{className:"w-4 h-4"}),"Websocket"]})}),s&&i.jsxs(i.Fragment,{children:[i.jsx(ut,{value:"NPX",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(At,{className:"w-4 h-4"}),"NPX Package"]})}),i.jsx(ut,{value:"STDIO",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Wr,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),i.jsx(Ie,{})]})}),g==="NPX"&&i.jsx(De,{control:d.control,name:"npx_package",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"NPM Package *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"@perplexity-ai/mcp-server",...p,value:p.value??"",onPaste:y=>{const b=y.clipboardData.getData("text");b&&(y.preventDefault(),d.setValue("npx_package",b.trim(),{shouldDirty:!0}),v(b))},onBlur:y=>{v(y.target.value),p.onBlur()}})}),i.jsx(Ie,{})]})}),g==="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[i.jsx(De,{control:d.control,name:"stdio_command",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Command *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"node, bun, python...",...p,value:p.value??""})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"stdio_args",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Arguments"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"arg1 arg2 --flag value",...p,value:p.value??""})}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"stdio_cwd",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Working Directory"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"/path/to/project (optional)",...p,value:p.value??""})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),i.jsx(Ie,{})]})})]}),(g==="NPX"||g==="STDIO")&&i.jsx(De,{control:d.control,name:"env_vars",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Environment Variables"}),i.jsx(Ne,{children:i.jsx(Jr,{value:p.value??[],onChange:p.onChange})}),i.jsx(Ie,{})]})}),g!=="NPX"&&g!=="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsx(De,{control:d.control,name:"connection_url",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"URL *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"https://example.com/mcp",...p,value:p.value??"",onPaste:y=>{const b=y.clipboardData.getData("text");b&&(y.preventDefault(),d.setValue("connection_url",b.trim(),{shouldDirty:!0}),v(b))},onBlur:y=>{v(y.target.value),p.onBlur()}})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"connection_token",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:x?.token?.label??"Token (optional)"}),i.jsx(Ne,{children:i.jsx(He,{type:"password",placeholder:x?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...p,value:p.value??""})}),x?.token?.helperText&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&i.jsxs(i.Fragment,{children:[" ","·"," ",i.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"title",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Name *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"My Connection",...p})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"description",render:({field:p})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Description"}),i.jsx(Ne,{children:i.jsx(Yr,{placeholder:"A brief description of this connection",rows:3,...p,value:p.value??""})}),i.jsx(Ie,{})]})})]});return a?i.jsx(Or,{open:t,onOpenChange:j,children:i.jsxs(Pr,{className:"max-h-[90vh]",children:[i.jsx(Lr,{className:"pb-2",children:i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{className:"flex-1 text-left",children:[i.jsx(Fr,{children:S}),i.jsx(zr,{className:"mt-1",children:R})]}),i.jsx(Br,{asChild:!0,children:i.jsx(Ye,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:i.jsx(qr,{size:16})})})]})}),i.jsx(fn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(C),children:[i.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:A}),i.jsx($r,{children:i.jsx(Ye,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:T})})]})})]})}):i.jsx(Mn,{open:t,onOpenChange:j,children:i.jsxs(On,{className:"sm:max-w-[525px]",children:[i.jsxs(Pn,{children:[i.jsx(Ln,{children:S}),i.jsx(kr,{children:R})]}),i.jsx(fn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(C),children:[i.jsx("div",{className:"py-4",children:A}),i.jsxs(Mr,{children:[i.jsx(Ye,{type:"button",variant:"outline",onClick:()=>j(!1),children:"Cancel"}),i.jsx(Ye,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:T})]})]})})]})})}function co(t){const e=yr.c(73),{mode:n,agentId:r,addedConnectionIds:o,onAdd:s,onCloneAndAdd:a,onConnectAndAdd:c,connectingItemId:l,search:f,onCreateConnection:h,onBrowseNavigate:d,defaultTab:g}=t,m=n===void 0?"add":n,N=g===void 0?"connected":g,{org:x}=Lt(),v=u.useDeferredValue(f),j=f!==v,C=v.trim().toLowerCase();let S;e[0]!==N?(S=D=>D??N,e[0]=N,e[1]=S):S=e[1];const[R,T]=wr(Cr.connectionsTab(x.slug)+(N==="all"?":home-modal":":agent-modal"),S);let A;e[2]!==R||e[3]!==T?(A=D=>{D!==R&&J("connections_dialog_tab_changed",{to_tab:D}),T(D)},e[2]=R,e[3]=T,e[4]=A):A=e[4];const p=A;let y;e[5]!==x.id||e[6]!==x.slug?(y={connectionId:no,orgId:x.id,orgSlug:x.slug},e[5]=x.id,e[6]=x.slug,e[7]=y):y=e[7];const b=ro(y);let w,I,O;if(e[8]!==b||e[9]!==v||e[10]!==x.id){O=v?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:v.trim()},{field:["description"],operator:"contains",value:v.trim()}]}:void 0;const D={...O&&{where:O},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},P=JSON.stringify(D);I=to,w=ht.collectionListInfinite(b,x.id,"","CONNECTIONS",P),e[8]=b,e[9]=v,e[10]=x.id,e[11]=w,e[12]=I,e[13]=O}else w=e[11],I=e[12],O=e[13];let k;e[14]!==b||e[15]!==O?(k=async D=>{const{pageParam:P}=D,de=P===void 0?0:P;return(await b.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...O&&{where:O},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:de}})).structuredContent},e[14]=b,e[15]=O,e[16]=k):k=e[16];let E;e[17]!==w||e[18]!==k?(E={queryKey:w,queryFn:k,initialPageParam:0,getNextPageParam:po,staleTime:3e4},e[17]=w,e[18]=k,e[19]=E):E=e[19];const{data:B,fetchNextPage:ae,hasNextPage:K,isFetchingNextPage:Y}=I(E),ce=B?.pages.flatMap(go)??[],xe=Rr(ce),qe=new Set(ce.filter(ho).map(fo)),$=_n(),U=kn($,v),he=gn(U.loadMore,U.hasMore,U.isLoadingMore),Ae=gn(ae,K??!1,Y),L=R==="all"||!!C,Ue=L?U.items.filter(D=>{const P=Er(D);if(P&&qe.has(P))return!1;if(!C)return!0;const de=D._meta?.["mcp.mesh"];return[D.title,D.description,D.name,D.server?.title,D.server?.description,D.server?.name,de?.friendly_name,de?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(C)}):[],Z=Ue.filter(uo),W=Ue.filter(lo);let M;e[20]!==o?(M=D=>D.some(P=>o.has(P.id)),e[20]=o,e[21]=M):M=e[21];const Ee=M;let q;e[22]!==o||e[23]!==r||e[24]!==l||e[25]!==Ee||e[26]!==m||e[27]!==s||e[28]!==d||e[29]!==a?(q=(D,P,de,ze,ve)=>{const Ze=Ee(ve),Be=ve.find(F=>!o.has(F.id)),te=ve[0];if(m==="browse"){const F=jr(te);return i.jsx(Ut,{connection:{title:P,icon:de,description:ve.length>1?`${ve.length} instances`:ze??void 0},fallbackIcon:i.jsx(At,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs(jt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(pn,{size:11})," Connected"]}),onClick:()=>{J("connection_browse_clicked",{app_name:te.app_name??null,connection_id:te.id,instances_count:ve.length}),d?.(F)}},D)}return i.jsx(Ut,{connection:{title:P,icon:de,description:ze},fallbackIcon:i.jsx(At,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[Ze&&i.jsxs(jt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(pn,{size:11})," Added"]}),i.jsx(Ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),Be?(J("connection_add_clicked",{action:"use_existing",app_name:te.app_name??null,connection_id:Be.id}),r&&J("agent_connection_attached",{agent_id:r,connection_id:Be.id,app_name:te.app_name??null,mode:"existing"}),s(Be.id)):(J("connection_add_clicked",{action:"clone",app_name:te.app_name??null,base_connection_id:te.id}),a(te))},children:"Add"})]})},D)},e[22]=o,e[23]=r,e[24]=l,e[25]=Ee,e[26]=m,e[27]=s,e[28]=d,e[29]=a,e[30]=q):q=e[30];const ge=q;let ee;e[31]!==l||e[32]!==m||e[33]!==c?(ee=D=>{const P=D._meta?.["mcp.mesh"],de=P?.friendlyName||P?.friendly_name||D.server?.title||D.title||D.server?.name||D.name||D.id||"",ze=D.server?.description||D.description||null,ve=D.server?.icons?.[0]?.src||_r(D.server?.repository)||null,Ze=P?.official===!0,Be=P?.verified===!0,te=P?.owner==="deco";return i.jsx(Ut,{connection:{title:de,description:ze,icon:ve},fallbackIcon:i.jsx(At,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[te&&i.jsxs(qt,{children:[i.jsx(Gt,{asChild:!0,children:i.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:i.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),i.jsx(Jt,{children:"Built and maintained by Deco"})]}),!te&&Ze&&i.jsxs(qt,{children:[i.jsx(Gt,{asChild:!0,children:i.jsx(jt,{variant:"outline",size:"icon",children:i.jsx(Ht,{})})}),i.jsx(Jt,{children:"Built and maintained by the official vendor"})]}),!te&&!Ze&&Be&&i.jsxs(qt,{children:[i.jsx(Gt,{asChild:!0,children:i.jsx(jt,{variant:"outline",size:"icon",children:i.jsx(Ht,{})})}),i.jsx(Jt,{children:"Verified by the Deco team"})]}),i.jsx(Ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),J("connection_add_clicked",{action:"connect_new",registry_item_id:D.id,app_name:P?.friendlyName||D.server?.name||D.name||null}),c(D)},children:l===D.id?i.jsx(It,{size:14,className:"animate-spin"}):m==="browse"?"Connect":"Add"})]})},`catalog-${D.id}`)},e[31]=l,e[32]=m,e[33]=c,e[34]=ee):ee=e[34];const Te=ee,ye=!C&&i.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[i.jsx(Ir,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:R,onTabChange:D=>p(D)}),i.jsxs(Ye,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{J("connections_dialog_custom_clicked"),h()},children:[i.jsx(oo,{size:12}),"Custom Connection"]})]}),Ge=j&&"opacity-50 pointer-events-none";let _e;e[35]!==Ge?(_e=Sr("flex-1 overflow-auto p-5 transition-opacity duration-150",Ge),e[35]=Ge,e[36]=_e):_e=e[36];const st="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let ne;e[37]!==ge?(ne=D=>{if(D.type==="group")return ge(D.key,D.title,D.icon,null,D.connections);const P=D.connection;return ge(P.id,P.title,P.icon,P.description??null,[P])},e[37]=ge,e[38]=ne):ne=e[38];const Fe=xe.map(ne);let pe;e[39]!==Ae?(pe=i.jsx("div",{ref:Ae,className:"col-span-full h-1"}),e[39]=Ae,e[40]=pe):pe=e[40];let ke;e[41]!==Y?(ke=Y&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),e[41]=Y,e[42]=ke):ke=e[42];const Je=L&&Z.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx(Ht,{size:13,className:"text-muted-foreground shrink-0"}),i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),it=L&&Z.map(Te),at=L&&W.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),we=L&&W.map(Te);let re;e[43]!==he||e[44]!==$||e[45]!==L?(re=L&&$.length>0&&i.jsx("div",{ref:he,className:"col-span-full h-1"}),e[43]=he,e[44]=$,e[45]=L,e[46]=re):re=e[46];let le;e[47]!==U.isLoadingMore||e[48]!==L?(le=L&&U.isLoadingMore&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),e[47]=U.isLoadingMore,e[48]=L,e[49]=le):le=e[49];let Me;e[50]!==Fe||e[51]!==pe||e[52]!==ke||e[53]!==Je||e[54]!==it||e[55]!==at||e[56]!==we||e[57]!==re||e[58]!==le?(Me=i.jsxs("div",{className:st,children:[Fe,pe,ke,Je,it,at,we,re,le]}),e[50]=Fe,e[51]=pe,e[52]=ke,e[53]=Je,e[54]=it,e[55]=at,e[56]=we,e[57]=re,e[58]=le,e[59]=Me):Me=e[59];let G;e[60]!==R||e[61]!==xe.length||e[62]!==W||e[63]!==f||e[64]!==Z?(G=xe.length===0&&Z.length===0&&W.length===0&&i.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:f?`No connections match "${f}"`:R==="connected"?"No connections yet":"No connections available"}),e[60]=R,e[61]=xe.length,e[62]=W,e[63]=f,e[64]=Z,e[65]=G):G=e[65];let Oe;e[66]!==_e||e[67]!==Me||e[68]!==G?(Oe=i.jsxs("div",{className:_e,children:[Me,G]}),e[66]=_e,e[67]=Me,e[68]=G,e[69]=Oe):Oe=e[69];let Qe;return e[70]!==ye||e[71]!==Oe?(Qe=i.jsxs(i.Fragment,{children:[ye,Oe]}),e[70]=ye,e[71]=Oe,e[72]=Qe):Qe=e[72],Qe}function lo(t){return!t.verified&&!t._meta?.["mcp.mesh"]?.verified&&!t.meta?.verified}function uo(t){return t.verified||t._meta?.["mcp.mesh"]?.verified||t.meta?.verified}function fo(t){return t.app_name}function ho(t){return t.app_name}function go(t){return t?.items??[]}function po(t,e){if(t?.hasMore)return e.reduce(vo,0)}function vo(t,e){return t+(e?.items?.length??0)}function $i({open:t,onOpenChange:e,defaultTab:n,initialSearch:r="",...o}){const s=o.mode??"add",a="agentId"in o?o.agentId:void 0,c="addedConnectionIds"in o?o.addedConnectionIds??new Set:new Set,l="onAdd"in o&&o.onAdd?o.onAdd:b=>{},f=(b,w,I)=>{a&&J("agent_connection_attached",{agent_id:a,connection_id:b,app_name:w,mode:I})},[h,d]=u.useState(null),[g,m]=u.useState(r),[N,x]=u.useState(!1),{org:v}=Lt(),{data:j}=Tn.useSession(),C=Fn(),S=br(),R=xr(),T=b=>{e(!1),R({to:"/$org/settings/connections/$appSlug",params:{org:v.slug,appSlug:b}})},A=()=>{S.invalidateQueries({predicate:b=>{const w=b.queryKey;return w[1]===v.id&&w[3]==="collection"&&w[4]==="CONNECTIONS"}})},p=async b=>{d(b.app_name??b.id);try{const I=`${b.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,k=(await C.create.mutateAsync({title:I,description:b.description??null,connection_type:b.connection_type,connection_url:b.connection_url??null,connection_token:null,icon:b.icon??null,app_name:b.app_name??null,app_id:b.app_id??null,connection_headers:b.connection_headers??null})).id,E=await Wt({connectionId:k,orgId:v.id,orgSlug:v.slug,persistFallback:B=>C.update.mutateAsync({id:k,data:{connection_token:B}}).then(()=>{})});if(E.ran&&!E.ok){J("connection_oauth_failed",{connection_id:k,flow:"clone",error:E.error??"no_token"}),Le.error(`Authentication failed: ${E.error??"no token received"}`),await C.delete.mutateAsync(k);return}if(E.ran){J("connection_oauth_succeeded",{connection_id:k,flow:"clone"});const B=new URL(`/api/${v.slug}/mcp/${k}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(B.href,null)}),A()}f(k,b.app_name??null,"clone"),l(k)}catch(w){console.error("Failed to add connection:",w),Le.error("Failed to add connection")}finally{d(null)}},y=async b=>{if(!(!v||!j?.user?.id)){d(b.id);try{const w=Tr(b,v.id,j.user.id,{remoteIndex:0}),I=w.connection_type==="STDIO",O=!!w.connection_url,k=I&&w.connection_headers&&typeof w.connection_headers=="object"&&"command"in w.connection_headers;if(!O&&!k){Le.error("This MCP Server cannot be connected: no connection method available"),d(null);return}const{id:E}=await C.create.mutateAsync(w),B=await Wt({connectionId:E,orgId:v.id,orgSlug:v.slug,persistFallback:ae=>C.update.mutateAsync({id:E,data:{connection_token:ae}}).then(()=>{})});if(B.ran&&!B.ok){J("connection_oauth_failed",{connection_id:E,flow:"connect_new",error:B.error??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${B.error??"no token received"})`}),f(E,w.app_name??null,"new"),l(E);return}if(B.ran){J("connection_oauth_succeeded",{connection_id:E,flow:"connect_new"});const ae=new URL(`/api/${v.slug}/mcp/${E}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(ae.href,null)}),A(),Le.success("Connected and authenticated")}else Le.success("Connected");f(E,w.app_name??null,"new"),l(E)}catch(w){console.error("Failed to connect:",w),Le.error("Failed to connect")}finally{d(null)}}};return i.jsxs(Mn,{open:t,onOpenChange:e,children:[i.jsxs(On,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[i.jsx(Pn,{className:"px-6 pt-5 pb-0 shrink-0",children:i.jsx(Ln,{className:"text-base font-semibold",children:s==="browse"?"Connections":"Add Connection"})}),i.jsx("div",{className:"pt-3 shrink-0",children:i.jsx(Nr,{value:g,onChange:m,placeholder:"Search connections..."})}),i.jsx(u.Suspense,{fallback:i.jsx("div",{className:"flex-1 flex items-center justify-center",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),children:i.jsx(co,{mode:s,agentId:a,addedConnectionIds:c,onAdd:l,onCloneAndAdd:p,onConnectAndAdd:y,connectingItemId:h,search:g,onCreateConnection:()=>x(!0),onBrowseNavigate:T,defaultTab:n})})]}),i.jsx(ao,{open:N,onOpenChange:x,onCreated:async b=>{x(!1);const w=await Wt({connectionId:b,orgId:v.id,orgSlug:v.slug,persistFallback:I=>C.update.mutateAsync({id:b,data:{connection_token:I}}).then(()=>{})});if(w.ran&&!w.ok){J("connection_oauth_failed",{connection_id:b,flow:"custom_create",error:w.error??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${w.error??"no token received"})`}),f(b,null,"custom"),l(b),e(!1);return}if(w.ran){J("connection_oauth_succeeded",{connection_id:b,flow:"custom_create"});const I=new URL(`/api/${v.slug}/mcp/${b}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(I.href,null)}),A()}f(b,null,"custom"),l(b),e(!1)}})]})}const vn=new Map;function Vi(){const{org:t}=Lt(),e=so(),n=io(),r=n.find(v=>v.providerId==="deco"),{data:o,isLoading:s,refetch:a,isFetching:c}=Dr({queryKey:ht.aiProviderCredits(t.id,"deco"),enabled:!!r,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=o?.balanceCents??null,f=l!=null?l/100:null,h=u.useRef(new Map);if(l!=null){const v=vn.get(t.id);h.current.get(t.id)&&v!=null&&l>v&&J("credits_topped_up_detected",{organization_id:t.id,delta_cents:l-v,previous_balance_cents:v,new_balance_cents:l}),vn.set(t.id,l),h.current.set(t.id,!0)}const d=!!r,g=l!=null&&l>0,m=l!=null&&l===0,N=l!=null&&l===200,x=n.length>0&&n.every(v=>v.providerId==="deco");return{hasDecoKey:d,decoKeyId:r?.id??null,balanceCents:l,balanceDollars:f,hasCredits:g,isZeroBalance:m,isInitialFreeCredit:N,hasOnlyDecoProvider:x,isLoading:s,isFetching:c,refetch:a}}function mo(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return u.useMemo(()=>r=>{e.forEach(o=>o(r))},e)}const Ft=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nt(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function an(t){return"nodeType"in t}function Q(t){var e,n;return t?nt(t)?t:an(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function cn(t){const{Document:e}=Q(t);return t instanceof e}function yt(t){return nt(t)?!1:t instanceof Q(t).HTMLElement}function zn(t){return t instanceof Q(t).SVGElement}function rt(t){return t?nt(t)?t.document:an(t)?cn(t)?t:yt(t)||zn(t)?t.ownerDocument:document:document:document}const me=Ft?u.useLayoutEffect:u.useEffect;function zt(t){const e=u.useRef(t);return me(()=>{e.current=t}),u.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}function bo(){const t=u.useRef(null),e=u.useCallback((r,o)=>{t.current=setInterval(r,o)},[]),n=u.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function mt(t,e){e===void 0&&(e=[t]);const n=u.useRef(t);return me(()=>{n.current!==t&&(n.current=t)},e),n}function wt(t,e){const n=u.useRef();return u.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function Tt(t){const e=zt(t),n=u.useRef(null),r=u.useCallback(o=>{o!==n.current&&e?.(o,n.current),n.current=o},[]);return[n,r]}function _t(t){const e=u.useRef();return u.useEffect(()=>{e.current=t},[t]),e.current}let Qt={};function Ct(t,e){return u.useMemo(()=>{if(e)return e;const n=Qt[t]==null?0:Qt[t]+1;return Qt[t]=n,t+"-"+n},[t,e])}function Bn(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,a)=>{const c=Object.entries(a);for(const[l,f]of c){const h=s[l];h!=null&&(s[l]=h+t*f)}return s},{...e})}}const tt=Bn(1),bt=Bn(-1);function xo(t){return"clientX"in t&&"clientY"in t}function Bt(t){if(!t)return!1;const{KeyboardEvent:e}=Q(t.target);return e&&t instanceof e}function yo(t){if(!t)return!1;const{TouchEvent:e}=Q(t.target);return e&&t instanceof e}function kt(t){if(yo(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return xo(t)?{x:t.clientX,y:t.clientY}:null}const We=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[We.Translate.toString(t),We.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),mn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function wo(t){return t.matches(mn)?t:t.querySelector(mn)}const Co={display:"none"};function So(t){let{id:e,value:n}=t;return z.createElement("div",{id:e,style:Co},n)}function Do(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return z.createElement("div",{id:e,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function jo(){const[t,e]=u.useState("");return{announce:u.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const $n=u.createContext(null);function Ro(t){const e=u.useContext($n);u.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function No(){const[t]=u.useState(()=>new Set),e=u.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[u.useCallback(r=>{let{type:o,event:s}=r;t.forEach(a=>{var c;return(c=a[o])==null?void 0:c.call(a,s)})},[t]),e]}const Io={draggable:`
|
|
2
2
|
To pick up a draggable item, press the space bar.
|
|
3
3
|
While dragging, use the arrow keys to move the item.
|
|
4
4
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as _,r as j,j as e,B as p,v as S,t as c,c as N}from"./index-
|
|
1
|
+
import{D as _,r as j,j as e,B as p,v as S,t as c,c as N}from"./index-BYxLxb_N.js";import{D as k}from"./domain-settings-DZINJBvM.js";import{P as f}from"./index-Bses2pxU.js";import{I as l}from"./input-3siSzfvD.js";import{S as z}from"./switch-_sVfSPaD.js";import{a as P,b as R,c as A,d as T}from"./use-org-sso-Dg7bL-tR.js";import{c as F,S as y,a as C,b as r,d as O}from"./settings-section-BO74XZSq.js";import{s as L}from"./Trash01-DGP_hvtF.js";import{R as q}from"./require-capability-Bxhn3CI-.js";import"./studio-tools-CX1t2wo7.js";import"./badge-DophsIRD.js";import"./select-xa-GjJp_.js";import"./tooltip-CIGYkCAI.js";import"./ChevronUp-COalomvK.js";import"./ChevronDown-D1rSZJNJ.js";import"./sidebar-B9dgUcrl.js";import"./LayoutLeft-D0U40IKQ.js";import"./use-mobile-42JaqbyB.js";import"./sheet-ChiQca7K.js";import"./X-B01YsVvG.js";import"./card-fxR4lUhv.js";import"./ArrowUpRight-BusN0ze9.js";import"./use-capability-CVgQJ8xn.js";import"./access-gate-DEalrdU6.js";import"./capability-load-error-DZnbbeLs.js";function B(){const{org:s}=_(),{data:a,isLoading:E}=P(s.id,s.slug),x=R(s.id,s.slug),h=A(s.id,s.slug),v=T(s.id,s.slug),[t,d]=j.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[m,g]=j.useState(!1),u=a?.configured&&a.config,o=a?.config,I=()=>{o&&d({issuer:o.issuer,clientId:o.clientId,clientSecret:"",discoveryEndpoint:o.discoveryEndpoint??"",domain:o.domain,scopes:o.scopes.join(" ")}),g(!0)},b=async()=>{if(!t.issuer||!t.clientId||!t.domain){c.error("Issuer, Client ID, and Domain are required");return}if(!u&&!t.clientSecret){c.error("Client Secret is required for initial setup");return}try{await x.mutateAsync({issuer:t.issuer,clientId:t.clientId,clientSecret:t.clientSecret,discoveryEndpoint:t.discoveryEndpoint||void 0,scopes:t.scopes.split(/\s+/).filter(Boolean),domain:t.domain,enforced:o?.enforced??!1}),S(u?"sso_config_updated":"sso_configured",{organization_id:s.id,email_domain:t.domain}),c.success("SSO configuration saved"),g(!1)}catch(i){c.error(i instanceof Error?i.message:"Failed to save SSO config")}},w=async()=>{if(confirm("Are you sure you want to remove SSO configuration?"))try{await h.mutateAsync(),S("sso_config_removed",{organization_id:s.id}),c.success("SSO configuration removed"),g(!1)}catch{c.error("Failed to remove SSO config")}},D=async i=>{try{await v.mutateAsync(i),S("sso_enforcement_toggled",{organization_id:s.id,enforced:i}),c.success(i?"SSO enforcement enabled":"SSO enforcement disabled")}catch{c.error("Failed to toggle SSO enforcement")}};return e.jsx(f,{children:e.jsx(f.Content,{children:e.jsx(f.Body,{children:e.jsxs(F,{children:[e.jsx(f.Title,{children:"Security"}),e.jsx(k,{}),E?e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading..."}):e.jsxs(e.Fragment,{children:[u&&!m&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Provider",action:e.jsx("span",{className:"font-medium",children:o.issuer})}),e.jsx(r,{title:"Client ID",action:e.jsx("span",{className:"font-mono text-xs",children:o.clientId})}),e.jsx(r,{title:"Domain",action:e.jsx("span",{className:"font-medium",children:o.domain})}),e.jsx(r,{title:"Scopes",action:e.jsx("span",{className:"font-mono text-xs",children:o.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(r,{title:"Enforce SSO",description:"Require all members to authenticate via SSO",action:e.jsx(z,{checked:o.enforced,onCheckedChange:D,disabled:v.isPending})}),e.jsxs(O,{children:[e.jsxs(p,{variant:"ghost",size:"sm",onClick:w,disabled:h.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(L,{size:14}),"Remove"]}),e.jsx(p,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${s.slug}/sso/authorize`,"_blank")},children:"Test SSO"}),e.jsx(p,{variant:"outline",size:"sm",onClick:I,children:"Edit configuration"})]})]})}),(!u||m)&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Issuer URL",description:"The OIDC issuer URL of your identity provider.",action:e.jsx(l,{id:"sso-issuer",placeholder:"https://login.microsoftonline.com/{tenant}/v2.0",value:t.issuer,onChange:i=>d(n=>({...n,issuer:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client ID",action:e.jsx(l,{id:"sso-client-id",placeholder:"your-client-id",value:t.clientId,onChange:i=>d(n=>({...n,clientId:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client Secret",description:m&&u?"Leave empty to keep current":void 0,action:e.jsx(l,{id:"sso-client-secret",type:"password",placeholder:"your-client-secret",value:t.clientSecret,onChange:i=>d(n=>({...n,clientSecret:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Email Domain",description:"The email domain this SSO provider covers.",action:e.jsx(l,{id:"sso-domain",placeholder:"company.com",value:t.domain,onChange:i=>d(n=>({...n,domain:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Scopes",action:e.jsx(l,{id:"sso-scopes",placeholder:"openid email profile",value:t.scopes,onChange:i=>d(n=>({...n,scopes:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Discovery Endpoint",description:"Optional — auto-detected from issuer if omitted.",action:e.jsx(l,{id:"sso-discovery",placeholder:"Auto-detected from issuer",value:t.discoveryEndpoint,onChange:i=>d(n=>({...n,discoveryEndpoint:i.target.value})),className:"w-[280px]"})}),e.jsxs(O,{children:[m&&e.jsx(p,{variant:"outline",size:"sm",onClick:()=>g(!1),children:"Cancel"}),e.jsx(p,{onClick:b,disabled:x.isPending,size:"sm",children:x.isPending?"Saving...":m?"Update":"Configure SSO"})]})]})})]})]})})})})}function ue(){const s=N.c(1);let a;return s[0]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx(q,{capability:"org:manage",area:"security",children:e.jsx(B,{})}),s[0]=a):a=s[0],a}export{ue as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as D,j as s,E as le,r as K,D as ae,m as ce,b as de,e as me,B as Y,v as te,K as fe,d as ge,t as ie}from"./index-Btu8MJ2T.js";import{i as ue}from"./AlertCircle-Dc2EW1Xh.js";import{i as pe}from"./ChevronRight-Fl5MZFE5.js";import{s as xe}from"./Plus-CVGVCEWD.js";import{s as he}from"./Trash01-Bg4qQ-BB.js";import{I as X}from"./input-4Ev3FmKy.js";import{S as oe}from"./switch-wJmvNZzz.js";import{S as ye}from"./skeleton-BgNQclTb.js";import{A as ne}from"./avatar-ClJplFDb.js";import{P as je,a as Ce,b as ve}from"./popover-HVRs71J_.js";import{b as re}from"./use-connection-eth2XC-k.js";import{W as Z}from"./use-mcp-client-gLPXhZwB.js";import{P as G}from"./index-Bqne0FVi.js";import{u as Se}from"./use-registry-connections-zKZuukaQ.js";import{f as _e,g as be}from"./use-organization-settings-sdfsJyHP.js";import{c as Pe,b as I,S as ee,a as Q}from"./settings-section-BDyOfwm9.js";import{R as Re}from"./require-capability-BHjBd5cR.js";import"./User01-B-8LArOe.js";import"./use-collections-DVgsseNJ.js";import"./auth-CVcuabTS.js";import"./sidebar-DnL9fG62.js";import"./LayoutLeft-D_an0z1y.js";import"./use-mobile-ClQdwqdV.js";import"./sheet-BuVYCl7W.js";import"./X-CKh7IqmP.js";import"./tooltip--hLULyB8.js";import"./studio-tools-B50CVfWQ.js";import"./card-B4nOjxjh.js";import"./ArrowUpRight-CQzCYQdd.js";import"./use-capability-BU6ciZJU.js";import"./access-gate-BvzmNzgn.js";import"./capability-load-error-Ea8TKuPS.js";function ke(t){const e=D.c(3),{error:o}=t;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ue,{size:16}),e[0]=m):m=e[0];let n;return e[1]!==o.message?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[m,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load store settings: ",o.message]})]}),e[1]=o.message,e[2]=n):n=e[2],n}function we(t){const e=D.c(36),{onCancel:o,onSuccess:m}=t,n=re(),[r,j]=K.useState(""),[a,v]=K.useState(""),[x,S]=K.useState("");let h;e[0]!==n||e[1]!==r||e[2]!==x||e[3]!==a?(h=async()=>(await n.create.mutateAsync({title:r||"Private Registry",description:"Private MCP registry",connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=n,e[1]=r,e[2]=x,e[3]=a,e[4]=h):h=e[4];let f;e[5]!==m?(f=C=>{te("store_private_registry_added",{connection_id:C}),ie.success("Private registry added"),m(C)},e[5]=m,e[6]=f):f=e[6];let y;e[7]!==h||e[8]!==f?(y={mutationFn:h,onSuccess:f,onError:Ne},e[7]=h,e[8]=f,e[9]=y):y=e[9];const{mutate:c,isPending:d}=ge(y);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=C=>j(C.target.value),e[10]=g):g=e[10];let u;e[11]!==r?(u=s.jsx(I,{title:"Name",action:s.jsx(X,{placeholder:"e.g. Acme Corp Registry",value:r,onChange:g,className:"w-[280px]"})}),e[11]=r,e[12]=u):u=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=C=>v(C.target.value),e[13]=p):p=e[13];let l;e[14]!==a?(l=s.jsx(I,{title:"Registry URL",action:s.jsx(X,{placeholder:"https://registry.example.com/mcp",value:a,onChange:p,className:"w-[280px]"})}),e[14]=a,e[15]=l):l=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=C=>S(C.target.value),e[16]=_):_=e[16];let b;e[17]!==x?(b=s.jsx(I,{title:"Auth Token",description:"Optional",action:s.jsx(X,{type:"password",placeholder:"Bearer token...",value:x,onChange:_,className:"w-[280px]"})}),e[17]=x,e[18]=b):b=e[18];let k;e[19]!==d||e[20]!==o?(k=s.jsx(Y,{variant:"ghost",size:"sm",onClick:o,disabled:d,children:"Cancel"}),e[19]=d,e[20]=o,e[21]=k):k=e[21];let N;e[22]!==c?(N=()=>c(),e[22]=c,e[23]=N):N=e[23];const O=!a||d,B=d?"Adding...":"Add Registry";let A;e[24]!==N||e[25]!==O||e[26]!==B?(A=s.jsx(Y,{size:"sm",onClick:N,disabled:O,children:B}),e[24]=N,e[25]=O,e[26]=B,e[27]=A):A=e[27];let R;e[28]!==k||e[29]!==A?(R=s.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[k,A]}),e[28]=k,e[29]=A,e[30]=R):R=e[30];let P;return e[31]!==R||e[32]!==u||e[33]!==l||e[34]!==b?(P=s.jsxs(Q,{children:[u,l,b,R]}),e[31]=R,e[32]=u,e[33]=l,e[34]=b,e[35]=P):P=e[35],P}function Ne(t){ie.error(`Failed to add registry: ${t.message}`)}function L(t){const e=D.c(29),{name:o,description:m,icon:n,enabled:r,onToggle:j,onDelete:a,href:v}=t,x=de();let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S={from:"/shell/$org"},e[0]=S):S=e[0];const{org:h}=me(S);let f;e[1]!==r||e[2]!==v||e[3]!==x||e[4]!==j||e[5]!==h?(f=()=>{v?x({to:v,params:{org:h}}):j(!r)},e[1]=r,e[2]=v,e[3]=x,e[4]=j,e[5]=h,e[6]=f):f=e[6];const y=f;let c;e[7]!==n||e[8]!==o?(c=n?s.jsx("img",{src:n,alt:o,className:"size-8 rounded-md object-contain"}):s.jsx(ne,{fallback:o.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=n,e[8]=o,e[9]=c):c=e[9];let d;e[10]!==a?(d=a&&s.jsxs(je,{children:[s.jsx(Ce,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Me,children:s.jsx(he,{size:14})})}),s.jsx(ve,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Remove this registry?"}),s.jsx(Y,{variant:"destructive",size:"xs",onClick:b=>{b.stopPropagation(),a()},children:"Remove"})]})})]}),e[10]=a,e[11]=d):d=e[11];let g;e[12]!==j?(g=b=>j(b),e[12]=j,e[13]=g):g=e[13];let u;e[14]!==r||e[15]!==g?(u=s.jsx(oe,{checked:r,onClick:Ae,onCheckedChange:g}),e[14]=r,e[15]=g,e[16]=u):u=e[16];let p;e[17]!==v?(p=v&&s.jsx(pe,{size:14,className:"text-muted-foreground"}),e[17]=v,e[18]=p):p=e[18];let l;e[19]!==d||e[20]!==u||e[21]!==p?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[d,u,p]}),e[19]=d,e[20]=u,e[21]=p,e[22]=l):l=e[22];let _;return e[23]!==m||e[24]!==y||e[25]!==o||e[26]!==c||e[27]!==l?(_=s.jsx(I,{title:o,description:m,onClick:y,icon:c,action:l}),e[23]=m,e[24]=y,e[25]=o,e[26]=c,e[27]=l,e[28]=_):_=e[28],_}function Ae(t){return t.stopPropagation()}function Me(t){return t.stopPropagation()}function Te(){const t=D.c(59),{org:e}=ae(),o=Se(),m=re(),n=_e(),{mutateAsync:r}=be(),j=ce(),[a,v]=K.useState(!1);let x,S,h,f,y,c;if(t[0]!==m||t[1]!==e.id||t[2]!==j||t[3]!==n||t[4]!==o||t[5]!==a||t[6]!==r){const p=Z.REGISTRY(e.id),l=i=>{if(!n)return i===p;const w=n.registries[i];return w?w.enabled:i===p},_=Z.COMMUNITY_REGISTRY(e.id),b=o.find(i=>i.id===p),k=o.find(i=>i.id===_||i.id==="community-registry"),N=k?.id??_,O=Z.SELF(e.id),B=new Set([p,_,"community-registry",O]),A=o.filter(i=>!B.has(i.id));let R;t[13]!==n||t[14]!==r?(R=async(i,w)=>{te("store_registry_toggled",{connection_id:i,enabled:w});const se=n??{registries:{},blockedMcps:[]};await r({...se,registries:{...se.registries,[i]:{enabled:w}}})},t[13]=n,t[14]=r,t[15]=R):R=t[15];const P=R;let C;t[16]!==m||t[17]!==e.id||t[18]!==j?(C=async i=>{te("store_private_registry_removed",{connection_id:i}),await m.delete.mutateAsync(i),j.invalidateQueries({queryKey:fe.organizationSettings(e.id)})},t[16]=m,t[17]=e.id,t[18]=j,t[19]=C):C=t[19];const W=C;let U;t[20]!==n||t[21]!==r?(U=async i=>{v(!1);const w=n??{registries:{},blockedMcps:[]};await r({...w,registries:{...w.registries,[i]:{enabled:!0}}})},t[20]=n,t[21]=r,t[22]=U):U=t[22];const H=U,J=b?s.jsx(L,{name:"Deco Store",description:"Official deco MCP registry with curated integrations",icon:b.icon,enabled:l(p),onToggle:i=>P(p,i)}):s.jsx(I,{title:"Deco Store",description:"Connection not found — will be created automatically."});t[23]!==J?(y=s.jsx(ee,{title:"Deco Store",children:s.jsx(Q,{children:J})}),t[23]=J,t[24]=y):y=t[24];let M;t[25]!==a?(M=a?void 0:s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>v(!0),children:[s.jsx(xe,{size:14}),"Add registry"]}),t[25]=a,t[26]=M):M=t[26];let T;t[27]!==H||t[28]!==a?(T=a&&s.jsx(we,{onCancel:()=>v(!1),onSuccess:H}),t[27]=H,t[28]=a,t[29]=T):T=t[29];let z;t[30]!==l?(z=l("self"),t[30]=l,t[31]=z):z=t[31];let E;t[32]!==P?(E=i=>P("self",i),t[32]=P,t[33]=E):E=t[33];let $;t[34]!==z||t[35]!==E?($=s.jsx(L,{name:"Private Registry",description:"Your organization's private MCP registry",enabled:z,onToggle:E,href:"/$org/settings/store/registry"}),t[34]=z,t[35]=E,t[36]=$):$=t[36];let q;t[37]!==W||t[38]!==P||t[39]!==l?(q=i=>s.jsx(L,{name:i.title,description:i.description??"Private MCP registry",icon:i.icon,enabled:l(i.id),onToggle:w=>P(i.id,w),onDelete:()=>W(i.id)},i.id),t[37]=W,t[38]=P,t[39]=l,t[40]=q):q=t[40];const V=A.map(q);let F;t[41]!==$||t[42]!==V?(F=s.jsxs(Q,{children:[$,V]}),t[41]=$,t[42]=V,t[43]=F):F=t[43],t[44]!==F||t[45]!==M||t[46]!==T?(c=s.jsxs(ee,{title:"Private Registries",actions:M,children:[T,F]}),t[44]=F,t[45]=M,t[46]=T,t[47]=c):c=t[47],S=ee,f="Community",x=Q,h=k?s.jsx(L,{name:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",icon:k.icon,enabled:l(N),onToggle:i=>P(N,i)}):s.jsx(I,{title:"MCP Registry",description:"Community MCP registry — not yet added",icon:s.jsx(ne,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:s.jsx(oe,{checked:!1,disabled:!0,onCheckedChange:ze})}),t[0]=m,t[1]=e.id,t[2]=j,t[3]=n,t[4]=o,t[5]=a,t[6]=r,t[7]=x,t[8]=S,t[9]=h,t[10]=f,t[11]=y,t[12]=c}else x=t[7],S=t[8],h=t[9],f=t[10],y=t[11],c=t[12];let d;t[48]!==x||t[49]!==h?(d=s.jsx(x,{children:h}),t[48]=x,t[49]=h,t[50]=d):d=t[50];let g;t[51]!==S||t[52]!==f||t[53]!==d?(g=s.jsx(S,{title:f,children:d}),t[51]=S,t[52]=f,t[53]=d,t[54]=g):g=t[54];let u;return t[55]!==y||t[56]!==c||t[57]!==g?(u=s.jsxs(s.Fragment,{children:[y,c,g]}),t[55]=y,t[56]=c,t[57]=g,t[58]=u):u=t[58],u}function ze(){}function Ee(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ye,{className:"h-64 w-full"}),t[0]=e):e=t[0];let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(le,{fallback:$e,children:s.jsx(K.Suspense,{fallback:e,children:s.jsx(G,{children:s.jsx(G.Content,{children:s.jsx(G.Body,{children:s.jsxs(Pe,{children:[s.jsx(G.Title,{children:"Store"}),s.jsx(Te,{})]})})})})})}),t[1]=o):o=t[1],o}function $e(t){const{error:e}=t;return s.jsx(ke,{error:e??new Error("Failed to load store settings")})}function ut(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Re,{capability:"registry:manage",area:"the store",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}export{ut as default};
|
|
1
|
+
import{c as D,j as s,E as le,r as K,D as ae,m as ce,b as de,e as me,B as Y,v as te,K as fe,d as ge,t as ie}from"./index-BYxLxb_N.js";import{i as ue}from"./AlertCircle-BP8AraZY.js";import{i as pe}from"./ChevronRight-lATD-CWU.js";import{s as xe}from"./Plus-Bl_LZN4x.js";import{s as he}from"./Trash01-DGP_hvtF.js";import{I as X}from"./input-3siSzfvD.js";import{S as oe}from"./switch-_sVfSPaD.js";import{S as ye}from"./skeleton-BFIflr8H.js";import{A as ne}from"./avatar-DJ3QuuQ7.js";import{P as je,a as Ce,b as ve}from"./popover-Dsv1r95r.js";import{b as re}from"./use-connection-BKkAL8KW.js";import{W as Z}from"./use-mcp-client-BRyGzGjZ.js";import{P as G}from"./index-Bses2pxU.js";import{u as Se}from"./use-registry-connections-BVPw6piI.js";import{f as _e,g as be}from"./use-organization-settings-lLQudMV_.js";import{c as Pe,b as I,S as ee,a as Q}from"./settings-section-BO74XZSq.js";import{R as Re}from"./require-capability-Bxhn3CI-.js";import"./User01-CEj0lW_2.js";import"./use-collections-B9JlVxD2.js";import"./auth-C-4tdsy-.js";import"./sidebar-B9dgUcrl.js";import"./LayoutLeft-D0U40IKQ.js";import"./use-mobile-42JaqbyB.js";import"./sheet-ChiQca7K.js";import"./X-B01YsVvG.js";import"./tooltip-CIGYkCAI.js";import"./studio-tools-CX1t2wo7.js";import"./card-fxR4lUhv.js";import"./ArrowUpRight-BusN0ze9.js";import"./use-capability-CVgQJ8xn.js";import"./access-gate-DEalrdU6.js";import"./capability-load-error-DZnbbeLs.js";function ke(t){const e=D.c(3),{error:o}=t;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ue,{size:16}),e[0]=m):m=e[0];let n;return e[1]!==o.message?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[m,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load store settings: ",o.message]})]}),e[1]=o.message,e[2]=n):n=e[2],n}function we(t){const e=D.c(36),{onCancel:o,onSuccess:m}=t,n=re(),[r,j]=K.useState(""),[a,v]=K.useState(""),[x,S]=K.useState("");let h;e[0]!==n||e[1]!==r||e[2]!==x||e[3]!==a?(h=async()=>(await n.create.mutateAsync({title:r||"Private Registry",description:"Private MCP registry",connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=n,e[1]=r,e[2]=x,e[3]=a,e[4]=h):h=e[4];let f;e[5]!==m?(f=C=>{te("store_private_registry_added",{connection_id:C}),ie.success("Private registry added"),m(C)},e[5]=m,e[6]=f):f=e[6];let y;e[7]!==h||e[8]!==f?(y={mutationFn:h,onSuccess:f,onError:Ne},e[7]=h,e[8]=f,e[9]=y):y=e[9];const{mutate:c,isPending:d}=ge(y);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=C=>j(C.target.value),e[10]=g):g=e[10];let u;e[11]!==r?(u=s.jsx(I,{title:"Name",action:s.jsx(X,{placeholder:"e.g. Acme Corp Registry",value:r,onChange:g,className:"w-[280px]"})}),e[11]=r,e[12]=u):u=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=C=>v(C.target.value),e[13]=p):p=e[13];let l;e[14]!==a?(l=s.jsx(I,{title:"Registry URL",action:s.jsx(X,{placeholder:"https://registry.example.com/mcp",value:a,onChange:p,className:"w-[280px]"})}),e[14]=a,e[15]=l):l=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=C=>S(C.target.value),e[16]=_):_=e[16];let b;e[17]!==x?(b=s.jsx(I,{title:"Auth Token",description:"Optional",action:s.jsx(X,{type:"password",placeholder:"Bearer token...",value:x,onChange:_,className:"w-[280px]"})}),e[17]=x,e[18]=b):b=e[18];let k;e[19]!==d||e[20]!==o?(k=s.jsx(Y,{variant:"ghost",size:"sm",onClick:o,disabled:d,children:"Cancel"}),e[19]=d,e[20]=o,e[21]=k):k=e[21];let N;e[22]!==c?(N=()=>c(),e[22]=c,e[23]=N):N=e[23];const O=!a||d,B=d?"Adding...":"Add Registry";let A;e[24]!==N||e[25]!==O||e[26]!==B?(A=s.jsx(Y,{size:"sm",onClick:N,disabled:O,children:B}),e[24]=N,e[25]=O,e[26]=B,e[27]=A):A=e[27];let R;e[28]!==k||e[29]!==A?(R=s.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[k,A]}),e[28]=k,e[29]=A,e[30]=R):R=e[30];let P;return e[31]!==R||e[32]!==u||e[33]!==l||e[34]!==b?(P=s.jsxs(Q,{children:[u,l,b,R]}),e[31]=R,e[32]=u,e[33]=l,e[34]=b,e[35]=P):P=e[35],P}function Ne(t){ie.error(`Failed to add registry: ${t.message}`)}function L(t){const e=D.c(29),{name:o,description:m,icon:n,enabled:r,onToggle:j,onDelete:a,href:v}=t,x=de();let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S={from:"/shell/$org"},e[0]=S):S=e[0];const{org:h}=me(S);let f;e[1]!==r||e[2]!==v||e[3]!==x||e[4]!==j||e[5]!==h?(f=()=>{v?x({to:v,params:{org:h}}):j(!r)},e[1]=r,e[2]=v,e[3]=x,e[4]=j,e[5]=h,e[6]=f):f=e[6];const y=f;let c;e[7]!==n||e[8]!==o?(c=n?s.jsx("img",{src:n,alt:o,className:"size-8 rounded-md object-contain"}):s.jsx(ne,{fallback:o.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=n,e[8]=o,e[9]=c):c=e[9];let d;e[10]!==a?(d=a&&s.jsxs(je,{children:[s.jsx(Ce,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Me,children:s.jsx(he,{size:14})})}),s.jsx(ve,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Remove this registry?"}),s.jsx(Y,{variant:"destructive",size:"xs",onClick:b=>{b.stopPropagation(),a()},children:"Remove"})]})})]}),e[10]=a,e[11]=d):d=e[11];let g;e[12]!==j?(g=b=>j(b),e[12]=j,e[13]=g):g=e[13];let u;e[14]!==r||e[15]!==g?(u=s.jsx(oe,{checked:r,onClick:Ae,onCheckedChange:g}),e[14]=r,e[15]=g,e[16]=u):u=e[16];let p;e[17]!==v?(p=v&&s.jsx(pe,{size:14,className:"text-muted-foreground"}),e[17]=v,e[18]=p):p=e[18];let l;e[19]!==d||e[20]!==u||e[21]!==p?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[d,u,p]}),e[19]=d,e[20]=u,e[21]=p,e[22]=l):l=e[22];let _;return e[23]!==m||e[24]!==y||e[25]!==o||e[26]!==c||e[27]!==l?(_=s.jsx(I,{title:o,description:m,onClick:y,icon:c,action:l}),e[23]=m,e[24]=y,e[25]=o,e[26]=c,e[27]=l,e[28]=_):_=e[28],_}function Ae(t){return t.stopPropagation()}function Me(t){return t.stopPropagation()}function Te(){const t=D.c(59),{org:e}=ae(),o=Se(),m=re(),n=_e(),{mutateAsync:r}=be(),j=ce(),[a,v]=K.useState(!1);let x,S,h,f,y,c;if(t[0]!==m||t[1]!==e.id||t[2]!==j||t[3]!==n||t[4]!==o||t[5]!==a||t[6]!==r){const p=Z.REGISTRY(e.id),l=i=>{if(!n)return i===p;const w=n.registries[i];return w?w.enabled:i===p},_=Z.COMMUNITY_REGISTRY(e.id),b=o.find(i=>i.id===p),k=o.find(i=>i.id===_||i.id==="community-registry"),N=k?.id??_,O=Z.SELF(e.id),B=new Set([p,_,"community-registry",O]),A=o.filter(i=>!B.has(i.id));let R;t[13]!==n||t[14]!==r?(R=async(i,w)=>{te("store_registry_toggled",{connection_id:i,enabled:w});const se=n??{registries:{},blockedMcps:[]};await r({...se,registries:{...se.registries,[i]:{enabled:w}}})},t[13]=n,t[14]=r,t[15]=R):R=t[15];const P=R;let C;t[16]!==m||t[17]!==e.id||t[18]!==j?(C=async i=>{te("store_private_registry_removed",{connection_id:i}),await m.delete.mutateAsync(i),j.invalidateQueries({queryKey:fe.organizationSettings(e.id)})},t[16]=m,t[17]=e.id,t[18]=j,t[19]=C):C=t[19];const W=C;let U;t[20]!==n||t[21]!==r?(U=async i=>{v(!1);const w=n??{registries:{},blockedMcps:[]};await r({...w,registries:{...w.registries,[i]:{enabled:!0}}})},t[20]=n,t[21]=r,t[22]=U):U=t[22];const H=U,J=b?s.jsx(L,{name:"Deco Store",description:"Official deco MCP registry with curated integrations",icon:b.icon,enabled:l(p),onToggle:i=>P(p,i)}):s.jsx(I,{title:"Deco Store",description:"Connection not found — will be created automatically."});t[23]!==J?(y=s.jsx(ee,{title:"Deco Store",children:s.jsx(Q,{children:J})}),t[23]=J,t[24]=y):y=t[24];let M;t[25]!==a?(M=a?void 0:s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>v(!0),children:[s.jsx(xe,{size:14}),"Add registry"]}),t[25]=a,t[26]=M):M=t[26];let T;t[27]!==H||t[28]!==a?(T=a&&s.jsx(we,{onCancel:()=>v(!1),onSuccess:H}),t[27]=H,t[28]=a,t[29]=T):T=t[29];let z;t[30]!==l?(z=l("self"),t[30]=l,t[31]=z):z=t[31];let E;t[32]!==P?(E=i=>P("self",i),t[32]=P,t[33]=E):E=t[33];let $;t[34]!==z||t[35]!==E?($=s.jsx(L,{name:"Private Registry",description:"Your organization's private MCP registry",enabled:z,onToggle:E,href:"/$org/settings/store/registry"}),t[34]=z,t[35]=E,t[36]=$):$=t[36];let q;t[37]!==W||t[38]!==P||t[39]!==l?(q=i=>s.jsx(L,{name:i.title,description:i.description??"Private MCP registry",icon:i.icon,enabled:l(i.id),onToggle:w=>P(i.id,w),onDelete:()=>W(i.id)},i.id),t[37]=W,t[38]=P,t[39]=l,t[40]=q):q=t[40];const V=A.map(q);let F;t[41]!==$||t[42]!==V?(F=s.jsxs(Q,{children:[$,V]}),t[41]=$,t[42]=V,t[43]=F):F=t[43],t[44]!==F||t[45]!==M||t[46]!==T?(c=s.jsxs(ee,{title:"Private Registries",actions:M,children:[T,F]}),t[44]=F,t[45]=M,t[46]=T,t[47]=c):c=t[47],S=ee,f="Community",x=Q,h=k?s.jsx(L,{name:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",icon:k.icon,enabled:l(N),onToggle:i=>P(N,i)}):s.jsx(I,{title:"MCP Registry",description:"Community MCP registry — not yet added",icon:s.jsx(ne,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:s.jsx(oe,{checked:!1,disabled:!0,onCheckedChange:ze})}),t[0]=m,t[1]=e.id,t[2]=j,t[3]=n,t[4]=o,t[5]=a,t[6]=r,t[7]=x,t[8]=S,t[9]=h,t[10]=f,t[11]=y,t[12]=c}else x=t[7],S=t[8],h=t[9],f=t[10],y=t[11],c=t[12];let d;t[48]!==x||t[49]!==h?(d=s.jsx(x,{children:h}),t[48]=x,t[49]=h,t[50]=d):d=t[50];let g;t[51]!==S||t[52]!==f||t[53]!==d?(g=s.jsx(S,{title:f,children:d}),t[51]=S,t[52]=f,t[53]=d,t[54]=g):g=t[54];let u;return t[55]!==y||t[56]!==c||t[57]!==g?(u=s.jsxs(s.Fragment,{children:[y,c,g]}),t[55]=y,t[56]=c,t[57]=g,t[58]=u):u=t[58],u}function ze(){}function Ee(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ye,{className:"h-64 w-full"}),t[0]=e):e=t[0];let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(le,{fallback:$e,children:s.jsx(K.Suspense,{fallback:e,children:s.jsx(G,{children:s.jsx(G.Content,{children:s.jsx(G.Body,{children:s.jsxs(Pe,{children:[s.jsx(G.Title,{children:"Store"}),s.jsx(Te,{})]})})})})})}),t[1]=o):o=t[1],o}function $e(t){const{error:e}=t;return s.jsx(ke,{error:e??new Error("Failed to load store settings")})}function ut(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Re,{capability:"registry:manage",area:"the store",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}export{ut as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-DP5F-9Lo.js","assets/index-BYxLxb_N.js","assets/index-BcXb7VeZ.css","assets/XCircle-QJAHsohS.js","assets/CheckCircle-CCiLVyhM.js","assets/Settings02-BWw2xnTO.js","assets/use-mcp-client-BRyGzGjZ.js","assets/auth-C-4tdsy-.js","assets/useInfiniteQuery-B_YuxoOI.js","assets/use-infinite-scroll-C2FI-2Uk.js","assets/studio-tools-CX1t2wo7.js","assets/badge-DophsIRD.js","assets/input-3siSzfvD.js","assets/dropdown-menu-DxVOJpYg.js","assets/ChevronUp-COalomvK.js","assets/ChevronRight-lATD-CWU.js","assets/DotsVertical-DYu5y7nS.js","assets/table-DwDbz8iY.js","assets/toggle-group-CP4tUZC4.js","assets/use-view-mode-CicWJY61.js","assets/use-mobile-42JaqbyB.js","assets/FilterLines-BIcisIR_.js","assets/Globe01-CZa0pcoj.js","assets/SearchMd-B2KjCykZ.js","assets/dialog-DfRvSPDX.js","assets/X-B01YsVvG.js","assets/AlertCircle-BP8AraZY.js","assets/Upload01-ZkeQp0wC.js","assets/alert-dialog-COZUoYSZ.js","assets/card-fxR4lUhv.js","assets/Trash01-DGP_hvtF.js","assets/label-C6vpGlT2.js","assets/select-xa-GjJp_.js","assets/tooltip-CIGYkCAI.js","assets/ChevronDown-D1rSZJNJ.js","assets/switch-_sVfSPaD.js","assets/textarea-WTWE3YW7.js","assets/checkbox-CeFarX34.js","assets/Eye-BfOiLqEH.js","assets/LinkExternal01-l52zuk1o.js","assets/use-copy-eM9xM7hR.js","assets/Key01-BoG0RxKz.js","assets/Plus-Bl_LZN4x.js","assets/mcp-oauth-C8ojuSjk.js","assets/Play-BEfmBSkL.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as m,b as n,e as c,j as t,i as p,r as l,ak as f}from"./index-BYxLxb_N.js";import{R as u}from"./require-capability-Bxhn3CI-.js";import"./use-capability-CVgQJ8xn.js";import"./access-gate-DEalrdU6.js";import"./capability-load-error-DZnbbeLs.js";const g=l.lazy(()=>f(()=>import("./registry-layout-DP5F-9Lo.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(p,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
|