decocms 3.85.0 → 3.86.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-kSb-Qf9n.js → AlertCircle-qY5ngKLr.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DO7qF3FR.js → ArrowUpRight-C7uYzZ0Z.js} +1 -1
- package/dist/client/assets/{CheckCircle-D6EE7Hmb.js → CheckCircle-CNYYpNQm.js} +1 -1
- package/dist/client/assets/{ChevronDown-B7wZ2dhC.js → ChevronDown-BVJUps1_.js} +1 -1
- package/dist/client/assets/{ChevronLeft-w56H85iU.js → ChevronLeft-CCp89cqe.js} +1 -1
- package/dist/client/assets/{ChevronRight-BoaGhbkW.js → ChevronRight-MnjJHQHy.js} +1 -1
- package/dist/client/assets/{ChevronUp-CYHUjSzO.js → ChevronUp-CKICjFfX.js} +1 -1
- package/dist/client/assets/{DotsVertical-j1hNgjaQ.js → DotsVertical-Bl5GcKp2.js} +1 -1
- package/dist/client/assets/{Eye-BBp7OFME.js → Eye-C6daRddp.js} +1 -1
- package/dist/client/assets/{FilterLines-DplcErOH.js → FilterLines-B_0u5HAa.js} +1 -1
- package/dist/client/assets/{Globe01-BPaIp2G4.js → Globe01-CgHdNpOL.js} +1 -1
- package/dist/client/assets/{Globe04-BXv8f1DJ.js → Globe04-DEangwXD.js} +1 -1
- package/dist/client/assets/{HardDrive-Cgonccxa.js → HardDrive-V1dbAXdv.js} +1 -1
- package/dist/client/assets/{Key01-amtVh9Pr.js → Key01-B0h1bFlR.js} +1 -1
- package/dist/client/assets/{LayoutLeft-bKhOA729.js → LayoutLeft-BsVzrTOG.js} +1 -1
- package/dist/client/assets/{LinkExternal01-_D0rcHDt.js → LinkExternal01-B9RsD2Us.js} +1 -1
- package/dist/client/assets/{Monitor01-BZ-_RPko.js → Monitor01-DAM-u2R2.js} +1 -1
- package/dist/client/assets/{Palette-EgKDa0_1.js → Palette-DT8p7ZEl.js} +1 -1
- package/dist/client/assets/{Play-DuG-6BxB.js → Play-Blum-MoR.js} +1 -1
- package/dist/client/assets/{Plus-Bzf3CZgl.js → Plus-DfIcHYEj.js} +1 -1
- package/dist/client/assets/{SearchMd-DpMSIAeq.js → SearchMd-B6GaXN7Q.js} +1 -1
- package/dist/client/assets/{Settings02-CDqbYNx0.js → Settings02-Dd9sO-oW.js} +1 -1
- package/dist/client/assets/{Shield01-CjRICO_s.js → Shield01-DLANpVD0.js} +1 -1
- package/dist/client/assets/{Star01-CNNNcPDW.js → Star01-Be_MjtDZ.js} +1 -1
- package/dist/client/assets/{Stars01-C8ysp7a4.js → Stars01-D3ha2IeY.js} +1 -1
- package/dist/client/assets/{Stars02-DXNdBxv2.js → Stars02-DHcW8N80.js} +1 -1
- package/dist/client/assets/{Sun-DhFcEKDD.js → Sun-DO_Gt4P2.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BJs9_RSs.js → SwitchHorizontal01-CrHLIeRP.js} +1 -1
- package/dist/client/assets/{Tool01-CyHE87a1.js → Tool01-hxrY31T7.js} +1 -1
- package/dist/client/assets/{Trash01-cuwi9yy2.js → Trash01-DGJ-LjB-.js} +1 -1
- package/dist/client/assets/{Upload01-Cwtbh8sn.js → Upload01-CzOJ3UuD.js} +1 -1
- package/dist/client/assets/{User01-DqBopRvD.js → User01-DR_UC5XH.js} +1 -1
- package/dist/client/assets/{Users01-Y-KIXecC.js → Users01-cxH39exM.js} +1 -1
- package/dist/client/assets/{Users03-BCQ19tMn.js → Users03-BZYHqQGQ.js} +1 -1
- package/dist/client/assets/{X-CAV77AV6.js → X-CXRx6PGX.js} +1 -1
- package/dist/client/assets/{XCircle-DLfZ2b5u.js → XCircle-BLfqcVud.js} +1 -1
- package/dist/client/assets/{XClose-BMo1vUt2.js → XClose-4ak3u3qT.js} +1 -1
- package/dist/client/assets/{Zap-QgQiv5aC.js → Zap-DVtX-UPi.js} +1 -1
- package/dist/client/assets/{ZapSquare-7E5PpjYg.js → ZapSquare-iu6ldaYZ.js} +1 -1
- package/dist/client/assets/{ZoomOut-Cf_cVqP_.js → ZoomOut-6aWLXLSs.js} +1 -1
- package/dist/client/assets/{access-gate-dwzK5mOl.js → access-gate-B_rz72ZQ.js} +1 -1
- package/dist/client/assets/{add-section-modal-DrXVB8wN.js → add-section-modal-ExcCDC5z.js} +1 -1
- package/dist/client/assets/{agent-icon-DpZrOqHC.js → agent-icon-CKGTD-zQ.js} +1 -1
- package/dist/client/assets/{agents-list-Bg7vmZGo.js → agents-list-DKD78ho4.js} +1 -1
- package/dist/client/assets/{ai-providers-C0c6LA97.js → ai-providers-shPNJ0G8.js} +1 -1
- package/dist/client/assets/{alert-wU-33S6Y.js → alert-DIaLGkVq.js} +1 -1
- package/dist/client/assets/{alert-dialog-7ikXnuZZ.js → alert-dialog-D5KOx-3H.js} +1 -1
- package/dist/client/assets/{app-editor-DWUmTpcU.js → app-editor-CASRPS-o.js} +1 -1
- package/dist/client/assets/{auth-VPD4Z7uj.js → auth-B4fF5n_6.js} +1 -1
- package/dist/client/assets/{auth-catchall-C6AjA3Vu.js → auth-catchall-DS1LbQ8-.js} +1 -1
- package/dist/client/assets/{auth-entry-DPPMuSzX.js → auth-entry-BVyaHjaQ.js} +1 -1
- package/dist/client/assets/{auth-split-layout-YO1B7axf.js → auth-split-layout-BO9g4lYZ.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Dji1uo75.js → authenticate-and-persist-oauth-D2tM_mGL.js} +1 -1
- package/dist/client/assets/{automation-list-row-z5t76XbP.js → automation-list-row-BKx-xx1i.js} +1 -1
- package/dist/client/assets/{automation-runs-Yfeb4HlH.js → automation-runs-_FCeac3K.js} +1 -1
- package/dist/client/assets/{automations-73qOVu58.js → automations-BQ894D8d.js} +1 -1
- package/dist/client/assets/{avatar-BilFqnob.js → avatar-3b85MUU5.js} +1 -1
- package/dist/client/assets/{badge-CnhOrtd9.js → badge-CBy4Rm2Q.js} +1 -1
- package/dist/client/assets/{block-document-DIn-g_CF.js → block-document-BFMWdkuR.js} +1 -1
- package/dist/client/assets/{brand-context-4U6Nr9JH.js → brand-context-DQ3HUqVS.js} +1 -1
- package/dist/client/assets/{buckets-DQ4nmV5k.js → buckets-BJOevXCK.js} +1 -1
- package/dist/client/assets/{capability-load-error-2yYSMEPV.js → capability-load-error-DmenvLwh.js} +1 -1
- package/dist/client/assets/{card-BupjtJkr.js → card-D0ElZuSJ.js} +1 -1
- package/dist/client/assets/category-editor-Ci2DnrkV.js +1 -0
- package/dist/client/assets/{chat-context-D-LKEDCk.js → chat-context-SWJ_FDEf.js} +1 -1
- package/dist/client/assets/{checkbox-DvYZyWAu.js → checkbox-UCOb4UyX.js} +1 -1
- package/dist/client/assets/{cli-auth-success-brusqf5b.js → cli-auth-success-DYcgRZGE.js} +1 -1
- package/dist/client/assets/{collection-detail-B8lnN9v6.js → collection-detail-BLwVko_9.js} +1 -1
- package/dist/client/assets/{collection-display-button-BZUnVOdG.js → collection-display-button-DY7UIm0_.js} +1 -1
- package/dist/client/assets/{collection-search-D5rZ-51v.js → collection-search-B-ZTg2tB.js} +1 -1
- package/dist/client/assets/{collection-tabs-B0DaNRfG.js → collection-tabs-7m5XLASC.js} +1 -1
- package/dist/client/assets/{command-DzaJUoKq.js → command-CKe7nBfr.js} +1 -1
- package/dist/client/assets/commerce-onboarding-DpB8M1dk.js +1 -0
- package/dist/client/assets/{connect-desktop-dialog-CxAamCFt.js → connect-desktop-dialog-JUjDMHMz.js} +1 -1
- package/dist/client/assets/{connection-card-D_O9kugK.js → connection-card-By0LggNB.js} +1 -1
- package/dist/client/assets/{connection-detail-D5TH7cy3.js → connection-detail-BEiO-h95.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DU4oKsTL.js → connection-form-helpers-DeSC5iva.js} +1 -1
- package/dist/client/assets/{connections-DfQE4LTl.js → connections-DJCB8L8S.js} +1 -1
- package/dist/client/assets/{context-menu-BFA3p3qP.js → context-menu-BXRYPu2v.js} +1 -1
- package/dist/client/assets/{decopilot-DhIm-t3i.js → decopilot-DBiOjpCq.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-ml_VBwzU.js → decopilot-sse-pool-Cd7s5cwH.js} +1 -1
- package/dist/client/assets/{dialog-B30hErlE.js → dialog-CwfeALzq.js} +1 -1
- package/dist/client/assets/{domain-settings-C9IxTuyl.js → domain-settings-DYoOK4LM.js} +1 -1
- package/dist/client/assets/{drawer-Bj3LFkPG.js → drawer-_RQmWfAo.js} +1 -1
- package/dist/client/assets/{dropdown-menu-5g8UZmyj.js → dropdown-menu-CppAWsT_.js} +1 -1
- package/dist/client/assets/{empty-state-DWNpCwVC.js → empty-state-CfAeMInj.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DrZwJcIT.js → extract-connection-data-qW230rJb.js} +1 -1
- package/dist/client/assets/{file-explorer-CF2Py8oA.js → file-explorer-DZMbkqJ0.js} +1 -1
- package/dist/client/assets/{file-type-icon-Pm9PbUF4.js → file-type-icon-CdZyaTKH.js} +1 -1
- package/dist/client/assets/{files-DkYnOioo.js → files-BagYqqvX.js} +1 -1
- package/dist/client/assets/{form-MhNC6i_S.js → form-xYXw--Kt.js} +1 -1
- package/dist/client/assets/{general-C4QbPzLU.js → general-C27Cwywq.js} +1 -1
- package/dist/client/assets/{github-repo-picker-Cs40-k2n.js → github-repo-picker-B1nNLNvt.js} +1 -1
- package/dist/client/assets/{hooks-BqHMEBso.js → hooks-CLt3SUb8.js} +1 -1
- package/dist/client/assets/{import-from-deco-dialog-CVgt0-G4.js → import-from-deco-dialog-DhVDGeAO.js} +1 -1
- package/dist/client/assets/{index-Ck9t634o.js → index-B7l76Ktp.js} +1 -1
- package/dist/client/assets/{index-Bc8WGxSb.js → index-BSzVFCV6.js} +1 -1
- package/dist/client/assets/{index-DrV1JIHB.js → index-Benu0NlA.js} +1 -1
- package/dist/client/assets/{index-DdNGdbnY.js → index-C6ZVo7HH.js} +1 -1
- package/dist/client/assets/{index-hyUxIDvS.js → index-CCbaPbk-.js} +1 -1
- package/dist/client/assets/{index-BrmbqrUl.js → index-CLz5uOtD.js} +1 -1
- package/dist/client/assets/index-Cey8outX.js +1 -0
- package/dist/client/assets/{index-AbZbF42n.js → index-D7pI5IpD.js} +1 -1
- package/dist/client/assets/{index-BLr2UsaQ.js → index-D9MBRSbh.js} +1 -1
- package/dist/client/assets/{index-BOEUnQ16.js → index-DILk6pqr.js} +4 -4
- package/dist/client/assets/{index-BJ1ODhMv.js → index-DkOvgjMe.js} +1 -1
- package/dist/client/assets/{index-B6nON9DX.js → index-U2AV4b0H.js} +1 -1
- package/dist/client/assets/{index-BtDGPznl.js → index-Yqaph2kh.js} +5 -5
- package/dist/client/assets/{index-redirect-XcL-ml-y.js → index-redirect-Bmnv-CEe.js} +1 -1
- package/dist/client/assets/{index-B76DB1P0.js → index-uKLTzwtC.js} +1 -1
- package/dist/client/assets/{input-Dpm-wjc8.js → input-DntqEqec.js} +1 -1
- package/dist/client/assets/{integration-icon-BUHEF2ai.js → integration-icon-CxxjWIPp.js} +1 -1
- package/dist/client/assets/{label-C11ohVz9.js → label-NJtv9Xrj.js} +1 -1
- package/dist/client/assets/{login-DFiyGNGQ.js → login-_rldC1vQ.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DWd1pMWO.js → mcp-oauth-BTUV7ht5.js} +1 -1
- package/dist/client/assets/{members-CFXNQnTx.js → members-DNPmSt7U.js} +1 -1
- package/dist/client/assets/{monaco-editor-7djoupdn.js → monaco-editor-BS1tOSHv.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Bqm5gSwW.js → monitoring-stats-row-Bly7CEZA.js} +1 -1
- package/dist/client/assets/{oauth-callback-BRUV_K7d.js → oauth-callback-Brn-4X2e.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-D5_xUt9B.js → oauth-callback-ai-provider-DX668UtX.js} +1 -1
- package/dist/client/assets/{onboarding-DFgMcL7V.js → onboarding-h3gvqE97.js} +1 -1
- package/dist/client/assets/{org-install-RVefq5zO.js → org-install-devOK14U.js} +1 -1
- package/dist/client/assets/{org-layout-UxxOtZwR.js → org-layout-C6RX2zdp.js} +1 -1
- package/dist/client/assets/{organization-choice-BBNm1Zea.js → organization-choice-DFUlgHk4.js} +1 -1
- package/dist/client/assets/{page-seo-form-DStYa5Yd.js → page-seo-form-DIlFQufm.js} +1 -1
- package/dist/client/assets/page-seo-sheet-BsYTh7m4.js +1 -0
- package/dist/client/assets/{popover-B9SXnqeu.js → popover-DmLzbFpk.js} +1 -1
- package/dist/client/assets/{post-editor-CGe3vqd5.js → post-editor-msU8kMVE.js} +1 -1
- package/dist/client/assets/{preview-dialog-C6zO3v13.js → preview-dialog-XKGBZobL.js} +1 -1
- package/dist/client/assets/{primitives-BT8lOwN-.js → primitives-pW0ukQfP.js} +1 -1
- package/dist/client/assets/{profile-BQWgKCr1.js → profile-Cq_Bww2z.js} +1 -1
- package/dist/client/assets/project-app-view-DjSLRXjX.js +1 -0
- package/dist/client/assets/record-editor-SpOTRD39.js +1 -0
- package/dist/client/assets/registry-BYRguUOn.js +2 -0
- package/dist/client/assets/{registry-layout-COGwx3kA.js → registry-layout-CQVApMRy.js} +1 -1
- package/dist/client/assets/{require-capability-DlaNYwHw.js → require-capability-BlqPTqxe.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DO6Nx9kv.js → required-auth-layout-DdFOKjMd.js} +1 -1
- package/dist/client/assets/{reset-password-VN70aXvV.js → reset-password-C7ldICgc.js} +1 -1
- package/dist/client/assets/{roles-DJaHr3Z6.js → roles-DqqpBRsM.js} +1 -1
- package/dist/client/assets/{save-status-DD-9wzkt.js → save-status-DIZcxleS.js} +1 -1
- package/dist/client/assets/{scroll-area-BzQVputN.js → scroll-area-CN3_YfBC.js} +1 -1
- package/dist/client/assets/{search-input-C_LdLAhh.js → search-input-SieA9wsp.js} +1 -1
- package/dist/client/assets/{secrets-B50Gk-u6.js → secrets-B2XOt0uB.js} +1 -1
- package/dist/client/assets/{sections-editor-B1kfE044.js → sections-editor-B8F8gKNp.js} +1 -1
- package/dist/client/assets/{select-CsnP3MmZ.js → select-DeFnLWdd.js} +1 -1
- package/dist/client/assets/{select-model-o0S7EeOg.js → select-model-DmLcnpxY.js} +1 -1
- package/dist/client/assets/{seo-editor-BuBZosv_.js → seo-editor-nfDAcvV7.js} +1 -1
- package/dist/client/assets/{settings-layout-DEjnBHYc.js → settings-layout-DStO9uhp.js} +1 -1
- package/dist/client/assets/{settings-section-BKFAq9Na.js → settings-section-BXkrjyua.js} +1 -1
- package/dist/client/assets/{sheet-DLBJgbkz.js → sheet-CgvO6KT7.js} +1 -1
- package/dist/client/assets/{shell-controls-QTD9LYan.js → shell-controls-BlCSLJCZ.js} +1 -1
- package/dist/client/assets/{shell-layout-CV0GLE78.js → shell-layout-DAyf8ZZZ.js} +1 -1
- package/dist/client/assets/{shell-route-loading-8TPt5XME.js → shell-route-loading-44H3A_LH.js} +1 -1
- package/dist/client/assets/{sidebar-9Hq5AiMq.js → sidebar-D5TdEONj.js} +1 -1
- package/dist/client/assets/{skeleton-BX3snBo3.js → skeleton-DUdp3Kvb.js} +1 -1
- package/dist/client/assets/{sortable.esm-Dmt85o3z.js → sortable.esm-DdDX2lbe.js} +1 -1
- package/dist/client/assets/{sso-DOXWomrs.js → sso-DFI00-8p.js} +1 -1
- package/dist/client/assets/{store-cyYkNlRT.js → store-CrUgJduQ.js} +1 -1
- package/dist/client/assets/store-registry-DOL4KgkC.js +2 -0
- package/dist/client/assets/{studio-tools-DqnmzWTT.js → studio-tools-DWzikkvB.js} +1 -1
- package/dist/client/assets/{switch-BmATXWHQ.js → switch-ZSF60LRT.js} +1 -1
- package/dist/client/assets/{table-R8mTvnKd.js → table-CAdy-hg6.js} +1 -1
- package/dist/client/assets/{tabs-DEhvH9u3.js → tabs-CVnN0f33.js} +1 -1
- package/dist/client/assets/{task-status-CfLGns02.js → task-status-CtOjrZ5U.js} +1 -1
- package/dist/client/assets/{textarea--_U2p1mn.js → textarea-Fs50NfWG.js} +1 -1
- package/dist/client/assets/{toggle-group-Bx5PBwdQ.js → toggle-group-C7SpEcqz.js} +1 -1
- package/dist/client/assets/{toolbar-DSevsKah.js → toolbar-Dp05iiiH.js} +1 -1
- package/dist/client/assets/{tooltip-C73vGx59.js → tooltip-DNJ6cRlV.js} +1 -1
- package/dist/client/assets/{types-DO14PvKA.js → types-CsHe6BgD.js} +1 -1
- package/dist/client/assets/{use-ai-providers-yJM6WuqN.js → use-ai-providers-CVKwKs8r.js} +1 -1
- package/dist/client/assets/{use-automations-bWic0132.js → use-automations-Ca6VluJ_.js} +1 -1
- package/dist/client/assets/{use-capability-ChkIe373.js → use-capability-OLvFRh1U.js} +1 -1
- package/dist/client/assets/{use-clock-tick-Bot0OsMN.js → use-clock-tick-CWHp6nCX.js} +1 -1
- package/dist/client/assets/{use-collections-3DlhnXiC.js → use-collections-D0HN84Lz.js} +1 -1
- package/dist/client/assets/{use-connection-BiUFPmfA.js → use-connection-Bj1m8ynL.js} +1 -1
- package/dist/client/assets/{use-copy-CcxJwita.js → use-copy-CuQAt0Vj.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Dqho5EP1.js → use-create-virtual-mcp-Cxqyw0Tn.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DSFTYcH3.js → use-debounced-autosave-OpSLLz7d.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CoUkrXQf.js → use-delete-connection-ARKHDNqJ.js} +1 -1
- package/dist/client/assets/{use-file-configs-Dqlf9DaL.js → use-file-configs-aDA6u1U_.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-D_WRvqma.js → use-infinite-scroll-CCIuAqs7.js} +1 -1
- package/dist/client/assets/{use-join-requests-D2c_aqmO.js → use-join-requests-CyAP3Yln.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Da9sRmnt.js → use-mcp-client-BdmHrvF5.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BR2gK5kG.js → use-mcp-prompts-BwQLmLZi.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BxfXWcZE.js → use-mcp-tools-ChlFTYss.js} +1 -1
- package/dist/client/assets/{use-members-BIa_9h_X.js → use-members-9pMsaLP9.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-xTXQLL0h.js → use-navigate-to-agent-Qyyx-mm9.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BDAU6HTq.js → use-org-auth-client-CtaccGLo.js} +1 -1
- package/dist/client/assets/{use-org-sso-B6kdlgAy.js → use-org-sso-DvlbibgX.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BX50nDlN.js → use-organization-roles-CYiD53yX.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BCuQxu_g.js → use-organization-settings-a8PuTrsa.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Dma9pkbk.js → use-registry-connections-DZ1G13oh.js} +1 -1
- package/dist/client/assets/{use-secrets-MPq-p0HU.js → use-secrets-GRgGPWUb.js} +1 -1
- package/dist/client/assets/{use-status-sounds-JpgLlu6G.js → use-status-sounds-DMne2oqE.js} +1 -1
- package/dist/client/assets/{use-view-mode-lXi8BbkK.js → use-view-mode-CslUtkLV.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BI80r96t.js → use-virtual-mcp-OPb4DVO0.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-D-pnegbi.js +1 -0
- package/dist/client/assets/useQueries-BD3bwl6B.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-_rNdlYkE.js +1 -0
- package/dist/client/assets/{variant-calendar-mtIxux65.js → variant-calendar-DAwCBXUq.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BU7s5ppH.js → view-mode-toggle-k-q_tsqg.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +153 -153
- package/package.json +1 -1
- package/dist/client/assets/category-editor-DjzSsPiv.js +0 -1
- package/dist/client/assets/commerce-onboarding-CIOAcULX.js +0 -1
- package/dist/client/assets/index-Cm6FEMsc.js +0 -1
- package/dist/client/assets/page-seo-sheet-DLy3EY9b.js +0 -1
- package/dist/client/assets/project-app-view-D8p1EFEF.js +0 -1
- package/dist/client/assets/record-editor-CAriaoZY.js +0 -1
- package/dist/client/assets/registry-BCPdGeOr.js +0 -2
- package/dist/client/assets/store-registry-QeJLGvSb.js +0 -2
- package/dist/client/assets/useInfiniteQuery-qXZpzYgW.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-8AoK9WIm.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as y,j as t,B as F,i as X,z as Ge,C as se,E as Pe,r as T,w as ie,G as Qe,l as V,bf as Ye,u as Xe,y as G,t as Ze,e as ae,b1 as ke}from"./index-BOEUnQ16.js";import{E as Ee}from"./empty-state-DWNpCwVC.js";import{u as et,a as Ae}from"./use-collections-3DlhnXiC.js";import{u as ce}from"./use-mcp-client-Da9sRmnt.js";import{F as ne,a as tt,b as de,d as me}from"./form-MhNC6i_S.js";import{I as ue}from"./input-Dpm-wjc8.js";import{T as re}from"./textarea--_U2p1mn.js";import{a as st,b as nt,V as xe,O as ot,M as lt}from"./index-Bc8WGxSb.js";import{ag as rt,x as it,a5 as at,ah as ct,a1 as dt,ai as mt,M as be}from"./agent-icon-DpZrOqHC.js";import{g as ut,M as xt,a as Ne}from"./types-DO14PvKA.js";import{A as pt,a as ft,b as ht}from"./alert-wU-33S6Y.js";import{d as ve,b as Se,c as ye,S as we,a as oe}from"./select-CsnP3MmZ.js";import{c as gt,b as Ce,T as Ie,a as $e}from"./tooltip-C73vGx59.js";import{i as jt}from"./AlertCircle-kSb-Qf9n.js";import{s as bt}from"./Stars02-DXNdBxv2.js";import{a as Nt}from"./Eye-BBp7OFME.js";import{i as vt}from"./Play-DuG-6BxB.js";import{i as St}from"./ChevronRight-BoaGhbkW.js";import{g as yt}from"./connection-slug-eyAPH6o3.js";import{u as wt,T as Ct}from"./index-DdNGdbnY.js";import{a as Oe,u as Re}from"./use-connection-BiUFPmfA.js";import{a as It}from"./use-mcp-tools-BxfXWcZE.js";import{c as $t}from"./content-blocks-o63cs2vh.js";import{I as Te}from"./integration-icon-BUHEF2ai.js";import{f as Tt,h as Pt}from"./chat-context-D-LKEDCk.js";import{b as kt}from"./shell-layout-CV0GLE78.js";import{M as Et}from"./monaco-editor-7djoupdn.js";import{n as At}from"./XCircle-DLfZ2b5u.js";import"./auth-VPD4Z7uj.js";import"./label-C11ohVz9.js";import"./index-AbZbF42n.js";import"./sidebar-9Hq5AiMq.js";import"./LayoutLeft-bKhOA729.js";import"./sheet-DLBJgbkz.js";import"./X-CAV77AV6.js";import"./ZoomOut-Cf_cVqP_.js";import"./Key01-amtVh9Pr.js";import"./extract-connection-data-DrZwJcIT.js";import"./use-registry-connections-Dma9pkbk.js";import"./use-organization-settings-BCuQxu_g.js";import"./studio-tools-DqnmzWTT.js";import"./Plus-Bzf3CZgl.js";import"./index-BrmbqrUl.js";import"./index-DrV1JIHB.js";import"./popover-B9SXnqeu.js";import"./use-virtual-mcp-BI80r96t.js";import"./ChevronUp-CYHUjSzO.js";import"./SearchMd-DpMSIAeq.js";import"./Users03-BCQ19tMn.js";import"./use-create-virtual-mcp-Dqho5EP1.js";import"./use-navigate-to-agent-xTXQLL0h.js";import"./Tool01-CyHE87a1.js";import"./SwitchHorizontal01-BJs9_RSs.js";import"./Settings02-CDqbYNx0.js";import"./ArrowUpRight-DO7qF3FR.js";import"./ZapSquare-7E5PpjYg.js";import"./CheckCircle-D6EE7Hmb.js";import"./ChevronDown-B7wZ2dhC.js";import"./ChevronLeft-w56H85iU.js";import"./DotsVertical-j1hNgjaQ.js";import"./Globe01-BPaIp2G4.js";import"./FilterLines-DplcErOH.js";import"./Star01-CNNNcPDW.js";import"./Globe04-BXv8f1DJ.js";import"./HardDrive-Cgonccxa.js";import"./LinkExternal01-_D0rcHDt.js";import"./Monitor01-BZ-_RPko.js";import"./Sun-DhFcEKDD.js";import"./Palette-EgKDa0_1.js";import"./Shield01-CjRICO_s.js";import"./Stars01-C8ysp7a4.js";import"./Trash01-cuwi9yy2.js";import"./Upload01-Cwtbh8sn.js";import"./User01-DqBopRvD.js";import"./Users01-Y-KIXecC.js";import"./XClose-BMo1vUt2.js";import"./Zap-QgQiv5aC.js";import"./mcp-oauth-DWd1pMWO.js";import"./badge-CnhOrtd9.js";import"./hooks-BqHMEBso.js";import"./decopilot-sse-pool-ml_VBwzU.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-yJM6WuqN.js";import"./tab-id-BptcWVWa.js";import"./avatar-BilFqnob.js";import"./dialog-B30hErlE.js";import"./required-auth-layout-DO6Nx9kv.js";import"./use-org-sso-B6kdlgAy.js";import"./index-B76DB1P0.js";function Ot(s){const e=y.c(15),{onSave:o,onUndo:n,isDirty:l,isSaving:r,saveLabel:a,undoLabel:c}=s,i=a===void 0?"Save":a,u=c===void 0?"Undo":c;if(!l)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14}),e[0]=x):x=e[0];let m;e[1]!==r||e[2]!==n||e[3]!==u?(m=t.jsxs(F,{variant:"outline",size:"sm",onClick:n,disabled:r,"aria-label":u,children:[x,u]}),e[1]=r,e[2]=n,e[3]=u,e[4]=m):m=e[4];let p;e[5]!==r?(p=r?t.jsx(X,{size:14,className:"animate-spin"}):t.jsx(it,{size:14}),e[5]=r,e[6]=p):p=e[6];let f;e[7]!==r||e[8]!==o||e[9]!==i||e[10]!==p?(f=t.jsxs(F,{variant:"default",size:"sm",onClick:o,disabled:r,"aria-label":i,children:[p,i]}),e[7]=r,e[8]=o,e[9]=i,e[10]=p,e[11]=f):f=e[11];let g;return e[12]!==m||e[13]!==f?(g=t.jsxs(t.Fragment,{children:[m,f]}),e[12]=m,e[13]=f,e[14]=g):g=e[14],g}Ge({title:se().min(1),description:se().nullable(),body:se()});function le(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Rt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function _t(s){const e=y.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let l;e[1]!==o.control?(l=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(ne,{control:o.control,name:"title",render:Dt}),t.jsx(ne,{control:o.control,name:"description",render:zt})]})]}),e[1]=o.control,e[2]=l):l=e[2];let r,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=a):(r=e[3],a=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[r,a,t.jsx(ne,{control:o.control,name:"body",render:Mt})]}),e[5]=o.control,e[6]=c):c=e[6];let i;e[7]!==l||e[8]!==c?(i=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[l,c]}),e[7]=l,e[8]=c,e[9]=i):i=e[9];let u;return e[10]!==o||e[11]!==i?(u=t.jsx(tt,{...o,children:i}),e[10]=o,e[11]=i,e[12]=u):u=e[12],u}function Mt(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function zt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Lt(s){const e=y.c(36),{providerId:o,promptId:n}=s,{org:l}=ie(),r=o||null;let a;e[0]!==l.id||e[1]!==l.slug||e[2]!==r?(a={connectionId:r,orgId:l.id,orgSlug:l.slug},e[0]=l.id,e[1]=l.slug,e[2]=r,e[3]=a):a=e[3];const c=ce(a),i=et(o,"PROMPT",n,c),u=Ae(o,"PROMPT",c),x=u.update.isPending;let m;e[4]!==i?(m=i?{title:i.title,description:i.description??null,body:le(i)}:void 0,e[4]=i,e[5]=m):m=e[5];let p;e[6]!==m?(p={values:m},e[6]=m,e[7]=p):p=e[7];const f=Qe(p);let g;e[8]!==f||e[9]!==i?(g=()=>{i&&f.reset({title:i.title,description:i.description??null,body:le(i)})},e[8]=f,e[9]=i,e[10]=g):g=e[10];const S=g;let I;e[11]!==u.update||e[12]!==f||e[13]!==n?(I=f.handleSubmit(async N=>{const A=await u.update.mutateAsync({id:n,data:{title:N.title,description:N.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:N.body}}]}});f.reset({title:A.title,description:A.description??null,body:le(A)})}),e[11]=u.update,e[12]=f,e[13]=n,e[14]=I):I=e[14];const R=I;if(!i){let N;return e[15]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=N):N=e[15],N}let $;e[16]!==i.title?($=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[16]=i.title,e[17]=$):$=e[17];let E;e[18]!==i.description?(E=i.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:i.description})]}):null,e[18]=i.description,e[19]=E):E=e[19];let P;e[20]!==$||e[21]!==E?(P=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[$,E]})}),e[20]=$,e[21]=E,e[22]=P):P=e[22];let b;e[23]!==R?(b=()=>{R()},e[23]=R,e[24]=b):b=e[24];let w;e[25]!==f.formState.isDirty||e[26]!==x||e[27]!==S||e[28]!==b?(w=t.jsx(st,{children:t.jsx(Ot,{onSave:b,onUndo:S,isDirty:f.formState.isDirty,isSaving:x})}),e[25]=f.formState.isDirty,e[26]=x,e[27]=S,e[28]=b,e[29]=w):w=e[29];let C;e[30]!==f?(C=t.jsx("div",{className:"h-full",children:t.jsx(_t,{form:f})}),e[30]=f,e[31]=C):C=e[31];let k;return e[32]!==w||e[33]!==C||e[34]!==P?(k=t.jsxs(xe,{children:[P,w,C]}),e[32]=w,e[33]=C,e[34]=P,e[35]=k):k=e[35],k}function Ut(s){const e=y.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Rt(),e[0]=n):n=e[0];const l=n;if(!l){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let r;return e[2]!==o?(r=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:null,children:t.jsx(Lt,{providerId:l,promptId:o})})}),e[2]=o,e[3]=r):r=e[3],r}function _e(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("min-w-0 overflow-hidden",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Me(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("ol",{"data-slot":"breadcrumb-list",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function q(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("li",{"data-slot":"breadcrumb-item",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Q(s){const e=y.c(10);let o,n,l;e[0]!==s?({asChild:o,className:n,...l}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=l):(o=e[1],n=e[2],l=e[3]);const r=o?Ye:"a";let a;e[4]!==n?(a=V("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==r||e[7]!==l||e[8]!==a?(c=t.jsx(r,{"data-slot":"breadcrumb-link",className:a,...l}),e[6]=r,e[7]=l,e[8]=a,e[9]=c):c=e[9],c}function ze(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("text-foreground font-medium truncate",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Y(s){const e=y.c(12);let o,n,l;e[0]!==s?({children:o,className:n,...l}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=l):(o=e[1],n=e[2],l=e[3]);let r;e[4]!==n?(r=V("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=r):r=e[5];let a;e[6]!==o?(a=o??t.jsx(St,{}),e[6]=o,e[7]=a):a=e[7];let c;return e[8]!==l||e[9]!==r||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:r,...l,children:a}),e[8]=l,e[9]=r,e[10]=a,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ft(s){const e=y.c(11),{toolName:o,connectionId:n,siblings:l,onSelectInstance:r,onBack:a}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const i=wt(c);if(!i.isAuthenticated){let m;return e[2]!==i.supportsOAuth||e[3]!==a?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:i.supportsOAuth?t.jsx(ot,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(lt,{hasReadme:!1})}),e[2]=i.supportsOAuth,e[3]=a,e[4]=m):m=e[4],m}const u=`${n}:${o}`;let x;return e[5]!==n||e[6]!==r||e[7]!==l||e[8]!==u||e[9]!==o?(x=t.jsx(Vt,{toolName:o,connectionId:n,siblings:l,onSelectInstance:r},u),e[5]=n,e[6]=r,e[7]=l,e[8]=u,e[9]=o,e[10]=x):x=e[10],x}function Vt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:l}=Xe({strict:!1}),r=(()=>{if(!l)return null;const d=`replay-${l}`,h=sessionStorage.getItem(d);if(!h)return null;sessionStorage.removeItem(d);try{return JSON.parse(h)}catch{return null}})(),a=(()=>{if(!r)return null;const d={};for(const[h,v]of Object.entries(r))v!==null&&typeof v=="object"?d[h]=JSON.stringify(v,null,2):d[h]=v;return d})(),[c,i]=T.useState(a??{}),[u,x]=T.useState(r?JSON.stringify(r,null,2):"{}"),[m,p]=T.useState(null),[f,g]=T.useState(null),[S,I]=T.useState(null),[R,$]=T.useState(null),[E,P]=T.useState(!1),[b,w]=T.useState(null),{org:C}=ie(),k=Oe(e),N=Tt(),A=Pt(),{setChatOpen:U}=kt(),D=`${e}:${s}`,_=ce({connectionId:e,orgId:C.id,orgSlug:C.slug}),L=It({client:_}),j=L.data?.tools?.find(d=>d.name===s),O=ut(j?._meta),J=d=>{if(!N)return;const h=$t(d.content);h.content.length>0&&(U(!0),N.sendMessage({tiptapDoc:h}))},[M,Z]=T.useState("json"),[De,Le]=T.useState(!1);O&&!De&&(Z("ui"),Le(!0));const pe=j?.inputSchema?.properties,fe=pe?Object.keys(pe):[],H=fe.length>0,K={};if(H&&j?.inputSchema?.properties)for(const d of fe)K[d]=j.inputSchema.required?.includes(d)?"":void 0;const ee=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{P(!0),$(null),p(null),g(null),I(null),w(null);const d=performance.now();try{if(!_)throw new Error("MCP client is not available");const h=H?{...K,...c}:(()=>{const z=u.trim();if(!z)return{};const B=JSON.parse(z);if(B&&typeof B=="object")return B;throw new Error("Raw JSON input must be an object.")})();H&&j?.inputSchema?.properties&&Object.entries(j.inputSchema.properties).forEach(([z,B])=>{if((B.type==="object"||B.type==="array")&&typeof h[z]=="string")try{h[z]=JSON.parse(h[z])}catch{}else if((B.type==="number"||B.type==="integer")&&typeof h[z]=="string"&&h[z]!==""){const je=Number(h[z]);Number.isNaN(je)||(h[z]=je)}});const v=await _.callTool({name:s,arguments:h}),W=v.structuredContent??v,He=performance.now(),Ke=Math.round(He-d);p(W),g(v),I(h);const We=JSON.stringify(W),ge=new TextEncoder().encode(We).length;w({duration:`${Ke}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(h){const v=h instanceof Error?h.message:String(h);$(v||"Unknown error occurred");const W=performance.now();w({duration:`${Math.round(W-d)}ms`})}finally{P(!1)}},te=(d,h)=>{i(v=>({...v,[d]:h}))},Be=()=>{p(null),g(null),I(null),$(null),w(null)},Fe=j?.name??Bt(s),Ve=t.jsx(_e,{children:t.jsxs(Me,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:C.slug},children:"Connections"})})}),t.jsx(Y,{}),k&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:C.slug,appSlug:yt(k)},search:{tab:"tools"},children:k.title})})}),t.jsx(Y,{})]}),t.jsx(q,{children:t.jsx(ze,{children:Fe})})]})}),he=o.length>1&&t.jsxs(ve,{value:e,onValueChange:n,children:[t.jsx(Se,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ye,{})}),t.jsx(we,{children:o.map(d=>t.jsx(oe,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Te,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Je=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),j?.inputSchema?.required&&j.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:H&&j?.inputSchema?.properties?Object.entries(j.inputSchema.properties).map(([d,h])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[d,j.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(re,{className:"font-mono text-xs",value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):h.type==="boolean"?t.jsxs(ve,{value:ee(d)?String(c[d]??""):"",onValueChange:v=>te(d,v==="true"),children:[t.jsx(Se,{children:t.jsx(ye,{placeholder:"Select true or false..."})}),t.jsxs(we,{children:[t.jsx(oe,{value:"true",children:"true"}),t.jsx(oe,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d}...`})]},d)):j?.inputSchema&&!H?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(re,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:d=>x(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:E?t.jsxs(F,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Be,children:[t.jsx(at,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(F,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(vt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),qe=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(bt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ct,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(dt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),O&&t.jsx(gt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("ui"),children:t.jsx(mt,{size:14})})}),t.jsx($e,{children:"Interactive view"})]}),t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("json"),children:t.jsx(be,{size:14})})}),t.jsx($e,{children:"JSON view"})]})]})})]})]}),R&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(pt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(jt,{className:"h-4 w-4"}),t.jsx(ft,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(ht,{className:"text-xs text-destructive",children:R})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:O&&M==="ui"&&_?t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(xt,{resourceURI:O,toolInfo:j?{tool:j}:void 0,toolInput:S??void 0,toolResult:f??void 0,displayMode:"fullscreen",minHeight:Ne.view.minHeight,maxHeight:Ne.view.maxHeight,client:_,onMessage:J,onUpdateModelContext:d=>A?.setAppContext(D,d),onTeardown:()=>A?.clearAppContext(D),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(Et,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(F,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),Ze.success("Copied to clipboard")},children:t.jsx(Nt,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(be,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(xe,{breadcrumb:Ve,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Te,{icon:k?.icon||null,name:k?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[L.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):L.isLoading?t.jsx(X,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:L.isSuccess?"ready":L.isLoading?"connecting":"error"})]}),t.jsx(Ct,{annotations:j?.annotations,_meta:j?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:j?.description||"No description available"})]}),o.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:"Instance"}),he]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Je}),qe]})})]})})}function Jt(s){const e=y.c(10),{itemId:o,siblings:n,onBack:l}=s,[r,a]=T.useState(n[0]?.id??"");let c;e[0]!==r||e[1]!==n?(c=n.find(p=>p.id===r)?.id??n[0]?.id??"",e[0]=r,e[1]=n,e[2]=c):c=e[2];const i=c;if(!Oe(i||void 0)||!i){let p;return e[3]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=p):p=e[3],p}let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=x):x=e[4];let m;return e[5]!==i||e[6]!==l||e[7]!==n||e[8]!==o?(m=t.jsx(T.Suspense,{fallback:x,children:t.jsx(Ft,{toolName:o,connectionId:i,siblings:n,onSelectInstance:a,onBack:l})}),e[5]=i,e[6]=l,e[7]=n,e[8]=o,e[9]=m):m=e[9],m}function qt(s){const e=y.c(21),{icon:o,illustration:n,title:l,description:r,buttonProps:a,buttonComponent:c,className:i,children:u}=s;let x;e[0]!==i?(x=V("flex flex-col items-center justify-center py-16 text-center",i),e[0]=i,e[1]=x):x=e[1];let m;e[2]!==o||e[3]!==n?(m=n?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:n}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=n,e[4]=m):m=e[4];let p;e[5]!==l?(p=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:l}),e[5]=l,e[6]=p):p=e[6];let f;e[7]!==r?(f=r&&t.jsx("div",{className:"text-sm text-muted-foreground",children:r}),e[7]=r,e[8]=f):f=e[8];let g;e[9]!==p||e[10]!==f?(g=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[p,f]}),e[9]=p,e[10]=f,e[11]=g):g=e[11];let S;e[12]!==c||e[13]!==a?(S=(c??a)&&t.jsx("div",{className:"mt-4",children:c??(a&&t.jsx(F,{size:"sm",className:V(a?.className),...a}))}),e[12]=c,e[13]=a,e[14]=S):S=e[14];let I;return e[15]!==u||e[16]!==x||e[17]!==m||e[18]!==g||e[19]!==S?(I=t.jsxs("div",{className:x,children:[m,g,S,u]}),e[15]=u,e[16]=x,e[17]=m,e[18]=g,e[19]=S,e[20]=I):I=e[20],I}const Ht={prompt:Ut};function Kt(){const s=y.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),l=decodeURIComponent(n.itemId);let r;s[1]!==n.appSlug?(r={slug:n.appSlug},s[1]=n.appSlug,s[2]=r):r=s[2];const a=Re(r);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const i=c,u=Wt;let x;return s[5]!==i||s[6]!==l||s[7]!==a?(x=t.jsx(Jt,{itemId:l,siblings:a,onBack:i,onUpdate:u}),s[5]=i,s[6]=l,s[7]=a,s[8]=x):x=s[8],x}async function Wt(s){return Promise.resolve()}function Gt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=y.c(41),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),l=decodeURIComponent(n.collectionName),r=decodeURIComponent(n.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:i}=ie();let u;s[3]!==n.appSlug?(u={slug:n.appSlug},s[3]=n.appSlug,s[4]=u):u=s[4];const m=Re(u)[0]??null,p=m?.id??"",f=p||"no-connection",g=p??null;let S;s[5]!==i.id||s[6]!==i.slug||s[7]!==g?(S={connectionId:g,orgId:i.id,orgSlug:i.slug},s[5]=i.id,s[6]=i.slug,s[7]=g,s[8]=S):S=s[8];const I=ce(S),R=Ae(f,l,I);let $;s[9]!==R||s[10]!==r?($=async M=>{r&&await R.update.mutateAsync({id:r,data:M})},s[9]=R,s[10]=r,s[11]=$):$=s[11];const E=$;let P;s[12]!==l?(P=l?.toLowerCase(),s[12]=l,s[13]=P):P=s[13];const b=P,w=b&&Ht[b];let C;s[14]!==l?(C=Gt(l),s[14]=l,s[15]=C):C=s[15];const k=C;let N;s[16]!==i.slug?(N=t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:i.slug},children:"Connections"})})}),s[16]=i.slug,s[17]=N):N=s[17];let A;s[18]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Y,{}),s[18]=A):A=s[18];let U;s[19]!==l||s[20]!==m||s[21]!==i.slug||s[22]!==n.appSlug?(U=m&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:n.appSlug},search:{tab:l},children:m.title})})}),t.jsx(Y,{})]}),s[19]=l,s[20]=m,s[21]=i.slug,s[22]=n.appSlug,s[23]=U):U=s[23];let D;s[24]!==k?(D=t.jsx(q,{children:t.jsx(ze,{children:k})}),s[24]=k,s[25]=D):D=s[25];let _;s[26]!==U||s[27]!==D||s[28]!==N?(_=t.jsx(_e,{children:t.jsxs(Me,{children:[N,A,U,D]})}),s[26]=U,s[27]=D,s[28]=N,s[29]=_):_=s[29];const L=_;if(w){let M;return s[30]!==w||s[31]!==c||s[32]!==E||s[33]!==r?(M=t.jsx(w,{itemId:r,onBack:c,onUpdate:E}),s[30]=w,s[31]=c,s[32]=E,s[33]=r,s[34]=M):M=s[34],M}let j;s[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(At,{size:36,className:"text-muted-foreground"}),s[35]=j):j=s[35];let O;s[36]!==c?(O=t.jsx(qt,{icon:j,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=O):O=s[37];let J;return s[38]!==L||s[39]!==O?(J=t.jsx(xe,{breadcrumb:L,children:O}),s[38]=L,s[39]=O,s[40]=J):J=s[40],J}function Yt(){const s=y.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Kt,{}),s[1]=a):a=s[1],a}let r;return s[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Qt,{}),s[2]=r):r=s[2],r}function _n(){const s=y.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Yt,{})})}),s[0]=e):e=s[0],e}export{_n as default};
|
|
1
|
+
import{c as y,j as t,B as F,i as X,z as Ge,C as se,E as Pe,r as T,w as ie,G as Qe,l as V,bf as Ye,u as Xe,y as G,t as Ze,e as ae,b1 as ke}from"./index-DILk6pqr.js";import{E as Ee}from"./empty-state-CfAeMInj.js";import{u as et,a as Ae}from"./use-collections-D0HN84Lz.js";import{u as ce}from"./use-mcp-client-BdmHrvF5.js";import{F as ne,a as tt,b as de,d as me}from"./form-xYXw--Kt.js";import{I as ue}from"./input-DntqEqec.js";import{T as re}from"./textarea-Fs50NfWG.js";import{a as st,b as nt,V as xe,O as ot,M as lt}from"./index-BSzVFCV6.js";import{ag as rt,x as it,a5 as at,ah as ct,a1 as dt,ai as mt,M as be}from"./agent-icon-CKGTD-zQ.js";import{g as ut,M as xt,a as Ne}from"./types-CsHe6BgD.js";import{A as pt,a as ft,b as ht}from"./alert-DIaLGkVq.js";import{d as ve,b as Se,c as ye,S as we,a as oe}from"./select-DeFnLWdd.js";import{c as gt,b as Ce,T as Ie,a as $e}from"./tooltip-DNJ6cRlV.js";import{i as jt}from"./AlertCircle-qY5ngKLr.js";import{s as bt}from"./Stars02-DHcW8N80.js";import{a as Nt}from"./Eye-C6daRddp.js";import{i as vt}from"./Play-Blum-MoR.js";import{i as St}from"./ChevronRight-MnjJHQHy.js";import{g as yt}from"./connection-slug-eyAPH6o3.js";import{u as wt,T as Ct}from"./index-C6ZVo7HH.js";import{a as Oe,u as Re}from"./use-connection-Bj1m8ynL.js";import{a as It}from"./use-mcp-tools-ChlFTYss.js";import{c as $t}from"./content-blocks-o63cs2vh.js";import{I as Te}from"./integration-icon-CxxjWIPp.js";import{f as Tt,h as Pt}from"./chat-context-SWJ_FDEf.js";import{b as kt}from"./shell-layout-DAyf8ZZZ.js";import{M as Et}from"./monaco-editor-BS1tOSHv.js";import{n as At}from"./XCircle-BLfqcVud.js";import"./auth-B4fF5n_6.js";import"./label-NJtv9Xrj.js";import"./index-D7pI5IpD.js";import"./sidebar-D5TdEONj.js";import"./LayoutLeft-BsVzrTOG.js";import"./sheet-CgvO6KT7.js";import"./X-CXRx6PGX.js";import"./ZoomOut-6aWLXLSs.js";import"./Key01-B0h1bFlR.js";import"./extract-connection-data-qW230rJb.js";import"./use-registry-connections-DZ1G13oh.js";import"./use-organization-settings-a8PuTrsa.js";import"./studio-tools-DWzikkvB.js";import"./Plus-DfIcHYEj.js";import"./index-CLz5uOtD.js";import"./index-Benu0NlA.js";import"./popover-DmLzbFpk.js";import"./use-virtual-mcp-OPb4DVO0.js";import"./ChevronUp-CKICjFfX.js";import"./SearchMd-B6GaXN7Q.js";import"./Users03-BZYHqQGQ.js";import"./use-create-virtual-mcp-Cxqyw0Tn.js";import"./use-navigate-to-agent-Qyyx-mm9.js";import"./Tool01-hxrY31T7.js";import"./SwitchHorizontal01-CrHLIeRP.js";import"./Settings02-Dd9sO-oW.js";import"./ArrowUpRight-C7uYzZ0Z.js";import"./ZapSquare-iu6ldaYZ.js";import"./CheckCircle-CNYYpNQm.js";import"./ChevronDown-BVJUps1_.js";import"./ChevronLeft-CCp89cqe.js";import"./DotsVertical-Bl5GcKp2.js";import"./Globe01-CgHdNpOL.js";import"./FilterLines-B_0u5HAa.js";import"./Star01-Be_MjtDZ.js";import"./Globe04-DEangwXD.js";import"./HardDrive-V1dbAXdv.js";import"./LinkExternal01-B9RsD2Us.js";import"./Monitor01-DAM-u2R2.js";import"./Sun-DO_Gt4P2.js";import"./Palette-DT8p7ZEl.js";import"./Shield01-DLANpVD0.js";import"./Stars01-D3ha2IeY.js";import"./Trash01-DGJ-LjB-.js";import"./Upload01-CzOJ3UuD.js";import"./User01-DR_UC5XH.js";import"./Users01-cxH39exM.js";import"./XClose-4ak3u3qT.js";import"./Zap-DVtX-UPi.js";import"./mcp-oauth-BTUV7ht5.js";import"./badge-CBy4Rm2Q.js";import"./hooks-CLt3SUb8.js";import"./decopilot-sse-pool-Cd7s5cwH.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-CVKwKs8r.js";import"./tab-id-BptcWVWa.js";import"./avatar-3b85MUU5.js";import"./dialog-CwfeALzq.js";import"./required-auth-layout-DdFOKjMd.js";import"./use-org-sso-DvlbibgX.js";import"./index-uKLTzwtC.js";function Ot(s){const e=y.c(15),{onSave:o,onUndo:n,isDirty:l,isSaving:r,saveLabel:a,undoLabel:c}=s,i=a===void 0?"Save":a,u=c===void 0?"Undo":c;if(!l)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14}),e[0]=x):x=e[0];let m;e[1]!==r||e[2]!==n||e[3]!==u?(m=t.jsxs(F,{variant:"outline",size:"sm",onClick:n,disabled:r,"aria-label":u,children:[x,u]}),e[1]=r,e[2]=n,e[3]=u,e[4]=m):m=e[4];let p;e[5]!==r?(p=r?t.jsx(X,{size:14,className:"animate-spin"}):t.jsx(it,{size:14}),e[5]=r,e[6]=p):p=e[6];let f;e[7]!==r||e[8]!==o||e[9]!==i||e[10]!==p?(f=t.jsxs(F,{variant:"default",size:"sm",onClick:o,disabled:r,"aria-label":i,children:[p,i]}),e[7]=r,e[8]=o,e[9]=i,e[10]=p,e[11]=f):f=e[11];let g;return e[12]!==m||e[13]!==f?(g=t.jsxs(t.Fragment,{children:[m,f]}),e[12]=m,e[13]=f,e[14]=g):g=e[14],g}Ge({title:se().min(1),description:se().nullable(),body:se()});function le(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Rt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function _t(s){const e=y.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let l;e[1]!==o.control?(l=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(ne,{control:o.control,name:"title",render:Dt}),t.jsx(ne,{control:o.control,name:"description",render:zt})]})]}),e[1]=o.control,e[2]=l):l=e[2];let r,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=a):(r=e[3],a=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[r,a,t.jsx(ne,{control:o.control,name:"body",render:Mt})]}),e[5]=o.control,e[6]=c):c=e[6];let i;e[7]!==l||e[8]!==c?(i=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[l,c]}),e[7]=l,e[8]=c,e[9]=i):i=e[9];let u;return e[10]!==o||e[11]!==i?(u=t.jsx(tt,{...o,children:i}),e[10]=o,e[11]=i,e[12]=u):u=e[12],u}function Mt(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function zt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Lt(s){const e=y.c(36),{providerId:o,promptId:n}=s,{org:l}=ie(),r=o||null;let a;e[0]!==l.id||e[1]!==l.slug||e[2]!==r?(a={connectionId:r,orgId:l.id,orgSlug:l.slug},e[0]=l.id,e[1]=l.slug,e[2]=r,e[3]=a):a=e[3];const c=ce(a),i=et(o,"PROMPT",n,c),u=Ae(o,"PROMPT",c),x=u.update.isPending;let m;e[4]!==i?(m=i?{title:i.title,description:i.description??null,body:le(i)}:void 0,e[4]=i,e[5]=m):m=e[5];let p;e[6]!==m?(p={values:m},e[6]=m,e[7]=p):p=e[7];const f=Qe(p);let g;e[8]!==f||e[9]!==i?(g=()=>{i&&f.reset({title:i.title,description:i.description??null,body:le(i)})},e[8]=f,e[9]=i,e[10]=g):g=e[10];const S=g;let I;e[11]!==u.update||e[12]!==f||e[13]!==n?(I=f.handleSubmit(async N=>{const A=await u.update.mutateAsync({id:n,data:{title:N.title,description:N.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:N.body}}]}});f.reset({title:A.title,description:A.description??null,body:le(A)})}),e[11]=u.update,e[12]=f,e[13]=n,e[14]=I):I=e[14];const R=I;if(!i){let N;return e[15]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=N):N=e[15],N}let $;e[16]!==i.title?($=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[16]=i.title,e[17]=$):$=e[17];let E;e[18]!==i.description?(E=i.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:i.description})]}):null,e[18]=i.description,e[19]=E):E=e[19];let P;e[20]!==$||e[21]!==E?(P=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[$,E]})}),e[20]=$,e[21]=E,e[22]=P):P=e[22];let b;e[23]!==R?(b=()=>{R()},e[23]=R,e[24]=b):b=e[24];let w;e[25]!==f.formState.isDirty||e[26]!==x||e[27]!==S||e[28]!==b?(w=t.jsx(st,{children:t.jsx(Ot,{onSave:b,onUndo:S,isDirty:f.formState.isDirty,isSaving:x})}),e[25]=f.formState.isDirty,e[26]=x,e[27]=S,e[28]=b,e[29]=w):w=e[29];let C;e[30]!==f?(C=t.jsx("div",{className:"h-full",children:t.jsx(_t,{form:f})}),e[30]=f,e[31]=C):C=e[31];let k;return e[32]!==w||e[33]!==C||e[34]!==P?(k=t.jsxs(xe,{children:[P,w,C]}),e[32]=w,e[33]=C,e[34]=P,e[35]=k):k=e[35],k}function Ut(s){const e=y.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Rt(),e[0]=n):n=e[0];const l=n;if(!l){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let r;return e[2]!==o?(r=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:null,children:t.jsx(Lt,{providerId:l,promptId:o})})}),e[2]=o,e[3]=r):r=e[3],r}function _e(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("min-w-0 overflow-hidden",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Me(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("ol",{"data-slot":"breadcrumb-list",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function q(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("li",{"data-slot":"breadcrumb-item",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Q(s){const e=y.c(10);let o,n,l;e[0]!==s?({asChild:o,className:n,...l}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=l):(o=e[1],n=e[2],l=e[3]);const r=o?Ye:"a";let a;e[4]!==n?(a=V("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==r||e[7]!==l||e[8]!==a?(c=t.jsx(r,{"data-slot":"breadcrumb-link",className:a,...l}),e[6]=r,e[7]=l,e[8]=a,e[9]=c):c=e[9],c}function ze(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("text-foreground font-medium truncate",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Y(s){const e=y.c(12);let o,n,l;e[0]!==s?({children:o,className:n,...l}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=l):(o=e[1],n=e[2],l=e[3]);let r;e[4]!==n?(r=V("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=r):r=e[5];let a;e[6]!==o?(a=o??t.jsx(St,{}),e[6]=o,e[7]=a):a=e[7];let c;return e[8]!==l||e[9]!==r||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:r,...l,children:a}),e[8]=l,e[9]=r,e[10]=a,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ft(s){const e=y.c(11),{toolName:o,connectionId:n,siblings:l,onSelectInstance:r,onBack:a}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const i=wt(c);if(!i.isAuthenticated){let m;return e[2]!==i.supportsOAuth||e[3]!==a?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:i.supportsOAuth?t.jsx(ot,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(lt,{hasReadme:!1})}),e[2]=i.supportsOAuth,e[3]=a,e[4]=m):m=e[4],m}const u=`${n}:${o}`;let x;return e[5]!==n||e[6]!==r||e[7]!==l||e[8]!==u||e[9]!==o?(x=t.jsx(Vt,{toolName:o,connectionId:n,siblings:l,onSelectInstance:r},u),e[5]=n,e[6]=r,e[7]=l,e[8]=u,e[9]=o,e[10]=x):x=e[10],x}function Vt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:l}=Xe({strict:!1}),r=(()=>{if(!l)return null;const d=`replay-${l}`,h=sessionStorage.getItem(d);if(!h)return null;sessionStorage.removeItem(d);try{return JSON.parse(h)}catch{return null}})(),a=(()=>{if(!r)return null;const d={};for(const[h,v]of Object.entries(r))v!==null&&typeof v=="object"?d[h]=JSON.stringify(v,null,2):d[h]=v;return d})(),[c,i]=T.useState(a??{}),[u,x]=T.useState(r?JSON.stringify(r,null,2):"{}"),[m,p]=T.useState(null),[f,g]=T.useState(null),[S,I]=T.useState(null),[R,$]=T.useState(null),[E,P]=T.useState(!1),[b,w]=T.useState(null),{org:C}=ie(),k=Oe(e),N=Tt(),A=Pt(),{setChatOpen:U}=kt(),D=`${e}:${s}`,_=ce({connectionId:e,orgId:C.id,orgSlug:C.slug}),L=It({client:_}),j=L.data?.tools?.find(d=>d.name===s),O=ut(j?._meta),J=d=>{if(!N)return;const h=$t(d.content);h.content.length>0&&(U(!0),N.sendMessage({tiptapDoc:h}))},[M,Z]=T.useState("json"),[De,Le]=T.useState(!1);O&&!De&&(Z("ui"),Le(!0));const pe=j?.inputSchema?.properties,fe=pe?Object.keys(pe):[],H=fe.length>0,K={};if(H&&j?.inputSchema?.properties)for(const d of fe)K[d]=j.inputSchema.required?.includes(d)?"":void 0;const ee=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{P(!0),$(null),p(null),g(null),I(null),w(null);const d=performance.now();try{if(!_)throw new Error("MCP client is not available");const h=H?{...K,...c}:(()=>{const z=u.trim();if(!z)return{};const B=JSON.parse(z);if(B&&typeof B=="object")return B;throw new Error("Raw JSON input must be an object.")})();H&&j?.inputSchema?.properties&&Object.entries(j.inputSchema.properties).forEach(([z,B])=>{if((B.type==="object"||B.type==="array")&&typeof h[z]=="string")try{h[z]=JSON.parse(h[z])}catch{}else if((B.type==="number"||B.type==="integer")&&typeof h[z]=="string"&&h[z]!==""){const je=Number(h[z]);Number.isNaN(je)||(h[z]=je)}});const v=await _.callTool({name:s,arguments:h}),W=v.structuredContent??v,He=performance.now(),Ke=Math.round(He-d);p(W),g(v),I(h);const We=JSON.stringify(W),ge=new TextEncoder().encode(We).length;w({duration:`${Ke}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(h){const v=h instanceof Error?h.message:String(h);$(v||"Unknown error occurred");const W=performance.now();w({duration:`${Math.round(W-d)}ms`})}finally{P(!1)}},te=(d,h)=>{i(v=>({...v,[d]:h}))},Be=()=>{p(null),g(null),I(null),$(null),w(null)},Fe=j?.name??Bt(s),Ve=t.jsx(_e,{children:t.jsxs(Me,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:C.slug},children:"Connections"})})}),t.jsx(Y,{}),k&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:C.slug,appSlug:yt(k)},search:{tab:"tools"},children:k.title})})}),t.jsx(Y,{})]}),t.jsx(q,{children:t.jsx(ze,{children:Fe})})]})}),he=o.length>1&&t.jsxs(ve,{value:e,onValueChange:n,children:[t.jsx(Se,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ye,{})}),t.jsx(we,{children:o.map(d=>t.jsx(oe,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Te,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Je=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),j?.inputSchema?.required&&j.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:H&&j?.inputSchema?.properties?Object.entries(j.inputSchema.properties).map(([d,h])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[d,j.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(re,{className:"font-mono text-xs",value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):h.type==="boolean"?t.jsxs(ve,{value:ee(d)?String(c[d]??""):"",onValueChange:v=>te(d,v==="true"),children:[t.jsx(Se,{children:t.jsx(ye,{placeholder:"Select true or false..."})}),t.jsxs(we,{children:[t.jsx(oe,{value:"true",children:"true"}),t.jsx(oe,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d}...`})]},d)):j?.inputSchema&&!H?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(re,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:d=>x(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:E?t.jsxs(F,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Be,children:[t.jsx(at,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(F,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(vt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),qe=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(bt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ct,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(dt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),O&&t.jsx(gt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("ui"),children:t.jsx(mt,{size:14})})}),t.jsx($e,{children:"Interactive view"})]}),t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("json"),children:t.jsx(be,{size:14})})}),t.jsx($e,{children:"JSON view"})]})]})})]})]}),R&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(pt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(jt,{className:"h-4 w-4"}),t.jsx(ft,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(ht,{className:"text-xs text-destructive",children:R})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:O&&M==="ui"&&_?t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(xt,{resourceURI:O,toolInfo:j?{tool:j}:void 0,toolInput:S??void 0,toolResult:f??void 0,displayMode:"fullscreen",minHeight:Ne.view.minHeight,maxHeight:Ne.view.maxHeight,client:_,onMessage:J,onUpdateModelContext:d=>A?.setAppContext(D,d),onTeardown:()=>A?.clearAppContext(D),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(Et,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(F,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),Ze.success("Copied to clipboard")},children:t.jsx(Nt,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(be,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(xe,{breadcrumb:Ve,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Te,{icon:k?.icon||null,name:k?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[L.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):L.isLoading?t.jsx(X,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:L.isSuccess?"ready":L.isLoading?"connecting":"error"})]}),t.jsx(Ct,{annotations:j?.annotations,_meta:j?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:j?.description||"No description available"})]}),o.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:"Instance"}),he]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Je}),qe]})})]})})}function Jt(s){const e=y.c(10),{itemId:o,siblings:n,onBack:l}=s,[r,a]=T.useState(n[0]?.id??"");let c;e[0]!==r||e[1]!==n?(c=n.find(p=>p.id===r)?.id??n[0]?.id??"",e[0]=r,e[1]=n,e[2]=c):c=e[2];const i=c;if(!Oe(i||void 0)||!i){let p;return e[3]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=p):p=e[3],p}let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=x):x=e[4];let m;return e[5]!==i||e[6]!==l||e[7]!==n||e[8]!==o?(m=t.jsx(T.Suspense,{fallback:x,children:t.jsx(Ft,{toolName:o,connectionId:i,siblings:n,onSelectInstance:a,onBack:l})}),e[5]=i,e[6]=l,e[7]=n,e[8]=o,e[9]=m):m=e[9],m}function qt(s){const e=y.c(21),{icon:o,illustration:n,title:l,description:r,buttonProps:a,buttonComponent:c,className:i,children:u}=s;let x;e[0]!==i?(x=V("flex flex-col items-center justify-center py-16 text-center",i),e[0]=i,e[1]=x):x=e[1];let m;e[2]!==o||e[3]!==n?(m=n?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:n}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=n,e[4]=m):m=e[4];let p;e[5]!==l?(p=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:l}),e[5]=l,e[6]=p):p=e[6];let f;e[7]!==r?(f=r&&t.jsx("div",{className:"text-sm text-muted-foreground",children:r}),e[7]=r,e[8]=f):f=e[8];let g;e[9]!==p||e[10]!==f?(g=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[p,f]}),e[9]=p,e[10]=f,e[11]=g):g=e[11];let S;e[12]!==c||e[13]!==a?(S=(c??a)&&t.jsx("div",{className:"mt-4",children:c??(a&&t.jsx(F,{size:"sm",className:V(a?.className),...a}))}),e[12]=c,e[13]=a,e[14]=S):S=e[14];let I;return e[15]!==u||e[16]!==x||e[17]!==m||e[18]!==g||e[19]!==S?(I=t.jsxs("div",{className:x,children:[m,g,S,u]}),e[15]=u,e[16]=x,e[17]=m,e[18]=g,e[19]=S,e[20]=I):I=e[20],I}const Ht={prompt:Ut};function Kt(){const s=y.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),l=decodeURIComponent(n.itemId);let r;s[1]!==n.appSlug?(r={slug:n.appSlug},s[1]=n.appSlug,s[2]=r):r=s[2];const a=Re(r);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const i=c,u=Wt;let x;return s[5]!==i||s[6]!==l||s[7]!==a?(x=t.jsx(Jt,{itemId:l,siblings:a,onBack:i,onUpdate:u}),s[5]=i,s[6]=l,s[7]=a,s[8]=x):x=s[8],x}async function Wt(s){return Promise.resolve()}function Gt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=y.c(41),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),l=decodeURIComponent(n.collectionName),r=decodeURIComponent(n.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:i}=ie();let u;s[3]!==n.appSlug?(u={slug:n.appSlug},s[3]=n.appSlug,s[4]=u):u=s[4];const m=Re(u)[0]??null,p=m?.id??"",f=p||"no-connection",g=p??null;let S;s[5]!==i.id||s[6]!==i.slug||s[7]!==g?(S={connectionId:g,orgId:i.id,orgSlug:i.slug},s[5]=i.id,s[6]=i.slug,s[7]=g,s[8]=S):S=s[8];const I=ce(S),R=Ae(f,l,I);let $;s[9]!==R||s[10]!==r?($=async M=>{r&&await R.update.mutateAsync({id:r,data:M})},s[9]=R,s[10]=r,s[11]=$):$=s[11];const E=$;let P;s[12]!==l?(P=l?.toLowerCase(),s[12]=l,s[13]=P):P=s[13];const b=P,w=b&&Ht[b];let C;s[14]!==l?(C=Gt(l),s[14]=l,s[15]=C):C=s[15];const k=C;let N;s[16]!==i.slug?(N=t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:i.slug},children:"Connections"})})}),s[16]=i.slug,s[17]=N):N=s[17];let A;s[18]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Y,{}),s[18]=A):A=s[18];let U;s[19]!==l||s[20]!==m||s[21]!==i.slug||s[22]!==n.appSlug?(U=m&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:n.appSlug},search:{tab:l},children:m.title})})}),t.jsx(Y,{})]}),s[19]=l,s[20]=m,s[21]=i.slug,s[22]=n.appSlug,s[23]=U):U=s[23];let D;s[24]!==k?(D=t.jsx(q,{children:t.jsx(ze,{children:k})}),s[24]=k,s[25]=D):D=s[25];let _;s[26]!==U||s[27]!==D||s[28]!==N?(_=t.jsx(_e,{children:t.jsxs(Me,{children:[N,A,U,D]})}),s[26]=U,s[27]=D,s[28]=N,s[29]=_):_=s[29];const L=_;if(w){let M;return s[30]!==w||s[31]!==c||s[32]!==E||s[33]!==r?(M=t.jsx(w,{itemId:r,onBack:c,onUpdate:E}),s[30]=w,s[31]=c,s[32]=E,s[33]=r,s[34]=M):M=s[34],M}let j;s[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(At,{size:36,className:"text-muted-foreground"}),s[35]=j):j=s[35];let O;s[36]!==c?(O=t.jsx(qt,{icon:j,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=O):O=s[37];let J;return s[38]!==L||s[39]!==O?(J=t.jsx(xe,{breadcrumb:L,children:O}),s[38]=L,s[39]=O,s[40]=J):J=s[40],J}function Yt(){const s=y.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Kt,{}),s[1]=a):a=s[1],a}let r;return s[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Qt,{}),s[2]=r):r=s[2],r}function _n(){const s=y.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Yt,{})})}),s[0]=e):e=s[0],e}export{_n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as B,j as s,l as M,B as V}from"./index-
|
|
1
|
+
import{c as B,j as s,l as M,B as V}from"./index-DILk6pqr.js";import{c as z,a as _,b as $,D as E}from"./dropdown-menu-CppAWsT_.js";import{a as L,n as O,d as R,i as A,c as F}from"./SwitchHorizontal01-CrHLIeRP.js";import{i as S}from"./ChevronUp-CKICjFfX.js";import{T as I,a as K,c as P,b as W}from"./tooltip-DNJ6cRlV.js";import{V as q}from"./view-mode-toggle-k-q_tsqg.js";import{B as G}from"./badge-CBy4Rm2Q.js";function te(t){const e=B.c(31),{viewMode:r,onViewModeChange:m,sortKey:T,sortDirection:p,onSort:f,sortOptions:u,filters:h}=t;let g;e[0]!==u?(g=u===void 0?[]:u,e[0]=u,e[1]=g):g=e[1];const j=g;let b;e[2]!==h?(b=h===void 0?[]:h,e[2]=h,e[3]=b):b=e[3];const l=b;let v;e[4]!==l?(v=l.filter(J),e[4]=l,e[5]=v):v=e[5];const N=v.length;let w;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(R,{size:16}),e[6]=w):w=e[6];let i;e[7]!==N?(i=N>0&&s.jsx(G,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:N}),e[7]=N,e[8]=i):i=e[8];let o;e[9]!==i?(o=s.jsx(I,{asChild:!0,children:s.jsx(_,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"icon",className:"relative",children:[w,i]})})}),e[9]=i,e[10]=o):o=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(K,{children:"Display & filters"}),e[11]=C):C=e[11];let n;e[12]!==o?(n=s.jsx(P,{children:s.jsxs(W,{children:[o,C]})}),e[12]=o,e[13]=n):n=e[13];let a;e[14]!==m||e[15]!==r?(a=m&&r&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(q,{value:r,onValueChange:m,fullWidth:!0,options:[{value:"table",icon:s.jsx(A,{})},{value:"cards",icon:s.jsx(F,{})}]})}),e[14]=m,e[15]=r,e[16]=a):a=e[16];let c;e[17]!==f||e[18]!==p||e[19]!==T||e[20]!==j?(c=j.length>0&&f&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),j.map(y=>{const D=T===y.id;return s.jsx(z,{onClick:()=>f(y.id),className:M("h-8 px-2 py-0 cursor-pointer",D&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[D&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!D&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:y.label}),D&&p&&(p==="asc"?s.jsx(L,{size:16,className:"text-foreground shrink-0"}):s.jsx(O,{size:16,className:"text-foreground shrink-0"}))]})},y.id)})]}),e[17]=f,e[18]=p,e[19]=T,e[20]=j,e[21]=c):c=e[21];let d;e[22]!==l?(d=l.map(H),e[22]=l,e[23]=d):d=e[23];let x;e[24]!==a||e[25]!==c||e[26]!==d?(x=s.jsxs($,{align:"end",className:"w-[200px] p-0 gap-0",children:[a,c,d]}),e[24]=a,e[25]=c,e[26]=d,e[27]=x):x=e[27];let k;return e[28]!==n||e[29]!==x?(k=s.jsxs(E,{children:[n,x]}),e[28]=n,e[29]=x,e[30]=k):k=e[30],k}function H(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const r=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:M("h-8 px-2 py-0 cursor-pointer",r&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[r&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!r&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function J(t){return t.value!=="ALL"}export{te as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,l as b,j as a,i as w}from"./index-
|
|
1
|
+
import{c as v,l as b,j as a,i as w}from"./index-DILk6pqr.js";import{i as C}from"./SearchMd-B6GaXN7Q.js";function S(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?a.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):a.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==d?(o=a.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=p,e[11]=r,e[12]=d,e[13]=o):o=e[13];let n;e[14]!==s||e[15]!==l||e[16]!==o?(n=a.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=n):n=e[17];let c;return e[18]!==t||e[19]!==n?(c=a.jsx("div",{className:t,children:n}),e[18]=t,e[19]=n,e[20]=c):c=e[20],c}export{S as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,l as u,j as m}from"./index-
|
|
1
|
+
import{c as f,l as u,j as m}from"./index-DILk6pqr.js";import{B as g}from"./badge-CBy4Rm2Q.js";function h(x){const e=f.c(12),{tabs:c,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==c){let l;e[6]!==n||e[7]!==s?(l=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=l):l=e[8],r=c.map(l),e[2]=n,e[3]=s,e[4]=c,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,l as i,j as n}from"./index-
|
|
1
|
+
import{c as d,l as i,j as n}from"./index-DILk6pqr.js";import{_ as m}from"./index-Benu0NlA.js";import{d as k,a as N,b as j,D as b,c as w}from"./dialog-CwfeALzq.js";import{i as y}from"./SearchMd-B6GaXN7Q.js";function C(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function S(a){const e=d.c(24);let t,s,o,l,r;e[0]!==a?({title:l,description:r,children:t,className:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5]);const _=l===void 0?"Command Palette":l,v=r===void 0?"Search for a command to run...":r;let c;e[6]!==_?(c=n.jsx(N,{children:_}),e[6]=_,e[7]=c):c=e[7];let p;e[8]!==v?(p=n.jsx(j,{children:v}),e[8]=v,e[9]=p):p=e[9];let u;e[10]!==c||e[11]!==p?(u=n.jsxs(b,{className:"sr-only",children:[c,p]}),e[10]=c,e[11]=p,e[12]=u):u=e[12];let f;e[13]!==s?(f=i("overflow-hidden p-0",s),e[13]=s,e[14]=f):f=e[14];let x;e[15]!==t?(x=n.jsx(C,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t}),e[15]=t,e[16]=x):x=e[16];let g;e[17]!==f||e[18]!==x?(g=n.jsx(w,{className:f,closeButtonClassName:"hidden",children:x}),e[17]=f,e[18]=x,e[19]=g):g=e[19];let h;return e[20]!==o||e[21]!==u||e[22]!==g?(h=n.jsxs(k,{...o,children:[u,g]}),e[20]=o,e[21]=u,e[22]=g,e[23]=h):h=e[23],h}function z(a){const e=d.c(9);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(y,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function G(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=d.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_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=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{L as C,H as a,z as b,G as c,C as d,R as e,S as f,B as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as _,r as z,l as J,j as s,B as oe,i as Ne,K as M,k as ce,m as Ke,a as we,u as qe,b as Ie,n as Be,d as Ee,o as Te,Q as He,E as Fe,p as ve,L as Qe}from"./index-DILk6pqr.js";import{A as We}from"./auth-entry-BVyaHjaQ.js";import{A as L}from"./auth-split-layout-BO9g4lYZ.js";import{O as _e}from"./organization-choice-DFUlgHk4.js";import{f as Ge}from"./tab-id-BptcWVWa.js";import{I as Ye}from"./input-DntqEqec.js";import{u as je,W as ke,S as Re,g as Ve,C as Ze}from"./use-mcp-client-BdmHrvF5.js";import{i as Oe}from"./XCircle-BLfqcVud.js";import{I as Je}from"./integration-icon-CxxjWIPp.js";import{i as ze}from"./CheckCircle-CNYYpNQm.js";import{g as Xe,c as et,e as tt}from"./extract-connection-data-qW230rJb.js";import{u as nt}from"./useQueries-BD3bwl6B.js";import{a as st}from"./authenticate-and-persist-oauth-D2tM_mGL.js";import{i as Le}from"./ArrowUpRight-C7uYzZ0Z.js";import{s as $e}from"./User01-DR_UC5XH.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-3b85MUU5.js";import"./auth-B4fF5n_6.js";import"./agent-icon-CKGTD-zQ.js";import"./AlertCircle-qY5ngKLr.js";import"./Tool01-hxrY31T7.js";import"./SwitchHorizontal01-CrHLIeRP.js";import"./Settings02-Dd9sO-oW.js";import"./ZapSquare-iu6ldaYZ.js";import"./Users03-BZYHqQGQ.js";import"./ChevronUp-CKICjFfX.js";import"./ChevronDown-BVJUps1_.js";import"./ChevronLeft-CCp89cqe.js";import"./ChevronRight-MnjJHQHy.js";import"./DotsVertical-Bl5GcKp2.js";import"./Stars02-DHcW8N80.js";import"./Eye-C6daRddp.js";import"./ZoomOut-6aWLXLSs.js";import"./Globe01-CgHdNpOL.js";import"./FilterLines-B_0u5HAa.js";import"./Star01-Be_MjtDZ.js";import"./Globe04-DEangwXD.js";import"./HardDrive-V1dbAXdv.js";import"./Key01-B0h1bFlR.js";import"./LayoutLeft-BsVzrTOG.js";import"./LinkExternal01-B9RsD2Us.js";import"./Monitor01-DAM-u2R2.js";import"./Sun-DO_Gt4P2.js";import"./Palette-DT8p7ZEl.js";import"./Play-Blum-MoR.js";import"./Plus-DfIcHYEj.js";import"./SearchMd-B6GaXN7Q.js";import"./Shield01-DLANpVD0.js";import"./Stars01-D3ha2IeY.js";import"./Trash01-DGJ-LjB-.js";import"./Upload01-CzOJ3UuD.js";import"./Users01-cxH39exM.js";import"./XClose-4ak3u3qT.js";import"./X-CXRx6PGX.js";import"./Zap-DVtX-UPi.js";import"./mcp-oauth-BTUV7ht5.js";const ot=/^[a-zA-Z][a-zA-Z\d+.-]*:/,it=/^[a-zA-Z][a-zA-Z\d+.-]*:\/\//,rt=/^[^\s/:?#]+\.[^\s/:?#]+:\d+(?:[/?#]|$)/,lt=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;function xe(o){const e=o.trim();if(!e)return{ok:!1,error:"Enter a website URL."};const t=ot.test(e),n=it.test(e),i=rt.test(e);if(t&&!n&&!i)return{ok:!1,error:"Use an HTTP or HTTPS website URL."};const a=n?e:`https://${e}`;let l;try{l=new URL(a)}catch{return{ok:!1,error:"Enter a valid website URL."}}if(l.protocol!=="http:"&&l.protocol!=="https:")return{ok:!1,error:"Use an HTTP or HTTPS website URL."};const r=l.hostname.split(".");return r.length<2||r.some(c=>!c||!lt.test(c))?{ok:!1,error:"Enter a valid website URL."}:(l.protocol="https:",{ok:!0,value:l.origin})}function ye(o){const e=_.c(14),{children:t,className:n,wrapperClassName:i}=o,[a,l]=z.useState(!0);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=x=>{if(!x)return;const b=()=>{const d=x.scrollHeight-x.scrollTop-x.clientHeight<8;l(d)};b(),x.addEventListener("scroll",b,{passive:!0});const C=new ResizeObserver(b);C.observe(x);for(const d of Array.from(x.children))C.observe(d);return()=>{x.removeEventListener("scroll",b),C.disconnect()}},e[0]=r):r=e[0];const c=r;let m;e[1]!==i?(m=J("relative",i),e[1]=i,e[2]=m):m=e[2];let f;e[3]!==t||e[4]!==n?(f=s.jsx("div",{ref:c,className:n,children:t}),e[3]=t,e[4]=n,e[5]=f):f=e[5];const u=a?"opacity-0":"opacity-100";let p;e[6]!==u?(p=J("pointer-events-none absolute inset-x-0 -bottom-px h-[213px]","bg-gradient-to-t from-sidebar from-[6px] to-transparent","backdrop-blur-[2px] [mask-image:linear-gradient(to_top,black_6px,transparent)]","transition-opacity duration-200",u),e[6]=u,e[7]=p):p=e[7];let h;e[8]!==p?(h=s.jsx("div",{"aria-hidden":!0,className:p}),e[8]=p,e[9]=h):h=e[9];let g;return e[10]!==m||e[11]!==f||e[12]!==h?(g=s.jsxs("div",{className:m,children:[f,h]}),e[10]=m,e[11]=f,e[12]=h,e[13]=g):g=e[13],g}function at(){const o=_.c(3);let e;o[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"size-12 shrink-0 animate-pulse rounded-lg bg-muted/60"}),s.jsx("div",{className:"h-4 w-32 animate-pulse rounded bg-muted/60"}),s.jsx("div",{className:"ml-auto h-8 w-20 animate-pulse rounded-lg bg-muted/60"})]}),o[0]=e):e=o[0];let t;o[1]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("div",{className:"p-1",children:s.jsx("div",{className:"h-5 w-40 animate-pulse rounded bg-muted/60"})}),o[1]=t):t=o[1];let n;return o[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"flex flex-col gap-2 rounded-2xl border border-border bg-card p-4",children:[e,s.jsxs("div",{className:"flex flex-col gap-1 px-1 py-2",children:[t,s.jsx("div",{className:"p-1",children:s.jsx("div",{className:"h-5 w-56 animate-pulse rounded bg-muted/60"})})]})]}),o[2]=n):n=o[2],n}function be(o){const e=_.c(3),{children:t}=o;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ze,{size:14,className:"shrink-0 text-blue-500"}),e[0]=n):n=e[0];let i;return e[1]!==t?(i=s.jsxs("div",{className:"flex items-center gap-2 p-1",children:[n,s.jsx("p",{className:"text-sm text-foreground",children:t})]}),e[1]=t,e[2]=i):i=e[2],i}function ct(o){const e=_.c(33),{card:t,connecting:n,disabled:i,onConnect:a}=o;let l;e[0]!==t.icon||e[1]!==t.title?(l=s.jsx(Je,{icon:t.icon,name:t.title,size:"md",fit:"contain",className:"p-2"}),e[0]=t.icon,e[1]=t.title,e[2]=l):l=e[2];let r;e[3]!==t.title?(r=s.jsx("p",{className:"flex-1 text-sm text-foreground",children:t.title}),e[3]=t.title,e[4]=r):r=e[4];let c;e[5]!==t.satisfied||e[6]!==t.title||e[7]!==n||e[8]!==i||e[9]!==a?(c=t.satisfied?s.jsxs("div",{className:"flex h-8 items-center gap-2 px-3 text-sm text-muted-foreground",children:[s.jsx(ze,{size:16})," Connected"]}):s.jsx(oe,{type:"button",variant:"outline",size:"sm",disabled:i||n,onClick:a,"aria-label":`Connect ${t.title}`,children:n?s.jsx(Ne,{size:16,className:"animate-spin"}):"Connect"}),e[5]=t.satisfied,e[6]=t.title,e[7]=n,e[8]=i,e[9]=a,e[10]=c):c=e[10];let m;e[11]!==l||e[12]!==r||e[13]!==c?(m=s.jsxs("div",{className:"flex items-center gap-2",children:[l,r,c]}),e[11]=l,e[12]=r,e[13]=c,e[14]=m):m=e[14];let f;e[15]!==t.checks?(f=t.checks!==null&&s.jsxs(be,{children:["+ ",t.checks," checks"]}),e[15]=t.checks,e[16]=f):f=e[16];let u;e[17]!==t.headline?(u=t.headline&&s.jsx(be,{children:t.headline}),e[17]=t.headline,e[18]=u):u=e[18];let p;e[19]!==t.bullets?(p=t.bullets.map(dt),e[19]=t.bullets,e[20]=p):p=e[20];let h;e[21]!==t.candidateConnectionId||e[22]!==t.satisfied||e[23]!==t.title?(h=!t.satisfied&&t.candidateConnectionId&&s.jsxs("p",{className:"px-1 text-xs text-muted-foreground",children:["Using your existing ",t.title]}),e[21]=t.candidateConnectionId,e[22]=t.satisfied,e[23]=t.title,e[24]=h):h=e[24];let g;e[25]!==f||e[26]!==u||e[27]!==p||e[28]!==h?(g=s.jsxs("div",{className:"flex flex-col gap-1 px-1 py-2",children:[f,u,p,h]}),e[25]=f,e[26]=u,e[27]=p,e[28]=h,e[29]=g):g=e[29];let x;return e[30]!==m||e[31]!==g?(x=s.jsxs("div",{className:"flex flex-col gap-2 rounded-2xl border border-border bg-card p-4",children:[m,g]}),e[30]=m,e[31]=g,e[32]=x):x=e[32],x}function dt(o){return s.jsx(be,{children:o},o)}const Ce={vtex:{registryAppId:"deco/vtex",checks:49,headline:"Out-of-stock, thin PDPs & attribute gaps across every SKU"},"google-analytics":{registryAppId:"deco/google-analytics",checks:49,headline:"Where revenue leaks between product view and checkout"},"google-search-console":{registryAppId:"deco/google-search-console",checks:49,headline:"Search visibility & indexing gaps across your catalog"}};function mt(o){const e=o.properties;if(!e)return[];const t=[];for(const[n,i]of Object.entries(e)){const r=i?.properties?.__type?.const;typeof r=="string"&&r.length>0&&t.push({fieldKey:n,bindingType:r})}return t}function ut(o,e){const t=[];if(o.length&&t.push({field:["id"],operator:"in",value:o}),e.length&&t.push({field:["name"],operator:"in",value:e}),t.length!==0)return t.length===1?t[0]:{operator:"or",conditions:t}}function Z(o){const e=o;if(e.isError)throw new Error(e.content?.find(t=>t.text)?.text??"Tool call failed");return e.structuredContent??o}function ft(o,e,t,n){return{...o??{},[e]:{__type:t,value:n}}}function pt(o,e,t){const n=o.filter(i=>i.app_name===e||!!t&&i.app_id===t);return n.length===0?null:(n.sort((i,a)=>{const l=r=>r.status==="active"?0:1;return l(i)!==l(a)?l(i)-l(a):(a.updated_at??"").localeCompare(i.updated_at??"")}),n[0].id)}function gt(o){return o.server?.icons?.[0]?.src??Xe(o.server?.repository)??null}function ht(o,e){const t=o._meta?.["mcp.mesh"];return t?.friendlyName||t?.friendly_name||o.title||o.server?.title||o.server?.name||e}function xt(o){const e=[],t=new Set(o.connections.map(n=>n.id));for(const n of o.requirements){const i=o.curated[n.bindingType],a=i?o.itemsById[i.registryAppId]:o.itemsByName[n.bindingType];if(!a)continue;const l=o.configurationState?.[n.fieldKey]?.value,r=!!l&&t.has(l),c=r?o.connectionReadiness?.[l]!==!1:!1,m=r&&c;e.push({fieldKey:n.fieldKey,bindingType:n.bindingType,registryItem:a,title:ht(a,n.bindingType),icon:gt(a),headline:i?.headline??a._meta?.["mcp.mesh"]?.short_description??null,checks:i?.checks??null,bullets:i?.bullets??[],satisfied:m,candidateConnectionId:m?null:r?l:pt(o.connections,n.bindingType,i?.registryAppId)})}return e}function yt(o){const e=_.c(39),{selfClient:t,org:n,cdConnectionId:i}=o;let a;e[0]!==i||e[1]!==n.id||e[2]!==n.slug?(a={connectionId:i,orgId:n.id,orgSlug:n.slug},e[0]=i,e[1]=n.id,e[2]=n.slug,e[3]=a):a=e[3];const l=je(a);let r;e[4]!==i||e[5]!==n.id?(r=M.commerceDiscoveryCompanionSchema(n.id,i),e[4]=i,e[5]=n.id,e[6]=r):r=e[6];let c;e[7]!==l?(c=async()=>{const y=await l.callTool({name:"MCP_CONFIGURATION",arguments:{}});return Z(y)},e[7]=l,e[8]=c):c=e[8];let m;e[9]!==r||e[10]!==c?(m={queryKey:r,queryFn:c},e[9]=r,e[10]=c,e[11]=m):m=e[11];const f=ce(m),u=mt(f.data?.stateSchema??{properties:{}}),p=u.map(wt),h=u.map(Nt).filter(St),g=u.filter(_t).map(vt),x=[...h,...g].sort().join(",");let b;e[12]!==i||e[13]!==n.id?(b=M.commerceDiscoveryConnection(n.id,i),e[12]=i,e[13]=n.id,e[14]=b):b=e[14];let C;e[15]!==i||e[16]!==t?(C=async()=>{const y=await t.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:i}});return Z(y)},e[15]=i,e[16]=t,e[17]=C):C=e[17];let d;e[18]!==b||e[19]!==C?(d={queryKey:b,queryFn:C},e[18]=b,e[19]=C,e[20]=d):d=e[20];const j=ce(d),v=j.data?.item?.configuration_state??null;let N;e[21]!==v?(N=y=>v?.[y.fieldKey]?.value,e[21]=v,e[22]=N):N=e[22];const E=u.map(N).filter(Ct),w=ce({queryKey:M.commerceDiscoveryCompanionConnections(n.id),enabled:u.length>0,queryFn:async()=>{const y=[{field:["app_name"],operator:"in",value:p},{field:["app_id"],operator:"in",value:h}];E.length>0&&y.push({field:["id"],operator:"in",value:E});const R=await t.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{operator:"or",conditions:y},limit:1e3}});return Z(R)}}),O=w.data?.items??[],I=new Set(E),Q=O.filter(y=>I.has(y.id)),W=Q.filter(jt);let T;e[23]!==n.id||e[24]!==n.slug?(T=y=>({queryKey:M.commerceDiscoveryCompanionOAuthStatus(n.id,y.id),queryFn:async()=>{const R=await fetch(`/api/${encodeURIComponent(n.slug)}/connections/${encodeURIComponent(y.id)}/oauth-token/status`,{credentials:"include"});return R.ok?{hasToken:(await R.json()).hasToken===!0}:{hasToken:!1}},retry:!1}),e[23]=n.id,e[24]=n.slug,e[25]=T):T=e[25];const P=nt({queries:W.map(T)});let A;e[26]!==P?(A=(y,R)=>[y.id,P[R]?.data?.hasToken===!0],e[26]=P,e[27]=A):A=e[27];const K=new Map(W.map(A)),G={};for(const y of Q)G[y.id]=!y.oauth_config||!!y.connection_token||K.get(y.id)===!0;const D=ce({queryKey:M.commerceDiscoveryCompanionRegistry(n.id,x),enabled:u.length>0,queryFn:async()=>{const y=ut(h,g),R=await et(ke.REGISTRY(n.id),n.id,n.slug,"COLLECTION_REGISTRY_APP_LIST",{...y?{where:y}:{},limit:1e3});return Z(R)}}),Y={},$={};for(const y of D.data?.items??[])Y[y.id]=y,y.server?.name&&($[y.server.name]=y);const q=xt({requirements:u,itemsById:Y,itemsByName:$,connections:O,connectionReadiness:G,configurationState:v,curated:Ce});let k;e[28]!==j||e[29]!==w||e[30]!==P||e[31]!==D||e[32]!==u||e[33]!==f.isPending?(k=f.isPending||j.isPending||u.length>0&&(w.isPending||D.isPending||P.some(bt)),e[28]=j,e[29]=w,e[30]=P,e[31]=D,e[32]=u,e[33]=f.isPending,e[34]=k):k=e[34];const B=k,V=f.error??j.error??w.error??D.error??null;let H;return e[35]!==q||e[36]!==V||e[37]!==B?(H={cards:q,isLoading:B,error:V},e[35]=q,e[36]=V,e[37]=B,e[38]=H):H=e[38],H}function bt(o){return o.isPending}function jt(o){return o.oauth_config&&!o.connection_token}function Ct(o){return typeof o=="string"&&o.length>0}function vt(o){return o.bindingType}function _t(o){return!Ce[o.bindingType]}function St(o){return!!o}function Nt(o){return Ce[o.bindingType]?.registryAppId}function wt(o){return o.bindingType}function It({selfClient:o,org:e,userId:t,cdConnectionId:n}){const i=Ke(),[a,l]=z.useState(null),[r,c]=z.useState(null),m=async(u,p)=>{const h=await o.callTool({name:"COLLECTION_CONNECTIONS_UPDATE",arguments:{id:u,data:p}});return Z(h)};async function f(u){l(u.fieldKey),c(null);try{let p=u.candidateConnectionId;if(!p){const d=tt(u.registryItem,e.id,t,{remoteIndex:0}),j=d.connection_type==="STDIO",v=!!d.connection_url,N=j&&d.connection_headers&&typeof d.connection_headers=="object"&&"command"in d.connection_headers;if(!v&&!N){c(`${u.title} cannot be connected: no connection method available`);return}const E=await o.callTool({name:"COLLECTION_CONNECTIONS_CREATE",arguments:{data:d}});p=Z(E).item.id}const h=p,g=await st({connectionId:h,orgId:e.id,orgSlug:e.slug,persistFallback:d=>m(h,{connection_token:d}).then(()=>{})});if(!g.ok){c(`Couldn't sign in to ${u.title}: ${g.error}`);return}const x=await o.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:n}}),b=Z(x).item?.configuration_state??null,C=ft(b,u.fieldKey,u.bindingType,h);await m(n,{configuration_state:C}),await i.invalidateQueries({queryKey:M.commerceDiscoveryConnection(e.id,n)}),await i.invalidateQueries({queryKey:M.commerceDiscoveryCompanionConnections(e.id)})}catch(p){c(p instanceof Error?p.message:String(p))}finally{l(null)}}return{connect:f,connectingFieldKey:a,error:r}}function Et(o){const e=_.c(30),{org:t,cdConnectionId:n,reportDisabled:i,onOpenReport:a}=o,{data:l}=we.useSession(),r=l?.user?.id??"";let c;e[0]!==t.id||e[1]!==t.slug?(c={connectionId:Re,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=c):c=e[2];const m=je(c);let f;e[3]!==n||e[4]!==t||e[5]!==m?(f={selfClient:m,org:t,cdConnectionId:n},e[3]=n,e[4]=t,e[5]=m,e[6]=f):f=e[6];const{cards:u,isLoading:p,error:h}=yt(f);let g;e[7]!==n||e[8]!==t||e[9]!==m||e[10]!==r?(g={selfClient:m,org:t,userId:r,cdConnectionId:n},e[7]=n,e[8]=t,e[9]=m,e[10]=r,e[11]=g):g=e[11];const{connect:x,connectingFieldKey:b,error:C}=It(g);let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Oe,{size:16}),e[12]=d):d=e[12];let j;e[13]!==a||e[14]!==i?(j=s.jsxs(oe,{type:"button",size:"xl",className:"w-full",onClick:a,disabled:i,children:["See full report",d]}),e[13]=a,e[14]=i,e[15]=j):j=e[15];const v=j;if(!p&&!h&&u.length===0){let I;return e[16]!==v?(I=s.jsx("div",{className:"flex min-h-0 flex-1 flex-col justify-end gap-10 md:grid md:flex-none",children:v}),e[16]=v,e[17]=I):I=e[17],I}const N=b!==null;let E;e[18]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx("p",{className:"text-2xl font-medium text-foreground",children:"Unlock your full diagnostic"}),s.jsx("p",{className:"text-base text-muted-foreground",children:"Connect your tools to unlock 100+ checks across your funnel."})]}),e[18]=E):E=e[18];let w;e[19]!==N||e[20]!==u||e[21]!==x||e[22]!==C||e[23]!==b||e[24]!==h||e[25]!==p?(w=h?s.jsxs("div",{role:"alert",className:"rounded-2xl border border-border bg-card p-4",children:[s.jsx("p",{className:"text-sm text-foreground",children:"Couldn't load companion integrations."}),s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Reload the page to try again."})]}):p?s.jsx("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[0,1,2].map(Tt)}):s.jsx(ye,{wrapperClassName:"flex min-h-0 flex-1 flex-col md:block",className:"-mx-1 min-h-0 flex-1 overflow-y-auto px-1 md:max-h-[45vh] md:flex-none",children:s.jsxs("div",{className:"grid gap-4",children:[C&&s.jsx("p",{role:"alert",className:"text-sm text-destructive",children:C}),u.map(I=>s.jsx(ct,{card:I,connecting:b===I.fieldKey,disabled:N&&b!==I.fieldKey,onConnect:()=>{x(I)}},I.fieldKey))]})}),e[19]=N,e[20]=u,e[21]=x,e[22]=C,e[23]=b,e[24]=h,e[25]=p,e[26]=w):w=e[26];let O;return e[27]!==v||e[28]!==w?(O=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 md:grid md:flex-none",children:[E,w,v]}),e[27]=v,e[28]=w,e[29]=O):O=e[29],O}function Tt(o){return s.jsx(at,{},o)}function Pe(o){const e=_.c(16),{label:t,iconSize:n,className:i,iconClassName:a,labelClassName:l}=o,r=n===void 0?14:n;let c;e[0]!==i?(c=J("inline-flex items-center gap-2",i),e[0]=i,e[1]=c):c=e[1];let m;e[2]!==a?(m=J("shrink-0 animate-spin",a),e[2]=a,e[3]=m):m=e[3];let f;e[4]!==r||e[5]!==m?(f=s.jsx(Ne,{size:r,className:m}),e[4]=r,e[5]=m,e[6]=f):f=e[6];let u;e[7]!==l?(u=J("text-sm",l),e[7]=l,e[8]=u):u=e[8];let p;e[9]!==t||e[10]!==u?(p=s.jsx("span",{className:u,children:t}),e[9]=t,e[10]=u,e[11]=p):p=e[11];let h;return e[12]!==c||e[13]!==f||e[14]!==p?(h=s.jsxs("span",{className:c,children:[f,p]}),e[12]=c,e[13]=f,e[14]=p,e[15]=h):h=e[15],h}const Ue="https://decocms-tanstack.deco-cx.workers.dev/agendar",kt="Rather have us walk you through it?",Rt="Book a 20-minute call and we'll run the diagnostic with you, live.";function Ot(o){const e=_.c(6),{size:t,className:n}=o,i=t===void 0?"lg":t;let a;e[0]!==n?(a=J("w-full",n),e[0]=n,e[1]=a):a=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("a",{href:Ue,target:"_blank",rel:"noreferrer",children:["Schedule a meeting",s.jsx(Le,{size:16})]}),e[2]=l):l=e[2];let r;return e[3]!==i||e[4]!==a?(r=s.jsx(oe,{asChild:!0,variant:"outline",size:i,className:a,children:l}),e[3]=i,e[4]=a,e[5]=r):r=e[5],r}function Se(o){const e=_.c(2),{children:t}=o;let n;return e[0]!==t?(n=s.jsx("div",{className:"relative z-10 flex h-12 w-12 items-center justify-center rounded-full border border-border bg-card card-shadow",children:t}),e[0]=t,e[1]=n):n=e[1],n}function zt(){const o=_.c(4);let e;o[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Se,{children:s.jsx($e,{size:20,className:"text-muted-foreground"})}),o[0]=e):e=o[0];let t;o[1]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("div",{className:"relative mx-4 h-px flex-1 bg-border",children:s.jsx("span",{className:"absolute top-1/2 h-1.5 w-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full bg-foreground animate-connection-travel","aria-hidden":!0})}),o[1]=t):t=o[1];let n;o[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("span",{className:"absolute inset-0 rounded-full border border-foreground/40 animate-connection-arrive","aria-hidden":!0}),o[2]=n):n=o[2];let i;return o[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"flex items-center justify-between rounded-2xl border border-border/60 bg-muted/40 px-7 py-7",children:[e,t,s.jsxs("div",{className:"relative",children:[n,s.jsxs(Se,{children:[s.jsx("img",{src:"/logos/deco logo.svg",alt:"deco",className:"h-6 w-6 dark:hidden"}),s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"deco",className:"hidden h-6 w-6 dark:block"})]})]})]}),o[3]=i):i=o[3],i}function Lt(){const o=_.c(2);let e;o[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(zt,{}),o[0]=e):e=o[0];let t;return o[1]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("div",{className:"relative flex h-full w-full items-center justify-center p-10",children:s.jsxs("div",{className:"flex w-full max-w-[380px] flex-col gap-6 rounded-3xl border border-border bg-card p-8 card-shadow",children:[e,s.jsxs("div",{className:"grid gap-2",children:[s.jsx("h2",{className:"text-xl font-medium leading-7 text-foreground",children:kt}),s.jsx("p",{className:"text-base leading-6 text-muted-foreground",children:Rt})]}),s.jsx(Ot,{size:"xl"})]})}),o[1]=t):t=o[1],t}function $t(o){const e=_.c(7),{className:t}=o;let n;e[0]!==t?(n=J("flex items-center gap-4 rounded-2xl border border-border bg-card p-5 card-shadow transition-colors hover:bg-accent",t),e[0]=t,e[1]=n):n=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("span",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",children:s.jsx($e,{size:20})}),e[2]=i):i=e[2];let a,l;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("span",{className:"flex flex-1 flex-col gap-0.5",children:[s.jsx("span",{className:"text-base font-medium leading-5 text-foreground",children:"Prefer to talk to a human?"}),s.jsx("span",{className:"text-sm leading-5 text-muted-foreground",children:"Book a call and we'll run the diagnostic with you."})]}),l=s.jsx(Le,{size:18,className:"shrink-0 text-muted-foreground"}),e[3]=a,e[4]=l):(a=e[3],l=e[4]);let r;return e[5]!==n?(r=s.jsxs("a",{href:Ue,target:"_blank",rel:"noreferrer",className:n,children:[i,a,l]}),e[5]=n,e[6]=r):r=e[6],r}function Ae(o){const e=_.c(10),{host:t}=o,n=`https://www.google.com/s2/favicons?domain=${t}&sz=128`;let i,a,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-7 w-7 dark:hidden"}),a=s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-7 w-7 hidden dark:block"}),l=s.jsx("div",{className:"h-6 w-px rotate-12 bg-border","aria-hidden":"true"}),e[0]=i,e[1]=a,e[2]=l):(i=e[0],a=e[1],l=e[2]);let r;e[3]!==n?(r=s.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-border bg-white",children:s.jsx("img",{src:n,alt:"",className:"h-5 w-5",loading:"lazy"})}),e[3]=n,e[4]=r):r=e[4];let c;e[5]!==t?(c=s.jsx("span",{className:"text-lg font-medium text-foreground",children:t}),e[5]=t,e[6]=c):c=e[6];let m;return e[7]!==r||e[8]!==c?(m=s.jsxs("div",{className:"flex items-center gap-3",children:[i,a,l,r,c]}),e[7]=r,e[8]=c,e[9]=m):m=e[9],m}function Zn(){const o=_.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ut,{}),o[0]=e):e=o[0],e}const De=z.createContext(null),Me=()=>z.useContext(De);function Pt(o){if(!o)return null;const e=xe(o);return e.ok?new URL(e.value).hostname:null}function Ut(){const o=_.c(9);let e;o[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/commerce-onboarding"},o[0]=e):e=o[0];const t=qe(e),{org:n,siteUrl:i}=t;let a;o[1]!==i?(a=Pt(i),o[1]=i,o[2]=a):a=o[2];const l=a;let r;o[3]!==n||o[4]!==i?(r=s.jsx(At,{requestedOrgSlug:n,siteUrl:i}),o[3]=n,o[4]=i,o[5]=r):r=o[5];let c;return o[6]!==l||o[7]!==r?(c=s.jsx(De.Provider,{value:l,children:r}),o[6]=l,o[7]=r,o[8]=c):c=o[8],c}function At(o){const e=_.c(8),{requestedOrgSlug:t,siteUrl:n}=o,{data:i,isPending:a}=we.useSession(),l=Me();if(a){let c;return e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(L,{children:s.jsx(re,{label:"Preparing commerce onboarding..."})}),e[0]=c):c=e[0],c}if(!i){const c=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let m;e[1]!==l?(m=l?s.jsx(Ae,{host:l}):void 0,e[1]=l,e[2]=m):m=e[2];let f;return e[3]!==m?(f=s.jsx(L,{children:s.jsx(We,{callbackUrl:c,allowAutoLogin:!1,title:"Unlock your full diagnostic",subtitle:null,brand:m})}),e[3]=m,e[4]=f):f=e[4],f}let r;return e[5]!==t||e[6]!==n?(r=s.jsx(Dt,{requestedOrgSlug:t,siteUrl:n}),e[5]=t,e[6]=n,e[7]=r):r=e[7],r}function Dt(o){const e=_.c(40),{requestedOrgSlug:t,siteUrl:n}=o,i=Ie(),a=Be(),[l,r]=z.useState(null),[c,m]=z.useState(null),f=a.data?.map(Kt)??[];let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u={mutationFn:Mt,retry:!1,onSuccess:d=>{m(d)}},e[0]=u):u=e[0];const p=Ee(u);if(a.isPending){let d;return e[1]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(L,{children:s.jsx(re,{label:"Preparing commerce onboarding..."})}),e[1]=d):d=e[1],d}if(a.error){let d;return e[2]!==a?(d=s.jsx(me,{title:"We could not load your organizations",description:"Retry to continue commerce setup from this page.",actionLabel:"Retry",onRetry:()=>a.refetch()}),e[2]=a,e[3]=d):d=e[3],d}const h=t?f.find(d=>d.slug===t):null;if(h){let d;return e[4]!==h||e[5]!==n?(d=s.jsx(de,{org:h,initialSiteUrl:n}),e[4]=h,e[5]=n,e[6]=d):d=e[6],d}if(t){let d;return e[7]!==a?(d=s.jsx(me,{title:"Organization not found",description:"We could not find that organization for your account.",actionLabel:"Retry",onRetry:()=>a.refetch()}),e[7]=a,e[8]=d):d=e[8],d}if(l){let d;return e[9]!==l||e[10]!==n?(d=s.jsx(de,{org:l,initialSiteUrl:n}),e[9]=l,e[10]=n,e[11]=d):d=e[11],d}if(f.length===1&&f[0]){let d;return e[12]!==f[0]||e[13]!==n?(d=s.jsx(de,{org:f[0],initialSiteUrl:n}),e[12]=f[0],e[13]=n,e[14]=d):d=e[14],d}if(f.length>1){let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(F,{title:"Choose an organization",description:"Select where commerce diagnostics should continue."}),e[15]=d):d=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=N=>r(N),e[16]=j):j=e[16];let v;return e[17]!==f?(v=s.jsx(L,{children:s.jsxs("div",{className:"grid gap-10",children:[d,s.jsx(ye,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:s.jsx(_e,{organizations:f,selectLabel:"Continue",onSelected:j})})]})}),e[17]=f,e[18]=v):v=e[18],v}if(!c){let d;e[19]!==p?(d=()=>{p.reset(),p.mutate()},e[19]=p,e[20]=d):d=e[20];let j;return e[21]!==p||e[22]!==d?(j=s.jsx(qt,{mutation:p,onRetry:d}),e[21]=p,e[22]=d,e[23]=j):j=e[23],j}const g=c;if(g?.success&&(g.status==="created"||g.status==="joined"||g.status==="already_has_organization")&&g.organization){let d;return e[24]!==g.organization||e[25]!==n?(d=s.jsx(de,{org:g.organization,initialSiteUrl:n}),e[24]=g.organization,e[25]=n,e[26]=d):d=e[26],d}if(g?.status==="ambiguous"&&g.organizations&&g.organizations.length>0){let d;e[27]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(F,{title:"Choose an organization",description:"Your email can access more than one organization. Choose where commerce setup should continue."}),e[27]=d):d=e[27];const j=g.domain??void 0;let v;e[28]!==i||e[29]!==n?(v=(E,w)=>{Te(),r({...E,slug:w}),i({to:"/commerce-onboarding",search:{org:w,siteUrl:n}})},e[28]=i,e[29]=n,e[30]=v):v=e[30];let N;return e[31]!==g.organizations||e[32]!==j||e[33]!==v?(N=s.jsx(L,{children:s.jsxs("div",{className:"grid gap-10",children:[d,s.jsx(ye,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:s.jsx(_e,{organizations:g.organizations,domain:j,onJoined:v})})]})}),e[31]=g.organizations,e[32]=j,e[33]=v,e[34]=N):N=e[34],N}const x=g?.error??"We could not determine a commerce organization for this account.";let b;e[35]!==p?(b=()=>{m(null),p.reset()},e[35]=p,e[36]=b):b=e[36];let C;return e[37]!==x||e[38]!==b?(C=s.jsx(me,{title:"Commerce onboarding needs support",description:x,actionLabel:"Try again",onRetry:b}),e[37]=x,e[38]=b,e[39]=C):C=e[39],C}async function Mt(){const e=await(await fetch("/api/auth/custom/ensure-organization",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}})).json();return e.success&&(e.status==="created"||e.status==="joined"||e.status==="already_has_organization")&&e.organization&&Te(),e}function Kt(o){return{id:o.id,name:o.name,slug:o.slug,logo:o.logo??null}}function qt(o){const e=_.c(7),{mutation:t,onRetry:n}=o,i=z.useRef(!1);let a;e[0]!==t?(a=m=>{!m||i.current||(i.current=!0,t.mutate())},e[0]=t,e[1]=a):a=e[1];const l=a;if(t.error){let m;return e[2]!==n?(m=s.jsx(me,{title:"Commerce onboarding is unavailable",description:"We could not prepare an organization for commerce setup. Retry from this page or contact support.",actionLabel:"Retry",onRetry:n}),e[2]=n,e[3]=m):m=e[3],m}let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(re,{label:"Preparing your commerce workspace..."}),e[4]=r):r=e[4];let c;return e[5]!==l?(c=s.jsx(L,{children:s.jsx("div",{ref:l,children:r})}),e[5]=l,e[6]=c):c=e[6],c}function F(o){const e=_.c(8),{title:t,description:n}=o,i=Me();let a;e[0]!==i?(a=i?s.jsx(Ae,{host:i}):s.jsxs("div",{children:[s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e[0]=i,e[1]=a):a=e[1];let l;e[2]!==n||e[3]!==t?(l=(t||n)&&s.jsxs("div",{className:"space-y-2",children:[t&&s.jsx("h1",{className:"text-2xl font-medium leading-8",children:t}),n&&s.jsx("p",{className:"text-base text-muted-foreground leading-6",children:n})]}),e[2]=n,e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==a||e[6]!==l?(r=s.jsxs("div",{className:"grid gap-10",children:[a,l]}),e[5]=a,e[6]=l,e[7]=r):r=e[7],r}function re(o){const e=_.c(2),{label:t}=o;let n;return e[0]!==t?(n=s.jsx("div",{className:"py-4",role:"status","aria-live":"polite",children:s.jsx(Pe,{label:t,className:"text-muted-foreground"})}),e[0]=t,e[1]=n):n=e[1],n}function me(o){const e=_.c(9),{title:t,description:n,actionLabel:i,onRetry:a}=o;let l;e[0]!==n||e[1]!==t?(l=s.jsx(F,{title:t,description:n}),e[0]=n,e[1]=t,e[2]=l):l=e[2];let r;e[3]!==i||e[4]!==a?(r=s.jsx(oe,{type:"button",size:"xl",className:"w-full",onClick:a,children:i}),e[3]=i,e[4]=a,e[5]=r):r=e[5];let c;return e[6]!==l||e[7]!==r?(c=s.jsx(L,{children:s.jsxs("div",{className:"grid gap-10",children:[l,r]})}),e[6]=l,e[7]=r,e[8]=c):c=e[8],c}function Bt(o){return o.content?.find(e=>e.text)?.text??"Commerce Discovery setup failed."}function ge(o){const e=o;if(e.isError)throw new Error(Bt(e));return e.structuredContent??o}function de(o){const e=_.c(3),{org:t,initialSiteUrl:n}=o;let i;return e[0]!==n||e[1]!==t?(i=s.jsx(He,{children:a=>{const{reset:l}=a;return s.jsx(Fe,{fallback:r=>{const{error:c,resetError:m}=r;return s.jsx(L,{children:s.jsx(Ht,{orgName:t.name,message:c instanceof Error?c.message:"We could not check Commerce Discovery setup.",onRetry:()=>{l(),m()}})})},children:s.jsx(z.Suspense,{fallback:s.jsx(L,{children:s.jsx(re,{label:"Connecting workspace..."})}),children:s.jsx(Ft,{org:t,initialSiteUrl:n},`${t.id}:${n??""}`)})})}}),e[0]=n,e[1]=t,e[2]=i):i=e[2],i}function Ht(o){const e=_.c(10),{orgName:t,message:n,onRetry:i}=o,a=`Commerce setup will continue for ${t}.`;let l;e[0]!==a?(l=s.jsx(F,{title:"Commerce diagnostics",description:a}),e[0]=a,e[1]=l):l=e[1];let r;e[2]!==n?(r=s.jsx(ue,{message:n}),e[2]=n,e[3]=r):r=e[3];let c;e[4]!==i?(c=s.jsx(oe,{type:"button",size:"xl",className:"w-full",onClick:i,children:"Retry"}),e[4]=i,e[5]=c):c=e[5];let m;return e[6]!==l||e[7]!==r||e[8]!==c?(m=s.jsxs("div",{className:"grid gap-10",children:[l,r,c]}),e[6]=l,e[7]=r,e[8]=c,e[9]=m):m=e[9],m}function Ft(o){const e=_.c(83),{org:t,initialSiteUrl:n}=o,i=Ie();let a;e[0]!==t.id||e[1]!==t.slug?(a={connectionId:Re,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=a):a=e[2];const l=je(a),[r,c]=z.useState(n??""),[m,f]=z.useState(null),[u,p]=z.useState(null),h=z.useRef(!1),g=ke.COMMERCE_DISCOVERY(t.id),x=Ve(t.id),b=M.commerceDiscoveryConnection(t.id,g);let C;e[3]!==g||e[4]!==l?(C=async()=>{const S=await l.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:g}});return ge(S)},e[3]=g,e[4]=l,e[5]=C):C=e[5];let d;e[6]!==b||e[7]!==C?(d={queryKey:b,queryFn:C,retry:!1},e[6]=b,e[7]=C,e[8]=d):d=e[8];const j=ve(d),v=M.commerceDiscoveryVirtualMcp(t.id,x);let N;e[9]!==l||e[10]!==x?(N=async()=>{const S=await l.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:x}});return ge(S)},e[9]=l,e[10]=x,e[11]=N):N=e[11];let E;e[12]!==v||e[13]!==N?(E={queryKey:v,queryFn:N,retry:!1},e[12]=v,e[13]=N,e[14]=E):E=e[14];const w=ve(E);let O;e[15]!==l?(O=async S=>{const U=await l.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:S}});return ge(U)},e[15]=l,e[16]=O):O=e[16];let I;e[17]!==j||e[18]!==w?(I=S=>{f(S),p(null),j.refetch(),w.refetch()},e[17]=j,e[18]=w,e[19]=I):I=e[19];let Q;e[20]===Symbol.for("react.memo_cache_sentinel")?(Q=S=>{p(S instanceof Error?S.message:"Commerce Discovery setup failed.")},e[20]=Q):Q=e[20];let W;e[21]!==O||e[22]!==I?(W={mutationFn:O,retry:!1,onSuccess:I,onError:Q},e[21]=O,e[22]=I,e[23]=W):W=e[23];const T=Ee(W),P=!!j.data.item&&!!w.data.item;let A;e[24]!==T?(A=S=>{const U=xe(S);if(!U.ok){p(U.error);return}p(null),T.mutate(U.value)},e[24]=T,e[25]=A):A=e[25];const K=A;let G;e[26]!==n||e[27]!==K||e[28]!==P?(G=S=>{!S||h.current||P||!n||(h.current=!0,K(n))},e[26]=n,e[27]=K,e[28]=P,e[29]=G):G=e[29];const D=G;let Y;e[30]!==K||e[31]!==r?(Y=S=>{S.preventDefault(),K(r)},e[30]=K,e[31]=r,e[32]=Y):Y=e[32];const $=Y;let q;e[33]!==g||e[34]!==m?.reportApp||e[35]!==x?(q=m?.reportApp??{connectionId:g,virtualMcpId:x,toolName:Ze},e[33]=g,e[34]=m?.reportApp,e[35]=x,e[36]=q):q=e[36];const k=q;let B;e[37]!==i||e[38]!==t.slug||e[39]!==k.connectionId||e[40]!==k.toolName||e[41]!==k.virtualMcpId?(B=()=>{localStorage.setItem(Qe.sidebarOpen(),JSON.stringify(!1)),i({to:"/$org/$taskId",params:{org:t.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:k.virtualMcpId,main:Ge(k.connectionId,k.toolName),chat:0}})},e[37]=i,e[38]=t.slug,e[39]=k.connectionId,e[40]=k.toolName,e[41]=k.virtualMcpId,e[42]=B):B=e[42];const V=B;if(P){let S;return e[43]!==V||e[44]!==t||e[45]!==k?(S=s.jsx(Qt,{org:t,reportApp:k,onOpenReport:V}),e[43]=V,e[44]=t,e[45]=k,e[46]=S):S=e[46],S}if(n){let S;e[47]!==n?(S=xe(n),e[47]=n,e[48]=S):S=e[48];const U=S;if(!U.ok){const pe=`Commerce setup will continue for ${t.name}.`;let te;e[49]!==pe?(te=s.jsx(F,{title:"Commerce diagnostics",description:pe}),e[49]=pe,e[50]=te):te=e[50];let ne;e[51]!==U.error?(ne=s.jsx(ue,{message:U.error}),e[51]=U.error,e[52]=ne):ne=e[52];let se;e[53]!==$||e[54]!==u||e[55]!==T.isPending||e[56]!==r?(se=s.jsx(he,{siteUrl:r,error:u,isSubmitting:T.isPending,onSiteUrlChange:c,onSubmit:$}),e[53]=$,e[54]=u,e[55]=T.isPending,e[56]=r,e[57]=se):se=e[57];let ae;return e[58]!==te||e[59]!==ne||e[60]!==se?(ae=s.jsx(L,{children:s.jsxs("div",{className:"grid gap-10",children:[te,ne,se]})}),e[58]=te,e[59]=ne,e[60]=se,e[61]=ae):ae=e[61],ae}const fe=`Commerce Discovery is being prepared for ${U.value}.`;let X;e[62]!==fe?(X=s.jsx(F,{title:"Commerce diagnostics",description:fe}),e[62]=fe,e[63]=X):X=e[63];let ee;e[64]!==$||e[65]!==u||e[66]!==T||e[67]!==r?(ee=u?s.jsxs(s.Fragment,{children:[s.jsx(ue,{message:u}),s.jsx(he,{siteUrl:r,error:null,isSubmitting:T.isPending,onSiteUrlChange:c,onSubmit:$})]}):s.jsx(re,{label:"Setting up Commerce Discovery..."}),e[64]=$,e[65]=u,e[66]=T,e[67]=r,e[68]=ee):ee=e[68];let le;return e[69]!==X||e[70]!==ee||e[71]!==D?(le=s.jsx(L,{children:s.jsxs("div",{ref:D,className:"grid gap-10",children:[X,ee]})}),e[69]=X,e[70]=ee,e[71]=D,e[72]=le):le=e[72],le}const H=`Commerce setup will continue for ${t.name}.`;let y;e[73]!==H?(y=s.jsx(F,{title:"Commerce diagnostics",description:H}),e[73]=H,e[74]=y):y=e[74];let R;e[75]!==$||e[76]!==u||e[77]!==T.isPending||e[78]!==r?(R=s.jsx(he,{siteUrl:r,error:u,isSubmitting:T.isPending,onSiteUrlChange:c,onSubmit:$}),e[75]=$,e[76]=u,e[77]=T.isPending,e[78]=r,e[79]=R):R=e[79];let ie;return e[80]!==y||e[81]!==R?(ie=s.jsx(L,{children:s.jsxs("div",{className:"grid gap-10",children:[y,R]})}),e[80]=y,e[81]=R,e[82]=ie):ie=e[82],ie}function he(o){const e=_.c(22),{siteUrl:t,error:n,isSubmitting:i,onSiteUrlChange:a,onSubmit:l}=o;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:"Website URL"}),e[0]=r):r=e[0];let c;e[1]!==a?(c=b=>a(b.target.value),e[1]=a,e[2]=c):c=e[2];const m=!!n;let f;e[3]!==i||e[4]!==t||e[5]!==c||e[6]!==m?(f=s.jsx(Ye,{id:"commerce-site-url",type:"text",inputMode:"url",value:t,onChange:c,placeholder:"https://example.com","aria-invalid":m,disabled:i}),e[3]=i,e[4]=t,e[5]=c,e[6]=m,e[7]=f):f=e[7];let u;e[8]!==n?(u=n?s.jsx(ue,{message:n}):null,e[8]=n,e[9]=u):u=e[9];let p;e[10]!==f||e[11]!==u?(p=s.jsxs("div",{className:"grid gap-2",children:[r,f,u]}),e[10]=f,e[11]=u,e[12]=p):p=e[12];let h;e[13]!==i?(h=i?s.jsx(Pe,{label:"Setting up"}):s.jsxs(s.Fragment,{children:["Continue",s.jsx(Oe,{size:16})]}),e[13]=i,e[14]=h):h=e[14];let g;e[15]!==i||e[16]!==h?(g=s.jsx(oe,{type:"submit",size:"xl",className:"w-full",disabled:i,children:h}),e[15]=i,e[16]=h,e[17]=g):g=e[17];let x;return e[18]!==l||e[19]!==p||e[20]!==g?(x=s.jsxs("form",{className:"grid gap-4",onSubmit:l,children:[p,g]}),e[18]=l,e[19]=p,e[20]=g,e[21]=x):x=e[21],x}function Qt(o){const e=_.c(10),{org:t,reportApp:n,onOpenReport:i}=o;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Lt,{}),e[0]=a):a=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(F,{}),e[1]=l):l=e[1];const r=!n.virtualMcpId;let c;e[2]!==i||e[3]!==t||e[4]!==n.connectionId||e[5]!==r?(c=s.jsx(Et,{org:t,cdConnectionId:n.connectionId,reportDisabled:r,onOpenReport:i}),e[2]=i,e[3]=t,e[4]=n.connectionId,e[5]=r,e[6]=c):c=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx($t,{className:"md:hidden"}),e[7]=m):m=e[7];let f;return e[8]!==c?(f=s.jsx(L,{visual:a,children:s.jsxs("div",{className:"flex h-[calc(100dvh-3rem)] flex-col gap-10 md:grid md:h-auto",children:[l,c,m]})}),e[8]=c,e[9]=f):f=e[9],f}function ue(o){const e=_.c(2),{message:t}=o;let n;return e[0]!==t?(n=s.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:t}),e[0]=t,e[1]=n):n=e[1],n}export{Zn as default};
|
package/dist/client/assets/{connect-desktop-dialog-CxAamCFt.js → connect-desktop-dialog-JUjDMHMz.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as b,w as N,K as k,k as z,j as s,r as M,B as T,l as v}from"./index-
|
|
1
|
+
import{c as b,w as N,K as k,k as z,j as s,r as M,B as T,l as v}from"./index-DILk6pqr.js";import{a as I,b as S,D,c as E,d as R}from"./dialog-CwfeALzq.js";import{S as _}from"./chat-context-SWJ_FDEf.js";import{i as $}from"./ChevronUp-CKICjFfX.js";import{a as A}from"./Eye-C6daRddp.js";import{u as B}from"./studio-tools-DWzikkvB.js";const L={online:!1,capabilities:[],ready:!1};function F(){const i=b.c(7),{org:e}=N(),l=B();let o;i[0]!==e.id?(o=k.currentLink(e.id),i[0]=e.id,i[1]=o):o=i[1];let t;i[2]!==l?(t=async()=>{const f=await l.call("LINK_CURRENT_GET",{});return f?{...f,ready:!0}:{...L,ready:!0}},i[2]=l,i[3]=t):t=i[3];let n;i[4]!==o||i[5]!==t?(n={queryKey:o,queryFn:t,staleTime:4e3,refetchInterval:5e3,refetchOnWindowFocus:!0},i[4]=o,i[5]=t,i[6]=n):n=i[6];const{data:p}=z(n);return p??L}function K(i){const e=b.c(3),{size:l}=i,o=l===void 0?16:l;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=t):t=e[0];let n;return e[1]!==o?(n=s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:t}),e[1]=o,e[2]=n):n=e[2],n}function O(i){const e=b.c(3),{size:l}=i,o=l===void 0?16:l;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=t):t=e[0];let n;return e[1]!==o?(n=s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:t}),e[1]=o,e[2]=n):n=e[2],n}const y="bunx decocms@latest link",w=[{capability:"claude-code",label:"Claude Code",description:"Runs through the Claude Code CLI",icon:s.jsx(K,{size:18})},{capability:"codex",label:"Codex",description:"Runs through the Codex CLI",icon:s.jsx(O,{size:18})}];function Q(i){return w.filter(e=>i.includes(e.capability)).map(e=>e.label)}function U(i){const e=b.c(21),{open:l,onOpenChange:o}=i,t=F(),[n,p]=M.useState(!1),f=t.hostname??t.machineId??"Your desktop",j=t.online?`Connected to ${f}`:"Connect your desktop";let a;e[0]!==j?(a=s.jsx(I,{children:j}),e[0]=j,e[1]=a):a=e[1];const C=t.online?"This machine provides the following local agents.":"Run this command in your desktop terminal. The dialog will close once your desktop is online.";let r;e[2]!==C?(r=s.jsx(S,{children:C}),e[2]=C,e[3]=r):r=e[3];let c;e[4]!==a||e[5]!==r?(c=s.jsxs(D,{children:[a,r]}),e[4]=a,e[5]=r,e[6]=c):c=e[6];let d;e[7]!==n||e[8]!==t.online?(d=!t.online&&s.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-sm",children:[s.jsx("span",{className:"flex-1",children:y}),s.jsx(T,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>{navigator.clipboard.writeText(y),p(!0),setTimeout(()=>p(!1),1500)},children:n?s.jsx($,{size:14}):s.jsx(A,{size:14})})]}),e[7]=n,e[8]=t.online,e[9]=d):d=e[9];let u;e[10]!==t.capabilities||e[11]!==t.online?(u=t.online?s.jsx("div",{className:"flex flex-col gap-3 text-sm",children:s.jsx("div",{className:"flex flex-col gap-2",children:w.map(x=>{const g=t.capabilities.includes(x.capability);return s.jsxs("div",{className:v("flex items-center gap-3 rounded-md border px-3 py-2",g?"border-border bg-background text-foreground":"border-border/60 bg-muted/40 text-muted-foreground"),children:[s.jsx("div",{className:v("flex size-6 items-center justify-center",g?"text-foreground":"text-muted-foreground"),children:x.icon}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"font-medium",children:x.label}),s.jsx("p",{className:"text-xs text-muted-foreground",children:g?x.description:"Not detected"})]}),s.jsx("span",{className:v("size-2 rounded-full",g?"bg-success":"bg-muted-foreground/30")})]},x.capability)})})}):s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(_,{size:"sm"}),"Waiting for desktop…"]}),e[10]=t.capabilities,e[11]=t.online,e[12]=u):u=e[12];let m;e[13]!==c||e[14]!==d||e[15]!==u?(m=s.jsxs(E,{className:"sm:max-w-md",children:[c,d,u]}),e[13]=c,e[14]=d,e[15]=u,e[16]=m):m=e[16];let h;return e[17]!==o||e[18]!==l||e[19]!==m?(h=s.jsx(R,{open:l,onOpenChange:o,children:m}),e[17]=o,e[18]=l,e[19]=m,e[20]=h):h=e[20],h}export{U as C,K as a,O as b,F as u,Q as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as _}from"./connection-slug-eyAPH6o3.js";import{c as R,w as $,b0 as k,K as D,l as w,j as x}from"./index-
|
|
1
|
+
import{g as _}from"./connection-slug-eyAPH6o3.js";import{c as R,w as $,b0 as k,K as D,l as w,j as x}from"./index-DILk6pqr.js";import{u as K}from"./use-registry-connections-DZ1G13oh.js";import{b as Q}from"./use-organization-settings-a8PuTrsa.js";import{S as E,e as F}from"./use-mcp-client-BdmHrvF5.js";import{u as H}from"./useInfiniteQuery-D-pnegbi.js";import{i as q,f as G}from"./extract-connection-data-qW230rJb.js";import{C as U}from"./card-D0ElZuSJ.js";import{I as V}from"./integration-icon-CxxjWIPp.js";function ae(s){const e=new Map;for(const o of s){const l=_(o),r=e.get(l);r?r.push(o):e.set(l,[o])}const t=[],u=new Set;for(const o of s){const l=_(o);if(u.has(l))continue;u.add(l);const r=e.get(l),m=r[0];r.length===1?t.push({type:"single",connection:m}):t.push({type:"group",key:l,icon:m.icon,title:m.app_name?m.title.replace(/\s*\(\d+\)\s*$/,""):m.title,connections:r})}return t}function ce(){const s=R.c(6),e=K(),t=Q(),u=$().project.enabledPlugins??[];let o;if(s[0]!==u||s[1]!==t||s[2]!==e){let l;s[4]!==t?(l=r=>t(r.id),s[4]=t,s[5]=l):l=s[5],o=e.filter(l).map(X),u.includes("private-registry")&&t(E)&&o.push({id:E,title:"Private Registry",icon:null}),s[0]=u,s[1]=t,s[2]=e,s[3]=o}else o=s[3];return o}function X(s){return{id:s.id,title:s.title,icon:s.icon}}const Y=24,S=3;function A(s){return s.id.includes("community-registry")}function z(s){const e=s?.trim();if(e)return{operator:"or",conditions:[{field:["title"],operator:"contains",value:e},{field:["description"],operator:"contains",value:e},{field:["name"],operator:"contains",value:e},{field:["server","title"],operator:"contains",value:e}]}}function T(s,e,t,u,o){const l=s.map(c=>c.id).sort().join(","),r=z(o),{data:m,fetchNextPage:d,hasNextPage:f,isFetchingNextPage:p,isLoading:b}=H({queryKey:D.storeDiscovery(e,`${l}:${o??""}`),queryFn:async({pageParam:c})=>{const n=c??{};return await Promise.all(s.map(async i=>{const y=n[i.id];if(y==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const j=q(i.id,e);let h;for(let v=0;v<S;v++){let C=null;try{C=await F({connectionId:i.id,orgId:e,orgSlug:t});const I={limit:Y};y&&(I.cursor=y),r&&(I.where=r);const P=await C.callTool({name:j,arguments:I}),N=P.structuredContent??P,M=N.nextCursor||N.cursor||void 0,L=G(N?[N]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:L,nextCursor:M}}catch(I){h=I}finally{await C?.close().catch(()=>{})}}return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${S} attempts:`,h),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}))},initialPageParam:{},getNextPageParam:c=>{const n={};let a=!1;for(const i of c)i.registryId&&(i.nextCursor?(n[i.registryId]=i.nextCursor,a=!0):n[i.registryId]="EXHAUSTED");return a?n:void 0},staleTime:3600*1e3,placeholderData:k,retry:!1,enabled:s.length>0}),g=[];if(m?.pages)for(const c of m.pages)for(const n of c)for(const a of n.items)g.push({...a,_sourceName:a._sourceName??n.registryTitle,_sourceIcon:a._sourceIcon??n.registryIcon,_registryId:a._registryId??n.registryId});return{items:g,hasMore:f??!1,isLoadingMore:p,isInitialLoading:b,fetchNextPage:()=>{f&&!p&&d()}}}function ue(s,e){const t=R.c(16),{org:u}=$();let o;t[0]!==s?(o=s.filter(Z),t[0]=s,t[1]=o):o=t[1];const l=o;let r;t[2]!==s?(r=s.filter(W),t[2]=s,t[3]=r):r=t[3];const m=r,d=T(l,u.id,u.slug,!0,e),f=T(m,u.id,u.slug,!0,e);let p;if(t[4]!==f.items||t[5]!==d.items){const y=new Set;p=[];const j=[...d.items,...f.items];for(const h of j){const v=`${h._registryId}:${h.id}`;y.has(v)||(y.add(v),p.push(h))}t[4]=f.items,t[5]=d.items,t[6]=p}else p=t[6];const b=d.isInitialLoading||f.isInitialLoading,g=d.isLoadingMore||f.isLoadingMore,c=d.hasMore||f.hasMore;let n;t[7]!==f||t[8]!==d?(n=()=>{d.hasMore&&d.fetchNextPage(),f.hasMore&&f.fetchNextPage()},t[7]=f,t[8]=d,t[9]=n):n=t[9];const a=n;let i;return t[10]!==c||t[11]!==b||t[12]!==g||t[13]!==p||t[14]!==a?(i={items:p,hasMore:c,isLoadingMore:g,isInitialLoading:b,loadMore:a},t[10]=c,t[11]=b,t[12]=g,t[13]=p,t[14]=a,t[15]=i):i=t[15],i}function W(s){return A(s)}function Z(s){return!A(s)}function fe(s){const e=R.c(37),{connection:t,onClick:u,headerActions:o,headerActionsAlwaysVisible:l,body:r,footer:m,className:d,fallbackIcon:f}=s,p=l===void 0?!1:l,b=u&&"hover:bg-muted/50";let g;e[0]!==d||e[1]!==b?(g=w("cursor-pointer transition-colors group overflow-hidden flex flex-col h-full",b,d),e[0]=d,e[1]=b,e[2]=g):g=e[2];let c;e[3]!==t.icon||e[4]!==t.title||e[5]!==f?(c=x.jsx(V,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:f}),e[3]=t.icon,e[4]=t.title,e[5]=f,e[6]=c):c=e[6];let n;e[7]!==o||e[8]!==p?(n=o&&x.jsx("div",{className:w("transition-opacity",!p&&"sm:opacity-0 sm:group-hover:opacity-100"),onClick:J,children:o}),e[7]=o,e[8]=p,e[9]=n):n=e[9];let a;e[10]!==n?(a=x.jsx("div",{className:"relative",children:n}),e[10]=n,e[11]=a):a=e[11];let i;e[12]!==c||e[13]!==a?(i=x.jsxs("div",{className:"flex items-start justify-between",children:[c,a]}),e[12]=c,e[13]=a,e[14]=i):i=e[14];let y;e[15]!==t.title?(y=x.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[15]=t.title,e[16]=y):y=e[16];const j=t.description||"No description";let h;e[17]!==j?(h=x.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j}),e[17]=j,e[18]=h):h=e[18];let v;e[19]!==h||e[20]!==y?(v=x.jsxs("div",{className:"flex flex-col gap-1",children:[y,h]}),e[19]=h,e[20]=y,e[21]=v):v=e[21];let C;e[22]!==r?(C=r&&x.jsx("div",{children:r}),e[22]=r,e[23]=C):C=e[23];let I;e[24]!==v||e[25]!==C||e[26]!==i?(I=x.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[i,v,C]}),e[24]=v,e[25]=C,e[26]=i,e[27]=I):I=e[27];let P;e[28]!==m?(P=m&&x.jsx("div",{className:"border-t border-border mt-auto",children:x.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:B,children:m})}),e[28]=m,e[29]=P):P=e[29];let N;e[30]!==I||e[31]!==P?(N=x.jsxs("div",{className:"flex flex-col flex-1",children:[I,P]}),e[30]=I,e[31]=P,e[32]=N):N=e[32];let M;return e[33]!==u||e[34]!==N||e[35]!==g?(M=x.jsx(U,{className:g,onClick:u,children:N}),e[33]=u,e[34]=N,e[35]=g,e[36]=M):M=e[36],M}function B(s){return s.stopPropagation()}function J(s){return s.stopPropagation()}export{fe as C,ue as a,ae as g,ce as u};
|