decocms 4.125.5 → 4.126.1
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-1e3-NcEA.js → AlertCircle-Cpl_iMHY.js} +1 -1
- package/dist/client/assets/{AreaChart-CB1-fSKl.js → AreaChart-BqFUuFcm.js} +1 -1
- package/dist/client/assets/{ArrowRight-B-wHAJWT.js → ArrowRight-NqG0gPh-.js} +1 -1
- package/dist/client/assets/{ArrowUp-DI1fyC1G.js → ArrowUp-DMJUikwr.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BWyzrLQV.js → ArrowUpRight-CtURRnV0.js} +1 -1
- package/dist/client/assets/{Check-LKA0FKR0.js → Check-dpauEaNI.js} +1 -1
- package/dist/client/assets/{CheckCircle-Dh-3VdHB.js → CheckCircle-zW46MQTo.js} +1 -1
- package/dist/client/assets/{ChevronDown-B3fDqERa.js → ChevronDown-BQLnN9E6.js} +1 -1
- package/dist/client/assets/{ChevronRight-Dkp8mDOd.js → ChevronRight-CyiD6-MW.js} +1 -1
- package/dist/client/assets/{ChevronUp-Cm7VcWLZ.js → ChevronUp-DQvrAigY.js} +1 -1
- package/dist/client/assets/{Copy01-uQh3Q5Fv.js → Copy01-DDeCwAgK.js} +1 -1
- package/dist/client/assets/{DotsVertical-DKanPfz6.js → DotsVertical-Bj4PS0aF.js} +1 -1
- package/dist/client/assets/{Eye-SCLKEZSh.js → Eye-Dfg-461O.js} +1 -1
- package/dist/client/assets/{FilterLines-13dE_TWB.js → FilterLines-CxHovx4d.js} +1 -1
- package/dist/client/assets/{HardDrive-DViLU95V.js → HardDrive-C67jRlzv.js} +1 -1
- package/dist/client/assets/{Key01-CgioJ7nW.js → Key01-D7-mKS4d.js} +1 -1
- package/dist/client/assets/{LayoutLeft-Yz5NzG-w.js → LayoutLeft-Dnk9I__a.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Di_tOfr7.js → LinkExternal01-DtG8qR-V.js} +1 -1
- package/dist/client/assets/{LogOut01-r12Fp93g.js → LogOut01-Bv49wu0L.js} +1 -1
- package/dist/client/assets/{Monitor01-C_dYkXdo.js → Monitor01-DEsYEg9j.js} +1 -1
- package/dist/client/assets/Palette-3AyXb_ds.js +1 -0
- package/dist/client/assets/{Play-CVGtm9ao.js → Play-C5qDNLgC.js} +1 -1
- package/dist/client/assets/{Plus-CLG5QKCr.js → Plus-C7p4TBsq.js} +1 -1
- package/dist/client/assets/{SearchLg-CkXJjhdf.js → SearchLg-BP6dxoOu.js} +1 -1
- package/dist/client/assets/{SearchMd-DBj7HhoW.js → SearchMd-CFZ8th88.js} +1 -1
- package/dist/client/assets/{Settings02-BIGi-T7s.js → Settings02-BRYke4o3.js} +1 -1
- package/dist/client/assets/{Shield01-ksb0VZpA.js → Shield01-DObW8vGC.js} +1 -1
- package/dist/client/assets/{Star01-lWHLfmir.js → Star01-b06OrJx9.js} +1 -1
- package/dist/client/assets/{Stars01-B3jznQQ4.js → Stars01-CwezkrCj.js} +1 -1
- package/dist/client/assets/{Stars02-DpsxkqJO.js → Stars02-CV1WX5s1.js} +1 -1
- package/dist/client/assets/{Sun-tOsjvEis.js → Sun-BYgqmEv8.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Dw_LQc0f.js → SwitchHorizontal01-D9GLmxcG.js} +1 -1
- package/dist/client/assets/Tool01-CbNqThfz.js +1 -0
- package/dist/client/assets/Tool02-BK6vOVj2.js +1 -0
- package/dist/client/assets/{Trash01-CWIa_mDx.js → Trash01-CZfSiRn_.js} +1 -1
- package/dist/client/assets/{TrendUp01-CYCVS1zr.js → TrendUp01-CbzGmSk7.js} +1 -1
- package/dist/client/assets/{Upload01-CPD95nN4.js → Upload01-OvmEXaXy.js} +1 -1
- package/dist/client/assets/{User01-NxrNjn_h.js → User01-mA16LPDW.js} +1 -1
- package/dist/client/assets/{Users01-DvtVVxdG.js → Users01-D3kMDHBl.js} +1 -1
- package/dist/client/assets/{Users03-3lwc9liE.js → Users03-CMTgzssO.js} +1 -1
- package/dist/client/assets/{X-BYXAQs6v.js → X-Ds6dL0ec.js} +1 -1
- package/dist/client/assets/{XCircle-B3aYrCCW.js → XCircle-Bw2f1-oB.js} +1 -1
- package/dist/client/assets/{XClose-CW0R6bEe.js → XClose-CggKQboo.js} +1 -1
- package/dist/client/assets/{Zap-CrMVm5NK.js → Zap-cm7wIsil.js} +1 -1
- package/dist/client/assets/{ZapSquare-DGe1cTc7.js → ZapSquare-CULLx7Oa.js} +1 -1
- package/dist/client/assets/{access-gate-D11_1kHO.js → access-gate-B5Uu6KI_.js} +1 -1
- package/dist/client/assets/{add-section-modal-NM4MqPkB.js → add-section-modal-C0j8sHqV.js} +1 -1
- package/dist/client/assets/agent-icon-ZuDh9-Hb.js +1 -0
- package/dist/client/assets/agents-list-BwHTZnDL.js +1 -0
- package/dist/client/assets/ai-providers-CUGZxUFM.js +1 -0
- package/dist/client/assets/{alert-BdtEy3y8.js → alert-DktlcBN9.js} +1 -1
- package/dist/client/assets/{alert-dialog-DwnblylQ.js → alert-dialog-iJ0nuAo2.js} +2 -2
- package/dist/client/assets/app-editor-DKXC32M1.js +1 -0
- package/dist/client/assets/{auth-C4POVeVe.js → auth--O1w_iKV.js} +1 -1
- package/dist/client/assets/{auth-catchall-ZDYFC2A8.js → auth-catchall-C66NRByx.js} +1 -1
- package/dist/client/assets/{auth-entry-DoyULuRf.js → auth-entry-DKS3G1uz.js} +1 -1
- package/dist/client/assets/{auth-split-layout-C2XKKVOK.js → auth-split-layout-DcrydIAL.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-iHWUIj8u.js → authenticate-and-persist-oauth-BimYrVCh.js} +1 -1
- package/dist/client/assets/{automation-list-row-BDIVGPMe.js → automation-list-row-CB0Na4Io.js} +1 -1
- package/dist/client/assets/automation-runs-CjoeGDB3.js +180 -0
- package/dist/client/assets/automations-5W4kO3k8.js +1 -0
- package/dist/client/assets/{avatar-BQF1QGjq.js → avatar-BaVe5mnj.js} +1 -1
- package/dist/client/assets/{badge-BbmHyS30.js → badge-rSCRRNZZ.js} +1 -1
- package/dist/client/assets/{block-document-TZNj_QYY.js → block-document-BDVs9E35.js} +3 -3
- package/dist/client/assets/{brand-context-6vJcLMFN.js → brand-context-DXRoGovW.js} +1 -1
- package/dist/client/assets/{buckets-BhsiEut2.js → buckets-iue9Ud7d.js} +1 -1
- package/dist/client/assets/bulk-category-panel-DlUIZJ14.js +1 -0
- package/dist/client/assets/{calendar-DV0NS9xq.js → calendar-B4BM6mn9.js} +1 -1
- package/dist/client/assets/{capability-load-error-ObIFsfE9.js → capability-load-error-C19nQZEJ.js} +1 -1
- package/dist/client/assets/{card-DcA1Rwjs.js → card-CCT9DM3i.js} +1 -1
- package/dist/client/assets/category-editor-B0T-VrR6.js +1 -0
- package/dist/client/assets/chat-context-BBbr98oD.js +36 -0
- package/dist/client/assets/{checkbox-DsDzIgcJ.js → checkbox-Bq4_WPl3.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CHUsfOPQ.js → cli-auth-success-CNtuqj7e.js} +1 -1
- package/dist/client/assets/collection-detail-DQNU4HiQ.js +1 -0
- package/dist/client/assets/{collection-display-button-Bs1t2pp4.js → collection-display-button-BXR6o3H2.js} +1 -1
- package/dist/client/assets/{collection-search-zQnUIpxo.js → collection-search-BtCuCV16.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CXRyAsZ4.js → collection-table-wrapper-C_cazobp.js} +1 -1
- package/dist/client/assets/{collection-tabs-B-9Urj68.js → collection-tabs-0Qyek4_u.js} +1 -1
- package/dist/client/assets/{command-CaEk5uho.js → command-2wvo7x41.js} +1 -1
- package/dist/client/assets/commerce-onboarding-CL4fDsdf.js +1 -0
- package/dist/client/assets/{companions-core-Bua_v2zd.js → companions-core-D1MZ9B1U.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-CxqDr22T.js → connect-desktop-dialog-BuM5aUqF.js} +1 -1
- package/dist/client/assets/{connect-BNr7HDJf.js → connect-gUMrTotC.js} +1 -1
- package/dist/client/assets/{connection-DPLpTOu5.js → connection-B0_6E7Mv.js} +1 -1
- package/dist/client/assets/{connection-card-CfMynI7E.js → connection-card-CD-x-wIk.js} +1 -1
- package/dist/client/assets/connection-detail-BuJnU9wM.js +1 -0
- package/dist/client/assets/{connection-form-helpers-BABNaeU1.js → connection-form-helpers-bxVBlV5J.js} +1 -1
- package/dist/client/assets/connections-HgZRNGX4.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-C_GcVLtN.js → decopilot-sse-pool-zU_w0iZh.js} +1 -1
- package/dist/client/assets/{dialog-CzDwjrNV.js → dialog-C1Qgh1pV.js} +1 -1
- package/dist/client/assets/{domain-settings-B_R_4nb3.js → domain-settings-Dr8-E0BO.js} +1 -1
- package/dist/client/assets/{drawer-CSHRJeTj.js → drawer-C-awTSYf.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CSgtqrA3.js → dropdown-menu-DnVtnirM.js} +1 -1
- package/dist/client/assets/{empty-state-CwB9YNml.js → empty-state-t-xxj99b.js} +1 -1
- package/dist/client/assets/{extract-connection-data-ChU9AlhE.js → extract-connection-data-D2Q5eAdA.js} +1 -1
- package/dist/client/assets/file-explorer-YJoVbzpR.js +2 -0
- package/dist/client/assets/{form-CJlgALpE.js → form-Bcx3Dx5v.js} +1 -1
- package/dist/client/assets/{general-KzB4_6Wn.js → general-CTIKCAQW.js} +1 -1
- package/dist/client/assets/{github-repo-picker-DeAiQyIc.js → github-repo-picker-CfFhjmhR.js} +1 -1
- package/dist/client/assets/{hooks-CvwQxo-K.js → hooks-BRAlfwVg.js} +1 -1
- package/dist/client/assets/{index-D8ngUVkT.js → index-25tDLcHQ.js} +1 -1
- package/dist/client/assets/{index-CpW_ejWe.js → index-5tHCzznE.js} +1 -1
- package/dist/client/assets/index-75oUoREO.js +665 -0
- package/dist/client/assets/{index-CSZh49Ui.js → index-BFHC2rlf.js} +2 -2
- package/dist/client/assets/{index-DLEyNPFn.js → index-CRfJJjBr.js} +1 -1
- package/dist/client/assets/{index-DKhbAOZU.js → index-CTwgLDWF.js} +3 -3
- package/dist/client/assets/{index-DaeJeAuV.js → index-C_mT0QTy.js} +1 -1
- package/dist/client/assets/{index-Dk9RGAqb.js → index-D0GbPI_R.js} +31 -31
- package/dist/client/assets/index-DMXNbwjD.js +1 -0
- package/dist/client/assets/{index-BF9tZwJg.js → index-pNi6sXYH.js} +2 -2
- package/dist/client/assets/{index-Dm21RzCu.js → index-poTj2wxK.js} +1 -1
- package/dist/client/assets/{index-redirect-CiF0eU2o.js → index-redirect-D_UJBrMZ.js} +1 -1
- package/dist/client/assets/{input-C-gHIQip.js → input-Bb4p9_ik.js} +1 -1
- package/dist/client/assets/{integration-icon-DBUjxWMb.js → integration-icon-bG23TCVO.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-CaK4ahsW.js → invite-member-dialog-BSPugAve.js} +1 -1
- package/dist/client/assets/{label-D9aEMZqo.js → label-5xpx6MdG.js} +1 -1
- package/dist/client/assets/{layout-BrB2JTzM.js → layout-q_JOMITt.js} +1 -1
- package/dist/client/assets/{login-Lw37QqB4.js → login-DWFYfzVD.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Br5ozXBx.js → mcp-oauth-I-PLDGs0.js} +1 -1
- package/dist/client/assets/{members-CBNwHdHU.js → members-DAGQnraC.js} +1 -1
- package/dist/client/assets/monaco-editor-3ZmYAdL5.js +19 -0
- package/dist/client/assets/{monitoring-stats-row-B0nxijUM.js → monitoring-stats-row-D-FdpFBv.js} +1 -1
- package/dist/client/assets/{multi-select-DoaVr0FT.js → multi-select-CCg5PDqH.js} +1 -1
- package/dist/client/assets/{oauth-callback-BPUIN1-y.js → oauth-callback-D3gHvTLm.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DH8liZ11.js → oauth-callback-ai-provider-D0DSENaB.js} +1 -1
- package/dist/client/assets/onboarding-Bor5OprO.js +1 -0
- package/dist/client/assets/{org-install-DTLkzmIJ.js → org-install-B0gCH-Nk.js} +1 -1
- package/dist/client/assets/{org-layout-CFv53iXd.js → org-layout-BWKTyxWj.js} +1 -1
- package/dist/client/assets/{organization-choice-D1ddIq9q.js → organization-choice-DWfbtdFz.js} +1 -1
- package/dist/client/assets/{orgs-D8ijCQdC.js → orgs-BtRV84O-.js} +1 -1
- package/dist/client/assets/{page-seo-form-C7Dzevsc.js → page-seo-form-BFCjEKMU.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CgVitSBt.js +1 -0
- package/dist/client/assets/{popover-C2fPnPJt.js → popover-BqPUB_i2.js} +1 -1
- package/dist/client/assets/post-editor-MaKq00sv.js +1 -0
- package/dist/client/assets/{primitives-FVRYsTWJ.js → primitives-DtK7id8m.js} +1 -1
- package/dist/client/assets/{profile-gw5qYABl.js → profile-CN9LLarl.js} +1 -1
- package/dist/client/assets/project-app-view-D-9tjTDx.js +1 -0
- package/dist/client/assets/record-editor-DoN02fjB.js +1 -0
- package/dist/client/assets/redirect-editor-D5Na_rRm.js +1 -0
- package/dist/client/assets/registry-BA7wbNAk.js +2 -0
- package/dist/client/assets/{registry-layout-Bp5nCSQt.js → registry-layout-XctP0_TB.js} +4 -4
- package/dist/client/assets/{reports-jd3NPFMI.js → reports-BBeGN80e.js} +2 -2
- package/dist/client/assets/{require-capability-L7H5SRt9.js → require-capability-2rozIXBv.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BfZFGRtL.js → required-auth-layout-pINrUhAT.js} +1 -1
- package/dist/client/assets/{reset-password-HKWCKRZw.js → reset-password-sGF0Deja.js} +1 -1
- package/dist/client/assets/roles-CtVuRlNg.js +1 -0
- package/dist/client/assets/{search-input-BI1enB-b.js → search-input-DHMmvRu9.js} +1 -1
- package/dist/client/assets/{secrets-BfLNMBsl.js → secrets-Cek9nNDM.js} +1 -1
- package/dist/client/assets/sections-editor-KKjVHQIb.js +2 -0
- package/dist/client/assets/{select-Bd1WKGSJ.js → select-JTf4HMkB.js} +1 -1
- package/dist/client/assets/{select-model-BeSzDzZp.js → select-model-DeVAqDr8.js} +2 -2
- package/dist/client/assets/{self-tool-result-D85DyOHM.js → self-tool-result-JVOqtq7F.js} +1 -1
- package/dist/client/assets/seo-editor-BKn-yjw0.js +1 -0
- package/dist/client/assets/settings-layout-0HfTLbLa.js +1 -0
- package/dist/client/assets/{settings-section-Dh6zLap9.js → settings-section-Duse8CF5.js} +1 -1
- package/dist/client/assets/shell-controls-CjdX-cXs.js +1 -0
- package/dist/client/assets/shell-layout-BX_6t6Y4.js +1 -0
- package/dist/client/assets/{sidebar-DBzYJLC2.js → sidebar-JCplCzUs.js} +1 -1
- package/dist/client/assets/{skeleton-DoNQnm-q.js → skeleton-rG0lAer-.js} +1 -1
- package/dist/client/assets/{sso-TkJUyr_G.js → sso-DZif8bEF.js} +1 -1
- package/dist/client/assets/{store-DdPYyI-G.js → store-DSniQ8uA.js} +1 -1
- package/dist/client/assets/store-registry-7wOo-ziX.js +2 -0
- package/dist/client/assets/{studio-tools-CFgWeCBk.js → studio-tools-CVP_bYI3.js} +1 -1
- package/dist/client/assets/{switch-J9ypA9K4.js → switch-RfqMPlNx.js} +1 -1
- package/dist/client/assets/tab-id-6SxTM-85.js +1 -0
- package/dist/client/assets/{table-CIOCQP8H.js → table-CkAONPU-.js} +1 -1
- package/dist/client/assets/{tabs-BBm6nSot.js → tabs-C6CALd7M.js} +1 -1
- package/dist/client/assets/{textarea-CQzBh7SW.js → textarea-BDUOK9v4.js} +1 -1
- package/dist/client/assets/{toggle-group-DaeRkjf6.js → toggle-group-BJ3nTIOw.js} +1 -1
- package/dist/client/assets/toolbar-BbjlhC11.js +1 -0
- package/dist/client/assets/{tooltip-xp77jFs4.js → tooltip-CZxZ-Bns.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Bujq_lmM.js → use-ai-providers-RLFjMIPM.js} +1 -1
- package/dist/client/assets/{use-api-keys-CLc8cxOV.js → use-api-keys-Yfc55xX1.js} +1 -1
- package/dist/client/assets/{use-automations-m1Zli3xa.js → use-automations-DMIHt0qx.js} +1 -1
- package/dist/client/assets/{use-autosave-BT7goSxj.js → use-autosave-CTaJVuYe.js} +1 -1
- package/dist/client/assets/{use-capability-DHlRnvUE.js → use-capability-C9LPdJIR.js} +1 -1
- package/dist/client/assets/{use-clock-tick-jphDPs9A.js → use-clock-tick-CF0pPFJP.js} +1 -1
- package/dist/client/assets/{use-connection-BsS-3rZB.js → use-connection-D67Pe6aW.js} +1 -1
- package/dist/client/assets/{use-copy-DmTk3Ltj.js → use-copy-3pbdZZcV.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-C2sWKZ2h.js → use-create-virtual-mcp-DOgSWB_T.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-C7P_JRA0.js → use-debounced-autosave-B7CCzcf-.js} +1 -1
- package/dist/client/assets/{use-debounced-value-D9jV_d1U.js → use-debounced-value-DSrcUzF-.js} +1 -1
- package/dist/client/assets/use-deco-credits-BEDSGMQk.js +1 -0
- package/dist/client/assets/{use-decopilot-events-B3KnAJRh.js → use-decopilot-events-DqMtcih3.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DqznTHaH.js → use-delete-connection-CeKf58YN.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BFdTIDOz.js → use-deployment-admin-BAJ25R18.js} +1 -1
- package/dist/client/assets/{use-file-configs-D6Dg-9sN.js → use-file-configs-eEXpH4IT.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CbSN3uty.js → use-infinite-scroll-CUTwghko.js} +1 -1
- package/dist/client/assets/{use-join-requests-avqI9CYZ.js → use-join-requests-DSCKcWR6.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-UXgrVZIV.js → use-mcp-auth-status-GN_90IVc.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Bzvvd0Df.js → use-mcp-client-2qqsLKMv.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-IcUfyh43.js → use-mcp-tools-DYZgnU0f.js} +1 -1
- package/dist/client/assets/{use-members-Cf3JeQ7o.js → use-members-BBMl3rpc.js} +1 -1
- package/dist/client/assets/{use-mobile-DQ8jManM.js → use-mobile-orl9RI6e.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-D_vSOLwA.js → use-navigate-to-agent-BL6ciQ9Y.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-B1nrzsgv.js → use-org-auth-client-nWz-MFtZ.js} +1 -1
- package/dist/client/assets/{use-org-sso-w9j-Ok-z.js → use-org-sso-D-Dpc7wL.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DPbFWCpb.js → use-organization-roles-DuvB4P7M.js} +1 -1
- package/dist/client/assets/{use-organization-settings-zX_T-3XG.js → use-organization-settings-DcpRbwzw.js} +1 -1
- package/dist/client/assets/{use-registry-app-DdwkqhPA.js → use-registry-app-CLQNyM7N.js} +1 -1
- package/dist/client/assets/{use-registry-connections-C529xEPn.js → use-registry-connections-BgFdJfUy.js} +1 -1
- package/dist/client/assets/{use-secrets-CTWWthzy.js → use-secrets-DuyNYvJ7.js} +1 -1
- package/dist/client/assets/{use-status-sounds-D-dtBAQ9.js → use-status-sounds-CO1cS1Qf.js} +1 -1
- package/dist/client/assets/{use-view-mode-CQpQIlsB.js → use-view-mode-Ck3q6mF-.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BP-M67aZ.js → use-virtual-mcp-DYkiFIJC.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DwwDCJAw.js +1 -0
- package/dist/client/assets/{useQueries-b2s80Vy2.js → useQueries-DNJ2_DVv.js} +1 -1
- package/dist/client/assets/{useRouterState-BE3l9A_t.js → useRouterState-CSvDrQv7.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DOVA9lC8.js +1 -0
- package/dist/client/assets/{users-BPFw8x87.js → users-NNxyxZtX.js} +1 -1
- package/dist/client/assets/variant-calendar-BotkXpCr.js +1 -0
- package/dist/client/assets/{view-mode-toggle-Dn7I7z16.js → view-mode-toggle-B0C9EwSq.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/Globe01-CEh6-y49.js +0 -1
- package/dist/client/assets/Globe04-B4VpGXlx.js +0 -1
- package/dist/client/assets/Image01-CMEjSR3M.js +0 -1
- package/dist/client/assets/Package-R2sM0vCm.js +0 -1
- package/dist/client/assets/Palette-CsQxyyrG.js +0 -1
- package/dist/client/assets/Tool01-B0759esA.js +0 -1
- package/dist/client/assets/Tool02-DPXeBg9E.js +0 -1
- package/dist/client/assets/ZoomOut-B-F-8cp0.js +0 -1
- package/dist/client/assets/agent-icon-E6ioveGx.js +0 -1
- package/dist/client/assets/agents-list-Da5tnSPr.js +0 -1
- package/dist/client/assets/ai-providers-BWFFEYZL.js +0 -1
- package/dist/client/assets/app-editor-CdLxuu_H.js +0 -1
- package/dist/client/assets/automation-runs-CfKwQe7C.js +0 -87
- package/dist/client/assets/automations-BCQxf0NT.js +0 -1
- package/dist/client/assets/autosend-CMYVBxZV.js +0 -1
- package/dist/client/assets/bulk-category-panel-D5jThLH-.js +0 -1
- package/dist/client/assets/category-editor-Zpp2vnMR.js +0 -1
- package/dist/client/assets/chat-context-BF6sak7i.js +0 -36
- package/dist/client/assets/collection-detail-BNdX0SIB.js +0 -1
- package/dist/client/assets/commerce-onboarding-CiS9fZfY.js +0 -1
- package/dist/client/assets/connection-detail-B0e-9hXG.js +0 -1
- package/dist/client/assets/connections-Cy3k4Q8y.js +0 -1
- package/dist/client/assets/file-explorer-Brc8sEiI.js +0 -2
- package/dist/client/assets/file-type-icon-_JzjFo75.js +0 -94
- package/dist/client/assets/files-BVF6I-9K.js +0 -1
- package/dist/client/assets/index-CRECkoeT.js +0 -11
- package/dist/client/assets/index-CwhgWx3d.js +0 -492
- package/dist/client/assets/index-EFMlI3jy.js +0 -174
- package/dist/client/assets/index-LUmU4Q-i.js +0 -1
- package/dist/client/assets/location-BpLtHjTZ.js +0 -1
- package/dist/client/assets/monaco-editor-CIeX3g7j.js +0 -9
- package/dist/client/assets/onboarding-Dhh44q6X.js +0 -1
- package/dist/client/assets/page-seo-sheet-o_DqZuF2.js +0 -1
- package/dist/client/assets/post-editor-Bq8RGMDX.js +0 -1
- package/dist/client/assets/project-app-view-CKq51jV9.js +0 -1
- package/dist/client/assets/record-editor-aUwWcdAc.js +0 -1
- package/dist/client/assets/redirect-editor-CdIq7WyN.js +0 -1
- package/dist/client/assets/registry-CuS81odv.js +0 -2
- package/dist/client/assets/roles-BfuLXfWh.js +0 -1
- package/dist/client/assets/sections-editor-BEWC-c1n.js +0 -2
- package/dist/client/assets/seo-editor-Cr0IAZUG.js +0 -1
- package/dist/client/assets/settings-layout-nbprtkao.js +0 -1
- package/dist/client/assets/shell-controls-DmSPQaRT.js +0 -1
- package/dist/client/assets/shell-layout-DCFL_zE0.js +0 -1
- package/dist/client/assets/store-registry-B8K0dTh3.js +0 -2
- package/dist/client/assets/tab-id-BijBBRwE.js +0 -1
- package/dist/client/assets/toolbar-CoHzPWWi.js +0 -1
- package/dist/client/assets/toolbar-icon-button-BGQ8DzLo.js +0 -1
- package/dist/client/assets/use-deco-credits-BW-cf-qH.js +0 -1
- package/dist/client/assets/useInfiniteQuery-64uGdBMx.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DYsYorpe.js +0 -1
- package/dist/client/assets/variant-calendar-DNJKkwIK.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as K,c as re,b as ae,j as t,B as G,k as ge,p as ce,m as xe,E as Ye,F as De,d as Ne,u as Je,a as ke,D as Ze,I as et,G as tt,Z as nt,Y as st,o as ot,t as Q,K as it}from"./index-Dk9RGAqb.js";import{a as Te,b as ct,g as rt,e as lt}from"./extract-connection-data-ChU9AlhE.js";import{C as at}from"./collection-display-button-Bs1t2pp4.js";import{S as dt}from"./search-input-BI1enB-b.js";import{C as ut}from"./collection-tabs-B-9Urj68.js";import{C as ve,u as mt,a as Ae,g as gt}from"./connection-card-CfMynI7E.js";import{E as pt}from"./empty-state-CwB9YNml.js";import{P as pe}from"./index-D8ngUVkT.js";import{u as ft,D as ht}from"./use-delete-connection-DqznTHaH.js";import{u as Ce}from"./use-capability-DHlRnvUE.js";import{u as xt}from"./use-infinite-scroll-CbSN3uty.js";import{u as jt}from"./use-view-mode-CQpQIlsB.js";import{g as he}from"./connection-slug-eyAPH6o3.js";import{c as we,d as Ie,b as Pe,f as Le,g as Oe,e as Me,a as Fe,A as $e}from"./alert-dialog-DwnblylQ.js";import{n as je}from"./Tool02-DPXeBg9E.js";import{g as yt}from"./metadata-dUsYcpuu.js";import{b as Ue,h as Ve,a as ze,c as Ee,d as Be,e as Ke}from"./dialog-CzDwjrNV.js";import{D as St,a as Ct,c as vt,b as bt,d as _t,e as Dt,f as Nt}from"./drawer-CSHRJeTj.js";import{u as kt}from"./use-mobile-DQ8jManM.js";import{F as te,b as ne,c as se,d as oe,e as ie,a as be}from"./form-CJlgALpE.js";import{I as de}from"./input-C-gHIQip.js";import{S as Tt,a as At,b as wt,c as It,d as me}from"./select-Bd1WKGSJ.js";import{T as Pt}from"./textarea-CQzBh7SW.js";import{b as He,u as Lt}from"./use-connection-BsS-3rZB.js";import{a as Ot}from"./use-virtual-mcp-BP-M67aZ.js";import{u as Mt}from"./studio-tools-CFgWeCBk.js";import{s as Se}from"./Star01-lWHLfmir.js";import{s as Re}from"./Plus-CLG5QKCr.js";import{az as Ft,a as $t,S as Ut,c as Vt}from"./agent-icon-E6ioveGx.js";import{s as We}from"./XClose-CW0R6bEe.js";import{i as fe,a as _e,E as zt,c as Et,p as Bt,b as Kt,d as Ht}from"./connection-form-helpers-BABNaeU1.js";import{a as Rt}from"./authenticate-and-persist-oauth-iHWUIj8u.js";import{I as Wt}from"./integration-icon-DBUjxWMb.js";import{C as Xe}from"./checkbox-DsDzIgcJ.js";import{a as ue,D as Xt,c as Gt,b as qt}from"./dropdown-menu-CSgtqrA3.js";import{a as Qt}from"./DotsVertical-DKanPfz6.js";import{s as Ge}from"./Eye-SCLKEZSh.js";import{s as qe}from"./Trash01-CWIa_mDx.js";import"./use-mcp-client-Bzvvd0Df.js";import"./auth-C4POVeVe.js";import"./ArrowUp-DI1fyC1G.js";import"./Check-LKA0FKR0.js";import"./SwitchHorizontal01-Dw_LQc0f.js";import"./tooltip-xp77jFs4.js";import"./view-mode-toggle-Dn7I7z16.js";import"./badge-BbmHyS30.js";import"./SearchMd-DBj7HhoW.js";import"./use-registry-connections-C529xEPn.js";import"./use-organization-settings-zX_T-3XG.js";import"./useInfiniteQuery-64uGdBMx.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./card-DcA1Rwjs.js";import"./sidebar-DBzYJLC2.js";import"./LayoutLeft-Yz5NzG-w.js";import"./X-BYXAQs6v.js";import"./label-D9aEMZqo.js";import"./ChevronDown-B3fDqERa.js";import"./ChevronUp-Cm7VcWLZ.js";import"./AlertCircle-1e3-NcEA.js";import"./Tool01-B0759esA.js";import"./Settings02-BIGi-T7s.js";import"./ArrowRight-B-wHAJWT.js";import"./ArrowUpRight-BWyzrLQV.js";import"./TrendUp01-CYCVS1zr.js";import"./ZapSquare-DGe1cTc7.js";import"./ZoomOut-B-F-8cp0.js";import"./Users03-3lwc9liE.js";import"./CheckCircle-Dh-3VdHB.js";import"./ChevronRight-Dkp8mDOd.js";import"./Stars02-DpsxkqJO.js";import"./Copy01-uQh3Q5Fv.js";import"./Globe01-CEh6-y49.js";import"./FilterLines-13dE_TWB.js";import"./Globe04-B4VpGXlx.js";import"./HardDrive-DViLU95V.js";import"./Image01-CMEjSR3M.js";import"./Key01-CgioJ7nW.js";import"./XCircle-B3aYrCCW.js";import"./LinkExternal01-Di_tOfr7.js";import"./LogOut01-r12Fp93g.js";import"./Monitor01-C_dYkXdo.js";import"./Sun-tOsjvEis.js";import"./Package-R2sM0vCm.js";import"./Palette-CsQxyyrG.js";import"./Play-CVGtm9ao.js";import"./SearchLg-CkXJjhdf.js";import"./Shield01-ksb0VZpA.js";import"./Stars01-B3jznQQ4.js";import"./Upload01-CPD95nN4.js";import"./User01-NxrNjn_h.js";import"./Users01-DvtVVxdG.js";import"./Zap-CrMVm5NK.js";import"./mcp-oauth-Br5ozXBx.js";function Yt(s){const e=`deco-filters-${s}`,[n,g]=K.useState(()=>{try{const c=globalThis.localStorage?.getItem(e);if(c)return JSON.parse(c)}catch(c){console.error("Failed to parse stored filters:",c)}return[]});return[n,c=>{g(c);try{globalThis.localStorage?.setItem(e,JSON.stringify(c))}catch(o){console.error("Failed to save filters:",o)}}]}function Jt(s){const e=re.c(7),[n,g]=K.useState(s),[l,c]=K.useState(s?"desc":null);let o;e[0]!==l||e[1]!==n?(o=a=>{n!==a?(g(a),c("asc")):l==="asc"?c("desc"):l==="desc"&&(g(void 0),c(null))},e[0]=l,e[1]=n,e[2]=o):o=e[2];const r=o;let d;return e[3]!==r||e[4]!==l||e[5]!==n?(d={sortKey:n,sortDirection:l,handleSort:r},e[3]=r,e[4]=l,e[5]=n,e[6]=d):d=e[6],d}function Zt(s){const e=re.c(20),{namespace:n,resource:g,defaultSortKey:l,defaultViewMode:c}=s,o=l===void 0?"title":l,r=c===void 0?"table":c,[d,a]=K.useState(""),N=K.useDeferredValue(d),h=`${n}-${g}`,[p,v]=Yt(h),x=`studio-${g}-filter-visible-${n}`;let _;e[0]!==x?(_=()=>globalThis.localStorage?.getItem(x)==="true",e[0]=x,e[1]=_):_=e[1];const[m,S]=K.useState(_);let j;e[2]!==x?(j=U=>{S(U),globalThis.localStorage?.setItem(x,String(U))},e[2]=x,e[3]=j):j=e[3];const D=j;let b;e[4]!==m||e[5]!==D?(b=()=>{D(!m)},e[4]=m,e[5]=D,e[6]=b):b=e[6];const k=b,[i,T]=jt(`studio-${g}-${n}`,r),{sortKey:L,sortDirection:$,handleSort:A}=Jt(o),V=L;let O;return e[7]!==m||e[8]!==p||e[9]!==A||e[10]!==d||e[11]!==N||e[12]!==D||e[13]!==v||e[14]!==T||e[15]!==$||e[16]!==V||e[17]!==k||e[18]!==i?(O={search:d,searchTerm:N,setSearch:a,filters:p,setFilters:v,filterBarVisible:m,setFilterBarVisible:D,toggleFilterBar:k,viewMode:i,setViewMode:T,sortKey:V,sortDirection:$,handleSort:A},e[7]=m,e[8]=p,e[9]=A,e[10]=d,e[11]=N,e[12]=D,e[13]=v,e[14]=T,e[15]=$,e[16]=V,e[17]=k,e[18]=i,e[19]=O):O=e[19],O}function en(s){const e=re.c(35),{open:n,onOpenChange:g,count:l,onConfirm:c}=s,o=ae(),r=l!==1?"s":"";let d;e[0]!==l||e[1]!==o||e[2]!==r?(d=o("orgs.bulkDeleteDialog.deleteTitle",{count:l,plural:r}),e[0]=l,e[1]=o,e[2]=r,e[3]=d):d=e[3];let a;e[4]!==d?(a=t.jsx(we,{children:d}),e[4]=d,e[5]=a):a=e[5];const N=l!==1?"s":"";let h;e[6]!==o||e[7]!==N?(h=o("orgs.bulkDeleteDialog.deleteDescription",{plural:N}),e[6]=o,e[7]=N,e[8]=h):h=e[8];let p;e[9]!==h?(p=t.jsx(Ie,{children:h}),e[9]=h,e[10]=p):p=e[10];let v;e[11]!==a||e[12]!==p?(v=t.jsxs(Pe,{children:[a,p]}),e[11]=a,e[12]=p,e[13]=v):v=e[13];let x;e[14]!==o?(x=o("orgs.bulkDeleteDialog.cancelButton"),e[14]=o,e[15]=x):x=e[15];let _;e[16]!==x?(_=t.jsx(Le,{children:x}),e[16]=x,e[17]=_):_=e[17];const m=l!==1?"s":"";let S;e[18]!==l||e[19]!==o||e[20]!==m?(S=o("orgs.bulkDeleteDialog.deleteButton",{count:l,plural:m}),e[18]=l,e[19]=o,e[20]=m,e[21]=S):S=e[21];let j;e[22]!==c||e[23]!==S?(j=t.jsx(Oe,{onClick:c,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:S}),e[22]=c,e[23]=S,e[24]=j):j=e[24];let D;e[25]!==j||e[26]!==_?(D=t.jsxs(Me,{children:[_,j]}),e[25]=j,e[26]=_,e[27]=D):D=e[27];let b;e[28]!==D||e[29]!==v?(b=t.jsxs(Fe,{children:[v,D]}),e[28]=D,e[29]=v,e[30]=b):b=e[30];let k;return e[31]!==g||e[32]!==n||e[33]!==b?(k=t.jsx($e,{open:n,onOpenChange:g,children:b}),e[31]=g,e[32]=n,e[33]=b,e[34]=k):k=e[34],k}function tn(s){return s._registryId?.includes("community-registry")===!0}function nn(s){const e=re.c(83),{item:n,canManage:g,allConnections:l,connectedAppNames:c,connectingItemId:o,onNavigateConnected:r,onConnect:d}=s,a=ae(),[N,h]=K.useState(!1),[p,v]=K.useState(null);let x,_;e[0]!==c||e[1]!==n?(x=Te(n)??"",_=c.has(x),e[0]=c,e[1]=n,e[2]=x,e[3]=_):(x=e[2],_=e[3]);const m=_;let S;e[4]!==n._meta?(S=yt(n._meta),e[4]=n._meta,e[5]=S):S=e[5];const j=S,D=j?.friendlyName||j?.friendly_name||n.server?.title||n.title||n.server?.name||n.name||n.id||"",b=n.server?.description||n.description||null;let k;e[6]!==n.server?.icons?.[0]?.src||e[7]!==n.server?.repository?(k=n.server?.icons?.[0]?.src||ct(n.server?.repository)||null,e[6]=n.server?.icons?.[0]?.src,e[7]=n.server?.repository,e[8]=k):k=e[8];const i=k;let T;if(e[9]!==l||e[10]!==x){let E;e[12]!==x?(E=le=>le.connection_type!=="VIRTUAL"&&le.app_name===x,e[12]=x,e[13]=E):E=e[13],T=l.filter(E),e[9]=l,e[10]=x,e[11]=T}else T=e[11];const L=T;let $;e[14]!==n?($=tn(n),e[14]=n,e[15]=$):$=e[15];const A=$;let V,O;e[16]!==L||e[17]!==g||e[18]!==A||e[19]!==m||e[20]!==n||e[21]!==d||e[22]!==r?(V=()=>{if(m){const E=L[0];E&&r(E);return}g&&O()},O=()=>{A?(v("connect"),h(!0)):d(n)},e[16]=L,e[17]=g,e[18]=A,e[19]=m,e[20]=n,e[21]=d,e[22]=r,e[23]=V,e[24]=O):(V=e[23],O=e[24]);let U;e[25]!==n||e[26]!==d||e[27]!==p?(U=()=>{ce("connections_community_warning_confirmed",{registry_item_id:n.id}),h(!1),p==="connect"&&d(n),v(null)},e[25]=n,e[26]=d,e[27]=p,e[28]=U):U=e[28];const B=U;let I;e[29]!==b||e[30]!==i||e[31]!==D?(I={title:D,description:b,icon:i},e[29]=b,e[30]=i,e[31]=D,e[32]=I):I=e[32];let q;e[33]===Symbol.for("react.memo_cache_sentinel")?(q=t.jsx(je,{}),e[33]=q):q=e[33];let Y;e[34]!==A||e[35]!==n._sourceIcon?(Y=A&&n._sourceIcon&&t.jsx("img",{src:n._sourceIcon,alt:"Community",className:"size-4 rounded-sm object-contain"}),e[34]=A,e[35]=n._sourceIcon,e[36]=Y):Y=e[36];let y;e[37]!==g||e[38]!==o||e[39]!==O||e[40]!==m||e[41]!==n.id||e[42]!==a?(y=m?t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:a("orgs.catalogItemCard.connected")}):g&&t.jsx(G,{variant:"outline",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:o!==null,onClick:E=>{E.stopPropagation(),O()},children:o===n.id?t.jsx(ge,{size:14,className:"animate-spin"}):a("orgs.catalogItemCard.connect")}),e[37]=g,e[38]=o,e[39]=O,e[40]=m,e[41]=n.id,e[42]=a,e[43]=y):y=e[43];let w;e[44]!==y||e[45]!==Y?(w=t.jsxs("div",{className:"flex items-center gap-2",children:[Y,y]}),e[44]=y,e[45]=Y,e[46]=w):w=e[46];let z;e[47]!==V||e[48]!==w||e[49]!==I?(z=t.jsx(ve,{connection:I,fallbackIcon:q,onClick:V,headerActionsAlwaysVisible:!0,headerActions:w}),e[47]=V,e[48]=w,e[49]=I,e[50]=z):z=e[50];let R;e[51]!==a?(R=a("orgs.catalogItemCard.communityMcpServerTitle"),e[51]=a,e[52]=R):R=e[52];let H;e[53]!==R?(H=t.jsx(we,{children:R}),e[53]=R,e[54]=H):H=e[54];let C;e[55]!==a?(C=a("orgs.catalogItemCard.communityMcpServerDescription"),e[55]=a,e[56]=C):C=e[56];let M;e[57]!==C?(M=t.jsx(Ie,{children:C}),e[57]=C,e[58]=M):M=e[58];let P;e[59]!==H||e[60]!==M?(P=t.jsxs(Pe,{children:[H,M]}),e[59]=H,e[60]=M,e[61]=P):P=e[61];let J;e[62]!==a?(J=a("orgs.catalogItemCard.cancel"),e[62]=a,e[63]=J):J=e[63];let ee;e[64]!==J?(ee=t.jsx(Le,{children:J}),e[64]=J,e[65]=ee):ee=e[65];let Z;e[66]!==a?(Z=a("orgs.catalogItemCard.continue"),e[66]=a,e[67]=Z):Z=e[67];let u;e[68]!==B||e[69]!==Z?(u=t.jsx(Oe,{onClick:B,children:Z}),e[68]=B,e[69]=Z,e[70]=u):u=e[70];let f;e[71]!==ee||e[72]!==u?(f=t.jsxs(Me,{children:[ee,u]}),e[71]=ee,e[72]=u,e[73]=f):f=e[73];let F;e[74]!==P||e[75]!==f?(F=t.jsxs(Fe,{children:[P,f]}),e[74]=P,e[75]=f,e[76]=F):F=e[76];let W;e[77]!==N||e[78]!==F?(W=t.jsx($e,{open:N,onOpenChange:h,children:F}),e[77]=N,e[78]=F,e[79]=W):W=e[79];let X;return e[80]!==z||e[81]!==W?(X=t.jsxs(t.Fragment,{children:[z,W]}),e[80]=z,e[81]=W,e[82]=X):X=e[82],X}function Qe(s){const e=re.c(8),{selectionMode:n,children:g}=s,l=n?"w-8 opacity-100":"w-0 opacity-0 group-hover:w-8 group-hover:opacity-100";let c;e[0]!==l?(c=xe("overflow-hidden transition-all duration-150 ease-out",l),e[0]=l,e[1]=c):c=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Xt,{asChild:!0,children:t.jsx(G,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:on,children:t.jsx(Qt,{size:20})})}),e[2]=o):o=e[2];let r;e[3]!==g?(r=t.jsxs(Gt,{children:[o,t.jsx(qt,{align:"end",onClick:sn,children:g})]}),e[3]=g,e[4]=r):r=e[4];let d;return e[5]!==c||e[6]!==r?(d=t.jsx("div",{className:c,children:r}),e[5]=c,e[6]=r,e[7]=d):d=e[7],d}function sn(s){return s.stopPropagation()}function on(s){return s.stopPropagation()}function cn(s){const e=re.c(56),{group:n,onOpen:g,selectionMode:l,selectedIds:c,onToggleSelect:o}=s,r=ae();let d;if(e[0]!==n.connections||e[1]!==c){let I;e[3]!==c?(I=q=>c.has(q.id),e[3]=c,e[4]=I):I=e[4],d=n.connections.every(I),e[0]=n.connections,e[1]=c,e[2]=d}else d=e[2];const a=d;let N;if(e[5]!==n.connections||e[6]!==c){let I;e[8]!==c?(I=q=>c.has(q.id),e[8]=c,e[9]=I):I=e[9],N=n.connections.some(I),e[5]=n.connections,e[6]=c,e[7]=N}else N=e[7];const h=N;let p;e[10]!==a||e[11]!==n.connections||e[12]!==o||e[13]!==c?(p=()=>{for(const I of n.connections)a?c.has(I.id)&&o(I.id):c.has(I.id)||o(I.id)},e[10]=a,e[11]=n.connections,e[12]=o,e[13]=c,e[14]=p):p=e[14];const v=p,x=n.title,_=n.icon;let m;e[15]!==n.connections.length||e[16]!==r?(m=r("orgs.connectionSelectionUi.instancesCount",{count:n.connections.length}),e[15]=n.connections.length,e[16]=r,e[17]=m):m=e[17];let S;e[18]!==n.icon||e[19]!==n.title||e[20]!==m?(S={title:x,icon:_,description:m},e[18]=n.icon,e[19]=n.title,e[20]=m,e[21]=S):S=e[21];let j;e[22]!==g||e[23]!==l||e[24]!==v?(j=()=>l?v():g(),e[22]=g,e[23]=l,e[24]=v,e[25]=j):j=e[25];const D=l&&a&&"ring-2 ring-primary",b=l&&h&&!a&&"ring-1 ring-primary/50";let k;e[26]!==b||e[27]!==D?(k=xe(D,b),e[26]=b,e[27]=D,e[28]=k):k=e[28];let i;e[29]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(je,{}),e[29]=i):i=e[29];let T;e[30]!==a||e[31]!==n.connections.length||e[32]!==l||e[33]!==h||e[34]!==r||e[35]!==v?(T=l?t.jsx(Xe,{checked:a?!0:h?"indeterminate":!1,onCheckedChange:v}):t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:r("orgs.connectionSelectionUi.connected")}),t.jsxs("span",{className:"text-xs text-muted-foreground font-normal tabular-nums",children:["x",n.connections.length]})]}),e[30]=a,e[31]=n.connections.length,e[32]=l,e[33]=h,e[34]=r,e[35]=v,e[36]=T):T=e[36];let L;e[37]!==g?(L=I=>{I.stopPropagation(),g()},e[37]=g,e[38]=L):L=e[38];let $;e[39]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(Ge,{size:16}),e[39]=$):$=e[39];let A;e[40]!==r?(A=r("orgs.connectionSelectionUi.open"),e[40]=r,e[41]=A):A=e[41];let V;e[42]!==L||e[43]!==A?(V=t.jsxs(ue,{onClick:L,children:[$,A]}),e[42]=L,e[43]=A,e[44]=V):V=e[44];let O;e[45]!==l||e[46]!==V?(O=t.jsx(Qe,{selectionMode:l,children:V}),e[45]=l,e[46]=V,e[47]=O):O=e[47];let U;e[48]!==T||e[49]!==O?(U=t.jsxs("div",{className:"flex items-center gap-1",children:[T,O]}),e[48]=T,e[49]=O,e[50]=U):U=e[50];let B;return e[51]!==k||e[52]!==U||e[53]!==S||e[54]!==j?(B=t.jsx(t.Fragment,{children:t.jsx(ve,{connection:S,onClick:j,className:k,fallbackIcon:i,headerActionsAlwaysVisible:!0,headerActions:U})}),e[51]=k,e[52]=U,e[53]=S,e[54]=j,e[55]=B):B=e[55],B}function rn(s){const e=re.c(36),{connection:n,isSelected:g,selectionMode:l,canManage:c,canManageAgents:o,onToggleSelect:r,onOpen:d,onToggleStatus:a,onDelete:N}=s,h=ae();let p;e[0]!==g||e[1]!==r||e[2]!==l||e[3]!==h?(p=l?t.jsx(Xe,{checked:g,onCheckedChange:r,onClick:ln}):t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:h("orgs.connectionSelectionUi.connected")}),e[0]=g,e[1]=r,e[2]=l,e[3]=h,e[4]=p):p=e[4];let v;e[5]!==d?(v=i=>{i.stopPropagation(),d()},e[5]=d,e[6]=v):v=e[6];let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(Ge,{size:16}),e[7]=x):x=e[7];let _;e[8]!==h?(_=h("orgs.connectionSelectionUi.open"),e[8]=h,e[9]=_):_=e[9];let m;e[10]!==v||e[11]!==_?(m=t.jsxs(ue,{onClick:v,children:[x,_]}),e[10]=v,e[11]=_,e[12]=m):m=e[12];let S;e[13]!==c||e[14]!==o||e[15]!==r||e[16]!==h?(S=(c||o)&&t.jsxs(ue,{onClick:i=>{i.stopPropagation(),r()},children:[t.jsx(Ft,{size:16}),h("orgs.connectionSelectionUi.select")]}),e[13]=c,e[14]=o,e[15]=r,e[16]=h,e[17]=S):S=e[17];let j;e[18]!==c||e[19]!==n||e[20]!==a||e[21]!==h?(j=c&&(n.status==="active"?t.jsxs(ue,{onClick:i=>{i.stopPropagation(),a("inactive")},children:[t.jsx($t,{size:16}),h("orgs.connectionSelectionUi.disable")]}):t.jsxs(ue,{onClick:i=>{i.stopPropagation(),a("active")},children:[t.jsx(Ut,{size:16}),h("orgs.connectionSelectionUi.enable")]})),e[18]=c,e[19]=n,e[20]=a,e[21]=h,e[22]=j):j=e[22];let D;e[23]!==c||e[24]!==N||e[25]!==h?(D=c&&t.jsxs(ue,{variant:"destructive",onClick:i=>{i.stopPropagation(),N()},children:[t.jsx(qe,{size:16}),h("orgs.connectionSelectionUi.delete")]}),e[23]=c,e[24]=N,e[25]=h,e[26]=D):D=e[26];let b;e[27]!==l||e[28]!==m||e[29]!==S||e[30]!==j||e[31]!==D?(b=t.jsxs(Qe,{selectionMode:l,children:[m,S,j,D]}),e[27]=l,e[28]=m,e[29]=S,e[30]=j,e[31]=D,e[32]=b):b=e[32];let k;return e[33]!==p||e[34]!==b?(k=t.jsxs("div",{className:"flex items-center gap-1",children:[p,b]}),e[33]=p,e[34]=b,e[35]=k):k=e[35],k}function ln(s){return s.stopPropagation()}function an(s){const e=re.c(29),{count:n,total:g,canManage:l,canManageAgents:c,onSelectAll:o,onDeselectAll:r,onDelete:d,onAddToAgent:a,onToggleStatus:N,onCancel:h}=s,p=ae();if(n===0)return null;let v;e[0]!==n||e[1]!==p?(v=p("orgs.connectionSelectionUi.selectedCount",{count:n}),e[0]=n,e[1]=p,e[2]=v):v=e[2];let x;e[3]!==v?(x=t.jsx("div",{className:"text-xs text-muted-foreground pr-1 tabular-nums",children:v}),e[3]=v,e[4]=x):x=e[4];let _;e[5]!==n||e[6]!==r||e[7]!==o||e[8]!==p||e[9]!==g?(_=n<g?t.jsx(G,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:o,children:p("orgs.connectionSelectionUi.selectAll",{total:g})}):t.jsx(G,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:r,children:p("orgs.connectionSelectionUi.clearSelection")}),e[5]=n,e[6]=r,e[7]=o,e[8]=p,e[9]=g,e[10]=_):_=e[10];let m;e[11]!==c||e[12]!==a||e[13]!==p?(m=c&&t.jsxs(G,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:a,children:[t.jsx(Re,{size:13}),p("orgs.connectionSelectionUi.addToAgent")]}),e[11]=c,e[12]=a,e[13]=p,e[14]=m):m=e[14];let S;e[15]!==l||e[16]!==d||e[17]!==N||e[18]!==p?(S=l&&t.jsxs(t.Fragment,{children:[t.jsx(G,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>N("active"),children:p("orgs.connectionSelectionUi.enable")}),t.jsx(G,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>N("inactive"),children:p("orgs.connectionSelectionUi.disable")}),t.jsxs(G,{variant:"destructive",size:"sm",className:"h-7 text-xs px-2",onClick:d,children:[t.jsx(qe,{size:13}),p("orgs.connectionSelectionUi.delete")]})]}),e[15]=l,e[16]=d,e[17]=N,e[18]=p,e[19]=S):S=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(We,{size:13}),e[20]=j):j=e[20];let D;e[21]!==h?(D=t.jsx(G,{variant:"ghost",size:"sm",className:"h-7 text-xs px-2",onClick:h,children:j}),e[21]=h,e[22]=D):D=e[22];let b;return e[23]!==x||e[24]!==_||e[25]!==m||e[26]!==S||e[27]!==D?(b=t.jsx("div",{className:"fixed bottom-4 left-1/2 z-50 -translate-x-1/2",children:t.jsxs("div",{className:"rounded-xl border border-border bg-background/95 shadow-lg backdrop-blur px-3 py-2 flex items-center gap-2",children:[x,_,m,S,D]})}),e[23]=x,e[24]=_,e[25]=m,e[26]=S,e[27]=D,e[28]=b):b=e[28],b}function dn(s){const e=re.c(45),{open:n,onOpenChange:g,agents:l,onConfirm:c}=s,o=ae(),[r,d]=K.useState(null);let a;e[0]!==o?(a=o("orgs.connectionSelectionUi.addToAgentTitle"),e[0]=o,e[1]=a):a=e[1];let N;e[2]!==a?(N=t.jsx(Ue,{children:a}),e[2]=a,e[3]=N):N=e[3];let h;e[4]!==o?(h=o("orgs.connectionSelectionUi.addToAgentDescription"),e[4]=o,e[5]=h):h=e[5];let p;e[6]!==h?(p=t.jsx(Ve,{children:h}),e[6]=h,e[7]=p):p=e[7];let v;e[8]!==N||e[9]!==p?(v=t.jsxs(ze,{children:[N,p]}),e[8]=N,e[9]=p,e[10]=v):v=e[10];let x;e[11]!==l||e[12]!==r||e[13]!==o?(x=l.length===0?t.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:o("orgs.connectionSelectionUi.noAgentsFound")}):l.map(A=>t.jsxs("button",{type:"button",onClick:()=>d(A.id),className:xe("flex items-center gap-3 w-full rounded-md px-3 py-2 text-left transition-colors",r===A.id?"bg-primary/10 ring-1 ring-primary":"hover:bg-muted/50"),children:[t.jsx(Wt,{icon:A.icon,name:A.title,size:"sm",className:"shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:A.title}),A.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:A.description})]})]},A.id)),e[11]=l,e[12]=r,e[13]=o,e[14]=x):x=e[14];let _;e[15]!==x?(_=t.jsx("div",{className:"max-h-60 overflow-auto py-2 space-y-1",children:x}),e[15]=x,e[16]=_):_=e[16];let m;e[17]!==g?(m=()=>g(!1),e[17]=g,e[18]=m):m=e[18];let S;e[19]!==o?(S=o("orgs.connectionSelectionUi.cancel"),e[19]=o,e[20]=S):S=e[20];let j;e[21]!==m||e[22]!==S?(j=t.jsx(G,{variant:"outline",onClick:m,children:S}),e[21]=m,e[22]=S,e[23]=j):j=e[23];const D=!r;let b;e[24]!==c||e[25]!==g||e[26]!==r?(b=()=>{r&&(c(r),g(!1),d(null))},e[24]=c,e[25]=g,e[26]=r,e[27]=b):b=e[27];let k;e[28]!==o?(k=o("orgs.connectionSelectionUi.add"),e[28]=o,e[29]=k):k=e[29];let i;e[30]!==D||e[31]!==b||e[32]!==k?(i=t.jsx(G,{disabled:D,onClick:b,children:k}),e[30]=D,e[31]=b,e[32]=k,e[33]=i):i=e[33];let T;e[34]!==j||e[35]!==i?(T=t.jsxs(Ee,{children:[j,i]}),e[34]=j,e[35]=i,e[36]=T):T=e[36];let L;e[37]!==T||e[38]!==v||e[39]!==_?(L=t.jsxs(Be,{className:"sm:max-w-[400px]",children:[v,_,T]}),e[37]=T,e[38]=v,e[39]=_,e[40]=L):L=e[40];let $;return e[41]!==g||e[42]!==n||e[43]!==L?($=t.jsx(Ke,{open:n,onOpenChange:g,children:L}),e[41]=g,e[42]=n,e[43]=L,e[44]=$):$=e[44],$}function un({listState:s,activeTab:e,typeFilter:n,statusFilter:g,registryFilter:l,enabledRegistries:c}){const o=ae(),{org:r}=De(),d=ot(),a=Ne(),{data:N}=ke.useSession(),h=He(),p=Lt(s),v=ft(),{granted:x}=Ce("connections:manage"),{granted:_}=Ce("agents:manage"),[m,S]=K.useState(new Set),j=m.size>0,[D,b]=K.useState(!1),[k,i]=K.useState(!1),[T,L]=K.useState(null),$=Ot(),A=p.filter(u=>!(n!=="ALL"&&u.connection_type!==n||g!=="ALL"&&u.status!==g)),V=gt(A),O=u=>{S(f=>{const F=new Set(f);return F.has(u)?F.delete(u):F.add(u),F})},U=()=>{S(new Set)},B=Ae(c,s.searchTerm),I=B.items,q=xt(B.loadMore,B.hasMore,B.isLoadingMore),Y=new Set(p.filter(u=>u.app_name).map(u=>u.app_name)),y=l==="ALL"||c.some(u=>u.id===l)?l:"ALL",w=s.search.length>0,z=e==="all"||w?I.filter(u=>{if(y!=="ALL"&&u._registryId!==y)return!1;if(w){const f=Te(u);if(f&&Y.has(f))return!1}return!0}):[],R=e==="connected"||w?V:[],H=async u=>{if(!(!r||!N?.user?.id)){ce("connection_add_clicked",{action:"connect_new",registry_item_id:u.id,source:"connections_page"}),L(u.id);try{const f=lt(u,r.id,N.user.id,{remoteIndex:0}),F=f.connection_type==="STDIO",W=!!f.connection_url,X=F&&f.connection_headers&&typeof f.connection_headers=="object"&&"command"in f.connection_headers;if(!W&&!X){Q.error(o("orgs.connections.cannotConnectNoMethod")),L(null);return}const{id:E}=await h.create.mutateAsync(f),le=await Rt({connectionId:E,orgId:r.id,orgSlug:r.slug,persistFallback:ye=>h.update.mutateAsync({id:E,data:{connection_token:ye}}).then(()=>{})});if(le.ran&&!le.ok){ce("connection_oauth_failed",{connection_id:E,flow:"connections_page_connect",error:le.error??"no_token"}),Q.error(o("orgs.connections.authenticationFailed",{error:le.error??"no token received"}));return}if(le.ran){ce("connection_oauth_succeeded",{connection_id:E,flow:"connections_page_connect"});const ye=new URL(`/api/${r.slug}/mcp/${E}`,window.location.origin);await d.invalidateQueries({queryKey:it.isMCPAuthenticated(ye.href,null)}),M(),Q.success(o("orgs.connections.authenticationSuccessful"))}Q.success(o("orgs.connections.connectedSuccessfully"))}catch(f){Q.error(o("orgs.connections.failedToConnect",{error:f instanceof Error?f.message:String(f)}))}finally{L(null)}}},C=Mt(),M=()=>{d.invalidateQueries({predicate:u=>{const f=u.queryKey;return f[1]===r.id&&f[3]==="collection"&&f[4]==="CONNECTIONS"}})},P=async()=>{b(!1);const u=[...m];ce("connections_bulk_delete",{count:u.length});let f=0;for(const F of u)try{await C.call("COLLECTION_CONNECTIONS_DELETE",{id:F,force:!0}),f++}catch{}M(),Q.success(o("orgs.connections.deletedConnections",{count:f})),U()},J=async(u,f)=>{try{await h.update.mutateAsync({id:u,data:{status:f}}),M(),Q.success(o(f==="active"?"orgs.connections.connectionEnabled":"orgs.connections.connectionDisabled"))}catch{Q.error(o("orgs.connections.failedToUpdateConnection"))}},ee=async u=>{const f=[...m];ce("connections_bulk_status_toggled",{count:f.length,to_status:u});let F=0;for(const W of f)try{await h.update.mutateAsync({id:W,data:{status:u}}),F++}catch{}M(),Q.success(u==="active"?o("orgs.connections.enabledConnections",{count:F}):o("orgs.connections.disabledConnections",{count:F})),U()},Z=async u=>{const f=$.find(X=>X.id===u);if(!f)return;ce("connections_bulk_add_to_agent",{agent_id:u,count:m.size});const F=new Set(f.connections.map(X=>X.connection_id)),W=[...m].filter(X=>!F.has(X)).map(X=>({connection_id:X,selected_tools:null,selected_resources:null,selected_prompts:null}));if(W.length===0){Q.info(o("orgs.connections.allConnectionsAlreadyInAgent"));return}try{await C.call("COLLECTION_VIRTUAL_MCP_UPDATE",{id:u,data:{connections:[...f.connections,...W]}}),d.invalidateQueries({predicate:X=>{const E=X.queryKey;return E[1]===r.id&&E[3]==="collection"&&E[4]==="VIRTUAL_MCP"}}),Q.success(o("orgs.connections.addedConnectionsToAgent",{count:W.length,agentTitle:f.title})),U()}catch{Q.error(o("orgs.connections.failedToAddConnectionsToAgent"))}};return t.jsxs(t.Fragment,{children:[t.jsx(ht,{...v}),t.jsx(en,{open:D,onOpenChange:b,count:m.size,onConfirm:P}),t.jsx(dn,{open:k,onOpenChange:i,agents:$,onConfirm:Z}),B.isInitialLoading&&e==="all"?t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ge,{size:32,className:"animate-spin text-muted-foreground"})}):t.jsx("div",{children:(w?z.length===0&&A.length===0:e==="all"?z.length===0:A.length===0)?t.jsx(pt,{image:t.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),title:o("orgs.connections.noConnectionsFound"),description:s.search?o("orgs.connections.noConnectionsMatchSearch",{search:s.search}):o(x?"orgs.connections.createConnectionToGetStarted":"orgs.connections.askAdminToAddConnection")}):t.jsxs("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:[R.map(u=>{if(u.type==="group")return t.jsx(cn,{group:u,onOpen:()=>{a({to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:u.key}})},selectionMode:j,selectedIds:m,onToggleSelect:O},u.key);const f=u.connection,F=m.has(f.id);return t.jsx(ve,{connection:f,fallbackIcon:t.jsx(je,{}),onClick:()=>j?O(f.id):a({to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:he(f)}}),className:xe(F&&"ring-2 ring-primary bg-primary/5"),headerActionsAlwaysVisible:!0,headerActions:t.jsx(rn,{connection:f,isSelected:F,selectionMode:j,canManage:x,canManageAgents:_,onToggleSelect:()=>O(f.id),onOpen:()=>a({to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:he(f)}}),onToggleStatus:W=>J(f.id,W),onDelete:()=>v.requestDelete(f)})},f.id)}),z.map(u=>t.jsx(nn,{item:u,canManage:x,allConnections:p,connectedAppNames:Y,connectingItemId:T,onNavigateConnected:f=>a({to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:he(f)}}),onConnect:H},`catalog-${u._registryId}:${u.id}`)),(e==="all"||w)&&c.length>0&&t.jsx("div",{ref:q,className:"col-span-full h-4"}),(e==="all"||w)&&B.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(ge,{size:24,className:"animate-spin text-muted-foreground"})})]})}),j&&t.jsx(an,{count:m.size,total:A.length,canManage:x,canManageAgents:_,onSelectAll:()=>{S(new Set(A.map(u=>u.id)))},onDeselectAll:()=>S(new Set),onDelete:()=>b(!0),onAddToAgent:()=>i(!0),onToggleStatus:ee,onCancel:U})]})}function mn(){const s=ae(),{org:e}=De(),n=Ne(),g=Je({strict:!1}),{data:l}=ke.useSession(),{stdioEnabled:c}=Ze(),o=kt(),{granted:r}=Ce("connections:manage"),d=Zt({namespace:e.slug,resource:"connections"}),a=He(),[N,h]=et(tt.connectionsTab(e.slug),y=>g.tab==="all"||g.tab==="connected"?g.tab:y??"all"),[p,v]=K.useState("ALL"),[x,_]=K.useState("ALL"),[m,S]=K.useState("ALL"),j=mt(),b=Ae(j,d.searchTerm).items,k=d.search!==d.searchTerm,i=nt({resolver:st(Et),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),T=i.watch("ui_type"),L=i.watch("connection_url"),$=i.watch("npx_package"),A=fe({uiType:T,connectionUrl:L??"",npxPackage:$??""})??_e({uiType:T,connectionUrl:L??"",registryItems:b}),V=r&&g.action==="create",O=()=>{ce("connections_custom_dialog_opened",{source:"connections_page"}),n({to:"/$org/settings/connections",params:{org:e.slug},search:{action:"create"}})},U=()=>{n({to:"/$org/settings/connections",params:{org:e.slug},search:{}})},B=async y=>{let w,z=null,R=null,H=null;y.ui_type==="NPX"?(w="STDIO",z="",H=Kt(y.npx_package||"",y.env_vars||[])):y.ui_type==="STDIO"?(w="STDIO",z="",H=Ht(y.stdio_command||"",y.stdio_args||"",y.stdio_cwd,y.env_vars||[])):(w=y.ui_type,z=y.connection_url||"",R=y.connection_token||null);const C=rt("conn");ce("connection_custom_created",{connection_type:w,ui_type:y.ui_type}),await a.create.mutateAsync({id:C,title:y.title,description:y.description||null,connection_type:w,connection_url:z,connection_token:R,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:l?.user?.id||"system",organization_id:e.id,icon:y.icon??null,app_name:null,app_id:null,connection_headers:H,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),U(),i.reset(),n({to:"/$org/settings/connections/$appSlug",params:{org:e.slug,appSlug:he({app_name:null,connection_url:z,title:y.title,id:C})}})},I=y=>{y||(V&&U(),i.reset())},q=y=>{const w=y.trim();if(!w)return;const z=!!i.formState.dirtyFields.title,R=!!i.formState.dirtyFields.description,H=!!i.formState.dirtyFields.env_vars,C=P=>{if(P&&(!z&&!i.getValues("title").trim()&&P.title&&i.setValue("title",P.title,{shouldDirty:!1}),!R&&!(i.getValues("description")??"").trim()&&P.description&&i.setValue("description",P.description,{shouldDirty:!1}),!H&&P.envVarKeys?.length)){const J=i.getValues("env_vars")??[],ee=new Set(J.map(u=>u.key)),Z=P.envVarKeys.filter(u=>!ee.has(u));Z.length>0&&i.setValue("env_vars",[...J,...Z.map(u=>({key:u,value:""}))],{shouldDirty:!0})}},M=Bt(w);if(M&&c){i.setValue("ui_type","NPX",{shouldDirty:!0}),i.setValue("npx_package",M.packageName,{shouldDirty:!0}),i.setValue("connection_url","",{shouldDirty:!0}),i.setValue("connection_token",null,{shouldDirty:!0}),C(fe({uiType:"NPX",npxPackage:M.packageName}));return}if(w.startsWith("http://")||w.startsWith("https://")){const P=T==="HTTP"||T==="SSE"||T==="Websocket"?T:"HTTP";i.setValue("ui_type",P,{shouldDirty:!0}),i.setValue("connection_url",w,{shouldDirty:!0}),C(fe({uiType:P,connectionUrl:w})??_e({uiType:P,connectionUrl:w,registryItems:b}));return}T==="NPX"&&C(fe({uiType:"NPX",npxPackage:w}))},Y=r?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(G,{variant:"outline",onClick:O,children:[t.jsx(Re,{size:14,className:"sm:hidden"}),t.jsx("span",{className:"hidden sm:inline",children:s("orgs.connections.customConnection")})]})}):null;return t.jsx(t.Fragment,{children:t.jsxs(pe,{children:[(()=>{const y=s("orgs.connections.createConnection"),w=s("orgs.connections.createConnectionDescription"),z=i.formState.isSubmitting?s("orgs.connections.saving"):s("orgs.connections.createConnection"),R=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(te,{control:i.control,name:"ui_type",render:({field:C})=>t.jsxs(ne,{children:[t.jsx(se,{children:s("orgs.connections.type")}),t.jsxs(Tt,{value:C.value,onValueChange:C.onChange,children:[t.jsx(oe,{children:t.jsx(At,{children:t.jsx(wt,{})})}),t.jsxs(It,{children:[t.jsx(me,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Se,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(me,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Se,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(me,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Se,{className:"w-4 h-4"}),"Websocket"]})}),c&&t.jsxs(t.Fragment,{children:[t.jsx(me,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(je,{className:"w-4 h-4"}),s("orgs.connections.npxPackage")]})}),t.jsx(me,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Vt,{className:"w-4 h-4"}),s("orgs.connections.customCommand")]})})]})]})]}),t.jsx(ie,{})]})}),T==="NPX"&&t.jsx(te,{control:i.control,name:"npx_package",render:({field:C})=>t.jsxs(ne,{children:[t.jsx(se,{children:s("orgs.connections.npmPackage")}),t.jsx(oe,{children:t.jsx(de,{placeholder:s("orgs.connections.npmPackagePlaceholder"),...C,value:C.value??"",onPaste:M=>{const P=M.clipboardData.getData("text");P&&(M.preventDefault(),i.setValue("npx_package",P.trim(),{shouldDirty:!0}),q(P))},onBlur:M=>{q(M.target.value),C.onBlur()}})}),t.jsx(ie,{})]})}),T==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(te,{control:i.control,name:"stdio_command",render:({field:C})=>t.jsxs(ne,{children:[t.jsx(se,{children:s("orgs.connections.command")}),t.jsx(oe,{children:t.jsx(de,{placeholder:s("orgs.connections.commandPlaceholder"),...C,value:C.value??""})}),t.jsx(ie,{})]})}),t.jsx(te,{control:i.control,name:"stdio_args",render:({field:C})=>t.jsxs(ne,{children:[t.jsx(se,{children:s("orgs.connections.arguments")}),t.jsx(oe,{children:t.jsx(de,{placeholder:s("orgs.connections.argumentsPlaceholder"),...C,value:C.value??""})}),t.jsx(ie,{})]})})]}),t.jsx(te,{control:i.control,name:"stdio_cwd",render:({field:C})=>t.jsxs(ne,{children:[t.jsx(se,{children:s("orgs.connections.workingDirectory")}),t.jsx(oe,{children:t.jsx(de,{placeholder:s("orgs.connections.workingDirectoryPlaceholder"),...C,value:C.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("orgs.connections.directoryExecutionNote")}),t.jsx(ie,{})]})})]}),(T==="NPX"||T==="STDIO")&&t.jsx(te,{control:i.control,name:"env_vars",render:({field:C})=>t.jsxs(ne,{children:[t.jsx(se,{children:s("orgs.connections.environmentVariables")}),t.jsx(oe,{children:t.jsx(zt,{value:C.value??[],onChange:C.onChange})}),t.jsx(ie,{})]})}),T!=="NPX"&&T!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(te,{control:i.control,name:"connection_url",render:({field:C})=>t.jsxs(ne,{children:[t.jsx(se,{children:s("orgs.connections.url")}),t.jsx(oe,{children:t.jsx(de,{placeholder:s("orgs.connections.urlPlaceholder"),...C,value:C.value??"",onPaste:M=>{const P=M.clipboardData.getData("text");P&&(M.preventDefault(),i.setValue("connection_url",P.trim(),{shouldDirty:!0}),q(P))},onBlur:M=>{q(M.target.value),C.onBlur()}})}),t.jsx(ie,{})]})}),t.jsx(te,{control:i.control,name:"connection_token",render:({field:C})=>t.jsxs(ne,{children:[t.jsx(se,{children:A?.token?.label??s("orgs.connections.tokenOptional")}),t.jsx(oe,{children:t.jsx(de,{type:"password",placeholder:A?.token?.placeholder??s("orgs.connections.tokenPlaceholder"),...C,value:C.value??""})}),A?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[A.token.helperText,A.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.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:s("orgs.connections.openGitHubPatSettings")})]})]}),t.jsx(ie,{})]})})]}),t.jsx(te,{control:i.control,name:"title",render:({field:C})=>t.jsxs(ne,{children:[t.jsx(se,{children:s("orgs.connections.name")}),t.jsx(oe,{children:t.jsx(de,{placeholder:s("orgs.connections.namePlaceholder"),...C})}),t.jsx(ie,{})]})}),t.jsx(te,{control:i.control,name:"description",render:({field:C})=>t.jsxs(ne,{children:[t.jsx(se,{children:s("orgs.connections.description")}),t.jsx(oe,{children:t.jsx(Pt,{placeholder:s("orgs.connections.descriptionPlaceholder"),rows:3,...C,value:C.value??""})}),t.jsx(ie,{})]})})]}),H=V;return o?t.jsx(St,{open:H,onOpenChange:I,children:t.jsxs(Ct,{className:"max-h-[90vh]",children:[t.jsx(vt,{className:"pb-2",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex-1 text-left",children:[t.jsx(bt,{children:y}),t.jsx(_t,{className:"mt-1",children:w})]}),t.jsx(Dt,{asChild:!0,children:t.jsx(G,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1","aria-label":s("orgs.connections.close"),children:t.jsx(We,{size:16})})})]})}),t.jsx(be,{...i,children:t.jsxs("form",{onSubmit:i.handleSubmit(B),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:R}),t.jsx(Nt,{children:t.jsx(G,{type:"submit",disabled:i.formState.isSubmitting,className:"w-full",children:z})})]})})]})}):t.jsx(Ke,{open:H,onOpenChange:I,children:t.jsxs(Be,{className:"sm:max-w-[525px]",children:[t.jsxs(ze,{children:[t.jsx(Ue,{children:y}),t.jsx(Ve,{children:w})]}),t.jsx(be,{...i,children:t.jsxs("form",{onSubmit:i.handleSubmit(B),children:[t.jsx("div",{className:"py-4",children:R}),t.jsxs(Ee,{children:[t.jsx(G,{type:"button",variant:"outline",onClick:()=>I(!1),children:s("orgs.connections.cancel")}),t.jsx(G,{type:"submit",disabled:i.formState.isSubmitting,className:"min-w-40",children:z})]})]})})]})})})(),t.jsx(pe.Content,{children:t.jsx(pe.Body,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(pe.Title,{children:s("orgs.connections.pageTitle")}),t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(dt,{value:d.search,onChange:d.setSearch,placeholder:s("orgs.connections.searchPlaceholder"),className:"w-full md:w-[375px]",onKeyDown:y=>{y.key==="Escape"&&(d.setSearch(""),y.target.blur())}}),t.jsx(at,{sortKey:d.sortKey,sortDirection:d.sortDirection,onSort:d.handleSort,sortOptions:[{id:"title",label:s("orgs.connections.sortName")},{id:"description",label:s("orgs.connections.sortDescription")},{id:"connection_type",label:s("orgs.connections.sortType")},{id:"updated_by",label:s("orgs.connections.sortUpdatedBy")},{id:"updated_at",label:s("orgs.connections.sortUpdated")}],filters:[{label:s("orgs.connections.filterType"),value:p,onChange:y=>v(y||"ALL"),options:[{id:"ALL",label:s("orgs.connections.filterAll")},{id:"HTTP",label:"HTTP"},{id:"SSE",label:"SSE"},{id:"Websocket",label:"WebSocket"},{id:"STDIO",label:"STDIO"}]},{label:s("orgs.connections.filterStatus"),value:x,onChange:y=>_(y||"ALL"),options:[{id:"ALL",label:s("orgs.connections.filterAll")},{id:"active",label:s("orgs.connections.filterActive")},{id:"inactive",label:s("orgs.connections.filterInactive")},{id:"error",label:s("orgs.connections.filterError")}]},...j.length>1?[{label:s("orgs.connections.filterRegistry"),value:m,onChange:y=>S(y||"ALL"),options:[{id:"ALL",label:s("orgs.connections.filterAllRegistries")},...j.map(y=>({id:y.id,label:y.id.includes("community-registry")?s("orgs.connections.communityMcpRegistry"):y.title}))]}]:[]]})]}),Y]}),t.jsx(ut,{tabs:[{id:"all",label:s("orgs.connections.tabAll")},{id:"connected",label:s("orgs.connections.tabConnected")}],activeTab:N,onTabChange:y=>{const w=y;w!==N&&ce("connections_page_tab_changed",{to_tab:w}),h(w)}}),t.jsx(K.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ge,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx("div",{style:{opacity:k?.5:1,transition:k?"opacity 0.2s 0.2s linear":"opacity 0s 0s linear",pointerEvents:k?"none":"auto"},children:t.jsx(un,{listState:d,activeTab:N,typeFilter:p,statusFilter:x,registryFilter:m,enabledRegistries:j})})})]})})})]})})}function eo(){const s=re.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ye,{children:t.jsx(K.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ge,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(mn,{})})}),s[0]=e):e=s[0],e}export{eo as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as se,b as Me,r as u,j as r,k as fe,B as De,dZ as Jt,ax as Zt,aD as xe,d_ as en,d$ as tn,e0 as nn,e1 as rn,bG as on,e2 as sn,e3 as lt,az as an,e4 as ln,e5 as cn,e6 as dn,e7 as un,e8 as fn,e9 as pn,ea as mn,eb as xn,ec as hn,m as le,o as gn,t as ne,K as Ze}from"./index-Dk9RGAqb.js";import{F as bn,l as yn}from"./index-CRECkoeT.js";import{j as vn,aO as Cn,aP as wn}from"./agent-icon-E6ioveGx.js";import{s as Nn}from"./XClose-CW0R6bEe.js";import{m as jn}from"./automation-runs-CfKwQe7C.js";import{c as et,T as tt,a as nt}from"./tooltip-xp77jFs4.js";import{b as En}from"./chat-context-BF6sak7i.js";import{u as Sn}from"./shell-layout-DCFL_zE0.js";import{s as we,a as rt,f as Dn}from"./index-CwhgWx3d.js";import{b as Mn,h as Rn,a as Pn,c as Tn,d as Fn,e as kn}from"./dialog-CzDwjrNV.js";import{I as ot}from"./input-C-gHIQip.js";import{c as An,d as On,b as Ln,f as In,g as $n,e as Kn,a as zn,A as _n}from"./alert-dialog-DwnblylQ.js";import{t as Gn}from"./ChevronDown-B3fDqERa.js";import{i as Bn}from"./ChevronRight-Dkp8mDOd.js";import{a as Vn}from"./ZoomOut-B-F-8cp0.js";import{w as Un,E as Hn,x as Ae,y as Wn,z as qn,A as Qn,C as Xn,D as re,G as Ne,I as Oe,J as je,g as Le,K as Ie,M as Yn,s as Jn,N as Zn,O as $e,P as Ee,Q as Ke,U as er,V as tr,W as nr,X as rr}from"./index-EFMlI3jy.js";import"./AlertCircle-1e3-NcEA.js";import"./Tool01-B0759esA.js";import"./ArrowUp-DI1fyC1G.js";import"./Settings02-BIGi-T7s.js";import"./Tool02-DPXeBg9E.js";import"./ArrowRight-B-wHAJWT.js";import"./ArrowUpRight-BWyzrLQV.js";import"./TrendUp01-CYCVS1zr.js";import"./ZapSquare-DGe1cTc7.js";import"./Users03-3lwc9liE.js";import"./CheckCircle-Dh-3VdHB.js";import"./Check-LKA0FKR0.js";import"./ChevronUp-Cm7VcWLZ.js";import"./DotsVertical-DKanPfz6.js";import"./Stars02-DpsxkqJO.js";import"./Copy01-uQh3Q5Fv.js";import"./Globe01-CEh6-y49.js";import"./Eye-SCLKEZSh.js";import"./FilterLines-13dE_TWB.js";import"./Star01-lWHLfmir.js";import"./Globe04-B4VpGXlx.js";import"./SwitchHorizontal01-Dw_LQc0f.js";import"./HardDrive-DViLU95V.js";import"./Image01-CMEjSR3M.js";import"./Key01-CgioJ7nW.js";import"./LayoutLeft-Yz5NzG-w.js";import"./XCircle-B3aYrCCW.js";import"./LinkExternal01-Di_tOfr7.js";import"./LogOut01-r12Fp93g.js";import"./Monitor01-C_dYkXdo.js";import"./Sun-tOsjvEis.js";import"./Package-R2sM0vCm.js";import"./Palette-CsQxyyrG.js";import"./Play-CVGtm9ao.js";import"./Plus-CLG5QKCr.js";import"./SearchLg-CkXJjhdf.js";import"./SearchMd-DBj7HhoW.js";import"./Shield01-ksb0VZpA.js";import"./Stars01-B3jznQQ4.js";import"./Trash01-CWIa_mDx.js";import"./Upload01-CPD95nN4.js";import"./User01-NxrNjn_h.js";import"./Users01-DvtVVxdG.js";import"./X-BYXAQs6v.js";import"./Zap-CrMVm5NK.js";import"./select-Bd1WKGSJ.js";import"./useInfiniteQuery-64uGdBMx.js";import"./use-infinite-scroll-CbSN3uty.js";import"./use-connection-BsS-3rZB.js";import"./use-mcp-client-Bzvvd0Df.js";import"./auth-C4POVeVe.js";import"./use-virtual-mcp-BP-M67aZ.js";import"./card-DcA1Rwjs.js";import"./sidebar-DBzYJLC2.js";import"./use-mobile-DQ8jManM.js";import"./table-CIOCQP8H.js";import"./empty-state-CwB9YNml.js";import"./use-members-Cf3JeQ7o.js";import"./use-org-auth-client-B1nrzsgv.js";import"./use-clock-tick-jphDPs9A.js";import"./use-automations-m1Zli3xa.js";import"./studio-tools-CFgWeCBk.js";import"./useSuspenseInfiniteQuery-DYsYorpe.js";import"./avatar-BQF1QGjq.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DmTk3Ltj.js";import"./file-type-icon-_JzjFo75.js";import"./tab-id-BijBBRwE.js";import"./hooks-CvwQxo-K.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-C_GcVLtN.js";import"./monaco-editor-CIeX3g7j.js";import"./index-DaeJeAuV.js";import"./calendar-DV0NS9xq.js";import"./integration-icon-DBUjxWMb.js";import"./use-navigate-to-agent-D_vSOLwA.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-CB1-fSKl.js";import"./form-CJlgALpE.js";import"./label-D9aEMZqo.js";import"./autosend-CMYVBxZV.js";import"./use-ai-providers-Bujq_lmM.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-B3KnAJRh.js";import"./use-organization-settings-zX_T-3XG.js";import"./required-auth-layout-BfZFGRtL.js";import"./use-org-sso-w9j-Ok-z.js";import"./drawer-CSHRJeTj.js";import"./collection-search-zQnUIpxo.js";import"./index-DKhbAOZU.js";import"./get-initials-D-f_fDFw.js";import"./popover-C2fPnPJt.js";import"./use-registry-app-DdwkqhPA.js";import"./use-mcp-tools-IcUfyh43.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-iHWUIj8u.js";import"./mcp-oauth-Br5ozXBx.js";import"./extract-connection-data-ChU9AlhE.js";import"./metadata-dUsYcpuu.js";import"./dropdown-menu-CSgtqrA3.js";import"./command-CaEk5uho.js";import"./index-DLEyNPFn.js";import"./companions-core-Bua_v2zd.js";import"./tabs-BBm6nSot.js";import"./toggle-group-DaeRkjf6.js";import"./use-deco-credits-BW-cf-qH.js";import"./toolbar-icon-button-BGQ8DzLo.js";import"./skeleton-DoNQnm-q.js";import"./github-repo-picker-DeAiQyIc.js";import"./use-debounced-value-D9jV_d1U.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./connection-card-CfMynI7E.js";import"./use-registry-connections-C529xEPn.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-CQzBh7SW.js";import"./connection-form-helpers-BABNaeU1.js";import"./collection-tabs-B-9Urj68.js";import"./badge-BbmHyS30.js";import"./connect-desktop-dialog-CxqDr22T.js";import"./select-model-BeSzDzZp.js";import"./checkbox-DsDzIgcJ.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Dh6zLap9.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-D-dtBAQ9.js";import"./toolbar-CoHzPWWi.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-DHlRnvUE.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-UXgrVZIV.js";import"./use-debounced-autosave-C7P_JRA0.js";import"./index-D8ngUVkT.js";import"./search-input-BI1enB-b.js";import"./switch-J9ypA9K4.js";import"./use-secrets-CTWWthzy.js";import"./useQueries-b2s80Vy2.js";import"./use-file-configs-D6Dg-9sN.js";import"./automation-list-row-BDIVGPMe.js";const or={"new-file":{titleKey:"sandbox.fileExplorerNameDialog.newFileTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFileDescription",submitKey:"sandbox.fileExplorerNameDialog.newFileSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFilePlaceholder"},"new-folder":{titleKey:"sandbox.fileExplorerNameDialog.newFolderTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFolderDescription",submitKey:"sandbox.fileExplorerNameDialog.newFolderSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFolderPlaceholder"},rename:{titleKey:"sandbox.fileExplorerNameDialog.renameTitle",descriptionKey:"sandbox.fileExplorerNameDialog.renameDescription",submitKey:"sandbox.fileExplorerNameDialog.renameSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.renamePlaceholder"}};function sr(i){const e=se.c(71),{open:s,mode:a,initialName:l,parentLabel:m,isPending:h,onSubmit:f,onOpenChange:v}=i,j=l===void 0?"":l,d=h===void 0?!1:h,x=Me(),[g,F]=u.useState(j),[Z,W]=u.useState(s),y=or[a];s!==Z&&(W(s),s&&F(j));let b;e[0]!==d||e[1]!==v?(b=_=>{!_&&!d&&v(!1)},e[0]=d,e[1]=v,e[2]=b):b=e[2];const k=b;let A;e[3]!==d||e[4]!==g||e[5]!==f?(A=async _=>{_.preventDefault();const te=g.trim();!te||d||await f(te)},e[3]=d,e[4]=g,e[5]=f,e[6]=A):A=e[6];const I=A;let S;e[7]!==y.titleKey||e[8]!==x?(S=x(y.titleKey),e[7]=y.titleKey,e[8]=x,e[9]=S):S=e[9];let T;e[10]!==S?(T=r.jsx(Mn,{children:S}),e[10]=S,e[11]=T):T=e[11];let D;e[12]!==y.descriptionKey||e[13]!==x?(D=x(y.descriptionKey),e[12]=y.descriptionKey,e[13]=x,e[14]=D):D=e[14];let M;e[15]!==D?(M=r.jsx(Rn,{children:D}),e[15]=D,e[16]=M):M=e[16];let N;e[17]!==T||e[18]!==M?(N=r.jsxs(Pn,{children:[T,M]}),e[17]=T,e[18]=M,e[19]=N):N=e[19];let R;e[20]!==m||e[21]!==x?(R=m&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:x("sandbox.fileExplorerNameDialog.location")}),r.jsx(ot,{value:m,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[20]=m,e[21]=x,e[22]=R):R=e[22];let E;e[23]!==x?(E=x("sandbox.fileExplorerNameDialog.name"),e[23]=x,e[24]=E):E=e[24];let P;e[25]!==E?(P=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:E}),e[25]=E,e[26]=P):P=e[26];let Q;e[27]===Symbol.for("react.memo_cache_sentinel")?(Q=_=>F(_.target.value),e[27]=Q):Q=e[27];let X;e[28]!==y.placeholderKey||e[29]!==x?(X=x(y.placeholderKey),e[28]=y.placeholderKey,e[29]=x,e[30]=X):X=e[30];let Y;e[31]!==d||e[32]!==g||e[33]!==X?(Y=r.jsx(ot,{id:"file-explorer-name",value:g,onChange:Q,placeholder:X,autoFocus:!0,disabled:d}),e[31]=d,e[32]=g,e[33]=X,e[34]=Y):Y=e[34];let G;e[35]!==P||e[36]!==Y?(G=r.jsxs("div",{className:"space-y-1.5",children:[P,Y]}),e[35]=P,e[36]=Y,e[37]=G):G=e[37];let $;e[38]!==R||e[39]!==G?($=r.jsxs("div",{className:"space-y-4 py-4",children:[R,G]}),e[38]=R,e[39]=G,e[40]=$):$=e[40];let q;e[41]!==v?(q=()=>v(!1),e[41]=v,e[42]=q):q=e[42];let K;e[43]!==x?(K=x("sandbox.fileExplorerNameDialog.cancel"),e[43]=x,e[44]=K):K=e[44];let z;e[45]!==d||e[46]!==q||e[47]!==K?(z=r.jsx(De,{type:"button",variant:"outline",onClick:q,disabled:d,children:K}),e[45]=d,e[46]=q,e[47]=K,e[48]=z):z=e[48];let B;e[49]!==d||e[50]!==g?(B=!g.trim()||d,e[49]=d,e[50]=g,e[51]=B):B=e[51];let O;e[52]!==y.submitKey||e[53]!==d||e[54]!==x?(O=d?r.jsxs(r.Fragment,{children:[r.jsx(fe,{size:14,className:"animate-spin"}),x("sandbox.fileExplorerNameDialog.saving")]}):x(y.submitKey),e[52]=y.submitKey,e[53]=d,e[54]=x,e[55]=O):O=e[55];let V;e[56]!==B||e[57]!==O?(V=r.jsx(De,{type:"submit",disabled:B,children:O}),e[56]=B,e[57]=O,e[58]=V):V=e[58];let L;e[59]!==z||e[60]!==V?(L=r.jsxs(Tn,{children:[z,V]}),e[59]=z,e[60]=V,e[61]=L):L=e[61];let U;e[62]!==I||e[63]!==$||e[64]!==L||e[65]!==N?(U=r.jsx(Fn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:I,children:[N,$,L]})}),e[62]=I,e[63]=$,e[64]=L,e[65]=N,e[66]=U):U=e[66];let ee;return e[67]!==k||e[68]!==s||e[69]!==U?(ee=r.jsx(kn,{open:s,onOpenChange:k,children:U}),e[67]=k,e[68]=s,e[69]=U,e[70]=ee):ee=e[70],ee}function ar(i){const e=se.c(47),{deleteTarget:s,deleteDirtyPaths:a,fsActionPending:l,onOpenChange:m,onConfirm:h}=i,f=Me(),v=s?.kind==="directory",j=s!==null,d=v?"sandbox.fileExplorerDeleteDialog.titleFolder":"sandbox.fileExplorerDeleteDialog.titleFile";let x;e[0]!==f||e[1]!==d?(x=f(d),e[0]=f,e[1]=d,e[2]=x):x=e[2];let g;e[3]!==x?(g=r.jsx(An,{children:x}),e[3]=x,e[4]=g):g=e[4];let F;e[5]!==f?(F=f("sandbox.fileExplorerDeleteDialog.description"),e[5]=f,e[6]=F):F=e[6];const Z=s?.name;let W;e[7]!==Z?(W=r.jsx("span",{className:"font-mono",children:Z}),e[7]=Z,e[8]=W):W=e[8];let y;e[9]!==v||e[10]!==f?(y=v?f("sandbox.fileExplorerDeleteDialog.folderSuffix"):".",e[9]=v,e[10]=f,e[11]=y):y=e[11];let b;e[12]!==a.length||e[13]!==f?(b=a.length>0&&r.jsxs(r.Fragment,{children:[" ",a.length===1?f("sandbox.fileExplorerDeleteDialog.unsavedChangesOne"):f("sandbox.fileExplorerDeleteDialog.unsavedChangesMany",{count:a.length})]}),e[12]=a.length,e[13]=f,e[14]=b):b=e[14];let k;e[15]!==F||e[16]!==W||e[17]!==y||e[18]!==b?(k=r.jsxs(On,{children:[F," ",W,y,b]}),e[15]=F,e[16]=W,e[17]=y,e[18]=b,e[19]=k):k=e[19];let A;e[20]!==k||e[21]!==g?(A=r.jsxs(Ln,{children:[g,k]}),e[20]=k,e[21]=g,e[22]=A):A=e[22];let I;e[23]!==f?(I=f("sandbox.fileExplorerDeleteDialog.cancel"),e[23]=f,e[24]=I):I=e[24];let S;e[25]!==l||e[26]!==I?(S=r.jsx(In,{disabled:l,children:I}),e[25]=l,e[26]=I,e[27]=S):S=e[27];const T=l||!s;let D;e[28]!==s||e[29]!==h?(D=Q=>{Q.preventDefault(),s&&h(s)},e[28]=s,e[29]=h,e[30]=D):D=e[30];let M;e[31]!==f?(M=f("sandbox.fileExplorerDeleteDialog.delete"),e[31]=f,e[32]=M):M=e[32];let N;e[33]!==T||e[34]!==D||e[35]!==M?(N=r.jsx($n,{disabled:T,onClick:D,children:M}),e[33]=T,e[34]=D,e[35]=M,e[36]=N):N=e[36];let R;e[37]!==S||e[38]!==N?(R=r.jsxs(Kn,{children:[S,N]}),e[37]=S,e[38]=N,e[39]=R):R=e[39];let E;e[40]!==A||e[41]!==R?(E=r.jsxs(zn,{children:[A,R]}),e[40]=A,e[41]=R,e[42]=E):E=e[42];let P;return e[43]!==m||e[44]!==j||e[45]!==E?(P=r.jsx(_n,{open:j,onOpenChange:m,children:E}),e[43]=m,e[44]=j,e[45]=E,e[46]=P):P=e[46],P}var ze="ContextMenu",[ir]=an(ze,[lt]),J=lt(),[lr,ct]=ir(ze),dt=i=>{const{__scopeContextMenu:e,children:s,onOpenChange:a,dir:l,modal:m=!0}=i,[h,f]=u.useState(!1),v=J(e),j=on(a),d=u.useCallback(x=>{f(x),j(x)},[j]);return r.jsx(lr,{scope:e,open:h,onOpenChange:d,modal:m,children:r.jsx(sn,{...v,dir:l,open:h,onOpenChange:d,modal:m,children:s})})};dt.displayName=ze;var ut="ContextMenuTrigger",ft=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,disabled:a=!1,...l}=i,m=ct(ut,s),h=J(s),f=u.useRef({x:0,y:0}),v=u.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...f.current})}),j=u.useRef(0),d=u.useCallback(()=>window.clearTimeout(j.current),[]),x=g=>{f.current={x:g.clientX,y:g.clientY},m.onOpenChange(!0)};return u.useEffect(()=>d,[d]),u.useEffect(()=>{a&&d()},[a,d]),r.jsxs(r.Fragment,{children:[r.jsx(Jt,{...h,virtualRef:v}),r.jsx(Zt.span,{"data-state":m.open?"open":"closed","data-disabled":a?"":void 0,...l,ref:e,style:{WebkitTouchCallout:"none",...i.style},onContextMenu:a?i.onContextMenu:xe(i.onContextMenu,g=>{d(),x(g),g.preventDefault()}),onPointerDown:a?i.onPointerDown:xe(i.onPointerDown,Se(g=>{d(),j.current=window.setTimeout(()=>x(g),700)})),onPointerMove:a?i.onPointerMove:xe(i.onPointerMove,Se(d)),onPointerCancel:a?i.onPointerCancel:xe(i.onPointerCancel,Se(d)),onPointerUp:a?i.onPointerUp:xe(i.onPointerUp,Se(d))})]})});ft.displayName=ut;var cr="ContextMenuPortal",pt=i=>{const{__scopeContextMenu:e,...s}=i,a=J(e);return r.jsx(nn,{...a,...s})};pt.displayName=cr;var mt="ContextMenuContent",xt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=ct(mt,s),m=J(s),h=u.useRef(!1);return r.jsx(rn,{...m,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:f=>{i.onCloseAutoFocus?.(f),!f.defaultPrevented&&h.current&&f.preventDefault(),h.current=!1},onInteractOutside:f=>{i.onInteractOutside?.(f),!f.defaultPrevented&&!l.modal&&(h.current=!0)},style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});xt.displayName=mt;var dr="ContextMenuGroup",ur=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(ln,{...l,...a,ref:e})});ur.displayName=dr;var fr="ContextMenuLabel",pr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(cn,{...l,...a,ref:e})});pr.displayName=fr;var mr="ContextMenuItem",ht=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(en,{...l,...a,ref:e})});ht.displayName=mr;var xr="ContextMenuCheckboxItem",hr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(dn,{...l,...a,ref:e})});hr.displayName=xr;var gr="ContextMenuRadioGroup",br=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(un,{...l,...a,ref:e})});br.displayName=gr;var yr="ContextMenuRadioItem",vr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(fn,{...l,...a,ref:e})});vr.displayName=yr;var Cr="ContextMenuItemIndicator",wr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(pn,{...l,...a,ref:e})});wr.displayName=Cr;var Nr="ContextMenuSeparator",gt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(tn,{...l,...a,ref:e})});gt.displayName=Nr;var jr="ContextMenuArrow",Er=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(mn,{...l,...a,ref:e})});Er.displayName=jr;var Sr="ContextMenuSubTrigger",Dr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(xn,{...l,...a,ref:e})});Dr.displayName=Sr;var Mr="ContextMenuSubContent",Rr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(hn,{...l,...a,ref:e,style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Rr.displayName=Mr;function Se(i){return e=>e.pointerType!=="mouse"?i(e):void 0}var Pr=dt,Tr=ft,Fr=pt,kr=xt,Ar=ht,Or=gt;function Lr(i){const e=se.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Pr,{"data-slot":"context-menu",...s}),e[2]=s,e[3]=a):a=e[3],a}function Ir(i){const e=se.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Tr,{"data-slot":"context-menu-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function $r(i){const e=se.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=le("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",s),e[3]=s,e[4]=l):l=e[4];let m;return e[5]!==a||e[6]!==l?(m=r.jsx(Fr,{children:r.jsx(kr,{"data-slot":"context-menu-content",translate:"no",className:l,...a})}),e[5]=a,e[6]=l,e[7]=m):m=e[7],m}function ue(i){const e=se.c(12);let s,a,l,m;e[0]!==i?({className:s,inset:a,variant:m,...l}=i,e[0]=i,e[1]=s,e[2]=a,e[3]=l,e[4]=m):(s=e[1],a=e[2],l=e[3],m=e[4]);const h=m===void 0?"default":m;let f;e[5]!==s?(f=le("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[5]=s,e[6]=f):f=e[6];let v;return e[7]!==a||e[8]!==l||e[9]!==f||e[10]!==h?(v=r.jsx(Ar,{"data-slot":"context-menu-item","data-inset":a,"data-variant":h,className:f,...l}),e[7]=a,e[8]=l,e[9]=f,e[10]=h,e[11]=v):v=e[11],v}function st(i){const e=se.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=le("bg-border -mx-1 my-1 h-px",s),e[3]=s,e[4]=l):l=e[4];let m;return e[5]!==a||e[6]!==l?(m=r.jsx(Or,{"data-slot":"context-menu-separator",className:l,...a}),e[5]=a,e[6]=l,e[7]=m):m=e[7],m}const Kr="#d9a441";function zr(i){const e=se.c(63),{node:s,depth:a,isExpanded:l,isSelected:m,isLoading:h,fileVisual:f,onOpen:v,onSelect:j,onNewFile:d,onNewFolder:x,onCopyPath:g,onCopyRelativePath:F,onRename:Z,onDelete:W}=i,y=h===void 0?!1:h,b=Me(),k=s.kind==="directory",{Icon:A,color:I}=f,S=m&&"bg-accent";let T;e[0]!==S?(T=le("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",S),e[0]=S,e[1]=T):T=e[1];const D=`${a*14+8}px`;let M;e[2]!==D?(M={paddingLeft:D},e[2]=D,e[3]=M):M=e[3];let N;e[4]!==v||e[5]!==j?(N=()=>{j(),v()},e[4]=v,e[5]=j,e[6]=N):N=e[6];let R;e[7]!==A||e[8]!==I||e[9]!==k||e[10]!==l||e[11]!==y?(R=k?r.jsxs(r.Fragment,{children:[y?r.jsx(fe,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):l?r.jsx(Gn,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(Bn,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(Vn,{size:16,className:"shrink-0",style:{color:Kr}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(A,{size:16,className:"shrink-0",style:{color:I}})]}),e[7]=A,e[8]=I,e[9]=k,e[10]=l,e[11]=y,e[12]=R):R=e[12];let E;e[13]!==s.name?(E=r.jsx("span",{className:"truncate",children:s.name}),e[13]=s.name,e[14]=E):E=e[14];let P;e[15]!==T||e[16]!==M||e[17]!==N||e[18]!==R||e[19]!==E?(P=r.jsx(Ir,{asChild:!0,children:r.jsxs("button",{type:"button",className:T,style:M,onClick:N,children:[R,E]})}),e[15]=T,e[16]=M,e[17]=N,e[18]=R,e[19]=E,e[20]=P):P=e[20];let Q;e[21]!==b?(Q=b("sandbox.fileTreeRow.newFile"),e[21]=b,e[22]=Q):Q=e[22];let X;e[23]!==d||e[24]!==Q?(X=r.jsx(ue,{onSelect:d,children:Q}),e[23]=d,e[24]=Q,e[25]=X):X=e[25];let Y;e[26]!==b?(Y=b("sandbox.fileTreeRow.newFolder"),e[26]=b,e[27]=Y):Y=e[27];let G;e[28]!==x||e[29]!==Y?(G=r.jsx(ue,{onSelect:x,children:Y}),e[28]=x,e[29]=Y,e[30]=G):G=e[30];let $;e[31]===Symbol.for("react.memo_cache_sentinel")?($=r.jsx(st,{}),e[31]=$):$=e[31];let q;e[32]!==b?(q=b("sandbox.fileTreeRow.copyPath"),e[32]=b,e[33]=q):q=e[33];let K;e[34]!==g||e[35]!==q?(K=r.jsx(ue,{onSelect:g,children:q}),e[34]=g,e[35]=q,e[36]=K):K=e[36];let z;e[37]!==b?(z=b("sandbox.fileTreeRow.copyRelativePath"),e[37]=b,e[38]=z):z=e[38];let B;e[39]!==F||e[40]!==z?(B=r.jsx(ue,{onSelect:F,children:z}),e[39]=F,e[40]=z,e[41]=B):B=e[41];let O;e[42]===Symbol.for("react.memo_cache_sentinel")?(O=r.jsx(st,{}),e[42]=O):O=e[42];let V;e[43]!==b?(V=b("sandbox.fileTreeRow.rename"),e[43]=b,e[44]=V):V=e[44];let L;e[45]!==Z||e[46]!==V?(L=r.jsx(ue,{onSelect:Z,children:V}),e[45]=Z,e[46]=V,e[47]=L):L=e[47];let U;e[48]!==b?(U=b("sandbox.fileTreeRow.delete"),e[48]=b,e[49]=U):U=e[49];let ee;e[50]!==W||e[51]!==U?(ee=r.jsx(ue,{variant:"destructive",onSelect:W,children:U}),e[50]=W,e[51]=U,e[52]=ee):ee=e[52];let _;e[53]!==X||e[54]!==G||e[55]!==K||e[56]!==B||e[57]!==L||e[58]!==ee?(_=r.jsxs($r,{className:"w-52",children:[X,G,$,K,B,O,L,ee]}),e[53]=X,e[54]=G,e[55]=K,e[56]=B,e[57]=L,e[58]=ee,e[59]=_):_=e[59];let te;return e[60]!==_||e[61]!==P?(te=r.jsxs(Lr,{children:[P,_]}),e[60]=_,e[61]=P,e[62]=te):te=e[62],te}yn.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});const at=200,_r=2,Gr=250,it=200;function Br(i,e,s,a){return`/api/${i}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(s)}/${a}`}function Vr(i){const e=se.c(9),{text:s,query:a}=i;let l,m,h;if(e[0]!==a||e[1]!==s){const{leadingEllipsis:v,segments:j}=Yn(s,a);l="truncate font-mono text-muted-foreground",m=v&&r.jsx("span",{className:"text-muted-foreground/50",children:"…"}),h=j.map(Ur),e[0]=a,e[1]=s,e[2]=l,e[3]=m,e[4]=h}else l=e[2],m=e[3],h=e[4];let f;return e[5]!==l||e[6]!==m||e[7]!==h?(f=r.jsxs("span",{className:l,children:[m,h]}),e[5]=l,e[6]=m,e[7]=h,e[8]=f):f=e[8],f}function Ur(i,e){return i.match?r.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:i.text},e):r.jsx("span",{children:i.text},e)}function Ga({orgSlug:i,virtualMcpId:e,branch:s,openPath:a}){const[l,m]=u.useState({files:[],directories:[],truncated:!1}),{files:h,directories:f}=l,[v,j]=u.useState(new Set),[d,x]=u.useState(null),[g,F]=u.useState(null),[Z,W]=u.useState([]),[y,b]=u.useState(""),[k,A]=u.useState(null),[I,S]=u.useState(null),[T,D]=u.useState(!1),[M,N]=u.useState(!1),[R,E]=u.useState(!1),[P,Q]=u.useState(!1),[,X]=u.useState(new Set),[Y,G]=u.useState(new Set),$=u.useRef(0),q=u.useRef(null),K=u.useRef(new Set),z=u.useRef(new Map),B=u.useRef(null),O=u.useRef(0),V=u.useRef(null),L=u.useRef(null),U=u.useRef(null);function ee(t){X(n=>{const o=typeof t=="function"?t(n):t;return K.current=o,o})}const[_,te]=u.useState(new Map),Re=u.useRef(null),[ae,he]=u.useState(null),{sendMessage:bt}=En(),{openSidePanel:yt}=Sn(),ge=gn(),[H,oe]=u.useState(null),[Pe,Te]=u.useState(null),[be,ye]=u.useState(!1);async function ie(t,n){const o=await fetch(Br(i,e,s,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const c=await o.json().catch(()=>({}));throw new Error(c.error??`Request failed (${o.status})`)}return o.json()}async function ve(){ge.invalidateQueries({queryKey:rt(i,e,s)})}function _e(t,n,o){navigator.clipboard.writeText(o).then(()=>ne.success(t("sandbox.fileExplorer.textCopied",{label:n})),()=>ne.error(t("sandbox.fileExplorer.failedToCopyText",{label:n.toLowerCase()})))}function vt(t){const n=nr(t);if(!n)return;const o=`${i}/${e}/${s}`;ge.setQueryData(Ze.decofile(o),c=>{if(!c)return c;const{[n]:p,...C}=c;return C}),ge.invalidateQueries({queryKey:Ze.liveMeta(i,e,s)})}function Ct(t){const n=t.kind==="file"?[t.path]:h.filter(o=>o.startsWith(".deco/blocks/")).map(o=>Ne(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)vt(o)}function wt(t){const n=Ne(t);return Z.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const c=_.get(o);return!!(c?.loaded&&c.editorValue!==c.savedContent)})}function Ge(t){W(n=>n.map(o=>t(o)).filter(o=>o!==null)),x(n=>n&&t(n)),te(n=>{const o=new Map;for(const[c,p]of n){const C=t(c);C&&o.set(C,p)}return o}),F(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function Nt(t){const n=Ne(t);F(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),Ge(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function jt(t,n){if(!H)return;const o=Ee(H.parentDir,n);if(Ke(o,h,f))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("write",{path:re(o),content:""}),await pe(),await ve(),oe(null),me(o)}async function Et(t,n){if(!H)return;const o=Ee(H.parentDir,n);if(Ke(o,h,f))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));const c=re(o);await ie("mkdir",{path:c}),m(p=>({...p,directories:p.directories.includes(c)?p.directories:[...p.directories,c]})),await pe(),await ve(),oe(null),j(p=>{const C=new Set(p);for(const ce of Ie(o))C.add(ce);return C.add(o),C}),F({name:n,path:o,kind:"directory",children:[]})}async function St(t,n){if(!H)return;const o=H.node.path,c=je(o),p=Ee(c,n);if(p===o){oe(null);return}if(Ke(p,h,f))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("rename",{from:re(o),to:re(p)}),Ge(C=>C===o?p:C.startsWith(`${o}/`)?Ee(p,C.slice(o.length+1)):C),await pe(),await ve(),oe(null)}async function Dt(t,n){ye(!0);try{await ie("unlink",{path:re(n.path),recursive:n.kind==="directory"}),Ct(n),Nt(n.path),await pe(),await ve(),Te(null),ne.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(o){ne.error(o instanceof Error?o.message:t("sandbox.fileExplorer.deleteFailed"))}finally{ye(!1)}}async function Mt(t,n){const o=Zn(n);if(o){ne.error(o);return}ye(!0);try{H?.mode==="new-file"?(await jt(t,n),ne.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):H?.mode==="new-folder"?(await Et(t,n),ne.success(t("sandbox.fileExplorer.folderCreated",{name:n}))):H?.mode==="rename"&&(await St(t,n),ne.success(t("sandbox.fileExplorer.renamedTo",{name:n})))}catch(c){ne.error(c instanceof Error?c.message:t("sandbox.fileExplorer.operationFailed"))}finally{ye(!1)}}const Be=u.useRef(!1);Be.current||(Be.current=!0,q.current=pe());const[Rt,Pt]=u.useState(null),w=Me();if(a&&a!==Rt){Pt(a);const t=a;queueMicrotask(()=>{Un(t)&&me(t)})}async function Fe(t){const n=await ie("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Ve(t,n,o){if(o!==$.current)return!1;let c=!1;return m(p=>{const C=n?rr(p.files,p.directories,t,p.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return c=!!C.truncated,{files:C.files,directories:C.directories,truncated:c}}),c&&ne.warning(w("sandbox.fileExplorer.fileListTruncated")),c}async function Tt(t){const n=z.current.get(t);if(n)return n;const o=$.current,c=(async()=>{const p=await Fe({pattern:"**/*",path:re(t),limit:Ae}),C=Ve(p,!0,o);return!C&&o===$.current&&ee(ce=>{const Ce=new Set(ce);return Ce.add(t),Ce}),C})();z.current.set(t,c);try{return await c}finally{z.current.delete(t)}}async function Ue(t){if(!$e(t,K.current))return!1;G(n=>new Set(n).add(t));try{return await Tt(t)}finally{G(n=>{const o=new Set(n);return o.delete(t),o})}}async function Ft(t,n){const o=new Set(K.current);for(const c of Ie(n)){if(!$e(c,o))continue;if(await Ue(c))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));o.add(c)}}async function pe(){const t=++$.current;V.current=null,L.current=null,z.current.clear(),E(!0),ee(new Set),j(new Set),G(new Set);try{const n=await Fe({pattern:"**/*",limit:Ae,maxDepth:Hn});Ve(n,!1,t),Q(!0)}catch{P&&ne.error(w("sandbox.fileExplorer.failedToRefreshFileTree"))}finally{E(!1)}}async function He(t){if(!_.get(t)?.loaded){te(o=>{const c=new Map(o);return c.set(t,{savedContent:"",editorValue:"",loaded:!1}),c});try{const o=await ie("read",{path:re(t),full:!0}),c=Jn(o.content??"");te(p=>{const C=new Map(p);return C.set(t,{savedContent:c,editorValue:c,loaded:!0}),C})}catch{}}}function kt(){O.current++,A(null),S(null),D(!1),N(!1)}async function At(){const t=$.current,n=V.current;if(n&&n.generation===t)return n.files;const o=L.current;if(o&&o.generation===t)return o.promise;const c=(async()=>{const p=await Fe({pattern:"**/*",limit:Ae});return $.current===t&&(V.current={generation:t,files:p.files}),p.files})();L.current={generation:t,promise:c};try{return await c}finally{L.current?.generation===t&&(L.current=null)}}async function Ot(t,n){try{const o=await At();if(n!==O.current)return;A(er(o,t,it))}catch{if(n!==O.current)return;A([])}}async function Lt(t,n){D(!0);try{const o=await ie("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:at});if(n!==O.current)return;S(tr(o.results??"")),N((o.matchCount??0)>=at)}catch{if(n!==O.current)return;S([]),N(!1)}finally{n===O.current&&D(!1)}}function It(t){const n=t.trim(),o=++O.current;Ot(n,o),n.length<_r?(S(null),D(!1),N(!1)):Lt(n,o)}function $t(t){if(b(t),B.current&&clearTimeout(B.current),!t.trim()){kt();return}B.current=setTimeout(()=>{It(t)},Gr)}function We(t){const n=U.current;if(!n||n.path!==d)return;U.current=null;const o=Math.max(1,n.line);t.revealLineInCenter(o),t.setPosition({lineNumber:o,column:1}),t.focus()}function Kt(t){U.current={path:t.path,line:t.line};const n=d===t.path&&_.get(t.path)?.loaded;me(t.path),n&&Re.current&&We(Re.current)}async function zt(t,n){try{await ie("write",{path:re(t),content:n}),we("file saved via sandbox /write",{path:t}),ge.invalidateQueries({queryKey:rt(i,e,s)});try{const o=await Dn(i,e,s);we("git status after save",o)}catch(o){we("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}te(o=>{const c=new Map(o),p=c.get(t);return p&&c.set(t,{...p,savedContent:n}),c})}catch(o){we("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function _t(t){x(t),F({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),he(null),Z.includes(t)||W(n=>[...n,t]),He(t)}function Gt(t){W(n=>{const o=n.filter(c=>c!==t);return d===t&&x(o[o.length-1]??null),o}),te(n=>{const o=new Map(n);return o.delete(t),o})}function qe(t){j(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function Bt(t){if($e(t,K.current))try{if(await Ue(t))return}catch(n){ne.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToLoadFolder"));return}qe(t)}async function Vt(t,n){if(n){qe(t);return}await Bt(t)}async function Ut(t){await q.current,await Ft(w,t);const n=Ie(t);j(o=>{const c=new Set(o);for(const p of n)c.add(p);return c}),_t(t)}function me(t){Ut(t).catch(n=>{ne.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToOpenFile"))})}function Ht(){return g?.kind==="directory"?g.path:g?.kind==="file"?je(g.path):d?je(d):"/"}function Qe(t){const n=Ht();oe({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Wt=Wn(h,f),Xe=qn(Wt,v),ke=k?.length??0,Ye=Qn(I??[]),Je=I?.length??0,de=d?_.get(d):null,qt=de?.loaded&&de.editorValue!==de.savedContent,Qt=Pe?wt(Pe.path):[],Xt=(t,n)=>{Re.current=t,We(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!d)return;const o=t.getValue();await zt(d,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),c=t.getModel();if(!o||!c||!d)return;const p=c.getValueInRange(o);he({filePath:d,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:p})})};function Yt(t){if(!ae)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${ae.filePath}\``,`**Lines:** ${ae.lineStart}–${ae.lineEnd}`];if(ae.selectedCode){const o=Le(ae.filePath),c=ae.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,c,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),yt("chat"),bt({parts:[{type:"text",text:n.join(`
|
|
2
|
-
`)}]}),he(null)}return R&&!P?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[r.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[r.jsxs("div",{className:"relative min-w-0 flex-1",children:[r.jsx(vn,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:y,onChange:t=>$t(t.target.value),placeholder:w("sandbox.fileExplorer.searchFilesPlaceholder"),"aria-label":w("sandbox.fileExplorer.searchFilesLabel"),className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),r.jsxs(et,{children:[r.jsx(tt,{asChild:!0,children:r.jsx(De,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":w("sandbox.fileExplorer.newFileLabel"),onClick:()=>Qe("new-file"),children:r.jsx(Cn,{size:14})})}),r.jsx(nt,{side:"bottom",children:w("sandbox.fileExplorer.newFile")})]}),r.jsxs(et,{children:[r.jsx(tt,{asChild:!0,children:r.jsx(De,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":w("sandbox.fileExplorer.newFolderLabel"),onClick:()=>Qe("new-folder"),children:r.jsx(wn,{size:14})})}),r.jsx(nt,{side:"bottom",children:w("sandbox.fileExplorer.newFolder")})]})]}),r.jsx(jn,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[!y&&Xe.map(t=>{const{node:n,depth:o}=t,c=n.kind==="directory",p=v.has(n.path),C=g?.path===n.path,ce=Xn(n.path,n.kind),Ce=c&&Y.has(n.path);return r.jsx(zr,{node:n,depth:o,isExpanded:p,isSelected:C,isLoading:Ce,fileVisual:Oe(n.name),onSelect:()=>F(n),onOpen:()=>{c?Vt(n.path,p):me(n.path)},onNewFile:()=>oe({mode:"new-file",node:n,parentDir:ce}),onNewFolder:()=>oe({mode:"new-folder",node:n,parentDir:ce}),onCopyPath:()=>_e(w,"Path",Ne(n.path)),onCopyRelativePath:()=>_e(w,"Relative path",re(n.path)),onRename:()=>oe({mode:"rename",node:n,parentDir:ce}),onDelete:()=>Te(n)},n.path)}),!y&&P&&Xe.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noFilesFound")}),y&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:w("sandbox.fileExplorer.files")}),ke>0&&r.jsxs("span",{className:"normal-case tracking-normal text-muted-foreground/70",children:[ke,ke>=it?"+":""]})]}),k!==null&&k.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noFileNamesMatch")}),k?.map(t=>{const n=t.split("/").pop()??t,o=je(t),{Icon:c,color:p}=Oe(n),C=d===t;return r.jsxs("button",{type:"button",onClick:()=>me(t),title:t,className:le("flex w-full items-center gap-1.5 px-3 py-1 text-left text-xs hover:bg-accent",C&&"bg-accent"),children:[r.jsx(c,{size:14,className:le("shrink-0",p)}),r.jsx("span",{className:"max-w-40 shrink-0 truncate",children:n}),o!=="/"&&r.jsx("span",{className:"truncate text-muted-foreground/60",children:o})]},t)})]}),y&&r.jsxs("div",{className:"mt-1 border-t pt-1",children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:w("sandbox.fileExplorer.inFiles")}),Je>0&&r.jsxs("span",{className:"text-muted-foreground/70 normal-case tracking-normal",children:[Je,M?"+":""]}),T&&r.jsx(fe,{size:10,className:"animate-spin"})]}),!T&&I!==null&&Ye.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noMatchesInFileContents")}),Ye.map(t=>{const n=t.path.split("/").pop()??t.path,{Icon:o,color:c}=Oe(n);return r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 text-xs text-muted-foreground",children:[r.jsx(o,{size:14,className:le("shrink-0",c)}),r.jsx("span",{className:"truncate",children:n}),r.jsx("span",{className:"text-muted-foreground/60",children:t.matches.length})]}),t.matches.map(p=>r.jsxs("button",{type:"button",onClick:()=>Kt(p),title:`${t.path}:${p.line}`,className:"flex w-full items-baseline gap-2 pl-8 pr-3 py-0.5 text-left text-xs hover:bg-accent",children:[r.jsx("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:p.line}),r.jsx(Vr,{text:p.text,query:y})]},`${t.path}:${p.line}`))]},t.path)})]})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[Z.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:Z.map(t=>{const n=_.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,c=d===t,p=t.split("/").pop()??t;return r.jsxs("div",{className:le("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",c?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{x(t),He(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":c,children:[r.jsx("span",{className:"truncate max-w-32",children:p}),o&&r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),r.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:C=>{C.stopPropagation(),Gt(t)},children:r.jsx(Nn,{size:12})})]},t)})}),ae&&r.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:r.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const o=t.currentTarget.elements.namedItem("askAiInput");o.value.trim()&&Yt(o.value)},children:[r.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:w("sandbox.fileExplorer.askTheAiPlaceholder"),className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&he(null)}}),r.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity",title:w("sandbox.fileExplorer.send"),children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[r.jsx("title",{children:w("sandbox.fileExplorer.send")}),r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),r.jsx("div",{className:"flex-1 overflow-hidden",children:d&&de?.loaded?r.jsx(bn,{language:Le(d),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:de.editorValue,path:d,onChange:t=>{const n=d;n&&te(o=>{const c=new Map(o),p=c.get(n);return p&&c.set(n,{...p,editorValue:t??""}),c})},onMount:Xt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{size:20,className:"animate-spin text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},d):d&&!de?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:w("sandbox.fileExplorer.selectFileToEdit")})}),d&&r.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[r.jsx("span",{className:"truncate",children:d}),r.jsxs("span",{children:[w(qt?"sandbox.fileExplorer.modified":"sandbox.fileExplorer.saved")," ","· ",Le(d)]})]})]}),r.jsx(sr,{open:H!==null,mode:H?.mode??"new-file",initialName:H?.mode==="rename"?H.node.name:"",parentLabel:H&&H.mode!=="rename"?H.parentDir==="/"?"/":re(H.parentDir):void 0,isPending:be,onSubmit:t=>Mt(w,t),onOpenChange:t=>{!t&&!be&&oe(null)}}),r.jsx(ar,{deleteTarget:Pe,deleteDirtyPaths:Qt,fsActionPending:be,onOpenChange:t=>{!t&&!be&&Te(null)},onConfirm:t=>{Dt(w,t)}})]})}export{Ga as FileExplorer};
|